This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[gimple-classes, committed 76/92] Concretize gimple_call_set_nothrow


This corresponds to:
  [PATCH 78/89] Concretize gimple_call_set_nothrow
  https://gcc.gnu.org/ml/gcc-patches/2014-04/msg01184.html
from the original 89-patch kit

That earlier patch was approved by Jeff:
> OK once prerequisites have gone in.
in https://gcc.gnu.org/ml/gcc-patches/2014-05/msg00837.html

gcc/
	* gimple.h (gimple_call_set_nothrow): Require a gimple_call.

	* trans-mem.c (ipa_tm_insert_gettmclone_call): Likewise.
	(ipa_tm_transform_calls_redirect): Add checked cast to gimple call; this
	is only called for gsi on a GIMPLE_CALL statement.
---
 gcc/ChangeLog.gimple-classes | 10 ++++++++++
 gcc/gimple.h                 |  3 +--
 gcc/trans-mem.c              |  4 ++--
 3 files changed, 13 insertions(+), 4 deletions(-)

diff --git a/gcc/ChangeLog.gimple-classes b/gcc/ChangeLog.gimple-classes
index 86e1718..21e051b 100644
--- a/gcc/ChangeLog.gimple-classes
+++ b/gcc/ChangeLog.gimple-classes
@@ -1,5 +1,15 @@
 2014-10-24  David Malcolm  <dmalcolm@redhat.com>
 
+	Concretize gimple_call_set_nothrow
+
+	* gimple.h (gimple_call_set_nothrow): Require a gimple_call.
+
+	* trans-mem.c (ipa_tm_insert_gettmclone_call): Likewise.
+	(ipa_tm_transform_calls_redirect): Add checked cast to gimple call; this
+	is only called for gsi on a GIMPLE_CALL statement.
+
+2014-10-24  David Malcolm  <dmalcolm@redhat.com>
+
 	Concretize various expressions from gimple to gimple_cond
 
 	* ipa-split.c (check_forbidden_calls): Replace check against
diff --git a/gcc/gimple.h b/gcc/gimple.h
index 4afb86f..e220228 100644
--- a/gcc/gimple.h
+++ b/gcc/gimple.h
@@ -2912,9 +2912,8 @@ gimple_call_noreturn_p (gimple s)
    even if the called function can throw in other cases.  */
 
 static inline void
-gimple_call_set_nothrow (gimple s, bool nothrow_p)
+gimple_call_set_nothrow (gimple_call s, bool nothrow_p)
 {
-  GIMPLE_CHECK (s, GIMPLE_CALL);
   if (nothrow_p)
     s->subcode |= GF_CALL_NOTHROW;
   else
diff --git a/gcc/trans-mem.c b/gcc/trans-mem.c
index 9e90812..98fd3a2 100644
--- a/gcc/trans-mem.c
+++ b/gcc/trans-mem.c
@@ -4988,7 +4988,7 @@ ipa_tm_insert_irr_call (struct cgraph_node *node, struct tm_region *region,
 static bool
 ipa_tm_insert_gettmclone_call (struct cgraph_node *node,
 			       struct tm_region *region,
-			       gimple_stmt_iterator *gsi, gimple stmt)
+			       gimple_stmt_iterator *gsi, gimple_call stmt)
 {
   tree gettm_fn, ret, old_fn, callfn;
   gimple_call g;
@@ -5088,7 +5088,7 @@ ipa_tm_transform_calls_redirect (struct cgraph_node *node,
 				 gimple_stmt_iterator *gsi,
 				 bool *need_ssa_rename_p)
 {
-  gimple stmt = gsi_stmt (*gsi);
+  gimple_call stmt = as_a <gimple_call> (gsi_stmt (*gsi));
   struct cgraph_node *new_node;
   struct cgraph_edge *e = node->get_edge (stmt);
   tree fndecl = gimple_call_fndecl (stmt);
-- 
1.8.5.3


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]