aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree-ssa-sink.c
diff options
context:
space:
mode:
authorKazu Hirata <kazu@cs.umass.edu>2005-04-07 16:31:07 +0000
committerKazu Hirata <kazu@gcc.gnu.org>2005-04-07 16:31:07 +0000
commitab7983139ddfcac4ef3ae8d63efddbbd3bcd4310 (patch)
tree7f14b7ad7a73fa4e594bbd96a9a021e5eab1e780 /gcc/tree-ssa-sink.c
parent53b42091b991f1aafcb90fc6ac76763a7e6de560 (diff)
downloadgcc-ab7983139ddfcac4ef3ae8d63efddbbd3bcd4310.zip
gcc-ab7983139ddfcac4ef3ae8d63efddbbd3bcd4310.tar.gz
gcc-ab7983139ddfcac4ef3ae8d63efddbbd3bcd4310.tar.bz2
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
Diffstat (limited to 'gcc/tree-ssa-sink.c')
-rw-r--r--gcc/tree-ssa-sink.c16
1 files changed, 7 insertions, 9 deletions
diff --git a/gcc/tree-ssa-sink.c b/gcc/tree-ssa-sink.c
index cecbae7..54f9fb9 100644
--- a/gcc/tree-ssa-sink.c
+++ b/gcc/tree-ssa-sink.c
@@ -241,17 +241,15 @@ nearest_common_dominator_of_uses (tree stmt)
if (TREE_CODE (usestmt) == PHI_NODE)
{
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;
- /* Short circuit. Nothing dominates the entry block. */
- if (useblock == ENTRY_BLOCK_PTR)
- {
- BITMAP_FREE (blocks);
- return NULL;
- }
- bitmap_set_bit (blocks, useblock->index);
+ BITMAP_FREE (blocks);
+ return NULL;
}
+ bitmap_set_bit (blocks, useblock->index);
}
else
{