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

Roman Lebedev via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sun Jul 5 15:28:36 PDT 2020


lebedev.ri updated this revision to Diff 275580.
lebedev.ri marked an inline comment as done.
lebedev.ri added a comment.

Addressing review notes.


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.275580.patch
Type: text/x-patch
Size: 795 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200705/45b50d82/attachment.bin>


More information about the llvm-commits mailing list