[llvm] [llvm][CodeGen] Fix the issue caused by live interval checking in window scheduler (PR #123184)
Hua Tian via llvm-commits
llvm-commits at lists.llvm.org
Thu Jan 16 18:29:20 PST 2025
================
@@ -645,14 +645,17 @@ void WindowScheduler::expand() {
void WindowScheduler::updateLiveIntervals() {
SmallVector<Register, 128> UsedRegs;
- for (MachineInstr &MI : *MBB)
+ for (MachineInstr &MI : *MBB) {
for (const MachineOperand &MO : MI.operands()) {
if (!MO.isReg() || MO.getReg() == 0)
continue;
Register Reg = MO.getReg();
if (!is_contained(UsedRegs, Reg))
UsedRegs.push_back(Reg);
}
+ // Remove the residual slot index of newly cloned MI.
+ Context->LIS->getSlotIndexes()->removeMachineInstrFromMaps(MI, true);
----------------
huaatian wrote:
Updated
https://github.com/llvm/llvm-project/pull/123184
More information about the llvm-commits
mailing list