+2019-04-04 Richard Sandiford <richard.sandiford@arm.com>
+
+ PR rtl-optimization/46590
+ * loop-invariant.c (find_defs): Move df_remove_problem and
+ df_process_deferred_rescans to move_invariants.
+ Move df_live_add_problem and df_live_set_all_dirty calls
+ to move_invariants.
+ (move_invariants): Likewise.
+ (move_loop_invariants): Likewise, making the df_live calls
+ conditional on -O. Remove the problem again if we added it
+ locally.
+
2019-04-03 qing zhao <qing.zhao@oracle.com>
PR tree-optimization/89730
loop->num);
}
- df_remove_problem (df_chain);
- df_process_deferred_rescans ();
df_chain_add_problem (DF_UD_CHAIN);
- df_live_add_problem ();
- df_live_set_all_dirty ();
df_set_flags (DF_RD_PRUNE_DEAD_DEFS);
df_analyze_loop (loop);
check_invariant_table_size ();
GENERAL_REGS, NO_REGS, GENERAL_REGS);
}
}
+ /* Remove the DF_UD_CHAIN problem added in find_defs before rescanning,
+ to save a bit of compile time. */
+ df_remove_problem (df_chain);
+ df_process_deferred_rescans ();
}
/* Initializes invariant motion data. */
{
struct loop *loop;
+ if (optimize == 1)
+ df_live_add_problem ();
+ /* ??? This is a hack. We should only need to call df_live_set_all_dirty
+ for optimize == 1, but can_move_invariant_reg relies on DF_INSN_LUID
+ being up-to-date. That isn't always true (even after df_analyze)
+ because df_process_deferred_rescans doesn't necessarily cause
+ blocks to be rescanned. */
+ df_live_set_all_dirty ();
if (flag_ira_loop_pressure)
{
df_analyze ();
invariant_table = NULL;
invariant_table_size = 0;
+ if (optimize == 1)
+ df_remove_problem (df_live);
+
checking_verify_flow_info ();
}