This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] passes.c: handle register_pass with a name starting with a star
On Mon, Jul 12, 2010 at 1:39 AM, Basile Starynkevitch
<basile@starynkevitch.net> wrote:
> On Mon, 2010-07-12 at 01:03 +0800, Dennis, CHENG Renquan wrote:
>> The gcc included passes have the feature that a name starting with a start do
>> not dump anything; so should the plugin registered passes have.
>
> I agree with the patch (but I am not authorized to OK it). However, I
> strongly believe that we should specifically document that plugin
> registered passes should have a name, and that a name starting with a
> And I would rather have the plugin pass registration code check that the
> newly inserted plugin pass does have a name, (& probably either a gate
> or an exec function, etc.).
It really already has, inside register_pass (passes.c), the entry for
all plugin registered passes:
void
register_pass (struct register_pass_info *pass_info)
{
bool all_instances, success;
/* The checks below could fail in buggy plugins. Existing GCC
passes should never fail these checks, so we mention plugin in
the messages. */
if (!pass_info->pass)
fatal_error ("plugin cannot register a missing pass");
if (!pass_info->pass->name)
fatal_error ("plugin cannot register an unnamed pass");
If pass doesn't have a name, it would exit with fatal_error;
> star don't have any dump files. AFAIK, nothing is clearly written in
> http://gcc.gnu.org/onlinedocs/gccint/Plugins.html
The real problem should be the documentation, I should have another
patch to document plugin registered pass (passes.texi);
>
> Cheers.
> --
> 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 mine, sont seulement les miennes} ***