summaryrefslogtreecommitdiff
path: root/gcc/local-alloc.c
diff options
context:
space:
mode:
authorcrux <crux@138bc75d-0d04-0410-961f-82ee72b054a4>2000-09-14 16:45:42 +0000
committercrux <crux@138bc75d-0d04-0410-961f-82ee72b054a4>2000-09-14 16:45:42 +0000
commit3293db6685fd07f23ceefd094769839fd541d876 (patch)
treeaf29e8a74afd83f5a30120f40006cdf8c5d312df /gcc/local-alloc.c
parent64f8db03b581f3e43916a49f7104745765e93829 (diff)
downloadgcc-3293db6685fd07f23ceefd094769839fd541d876.tar.gz
Generate REG_EQUAL notes when they'd be helpful
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@36409 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/local-alloc.c')
-rw-r--r--gcc/local-alloc.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/gcc/local-alloc.c b/gcc/local-alloc.c
index 666faca1705..04b1613b689 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))