This is the mail archive of the
mailing list for the GCC project.
Re: [PATCH] var-tracking.c speedups
Steven Bosscher <email@example.com> writes:
> On Tue, Jun 23, 2009 at 2:51 PM, Jakub Jelinek<firstname.lastname@example.org> wrote:
>> 4) in sel-sched merge, rtx_equal_p was moved to very infrequently used
>> Â rtx_equal_p_cb with added callback and rtx_equal_p implemented on top
>> Â of that new function. ÂGiven that rtx_equal_p was showing very high
>> Â in the callgrind profile and is very frequently used throughout gcc
>> Â rtl passes (400+ different callers), isn't too long to be a maintainance
>> Â burden and is recursive, so we can't get rid of the overhead of passing
>> Â cb around and checking at each level, I'm proposing returning to the
>> Â old rtx_equal_p function and have rtx_equal_p_cb as completely separate
>> Â function.
> Please don't do that.
Why not make rtx_equal_p a static inline function in rtl.h? It could
even handle the common cases directly.
static inline int /* should be bool but that is a separate change */
rtx_equal_p (const_rtx x, const_rtx y)
if (x == y)
if (x == NULL_RTX || y == NULL_RTX)
if (GET_CODE (x) != GET_CODE (y))
return rtx_equal_p_cb (x, y, NULL);