diff options
author | Richard Henderson <rth@redhat.com> | 2001-07-28 19:10:42 -0700 |
---|---|---|
committer | Richard Henderson <rth@gcc.gnu.org> | 2001-07-28 19:10:42 -0700 |
commit | a20612aa8b221eff034088038287f16449bb9e09 (patch) | |
tree | e6828ba8212c1bd787e1ea3b54680bdef5677a3b /gcc/tree.h | |
parent | 594280a3964b64125bc6259ee2fda308dfc01d36 (diff) | |
download | gcc-a20612aa8b221eff034088038287f16449bb9e09.zip gcc-a20612aa8b221eff034088038287f16449bb9e09.tar.gz gcc-a20612aa8b221eff034088038287f16449bb9e09.tar.bz2 |
dwarf2out.c (dw_val_class_offset): New.
* dwarf2out.c (dw_val_class_offset): New.
(struct dw_ranges_struct, dw_ranges_ref): New.
(ranges_table, ranges_table_allocated): New.
(ranges_table_in_use, RANGES_TABLE_INCREMENT): New.
(add_AT_offset, add_ranges, output_ranges): New.
(print_die, output_die): Handle dw_val_class_offset.
(attr_checksum, size_of_die, value_format): Likewise.
(gen_lexical_block_die): Handle non-contiguous blocks.
(gen_block_die): Likewise.
(dwarf2out_finish): Add a DW_AT_entry_pc to the compilation unit
if needed. Dump the ranges table.
* final.c (final_start_function): Remove unnecessary notes and
rebuild the block tree before numbering the blocks.
* function.c (reorder_blocks_0): Walk the existing block tree
to unmark all blocks.
(reorder_blocks_1): Create block fragments when duplicate block
notes are seen.
(reorder_fix_fragments): New.
(reorder_blocks): Call it.
* tree.h (BLOCK_FRAGMENT_ORIGIN, BLOCK_FRAGMENT_CHAIN): New.
From-SVN: r44444
Diffstat (limited to 'gcc/tree.h')
-rw-r--r-- | gcc/tree.h | 29 |
1 files changed, 29 insertions, 0 deletions
@@ -848,6 +848,33 @@ struct tree_exp the debugging output format in use. */ #define BLOCK_NUMBER(NODE) (BLOCK_CHECK (NODE)->block.block_num) +/* If block reordering splits a lexical block into discontiguous + address ranges, we'll make a copy of the original block. + + Note that this is logically distinct from BLOCK_ABSTRACT_ORIGIN. + In that case, we have one source block that has been replicated + (through inlining or unrolling) into many logical blocks, and that + these logical blocks have different physical variables in them. + + In this case, we have one logical block split into several + non-contiguous address ranges. Most debug formats can't actually + represent this idea directly, so we fake it by creating multiple + logical blocks with the same variables in them. However, for those + that do support non-contiguous regions, these allow the original + logical block to be reconstructed, along with the set of address + ranges. + + One of the logical block fragments is arbitrarily chosen to be + the ORIGIN. The other fragments will point to the origin via + BLOCK_FRAGMENT_ORIGIN; the origin itself will have this pointer + be null. The list of fragments will be chained through + BLOCK_FRAGMENT_CHAIN from the origin. */ + +#define BLOCK_FRAGMENT_ORIGIN(NODE) \ + (BLOCK_CHECK (NODE)->block.fragment_origin) +#define BLOCK_FRAGMENT_CHAIN(NODE) \ + (BLOCK_CHECK (NODE)->block.fragment_chain) + struct tree_block { struct tree_common common; @@ -860,6 +887,8 @@ struct tree_block union tree_node *subblocks; union tree_node *supercontext; union tree_node *abstract_origin; + union tree_node *fragment_origin; + union tree_node *fragment_chain; }; /* Define fields and accessors for nodes representing data types. */ |