This is the mail archive of the fortran@gcc.gnu.org mailing list for the GNU Fortran 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: How to express the fact that arguments don't escape?


On Sun, Aug 16, 2009 at 10:05 AM, Thomas Koenig<tkoenig@netcologne.de> wrote:
> On Sun, 2009-08-16 at 00:15 +0200, Richard Guenther wrote:
>> 2009/8/15 Tobias Schlüter <tobias.schlueter@physik.uni-muenchen.de>:
>
>> > The stores can't be optimized away. ?This means one additional load (I_2 =
>> > I) in the best case, and one more additional load and store (get I from
>> > memory, store in I_2; get I_2 from memory, store in I) in the worst case.
>>
>> Correct. ?The only difference in that case is that I doesn't escape. ?The
>> store will be optimized away in case g is inlined though.
>
> In that case, wouldn't it be better to teach the back end about
> variables which cannot alias anything else at all, and set the
> corresponding flag for all non-pointer variables in Fortran?
>
> How difficult would this be?

This is what Michas patch does.  It doesn't help the escape problem though.

Richard.


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