Commit 55b12f0d by Kazu Hirata Committed by Kazu Hirata

tree-ssa-sink.c (nearest_common_dominator_of_uses): Look at a PHI argument where…

tree-ssa-sink.c (nearest_common_dominator_of_uses): Look at a PHI argument where a use occurs instead of all PHI arguments.

	* tree-ssa-sink.c (nearest_common_dominator_of_uses): Look at
	a PHI argument where a use occurs instead of all PHI arguments.

From-SVN: r97738
parent 5070376f
2005-04-06 Kazu Hirata <kazu@cs.umass.edu>
* tree-ssa-sink.c (nearest_common_dominator_of_uses): Look at
a PHI argument where a use occurs instead of all PHI arguments.
2005-04-06 Joseph S. Myers <joseph@codesourcery.com>
* c-decl.c (finish_decl): Apply pending #pragma weak regardless of
......
......@@ -240,10 +240,10 @@ nearest_common_dominator_of_uses (tree stmt)
basic_block useblock;
if (TREE_CODE (usestmt) == PHI_NODE)
{
int j;
for (j = 0; j < PHI_NUM_ARGS (usestmt); j++)
int idx = PHI_ARG_INDEX_FROM_USE (use_p);
if (PHI_ARG_DEF (usestmt, idx) == var)
{
useblock = PHI_ARG_EDGE (usestmt, j)->src;
useblock = PHI_ARG_EDGE (usestmt, idx)->src;
/* Short circuit. Nothing dominates the entry block. */
if (useblock == ENTRY_BLOCK_PTR)
{
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment