This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Progress on GCC plugins ?
- From: Alexandre Oliva <aoliva at redhat dot com>
- To: Gabriel Dos Reis <gdr at cs dot tamu dot edu>
- Cc: "Dep\, Khushil \(GE Money\)" <Khushil dot Dep at ge dot com>, "David Edelsohn" <dje at watson dot ibm dot com>, "Andrew Haley" <aph at redhat dot com>, "Ian Lance Taylor" <iant at google dot com>, "Richard Kenner" <kenner at vlsi1 dot ultra dot nyu dot edu>, <dnovillo at google dot com>, <Joe dot Buck at synopsys dot com>, <fleury at labri dot fr>, <gcc at gcc dot gnu dot org>
- Date: Sat, 24 Nov 2007 19:46:46 -0200
- Subject: Re: Progress on GCC plugins ?
- References: <47317545.2070708@labri.fr> <20071107164101.GB4550@synopsys.com> <473C9F4E.5090402@google.com> <10711152024.AA00627@vlsi1.ultra.nyu.edu> <m3r6irryg4.fsf@localhost.localdomain> <18236.49757.881704.165655@zebedee.pink> <m3mytfrutb.fsf@localhost.localdomain> <18237.25889.543937.924615@zebedee.pink> <m3oddup4vp.fsf@localhost.localdomain> <18237.49248.609704.541703@zebedee.pink> <m3bq9up3ed.fsf@localhost.localdomain> <18237.51292.763097.467863@zebedee.pink> <200711161658.lAGGwMoq031400@makai.watson.ibm.com> <D5C95A553071344EBDB133B851C31DDE4EF582@LONMLVEM07.e2k.ad.ge.com> <87d4u9fv90.fsf@soliton.cs.tamu.edu>
On Nov 17, 2007, Gabriel Dos Reis <gdr@cs.tamu.edu> wrote:
> I had no trouble getting students up to spead on well-structured
> plugable proprietary compiler within weeks. However, the same
> experience on GCC has proven much less impressive results.
> Consequently, we have been making more progress working with
> proprietary compiler than with GCC -- something I find myself
> embarrasing :-(
That's sad, but adding to GCC the ability to support plugins (I assume
this is about dynamically-loaded GCC passes) won't change this at all.
The thing that people have historically found difficult in getting
started with GCC is that there was a lot of infrastructure that didn't
follow the patterns and algorithms found in compiler literature. This
has changed a bit with the Tree-SSA infrastructure, not only because
SSA and GIMPLE-like representations are commonplace, but also because
there aren't as many inter-dependencies and implicit assumptions
between passes as there used to be with RTL.
But it's still true that one has to learn a lot about GCC internals
before one can write a new RTL pass, and even a new Tree-SSA pass.
Merely introducing means for people to dynamically load passes won't
change this. Only designing a plugin API that hides a lot of GCC's
internal complexity, while still making room for useful experiments,
would make this plugin API useful to address this problem.
But then, this is much harder than just adding plugin support, and I'm
familiar with any actual proposals that would address the underlying
problem.
And then, once the underlying problem is addressed and we have an API
that is usable by regular users, maybe we will find out that we don't
need plugins, after all. That, as Diego and Ian say, adding plugin
support is trivial, but I'm pretty sure that's not where the actual
problem lies.
--
Alexandre Oliva http://www.lsd.ic.unicamp.br/~oliva/
FSF Latin America Board Member http://www.fsfla.org/
Red Hat Compiler Engineer aoliva@{redhat.com, gcc.gnu.org}
Free Software Evangelist oliva@{lsd.ic.unicamp.br, gnu.org}