[llvm] r276941 - Add verifyAnalysis for LCSSA.
Michael Zolotukhin via llvm-commits
llvm-commits at lists.llvm.org
Wed Jul 27 16:35:53 PDT 2016
Author: mzolotukhin
Date: Wed Jul 27 18:35:53 2016
New Revision: 276941
URL: http://llvm.org/viewvc/llvm-project?rev=276941&view=rev
Log:
Add verifyAnalysis for LCSSA.
Summary:
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.
Reviewers: chandlerc, sanjoy, hfinkel
Subscribers: llvm-commits
Differential Revision: https://reviews.llvm.org/D22888
Modified:
llvm/trunk/lib/Transforms/Utils/LCSSA.cpp
Modified: llvm/trunk/lib/Transforms/Utils/LCSSA.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Utils/LCSSA.cpp?rev=276941&r1=276940&r2=276941&view=diff
==============================================================================
--- llvm/trunk/lib/Transforms/Utils/LCSSA.cpp (original)
+++ llvm/trunk/lib/Transforms/Utils/LCSSA.cpp Wed Jul 27 18:35:53 2016
@@ -315,6 +315,11 @@ struct LCSSAWrapperPass : public Functio
ScalarEvolution *SE;
bool runOnFunction(Function &F) override;
+ void verifyAnalysis() const override {
+ assert(
+ all_of(*LI, [&](Loop *L) { return L->isRecursivelyLCSSAForm(*DT); }) &&
+ "LCSSA form is broken!");
+ };
/// This transformation requires natural loop information & requires that
/// loop preheaders be inserted into the CFG. It maintains both of these,
More information about the llvm-commits
mailing list