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

Issue 2116213002: Subzero: Allow deeper levels of variable splitting. (Closed)

Created:
4 years, 5 months ago by Jim Stichnoth
Modified:
4 years, 5 months ago
Reviewers:
manasijm, Karl, John, Eric Holk
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

Subzero: Allow deeper levels of variable splitting. This fixes some existing problems with the Variable::LinkedTo splitting/linking mechanism. The problem was that if B is linked to A, and B needs a stack slot, but A doesn't get a stack slot, B's stack offset would never get initialized. This could happen if A ends up with no explicit references in the code, or A's live range gets truncated such that it actually has a register while B doesn't. It gets even more complicated if you have a link chain like A<--B<--C<--D etc. where some of them have stack slots (which should ultimately all be the same slot) and some don't. The solution here is that if B is linked to the root A, and B has a stack slot but A doesn't, we can do a tree rotation so that B is the new root and A links to B. In addition, we initialize Variable::StackOffset to an invalid value and always make sure a value used is valid. Earlier attempts at extending the variable splitting would sometimes silently fail because the default StackOffset value of 0 ended up being used. BUG= none R=jpp@chromium.org Committed: https://gerrit.chromium.org/gerrit/gitweb?p=native_client/pnacl-subzero.git;a=commit;h=fe62f0a229a7b2bc910eb8b7cb83d2534ed39343

Patch Set 1 #

Patch Set 2 : Rename getLinkedToTop() to getLinkedToRoot() #

Total comments: 20

Patch Set 3 : Code review changes #

Unified diffs Side-by-side diffs Delta from patch set Stats (+81 lines, -42 lines) Patch
M src/IceCfg.cpp View 1 chunk +1 line, -1 line 0 comments Download
M src/IceInst.cpp View 1 2 1 chunk +8 lines, -2 lines 0 comments Download
M src/IceOperand.h View 1 2 3 chunks +19 lines, -18 lines 0 comments Download
M src/IceOperand.cpp View 1 chunk +7 lines, -5 lines 0 comments Download
M src/IceTargetLowering.cpp View 1 2 2 chunks +34 lines, -0 lines 0 comments Download
M src/IceTargetLoweringMIPS32.cpp View 1 chunk +3 lines, -2 lines 0 comments Download
M src/IceTargetLoweringX86BaseImpl.h View 1 2 2 chunks +9 lines, -14 lines 0 comments Download

Messages

Total messages: 10 (3 generated)
Jim Stichnoth
4 years, 5 months ago (2016-07-02 19:15:06 UTC) #3
John
https://codereview.chromium.org/2116213002/diff/20001/src/IceInst.cpp File src/IceInst.cpp (right): https://codereview.chromium.org/2116213002/diff/20001/src/IceInst.cpp#newcode1101 src/IceInst.cpp:1101: if (Dest->getStackOffset() == SrcVar->getStackOffset()) { I would do: if ...
4 years, 5 months ago (2016-07-06 16:07:39 UTC) #4
manasijm
FYI This seems to produce identical or nearly identical code on most of spec (with ...
4 years, 5 months ago (2016-07-06 18:02:06 UTC) #5
Jim Stichnoth
https://codereview.chromium.org/2116213002/diff/20001/src/IceInst.cpp File src/IceInst.cpp (right): https://codereview.chromium.org/2116213002/diff/20001/src/IceInst.cpp#newcode1101 src/IceInst.cpp:1101: if (Dest->getStackOffset() == SrcVar->getStackOffset()) { On 2016/07/06 16:07:39, John ...
4 years, 5 months ago (2016-07-08 10:37:55 UTC) #6
John
lgtm https://codereview.chromium.org/2116213002/diff/20001/src/IceOperand.h File src/IceOperand.h (right): https://codereview.chromium.org/2116213002/diff/20001/src/IceOperand.h#newcode790 src/IceOperand.h:790: Root = Root->LinkedTo; On 2016/07/08 10:37:54, stichnot wrote: ...
4 years, 5 months ago (2016-07-08 15:09:05 UTC) #7
Jim Stichnoth
https://codereview.chromium.org/2116213002/diff/20001/src/IceOperand.h File src/IceOperand.h (right): https://codereview.chromium.org/2116213002/diff/20001/src/IceOperand.h#newcode790 src/IceOperand.h:790: Root = Root->LinkedTo; On 2016/07/08 15:09:05, John wrote: > ...
4 years, 5 months ago (2016-07-10 11:44:43 UTC) #8
Jim Stichnoth
4 years, 5 months ago (2016-07-10 12:13:23 UTC) #10
Message was sent while issue was closed.
Committed patchset #3 (id:40001) manually as
fe62f0a229a7b2bc910eb8b7cb83d2534ed39343 (presubmit successful).

Powered by Google App Engine
This is Rietveld 408576698