summaryrefslogtreecommitdiff
path: root/gcc/alias.c
diff options
context:
space:
mode:
authorwilson <wilson@138bc75d-0d04-0410-961f-82ee72b054a4>2001-09-07 23:25:01 +0000
committerwilson <wilson@138bc75d-0d04-0410-961f-82ee72b054a4>2001-09-07 23:25:01 +0000
commit9f5e1a5ad455bf3fcd3fb7d79899f442515a3c78 (patch)
tree944330803f51ba791ebf2256c7196203c46cdef1 /gcc/alias.c
parentd8fea5504e5bd095ddb2186c875821a99868559d (diff)
downloadgcc-9f5e1a5ad455bf3fcd3fb7d79899f442515a3c78.tar.gz
Fix for PR 3783.
* alias.c (clear_reg_alias_info): New. * flow.c (attempt_auto_inc): Call clear_reg_alias_info. * rtl.h (clear_reg_alias_info): Declare. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@45482 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/alias.c')
-rw-r--r--gcc/alias.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/gcc/alias.c b/gcc/alias.c
index d8e9d42e3b3..8c6ad5f0eb3 100644
--- a/gcc/alias.c
+++ b/gcc/alias.c
@@ -960,6 +960,20 @@ record_base_value (regno, val, invariant)
reg_base_value[regno] = find_base_value (val);
}
+/* Clear alias info for a register. This is used if an RTL transformation
+ changes the value of a register. This is used in flow by AUTO_INC_DEC
+ optimizations. We don't need to clear reg_base_value, since flow only
+ changes the offset. */
+
+void
+clear_reg_alias_info (rtx reg)
+{
+ int regno = REGNO (reg);
+
+ if (regno < reg_known_value_size)
+ reg_known_value[regno] = reg;
+}
+
/* Returns a canonical version of X, from the point of view alias
analysis. (For example, if X is a MEM whose address is a register,
and the register has a known value (say a SYMBOL_REF), then a MEM