public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: "Ramana Radhakrishnan" <ramana.r@gmail.com>
To: "Richard Guenther" <richard.guenther@gmail.com>
Cc: "Rob Quill" <rob.quill@gmail.com>, gcc-patches@gcc.gnu.org
Subject: Re: Scripted pass manager
Date: Thu, 29 Nov 2007 16:40:00 -0000	[thread overview]
Message-ID: <67ea2eb0711290635y18cc131fh93fe9821ed9ca15d@mail.gmail.com> (raw)
In-Reply-To: <84fc9c000711290536l1a5472fchecd833b3811b99be@mail.gmail.com>

Hi,

I don't know if this totally makes sense but anyways here goes.

<continuation on crazy idea>

While we are at this . A lot of the gate functions to passes are
essentially dependent on the optimization level at which the pass is
run. I wonder if it might be worthwhile interpreting gating functions
for passes at run time.

If we are to tie this in with some of the ideas with the Function
level optimization specification bit where the user want to possibly
compile certain functions with different  optimization options and /
or passes , would we have to specify the pass dependencies so that the
pass manager would be able to automatically detect these cases and run
the dependent passes before. To run the loop unroller pass alone I
wouldn't want to ask the pass manager to have run any other pass that
this depends on.

</end continuation on crazy idea>


cheers
Ramana

On Nov 29, 2007 7:06 PM, Richard Guenther <richard.guenther@gmail.com> wrote:
>
> On Nov 27, 2007 2:39 PM, Richard Guenther <richard.guenther@gmail.com> wrote:
> >
> > On Nov 26, 2007 11:20 PM, Rob Quill <rob.quill@gmail.com> 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.
>
> <crazy ideas>
> This textual description could look like your passes.def, but it could also
> be a procedural elaboration of the pass flow interpreted by the GCC pass
> manager.  In whatever language of choice (and with whatever interface
> we can come up with).  Like:
>
> do_passes ()
> {
>   if (optimize > 0)
>     do_early_optimizations ()
>   ...
> }
>
> do_early_optimizations ()
> {
>   execute_one_pass (early_inline)
>   execute_one_pass (cleanup_cfg)
>   ...
> }
>
> basically you would provide a scripting interface to the pass manager
> backend and process the pass flow using an interpreter.
> </crazy ideas>
>
>
> Richard.
>



-- 
Ramana Radhakrishnan

  reply	other threads:[~2007-11-29 14:35 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-11-27  0:38 Rob Quill
2007-11-27 19:07 ` Richard Guenther
2007-11-27 19:19   ` Basile STARYNKEVITCH
2007-11-29 15:42   ` Richard Guenther
2007-11-29 16:40     ` Ramana Radhakrishnan [this message]
2007-11-30 20:04     ` Rob Quill
2007-11-30 20:15       ` Richard Guenther
2007-12-05  0:14 ` Diego Novillo
2007-12-05  0:56   ` Andrew Pinski
2007-12-05 15:36   ` Ian Lance Taylor
2007-12-05 18:38     ` Rob Quill
2007-12-05 18:41       ` Richard Guenther
2007-12-05 18:42       ` Diego Novillo
     [not found]     ` <20071205222948.GC24660@air.net.au>
2007-12-06 10:46       ` Rob Quill

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=67ea2eb0711290635y18cc131fh93fe9821ed9ca15d@mail.gmail.com \
    --to=ramana.r@gmail.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=richard.guenther@gmail.com \
    --cc=rob.quill@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).