summaryrefslogtreecommitdiff
path: root/gcc/tree-ssa-live.c
diff options
context:
space:
mode:
authorhubicka <hubicka@138bc75d-0d04-0410-961f-82ee72b054a4>2009-03-01 18:47:08 +0000
committerhubicka <hubicka@138bc75d-0d04-0410-961f-82ee72b054a4>2009-03-01 18:47:08 +0000
commit4b5d70fdd1d02a25b22ebaf6626ce017fc86f4d9 (patch)
treedccb239dddee2386961ca60f8919f7c0e70cf106 /gcc/tree-ssa-live.c
parent9af964d4a49319aa1148819f21c2a352c2ea44e0 (diff)
downloadgcc-4b5d70fdd1d02a25b22ebaf6626ce017fc86f4d9.tar.gz
PR debug/39267
* tree.h (BLOCK_NONLOCALIZED_VARS, BLOCK_NUM_NONLOCALIZED_VARS, BLOCK_NONLOCALIZED_VAR): New macros. (tree_block): Add nonlocalized_vars. * dwarf2out.c (gen_formal_parameter_die, gen_variable_die, gen_decl_die): Add origin argument; allow generation of die with origin at hand only. (gen_member_die, gen_type_die_with_usage, force_decl_die, declare_in_namespace, gen_namescpace_die, dwarf2out_decl): Update use of gen_*. (gen_block_die): Fix checking for unused blocks. (process_scope_var): Break out from .... ; work with origins only. (decls_for_scope) ... here; process nonlocalized list. (dwarf2out_ignore_block): Look for nonlocalized vars. * tree-ssa-live.c (remove_unused_scope_block_p): Look for nonlocalized vars. (dump_scope_block): Dump them. * tree-inline.c (remap_decls): Handle nonlocalized vars. (remap_block): Likewise. (can_be_nonlocal): New predicate. (copy_bind_expr, copy_gimple_bind): Update use of remap_block. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@144529 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/tree-ssa-live.c')
-rw-r--r--gcc/tree-ssa-live.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/gcc/tree-ssa-live.c b/gcc/tree-ssa-live.c
index 15166cc8f5e..28a829caedf 100644
--- a/gcc/tree-ssa-live.c
+++ b/gcc/tree-ssa-live.c
@@ -583,7 +583,7 @@ remove_unused_scope_block_p (tree scope)
else if (debug_info_level == DINFO_LEVEL_NONE
|| debug_info_level == DINFO_LEVEL_TERSE)
;
- else if (BLOCK_VARS (scope))
+ else if (BLOCK_VARS (scope) || BLOCK_NUM_NONLOCALIZED_VARS (scope))
unused = false;
/* See if this block is important for representation of inlined function.
Inlined functions are always represented by block with
@@ -613,6 +613,7 @@ static void
dump_scope_block (FILE *file, int indent, tree scope, int flags)
{
tree var, t;
+ unsigned int i;
fprintf (file, "\n%*s{ Scope block #%i%s%s",indent, "" , BLOCK_NUMBER (scope),
TREE_USED (scope) ? "" : " (unused)",
@@ -648,6 +649,13 @@ dump_scope_block (FILE *file, int indent, tree scope, int flags)
print_generic_decl (file, var, flags);
fprintf (file, "%s\n", used ? "" : " (unused)");
}
+ for (i = 0; i < BLOCK_NUM_NONLOCALIZED_VARS (scope); i++)
+ {
+ fprintf (file, "%*s",indent, "");
+ print_generic_decl (file, BLOCK_NONLOCALIZED_VAR (scope, i),
+ flags);
+ fprintf (file, " (nonlocalized)\n");
+ }
for (t = BLOCK_SUBBLOCKS (scope); t ; t = BLOCK_CHAIN (t))
dump_scope_block (file, indent + 2, t, flags);
fprintf (file, "\n%*s}\n",indent, "");