diff options
author | Duncan P. N. Exon Smith <dexonsmith@apple.com> | 2015-02-14 01:44:41 +0000 |
---|---|---|
committer | Duncan P. N. Exon Smith <dexonsmith@apple.com> | 2015-02-14 01:44:41 +0000 |
commit | 70eb9c5ae59b739b31245ef18f84eeb2a4a68ffa (patch) | |
tree | 00274d081bd5648a5a741143aafb74ed583b601f /llvm/lib/CodeGen/MachineBlockPlacement.cpp | |
parent | bb755d614ab587019545d2dc3aa687788c90a90e (diff) | |
download | llvm-70eb9c5ae59b739b31245ef18f84eeb2a4a68ffa.zip llvm-70eb9c5ae59b739b31245ef18f84eeb2a4a68ffa.tar.gz llvm-70eb9c5ae59b739b31245ef18f84eeb2a4a68ffa.tar.bz2 |
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()
llvm-svn: 229208
Diffstat (limited to 'llvm/lib/CodeGen/MachineBlockPlacement.cpp')
-rw-r--r-- | llvm/lib/CodeGen/MachineBlockPlacement.cpp | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/llvm/lib/CodeGen/MachineBlockPlacement.cpp b/llvm/lib/CodeGen/MachineBlockPlacement.cpp index 779b84e..ea41b5e 100644 --- a/llvm/lib/CodeGen/MachineBlockPlacement.cpp +++ b/llvm/lib/CodeGen/MachineBlockPlacement.cpp @@ -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. |