[llvm] [llvm] Consistently respect `naked` fn attribute in `TargetFrameLowering::hasFP()` (PR #106014)
Kai Nacke via llvm-commits
llvm-commits at lists.llvm.org
Fri Oct 25 07:59:00 PDT 2024
================
@@ -1449,7 +1449,12 @@ void SystemZXPLINKFrameLowering::inlineStackProbe(
fullyRecomputeLiveIns({StackExtMBB, NextMBB});
}
-bool SystemZXPLINKFrameLowering::hasFP(const MachineFunction &MF) const {
+bool SystemZXPLINKFrameLowering::hasFPImpl(const MachineFunction &MF) const {
+ // Naked functions have no stack frame pushed, so we don't have a frame
+ // pointer.
+ if (MF.getFunction().hasFnAttribute(Attribute::Naked))
+ return false;
+
----------------
redstar wrote:
That is already checked in the parent class, isn't it?
https://github.com/llvm/llvm-project/pull/106014
More information about the llvm-commits
mailing list