This is the mail archive of the
mailing list for the GCC project.
[patch] tree-ssa-dom.c: Speed up record_equivalences_from_phis.
- From: Kazu Hirata <kazu at cs dot umass dot edu>
- To: gcc-patches at gcc dot gnu dot org
- Date: Sun, 12 Dec 2004 20:26:09 -0500 (EST)
- Subject: [patch] tree-ssa-dom.c: Speed up record_equivalences_from_phis.
Attached is a patch to speed up record_equivalences_from_phis.
Consider the following "if" statement.
if (operand_equal_for_phi_arg_p (lhs, t))
Since lhs comes from PHI_RESULT, it is known to be SSA_NAME, so we can
just do a pointer comparison instead.
Tested on i686-pc-linux-gnu. OK to apply?
2004-12-12 Kazu Hirata <firstname.lastname@example.org>
* tree-ssa-dom.c (record_equivalences_from_phis): Speed up by
doing a pointer comparison.
RCS file: /cvs/gcc/gcc/gcc/tree-ssa-dom.c,v
retrieving revision 2.76
diff -u -d -p -r2.76 tree-ssa-dom.c
--- tree-ssa-dom.c 12 Dec 2004 17:03:37 -0000 2.76
+++ tree-ssa-dom.c 12 Dec 2004 19:47:12 -0000
@@ -1178,7 +1178,7 @@ record_equivalences_from_phis (basic_blo
tree t = PHI_ARG_DEF (phi, i);
/* Ignore alternatives which are the same as our LHS. */
- if (operand_equal_for_phi_arg_p (lhs, t))
+ if (lhs == t)
/* If we have not processed an alternative yet, then set