This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] make has_gate and has_execute useless
- From: Paolo Bonzini <bonzini at gnu dot org>
- To: Richard Biener <richard dot guenther at gmail dot com>
- Cc: tsaunders at mozilla dot com, GCC Patches <gcc-patches at gcc dot gnu dot org>
- Date: Mon, 11 Nov 2013 18:41:22 +0100
- Subject: Re: [PATCH] make has_gate and has_execute useless
- Authentication-results: sourceware.org; auth=none
- References: <1383840050-26620-1-git-send-email-tsaunders at mozilla dot com> <CAFiYyc1HqbkhLkhLRkH3Pg3aZcQY5K3DQgN46sqx1VWnWTEoFA at mail dot gmail dot com>
Il 08/11/2013 10:37, Richard Biener ha scritto:
> /* If we have a gate, combine the properties that we could have with
> and without the pass being examined. */
> if (pass->has_gate)
> properties &= new_properties;
> else
> properties = new_properties;
>
> which I don't understand (and you just removed all properties handling there).
The properties argument to register_dump_files_1 is indeed dead code; it
is never used except to compute new_properties which is also dead
(because it is simply the argument in a recursive call).
I seem to recall it was needed back when pass->type didn't exist; it
used PROP_rtl to find whether a pass was tree or gimple, or something
like that. The above test and "&=" were needed for this to work at all
optimization levels, but I don't recall the details and as said above
it's all dead anyway.
The argument to register_dump_files is used. To remove it, one could
change all_*_passes from a pointer to a "dummy" pass, and set
properties_required in the initializer for the dummy pass.
Paolo