Quoting Manuel López-Ibáñez <lopeziba...@gmail.com>:

I would think that instead of hooks, a program should be able to call
pass_manager functions to query/add/remove/reorder passes within a
running program. That is, make the pass_manager a library that works
on passes. GCC would just call that library to implement its
particular pipeline.

With the ici low-level and ici pass-reordering plugins, you can already
use a file to specify pass ordering.

It should be straightforward to make a plugin that queries another program
about what pass reordering to do.

However, your description about reordering passes 'within a running program'
doesn't agree with how GCC is used today and what its passes are.

Of course, *plugins* can call pass manager functions - but in order to do this,
they first have to attain control.  So that'll be either in plugin_init or
in a hook.

Reply via email to