[PR49888, VTA] don't keep VALUEs bound to modified MEMs

Alexandre Oliva aoliva@redhat.com
Fri Jun 22 01:40:00 GMT 2012


On Jun 20, 2012, Richard Guenther <richard.guenther@gmail.com> wrote:

> I have a question on the pre-existing condition

> -      if (GET_CODE (y) == AND || ysize < -INTVAL (XEXP (x, 1)))
>         xsize = -1;

> so if this condition is not true then we simply strip off the AND of X and
> do not adjust xsize at all?  Likewise we do not adjust c?  How can that
> be conservatively correct?

Yeah, xsize = -1 makes x “infinitely large”, so it will overlap if the
RTXs are in any way related, or something like that.

> Thus, I'd rather see

>    if (GET_CODE (x) == AND && CONST_INT_P (XEXP (x, 1)))
>      {
> +      HOST_WIDE_INT sc = INTVAL (XEXP (x, 1));
> +      unsigned HOST_WIDE_INT uc = sc;
> +      if (xsize > 0 && sc < 0 && -uc == (uc & -uc))
> +       {
> +         xsize -= sc + 1;
> +         c -= sc;
>            return memrefs_conflict_p (xsize, canon_rtx (XEXP (x, 0)),
> ysize, y, c);
>          }
>       }

> as the sole supported case.

Ack.  Regstrapped successfully, checking this in.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: alias-align-exprs-pr53671-pr49888.patch
Type: text/x-diff
Size: 2199 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20120622/00b345d9/attachment.bin>
-------------- next part --------------


-- 
Alexandre Oliva, freedom fighter    http://FSFLA.org/~lxoliva/
You must be the change you wish to see in the world. -- Gandhi
Be Free! -- http://FSFLA.org/   FSF Latin America board member
Free Software Evangelist      Red Hat Brazil Compiler Engineer


More information about the Gcc-patches mailing list