This is the mail archive of the
mailing list for the GCC project.
Re: [tree-ssa] Removal of gotos from cfg based ir
- From: Chris Lattner <sabre at nondot dot org>
- To: law at redhat dot com
- 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 14:33:30 -0600 (CST)
- Subject: Re: [tree-ssa] Removal of gotos from cfg based ir
On Fri, 14 Nov 2003 email@example.com wrote:
> >> > > how do you get the edges in the cfg then?
> >> > Def-use edges, which are tracked for all SSA values.
> >> how do you then do things like jump threading?
> >What information, specifically, does jump threading need about the CFG?
> Typically just preds & succs :-)
Ah well, then we use something like this (or s/pred_/succ_/):
for (pred_iterator PI = pred_begin(BB), E = pred_end(BB); PI != E; ++PI)
BasicBlock *Pred = *PI;
For predecessors, this is implemented by walking the SSA use/def chains on
the basic block themselves. For successors, this is implemented by
"asking" the terminator at the end of the basic block what it's successors