[llvm] [AArch64][SME] Exclude runtime defined liveins when computing liveouts (PR #154325)
Matt Arsenault via llvm-commits
llvm-commits at lists.llvm.org
Tue Aug 19 06:10:48 PDT 2025
================
@@ -135,14 +142,25 @@ void LiveRegUnits::addPristines(const MachineFunction &MF) {
addUnits(Pristine.getBitVector());
}
-void LiveRegUnits::addLiveOuts(const MachineBasicBlock &MBB) {
+void LiveRegUnits::addLiveOuts(const MachineBasicBlock &MBB,
+ const TargetLowering *TLI) {
const MachineFunction &MF = *MBB.getParent();
addPristines(MF);
+ MCPhysReg ExceptionPointer;
+ MCPhysReg ExceptionSelector;
+
+ // Remove live-ins from successors that are defined by the runtime.
+ if (TLI && MF.getFunction().hasPersonalityFn()) {
+ auto PersonalityFn = MF.getFunction().getPersonalityFn();
+ ExceptionPointer = TLI->getExceptionPointerRegister(PersonalityFn);
+ ExceptionSelector = TLI->getExceptionSelectorRegister(PersonalityFn);
+ }
----------------
arsenm wrote:
This doesn't belong here. These should have had explicit uses already in the MIR such that it doesn't require special casing. The live outs list is supposed to be consistent with the state of the underlying instruction liveness, it isn't really supposed to have standalone meaning
https://github.com/llvm/llvm-project/pull/154325
More information about the llvm-commits
mailing list