[PATCH] D71145: [InstCombine] Allow to limit the max number of iterations
Roman Lebedev via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Dec 9 10:34:35 PST 2019
lebedev.ri added inline comments.
================
Comment at: llvm/lib/Transforms/InstCombine/InstructionCombining.cpp:125
+static constexpr unsigned InstCombineDefaultMaxIterations = 1000;
+
----------------
I think it should be
```
static constexpr unsigned InstCombineDefaultMaxIterations = std::numeric_limits<unsigned>::max - 1;
```
if the goal is to catch infinite loops while avoiding unintentional capping of iteration limit.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D71145/new/
https://reviews.llvm.org/D71145
More information about the llvm-commits
mailing list