When updating live intervals (with -early-live-intervals), fix handling
of live ranges that were previously tied to an early-clobber def but no
longer are.
Details
- Reviewers
MatzeB qcolombet craig.topper
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
I can't shake the feeling that we would be better of having the convertToThreeAddress callback fix the liveness information like it is doing with LV, rather than guessing around after the fact with repairIntervalsInRange... Not sure what the original intention here was and if its fair to ask for that big refactoring now...
llvm/lib/CodeGen/TwoAddressInstructionPass.cpp | ||
---|---|---|
708–718 | You fix the early-clobber -> register case, but I guess register->early clobber could happen too, given that we don't really know what instruction is involved here. |
llvm/test/CodeGen/RISCV/rvv/vwadd.w-rv64.ll | ||
---|---|---|
3 | Could we create a separate .mir test instead? |
I agree. I have fixed a few problems that I encountered in repairIntervalsInRange, but I am not sure if it will ever be 100% reliable.
I will try passing LIS into convertToThreeAddress instead.
Actually it is used more than I thought:
- in MachineBasicBlock::SplitCriticalEdge
- in PPCTLSDynamicCall::processBlock
- after TargetInstrInfo::convertToThreeAddress
- after TargetInstrInfo::unfoldMemoryOperand
- in TwoAddressInstructionPass::eliminateRegSequence
You fix the early-clobber -> register case, but I guess register->early clobber could happen too, given that we don't really know what instruction is involved here.