[PATCH] D54023: [LoopSimplifyCFG] Delete dead in-loop blocks
Max Kazantsev via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Nov 22 04:20:26 PST 2018
mkazantsev added inline comments.
================
Comment at: lib/Transforms/Scalar/LoopSimplifyCFG.cpp:228
"Header not in loop?");
}
----------------
fedor.sergeev wrote:
> Dont you want to add an assert here on
> BlocksInLoopAfterFolding + DeadLoopBlocks <= NumBlocks ?
> you seem to be relying on that invariant later on (when comparing this sum with numblocks for equality).
Well, by construction `BlocksInLoopAfterFolding` is a subset of `LiveLoopBlocks` (see `IsEdgeLive`), and we have this:
assert(L.getNumBlocks() == LiveLoopBlocks.size() + DeadLoopBlocks.size() &&
"Malformed block sets?");
Do you really think that what you propose is needed?
https://reviews.llvm.org/D54023
More information about the llvm-commits
mailing list