CodeGen: Canonicalize access to function attributes, NFC
authorDuncan P. N. Exon Smith <dexonsmith@apple.com>
Sat, 14 Feb 2015 01:44:41 +0000 (01:44 +0000)
committerDuncan P. N. Exon Smith <dexonsmith@apple.com>
Sat, 14 Feb 2015 01:44:41 +0000 (01:44 +0000)
commit70eb9c5ae59b739b31245ef18f84eeb2a4a68ffa
tree00274d081bd5648a5a741143aafb74ed583b601f
parentbb755d614ab587019545d2dc3aa687788c90a90e
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
llvm/include/llvm/IR/Function.h
llvm/lib/CodeGen/BranchFolding.cpp
llvm/lib/CodeGen/CodeGenPrepare.cpp
llvm/lib/CodeGen/MachineBlockPlacement.cpp
llvm/lib/CodeGen/MachineCombiner.cpp
llvm/lib/CodeGen/MachineFunction.cpp
llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
llvm/lib/CodeGen/StackProtector.cpp
llvm/lib/CodeGen/TailDuplication.cpp