[PATCH] D19172: New optimization bisect implementation (now modeled on optnone handling)

Matthias Braun via llvm-commits llvm-commits at lists.llvm.org
Mon Apr 18 11:18:11 PDT 2016


MatzeB added inline comments.

================
Comment at: lib/Passes/PassBuilder.cpp:70-71
@@ +69,4 @@
+  PreservedAnalyses run(Module &M) {
+    // This call is here for testing purposes.
+    skipPassForModule(name(), M);
+    return PreservedAnalyses::all();
----------------
andrew.w.kaylor wrote:
> MatzeB wrote:
> > I don't understand this, accidental commit? Same for the following changes.
> There's nothing being done here, so skipping and not skipping are functionally equivalent.  I'm using the NoOpXXX classes to test the new pass manager interface.  If that isn't their intent, I can try something else.  If it is, I'll clarify the comment.
Indeed skipping and not skipping are equivalent as would be to not call skipPassXXX() at all, so you start wondering why that call is there at all.

I see now that it is the only place where you could test the interface for the new pass manager. I would lean towards not doing the call and removing the then dead skipPassXXX() functions, it's probably not that hard to re-create them once we need them. If you prefer to keep the functions, at least improve the comment that this is the only place you can sensibly call them.


Repository:
  rL LLVM

http://reviews.llvm.org/D19172





More information about the llvm-commits mailing list