This is the mail archive of the 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: Postpone expanding va_arg until pass_stdarg

On 10-02-15 14:46, Richard Biener wrote:
This patch is a way to achieve that gimplification doesn't call the actual
>gimplify_expr langhook, and it fixes the failure. But I'm guessing that's
>not the proper way to fix this.
More like

Index: gcc/tree.c
--- gcc/tree.c  (revision 220578)
+++ gcc/tree.c  (working copy)
@@ -5815,6 +5815,7 @@ free_lang_data (void)
       still be used indirectly via the get_alias_set langhook.  */
    lang_hooks.dwarf_name = lhd_dwarf_name;
    lang_hooks.decl_printable_name = gimple_decl_printable_name;
+  lang_hooks.gimplify_expr = lhd_gimplify_expr;
    /* We do not want the default decl_assembler_name implementation,
       rather if we have fixed everything we want a wrapper around it
       asserting that all non-local symbols already got their assembler

That worked, and allowed me to do a bootstrap on x86_64 for all languages and regtest for unix/ and unix/-m32 without any issues (other than scan-dump-tree failures for stdarg, since the va_list_gpr/fpr_size optimization is switched off).

That leaves just teaching the va_list_gpr/fpr_size optimization to recognize ifn_va_arg.

- Tom

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