参照元†
返り値†
/* Expand one gimple statement STMT and return the last RTL instruction
before any of the newly generated ones.
In addition to generating the necessary RTL instructions this also
sets REG_EH_REGION notes if necessary and sets the current source
location for diagnostics. */
static rtx_insn *
expand_gimple_stmt (gimple *stmt)
{
location_t saved_location = input_location;
rtx_insn *last = get_last_insn ();
int lp_nr;
gcc_assert (cfun);
/* We need to save and restore the current source location so that errors
discovered during expansion are emitted with the right location. But
it would be better if the diagnostic routines used the source location
embedded in the tree nodes rather than globals. */
if (gimple_has_location (stmt))
input_location = gimple_location (stmt);
expand_gimple_stmt_1 (stmt);
/* Free any temporaries used to evaluate this statement. */
free_temp_slots ();
input_location = saved_location;
/* Mark all insns that may trap. */
lp_nr = lookup_stmt_eh_lp (stmt);
if (lp_nr)
{
rtx_insn *insn;
for (insn = next_real_insn (last); insn;
insn = next_real_insn (insn))
{
if (! find_reg_note (insn, REG_EH_REGION, NULL_RTX)
/* If we want exceptions for non-call insns, any
may_trap_p instruction may throw. */
&& GET_CODE (PATTERN (insn)) != CLOBBER
&& GET_CODE (PATTERN (insn)) != USE
&& insn_could_throw_p (insn))
make_reg_eh_region_note (insn, 0, lp_nr);
}
}
return last;
}
コメント†