@@ -1,5 +1,13 @@
2014-11-05 David Malcolm <dmalcolm@redhat.com>
+ * ipa-icf-gimple.c (func_checker::compare_bb): Add checked casts.
+ (func_checker::compare_gimple_assign): Strengthen params from
+ gimple to const gassign *.
+ * ipa-icf-gimple.h (func_checker::compare_gimple_assign):
+ Likewise.
+
+2014-11-05 David Malcolm <dmalcolm@redhat.com>
+
* ipa-prop.c (stmt_may_be_vtbl_ptr_store): Replace
is_gimple_assign with dyn_cast, introducing local gassign *
"assign_stmt" and using it in place of "stmt" for typesafety.
@@ -591,7 +591,8 @@ func_checker::compare_bb (sem_bb *bb1, sem_bb *bb2)
return return_different_stmts (s1, s2, "GIMPLE_CALL");
break;
case GIMPLE_ASSIGN:
- if (!compare_gimple_assign (s1, s2))
+ if (!compare_gimple_assign (as_a <gassign *> (s1),
+ as_a <gassign *> (s2)))
return return_different_stmts (s1, s2, "GIMPLE_ASSIGN");
break;
case GIMPLE_COND:
@@ -682,11 +683,11 @@ func_checker::compare_gimple_call (gimple s1, gimple s2)
}
-/* Verifies for given GIMPLEs S1 and S2 that
+/* Verifies for given GASSIGNs S1 and S2 that
assignment statements are semantically equivalent. */
bool
-func_checker::compare_gimple_assign (gimple s1, gimple s2)
+func_checker::compare_gimple_assign (const gassign *s1, const gassign *s2)
{
tree arg1, arg2;
tree_code code1, code2;
@@ -163,7 +163,7 @@ public:
/* Verifies for given GIMPLEs S1 and S2 that
assignment statements are semantically equivalent. */
- bool compare_gimple_assign (gimple s1, gimple s2);
+ bool compare_gimple_assign (const gassign *s1, const gassign *s2);
/* Verifies for given GIMPLEs S1 and S2 that
condition statements are semantically equivalent. */