Possible plugin hooks

See also the "plugin hooks" thread on GCC mailing list.

We list here some possible plugin hooks which have not yet being added into the trunk. The names PLUGIN_... are event names to be added in the  plugin_event enum-eration of file gcc/gcc-plugin.h

PLUGIN_REPLACE_PASS_MANAGER

Some major plugins might want to replace entirely the pass manager (in file gcc/passes.c) with their own pass manager. It is expected that they would invoke most of the existing passes in gcc/tree-pass.h inside their own pass manager.

PLUGIN_MONITOR_PASS_LIST

Some plugins might want to monitor the execution of a pass list. We could add an invoke_plugin_callback inside execute_pass_list of gcc/passes.c for that.

PLUGIN_ADD_CGRAPH

Some plugins may want to do their own additional processing when adding a new function into the call graph. We could add an invoke_plugin_callback inside cgraph_add_new_function of gcc/cgraph.c.

PLUGIN_REGISTER_PRAGMA

Some plugins may want to register additional pragmas in function init_pragma of gcc/c-pragma.c. We could add an invoke_plugin_callback inside that init_pragma function.

PLUGIN_DEFINE_BUILTINS

Some plugins may want to define additional builtins or builtin types. We could add an invoke_plugin_callback inside the c_define_builtins of file gcc/c-common.c and provide a function register_plugin_builtin for that purpose.

PLUGIN_ADD_CPP_MACROS

We need a way to add extra preprocessor builtin macros (like e.g. __TIME__ etc.).


the above list should be completed

This list should also be shrinked when a new event has been added into the trunk.

None: plugin hooks (last edited 2009-10-27 17:18:44 by BasileStarynkevitch)