diff options
author | aoliva <aoliva@138bc75d-0d04-0410-961f-82ee72b054a4> | 2012-06-28 07:39:25 +0000 |
---|---|---|
committer | aoliva <aoliva@138bc75d-0d04-0410-961f-82ee72b054a4> | 2012-06-28 07:39:25 +0000 |
commit | 704e91bd4accea20d39aeb887d46e8800fecaef0 (patch) | |
tree | 5cb806a55543696d39711d3f54d8308c3a5c7ce9 /gcc/dce.c | |
parent | ef1d4212e0a3ee92d2c23ba6e5247a9a18663227 (diff) | |
download | gcc-704e91bd4accea20d39aeb887d46e8800fecaef0.tar.gz |
PR debug/53740
PR debug/52983
PR debug/48866
* dce.c (word_dce_process_block): Check whether inserting debug
temps are needed even for needed insns.
(dce_process_block): Likewise.
* df-problems.c (dead_debug_add): Add comment about multi-regs.
(dead_debug_insert_temp): Likewise. Don't subreg when we're
setting fewer regs than a multi-reg requires.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@189036 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/dce.c')
-rw-r--r-- | gcc/dce.c | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/gcc/dce.c b/gcc/dce.c index 8954d5c0c01..2e58e434356 100644 --- a/gcc/dce.c +++ b/gcc/dce.c @@ -864,9 +864,12 @@ word_dce_process_block (basic_block bb, bool redo_out) anything in local_live. */ if (marked_insn_p (insn)) df_word_lr_simulate_uses (insn, local_live); + /* Insert debug temps for dead REGs used in subsequent debug - insns. */ - else if (debug.used && !bitmap_empty_p (debug.used)) + insns. We may have to emit a debug temp even if the insn + was marked, in case the debug use was after the point of + death. */ + if (debug.used && !bitmap_empty_p (debug.used)) { df_ref *def_rec; @@ -963,9 +966,12 @@ dce_process_block (basic_block bb, bool redo_out, bitmap au) anything in local_live. */ if (needed) df_simulate_uses (insn, local_live); + /* Insert debug temps for dead REGs used in subsequent debug - insns. */ - else if (debug.used && !bitmap_empty_p (debug.used)) + insns. We may have to emit a debug temp even if the insn + was marked, in case the debug use was after the point of + death. */ + if (debug.used && !bitmap_empty_p (debug.used)) for (def_rec = DF_INSN_DEFS (insn); *def_rec; def_rec++) dead_debug_insert_temp (&debug, DF_REF_REGNO (*def_rec), insn, DEBUG_TEMP_BEFORE_WITH_VALUE); |