mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-13 04:38:24 +00:00
CodeGen: 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) Also, add `Function::getFnStackAlignment()`, and canonicalize: getAttributes().getStackAlignment(AttributeSet::FunctionIndex) => getFnStackAlignment() git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@229208 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -413,8 +413,7 @@ bool MachineCombiner::runOnMachineFunction(MachineFunction &MF) {
|
||||
Traces = &getAnalysis<MachineTraceMetrics>();
|
||||
MinInstr = 0;
|
||||
|
||||
OptSize = MF.getFunction()->getAttributes().hasAttribute(
|
||||
AttributeSet::FunctionIndex, Attribute::OptimizeForSize);
|
||||
OptSize = MF.getFunction()->hasFnAttribute(Attribute::OptimizeForSize);
|
||||
|
||||
DEBUG(dbgs() << getPassName() << ": " << MF.getName() << '\n');
|
||||
if (!TII->useMachineCombiner()) {
|
||||
|
Reference in New Issue
Block a user