]> git.ipfire.org Git - people/amarx/ipfire-3.x.git/blob - gcc/patches/gcc46-cloog-dl.patch0
openvswitch: Add service file for systemd.
[people/amarx/ipfire-3.x.git] / gcc / patches / gcc46-cloog-dl.patch0
1 2011-01-04 Jakub Jelinek <jakub@redhat.com>
2
3 * Makefile.in (BACKENDLIBS): Link against -ldl instead of
4 -lcloog -lppl.
5 (graphite.o, graphite%.o): Force -O, remove -fkeep-inline-functions.
6 (GRAPHITE_CLOOG_UTIL_H, GRAPHITE_POLY_H): New.
7 (graphite*.o): Adjust dependencies.
8 * graphite-cloog-compat.h: Include <dlfcn.h>. Reference libcloog and
9 libppl symbols through pointers in cloog_pointers__ variable.
10 * graphite.c (init_cloog_pointers): New function.
11 (graphite_transform_loops): Call init_cloog_pointers.
12 * graphite-clast-to-gimple.c (gcc_type_for_iv_of_clast_loop): Rename
13 stmt_for argument to stmt_fora.
14 * graphite-poly.h: Include graphite-cloog-util.h.
15
16 --- gcc/Makefile.in.jj 2011-01-03 13:44:14.163900902 +0100
17 +++ gcc/Makefile.in 2011-01-04 17:48:53.588775911 +0100
18 @@ -984,6 +984,8 @@ GCC_PLUGIN_H = gcc-plugin.h highlev-plug
19 PLUGIN_H = plugin.h $(GCC_PLUGIN_H)
20 PLUGIN_VERSION_H = plugin-version.h configargs.h
21 LIBFUNCS_H = libfuncs.h $(HASHTAB_H)
22 +GRAPHITE_CLOOG_UTIL_H = graphite-cloog-util.h graphite-cloog-compat.h
23 +GRAPHITE_POLY_H = graphite-poly.h $(GRAPHITE_CLOOG_UTIL_H)
24
25 #\f
26 # Now figure out from those variables how to compile and link.
27 @@ -1037,7 +1039,7 @@ BUILD_LIBDEPS= $(BUILD_LIBIBERTY)
28 # and the system's installed libraries.
29 LIBS = @LIBS@ $(CPPLIB) $(LIBINTL) $(LIBICONV) $(LIBIBERTY) $(LIBDECNUMBER) \
30 $(HOST_LIBS)
31 -BACKENDLIBS = $(CLOOGLIBS) $(PPLLIBS) $(GMPLIBS) $(PLUGINLIBS) $(HOST_LIBS) \
32 +BACKENDLIBS = $(GMPLIBS) $(if $(CLOOGLIBS),-ldl) $(PLUGINLIBS) $(HOST_LIBS) \
33 $(ZLIB)
34 # Any system libraries needed just for GNAT.
35 SYSLIBS = @GNAT_LIBEXC@
36 @@ -2668,40 +2670,40 @@ sese.o : sese.c sese.h $(CONFIG_H) $(SYS
37 $(TREE_FLOW_H) $(CFGLOOP_H) $(TREE_DATA_REF_H) tree-pass.h value-prof.h
38 graphite.o : graphite.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(DIAGNOSTIC_CORE_H) \
39 $(TREE_FLOW_H) $(TREE_DUMP_H) $(CFGLOOP_H) $(TREE_DATA_REF_H) sese.h \
40 - $(DBGCNT_H) graphite-ppl.h graphite-poly.h graphite-scop-detection.h \
41 + $(DBGCNT_H) graphite-ppl.h $(GRAPHITE_POLY_H) graphite-scop-detection.h \
42 graphite-clast-to-gimple.h graphite-sese-to-poly.h
43 graphite-blocking.o : graphite-blocking.c $(CONFIG_H) $(SYSTEM_H) \
44 coretypes.h $(TREE_FLOW_H) $(TREE_DUMP_H) $(CFGLOOP_H) $(TREE_DATA_REF_H) \
45 - sese.h graphite-ppl.h graphite-poly.h
46 + sese.h graphite-ppl.h $(GRAPHITE_POLY_H)
47 graphite-clast-to-gimple.o : graphite-clast-to-gimple.c $(CONFIG_H) \
48 $(SYSTEM_H) coretypes.h $(DIAGNOSTIC_CORE_H) $(TREE_FLOW_H) $(TREE_DUMP_H) \
49 - $(CFGLOOP_H) $(TREE_DATA_REF_H) sese.h graphite-cloog-util.h \
50 - graphite-ppl.h graphite-poly.h graphite-clast-to-gimple.h \
51 + $(CFGLOOP_H) $(TREE_DATA_REF_H) sese.h $(GRAPHITE_CLOOG_UTIL_H) \
52 + graphite-ppl.h $(GRAPHITE_POLY_H) graphite-clast-to-gimple.h \
53 graphite-dependences.h graphite-cloog-compat.h
54 graphite-cloog-util.o : graphite-cloog-util.c $(CONFIG_H) $(SYSTEM_H) \
55 - coretypes.h graphite-cloog-util.h graphite-cloog-compat.h
56 + coretypes.h $(GRAPHITE_CLOOG_UTIL_H) graphite-cloog-compat.h
57 graphite-dependences.o : graphite-dependences.c $(CONFIG_H) $(SYSTEM_H) \
58 coretypes.h $(TREE_FLOW_H) $(TREE_DUMP_H) $(CFGLOOP_H) $(TREE_DATA_REF_H) \
59 - sese.h graphite-ppl.h graphite-poly.h graphite-dependences.h \
60 - graphite-cloog-util.h
61 + sese.h graphite-ppl.h $(GRAPHITE_POLY_H) graphite-dependences.h \
62 + $(GRAPHITE_CLOOG_UTIL_H)
63 graphite-flattening.o : graphite-flattening.c $(CONFIG_H) $(SYSTEM_H) \
64 coretypes.h $(TREE_FLOW_H) $(TREE_DUMP_H) $(CFGLOOP_H) $(TREE_DATA_REF_H) \
65 - sese.h graphite-ppl.h graphite-poly.h
66 + sese.h graphite-ppl.h $(GRAPHITE_POLY_H)
67 graphite-interchange.o : graphite-interchange.c $(CONFIG_H) $(SYSTEM_H) \
68 coretypes.h $(TREE_FLOW_H) $(TREE_DUMP_H) $(CFGLOOP_H) $(TREE_DATA_REF_H) \
69 - sese.h graphite-ppl.h graphite-poly.h
70 + sese.h graphite-ppl.h $(GRAPHITE_POLY_H)
71 graphite-poly.o : graphite-poly.c $(CONFIG_H) $(SYSTEM_H) coretypes.h \
72 $(DIAGNOSTIC_CORE_H) $(TREE_FLOW_H) $(TREE_DUMP_H) gimple-pretty-print.h \
73 - $(CFGLOOP_H) $(TREE_DATA_REF_H) sese.h graphite-ppl.h graphite-poly.h \
74 - graphite-dependences.h graphite-cloog-util.h
75 + $(CFGLOOP_H) $(TREE_DATA_REF_H) sese.h graphite-ppl.h $(GRAPHITE_POLY_H) \
76 + graphite-dependences.h $(GRAPHITE_CLOOG_UTIL_H)
77 graphite-ppl.o : graphite-ppl.c $(CONFIG_H) $(SYSTEM_H) coretypes.h \
78 - graphite-cloog-util.h graphite-ppl.h
79 + $(GRAPHITE_CLOOG_UTIL_H) graphite-ppl.h
80 graphite-scop-detection.o : graphite-scop-detection.c $(CONFIG_H) $(SYSTEM_H) \
81 coretypes.h $(TREE_FLOW_H) $(CFGLOOP_H) $(TREE_DATA_REF_H) $(TREE_PASS_H) \
82 - sese.h graphite-ppl.h graphite-poly.h graphite-scop-detection.h
83 + sese.h graphite-ppl.h $(GRAPHITE_POLY_H) graphite-scop-detection.h
84 graphite-sese-to-poly.o : graphite-sese-to-poly.c $(CONFIG_H) \
85 $(SYSTEM_H) coretypes.h $(TREE_FLOW_H) $(TREE_DUMP_H) $(CFGLOOP_H) \
86 - $(TREE_DATA_REF_H) domwalk.h sese.h graphite-ppl.h graphite-poly.h \
87 + $(TREE_DATA_REF_H) domwalk.h sese.h graphite-ppl.h $(GRAPHITE_POLY_H) \
88 graphite-sese-to-poly.h
89 tree-vect-loop.o: tree-vect-loop.c $(CONFIG_H) $(SYSTEM_H) coretypes.h \
90 $(TM_H) $(GGC_H) $(TREE_H) $(BASIC_BLOCK_H) $(DIAGNOSTIC_H) $(TREE_FLOW_H) \
91 @@ -3482,6 +3484,11 @@ $(out_object_file): $(out_file) $(CONFIG
92 $(COMPILER) -c $(ALL_COMPILERFLAGS) $(ALL_CPPFLAGS) \
93 $(out_file) $(OUTPUT_OPTION)
94
95 +graphite%.o : \
96 + ALL_CFLAGS := -O $(filter-out -fkeep-inline-functions, $(ALL_CFLAGS))
97 +graphite.o : \
98 + ALL_CFLAGS := -O $(filter-out -fkeep-inline-functions, $(ALL_CFLAGS))
99 +
100 # Build auxiliary files that support ecoff format.
101 mips-tfile: mips-tfile.o version.o $(LIBDEPS)
102 $(LINKER) $(LINKERFLAGS) $(LDFLAGS) -o $@ \
103 --- gcc/graphite-cloog-compat.h.jj 2011-01-03 12:53:05.000000000 +0100
104 +++ gcc/graphite-cloog-compat.h 2011-01-04 17:34:09.857757544 +0100
105 @@ -272,4 +272,277 @@ static inline int cloog_matrix_nrows (Cl
106 return m->NbRows;
107 }
108 #endif /* CLOOG_ORG */
109 +
110 +#include <dlfcn.h>
111 +#if PPL_VERSION_MAJOR == 0 && PPL_VERSION_MINOR < 11
112 +#define DYNSYMS_PPL11
113 +#else
114 +#define DYNSYMS_PPL11 \
115 + DYNSYM (ppl_new_PIP_Problem_from_constraints); \
116 + DYNSYM (ppl_PIP_Problem_is_satisfiable); \
117 + DYNSYM (ppl_delete_PIP_Problem);
118 +#endif
119 +#define DYNSYMS \
120 + DYNSYM (cloog_block_alloc); \
121 + DYNSYM (cloog_block_list_free); \
122 + DYNSYM (cloog_block_list_malloc); \
123 + DYNSYM (cloog_clast_create); \
124 + DYNSYM (cloog_clast_free); \
125 + DYNSYM (cloog_domain_free); \
126 + DYNSYM (cloog_domain_matrix2domain); \
127 + DYNSYM (cloog_initialize); \
128 + DYNSYM (cloog_loop_malloc); \
129 + DYNSYM (cloog_matrix_alloc); \
130 + DYNSYM (cloog_matrix_copy); \
131 + DYNSYM (cloog_matrix_free); \
132 + DYNSYM (cloog_matrix_print); \
133 + DYNSYM (cloog_names_malloc); \
134 + DYNSYM (cloog_names_scalarize); \
135 + DYNSYM (cloog_options_free); \
136 + DYNSYM (cloog_options_malloc); \
137 + DYNSYM (cloog_program_dump_cloog); \
138 + DYNSYM (cloog_program_extract_scalars); \
139 + DYNSYM (cloog_program_free); \
140 + DYNSYM (cloog_program_generate); \
141 + DYNSYM (cloog_program_malloc); \
142 + DYNSYM (cloog_program_print); \
143 + DYNSYM (cloog_program_scatter); \
144 + DYNSYM (cloog_statement_alloc); \
145 + DYNSYM (cloog_domain_union); \
146 + DYNSYM (cloog_matrix_read); \
147 + DYNSYM (cloog_new_pol); \
148 + DYNSYM (cloog_vector_gcd); \
149 + DYNSYM (ppl_finalize); \
150 + DYNSYM (ppl_assign_Coefficient_from_mpz_t); \
151 + DYNSYM (ppl_assign_Linear_Expression_from_Linear_Expression); \
152 + DYNSYM (ppl_Coefficient_to_mpz_t); \
153 + DYNSYM (ppl_Constraint_coefficient); \
154 + DYNSYM (ppl_Constraint_inhomogeneous_term); \
155 + DYNSYM (ppl_Constraint_space_dimension); \
156 + DYNSYM (ppl_Constraint_System_begin); \
157 + DYNSYM (ppl_Constraint_System_const_iterator_dereference); \
158 + DYNSYM (ppl_Constraint_System_const_iterator_equal_test); \
159 + DYNSYM (ppl_Constraint_System_const_iterator_increment); \
160 + DYNSYM (ppl_Constraint_System_end); \
161 + DYNSYM (ppl_Constraint_System_insert_Constraint); \
162 + DYNSYM (ppl_Constraint_System_space_dimension); \
163 + DYNSYM (ppl_Constraint_type); \
164 + DYNSYM (ppl_delete_Coefficient); \
165 + DYNSYM (ppl_delete_Constraint); \
166 + DYNSYM (ppl_delete_Constraint_System_const_iterator); \
167 + DYNSYM (ppl_delete_Linear_Expression); \
168 + DYNSYM (ppl_delete_Pointset_Powerset_C_Polyhedron); \
169 + DYNSYM (ppl_delete_Pointset_Powerset_C_Polyhedron_iterator); \
170 + DYNSYM (ppl_delete_Polyhedron); \
171 + DYNSYM (ppl_Linear_Expression_add_to_coefficient); \
172 + DYNSYM (ppl_Linear_Expression_add_to_inhomogeneous); \
173 + DYNSYM (ppl_Linear_Expression_coefficient); \
174 + DYNSYM (ppl_Linear_Expression_inhomogeneous_term); \
175 + DYNSYM (ppl_Linear_Expression_space_dimension); \
176 + DYNSYM (ppl_new_Coefficient); \
177 + DYNSYM (ppl_new_Coefficient_from_mpz_t); \
178 + DYNSYM (ppl_new_Constraint); \
179 + DYNSYM (ppl_new_Constraint_System); \
180 + DYNSYM (ppl_new_Constraint_System_const_iterator); \
181 + DYNSYM (ppl_new_C_Polyhedron_from_C_Polyhedron); \
182 + DYNSYM (ppl_new_C_Polyhedron_from_space_dimension); \
183 + DYNSYM (ppl_new_C_Polyhedron_recycle_Constraint_System); \
184 + DYNSYM (ppl_new_Linear_Expression); \
185 + DYNSYM (ppl_new_Linear_Expression_from_Constraint); \
186 + DYNSYM (ppl_new_Linear_Expression_from_Linear_Expression); \
187 + DYNSYM (ppl_new_Linear_Expression_with_dimension); \
188 + DYNSYM (ppl_new_Pointset_Powerset_C_Polyhedron_from_C_Polyhedron); \
189 + DYNSYM (ppl_new_Pointset_Powerset_C_Polyhedron_from_Pointset_Powerset_C_Polyhedron); \
190 + DYNSYM (ppl_new_Pointset_Powerset_C_Polyhedron_from_space_dimension); \
191 + DYNSYM (ppl_new_Pointset_Powerset_C_Polyhedron_iterator); \
192 + DYNSYM (ppl_Pointset_Powerset_C_Polyhedron_add_constraint); \
193 + DYNSYM (ppl_Pointset_Powerset_C_Polyhedron_add_space_dimensions_and_embed); \
194 + DYNSYM (ppl_Pointset_Powerset_C_Polyhedron_difference_assign); \
195 + DYNSYM (ppl_Pointset_Powerset_C_Polyhedron_intersection_assign); \
196 + DYNSYM (ppl_Pointset_Powerset_C_Polyhedron_is_empty); \
197 + DYNSYM (ppl_Pointset_Powerset_C_Polyhedron_iterator_begin); \
198 + DYNSYM (ppl_Pointset_Powerset_C_Polyhedron_iterator_dereference); \
199 + DYNSYM (ppl_Pointset_Powerset_C_Polyhedron_iterator_end); \
200 + DYNSYM (ppl_Pointset_Powerset_C_Polyhedron_iterator_equal_test); \
201 + DYNSYM (ppl_Pointset_Powerset_C_Polyhedron_iterator_increment); \
202 + DYNSYM (ppl_Pointset_Powerset_C_Polyhedron_map_space_dimensions); \
203 + DYNSYM (ppl_Pointset_Powerset_C_Polyhedron_maximize); \
204 + DYNSYM (ppl_Pointset_Powerset_C_Polyhedron_minimize); \
205 + DYNSYM (ppl_Pointset_Powerset_C_Polyhedron_remove_space_dimensions); \
206 + DYNSYM (ppl_Pointset_Powerset_C_Polyhedron_size); \
207 + DYNSYM (ppl_Pointset_Powerset_C_Polyhedron_space_dimension); \
208 + DYNSYM (ppl_Pointset_Powerset_C_Polyhedron_upper_bound_assign); \
209 + DYNSYM (ppl_Polyhedron_add_constraint); \
210 + DYNSYM (ppl_Polyhedron_add_constraints); \
211 + DYNSYM (ppl_Polyhedron_add_space_dimensions_and_embed); \
212 + DYNSYM (ppl_Polyhedron_get_constraints); \
213 + DYNSYM (ppl_Polyhedron_map_space_dimensions); \
214 + DYNSYM (ppl_Polyhedron_remove_space_dimensions); \
215 + DYNSYM (ppl_Polyhedron_space_dimension); \
216 + DYNSYM (ppl_subtract_Linear_Expression_from_Linear_Expression); \
217 + DYNSYM (pprint); \
218 + DYNSYM (stmt_block); \
219 + DYNSYM (stmt_for); \
220 + DYNSYM (stmt_guard); \
221 + DYNSYM (stmt_root); \
222 + DYNSYM (stmt_user); \
223 + DYNSYM (ppl_delete_Constraint_System); \
224 + DYNSYM (ppl_initialize); \
225 + DYNSYM (ppl_new_Constraint_System_from_Constraint); \
226 + DYNSYM (ppl_new_C_Polyhedron_from_Constraint_System); \
227 + DYNSYM (ppl_Polyhedron_affine_image); \
228 + DYNSYM (ppl_io_fprint_Pointset_Powerset_C_Polyhedron); \
229 + DYNSYMS_PPL11
230 +extern struct
231 +{
232 + bool inited;
233 + void *h;
234 +#define DYNSYM(x) __typeof (x) *p_##x
235 + DYNSYMS
236 +#undef DYNSYM
237 +} cloog_pointers__;
238 +
239 +#define cloog_block_alloc (*cloog_pointers__.p_cloog_block_alloc)
240 +#define cloog_block_list_free (*cloog_pointers__.p_cloog_block_list_free)
241 +#define cloog_block_list_malloc (*cloog_pointers__.p_cloog_block_list_malloc)
242 +#define cloog_clast_create (*cloog_pointers__.p_cloog_clast_create)
243 +#define cloog_clast_free (*cloog_pointers__.p_cloog_clast_free)
244 +#define cloog_domain_free (*cloog_pointers__.p_cloog_domain_free)
245 +#define cloog_domain_matrix2domain (*cloog_pointers__.p_cloog_domain_matrix2domain)
246 +#define cloog_initialize (*cloog_pointers__.p_cloog_initialize)
247 +#ifndef CLOOG_ORG
248 +#undef cloog_loop_malloc
249 +#define cloog_loop_malloc(STATE) (*cloog_pointers__.p_cloog_loop_malloc) ()
250 +#else
251 +#define cloog_loop_malloc (*cloog_pointers__.p_cloog_loop_malloc)
252 +#endif
253 +#define cloog_matrix_alloc (*cloog_pointers__.p_cloog_matrix_alloc)
254 +#define cloog_matrix_copy (*cloog_pointers__.p_cloog_matrix_copy)
255 +#define cloog_matrix_free (*cloog_pointers__.p_cloog_matrix_free)
256 +#define cloog_matrix_print (*cloog_pointers__.p_cloog_matrix_print)
257 +#define cloog_names_malloc (*cloog_pointers__.p_cloog_names_malloc)
258 +#define cloog_names_scalarize (*cloog_pointers__.p_cloog_names_scalarize)
259 +#define cloog_options_free (*cloog_pointers__.p_cloog_options_free)
260 +#ifndef CLOOG_ORG
261 +#undef cloog_options_malloc
262 +#define cloog_options_malloc(STATE) (*cloog_pointers__.p_cloog_options_malloc) ()
263 +#undef cloog_program_dump_cloog
264 +#define cloog_program_dump_cloog(DUMPFILE, PROGRAM, SCATTERINGLIST) \
265 + (*cloog_pointers__.p_cloog_program_dump_cloog) (DUMPFILE, PROGRAM)
266 +#undef cloog_program_extract_scalars
267 +#define cloog_program_extract_scalars(PROG, SCATT, OPT) \
268 + (*cloog_pointers__.p_cloog_program_extract_scalars) (PROG, SCATT)
269 +#else
270 +#define cloog_options_malloc (*cloog_pointers__.p_cloog_options_malloc)
271 +#define cloog_program_dump_cloog (*cloog_pointers__.p_cloog_program_dump_cloog)
272 +#define cloog_program_extract_scalars (*cloog_pointers__.p_cloog_program_extract_scalars)
273 +#endif
274 +#define cloog_program_free (*cloog_pointers__.p_cloog_program_free)
275 +#define cloog_program_generate (*cloog_pointers__.p_cloog_program_generate)
276 +#define cloog_program_malloc (*cloog_pointers__.p_cloog_program_malloc)
277 +#define cloog_program_print (*cloog_pointers__.p_cloog_program_print)
278 +#ifndef CLOOG_ORG
279 +#undef cloog_program_scatter
280 +#define cloog_program_scatter(PROG, SCATT, OPT) \
281 + (*cloog_pointers__.p_cloog_program_scatter) (PROG, SCATT)
282 +#undef cloog_statement_alloc
283 +#define cloog_statement_alloc(STATE, INDEX) \
284 + (*cloog_pointers__.p_cloog_statement_alloc) (INDEX)
285 +#else
286 +#define cloog_program_scatter (*cloog_pointers__.p_cloog_program_scatter)
287 +#define cloog_statement_alloc (*cloog_pointers__.p_cloog_statement_alloc)
288 +#endif
289 +#define cloog_domain_union (*cloog_pointers__.p_cloog_domain_union)
290 +#define cloog_matrix_read (*cloog_pointers__.p_cloog_matrix_read)
291 +#define cloog_new_pol (*cloog_pointers__.p_cloog_new_pol)
292 +#define cloog_vector_gcd (*cloog_pointers__.p_cloog_vector_gcd)
293 +#define ppl_finalize (*cloog_pointers__.p_ppl_finalize)
294 +#define ppl_assign_Coefficient_from_mpz_t (*cloog_pointers__.p_ppl_assign_Coefficient_from_mpz_t)
295 +#define ppl_assign_Linear_Expression_from_Linear_Expression (*cloog_pointers__.p_ppl_assign_Linear_Expression_from_Linear_Expression)
296 +#define ppl_Coefficient_to_mpz_t (*cloog_pointers__.p_ppl_Coefficient_to_mpz_t)
297 +#define ppl_Constraint_coefficient (*cloog_pointers__.p_ppl_Constraint_coefficient)
298 +#define ppl_Constraint_inhomogeneous_term (*cloog_pointers__.p_ppl_Constraint_inhomogeneous_term)
299 +#define ppl_Constraint_space_dimension (*cloog_pointers__.p_ppl_Constraint_space_dimension)
300 +#define ppl_Constraint_System_begin (*cloog_pointers__.p_ppl_Constraint_System_begin)
301 +#define ppl_Constraint_System_const_iterator_dereference (*cloog_pointers__.p_ppl_Constraint_System_const_iterator_dereference)
302 +#define ppl_Constraint_System_const_iterator_equal_test (*cloog_pointers__.p_ppl_Constraint_System_const_iterator_equal_test)
303 +#define ppl_Constraint_System_const_iterator_increment (*cloog_pointers__.p_ppl_Constraint_System_const_iterator_increment)
304 +#define ppl_Constraint_System_end (*cloog_pointers__.p_ppl_Constraint_System_end)
305 +#define ppl_Constraint_System_insert_Constraint (*cloog_pointers__.p_ppl_Constraint_System_insert_Constraint)
306 +#define ppl_Constraint_System_space_dimension (*cloog_pointers__.p_ppl_Constraint_System_space_dimension)
307 +#define ppl_Constraint_type (*cloog_pointers__.p_ppl_Constraint_type)
308 +#define ppl_delete_Coefficient (*cloog_pointers__.p_ppl_delete_Coefficient)
309 +#define ppl_delete_Constraint (*cloog_pointers__.p_ppl_delete_Constraint)
310 +#define ppl_delete_Constraint_System_const_iterator (*cloog_pointers__.p_ppl_delete_Constraint_System_const_iterator)
311 +#define ppl_delete_Linear_Expression (*cloog_pointers__.p_ppl_delete_Linear_Expression)
312 +#define ppl_delete_Pointset_Powerset_C_Polyhedron (*cloog_pointers__.p_ppl_delete_Pointset_Powerset_C_Polyhedron)
313 +#define ppl_delete_Pointset_Powerset_C_Polyhedron_iterator (*cloog_pointers__.p_ppl_delete_Pointset_Powerset_C_Polyhedron_iterator)
314 +#define ppl_delete_Polyhedron (*cloog_pointers__.p_ppl_delete_Polyhedron)
315 +#define ppl_Linear_Expression_add_to_coefficient (*cloog_pointers__.p_ppl_Linear_Expression_add_to_coefficient)
316 +#define ppl_Linear_Expression_add_to_inhomogeneous (*cloog_pointers__.p_ppl_Linear_Expression_add_to_inhomogeneous)
317 +#define ppl_Linear_Expression_coefficient (*cloog_pointers__.p_ppl_Linear_Expression_coefficient)
318 +#define ppl_Linear_Expression_inhomogeneous_term (*cloog_pointers__.p_ppl_Linear_Expression_inhomogeneous_term)
319 +#define ppl_Linear_Expression_space_dimension (*cloog_pointers__.p_ppl_Linear_Expression_space_dimension)
320 +#define ppl_new_Coefficient (*cloog_pointers__.p_ppl_new_Coefficient)
321 +#define ppl_new_Coefficient_from_mpz_t (*cloog_pointers__.p_ppl_new_Coefficient_from_mpz_t)
322 +#define ppl_new_Constraint (*cloog_pointers__.p_ppl_new_Constraint)
323 +#define ppl_new_Constraint_System (*cloog_pointers__.p_ppl_new_Constraint_System)
324 +#define ppl_new_Constraint_System_const_iterator (*cloog_pointers__.p_ppl_new_Constraint_System_const_iterator)
325 +#define ppl_new_C_Polyhedron_from_C_Polyhedron (*cloog_pointers__.p_ppl_new_C_Polyhedron_from_C_Polyhedron)
326 +#define ppl_new_C_Polyhedron_from_space_dimension (*cloog_pointers__.p_ppl_new_C_Polyhedron_from_space_dimension)
327 +#define ppl_new_C_Polyhedron_recycle_Constraint_System (*cloog_pointers__.p_ppl_new_C_Polyhedron_recycle_Constraint_System)
328 +#define ppl_new_Linear_Expression (*cloog_pointers__.p_ppl_new_Linear_Expression)
329 +#define ppl_new_Linear_Expression_from_Constraint (*cloog_pointers__.p_ppl_new_Linear_Expression_from_Constraint)
330 +#define ppl_new_Linear_Expression_from_Linear_Expression (*cloog_pointers__.p_ppl_new_Linear_Expression_from_Linear_Expression)
331 +#define ppl_new_Linear_Expression_with_dimension (*cloog_pointers__.p_ppl_new_Linear_Expression_with_dimension)
332 +#define ppl_new_Pointset_Powerset_C_Polyhedron_from_C_Polyhedron (*cloog_pointers__.p_ppl_new_Pointset_Powerset_C_Polyhedron_from_C_Polyhedron)
333 +#define ppl_new_Pointset_Powerset_C_Polyhedron_from_Pointset_Powerset_C_Polyhedron (*cloog_pointers__.p_ppl_new_Pointset_Powerset_C_Polyhedron_from_Pointset_Powerset_C_Polyhedron)
334 +#define ppl_new_Pointset_Powerset_C_Polyhedron_from_space_dimension (*cloog_pointers__.p_ppl_new_Pointset_Powerset_C_Polyhedron_from_space_dimension)
335 +#define ppl_new_Pointset_Powerset_C_Polyhedron_iterator (*cloog_pointers__.p_ppl_new_Pointset_Powerset_C_Polyhedron_iterator)
336 +#define ppl_Pointset_Powerset_C_Polyhedron_add_constraint (*cloog_pointers__.p_ppl_Pointset_Powerset_C_Polyhedron_add_constraint)
337 +#define ppl_Pointset_Powerset_C_Polyhedron_add_space_dimensions_and_embed (*cloog_pointers__.p_ppl_Pointset_Powerset_C_Polyhedron_add_space_dimensions_and_embed)
338 +#define ppl_Pointset_Powerset_C_Polyhedron_difference_assign (*cloog_pointers__.p_ppl_Pointset_Powerset_C_Polyhedron_difference_assign)
339 +#define ppl_Pointset_Powerset_C_Polyhedron_intersection_assign (*cloog_pointers__.p_ppl_Pointset_Powerset_C_Polyhedron_intersection_assign)
340 +#define ppl_Pointset_Powerset_C_Polyhedron_is_empty (*cloog_pointers__.p_ppl_Pointset_Powerset_C_Polyhedron_is_empty)
341 +#define ppl_Pointset_Powerset_C_Polyhedron_iterator_begin (*cloog_pointers__.p_ppl_Pointset_Powerset_C_Polyhedron_iterator_begin)
342 +#define ppl_Pointset_Powerset_C_Polyhedron_iterator_dereference (*cloog_pointers__.p_ppl_Pointset_Powerset_C_Polyhedron_iterator_dereference)
343 +#define ppl_Pointset_Powerset_C_Polyhedron_iterator_end (*cloog_pointers__.p_ppl_Pointset_Powerset_C_Polyhedron_iterator_end)
344 +#define ppl_Pointset_Powerset_C_Polyhedron_iterator_equal_test (*cloog_pointers__.p_ppl_Pointset_Powerset_C_Polyhedron_iterator_equal_test)
345 +#define ppl_Pointset_Powerset_C_Polyhedron_iterator_increment (*cloog_pointers__.p_ppl_Pointset_Powerset_C_Polyhedron_iterator_increment)
346 +#define ppl_Pointset_Powerset_C_Polyhedron_map_space_dimensions (*cloog_pointers__.p_ppl_Pointset_Powerset_C_Polyhedron_map_space_dimensions)
347 +#define ppl_Pointset_Powerset_C_Polyhedron_maximize (*cloog_pointers__.p_ppl_Pointset_Powerset_C_Polyhedron_maximize)
348 +#define ppl_Pointset_Powerset_C_Polyhedron_minimize (*cloog_pointers__.p_ppl_Pointset_Powerset_C_Polyhedron_minimize)
349 +#define ppl_Pointset_Powerset_C_Polyhedron_remove_space_dimensions (*cloog_pointers__.p_ppl_Pointset_Powerset_C_Polyhedron_remove_space_dimensions)
350 +#define ppl_Pointset_Powerset_C_Polyhedron_size (*cloog_pointers__.p_ppl_Pointset_Powerset_C_Polyhedron_size)
351 +#define ppl_Pointset_Powerset_C_Polyhedron_space_dimension (*cloog_pointers__.p_ppl_Pointset_Powerset_C_Polyhedron_space_dimension)
352 +#define ppl_Pointset_Powerset_C_Polyhedron_upper_bound_assign (*cloog_pointers__.p_ppl_Pointset_Powerset_C_Polyhedron_upper_bound_assign)
353 +#define ppl_Polyhedron_add_constraint (*cloog_pointers__.p_ppl_Polyhedron_add_constraint)
354 +#define ppl_Polyhedron_add_constraints (*cloog_pointers__.p_ppl_Polyhedron_add_constraints)
355 +#define ppl_Polyhedron_add_space_dimensions_and_embed (*cloog_pointers__.p_ppl_Polyhedron_add_space_dimensions_and_embed)
356 +#define ppl_Polyhedron_get_constraints (*cloog_pointers__.p_ppl_Polyhedron_get_constraints)
357 +#define ppl_Polyhedron_map_space_dimensions (*cloog_pointers__.p_ppl_Polyhedron_map_space_dimensions)
358 +#define ppl_Polyhedron_remove_space_dimensions (*cloog_pointers__.p_ppl_Polyhedron_remove_space_dimensions)
359 +#define ppl_Polyhedron_space_dimension (*cloog_pointers__.p_ppl_Polyhedron_space_dimension)
360 +#define ppl_subtract_Linear_Expression_from_Linear_Expression (*cloog_pointers__.p_ppl_subtract_Linear_Expression_from_Linear_Expression)
361 +#define pprint (*cloog_pointers__.p_pprint)
362 +#define stmt_block (*cloog_pointers__.p_stmt_block)
363 +#define stmt_for (*cloog_pointers__.p_stmt_for)
364 +#define stmt_guard (*cloog_pointers__.p_stmt_guard)
365 +#define stmt_root (*cloog_pointers__.p_stmt_root)
366 +#define stmt_user (*cloog_pointers__.p_stmt_user)
367 +#define ppl_delete_Constraint_System (*cloog_pointers__.p_ppl_delete_Constraint_System)
368 +#define ppl_initialize (*cloog_pointers__.p_ppl_initialize)
369 +#define ppl_new_Constraint_System_from_Constraint (*cloog_pointers__.p_ppl_new_Constraint_System_from_Constraint)
370 +#define ppl_new_C_Polyhedron_from_Constraint_System (*cloog_pointers__.p_ppl_new_C_Polyhedron_from_Constraint_System)
371 +#define ppl_Polyhedron_affine_image (*cloog_pointers__.p_ppl_Polyhedron_affine_image)
372 +#define ppl_io_fprint_Pointset_Powerset_C_Polyhedron (*cloog_pointers__.p_ppl_io_fprint_Pointset_Powerset_C_Polyhedron)
373 +#if !(PPL_VERSION_MAJOR == 0 && PPL_VERSION_MINOR < 11)
374 +#define ppl_new_PIP_Problem_from_constraints (*cloog_pointers__.p_ppl_new_PIP_Problem_from_constraints)
375 +#define ppl_PIP_Problem_is_satisfiable (*cloog_pointers__.p_ppl_PIP_Problem_is_satisfiable)
376 +#define ppl_delete_PIP_Problem (*cloog_pointers__.p_ppl_delete_PIP_Problem)
377 +#endif
378 +
379 +#define cloog_finalize (*cloog_pointers__.p_ppl_finalize)
380 +
381 +
382 #endif /* GRAPHITE_CLOOG_COMPAT_H */
383 --- gcc/graphite.c.jj 2011-01-03 12:53:05.194056513 +0100
384 +++ gcc/graphite.c 2011-01-04 16:18:32.385007767 +0100
385 @@ -56,6 +56,35 @@ along with GCC; see the file COPYING3.
386
387 CloogState *cloog_state;
388
389 +__typeof (cloog_pointers__) cloog_pointers__;
390 +
391 +static bool
392 +init_cloog_pointers (void)
393 +{
394 + void *h;
395 +
396 + if (cloog_pointers__.inited)
397 + return cloog_pointers__.h != NULL;
398 + h = dlopen ("libcloog.so.0", RTLD_LAZY);
399 + cloog_pointers__.h = h;
400 + if (h == NULL)
401 + return false;
402 +#define DYNSYM(x) \
403 + do \
404 + { \
405 + union { __typeof (cloog_pointers__.p_##x) p; void *q; } u; \
406 + u.q = dlsym (h, #x); \
407 + if (u.q == NULL) \
408 + return false; \
409 + cloog_pointers__.p_##x = u.p; \
410 + } \
411 + while (0)
412 + DYNSYMS
413 +#undef DYNSYM
414 + return true;
415 +}
416 +
417 +
418 /* Print global statistics to FILE. */
419
420 static void
421 @@ -201,6 +230,12 @@ graphite_initialize (void)
422 return false;
423 }
424
425 + if (!init_cloog_pointers ())
426 + {
427 + sorry ("Graphite loop optimizations cannot be used");
428 + return false;
429 + }
430 +
431 scev_reset ();
432 recompute_all_dominators ();
433 initialize_original_copy_tables ();
434 --- gcc/graphite-clast-to-gimple.c.jj 2011-01-03 12:53:05.000000000 +0100
435 +++ gcc/graphite-clast-to-gimple.c 2011-01-04 16:29:55.738007463 +0100
436 @@ -738,10 +738,10 @@ clast_get_body_of_loop (struct clast_stm
437 from STMT_FOR. */
438
439 static tree
440 -gcc_type_for_iv_of_clast_loop (struct clast_for *stmt_for, int level,
441 +gcc_type_for_iv_of_clast_loop (struct clast_for *stmt_fora, int level,
442 tree lb_type, tree ub_type)
443 {
444 - struct clast_stmt *stmt = (struct clast_stmt *) stmt_for;
445 + struct clast_stmt *stmt = (struct clast_stmt *) stmt_fora;
446 struct clast_user_stmt *body = clast_get_body_of_loop (stmt);
447 CloogStatement *cs = body->statement;
448 poly_bb_p pbb = (poly_bb_p) cloog_statement_usr (cs);
449 --- gcc/graphite-poly.h.jj 2011-01-03 12:53:05.000000000 +0100
450 +++ gcc/graphite-poly.h 2011-01-04 17:35:53.308788629 +0100
451 @@ -22,6 +22,8 @@ along with GCC; see the file COPYING3.
452 #ifndef GCC_GRAPHITE_POLY_H
453 #define GCC_GRAPHITE_POLY_H
454
455 +#include "graphite-cloog-util.h"
456 +
457 typedef struct poly_dr *poly_dr_p;
458 DEF_VEC_P(poly_dr_p);
459 DEF_VEC_ALLOC_P (poly_dr_p, heap);