[PATCH] D28743: [PM] Teach the LoopPassManager to automatically canonicalize loops by runnig LCSSA over them prior to running the loop pipeline.
Davide Italiano via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Jan 16 00:33:23 PST 2017
davide added inline comments.
Comment at: include/llvm/Transforms/Scalar/LoopPassManager.h:308-310
+ // Verify the loop structure and LCSSA form before visiting the loop.
+ L->isRecursivelyLCSSAForm(LAR.DT, LI);
> davide wrote:
> > These two can be a bit expensive. Maybe put them under `#ifndef NDEBUG` ?
> In D28676 the same problem were solved by making `VerifyLoopInfo` global and running expensive checks only if `-verify-loop-info` is specified in command line. Maybe that change can be useful here?
Maybe, eventually. But until all the bugs in the new PM are shaken properly my preference would be to run this check unconditionally for debug builds. (note, we do something similar for NewGVN and it revealed quite a few bugs, and these checks can be always be moved to LLVM_ENABLE_EXPENSIVE_CHECKS once we're satisfied with things and/or we think running the verification by default is crazy expensive).
More information about the llvm-commits