Commit ab798313 by Kazu Hirata Committed by Kazu Hirata

tree-ssa-sink.c (nearest_common_dominator_of_uses): Consider all immediate uses in PHI nodes.

	* tree-ssa-sink.c (nearest_common_dominator_of_uses): Consider
	all immediate uses in PHI nodes.

From-SVN: r97788
parent 53b42091
2005-04-07 Kazu Hirata <kazu@cs.umass.edu>
* tree-ssa-sink.c (nearest_common_dominator_of_uses): Consider
all immediate uses in PHI nodes.
2005-04-07 Richard Earnshaw <richard.earnshaw@arm.com> 2005-04-07 Richard Earnshaw <richard.earnshaw@arm.com>
* arm.c (arm_const_double_inline_cost): Handle any constant by * arm.c (arm_const_double_inline_cost): Handle any constant by
......
...@@ -241,17 +241,15 @@ nearest_common_dominator_of_uses (tree stmt) ...@@ -241,17 +241,15 @@ nearest_common_dominator_of_uses (tree stmt)
if (TREE_CODE (usestmt) == PHI_NODE) if (TREE_CODE (usestmt) == PHI_NODE)
{ {
int idx = PHI_ARG_INDEX_FROM_USE (use_p); int idx = PHI_ARG_INDEX_FROM_USE (use_p);
if (PHI_ARG_DEF (usestmt, idx) == var)
useblock = PHI_ARG_EDGE (usestmt, idx)->src;
/* Short circuit. Nothing dominates the entry block. */
if (useblock == ENTRY_BLOCK_PTR)
{ {
useblock = PHI_ARG_EDGE (usestmt, idx)->src; BITMAP_FREE (blocks);
/* Short circuit. Nothing dominates the entry block. */ return NULL;
if (useblock == ENTRY_BLOCK_PTR)
{
BITMAP_FREE (blocks);
return NULL;
}
bitmap_set_bit (blocks, useblock->index);
} }
bitmap_set_bit (blocks, useblock->index);
} }
else else
{ {
......
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