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

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

Now that it was resolved by d12ec0f752,
we can reinstate lower limits and wait for a new bugreport before
reverting this again...
This commit is contained in:
Roman Lebedev 2020-07-19 16:37:03 +03:00
parent c6e13667e7
commit 2f3862eb9f
No known key found for this signature in database
GPG Key ID: 083C3EBB4A1689E0
1 changed files with 5 additions and 0 deletions

View File

@ -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"),