diff options
author | Anna Thomas <anna@azul.com> | 2019-01-03 17:44:44 +0000 |
---|---|---|
committer | Anna Thomas <anna@azul.com> | 2019-01-03 17:44:44 +0000 |
commit | 0785e7307ef76168d1a58faa9ea44afc5a6aab1c (patch) | |
tree | 7b42b4af9ac7bd48a8a93d4732e71c06fcb23cbd /llvm/lib/Transforms/Utils/LoopUnrollRuntime.cpp | |
parent | 3c74be80493d439bddcd70288d489ba3f9c963ec (diff) | |
download | bcm5719-llvm-0785e7307ef76168d1a58faa9ea44afc5a6aab1c.tar.gz bcm5719-llvm-0785e7307ef76168d1a58faa9ea44afc5a6aab1c.zip |
[UnrollRuntime] Add DomTree verification under debug mode
NFC: This adds the dom tree verification under debug mode at a point
just before we start unrolling the loop. This allows us to verify dom
tree at a state where it is much smaller and before the unrolling
actually happens.
This also implies we do not need to run -verify-dom-info everytime to
see if the DT is in a valid state when we transform the loop for runtime
unrolling.
llvm-svn: 350334
Diffstat (limited to 'llvm/lib/Transforms/Utils/LoopUnrollRuntime.cpp')
-rw-r--r-- | llvm/lib/Transforms/Utils/LoopUnrollRuntime.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/llvm/lib/Transforms/Utils/LoopUnrollRuntime.cpp b/llvm/lib/Transforms/Utils/LoopUnrollRuntime.cpp index 2981e6e2c52..a60becac649 100644 --- a/llvm/lib/Transforms/Utils/LoopUnrollRuntime.cpp +++ b/llvm/lib/Transforms/Utils/LoopUnrollRuntime.cpp @@ -927,6 +927,12 @@ bool llvm::UnrollRuntimeLoopRemainder(Loop *L, unsigned Count, // of its parent loops, so the Scalar Evolution pass needs to be run again. SE->forgetTopmostLoop(L); + // Verify that the Dom Tree is correct. +#if !defined(NDEBUG) + if (DT) + assert(DT->verify(DominatorTree::VerificationLevel::Full)); +#endif + // Canonicalize to LoopSimplifyForm both original and remainder loops. We // cannot rely on the LoopUnrollPass to do this because it only does // canonicalization for parent/subloops and not the sibling loops. |