This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [patch] jump.c (rtx_renumbered_equal_p): Very tiny speedup.
- From: Zack Weinberg <zack at codesourcery dot com>
- To: Kazu Hirata <kazu at cs dot umass dot edu>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Fri, 27 Jun 2003 09:29:01 -0700
- Subject: Re: [patch] jump.c (rtx_renumbered_equal_p): Very tiny speedup.
- References: <20030627.103243.80884287.kazu@cs.umass.edu>
Kazu Hirata <kazu@cs.umass.edu> writes:
> Hi,
>
> Attached is a patch to speed up rtx_renumbered_equal_p().
>
> CONST_INT's are always shared, so
>
> INTVAL (x) == INTVAL (y) iff x == y
>
> Since the function returns 1 very early if x == y, after that we
> know that INTVAL (x) != INTVAL (y).
>
> Tested on i686-pc-linux-gnu. OK to apply?
All your patches to date which microoptimize based on the above
invariant are approved. Furthermore, I'll pre-approve any more
patches which microoptimize based on the above invariant, provided
they don't do anything else.
zw