From patchwork Mon Aug 2 20:19:48 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sebastian Pop X-Patchwork-Id: 60612 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) by ozlabs.org (Postfix) with SMTP id 49CA8B70B4 for ; Tue, 3 Aug 2010 06:23:57 +1000 (EST) Received: (qmail 25488 invoked by alias); 2 Aug 2010 20:22:26 -0000 Received: (qmail 25305 invoked by uid 22791); 2 Aug 2010 20:22:18 -0000 X-SWARE-Spam-Status: No, hits=-1.8 required=5.0 tests=AWL, BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, FREEMAIL_FROM, TW_CF, TW_SV, TW_TM, T_TO_NO_BRKTS_FREEMAIL X-Spam-Check-By: sourceware.org Received: from mail-gx0-f175.google.com (HELO mail-gx0-f175.google.com) (209.85.161.175) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Mon, 02 Aug 2010 20:22:12 +0000 Received: by mail-gx0-f175.google.com with SMTP id 2so1547060gxk.20 for ; Mon, 02 Aug 2010 13:22:12 -0700 (PDT) Received: by 10.150.68.9 with SMTP id q9mr7479460yba.208.1280780531809; Mon, 02 Aug 2010 13:22:11 -0700 (PDT) Received: from napoca (cpe-70-120-196-107.austin.res.rr.com [70.120.196.107]) by mx.google.com with ESMTPS id f5sm4387453ybi.7.2010.08.02.13.22.09 (version=TLSv1/SSLv3 cipher=RC4-MD5); Mon, 02 Aug 2010 13:22:11 -0700 (PDT) Received: by napoca (sSMTP sendmail emulation); Mon, 02 Aug 2010 15:22:08 -0500 From: Sebastian Pop To: gcc-patches@gcc.gnu.org Cc: Tobias Grosser , gcc-graphite Subject: [PATCH 15/65] Remove rename_nb_iterations and rename_sese_parameters Date: Mon, 2 Aug 2010 15:19:48 -0500 Message-Id: <1280780438-17543-16-git-send-email-sebpop@gmail.com> In-Reply-To: <1280780438-17543-1-git-send-email-sebpop@gmail.com> References: <1280780438-17543-1-git-send-email-sebpop@gmail.com> X-IsSubscribed: yes Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Delivered-To: mailing list gcc-patches@gcc.gnu.org From: spop 2010-06-12 Sebastian Pop * 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 + * 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 + * 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 + * 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 + * 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. */