@@ -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
@@ -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
@@ -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);
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(-)