1 2004-09-24 Ben Elliston <bje@au.ibm.com>
3 * basic-block.h (FOR_EACH_EDGE): Add some more comments.
4 (ei_start, ei_last, ei_end_p, ei_one_before_end_p): Likewise.
5 (ei_next, ei_prev, ei_edge, ei_safe_edge): Likewise.
7 2004-09-19 Ben Elliston <bje@au.ibm.com>
9 * cfgexpand.c (expand_gimple_tailcall): Use an edge_iterator, not
11 (expand_gimple_basic_block): Likewise.
12 * cfgrtl.c (force_nonfallthru_and_redirect): Likewise.
13 (purge_dead_edges): Likewise.
14 (cfg_layout_redirect_edge_and_branch): Likewise.
15 * function.c (thread_prologue_and_epilogue_insns): Likewise.
17 2004-09-19 Ben Elliston <bje@au.ibm.com>
19 * cfg.c (remove_edge): Use an edge_iterator, not VEC_iterate().
20 (redirect_edge_succ): Likewise.
21 (redirect_edge_pred): Likewise.
22 * cfganal.c (remove_fake_predecessors): Likewise.
23 * cfgcleanup.c (try_forward_edges): Likewise.
24 * cfghooks.c (make_forwarder_block): Likewise.
25 * gcse.c (bypass_block): Likewise.
26 * except.c (emit_to_new_bb_before): Likewise.
27 (finish_eh_generation): Likewise.
28 * loop-init.c (loop_optimizer_init): Likewise.
29 * tree-cfg.c (cleanup_control_expr_graph): Likewise.
30 (thread_jumps): Likewise.
31 (tree_purge_dead_eh_edges): Likewise.
32 * tree-ssa-threadupdate.c (thread_block): Likewise.
33 (remove_last_stmt_and_useless_edges): Likewise.
35 2004-09-19 Ben Elliston <bje@au.ibm.com>
37 * var-tracking.c (vt_stack_adjustments): Use ei_one_before_end_p,
38 not ei_end_p, to correct an off-by-one error.
40 2004-09-18 Ben Elliston <bje@au.ibm.com>
42 * Merge with edge-vector-mergepoint-20040918.
44 2004-09-18 Ben Elliston <bje@au.ibm.com>
46 * basic-block.h (ei_safe_edge): New function.
47 (FOR_EACH_EDGE): Rewrite; include iterator argument.
48 (END_FOR_EACH_EDGE): Remove.
49 * bb-reorder.c, bt-load.c, cfg.c, cfganal.c, cfgbuild.c,
50 cfgcleanup.c, cfgexpand.c, cfghooks.c, cfglayout.c, cfgloop.c,
51 cfgloopanal.c, cfgloopmanip.c, cfgrtl.c, cse.c, df.c, dominance.c,
52 except.c, final.c, flow.c, function.c, gcse.c, global.c, graph.c,
53 ifcvt.c, lcm.c, loop-invariant.c, loop-iv.c, loop-unroll.c,
54 postreload-gcse.c, predict.c, profile.c, ra-rewrite.c, ra.c,
55 recog.c, reg-stack.c, reload1.c, sched-ebb.c, sched-rgn.c,
56 tracer.c, tree-cfg.c, tree-if-conv.c, tree-into-ssa.c,
57 tree-outof-ssa.c, tree-pretty-print.c, tree-sra.c, tree-ssa-dce.c,
58 tree-ssa-dom.c, tree-ssa-live.c, tree-ssa-loop-ch.c,
59 tree-ssa-loop-im.c, tree-ssa-loop-ivopts.c, tree-ssa-loop-manip.c,
60 tree-ssa-pre.c, tree-ssa-propagate.c, tree-ssa-threadupdate.c,
61 tree-ssa.c, tree-tailcall.c, var-tracking.c, config/i386/i386.c,
62 config/ia64/ia64.c: Update all callers.
64 2004-09-17 Ben Elliston <bje@au.ibm.com>
66 * basic-block.h (struct edge_stack): Remove.
67 (edge_iterator): New type.
68 (ei_start, ei_last, ei_end_p, ei_one_before_end_p): New functions.
69 (ei_next, ei_prev, ei_edge): Likewise.
70 * cfganal.c (could_fall_through): Use a edge_iterator and
71 associated functions, not an edge_stack.
72 (mark_dfs_back_edges): Likewise.
73 (connect_infinite_loops_to_exit): Likewise.
74 (flow_reverse_top_sort_order_compute): Likewise.
75 (flow_dpeth_first_order_compute): Likewise.
76 (flow_preorder_transversal_compute): Likewise.
77 * dominance.c (calc_dfs_tree_nonrec): Likewise.
78 (calc_idoms): Likewise.
79 * gcse.c (bypass_block): Likewise.
80 (insert_store): Likewise.
81 (remove_reachable_equiv_notes): Likewise.
82 * var-tracking.c (prologue_stack_adjust): Likewise.
83 (vt_stack_adjustments): Likewise.
85 2004-09-10 Ben Elliston <bje@au.ibm.com>
87 * Merge with edge-vector-mergepoint-20040910.
89 2004-09-09 Ben Elliston <bje@au.ibm.com>
91 * Merge with edge-vector-mergepoint-20040908.
93 2004-08-31 Ben Elliston <bje@au.ibm.com>
95 * modulo-sched.c (sms_schedule): Comment fix.
96 (tree_block_forwards_to): Likewise.
98 * flow.c (init_propagate_block_info): Convert to vec usage.
100 2004-08-31 Steven Bosscher <stevenb@suse.de>
102 * gcse.c (remove_reachable_equiv_notes): Use an edge_stack.
104 2004-08-29 Ben Elliston <bje@au.ibm.com>
106 * Merge with edge-vector-mergepoint-20040829.
107 Note: edge-vector-mergepoint-20040827 was skipped over.
109 2004-08-27 Steven Bosscher <stevenb@suse.de>
111 * basic-block.h: Don't define ENABLE_CHECKING.
112 Define ENABLE_VEC_CHECKING to 0 if ENABLE_CHECKING is not defined,
113 or 1 if ENABLE_CHECKING is defined.
115 2004-08-26 Ben Elliston <bje@au.ibm.com>
117 * loop-iv.c (simplify_using_initial_values): Store e->src in a
118 temporary so that we count the predecessor edges from the correct
119 basic block (since `e' is reassigned).
121 2004-08-23 Ben Elliston <bje@au.ibm.com>
123 * predict.c (propagate_freq): Reformat comment to minimise diffs.
125 * tree-browser.c: Revert trivial patch to minimise diffs.
126 * ifcvt.c (block_fallthru): Correct logic inversion bug.
128 2004-08-19 Ben Elliston <bje@au.ibm.com>
130 * Merge with edge-vector-mergepoint-20040819.
132 2004-08-18 Steven Bosscher <stevenb@suse.de>
134 * tree-ssa-dom.c (record_equivalences_from_incoming_edge):
135 Extract edge flags with one _or_more_ edges.
137 2004-08-18 Ben Elliston <bje@au.ibm.com>
139 * Merge with edge-vector-mergepoint-20040810.
141 2004-08-18 Ben Elliston <bje@au.ibm.com>
143 * except.c (emit_to_new_bb_before): Eliminate FOR_EACH_EDGE.
145 2004-08-18 Ben Elliston <bje@au.ibm.com>
147 * ra-build.c (live_in): Initialise `e' to silence a warning.
148 * sbitmap.c (sbitmap_intersection_of_succs): Likewise.
149 (sbitmap_intersection_of_preds): Likewise.
150 (sbitmap_union_of_preds): Likewise.
151 * cfgrtl.c (cfg_layout_redirect_edge_and_branch): Initialise
152 iterator variable `ix' to silence a warning.
154 2004-08-17 Ben Elliston <bje@au.ibm.com>
156 * dominance.c (calc_idoms): Eliminate use of FOR_EACH_EDGE.
157 * cfghooks.c: (make_forwarder_block): Likewise.
158 * loop-init.c (loop_optimizer_init): Likewise.
159 * cfgcleanup.c (try_forward_edges): Likewise.
160 * gcse.c (bypass_block): Likewise.
161 * function.c (thread_prologue_and_epilogue_insns): Likewise.
163 2004-08-17 Ben Elliston <bje@au.ibm.com>
165 * cfg.c (remove_edge): Don't use FOR_EACH_EDGE for loops that
166 alter the edge vector.
167 (redirect_edge_succ): Likewise.
168 (redirect_edge_pred): Likewise.
170 * basic-block.h (FOR_EACH_EDGE): Record initial edge count.
171 (END_FOR_EACH_EDGE): Test it.
173 * basic-block.h (FOR_EACH_EDGE): Output filename and function name
174 when throwing an internal error.
176 * cfganal.c (remove_fake_predecessors): Don't use FOR_EACH_EDGE
177 for loops that alter the edge vector.
178 * cfgexpand.c (expand_gimple_tailcall): Likewise.
179 (expand_gimple_basic_block): Likewise.
180 * cfgloopmanip.c (force_nonfallthru_and_redirect): Likewise.
181 (purge_dead_edges): Likewise.
182 * except.c (finish_eh_generation): Likewise.
183 * tree-cfg.c (cleanup_control_expr_graph): Likewise.
184 (thread_jumps): Likewise.
185 (tree_purge_dead_eh_edges): Likewise.
187 2004-08-16 Ben Elliston <bje@au.ibm.com>
189 * basic-block.h: Include "errors.h".
190 (ENABLE_CHECKING): Define to 0 if not already defined.
191 (FOR_EACH_EDGE): Reimplement.
192 (END_FOR_EACH_EDGE): New.
193 * Update all callers: Eliminate explicit iterator variables, use
194 FOR_EACH_EDGE and END_FOR_EACH_EDGE macros.
196 2004-08-12 Ben Elliston <bje@au.ibm.com>
198 * basic-block.h (FOR_EACH_PRED_EDGE, FOR_EACH_SUCC_EDGE): Remove.
199 * Update all callers to use FOR_EACH_EDGE instead.
201 2004-08-12 Ben Elliston <bje@au.ibm.com>
203 * basic-block.h (EDGE_PRED_COUNT, EDGE_SUCC_COUNT): Remove.
204 * Update all callers to use EDGE_COUNT instead.
206 2004-07-31 Steven Bosscher <stevenb@suse.de>
208 * cfg.c (remove_edge): Use VEC_unordered_remove.
209 (redirect_edge_succ): Likewise.
210 (redirect_edge_pred): Likewise.
211 * cfgrtl.c (force_nonfallthru_and_redirect): Likewise.
213 * dominance.c (calc_idoms): Initialize ix to -1 when computing
214 post dominance and the block has fake exit edges.
216 * cfgcleanup.c (try_forward_edges): Revert previous commit.
218 * version.c: Add edge-vector-branch special version and merge tag.
220 2004-07-30 Steven Bosscher <stevenb@suse.de>
222 * cfgexpand.c (expand_block): Decrement the iterator if
223 an edge is removed so that we re-examine the current vector slot.
224 * tree-ssa-dce.c (remove_dead_stmt): Do not remove the first one but
227 2004-07-30 Andrew Pinski <apinski@apple.com>
229 * cfgcleanup.c (try_forward_edges): Go back to the first edge after
231 * tree-cfg.c (disband_implicit_edges): Remove unused ix.
232 (thread_jumps): Decrement the iterator if an edge is removed
233 so that we re-examine the current vector slot.
235 2004-07-29 Ben Elliston <bje@au.ibm.com>
237 * basic-block.h (FALLTHRU_EDGE): Use EDGE_SUCC.
238 (BRANCH_EDGE): Likewise.
239 (EDGE_CRITICAL_P): Use EDGE_{PRED,SUCC}_COUNT.
240 (FOR_EACH_PRED_EDGE, FOR_EACH_SUCC_EDGE): New.
241 (EDGE_PRED_COUNT, EDGE_SUCC_COUNT): Likewise.
242 (EDGE_PRED, EDGE_SUCC): Likewise.
243 * bb-reorder.c, bt-load.c, cfg.c, cfganal.c, cfgbuild.c,
244 cfgcleanup.c, cfgexpand.c, cfghooks.c, cfglayout.c, cfgloop.c,
245 cfgloopanal.c, cfgloopmanip.c, cfgrtl.c, cse.c, df.c, dominance.c,
246 domwalk.c, except.c, final.c, flow.c, function.c, gcse.c,
247 gdbinit.in, global.c, graph.c, ifcvt.c, lcm.c, loop-doloop.c,
248 loop-init.c, loop-invariant.c, loop-iv.c, loop-unroll.c,
249 loop-unswitch.c, modulo-sched.c, predict.c, profile.c, ra-build.c,
250 ra-rewrite.c, ra.c, recog.c, reg-stack.c, regrename.c, reload1.c,
251 sbitmap.c, sched-ebb.c, sched-rgn.c, tracer.c, tree-cfg.c,
252 tree-into-ssa.c, tree-mudflap.c, tree-outof-ssa.c,
253 tree-pretty-print.c, tree-sra.c, tree-ssa-ccp.c, tree-ssa-dce.c,
254 tree-ssa-dom.c, tree-ssa-live.c, tree-ssa-loop-ch.c,
255 tree-ssa-loop-im.c, tree-ssa-loop-niter.c, tree-ssa-phiopt.c,
256 tree-ssa-pre.c, tree-ssa.c, tree-tailcall.c, var-tracking.c,
257 config/frv/frv.c, config/i386/i386.c, config/ia64/ia64.c,
258 config/rs6000/rs6000.c: Update all callers.
260 2004-07-26 Ben Elliston <bje@au.ibm.com>
262 * bb-reorder.c (connect_traces): Use distinct iterator variables
263 when nesting FOR_EACH_EDGE loops (ix vs. ix2).
265 2004-07-26 Andrew Pinski <pinskia@physics.uc.edu>
267 * bb-reorder.c (fix_up_fall_thru_edges): Fix up when there is no edge
268 and when only one exists.
269 (fix_crossing_conditional_branches): Likewise.
271 * cfgcleanup.c (outgoing_edges_match): Speedup loop and use FOR_EACH_EDGE.
272 (try_crossjump_bb): Speed up by checking the EDGE_COUNT before loop and
273 remove the check in the loop.
274 * cfghooks.c (delete_basic_block): Do not use FOR_EACH_EDGE when remove
275 all edges but a loop of EDGE_COUNT.
276 (merge_blocks): Likewise.
277 (duplicate_block): Use EDGE_COUNT.
278 * cfgrtl.c (purge_dead_edges): Adjust the iterator
279 when removing an edge.
280 * dominance.c (calc_idoms): Do not initialize ix as
282 * tree-ssa-dce.c (remove_dead_phis): Do not use FOR_EACH_EDGE when remove
283 all edges but a loop of EDGE_COUNT.
284 * tree-ssa-loop-ch.c (duplicate_blocks): Make sure we found the other edge.
286 2004-07-26 Steven Bosscher <stevenb@suse.de>
288 * cfgcleanup.c (outgoing_edges_match): Test for exactly two edges,
290 * tree-cfg.c (cleanup_control_expr_graph): Adjust the iterator
291 when removing an edge.
292 (tree_purge_dead_eh_edges): Likewise.
294 2004-07-22 Andrew Pinski <pinskia@physics.uc.edu>
296 * cfganal.c (add_noreturn_fake_exit_edges): Use EDGE_COUNT.
297 * cfgcleanup.c (try_optimize_cfg): Likewise.
298 * cfglayout.c (fixup_reorder_chain): Likewise.
299 * ra-build.c (live_in): Likewise.
300 * sched-rgn.c (build_control_flow): Likewise.
301 * tree-ssa-pre.c (compute_antic_aux): Likewise.
303 * cfgloop.c (flow_loop_pre_header_scan): Use EDGE_0 of the pred.
304 * cfgrtl.c (cfg_layout_redirect_edge_and_branch): Initialize found.
305 * dominance.c (calc_idoms): Initialize ix.
306 * ra-build.c (live_in): Initialize e.
307 * tree-mudflap.c (mf_build_check_statement_for): Use EDGE_0 of the pred.
308 * tree-ssa-loop-ch.c (duplicate_blocks): Move defintion of ix up.
310 2004-07-22 Ben Elliston <bje@au.ibm.com>
312 * cfgcleanup.c (outgoing_edges_match): Clean up search of outgoing
313 edges. Don't test e1 and e2 for non-null values--check the edge
315 * tree-ssa-dce.c (remove_dead_stmt): Remove erroneous VEC_pop.
317 2004-07-22 Steven Bosscher <stevenb@suse.de>
319 * ifcvt.c (find_if_case_1): Use then_bb->pred, not succ. Typo.
321 2004-07-22 Ben Elliston <bje@au.ibm.com>
323 * cfg.c (redirect_edge_succ): Use FOR_EACH_EDGE for consistency.
324 (redirect_edge_pred): Likewise.
325 * cfgrtl.c (force_nonfallthru_and_redirect): Likewise.
326 * tree-ssa-loop-ch.c (duplicate_blocks): Likewise.
328 2004-07-22 Steven Bosscher <stevenb@suse.de>
330 * var-tracking.c (vt_stack_adjustments): Fix stack push thinko.
332 2004-07-22 Andrew Pinski <apinski@apple.com>
334 * basic-block.h (FOR_EACH_EDGE): Set e at the begining too.
335 * gcse.c (bypass_block): e2 is the iterator for the edges.
336 * ifcvt.c (find_cond_trap): Use EDGE_COUNT.
337 (block_has_only_trap): Likewise.
338 (find_if_case_2): Set else_edge and not else_succ.
339 Use else_succ when we used to.
340 * sched-rgn.c (find_rgns): Use EDGE_COUNT.
341 * tree-cfg.c (make_ctrl_stmt_edges): Likewise.
342 (make_goto_expr_edges): Likewise.
343 (thread_jumps): Likewise.
344 (execute_warn_function_return): Likewise.
345 * tree-ssa-dom.c (redirect_edges_and_update_ssa_graph):
346 Check the number of edges of e before setting e again.
348 2004-07-22 Ben Elliston <bje@au.ibm.com>
350 * ifcvt.c (find_if_block): Check else_succ edge count.
351 * gcse.c (remove_reachable_equiv_notes): Assign NULL to `act' if
352 the iterator overruns the end of the vector.
354 2004-07-22 Ben Elliston <bje@au.ibm.com>
356 * except.c (connect_post_landing_pads): Use EDGE_COUNT.
357 * ifcvt.c (find_if_case_2): Only access edge 0 if the edge count
359 * cfghooks.c (delete_basic_block): Truncate unconditionally as it
360 is now safe to do so.
362 2004-07-21 Ben Elliston <bje@au.ibm.com>
364 * cfganal.c (remove_fake_predecessors): Decrement the iterator if
365 an edge is removed so that we re-examine the current vector slot.
366 * except.c (finish_eh_generation): Likewise.
367 * cfgexpand.c (expand_block): Likewise.
368 * cfghooks.c (delete_basic_block): Likewise.
369 (merge_blocks): Likewise.
370 * profile.c (compute_branch_probabilities): Use EDGE_COUNT, not
371 a FOR_EACH_EDGE loop with an increment in the loop body.
372 * cfgloopmanip.c (fix_irreducible_loops): Use EDGE_COUNT.
373 * bb-reorder.c (copy_bb_p): Directly test if edge count exceeds 8.
374 * ifcvt.c (merge_if_block): Use EDGE_COUNT for clarity.
376 2004-07-21 Ben Elliston <bje@au.ibm.com>
378 * cfg.c (clear_edges): Truncate the bb->succ, bb->pred vectors.
379 Likewise for EXIT_BLOCK_PTR->succ and EXIT_BLOCK_PTR->pred.
381 2004-07-20 Ben Elliston <bje@au.ibm.com>
383 * config/ia64/ia64.c (ia64_expand_prologue): Iterate over edge
384 vector instead of traversing a linked list.
385 * config/rs6000/rs6000.c (rs6000_emit_prologue): Use EDGE_COUNT to
386 count elements rather than testing the basic_block->pred member.
387 * config/frv/frv.c (frv_ifcvt_modify_tests): Use edge accessor.
389 2004-07-20 Ben Elliston <bje@au.ibm.com>
391 * Ben to add a large ChangeLog entry soon!