sh.c (split_branches): Check the result of next_active_insn.
authorKaz Kojima <kkojima@gcc.gnu.org>
Wed, 18 Aug 2004 12:24:16 +0000 (12:24 +0000)
committerKaz Kojima <kkojima@gcc.gnu.org>
Wed, 18 Aug 2004 12:24:16 +0000 (12:24 +0000)
* config/sh/sh.c (split_branches): Check the result of
next_active_insn.
(sh_output_mi_thunk): Call init_flow if basic_block_info is null.
Call rtl_register_cfg_hooks.

From-SVN: r86181

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

index 1a88c7f441be37d32bbe4bccacd8c17ec7471d44..a16eabf0f0787b911959305f30f7a001062b3dd0 100644 (file)
@@ -1,3 +1,10 @@
+2004-08-18  Kaz Kojima  <kkojima@gcc.gnu.org>
+
+       * config/sh/sh.c (split_branches): Check the result of
+       next_active_insn.
+       (sh_output_mi_thunk): Call init_flow if basic_block_info is null.
+       Call rtl_register_cfg_hooks.
+
 2004-08-18  Richard Henderson  <rth@redhat.com>
 
        * rtl.h (MEM_READONLY_P): Replace RTX_UNCHANGING_P.
index 6b72e491288cc32da30b64853ef633cde651140b..950b096be602788588864d8855ee9a2462f1f6a9 100644 (file)
@@ -4598,7 +4598,8 @@ split_branches (rtx first)
            next = next_active_insn (insn);
 
            if ((GET_CODE (next) == JUMP_INSN
-                || GET_CODE (next = next_active_insn (next)) == JUMP_INSN)
+                || ((next = next_active_insn (next))
+                    && GET_CODE (next) == JUMP_INSN))
                && GET_CODE (PATTERN (next)) == SET
                && recog_memoized (next) == CODE_FOR_jump_compact
                && ((INSN_ADDRESSES
@@ -9726,6 +9727,9 @@ sh_output_mi_thunk (FILE *file, tree thunk_fndecl ATTRIBUTE_UNUSED,
 
   if (optimize > 0 && flag_schedule_insns_after_reload)
     {
+      if (! basic_block_info)
+       init_flow ();
+      rtl_register_cfg_hooks ();
       find_basic_blocks (insns, max_reg_num (), dump_file);
       life_analysis (dump_file, PROP_FINAL);