1287117Scem/* Graphite polyhedral representation.
2287117Scem   Copyright (C) 2009 Free Software Foundation, Inc.
3287117Scem   Contributed by Konrad Trifunovic <konrad.trifunovic@gmail.com>
4287117Scem
5287117ScemThis file is part of GCC.
6287117Scem
7287117ScemGCC is free software; you can redistribute it and/or modify
8287117Scemit under the terms of the GNU General Public License as published by
9287117Scemthe Free Software Foundation; either version 3, or (at your option)
10287117Scemany later version.
11287117Scem
12287117ScemGCC is distributed in the hope that it will be useful,
13287117Scembut WITHOUT ANY WARRANTY; without even the implied warranty of
14287117ScemMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15287117ScemGNU General Public License for more details.
16287117Scem
17287117ScemYou should have received a copy of the GNU General Public License
18287117Scemalong with GCC; see the file COPYING3.  If not see
19287117Scem<http://www.gnu.org/licenses/>.  */
20287117Scem
21287117Scem#ifndef GCC_GRAPHITE_DEPENDENCES_H
22287117Scem#define GCC_GRAPHITE_DEPENDENCES_H
23287117Scem
24287117Scemextern bool graphite_legal_transform (scop_p);
25287117Scemextern bool dependency_between_pbbs_p (poly_bb_p, poly_bb_p, int);
26287117Scem
27287117Scemenum poly_dependence_kind {
28287117Scem  unknown_dependence,
29287117Scem  no_dependence,
30287117Scem  has_dependence
31287117Scem};
32287117Scem
33287117Scem/* Represents a Polyhedral Data Dependence Relation.  */
34287117Scem
35287117Scemtypedef struct poly_ddr
36287117Scem{
37287117Scem  /* Source and sink data references of the dependence.  */
38287117Scem  poly_dr_p source, sink;
39287117Scem
40287117Scem  /* Data dependence polyhedron.  */
41287117Scem  ppl_Pointset_Powerset_C_Polyhedron_t ddp;
42287117Scem
43287117Scem  enum poly_dependence_kind kind;
44287117Scem
45287117Scem  /* True when the dependence relation is for the original scattering.  */
46287117Scem  bool original_scattering_p;
47287117Scem
48287117Scem} *poly_ddr_p;
49287117Scem
50287117Scem#define PDDR_SOURCE(PDDR) (PDDR->source)
51287117Scem#define PDDR_SINK(PDDR) (PDDR->sink)
52287117Scem#define PDDR_DDP(PDDR) (PDDR->ddp)
53287117Scem#define PDDR_KIND(PDDR) (PDDR->kind)
54287117Scem#define PDDR_ORIGINAL_SCATTERING_P(PDDR) (PDDR->original_scattering_p)
55287117Scem
56287117Scemextern int eq_poly_ddr_p (const void *, const void *);
57287117Scemextern hashval_t hash_poly_ddr_p (const void *);
58287117Scemextern void free_poly_ddr (void *);
59287117Scemextern void dot_deps (scop_p);
60287117Scemextern void dot_deps_stmt (scop_p);
61287117Scemextern void print_pddr (FILE *, poly_ddr_p);
62287117Scemextern void debug_pddr (poly_ddr_p);
63287117Scem
64287117Scem#endif
65287117Scem