[PATCH] D47858: [New PM] Introducing PassInstrumentation framework

Andy Kaylor via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Sep 18 14:50:57 PDT 2018


andrew.w.kaylor added inline comments.


================
Comment at: include/llvm/IR/PassInstrumentation.h:50
+/// (e.g. become unskippable). PassManager is the only entity that determines
+/// how pass instrumentation affects pass execution.
+///
----------------
andrew.w.kaylor wrote:
> fedor.sergeev wrote:
> > philip.pfaffe wrote:
> > > andrew.w.kaylor wrote:
> > > > This is actually fairly important. There are many passes that will cause compilation to fail if they are skipped.
> > > > 
> > > > Maybe instead of having the pass managers not run the pass, you could add an argument to the run function that indicates the pass should be skipped if possible? That feels fairly clunky. The alternative is to have some way for the pass managers to detect that the passes cannot be skipped, and I suspect we don't want to do that either.
> > > Passes shouldn't be able to control this I think. That burden should be on the instrumentation.
> > This is marked as TODO :)
> > There are ways to allow passes opt-in/out of pass skipping, its just not a focus here.
> > After current series of patches will be landed I will start approaching OptBisect and then we will beat this dead horse till it is fully dead.
> >  
> But the instrumentation can't make this decision without having explicit knowledge about the pass. The pass itself is really the only thing that knows whether or not it can be skipped.
That's fair. It doesn't need to be solved now, but I think that until it is solved the default behavior should be to not skip any passes.


Repository:
  rL LLVM

https://reviews.llvm.org/D47858





More information about the llvm-commits mailing list