This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [tree-ssa] Removal of gotos from cfg based ir
- From: law at redhat dot com
- To: Chris Lattner <sabre at nondot dot org>
- Cc: Zdenek Dvorak <rakdver at atrey dot karlin dot mff dot cuni dot cz>, Diego Novillo <dnovillo at redhat dot com>, Andrew Macleod <amacleod at redhat dot com>, gcc-patches <gcc-patches at gcc dot gnu dot org>, Jan Hubicka <jh at suse dot cz>
- Date: Fri, 14 Nov 2003 13:22:30 -0700
- Subject: Re: [tree-ssa] Removal of gotos from cfg based ir
- Reply-to: law at redhat dot com
In message <Pine.LNX.4.44.0311141422260.9413-100000@nondot.org>, Chris Lattner
writes:
>Oh right, sorry. In LLVM, each function contains a doubly linked list of
>basic blocks.
Ok.
> Each basic block contains a doubly linked list of
>instructions (thus the CFG contains the instructions themselves).
Ok. FWIW, this mirrors some closely related past discussions. Specifically
we were looking at having blocks contain insns with no linkage between
insns in different blocks. We just didn't see a major benefit from
having a doubly linked list of insns.
> To get
>the predecessors of a block, you simply look at all of the users of that
>block (which are the control flow instructions at the end of predecessor
>blocks). To the successors of a block, we just look at which basic blocks
>the terminator at the end of the block branches to.
>
>So, in other words, each basic block has a use list, and all terminator
>instructions (e.g. branches) _use_ the basic block destinations. With
>this organization, the SSA graph provides the CFG, and it can never get
>out of date.
OK. I'm going to go off and think about this for a while.
Jeff