[llvm] [GlobalISel] Remove dead VRegs after instruction selection (PR #73892)
Evgenii Kudriashov via llvm-commits
llvm-commits at lists.llvm.org
Thu Jan 11 16:16:08 PST 2024
e-kud wrote:
> I agree that removing such footgun is good, but it shouldn't come with a high price. Most places traverse the MachineOperand so they are not exposed to this problem.
@qcolombet yes, I agree, moreover, there is only one place among all targets with GlobalISel where we hit the problem. I think we potentially create a precedent of workarounding GlobalISel selection results in backends. It doesn't sound like a good practice. However there is a fine line between workaround and correct traversal.
@arsenm what do you think? After these experiments and the discussion can we return to the @qcolombet's suggestion to traverse only alive registers as a fix: https://reviews.llvm.org/D157458?id=548421#4579446? I think it is better than skipping registers without reg class.
https://github.com/llvm/llvm-project/pull/73892
More information about the llvm-commits
mailing list