aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree-chrec.c
diff options
context:
space:
mode:
authorSebastian Pop <sebastian.pop@amd.com>2010-08-11 20:27:19 +0000
committerSebastian Pop <sebastian.pop@amd.com>2010-08-11 20:27:19 +0000
commitc58acb02cd02f6ad9e367a04604d94e1a7250347 (patch)
tree04f1178767b7f854003a42f54777ec394c4d0f0f /gcc/tree-chrec.c
parentfc91b3f64f61ab59456ff2d11e9c84b9a2e8c170 (diff)
Remove expand_scalar_variables_ hack.
2010-07-15 Sebastian Pop <sebastian.pop@amd.com> * graphite-clast-to-gimple.c (debug_clast_name_index): Removed. (debug_clast_name_indexes_1): Removed. (debug_clast_name_indexes): Removed. (pbb_to_depth_to_oldiv): Removed. (build_iv_mapping): Replace the use of rename_map with iv_map. (translate_clast_user): Remove uses of rename_map. Allocate and free iv_map. (translate_clast_for_loop): Remove uses of rename_map. (translate_clast_for): Same. (translate_clast_guard): Same. (translate_clast): Same. (gloog): Same. * graphite-clast-to-gimple.h (debug_clast_name_indexes): Removed. * graphite-sese-to-poly.c (scev_analyzable_p): Moved... * sese.c (set_rename): Now static. (rename_variables_in_stmt): Removed. (rename_uses): New. (is_parameter): Removed. (is_iv): Removed. (expand_scalar_variables_call): Removed. (expand_scalar_variables_ssa_name): Removed. (expand_scalar_variables_expr): Removed. (expand_scalar_variables_stmt): Removed. (expand_scalar_variables): Removed. (rename_variables): Removed. (remove_condition): Removed. (get_true_edge_from_guard_bb): Removed. (get_false_edge_from_guard_bb): Removed. (struct igp): Removed. (default_before_guard): Removed. (convert_for_phi_arg): Removed. (add_guard_exit_phis): Removed. (insert_guard_phis): Removed. (graphite_copy_stmts_from_block): Now also uses iv_map and a region. Do not copy conditions. Do not copy induction variables. Call rename_uses. (copy_bb_and_scalar_dependences): Allocate a local rename_map for the translated statement. Use the iv_map for the induction variable renaming. * sese.h (copy_bb_and_scalar_dependences): Update declaration. (set_rename): Removed declaration. (scev_analyzable_p): ...here. * tree-chrec.c (chrec_apply_map): New. * tree-chrec.h (chrec_apply_map): Declared. git-svn-id: https://gcc.gnu.org/svn/gcc/trunk@163139 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/tree-chrec.c')
-rw-r--r--gcc/tree-chrec.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/gcc/tree-chrec.c b/gcc/tree-chrec.c
index 2d152858c4d..c92b6b9837c 100644
--- a/gcc/tree-chrec.c
+++ b/gcc/tree-chrec.c
@@ -632,6 +632,23 @@ chrec_apply (unsigned var,
return res;
}
+/* For a given CHREC and an induction variable map IV_MAP that maps
+ (loop->num, expr) for every loop number of the current_loops an
+ expression, calls chrec_apply when the expression is not NULL. */
+
+tree
+chrec_apply_map (tree chrec, VEC (tree, heap) *iv_map)
+{
+ int i;
+ tree expr;
+
+ for (i = 0; VEC_iterate (tree, iv_map, i, expr); i++)
+ if (expr)
+ chrec = chrec_apply (i, chrec, expr);
+
+ return chrec;
+}
+
/* Replaces the initial condition in CHREC with INIT_COND. */
tree