[llvm] 7103c87 - Reland "[InstCombine] Lower infinite combine loop detection thresholds""
Roman Lebedev via llvm-commits
llvm-commits at lists.llvm.org
Fri Jul 10 07:49:56 PDT 2020
Author: Roman Lebedev
Date: 2020-07-10T17:49:16+03:00
New Revision: 7103c87596efccd532e9fe04a6ba6a200fed8481
URL: https://github.com/llvm/llvm-project/commit/7103c87596efccd532e9fe04a6ba6a200fed8481
DIFF: https://github.com/llvm/llvm-project/commit/7103c87596efccd532e9fe04a6ba6a200fed8481.diff
LOG: Reland "[InstCombine] Lower infinite combine loop detection thresholds""
This relands commit cd7f8051ac7b6f08734102446482c1e5d951bfcc that was
reverted since lower threshold have successfully found an issue.
Now that the issue is fixed, let's wait until the next one is reported.
This reverts commit caa423eef0d128f35ac11ddbce34964caafb61c1.
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 d1c1e5418825..e810b3de25bc 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