================
@@ -1805,15 +1777,141 @@ bool SystemZInstrInfo::expandPostRAPseudo(MachineInstr
&MI) const {
splitAdjDynAlloc(MI);
return true;
- case TargetOpcode::LOAD_STACK_GUARD:
- expandLoadStackGuard(&MI);
+ case SystemZ::MOVE_STACK_GUARD:
+ expandMSGPseudo(MI);
+ return true;
+
+ case SystemZ::COMPARE_STACK_GUARD:
+ expandCSGPseudo(MI);
return true;
default:
return false;
}
}
+namespace {
+Register scavengeAddrReg(MachineInstr &MI, MachineBasicBlock *MBB) {
+ // create fresh RegScavanger instance.
+ RegScavenger RS;
----------------
dominik-steenken wrote:
I have a tentative implementation of this, in commit 652aa771 . It instantiates
the `RegScavenger` in the `run` method of the `ExpandPostRAPseudos` pass. I am
a bit unsure about this, since the pass goes over MBBs in-order, while the `RS`
needs to consider the instructions in reverse, leading to the loop calling
`enterBasicBlockEnd` for every `MI`, which seems wrong?
https://github.com/llvm/llvm-project/pull/169317
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits