Use simplify_replace_rtx rather than wrap_constant
Eric Botcazou
ebotcazou@adacore.com
Thu Oct 1 13:54:00 GMT 2009
> Do you think the changes are unsafe, or are you worried about the
> performance impact? If the latter, then what about my suggestion
> of making rtx_equal_p an inline wrapper to an out-of-line function?
> I think that is a separate change, but I'm happy to do it if you
> think it's worthwhile (or even necessary for the main patch to
> be acceptable).
FWIW I share Bernd's concerns, in particular I'd be cautious about unsharing
everything by default; the recog.c approach might be better, with the two
variants validate_change and validate_unshare_change
But I agree that making rtx_equal_p an inline wrapper would be a good idea to
speed things up; there are already a few manual attemps, e.g.
/* X matches FROM if it is the same rtx or they are both referring to the
same register in the same mode. Avoid calling rtx_equal_p unless the
operands look similar. */
if (x == from
|| (REG_P (x) && REG_P (from)
&& GET_MODE (x) == GET_MODE (from)
&& REGNO (x) == REGNO (from))
|| (GET_CODE (x) == GET_CODE (from) && GET_MODE (x) == GET_MODE (from)
&& rtx_equal_p (x, from)))
{
validate_unshare_change (object, loc, to, 1);
return;
}
--
Eric Botcazou
More information about the Gcc-patches
mailing list