gcc/ChangeLog.gimple-classes: * predict.c (expr_expected_value_1): Replace is_gimple_assign with a dyn_cast, introducing local "def_assign" and using it in place of "def" for typesafety. --- gcc/ChangeLog.gimple-classes | 6 ++++++ gcc/predict.c | 13 +++++++------ 2 files changed, 13 insertions(+), 6 deletions(-)
diff --git a/gcc/ChangeLog.gimple-classes b/gcc/ChangeLog.gimple-classes index 1ff615f..9f85260 100644 --- a/gcc/ChangeLog.gimple-classes +++ b/gcc/ChangeLog.gimple-classes @@ -1,5 +1,11 @@ 2014-11-05 David Malcolm <dmalc...@redhat.com> + * predict.c (expr_expected_value_1): Replace is_gimple_assign with + a dyn_cast, introducing local "def_assign" and using it in place + of "def" for typesafety. + +2014-11-05 David Malcolm <dmalc...@redhat.com> + * omp-low.c (expand_omp_taskreg): Strengthen locals "parcopy_stmt" and "stmt" from gimple to gassign *, replacing a check against GIMPLE_ASSIGN with a dyn_cast. diff --git a/gcc/predict.c b/gcc/predict.c index ed8f352..ca6c7e0 100644 --- a/gcc/predict.c +++ b/gcc/predict.c @@ -1805,15 +1805,16 @@ expr_expected_value_1 (tree type, tree op0, enum tree_code code, } return val; } - if (is_gimple_assign (def)) + if (gassign *def_assign = dyn_cast <gassign *> (def)) { - if (gimple_assign_lhs (def) != op0) + if (gimple_assign_lhs (def_assign) != op0) return NULL; - return expr_expected_value_1 (TREE_TYPE (gimple_assign_lhs (def)), - gimple_assign_rhs1 (def), - gimple_assign_rhs_code (def), - gimple_assign_rhs2 (def), + return expr_expected_value_1 (TREE_TYPE ( + gimple_assign_lhs (def_assign)), + gimple_assign_rhs1 (def_assign), + gimple_assign_rhs_code (def_assign), + gimple_assign_rhs2 (def_assign), visited, predictor); } -- 1.7.11.7