@@ -1,5 +1,11 @@
2014-11-06 David Malcolm <dmalcolm@redhat.com>
+ * tree-ssa-sink.c (statement_sink_location): Rename param "stmt"
+ to "gs", reintroducing "stmt" as a local gassign * via a dyn_cast
+ for typesafety.
+
+2014-11-06 David Malcolm <dmalcolm@redhat.com>
+
* tree-ssa-propagate.c
(substitute_and_fold_dom_walker::before_dom_children): Add checked
cast. Replace is_gimple_assign with a dyn_cast, introducing local
@@ -256,13 +256,13 @@ select_best_block (basic_block early_bb,
return early_bb;
}
-/* Given a statement (STMT) and the basic block it is currently in (FROMBB),
+/* Given a statement (GS) and the basic block it is currently in (FROMBB),
determine the location to sink the statement to, if any.
Returns true if there is such location; in that case, TOGSI points to the
- statement before that STMT should be moved. */
+ statement before that GS should be moved. */
static bool
-statement_sink_location (gimple stmt, basic_block frombb,
+statement_sink_location (gimple gs, basic_block frombb,
gimple_stmt_iterator *togsi)
{
gimple use;
@@ -274,7 +274,8 @@ statement_sink_location (gimple stmt, basic_block frombb,
imm_use_iterator imm_iter;
/* We only can sink assignments. */
- if (!is_gimple_assign (stmt))
+ gassign *stmt = dyn_cast <gassign *> (gs);
+ if (!stmt)
return false;
/* We only can sink stmts with a single definition. */