diff options
author | jakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4> | 2011-12-01 19:12:54 +0000 |
---|---|---|
committer | jakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4> | 2011-12-01 19:12:54 +0000 |
commit | 9bae88bcfc925af3466a440aae1e50274bccae3f (patch) | |
tree | a0a8960c1902ff04d8b319d3ba88cf5c4f64534b /gcc/cfgexpand.c | |
parent | 385c438bf5cf93e6f8f090ba73eae113d154ac25 (diff) | |
download | gcc-9bae88bcfc925af3466a440aae1e50274bccae3f.tar.gz |
PR debug/50317
* tree-ssa-dce.c (remove_dead_stmt): Add a debug stmt when removing
as unnecessary a store to a variable with gimple reg type.
* tree-ssa-live.c (remove_unused_locals): Clear TREE_ADDRESSABLE bit
on local unreferenced variables.
* cfgexpand.c (expand_gimple_basic_block): Don't emit DEBUG_INSNs
for !target_for_debug_bind variables.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@181890 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/cfgexpand.c')
-rw-r--r-- | gcc/cfgexpand.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/gcc/cfgexpand.c b/gcc/cfgexpand.c index 2a82b032f5d..e5a7a392eb4 100644 --- a/gcc/cfgexpand.c +++ b/gcc/cfgexpand.c @@ -3903,6 +3903,11 @@ expand_gimple_basic_block (basic_block bb) rtx val; enum machine_mode mode; + if (TREE_CODE (var) != DEBUG_EXPR_DECL + && TREE_CODE (var) != LABEL_DECL + && !target_for_debug_bind (var)) + goto delink_debug_stmt; + if (gimple_debug_bind_has_value_p (stmt)) value = gimple_debug_bind_get_value (stmt); else @@ -3932,6 +3937,7 @@ expand_gimple_basic_block (basic_block bb) PAT_VAR_LOCATION_LOC (val) = (rtx)value; } + delink_debug_stmt: /* In order not to generate too many debug temporaries, we delink all uses of debug statements we already expanded. Therefore debug statements between definition and real |