diff options
| author | Alexander Kabaev <kan@FreeBSD.org> | 2003-02-10 05:41:50 +0000 |
|---|---|---|
| committer | Alexander Kabaev <kan@FreeBSD.org> | 2003-02-10 05:41:50 +0000 |
| commit | 72983f38e19d795e4671ce8231e076df7f6c5bc0 (patch) | |
| tree | 636a10692c73f4e15c4e3c4effae1b84e967dab9 /contrib/gcc/loop.c | |
| parent | 3749dff3f9323596a9326efa4bf2b560c0e9d1d3 (diff) | |
| parent | 7b74929d749aa5688fd0814a9880872323e02cde (diff) | |
Notes
Diffstat (limited to 'contrib/gcc/loop.c')
| -rw-r--r-- | contrib/gcc/loop.c | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/contrib/gcc/loop.c b/contrib/gcc/loop.c index 149e7d1b97b4..58e0255d8c3a 100644 --- a/contrib/gcc/loop.c +++ b/contrib/gcc/loop.c @@ -8514,11 +8514,12 @@ maybe_eliminate_biv (loop, bl, eliminate_p, threshold, insn_count) enum rtx_code code = GET_CODE (p); basic_block where_bb = 0; rtx where_insn = threshold >= insn_count ? 0 : p; + rtx note; /* If this is a libcall that sets a giv, skip ahead to its end. */ if (GET_RTX_CLASS (code) == 'i') { - rtx note = find_reg_note (p, REG_LIBCALL, NULL_RTX); + note = find_reg_note (p, REG_LIBCALL, NULL_RTX); if (note) { @@ -8536,6 +8537,8 @@ maybe_eliminate_biv (loop, bl, eliminate_p, threshold, insn_count) } } } + + /* Closely examine the insn if the biv is mentioned. */ if ((code == INSN || code == JUMP_INSN || code == CALL_INSN) && reg_mentioned_p (reg, PATTERN (p)) && ! maybe_eliminate_biv_1 (loop, PATTERN (p), p, bl, @@ -8547,6 +8550,12 @@ maybe_eliminate_biv (loop, bl, eliminate_p, threshold, insn_count) bl->regno, INSN_UID (p)); break; } + + /* If we are eliminating, kill REG_EQUAL notes mentioning the biv. */ + if (eliminate_p + && (note = find_reg_note (p, REG_EQUAL, NULL_RTX)) != NULL_RTX + && reg_mentioned_p (reg, XEXP (note, 0))) + remove_note (p, note); } if (p == loop->end) |
