summaryrefslogtreecommitdiff
path: root/gcc/tree-scalar-evolution.c
diff options
context:
space:
mode:
authorrakdver <rakdver@138bc75d-0d04-0410-961f-82ee72b054a4>2007-05-11 15:52:01 +0000
committerrakdver <rakdver@138bc75d-0d04-0410-961f-82ee72b054a4>2007-05-11 15:52:01 +0000
commit9e3536f4f240488c76048b53b25f9343e46d9bf5 (patch)
tree94649f85c3e7ccd857de92cda5f4eabf23d7ec05 /gcc/tree-scalar-evolution.c
parenta861fe5280a07e76c59e2898a13d954fad7399f5 (diff)
downloadgcc-9e3536f4f240488c76048b53b25f9343e46d9bf5.tar.gz
* 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: svn+ssh://gcc.gnu.org/svn/gcc/trunk@124619 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/tree-scalar-evolution.c')
-rw-r--r--gcc/tree-scalar-evolution.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/gcc/tree-scalar-evolution.c b/gcc/tree-scalar-evolution.c
index 955240b6895..b2a266bbf46 100644
--- a/gcc/tree-scalar-evolution.c
+++ b/gcc/tree-scalar-evolution.c
@@ -1534,7 +1534,7 @@ interpret_loop_phi (struct loop *loop, tree loop_phi_node)
(phi_loop, PHI_RESULT (loop_phi_node));
/* Dive one level deeper. */
- subloop = superloop_at_depth (phi_loop, loop->depth + 1);
+ subloop = superloop_at_depth (phi_loop, loop_depth (loop) + 1);
/* Interpret the subloop. */
res = compute_overall_effect_of_inner_loop (subloop, evolution_fn);
@@ -1680,7 +1680,7 @@ compute_scalar_evolution_in_loop (struct loop *wrto_loop,
if (def_loop == wrto_loop)
return ev;
- def_loop = superloop_at_depth (def_loop, wrto_loop->depth + 1);
+ def_loop = superloop_at_depth (def_loop, loop_depth (wrto_loop) + 1);
res = compute_overall_effect_of_inner_loop (def_loop, ev);
return analyze_scalar_evolution_1 (wrto_loop, res, chrec_not_analyzed_yet);
@@ -2023,7 +2023,7 @@ analyze_scalar_evolution_in_loop (struct loop *wrto_loop, struct loop *use_loop,
|| !val)
return chrec_dont_know;
- use_loop = use_loop->outer;
+ use_loop = loop_outer (use_loop);
}
}
@@ -2169,8 +2169,8 @@ instantiate_parameters_1 (struct loop *loop, tree chrec, int flags, htab_t cache
/* Don't instantiate loop-closed-ssa phi nodes. */
if (TREE_CODE (res) == SSA_NAME
&& (loop_containing_stmt (SSA_NAME_DEF_STMT (res)) == NULL
- || (loop_containing_stmt (SSA_NAME_DEF_STMT (res))->depth
- > def_loop->depth)))
+ || (loop_depth (loop_containing_stmt (SSA_NAME_DEF_STMT (res)))
+ > loop_depth (def_loop))))
{
if (res == chrec)
res = loop_closed_phi_def (chrec);
@@ -2966,7 +2966,8 @@ scev_const_prop (void)
tree_block_label (exit->dest);
bsi = bsi_after_labels (exit->dest);
- ex_loop = superloop_at_depth (loop, exit->dest->loop_father->depth + 1);
+ ex_loop = superloop_at_depth (loop,
+ loop_depth (exit->dest->loop_father) + 1);
for (phi = phi_nodes (exit->dest); phi; phi = next_phi)
{