[ tree-ssa] PRE problem

law@redhat.com law@redhat.com
Sat Feb 21 02:44:00 GMT 2004


In message <1077321649.3219.18.camel@localhost.localdomain>, Diego Novillo writ
es:
 >On Fri, 2004-02-20 at 18:50, Daniel Berlin wrote:
 >
 >> +	      if (may_propagate_copy (*vp, p))
 >> +		{
 >> +		  if (for_insert)
 >> +		    propagate_copy (vp, p);
 >> +		  else
 >> +		    *vp = p;
 >> +		  if (!phi_ssa_name_p (p))
 >> +		    replaced_constants = true;
 >> +		  break;
 >> +		}
 >>
 >Please call propagate_value and make propagate_copy a static in
 >tree-ssa-dom.c.  Then declare propagate_value extern in tree-flow.h.
Actually, I've been thinking about this some more -- let's hold off on
any patches for a little while.

What's going on in this code really isn't copy propagation or reverse
copy propagation.  I've always been aware of that, but used those
terms since what we were doing has a lot of similarities to copy
propagation.  Using those terms probably led Diego and myself down
the wrong path.

This code is doing something that is fundamentally different and probably
needs a different set of APIs to interact with.


  1. I don't think we need/want may_propagate_copy to be used in this
     code.

  2. Nor do we want to use propagate_value/propagate_copy.

  3. There is no need for this code to signal a failure to its 
     callers.  A failure for this code is worthy of an abort
     given the clarifications we've done for copies appearing
     in the IL.

  4. We need a function which updates the annotations and only aborts
     if there is an inconsistency in the memory tag info.


Diego -- if you want me to walk you through why I've had the change in
opinion, I'm happy to do so Monday (same applies for Daniel, but I bet
he's already aware that we were going down the wrong path).

This is (of course) also going to require some comment clarifications
in the code, both PRE and the new functions we write.

jeff



More information about the Gcc mailing list