Re: Drawing CFGs

timothyc@huginn.CS.Berkeley.EDU (Tim Callahan )
27 Jul 2001 03:00:27 -0400

          From comp.compilers

Related articles
Drawing CFGs mfernand@ac.upc.es (Manel Fernandez) (2001-06-28)
Re: Drawing CFGs timothyc@huginn.CS.Berkeley.EDU (2001-07-27)
| List of all articles for this month |

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?


Post a followup to this message

Return to the comp.compilers page.
Search the comp.compilers archives again.