[PATCH] D83160: [InstCombine] Lower infinite combine loop detection thresholds

Roman Lebedev via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jul 6 12:53:35 PDT 2020


This revision was automatically updated to reflect the committed changes.
Closed by commit rGcd7f8051ac7b: [InstCombine] Lower infinite combine loop detection thresholds (authored by lebedev.ri).

Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D83160/new/

https://reviews.llvm.org/D83160

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


Index: llvm/lib/Transforms/InstCombine/InstructionCombining.cpp
===================================================================
--- llvm/lib/Transforms/InstCombine/InstructionCombining.cpp
+++ llvm/lib/Transforms/InstCombine/InstructionCombining.cpp
@@ -123,8 +123,13 @@
 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"),


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D83160.275634.patch
Type: text/x-patch
Size: 795 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200706/4870c72c/attachment-0001.bin>


More information about the llvm-commits mailing list