diff options
author | Daniel Berlin <dberlin@dberlin.org> | 2005-01-06 14:49:34 +0000 |
---|---|---|
committer | Daniel Berlin <dberlin@gcc.gnu.org> | 2005-01-06 14:49:34 +0000 |
commit | 9acf766fe1b9fbdda3e7997f408912bfccfaf5fd (patch) | |
tree | 1ddf91f92e5dc4124c2a4d437f06fbfc711097b7 /gcc/gimple-low.c | |
parent | 56ffd9b3ba4aabf87ccea018096abf64ac7a1fba (diff) | |
download | gcc-9acf766fe1b9fbdda3e7997f408912bfccfaf5fd.zip gcc-9acf766fe1b9fbdda3e7997f408912bfccfaf5fd.tar.gz gcc-9acf766fe1b9fbdda3e7997f408912bfccfaf5fd.tar.bz2 |
Fix PR middle-end/19286 Fix PR debug/19267
2005-01-05 Daniel Berlin <dberlin@dberlin.org>
Fix PR middle-end/19286
Fix PR debug/19267
* dwarf2out.c (gen_subprogram_die): If we've already tried to
output this subprogram, simply ignore this attempt to do it again.
(add_abstract_origin_attribute): Don't abort trying to add the abstract
origin attribute if it's not possible.
(gen_block_die): Don't ignore subblocks of "unused" blocks.
(decls_for_scope): Ditto.
* gimple-low.c (mark_blocks_with_used_subblocks): Remove.
(mark_used_blocks): Don't call mark_blocks_with_used_subblocks.
From-SVN: r92991
Diffstat (limited to 'gcc/gimple-low.c')
-rw-r--r-- | gcc/gimple-low.c | 34 |
1 files changed, 2 insertions, 32 deletions
diff --git a/gcc/gimple-low.c b/gcc/gimple-low.c index ee57d9b..d86cc00 100644 --- a/gcc/gimple-low.c +++ b/gcc/gimple-low.c @@ -541,7 +541,7 @@ struct tree_opt_pass pass_remove_useless_vars = 0 /* letter */ }; -/* Mark BLOCK used if it has a used variable in it, then recurse over it's +/* Mark BLOCK used if it has a used variable in it, then recurse over its subblocks. */ static void @@ -569,42 +569,12 @@ mark_blocks_with_used_vars (tree block) mark_blocks_with_used_vars (subblock); } -/* Mark BLOCK used if any of it's subblocks have the USED bit set, or it's - abstract origin is used. */ - -static bool -mark_blocks_with_used_subblocks (tree block) -{ - tree subblock; - - /* The block may have no variables, but still be used, if it's abstract - origin is used. This occurs when we inline functions with no parameters - that call functions with no parameters or local vars (such as - dwarf2/dwarf-die7.c). You end up with a block that has an abstract - origin, no variables, and nothing in the subblocks is used. However, the - block is really used, because it's abstract origin was used. */ - - if (BLOCK_ABSTRACT_ORIGIN (block)) - { - if (TREE_USED (BLOCK_ABSTRACT_ORIGIN (block))) - TREE_USED (block) = true; - } - - for (subblock = BLOCK_SUBBLOCKS (block); - subblock; - subblock = BLOCK_CHAIN (subblock)) - TREE_USED (block) |= mark_blocks_with_used_subblocks (subblock); - return TREE_USED (block); -} - /* Mark the used attribute on blocks correctly. */ static void mark_used_blocks (void) -{ - +{ mark_blocks_with_used_vars (DECL_INITIAL (current_function_decl)); - mark_blocks_with_used_subblocks (DECL_INITIAL (current_function_decl)); } |