Hello,
I am implementing support for PBO on picochip port of GCC (not yet
submitted to mainline).
I see that GCC generates 2 files, xx.gcno and xx.gcda, containing the
profile information, the former containing the flow graph
information(compile-time) and later containing the edge profile
information(run-time). The CFG information seems to be getting emitted
quite early in the compilation process(pass_tree_profile). Is the
instrumentation also done at this time? If it is, as later phases change
CFG, how is the instrumentation code sanity maintained? If it isnt, How
would you correlate the CFG in gcno file to the actual CFG at
execution(that produces the gcda file)?
As for our port's case, we are already able to generate profile
information using our simulator/hardware, and it is not-too-difficult
for me to format that information into .gcno and .gcda files. But, i
guess the CFG that i would have at runtime would be quite different from
the CFG at initial phases of compilation (even at same optimization
level). Any suggestions on this? Would i be better off keeping the gcno
file that GCC generates, try to match the runtime-CFG to the one on the
gcno file and then write gcda file accordingly?
Has anyone tried inserting profile information from outside of the GCC
instrumentation back into the compiler? Could you please let me know how
you handled this?
In general, does anyone have any numbers on the performance improvements
that PBO brings in for GCC?
Thanks in advance.
Regards
Hari