Register live ranges may have had gaps that after coalescing should be removed. This is done by adding a new segment to the range, and merging it with neighboring segments. When doing so, do not assume that each subrange of the register ended at the same index. If a subrange ended earlier, adding this segment could make the live range invalid. Instead, if the subrange is not live at the start of the segment, extend it first.
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
llvm/test/CodeGen/Hexagon/regalloc-coal-extend-short-subrange.mir | ||
---|---|---|
18 | Can you reduce this further? |
llvm/test/CodeGen/Hexagon/regalloc-coal-extend-short-subrange.mir | ||
---|---|---|
18 | Not by much if at all. This is what I got from a bugpoint testcase that was reduced pretty much as far as it would go. |
llvm/test/CodeGen/Hexagon/regalloc-coal-extend-short-subrange.mir | ||
---|---|---|
18 | I just tried removing some things (replacing function arguments with undefs), but the testcase stopped failing. |
llvm/test/CodeGen/Hexagon/regalloc-coal-extend-short-subrange.mir | ||
---|---|---|
18 | Reducing these kinds of thing is difficult and time consuming, but in my experience doable. One technique I've used before is dumping the MIR from the middle of the register coalescer before the final change that hits the verifier error (and a combination of manually coalescing some of the copies). If it's so fragile the test may not end up usefully stressing this situation in the future |
Our local development teams are hitting this problem. Is this patch reasonable? Could someone take a look?
Can you reduce this further?