summaryrefslogtreecommitdiff
path: root/gcc/ifcvt.c
diff options
context:
space:
mode:
authorrakdver <rakdver@138bc75d-0d04-0410-961f-82ee72b054a4>2007-02-06 21:49:49 +0000
committerrakdver <rakdver@138bc75d-0d04-0410-961f-82ee72b054a4>2007-02-06 21:49:49 +0000
commit4a6f9e197c022b9b9efb396b6f13a2c2dbc2234f (patch)
tree0b2228e5e39d0218784f7e5f8304e2e94d0d96c2 /gcc/ifcvt.c
parent0d8970e35cd11c6e895434af7ab691c1ebf0f4f4 (diff)
downloadgcc-4a6f9e197c022b9b9efb396b6f13a2c2dbc2234f.tar.gz
* 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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@121670 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ifcvt.c')
-rw-r--r--gcc/ifcvt.c15
1 files changed, 5 insertions, 10 deletions
diff --git a/gcc/ifcvt.c b/gcc/ifcvt.c
index bbd349daf07..9df57bb1574 100644
--- a/gcc/ifcvt.c
+++ b/gcc/ifcvt.c
@@ -3908,18 +3908,13 @@ if_convert (int x_life_data_ok)
num_true_changes = 0;
life_data_ok = (x_life_data_ok != 0);
- if ((! targetm.cannot_modify_jumps_p ())
- && (!flag_reorder_blocks_and_partition || !no_new_pseudos
- || !targetm.have_named_sections))
+ loop_optimizer_init (AVOID_CFG_MODIFICATIONS);
+ if (current_loops)
{
- loop_optimizer_init (0);
- if (current_loops)
- {
- mark_loop_exit_edges ();
- loop_optimizer_finalize ();
- }
- free_dominance_info (CDI_DOMINATORS);
+ mark_loop_exit_edges ();
+ loop_optimizer_finalize ();
}
+ free_dominance_info (CDI_DOMINATORS);
/* Compute postdominators if we think we'll use them. */
if (HAVE_conditional_execution || life_data_ok)