From 384a87604e25dc3f2874a3e1db97cf8e8303aafb Mon Sep 17 00:00:00 2001 From: Kaz Kojima Date: Sun, 3 Jul 2005 05:21:42 +0000 Subject: [PATCH] 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 --- gcc/ChangeLog | 6 ++++++ gcc/config/sh/sh.c | 31 ++++++++++++++++++------------- 2 files changed, 24 insertions(+), 13 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 3ef3f08..37d4105 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2005-07-03 Kaz Kojima + + * 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 Christian Ehrhardt diff --git a/gcc/config/sh/sh.c b/gcc/config/sh/sh.c index 300c104..6e8e299 100644 --- a/gcc/config/sh/sh.c +++ b/gcc/config/sh/sh.c @@ -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); + + split_all_insns (1); - schedule_insns (dump_file); + 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 (); -- 2.7.4