sh.c (sh_output_mi_thunk): Initialize and clean up the minimal CFG stuff always when optimize > 0.

* config/sh/sh.c (sh_output_mi_thunk): Initialize and clean
	up the minimal CFG stuff always when optimize > 0.  Call
	split_all_insns_noflow in PIC case if needed.

From-SVN: r101546
This commit is contained in:
Kaz Kojima 2005-07-03 05:21:42 +00:00
parent 365ff3b926
commit 384a87604e
2 changed files with 24 additions and 13 deletions

View File

@ -1,3 +1,9 @@
2005-07-03 Kaz Kojima <kkojima@gcc.gnu.org>
* config/sh/sh.c (sh_output_mi_thunk): Initialize and clean
up the minimal CFG stuff always when optimize > 0. Call
split_all_insns_noflow in PIC case if needed.
2005-07-02 Gabriel Dos Reis <gdr@integrable-solutions.net>
Christian Ehrhardt <ehrhardt@mathematik.uni-ulm.de>

View File

@ -9619,7 +9619,7 @@ sh_output_mi_thunk (FILE *file, tree thunk_fndecl ATTRIBUTE_UNUSED,
insn_locators_initialize ();
insns = get_insns ();
if (optimize > 0 && flag_schedule_insns_after_reload)
if (optimize > 0)
{
/* Initialize the bitmap obstacks. */
bitmap_obstack_initialize (NULL);
@ -9627,31 +9627,36 @@ sh_output_mi_thunk (FILE *file, tree thunk_fndecl ATTRIBUTE_UNUSED,
if (! cfun->cfg)
init_flow ();
rtl_register_cfg_hooks ();
init_rtl_bb_info (ENTRY_BLOCK_PTR);
init_rtl_bb_info (EXIT_BLOCK_PTR);
ENTRY_BLOCK_PTR->flags |= BB_RTL;
EXIT_BLOCK_PTR->flags |= BB_RTL;
find_basic_blocks (insns);
life_analysis (dump_file, PROP_FINAL);
split_all_insns (1);
if (flag_schedule_insns_after_reload)
{
life_analysis (dump_file, PROP_FINAL);
schedule_insns (dump_file);
split_all_insns (1);
schedule_insns (dump_file);
}
/* We must split jmp insn in PIC case. */
else if (flag_pic)
split_all_insns_noflow ();
}
sh_reorg ();
if (optimize > 0 && flag_delayed_branch)
{
if (! cfun->cfg)
{
init_flow ();
find_basic_blocks (insns);
}
dbr_schedule (insns, dump_file);
}
dbr_schedule (insns, dump_file);
shorten_branches (insns);
final_start_function (insns, file, 1);
final (insns, file, 1);
final_end_function ();
if (optimize > 0 && flag_schedule_insns_after_reload)
if (optimize > 0)
{
/* Release all memory allocated by flow. */
free_basic_block_vars ();