[PATCH] D32563: Add LiveRangeShrink pass to shrink live range within BB.
via llvm-commits
llvm-commits at lists.llvm.org
Wed May 17 10:40:42 PDT 2017
This patch caused some fairly significant regressions on our GPU target. While I can’t guarantee this is all of the problems, here is a particular case that exemplified to me “things this pass is doing that it should not”.
Original code:
PHI
PHI
PHI
[…]
foo = REG_SEQUENCE […] // inputs come from the phi
STORE foo
bar = REG_SEQUENCE […]
STORE bar
foobar = REG_SEQUENCE […]
STORE foobar
[…]
New code:
PHI
PHI
PHI
[…]
foo = REG_SEQUENCE […]
bar = REG_SEQUENCE […]
foobar = REG_SEQUENCE […]
[…]
STORE bar
STORE foo
STORE foobar
This causes a vast increase in register count because the reg_sequences constrain the registers to be adjacent far longer than necessary.
Two things are going on here that seem dubious.
1. why are we moving them up… to a PHI??? does this make sense for any instruction?
2. why are we moving reg_sequences??? away from their use, at that?
I can’t imagine this makes sense on any target.
—escha
More information about the llvm-commits
mailing list