Re: CFG from the GCC

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



weili747 <weili747@xxxxxxxxx> writes:

> I am trying to get CFG for a function in a program after all optimization
> passes have been applied. How can I get it? Thanks in advance.

You can get the basic blocks via FOR_EACH_BB.  Given a basic block, you
can use FOR_EACH_EDGE to get the edges.  For each edge, you can
EDGE_PRED and EDGE_SUCC to get the basic blocks that the edges connect
to.  See basic-block.h for these and other things.

Ian

[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux