From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 10001 invoked by alias); 20 Jul 2010 09:58:15 -0000 Received: (qmail 9982 invoked by uid 22791); 20 Jul 2010 09:58:14 -0000 X-SWARE-Spam-Status: No, hits=-1.9 required=5.0 tests=AWL,BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE X-Spam-Check-By: sourceware.org Received: from mail-ww0-f51.google.com (HELO mail-ww0-f51.google.com) (74.125.82.51) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 20 Jul 2010 09:58:09 +0000 Received: by wwb39 with SMTP id 39so669843wwb.8 for ; Tue, 20 Jul 2010 02:58:07 -0700 (PDT) MIME-Version: 1.0 Received: by 10.216.59.131 with SMTP id s3mr5101780wec.71.1279619886950; Tue, 20 Jul 2010 02:58:06 -0700 (PDT) Received: by 10.216.80.199 with HTTP; Tue, 20 Jul 2010 02:58:06 -0700 (PDT) In-Reply-To: <4C456FE6.7010805@moene.org> References: <1279391905.4628.7.camel@linux-fd1f.site> <4C42BF4D.20400@domob.eu> <4C43D07A.9050500@verizon.net> <1279578709.9185.9.camel@linux-fd1f.site> <4C44F9A4.1080908@verizon.net> <4C4558AF.60309@net-b.de> <4C455DAD.9020509@domob.eu> <4C456FE6.7010805@moene.org> Date: Tue, 20 Jul 2010 09:58:00 -0000 Message-ID: Subject: Re: [patch, fortran] PR 40628, front-end optimization pass From: Richard Guenther To: Toon Moene Cc: Daniel Kraft , Tobias Burnus , Jerry DeLisle , Thomas Koenig , fortran@gcc.gnu.org, gcc-patches@gcc.gnu.org Content-Type: text/plain; charset=ISO-8859-1 X-IsSubscribed: yes Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org X-SW-Source: 2010-07/txt/msg01553.txt.bz2 On Tue, Jul 20, 2010 at 11:44 AM, Toon Moene 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.