mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-08-05 13:26:55 +00:00
ARM: 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@229220 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -1991,8 +1991,7 @@ bool llvm::tryFoldSPUpdateIntoPushPop(const ARMSubtarget &Subtarget,
|
||||
unsigned NumBytes) {
|
||||
// This optimisation potentially adds lots of load and store
|
||||
// micro-operations, it's only really a great benefit to code-size.
|
||||
if (!MF.getFunction()->getAttributes().hasAttribute(
|
||||
AttributeSet::FunctionIndex, Attribute::MinSize))
|
||||
if (!MF.getFunction()->hasFnAttribute(Attribute::MinSize))
|
||||
return false;
|
||||
|
||||
// If only one register is pushed/popped, LLVM can use an LDR/STR
|
||||
@@ -3665,9 +3664,7 @@ ARMBaseInstrInfo::getOperandLatency(const InstrItineraryData *ItinData,
|
||||
// instructions).
|
||||
if (Latency > 0 && Subtarget.isThumb2()) {
|
||||
const MachineFunction *MF = DefMI->getParent()->getParent();
|
||||
if (MF->getFunction()->getAttributes().
|
||||
hasAttribute(AttributeSet::FunctionIndex,
|
||||
Attribute::OptimizeForSize))
|
||||
if (MF->getFunction()->hasFnAttribute(Attribute::OptimizeForSize))
|
||||
--Latency;
|
||||
}
|
||||
return Latency;
|
||||
|
Reference in New Issue
Block a user