mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-20 10:24:12 +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:
@ -1058,8 +1058,7 @@ void MachineBlockPlacement::buildCFGChains(MachineFunction &F) {
|
||||
// exclusively on the loop info here so that we can align backedges in
|
||||
// unnatural CFGs and backedges that were introduced purely because of the
|
||||
// loop rotations done during this layout pass.
|
||||
if (F.getFunction()->getAttributes().
|
||||
hasAttribute(AttributeSet::FunctionIndex, Attribute::OptimizeForSize))
|
||||
if (F.getFunction()->hasFnAttribute(Attribute::OptimizeForSize))
|
||||
return;
|
||||
if (FunctionChain.begin() == FunctionChain.end())
|
||||
return; // Empty chain.
|
||||
|
Reference in New Issue
Block a user