[patch] tree-ssa-dom.c: Speed up record_equivalences_from_phis.
Kazu Hirata
kazu@cs.umass.edu
Mon Dec 13 01:26:00 GMT 2004
Hi,
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?
Kazu Hirata
2004-12-12 Kazu Hirata <kazu@cs.umass.edu>
* tree-ssa-dom.c (record_equivalences_from_phis): Speed up by
doing a pointer comparison.
Index: tree-ssa-dom.c
===================================================================
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)
continue;
/* If we have not processed an alternative yet, then set
More information about the Gcc-patches
mailing list