diff options
author | Alex Rønne Petersen <alex@alexrp.com> | 2024-10-18 07:35:42 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-10-18 09:35:42 +0400 |
commit | ad4a582fd938c933e784f0052bd773676b37b690 (patch) | |
tree | a540a62e275c8d0d95effdae520c390476650761 /llvm/lib/Target/ARM/ARMFrameLowering.cpp | |
parent | b49701085414838deb0213b9f10b68d9d3af6b0a (diff) | |
download | llvm-ad4a582fd938c933e784f0052bd773676b37b690.zip llvm-ad4a582fd938c933e784f0052bd773676b37b690.tar.gz llvm-ad4a582fd938c933e784f0052bd773676b37b690.tar.bz2 |
[llvm] Consistently respect `naked` fn attribute in `TargetFrameLowering::hasFP()` (#106014)
Some targets (e.g. PPC and Hexagon) already did this. I think it's best
to do this consistently so that frontend authors don't run into
inconsistent results when they emit `naked` functions. For example, in
Zig, we had to change our emit code to also set `frame-pointer=none` to
get reliable results across targets.
Note: I don't have commit access.
Diffstat (limited to 'llvm/lib/Target/ARM/ARMFrameLowering.cpp')
-rw-r--r-- | llvm/lib/Target/ARM/ARMFrameLowering.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/llvm/lib/Target/ARM/ARMFrameLowering.cpp b/llvm/lib/Target/ARM/ARMFrameLowering.cpp index 2706efa..82b6f80 100644 --- a/llvm/lib/Target/ARM/ARMFrameLowering.cpp +++ b/llvm/lib/Target/ARM/ARMFrameLowering.cpp @@ -323,10 +323,10 @@ bool ARMFrameLowering::enableCalleeSaveSkip(const MachineFunction &MF) const { return true; } -/// hasFP - Return true if the specified function should have a dedicated frame -/// pointer register. This is true if the function has variable sized allocas -/// or if frame pointer elimination is disabled. -bool ARMFrameLowering::hasFP(const MachineFunction &MF) const { +/// hasFPImpl - Return true if the specified function should have a dedicated +/// frame pointer register. This is true if the function has variable sized +/// allocas or if frame pointer elimination is disabled. +bool ARMFrameLowering::hasFPImpl(const MachineFunction &MF) const { const TargetRegisterInfo *RegInfo = MF.getSubtarget().getRegisterInfo(); const MachineFrameInfo &MFI = MF.getFrameInfo(); |