tree.h (BLOCK_IN_COLD_SECTION_P): Define.
authorJakub Jelinek <jakub@gcc.gnu.org>
Tue, 1 Nov 2016 16:54:49 +0000 (17:54 +0100)
committerJakub Jelinek <jakub@gcc.gnu.org>
Tue, 1 Nov 2016 16:54:49 +0000 (17:54 +0100)
commitaaec3d850a73cd951ccec98f2f55d62832ca2ee2
tree02b07823edbab232ca49394f2171c46ac7d7ad19
parentf10e37a1c18706b77559684f0ad70c8e50e4a45f
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
gcc/ChangeLog
gcc/dwarf2out.c
gcc/final.c
gcc/tree.h