This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Scripted pass manager


On Nov 30, 2007 3:02 PM, Rob Quill <rob.quill@gmail.com> wrote:
> On 29/11/2007, 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.
>
> 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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]