Skip to content

Commit 18d67f9

Browse files
committed
Added verifyLoop calls
1 parent 145c9d4 commit 18d67f9

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

lib/SILOptimizer/Mandatory/TFCanonicalizeCFG.cpp

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -524,6 +524,14 @@ class SingleExitLoopTransformer {
524524
DI->recalculate(*transformer.currentFn);
525525
PDI->recalculate(*transformer.currentFn);
526526
}
527+
528+
#ifndef NDEBUG
529+
{
530+
// Verify that the loop is OK after all the transformations.
531+
llvm::DenseSet<const SILLoop*> nestedLoops;
532+
loop->verifyLoopNest(&nestedLoops);
533+
}
534+
#endif
527535
return loopChanged;
528536
}
529537

0 commit comments

Comments
 (0)