cfg merge part 17 - loop datastructure updates
Jan Hubicka
jh@suse.cz
Mon May 13 08:40:00 GMT 2002
> On Mon, 13 May 2002, Jan Hubicka wrote:
>
> > * Makefile.in (OBJS): Add loop-new.o.
> > (function.o, reg-stack.o, bb-reorder.o, tracer.o):
> > Add dependency on basic-block.h.
> > (loop-new.o): New.
>
> Those changes don't seem to be in the patch sent.
>
> > * loop-new.c: New file.
>
> Nor does this file. And I don't think "loop-new.c" is a good name - if
> the loop optimiser gets replaced again later, will you call the next one
> "loop-new-new.c" or "loop-verynew.c"? In time "-new" will be a bad
> description. Better would be another generic name, e.g. "loop-opt.c", or
> a name with a version number rather than "-new", e.g. "loop-v2.c".
>
> (This is presuming that the existing loop.c will go away in due course.
> If not, then the name needs to be one effectively distinguishing the
> function from loop.c.)
Hi,
this appears to be the proper entry
Zdenek has sent the patch previously with some additional comments about the
design but didn't included the changelog.
* Makefile.in (OBJS): (function.o, reg-stack.o, bb-reorder.o, tracer.o):
Add dependency on basic-block.h.
(loop-new.o): New.
* basic-block.h (basic_block, struct loop, struct loops):
Change loop representation.
(flow_loop_outside_edge_p):
Changed declaration.
(flow_loop_tree_node_add): Declare.
(LOOP_EXITS_DOMS): Removed (not used anywhere and hard to maintain
just now).
(flow_loop_outside_edge_p, flow_bb_inside_loop_p,
get_loop_body, dfs_enumerate_from, add_bb_to_loop,
remove_bb_from_loops, find_common_loop, create_preheader):
Declare.
(nearest_common_dominator, set_immediate_dominator,
get_immediate_dominator, dominated_by_p,
get_dominated_by, verify_dominators):
Declare.
* bb-reorder.c (reorder_basic_blocks): Modified.
* cfg.c (entry_exit_blocks): Initialize new fields.
(dump_flow_info): Modified.
* cfgbuild.c (find_basic_blocks): Zero liveness info;
should be done cleaner way later.
* cfglayout.c (cleanup_unconditional_jumps,
cfg_layout_duplicate_bb, cfg_layout_initialize):
Update loop structure.
* cfglayout.h (reorder_block_def): Support for loop copying.
(cfg_layout_initialize): Declaration modified.
* cfgloop.c (flow_loop_nested_p, flow_loop_entry_edges_find,
flow_loop_exit_edges_find, flow_loop_pre_header_scan,
flow_loops_cfg_dump, flow_loops_free,
flow_loop_pre_header_find, flow_loop_scan):
Adapted for new loop represenation.
(flow_loop_nodes_find, flow_loop_tree_node_add,
flow_loops_tree_build, flow_loop_level_compute):
Reworked to create new loop representation.
(make_forwarder_block, canonicalize_loop_headers): New static
functions.
* cfgloopanal.c (for_each_insn_in_loop,
not_invariant_rtx, test_invariants):
Adapted for new loop represenation.
(create_preheader): New.
* predict.c (estimate_loops_at_level, propagate_freq,
estimate_probability, estimate_bb_frequencies):
Adapted for new loop representation.
More information about the Gcc-patches
mailing list