mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-07-18 10:24:45 +00:00
PowerPC: Canonicalize access to function attributes, NFC
Canonicalize access to function attributes to use the simpler API. getAttributes().getAttribute(AttributeSet::FunctionIndex, Kind) => getFnAttribute(Kind) getAttributes().hasAttribute(AttributeSet::FunctionIndex, Kind) => hasFnAttribute(Kind) git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@229224 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -442,8 +442,7 @@ unsigned PPCFrameLowering::determineFrameLayout(MachineFunction &MF,
|
||||
// to adjust the stack pointer (we fit in the Red Zone).
|
||||
// The 32-bit SVR4 ABI has no Red Zone. However, it can still generate
|
||||
// stackless code if all local vars are reg-allocated.
|
||||
bool DisableRedZone = MF.getFunction()->getAttributes().
|
||||
hasAttribute(AttributeSet::FunctionIndex, Attribute::NoRedZone);
|
||||
bool DisableRedZone = MF.getFunction()->hasFnAttribute(Attribute::NoRedZone);
|
||||
unsigned LR = RegInfo->getRARegister();
|
||||
if (!DisableRedZone &&
|
||||
(Subtarget.isPPC64() || // 32-bit SVR4, no stack-
|
||||
@@ -507,8 +506,7 @@ bool PPCFrameLowering::needsFP(const MachineFunction &MF) const {
|
||||
|
||||
// Naked functions have no stack frame pushed, so we don't have a frame
|
||||
// pointer.
|
||||
if (MF.getFunction()->getAttributes().hasAttribute(
|
||||
AttributeSet::FunctionIndex, Attribute::Naked))
|
||||
if (MF.getFunction()->hasFnAttribute(Attribute::Naked))
|
||||
return false;
|
||||
|
||||
return MF.getTarget().Options.DisableFramePointerElim(MF) ||
|
||||
|
Reference in New Issue
Block a user