1*e4b17023SJohn Marino /* Graphite polyhedral representation. 2*e4b17023SJohn Marino Copyright (C) 2009, 2010 Free Software Foundation, Inc. 3*e4b17023SJohn Marino Contributed by Konrad Trifunovic <konrad.trifunovic@gmail.com> 4*e4b17023SJohn Marino 5*e4b17023SJohn Marino This file is part of GCC. 6*e4b17023SJohn Marino 7*e4b17023SJohn Marino GCC is free software; you can redistribute it and/or modify 8*e4b17023SJohn Marino it under the terms of the GNU General Public License as published by 9*e4b17023SJohn Marino the Free Software Foundation; either version 3, or (at your option) 10*e4b17023SJohn Marino any later version. 11*e4b17023SJohn Marino 12*e4b17023SJohn Marino GCC is distributed in the hope that it will be useful, 13*e4b17023SJohn Marino but WITHOUT ANY WARRANTY; without even the implied warranty of 14*e4b17023SJohn Marino MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15*e4b17023SJohn Marino GNU General Public License for more details. 16*e4b17023SJohn Marino 17*e4b17023SJohn Marino You should have received a copy of the GNU General Public License 18*e4b17023SJohn Marino along with GCC; see the file COPYING3. If not see 19*e4b17023SJohn Marino <http://www.gnu.org/licenses/>. */ 20*e4b17023SJohn Marino 21*e4b17023SJohn Marino #ifndef GCC_GRAPHITE_DEPENDENCES_H 22*e4b17023SJohn Marino #define GCC_GRAPHITE_DEPENDENCES_H 23*e4b17023SJohn Marino 24*e4b17023SJohn Marino extern bool graphite_legal_transform (scop_p); 25*e4b17023SJohn Marino extern bool dependency_between_pbbs_p (poly_bb_p, poly_bb_p, int); 26*e4b17023SJohn Marino 27*e4b17023SJohn Marino enum poly_dependence_kind { 28*e4b17023SJohn Marino unknown_dependence, 29*e4b17023SJohn Marino no_dependence, 30*e4b17023SJohn Marino has_dependence 31*e4b17023SJohn Marino }; 32*e4b17023SJohn Marino 33*e4b17023SJohn Marino /* Represents a Polyhedral Data Dependence Relation. */ 34*e4b17023SJohn Marino 35*e4b17023SJohn Marino typedef struct poly_ddr 36*e4b17023SJohn Marino { 37*e4b17023SJohn Marino /* Source and sink data references of the dependence. */ 38*e4b17023SJohn Marino poly_dr_p source, sink; 39*e4b17023SJohn Marino 40*e4b17023SJohn Marino /* Data dependence polyhedron. */ 41*e4b17023SJohn Marino ppl_Pointset_Powerset_C_Polyhedron_t ddp; 42*e4b17023SJohn Marino 43*e4b17023SJohn Marino enum poly_dependence_kind kind; 44*e4b17023SJohn Marino 45*e4b17023SJohn Marino /* True when the dependence relation is for the original scattering. */ 46*e4b17023SJohn Marino bool original_scattering_p; 47*e4b17023SJohn Marino 48*e4b17023SJohn Marino } *poly_ddr_p; 49*e4b17023SJohn Marino 50*e4b17023SJohn Marino #define PDDR_SOURCE(PDDR) (PDDR->source) 51*e4b17023SJohn Marino #define PDDR_SINK(PDDR) (PDDR->sink) 52*e4b17023SJohn Marino #define PDDR_DDP(PDDR) (PDDR->ddp) 53*e4b17023SJohn Marino #define PDDR_KIND(PDDR) (PDDR->kind) 54*e4b17023SJohn Marino #define PDDR_ORIGINAL_SCATTERING_P(PDDR) (PDDR->original_scattering_p) 55*e4b17023SJohn Marino 56*e4b17023SJohn Marino extern int eq_poly_ddr_p (const void *, const void *); 57*e4b17023SJohn Marino extern hashval_t hash_poly_ddr_p (const void *); 58*e4b17023SJohn Marino extern void free_poly_ddr (void *); 59*e4b17023SJohn Marino extern void dot_deps (scop_p); 60*e4b17023SJohn Marino extern void dot_deps_stmt (scop_p); 61*e4b17023SJohn Marino extern void print_pddr (FILE *, poly_ddr_p); 62*e4b17023SJohn Marino extern void debug_pddr (poly_ddr_p); 63*e4b17023SJohn Marino 64*e4b17023SJohn Marino #endif 65