diff options
author | Kazu Hirata <kazu@cs.umass.edu> | 2004-10-18 15:11:31 +0000 |
---|---|---|
committer | Kazu Hirata <kazu@gcc.gnu.org> | 2004-10-18 15:11:31 +0000 |
commit | a2041967826c644f860ec12c6f32214b1e3d3899 (patch) | |
tree | e0aded8319864b2cb6fac4df0732bb5ee1995039 /gcc/conflict.c | |
parent | 2ddfd02523ee86ac14fd053bee5a7c30f6f1f602 (diff) | |
download | gcc-a2041967826c644f860ec12c6f32214b1e3d3899.zip gcc-a2041967826c644f860ec12c6f32214b1e3d3899.tar.gz gcc-a2041967826c644f860ec12c6f32214b1e3d3899.tar.bz2 |
basic-block.h (reg_set_iterator): New.
* basic-block.h (reg_set_iterator): New.
(EXECUTE_IF_SET_IN_REG_SET): Make it iterator style.
(EXECUTE_IF_AND_COMPL_IN_REG_SET): Likewise.
(EXECUTE_IF_AND_IN_REG_SET): Likewise.
* caller-save.c (save_call_clobbered_regs): Adjust to the new
style.
* cfgcleanup.c (thread_jump): Likewise.
* cfgrtl.c (safe_insert_insn_on_edge): Likewise.
* conflict.c (conflict_graph_compute): Likewise.
* flow.c (verify_local_live_at_start, update_life_info,
initialize_uninitialized_subregs, propagate_one_insn,
init_propagate_block_info, free_propagate_block_info,
propagate_block, dump_regset): Likewise.
* global.c (global_conflicts): Likewise.
* graph.c (start_bb): Likewise.
* local-alloc.c (update_equiv_regs): Likewise.
* loop.c (load_mems): Likewise.
* reload1.c (compute_use_by_pseudos, order_regs_for_reload,
find_reg, finish_spills): Likewise.
* resource.c (mark_target_live_regs): Likewise.
* sched-deps.c (sched_analyze_insn): Likewise.
* sched-rgn.c (sched-rgn.c): Likewise.
* config/frv/frv.c (frv_ifcvt_modify_tests): Likewise.
From-SVN: r89226
Diffstat (limited to 'gcc/conflict.c')
-rw-r--r-- | gcc/conflict.c | 32 |
1 files changed, 18 insertions, 14 deletions
diff --git a/gcc/conflict.c b/gcc/conflict.c index 00be294..ca9dd95 100644 --- a/gcc/conflict.c +++ b/gcc/conflict.c @@ -446,6 +446,8 @@ conflict_graph_compute (regset regs, partition p) /* Are we interested in this insn? */ if (INSN_P (insn)) { + reg_set_iterator rsi; + /* Determine which regs are set in this insn. Since we're in SSA form, if a reg is set here it isn't set anywhere else, so this insn is where the reg is born. */ @@ -459,20 +461,22 @@ conflict_graph_compute (regset regs, partition p) /* For every reg born here, add a conflict with every other reg live coming into this insn. */ EXECUTE_IF_SET_IN_REG_SET - (born, FIRST_PSEUDO_REGISTER, born_reg, - { - EXECUTE_IF_SET_IN_REG_SET - (live, FIRST_PSEUDO_REGISTER, live_reg, - { - /* Build the conflict graph in terms of canonical - regnos. */ - int b = partition_find (p, born_reg); - int l = partition_find (p, live_reg); - - if (b != l) - conflict_graph_add (graph, b, l); - }); - }); + (born, FIRST_PSEUDO_REGISTER, born_reg, rsi) + { + reg_set_iterator rsj; + + EXECUTE_IF_SET_IN_REG_SET + (live, FIRST_PSEUDO_REGISTER, live_reg, rsj) + { + /* Build the conflict graph in terms of canonical + regnos. */ + int b = partition_find (p, born_reg); + int l = partition_find (p, live_reg); + + if (b != l) + conflict_graph_add (graph, b, l); + } + } /* Morgan's algorithm checks the operands of the insn and adds them to the set of live regs. Instead, we |