aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog6
-rw-r--r--gcc/config/sh/sh.c11
2 files changed, 15 insertions, 2 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 2a1eee8..91a8d5c 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,9 @@
+2005-05-14 Kaz Kojima <kkojima@gcc.gnu.org>
+
+ * config/sh/sh.c (sh_output_mi_thunk): Check cfun->cfg instead
+ of basic_block_info. Call init_flow and find_basic_blocks
+ before dbr_schedule if needed.
+
2005-05-14 Kazu Hirata <kazu@cs.umass.edu>
* tree-optimize.c (init_tree_optimization_passes): Move
diff --git a/gcc/config/sh/sh.c b/gcc/config/sh/sh.c
index d1fb0e2..41f6e72 100644
--- a/gcc/config/sh/sh.c
+++ b/gcc/config/sh/sh.c
@@ -10301,7 +10301,7 @@ sh_output_mi_thunk (FILE *file, tree thunk_fndecl ATTRIBUTE_UNUSED,
/* Initialize the bitmap obstacks. */
bitmap_obstack_initialize (NULL);
bitmap_obstack_initialize (&reg_obstack);
- if (! basic_block_info)
+ if (! cfun->cfg)
init_flow ();
rtl_register_cfg_hooks ();
find_basic_blocks (insns);
@@ -10315,7 +10315,14 @@ sh_output_mi_thunk (FILE *file, tree thunk_fndecl ATTRIBUTE_UNUSED,
sh_reorg ();
if (optimize > 0 && flag_delayed_branch)
- dbr_schedule (insns, dump_file);
+ {
+ if (! cfun->cfg)
+ {
+ init_flow ();
+ find_basic_blocks (insns);
+ }
+ dbr_schedule (insns, dump_file);
+ }
shorten_branches (insns);
final_start_function (insns, file, 1);
final (insns, file, 1);