dwarf2cfi.c (struct dw_trace_info): Add args_size_defined_for_eh.
* dwarf2cfi.c (struct dw_trace_info): Add args_size_defined_for_eh. (notice_args_size): Set it in the current trace if no insn that can throw internally has been seen yet. (connect_traces): When connecting args_size between traces, allow the incoming values not to match if there is an insn setting it before the first insn that can throw internally; in that case, force the creation of a CFI note on this latter insn. From-SVN: r265142
This commit is contained in:
parent
f77bca9ac3
commit
464b6c1117
2 changed files with 24 additions and 2 deletions
|
@ -1,3 +1,13 @@
|
|||
2018-10-13 Eric Botcazou <ebotcazou@adacore.com>
|
||||
|
||||
* dwarf2cfi.c (struct dw_trace_info): Add args_size_defined_for_eh.
|
||||
(notice_args_size): Set it in the current trace if no insn that can
|
||||
throw internally has been seen yet.
|
||||
(connect_traces): When connecting args_size between traces, allow the
|
||||
incoming values not to match if there is an insn setting it before the
|
||||
first insn that can throw internally; in that case, force the creation
|
||||
of a CFI note on this latter insn.
|
||||
|
||||
2018-10-13 Jonathan Wakely <jwakely@redhat.com>
|
||||
|
||||
* opt-problem.h (opt_wrapper): Use template-argument-list when naming
|
||||
|
|
|
@ -147,6 +147,9 @@ struct dw_trace_info
|
|||
|
||||
/* True if we've seen different values incoming to beg_true_args_size. */
|
||||
bool args_size_undefined;
|
||||
|
||||
/* True if we've seen an insn with a REG_ARGS_SIZE note before EH_HEAD. */
|
||||
bool args_size_defined_for_eh;
|
||||
};
|
||||
|
||||
|
||||
|
@ -942,6 +945,9 @@ notice_args_size (rtx_insn *insn)
|
|||
if (note == NULL)
|
||||
return;
|
||||
|
||||
if (!cur_trace->eh_head)
|
||||
cur_trace->args_size_defined_for_eh = true;
|
||||
|
||||
args_size = get_args_size (note);
|
||||
delta = args_size - cur_trace->end_true_args_size;
|
||||
if (known_eq (delta, 0))
|
||||
|
@ -2820,11 +2826,17 @@ connect_traces (void)
|
|||
|
||||
if (ti->switch_sections)
|
||||
prev_args_size = 0;
|
||||
|
||||
if (ti->eh_head == NULL)
|
||||
continue;
|
||||
gcc_assert (!ti->args_size_undefined);
|
||||
|
||||
if (maybe_ne (ti->beg_delay_args_size, prev_args_size))
|
||||
/* We require either the incoming args_size values to match or the
|
||||
presence of an insn setting it before the first EH insn. */
|
||||
gcc_assert (!ti->args_size_undefined || ti->args_size_defined_for_eh);
|
||||
|
||||
/* In the latter case, we force the creation of a CFI note. */
|
||||
if (ti->args_size_undefined
|
||||
|| maybe_ne (ti->beg_delay_args_size, prev_args_size))
|
||||
{
|
||||
/* ??? Search back to previous CFI note. */
|
||||
add_cfi_insn = PREV_INSN (ti->eh_head);
|
||||
|
|
Loading…
Add table
Reference in a new issue