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]
Other format: [Raw text]

Re: [patch, fortran] PR 40628, front-end optimization pass


On Tue, Jul 20, 2010 at 11:44 AM, Toon Moene <toon@moene.org> wrote:
> Daniel Kraft wrote:
>
>> I just wonder if there is not yet any way to tell the middle-end that it
>> is allowed to optimize function calls away (like marking the functions
>> "pure" -- according to the c.l.f thread, this should be allowed for all
>> Fortran functions (if I understood it correctly)).
>
> No, that's not sufficient, as I argued in my 2007 GCC Summit paper (see
> paragraph 6.3 - you also have to get rid of the temporaries that are
> allocated to hold the function results, which can be quite large (i.e., when
> eliding MATMUL calls).
>
> It is hard to see how the middle end could do this.

It generally can't if it doesn't know that MATMUL is MATMUL.
Middle-end arrays would help, but they keep being below the top
of my TODO list ;)

Richard.


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