[PATCH] D32563: Add LiveRangeShrink pass to shrink live range within BB.

Matthias Braun via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed May 17 13:00:41 PDT 2017


MatzeB added a comment.

In https://reviews.llvm.org/D32563#757717, @danielcdh wrote:

> patch to move the pass to x86 is proposed: https://reviews.llvm.org/D33294
>
> Will have a separate patch to fix the REG_SEQUENCE handling once I get a test that I can include in unittesting. I suppose the fix is: ignore instruction whose def register size is no less than the sum of the use register sizes?


REG_SEQUENCE is typically used to construct tuple register classes. So you get a set of values in consecutively numbered registers (you may watch my llvm dev meeting talk to see some introduction).

In any case I think the safest solution here would be to NOT trigger on REG_SEQUENCE but on register classes; For the REG_SEQUENCES in question a number of small 1-register values are shrunk while extending a larger multi-register value, so the initial assumption that everything is well when you shrink more ranges than you extend is wrong. So a conservative answer here would be to simply bail out if the register classes of the vregs you are shrinking/extended don't match up.


https://reviews.llvm.org/D32563





More information about the llvm-commits mailing list