aboutsummaryrefslogtreecommitdiff
path: root/gcc/cse.c
diff options
context:
space:
mode:
authorJeffrey A Law <law@cygnus.com>1998-04-11 00:28:07 +0000
committerJeff Law <law@gcc.gnu.org>1998-04-10 18:28:07 -0600
commitc6a26dc45d18eb53a4e10b31e3514c4d2ae2208c (patch)
tree1b6526c46b39473c92ee7cd2b70a7e002cbcfd90 /gcc/cse.c
parent112bd748e3ff5bc3ae7010d8f233056b5c278cfd (diff)
downloadgcc-c6a26dc45d18eb53a4e10b31e3514c4d2ae2208c.zip
gcc-c6a26dc45d18eb53a4e10b31e3514c4d2ae2208c.tar.gz
gcc-c6a26dc45d18eb53a4e10b31e3514c4d2ae2208c.tar.bz2
cse.c (count_reg_usage): Correctly handle REG_NONNEG notes.
* cse.c (count_reg_usage): Correctly handle REG_NONNEG notes. (delete_trivially_dead_insns): Renamed from delete_dead_from_cse. * toplev.c (rest_of_compilation): Call delete_trivially_dead_insns instead of delete_dead_from_cse. Also call delete_trivially_dead_insns between loop optimization passes. * rtl.h: Updated appropriately. From-SVN: r19100
Diffstat (limited to 'gcc/cse.c')
-rw-r--r--gcc/cse.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/gcc/cse.c b/gcc/cse.c
index 990ef5f..19a02ef 100644
--- a/gcc/cse.c
+++ b/gcc/cse.c
@@ -8731,7 +8731,7 @@ count_reg_usage (x, counts, dest, incr)
case EXPR_LIST:
case INSN_LIST:
if (REG_NOTE_KIND (x) == REG_EQUAL
- || GET_CODE (XEXP (x,0)) == USE)
+ || (REG_NOTE_KIND (x) != REG_NONNEG && GET_CODE (XEXP (x,0)) == USE))
count_reg_usage (XEXP (x, 0), counts, NULL_RTX, incr);
count_reg_usage (XEXP (x, 1), counts, NULL_RTX, incr);
return;
@@ -8754,13 +8754,13 @@ count_reg_usage (x, counts, dest, incr)
/* Scan all the insns and delete any that are dead; i.e., they store a register
that is never used or they copy a register to itself.
- This is used to remove insns made obviously dead by cse. It improves the
- heuristics in loop since it won't try to move dead invariants out of loops
- or make givs for dead quantities. The remaining passes of the compilation
- are also sped up. */
+ This is used to remove insns made obviously dead by cse, loop or other
+ optimizations. It improves the heuristics in loop since it won't try to
+ move dead invariants out of loops or make givs for dead quantities. The
+ remaining passes of the compilation are also sped up. */
void
-delete_dead_from_cse (insns, nreg)
+delete_trivially_dead_insns (insns, nreg)
rtx insns;
int nreg;
{