diff options
author | Bernd Schmidt <bernds@redhat.co.uk> | 2000-09-14 16:45:42 +0000 |
---|---|---|
committer | Bernd Schmidt <crux@gcc.gnu.org> | 2000-09-14 16:45:42 +0000 |
commit | 2f93c5c3551b6b3c11a774ae6d42220eff1f4502 (patch) | |
tree | af29e8a74afd83f5a30120f40006cdf8c5d312df | |
parent | cad396c8b06436a2299ddcbfd24d8b1080bff46d (diff) | |
download | gcc-2f93c5c3551b6b3c11a774ae6d42220eff1f4502.zip gcc-2f93c5c3551b6b3c11a774ae6d42220eff1f4502.tar.gz gcc-2f93c5c3551b6b3c11a774ae6d42220eff1f4502.tar.bz2 |
Generate REG_EQUAL notes when they'd be helpful
From-SVN: r36409
-rw-r--r-- | gcc/ChangeLog | 7 | ||||
-rw-r--r-- | gcc/local-alloc.c | 7 |
2 files changed, 14 insertions, 0 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 6355ac1..ffa9e03 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,10 @@ +2000-09-12 Bernd Schmidt <bernds@redhat.co.uk> + + From Joern Rennecke: + * local-alloc.c (update_equiv_regs): If there is no REG_EQUAL note + on an insn and function_invariant_p returns nonzero for the source, + add a REG_EQUAL note. + Thu Sep 14 00:51:57 EDT 2000 John Wehle (john@feith.com) * alias.c (memrefs_conflict_p): An ADDRESSOF doesn't diff --git a/gcc/local-alloc.c b/gcc/local-alloc.c index 666faca..04b1613 100644 --- a/gcc/local-alloc.c +++ b/gcc/local-alloc.c @@ -787,6 +787,13 @@ update_equiv_regs () note = find_reg_note (insn, REG_EQUAL, NULL_RTX); + /* cse sometimes generates function invariants, but doesn't put a + REG_EQUAL note on the insn. Since this note would be redundant, + there's no point creating it earlier than here. */ + if (! note && function_invariant_p (src)) + REG_NOTES (insn) + = note = gen_rtx_EXPR_LIST (REG_EQUAL, src, REG_NOTES (insn)); + if (REG_N_SETS (regno) != 1 && (! note || ! function_invariant_p (XEXP (note, 0)) |