diff options
author | Nirav Dave <niravd@google.com> | 2016-03-30 15:41:12 +0000 |
---|---|---|
committer | Nirav Dave <niravd@google.com> | 2016-03-30 15:41:12 +0000 |
commit | 8dd66e5753bcff1a7ea6bd217db0a94c6cb98585 (patch) | |
tree | cdbf1733fa153f3d2ee5afbec8bb050d3ff6b3d7 /llvm/lib/Transforms/Utils/LoopUtils.cpp | |
parent | 20beeea24a6a11cac6e59dee8250b72fe24b6871 (diff) | |
download | llvm-8dd66e5753bcff1a7ea6bd217db0a94c6cb98585.zip llvm-8dd66e5753bcff1a7ea6bd217db0a94c6cb98585.tar.gz llvm-8dd66e5753bcff1a7ea6bd217db0a94c6cb98585.tar.bz2 |
Remove HasFnAttribute guards to getFnAttribute calls
These checks are redundant and can be removed
Reviewers: hans
Subscribers: llvm-commits, mzolotukhin
Differential Revision: http://reviews.llvm.org/D18564
llvm-svn: 264872
Diffstat (limited to 'llvm/lib/Transforms/Utils/LoopUtils.cpp')
-rw-r--r-- | llvm/lib/Transforms/Utils/LoopUtils.cpp | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/llvm/lib/Transforms/Utils/LoopUtils.cpp b/llvm/lib/Transforms/Utils/LoopUtils.cpp index 1f84eca..c18887f 100644 --- a/llvm/lib/Transforms/Utils/LoopUtils.cpp +++ b/llvm/lib/Transforms/Utils/LoopUtils.cpp @@ -472,12 +472,10 @@ bool RecurrenceDescriptor::hasMultipleUsesOf( bool RecurrenceDescriptor::isReductionPHI(PHINode *Phi, Loop *TheLoop, RecurrenceDescriptor &RedDes) { - bool HasFunNoNaNAttr = false; BasicBlock *Header = TheLoop->getHeader(); Function &F = *Header->getParent(); - if (F.hasFnAttribute("no-nans-fp-math")) - HasFunNoNaNAttr = - F.getFnAttribute("no-nans-fp-math").getValueAsString() == "true"; + bool HasFunNoNaNAttr = + F.getFnAttribute("no-nans-fp-math").getValueAsString() == "true"; if (AddReductionVar(Phi, RK_IntegerAdd, TheLoop, HasFunNoNaNAttr, RedDes)) { DEBUG(dbgs() << "Found an ADD reduction PHI." << *Phi << "\n"); |