This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[gimple-classes, committed 43/44] sese.c: Use gassign
- From: David Malcolm <dmalcolm at redhat dot com>
- To: gcc-patches at gcc dot gnu dot org
- Cc: David Malcolm <dmalcolm at redhat dot com>
- Date: Thu, 6 Nov 2014 09:32:19 -0500
- Subject: [gimple-classes, committed 43/44] sese.c: Use gassign
- Authentication-results: sourceware.org; auth=none
- References: <1415284340-14186-1-git-send-email-dmalcolm at redhat dot com>
gcc/ChangeLog.gimple-classes:
* sese.c (rename_uses): Add checked cast to gassign within region
guarded by is_gimple_assign.
(graphite_copy_stmts_from_block): Likewise.
---
gcc/ChangeLog.gimple-classes | 6 ++++++
gcc/sese.c | 4 ++--
2 files changed, 8 insertions(+), 2 deletions(-)
diff --git a/gcc/ChangeLog.gimple-classes b/gcc/ChangeLog.gimple-classes
index 9f85260..71bb31b 100644
--- a/gcc/ChangeLog.gimple-classes
+++ b/gcc/ChangeLog.gimple-classes
@@ -1,5 +1,11 @@
2014-11-05 David Malcolm <dmalcolm@redhat.com>
+ * sese.c (rename_uses): Add checked cast to gassign within region
+ guarded by is_gimple_assign.
+ (graphite_copy_stmts_from_block): Likewise.
+
+2014-11-05 David Malcolm <dmalcolm@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.
diff --git a/gcc/sese.c b/gcc/sese.c
index e0869e0..c702024 100644
--- a/gcc/sese.c
+++ b/gcc/sese.c
@@ -507,7 +507,7 @@ rename_uses (gimple copy, rename_map_type *rename_map,
if (TREE_CODE (new_expr) == INTEGER_CST
&& is_gimple_assign (copy))
{
- tree rhs = gimple_assign_rhs1 (copy);
+ tree rhs = gimple_assign_rhs1 (as_a <gassign *> (copy));
if (TREE_CODE (rhs) == ADDR_EXPR)
recompute_tree_invariant_for_addr_expr (rhs);
@@ -548,7 +548,7 @@ graphite_copy_stmts_from_block (basic_block bb, basic_block new_bb,
/* Do not copy induction variables. */
if (is_gimple_assign (stmt)
- && (lhs = gimple_assign_lhs (stmt))
+ && (lhs = gimple_assign_lhs (as_a <gassign *> (stmt)))
&& TREE_CODE (lhs) == SSA_NAME
&& is_gimple_reg (lhs)
&& scev_analyzable_p (lhs, region))
--
1.7.11.7