OSDN Git Service

* except.c (can_throw_internal_1, can_throw_external_1): Add
[pf3gnuchains/gcc-fork.git] / gcc / bt-load.c
index 3a02177..47ac16a 100644 (file)
@@ -1,5 +1,5 @@
 /* Perform branch target register load optimizations.
-   Copyright (C) 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
+   Copyright (C) 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
 
 This file is part of GCC.
 
@@ -506,6 +506,22 @@ compute_defs_uses_and_gen (fibheap_t all_btr_defs, btr_def *def_array,
                  SET_BIT (btr_defset[regno - first_btr], insn_uid);
                  note_other_use_this_block (regno, info.users_this_bb);
                }
+             /* Check for the blockage emitted by expand_nl_goto_receiver.  */
+             else if (current_function_has_nonlocal_label
+                      && GET_CODE (PATTERN (insn)) == ASM_INPUT)
+               {
+                 btr_user user;
+
+                 /* Do the equivalent of calling note_other_use_this_block
+                    for every target register.  */
+                 for (user = info.users_this_bb; user != NULL;
+                      user = user->next)
+                   if (user->use)
+                     user->other_use_this_block = 1;
+                 IOR_HARD_REG_SET (info.btrs_written_in_block, all_btrs);
+                 IOR_HARD_REG_SET (info.btrs_live_in_block, all_btrs);
+                 sbitmap_zero (info.bb_gen);
+               }
              else
                {
                  if (btr_referenced_p (PATTERN (insn), NULL))
@@ -1008,7 +1024,7 @@ btr_def_live_range (btr_def def, HARD_REG_SET *btrs_live_in_range)
                            def->bb, user->bb,
                            (flag_btr_bb_exclusive
                             || user->insn != BB_END (def->bb)
-                            || GET_CODE (user->insn) != JUMP_INSN));
+                            || !JUMP_P (user->insn)));
     }
   else
     {
@@ -1072,7 +1088,7 @@ combine_btr_defs (btr_def def, HARD_REG_SET *btrs_live_in_range)
                                def->bb, user->bb,
                                (flag_btr_bb_exclusive
                                 || user->insn != BB_END (def->bb)
-                                || GET_CODE (user->insn) != JUMP_INSN));
+                                || !JUMP_P (user->insn)));
 
          btr = choose_btr (combined_btrs_live);
          if (btr != -1)