On Mon, Jan 28, 2013 at 09:39:00AM -0700, Jeff Law wrote: > I'm assuming that we don't need the shallow_copy_rtx call and > related code because in the PREFETCH case we generate a new MEM and > the underlying address can be safely shared. Right?
AFAIK cselib_lookup* never modifies the rtx it is passed, shallow_copy_rtx in the MEM case is for: t = shallow_copy_rtx (dest); cselib_lookup_from_insn (XEXP (t, 0), address_mode, 1, GET_MODE (t), insn); XEXP (t, 0) = cselib_subst_to_values_from_insn (XEXP (t, 0), GET_MODE (t), insn); where we modify XEXP (t, 0) in the last assignment and don't want to change XEXP (dest, 0). Jakub