Hi Martin /> It seems to me however that PLUGIN_ALL_IPA_PASSES_END runs prior to
trnsformation phase of IPA passes (the name is rather unclear in this regard)...//
/ If i am not wrong the PLUGIN_ALL_IPA_PASSES_START ( execution ) is hooked in the begging of all_smole_ipa_passes , before ALL_SIMPLE_IPA_PASSES and the PLUGIN_ALL_IPA_PASSES_END is just after ALL_LTO_SMOLLE_PASSES , at this stage the process of gimplification is done ( in all_lowering_passes ) and the last is executed before all_smole_ipa_passes ( do am i right ? ) , in the gcc internals documentation they saied "The inter-procedural optimization is organized as a sequence of individual passes, which operate on the callgraph and the varpool" i managed to output the gimple representation in ( PLUGIN_ALL_IPA_PASSES_END ) and the call graph representation too
f_3 () { # BLOCK 2 # PRED: ENTRY (fallthru) gimple_call <__builtin_puts, NULL, &"Printing from F_3"[0]> gimple_return <NULL> # SUCC: EXIT } f_3/3(3) @0x7fc84e173000 (asm: f_3) availability:available analyzed 14 time, 12 benefit 6 size, 4 benefit needed reachable body externally_visible finalized called by: calls: __builtin_puts/4 (1.00 per call) References: Refering this function: i am confused now !!! i did't think before about what you pointed ( i guess my understanding of the GCC pipe line is wrong ) but its really logic what you pointed sense the cgraph creation is done in the call cgraph_finalize_function .
On a related note, I see there are no PLUGIN_ALL_LATE_IPA_PASSES_{START,END} events, even though they might be quite useful.
the available events in plugin.def are the remarkable ones but you can hook to any stage in the compilation process by linking the plugin to PLUGIN_PASS_MANAGER_SETUP ,GCC plugin capability provide a flexible mechanism to set any additional pass in any location i encourage you to take a look at the plugin section in the gcc internal . i will try to use cgraph_function_versioning for now , thanks for your feed back
-- Chaddy Huussin Vazquez , chas...@ceis.cujae.edu.cu Superior Polytechnic Institute 'Jose Antonio Echeverr?a' Informatics Engineering Faculty 48 Aniversario del Instituto Superior Politecnico Jose Antonio Echeverria, Cujae Una obra de la Revolucion Cubana | 2 de diciembre de 1964 | http://cujae.edu.cu Consulte la enciclopedia colaborativa cubana. http://www.ecured.cu