[PATCH] D64553: [LoopUtils] Extend the scope of getLoopEstimatedTripCount
Eli Friedman via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Jul 15 14:47:38 PDT 2019
efriedma added inline comments.
================
Comment at: llvm/trunk/lib/Transforms/Utils/LoopUtils.cpp:640
+ SmallVector<BasicBlock *, 4> ExitBlocks;
+ L->getUniqueNonLatchExitBlocks(ExitBlocks);
+ if (any_of(ExitBlocks, [](const BasicBlock *EB) {
----------------
I'm seeing `Assertion 'L->hasDedicatedExits() && "getUniqueExitBlocks assumes the loop has canonical form exits!"' failed.` with some out-of-tree code that calls getLoopEstimatedTripCount. Does this analysis really require that the loop has dedicated exits? If it does, can we guard this call so getLoopEstimatedTripCount fails gracefully for loops without dedicated exits?
I think all the in-tree users of getLoopEstimatedTripCount require dedicated exits for other reasons, so no bug report.
Repository:
rL LLVM
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D64553/new/
https://reviews.llvm.org/D64553
More information about the llvm-commits
mailing list