redirect_edge_and_branch questions

Andrew MacLeod amacleod@redhat.com
Mon Oct 4 22:37:00 GMT 2004


On Mon, 2004-10-04 at 15:58, Andrew MacLeod wrote:
> On Fri, 2004-10-01 at 17:49, Zdenek Dvorak wrote:

> So what happens is that I redirect a bunch of edges to the new forwarder
> block, and any edges which aren't redirected get their PENDING_STMT list
> cleared.  I might be able to work around this, but it is a tad annoying.
> 
> When do we tell the cfg routines that we are not in SSA mode any more?
> Do they differentiate between SSA and trees at all?  

How serious would it break things if I taught ssa_redirect_edge that if
there are no PHI nodes, leave the edge list alone. or are their other
dependancies on that somewhere? that seems a bit hacky tho.

I might also claim that both before SSA exists and after SSA is
destroyed that, tree_redirect_edge_and_branch() ought to be calling  
redirect_edge_succ_nodup() directly instead of going through
ssa_redirect_edge.  And that could then leave the edge stmt list alone.
(couldn't it?)
 
so tree_redirect_edge_and_branch() could end something like:

  /* Now update the edges in the CFG.  */
  if (in_ssa_form_p ())
    e = ssa_redirect_edge (e, dest);
  else
    e = redirect_edge_succ_nodup (e, dest);


how reasonable is something like that?

Andrew



More information about the Gcc mailing list