From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 4544 invoked by alias); 2 Aug 2010 20:25:17 -0000 Received: (qmail 3972 invoked by uid 22791); 2 Aug 2010 20:24:59 -0000 X-SWARE-Spam-Status: No, hits=-1.9 required=5.0 tests=AWL,BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,TW_SV,T_TO_NO_BRKTS_FREEMAIL X-Spam-Check-By: sourceware.org Received: from mail-yx0-f175.google.com (HELO mail-yx0-f175.google.com) (209.85.213.175) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Mon, 02 Aug 2010 20:24:41 +0000 Received: by yxi11 with SMTP id 11so1551041yxi.20 for ; Mon, 02 Aug 2010 13:24:39 -0700 (PDT) Received: by 10.150.166.21 with SMTP id o21mr7586193ybe.70.1280780679216; Mon, 02 Aug 2010 13:24:39 -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 q3sm5732383ybe.14.2010.08.02.13.24.36 (version=TLSv1/SSLv3 cipher=RC4-MD5); Mon, 02 Aug 2010 13:24:38 -0700 (PDT) Received: by napoca (sSMTP sendmail emulation); Mon, 02 Aug 2010 15:24:35 -0500 From: Sebastian Pop To: gcc-patches@gcc.gnu.org Cc: Tobias Grosser , gcc-graphite Subject: [PATCH 57/65] Reintroduce necessary CLooG accessors to graphite. Masked by CLOOG_ORG. Date: Mon, 02 Aug 2010 20:25:00 -0000 Message-Id: <1280780438-17543-58-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-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org X-SW-Source: 2010-08/txt/msg00129.txt.bz2 From: spop 2010-07-27 Andreas Simbuerger * graphite-clast-to-gimple.c: Include graphite-cloog-compat.h conditionally (CLOOG_ORG). * graphite-cloog-compat.h: New. Include graphite-cloog-compat.h. (cloog_statement_usr): New. (cloog_domain): Same. (cloog_set_domain): Same. (cloog_next_domain): Same. (cloog_set_next_domain): Same. (cloog_program_nb_scattdims): Same. (cloog_program_set_nb_scattdims): Same. (cloog_program_names): Same. (cloog_program_set_names): Same. (cloog_program_set_context): Same. (cloog_program_set_loop): Same. (cloog_program_blocklist): Same. (cloog_program_set_blocklist): Same. (cloog_program_scaldims): Same. (cloog_program_set_scaldims): Same. (cloog_names_nb_parameters): Same. (cloog_names_set_nb_parameters): Same. (cloog_names_parameters): Same. (cloog_names_set_parameters): Same. (cloog_names_set_nb_iterators): Same. (cloog_names_set_iterators): Same. (cloog_names_set_nb_scattering): Same. (cloog_names_set_scattering): Same. (cloog_statement_set_usr): Same. (cloog_loop_set_next): Same. (cloog_loop_set_domain): Same. (cloog_loop_set_block): Same. (cloog_block_list_next): Same. (cloog_block_list_set_next): (cloog_block_list_set_block): Same. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/graphite@162604 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/ChangeLog | 36 +++++++ gcc/ChangeLog.graphite | 36 +++++++ gcc/graphite-clast-to-gimple.c | 1 + gcc/graphite-cloog-compat.h | 210 ++++++++++++++++++++++++++++++++++++++++ gcc/graphite-cloog-util.h | 1 + 5 files changed, 284 insertions(+), 0 deletions(-) create mode 100644 gcc/graphite-cloog-compat.h diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 559a2f8..0583fd6 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,39 @@ +2010-08-02 Andreas Simbuerger + + * graphite-clast-to-gimple.c: Include graphite-cloog-compat.h + conditionally (CLOOG_ORG). + * graphite-cloog-compat.h: New. Include graphite-cloog-compat.h. + (cloog_statement_usr): New. + (cloog_domain): Same. + (cloog_set_domain): Same. + (cloog_next_domain): Same. + (cloog_set_next_domain): Same. + (cloog_program_nb_scattdims): Same. + (cloog_program_set_nb_scattdims): Same. + (cloog_program_names): Same. + (cloog_program_set_names): Same. + (cloog_program_set_context): Same. + (cloog_program_set_loop): Same. + (cloog_program_blocklist): Same. + (cloog_program_set_blocklist): Same. + (cloog_program_scaldims): Same. + (cloog_program_set_scaldims): Same. + (cloog_names_nb_parameters): Same. + (cloog_names_set_nb_parameters): Same. + (cloog_names_parameters): Same. + (cloog_names_set_parameters): Same. + (cloog_names_set_nb_iterators): Same. + (cloog_names_set_iterators): Same. + (cloog_names_set_nb_scattering): Same. + (cloog_names_set_scattering): Same. + (cloog_statement_set_usr): Same. + (cloog_loop_set_next): Same. + (cloog_loop_set_domain): Same. + (cloog_loop_set_block): Same. + (cloog_block_list_next): Same. + (cloog_block_list_set_next): + (cloog_block_list_set_block): Same. + 2010-08-02 Sebastian Pop * graphite-sese-to-poly.c (rewrite_cross_bb_scalar_deps): Returns diff --git a/gcc/ChangeLog.graphite b/gcc/ChangeLog.graphite index bcdd3a9..cfc3c7a 100644 --- a/gcc/ChangeLog.graphite +++ b/gcc/ChangeLog.graphite @@ -1,3 +1,39 @@ +2010-07-27 Andreas Simbuerger + + * graphite-clast-to-gimple.c: Include graphite-cloog-compat.h + conditionally (CLOOG_ORG). + * graphite-cloog-compat.h: New. Include graphite-cloog-compat.h. + (cloog_statement_usr): New. + (cloog_domain): Same. + (cloog_set_domain): Same. + (cloog_next_domain): Same. + (cloog_set_next_domain): Same. + (cloog_program_nb_scattdims): Same. + (cloog_program_set_nb_scattdims): Same. + (cloog_program_names): Same. + (cloog_program_set_names): Same. + (cloog_program_set_context): Same. + (cloog_program_set_loop): Same. + (cloog_program_blocklist): Same. + (cloog_program_set_blocklist): Same. + (cloog_program_scaldims): Same. + (cloog_program_set_scaldims): Same. + (cloog_names_nb_parameters): Same. + (cloog_names_set_nb_parameters): Same. + (cloog_names_parameters): Same. + (cloog_names_set_parameters): Same. + (cloog_names_set_nb_iterators): Same. + (cloog_names_set_iterators): Same. + (cloog_names_set_nb_scattering): Same. + (cloog_names_set_scattering): Same. + (cloog_statement_set_usr): Same. + (cloog_loop_set_next): Same. + (cloog_loop_set_domain): Same. + (cloog_loop_set_block): Same. + (cloog_block_list_next): Same. + (cloog_block_list_set_next): + (cloog_block_list_set_block): Same. + 2010-07-27 Sebastian Pop * graphite-sese-to-poly.c (rewrite_cross_bb_scalar_deps): Returns diff --git a/gcc/graphite-clast-to-gimple.c b/gcc/graphite-clast-to-gimple.c index 90ea435..89a182c 100644 --- a/gcc/graphite-clast-to-gimple.c +++ b/gcc/graphite-clast-to-gimple.c @@ -53,6 +53,7 @@ along with GCC; see the file COPYING3. If not see #include "graphite-scop-detection.h" #include "graphite-clast-to-gimple.h" #include "graphite-dependences.h" +#include "graphite-cloog-compat.h" /* This flag is set when an error occurred during the translation of CLAST to Gimple. */ diff --git a/gcc/graphite-cloog-compat.h b/gcc/graphite-cloog-compat.h new file mode 100644 index 0000000..44f7157 --- /dev/null +++ b/gcc/graphite-cloog-compat.h @@ -0,0 +1,210 @@ +/* Compatibility layer for using upstream CLooG versions with + CLooG legacy code. + Copyright (C) 2010 Free Software Foundation, Inc. + Contributed by Andreas Simbuerger . + +This file is part of GCC. + +GCC is free software; you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation; either version 3, or (at your option) +any later version. + +GCC is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with GCC; see the file COPYING3. If not see +. */ + +#ifndef GRAPHITE_CLOOG_COMPAT_H +#define GRAPHITE_CLOOG_COMPAT_H + +/* Adapt CLooG accessors from CLooG legacy to + newer CLooG versions. */ + +#ifdef CLOOG_ORG + +static inline void * +cloog_statement_usr (CloogStatement *cs) +{ + return cs->usr; +} + +static inline CloogDomain * +cloog_domain (CloogDomainList *dl) +{ + return dl->domain; +} + +static inline void +cloog_set_domain (CloogDomainList *dl, CloogDomain *domain) +{ + dl->domain = domain; +} + +static inline CloogDomainList * +cloog_next_domain (CloogDomainList *dl) +{ + return dl->next; +} + +static inline void +cloog_set_next_domain (CloogDomainList *dl, CloogDomainList *next) +{ + dl->next = next; +} + +static inline int +cloog_program_nb_scattdims (CloogProgram *prog) +{ + return prog->nb_scattdims; +} + +static inline void +cloog_program_set_nb_scattdims (CloogProgram *prog, int nb_scattdims) +{ + prog->nb_scattdims = nb_scattdims; +} + +static inline CloogNames * +cloog_program_names (CloogProgram *prog) +{ + return prog->names; +} + +static inline void +cloog_program_set_names (CloogProgram *prog, CloogNames *names) +{ + prog->names = names; +} + +static inline void +cloog_program_set_context (CloogProgram *prog, CloogDomain *domain) +{ + prog->context = domain; +} + +static inline void +cloog_program_set_loop (CloogProgram *prog, CloogLoop *loop) +{ + prog->loop = loop; +} + +static inline CloogBlockList * +cloog_program_blocklist (CloogProgram *prog) +{ + return prog->blocklist; +} + +static inline void +cloog_program_set_blocklist (CloogProgram *prog, CloogBlockList *bl) +{ + prog->blocklist = bl; +} + +static inline int * +cloog_program_scaldims (CloogProgram *prog) +{ + return prog->scaldims; +} + +static inline void +cloog_program_set_scaldims (CloogProgram *prog, int *s) +{ + prog->scaldims = s; +} + +static inline int +cloog_names_nb_parameters (CloogNames *names) +{ + return names->nb_parameters; +} + +static inline void +cloog_names_set_nb_parameters (CloogNames *names, int nb_parameters) +{ + names->nb_parameters = nb_parameters; +} + +static inline char ** +cloog_names_parameters (CloogNames *names) +{ + return names->parameters; +} + +static inline void +cloog_names_set_parameters (CloogNames *names, char **parameters) +{ + names->parameters = parameters; +} + +static inline void +cloog_names_set_nb_iterators (CloogNames *names, int nb_iterators) +{ + names->nb_iterators = nb_iterators; +} + +static inline void +cloog_names_set_iterators (CloogNames *names, char **iterators) +{ + names->iterators = iterators; +} + +static inline void +cloog_names_set_nb_scattering (CloogNames *names, int nb_scattering) +{ + names->nb_scattering = nb_scattering; +} + +static inline void +cloog_names_set_scattering (CloogNames *names, char **scattering) +{ + names->scattering = scattering; +} + +static inline void +cloog_statement_set_usr (CloogStatement *cs, void *u) +{ + cs->usr = u; +} + +static inline void +cloog_loop_set_next (CloogLoop *loop, CloogLoop *next) +{ + loop->next = next; +} + +static inline void +cloog_loop_set_domain (CloogLoop *loop, CloogDomain *domain) +{ + loop->domain = domain; +} + +static inline void +cloog_loop_set_block (CloogLoop *loop, CloogBlock *block) +{ + loop->block = block; +} + +static inline CloogBlockList * +cloog_block_list_next (CloogBlockList *bl) +{ + return bl->next; +} + +static inline void +cloog_block_list_set_next (CloogBlockList *bl, CloogBlockList *next) +{ + bl->next = next; +} + +static inline void +cloog_block_list_set_block (CloogBlockList *bl, CloogBlock *block) +{ + bl->block = block; +} +#endif /* CLOOG_ORG */ +#endif /* GRAPHITE_CLOOG_COMPAT_H */ diff --git a/gcc/graphite-cloog-util.h b/gcc/graphite-cloog-util.h index 3180b0e..da7b2e6 100644 --- a/gcc/graphite-cloog-util.h +++ b/gcc/graphite-cloog-util.h @@ -22,6 +22,7 @@ along with GCC; see the file COPYING3. If not see #define GRAPHITE_CLOOG_UTIL_H #include "cloog/cloog.h" +#include "graphite-cloog-compat.h" CloogMatrix *new_Cloog_Matrix_from_ppl_Polyhedron (ppl_const_Polyhedron_t); CloogDomain *new_Cloog_Domain_from_ppl_Polyhedron (ppl_const_Polyhedron_t); -- 1.7.0.4