From be9a6b386261452607f5440a46bbfb10700bf3d3 Mon Sep 17 00:00:00 2001
From: Sebastian Pop <sebpop@gmail.com>
Date: Sat, 12 Jun 2010 03:12:04 -0500
Subject: [PATCH] Remove rename_nb_iterations and rename_sese_parameters
2010-06-12 Sebastian Pop <sebastian.pop@amd.com>
* graphite-clast-to-gimple.c (gloog): Do not pass scops in parameter.
Remove calls to rename_nb_iterations and rename_sese_parameters.
* graphite-clast-to-gimple.h (gloog): Update declaration.
* graphite.c (graphite_transform_loops): Update call to gloog.
* sese.c (rename_variables_in_expr): Removed.
(rename_nb_iterations): Removed.
(rename_sese_parameters): Removed.
* sese.h (rename_nb_iterations): Removed.
(rename_sese_parameters): Removed.
---
gcc/ChangeLog.graphite | 12 ++++++++
gcc/graphite-clast-to-gimple.c | 8 +-----
gcc/graphite-clast-to-gimple.h | 2 +-
gcc/graphite.c | 2 +-
gcc/sese.c | 56 ----------------------------------------
gcc/sese.h | 2 -
6 files changed, 15 insertions(+), 67 deletions(-)
@@ -1,5 +1,17 @@
2010-06-12 Sebastian Pop <sebastian.pop@amd.com>
+ * graphite-clast-to-gimple.c (gloog): Do not pass scops in parameter.
+ Remove calls to rename_nb_iterations and rename_sese_parameters.
+ * graphite-clast-to-gimple.h (gloog): Update declaration.
+ * graphite.c (graphite_transform_loops): Update call to gloog.
+ * sese.c (rename_variables_in_expr): Removed.
+ (rename_nb_iterations): Removed.
+ (rename_sese_parameters): Removed.
+ * sese.h (rename_nb_iterations): Removed.
+ (rename_sese_parameters): Removed.
+
+2010-06-12 Sebastian Pop <sebastian.pop@amd.com>
+
* graphite-clast-to-gimple.c (gloog): Remove call to
sese_adjust_liveout_phis.
* graphite-sese-to-poly.c (scev_analyzable_p): When scev returns an
@@ -1531,7 +1531,7 @@ create_params_index (htab_t index_table, CloogProgram *prog) {
*/
bool
-gloog (scop_p scop, VEC (scop_p, heap) *scops, htab_t bb_pbb_mapping)
+gloog (scop_p scop, htab_t bb_pbb_mapping)
{
VEC (tree, heap) *newivs = VEC_alloc (tree, heap, 10);
loop_p context_loop;
@@ -1539,7 +1539,6 @@ gloog (scop_p scop, VEC (scop_p, heap) *scops, htab_t bb_pbb_mapping)
ifsese if_region = NULL;
htab_t rename_map, newivs_index, params_index;
cloog_prog_clast pc;
- int i;
timevar_push (TV_GRAPHITE_CODE_GEN);
gloog_error = false;
@@ -1579,11 +1578,6 @@ gloog (scop_p scop, VEC (scop_p, heap) *scops, htab_t bb_pbb_mapping)
bb_pbb_mapping, 1, params_index);
graphite_verify ();
scev_reset_htab ();
- rename_nb_iterations (rename_map);
-
- for (i = 0; VEC_iterate (scop_p, scops, i, scop); i++)
- rename_sese_parameters (rename_map, SCOP_REGION (scop));
-
recompute_all_dominators ();
graphite_verify ();
@@ -36,7 +36,7 @@ typedef struct bb_pbb_def
poly_bb_p pbb;
}bb_pbb_def;
-extern bool gloog (scop_p, VEC (scop_p, heap) *, htab_t);
+extern bool gloog (scop_p, htab_t);
extern cloog_prog_clast scop_to_clast (scop_p);
extern void debug_clast_stmt (struct clast_stmt *);
extern void print_clast_stmt (FILE *, struct clast_stmt *);
@@ -289,7 +289,7 @@ graphite_transform_loops (void)
for (i = 0; VEC_iterate (scop_p, scops, i, scop); i++)
if (POLY_SCOP_P (scop)
&& apply_poly_transforms (scop)
- && gloog (scop, scops, bb_pbb_mapping))
+ && gloog (scop, bb_pbb_mapping))
need_cfg_cleanup_p = true;
htab_delete (bb_pbb_mapping);
@@ -435,62 +435,6 @@ set_rename (htab_t map, tree old_name, tree expr)
*slot = new_rename_map_elt (old_name, expr);
}
-/* Renames the expression T following the tuples (OLD_NAME, EXPR) in
- the rename map M. Returns the expression T after renaming. */
-
-static tree
-rename_variables_in_expr (htab_t m, tree t)
-{
- if (!t)
- return t;
-
- if (TREE_CODE (t) == SSA_NAME)
- return get_rename (m, t);
-
- switch (TREE_CODE_LENGTH (TREE_CODE (t)))
- {
- case 3:
- TREE_OPERAND (t, 2) = rename_variables_in_expr (m, TREE_OPERAND (t, 2));
-
- case 2:
- TREE_OPERAND (t, 1) = rename_variables_in_expr (m, TREE_OPERAND (t, 1));
-
- case 1:
- TREE_OPERAND (t, 0) = rename_variables_in_expr (m, TREE_OPERAND (t, 0));
-
- default:
- return t;
- }
-}
-
-/* Renames all the loop->nb_iterations expressions following the
- tuples (OLD_NAME, EXPR) in RENAME_MAP. */
-
-void
-rename_nb_iterations (htab_t rename_map)
-{
- loop_iterator li;
- struct loop *loop;
-
- FOR_EACH_LOOP (li, loop, 0)
- loop->nb_iterations = rename_variables_in_expr (rename_map,
- loop->nb_iterations);
-}
-
-/* Renames all the parameters of SESE following the tuples (OLD_NAME,
- EXPR) in RENAME_MAP. */
-
-void
-rename_sese_parameters (htab_t rename_map, sese region)
-{
- int i;
- tree p;
-
- for (i = 0; VEC_iterate (tree, SESE_PARAMS (region), i, p); i++)
- VEC_replace (tree, SESE_PARAMS (region), i,
- rename_variables_in_expr (rename_map, p));
-}
-
/* Rename the SSA_NAMEs used in STMT and that appear in MAP. */
static void
@@ -262,8 +262,6 @@ extern void debug_rename_map (htab_t);
extern hashval_t rename_map_elt_info (const void *);
extern int eq_rename_map_elts (const void *, const void *);
extern void set_rename (htab_t, tree, tree);
-extern void rename_nb_iterations (htab_t);
-extern void rename_sese_parameters (htab_t, sese);
/* Constructs a new SCEV_INFO_STR structure for VAR and INSTANTIATED_BELOW. */
--
1.7.0.4