annotate gcc/graphite-poly.c @ 158:494b0b89df80 default tip

...
author Shinji KONO <kono@ie.u-ryukyu.ac.jp>
date Mon, 25 May 2020 18:13:55 +0900
parents 1830386684a0
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
55
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
diff changeset
1 /* Graphite polyhedral representation.
145
1830386684a0 gcc-9.2.0
anatofuz
parents: 131
diff changeset
2 Copyright (C) 2009-2020 Free Software Foundation, Inc.
55
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
diff changeset
3 Contributed by Sebastian Pop <sebastian.pop@amd.com> and
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
diff changeset
4 Tobias Grosser <grosser@fim.uni-passau.de>.
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
diff changeset
5
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
diff changeset
6 This file is part of GCC.
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
diff changeset
7
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
diff changeset
8 GCC is free software; you can redistribute it and/or modify
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
diff changeset
9 it under the terms of the GNU General Public License as published by
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
diff changeset
10 the Free Software Foundation; either version 3, or (at your option)
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
diff changeset
11 any later version.
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
diff changeset
12
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
diff changeset
13 GCC is distributed in the hope that it will be useful,
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
diff changeset
14 but WITHOUT ANY WARRANTY; without even the implied warranty of
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
diff changeset
15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
diff changeset
16 GNU General Public License for more details.
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
diff changeset
17
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
diff changeset
18 You should have received a copy of the GNU General Public License
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
diff changeset
19 along with GCC; see the file COPYING3. If not see
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
diff changeset
20 <http://www.gnu.org/licenses/>. */
111
kono
parents: 67
diff changeset
21
kono
parents: 67
diff changeset
22 #define USES_ISL
kono
parents: 67
diff changeset
23
55
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
diff changeset
24 #include "config.h"
111
kono
parents: 67
diff changeset
25
kono
parents: 67
diff changeset
26 #ifdef HAVE_isl
kono
parents: 67
diff changeset
27
55
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
diff changeset
28 #include "system.h"
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
diff changeset
29 #include "coretypes.h"
111
kono
parents: 67
diff changeset
30 #include "backend.h"
kono
parents: 67
diff changeset
31 #include "tree.h"
kono
parents: 67
diff changeset
32 #include "gimple.h"
kono
parents: 67
diff changeset
33 #include "cfghooks.h"
67
f6334be47118 update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 63
diff changeset
34 #include "diagnostic-core.h"
111
kono
parents: 67
diff changeset
35 #include "fold-const.h"
kono
parents: 67
diff changeset
36 #include "gimple-iterator.h"
kono
parents: 67
diff changeset
37 #include "tree-ssa-loop.h"
55
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
diff changeset
38 #include "cfgloop.h"
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
diff changeset
39 #include "tree-data-ref.h"
111
kono
parents: 67
diff changeset
40 #include "pretty-print.h"
kono
parents: 67
diff changeset
41 #include "gimple-pretty-print.h"
kono
parents: 67
diff changeset
42 #include "graphite.h"
kono
parents: 67
diff changeset
43 #include "dumpfile.h"
55
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
diff changeset
44
111
kono
parents: 67
diff changeset
45 /* Print to STDERR the GMP value VAL. */
67
f6334be47118 update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 63
diff changeset
46
111
kono
parents: 67
diff changeset
47 DEBUG_FUNCTION void
kono
parents: 67
diff changeset
48 debug_gmp_value (mpz_t val)
67
f6334be47118 update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 63
diff changeset
49 {
111
kono
parents: 67
diff changeset
50 gmp_fprintf (stderr, "%Zd", val);
67
f6334be47118 update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 63
diff changeset
51 }
f6334be47118 update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 63
diff changeset
52
111
kono
parents: 67
diff changeset
53 /* Prints to FILE the iteration domain of PBB. */
67
f6334be47118 update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 63
diff changeset
54
111
kono
parents: 67
diff changeset
55 void
kono
parents: 67
diff changeset
56 print_iteration_domain (FILE *file, poly_bb_p pbb)
67
f6334be47118 update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 63
diff changeset
57 {
111
kono
parents: 67
diff changeset
58 print_pbb_domain (file, pbb);
67
f6334be47118 update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 63
diff changeset
59 }
f6334be47118 update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 63
diff changeset
60
111
kono
parents: 67
diff changeset
61 /* Prints to FILE the iteration domains of every PBB of SCOP. */
63
b7f97abdc517 update gcc from gcc-4.5.0 to gcc-4.6
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 55
diff changeset
62
b7f97abdc517 update gcc from gcc-4.5.0 to gcc-4.6
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 55
diff changeset
63 void
111
kono
parents: 67
diff changeset
64 print_iteration_domains (FILE *file, scop_p scop)
55
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
diff changeset
65 {
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
diff changeset
66 int i;
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
diff changeset
67 poly_bb_p pbb;
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
diff changeset
68
111
kono
parents: 67
diff changeset
69 FOR_EACH_VEC_ELT (scop->pbbs, i, pbb)
kono
parents: 67
diff changeset
70 print_iteration_domain (file, pbb);
67
f6334be47118 update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 63
diff changeset
71 }
f6334be47118 update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 63
diff changeset
72
111
kono
parents: 67
diff changeset
73 /* Prints to STDERR the iteration domain of PBB. */
67
f6334be47118 update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 63
diff changeset
74
111
kono
parents: 67
diff changeset
75 DEBUG_FUNCTION void
kono
parents: 67
diff changeset
76 debug_iteration_domain (poly_bb_p pbb)
67
f6334be47118 update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 63
diff changeset
77 {
111
kono
parents: 67
diff changeset
78 print_iteration_domain (stderr, pbb);
67
f6334be47118 update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 63
diff changeset
79 }
f6334be47118 update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 63
diff changeset
80
111
kono
parents: 67
diff changeset
81 /* Prints to STDERR the iteration domains of every PBB of SCOP. */
55
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
diff changeset
82
111
kono
parents: 67
diff changeset
83 DEBUG_FUNCTION void
kono
parents: 67
diff changeset
84 debug_iteration_domains (scop_p scop)
55
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
diff changeset
85 {
111
kono
parents: 67
diff changeset
86 print_iteration_domains (stderr, scop);
55
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
diff changeset
87 }
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
diff changeset
88
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
diff changeset
89 /* Create a new polyhedral data reference and add it to PBB. It is
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
diff changeset
90 defined by its ACCESSES, its TYPE, and the number of subscripts
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
diff changeset
91 NB_SUBSCRIPTS. */
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
diff changeset
92
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
diff changeset
93 void
111
kono
parents: 67
diff changeset
94 new_poly_dr (poly_bb_p pbb, gimple *stmt, enum poly_dr_type type,
kono
parents: 67
diff changeset
95 isl_map *acc, isl_set *subscript_sizes)
55
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
diff changeset
96 {
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
diff changeset
97 static int id = 0;
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
diff changeset
98 poly_dr_p pdr = XNEW (struct poly_dr);
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
diff changeset
99
111
kono
parents: 67
diff changeset
100 pdr->stmt = stmt;
55
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
diff changeset
101 PDR_ID (pdr) = id++;
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
diff changeset
102 PDR_NB_REFS (pdr) = 1;
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
diff changeset
103 PDR_PBB (pdr) = pbb;
111
kono
parents: 67
diff changeset
104 pdr->accesses = acc;
kono
parents: 67
diff changeset
105 pdr->subscript_sizes = subscript_sizes;
55
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
diff changeset
106 PDR_TYPE (pdr) = type;
111
kono
parents: 67
diff changeset
107 PBB_DRS (pbb).safe_push (pdr);
kono
parents: 67
diff changeset
108
kono
parents: 67
diff changeset
109 if (dump_file)
kono
parents: 67
diff changeset
110 {
kono
parents: 67
diff changeset
111 fprintf (dump_file, "Converting dr: ");
kono
parents: 67
diff changeset
112 print_pdr (dump_file, pdr);
kono
parents: 67
diff changeset
113 fprintf (dump_file, "To polyhedral representation:\n");
kono
parents: 67
diff changeset
114 fprintf (dump_file, " - access functions: ");
kono
parents: 67
diff changeset
115 print_isl_map (dump_file, acc);
kono
parents: 67
diff changeset
116 fprintf (dump_file, " - subscripts: ");
kono
parents: 67
diff changeset
117 print_isl_set (dump_file, subscript_sizes);
kono
parents: 67
diff changeset
118 }
55
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
diff changeset
119 }
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
diff changeset
120
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
diff changeset
121 /* Free polyhedral data reference PDR. */
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
diff changeset
122
111
kono
parents: 67
diff changeset
123 static void
55
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
diff changeset
124 free_poly_dr (poly_dr_p pdr)
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
diff changeset
125 {
111
kono
parents: 67
diff changeset
126 isl_map_free (pdr->accesses);
kono
parents: 67
diff changeset
127 isl_set_free (pdr->subscript_sizes);
55
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
diff changeset
128 XDELETE (pdr);
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
diff changeset
129 }
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
diff changeset
130
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
diff changeset
131 /* Create a new polyhedral black box. */
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
diff changeset
132
67
f6334be47118 update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 63
diff changeset
133 poly_bb_p
111
kono
parents: 67
diff changeset
134 new_poly_bb (scop_p scop, gimple_poly_bb_p black_box)
55
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
diff changeset
135 {
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
diff changeset
136 poly_bb_p pbb = XNEW (struct poly_bb);
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
diff changeset
137
111
kono
parents: 67
diff changeset
138 pbb->domain = NULL;
kono
parents: 67
diff changeset
139 pbb->iterators = NULL;
55
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
diff changeset
140 PBB_SCOP (pbb) = scop;
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
diff changeset
141 pbb_set_black_box (pbb, black_box);
111
kono
parents: 67
diff changeset
142 PBB_DRS (pbb).create (3);
kono
parents: 67
diff changeset
143 GBB_PBB ((gimple_poly_bb_p) black_box) = pbb;
67
f6334be47118 update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 63
diff changeset
144
f6334be47118 update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 63
diff changeset
145 return pbb;
55
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
diff changeset
146 }
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
diff changeset
147
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
diff changeset
148 /* Free polyhedral black box. */
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
diff changeset
149
111
kono
parents: 67
diff changeset
150 static void
55
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
diff changeset
151 free_poly_bb (poly_bb_p pbb)
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
diff changeset
152 {
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
diff changeset
153 int i;
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
diff changeset
154 poly_dr_p pdr;
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
diff changeset
155
111
kono
parents: 67
diff changeset
156 isl_set_free (pbb->domain);
kono
parents: 67
diff changeset
157 pbb->domain = NULL;
kono
parents: 67
diff changeset
158 isl_set_free (pbb->iterators);
kono
parents: 67
diff changeset
159 pbb->iterators = NULL;
55
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
diff changeset
160
111
kono
parents: 67
diff changeset
161 if (PBB_DRS (pbb).exists ())
kono
parents: 67
diff changeset
162 FOR_EACH_VEC_ELT (PBB_DRS (pbb), i, pdr)
55
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
diff changeset
163 free_poly_dr (pdr);
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
diff changeset
164
111
kono
parents: 67
diff changeset
165 PBB_DRS (pbb).release ();
55
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
diff changeset
166 XDELETE (pbb);
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
diff changeset
167 }
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
diff changeset
168
111
kono
parents: 67
diff changeset
169 /* Prints to FILE the polyhedral data reference PDR. */
55
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
diff changeset
170
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
diff changeset
171 void
111
kono
parents: 67
diff changeset
172 print_pdr (FILE *file, poly_dr_p pdr)
55
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
diff changeset
173 {
111
kono
parents: 67
diff changeset
174 fprintf (file, "pdr_%d (", PDR_ID (pdr));
67
f6334be47118 update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 63
diff changeset
175
111
kono
parents: 67
diff changeset
176 switch (PDR_TYPE (pdr))
63
b7f97abdc517 update gcc from gcc-4.5.0 to gcc-4.6
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 55
diff changeset
177 {
111
kono
parents: 67
diff changeset
178 case PDR_READ:
kono
parents: 67
diff changeset
179 fprintf (file, "read \n");
kono
parents: 67
diff changeset
180 break;
55
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
diff changeset
181
111
kono
parents: 67
diff changeset
182 case PDR_WRITE:
kono
parents: 67
diff changeset
183 fprintf (file, "write \n");
kono
parents: 67
diff changeset
184 break;
55
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
diff changeset
185
111
kono
parents: 67
diff changeset
186 case PDR_MAY_WRITE:
kono
parents: 67
diff changeset
187 fprintf (file, "may_write \n");
kono
parents: 67
diff changeset
188 break;
63
b7f97abdc517 update gcc from gcc-4.5.0 to gcc-4.6
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 55
diff changeset
189
111
kono
parents: 67
diff changeset
190 default:
kono
parents: 67
diff changeset
191 gcc_unreachable ();
63
b7f97abdc517 update gcc from gcc-4.5.0 to gcc-4.6
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 55
diff changeset
192 }
55
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
diff changeset
193
111
kono
parents: 67
diff changeset
194 fprintf (file, "in gimple stmt: ");
kono
parents: 67
diff changeset
195 print_gimple_stmt (file, pdr->stmt, 0);
kono
parents: 67
diff changeset
196 fprintf (file, "data accesses: ");
kono
parents: 67
diff changeset
197 print_isl_map (file, pdr->accesses);
kono
parents: 67
diff changeset
198 fprintf (file, "subscript sizes: ");
kono
parents: 67
diff changeset
199 print_isl_set (file, pdr->subscript_sizes);
kono
parents: 67
diff changeset
200 fprintf (file, ")\n");
55
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
diff changeset
201 }
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
diff changeset
202
111
kono
parents: 67
diff changeset
203 /* Prints to STDERR the polyhedral data reference PDR. */
55
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
diff changeset
204
67
f6334be47118 update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 63
diff changeset
205 DEBUG_FUNCTION void
111
kono
parents: 67
diff changeset
206 debug_pdr (poly_dr_p pdr)
55
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
diff changeset
207 {
111
kono
parents: 67
diff changeset
208 print_pdr (stderr, pdr);
kono
parents: 67
diff changeset
209 }
kono
parents: 67
diff changeset
210
kono
parents: 67
diff changeset
211 /* Store the GRAPHITE representation of BB. */
kono
parents: 67
diff changeset
212
kono
parents: 67
diff changeset
213 gimple_poly_bb_p
kono
parents: 67
diff changeset
214 new_gimple_poly_bb (basic_block bb, vec<data_reference_p> drs,
kono
parents: 67
diff changeset
215 vec<scalar_use> reads, vec<tree> writes)
kono
parents: 67
diff changeset
216 {
kono
parents: 67
diff changeset
217 gimple_poly_bb_p gbb = XNEW (struct gimple_poly_bb);
kono
parents: 67
diff changeset
218 GBB_BB (gbb) = bb;
kono
parents: 67
diff changeset
219 GBB_DATA_REFS (gbb) = drs;
kono
parents: 67
diff changeset
220 gbb->read_scalar_refs = reads;
kono
parents: 67
diff changeset
221 gbb->write_scalar_refs = writes;
kono
parents: 67
diff changeset
222 GBB_CONDITIONS (gbb).create (0);
kono
parents: 67
diff changeset
223 GBB_CONDITION_CASES (gbb).create (0);
kono
parents: 67
diff changeset
224
kono
parents: 67
diff changeset
225 return gbb;
55
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
diff changeset
226 }
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
diff changeset
227
111
kono
parents: 67
diff changeset
228 /* Frees GBB. */
kono
parents: 67
diff changeset
229
kono
parents: 67
diff changeset
230 static void
kono
parents: 67
diff changeset
231 free_gimple_poly_bb (gimple_poly_bb_p gbb)
kono
parents: 67
diff changeset
232 {
kono
parents: 67
diff changeset
233 free_data_refs (GBB_DATA_REFS (gbb));
kono
parents: 67
diff changeset
234 GBB_CONDITIONS (gbb).release ();
kono
parents: 67
diff changeset
235 GBB_CONDITION_CASES (gbb).release ();
kono
parents: 67
diff changeset
236 gbb->read_scalar_refs.release ();
kono
parents: 67
diff changeset
237 gbb->write_scalar_refs.release ();
kono
parents: 67
diff changeset
238 XDELETE (gbb);
kono
parents: 67
diff changeset
239 }
kono
parents: 67
diff changeset
240
kono
parents: 67
diff changeset
241 /* Deletes all gimple bbs in SCOP. */
kono
parents: 67
diff changeset
242
kono
parents: 67
diff changeset
243 static void
kono
parents: 67
diff changeset
244 remove_gbbs_in_scop (scop_p scop)
kono
parents: 67
diff changeset
245 {
kono
parents: 67
diff changeset
246 int i;
kono
parents: 67
diff changeset
247 poly_bb_p pbb;
kono
parents: 67
diff changeset
248
kono
parents: 67
diff changeset
249 FOR_EACH_VEC_ELT (scop->pbbs, i, pbb)
kono
parents: 67
diff changeset
250 free_gimple_poly_bb (PBB_BLACK_BOX (pbb));
kono
parents: 67
diff changeset
251 }
kono
parents: 67
diff changeset
252
kono
parents: 67
diff changeset
253 /* Creates a new SCOP containing the region (ENTRY, EXIT). */
55
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
diff changeset
254
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
diff changeset
255 scop_p
111
kono
parents: 67
diff changeset
256 new_scop (edge entry, edge exit)
55
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
diff changeset
257 {
111
kono
parents: 67
diff changeset
258 sese_info_p region = new_sese_info (entry, exit);
kono
parents: 67
diff changeset
259 scop_p s = XNEW (struct scop);
55
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
diff changeset
260
111
kono
parents: 67
diff changeset
261 s->original_schedule = NULL;
kono
parents: 67
diff changeset
262 s->transformed_schedule = NULL;
kono
parents: 67
diff changeset
263 s->param_context = NULL;
kono
parents: 67
diff changeset
264 scop_set_region (s, region);
kono
parents: 67
diff changeset
265 s->pbbs.create (3);
kono
parents: 67
diff changeset
266 s->drs.create (3);
kono
parents: 67
diff changeset
267 s->dependence = NULL;
kono
parents: 67
diff changeset
268 return s;
55
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
diff changeset
269 }
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
diff changeset
270
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
diff changeset
271 /* Deletes SCOP. */
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
diff changeset
272
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
diff changeset
273 void
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
diff changeset
274 free_scop (scop_p scop)
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
diff changeset
275 {
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
diff changeset
276 int i;
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
diff changeset
277 poly_bb_p pbb;
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
diff changeset
278
111
kono
parents: 67
diff changeset
279 remove_gbbs_in_scop (scop);
kono
parents: 67
diff changeset
280 free_sese_info (scop->scop_info);
kono
parents: 67
diff changeset
281
kono
parents: 67
diff changeset
282 FOR_EACH_VEC_ELT (scop->pbbs, i, pbb)
55
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
diff changeset
283 free_poly_bb (pbb);
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
diff changeset
284
111
kono
parents: 67
diff changeset
285 scop->pbbs.release ();
kono
parents: 67
diff changeset
286 scop->drs.release ();
55
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
diff changeset
287
111
kono
parents: 67
diff changeset
288 isl_set_free (scop->param_context);
kono
parents: 67
diff changeset
289 scop->param_context = NULL;
kono
parents: 67
diff changeset
290 isl_union_map_free (scop->dependence);
kono
parents: 67
diff changeset
291 scop->dependence = NULL;
kono
parents: 67
diff changeset
292 isl_schedule_free (scop->original_schedule);
kono
parents: 67
diff changeset
293 scop->original_schedule = NULL;
kono
parents: 67
diff changeset
294 isl_schedule_free (scop->transformed_schedule);
kono
parents: 67
diff changeset
295 scop->transformed_schedule = NULL;
55
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
diff changeset
296 XDELETE (scop);
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
diff changeset
297 }
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
diff changeset
298
111
kono
parents: 67
diff changeset
299 /* Print to FILE the domain of PBB. */
55
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
diff changeset
300
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
diff changeset
301 void
111
kono
parents: 67
diff changeset
302 print_pbb_domain (FILE *file, poly_bb_p pbb)
55
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
diff changeset
303 {
111
kono
parents: 67
diff changeset
304 print_isl_set (file, pbb->domain);
55
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
diff changeset
305 }
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
diff changeset
306
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
diff changeset
307 /* Dump the cases of a graphite basic block GBB on FILE. */
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
diff changeset
308
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
diff changeset
309 static void
111
kono
parents: 67
diff changeset
310 dump_gbb_cases (FILE *file, gimple_poly_bb_p gbb)
55
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
diff changeset
311 {
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
diff changeset
312 int i;
111
kono
parents: 67
diff changeset
313 gimple *stmt;
kono
parents: 67
diff changeset
314 vec<gimple *> cases;
55
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
diff changeset
315
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
diff changeset
316 if (!gbb)
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
diff changeset
317 return;
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
diff changeset
318
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
diff changeset
319 cases = GBB_CONDITION_CASES (gbb);
111
kono
parents: 67
diff changeset
320 if (cases.is_empty ())
55
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
diff changeset
321 return;
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
diff changeset
322
111
kono
parents: 67
diff changeset
323 fprintf (file, "cases bb_%d (\n", GBB_BB (gbb)->index);
55
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
diff changeset
324
111
kono
parents: 67
diff changeset
325 FOR_EACH_VEC_ELT (cases, i, stmt)
kono
parents: 67
diff changeset
326 print_gimple_stmt (file, stmt, 0);
55
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
diff changeset
327
111
kono
parents: 67
diff changeset
328 fprintf (file, ")\n");
55
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
diff changeset
329 }
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
diff changeset
330
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
diff changeset
331 /* Dump conditions of a graphite basic block GBB on FILE. */
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
diff changeset
332
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
diff changeset
333 static void
111
kono
parents: 67
diff changeset
334 dump_gbb_conditions (FILE *file, gimple_poly_bb_p gbb)
55
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
diff changeset
335 {
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
diff changeset
336 int i;
111
kono
parents: 67
diff changeset
337 gimple *stmt;
kono
parents: 67
diff changeset
338 vec<gimple *> conditions;
55
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
diff changeset
339
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
diff changeset
340 if (!gbb)
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
diff changeset
341 return;
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
diff changeset
342
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
diff changeset
343 conditions = GBB_CONDITIONS (gbb);
111
kono
parents: 67
diff changeset
344 if (conditions.is_empty ())
55
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
diff changeset
345 return;
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
diff changeset
346
111
kono
parents: 67
diff changeset
347 fprintf (file, "conditions bb_%d (\n", GBB_BB (gbb)->index);
55
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
diff changeset
348
111
kono
parents: 67
diff changeset
349 FOR_EACH_VEC_ELT (conditions, i, stmt)
kono
parents: 67
diff changeset
350 print_gimple_stmt (file, stmt, 0);
55
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
diff changeset
351
111
kono
parents: 67
diff changeset
352 fprintf (file, ")\n");
55
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
diff changeset
353 }
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
diff changeset
354
111
kono
parents: 67
diff changeset
355 /* Print to FILE all the data references of PBB. */
55
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
diff changeset
356
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
diff changeset
357 void
111
kono
parents: 67
diff changeset
358 print_pdrs (FILE *file, poly_bb_p pbb)
55
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
diff changeset
359 {
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
diff changeset
360 int i;
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
diff changeset
361 poly_dr_p pdr;
63
b7f97abdc517 update gcc from gcc-4.5.0 to gcc-4.6
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 55
diff changeset
362 int nb_reads = 0;
b7f97abdc517 update gcc from gcc-4.5.0 to gcc-4.6
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 55
diff changeset
363 int nb_writes = 0;
b7f97abdc517 update gcc from gcc-4.5.0 to gcc-4.6
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 55
diff changeset
364
111
kono
parents: 67
diff changeset
365 if (PBB_DRS (pbb).is_empty ())
kono
parents: 67
diff changeset
366 return;
63
b7f97abdc517 update gcc from gcc-4.5.0 to gcc-4.6
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 55
diff changeset
367
111
kono
parents: 67
diff changeset
368 fprintf (file, "Data references (\n");
63
b7f97abdc517 update gcc from gcc-4.5.0 to gcc-4.6
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 55
diff changeset
369
111
kono
parents: 67
diff changeset
370 FOR_EACH_VEC_ELT (PBB_DRS (pbb), i, pdr)
63
b7f97abdc517 update gcc from gcc-4.5.0 to gcc-4.6
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 55
diff changeset
371 if (PDR_TYPE (pdr) == PDR_READ)
b7f97abdc517 update gcc from gcc-4.5.0 to gcc-4.6
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 55
diff changeset
372 nb_reads++;
b7f97abdc517 update gcc from gcc-4.5.0 to gcc-4.6
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 55
diff changeset
373 else
b7f97abdc517 update gcc from gcc-4.5.0 to gcc-4.6
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 55
diff changeset
374 nb_writes++;
b7f97abdc517 update gcc from gcc-4.5.0 to gcc-4.6
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 55
diff changeset
375
111
kono
parents: 67
diff changeset
376 fprintf (file, "Read data references (\n");
63
b7f97abdc517 update gcc from gcc-4.5.0 to gcc-4.6
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 55
diff changeset
377
111
kono
parents: 67
diff changeset
378 FOR_EACH_VEC_ELT (PBB_DRS (pbb), i, pdr)
63
b7f97abdc517 update gcc from gcc-4.5.0 to gcc-4.6
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 55
diff changeset
379 if (PDR_TYPE (pdr) == PDR_READ)
111
kono
parents: 67
diff changeset
380 print_pdr (file, pdr);
63
b7f97abdc517 update gcc from gcc-4.5.0 to gcc-4.6
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 55
diff changeset
381
111
kono
parents: 67
diff changeset
382 fprintf (file, ")\n");
kono
parents: 67
diff changeset
383 fprintf (file, "Write data references (\n");
kono
parents: 67
diff changeset
384 FOR_EACH_VEC_ELT (PBB_DRS (pbb), i, pdr)
63
b7f97abdc517 update gcc from gcc-4.5.0 to gcc-4.6
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 55
diff changeset
385 if (PDR_TYPE (pdr) != PDR_READ)
111
kono
parents: 67
diff changeset
386 print_pdr (file, pdr);
kono
parents: 67
diff changeset
387 fprintf (file, ")\n");
kono
parents: 67
diff changeset
388 fprintf (file, ")\n");
55
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
diff changeset
389 }
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
diff changeset
390
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
diff changeset
391 /* Print to STDERR all the data references of PBB. */
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
diff changeset
392
67
f6334be47118 update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 63
diff changeset
393 DEBUG_FUNCTION void
111
kono
parents: 67
diff changeset
394 debug_pdrs (poly_bb_p pbb)
55
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
diff changeset
395 {
111
kono
parents: 67
diff changeset
396 print_pdrs (stderr, pbb);
55
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
diff changeset
397 }
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
diff changeset
398
111
kono
parents: 67
diff changeset
399 /* Print to FILE the body of PBB. */
63
b7f97abdc517 update gcc from gcc-4.5.0 to gcc-4.6
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 55
diff changeset
400
b7f97abdc517 update gcc from gcc-4.5.0 to gcc-4.6
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 55
diff changeset
401 static void
111
kono
parents: 67
diff changeset
402 print_pbb_body (FILE *file, poly_bb_p pbb)
63
b7f97abdc517 update gcc from gcc-4.5.0 to gcc-4.6
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 55
diff changeset
403 {
111
kono
parents: 67
diff changeset
404 fprintf (file, "Body (\n");
131
84e7813d76e9 gcc-8.2
mir3636
parents: 111
diff changeset
405 dump_bb (file, pbb_bb (pbb), 0, TDF_NONE);
111
kono
parents: 67
diff changeset
406 fprintf (file, ")\n");
63
b7f97abdc517 update gcc from gcc-4.5.0 to gcc-4.6
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 55
diff changeset
407 }
b7f97abdc517 update gcc from gcc-4.5.0 to gcc-4.6
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 55
diff changeset
408
111
kono
parents: 67
diff changeset
409 /* Print to FILE the domain and scattering function of PBB. */
55
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
diff changeset
410
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
diff changeset
411 void
111
kono
parents: 67
diff changeset
412 print_pbb (FILE *file, poly_bb_p pbb)
55
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
diff changeset
413 {
111
kono
parents: 67
diff changeset
414 fprintf (file, "pbb_%d (\n", pbb_index (pbb));
kono
parents: 67
diff changeset
415 dump_gbb_conditions (file, PBB_BLACK_BOX (pbb));
kono
parents: 67
diff changeset
416 dump_gbb_cases (file, PBB_BLACK_BOX (pbb));
63
b7f97abdc517 update gcc from gcc-4.5.0 to gcc-4.6
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 55
diff changeset
417
111
kono
parents: 67
diff changeset
418 print_pbb_domain (file, pbb);
kono
parents: 67
diff changeset
419 print_pdrs (file, pbb);
kono
parents: 67
diff changeset
420 print_pbb_body (file, pbb);
63
b7f97abdc517 update gcc from gcc-4.5.0 to gcc-4.6
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 55
diff changeset
421
111
kono
parents: 67
diff changeset
422 fprintf (file, ")\n");
55
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
diff changeset
423 }
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
diff changeset
424
111
kono
parents: 67
diff changeset
425 /* Print to FILE the parameters of SCOP. */
55
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
diff changeset
426
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
diff changeset
427 void
111
kono
parents: 67
diff changeset
428 print_scop_params (FILE *file, scop_p scop)
55
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
diff changeset
429 {
111
kono
parents: 67
diff changeset
430 if (scop->scop_info->params.is_empty ())
kono
parents: 67
diff changeset
431 return;
kono
parents: 67
diff changeset
432
55
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
diff changeset
433 int i;
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
diff changeset
434 tree t;
111
kono
parents: 67
diff changeset
435 fprintf (file, "parameters (");
kono
parents: 67
diff changeset
436 FOR_EACH_VEC_ELT (scop->scop_info->params, i, t)
63
b7f97abdc517 update gcc from gcc-4.5.0 to gcc-4.6
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 55
diff changeset
437 {
111
kono
parents: 67
diff changeset
438 print_generic_expr (file, t);
kono
parents: 67
diff changeset
439 fprintf (file, ", ");
55
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
diff changeset
440 }
111
kono
parents: 67
diff changeset
441 fprintf (file, ")\n");
67
f6334be47118 update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 63
diff changeset
442 }
f6334be47118 update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 63
diff changeset
443
111
kono
parents: 67
diff changeset
444 /* Print to FILE the context of SCoP. */
55
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
diff changeset
445
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
diff changeset
446 void
111
kono
parents: 67
diff changeset
447 print_scop_context (FILE *file, scop_p scop)
63
b7f97abdc517 update gcc from gcc-4.5.0 to gcc-4.6
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 55
diff changeset
448 {
111
kono
parents: 67
diff changeset
449 if (!scop->param_context)
kono
parents: 67
diff changeset
450 return;
63
b7f97abdc517 update gcc from gcc-4.5.0 to gcc-4.6
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 55
diff changeset
451
111
kono
parents: 67
diff changeset
452 fprintf (file, "Context (\n");
kono
parents: 67
diff changeset
453 print_isl_set (file, scop->param_context);
kono
parents: 67
diff changeset
454 fprintf (file, ")\n");
63
b7f97abdc517 update gcc from gcc-4.5.0 to gcc-4.6
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 55
diff changeset
455 }
b7f97abdc517 update gcc from gcc-4.5.0 to gcc-4.6
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 55
diff changeset
456
111
kono
parents: 67
diff changeset
457 /* Print to FILE the SCOP. */
63
b7f97abdc517 update gcc from gcc-4.5.0 to gcc-4.6
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 55
diff changeset
458
b7f97abdc517 update gcc from gcc-4.5.0 to gcc-4.6
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 55
diff changeset
459 void
111
kono
parents: 67
diff changeset
460 print_scop (FILE *file, scop_p scop)
55
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
diff changeset
461 {
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
diff changeset
462 int i;
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
diff changeset
463 poly_bb_p pbb;
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
diff changeset
464
111
kono
parents: 67
diff changeset
465 fprintf (file, "SCoP (\n");
kono
parents: 67
diff changeset
466 print_scop_context (file, scop);
kono
parents: 67
diff changeset
467 print_scop_params (file, scop);
55
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
diff changeset
468
111
kono
parents: 67
diff changeset
469 fprintf (file, "Number of statements: ");
kono
parents: 67
diff changeset
470 fprintf (file, "%d\n", scop->pbbs.length ());
55
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
diff changeset
471
111
kono
parents: 67
diff changeset
472 FOR_EACH_VEC_ELT (scop->pbbs, i, pbb)
kono
parents: 67
diff changeset
473 print_pbb (file, pbb);
63
b7f97abdc517 update gcc from gcc-4.5.0 to gcc-4.6
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 55
diff changeset
474
111
kono
parents: 67
diff changeset
475 fprintf (file, ")\n");
55
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
diff changeset
476 }
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
diff changeset
477
111
kono
parents: 67
diff changeset
478 /* Print to STDERR the domain of PBB. */
55
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
diff changeset
479
67
f6334be47118 update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 63
diff changeset
480 DEBUG_FUNCTION void
111
kono
parents: 67
diff changeset
481 debug_pbb_domain (poly_bb_p pbb)
55
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
diff changeset
482 {
111
kono
parents: 67
diff changeset
483 print_pbb_domain (stderr, pbb);
55
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
diff changeset
484 }
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
diff changeset
485
111
kono
parents: 67
diff changeset
486 /* Print to FILE the domain and scattering function of PBB. */
63
b7f97abdc517 update gcc from gcc-4.5.0 to gcc-4.6
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 55
diff changeset
487
67
f6334be47118 update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 63
diff changeset
488 DEBUG_FUNCTION void
111
kono
parents: 67
diff changeset
489 debug_pbb (poly_bb_p pbb)
63
b7f97abdc517 update gcc from gcc-4.5.0 to gcc-4.6
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 55
diff changeset
490 {
111
kono
parents: 67
diff changeset
491 print_pbb (stderr, pbb);
63
b7f97abdc517 update gcc from gcc-4.5.0 to gcc-4.6
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 55
diff changeset
492 }
b7f97abdc517 update gcc from gcc-4.5.0 to gcc-4.6
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 55
diff changeset
493
111
kono
parents: 67
diff changeset
494 /* Print to STDERR the context of SCOP. */
55
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
diff changeset
495
67
f6334be47118 update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 63
diff changeset
496 DEBUG_FUNCTION void
111
kono
parents: 67
diff changeset
497 debug_scop_context (scop_p scop)
55
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
diff changeset
498 {
111
kono
parents: 67
diff changeset
499 print_scop_context (stderr, scop);
55
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
diff changeset
500 }
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
diff changeset
501
111
kono
parents: 67
diff changeset
502 /* Print to STDERR the SCOP. */
55
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
diff changeset
503
67
f6334be47118 update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 63
diff changeset
504 DEBUG_FUNCTION void
111
kono
parents: 67
diff changeset
505 debug_scop (scop_p scop)
55
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
diff changeset
506 {
111
kono
parents: 67
diff changeset
507 print_scop (stderr, scop);
55
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
diff changeset
508 }
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
diff changeset
509
111
kono
parents: 67
diff changeset
510 /* Print to STDERR the parameters of SCOP. */
55
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
diff changeset
511
111
kono
parents: 67
diff changeset
512 DEBUG_FUNCTION void
kono
parents: 67
diff changeset
513 debug_scop_params (scop_p scop)
kono
parents: 67
diff changeset
514 {
kono
parents: 67
diff changeset
515 print_scop_params (stderr, scop);
55
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
diff changeset
516 }
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
diff changeset
517
111
kono
parents: 67
diff changeset
518 extern isl_ctx *the_isl_ctx;
kono
parents: 67
diff changeset
519 void
kono
parents: 67
diff changeset
520 print_isl_set (FILE *f, __isl_keep isl_set *set)
kono
parents: 67
diff changeset
521 {
kono
parents: 67
diff changeset
522 isl_printer *p = isl_printer_to_file (the_isl_ctx, f);
kono
parents: 67
diff changeset
523 p = isl_printer_set_yaml_style (p, ISL_YAML_STYLE_BLOCK);
kono
parents: 67
diff changeset
524 p = isl_printer_print_set (p, set);
kono
parents: 67
diff changeset
525 p = isl_printer_print_str (p, "\n");
kono
parents: 67
diff changeset
526 isl_printer_free (p);
kono
parents: 67
diff changeset
527 }
kono
parents: 67
diff changeset
528
kono
parents: 67
diff changeset
529 DEBUG_FUNCTION void
kono
parents: 67
diff changeset
530 debug_isl_set (__isl_keep isl_set *set)
kono
parents: 67
diff changeset
531 {
kono
parents: 67
diff changeset
532 print_isl_set (stderr, set);
kono
parents: 67
diff changeset
533 }
55
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
diff changeset
534
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
diff changeset
535 void
111
kono
parents: 67
diff changeset
536 print_isl_map (FILE *f, __isl_keep isl_map *map)
55
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
diff changeset
537 {
111
kono
parents: 67
diff changeset
538 isl_printer *p = isl_printer_to_file (the_isl_ctx, f);
kono
parents: 67
diff changeset
539 p = isl_printer_set_yaml_style (p, ISL_YAML_STYLE_BLOCK);
kono
parents: 67
diff changeset
540 p = isl_printer_print_map (p, map);
kono
parents: 67
diff changeset
541 p = isl_printer_print_str (p, "\n");
kono
parents: 67
diff changeset
542 isl_printer_free (p);
kono
parents: 67
diff changeset
543 }
55
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
diff changeset
544
111
kono
parents: 67
diff changeset
545 DEBUG_FUNCTION void
kono
parents: 67
diff changeset
546 debug_isl_map (__isl_keep isl_map *map)
kono
parents: 67
diff changeset
547 {
kono
parents: 67
diff changeset
548 print_isl_map (stderr, map);
55
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
diff changeset
549 }
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
diff changeset
550
111
kono
parents: 67
diff changeset
551 void
kono
parents: 67
diff changeset
552 print_isl_union_map (FILE *f, __isl_keep isl_union_map *map)
55
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
diff changeset
553 {
111
kono
parents: 67
diff changeset
554 isl_printer *p = isl_printer_to_file (the_isl_ctx, f);
kono
parents: 67
diff changeset
555 p = isl_printer_set_yaml_style (p, ISL_YAML_STYLE_BLOCK);
kono
parents: 67
diff changeset
556 p = isl_printer_print_union_map (p, map);
kono
parents: 67
diff changeset
557 p = isl_printer_print_str (p, "\n");
kono
parents: 67
diff changeset
558 isl_printer_free (p);
55
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
diff changeset
559 }
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
diff changeset
560
111
kono
parents: 67
diff changeset
561 DEBUG_FUNCTION void
kono
parents: 67
diff changeset
562 debug_isl_union_map (__isl_keep isl_union_map *map)
kono
parents: 67
diff changeset
563 {
kono
parents: 67
diff changeset
564 print_isl_union_map (stderr, map);
kono
parents: 67
diff changeset
565 }
kono
parents: 67
diff changeset
566
kono
parents: 67
diff changeset
567 void
kono
parents: 67
diff changeset
568 print_isl_aff (FILE *f, __isl_keep isl_aff *aff)
kono
parents: 67
diff changeset
569 {
kono
parents: 67
diff changeset
570 isl_printer *p = isl_printer_to_file (the_isl_ctx, f);
kono
parents: 67
diff changeset
571 p = isl_printer_print_aff (p, aff);
kono
parents: 67
diff changeset
572 p = isl_printer_print_str (p, "\n");
kono
parents: 67
diff changeset
573 isl_printer_free (p);
kono
parents: 67
diff changeset
574 }
kono
parents: 67
diff changeset
575
kono
parents: 67
diff changeset
576 DEBUG_FUNCTION void
kono
parents: 67
diff changeset
577 debug_isl_aff (__isl_keep isl_aff *aff)
kono
parents: 67
diff changeset
578 {
kono
parents: 67
diff changeset
579 print_isl_aff (stderr, aff);
kono
parents: 67
diff changeset
580 }
55
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
diff changeset
581
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
diff changeset
582 void
111
kono
parents: 67
diff changeset
583 print_isl_constraint (FILE *f, __isl_keep isl_constraint *c)
55
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
diff changeset
584 {
111
kono
parents: 67
diff changeset
585 isl_printer *p = isl_printer_to_file (the_isl_ctx, f);
kono
parents: 67
diff changeset
586 p = isl_printer_print_constraint (p, c);
kono
parents: 67
diff changeset
587 p = isl_printer_print_str (p, "\n");
kono
parents: 67
diff changeset
588 isl_printer_free (p);
55
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
diff changeset
589 }
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
diff changeset
590
111
kono
parents: 67
diff changeset
591 DEBUG_FUNCTION void
kono
parents: 67
diff changeset
592 debug_isl_constraint (__isl_keep isl_constraint *c)
63
b7f97abdc517 update gcc from gcc-4.5.0 to gcc-4.6
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 55
diff changeset
593 {
111
kono
parents: 67
diff changeset
594 print_isl_constraint (stderr, c);
63
b7f97abdc517 update gcc from gcc-4.5.0 to gcc-4.6
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 55
diff changeset
595 }
b7f97abdc517 update gcc from gcc-4.5.0 to gcc-4.6
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 55
diff changeset
596
55
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
diff changeset
597 void
111
kono
parents: 67
diff changeset
598 print_isl_schedule (FILE *f, __isl_keep isl_schedule *s)
55
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
diff changeset
599 {
111
kono
parents: 67
diff changeset
600 isl_printer *p = isl_printer_to_file (the_isl_ctx, f);
kono
parents: 67
diff changeset
601 p = isl_printer_set_yaml_style (p, ISL_YAML_STYLE_BLOCK);
kono
parents: 67
diff changeset
602 p = isl_printer_print_schedule (p, s);
kono
parents: 67
diff changeset
603 p = isl_printer_print_str (p, "\n");
kono
parents: 67
diff changeset
604 isl_printer_free (p);
55
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
diff changeset
605 }
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
diff changeset
606
111
kono
parents: 67
diff changeset
607 DEBUG_FUNCTION void
kono
parents: 67
diff changeset
608 debug_isl_schedule (__isl_keep isl_schedule *s)
55
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
diff changeset
609 {
111
kono
parents: 67
diff changeset
610 print_isl_schedule (stderr, s);
55
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
diff changeset
611 }
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
diff changeset
612
111
kono
parents: 67
diff changeset
613 void
kono
parents: 67
diff changeset
614 print_isl_ast (FILE *file, __isl_keep isl_ast_node *n)
kono
parents: 67
diff changeset
615 {
kono
parents: 67
diff changeset
616 isl_printer *prn = isl_printer_to_file (the_isl_ctx, file);
kono
parents: 67
diff changeset
617 prn = isl_printer_set_output_format (prn, ISL_FORMAT_C);
kono
parents: 67
diff changeset
618 prn = isl_printer_print_ast_node (prn, n);
kono
parents: 67
diff changeset
619 prn = isl_printer_print_str (prn, "\n");
kono
parents: 67
diff changeset
620 isl_printer_free (prn);
kono
parents: 67
diff changeset
621 }
55
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
diff changeset
622
67
f6334be47118 update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 63
diff changeset
623 DEBUG_FUNCTION void
111
kono
parents: 67
diff changeset
624 debug_isl_ast (isl_ast_node *n)
55
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
diff changeset
625 {
111
kono
parents: 67
diff changeset
626 print_isl_ast (stderr, n);
55
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
diff changeset
627 }
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
diff changeset
628
67
f6334be47118 update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 63
diff changeset
629 DEBUG_FUNCTION void
111
kono
parents: 67
diff changeset
630 debug_scop_pbb (scop_p scop, int i)
67
f6334be47118 update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 63
diff changeset
631 {
111
kono
parents: 67
diff changeset
632 debug_pbb (scop->pbbs[i]);
67
f6334be47118 update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 63
diff changeset
633 }
f6334be47118 update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 63
diff changeset
634
111
kono
parents: 67
diff changeset
635 #endif /* HAVE_isl */
55
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
diff changeset
636