Psst.. new poll here.
Psst.. new forums here.
Microsoft is blocking us again (TY IP Reputation!) so just use oauth login instead. :)
Paste
Pasted as text by stevenb ( 19 years ago )
Index: fwprop.c
===================================================================
--- fwprop.c (revision 120322)
+++ fwprop.c (working copy)
@@ -929,7 +929,6 @@ fwprop_init (void)
FOR_EACH_BB (bb)
df_recompute_luids (bb);
df_analyze ();
- df_maybe_reorganize_use_refs ();
df_set_flags (DF_DEFER_INSN_RESCAN);
}
@@ -962,24 +961,33 @@ gate_fwprop (void)
static unsigned int
fwprop (void)
{
- unsigned i;
+ int i;
fwprop_init ();
- /* Go through all the uses. update_df will create new ones at the
- end, and we'll go through them as well.
+ /* Go through the uses of all insns.
Do not forward propagate addresses into loops until after unrolling.
CSE did so because it was able to fix its own mess, but we are not. */
- for (i = 0; i < DF_USES_TABLE_SIZE (); i++)
+ for (i = df->n_blocks - 1; i >= 0; --i)
{
- struct df_ref *use = DF_USES_GET (i);
- if (use)
- if (!current_loops
- || DF_REF_TYPE (use) == DF_REF_REG_USE
- || DF_REF_BB (use)->loop_father == NULL)
- forward_propagate_into (use);
+ basic_block bb = BASIC_BLOCK (df->postorder[i]);
+ rtx insn;
+
+ FOR_BB_INSNS (bb, insn)
+ {
+ struct df_ref *use, *next;
+
+ for (use = DF_INSN_USES (insn); use; use = next)
+ {
+ next = DF_REF_NEXT_REF (use);
+ if (!current_loops
+ || DF_REF_TYPE (use) == DF_REF_REG_USE
+ || DF_REF_BB (use)->loop_father == NULL)
+ forward_propagate_into (use);
+ }
+ }
}
fwprop_done ();
@@ -1016,6 +1024,7 @@ fwprop_addr (void)
{
unsigned i;
fwprop_init ();
+ df_maybe_reorganize_use_refs ();
/* Go through all the uses. update_df will create new ones at the
end, and we'll go through them as well. */
Revise this Paste