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/gimple.h | 3 +-- gcc/trans-mem.c | 4 ++-- 2 files changed, 3 insertions(+), 4 deletions(-)
diff --git a/gcc/gimple.h b/gcc/gimple.h index accd4e9..f3242c4 100644 --- a/gcc/gimple.h +++ b/gcc/gimple.h @@ -3190,9 +3190,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 f3b9a8d..8ec892c 100644 --- a/gcc/trans-mem.c +++ b/gcc/trans-mem.c @@ -5014,7 +5014,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; @@ -5111,7 +5111,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 = gsi_stmt (*gsi)->as_a_gimple_call (); struct cgraph_node *new_node; struct cgraph_edge *e = cgraph_edge (node, stmt); tree fndecl = gimple_call_fndecl (stmt); -- 1.8.5.3