Patchwork [15/65] Remove rename_nb_iterations and rename_sese_parameters

login
register
mail settings
Submitter Sebastian Pop
Date Aug. 2, 2010, 8:19 p.m.
Message ID <1280780438-17543-16-git-send-email-sebpop@gmail.com>
Download mbox | patch
Permalink /patch/60612/
State New
Headers show

Comments

Sebastian Pop - Aug. 2, 2010, 8:19 p.m.
From: spop <spop@138bc75d-0d04-0410-961f-82ee72b054a4>

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.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/graphite@160657 138bc75d-0d04-0410-961f-82ee72b054a4
---
 gcc/ChangeLog                  |   12 ++++++++
 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 -
 7 files changed, 27 insertions(+), 67 deletions(-)

Patch

diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 370b42f..d05f124 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,5 +1,17 @@ 
 2010-08-02  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-08-02  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
diff --git a/gcc/ChangeLog.graphite b/gcc/ChangeLog.graphite
index 2c0a3c1..aac1c96 100644
--- a/gcc/ChangeLog.graphite
+++ b/gcc/ChangeLog.graphite
@@ -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
diff --git a/gcc/graphite-clast-to-gimple.c b/gcc/graphite-clast-to-gimple.c
index 859bedf..8b972b8 100644
--- a/gcc/graphite-clast-to-gimple.c
+++ b/gcc/graphite-clast-to-gimple.c
@@ -1529,7 +1529,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;
@@ -1537,7 +1537,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;
@@ -1577,11 +1576,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 ();
 
diff --git a/gcc/graphite-clast-to-gimple.h b/gcc/graphite-clast-to-gimple.h
index f6557f6..c90cfc0 100644
--- a/gcc/graphite-clast-to-gimple.h
+++ b/gcc/graphite-clast-to-gimple.h
@@ -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 *);
diff --git a/gcc/graphite.c b/gcc/graphite.c
index bd47cf7..c4fd2a3 100644
--- a/gcc/graphite.c
+++ b/gcc/graphite.c
@@ -287,7 +287,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);
diff --git a/gcc/sese.c b/gcc/sese.c
index 0a6c45d..8f6b7d7 100644
--- a/gcc/sese.c
+++ b/gcc/sese.c
@@ -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
diff --git a/gcc/sese.h b/gcc/sese.h
index 4b2e5c2..d0d829f 100644
--- a/gcc/sese.h
+++ b/gcc/sese.h
@@ -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.  */