[llvm] [AArch64][SME] Exclude runtime defined liveins when computing liveouts (PR #154325)
Benjamin Maxwell via llvm-commits
llvm-commits at lists.llvm.org
Tue Aug 19 06:20:44 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);
+ }
----------------
MacDue wrote:
I'm not sure what your suggesting the solution should be? Why does this have to be different from how the `liveout_iterator` handles this?
https://github.com/llvm/llvm-project/pull/154325
More information about the llvm-commits
mailing list