flow.c (mark_used_reg): Use reg_set_p to determine if a register was modified in...
authorRichard Henderson <rth@cygnus.com>
Sat, 8 Apr 2000 22:38:38 +0000 (15:38 -0700)
committerRichard Henderson <rth@gcc.gnu.org>
Sat, 8 Apr 2000 22:38:38 +0000 (15:38 -0700)
        * flow.c (mark_used_reg): Use reg_set_p to determine if a register
        was modified in the current insn.

From-SVN: r33030

gcc/ChangeLog
gcc/flow.c

index 87194541bedf48f8050579f12ce0a8c4b6f7666a..97c0cfa819fa49d7c8e08a2bf7d8604b5b73aa9c 100644 (file)
@@ -1,3 +1,8 @@
+2000-04-08  Richard Henderson  <rth@cygnus.com>
+
+       * flow.c (mark_used_reg): Use reg_set_p to determine if a register
+       was modified in the current insn.
+
 2000-04-08  Richard Earnshaw (rearnsha@arm.com)
 
        * arm/thumb.md: Delete.
index ea386232ea7bea821b3b63981722c4570cb76c66..e900617c9b2cf3d7f27620c6349b2ff57f257b70 100644 (file)
@@ -4520,11 +4520,17 @@ mark_used_reg (pbi, new_live, reg, cond, insn)
 
   /* Record and count the insns in which a reg dies.  If it is used in
      this insn and was dead below the insn then it dies in this insn.
+
      If it was set in this insn, we do not make a REG_DEAD note;
-     likewise if we already made such a note.  */
+     likewise if we already made such a note.  Recall that dead_or_set_p
+     checks for complete overlap, and thus is not suitable for the first
+     case.  But it does handle the existing note case.  Also recall that
+     reg_set_p, when presented with the complete insn, will try to infer
+     things about a call_insn that we do not wish.  */
 
   if ((pbi->flags & PROP_DEATH_NOTES)
       && some_was_dead
+      && ! reg_set_p (reg, PATTERN (insn))
       && ! dead_or_set_p (insn, reg))
     {
       int n;