This is the mail archive of the mailing list for the GCC project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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

On Sat, 2003-08-09 at 13:18, Zdenek Dvorak wrote:
> Hello,
> > > > I'd be happy to test them if you sent me the huge patch.
> > > 
> > > here is the patch; it should bootstrap at least c and c++.
> > 
> > 
> > In fact it bootstraps c,c++,objc,java,gfortran + libraries.  I'm running
> > the test suites now.
> > 
> > But why have disabled DCE?
> on two places it uses parent_{block,stmt}. Since these are removed with the patch,
> I have disabled it until I have a time to investigate what is needed to
> change there.

Given any stmt, you need a way to determine what control statement gets
you here. Ie, when a stmt in the ELSE or THEN part of an if is marked
necessary, you must mark the conditional calculation and comparison as
necessary. Same thing for the parent of that conditional, and so on up
the parent chain.

It is also used when a PHI stmt is marked as necesssary to find the
parent stmt of blocks which feed the PHI node, since the control flow
stmt is necessary. ie

  if (x_8 < 10)
     y_4 = t_9
    y_5 = g_44
  # y_88 = PHI <y_4(4), y_5(5)>

after copyprop, we see:

  if (x_8 < 10)
  # y_88 = PHI <t_9(4), g_44(5)>

When we determine that y_88 is a necessary statement, we *have * to mark
the conditional which controls flow into blocks 4 and 5 as necessary.
We're going to have to insert copies on those edges during the
SSA->Normal pass. If you delete the conditional, we no longer have a way
of calculating the value of y_88 correctly.

So why are you remoiving the concept of a parent?  Or is there simply a
different way of getting to it?  


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]