[llvm] 2f3862e - Reland "[InstCombine] Lower infinite combine loop detection thresholds"

Roman Lebedev via llvm-commits llvm-commits at lists.llvm.org
Sun Jul 19 06:38:52 PDT 2020


Author: Roman Lebedev
Date: 2020-07-19T16:37:03+03:00
New Revision: 2f3862eb9f21e8a0d48505637fefe6e5e295c18c

URL: https://github.com/llvm/llvm-project/commit/2f3862eb9f21e8a0d48505637fefe6e5e295c18c
DIFF: https://github.com/llvm/llvm-project/commit/2f3862eb9f21e8a0d48505637fefe6e5e295c18c.diff

LOG: Reland "[InstCombine] Lower infinite combine loop detection thresholds"

This reverts commit 4500db8c59621a31c622862a2946457fdee481ce,
which was reverted because lower thresholds exposed a new issue (PR46680).

Now that it was resolved by d12ec0f752e7f2c7f7252539da2d124264ec33f7,
we can reinstate lower limits and wait for a new bugreport before
reverting this again...

Added: 
    

Modified: 
    llvm/lib/Transforms/InstCombine/InstructionCombining.cpp

Removed: 
    


################################################################################
diff  --git a/llvm/lib/Transforms/InstCombine/InstructionCombining.cpp b/llvm/lib/Transforms/InstCombine/InstructionCombining.cpp
index b3254c10a0b2..8eac8637cb9e 100644
--- a/llvm/lib/Transforms/InstCombine/InstructionCombining.cpp
+++ b/llvm/lib/Transforms/InstCombine/InstructionCombining.cpp
@@ -123,8 +123,13 @@ STATISTIC(NumReassoc  , "Number of reassociations");
 DEBUG_COUNTER(VisitCounter, "instcombine-visit",
               "Controls which instructions are visited");
 
+// FIXME: these limits eventually should be as low as 2.
 static constexpr unsigned InstCombineDefaultMaxIterations = 1000;
+#ifndef NDEBUG
+static constexpr unsigned InstCombineDefaultInfiniteLoopThreshold = 100;
+#else
 static constexpr unsigned InstCombineDefaultInfiniteLoopThreshold = 1000;
+#endif
 
 static cl::opt<bool>
 EnableCodeSinking("instcombine-code-sinking", cl::desc("Enable code sinking"),


        


More information about the llvm-commits mailing list