combine.c (distribute_notes): Move set of need_refresh for noop_move_p down to catch...
authorRichard Henderson <rth@redhat.com>
Tue, 24 Jul 2001 21:39:19 +0000 (14:39 -0700)
committerRichard Henderson <rth@gcc.gnu.org>
Tue, 24 Jul 2001 21:39:19 +0000 (14:39 -0700)
        * combine.c (distribute_notes): Move set of need_refresh
        for noop_move_p down to catch all cases.

From-SVN: r44317

gcc/ChangeLog
gcc/combine.c

index 1926e4de1774bf96090ddf37fca71a84cc1b7684..03e3de4ca9b1d02ae69262846afa945ed403e48c 100644 (file)
@@ -1,3 +1,8 @@
+2001-07-24  Richard Henderson  <rth@redhat.com>
+
+       * combine.c (distribute_notes): Move set of need_refresh
+       for noop_move_p down to catch all cases.
+
 Tue Jul 24 20:32:44 CEST 2001  Jan Hubicka  <jh@suse.cz>
 
        * recog.c (split_all_insns_noflow): New.
index 633d0acfd70036d508d219bc6e8a2d113ea45102..657a929616ff78df71ed816e4a92043d8ac89102 100644 (file)
@@ -12335,16 +12335,10 @@ distribute_notes (notes, from_insn, i3, i2, elim_i2, elim_i1)
                 is still a REG_DEAD note, but we have hit the beginning
                 of the block.  If the existing life info says the reg
                 was dead, there's nothing left to do.  Otherwise, we'll
-                need to do a global life update after combine.  
-              
-                Similary we need to update in case insn is an dead set
-                we are about to remove soon.
-              */
-             if (REG_NOTE_KIND (note) == REG_DEAD
-                 && ((place && noop_move_p (place))
-                     || (place == 0
-                         && REGNO_REG_SET_P (bb->global_live_at_start,
-                                              REGNO (XEXP (note, 0))))))
+                need to do a global life update after combine.  */
+             if (REG_NOTE_KIND (note) == REG_DEAD && place == 0
+                 && REGNO_REG_SET_P (bb->global_live_at_start,
+                                     REGNO (XEXP (note, 0))))
                {
                  SET_BIT (refresh_blocks, this_basic_block);
                  need_refresh = 1;
@@ -12361,6 +12355,15 @@ distribute_notes (notes, from_insn, i3, i2, elim_i2, elim_i1)
            {
              unsigned int regno = REGNO (XEXP (note, 0));
 
+             /* Similarly, if the instruction on which we want to place
+                the note is a noop, we'll need do a global live update
+                after we remove them in delete_noop_moves.  */
+             if (noop_move_p (place))
+               {
+                 SET_BIT (refresh_blocks, this_basic_block);
+                 need_refresh = 1;
+               }
+
              if (dead_or_set_p (place, XEXP (note, 0))
                  || reg_bitfield_target_p (XEXP (note, 0), PATTERN (place)))
                {