summaryrefslogtreecommitdiff
path: root/gcc/dwarfout.c
diff options
context:
space:
mode:
authormmitchel <mmitchel@138bc75d-0d04-0410-961f-82ee72b054a4>2000-02-28 09:51:42 +0000
committermmitchel <mmitchel@138bc75d-0d04-0410-961f-82ee72b054a4>2000-02-28 09:51:42 +0000
commit5846cb0f7c383a8d45735243e411fb6a5ecb6f70 (patch)
treec60c5f52d93613b9b8942daef3cae9ee63895c8b /gcc/dwarfout.c
parentb36bad98246ccb819e80a8f7b42cc17abd6aff0e (diff)
downloadgcc-5846cb0f7c383a8d45735243e411fb6a5ecb6f70.tar.gz
* emit-rtl.c (remove_unncessary_notes): Remove notes for empty
blocks. * final.c (next_block_index): Remove. (max_block_depth): Likewise. (pending_blocks): Likewise. (init_final): Don't initialize them. (final_start_function): Don't set next_block_index. Set up BLOCK_NUMBER. (final_scan_insn): Use BLOCK_NUMBER, not next_block_index. * function.h (number_blocks): New function. * function.c (get_block_vector): New function. (identify_blocks): Use it. (reorder_blocks): Set NOTE_BLOCK. (number_blocks): New function. * tree.def (BLOCK): Add documentation for TREE_ASM_WRITTEN flag. * tree.h (BLOCK_NUMBER): New macro. (tree_block): Add block_num field. * dbxout.c (next_block_number): Remove. (dbxout_init): Don't set it. (dbxout_block): Only output blocks that have TREE_ASM_WRITTEN set. Use BLOCK_NUMBER, rather than next_block_num, to determine block numbers. * toplev.c (rest_of_compilation): Always call find_loop_tree_blocks. Fix indentation. * dwarf2out.c (next_block_number): Remove. (gen_lexical_block_die): Use BLOCK_NUMBER, not next_block_number, to determine block numbers. (gen_inlined_subroutine_die): Likewise. (gen_block_die): Only output blocks that have TREE_ASM_WRITTEN set. (decls_for_scope): Don't increment next_block_number. * dwarfout.c (next_block_number): Remove. (output_lexical_block_die): Use BLOCK_NUMBER, not next_block_number, to determine block numbers. (output_inlined_subroutine_die): Likewise. (output_block): Only output blocks that have TREE_ASM_WRITTEN set. (output_decls_for_scope): Don't increment next_block_number. * sdbout.c (next_block_number): Remove. (sdbout_block): Use BLOCK_NUMBER. (sdbout_begin_block): Simplify. * xcoffout.c (next_block_number): Remove. (xcoffout_block): Use BLOCK_NUMBER, not next_block_number. (xcoffout_begin_block): Don't set next_block_number. (xcoffout_begin_function): Likewise. Use BLOCK_NUMBER, not next_block_number. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@32228 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/dwarfout.c')
-rw-r--r--gcc/dwarfout.c23
1 files changed, 5 insertions, 18 deletions
diff --git a/gcc/dwarfout.c b/gcc/dwarfout.c
index ab7fef006d1..08dc41cfdb7 100644
--- a/gcc/dwarfout.c
+++ b/gcc/dwarfout.c
@@ -195,16 +195,6 @@ static char *primary_filename;
static char *last_filename;
-/* For Dwarf output, we must assign lexical-blocks id numbers
- in the order in which their beginnings are encountered.
- We output Dwarf debugging info that refers to the beginnings
- and ends of the ranges of code for each lexical block with
- assembler labels ..Bn and ..Bn.e, where n is the block number.
- The labels themselves are generated in final.c, which assigns
- numbers to the blocks in the same way. */
-
-static unsigned next_block_number = 2;
-
/* Counter to generate unique names for DIEs. */
static unsigned next_unused_dienum = 1;
@@ -3601,9 +3591,9 @@ output_lexical_block_die (arg)
char begin_label[MAX_ARTIFICIAL_LABEL_BYTES];
char end_label[MAX_ARTIFICIAL_LABEL_BYTES];
- sprintf (begin_label, BLOCK_BEGIN_LABEL_FMT, next_block_number);
+ sprintf (begin_label, BLOCK_BEGIN_LABEL_FMT, BLOCK_NUMBER (stmt));
low_pc_attribute (begin_label);
- sprintf (end_label, BLOCK_END_LABEL_FMT, next_block_number);
+ sprintf (end_label, BLOCK_END_LABEL_FMT, BLOCK_NUMBER (stmt));
high_pc_attribute (end_label);
}
}
@@ -3623,9 +3613,9 @@ output_inlined_subroutine_die (arg)
char begin_label[MAX_ARTIFICIAL_LABEL_BYTES];
char end_label[MAX_ARTIFICIAL_LABEL_BYTES];
- sprintf (begin_label, BLOCK_BEGIN_LABEL_FMT, next_block_number);
+ sprintf (begin_label, BLOCK_BEGIN_LABEL_FMT, BLOCK_NUMBER (stmt));
low_pc_attribute (begin_label);
- sprintf (end_label, BLOCK_END_LABEL_FMT, next_block_number);
+ sprintf (end_label, BLOCK_END_LABEL_FMT, BLOCK_NUMBER (stmt));
high_pc_attribute (end_label);
}
}
@@ -4633,7 +4623,7 @@ output_block (stmt, depth)
/* Ignore blocks never really used to make RTL. */
- if (! stmt || ! TREE_USED (stmt))
+ if (! stmt || ! TREE_USED (stmt) || !TREE_ASM_WRITTEN (stmt))
return;
/* Determine the "ultimate origin" of this block. This block may be an
@@ -4725,9 +4715,6 @@ output_decls_for_scope (stmt, depth)
if (! stmt || ! TREE_USED (stmt))
return;
- if (! BLOCK_ABSTRACT (stmt) && depth > 0)
- next_block_number++;
-
/* Output the DIEs to represent all of the data objects, functions,
typedefs, and tagged types declared directly within this block
but not within any nested sub-blocks. */