[PATCH] D148244: [IRCE] Support inverted range check's predicate
Max Kazantsev via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Sun Apr 23 22:05:40 PDT 2023
mkazantsev requested changes to this revision.
mkazantsev added inline comments.
This revision now requires changes to proceed.
================
Comment at: llvm/lib/Transforms/Scalar/InductiveRangeCheckElimination.cpp:379
+ if (BPI)
+ BPI->swapSuccEdgesProbabilities(BI->getParent());
+ }
----------------
You can modify IR at this point and then return false here:
```
for (auto *BBI : L->getBlocks())
if (BranchInst *TBI = dyn_cast<BranchInst>(BBI->getTerminator()))
InductiveRangeCheck::extractRangeChecksFromBranch(TBI, L, SE, BPI,
RangeChecks);
if (RangeChecks.empty())
return false;
```
it would mean that you modify IR and then report that no modification was done and all analyzes can be preserved, which is wrong.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D148244/new/
https://reviews.llvm.org/D148244
More information about the llvm-commits
mailing list