[tree-ssa] RFC: Making control flow more explicit

Zdenek Dvorak rakdver@atrey.karlin.mff.cuni.cz
Mon Aug 11 20:15:00 GMT 2003


Hello,

> > > So why are you remoiving the concept of a parent?  Or is there simply a
> > > different way of getting to it?
> > 
> > because parent obviously is not what you want here. IIRC in the ssa dce
> > algorithm marking of the neccesary control statements is somehow
> > done using dominator information.
> > 
> You can use the parent relationship to avoid building the reverse
> dominator tree to get at the control dependent information.  If block B1
> is the parent of block B2, then B2 is control dependent on B1.
> 
> The problem with the parent relationship is that it needs to be kept
> up-to-date while manipulating the flowgraph.  Why do you think this is
> not correct?

I am not really sure what is the exact meaning of the parent.  Can't you
run into problems in cases like

if (c1)
  goto bla;

if (c2)
  {
    something;
    bla:
    something_else;
  }
?

Anyway, losing concept of parent relationship seems to be relatively
small cost in comparison to other gains.

Zdenek



More information about the Gcc mailing list