[llvm] r290194 - Use MaxDepth instead of repeating its value
Matt Arsenault via llvm-commits
llvm-commits at lists.llvm.org
Tue Dec 20 11:06:15 PST 2016
Author: arsenm
Date: Tue Dec 20 13:06:15 2016
New Revision: 290194
URL: http://llvm.org/viewvc/llvm-project?rev=290194&view=rev
Log:
Use MaxDepth instead of repeating its value
Modified:
llvm/trunk/lib/Analysis/ValueTracking.cpp
Modified: llvm/trunk/lib/Analysis/ValueTracking.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Analysis/ValueTracking.cpp?rev=290194&r1=290193&r2=290194&view=diff
==============================================================================
--- llvm/trunk/lib/Analysis/ValueTracking.cpp (original)
+++ llvm/trunk/lib/Analysis/ValueTracking.cpp Tue Dec 20 13:06:15 2016
@@ -2086,7 +2086,7 @@ unsigned ComputeNumSignBits(const Value
// Note that ConstantInt is handled by the general computeKnownBits case
// below.
- if (Depth == 6)
+ if (Depth == MaxDepth)
return 1; // Limit search depth.
const Operator *U = dyn_cast<Operator>(V);
@@ -2545,7 +2545,7 @@ bool llvm::CannotBeNegativeZero(const Va
// FIXME: Magic number! At the least, this should be given a name because it's
// used similarly in CannotBeOrderedLessThanZero(). A better fix may be to
// expose it as a parameter, so it can be used for testing / experimenting.
- if (Depth == 6)
+ if (Depth == MaxDepth)
return false; // Limit search depth.
const Operator *I = dyn_cast<Operator>(V);
@@ -2592,7 +2592,7 @@ bool llvm::CannotBeOrderedLessThanZero(c
// FIXME: Magic number! At the least, this should be given a name because it's
// used similarly in CannotBeNegativeZero(). A better fix may be to
// expose it as a parameter, so it can be used for testing / experimenting.
- if (Depth == 6)
+ if (Depth == MaxDepth)
return false; // Limit search depth.
const Operator *I = dyn_cast<Operator>(V);
More information about the llvm-commits
mailing list