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/Vectorize | |
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/Vectorize')
-rw-r--r-- | llvm/lib/Transforms/Vectorize/LoopVectorize.cpp | 5 |
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(), |