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: [plugins] RFA: Merge plugins into mainline [3/5 - ME]


On Fri, Apr 3, 2009 at 02:39, Richard Guenther <rguenther@suse.de> wrote:

> Looks good apart from that new command line options need documenting
> in doc/invoke.texi.

Done.  I moved the API documentation to doc/plugins.texi as well.

> *** WARNING *** your compiler uses plugins, do not report this
> bug but reproduce it without using plugins
>
> (maybe even omit the 'Please submit a full bug report, ...' part if
> plugins are used)

Done.


> On Fri, Apr 3, 2009 at 06:58, Ian Lance Taylor <iant@google.com> wrote:
>
> Diego Novillo <dnovillo@google.com> writes:
>
> > 2009-04-02  Le-Chun Wu  <lcwu@google.com>
> >
> >       * tree-pass.h (register_one_dump_file): Add a prototype for
> >       register_one_dump_file.
> >       * toplev.c (compile_file): Call initialize_plugins.
> >       (do_compile): Call invoke_plugin_callbacks.
> >       (toplev_main): Call invoke_plugin_callbacks.
> >       * opts.c (common_handle_option): Handle OPT_fplugin_ and
> >       OPT_fplugin_arg_.
> >       * common.opt: Add -fplugin= and -fplugin-arg-.
> >       * gcc-plugin.h: New public header file for plugins to include.
> >       * plugin.c: New source file.
> >       * plugin.h: New internal header file.
> >       * passes.c (register_one_dump_file): Make it external.
>
>
> > +#include "errors.h"
> > +#include "toplev.h"
>
> It doesn't make sense to include both "errors.h" and "toplev.h".
> "errors.h" declares error() and friends for use in programs which are
> not linked with the diagnostic machinery--e.g., genattrtab.  "toplev.h"
> is for programs which are linked with the gcc middle-end.

Done.


> I don't think you need G_ here.  You only need that for strings which
> are passed indirectly to error.

Done.

> You don't have to do it now, but I would like to permit backends to
> register their own passes.  That suggests that most of this code should
> move to tree-pass.c.

Good idea.  Will implement in follow-up patches.

> Have the error message say which callback was not registered, at least
> as an index.

Done.

> +void
> +invoke_plugin_callbacks (enum plugin_event event, void *gcc_data)
>
> How about a new timevar for all plugin activity?  We would want to use
> it here and in initialize_plugins.  Plugins which want more
> sophisticated control can do their own timevar manipulation.

Done.

New patch attached (lightly tested).  After I finish addressing
the review for the configury bits, I will post a final patch for
the whole merge.


Diego.

Attachment: 20090409-me.diff.txt
Description: Text document


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