This is the mail archive of the
mailing list for the GCC project.
Proposed plugin API for GCC
- From: David Malcolm <dmalcolm at redhat dot com>
- To: gcc at gcc dot gnu dot org
- Date: Thu, 29 Mar 2012 16:58:07 -0400
- Subject: Proposed plugin API for GCC
I had a go at writing a possible plugin API for GCC, and porting parts
of my python plugin to it:
It's very much at the "crude early prototype" stage - all I've wrapped
is part of CFG-handling - but the important thing is that python plugin
*does* actually compile against this, and many of its selftests still
pass (though I'm breaking the self-imposed encapsulation in quite a few
places in order to get it to compile).
The code is currently jointly owned by me and Red Hat; I'm sure we can
do copyright assignment if/when it comes to that.
You can see the work-in-progress in the "proposed-plugin-api" branch of
For example, the proposed public header file looks like this:
For example, some design notes can be seen at:
How do other plugin authors feel about the API?
How do GCC subsystem maintainers feel?
I initially attempted an underscore_based_naming_convention but quickly
found it difficult to get concise function names, so I switched to a
CamelCaseBased_NamingConvention with an underscore separating a notional
namespace element from a secondary element, which saved plenty of space.
The different naming convention also serves to highlight that this is
*not* part of GCC's internals.
Hope this is constructive