gimple stmt = gsi_stmt (gsi);
tree ret_val;
- if (gimple_code (stmt) == GIMPLE_RETURN)
+ if (greturn *return_stmt = dyn_cast <greturn *> (stmt))
{
/* In a function with an aggregate return value, the
gimplifier has changed all non-empty RETURN_EXPRs to
return the RESULT_DECL. */
- ret_val = gimple_return_retval (stmt);
+ ret_val = gimple_return_retval (return_stmt);
if (ret_val)
gcc_assert (ret_val == result);
}
DEST is available if it is not clobbered or used by the call. */
static bool
-dest_safe_for_nrv_p (gimple call)
+dest_safe_for_nrv_p (gcall *call)
{
tree dest = gimple_call_lhs (call);
gimple_stmt_iterator gsi;
for (gsi = gsi_start_bb (bb); !gsi_end_p (gsi); gsi_next (&gsi))
{
- gimple stmt = gsi_stmt (gsi);
+ gcall *stmt;
bool slot_opt_p;
- if (is_gimple_call (stmt)
+ stmt = dyn_cast <gcall *> (gsi_stmt (gsi));
+ if (stmt
&& gimple_call_lhs (stmt)
&& !gimple_call_return_slot_opt_p (stmt)
&& aggregate_value_p (TREE_TYPE (gimple_call_lhs (stmt)),