summaryrefslogtreecommitdiff
path: root/gcc/ira.c
diff options
context:
space:
mode:
authorSteven Bosscher <steven@gcc.gnu.org>2012-10-14 19:30:59 +0000
committerSteven Bosscher <steven@gcc.gnu.org>2012-10-14 19:30:59 +0000
commitbf744527f1616d14a437abd9c8e5d16cd55b76a3 (patch)
tree3654fdb428a81ff03c682364de4dd6c378669f51 /gcc/ira.c
parent6e74642b2c37305436269a8c036f1519b4c8c111 (diff)
downloadgcc-bf744527f1616d14a437abd9c8e5d16cd55b76a3.tar.gz
re PR rtl-optimization/38711 (ira should not be using df-lr except at -O1.)
PR rtl-optimization/38711 * df.h (df_get_live_out, df_get_live_in): Make static inline functions. * df-problems.c (df_get_live_out, df_get_live_in): Moved to df.h. * ira-lives.c (process_bb_node_lives): Use df_get_live_out instead of DF_LR_OUT. * ira-build.c (create_bb_allocnos): Likewise. (create_loop_allocnos): Likewise, and use df_get_live_in instead of DF_LR_IN. * ira-emit.c (generate_edge_moves): Likewise. (add_ranges_and_copies): Likewise. * ira-color.c (ira_loop_edge_freq): Use df_get_live_out instead of DF_LR_OUT, and df_get_live_in instead of DF_LR_IN. * ira.c (mark_elimination): Update DF_LR and DF_LIVE. (build_insn_chain): Use df_get_live_out instead of DF_LR_OUT. (do_reload): Remove the DF_LIVE problem for -O1. From-SVN: r192440
Diffstat (limited to 'gcc/ira.c')
-rw-r--r--gcc/ira.c37
1 files changed, 19 insertions, 18 deletions
diff --git a/gcc/ira.c b/gcc/ira.c
index 9a93297b0d4..a79a0dcdff3 100644
--- a/gcc/ira.c
+++ b/gcc/ira.c
@@ -2337,16 +2337,23 @@ void
mark_elimination (int from, int to)
{
basic_block bb;
+ bitmap r;
FOR_EACH_BB (bb)
{
- /* We don't use LIVE info in IRA. */
- bitmap r = DF_LR_IN (bb);
-
- if (REGNO_REG_SET_P (r, from))
+ r = DF_LR_IN (bb);
+ if (bitmap_bit_p (r, from))
+ {
+ bitmap_clear_bit (r, from);
+ bitmap_set_bit (r, to);
+ }
+ if (! df_live)
+ continue;
+ r = DF_LIVE_IN (bb);
+ if (bitmap_bit_p (r, from))
{
- CLEAR_REGNO_REG_SET (r, from);
- SET_REGNO_REG_SET (r, to);
+ bitmap_clear_bit (r, from);
+ bitmap_set_bit (r, to);
}
}
}
@@ -3194,10 +3201,12 @@ update_equiv_regs (void)
{
FOR_EACH_BB (bb)
{
- bitmap_and_compl_into (DF_LIVE_IN (bb), cleared_regs);
- bitmap_and_compl_into (DF_LIVE_OUT (bb), cleared_regs);
bitmap_and_compl_into (DF_LR_IN (bb), cleared_regs);
bitmap_and_compl_into (DF_LR_OUT (bb), cleared_regs);
+ if (! df_live)
+ continue;
+ bitmap_and_compl_into (DF_LIVE_IN (bb), cleared_regs);
+ bitmap_and_compl_into (DF_LIVE_OUT (bb), cleared_regs);
}
/* Last pass - adjust debug insns referencing cleared regs. */
@@ -3319,14 +3328,14 @@ build_insn_chain (void)
CLEAR_REG_SET (live_relevant_regs);
bitmap_clear (live_subregs_used);
- EXECUTE_IF_SET_IN_BITMAP (DF_LR_OUT (bb), 0, i, bi)
+ EXECUTE_IF_SET_IN_BITMAP (df_get_live_out (bb), 0, i, bi)
{
if (i >= FIRST_PSEUDO_REGISTER)
break;
bitmap_set_bit (live_relevant_regs, i);
}
- EXECUTE_IF_SET_IN_BITMAP (DF_LR_OUT (bb),
+ EXECUTE_IF_SET_IN_BITMAP (df_get_live_out (bb),
FIRST_PSEUDO_REGISTER, i, bi)
{
if (pseudo_for_reload_consideration_p (i))
@@ -4157,12 +4166,6 @@ ira (FILE *f)
setup_prohibited_mode_move_regs ();
df_note_add_problem ();
-
- if (optimize == 1)
- {
- df_live_add_problem ();
- df_live_set_all_dirty ();
- }
#ifdef ENABLE_CHECKING
df->changeable_flags |= DF_VERIFY_SCHEDULED;
#endif
@@ -4397,8 +4400,6 @@ do_reload (void)
df_rescan_all_insns is not going to help here because it does not
touch the artificial uses and defs. */
df_finish_pass (true);
- if (optimize > 1)
- df_live_add_problem ();
df_scan_alloc (NULL);
df_scan_blocks ();