[PATCH] D135693: [WIP][RegisterScavenger][RISCV] Don't search for FrameSetup instrs if we were searching from Non-FrameSetup instrs
Craig Topper via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Oct 11 10:23:00 PDT 2022
craig.topper added a comment.
If I understand correctly, the use of a vreg in the frame-setup allowed findSurvivorBackward to trigger this code
// Keep searching when we find a vreg since the spilled register will
// be usefull for this other vreg as well later.
bool FoundVReg = false;
for (const MachineOperand &MO : MI.operands()) {
if (MO.isReg() && Register::isVirtualRegister(MO.getReg())) {
FoundVReg = true;
break;
}
}
if (FoundVReg) {
InstrCountDown = InstrLimit;
Pos = I;
}
which caused the search to stop above the frame-setup. So another option might be to use T1 as the scratch register in frame-setup as was once proposed in an earlier revision of https://reviews.llvm.org/D61884
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D135693/new/
https://reviews.llvm.org/D135693
More information about the llvm-commits
mailing list