From c6a26dc45d18eb53a4e10b31e3514c4d2ae2208c Mon Sep 17 00:00:00 2001 From: Jeffrey A Law Date: Sat, 11 Apr 1998 00:28:07 +0000 Subject: 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 --- gcc/cse.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'gcc/cse.c') 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; { -- cgit v1.1