This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Progress on GCC plugins ?
Andrew Haley wrote:
Well, that's where we differ. I don't at all understand how adding
plugins won't make it very much easier. It seems obvious to me that
if there is a reasonably well-defined plugin architecture it will be
vastly easier to export data from gcc's front-ends to a proprietary
compiler. It is entirely beyond my understanding why this isn't also
obvious to you.
I beg to disagree. Exporting GCC data outside makes practical sense if
the data is somehow stable (e.g. from one version of GCC to the next).
But a plugin mechanism does not require any stability of any sort. And
the current internal representations are not (in my view) stable (and
this is good, I am not criticizing GCC here) in the same sense that the
accepted languages & GCC options are stable.
For example, the "simple" plugin mechanism many people have implicitly
in mind is just: something give you the ability to call a dlsymed
function inside a dlopened plugin as a pass in a defined (& fixed)
position in passes.c. I tend to believe it is not that difficult to
implement (it seems to me that the issue is to get it accepted in the
trunk). However, this does not guaranty at all that all the internal
representation (e.g. the tree.h and other header files) is stable.
In other words, such a plugin yourplugin.so (which you coded for future
gcc-4.4.3) might be usable from gcc 4.4.3 but not from gcc 4.4.5, and
probably not from gcc-4.5 and certainly not from gcc-5.x
I'm probably naive, but I think that there are enough incentives (both
technical compatibility as above, also legal requirements per GPL, and
community & ethical standards of free software at large) that the author
of the plugin has interest to publish his source under GPL together with
the yourplugin.so file.
So a well defined plugin architecture does not mean any stability of
internal representations (in their binary detail) or of the many GIMPLE
transformations....
Regards.
--
Basile STARYNKEVITCH http://starynkevitch.net/Basile/
email: basile<at>starynkevitch<dot>net mobile: +33 6 8501 2359
8, rue de la Faiencerie, 92340 Bourg La Reine, France
*** opinions {are only mines, sont seulement les miennes} ***