aboutsummaryrefslogtreecommitdiff
path: root/gcc/cfgloopmanip.c
diff options
context:
space:
mode:
authorZdenek Dvorak <dvorakz@suse.cz>2007-05-11 15:52:01 +0000
committerZdenek Dvorak <dvorakz@suse.cz>2007-05-11 15:52:01 +0000
commit1f41a0cbd5d7407d112b4aac7cfc431f0302b082 (patch)
tree94649f85c3e7ccd857de92cda5f4eabf23d7ec05 /gcc/cfgloopmanip.c
parent55d129ba9aa332613b2ca9b4398a8cee1d9acab6 (diff)
* tree-loop-linear.c (gather_interchange_stats, try_interchange_loops):
Use loop_depth and loop_outer accessor functions. * tree-ssa-loop-im.c (outermost_invariant_loop, set_level, determine_invariantness_stmt, move_computations_stmt): Ditto. * cfgloopmanip.c (fix_bb_placement, fix_loop_placement, remove_path, add_loop, loopify, unloop, fix_loop_structure): Ditto. * tree-ssa-loop-manip.c (find_uses_to_rename_use): Ditto. * tree-scalar-evolution.c (interpret_loop_phi, compute_scalar_evolution_in_loop, analyze_scalar_evolution_in_loop, instantiate_parameters_1, scev_const_prop): Ditto. * cfghooks.c (make_forwarder_block): Ditto. * cfgloopanal.c (mark_irreducible_loops, mark_loop_exit_edges): Ditto. * modulo-sched.c (loop_canon_p): Ditto. * tree-vectorizer.c (slpeel_tree_duplicate_loop_to_edge_cfg, slpeel_can_duplicate_loop_p): Ditto. * lambda-code.c (invariant_in_loop_and_outer_loops): Ditto. * tree-cfg.c (tree_duplicate_sese_region): Ditto. * cfgloop.c (flow_loop_dump, flow_loop_nodes_find, rescan_loop_exit, cancel_loop, verify_loop_structure): Ditto. (flow_loop_nested_p, superloop_at_depth, flow_loop_free, add_bb_to_loop, remove_bb_from_loops, find_common_loop): Use the superloops vector instead of "pred" array. (establish_preds): Take father loop as an argument. Initialize the superloops vector. (flow_loop_tree_node_add): Pass father loop to establish_preds. Do not initialize loop->outer. (flow_loop_tree_node_remove): Truncate the superloops vector. * cfgloop.h (struct loop): Removed field "outer", fields "depth" and "pred" merged to "superloops" vector. (loop_depth, loop_outer): New. (fel_init): Use loop_outer. git-svn-id: https://gcc.gnu.org/svn/gcc/trunk@124619 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/cfgloopmanip.c')
-rw-r--r--gcc/cfgloopmanip.c28
1 files changed, 14 insertions, 14 deletions
diff --git a/gcc/cfgloopmanip.c b/gcc/cfgloopmanip.c
index 0e876e566e1..a1af1111f15 100644
--- a/gcc/cfgloopmanip.c
+++ b/gcc/cfgloopmanip.c
@@ -102,7 +102,7 @@ fix_bb_placement (basic_block bb)
act = e->dest->loop_father;
if (act->header == e->dest)
- act = act->outer;
+ act = loop_outer (act);
if (flow_loop_nested_p (loop, act))
loop = act;
@@ -138,9 +138,9 @@ fix_loop_placement (struct loop *loop)
father = act;
}
- if (father != loop->outer)
+ if (father != loop_outer (loop))
{
- for (act = loop->outer; act != father; act = act->outer)
+ for (act = loop_outer (loop); act != father; act = loop_outer (act))
act->num_nodes -= loop->num_nodes;
flow_loop_tree_node_remove (loop);
flow_loop_tree_node_add (father, loop);
@@ -305,7 +305,7 @@ remove_path (edge e)
we belong to. In this case first unloop the loops, then proceed
normally. We may assume that e->dest is not a header of any loop,
as it now has exactly one predecessor. */
- while (e->src->loop_father->outer
+ while (loop_outer (e->src->loop_father)
&& dominated_by_p (CDI_DOMINATORS,
e->src->loop_father->latch, e->dest))
unloop (e->src->loop_father, &irred_invalidated);
@@ -434,7 +434,7 @@ add_loop (struct loop *loop, struct loop *outer)
/* If we find a direct subloop of OUTER, move it to LOOP. */
subloop = bbs[i]->loop_father;
- if (subloop->outer == outer
+ if (loop_outer (subloop) == outer
&& subloop->header == bbs[i])
{
flow_loop_tree_node_remove (subloop);
@@ -477,7 +477,7 @@ loopify (edge latch_edge, edge header_edge,
unsigned n_dom_bbs, i;
sbitmap seen;
struct loop *loop = alloc_loop ();
- struct loop *outer = succ_bb->loop_father->outer;
+ struct loop *outer = loop_outer (succ_bb->loop_father);
int freq;
gcov_type cnt;
edge e;
@@ -592,7 +592,7 @@ unloop (struct loop *loop, bool *irred_invalidated)
if (body[i]->loop_father == loop)
{
remove_bb_from_loops (body[i]);
- add_bb_to_loop (body[i], loop->outer);
+ add_bb_to_loop (body[i], loop_outer (loop));
}
free(body);
@@ -600,7 +600,7 @@ unloop (struct loop *loop, bool *irred_invalidated)
{
ploop = loop->inner;
flow_loop_tree_node_remove (ploop);
- flow_loop_tree_node_add (loop->outer, ploop);
+ flow_loop_tree_node_add (loop_outer (loop), ploop);
}
/* Remove the loop and free its data. */
@@ -627,9 +627,9 @@ fix_loop_placements (struct loop *loop, bool *irred_invalidated)
{
struct loop *outer;
- while (loop->outer)
+ while (loop_outer (loop))
{
- outer = loop->outer;
+ outer = loop_outer (loop);
if (!fix_loop_placement (loop))
break;
@@ -1393,7 +1393,7 @@ fix_loop_structure (bitmap changed_bbs)
FOR_EACH_BB (bb)
{
if (changed_bbs)
- bb->aux = (void *) (size_t) bb->loop_father->depth;
+ bb->aux = (void *) (size_t) loop_depth (bb->loop_father);
bb->loop_father = current_loops->tree_root;
}
@@ -1416,7 +1416,7 @@ fix_loop_structure (bitmap changed_bbs)
{
ploop = loop->inner;
flow_loop_tree_node_remove (ploop);
- flow_loop_tree_node_add (loop->outer, ploop);
+ flow_loop_tree_node_add (loop_outer (loop), ploop);
}
/* Remove the loop and free its data. */
@@ -1439,7 +1439,7 @@ fix_loop_structure (bitmap changed_bbs)
FOR_EACH_LOOP (li, loop, 0)
{
ploop = superloop[loop->num];
- if (ploop != loop->outer)
+ if (ploop != loop_outer (loop))
{
flow_loop_tree_node_remove (loop);
flow_loop_tree_node_add (ploop, loop);
@@ -1452,7 +1452,7 @@ fix_loop_structure (bitmap changed_bbs)
{
FOR_EACH_BB (bb)
{
- if ((void *) (size_t) bb->loop_father->depth != bb->aux)
+ if ((void *) (size_t) loop_depth (bb->loop_father) != bb->aux)
bitmap_set_bit (changed_bbs, bb->index);
bb->aux = NULL;