diff options
author | Duncan P. N. Exon Smith <dexonsmith@apple.com> | 2015-02-14 01:11:29 +0000 |
---|---|---|
committer | Duncan P. N. Exon Smith <dexonsmith@apple.com> | 2015-02-14 01:11:29 +0000 |
commit | 2c79ad974c641dd799b04c656aa8c2fc96dfb3cd (patch) | |
tree | ac4199b56d8b85df3d1de2f3b3b919c59657f8ab /llvm/lib/Transforms/Scalar/LoopUnswitch.cpp | |
parent | 60038bebf1df5e2cfa1ac483f86d713a8bfe9234 (diff) | |
download | bcm5719-llvm-2c79ad974c641dd799b04c656aa8c2fc96dfb3cd.tar.gz bcm5719-llvm-2c79ad974c641dd799b04c656aa8c2fc96dfb3cd.zip |
Transforms: 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)
llvm-svn: 229202
Diffstat (limited to 'llvm/lib/Transforms/Scalar/LoopUnswitch.cpp')
-rw-r--r-- | llvm/lib/Transforms/Scalar/LoopUnswitch.cpp | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/llvm/lib/Transforms/Scalar/LoopUnswitch.cpp b/llvm/lib/Transforms/Scalar/LoopUnswitch.cpp index 79344379a20..987dc96fb14 100644 --- a/llvm/lib/Transforms/Scalar/LoopUnswitch.cpp +++ b/llvm/lib/Transforms/Scalar/LoopUnswitch.cpp @@ -657,9 +657,7 @@ bool LoopUnswitch::UnswitchIfProfitable(Value *LoopCond, Constant *Val) { // Check to see if it would be profitable to unswitch current loop. // Do not do non-trivial unswitch while optimizing for size. - if (OptimizeForSize || - F->getAttributes().hasAttribute(AttributeSet::FunctionIndex, - Attribute::OptimizeForSize)) + if (OptimizeForSize || F->hasFnAttribute(Attribute::OptimizeForSize)) return false; UnswitchNontrivialCondition(LoopCond, Val, currentLoop); |