diff options
author | Jakub Jelinek <jakub@redhat.com> | 2012-10-30 09:08:01 +0100 |
---|---|---|
committer | Jakub Jelinek <jakub@gcc.gnu.org> | 2012-10-30 09:08:01 +0100 |
commit | 85d874975afa49098a9119c9fe61d104c2d50d1c (patch) | |
tree | f8f26e88fe761dcc00566b4a2b95688abb002871 /gcc/dce.c | |
parent | d863d14312412121fc138f607258e7a86e72a7a8 (diff) | |
download | gcc-85d874975afa49098a9119c9fe61d104c2d50d1c.zip gcc-85d874975afa49098a9119c9fe61d104c2d50d1c.tar.gz gcc-85d874975afa49098a9119c9fe61d104c2d50d1c.tar.bz2 |
re PR debug/54953 (New sra-1.c FAILs on powerpc)
PR debug/54953
* valtrack.h (DEBUG_TEMP_AFTER_WITH_REG_FORCE): New.
* valtrack.c (dead_debug_insert_temp): Use emit_debug_insn_after
even for where == DEBUG_TEMP_AFTER_WITH_REG_FORCE.
* dce.c (word_dce_process_block, dce_process_block): Pass
DEBUG_TEMP_AFTER_WITH_REG_FORCE if insn is needed and therefore
not going to be eliminated.
From-SVN: r192978
Diffstat (limited to 'gcc/dce.c')
-rw-r--r-- | gcc/dce.c | 11 |
1 files changed, 8 insertions, 3 deletions
@@ -1,5 +1,5 @@ /* RTL dead code elimination. - Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010, 2011 + Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 Free Software Foundation, Inc. This file is part of GCC. @@ -880,7 +880,10 @@ word_dce_process_block (basic_block bb, bool redo_out, 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); + marked_insn_p (insn) + && !control_flow_insn_p (insn) + ? DEBUG_TEMP_AFTER_WITH_REG_FORCE + : DEBUG_TEMP_BEFORE_WITH_VALUE); } if (dump_file) @@ -981,7 +984,9 @@ dce_process_block (basic_block bb, bool redo_out, bitmap au, 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); + needed && !control_flow_insn_p (insn) + ? DEBUG_TEMP_AFTER_WITH_REG_FORCE + : DEBUG_TEMP_BEFORE_WITH_VALUE); } dead_debug_local_finish (&debug, NULL); |