summaryrefslogtreecommitdiffstats
path: root/gcc/tree-ssa-sink.c
diff options
context:
space:
mode:
authorkazu <kazu@138bc75d-0d04-0410-961f-82ee72b054a4>2005-05-02 16:57:53 +0000
committerkazu <kazu@138bc75d-0d04-0410-961f-82ee72b054a4>2005-05-02 16:57:53 +0000
commitc52a36cc3d05f19e44e1a62528e79cbc3dfaa073 (patch)
tree12e7611ab866dff0663a67068c1f598cb5547c16 /gcc/tree-ssa-sink.c
parent96a7ab575c22e582d9755a8118fdd169876c3e1d (diff)
downloadppe42-gcc-c52a36cc3d05f19e44e1a62528e79cbc3dfaa073.tar.gz
ppe42-gcc-c52a36cc3d05f19e44e1a62528e79cbc3dfaa073.zip
* tree-ssa-sink.c (nearest_common_dominator_of_uses): Factor
out common code. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@99105 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/tree-ssa-sink.c')
-rw-r--r--gcc/tree-ssa-sink.c22
1 files changed, 8 insertions, 14 deletions
diff --git a/gcc/tree-ssa-sink.c b/gcc/tree-ssa-sink.c
index 7751c4a8d7e..8041686f1ed 100644
--- a/gcc/tree-ssa-sink.c
+++ b/gcc/tree-ssa-sink.c
@@ -238,31 +238,25 @@ nearest_common_dominator_of_uses (tree stmt)
{
tree usestmt = USE_STMT (use_p);
basic_block useblock;
+
if (TREE_CODE (usestmt) == PHI_NODE)
{
int idx = PHI_ARG_INDEX_FROM_USE (use_p);
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);
}
else
{
useblock = bb_for_stmt (usestmt);
+ }
- /* Short circuit. Nothing dominates the entry block. */
- if (useblock == ENTRY_BLOCK_PTR)
- {
- BITMAP_FREE (blocks);
- return NULL;
- }
- bitmap_set_bit (blocks, useblock->index);
+ /* Short circuit. Nothing dominates the entry block. */
+ if (useblock == ENTRY_BLOCK_PTR)
+ {
+ BITMAP_FREE (blocks);
+ return NULL;
}
+ bitmap_set_bit (blocks, useblock->index);
}
}
commondom = BASIC_BLOCK (bitmap_first_set_bit (blocks));
OpenPOWER on IntegriCloud