From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 2242 invoked by alias); 30 Nov 2007 15:04:20 -0000 Received: (qmail 2231 invoked by uid 22791); 30 Nov 2007 15:04:19 -0000 X-Spam-Check-By: sourceware.org Received: from py-out-1112.google.com (HELO py-out-1112.google.com) (64.233.166.180) by sourceware.org (qpsmtpd/0.31) with ESMTP; Fri, 30 Nov 2007 15:04:14 +0000 Received: by py-out-1112.google.com with SMTP id a29so5120877pyi for ; Fri, 30 Nov 2007 07:04:12 -0800 (PST) Received: by 10.64.142.10 with SMTP id p10mr7043098qbd.1196435051339; Fri, 30 Nov 2007 07:04:11 -0800 (PST) Received: by 10.65.203.6 with HTTP; Fri, 30 Nov 2007 07:04:11 -0800 (PST) Message-ID: <84fc9c000711300704p10556ed7w72a9333afa1d19f3@mail.gmail.com> Date: Fri, 30 Nov 2007 20:15:00 -0000 From: "Richard Guenther" To: "Rob Quill" Subject: Re: Scripted pass manager Cc: gcc-patches@gcc.gnu.org In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <84fc9c000711270539j55099306mb433250f68028741@mail.gmail.com> <84fc9c000711290536l1a5472fchecd833b3811b99be@mail.gmail.com> 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: 2007-11/txt/msg01713.txt.bz2 On Nov 30, 2007 3:02 PM, Rob Quill wrote: > On 29/11/2007, Richard Guenther wrote: > > On Nov 27, 2007 2:39 PM, Richard Guenther wrote: > > > > > > On Nov 26, 2007 11:20 PM, Rob Quill wrote: > > > > Hi all, > > > > > > > > This patch scripts the pass manager in a way similar to the the > > > > options.c and options.h are generated. It shows no regressions against > > > > the current mainline on x86_64-linux. > > > > > > ;) > > > > > > With a "scripted pass manager" I of course ment a pass manager that > > > allows re-configuration of the pass pipeline without re-compiling. For > > > example by embeding LUA (or another tiny scripting language). With > > > control flow you should be able to experiment with looping over > > > optimization passes until nothing changes, etc., much like a simple > > > "plugin" interface without actually having plugins. > > > > Let me elaborate a bit on what I want from a 'scripted pass manager'. > > The statically specified pass pipeline is a limitation for experiments with > > pass ordering - so as a first thing I'd like to dynamically initialize the > > pass pipeline from - say - a textual description - that is either specified > > on the command-line or by looking up a default (which would match > > the current pipeline configuration) which is statically built into gcc. > > So, as a starting point it would be better if the pass order was > decided at run time by a script instead of at compile time. So, to > check we're thinking along the same lines, I'm imagining that some > function/script would read the passes.def file at run-time and build > the pass list from this, e.g. very roughly > > while(not EOF) > { > char *s = read_next_line("passes.def"); > make_next_pass(s); > } > > although if it was done from the command line, I suppose we would just > have for instance, some list of passes at run-time and turn these > somehow into the actually pass list? Is that would you had in mind? Yes, that would already be very useful. You'd either specify -fpasses=/tmp/my_passes.def or a default passes.def would be used (either installed somewhere or preferably statically built into the compiler). Richard.