This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[patch] jump.c (rtx_renumbered_equal_p): Very tiny speedup.
- From: Kazu Hirata <kazu at cs dot umass dot edu>
- To: gcc-patches at gcc dot gnu dot org
- Date: Fri, 27 Jun 2003 10:32:43 -0400 (EDT)
- Subject: [patch] jump.c (rtx_renumbered_equal_p): Very tiny speedup.
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?
Kazu Hirata
2003-06-27 Kazu Hirata <kazu@cs.umass.edu>
* jump.c (rtx_renumbered_equal_p): Replace an expression that
is known to be 0 with 0.
Index: jump.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/jump.c,v
retrieving revision 1.229
diff -u -r1.229 jump.c
--- jump.c 25 Jun 2003 03:45:12 -0000 1.229
+++ jump.c 26 Jun 2003 19:58:55 -0000
@@ -2326,10 +2326,8 @@
case CC0:
case ADDR_VEC:
case ADDR_DIFF_VEC:
- return 0;
-
case CONST_INT:
- return INTVAL (x) == INTVAL (y);
+ return 0;
case LABEL_REF:
/* We can't assume nonlocal labels have their following insns yet. */