re PR rtl-optimization/42889 ("-fcompare-debug failure (length)" with "-O1 -fgcse")
PR rtl-optimization/42889 * df.h (df_set_bb_dirty_nonlr): New prototype. * df-core.c (df_set_bb_dirty_nonlr): New function. * df-scan.c (df_insn_rescan): Call it instead of df_set_bb_dirty for DEBUG_INSNs. * gcc.dg/pr42889.c: New test. From-SVN: r156344
This commit is contained in:
parent
38bc76da3d
commit
c23cd1d60f
|
@ -1,3 +1,11 @@
|
|||
2010-01-29 Jakub Jelinek <jakub@redhat.com>
|
||||
|
||||
PR rtl-optimization/42889
|
||||
* df.h (df_set_bb_dirty_nonlr): New prototype.
|
||||
* df-core.c (df_set_bb_dirty_nonlr): New function.
|
||||
* df-scan.c (df_insn_rescan): Call it instead of
|
||||
df_set_bb_dirty for DEBUG_INSNs.
|
||||
|
||||
2010-01-29 Richard Guenther <rguenther@suse.de>
|
||||
|
||||
PR middle-end/37448
|
||||
|
|
|
@ -1354,6 +1354,30 @@ df_set_bb_dirty (basic_block bb)
|
|||
}
|
||||
|
||||
|
||||
/* Mark BB as needing it's transfer functions as being out of
|
||||
date, except for LR problem. Used when analyzing DEBUG_INSNs,
|
||||
as LR problem can trigger DCE, and DEBUG_INSNs shouldn't ever
|
||||
shorten or enlarge lifetime of regs. */
|
||||
|
||||
void
|
||||
df_set_bb_dirty_nonlr (basic_block bb)
|
||||
{
|
||||
if (df)
|
||||
{
|
||||
int p;
|
||||
for (p = 1; p < df->num_problems_defined; p++)
|
||||
{
|
||||
struct dataflow *dflow = df->problems_in_order[p];
|
||||
if (dflow == df_lr)
|
||||
continue;
|
||||
if (dflow->out_of_date_transfer_functions)
|
||||
bitmap_set_bit (dflow->out_of_date_transfer_functions, bb->index);
|
||||
dflow->solutions_dirty = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/* Clear the dirty bits. This is called from places that delete
|
||||
blocks. */
|
||||
static void
|
||||
|
|
|
@ -1301,7 +1301,10 @@ df_insn_rescan (rtx insn)
|
|||
}
|
||||
|
||||
df_refs_add_to_chains (&collection_rec, bb, insn);
|
||||
df_set_bb_dirty (bb);
|
||||
if (DEBUG_INSN_P (insn))
|
||||
df_set_bb_dirty_nonlr (bb);
|
||||
else
|
||||
df_set_bb_dirty (bb);
|
||||
|
||||
VEC_free (df_ref, stack, collection_rec.def_vec);
|
||||
VEC_free (df_ref, stack, collection_rec.use_vec);
|
||||
|
|
1
gcc/df.h
1
gcc/df.h
|
@ -912,6 +912,7 @@ extern void df_simple_dataflow (enum df_flow_dir, df_init_function,
|
|||
extern void df_mark_solutions_dirty (void);
|
||||
extern bool df_get_bb_dirty (basic_block);
|
||||
extern void df_set_bb_dirty (basic_block);
|
||||
extern void df_set_bb_dirty_nonlr (basic_block);
|
||||
extern void df_compact_blocks (void);
|
||||
extern void df_bb_replace (int, basic_block);
|
||||
extern void df_bb_delete (int);
|
||||
|
|
|
@ -1,3 +1,8 @@
|
|||
2010-01-29 Jakub Jelinek <jakub@redhat.com>
|
||||
|
||||
PR rtl-optimization/42889
|
||||
* gcc.dg/pr42889.c: New test.
|
||||
|
||||
2010-01-28 H.J. Lu <hongjiu.lu@intel.com>
|
||||
|
||||
* gcc.target/i386/pr42881.c: Use SSE2.
|
||||
|
|
|
@ -0,0 +1,13 @@
|
|||
/* PR rtl-optimization/42889 */
|
||||
/* { dg-do compile } */
|
||||
/* { dg-options "-O -fgcse -fcompare-debug" } */
|
||||
|
||||
extern int A[], B[];
|
||||
|
||||
int
|
||||
foo (int x, int c, int i)
|
||||
{
|
||||
if (A[i] && B[i])
|
||||
x = x % ((c & 4) ? 8 : 4);
|
||||
return x;
|
||||
}
|
Loading…
Reference in New Issue