This is the mail archive of the
mailing list for the GCC project.
Re: [patch] Speed up operand_equal_p during SSA optimizations.
- From: Roger Sayle <roger at eyesopen dot com>
- To: Kazu Hirata <kazu at cs dot umass dot edu>
- Cc: gcc-patches at gcc dot gnu dot org, Diego Novillo <dnovillo at redhat dot com>, Jeffrey A Law <law at redhat dot com>
- Date: Fri, 26 Nov 2004 17:30:43 -0700 (MST)
- Subject: Re: [patch] Speed up operand_equal_p during SSA optimizations.
I worry that I'm make this process even more painfull than it needs
to be, but have you considered going with a variant of your original
patch that fast-paths the common cases used in the SSA optimizers in
a new operand_equal_for_phi_arg_p.
operand_equal_for_phi_arg_p (tree arg0, tree arg1)
if (arg0 == arg1)
if (TREE_CODE (arg0) == SSA_NAME || TREE_CODE (arg1) == SSA_NAME)
return operand_equal_p (arg0, arg1, 0);
This has the benefit of taking advantage of the common cases in the
tree-ssa optimizers, but without adding anything to slow down
operand_equal_p, or having to check for OEP_ONLY_CONST, yet still
avoids any significant code duplication?
Of course, anything you can do to streamline operand_equal_p would
be very welcome, but looking at it's prologue it appears there's
just a lot of type-based, error-mark node, and strip NOPs handling
that just isn't relevant to comparing phi args.
Diego? Jeff? What do you guys think?