[PATCH] D26359: Use LiveRangeCalc to extend live ranges in shrinkToUses

Scott Linder via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jun 26 15:30:14 PDT 2018


scott.linder added a comment.

I think I am running into the same bug. I do not have a reduced test case yet, because it appears the bug is triggered due to spilling in my case.

The "traverse all register uses and collect slot indexes" approach taken in `LiveIntervals.cpp` seems to handle subregisters significantly differently than in `LiveRangeCalc.cpp`. In the case I am hitting, the assert `assert(OldRange.getVNInfoBefore(Stop) == VNI && "Wrong value out of predecessor");` in `extendSegmentsToUses` fails for a SubRange even when not dominated by `undef` (i.e. `LR.extendInBlock(Undefs, ...)` returns `(nullptr, false)`). It seems like the slot index should not have been added to the Worklist for that SubRange to begin with, but even if I update the "traverse all register uses" loop to match `LiveRangeCalc` it fails.

I'm still new to the code, but I would like to work on this. Can I ask for some guidance on where the current patch needs work?


Repository:
  rL LLVM

https://reviews.llvm.org/D26359





More information about the llvm-commits mailing list