This is the mail archive of the gcc-patches@gcc.gnu.org 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]

Re: patch to alias.c checked in


Joern Rennecke wrote:

> base_alias_check has this code:
> 
>   /* If one address is a stack reference there can be no alias:
>      stack references using different base registers do not alias,
>      a stack reference can not alias a parameter, and a stack reference
>      can not alias a global.  */
>   if ((GET_CODE (x_base) == ADDRESS && GET_MODE (x_base) == Pmode)
>       || (GET_CODE (y_base) == ADDRESS && GET_MODE (y_base) == Pmode))
>     return 0;
> 
> For this to work, we must make sure that when a the sum of an address
> and an offset is loaded into a register, we don't think that the offset
> is a base.  As the code was, when a register is first set to an offset,
> and record_set is called for an addition that adds in a base, it just
> left new_reg_base_value alone.

Do you have an idea how this would work out when "the sum of an address
and an offset" is actually a difference ?  Note that the base address of
a Fortran array often is -4 or -8 bytes from the "obvious" base because
of the (by default) 1-based indexing.

Do we have to do the same for MINUS (and then: how do we deal with
subtracting two base adresses to form an offset) ?

Thanks in advance,

-- 
Toon Moene - mailto:toon@moene.indiv.nluug.nl - phoneto: +31 346 214290
Saturnushof 14, 3738 XG  Maartensdijk, The Netherlands
Maintainer, GNU Fortran 77: http://gcc.gnu.org/onlinedocs/g77_news.html
Join GNU Fortran 95: http://g95.sourceforge.net/ (under construction)

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