Commit c23bb84b by Richard Henderson

flow.c (redirect_edge_succ_nodup): Return new edge.

        * flow.c (redirect_edge_succ_nodup): Return new edge.
        (try_simplify_condjump): Use new edge.
        * basic-block.h (redirect_edge_succ_nodup): Update prototype.

From-SVN: r45222
parent b5a696fb
2001-08-27 Roman Zippel <zippel@linux-m68k.org> 2001-08-27 Roman Zippel <zippel@linux-m68k.org>
* flow.c (redirect_edge_succ_nodup): Return new edge.
(try_simplify_condjump): Use new edge.
* basic-block.h (redirect_edge_succ_nodup): Update prototype.
* cse.c (cse_basic_block): Skip note instructions. * cse.c (cse_basic_block): Skip note instructions.
2001-08-27 Richard Henderson <rth@redhat.com> 2001-08-27 Richard Henderson <rth@redhat.com>
...@@ -67,7 +71,7 @@ ...@@ -67,7 +71,7 @@
2001-08-27 Vladimir Makarov <vmakarov@touchme.toronto.redhat.com> 2001-08-27 Vladimir Makarov <vmakarov@touchme.toronto.redhat.com>
* rtl.def (DEFINE_CPU_UNIT, DEFINE_QUERY_CPU_UNIT, EXCLUSION_SET, * rtl.def (DEFINE_CPU_UNIT, DEFINE_QUERY_CPU_UNIT, EXCLUSION_SET,
PRESENCE_SET, ABSENCE_SET, DEFINE_BYPASS, DEFINE_AUTOMATON, PRESENCE_SET, ABSENCE_SET, DEFINE_BYPASS, DEFINE_AUTOMATON,
AUTOMATA_OPTION, DEFINE_RESERVATION, DEFINE_INSN_RESERVATION): New AUTOMATA_OPTION, DEFINE_RESERVATION, DEFINE_INSN_RESERVATION): New
RTL constructions. RTL constructions.
...@@ -92,7 +96,7 @@ ...@@ -92,7 +96,7 @@
* rtl.h (LINK_COST_ZERO, LINK_COST_FREE): Remove them. * rtl.h (LINK_COST_ZERO, LINK_COST_FREE): Remove them.
* sched-int.h: (curr_state): Add the external definition for * sched-int.h: (curr_state): Add the external definition for
automaton pipeline interface. automaton pipeline interface.
(haifa_insn_data): Add comments for members blockage and units. (haifa_insn_data): Add comments for members blockage and units.
...@@ -111,7 +115,7 @@ ...@@ -111,7 +115,7 @@
first_cycle_multipass_dfa_lookahead, init_dfa_bubbles, first_cycle_multipass_dfa_lookahead, init_dfa_bubbles,
dfa_bubble): New members in gcc_target.sched. dfa_bubble): New members in gcc_target.sched.
* haifa-sched.c (insert_schedule_bubbles_p): New variable. * haifa-sched.c (insert_schedule_bubbles_p): New variable.
(MAX_INSN_QUEUE_INDEX): New macro for automaton interface. (MAX_INSN_QUEUE_INDEX): New macro for automaton interface.
(insn_queue): Redefine it as pointer to array. (insn_queue): Redefine it as pointer to array.
(NEXT_Q, NEXT_Q_AFTER): Use MAX_INSN_QUEUE_INDEX instead of (NEXT_Q, NEXT_Q_AFTER): Use MAX_INSN_QUEUE_INDEX instead of
...@@ -153,7 +157,7 @@ ...@@ -153,7 +157,7 @@
(get_visual_tbl_length): Add code for automaton interface. (get_visual_tbl_length): Add code for automaton interface.
(target_units, print_block_visualization): Add comments. (target_units, print_block_visualization): Add comments.
* Makefile.in (GETRUNTIME, HASHTAB, HOST_GETRUNTIME, HOST_HASHTAB, * Makefile.in (GETRUNTIME, HASHTAB, HOST_GETRUNTIME, HOST_HASHTAB,
USE_HOST_GETRUNTIME, USE_HOST_HASHTAB, HOST_VARRAY): New variables. USE_HOST_GETRUNTIME, USE_HOST_HASHTAB, HOST_VARRAY): New variables.
(sched-rgn.o, sched-vis.o): Add new dependency file target.h. (sched-rgn.o, sched-vis.o): Add new dependency file target.h.
(getruntime.o, genautomata.o): New entries. (getruntime.o, genautomata.o): New entries.
......
...@@ -303,7 +303,7 @@ extern void make_edge PARAMS ((sbitmap *, basic_block, ...@@ -303,7 +303,7 @@ extern void make_edge PARAMS ((sbitmap *, basic_block,
basic_block, int)); basic_block, int));
extern void remove_edge PARAMS ((edge)); extern void remove_edge PARAMS ((edge));
extern void redirect_edge_succ PARAMS ((edge, basic_block)); extern void redirect_edge_succ PARAMS ((edge, basic_block));
extern void redirect_edge_succ_nodup PARAMS ((edge, basic_block)); extern edge redirect_edge_succ_nodup PARAMS ((edge, basic_block));
extern void redirect_edge_pred PARAMS ((edge, basic_block)); extern void redirect_edge_pred PARAMS ((edge, basic_block));
extern void create_basic_block PARAMS ((int, rtx, rtx, rtx)); extern void create_basic_block PARAMS ((int, rtx, rtx, rtx));
extern int flow_delete_block PARAMS ((basic_block)); extern int flow_delete_block PARAMS ((basic_block));
......
...@@ -3335,8 +3335,10 @@ try_simplify_condjump (cbranch_block) ...@@ -3335,8 +3335,10 @@ try_simplify_condjump (cbranch_block)
/* Success. Update the CFG to match. Note that after this point /* Success. Update the CFG to match. Note that after this point
the edge variable names appear backwards; the redirection is done the edge variable names appear backwards; the redirection is done
this way to preserve edge profile data. */ this way to preserve edge profile data. */
redirect_edge_succ_nodup (cbranch_jump_edge, cbranch_dest_block); cbranch_jump_edge = redirect_edge_succ_nodup (cbranch_jump_edge,
redirect_edge_succ_nodup (cbranch_fallthru_edge, jump_dest_block); cbranch_dest_block);
cbranch_fallthru_edge = redirect_edge_succ_nodup (cbranch_fallthru_edge,
jump_dest_block);
cbranch_jump_edge->flags |= EDGE_FALLTHRU; cbranch_jump_edge->flags |= EDGE_FALLTHRU;
cbranch_fallthru_edge->flags &= ~EDGE_FALLTHRU; cbranch_fallthru_edge->flags &= ~EDGE_FALLTHRU;
...@@ -9029,7 +9031,7 @@ redirect_edge_succ (e, new_succ) ...@@ -9029,7 +9031,7 @@ redirect_edge_succ (e, new_succ)
/* Like previous but avoid possible dupplicate edge. */ /* Like previous but avoid possible dupplicate edge. */
void edge
redirect_edge_succ_nodup (e, new_succ) redirect_edge_succ_nodup (e, new_succ)
edge e; edge e;
basic_block new_succ; basic_block new_succ;
...@@ -9045,9 +9047,11 @@ redirect_edge_succ_nodup (e, new_succ) ...@@ -9045,9 +9047,11 @@ redirect_edge_succ_nodup (e, new_succ)
s->probability += e->probability; s->probability += e->probability;
s->count += e->count; s->count += e->count;
remove_edge (e); remove_edge (e);
e = s;
} }
else else
redirect_edge_succ (e, new_succ); redirect_edge_succ (e, new_succ);
return e;
} }
/* Redirect an edge's predecessor from one block to another. */ /* Redirect an edge's predecessor from one block to another. */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment