diff options
author | Kaz Kojima <kkojima@gcc.gnu.org> | 2005-07-03 05:21:42 +0000 |
---|---|---|
committer | Kaz Kojima <kkojima@gcc.gnu.org> | 2005-07-03 05:21:42 +0000 |
commit | 384a87604e25dc3f2874a3e1db97cf8e8303aafb (patch) | |
tree | e19a81cd06f8aaeeda2146256450b72d5549e393 /gcc | |
parent | 365ff3b926415e416da5fc0ab9b31a17ec52275f (diff) | |
download | gcc-384a87604e25dc3f2874a3e1db97cf8e8303aafb.zip gcc-384a87604e25dc3f2874a3e1db97cf8e8303aafb.tar.gz gcc-384a87604e25dc3f2874a3e1db97cf8e8303aafb.tar.bz2 |
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
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 6 | ||||
-rw-r--r-- | 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 <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> 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 (); |