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: RFA: more plugin header files; pass list list


On Sat, Dec 19, 2009 at 12:37 AM, Joern Rennecke <amylaar@spamcop.net> wrote:
> Quoting Richard Guenther <richard.guenther@gmail.com>:
>>
>> But I don't see how the enum is useful on its own?
>
> The variable can live in the plugin for now; when the cc1 executable
> gets another definition in 4.6, the cc1 definition will prevail.
>
> In ici/ici.c I got this code:
>
> /* ??? current_pass is not valid during summary passes, therefore we need
> ? separate wrapper functions for every pass list. ?*/
> #define DEF_PASS_LIST(LIST) \
> static void \
> wrap_generate_summary_##LIST (void) \
> { \
> ?execute_ipa_summary_passes \
> ? ?((struct ipa_opt_pass_d *)
> ici_wrap_passes[PASS_LIST_NO_##LIST].pass.sub); \
> } \
> \
> static void \
> wrap_write_summary_##LIST (cgraph_node_set set) \
> { \
> ?struct opt_pass *pass = ici_wrap_passes[PASS_LIST_NO_##LIST].pass.sub; \
> \
> ?do \
> ? ?((struct ipa_opt_pass_d *) pass)->write_summary (set); \
> ?while ((pass = pass->next)); \
> }
> GCC_PASS_LISTS
> #undef DEF_PASS_LIST
>
> #define DEF_PASS_LIST(LIST) \
> { \
> ?{ \
> ? ?IPA_PASS, \
> ? ?ICI_WRAP_PREFIX #LIST, /* name */ \
> ? ?NULL, ? ? ? ? ? ? ? ? ?/* gate */ \
> ? ?wrap_ipa_execute, ? ? ?/* execute */ \
> ?}, \
> ?wrap_generate_summary_##LIST, /* generate_summary */ \
> ?wrap_write_summary_##LIST, ? ?/* write_summary */ \
> },
> static struct ipa_opt_pass_d ici_wrap_passes[] = { GCC_PASS_LISTS };
> #undef DEF_PASS_LIST
>
>> ?I'd not worry about
>> the TOC limit.
>
> So are you saying we could still add the variable to passes.c for gcc 4.5 ?

Yes.  Can you post a complete patch?

Thanks,
Richard.


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