[llvm] r347458 - [NFC] Assert that all blocks staying in loop are live
Max Kazantsev via llvm-commits
llvm-commits at lists.llvm.org
Thu Nov 22 04:43:27 PST 2018
Author: mkazantsev
Date: Thu Nov 22 04:43:27 2018
New Revision: 347458
URL: http://llvm.org/viewvc/llvm-project?rev=347458&view=rev
Log:
[NFC] Assert that all blocks staying in loop are live
Modified:
llvm/trunk/lib/Transforms/Scalar/LoopSimplifyCFG.cpp
Modified: llvm/trunk/lib/Transforms/Scalar/LoopSimplifyCFG.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Scalar/LoopSimplifyCFG.cpp?rev=347458&r1=347457&r2=347458&view=diff
==============================================================================
--- llvm/trunk/lib/Transforms/Scalar/LoopSimplifyCFG.cpp (original)
+++ llvm/trunk/lib/Transforms/Scalar/LoopSimplifyCFG.cpp Thu Nov 22 04:43:27 2018
@@ -226,6 +226,8 @@ private:
// Sanity check: header must be in loop.
assert(BlocksInLoopAfterFolding.count(L.getHeader()) &&
"Header not in loop?");
+ assert(BlocksInLoopAfterFolding.size() <= LiveLoopBlocks.size() &&
+ "All blocks that stay in loop should be live!");
}
/// Constant-fold terminators of blocks acculumated in FoldCandidates into the
More information about the llvm-commits
mailing list