diff options
author | Steven Bosscher <steven@gcc.gnu.org> | 2012-10-14 19:30:59 +0000 |
---|---|---|
committer | Steven Bosscher <steven@gcc.gnu.org> | 2012-10-14 19:30:59 +0000 |
commit | bf744527f1616d14a437abd9c8e5d16cd55b76a3 (patch) | |
tree | 3654fdb428a81ff03c682364de4dd6c378669f51 /gcc/ira-emit.c | |
parent | 6e74642b2c37305436269a8c036f1519b4c8c111 (diff) | |
download | gcc-bf744527f1616d14a437abd9c8e5d16cd55b76a3.zip gcc-bf744527f1616d14a437abd9c8e5d16cd55b76a3.tar.gz gcc-bf744527f1616d14a437abd9c8e5d16cd55b76a3.tar.bz2 |
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-emit.c')
-rw-r--r-- | gcc/ira-emit.c | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/gcc/ira-emit.c b/gcc/ira-emit.c index dbab537..b0d9a82 100644 --- a/gcc/ira-emit.c +++ b/gcc/ira-emit.c @@ -495,6 +495,7 @@ generate_edge_moves (edge e) bitmap_iterator bi; ira_allocno_t src_allocno, dest_allocno, *src_map, *dest_map; move_t move; + bitmap regs_live_in_dest, regs_live_out_src; src_loop_node = IRA_BB_NODE (e->src)->parent; dest_loop_node = IRA_BB_NODE (e->dest)->parent; @@ -503,9 +504,11 @@ generate_edge_moves (edge e) return; src_map = src_loop_node->regno_allocno_map; dest_map = dest_loop_node->regno_allocno_map; - EXECUTE_IF_SET_IN_REG_SET (DF_LR_IN (e->dest), + regs_live_in_dest = df_get_live_in (e->dest); + regs_live_out_src = df_get_live_out (e->src); + EXECUTE_IF_SET_IN_REG_SET (regs_live_in_dest, FIRST_PSEUDO_REGISTER, regno, bi) - if (bitmap_bit_p (DF_LR_OUT (e->src), regno)) + if (bitmap_bit_p (regs_live_out_src, regno)) { src_allocno = src_map[regno]; dest_allocno = dest_map[regno]; @@ -1206,15 +1209,16 @@ add_ranges_and_copies (void) destination block) to use for searching allocnos by their regnos because of subsequent IR flattening. */ node = IRA_BB_NODE (bb)->parent; - bitmap_copy (live_through, DF_LR_IN (bb)); + bitmap_copy (live_through, df_get_live_in (bb)); add_range_and_copies_from_move_list (at_bb_start[bb->index], node, live_through, REG_FREQ_FROM_BB (bb)); - bitmap_copy (live_through, DF_LR_OUT (bb)); + bitmap_copy (live_through, df_get_live_out (bb)); add_range_and_copies_from_move_list (at_bb_end[bb->index], node, live_through, REG_FREQ_FROM_BB (bb)); FOR_EACH_EDGE (e, ei, bb->succs) { - bitmap_and (live_through, DF_LR_IN (e->dest), DF_LR_OUT (bb)); + bitmap_and (live_through, + df_get_live_in (e->dest), df_get_live_out (bb)); add_range_and_copies_from_move_list ((move_t) e->aux, node, live_through, REG_FREQ_FROM_EDGE_FREQ (EDGE_FREQUENCY (e))); |