Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(44)

Issue 1571433004: Implements include/exclude register lists for translation. (Closed)

Created:
4 years, 11 months ago by Karl
Modified:
4 years, 11 months ago
Reviewers:
Jim Stichnoth, sehr, John
CC:
native-client-reviews_googlegroups.com
Base URL:
https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Target Ref:
refs/heads/master
Visibility:
Public.

Description

Implements include/exclude register lists for translation. This allows better debugging of register encodings into instructions, in the integrated assembler. BUG= https://bugs.chromium.org/p/nativeclient/issues/detail?id=4334 R=stichnot@chromium.org Committed: https://gerrit.chromium.org/gerrit/gitweb?p=native_client/pnacl-subzero.git;a=commit;h=5403f5dc6b43f077bbbee369bbe178b660654366

Patch Set 1 #

Patch Set 2 : fix nits. #

Total comments: 34

Patch Set 3 : Fix issues in last patch #

Patch Set 4 : Fix staticInit to get GlobalContext. #

Patch Set 5 : Fix nits. #

Total comments: 25

Patch Set 6 : Update TypeToRegisterSet for ARM. #

Patch Set 7 : Apply register class filtering to all targets. #

Patch Set 8 : Clean up MIPS implementation. #

Patch Set 9 : Merge with master. #

Total comments: 37

Patch Set 10 : Fixes to jpp's comments. #

Patch Set 11 : Fix issues raised by stichnot. #

Patch Set 12 : Add CL tests. #

Total comments: 18

Patch Set 13 : Fix issues of last patch. #

Total comments: 10

Patch Set 14 : Fix nits. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+245 lines, -59 lines) Patch
M src/IceCfg.h View 1 2 1 chunk +1 line, -1 line 0 comments Download
M src/IceClFlags.h View 1 2 3 4 5 6 7 8 9 10 11 12 5 chunks +23 lines, -0 lines 0 comments Download
M src/IceClFlags.cpp View 1 2 3 4 5 6 7 8 9 10 5 chunks +18 lines, -0 lines 0 comments Download
M src/IceDefs.h View 1 2 3 4 5 6 7 8 9 10 1 chunk +1 line, -0 lines 0 comments Download
M src/IceGlobalContext.cpp View 1 2 3 4 5 6 7 8 1 chunk +1 line, -1 line 0 comments Download
M src/IceRegistersMIPS32.h View 1 2 3 4 5 6 7 8 1 chunk +2 lines, -0 lines 0 comments Download
M src/IceTargetLowering.h View 1 2 3 4 5 6 7 8 9 10 2 chunks +8 lines, -2 lines 0 comments Download
M src/IceTargetLowering.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 5 chunks +101 lines, -5 lines 0 comments Download
M src/IceTargetLoweringARM32.h View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +1 line, -1 line 0 comments Download
M src/IceTargetLoweringARM32.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 4 chunks +19 lines, -5 lines 0 comments Download
M src/IceTargetLoweringMIPS32.h View 1 2 3 1 chunk +1 line, -1 line 0 comments Download
M src/IceTargetLoweringMIPS32.cpp View 1 2 3 4 5 6 7 4 chunks +24 lines, -10 lines 0 comments Download
M src/IceTargetLoweringX8632.cpp View 1 2 3 4 5 6 7 8 1 chunk +2 lines, -2 lines 0 comments Download
M src/IceTargetLoweringX8664.cpp View 1 2 3 4 5 6 7 8 1 chunk +2 lines, -2 lines 0 comments Download
M src/IceTargetLoweringX86Base.h View 1 2 3 4 5 6 7 8 1 chunk +1 line, -1 line 0 comments Download
M src/IceTargetLoweringX86BaseImpl.h View 1 2 3 4 5 6 7 8 1 chunk +7 lines, -3 lines 0 comments Download
M tests_lit/assembler/arm32/vadd.ll View 1 2 3 4 5 6 7 8 9 10 11 12 2 chunks +20 lines, -25 lines 0 comments Download
A tests_lit/llvm2ice_tests/unknown-arm-reg.ll View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +13 lines, -0 lines 0 comments Download

Messages

Total messages: 19 (4 generated)
Karl
4 years, 11 months ago (2016-01-08 23:42:28 UTC) #3
Jim Stichnoth
I'm "happy" to report that building 176.gcc this way: ./pydir/szbuild_spec2k.py -v -O2 --target=arm32 --filetype=asm --force ...
4 years, 11 months ago (2016-01-10 16:51:26 UTC) #4
John
https://codereview.chromium.org/1571433004/diff/20001/src/IceDefs.h File src/IceDefs.h (right): https://codereview.chromium.org/1571433004/diff/20001/src/IceDefs.h#newcode49 src/IceDefs.h:49: #include <unordered_set> Please don't add this include if you ...
4 years, 11 months ago (2016-01-11 15:43:26 UTC) #5
Karl
https://codereview.chromium.org/1571433004/diff/20001/src/IceClFlags.cpp File src/IceClFlags.cpp (right): https://codereview.chromium.org/1571433004/diff/20001/src/IceClFlags.cpp#newcode292 src/IceClFlags.cpp:292: "use-registers", On 2016/01/10 16:51:25, stichnot wrote: > Can you ...
4 years, 11 months ago (2016-01-12 23:44:05 UTC) #6
Jim Stichnoth
https://codereview.chromium.org/1571433004/diff/80001/src/IceClFlags.cpp File src/IceClFlags.cpp (right): https://codereview.chromium.org/1571433004/diff/80001/src/IceClFlags.cpp#newcode497 src/IceClFlags.cpp:497: // Sets. Maybe "unordered_set fields"? https://codereview.chromium.org/1571433004/diff/80001/src/IceClFlags.cpp#newcode526 src/IceClFlags.cpp:526: for (const ...
4 years, 11 months ago (2016-01-13 16:24:55 UTC) #7
Karl
This CL now applies command line register filters to all platforms! https://codereview.chromium.org/1571433004/diff/20001/tests_lit/assembler/arm32/vadd.ll File tests_lit/assembler/arm32/vadd.ll (right): ...
4 years, 11 months ago (2016-01-14 18:27:19 UTC) #9
John
https://codereview.chromium.org/1571433004/diff/80001/src/IceClFlags.cpp File src/IceClFlags.cpp (right): https://codereview.chromium.org/1571433004/diff/80001/src/IceClFlags.cpp#newcode526 src/IceClFlags.cpp:526: for (const std::string &Name : ::ExcludedRegisters) On 2016/01/14 18:27:19, ...
4 years, 11 months ago (2016-01-14 21:12:49 UTC) #10
Karl
https://codereview.chromium.org/1571433004/diff/80001/src/IceClFlags.cpp File src/IceClFlags.cpp (right): https://codereview.chromium.org/1571433004/diff/80001/src/IceClFlags.cpp#newcode526 src/IceClFlags.cpp:526: for (const std::string &Name : ::ExcludedRegisters) On 2016/01/14 21:12:48, ...
4 years, 11 months ago (2016-01-14 22:00:53 UTC) #11
Jim Stichnoth
https://codereview.chromium.org/1571433004/diff/80001/src/IceClFlags.cpp File src/IceClFlags.cpp (right): https://codereview.chromium.org/1571433004/diff/80001/src/IceClFlags.cpp#newcode526 src/IceClFlags.cpp:526: for (const std::string &Name : ::ExcludedRegisters) On 2016/01/14 21:12:48, ...
4 years, 11 months ago (2016-01-14 22:04:20 UTC) #12
Karl
Hopefully, this CL is getting close to being done. https://codereview.chromium.org/1571433004/diff/80001/src/IceClFlags.cpp File src/IceClFlags.cpp (right): https://codereview.chromium.org/1571433004/diff/80001/src/IceClFlags.cpp#newcode526 src/IceClFlags.cpp:526: ...
4 years, 11 months ago (2016-01-14 23:54:51 UTC) #13
Jim Stichnoth
I fear we won't reach the centi-comment mark. :) https://codereview.chromium.org/1571433004/diff/160001/tests_lit/assembler/arm32/vadd.ll File tests_lit/assembler/arm32/vadd.ll (right): https://codereview.chromium.org/1571433004/diff/160001/tests_lit/assembler/arm32/vadd.ll#newcode55 tests_lit/assembler/arm32/vadd.ll:55: ...
4 years, 11 months ago (2016-01-15 00:50:56 UTC) #14
Karl
https://codereview.chromium.org/1571433004/diff/160001/tests_lit/assembler/arm32/vadd.ll File tests_lit/assembler/arm32/vadd.ll (right): https://codereview.chromium.org/1571433004/diff/160001/tests_lit/assembler/arm32/vadd.ll#newcode55 tests_lit/assembler/arm32/vadd.ll:55: ; IASM-NOT: vadd On 2016/01/15 00:50:56, stichnot wrote: > ...
4 years, 11 months ago (2016-01-15 16:54:25 UTC) #15
Jim Stichnoth
otherwise lgtm. This is an awesome feature that I've wanted for a long time, so ...
4 years, 11 months ago (2016-01-15 17:39:13 UTC) #16
Karl
Committed patchset #14 (id:260001) manually as 5403f5dc6b43f077bbbee369bbe178b660654366 (presubmit successful).
4 years, 11 months ago (2016-01-15 19:07:50 UTC) #18
Karl
4 years, 11 months ago (2016-01-15 19:08:27 UTC) #19
Message was sent while issue was closed.
https://codereview.chromium.org/1571433004/diff/240001/src/IceTargetLowering.cpp
File src/IceTargetLowering.cpp (right):

https://codereview.chromium.org/1571433004/diff/240001/src/IceTargetLowering....
src/IceTargetLowering.cpp:123: IceString LineIndentString) {
On 2016/01/15 17:39:13, stichnot wrote:
> const IceString &

Done.

https://codereview.chromium.org/1571433004/diff/240001/src/IceTargetLowering....
src/IceTargetLowering.cpp:156: std::vector<IceString> BadRegNames;
On 2016/01/15 17:39:13, stichnot wrote:
> Maybe use StringVector here too?
> 
> Note that StringVector is tied to the implementation of cl::list<>, so if LLVM
> decided to change cl::list's base class, StringVector would have to change as
> well.  That probably wouldn't affect correctness here because only generic STL
> container methods are used, but it could potentially pull in bulky code? 
> Whatever...

Changed to ClFlags::StringVector.

https://codereview.chromium.org/1571433004/diff/240001/src/IceTargetLowering....
src/IceTargetLowering.cpp:198: const std::string Indent("  ");
On 2016/01/15 17:39:13, stichnot wrote:
> const IceString Indent = "  ";

Done.

https://codereview.chromium.org/1571433004/diff/240001/src/IceTargetLowering....
src/IceTargetLowering.cpp:209: Indent + Indent);
On 2016/01/15 17:39:13, stichnot wrote:
> Optional: something like:
>   const IceString IndentMultiLine = Indent + Indent;
> hoisted out of the loop

Done.

https://codereview.chromium.org/1571433004/diff/240001/src/IceTargetLoweringA...
File src/IceTargetLoweringARM32.cpp (right):

https://codereview.chromium.org/1571433004/diff/240001/src/IceTargetLoweringA...
src/IceTargetLoweringARM32.cpp:1891: for (int i = 0; i < RegARM32::Reg_NUM; ++i)
{
On 2016/01/15 17:39:13, stichnot wrote:
> My strong weird preference is to avoid "int" and "unsigned" and instead use
> int32_t and uint32_t where possible.  (except when following an external ABI)

Done.

Powered by Google App Engine
This is Rietveld 408576698