* 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
+2001-09-07 Jim Wilson <wilson@redhat.com>
+
+ * alias.c (clear_reg_alias_info): New.
+ * flow.c (attempt_auto_inc): Call clear_reg_alias_info.
+ * rtl.h (clear_reg_alias_info): Declare.
+
2001-09-07 Roman Lechtchinsky <rl@cs.tu-berlin.de>
* real.c (EMUSHORT,EMUSHORT_SIZE): Use HImode if no 16-bit type is
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
for (temp = insn; temp != incr; temp = NEXT_INSN (temp))
if (GET_CODE (temp) == CALL_INSN)
REG_N_CALLS_CROSSED (regno)++;
+
+ /* Invalidate alias info for Q since we just changed its value. */
+ clear_reg_alias_info (q);
}
else
return;
#define abort() fancy_abort (__FILE__, __LINE__, __FUNCTION__)
/* In alias.c */
+extern void clear_reg_alias_info PARAMS ((rtx));
extern rtx canon_rtx PARAMS ((rtx));
extern int true_dependence PARAMS ((rtx, enum machine_mode, rtx,
int (*)(rtx, int)));