[llvm] [RISCV] Use LiveIntervals::extendToIndices to extend AVL in insertVSETVLI (PR #97512)
Luke Lau via llvm-commits
llvm-commits at lists.llvm.org
Tue Jul 2 23:35:40 PDT 2024
================
@@ -1161,10 +1161,7 @@ void RISCVInsertVSETVLI::insertVSETVLI(MachineBasicBlock &MBB,
// isn't always the case, e.g. PseudoVMV_X_S doesn't have an AVL operand or
// we've taken the AVL from the VL output of another vsetvli.
LiveInterval &LI = LIS->getInterval(AVLReg);
- // Need to get non-const VNInfo
- VNInfo *VNI = LI.getValNumInfo(Info.getAVLVNInfo()->id);
- LI.addSegment(LiveInterval::Segment(
- VNI->def, LIS->getInstructionIndex(*MI).getRegSlot(), VNI));
+ LIS->extendToIndices(LI, {LIS->getInstructionIndex(*MI).getRegSlot()});
----------------
lukel97 wrote:
I think `getInstructionIndex` returns the `Slot_Block` SlotIndex, e.g. 80B. `getRegSlot()` turns it into 80r which is the time when the operands are defined/used.
https://github.com/llvm/llvm-project/pull/97512
More information about the llvm-commits
mailing list