Related articles |
---|
Drawing CFGs mfernand@ac.upc.es (Manel Fernandez) (2001-06-28) |
Re: Drawing CFGs timothyc@huginn.CS.Berkeley.EDU (2001-07-27) |
From: | timothyc@huginn.CS.Berkeley.EDU (Tim Callahan ) |
Newsgroups: | comp.compilers |
Date: | 27 Jul 2001 03:00:27 -0400 |
Organization: | University of California, Berkeley |
References: | 01-06-066 |
Keywords: | tools |
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.
Tim
Manel Fernandez <mfernand@ac.upc.es> 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
comp.compilers page.
Search the
comp.compilers archives again.