Hello All, The attached patch, to trunk rev 152849, add a PLUGIN_PARSED_UNIT event, invoked at start of cgraph_finalize_compilation_unit after all the compilation unit has been parsed. My intuition is that we should better provide a little more hooks, especially at a such higher level. Doing everything only in passes is not practical (and was the reason to add stuff like PLUGIN_FINISH_UNIT gcc/ChangeLog: 2009-10-15 Basile Starynkevitch * doc/plugins.texi (Plugin callbacks): added PLUGIN_PARSED_UNIT. * cgraphunit.c (cgraph_finalize_compilation_unit): Added invocation of PLUGIN_PARSED_UNIT callbacks. * gcc-plugin.h: Added PLUGIN_PARSED_UNIT. * plugin.c (plugin_event_name): Added PLUGIN_PARSED_UNIT. (invoke_plugin_callbacks): ditto. I am bootstrapping it right now on x86_64-unknown-gnu-linux for c&c++ Comments are welcome. I also believe that we should have plugin hooks for builtins. Regards. -- Basile STARYNKEVITCH http://starynkevitch.net/Basile/ email: basilestarynkevitchnet mobile: +33 6 8501 2359 8, rue de la Faiencerie, 92340 Bourg La Reine, France *** opinions {are only mines, sont seulement les miennes} ***