This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: Restore ia64 (and possibly darwin) thunks
- From: "Richard Guenther" <richard dot guenther at gmail dot com>
- To: "Jan Hubicka" <jh at suse dot cz>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Thu, 3 Apr 2008 10:23:59 +0100
- Subject: Re: Restore ia64 (and possibly darwin) thunks
- References: <20080403060835.GR30204@kam.mff.cuni.cz>
On Thu, Apr 3, 2008 at 7:08 AM, Jan Hubicka <jh@suse.cz> wrote:
> Hi,
> the sanity check that RTL world is not initialized multiple time without
> finishing the work first I added into the start_function is now hitting
> on ia64 and apparently darwin too when emitting thunks.
> The following patch fix it by adding the free calls. I've added it to
> all backends containing same piece of code in output_mi_thunk since
> apparently they are all affected.
>
> Tested on ia64-linux, OK?
Ok.
Thanks,
Richard.
> Honza
>
> PR tree-optimization/35795
> * alpha/alpha.c (alpha_output_mi_thunk_osf): Free after compilation.
> * sparc/sparc.c (sparc_output_mi_thunk): Likewise.
> * sh/sh.c (sh_output_mi_thunk): Likewise.
> * ia64/ia64.c (ia64_output_mi_thunk): Likewise.
> * m68k/m68k.c (m68k_output_mi_thunk): Likewise.
> * score/score3.c (score3_output_mi_thunk): Likewise.
> * score/score7.c (score7_output_mi_thunk): Likewise.
> * mips/mips.c (mips_output_mi_thunk): Likewise.
> Index: config/alpha/alpha.c
> ===================================================================
> *** config/alpha/alpha.c (revision 133861)
> --- config/alpha/alpha.c (working copy)
> *************** alpha_output_mi_thunk_osf (FILE *file, t
> *** 8339,8344 ****
> --- 8339,8345 ----
> final_start_function (insn, file, 1);
> final (insn, file, 1);
> final_end_function ();
> + free_after_compilation (cfun);
> }
> #endif /* TARGET_ABI_OSF */
>
> Index: config/sparc/sparc.c
> ===================================================================
> *** config/sparc/sparc.c (revision 133861)
> --- config/sparc/sparc.c (working copy)
> *************** sparc_output_mi_thunk (FILE *file, tree
> *** 8818,8823 ****
> --- 8818,8824 ----
> final_start_function (insn, file, 1);
> final (insn, file, 1);
> final_end_function ();
> + free_after_compilation (cfun);
>
> reload_completed = 0;
> epilogue_completed = 0;
> Index: config/sh/sh.c
> ===================================================================
> *** config/sh/sh.c (revision 133861)
> --- config/sh/sh.c (working copy)
> *************** sh_output_mi_thunk (FILE *file, tree thu
> *** 10513,10518 ****
> --- 10513,10519 ----
> final_start_function (insns, file, 1);
> final (insns, file, 1);
> final_end_function ();
> + free_after_compilation (cfun);
>
> reload_completed = 0;
> epilogue_completed = 0;
> Index: config/ia64/ia64.c
> ===================================================================
> *** config/ia64/ia64.c (revision 133861)
> --- config/ia64/ia64.c (working copy)
> *************** ia64_output_mi_thunk (FILE *file, tree t
> *** 9694,9699 ****
> --- 9694,9700 ----
> final_start_function (insn, file, 1);
> final (insn, file, 1);
> final_end_function ();
> + free_after_compilation (cfun);
>
> reload_completed = 0;
> epilogue_completed = 0;
> Index: config/m68k/m68k.c
> ===================================================================
> *** config/m68k/m68k.c (revision 133861)
> --- config/m68k/m68k.c (working copy)
> *************** m68k_output_mi_thunk (FILE *file, tree t
> *** 4348,4353 ****
> --- 4348,4354 ----
> /* Restore the original PIC register. */
> if (flag_pic)
> SET_REGNO (pic_offset_table_rtx, PIC_REG);
> + free_after_compilation (cfun);
> }
>
> /* Worker function for TARGET_STRUCT_VALUE_RTX. */
> Index: config/score/score3.c
> ===================================================================
> *** config/score/score3.c (revision 133861)
> --- config/score/score3.c (working copy)
> *************** score3_output_mi_thunk (FILE *file, tree
> *** 382,387 ****
> --- 382,388 ----
> final_start_function (insn, file, 1);
> final (insn, file, 1);
> final_end_function ();
> + free_after_compilation (cfun);
>
> /* Clean up the vars set above. Note that final_end_function resets
> the global pointer for us. */
> Index: config/score/score7.c
> ===================================================================
> *** config/score/score7.c (revision 133861)
> --- config/score/score7.c (working copy)
> *************** score7_output_mi_thunk (FILE *file, tree
> *** 381,386 ****
> --- 381,387 ----
> final_start_function (insn, file, 1);
> final (insn, file, 1);
> final_end_function ();
> + free_after_compilation (cfun);
>
> /* Clean up the vars set above. Note that final_end_function resets
> the global pointer for us. */
> Index: config/mips/mips.c
> ===================================================================
> *** config/mips/mips.c (revision 133861)
> --- config/mips/mips.c (working copy)
> *************** mips_output_mi_thunk (FILE *file, tree t
> *** 11685,11690 ****
> --- 11685,11691 ----
> final_start_function (insn, file, 1);
> final (insn, file, 1);
> final_end_function ();
> + free_after_compilation (cfun);
>
> /* Clean up the vars set above. Note that final_end_function resets
> the global pointer for us. */
>