From 31bbf64f3a4974a2d6c8b3b27ad2f519caf74057 Mon Sep 17 00:00:00 2001 From: Dimitry Andric Date: Thu, 9 Mar 2017 22:50:27 +0000 Subject: Vendor import of llvm 4.0.0 release r297347: https://llvm.org/svn/llvm-project/llvm/tags/RELEASE_400/final@297347 --- lib/Analysis/ScalarEvolution.cpp | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) (limited to 'lib/Analysis/ScalarEvolution.cpp') diff --git a/lib/Analysis/ScalarEvolution.cpp b/lib/Analysis/ScalarEvolution.cpp index b3905cc01e84..ed328f12c463 100644 --- a/lib/Analysis/ScalarEvolution.cpp +++ b/lib/Analysis/ScalarEvolution.cpp @@ -127,10 +127,15 @@ static cl::opt MulOpsInlineThreshold( cl::desc("Threshold for inlining multiplication operands into a SCEV"), cl::init(1000)); -static cl::opt - MaxCompareDepth("scalar-evolution-max-compare-depth", cl::Hidden, - cl::desc("Maximum depth of recursive compare complexity"), - cl::init(32)); +static cl::opt MaxSCEVCompareDepth( + "scalar-evolution-max-scev-compare-depth", cl::Hidden, + cl::desc("Maximum depth of recursive SCEV complexity comparisons"), + cl::init(32)); + +static cl::opt MaxValueCompareDepth( + "scalar-evolution-max-value-compare-depth", cl::Hidden, + cl::desc("Maximum depth of recursive value complexity comparisons"), + cl::init(2)); //===----------------------------------------------------------------------===// // SCEV class definitions @@ -481,7 +486,7 @@ static int CompareValueComplexity(SmallSet, 8> &EqCache, const LoopInfo *const LI, Value *LV, Value *RV, unsigned Depth) { - if (Depth > MaxCompareDepth || EqCache.count({LV, RV})) + if (Depth > MaxValueCompareDepth || EqCache.count({LV, RV})) return 0; // Order pointer values after integer values. This helps SCEVExpander form @@ -568,7 +573,7 @@ static int CompareSCEVComplexity( if (LType != RType) return (int)LType - (int)RType; - if (Depth > MaxCompareDepth || EqCacheSCEV.count({LHS, RHS})) + if (Depth > MaxSCEVCompareDepth || EqCacheSCEV.count({LHS, RHS})) return 0; // Aside from the getSCEVType() ordering, the particular ordering // isn't very important except that it's beneficial to be consistent, -- cgit v1.2.3