re PR debug/52983 (internal compiler error: in df_uses_record, at df-scan.c:3243)
PR debug/52983 PR debug/48866 * dce.c (word_dce_process_block): Insert debug temps only if the insn is not marked. (dce_process_block): Likewise, and if debug.used is not empty, and only after iterating over all DEFs that might mark the insn. From-SVN: r188527
This commit is contained in:
parent
21d01365ab
commit
39bc0f01ef
2 changed files with 25 additions and 14 deletions
|
@ -1,3 +1,12 @@
|
|||
2012-06-13 Alexandre Oliva <aoliva@redhat.com>
|
||||
|
||||
PR debug/52983
|
||||
PR debug/48866
|
||||
* dce.c (word_dce_process_block): Insert debug temps only if the
|
||||
insn is not marked.
|
||||
(dce_process_block): Likewise, and if debug.used is not empty,
|
||||
and only after iterating over all DEFs that might mark the insn.
|
||||
|
||||
2012-06-13 Alexandre Oliva <aoliva@redhat.com>
|
||||
|
||||
* common.opt (ftree-coalesce-inlined-vars): New.
|
||||
|
|
30
gcc/dce.c
30
gcc/dce.c
|
@ -857,8 +857,9 @@ 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);
|
||||
|
||||
if (debug.used && !bitmap_empty_p (debug.used))
|
||||
/* Insert debug temps for dead REGs used in subsequent debug
|
||||
insns. */
|
||||
else if (debug.used && !bitmap_empty_p (debug.used))
|
||||
{
|
||||
df_ref *def_rec;
|
||||
|
||||
|
@ -939,18 +940,13 @@ dce_process_block (basic_block bb, bool redo_out, bitmap au)
|
|||
/* The insn is needed if there is someone who uses the output. */
|
||||
if (!needed)
|
||||
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);
|
||||
|
||||
if (bitmap_bit_p (local_live, DF_REF_REGNO (*def_rec))
|
||||
|| bitmap_bit_p (au, DF_REF_REGNO (*def_rec)))
|
||||
{
|
||||
needed = true;
|
||||
mark_insn (insn, true);
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (bitmap_bit_p (local_live, DF_REF_REGNO (*def_rec))
|
||||
|| bitmap_bit_p (au, DF_REF_REGNO (*def_rec)))
|
||||
{
|
||||
needed = true;
|
||||
mark_insn (insn, true);
|
||||
break;
|
||||
}
|
||||
|
||||
/* No matter if the instruction is needed or not, we remove
|
||||
any regno in the defs from the live set. */
|
||||
|
@ -960,6 +956,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))
|
||||
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);
|
||||
}
|
||||
|
||||
dead_debug_finish (&debug, NULL);
|
||||
|
|
Loading…
Add table
Reference in a new issue