diff options
author | Matt Arsenault <Matthew.Arsenault@amd.com> | 2016-12-20 19:06:15 +0000 |
---|---|---|
committer | Matt Arsenault <Matthew.Arsenault@amd.com> | 2016-12-20 19:06:15 +0000 |
commit | cb2a7eb1aa14561e2088d216844e5bf4d205ed14 (patch) | |
tree | b7845238e6f73091b7ec1810d59de7776ff6d265 /llvm/lib/Analysis | |
parent | 9e9101428245c1ce0ee2bdfec58e26011a96950e (diff) | |
download | bcm5719-llvm-cb2a7eb1aa14561e2088d216844e5bf4d205ed14.tar.gz bcm5719-llvm-cb2a7eb1aa14561e2088d216844e5bf4d205ed14.zip |
Use MaxDepth instead of repeating its value
llvm-svn: 290194
Diffstat (limited to 'llvm/lib/Analysis')
-rw-r--r-- | llvm/lib/Analysis/ValueTracking.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/llvm/lib/Analysis/ValueTracking.cpp b/llvm/lib/Analysis/ValueTracking.cpp index 950a2fbcff9..30bd08471d5 100644 --- a/llvm/lib/Analysis/ValueTracking.cpp +++ b/llvm/lib/Analysis/ValueTracking.cpp @@ -2086,7 +2086,7 @@ unsigned ComputeNumSignBits(const Value *V, unsigned Depth, const Query &Q) { // 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 Value *V, const TargetLibraryInfo *TLI, // 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(const Value *V, // 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); |