public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Sebastian Pop <sebpop@gmail.com>
To: gcc-patches@gcc.gnu.org
Cc: Tobias Grosser <grosser@fim.uni-passau.de>,
	gcc-graphite <gcc-graphite@googlegroups.com>
Subject: [PATCH 15/65] Remove rename_nb_iterations and rename_sese_parameters
Date: Mon, 02 Aug 2010 20:22:00 -0000	[thread overview]
Message-ID: <1280780438-17543-16-git-send-email-sebpop@gmail.com> (raw)
In-Reply-To: <1280780438-17543-1-git-send-email-sebpop@gmail.com>

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(-)

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.  */
 
-- 
1.7.0.4

  parent reply	other threads:[~2010-08-02 20:22 UTC|newest]

Thread overview: 74+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-08-02 20:21 [PATCH 00/65] Merge from the Graphite branch to trunk Sebastian Pop
2010-08-02 20:21 ` [PATCH 08/65] Do not gather loop exit conditions on the basic blocks outside the loop Sebastian Pop
2010-08-02 20:21 ` [PATCH 02/65] Fix type of integer_one_node for fold_build of POINTER_PLUS_EXPR Sebastian Pop
2010-08-02 20:21 ` [PATCH 01/65] Fix invariant phi node removal Sebastian Pop
2010-08-02 20:21 ` [PATCH 03/65] Use size_one_node Sebastian Pop
2010-08-02 20:21 ` [PATCH 06/65] Fix refined region tree nesting Sebastian Pop
2010-08-02 20:21 ` [PATCH 07/65] Fix comments and indentation Sebastian Pop
2010-08-02 20:21 ` [PATCH 09/65] Call compute_overall_effect_of_inner_loop from instantiate_scev_name Sebastian Pop
2010-08-02 20:21 ` [PATCH 05/65] Skeleton for the new SCoP detection Sebastian Pop
2010-08-02 20:22 ` [PATCH 14/65] Also rewrite out of SSA scalar dependences going outside the SCoP region Sebastian Pop
2010-11-10 12:23   ` H.J. Lu
2010-08-02 20:22 ` [PATCH 18/65] Split rewrite_cross_bb_scalar_deps_out_of_ssa out from rewrite_reductions_out_of_ssa Sebastian Pop
2010-08-02 20:22 ` [PATCH 19/65] Always insert out of SSA copies on edges except for loop->latch Sebastian Pop
2010-08-02 20:22 ` [PATCH 16/65] Schedule a copy_prop pass before graphite Sebastian Pop
2010-08-02 20:22 ` [PATCH 13/65] Remove insert_copyout and insert_copyin Sebastian Pop
2010-08-02 20:22 ` [PATCH 04/65] Add analysis pass to build the refined program structure tree Sebastian Pop
2010-08-02 20:22 ` Sebastian Pop [this message]
2010-08-02 20:22 ` [PATCH 12/65] Detect commutative reductions in all the scops before rewriting out of SSA all the other scalar dependences Sebastian Pop
2010-08-02 20:22 ` [PATCH 21/65] Early return in rewrite_commutative_reductions_out_of_ssa when flag_associative_math is not set Sebastian Pop
2010-08-02 20:22 ` [PATCH 17/65] Add more debug counter guards Sebastian Pop
2010-08-02 20:22 ` [PATCH 10/65] Don't call pbb_to_depth_to_oldiv from compute_type_for_level Sebastian Pop
2010-08-02 20:23 ` [PATCH 40/65] Scevs could be expressions without chrecs and still be scev_analyzable_p Sebastian Pop
2010-08-02 20:23 ` [PATCH 24/65] Replace map with rename_map Sebastian Pop
2010-08-02 20:23 ` [PATCH 26/65] Fix 435.gromacs miscompile: call rewrite_close_phi_out_of_ssa from rewrite_cross_bb_phi_deps Sebastian Pop
2010-08-02 20:23 ` [PATCH 30/65] Move cloog-related functions from graphite-ppl.{c,h} to new graphite-cloog-util.{c,h} Sebastian Pop
2010-08-02 20:23 ` [PATCH 25/65] Remove dead code Sebastian Pop
2010-08-02 20:23 ` [PATCH 33/65] Fix flipped condition using mpz_sgn Sebastian Pop
2010-08-02 20:23 ` [PATCH 20/65] Fix testcase: call abort Sebastian Pop
2010-08-02 20:23 ` [PATCH 31/65] Partially removing cloog.h and graphite-clast-to-gimple.h where possible. Removing unused function check_poly_representation Sebastian Pop
2010-08-02 20:23 ` [PATCH 28/65] Print bbs in refined region tree Sebastian Pop
2010-08-02 20:23 ` [PATCH 11/65] Launch dotty in background Sebastian Pop
2010-08-02 20:23 ` [PATCH 38/65] Remove uses of loop->single_iv Sebastian Pop
2010-08-02 20:23 ` [PATCH 32/65] Add testcase for miscompile in gamess Sebastian Pop
2010-08-02 20:23 ` [PATCH 37/65] Also handle GIMPLE_CALLs in rewrite_cross_bb_scalar_deps Sebastian Pop
2010-08-02 20:23 ` [PATCH 27/65] Fix 416.gamess miscompile: special case the rewrite of degenerate phi nodes Sebastian Pop
2010-08-02 20:23 ` [PATCH 23/65] Remove copy_renames Sebastian Pop
2010-08-02 20:24 ` [PATCH 29/65] Resolve CLooG's value_* macros to their respective mpz_* counterparts Sebastian Pop
2010-08-02 20:24 ` [PATCH 48/65] Dot refined regions Sebastian Pop
2010-08-02 20:24 ` [PATCH 35/65] Remove expand_scalar_variables_ hack Sebastian Pop
2010-08-02 20:24 ` [PATCH 47/65] Do not translate out-of-SSA close phi nodes that can be analyzed with scev Sebastian Pop
2010-08-02 20:24 ` [PATCH 22/65] Run rewrite_cross_bb_phi_deps before rewrite_cross_bb_scalar_deps Sebastian Pop
2010-08-02 20:24 ` [PATCH 46/65] Add testcase for PR20742 Sebastian Pop
2010-08-02 20:24 ` [PATCH 49/65] Add loop_exits_from_bb_p Sebastian Pop
2010-08-02 20:24 ` [PATCH 44/65] Do not rewrite out of SSA scalar phi nodes that can be scev_analyzable_p Sebastian Pop
2010-08-02 20:24 ` [PATCH 52/65] Use SSA_NAME_DEF_STMT only on SSA_NAMEs Sebastian Pop
2010-08-02 20:24 ` [PATCH 34/65] Remove insert_loop_close_phis Sebastian Pop
2010-08-02 20:24 ` [PATCH 43/65] Correctly handle SSA_NAME_IS_DEFAULT_DEF in rewrite_close_phi_out_of_ssa Sebastian Pop
2010-08-02 20:24 ` [PATCH 36/65] chrec_apply should only apply to the specified variable Sebastian Pop
2010-08-02 20:24 ` [PATCH 39/65] Bump the size of scevs Sebastian Pop
2010-08-02 20:24 ` [PATCH 51/65] Do not instantiate default definitions in instantiate_scev_name Sebastian Pop
2010-08-02 20:25 ` [PATCH 56/65] Call scev_reset_htab when Graphite out-of-SSA has changed something Sebastian Pop
2010-08-02 20:25 ` [PATCH 63/65] Fix typos Sebastian Pop
2010-08-02 20:25 ` [PATCH 65/65] Fix miscompile of 416.gamess Sebastian Pop
2010-08-02 20:25 ` [PATCH 50/65] Enhance region checks Sebastian Pop
2010-08-02 20:25 ` [PATCH 41/65] Special case non close-phi nodes with one argument in rewrite_close_phi_out_of_ssa Sebastian Pop
2010-08-02 20:25 ` [PATCH 53/65] Propagate constant values or parametric expressions outside the scop region Sebastian Pop
2010-08-02 20:25 ` [PATCH 57/65] Reintroduce necessary CLooG accessors to graphite. Masked by CLOOG_ORG Sebastian Pop
2010-08-02 20:25 ` [PATCH 42/65] Add testcase for PR42729 and fix handling of gimple_debug info Sebastian Pop
2010-08-02 20:25 ` [PATCH 45/65] Unshare the scev before code generating it Sebastian Pop
2010-08-02 20:25 ` [PATCH 54/65] Call scev_analyzable_p only on is_gimple_reg Sebastian Pop
2010-08-02 20:25 ` [PATCH 58/65] Make CLooG options compatible to newer CLooG releases and pass options to build_cloog_prog (CLOOG_ORG) Sebastian Pop
2010-08-02 20:25 ` [PATCH 64/65] Fix gamess: the only constant phi nodes with one argument are is_gimple_min_invariant and SSA_NAME_IS_DEFAULT_DEF Sebastian Pop
2010-08-02 20:25 ` [PATCH 62/65] Remove cloog_initialize and cloog_finalize when using official CLooG releases Sebastian Pop
2010-08-02 20:25 ` [PATCH 61/65] Adapt to new CloogScattering abstraction, introduced in official CLooG versions (CLOOG_ORG) Sebastian Pop
2010-08-02 20:25 ` [PATCH 60/65] Introduce compatibility to newer CLooG's CloogState and mask the use with macros where possible Sebastian Pop
2010-08-02 20:25 ` [PATCH 59/65] Adapt to new CLAST structure within upstream CLooG version and retain compatibility to CLooG Legacy Sebastian Pop
2010-08-02 20:25 ` [PATCH 55/65] Fix tonto: call propagate_expr_outside_region Sebastian Pop
2010-10-26 19:37   ` H.J. Lu
2010-08-03  2:52 ` [PATCH 00/65] Merge from the Graphite branch to trunk Jack Howarth
2010-08-03  2:55   ` Jack Howarth
2010-08-03  3:07     ` Sebastian Pop
2010-08-07 10:26       ` Jack Howarth
2010-08-05 15:58 ` Jack Howarth
2010-08-11 20:54 ` Sebastian Pop

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1280780438-17543-16-git-send-email-sebpop@gmail.com \
    --to=sebpop@gmail.com \
    --cc=gcc-graphite@googlegroups.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=grosser@fim.uni-passau.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).