[PATCH] D22888: Add verifyAnalysis for LCSSA.

Sanjoy Das via llvm-commits llvm-commits at lists.llvm.org
Wed Jul 27 16:20:17 PDT 2016


sanjoy added inline comments.

================
Comment at: lib/Transforms/Utils/LCSSA.cpp:318
@@ -317,1 +317,3 @@
   bool runOnFunction(Function &F) override;
+  void verifyAnalysis() const override {
+    assert(
----------------
mzolotukhin wrote:
> sanjoy wrote:
> > I'm missing something here -- how is LCSSA an "analysis" that can be "verified"?
> 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.
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?


https://reviews.llvm.org/D22888





More information about the llvm-commits mailing list