[ tree-ssa] PRE problem

law@redhat.com law@redhat.com
Fri Feb 20 19:59:00 GMT 2004


In message <1077306335.3169.175.camel@localhost.localdomain>, Diego Novillo wri
tes:
 >On Fri, 2004-02-20 at 14:05, law@redhat.com wrote:
 >> In message <760713BF-63D0-11D8-ABAD-000A95DA505C@dberlin.org>, Daniel Berli
 >n wr
 >> ites:
 >>  >
 >>  >On Feb 20, 2004, at 12:44 PM, law@redhat.com wrote:
 >>  >
 >>  >> (for example, copy propagation when the two objects have different
 >>  >> memory tags).
 >>  >
 >>  >I should also note that if this is true, something else is broken.
 >> No.  The RHS & LHS of a copy or PHI node are allowed to have different
 >> memory tags.  It's only when you cprop that you have to check the tags.
 >> 
 >False.  If you do all your propagation using may_propagate_copy and
 >propagate_value, you will never get a PHI node with different tags in
 >its LHS and RHS.  It's simply impossible.
Err, no, it's quite possible -- unless you're going to walk the use-def
chains whenever you find a dereference to find all the copies leading to that
store and propagate the tags through those copies.  Sounds ugly if you
ask me.


Consider:

  p = x;
  y = p;
      *y;

"y" will have a tag, but by no means does that mean p or x will have a
tag.


And let's just pretend you go and fix that.  There are still other reasons
why a copy propagation may not be safe -- consider if the destination is
a hard register.



Jeff



More information about the Gcc mailing list