summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Transforms/Vectorize
diff options
context:
space:
mode:
authorDuncan P. N. Exon Smith <dexonsmith@apple.com>2015-02-14 01:11:29 +0000
committerDuncan P. N. Exon Smith <dexonsmith@apple.com>2015-02-14 01:11:29 +0000
commit2c79ad974c641dd799b04c656aa8c2fc96dfb3cd (patch)
treeac4199b56d8b85df3d1de2f3b3b919c59657f8ab /llvm/lib/Transforms/Vectorize
parent60038bebf1df5e2cfa1ac483f86d713a8bfe9234 (diff)
downloadbcm5719-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/Vectorize')
-rw-r--r--llvm/lib/Transforms/Vectorize/LoopVectorize.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/llvm/lib/Transforms/Vectorize/LoopVectorize.cpp b/llvm/lib/Transforms/Vectorize/LoopVectorize.cpp
index f43a60773a6..dd2beb34c6a 100644
--- a/llvm/lib/Transforms/Vectorize/LoopVectorize.cpp
+++ b/llvm/lib/Transforms/Vectorize/LoopVectorize.cpp
@@ -3454,9 +3454,8 @@ bool LoopVectorizationLegality::canVectorizeInstrs() {
// Look for the attribute signaling the absence of NaNs.
Function &F = *Header->getParent();
if (F.hasFnAttribute("no-nans-fp-math"))
- HasFunNoNaNAttr = F.getAttributes().getAttribute(
- AttributeSet::FunctionIndex,
- "no-nans-fp-math").getValueAsString() == "true";
+ HasFunNoNaNAttr =
+ F.getFnAttribute("no-nans-fp-math").getValueAsString() == "true";
// For each block in the loop.
for (Loop::block_iterator bb = TheLoop->block_begin(),
OpenPOWER on IntegriCloud