This is the mail archive of the mailing list for the GCC project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] var-tracking.c speedups

Steven Bosscher <> writes:

> On Tue, Jun 23, 2009 at 2:51 PM, Jakub Jelinek<> 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)
    return 1;
  if (x == NULL_RTX || y == NULL_RTX)
    return 0;
  if (GET_CODE (x) != GET_CODE (y))
    return 0;
  return rtx_equal_p_cb (x, y, NULL);


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]