LCSSAWrapperPass currently doesn't override verifyAnalysis method, so pass
manager doesn't verify LCSSA. This patch adds the method so that we start
verifying LCSSA between loop passes.
Details
Diff Detail
- Repository
- rL LLVM
Event Timeline
lib/Transforms/Utils/LCSSA.cpp | ||
---|---|---|
318 ↗ | (On Diff #65818) | I'm missing something here -- how is LCSSA an "analysis" that can be "verified"? |
lib/Transforms/Utils/LCSSA.cpp | ||
---|---|---|
318 ↗ | (On Diff #65818) | I'm not very confident about this, but my understanding was that if a pass states that it preserves LCSSA (AU.addPreservedID(LCSSAID) like e.g. LoopSimplify does), then pass manager would run verifyAnalysis for LCSSA. In debugger this function is definitely entered several times. I'd be happy to be corrected here, and add a verifier in some other way. |
lib/Transforms/Utils/LCSSA.cpp | ||
---|---|---|
318 ↗ | (On Diff #65818) | Make sense, the Analysis part threw me off. Does it make sense to use something that would work in release mode also? Or is verifyAnalysis expected to be a no-op in non-debug builds? |
lib/Transforms/Utils/LCSSA.cpp | ||
---|---|---|
318 ↗ | (On Diff #65818) |
In LegacyPassManager.cpp it was void PMDataManager::verifyPreservedAnalysis(Pass *P) { // Don't do this unless assertions are enabled. #ifdef NDEBUG return; #endif ... So in Release+Assertions and Debug builds it should be on. |