OSDN Git Service

PR rtl-optimization/20769:
authoramylaar <amylaar@138bc75d-0d04-0410-961f-82ee72b054a4>
Fri, 13 May 2005 16:56:11 +0000 (16:56 +0000)
committeramylaar <amylaar@138bc75d-0d04-0410-961f-82ee72b054a4>
Fri, 13 May 2005 16:56:11 +0000 (16:56 +0000)
* bt-load.c (compute_defs_uses_and_gen): Check for the blockage
pattern emitted by expand_nl_goto_receiver.

PR middle-end/20793:
* integrate.c (allocate_initial_values): Update register liveness
information.

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

gcc/ChangeLog
gcc/bt-load.c
gcc/integrate.c

index a6034e2..eff05d4 100644 (file)
@@ -1,3 +1,13 @@
+2005-05-13  J"orn Rennecke <joern.rennecke@st.com>
+
+       PR rtl-optimization/20769:
+       * bt-load.c (compute_defs_uses_and_gen): Check for the blockage
+       pattern emitted by expand_nl_goto_receiver.
+
+       PR middle-end/20793:
+       * integrate.c (allocate_initial_values): Update register liveness
+       information.
+
 2005-05-13  Josh Conner  <jconner@apple.com>
 
        * arm.c (arm_return_in_memory): Add handling for vector return types.
index c8c9412..47ac16a 100644 (file)
@@ -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))
index 86bb875..3573b44 100644 (file)
@@ -392,11 +392,23 @@ allocate_initial_values (rtx *reg_equiv_memory_loc ATTRIBUTE_UNUSED)
            reg_equiv_memory_loc[regno] = x;
          else
            {
+             basic_block bb;
+             int new_regno;
+
              gcc_assert (REG_P (x));
-             reg_renumber[regno] = REGNO (x);
+             new_regno = REGNO (x);
+             reg_renumber[regno] = new_regno;
              /* Poke the regno right into regno_reg_rtx so that even
                 fixed regs are accepted.  */
-             REGNO (ivs->entries[i].pseudo) = REGNO (x);
+             REGNO (ivs->entries[i].pseudo) = new_regno;
+             /* Update global register liveness information.  */
+             FOR_EACH_BB (bb)
+               {
+                 if (REGNO_REG_SET_P(bb->global_live_at_start, regno))
+                   SET_REGNO_REG_SET (bb->global_live_at_start, new_regno);
+                 if (REGNO_REG_SET_P(bb->global_live_at_end, regno))
+                   SET_REGNO_REG_SET (bb->global_live_at_end, new_regno);
+               }
            }
        }
     }