From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 696 invoked by alias); 19 Jul 2010 19:06:29 -0000 Received: (qmail 678 invoked by uid 22791); 19 Jul 2010 19:06:28 -0000 X-SWARE-Spam-Status: No, hits=-6.1 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_HI,SPF_HELO_PASS,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Mon, 19 Jul 2010 19:06:24 +0000 Received: from int-mx01.intmail.prod.int.phx2.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id o6JJ6A3K011601 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Mon, 19 Jul 2010 15:06:10 -0400 Received: from tyan-ft48-01.lab.bos.redhat.com (tyan-ft48-01.lab.bos.redhat.com [10.16.42.4]) by int-mx01.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id o6JJ69tH009376 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Mon, 19 Jul 2010 15:06:10 -0400 Received: from tyan-ft48-01.lab.bos.redhat.com (tyan-ft48-01.lab.bos.redhat.com [127.0.0.1]) by tyan-ft48-01.lab.bos.redhat.com (8.14.4/8.14.4) with ESMTP id o6JJ88MI018003; Mon, 19 Jul 2010 21:08:08 +0200 Received: (from jakub@localhost) by tyan-ft48-01.lab.bos.redhat.com (8.14.4/8.14.4/Submit) id o6JJ83Rw018001; Mon, 19 Jul 2010 21:08:03 +0200 Date: Mon, 19 Jul 2010 19:06:00 -0000 From: Jakub Jelinek To: Jerry DeLisle Cc: Daniel Kraft , Thomas Koenig , fortran@gcc.gnu.org, gcc-patches@gcc.gnu.org Subject: Re: [patch, fortran] PR 40628, front-end optimization pass Message-ID: <20100719190803.GA20208@tyan-ft48-01.lab.bos.redhat.com> Reply-To: Jakub Jelinek References: <1279391905.4628.7.camel@linux-fd1f.site> <4C42BF4D.20400@domob.eu> <4C43D07A.9050500@verizon.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4C43D07A.9050500@verizon.net> User-Agent: Mutt/1.5.20 (2009-12-10) 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/msg01526.txt.bz2 On Sun, Jul 18, 2010 at 09:11:38PM -0700, Jerry DeLisle wrote: > On 07/18/2010 01:46 AM, Daniel Kraft wrote: > >Hi Thomas, > > > >Thomas Koenig wrote: > >>finally, here's the first attempt at a front-end optimization pass. > >>Right now, it fixes PR 40626 and optimizes comparisons between variables > >>(which only really is relevant for character comparisons). Many more > >>things could (and should) be added over time. > > > > I like the idea as long as we do not duplicate middle-end work. If > we can improve performance without sacrificing maintainability and > correctness, I am all for it. The idea of general passes is good. > Rather than optimize.c maybe call it early_pass.c or whatever. What I think would be very useful to do in -fwhole-file mode do a pass through the front-end trees and improve using that slightly e.g. dependency.c stuff (unless we jump to middle-end arrays, that's an easy way to get rid e.g. of unnecessary array temporaries). E.g. in tonto POINTER vars are ALLOCATED in one routine and not changed afterwards, such vars could be handled like allocatables. Jakub