gcc/ChangeLog.gimple-classes:
        * tree-affine.c (aff_combination_expand): Replace is_gimple_assign
        with a dyn_cast, strengthening local "def" from gimple to
        gassign *.
---
 gcc/ChangeLog.gimple-classes | 6 ++++++
 gcc/tree-affine.c            | 5 ++---
 2 files changed, 8 insertions(+), 3 deletions(-)

diff --git a/gcc/ChangeLog.gimple-classes b/gcc/ChangeLog.gimple-classes
index b4adc82..719ca6b 100644
--- a/gcc/ChangeLog.gimple-classes
+++ b/gcc/ChangeLog.gimple-classes
@@ -1,5 +1,11 @@
 2014-11-03  David Malcolm  <dmalc...@redhat.com>
 
+       * tree-affine.c (aff_combination_expand): Replace is_gimple_assign
+       with a dyn_cast, strengthening local "def" from gimple to
+       gassign *.
+
+2014-11-03  David Malcolm  <dmalc...@redhat.com>
+
        * tree-object-size.c (plus_stmt_object_size): Strengthen param
        "stmt" from gimple to gassign *.
        (cond_expr_object_size): Likewise.
diff --git a/gcc/tree-affine.c b/gcc/tree-affine.c
index 4c61cd0..4828229 100644
--- a/gcc/tree-affine.c
+++ b/gcc/tree-affine.c
@@ -634,7 +634,6 @@ aff_combination_expand (aff_tree *comb ATTRIBUTE_UNUSED,
   unsigned i;
   aff_tree to_add, current, curre;
   tree e, rhs;
-  gimple def;
   widest_int scale;
   struct name_expansion *exp;
 
@@ -654,8 +653,8 @@ aff_combination_expand (aff_tree *comb ATTRIBUTE_UNUSED,
        name = TREE_OPERAND (e, 0);
       if (TREE_CODE (name) != SSA_NAME)
        continue;
-      def = SSA_NAME_DEF_STMT (name);
-      if (!is_gimple_assign (def) || gimple_assign_lhs (def) != name)
+      gassign *def = dyn_cast <gassign *> (SSA_NAME_DEF_STMT (name));
+      if (!def || gimple_assign_lhs (def) != name)
        continue;
 
       code = gimple_assign_rhs_code (def);
-- 
1.7.11.7

Reply via email to