[PATCH] D11032: [PM] Enable registration of out-of-tree or plugin passes

hfinkel at anl.gov hfinkel at anl.gov
Fri Jul 10 06:51:17 PDT 2015


hfinkel added a comment.

In http://reviews.llvm.org/D11032#202708, @philip.pfaffe wrote:

> > Does the original pass still run?
>
>
> Not in this case, no. That way, you can actively override a built-in pass.
>
> > Why not give the hook the ability to insert a new pass somewhere into the pipeline (perhaps by being able to examine the current pipeline configuration and modifying it)?
>
>
> I think that would mix different responsibilities. It is the PassBuilder's task to construct the pipeline from its textual description, and I as a user would expect the pipeline to afterwards consist of precisely the passes I specified, and in that order. I think a pass should not be able to take this away from the PassBuilder and modify the pipeline setup externally (of course besides adding itself to the PassManager on request).


I don't understand how you intend for this to be used. If I wanted to add a new pass that would run after InstCombine, for example, how would I do that? How about adding a pass to be run at the very end of the pass manager, or at the very beginning?


Repository:
  rL LLVM

http://reviews.llvm.org/D11032







More information about the llvm-commits mailing list