aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree-ssa-sink.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/tree-ssa-sink.c')
-rw-r--r--gcc/tree-ssa-sink.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/gcc/tree-ssa-sink.c b/gcc/tree-ssa-sink.c
index f85ced4..c6d8712 100644
--- a/gcc/tree-ssa-sink.c
+++ b/gcc/tree-ssa-sink.c
@@ -95,7 +95,7 @@ static struct
we return NULL. */
static basic_block
-find_bb_for_arg (gimple phi, tree def)
+find_bb_for_arg (gphi *phi, tree def)
{
size_t i;
bool foundone = false;
@@ -159,11 +159,11 @@ nearest_common_dominator_of_uses (def_operand_p def_p, bool *debug_stmts)
gimple usestmt = USE_STMT (use_p);
basic_block useblock;
- if (gimple_code (usestmt) == GIMPLE_PHI)
+ if (gphi *phi = dyn_cast <gphi *> (usestmt))
{
int idx = PHI_ARG_INDEX_FROM_USE (use_p);
- useblock = gimple_phi_arg_edge (usestmt, idx)->src;
+ useblock = gimple_phi_arg_edge (phi, idx)->src;
}
else if (is_gimple_debug (usestmt))
{
@@ -456,7 +456,7 @@ statement_sink_location (gimple stmt, basic_block frombb,
}
}
- sinkbb = find_bb_for_arg (use, DEF_FROM_PTR (def_p));
+ sinkbb = find_bb_for_arg (as_a <gphi *> (use), DEF_FROM_PTR (def_p));
/* This can happen if there are multiple uses in a PHI. */
if (!sinkbb)