|Drawing CFGs firstname.lastname@example.org (Manel Fernandez) (2001-06-28)|
|Re: Drawing CFGs timothyc@huginn.CS.Berkeley.EDU (2001-07-27)|
|From:||timothyc@huginn.CS.Berkeley.EDU (Tim Callahan )|
|Date:||27 Jul 2001 03:00:27 -0400|
|Organization:||University of California, Berkeley|
|Posted-Date:||27 Jul 2001 03:00:27 EDT|
I've encounted this before. My solution was to get a ``reverse
postorder'' ordering of the basic blocks. Sorry I don't have a
reference. Then, ignore any CFG edge from a higher numbered block to
an equal or lower numbered block. This is guaranteed to break all
cycles. Natural loop back edges are ignored, and irreducible loops
are broken arbitrarily.
Manel Fernandez <email@example.com> wrote:
>I'm writing a tool for drawing CFGs. To do this, a little routine
>assigns a 'level' to every basic block (BB), in order to draw the CFG in
>a top-down way. ...
>How could I deal with non-natural loops?
Return to the
Search the comp.compilers archives again.