[gimple-classes, committed 04/44] Use gcall * in more places

David Malcolm dmalcolm@redhat.com
Thu Nov 6 14:37:00 GMT 2014


gcc/ChangeLog.gimple-classes:
	* config/i386/i386.c (add_condition_to_bb): Strengthen local
	"call_cond_stmt" from gimple to gcall *.
	* gimple-fold.c (gimple_build): Likewise for local "stmt".
	* gimple-match-head.c (maybe_push_res_to_seq): Likewise for local
	"new_stmt".
	* tree-cfgcleanup.c (fixup_noreturn_call): Likewise for param
	"stmt".
	* tree-ssa-math-opts.c (bswap_replace): Likewise for local "call".
	* tree-ssa-propagate.c (update_call_from_tree): Likewise for local "stmt",
	adding a checked cast.
	* ubsan.c (instrument_si_overflow): Likewise for local "g".
---
 gcc/ChangeLog.gimple-classes | 14 ++++++++++++++
 gcc/config/i386/i386.c       |  2 +-
 gcc/gimple-fold.c            |  2 +-
 gcc/gimple-match-head.c      |  2 +-
 gcc/tree-cfgcleanup.c        |  2 +-
 gcc/tree-ssa-math-opts.c     |  2 +-
 gcc/tree-ssa-propagate.c     |  2 +-
 gcc/ubsan.c                  |  2 +-
 8 files changed, 21 insertions(+), 7 deletions(-)

diff --git a/gcc/ChangeLog.gimple-classes b/gcc/ChangeLog.gimple-classes
index 5b408e3..e2fb3d2 100644
--- a/gcc/ChangeLog.gimple-classes
+++ b/gcc/ChangeLog.gimple-classes
@@ -1,5 +1,19 @@
 2014-10-31  David Malcolm  <dmalcolm@redhat.com>
 
+	* config/i386/i386.c (add_condition_to_bb): Strengthen local
+	"call_cond_stmt" from gimple to gcall *.
+	* gimple-fold.c (gimple_build): Likewise for local "stmt".
+	* gimple-match-head.c (maybe_push_res_to_seq): Likewise for local
+	"new_stmt".
+	* tree-cfgcleanup.c (fixup_noreturn_call): Likewise for param
+	"stmt".
+	* tree-ssa-math-opts.c (bswap_replace): Likewise for local "call".
+	* tree-ssa-propagate.c (update_call_from_tree): Likewise for local "stmt",
+	adding a checked cast.
+	* ubsan.c (instrument_si_overflow): Likewise for local "g".
+
+2014-10-31  David Malcolm  <dmalcolm@redhat.com>
+
 	* gimple-low.c (lower_builtin_setjmp): Strengthen local "stmt"
 	from gimple to gcall *, via a checked cast.
 	(lower_builtin_posix_memalign): Likewise for local "call".
diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c
index 5b48f6a..6b15088 100644
--- a/gcc/config/i386/i386.c
+++ b/gcc/config/i386/i386.c
@@ -31419,7 +31419,7 @@ add_condition_to_bb (tree function_decl, tree version_decl,
   gimple return_stmt;
   tree convert_expr, result_var;
   gimple convert_stmt;
-  gimple call_cond_stmt;
+  gcall *call_cond_stmt;
   gimple if_else_stmt;
 
   basic_block bb1, bb2, bb3;
diff --git a/gcc/gimple-fold.c b/gcc/gimple-fold.c
index e7456cd..c5f1e07 100644
--- a/gcc/gimple-fold.c
+++ b/gcc/gimple-fold.c
@@ -5629,7 +5629,7 @@ gimple_build (gimple_seq *seq, location_t loc,
   if (!res)
     {
       tree decl = builtin_decl_implicit (fn);
-      gimple stmt = gimple_build_call (decl, 1, arg0);
+      gcall *stmt = gimple_build_call (decl, 1, arg0);
       if (!VOID_TYPE_P (type))
 	{
 	  if (gimple_in_ssa_p (cfun))
diff --git a/gcc/gimple-match-head.c b/gcc/gimple-match-head.c
index 520e523..844f08a 100644
--- a/gcc/gimple-match-head.c
+++ b/gcc/gimple-match-head.c
@@ -360,7 +360,7 @@ maybe_push_res_to_seq (code_helper rcode, tree type, tree *ops,
 	return NULL_TREE;
       if (!res)
 	res = make_ssa_name (type, NULL);
-      gimple new_stmt = gimple_build_call (decl, nargs, ops[0], ops[1], ops[2]);
+      gcall *new_stmt = gimple_build_call (decl, nargs, ops[0], ops[1], ops[2]);
       gimple_call_set_lhs (new_stmt, res);
       gimple_seq_add_stmt_without_update (seq, new_stmt);
       return res;
diff --git a/gcc/tree-cfgcleanup.c b/gcc/tree-cfgcleanup.c
index d0da8c0..7383924 100644
--- a/gcc/tree-cfgcleanup.c
+++ b/gcc/tree-cfgcleanup.c
@@ -566,7 +566,7 @@ remove_forwarder_block (basic_block bb)
    and remove LHS.  Return true if something changed.  */
 
 bool
-fixup_noreturn_call (gimple stmt)
+fixup_noreturn_call (gcall *stmt)
 {
   basic_block bb = gimple_bb (stmt);
   bool changed = false;
diff --git a/gcc/tree-ssa-math-opts.c b/gcc/tree-ssa-math-opts.c
index b408b9f..be567e0 100644
--- a/gcc/tree-ssa-math-opts.c
+++ b/gcc/tree-ssa-math-opts.c
@@ -2193,7 +2193,7 @@ bswap_replace (gimple cur_stmt, gimple_stmt_iterator gsi, gimple src_stmt,
 	       struct symbolic_number *n, bool bswap)
 {
   tree src, tmp, tgt;
-  gimple call;
+  gcall *call;
 
   src = gimple_assign_rhs1 (src_stmt);
   tgt = gimple_assign_lhs (cur_stmt);
diff --git a/gcc/tree-ssa-propagate.c b/gcc/tree-ssa-propagate.c
index c246ed6..6625000 100644
--- a/gcc/tree-ssa-propagate.c
+++ b/gcc/tree-ssa-propagate.c
@@ -773,7 +773,7 @@ update_gimple_call (gimple_stmt_iterator *si_p, tree fn, int nargs, ...)
 bool
 update_call_from_tree (gimple_stmt_iterator *si_p, tree expr)
 {
-  gimple stmt = gsi_stmt (*si_p);
+  gcall *stmt = as_a <gcall *> (gsi_stmt (*si_p));
 
   if (valid_gimple_call_p (expr))
     {
diff --git a/gcc/ubsan.c b/gcc/ubsan.c
index 7a69000..9ee3783 100644
--- a/gcc/ubsan.c
+++ b/gcc/ubsan.c
@@ -1011,7 +1011,7 @@ instrument_si_overflow (gimple_stmt_iterator gsi)
   tree lhs = gimple_assign_lhs (stmt);
   tree lhstype = TREE_TYPE (lhs);
   tree a, b;
-  gimple g;
+  gcall *g;
 
   /* If this is not a signed operation, don't instrument anything here.
      Also punt on bit-fields.  */
-- 
1.7.11.7



More information about the Gcc-patches mailing list