[llvm] [ARM] Apply sign-return-address attribute to outlined function (PR #107877)
Benson Chu via llvm-commits
llvm-commits at lists.llvm.org
Mon Sep 9 08:30:35 PDT 2024
================
@@ -6623,10 +6626,8 @@ void ARMBaseInstrInfo::buildOutlinedFrame(
MBB.addLiveIn(ARM::LR);
// Insert a save before the outlined region
- bool Auth = OF.Candidates.front()
- .getMF()
- ->getInfo<ARMFunctionInfo>()
- ->shouldSignReturnAddress(true);
+ bool Auth = MF.getInfo<ARMFunctionInfo>()
+ ->shouldSignReturnAddress(true);
saveLROnStack(MBB, It, true, Auth);
----------------
pestctrl wrote:
This is a largely NFC change, but it makes the usage of saveLROnStack more consistent between `insertOutlinedCall` and `buildOutlinedFrame`.
Both `insertOutlinedCall` and `buildOutlinedFrame` can query `MF` for `shouldSignReturnAddress`, instead of `buildOutlinedFrame` grabbing the front candidate.
https://github.com/llvm/llvm-project/pull/107877
More information about the llvm-commits
mailing list