diff options
author | Jakub Jelinek <jakub@gcc.gnu.org> | 2016-11-01 17:54:49 +0100 |
---|---|---|
committer | Jakub Jelinek <jakub@gcc.gnu.org> | 2016-11-01 17:54:49 +0100 |
commit | aaec3d850a73cd951ccec98f2f55d62832ca2ee2 (patch) | |
tree | 02b07823edbab232ca49394f2171c46ac7d7ad19 /gcc/final.c | |
parent | f10e37a1c18706b77559684f0ad70c8e50e4a45f (diff) | |
download | gcc-aaec3d850a73cd951ccec98f2f55d62832ca2ee2.zip gcc-aaec3d850a73cd951ccec98f2f55d62832ca2ee2.tar.gz gcc-aaec3d850a73cd951ccec98f2f55d62832ca2ee2.tar.bz2 |
tree.h (BLOCK_IN_COLD_SECTION_P): Define.
* tree.h (BLOCK_IN_COLD_SECTION_P): Define.
* final.c (final_scan_insn): Set BLOCK_IN_COLD_SECTION_P.
* dwarf2out.c (rnglist_idx): New variable.
(struct dw_ranges): Add label, idx and maybe_new_sec fields.
(DEBUG_RNGLISTS_SECTION): Define.
(ranges_base_label): New variable.
(size_of_die) <case dw_val_class_range_list>: If using
DW_FORM_rnglistx, count size of uleb128 of range list index.
(value_format) <case dw_val_class_range_list>: For
-gdwarf-5 -gsplit-dwarf return DW_FORM_rnglistx.
(output_range_list_offset): Handle -gdwarf-5 .debug_rnglists
offsets. Multiply dwarf < 5 offsets by 2 * DWARF_ADDR_SIZE.
(add_ranges_num): Remove useless prototype. Don't multiply
by 2 * DWARF2_ADDR_SIZE. Add maybe_new_sec argument, adjust
for new fields added to dw_ranges struct.
(add_ranges): Add maybe_new_sec argument and pass it
through to add_ranges_num.
(note_rnglist_head): New function.
(add_ranges_by_labels): Pass true as maybe_new_sec to
add_ranges_num, call note_rnglist_head on the head of the list.
(output_ranges): Add function comment. Switch to
.debug_ranges section here and emit .Ldebug_ranges0 label.
(index_rnglists, output_rnglists): New functions.
(gen_subprogram_die): Formatting fixes.
(add_high_low_attributes): Don't divide offsets
by 2 * DWARF2_ADDR_SIZE. Call note_rnglist_head on the
first list element or when pointing into the middle of
a list. Pass true as second argument to add_ranges on the
first block fragment after cold/hot section switch.
(init_sections_and_labels): For -gdwarf-5 use .debug_rnglists
section instead of .debug_ranges. Initialize
ranges_base_label if -gdwarf-5 -gsplit-dwarf.
(dwarf2out_finish): For -gdwarf-5 -gsplit-dwarf call
index_rnglists and add DW_AT_rnglists_base attr. Don't switch
to dwarf_ranges_section here or emit .Ldebug_ranges0 label.
Call output_rnglists for -gdwarf-5.
(dwarf2out_c_finalize): Clear rnglist_idx.
From-SVN: r241747
Diffstat (limited to 'gcc/final.c')
-rw-r--r-- | gcc/final.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/gcc/final.c b/gcc/final.c index 36ef755..71dba7c 100644 --- a/gcc/final.c +++ b/gcc/final.c @@ -2323,6 +2323,7 @@ final_scan_insn (rtx_insn *insn, FILE *file, int optimize_p ATTRIBUTE_UNUSED, /* Mark this block as output. */ TREE_ASM_WRITTEN (NOTE_BLOCK (insn)) = 1; + BLOCK_IN_COLD_SECTION_P (NOTE_BLOCK (insn)) = in_cold_section_p; } if (write_symbols == DBX_DEBUG || write_symbols == SDB_DEBUG) @@ -2355,6 +2356,8 @@ final_scan_insn (rtx_insn *insn, FILE *file, int optimize_p ATTRIBUTE_UNUSED, if (!DECL_IGNORED_P (current_function_decl)) debug_hooks->end_block (high_block_linenum, n); + gcc_assert (BLOCK_IN_COLD_SECTION_P (NOTE_BLOCK (insn)) + == in_cold_section_p); } if (write_symbols == DBX_DEBUG || write_symbols == SDB_DEBUG) |