Commit 823ff7b4 by Bernd Schmidt Committed by Bernd Schmidt

df-problems.c (df_simulate_initialize_forwards): Set, don't clear, bits for…

df-problems.c (df_simulate_initialize_forwards): Set, don't clear, bits for artificial defs at the top of the block.

	* df-problems.c (df_simulate_initialize_forwards): Set, don't clear,
	bits for artificial defs at the top of the block.
	* fwprop.c (single_def_use_enter_block): Don't call it.

From-SVN: r158750
parent 1637c2e1
2010-04-26 Bernd Schmidt <bernds@codesourcery.com>
* df-problems.c (df_simulate_initialize_forwards): Set, don't clear,
bits for artificial defs at the top of the block.
* fwprop.c (single_def_use_enter_block): Don't call it.
2010-04-26 Jack Howarth <howarth@bromo.med.uc.edu> 2010-04-26 Jack Howarth <howarth@bromo.med.uc.edu>
PR 43715 PR 43715
......
...@@ -3913,13 +3913,9 @@ df_simulate_finalize_backwards (basic_block bb, bitmap live) ...@@ -3913,13 +3913,9 @@ df_simulate_finalize_backwards (basic_block bb, bitmap live)
the block, starting with the first one. the block, starting with the first one.
----------------------------------------------------------------------------*/ ----------------------------------------------------------------------------*/
/* Apply the artificial uses and defs at the top of BB in a forwards /* Initialize the LIVE bitmap, which should be copied from DF_LIVE_IN or
direction. ??? This is wrong; defs mark the point where a pseudo DF_LR_IN for basic block BB, for forward scanning by marking artificial
becomes live when scanning forwards (unless a def is unused). Since defs live. */
there are no REG_UNUSED notes for artificial defs, passes that
require artificial defs probably should not call this function
unless (as is the case for fwprop) they are correct when liveness
bitmaps are *under*estimated. */
void void
df_simulate_initialize_forwards (basic_block bb, bitmap live) df_simulate_initialize_forwards (basic_block bb, bitmap live)
...@@ -3931,7 +3927,7 @@ df_simulate_initialize_forwards (basic_block bb, bitmap live) ...@@ -3931,7 +3927,7 @@ df_simulate_initialize_forwards (basic_block bb, bitmap live)
{ {
df_ref def = *def_rec; df_ref def = *def_rec;
if (DF_REF_FLAGS (def) & DF_REF_AT_TOP) if (DF_REF_FLAGS (def) & DF_REF_AT_TOP)
bitmap_clear_bit (live, DF_REF_REGNO (def)); bitmap_set_bit (live, DF_REF_REGNO (def));
} }
} }
......
...@@ -228,7 +228,10 @@ single_def_use_enter_block (struct dom_walk_data *walk_data ATTRIBUTE_UNUSED, ...@@ -228,7 +228,10 @@ single_def_use_enter_block (struct dom_walk_data *walk_data ATTRIBUTE_UNUSED,
process_uses (df_get_artificial_uses (bb_index), DF_REF_AT_TOP); process_uses (df_get_artificial_uses (bb_index), DF_REF_AT_TOP);
process_defs (df_get_artificial_defs (bb_index), DF_REF_AT_TOP); process_defs (df_get_artificial_defs (bb_index), DF_REF_AT_TOP);
df_simulate_initialize_forwards (bb, local_lr);
/* We don't call df_simulate_initialize_forwards, as it may overestimate
the live registers if there are unused artificial defs. We prefer
liveness to be underestimated. */
FOR_BB_INSNS (bb, insn) FOR_BB_INSNS (bb, insn)
if (INSN_P (insn)) if (INSN_P (insn))
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment