From 65b98a022fdda037209cd946c833e74fca928b86 Mon Sep 17 00:00:00 2001 From: John Wehle Date: Wed, 14 Jun 2000 07:41:57 +0000 Subject: [PATCH] ifcvt.c (EDGE_COMPLEX): Move definition ... * ifcvt.c (EDGE_COMPLEX): Move definition ... * basic-block.h (EDGE_COMPLEX): ... here. * loop.c (check_dbra_loop): Specify the register when generating REG_NONNEG notes and don't generate duplicates. From-SVN: r34542 --- gcc/ChangeLog | 8 ++++++++ gcc/basic-block.h | 2 ++ gcc/ifcvt.c | 2 -- gcc/loop.c | 16 +++++++++------- 4 files changed, 19 insertions(+), 9 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index a62f254..969d873 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,11 @@ +Wed Jun 14 03:39:58 EDT 2000 John Wehle (john@feith.com) + + * ifcvt.c (EDGE_COMPLEX): Move definition ... + * basic-block.h (EDGE_COMPLEX): ... here. + + * loop.c (check_dbra_loop): Specify the register when + generating REG_NONNEG notes and don't generate duplicates. + 2000-06-13 Jakub Jelinek * tree.h (TYPE_USER_ALIGN, DECL_USER_ALIGN): Define. diff --git a/gcc/basic-block.h b/gcc/basic-block.h index df170c0..633bdaf 100644 --- a/gcc/basic-block.h +++ b/gcc/basic-block.h @@ -138,6 +138,8 @@ typedef struct edge_def { #define EDGE_EH 16 #define EDGE_FAKE 32 +#define EDGE_COMPLEX (EDGE_ABNORMAL | EDGE_ABNORMAL_CALL | EDGE_EH) + /* Basic block information indexed by block number. */ typedef struct basic_block_def { diff --git a/gcc/ifcvt.c b/gcc/ifcvt.c index 4e803ce..54ad8a7 100644 --- a/gcc/ifcvt.c +++ b/gcc/ifcvt.c @@ -51,8 +51,6 @@ #define MAX_CONDITIONAL_EXECUTE (BRANCH_COST + 1) #endif -#define EDGE_COMPLEX (EDGE_ABNORMAL | EDGE_ABNORMAL_CALL | EDGE_EH) - #define NULL_EDGE ((struct edge_def *)NULL) #define NULL_BLOCK ((struct basic_block_def *)NULL) diff --git a/gcc/loop.c b/gcc/loop.c index 0e9d56c..066ef93 100644 --- a/gcc/loop.c +++ b/gcc/loop.c @@ -7835,9 +7835,10 @@ check_dbra_loop (loop, insn_count) % (-INTVAL (bl->biv->add_val))) == 0) { /* register always nonnegative, add REG_NOTE to branch */ - REG_NOTES (PREV_INSN (loop_end)) - = gen_rtx_EXPR_LIST (REG_NONNEG, NULL_RTX, - REG_NOTES (PREV_INSN (loop_end))); + if (! find_reg_note (jump, REG_NONNEG, NULL_RTX)) + REG_NOTES (jump) + = gen_rtx_EXPR_LIST (REG_NONNEG, bl->biv->dest_reg, + REG_NOTES (jump)); bl->nonneg = 1; return 1; @@ -7860,9 +7861,10 @@ check_dbra_loop (loop, insn_count) && ! reg_set_between_p (bl->biv->dest_reg, p, loop_start) && INTVAL (bl->biv->add_val) == -1) { - REG_NOTES (PREV_INSN (loop_end)) - = gen_rtx_EXPR_LIST (REG_NONNEG, NULL_RTX, - REG_NOTES (PREV_INSN (loop_end))); + if (! find_reg_note (jump, REG_NONNEG, NULL_RTX)) + REG_NOTES (jump) + = gen_rtx_EXPR_LIST (REG_NONNEG, bl->biv->dest_reg, + REG_NOTES (jump)); bl->nonneg = 1; return 1; @@ -8260,7 +8262,7 @@ check_dbra_loop (loop, insn_count) /* Increment of LABEL_NUSES done above. */ /* Register is now always nonnegative, so add REG_NONNEG note to the branch. */ - REG_NOTES (tem) = gen_rtx_EXPR_LIST (REG_NONNEG, NULL_RTX, + REG_NOTES (tem) = gen_rtx_EXPR_LIST (REG_NONNEG, reg, REG_NOTES (tem)); } bl->nonneg = 1; -- 2.7.4