OSDN Git Service

* config/sh/sh.c (sh_output_mi_thunk): Check cfun->cfg instead
authorkkojima <kkojima@138bc75d-0d04-0410-961f-82ee72b054a4>
Sun, 15 May 2005 02:02:58 +0000 (02:02 +0000)
committerkkojima <kkojima@138bc75d-0d04-0410-961f-82ee72b054a4>
Sun, 15 May 2005 02:02:58 +0000 (02:02 +0000)
of basic_block_info.  Call init_flow and find_basic_blocks
before dbr_schedule if needed.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@99710 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/ChangeLog
gcc/config/sh/sh.c

index 2a1eee8..91a8d5c 100644 (file)
@@ -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
index d1fb0e2..41f6e72 100644 (file)
@@ -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);