diff options
author | Eric Botcazou <ebotcazou@adacore.com> | 2018-10-13 17:32:07 +0000 |
---|---|---|
committer | Eric Botcazou <ebotcazou@gcc.gnu.org> | 2018-10-13 17:32:07 +0000 |
commit | 464b6c1117aa4b95cc4c7389cdb145461fc945be (patch) | |
tree | 020b9b1990641df80764fa9e680a14a7be7999c1 /gcc/dwarf2cfi.c | |
parent | f77bca9ac3942b830c1e508bc5ac6fd0df2056f7 (diff) | |
download | gcc-464b6c1117aa4b95cc4c7389cdb145461fc945be.zip gcc-464b6c1117aa4b95cc4c7389cdb145461fc945be.tar.gz gcc-464b6c1117aa4b95cc4c7389cdb145461fc945be.tar.bz2 |
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
Diffstat (limited to 'gcc/dwarf2cfi.c')
-rw-r--r-- | gcc/dwarf2cfi.c | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/gcc/dwarf2cfi.c b/gcc/dwarf2cfi.c index 4cfb91b..162d9f6 100644 --- a/gcc/dwarf2cfi.c +++ b/gcc/dwarf2cfi.c @@ -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); |