Extract control flow graph from gcc output

I am trying to extract a control flow graph from the assembly code that gcc produces. I managed to dump CFG from several IR (rtl phases) into .vcg files using the arguments -fdump-rtl- * and -dv. Is there a way to do the same, but for the final build code? I would like to have a universal, goal-independent and easily parsed view (e.g. vcg view). My source code is in C (in case it plays an important role).

Regards, Michalis.

+4
source share
1 answer

Intel PTU and VTune will do this if you can run the profiling application ... not sure if it can generate a graph without running the code. Otherwise, you can look at something like this: http://compilers.cs.ucla.edu/avrora/cfg.html .

0
source

All Articles