From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 24180 invoked by alias); 19 Jul 2010 22:31:59 -0000 Received: (qmail 24164 invoked by uid 22791); 19 Jul 2010 22:31:58 -0000 X-SWARE-Spam-Status: No, hits=-1.7 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_NONE,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from smtp5.netcologne.de (HELO smtp5.netcologne.de) (194.8.194.25) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Mon, 19 Jul 2010 22:31:52 +0000 Received: from [192.168.0.196] (xdsl-213-168-109-178.netcologne.de [213.168.109.178]) by smtp5.netcologne.de (Postfix) with ESMTP id AB89740C999; Tue, 20 Jul 2010 00:31:49 +0200 (CEST) Subject: Re: [patch, fortran] PR 40628, front-end optimization pass From: Thomas Koenig To: Jerry DeLisle Cc: Daniel Kraft , fortran@gcc.gnu.org, gcc-patches@gcc.gnu.org In-Reply-To: <4C43D07A.9050500@verizon.net> References: <1279391905.4628.7.camel@linux-fd1f.site> <4C42BF4D.20400@domob.eu> <4C43D07A.9050500@verizon.net> Content-Type: text/plain; charset="ISO-8859-1" Date: Mon, 19 Jul 2010 22:31:00 -0000 Message-ID: <1279578709.9185.9.camel@linux-fd1f.site> Mime-Version: 1.0 Content-Transfer-Encoding: 7bit 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/msg01536.txt.bz2 Hi Jerry, > 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. So, how do we proceed? I could set up a general pass framework. This have structs of containing pointers to functions which handle assignments, expressions, operators and actual arglists, one for each pass, and a routine for walking the expressions and invoking the correct functions. This would mean one file passes.c (which contains the handle_code and handle_code_node functions), a passes.h header and a single file (e.g. pass-optimize.c) for each pass containing the individual functions. This sounds doable, but will take a bit of time. Further comments? Thomas