diff options
author | Zdenek Dvorak <dvorakz@suse.cz> | 2007-02-06 22:49:49 +0100 |
---|---|---|
committer | Zdenek Dvorak <rakdver@gcc.gnu.org> | 2007-02-06 21:49:49 +0000 |
commit | 89f8f30f3565328a2805adafd22e05219b56d562 (patch) | |
tree | 0b2228e5e39d0218784f7e5f8304e2e94d0d96c2 /gcc/cfgloop.h | |
parent | ca20820ef1e80ac23138cbc3beb5ba895b59a1e3 (diff) | |
download | gcc-89f8f30f3565328a2805adafd22e05219b56d562.tar.gz |
loop.texi: Document possibility not to perform disambiguation of loops with multiple latches.
* doc/loop.texi: Document possibility not to perform disambiguation
of loops with multiple latches.
* cfgloopmanip.c (alp_enum_p): Removed.
(add_loop): Handle subloops. Use get_loop_body_with_size.
(create_preheader): Do not allow ENTRY_BLOCK_PTR to be preheader.
* cfghooks.c (redirect_edge_and_branch_force): Set dominator for
the new forwarder block.
(make_forwarder_block): Only call new_bb_cbk if it is not NULL.
Handle the case latch is NULL.
* tree-ssa-dom.c (tree_ssa_dominator_optimize): Avoid cfg modifications
when marking loop exits.
* ifcvt.c (if_convert): Ditto. Mark loop exits even if cfg cannot
be modified.
* loop-init.c (loop_optimizer_init): Do not modify cfg. Call
disambiguate_loops_with_multiple_latches.
* tree-cfgcleanup.c (cleanup_tree_cfg_loop): Calculate dominators
before fix_loop_structure.
* cfgloop.c: Include pointer-set.h and output.h.
(canonicalize_loop_headers, HEADER_BLOCK, LATCH_EDGE,
update_latch_info, mfb_keep_just, mfb_keep_nonlatch): Removed.
(get_loop_latch_edges, find_subloop_latch_edge_by_profile,
find_subloop_latch_edge_by_ivs, find_subloop_latch_edge,
mfb_redirect_edges_in_set, form_subloop, merge_latch_edges,
disambiguate_multiple_latches, get_loop_body_with_size,
disambiguate_loops_with_multiple_latches): New functions.
(flow_loop_dump): Dump multiple latch edges.
(flow_loop_nodes_find): Handle loops with multiple latches.
(flow_loops_find): Ditto. Do not call canonicalize_loop_headers.
(glb_enum_p): Modified.
(get_loop_body): Use get_loop_body_with_size.
* cfgloop.h (LOOPS_HAVE_RECORDED_EXITS): New flag.
(AVOID_CFG_MODIFICATIONS): New constant.
(disambiguate_loops_with_multiple_latches, add_loop,
get_loop_body_with_size): Declare.
* Makefile.in (cfgloop.o): Add pointer-set.h and output.h.
* gcc.dg/tree-ssa/loop-25.c: New test.
From-SVN: r121670
Diffstat (limited to 'gcc/cfgloop.h')
-rw-r--r-- | gcc/cfgloop.h | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/gcc/cfgloop.h b/gcc/cfgloop.h index 4223a39c45f..09eef08ca3d 100644 --- a/gcc/cfgloop.h +++ b/gcc/cfgloop.h @@ -168,11 +168,13 @@ enum LOOPS_HAVE_PREHEADERS = 1, LOOPS_HAVE_SIMPLE_LATCHES = 2, LOOPS_HAVE_MARKED_IRREDUCIBLE_REGIONS = 4, - LOOPS_HAVE_RECORDED_EXITS = 8 + LOOPS_HAVE_RECORDED_EXITS = 8, + LOOPS_MAY_HAVE_MULTIPLE_LATCHES = 16 }; #define LOOPS_NORMAL (LOOPS_HAVE_PREHEADERS | LOOPS_HAVE_SIMPLE_LATCHES \ | LOOPS_HAVE_MARKED_IRREDUCIBLE_REGIONS) +#define AVOID_CFG_MODIFICATIONS (LOOPS_MAY_HAVE_MULTIPLE_LATCHES) typedef struct loop *loop_p; DEF_VEC_P (loop_p); @@ -198,6 +200,7 @@ struct loops /* Loop recognition. */ extern int flow_loops_find (struct loops *); +extern void disambiguate_loops_with_multiple_latches (void); extern void flow_loops_free (struct loops *); extern void flow_loops_dump (FILE *, void (*)(const struct loop *, FILE *, int), int); @@ -215,6 +218,7 @@ void rescan_loop_exit (edge, bool, bool); /* Loop data structure manipulation/querying. */ extern void flow_loop_tree_node_add (struct loop *, struct loop *); extern void flow_loop_tree_node_remove (struct loop *); +extern void add_loop (struct loop *, struct loop *); extern bool flow_loop_nested_p (const struct loop *, const struct loop *); extern bool flow_bb_inside_loop_p (const struct loop *, const basic_block); extern struct loop * find_common_loop (struct loop *, struct loop *); @@ -229,6 +233,8 @@ extern void mark_loop_exit_edges (void); /* Loops & cfg manipulation. */ extern basic_block *get_loop_body (const struct loop *); +extern unsigned get_loop_body_with_size (const struct loop *, basic_block *, + unsigned); extern basic_block *get_loop_body_in_dom_order (const struct loop *); extern basic_block *get_loop_body_in_bfs_order (const struct loop *); extern VEC (edge, heap) *get_loop_exit_edges (const struct loop *); |