Chromium Code Reviews
DescriptionSubzero: 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 #
Messages
Total messages: 10 (3 generated)
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||