Only update ChangeLog.graphite.
[gcc.git] / gcc / ChangeLog.graphite
1 2011-05-24 Sebastian Pop <sebastian.pop@amd.com>
2
3 * graphite-dependences.c (graphite_outer_subscript_bound): Remove
4 unused parameter.
5 * graphite-dependences.h (graphite_outer_subscript_bound): Same.
6 * graphite-opencl-meta-clast.c (opencl_set_meta_rw_flags): Update
7 call to graphite_outer_subscript_bound.
8 * graphite-opencl.c (opencl_get_indirect_size): Same.
9
10 2011-05-24 Alexey Kravets <kayrick@ispras.ru>
11
12 * graphite-opencl.c (opencl_private_var_name_p): Removed.
13 (graphite_artificial_array_p): Removed.
14 (opencl_data_create): Use zero_dim_array_p instead of
15 graphite_artificial_array_p.
16
17 2011-01-25 Sebastian Pop <sebastian.pop@amd.com>
18
19 * graphite-opencl.c (opencl_create_function_call): Use cl_khr_fp64
20 pragma extension only when it is defined. Use cl_amd_fp64 when it
21 is defined.
22
23 2011-01-23 Tobias Grosser <grosser@fim.uni-passau.de>
24
25 * doc/install.texi: Replace '/' by an or and give the exact
26 version number of cloog-0.16.1
27
28 2011-01-20 Sebastian Pop <sebastian.pop@amd.com>
29
30 * graphite-sese-to-poly.c (dr_indices_valid_in_loop): New.
31 (close_phi_written_to_memory): Call for_each_index with
32 dr_indices_valid_in_loop.
33
34 * gfortran.dg/graphite/id-24.f: New.
35 * gfortran.dg/graphite/id-25.f: New.
36
37 2011-01-19 Sebastian Pop <sebastian.pop@amd.com>
38
39 * graphite-sese-to-poly.c (new_pbb_from_pbb): Only copy PBB_DOMAIN
40 when it is initialized.
41
42 * gfortran.dg/graphite/id-23.f: New.
43
44 2011-01-19 Sebastian Pop <sebastian.pop@amd.com>
45
46 * graphite-scop-detection.c (stmt_has_simple_data_refs_p): Update
47 call to graphite_find_data_references_in_stmt.
48 * graphite-sese-to-poly.c (outermost_loop_in_sese_1): New.
49 (try_generate_gimple_bb): Call outermost_loop_in_sese_1. Update
50 call to graphite_find_data_references_in_stmt.
51 (analyze_drs_in_stmts): Same.
52 * tree-data-ref.c (dr_analyze_indices): Pass in parameter the loop
53 in which the scalar analysis of indices is performed.
54 (create_data_ref): Same. Update call to dr_analyze_indices.
55 (find_data_references_in_stmt): Update call to create_data_ref.
56 (graphite_find_data_references_in_stmt): Same.
57 * tree-data-ref.h (graphite_find_data_references_in_stmt): Update
58 declaration.
59 (create_data_ref): Same.
60 * tree-ssa-loop-prefetch.c (determine_loop_nest_reuse): Update
61 call to create_data_ref.
62
63 2011-01-19 Sebastian Pop <sebastian.pop@amd.com>
64
65 * graphite-sese-to-poly.c (build_poly_scop): Move
66 rewrite_commutative_reductions_out_of_ssa before
67 find_scop_parameters.
68
69 2011-01-18 Sebastian Pop <sebastian.pop@amd.com>
70
71 PR tree-optimization/46970
72 * gcc.dg/graphite/pr46970.c: New.
73
74 2011-01-18 Sebastian Pop <sebastian.pop@amd.com>
75
76 PR tree-optimization/46215
77 * gcc.dg/graphite/pr46215.c: New.
78
79 2011-01-18 Sebastian Pop <sebastian.pop@amd.com>
80
81 PR tree-optimization/46168
82 * gcc.dg/graphite/pr46168.c: New.
83
84 2011-01-18 Sebastian Pop <sebastian.pop@amd.com>
85
86 PR tree-optimization/43657
87 * gcc.dg/graphite/pr43657.c: New.
88
89 2011-01-18 Sebastian Pop <sebastian.pop@amd.com>
90
91 PR tree-optimization/29832
92 * gfortran.dg/graphite/pr29832.f90: New.
93
94 2011-01-18 Sebastian Pop <sebastian.pop@amd.com>
95
96 PR tree-optimization/43567
97 * gcc.dg/graphite/pr43567.c: New.
98
99 2011-01-18 Sebastian Pop <sebastian.pop@amd.com>
100
101 PR tree-optimization/43567
102 * gcc.dg/graphite/pr43567.c: New.
103
104 2011-01-17 Sebastian Pop <sebastian.pop@amd.com>
105
106 * Makefile.in (LAMBDA_H): Removed.
107 (TREE_DATA_REF_H): Remove dependence on LAMBDA_H.
108 (OBJS-common): Remove dependence on lambda-code.o, lambda-mat.o,
109 lambda-trans.o, and tree-loop-linear.o.
110 (lto-symtab.o): Remove dependence on LAMBDA_H.
111 (tree-loop-linear.o): Remove rule.
112 (lambda-mat.o): Same.
113 (lambda-trans.o): Same.
114 (lambda-code.o): Same.
115 (tree-vect-loop.o): Add missing dependence on TREE_DATA_REF_H.
116 (tree-vect-slp.o): Same.
117 * hwint.h (gcd): Moved here.
118 (least_common_multiple): Same.
119 * lambda-code.c: Removed.
120 * lambda-mat.c: Removed.
121 * lambda-trans.c: Removed.
122 * lambda.h: Removed.
123 * tree-loop-linear.c: Removed.
124 * lto-symtab.c: Do not include lambda.h.
125 * omega.c (gcd): Removed.
126 * passes.c (init_optimization_passes): Remove pass_linear_transform.
127 * tree-data-ref.c (print_lambda_vector): Moved here.
128 (lambda_vector_copy): Same.
129 (lambda_matrix_copy): Same.
130 (lambda_matrix_id): Same.
131 (lambda_vector_first_nz): Same.
132 (lambda_matrix_row_add): Same.
133 (lambda_matrix_row_exchange): Same.
134 (lambda_vector_mult_const): Same.
135 (lambda_vector_negate): Same.
136 (lambda_matrix_row_negate): Same.
137 (lambda_vector_equal): Same.
138 (lambda_matrix_right_hermite): Same.
139 * tree-data-ref.h: Do not include lambda.h.
140 (lambda_vector): Moved here.
141 (lambda_matrix): Same.
142 (dependence_level): Same.
143 (lambda_transform_legal_p): Removed declaration.
144 (lambda_collect_parameters): Same.
145 (lambda_compute_access_matrices): Same.
146 (lambda_vector_gcd): Same.
147 (lambda_vector_new): Same.
148 (lambda_vector_clear): Same.
149 (lambda_vector_lexico_pos): Same.
150 (lambda_vector_zerop): Same.
151 (lambda_matrix_new): Same.
152 * tree-flow.h (least_common_multiple): Removed declaration.
153 * tree-parloops.c (lambda_trans_matrix): Moved here.
154 (LTM_MATRIX): Same.
155 (LTM_ROWSIZE): Same.
156 (LTM_COLSIZE): Same.
157 (LTM_DENOMINATOR): Same.
158 (lambda_trans_matrix_new): Same.
159 (lambda_matrix_vector_mult): Same.
160 (lambda_transform_legal_p): Same.
161 * tree-pass.h (pass_linear_transform): Removed declaration.
162 * tree-ssa-loop.c (tree_linear_transform): Removed.
163 (gate_tree_linear_transform): Removed.
164 (pass_linear_transform): Removed.
165 (gate_graphite_transforms): Make flag_tree_loop_linear an alias of
166 flag_loop_interchange.
167
168 * gfortran.dg/graphite/interchange-4.f: New.
169 * gfortran.dg/graphite/interchange-5.f: New.
170
171 * gcc.dg/tree-ssa/ltrans-1.c: Removed.
172 * gcc.dg/tree-ssa/ltrans-2.c: Removed.
173 * gcc.dg/tree-ssa/ltrans-3.c: Removed.
174 * gcc.dg/tree-ssa/ltrans-4.c: Removed.
175 * gcc.dg/tree-ssa/ltrans-5.c: Removed.
176 * gcc.dg/tree-ssa/ltrans-6.c: Removed.
177 * gcc.dg/tree-ssa/ltrans-8.c: Removed.
178 * gfortran.dg/ltrans-7.f90: Removed.
179 * gcc.dg/tree-ssa/data-dep-1.c: Removed.
180
181 * gcc.dg/pr18792.c: -> gcc.dg/graphite/pr18792.c
182 * gcc.dg/pr19910.c: -> gcc.dg/graphite/pr19910.c
183 * gcc.dg/tree-ssa/20041110-1.c: -> gcc.dg/graphite/pr20041110-1.c
184 * gcc.dg/tree-ssa/pr20256.c: -> gcc.dg/graphite/pr20256.c
185 * gcc.dg/pr23625.c: -> gcc.dg/graphite/pr23625.c
186 * gcc.dg/tree-ssa/pr23820.c: -> gcc.dg/graphite/pr23820.c
187 * gcc.dg/tree-ssa/pr24309.c: -> gcc.dg/graphite/pr24309.c
188 * gcc.dg/tree-ssa/pr26435.c: -> gcc.dg/graphite/pr26435.c
189 * gcc.dg/pr29330.c: -> gcc.dg/graphite/pr29330.c
190 * gcc.dg/pr29581-1.c: -> gcc.dg/graphite/pr29581-1.c
191 * gcc.dg/pr29581-2.c: -> gcc.dg/graphite/pr29581-2.c
192 * gcc.dg/pr29581-3.c: -> gcc.dg/graphite/pr29581-3.c
193 * gcc.dg/pr29581-4.c: -> gcc.dg/graphite/pr29581-4.c
194 * gcc.dg/tree-ssa/loop-27.c: -> gcc.dg/graphite/pr30565.c
195 * gcc.dg/tree-ssa/pr31183.c: -> gcc.dg/graphite/pr31183.c
196 * gcc.dg/tree-ssa/pr33576.c: -> gcc.dg/graphite/pr33576.c
197 * gcc.dg/tree-ssa/pr33766.c: -> gcc.dg/graphite/pr33766.c
198 * gcc.dg/pr34016.c: -> gcc.dg/graphite/pr34016.c
199 * gcc.dg/tree-ssa/pr34017.c: -> gcc.dg/graphite/pr34017.c
200 * gcc.dg/tree-ssa/pr34123.c: -> gcc.dg/graphite/pr34123.c
201 * gcc.dg/tree-ssa/pr36287.c: -> gcc.dg/graphite/pr36287.c
202 * gcc.dg/tree-ssa/pr37686.c: -> gcc.dg/graphite/pr37686.c
203 * gcc.dg/pr42917.c: -> gcc.dg/graphite/pr42917.c
204 * gcc.dg/tree-ssa/data-dep-1.c
205 * gfortran.dg/loop_nest_1.f90: -> gfortran.dg/graphite/pr29290.f90
206 * gfortran.dg/pr29581.f90: -> gfortran.dg/graphite/pr29581.f90
207 * gfortran.dg/pr36286.f90: -> gfortran.dg/graphite/pr36286.f90
208 * gfortran.dg/pr36922.f: -> gfortran.dg/graphite/pr36922.f
209 * gfortran.dg/pr39516.f: -> gfortran.dg/graphite/pr39516.f
210
211 2011-01-17 Sebastian Pop <sebastian.pop@amd.com>
212
213 * graphite-sese-to-poly.c (close_phi_written_to_memory): Also allow
214 VAR_DECL, PARM_DECL, and RESULT_DECL.
215
216 * gfortran.dg/graphite/interchange-3.f90: Un-XFAILed.
217
218 2011-01-17 Sebastian Pop <sebastian.pop@amd.com>
219
220 * graphite-dependences.c (reduction_dr_1): Allow several reductions
221 in a reduction PBB.
222 * graphite-sese-to-poly.c (split_reduction_stmt): Do not split PBBs
223 that have already been marked as PBB_IS_REDUCTION.
224
225 2011-01-17 Sebastian Pop <sebastian.pop@amd.com>
226
227 * graphite-scop-detection.c (same_close_phi_node): New.
228 (remove_duplicate_close_phi): New.
229 (make_close_phi_nodes_unique): New.
230 (canonicalize_loop_closed_ssa): Call make_close_phi_nodes_unique.
231
232 2011-01-17 Sebastian Pop <sebastian.pop@amd.com>
233
234 * graphite-dependences.c (new_poly_ddr): Call same_pdr_p.
235 * graphite-poly.h (same_pdr_p): Do not expect that the PDR_TYPE
236 of both data references to be the same.
237
238 2011-01-17 Sebastian Pop <sebastian.pop@amd.com>
239
240 * graphite-dependences.c (build_lexicographical_constraint): Remove the
241 gdim parameter.
242 (build_lexicographical_constraint): Adjust call to ppl_powerset_is_empty.
243 (dependence_polyhedron): Same.
244 (graphite_legal_transform_dr): Same.
245 (graphite_carried_dependence_level_k): Same.
246 * graphite-ppl.c (ppl_powerset_is_empty): Remove the nb_params parameter.
247 * graphite-ppl.h (ppl_powerset_is_empty): Adjust declaration.
248
249 2011-01-15 Sebastian Pop <sebastian.pop@amd.com>
250
251 * graphite-sese-to-poly.c
252 (translate_scalar_reduction_to_array_for_stmt): Call unshare_expr.
253 (close_phi_written_to_memory): New.
254 (translate_scalar_reduction_to_array): Call close_phi_written_to_memory
255 and unshare_expr.
256
257 * gcc.dg/graphite/block-0.c: Un-XFAILed.
258 * gcc.dg/graphite/block-1.c: Un-XFAILed.
259 * gcc.dg/graphite/block-7.c: Un-XFAILed.
260 * gcc.dg/graphite/block-8.c: Un-XFAILed.
261 * gcc.dg/graphite/interchange-12.c: Un-XFAILed.
262 * gcc.dg/graphite/interchange-14.c: Un-XFAILed.
263 * gcc.dg/graphite/interchange-15.c: Un-XFAILed.
264 * gcc.dg/graphite/interchange-8.c: Un-XFAILed.
265 * gcc.dg/graphite/interchange-mvt.c: Un-XFAILed.
266
267 2011-01-15 Sebastian Pop <sebastian.pop@amd.com>
268
269 * doc/install.texi: Update the expected version number of PPL to 0.11.
270 * graphite-ppl.c (ppl_powerset_is_empty): Remove now dead code under
271 #if PPL_VERSION_MINOR < 11.
272
273 2011-01-15 Sebastian Pop <sebastian.pop@amd.com>
274
275 * graphite-dependences.c (new_poly_ddr): Inlined into
276 dependence_polyhedron.
277 (free_poly_ddr): Moved close by new_poly_ddr.
278 (dependence_polyhedron_1): Renamed dependence_polyhedron.
279 Early return NULL when ppl_powerset_is_empty returns true.
280 (dependence_polyhedron): Renamed new_poly_ddr. Call only once
281 poly_drs_may_alias_p. Avoid one call to ppl_powerset_is_empty.
282 (graphite_legal_transform_dr): Call new_poly_ddr.
283 (graphite_carried_dependence_level_k): Same.
284 (dot_original_deps_stmt_1): Renamed dot_deps_stmt_2. Use new_poly_ddr.
285 (dot_transformed_deps_stmt_1): Removed.
286 (dot_deps_stmt_1): Call dot_deps_stmt_2.
287 (dot_original_deps): Renamed dot_deps_2. Call new_poly_ddr.
288 (dot_deps_1): Call dot_deps_2.
289
290 2011-01-15 Sebastian Pop <sebastian.pop@amd.com>
291
292 * graphite-dependences.c (new_poly_dr): Call ppl_powerset_is_empty.
293 (build_lexicographical_constraint): Same.
294 (dependence_polyhedron_1): Same.
295 (graphite_legal_transform_dr): Same.
296 (graphite_carried_dependence_level_k): Same.
297 * graphite-ppl.c (ppl_powerset_is_empty): New.
298 * graphite-ppl.h (ppl_powerset_is_empty): Declared.
299 * tree-data-ref.c (dump_data_reference): Print the basic block index.
300
301 * gcc.dg/graphite/block-0.c: Add documentation.
302 * gcc.dg/graphite/block-4.c: Same.
303 * gcc.dg/graphite/block-7.c: Same.
304 * gcc.dg/graphite/block-8.c: New.
305 * gcc.dg/graphite/interchange-1.c: Un-XFAILed.
306 * gcc.dg/graphite/interchange-11.c: Un-XFAILed.
307 * gcc.dg/graphite/interchange-12.c: Add documentation.
308 * gcc.dg/graphite/interchange-13.c: New.
309 * gcc.dg/graphite/interchange-14.c: New.
310 * gcc.dg/graphite/interchange-15.c: New.
311 * gcc.dg/graphite/interchange-8.c: Add documentation.
312 * gcc.dg/graphite/interchange-mvt.c: Same.
313
314 2011-01-15 Sebastian Pop <sebastian.pop@amd.com>
315
316 * graphite-dependences.c (build_pairwise_scheduling): Correctly compute
317 the "a followed by b" relation and document it.
318
319 2011-01-15 Sebastian Pop <sebastian.pop@amd.com>
320
321 * graphite-dependences.c (build_lexicographical_constraint): Stop the
322 iteration when the bag of constraints is empty.
323
324 2011-01-15 Sebastian Pop <sebastian.pop@amd.com>
325
326 * graphite-poly.c (pbb_remove_duplicate_pdrs): Make it work.
327
328 2011-01-15 Sebastian Pop <sebastian.pop@amd.com>
329
330 * graphite-interchange.c (lst_interchange_profitable_p): Takes a loop
331 nest and two loop depths as parameters.
332 (lst_try_interchange_loops): Call lst_interchange_profitable_p after
333 lst_perfect_nestify.
334
335 2011-01-15 Sebastian Pop <sebastian.pop@amd.com>
336
337 * graphite-dependences.c (print_pddr): Call
338 ppl_io_fprint_Pointset_Powerset_C_Polyhedron.
339
340 2011-01-15 Sebastian Pop <sebastian.pop@amd.com>
341
342 * graphite-ppl.c (debug_gmp_value): New.
343 * graphite-ppl.h (debug_gmp_value): Declared.
344
345 2011-01-13 Tobias Grosser <grosser@fim.uni-passau.de>
346
347 * doc/install.texi: Document availability of cloog-0.16
348
349 2011-01-05 Vladimir Kargov <kargov@gmail.com>
350
351 * graphite-scop-detection.c (is_valid_stmt_p): Pass the entry basic
352 block instead of region start to the instantiation.
353 (is_valid_bb_p): Add support for basic blocks with conditional
354 statements.
355 (find_scops_new): Recalculate dominance info before SCOP
356 detection.
357
358 2011-01-05 Vladimir Kargov <kargov@gmail.com>
359
360 * graphite-scop-detection.c (get_outermost_loop_in_region): New.
361 (is_valid_loop_p): Correct loop passed to stmt_has_simple_data_refs_p
362
363 2011-01-05 Vladimir Kargov <kargov@gmail.com>
364
365 * graphite-scop-detection.c (canonicalize_loop_closed_ssa): Free
366 invalid postdominance info
367
368 2010-12-29 Sebastian Pop <sebastian.pop@amd.com>
369
370 * Makefile.in (graphite-opencl-codegen.o): Update dependences.
371 (graphite-opencl-meta-clast.o): Same.
372 (graphite-opencl.o): Same.
373 (refined-regions.o): Same.
374 * graphite-opencl-codegen.c: Do not include unnecessary .h files.
375 * graphite-opencl-meta-clast.c: Same.
376 * graphite-opencl.c: Same.
377 * refined-regions.c: Same.
378
379 2010-12-27 Sebastian Pop <sebastian.pop@amd.com>
380
381 * graphite-opencl-codegen.c: Use FOR_EACH_VEC_ELT.
382 * graphite-opencl-meta-clast.c: Same.
383 * graphite-opencl.c: Same.
384
385 2010-12-27 Sebastian Pop <sebastian.pop@amd.com>
386
387 * graphite-opencl-codegen.c: Do not include sys/time.h.
388 * graphite-opencl.c: Same.
389
390 2010-12-27 Sebastian Pop <sebastian.pop@amd.com>
391
392 * graphite-opencl.c (h_context, h_cmd_queue, h_program): Moved
393 out of ifdef HAVE_cloog section.
394
395 2010-12-27 Sebastian Pop <sebastian.pop@amd.com>
396
397 * Makefile.in (graphite-opencl.o): Depends on
398 graphite-opencl-functions.def.
399 * graphite-opencl-functions.def: New.
400 * graphite-opencl.c (enum OPENCL_FUNCTIONS): Read data from
401 graphite-opencl-functions.def.
402 (opencl_function_names): Same.
403 (opencl_create_function_decl): Use the enum OPENCL_FUNCTIONS
404 as indices of opencl_function_names.
405
406 2010-12-27 Sebastian Pop <sebastian.pop@amd.com>
407
408 * graphite-opencl-codegen.c: Fix formatting.
409 * graphite-opencl-meta-clast.c: Same.
410 * graphite-opencl.c: Same.
411
412 2010-12-27 Sebastian Pop <sebastian.pop@amd.com>
413
414 * graphite-opencl-codegen.c: Fix formating problems.
415 * graphite-opencl-meta-clast.c: Same.
416 * graphite-opencl.c: Same.
417 * graphite-opencl.h: Same.
418
419 2010-12-27 Sebastian Pop <sebastian.pop@amd.com>
420
421 * graphite-opencl-codegen.c: Sort topologically static functions.
422 * graphite-opencl.c: Same.
423
424 2010-12-25 Sebastian Pop <sebastian.pop@amd.com>
425
426 * graphite-cloog-compat.h (cloog_names_nb_scattering): New.
427 (cloog_names_scattering): New.
428 * graphite-opencl-codegen.c (opencl_constant_expression_p): Use
429 clast_expr_* instead of expr_*. Call clast_name_to_str.
430 (opencl_clast_name_to_tree): Now takes a clast_name_p in parameter.
431 (opencl_get_scat_real_name): Same. Call clast_name_to_str.
432 (opencl_add_scat_as_arg): Same.
433 (opencl_print_local_vars): Call cloog_names_scattering and
434 cloog_names_nb_scattering.
435 (opencl_print_for): Do not call value_*.
436 (opencl_print_term): Same.
437 (opencl_print_expr): Use clast_expr_* instead of expr_*.
438 (opencl_print_sum): Same.
439 (opencl_print_binary): Same.
440
441 2010-12-25 Alexey Kravets <kayrick@ispras.ru>
442
443 * Makefile.in (OBJS-common): Add graphite-opencl-codegen.o,
444 graphite-opencl-meta-clast.o and graphite-opencl.o.
445 (graphite-opencl-codegen.o): New.
446 (graphite-opencl-meta-clast.o): New.
447 (graphite-opencl.o): New.
448 (GTFILES): Add graphite-opencl.c.
449 * common.opt (fgraphite-opencl): New.
450 (fgraphite-opencl-cpu): New.
451 (fgraphite-opencl-ignore-depth-heuristic): New.
452 (fgraphite-opencl-ignore-mem-heuristic): New.
453 (fgraphite-opencl-ignore-dep): New.
454 (fgraphite-opencl-ignore-types): New.
455 (fgraphite-opencl-depth-base): New.
456 (fgraphite-opencl-debug): New.
457 * graphite-opencl-codegen.c: New file.
458 * graphite-opencl-meta-clast.c: New file.
459 * graphite-opencl.c: New file.
460 * graphite-opencl.h: New file.
461 * graphite.c (graphite_transform_loops): Call graphite_opencl_init and
462 graphite_opencl_finalize.
463 * tree-ssa-loop.c (gate_graphite_transforms): Handle
464 flag_graphite_opencl.
465 * graphite-clast-to-gimple.c (gloog): Call opencl_transform_clast.
466 * dbgcnt.def (opencl_scop_cnt): New counter.
467
468 2010-12-25 Alexander Monakov <amonakov@ispras.ru>
469
470 * graphite-dependences.c (graphite_outer_subscript_bound): New.
471 (graphite_carried_dependence_level_k): Export.
472 * graphite-dependences.h (graphite_outer_subscript_bound): Declare.
473 (graphite_carried_dependence_level_k): Ditto.
474
475 2010-12-25 Alexey Kravets <kayrick@ispras.ru>
476
477 * graphite-clast-to-gimple.c (struct clast_name_index): Move
478 definition to graphite-clast-to-gimple.h.
479 (clast_name_to_index): Ditto.
480 (clast_name_index_elt_info): Ditto.
481 (eq_clast_name_indexes): Ditto.
482 (save_clast_name_index): Export.
483 (clast_name_to_gcc): Ditto.
484 (clast_to_gcc_expression): Ditto.
485 (gcc_type_for_clast_expr): Ditto.
486 (graphite_create_new_guard): Ditto.
487 (gcc_type_for_iv_of_clast_loop): Ditto.
488 (graphite_create_new_loop): Ditto.
489 (build_iv_mapping): Ditto.
490 (graphite_create_new_loop_guard): Ditto.
491 (debug_clast_name_index): New.
492 (debug_clast_name_indices): New debug function.
493
494 2010-12-21 Sebastian Pop <sebastian.pop@amd.com>
495
496 PR tree-optimization/47021
497 * graphite-sese-to-poly.c (scan_tree_for_params): Handle ADDR_EXPR.
498
499 2010-11-26 Sebastian Pop <sebastian.pop@amd.com>
500
501 * graphite-sese-to-poly.c (analyze_drs_in_stmts): Fix set but
502 unused warning.
503 (rewrite_cross_bb_scalar_deps_out_of_ssa): Same.
504
505 2010-11-26 Sebastian Pop <sebastian.pop@amd.com>
506
507 * graphite-sese-to-poly.c (analyze_drs): Removed.
508 (build_scop_drs): Do not call analyze_drs.
509 (analyze_drs_in_stmts): New.
510 (insert_stmts): New.
511 (insert_out_of_ssa_copy): Call analyze_drs_in_stmts.
512 (insert_out_of_ssa_copy_on_edge): Same.
513 (rewrite_close_phi_out_of_ssa): Call insert_stmts.
514 (rewrite_phi_out_of_ssa): Same.
515 (rewrite_cross_bb_scalar_dependence): Same.
516 (split_reduction_stmt): Move data references in the new basic blocks.
517 (translate_scalar_reduction_to_array_for_stmt): Call insert_stmts.
518
519 2010-11-26 Sebastian Pop <sebastian.pop@amd.com>
520
521 * sese.c (rename_uses): Do not handle ADDR_EXPR in LHS of assignments.
522
523 2010-11-22 Sebastian Pop <sebastian.pop@amd.com>
524
525 PR middle-end/45297
526 * graphite-poly.c (new_poly_bb): Returns a poly_bb_p. Do not take
527 the reduction bool in parameter. Clear PBB_IS_REDUCTION. Set GBB_PBB.
528 * graphite-poly.h (new_poly_bb): Update declaration.
529 (gbb_from_bb): Moved here...
530 (pbb_from_bb): New.
531 * graphite-sese-to-poly.c (var_used_in_not_loop_header_phi_node):
532 Removed.
533 (graphite_stmt_p): Removed.
534 (try_generate_gimple_bb): Returns a gimple_bb_p. Do not pass in
535 sbitmap reductions. Always build a gimple_bb_p. Do not call
536 new_poly_bb.
537 (build_scop_bbs_1): Do not pass in sbitmap reductions.
538 (build_scop_bbs): Same.
539 (gbb_from_bb): ... from here.
540 (add_conditions_to_constraints): Moved up.
541 (analyze_drs): New.
542 (build_scop_drs): Call analyze_drs. Remove all the PBBs that do
543 not contain data references.
544 (new_pbb_from_pbb): New.
545 (insert_out_of_ssa_copy_on_edge): Call new_pbb_from_pbb after a
546 block is split.
547 (rewrite_close_phi_out_of_ssa): Update call to
548 insert_out_of_ssa_copy_on_edge.
549 (rewrite_reductions_out_of_ssa): Now static.
550 (rewrite_cross_bb_scalar_deps_out_of_ssa): Same.
551 (split_pbb): New.
552 (split_reduction_stmt): Call split_pbb.
553 (translate_scalar_reduction_to_array): Pass in the scop, do not
554 pass in the sbitmap reductions.
555 (rewrite_commutative_reductions_out_of_ssa_close_phi): Same.
556 (rewrite_commutative_reductions_out_of_ssa_loop): Same.
557 (rewrite_commutative_reductions_out_of_ssa): Same.
558 (build_poly_scop): Call build_scop_bbs,
559 rewrite_commutative_reductions_out_of_ssa,
560 rewrite_reductions_out_of_ssa, and
561 rewrite_cross_bb_scalar_deps_out_of_ssa. Move build_scop_drs
562 before scop_to_lst.
563 * graphite-sese-to-poly.h (rewrite_commutative_reductions_out_of_ssa):
564 Removed declaration.
565 (rewrite_reductions_out_of_ssa): Same.
566 (rewrite_cross_bb_scalar_deps_out_of_ssa): Same.
567 (build_scop_bbs): Same.
568 * graphite.c (graphite_transform_loops): Do not initialize reductions.
569 Do not call build_scop_bbs,
570 rewrite_commutative_reductions_out_of_ssa,
571 rewrite_reductions_out_of_ssa, and
572 rewrite_cross_bb_scalar_deps_out_of_ssa.
573 * sese.h (struct gimple_bb): Add field pbb.
574 (GBB_PBB): New.
575
576 * gcc.dg/graphite/pr45297.c: New.
577
578 2010-11-22 Sebastian Pop <sebastian.pop@amd.com>
579
580 * graphite-sese-to-poly.c (handle_scalar_deps_crossing_scop_limits):
581 New.
582 (rewrite_cross_bb_scalar_deps): Pass in the scop. Call
583 handle_scalar_deps_crossing_scop_limits.
584 (rewrite_cross_bb_scalar_deps_out_of_ssa): Create an empty BB
585 after the scop. Update call to rewrite_cross_bb_scalar_deps.
586
587 2010-11-22 Sebastian Pop <sebastian.pop@amd.com>
588
589 * sese.c (rename_uses): Call recompute_tree_invariant_for_addr_expr
590 when replacing a constant in an ADDR_EXPR.
591
592 2010-10-20 Sebastian Pop <sebastian.pop@amd.com>
593
594 * graphite-blocking.c (lst_do_strip_mine_loop): Extra parameter
595 for the stride.
596 (lst_do_strip_mine): Same.
597 (scop_do_strip_mine): Same.
598 * graphite-poly.c (apply_poly_transforms): Update call to
599 scop_do_strip_mine.
600 * graphite-poly.h (scop_do_strip_mine): Update declaration.
601
602 2010-09-24 Sebastian Pop <sebastian.pop@amd.com>
603
604 PR middle-end/45758
605 * graphite.c (graphite_initialize): Call scev_reset.
606
607 2010-09-23 Sebastian Pop <sebastian.pop@amd.com>
608
609 * sese.h (scev_analyzable_p): Return false for real or floating
610 point. Only handle INTEGRAL_TYPE_P and POINTER_TYPE_P.
611
612 2010-09-23 Sebastian Pop <sebastian.pop@amd.com>
613
614 PR middle-end/45758
615 * gfortran.dg/graphite/pr45758.f90: New.
616
617 2010-09-23 Sebastian Pop <sebastian.pop@amd.com>
618
619 * graphite-scop-detection.c (is_scop_p): Free bblist.
620
621 2010-09-23 Sebastian Pop <sebastian.pop@amd.com>
622
623 * graphite-clast-to-gimple.c (compute_bounds_for_level): Free le
624 and ps.
625 * graphite-poly.c (pbb_number_of_iterations_at_time): Free le and
626 domain.
627 * graphite-sese-to-poly.c (add_upper_bounds_from_estimated_nit):
628 Do not allocate ub_expr, it is passed in initialized.
629
630 2010-09-21 Andreas Simbuerger <simbuerg@fim.uni-passau.de>
631
632 * common.opt (fgraphite-dump-cloog): New flag.
633 * doc/invoke.texi (-fgraphite-dump-cloog): Documented.
634 * graphite-clast-to-gimple.c (init_cloog_input_file): New.
635 (build_cloog_prog): Dump CLooG input file when
636 flag_graphite_dump_cloog is set.
637 * graphite-cloog-compat.h (cloog_program_dump_cloog): New.
638
639 2010-09-20 Sebastian Pop <sebastian.pop@amd.com>
640
641 Revert previous patch "New flag: -fgraphite-dump-cloog."
642
643 2010-09-20 Andreas Simbuerger <simbuerg@fim.uni-passau.de>
644
645 * common.opt (fgraphite-dump-cloog): New flag.
646 * doc/invoke.texi (-fgraphite-dump-cloog): Documented.
647 * graphite-clast-to-gimple.c (init_cloog_input_file): New.
648 (build_cloog_prog): Dump CLooG input file when
649 flag_graphite_dump_cloog is set.
650
651 2010-09-20 Sebastian Pop <sebastian.pop@amd.com>
652
653 * graphite-clast-to-gimple.c (graphite_verify): Remove call to
654 verify_dominators for CDI_POST_DOMINATORS.
655 * sese.h: Remove comment about CDI_POST_DOMINATORS.
656 (recompute_all_dominators): Remove call to free_dominance_info
657 for CDI_POST_DOMINATORS. Remove call to calculate_dominance_info
658 for CDI_POST_DOMINATORS.
659
660 2010-09-09 Sebastian Pop <sebastian.pop@amd.com>
661
662 * graphite-poly.c (pbb_number_of_iterations_at_time): Only iterate
663 over pbb_dim_iter_domain.
664
665 2010-09-09 Sebastian Pop <sebastian.pop@amd.com>
666
667 * graphite-flattening.c: Fix comments.
668
669 2010-09-09 Sebastian Pop <sebastian.pop@amd.com>
670
671 * Makefile.in (OBJS-common): Add graphite-flattening.o.
672 (graphite-flattening.o): New rule.
673 * common.opt (floop-flatten): New flag.
674 * doc/invoke.texi (-floop-flatten): Documented.
675 * graphite-flattening.c: New.
676 * graphite-poly.c (apply_poly_transforms): Call flatten_all_loops.
677 * graphite-poly.h (flatten_all_loops): Declared.
678 (lst_remove_loop_and_inline_stmts_in_loop_father): New.
679 * tree-ssa-loop.c (gate_graphite_transforms): When flag_loop_flatten
680 is set, also set flag_graphite.
681
682 2010-09-09 Sebastian Pop <sebastian.pop@amd.com>
683
684 * graphite-poly.c (cloog_checksum): New.
685 * graphite-poly.h (cloog_checksum): Declared.
686
687 2010-09-09 Sebastian Pop <sebastian.pop@amd.com>
688
689 * graphite-poly.c (pbb_number_of_iterations): Removed.
690 (pbb_number_of_iterations_at_time): Correctly compute the number
691 of iterations in the transformed loop.
692 * graphite-poly.h (pbb_number_of_iterations): Removed.
693
694 2010-09-09 Sebastian Pop <sebastian.pop@amd.com>
695
696 * graphite-poly.h (lst_update_scattering_seq): Removed.
697 (lst_update_scattering): Correctly handle outermost loop dewey
698 renumbering.
699
700 2010-09-09 Sebastian Pop <sebastian.pop@amd.com>
701
702 * graphite-blocking.c (pbb_strip_mine_profitable_p): Renamed
703 lst_strip_mine_profitable_p. Call lst_niter_for_loop.
704 * graphite-poly.h (lst_niter_for_loop): New.
705
706 2010-09-09 Sebastian Pop <sebastian.pop@amd.com>
707
708 * graphite-poly.c (apply_poly_transforms): Do not abort when the
709 transform read from disk is not legal. Call fatal_error instead.
710
711 2010-09-09 Sebastian Pop <sebastian.pop@amd.com>
712
713 * graphite-poly.c (print_pbb_body): Add missing closing parenthesis.
714 (print_scop_header): Removed. Inlined in the only call place...
715 (print_scop): ... here.
716
717 2010-09-09 Sebastian Pop <sebastian.pop@amd.com>
718
719 * graphite-poly.h (lst_dewey_number): Use FOR_EACH_VEC_ELT.
720
721 2010-09-02 Vladimir Kargov <kargov@gmail.com>
722
723 * graphite-scop-detection.c (is_valid_expr_p, is_valid_loop_p): New.
724 (is_valid_stmt_p): Add data reference and operation-specific checks.
725 (is_valid_bb_p): Change structure, add loop validity check.
726 (is_scop_p): Move the TODO list
727 (find_scops_new): New.
728 (build_scops_new): Move part of functionality to find_scops_new and
729 build_scops. Add necessary steps for successful SCoP construction.
730 (build_scops): Compute SCoP sets for both detection algorithms, choose
731 the resulting one depending on static condition.
732
733 2010-08-24 Sebastian Pop <sebastian.pop@amd.com>
734
735 * graphite-poly.c (graphite_read_scop_file): Fix uninitialize warning.
736
737 2010-08-24 Sebastian Pop <sebastian.pop@amd.com>
738
739 * graphite-dependences.c (dot_deps): Avoid set but not used warning.
740 (dot_deps_stmt): Same.
741 * graphite-poly.c (dot_lst): Same.
742
743 2010-08-23 Sebastian Pop <sebastian.pop@amd.com>
744
745 * graphite-blocking.c (scop_do_strip_mine): Do not call
746 graphite_legal_transform.
747 (scop_do_block): Same.
748
749 2010-08-20 Vladimir Kargov <kargov@gmail.com>
750
751 * graphite-scop-detection.c (graphite_can_represent_loop): Correct the
752 description.
753
754 2010-08-20 Sebastian Pop <sebastian.pop@amd.com>
755
756 PR middle-end/45230
757 * gcc.dg/graphite/id-pr45230.c: New.
758
759 2010-08-20 Sebastian Pop <sebastian.pop@amd.com>
760
761 * tree-scalar-evolution.c (instantiate_array_ref): New.
762 (instantiate_scev_r): Also handle ARRAY_REFs.
763
764 2010-08-20 Sebastian Pop <sebastian.pop@amd.com>
765
766 * tree-scalar-evolution.c (chrec_contains_symbols_defined_in_loop):
767 Do not check for VAR_DECL, PARM_DECL, FUNCTION_DECL, LABEL_DECL,
768 RESULT_DECL, and FIELD_DECL. Return false for an
769 SSA_NAME_IS_DEFAULT_DEF.
770 (compute_scalar_evolution_in_loop): Do not further analyze the
771 scalar evolution when no_evolution_in_loop_p returns true.
772
773 2010-08-20 Sebastian Pop <sebastian.pop@amd.com>
774
775 * tree-chrec.h (evolution_function_is_affine_p): Do not check
776 whether CHREC_LEFT is invariant. A function is affine when
777 CHREC_RIGHT is invariant.
778
779 2010-08-20 Sebastian Pop <sebastian.pop@amd.com>
780
781 * graphite-sese-to-poly.c (reduction_phi_p): Remove check for
782 is_gimple_reg.
783 (rewrite_degenerate_phi): Same.
784 (rewrite_reductions_out_of_ssa): Add check for is_gimple_reg.
785
786 2010-08-18 Vladimir Kargov <kargov@gmail.com>
787
788 * graphite-scop-detection.c (graphite_can_represent_scev,
789 graphite_can_represent_expr, stmt_has_simple_data_refs_p,
790 graphite_can_represent_loop): Remove outermost_loop.
791
792 2010-08-17 Sebastian Pop <sebastian.pop@amd.com>
793
794 PR middle-end/45229
795 * graphite-sese-to-poly.c (rewrite_cross_bb_scalar_deps): Do not
796 handle GIMPLE_CALLs with no LHS.
797
798 2010-08-17 Riyadh Baghdadi <baghdadi.mr@gmail.com>
799 Sebastian Pop <sebastian.pop@amd.com>
800
801 * gcc.dg/graphite/graphite.exp: Add test rules for openscop read/write.
802 Call remove-build-file to clean up the generated *.graphite files.
803
804 2010-08-17 Riyadh Baghdadi <baghdadi.mr@gmail.com>
805
806 * doc/invoke.texi (debugging options): Update documentation.
807 (-floop-interchange): Same.
808 (-flopp-strip-mine): Same.
809 (-floop-block): Same.
810 (-fgraphite-read): Add documentation.
811 (-fgraphite-write): Same.
812
813 2010-08-17 Riyadh Baghdadi <baghdadi.mr@gmail.com>
814
815 * toplev.c (process_options): Disable graphite loop optimization
816 options when -fgraphite-read flag is used.
817
818 2010-08-17 Riyadh Baghdadi <baghdadi.mr@gmail.com>
819
820 * graphite-poly.c (init_graphite_out_file): New.
821 (init_graphite_in_file): New.
822 (apply_poly_transforms): Updated to enable reading and writing of
823 multiple scop files.
824 * toplev.c (init_asm_output): Remove graphite in/out file initialization.
825
826 2010-08-17 Tobias Grosser <grosser@fim.uni-passau.de>
827
828 * graphite-scop-detection.c (graphite_can_represent_scev): Remove
829 redundant checks.
830
831 2010-08-12 Sebastian Pop <sebastian.pop@amd.com>
832
833 * graphite-clast-to-gimple.c (precision_for_value): Adjust
834 computation of precision by 1.
835
836 2010-08-12 Riyadh Baghdadi <baghdadi.mr@gmail.com>
837
838 * graphite-cloog-util.c (openscop_read_cloog_matrix): New.
839 (openscop_read_polyhedron_matrix): New.
840 * graphite-cloog-util.h (openscop_read_polyhedron_matrix): Declared.
841 (openscop_read_N_int): Same.
842 * graphite-poly.c (openscop_read_N_int): New.
843 (openscop_read_one_int): New.
844 (openscop_read_N_string): New.
845 (openscop_read_one_string): New.
846 (openscop_read_powerset_matrix): New.
847 (graphite_read_transforms): Remove.
848 (graphite_read_scatt): New.
849 (graphite_read_scop_file): New.
850 (apply_poly_transforms): Updated to call graphite_read_scop_file.
851
852 2010-08-11 Andreas Simbuerger <simbuerg@fim.uni-passau.de>
853
854 * graphite-poly.c: Change include order.
855
856 2010-08-11 Andreas Simbuerger <simbuerg@fim.uni-passau.de>
857
858 * graphite-cloog-compat.h (cloog_matrix_ncolumns): New.
859 (cloog_matrix_nrows): New.
860
861 2010-08-11 Riyadh Baghdadi <baghdadi.mr@gmail.com>
862
863 * graphite-cloog-util.c (openscop_print_cloog_matrix): Remove spaces
864 from matrix lines.
865 * graphite-poly.c (openscop_print_scattering_function_1): Same.
866 (print_scattering_function_1): Same.
867 (openscop_print_pbb_domain): Same.
868 (openscop_print_scop_context): Same.
869 (print_scop_context): Same.
870
871 2010-08-11 Riyadh Baghdadi <baghdadi.mr@gmail.com>
872
873 * graphite-poly.c (openscop_print_pdr_polyhedron): Fix indentation.
874 (openscop_print_pdr_polyhedron): Print pph.
875
876 2010-07-29 Sebastian Pop <sebastian.pop@amd.com>
877
878 * gcc.dg/graphite/graphite.exp: Add compile rules for vect-* files.
879 * gfortran.dg/graphite/graphite.exp: Same.
880 * gcc.dg/graphite/vect-pr43423.c: New.
881
882 2010-07-29 Sebastian Pop <sebastian.pop@amd.com>
883
884 * graphite-clast-to-gimple.c (gcc_type_for_interval): Generate in
885 priority signed types.
886
887 2010-07-29 Sebastian Pop <sebastian.pop@amd.com>
888
889 * graphite-clast-to-gimple.c (max_signed_precision_type): Remove the call
890 to lang_hooks.types.type_for_size. Call build_nonstandard_integer_type.
891
892 2010-07-29 Riyadh Baghdadi <baghdadi.mr@gmail.com>
893
894 * graphite-cloog-util.c (openscop_print_cloog_matrix): New.
895 (openscop_print_polyhedron_matrix): New.
896 * graphite-cloog-util.h (openscop_print_polyhedron_matrix): Declared.
897 * graphite-poly.c (openscop_print_pdr_polyhedron): Same.
898 (openscop_print_pdr_powerset): New.
899 (openscop_print_powerset_matrix): New.
900 (openscop_print_scattering_function_1): New.
901 (print_scattering_function): Add support for scattering names and
902 OpenScop format.
903 (graphite_write_transforms): Remove.
904 (apply_poly_transforms): Updated to call print_scop.
905 (print_pdr_access_layout): Updated to support OpenScop format.
906 (print_pdr): Same.
907 (openscop_print_pbb_domain): New.
908 (print_pbb_body): Added a parameter to allow indicating that pbb_body is
909 not provided.
910 (print_pbb): Updated to call the new print_pbb_body.
911 (openscop_print_scop_context): New.
912 (print_scop_header): New.
913 (print_scop): Updated to call print_scop_header.
914 * graphite-poly.h: Document OpenScop format.
915
916 2010-07-29 Sebastian Pop <sebastian.pop@amd.com>
917
918 * graphite-sese-to-poly.c (rewrite_close_phi_out_of_ssa): Add back
919 the case removed in the previous patch, when the only phi argument
920 is defined in the same loop as the phi node itself. Handle it
921 separately from the invariant case by both propagating it outside
922 the region and replacing the phi node with an assign.
923
924 2010-07-28 Sebastian Pop <sebastian.pop@amd.com>
925
926 * graphite-sese-to-poly.c (rewrite_close_phi_out_of_ssa): The only
927 constant phi nodes with one argument are is_gimple_min_invariant
928 and SSA_NAME_IS_DEFAULT_DEF.
929
930 * gfortran.dg/graphite/id-22.f: New.
931
932 2010-07-27 Andreas Simbuerger <simbuerg@fim.uni-passau.de>
933
934 * graphite.c (graphite_initialize): Do not initialize
935 CLooG and initialize the Parma Polyhedra Library
936 manually when using CLOOG_ORG.
937 (graphite_finalize): Do not finalize CLooG and finalize
938 the Parma Polyhedra Library manually when using CLOOG_ORG.
939 * graphite-cloog-compat.h (cloog_initialize): Hide function
940 when using CLOOG_ORG.
941 (cloog_finalize): Same.
942
943 2010-07-27 Andreas Simbuerger <simbuerg@fim.uni-passau.de>
944
945 * graphite-clast-to-gimple.c (free_scattering): Change
946 CloogDomainList/CloogDomain to CloogScatteringList/CloogScattering
947 (CLOOG_ORG).
948 (build_cloog_prog): Same.
949 * graphite-cloog-compat.h (cloog_domain): Removed.
950 (cloog_scattering): New.
951 (cloog_set_domain): Removed.
952 (cloog_set_scattering): New.
953 (cloog_next_domain): Removed.
954 (cloog_next_scattering): New.
955 (cloog_set_next_domain): Removed.
956 (cloog_set_next_scattering): New.
957 (CloogScatteringList): New.
958 (CloogScattering): New.
959 (cloog_scattering_free): New.
960 (new_Cloog_Scattering_from_ppl_Polyhedron): New.
961 * graphite-cloog-util.c (new_Cloog_Scattering_from_ppl_Polyhedron):
962 New.
963
964 2010-07-27 Andreas Simbuerger <simbuerg@fim.uni-passau.de>
965
966 * graphite-clast-to-gimple.c (build_cloog_prog): Extend with
967 CloogState.
968 (set_cloog_options): Same.
969 (print_clast_stmt): Same.
970 (scop_to_clast): Same.
971 (print_generated_program): Same.
972 (gloog): Same.
973 * graphite-clast-to-gimple.h: Include graphite-cloog-util.h.
974 (scop_to_clast): Extend with CloogState.
975 * graphite-cloog-util.c: Include graphite-cloog-compat.h
976 (new_Cloog_Domain_from_ppl_Polyhedron):
977 Extend with CloogState. Use cloog_domain_from_cloog_matrix (CLOOG_ORG).
978 (new_Cloog_Domain_from_ppl_Pointset_Powerset): Extend with CloogState.
979 (new_Cloog_Domain_from_ppl_Polyhedron): Same.
980 * graphite-cloog-util.h (build_cloog_prog): Same.
981 * graphite-cloog-copat.h (build_cloog_prog): New.
982 (CloogState): New.
983 (cloog_state_malloc): New.
984 (cloog_state_free): New.
985 (cloog_loop_malloc): New.
986 (cloog_options_malloc): New.
987 (cloog_statement_alloc): New.
988 (cloog_domain_from_cloog_matrix): New.
989 (new_Cloog_Domain_from_ppl_Pointset_Powerset): New.
990 (new_Cloog_Domain_from_ppl_Polyhedron): New.
991
992 2010-07-27 Andreas Simbuerger <simbuerg@fim.uni-passau.de>
993
994 * graphite-clast-to-gimple.c (clast_name_to_gcc): Parameter
995 type of NAME now depends on used CLooG version.
996 (clast_to_gcc_expression): Replace expr_* with clast_expr_*.
997 (gcc_type_for_clast_expr): Same.
998 (print_clast_stmt): Replace pprint with clast_pprint.
999 * graphite-cloog-compat.h: Provide compatibility macros for
1000 CLooG Legacy.
1001 (clast_name_p): New.
1002 (clast_expr_term): New.
1003 (clast_expr_red): New.
1004 (clast_expr_bin): New.
1005 (clast_pprint): New.
1006
1007 2010-07-27 Andreas Simbuerger <simbuerg@fim.uni-passau.de>
1008
1009 * graphite-clast-to-gimple.c (set_cloog_options): Make CLooG options
1010 compatible to newer CLooG releases (CLOOG_ORG).
1011 (build_cloog_prog): Pass CloogOptions to more functions (CLOOG_ORG).
1012 (scop_to_clast): Pass CloogOptions to build_cloog_prog (CLOOG_ORG).
1013 * graphite-cloog-compat.h: Add compatibility macros for CLooG Legacy.
1014 (build_cloog_prog) : New.
1015 (cloog_program_extract_scalars): New.
1016 (cloog_program_scatter): New.
1017
1018 2010-07-27 Andreas Simbuerger <simbuerg@fim.uni-passau.de>
1019
1020 * graphite-clast-to-gimple.c: Include graphite-cloog-compat.h
1021 conditionally (CLOOG_ORG).
1022 * graphite-cloog-compat.h: New. Include graphite-cloog-compat.h.
1023 (cloog_statement_usr): New.
1024 (cloog_domain): Same.
1025 (cloog_set_domain): Same.
1026 (cloog_next_domain): Same.
1027 (cloog_set_next_domain): Same.
1028 (cloog_program_nb_scattdims): Same.
1029 (cloog_program_set_nb_scattdims): Same.
1030 (cloog_program_names): Same.
1031 (cloog_program_set_names): Same.
1032 (cloog_program_set_context): Same.
1033 (cloog_program_set_loop): Same.
1034 (cloog_program_blocklist): Same.
1035 (cloog_program_set_blocklist): Same.
1036 (cloog_program_scaldims): Same.
1037 (cloog_program_set_scaldims): Same.
1038 (cloog_names_nb_parameters): Same.
1039 (cloog_names_set_nb_parameters): Same.
1040 (cloog_names_parameters): Same.
1041 (cloog_names_set_parameters): Same.
1042 (cloog_names_set_nb_iterators): Same.
1043 (cloog_names_set_iterators): Same.
1044 (cloog_names_set_nb_scattering): Same.
1045 (cloog_names_set_scattering): Same.
1046 (cloog_statement_set_usr): Same.
1047 (cloog_loop_set_next): Same.
1048 (cloog_loop_set_domain): Same.
1049 (cloog_loop_set_block): Same.
1050 (cloog_block_list_next): Same.
1051 (cloog_block_list_set_next):
1052 (cloog_block_list_set_block): Same.
1053
1054 2010-07-27 Sebastian Pop <sebastian.pop@amd.com>
1055
1056 * graphite-sese-to-poly.c (rewrite_cross_bb_scalar_deps): Returns
1057 a bool.
1058 (rewrite_commutative_reductions_out_of_ssa_close_phi): Same.
1059 (rewrite_commutative_reductions_out_of_ssa_loop): Same.
1060 (rewrite_cross_bb_scalar_deps_out_of_ssa): Call scev_reset_htab
1061 when something has been changed.
1062 (rewrite_commutative_reductions_out_of_ssa): Same.
1063
1064 * gcc.dg/graphite/id-26.c: New.
1065
1066 2010-07-26 Sebastian Pop <sebastian.pop@amd.com>
1067
1068 * graphite-sese-to-poly.c (propagate_expr_outside_region): Also
1069 handle the case when def is in the sese region.
1070 (rewrite_close_phi_out_of_ssa): Call propagate_expr_outside_region
1071 for invariant expressions.
1072 (rewrite_cross_bb_phi_deps): Removed.
1073 (rewrite_cross_bb_scalar_deps): Also handle GIMPLE_PHI nodes.
1074 (rewrite_cross_bb_scalar_deps_out_of_ssa): Do not call
1075 rewrite_cross_bb_phi_deps.
1076
1077 2010-07-26 Sebastian Pop <sebastian.pop@amd.com>
1078
1079 * graphite-sese-to-poly.c
1080 (rewrite_commutative_reductions_out_of_ssa_loop): Call
1081 scev_analyzable_p only on is_gimple_reg
1082
1083 * gcc.dg/graphite/id-25.c: New.
1084
1085 2010-07-22 Sebastian Pop <sebastian.pop@amd.com>
1086
1087 * graphite-sese-to-poly.c (propagate_expr_outside_region): New.
1088 (rewrite_close_phi_out_of_ssa): Propagate constant values or
1089 parametric expressions outside the scop region.
1090 (rewrite_cross_bb_scalar_deps): Same.
1091 * sese.c (rename_uses): Use NULL_TREE instead of NULL for trees.
1092
1093 * gcc.dg/graphite/run-id-5.c: New.
1094 * gcc.dg/graphite/run-id-6.c: New.
1095 * gfortran.dg/graphite/id-21.f: New.
1096
1097 2010-07-22 Sebastian Pop <sebastian.pop@amd.com>
1098
1099 * graphite-sese-to-poly.c (rewrite_phi_out_of_ssa): Use
1100 SSA_NAME_DEF_STMT only on SSA_NAMEs.
1101
1102 * gcc.dg/graphite/id-24.c: New.
1103
1104 2010-07-22 Sebastian Pop <sebastian.pop@amd.com>
1105
1106 * tree-scalar-evolution.c (instantiate_scev_name): Do not
1107 instantiate default definitions.
1108
1109 2010-07-20 Vladimir Kargov <kargov@gmail.com>
1110
1111 * graphite-scop-detection.c (is_valid_stmt_p): New.
1112 (is_valid_bb_p): New.
1113
1114 2010-07-20 Vladimir Kargov <kargov@gmail.com>
1115 Sebastian Pop <sebastian.pop@amd.com>
1116
1117 * cfgloop.c (is_loop_exit): Renamed loop_exits_to_bb_p.
1118 (loop_exits_from_bb_p): New.
1119 * cfgloop.h (is_loop_exit): Renamed loop_exits_to_bb_p.
1120 (loop_exits_from_bb_p): Declared.
1121 * graphite-scop-detection.c (scopdet_basic_block_info): Call
1122 loop_exits_to_bb_p.
1123
1124 2010-07-20 Vladimir Kargov <kargov@gmail.com>
1125
1126 * refined-regions.c: Include tree-pass.h, cfgloop.h, gimple.h, and
1127 tree-data-ref.h.
1128 (dot_regions_1): New.
1129 (dot_regions): New.
1130 * refined-regions.h (dot_regions): Declared.
1131 * Makefile.in (refined-regions.o): Update dependences.
1132
1133 2010-07-20 Sebastian Pop <sebastian.pop@amd.com>
1134
1135 * graphite-sese-to-poly.c (rewrite_close_phi_out_of_ssa): Add an
1136 extra parameter for the region. Call scev_analyzable_p.
1137 (rewrite_reductions_out_of_ssa): Update call to
1138 rewrite_close_phi_out_of_ssa.
1139 (rewrite_cross_bb_phi_deps): Same.
1140 (rewrite_commutative_reductions_out_of_ssa_loop): Add an extra
1141 parameter for the region. Call scev_analyzable_p.
1142 (rewrite_commutative_reductions_out_of_ssa): Update call to
1143 rewrite_commutative_reductions_out_of_ssa_loop.
1144
1145 2010-07-20 Sebastian Pop <sebastian.pop@amd.com>
1146
1147 * gcc.dg/tree-ssa/pr20742.c: New.
1148
1149 2010-07-15 Sebastian Pop <sebastian.pop@amd.com>
1150
1151 * sese.c (rename_uses): Call unshare_expr before force_gimple_operand.
1152
1153 * gcc.dg/graphite/id-23.c: New.
1154
1155 2010-07-15 Sebastian Pop <sebastian.pop@amd.com>
1156
1157 * graphite-sese-to-poly.c (reduction_phi_p): Do not rewrite out of
1158 SSA scalar phi nodes that can be scev_analyzable_p.
1159
1160 * gfortran.dg/graphite/id-20.f: Adjust testcase.
1161
1162 2010-07-15 Sebastian Pop <sebastian.pop@amd.com>
1163
1164 * graphite-sese-to-poly.c (rewrite_close_phi_out_of_ssa): Correctly
1165 handle SSA_NAME_IS_DEFAULT_DEF.
1166
1167 2010-07-15 Sebastian Pop <sebastian.pop@amd.com>
1168
1169 * sese.c (rename_uses): Handl unconditionally gimple_debug statements.
1170
1171 * gcc.dg/graphite/pr42729.c: New.
1172
1173 2010-07-15 Sebastian Pop <sebastian.pop@amd.com>
1174
1175 * graphite-sese-to-poly.c (rewrite_close_phi_out_of_ssa): Special
1176 case non close-phi nodes with one argument.
1177
1178 2010-07-15 Sebastian Pop <sebastian.pop@amd.com>
1179
1180 * sese.h (scev_analyzable_p): Scevs could be expressions without
1181 chrecs and still be scev_analyzable_p.
1182
1183 2010-07-15 Sebastian Pop <sebastian.pop@amd.com>
1184
1185 * params.def (PARAM_SCEV_MAX_EXPR_SIZE): Bump the value to 100.
1186
1187 2010-07-15 Sebastian Pop <sebastian.pop@amd.com>
1188
1189 * cfgloop.c (alloc_loop): Remove initialization of loop->single_iv.
1190 * cfgloop.h (struct loop): Remove single_iv field.
1191 * graphite-sese-to-poly.c (graphite_loop_normal_form): Removed.
1192 (scop_canonicalize_loops): Removed.
1193 (scop_ivs_can_be_represented): Do not use loop->single_iv. Iterate
1194 over all the loop phi nodes in loop->header.
1195 (build_poly_scop): Remove use of scop_canonicalize_loops.
1196
1197 2010-07-15 Sebastian Pop <sebastian.pop@amd.com>
1198
1199 * graphite-sese-to-poly.c (rewrite_cross_bb_scalar_deps): Also
1200 handle GIMPLE_CALL.
1201
1202 2010-07-15 Sebastian Pop <sebastian.pop@amd.com>
1203
1204 * tree-chrec.c (chrec_apply): Should only apply to the specified
1205 variable. Also handle multivariate chains of recurrences that
1206 satisfy evolution_function_is_affine_p. Also handle CASE_CONVERT.
1207
1208 2010-07-15 Sebastian Pop <sebastian.pop@amd.com>
1209
1210 * graphite-clast-to-gimple.c (debug_clast_name_index): Removed.
1211 (debug_clast_name_indexes_1): Removed.
1212 (debug_clast_name_indexes): Removed.
1213 (pbb_to_depth_to_oldiv): Removed.
1214 (build_iv_mapping): Replace the use of rename_map with iv_map.
1215 (translate_clast_user): Remove uses of rename_map. Allocate and
1216 free iv_map.
1217 (translate_clast_for_loop): Remove uses of rename_map.
1218 (translate_clast_for): Same.
1219 (translate_clast_guard): Same.
1220 (translate_clast): Same.
1221 (gloog): Same.
1222 * graphite-clast-to-gimple.h (debug_clast_name_indexes): Removed.
1223 * graphite-sese-to-poly.c (scev_analyzable_p): Moved...
1224 * sese.c (set_rename): Now static.
1225 (rename_variables_in_stmt): Removed.
1226 (rename_uses): New.
1227 (is_parameter): Removed.
1228 (is_iv): Removed.
1229 (expand_scalar_variables_call): Removed.
1230 (expand_scalar_variables_ssa_name): Removed.
1231 (expand_scalar_variables_expr): Removed.
1232 (expand_scalar_variables_stmt): Removed.
1233 (expand_scalar_variables): Removed.
1234 (rename_variables): Removed.
1235 (remove_condition): Removed.
1236 (get_true_edge_from_guard_bb): Removed.
1237 (get_false_edge_from_guard_bb): Removed.
1238 (struct igp): Removed.
1239 (default_before_guard): Removed.
1240 (convert_for_phi_arg): Removed.
1241 (add_guard_exit_phis): Removed.
1242 (insert_guard_phis): Removed.
1243 (graphite_copy_stmts_from_block): Now also uses iv_map and a
1244 region. Do not copy conditions. Do not copy induction variables.
1245 Call rename_uses.
1246 (copy_bb_and_scalar_dependences): Allocate a local rename_map for
1247 the translated statement. Use the iv_map for the induction
1248 variable renaming.
1249 * sese.h (copy_bb_and_scalar_dependences): Update declaration.
1250 (set_rename): Removed declaration.
1251 (scev_analyzable_p): ...here.
1252 * tree-chrec.c (chrec_apply_map): New.
1253 * tree-chrec.h (chrec_apply_map): Declared.
1254
1255 2010-07-15 Sebastian Pop <sebastian.pop@amd.com>
1256
1257 * graphite-clast-to-gimple.c (translate_clast_for_loop): Do not call
1258 insert_loop_close_phis.
1259 * sese.c (name_defined_in_loop_p): Removed.
1260 (expr_defined_in_loop_p): Removed.
1261 (alive_after_loop): Removed.
1262 (close_phi_not_yet_inserted_p): Removed.
1263 (struct alep): Removed.
1264 (add_loop_exit_phis): Removed.
1265 (insert_loop_close_phis): Removed.
1266
1267 2010-07-15 Andreas Simbuerger <simbuerg@fim.uni-passau.de>
1268
1269 * graphite-cloog-util.c (cloog_matrix_to_ppl_constraint): Fix flipped
1270 condition.
1271 * graphite-poly.c (psct_scattering_dim_for_loop_depth): Same.
1272
1273 2010-07-07 Sebastian Pop <sebastian.pop@amd.com>
1274
1275 * gfortran.dg/graphite/id-20.f: New.
1276
1277 2010-07-05 Andreas Simbuerger <simbuerg@fim.uni-passau.de>
1278
1279 * graphite-cloog-util.h: Added cloog.h.
1280 * graphite-blocking.c: Removed cloog.h.
1281 * graphite-dependences.c: Same.
1282 * graphite-interchange.c: Same.
1283 * graphite-poly.c: Same.
1284 * graphite-ppl.c: Same.
1285 * graphite-scop-detection.c: Same.
1286 * graphite-sese-to-poly.c:
1287 Removed cloog.h.
1288 Removed graphite-clast-to-gimple.h.
1289 (check_poly_representation): Removed (unused).
1290 * graphite-sese-to-poly.h
1291 (check_poly_representation): Removed (unused).
1292
1293 2010-07-05 Andreas Simbuerger <simbuerg@fim.uni-passau.de>
1294
1295 * Makefile.in
1296 (OBJS-common): Added graphite-cloog-util.o.
1297 (graphite-clast-to-gimple.o): Added graphite-cloog-util.h.
1298 (graphite-cloog-util.o): New.
1299 (graphite-ppl.o): Added graphite-cloog-util.h.
1300 * graphite-clast-to-gimple.c:
1301 Added graphite-cloog-util.h to include statements.
1302 * graphite-cloog-util.c: New.
1303 (new_Cloog_Matrix_from_ppl_Polyhedron): Moved from graphite-ppl.c.
1304 (new_Cloog_Domain_from_ppl_Polyhedron): Same.
1305 (new_Cloog_Domain_from_ppl_Pointset_Powerset): Same.
1306 (new_C_Polyhedron_from_Cloog_Matrix): Same.
1307 (ppl_Constrain_System_number_of_constraints): Same.
1308 (new_Cloog_Matrix_from_ppl_Constraint_System): Same.
1309 (oppose_constraint): Same.
1310 (cloog_matrix_to_ppl_constraint): Same.
1311 (new_Constraint_System_from_Cloog_Matrix): Same.
1312 (insert_constraint_into_matrix): Same. Declared static.
1313 * graphite-cloog-util.h: New.
1314 (new_Cloog_Matrix_from_ppl_Polyhedron): Moved from graphite-ppl.h.
1315 (new_Cloog_Domain_from_ppl_Polyhedron): Same.
1316 (new_Cloog_Domain_from_ppl_Pointset_Powerset): Same.
1317 (new_C_Polyhedron_from_Cloog_Matrix): Same.
1318 (insert_constraint_into_matrix): Same.
1319 * graphite-ppl.c:
1320 Added graphite-cloog-util.h to include statements.
1321 (new_Cloog_Matrix_from_ppl_Polyhedron): Moved to graphite-cloog-util.c.
1322 (new_Cloog_Domain_from_ppl_Polyhedron): Same.
1323 (new_Cloog_Domain_from_ppl_Pointset_Powerset): Same.
1324 (new_C_Polyhedron_from_Cloog_Matrix): Same.
1325 (insert_constraint_into_matrix): Same.
1326 (ppl_Constrain_System_number_of_constraints): Same.
1327 (new_Cloog_Matrix_from_ppl_Constraint_System): Same.
1328 (oppose_constraint): Same.
1329 (cloog_matrix_to_ppl_constraint): Same.
1330 (new_Constraint_System_from_Cloog_Matrix): Same.
1331 * graphite-ppl.h:
1332 (new_Cloog_Matrix_from_ppl_Polyhedron): Moved to
1333 graphite-cloog-util.h.
1334 (new_Cloog_Domain_from_ppl_Polyhedron): Same.
1335 (new_Cloog_Domain_from_ppl_Pointset_Powerset): Same.
1336 (new_C_Polyhedron_from_Cloog_Matrix): Same.
1337 (insert_constraint_into_matrix): Removed.
1338
1339 2010-07-04 Andreas Simbuerger <simbuerg@fim.uni-passau.de>
1340
1341 * graphite-clast-to-gimple.c
1342 (precision_for_value): Resolve value_* calls to matching mpz_* calls.
1343 (precision_for_interval): Same.
1344 (gcc_type_for_interval): Same.
1345 (compute_type_for_level): Same.
1346 * graphite-interchange.c
1347 (lst_interchange_profitable_p): Same.
1348 * graphite-poly.c
1349 (psct_scattering_dim_for_loop_depth): Same.
1350 * graphite-ppl.c
1351 (ppl_max_for_le_pointset): Same.
1352 (ppl_min_for_le_pointset): Same.
1353
1354 2010-06-25 Vladimir Kargov <kargov@gmail.com>
1355
1356 * refined-regions.c (bb_index_compare): New.
1357 (get_bbs_in_region): New.
1358 (print_bbs_in_region): New.
1359 (print_refined_region): Add an argument that allows to print
1360 all basic blocks contained in regions.
1361 (debug_refined_region): Update call to print_refined_region.
1362 * refined-regions.h (print_refined_region): Update declaration.
1363 (get_bbs_in_region): Declared.
1364 * graphite-scop-detection.c (build_scops_new): Print the refined
1365 region tree into the Grahite dump file.
1366
1367 2010-06-24 Sebastian Pop <sebastian.pop@amd.com>
1368
1369 * graphite-sese-to-poly.c (rewrite_degenerate_phi): New.
1370 (rewrite_reductions_out_of_ssa): Call it for degenerate_phi_result.
1371
1372 2010-06-24 Sebastian Pop <sebastian.pop@amd.com>
1373
1374 * graphite-sese-to-poly.c (rewrite_cross_bb_phi_deps): Call
1375 rewrite_close_phi_out_of_ssa.
1376
1377 * gcc.dg/graphite/id-22.c: New.
1378
1379 2010-06-24 Sebastian Pop <sebastian.pop@amd.com>
1380
1381 * graphite-sese-to-poly.c (rewrite_cross_bb_phi_deps): Remove dead code.
1382
1383 2010-06-24 Sebastian Pop <sebastian.pop@amd.com>
1384
1385 * graphite-clast-to-gimple.c (build_iv_mapping): Rename map with
1386 rename_map.
1387 * sese.c (debug_rename_map): Same.
1388 (get_rename): Same.
1389 (set_rename): Same.
1390 (rename_variables_in_stmt): Same.
1391 (expand_scalar_variables_call): Same.
1392 (expand_scalar_variables_ssa_name): Same.
1393 (expand_scalar_variables_expr): Same.
1394 (expand_scalar_variables_stmt): Same.
1395 (expand_scalar_variables): Same.
1396 (rename_variables): Same.
1397 (graphite_copy_stmts_from_block): Same.
1398 (copy_bb_and_scalar_dependences): Same.
1399
1400 2010-06-24 Sebastian Pop <sebastian.pop@amd.com>
1401
1402 * graphite-clast-to-gimple.c (copy_renames): Removed.
1403 (translate_clast_for): Do not call copy_renames.
1404 (translate_clast_guard): Same.
1405
1406 2010-06-23 Sebastian Pop <sebastian.pop@amd.com>
1407
1408 * graphite-sese-to-poly.c (rewrite_reductions_out_of_ssa): Moved up.
1409 (rewrite_cross_bb_phi_deps): Split out of rewrite_cross_bb_scalar_deps.
1410 (rewrite_cross_bb_scalar_deps_out_of_ssa): Run rewrite_cross_bb_phi_deps
1411 before rewrite_cross_bb_scalar_deps.
1412
1413 2010-06-23 Sebastian Pop <sebastian.pop@amd.com>
1414
1415 * graphite-sese-to-poly.c (rewrite_commutative_reductions_out_of_ssa):
1416 Early return in when flag_associative_math is not set.
1417
1418 2010-06-23 Sebastian Pop <sebastian.pop@amd.com>
1419
1420 * gcc.dg/graphite/run-id-2.c: Call abort.
1421
1422 2010-06-23 Sebastian Pop <sebastian.pop@amd.com>
1423
1424 * graphite-sese-to-poly.c (rewrite_phi_out_of_ssa): Always insert out
1425 of SSA copies on edges except for loop->latch.
1426
1427 2010-06-23 Sebastian Pop <sebastian.pop@amd.com>
1428
1429 * graphite-sese-to-poly.c (rewrite_cross_bb_scalar_deps_out_of_ssa):
1430 Split out of rewrite_reductions_out_of_ssa.
1431 * graphite-sese-to-poly.h (rewrite_cross_bb_scalar_deps_out_of_ssa):
1432 Declared.
1433 * graphite.c (graphite_transform_loops): Call it.
1434
1435 2010-06-23 Sebastian Pop <sebastian.pop@amd.com>
1436
1437 * graphite.c (graphite_transform_loops): Add two more dbg_cnt calls.
1438
1439 2010-06-15 Sebastian Pop <sebastian.pop@amd.com>
1440
1441 * passes.c (init_optimization_passes): Add pass_graphite.
1442 Schedule a pass_copy_prop before pass_graphite_transforms.
1443 * timevar.def (TV_GRAPHITE): Declared.
1444 * tree-pass.h (pass_graphite): Declared.
1445 * tree-ssa-loop.c (pass_graphite): New.
1446
1447 * gcc.dg/graphite/id-20.c: New.
1448
1449 2010-06-12 Sebastian Pop <sebastian.pop@amd.com>
1450
1451 * graphite-clast-to-gimple.c (gloog): Do not pass scops in parameter.
1452 Remove calls to rename_nb_iterations and rename_sese_parameters.
1453 * graphite-clast-to-gimple.h (gloog): Update declaration.
1454 * graphite.c (graphite_transform_loops): Update call to gloog.
1455 * sese.c (rename_variables_in_expr): Removed.
1456 (rename_nb_iterations): Removed.
1457 (rename_sese_parameters): Removed.
1458 * sese.h (rename_nb_iterations): Removed.
1459 (rename_sese_parameters): Removed.
1460
1461 2010-06-12 Sebastian Pop <sebastian.pop@amd.com>
1462
1463 * graphite-clast-to-gimple.c (gloog): Remove call to
1464 sese_adjust_liveout_phis.
1465 * graphite-sese-to-poly.c (scev_analyzable_p): When scev returns an
1466 SSA_NAME, allow it to be handled by rewrite_cross_bb_scalar_deps.
1467 (rewrite_cross_bb_scalar_deps): Handle GIMPLE_PHI nodes: call
1468 rewrite_phi_out_of_ssa.
1469 * sese.c (get_vdef_before_sese): Removed.
1470 (sese_adjust_vphi): Removed.
1471 (sese_adjust_liveout_phis): Removed.
1472 * sese.h (sese_adjust_liveout_phis): Removed.
1473
1474 2010-06-12 Sebastian Pop <sebastian.pop@amd.com>
1475
1476 * graphite-sese-to-poly.c (insert_out_of_ssa_copy): Pass an extra
1477 argument for the place after which to insert the out of SSA copy.
1478 (rewrite_close_phi_out_of_ssa): Update calls to insert_out_of_ssa_copy.
1479 (rewrite_phi_out_of_ssa): Same.
1480 (rewrite_cross_bb_scalar_deps): Same.
1481 (insert_copyout): Removed.
1482 (insert_copyin): Removed.
1483 (translate_scalar_reduction_to_array): Call insert_out_of_ssa_copy and
1484 insert_out_of_ssa_copy_on_edge instead of insert_copyout and
1485 insert_copyin.
1486
1487 2010-06-12 Sebastian Pop <sebastian.pop@amd.com>
1488
1489 * graphite-sese-to-poly.c (build_scop_bbs): Not static anymore.
1490 (rewrite_reductions_out_of_ssa): Same.
1491 (rewrite_commutative_reductions_out_of_ssa): Same.
1492 (build_poly_scop): Do not call these functions.
1493 * graphite-sese-to-poly.h (build_poly_scop): Declared.
1494 (rewrite_reductions_out_of_ssa): Declared.
1495 (rewrite_commutative_reductions_out_of_ssa): Declared.
1496 * graphite.c (graphite_transform_loops): Call on every scop
1497 rewrite_commutative_reductions_out_of_ssa before calling
1498 rewrite_reductions_out_of_ssa and build_scop_bbs.
1499
1500 2010-06-12 Sebastian Pop <sebastian.pop@amd.com>
1501
1502 * graphite-dependences.c (dot_deps): Make system call to dotty run
1503 in background.
1504 (dot_deps_stmt): Same.
1505 * graphite-poly.c (dot_lst): Same.
1506
1507 2010-06-11 Sebastian Pop <sebastian.pop@amd.com>
1508
1509 * graphite-clast-to-gimple.c (gcc_type_for_interval): Do not pass
1510 old_type in parameter.
1511 (gcc_type_for_value): Update call to gcc_type_for_interval.
1512 (compute_type_for_level_1): Renamed compute_type_for_level.
1513 Update call to gcc_type_for_interval.
1514
1515 2010-06-09 Sebastian Pop <sebastian.pop@amd.com>
1516
1517 * tree-scalar-evolution.c (instantiate_scev_name): Do not fail
1518 the scev analysis when the variable is not used outside the loop
1519 in a close phi node: call compute_overall_effect_of_inner_loop.
1520
1521 2010-06-09 Sebastian Pop <sebastian.pop@amd.com>
1522
1523 * graphite-sese-to-poly.c (single_pred_cond): Renamed
1524 single_pred_cond_non_loop_exit. Return NULL for loop exit edges.
1525 (build_sese_conditions_before): Renamed call to single_pred_cond.
1526 (build_sese_conditions_after): Same.
1527
1528 2010-06-09 Sebastian Pop <sebastian.pop@amd.com>
1529
1530 * graphite-poly.h: Fix comments and indentation.
1531 * graphite-sese-to-poly.c: Same.
1532 (build_sese_conditions_before): Compute stmt and gbb only when needed.
1533 * tree-chrec.c: Fix comments and indentation.
1534 (tree-ssa-loop-niter.c): Same.
1535
1536 2010-06-08 Tobias Grosser <grosser@fim.uni-passau.de>
1537
1538 * refined-regions.c (create_region): Only initialize the region.
1539 (find_regions_with_entry): Initialize parent relation and bbmap
1540 correctly.
1541 (build_regions_tree): Set outermost_region to region instead of
1542 topmost_region.
1543 (calculate_region_tree): Remove unneeded parameters.
1544
1545 2010-06-02 Tobias Grosser <grosser@fim.uni-passau.de>
1546
1547 * graphite-scop-detection.c (is_scop_p): New.
1548 (build_scops_new): New. A skeleton for the new scop detection.
1549 (build_scops_old): Renamed from build_scops.
1550 (build_scops): New version. Call the new and the old scop
1551 detection.
1552
1553 2010-05-27 Tobias Grosser <grosser@fim.uni-passau.de>
1554 Antoniu Pop <antoniu.pop@gmail.com>
1555
1556 * Makefile.in (OBJS-common): Add refined-regions.o.
1557 (refined-regions.o): New.
1558 (graphite-scop-detection.o): Use refined-regions.h.
1559 * graphite-scop-detection.c: Include refined-regions.h
1560 (build_scops): Also build the refined region tree.
1561 * refined-regions.c: New. Adds an algorithm to detect refined
1562 regions.
1563 (print_refined_region): New.
1564 (debug_refined_region): New.
1565 (refined_region_contains_bb_p): New.
1566 (refined_region_contains_region_p): New.
1567 (is_common_df): New.
1568 (struct find_regions_global_data): New.
1569 (is_region): New.
1570 (typedef struct bb_bb_def): New.
1571 (new_bb_bb_def): New.
1572 (bb_bb_map_hash): New.
1573 (eq_bb_bb_map): New.
1574 (find_new_bb): New.
1575 (bb_reg_def): New.
1576 (new_bb_reg_def): New.
1577 (bb_reg_map_hash): New.
1578 (eq_bb_reg_map): New.
1579 (find_new_region): New.
1580 (insert_new_reg): New.
1581 (insert_new_bb): New.
1582 (insert_shortcut): New.
1583 (get_next_postdom): New.
1584 (create_region): New.
1585 (find_regions_with_entry): New.
1586 (find_regions_adc): New.
1587 (find_regions): New.
1588 (get_topmost_parent): New.
1589 (build_regions_tree): New.
1590 (calculate_region_tree): New.
1591 (free_region_tree): New.
1592 * refined-regions.h: New.
1593 (struct refined_region): New.
1594 (calculate_region_tree): New.
1595 (free_region_tree): New.
1596 (refined_region_contains_bb_p): New.
1597 (refined_region_contains_region_p): New.
1598 (print_refined_region): New.
1599 (debug_refined_region): New.
1600
1601 2010-05-26 Sebastian Pop <sebastian.pop@amd.com>
1602
1603 * graphite-clast-to-gimple.c (graphite_create_new_loop_guard): Use
1604 size_one_node.
1605
1606 2010-05-07 Sebastian Pop <sebastian.pop@amd.com>
1607
1608 * graphite-clast-to-gimple.c (graphite_create_new_loop_guard): Fix
1609 type of integer_one_node for fold_build of POINTER_PLUS_EXPR.
1610
1611 2010-05-07 Sebastian Pop <sebastian.pop@amd.com>
1612
1613 * graphite-sese-to-poly.c (loop_entry_phi_arg): Renamed
1614 phi_arg_in_outermost_loop.
1615 (remove_simple_copy_phi): Call phi_arg_in_outermost_loop.
1616 (remove_invariant_phi): Same.
1617
1618 2010-04-12 Andreas Simbuerger <simbuerg@fim.uni-passau.de>
1619
1620 * graphite-blocking.c
1621 (pbb_strip_mine_profitable_p): Replace Value with mpz_t.
1622 * graphite-clast-to-gimple.c
1623 (clast_to_gcc_expression): Same.
1624 (precision_for_value): Same.
1625 (precision_for_interval): Same.
1626 (gcc_type_for_interval): Same.
1627 (graphite_create_new_guard): Same.
1628 (compute_bounds_for_level): Same.
1629 (graphite_create_new_loop_guard): Same.
1630 * graphite-interchange.c
1631 (build_linearized_memory_access): Same.
1632 (pdr_stride_in_loop): Same.
1633 (memory_strides_in_loop_1): Same.
1634 (memory_strides_in_loop): Same.
1635 (extend_scattering): Same.
1636 (psct_scattering_dim_for_loop_depth): Same.
1637 (pbb_number_of_iterations): Same.
1638 * graphite-poly.h
1639 (debug_iteration_domains): Same.
1640 * graphite-ppl.c
1641 (new_Cloog_Domain_from_ppl_Pointset_Powerset): Same.
1642 (ppl_set_inhomogeneous_gmp): Same.
1643 (ppl_strip_loop): Same.
1644 (ppl_lexico_compare_linear_expressions): Same.
1645 (ppl_read_polyhedron_matrix): Same.
1646 (ppl_max_for_le_pointset): Same.
1647 * graphite-ppl.h
1648 (ppl_read_polyhedron_matrix): Same.
1649 (tree_int_to_gmp): Same.
1650 (gmp_cst_to_tree): Same.
1651 (ppl_set_inhomogeneous): Same.
1652 (ppl_set_inhomogeneous_tree): Same.
1653 (ppl_set_coef): Same.
1654 (ppl_set_coef_tree): Same.
1655 * graphite-sese-to-poly.c
1656 (build_pbb_scattering_polyhedrons): Same.
1657 (build_scop_scattering): Same.
1658 (scan_tree_for_params_right_scev): Same.
1659 (scan_tree_for_params): Same.
1660 (find_params_in_bb): Same.
1661 (find_scop_parameters): Same.
1662 (add_upper_bounds_from_estimated_nit): Same.
1663 (build_loop_iteration_domains): Same.
1664 (add_condition_to_domain): Same.
1665 (pdr_add_memory_accesses): Same.
1666
1667 2010-04-11 Andreas Simbuerger <simbuerg@fim.uni-passau.de>
1668
1669 * graphite-blocking.c (pbb_strip_mine_profitable_p): Resolve
1670 CLooG's value_* macros to their respective mpz_* counterparts.
1671 * graphite-clast-to-gimple.c (clast_to_gcc_expression): Same.
1672 (graphite_create_new_loop_guard): Same.
1673 * graphite-interchange.c (build_linearized_memory_access): Same.
1674 (pdr_stride_in_loop): Same.
1675 (memory_strides_in_loop_1): Same.
1676 (1st_interchange_profitable_p): Same.
1677 * graphite-poly.c (extend_scattering): Same.
1678 (psct_scattering_dim_for_loop_depth): Same.
1679 (pbb_number_of_iterations): Same.
1680 (pbb_number_of_iterations_at_time): Same.
1681 * graphite-poly.h (new_1st_loop): Same.
1682 * graphite-ppl.c (cloog_matrix_to_ppl_constraint): Same.
1683 (oppose_constraint): Same.
1684 (insert_constraint_into_matrix): Same.
1685 (ppl_set_inhomogeneous_gmp): Same.
1686 (ppl_set_coef_gmp): Same.
1687 (ppl_strip_loop): Same.
1688 (ppl_lexico_compare_linear_expressions): Same.
1689 (ppl_max_for_le_pointset): Same.
1690 (ppl_min_for_le_pointset): Same.
1691 (ppl_build_realtion): Same.
1692 * graphite-ppl.h (gmp_cst_to_tree): Same.
1693 (ppl_set_inhomogeneous): Same.
1694 (ppl_set_inhomogeneous_tree): Same.
1695 (ppl_set_coef): Same.
1696 (ppl_set_coef_tree): Same.
1697 * graphite-sese-to-poly.c (build_pbb_scattering_polyhedrons): Same.
1698 (build_scop_scattering): Same.
1699 (add_value_to_dim): Same.
1700 (scan_tree_for_params_right_scev): Same.
1701 (scan_tree_for_params_int): Same.
1702 (scan_tree_for_params): Same.
1703 (find_params_in_bb): Same.
1704 (find_scop_parameters): Same.
1705 (add_upper_bounds_from_estimated_nit): Same.
1706 (build_loop_iteration_domains): Same.
1707 (create_linear_expr_from_tree): Same.
1708 (add_condition_to_domain): Same.
1709 (pdr_add_memory_accesses): Same.
1710
1711 2010-04-05 Sebastian Pop <sebastian.pop@amd.com>
1712
1713 PR middle-end/43519
1714 * graphite-clast-to-gimple.c (max_signed_precision_type): Use
1715 lang_hooks.types.type_for_size instead of build_nonstandard_integer_type.
1716 When converting an unsigned type to signed, double its precision.
1717 (gcc_type_for_interval): Use lang_hooks.types.type_for_size.
1718 (gcc_type_for_iv_of_clast_loop): Call max_signed_precision_type.
1719 (graphite_create_new_loop_guard): When ub + 1 wraps around, use lb <= ub.
1720
1721 2010-04-05 Sebastian Pop <sebastian.pop@amd.com>
1722
1723 PR middle-end/43519
1724 * graphite-clast-to-gimple.c (max_signed_precision_type): Use
1725 build_nonstandard_integer_type.
1726 (gcc_type_for_interval): Same.
1727
1728 2010-04-05 Sebastian Pop <sebastian.pop@amd.com>
1729
1730 PR middle-end/43519
1731 * graphite-clast-to-gimple.c (graphite_create_new_loop_guard): Use
1732 POINTER_PLUS_EXPR for pointer types.
1733
1734 * gcc.dg/graphite/id-19.c: New.
1735
1736 2010-04-04 Sebastian Pop <sebastian.pop@amd.com>
1737
1738 PR middle-end/43519
1739 * Makefile.in (graphite-clast-to-gimple.o): Depends on langhooks.h.
1740 * graphite-clast-to-gimple.c: Include langhooks.h.
1741 (max_signed_precision_type): New.
1742 (max_precision_type): Takes two types as arguments.
1743 (precision_for_value): New.
1744 (precision_for_interval): New.
1745 (gcc_type_for_interval): New.
1746 (gcc_type_for_value): New.
1747 (gcc_type_for_clast_term): New.
1748 (gcc_type_for_clast_red): New.
1749 (gcc_type_for_clast_bin): New.
1750 (gcc_type_for_clast_expr): Split up into several functions.
1751 (gcc_type_for_clast_eq): Rewritten.
1752 (compute_bounds_for_level): New.
1753 (compute_type_for_level_1): New.
1754 (compute_type_for_level): New.
1755 (gcc_type_for_cloog_iv): Removed.
1756 (gcc_type_for_iv_of_clast_loop): Rewritten.
1757 (graphite_create_new_loop): Compute the lower and upper bound types
1758 with gcc_type_for_clast_expr.
1759 (graphite_create_new_loop_guard): Same.
1760 (find_cloog_iv_in_expr): Removed.
1761 (compute_cloog_iv_types_1): Removed.
1762 (compute_cloog_iv_types): Removed.
1763 (gloog): Do not call compute_cloog_iv_types.
1764 * graphite-sese-to-poly.c (new_gimple_bb): Do not initialize
1765 GBB_CLOOG_IV_TYPES.
1766 (free_data_refs_aux): Do not free GBB_CLOOG_IV_TYPES.
1767 * sese.h (struct gimple_bb): Removed field cloog_iv_types.
1768 (GBB_CLOOG_IV_TYPES): Removed.
1769
1770 * gcc.dg/graphite/run-id-pr42644.c: Call abort.
1771
1772 2010-04-02 Sebastian Pop <sebastian.pop@amd.com>
1773
1774 Reverted this commit: as at this point the loop closed SSA form
1775 is under a canonical form respecting the single argument condition.
1776 * graphite-sese-to-poly.c (scalar_close_phi_node_p): Loop
1777 close phi nodes may have more than one argument.
1778
1779 2010-04-01 Sebastian Pop <sebastian.pop@amd.com>
1780
1781 * graphite-sese-to-poly.c (rewrite_close_phi_out_of_ssa): Assert that
1782 gimple_phi_num_args of the loop close SSA phi node is equal to 1.
1783 (detect_commutative_reduction): Same.
1784
1785 2010-03-31 Sebastian Pop <sebastian.pop@amd.com>
1786
1787 * graphite-sese-to-poly.c (scalar_close_phi_node_p): Loop
1788 close phi nodes may have more than one argument.
1789
1790 2010-03-30 Richard Guenther <rguenther@suse.de>
1791 Zdenek Dvorak <ook@ucw.cz>
1792 Sebastian Pop <sebastian.pop@amd.com>
1793
1794 PR middle-end/43464
1795 * tree-ssa-copy.c (init_copy_prop): Handle loop close phi nodes
1796 with multiple arguments.
1797 (execute_copy_prop): Remove call to rewrite_into_loop_closed_ssa.
1798
1799 2010-03-23 Sebastian Pop <sebastian.pop@amd.com>
1800
1801 * graphite-dependences.c (print_pddr): Call print_pdr with an
1802 extra argument.
1803 * graphite-poly.c (debug_pdr): Add an extra argument for the
1804 verbosity level.
1805 (print_pdr): Same.
1806 (print_pbb_domain): Same.
1807 (print_pbb): Same.
1808 (print_scop_context): Same.
1809 (print_scop): Same.
1810 (print_cloog): Same.
1811 (debug_pbb_domain): Same.
1812 (debug_pbb): Same.
1813 (print_pdrs): Same.
1814 (debug_pdrs): Same.
1815 (debug_scop_context): Same.
1816 (debug_scop): Same.
1817 (debug_cloog): Same.
1818 (print_scop_params): Same.
1819 (debug_scop_params): Same.
1820 (print_iteration_domain): Same.
1821 (print_iteration_domains): Same.
1822 (debug_iteration_domain): Same.
1823 (debug_iteration_domains): Same.
1824 (print_scattering_function): Same.
1825 (print_scattering_functions): Same.
1826 (debug_scattering_function): Same.
1827 (debug_scattering_functions): Same.
1828 * graphite-poly.h (debug_pdr): Update declaration.
1829 (print_pdr): Same.
1830 (print_pbb_domain): Same.
1831 (print_pbb): Same.
1832 (print_scop_context): Same.
1833 (print_scop): Same.
1834 (print_cloog): Same.
1835 (debug_pbb_domain): Same.
1836 (debug_pbb): Same.
1837 (print_pdrs): Same.
1838 (debug_pdrs): Same.
1839 (debug_scop_context): Same.
1840 (debug_scop): Same.
1841 (debug_cloog): Same.
1842 (print_scop_params): Same.
1843 (debug_scop_params): Same.
1844 (print_iteration_domain): Same.
1845 (print_iteration_domains): Same.
1846 (debug_iteration_domain): Same.
1847 (debug_iteration_domains): Same.
1848 (print_scattering_function): Same.
1849 (print_scattering_functions): Same.
1850 (debug_scattering_function): Same.
1851 (debug_scattering_functions): Same.
1852
1853 2010-03-23 Sebastian Pop <sebastian.pop@amd.com>
1854
1855 * graphite-poly.c (print_scattering_function_1): New.
1856 (print_scattering_function): Call it.
1857 (print_scop_params): Remove spaces at the end of lines.
1858 (print_cloog): New.
1859 (debug_cloog): New.
1860 * graphite-poly.h (print_cloog): Declared.
1861 (debug_cloog): Declared.
1862
1863 2010-03-23 Sebastian Pop <sebastian.pop@amd.com>
1864
1865 * tree-ssa-copy.c: Revert this previous change:
1866 (init_copy_prop): Loop closed phi nodes cancontain more than one
1867 argument.
1868 (execute_copy_prop): Revert the previous change: do not call
1869 rewrite_into_loop_closed_ssa.
1870
1871 2010-03-21 Sebastian Pop <sebastian.pop@amd.com>
1872 Richard Guenther <rguenther@suse.de>
1873
1874 PR middle-end/43464
1875 * tree-ssa-copy.c (init_copy_prop): Loop closed phi nodes can
1876 contain more than one argument.
1877 (execute_copy_prop): Revert the previous change: do not call
1878 rewrite_into_loop_closed_ssa.
1879
1880 * gcc.dg/graphite/id-pr43464.c: Remove compile warning.
1881 * gcc.dg/graphite/id-pr43464-1.c: New.
1882
1883 2010-03-21 Sebastian Pop <sebastian.pop@amd.com>
1884
1885 PR middle-end/43464
1886 * tree-ssa-copy.c (execute_copy_prop): Call rewrite_into_loop_closed_ssa
1887 and verify_loop_closed_ssa when copy prop is executed in the LNO.
1888
1889 * gcc.dg/graphite/id-pr43464.c: New.
1890
1891 2010-03-16 Sebastian Pop <sebastian.pop@amd.com>
1892
1893 * graphite-sese-to-poly.c (graphite_loop_normal_form): Add the IV bump
1894 in loop->header.
1895 * tree-flow.h (canonicalize_loop_ivs): Updated declaration.
1896 * tree-parloops.c (gen_parallel_loop): Add the IV bump in loop->latch.
1897 * tree-ssa-loop-manip.c (canonicalize_loop_ivs): Add a new parameter
1898 to switch between adding the IV bump in loop->latch or in loop->header.
1899
1900 2010-03-16 Sebastian Pop <sebastian.pop@amd.com>
1901
1902 * passes.c (init_optimization_passes): Add pass_copy_prop
1903 after Graphite.
1904
1905 2010-03-16 Sebastian Pop <sebastian.pop@amd.com>
1906
1907 * graphite-poly.c (print_scattering_function): Pretty print following
1908 the scoplib format.
1909 (print_pdr): Same.
1910 (print_pbb_domain): Same.
1911 (dump_gbb_cases): Same.
1912 (dump_gbb_conditions): Same.
1913 (print_pdrs): Same.
1914 (print_pbb): Same.
1915 (print_scop_params): Same.
1916 (print_scop_context): Same.
1917 (print_scop): Same.
1918 (print_pbb_body): New.
1919 (lst_indent_to): New.
1920 (print_lst): Start new lines with a #.
1921 * graphite-poly.h (pbb_bb): New.
1922 (pbb_index): Use pbb_bb.
1923 * graphite-ppl.c (ppl_print_powerset_matrix): Print the number of
1924 disjuncts.
1925 * tree-data-ref.c (dump_data_reference): Start new lines with a #.
1926
1927 2010-03-13 Sebastian Pop <sebastian.pop@amd.com>
1928
1929 PR middle-end/43351
1930 * gcc.dg/graphite/id-pr43351.c
1931
1932 2010-03-13 Sebastian Pop <sebastian.pop@amd.com>
1933
1934 PR middle-end/43354
1935 * graphite-sese-to-poly.c (rewrite_close_phi_out_of_ssa): Do not
1936 call insert_out_of_ssa_copy for default definitions.
1937 * gfortran.dg/graphite/id-pr43354.f: New.
1938
1939 2010-03-13 Sebastian Pop <sebastian.pop@amd.com>
1940
1941 PR middle-end/43349
1942 * gfortran.dg/graphite/pr43349.f: New.
1943
1944 2010-03-11 Sebastian Pop <sebastian.pop@amd.com>
1945
1946 * graphite-clast-to-gimple.c (my_long_long): Defined.
1947 (gcc_type_for_cloog_iv): Use it instead of long_long_integer_type_node.
1948 * graphite-sese-to-poly.c (my_long_long): Defined.
1949 (scop_ivs_can_be_represented): Use it.
1950
1951 2010-03-10 Sebastian Pop <sebastian.pop@amd.com>
1952
1953 * doc/invoke.texi: Fix documentation of graphite-max-nb-scop-params,
1954 graphite-max-bbs-per-function, and loop-block-tile-size.
1955 * params.def (PARAM_GRAPHITE_MAX_NB_SCOP_PARAMS): Replace "maximal"
1956 with "maximum".
1957 (PARAM_GRAPHITE_MAX_BBS_PER_FUNCTION): Same.
1958
1959 2010-03-10 Sebastian Pop <sebastian.pop@amd.com>
1960
1961 * graphite-clast-to-gimple.c (gcc_type_for_iv_of_clast_loop): Remove
1962 forward declaration.
1963 * graphite-sese-to-poly.c (reduction_phi_p): Remove FIXME comment.
1964 (add_upper_bounds_from_estimated_nit): New.
1965 (build_loop_iteration_domains): Use it.
1966
1967 2010-03-09 Sebastian Pop <sebastian.pop@amd.com>
1968
1969 * doc/invoke.texi (PARAM_LOOP_BLOCK_TILE_SIZE): Document.
1970
1971 2010-03-09 Sebastian Pop <sebastian.pop@amd.com>
1972
1973 PR middle-end/43306
1974 * tree-chrec.c (evolution_function_right_is_integer_cst): CHREC_RIGHT
1975 should be an INTEGER_CST. Also handle CASE_CONVERT.
1976 * gcc.dg/graphite/pr43306.c: New.
1977
1978 2010-03-09 Sebastian Pop <sebastian.pop@amd.com>
1979
1980 * graphite.c (graphite_initialize): To bound the number of bbs per
1981 function, use PARAM_GRAPHITE_MAX_BBS_PER_FUNCTION.
1982 * params.def (PARAM_GRAPHITE_MAX_BBS_PER_FUNCTION): Declared.
1983 * doc/invoke.texi: Document it.
1984
1985 2010-03-09 Sebastian Pop <sebastian.pop@amd.com>
1986
1987 * graphite-sese-to-poly.c (build_poly_scop): Do not return bool.
1988 * graphite-sese-to-poly.h (build_poly_scop): Same.
1989
1990 2010-03-09 Sebastian Pop <sebastian.pop@amd.com>
1991
1992 * graphite-sese-to-poly.c (build_poly_scop): Limit scops following
1993 the number of parameters in the scop. Use as an upper bound
1994 PARAM_GRAPHITE_MAX_NB_SCOP_PARAMS.
1995 * params.def (PARAM_GRAPHITE_MAX_NB_SCOP_PARAMS): Declared.
1996 * doc/invoke.texi: Document it.
1997
1998 2010-03-05 Sebastian Pop <sebastian.pop@amd.com>
1999
2000 * graphite-sese-to-poly.c (add_param_constraints): Use
2001 lower_bound_in_type and upper_bound_in_type.
2002
2003 2010-03-05 Sebastian Pop <sebastian.pop@amd.com>
2004
2005 * graphite-sese-to-poly.c (add_param_constraints): Use sizetype
2006 instead of unsigned_type_node.
2007
2008 2010-03-05 Sebastian Pop <sebastian.pop@amd.com>
2009 Reza Yazdani <reza.yazdani@amd.com>
2010
2011 PR middle-end/43065
2012 * graphite-sese-to-poly.c (add_param_constraints): Insert bounds
2013 on pointer type parameters.
2014
2015 * gcc.dg/graphite/run-id-4.c: New.
2016
2017 2010-03-05 Sebastian Pop <sebastian.pop@amd.com>
2018
2019 PR middle-end/43065
2020 * gcc.dg/graphite/run-id-3.c: New.
2021
2022 2010-03-05 Tobias Grosser <grosser@fim.uni-passau.de>
2023 Ramakrishna Upadrasta <Ramakrishna.Upadrasta@inria.fr>
2024
2025 * graphite-clast-to-gimple.c (clast_to_gcc_expression): Also
2026 handle conversions from pointer to integers.
2027 (gcc_type_for_cloog_iv): Choose the smalles signed integer as an
2028 induction variable, to be able to work with code generated by CLooG.
2029 * graphite-sese-to-poly.c (scop_ivs_can_be_represented): New.
2030 (build_poly_scop): Bail out if we cannot codegen a loop.
2031
2032 2010-03-04 Tobias Grosser <grosser@fim.uni-passau.de>
2033
2034 * graphite-clast-to-gimple.c (translate_clast): Do not short-cut
2035 code generation with gloog_error.
2036
2037 2010-03-04 Sebastian Pop <sebastian.pop@amd.com>
2038
2039 * sese.c (expand_scalar_variables_ssa_name): Add new argument for type.
2040 Call fold_convert on all the returned values.
2041 (expand_scalar_variables_expr): Pass to expand_scalar_variables_ssa_name
2042 the type of the resulting expression.
2043
2044 2010-03-04 Sebastian Pop <sebastian.pop@amd.com>
2045
2046 * graphite-ppl.c (ppl_min_for_le_polyhedron): Renamed
2047 ppl_min_for_le_pointset. Use ppl_Pointset_Powerset_C_Polyhedron_minimize.
2048 * graphite-ppl.h (ppl_min_for_le_polyhedron): Update declaration.
2049
2050 2010-03-04 Sebastian Pop <sebastian.pop@amd.com>
2051
2052 * graphite-dependences.c (map_into_dep_poly): Removed.
2053 (dependence_polyhedron_1): Use combine_context_id_scat.
2054
2055 2010-03-04 Sebastian Pop <sebastian.pop@amd.com>
2056
2057 * graphite-poly.h (struct poly_scattering): Add layout documentation.
2058 (struct poly_bb): Same.
2059 (combine_context_id_scat): New.
2060
2061 2010-03-02 Sebastian Pop <sebastian.pop@amd.com>
2062
2063 PR middle-end/42326
2064 * sese.c (name_defined_in_loop_p): Return false for default
2065 definitions.
2066
2067 * gcc.dg/graphite/pr42326.c: New.
2068
2069 2010-02-23 Sebastian Pop <sebastian.pop@amd.com>
2070
2071 * graphite-clast-to-gimple.c (find_cloog_iv_in_expr): Simplify
2072 and clean up the logic.
2073
2074 2010-02-23 Sebastian Pop <sebastian.pop@amd.com>
2075
2076 * graphite-sese-to-poly.c (add_param_constraints): Enabled: remove
2077 early return.
2078
2079 2010-02-22 Sebastian Pop <sebastian.pop@amd.com>
2080
2081 PR middle-end/43083
2082 * graphite-scop-detection.c (create_single_exit_edge): Move
2083 the call to find_single_exit_edge to....
2084 (create_sese_edges): ...here. Don't handle multiple edges
2085 exiting the function.
2086 (build_graphite_scops): Don't handle multiple edges
2087 exiting the function.
2088
2089 * gcc.dg/graphite/pr43083.c: New.
2090
2091 2010-02-22 Sebastian Pop <sebastian.pop@amd.com>
2092
2093 PR middle-end/43097
2094 * sese.c (get_rename): Assert that old_name is an SSA_NAME.
2095 (rename_variables_in_stmt): Continue when the use is not an SSA_NAME.
2096
2097 * gfortran.dg/graphite/pr43097.f: New.
2098
2099 2010-02-22 Sebastian Pop <sebastian.pop@amd.com>
2100 Manuel López-Ibáñez <manu@gcc.gnu.org>
2101
2102 PR middle-end/43140
2103 * g++.dg/graphite/pr41305.C: Add -Wno-conversion-null.
2104
2105 2010-02-22 Sebastian Pop <sebastian.pop@amd.com>
2106
2107 PR middle-end/43026
2108 * sese.c (expand_scalar_variables_expr): Handle COMPONENT_REF.
2109
2110 * g++.dg/graphite/pr43026.C: New.
2111
2112 2010-02-13 Tobias Grosser <grosser@fim.uni-passau.de>
2113
2114 * Merge from mainline (154736:156693).
2115
2116 2010-02-11 Sebastian Pop <sebastian.pop@amd.com>
2117
2118 PR middle-end/43012
2119 * gcc.dg/graphite/pr43012.c: New.
2120
2121 2010-02-10 Sebastian Pop <sebastian.pop@amd.com>
2122
2123 * graphite.c (graphite_transform_loops): Re-enable dbg_cnt.
2124 2010-02-10 Sebastian Pop <sebastian.pop@amd.com>
2125
2126 * g++.dg/graphite/pr42930.C: New.
2127
2128 2010-02-10 Sebastian Pop <sebastian.pop@amd.com>
2129
2130 PR middle-end/42930
2131 * graphite-scop-detection.c (graphite_can_represent_scev): Call
2132 graphite_can_represent_init for MULT_EXPR.
2133
2134 2010-02-10 Sebastian Pop <sebastian.pop@amd.com>
2135
2136 PR middle-end/42914
2137 PR middle-end/42530
2138 * graphite-sese-to-poly.c (remove_phi): New.
2139 (translate_scalar_reduction_to_array): Call remove_phi.
2140
2141 * gcc.dg/graphite/pr42530.c: New.
2142 * gcc.dg/graphite/pr42914.c: New.
2143
2144 2010-02-10 Sebastian Pop <sebastian.pop@amd.com>
2145
2146 PR middle-end/42771
2147 * graphite-clast-to-gimple.c (gloog): Call rename_sese_parameters.
2148 * graphite-clast-to-gimple.h (gloog): Update declaration.
2149 * graphite-poly.c (new_scop): Clear POLY_SCOP_P.
2150 * graphite-poly.h (struct poly_bb): Add missing comments.
2151 (struct scop): Add poly_scop_p field.
2152 (POLY_SCOP_P): New.
2153 * graphite-sese-to-poly.c (build_poly_scop): Set POLY_SCOP_P.
2154 * graphite.c (graphite_transform_loops): Build the polyhedral
2155 representation for each scop before code generation.
2156 * sese.c (rename_variables_in_operand): Removed.
2157 (rename_variables_in_expr): Return the renamed expression.
2158 (rename_sese_parameters): New.
2159 * sese.h (rename_sese_parameters): Declared.
2160
2161 * gcc.dg/graphite/pr42771.c: New.
2162
2163 2010-02-07 Sebastian Pop <sebastian.pop@amd.com>
2164
2165 * gcc.dg/graphite/block-0.c: Call abort for runtime test. Always
2166 return 0 from main.
2167 * gcc.dg/graphite/block-1.c: Same.
2168 * gcc.dg/graphite/block-3.c: Same.
2169 * gcc.dg/graphite/block-4.c: Same.
2170 * gcc.dg/graphite/block-5.c: Same.
2171 * gcc.dg/graphite/block-6.c: Same.
2172 * gcc.dg/graphite/block-7.c: Same.
2173 * gcc.dg/graphite/interchange-0.c: Same.
2174 * gcc.dg/graphite/interchange-1.c: Same.
2175 * gcc.dg/graphite/interchange-10.c: Same.
2176 * gcc.dg/graphite/interchange-11.c: Same.
2177 * gcc.dg/graphite/interchange-12.c: Same.
2178 * gcc.dg/graphite/interchange-2.c: Same.
2179 * gcc.dg/graphite/interchange-3.c: Same.
2180 * gcc.dg/graphite/interchange-4.c: Same.
2181 * gcc.dg/graphite/interchange-5.c: Same.
2182 * gcc.dg/graphite/interchange-6.c: Same.
2183 * gcc.dg/graphite/interchange-7.c: Same.
2184 * gcc.dg/graphite/interchange-8.c: Same.
2185 * gcc.dg/graphite/interchange-9.c: Same.
2186 * gcc.dg/graphite/interchange-mvt.c: Same.
2187
2188 2010-02-07 Sebastian Pop <sebastian.pop@amd.com>
2189
2190 * gfortran.dg/graphite/id-19.f: New.
2191 * gfortran.dg/graphite/pr14741.f90: New.
2192 * gfortran.dg/graphite/pr41924.f90: New.
2193 * gfortran.dg/graphite/run-id-2.f90: New.
2194
2195 2010-02-07 Sebastian Pop <sebastian.pop@amd.com>
2196
2197 PR middle-end/42988
2198 * graphite-dependences.c (dependence_polyhedron): Set PDDR_KIND
2199 to unknown_dependence.
2200 (graphite_legal_transform_dr): Handle the unknown_dependence.
2201 (graphite_carried_dependence_level_k): Same.
2202
2203 2010-02-07 Sebastian Pop <sebastian.pop@amd.com>
2204
2205 * ChangeLog.graphite: Remove testsuite/ or gcc/testsuite/.
2206
2207 2010-02-05 Sebastian Pop <sebastian.pop@amd.com>
2208 Konrad Trifunovic <konrad.trifunovic@inria.fr>
2209
2210 PR middle-end/42637
2211 * graphite-dependences.c (build_lexicographical_constraint): Return
2212 a union of dependence polyhedra.
2213 (dependence_polyhedron_1): Adapt for build_lexicographical_constraint.
2214
2215 * gcc.dg/graphite/block-0.c: Enable runtime check. XFAILed.
2216 * gcc.dg/graphite/block-4.c: Same.
2217 * gcc.dg/graphite/block-7.c: Same.
2218 * gcc.dg/graphite/interchange-12.c: Same.
2219 * gcc.dg/graphite/interchange-mvt.c: Same.
2220 * gfortran.dg/graphite/interchange-1.f: XFAILed.
2221 * gfortran.dg/graphite/interchange-3.f90: XFAILed.
2222 * gfortran.dg/graphite/run-id-1.f: New testcase for PR42637.
2223
2224 2010-02-03 Sebastian Pop <sebastian.pop@amd.com>
2225
2226 * gcc.dg/graphite/interchange-12.c: Return 0 to avoid
2227 the execution check to FAIL. This testcase is miscompiled by Graphite
2228 and the check should be re-enabled.
2229 * gcc.dg/graphite/interchange-mvt.c: Same.
2230 * gcc.dg/graphite/block-0.c: Same.
2231 * gcc.dg/graphite/block-4.c: Same.
2232 * gcc.dg/graphite/block-7.c: Same.
2233
2234 2010-02-03 Sebastian Pop <sebastian.pop@amd.com>
2235
2236 * gcc.dg/graphite/interchange-mvt.c: Un-XFAILed.
2237 * gcc.dg/graphite/scop-0.c: Fix spaces.
2238 * gfortran.dg/graphite/block-1.f90: Rewrite expected output.
2239 * gfortran.dg/graphite/block-2.f: Same.
2240 * gfortran.dg/graphite/block-3.f90: Same.
2241 * gfortran.dg/graphite/block-4.f90: Same.
2242 * gfortran.dg/graphite/interchange-1.f: Un-XFAILed.
2243 * gfortran.dg/graphite/interchange-3.f90: Un-XFAILed.
2244
2245 2010-02-03 Sebastian Pop <sebastian.pop@amd.com>
2246
2247 * graphite-dependences.c (new_poly_ddr): Initialize PDDR_KIND and
2248 PDDR_ORIGINAL_SCATTERING_P.
2249 (pddr_is_empty): Rewritten.
2250 (print_dependence_polyhedron_layout): New.
2251 (print_pddr): New.
2252 (debug_pddr): New.
2253 (build_alias_set_powerset): Moved up.
2254 (poly_drs_may_alias_p): Moved up.
2255 (lexicographically_gt_p): Removed.
2256 (build_lexicographically_gt_constraint): Renamed
2257 build_lexicographical_constraint, reimplemented.
2258 (dependence_polyhedron_1): Simplified parameters.
2259 (dependence_polyhedron): Same. Keep along empty PDDRs
2260 to make efficient use of the cache.
2261 (reduction_dr_p): Compute the PBBs don't pass them as parameters.
2262 (graphite_legal_transform_dr): Rewritten.
2263 (graphite_legal_transform_bb): Pass fewer arguments to
2264 graphite_legal_transform_dr.
2265 (graphite_carried_dependence_level_k): Simplified implementation.
2266 (dot_original_deps_stmt_1): Call dependence_polyhedron.
2267 (dot_transformed_deps_stmt_1): Same.
2268 (dot_original_deps): Same.
2269 (dot_transformed_deps): Same.
2270 * graphite-dependences.h (struct poly_ddr): Added a new field
2271 original_scattering_p.
2272 (PDDR_ORIGINAL_SCATTERING_P): New.
2273 (print_pddr): Declared.
2274 (debug_pddr): Declared.
2275 * graphite-ppl.c: Clarify comment.
2276 * sese.h (print_gimple_bb): Removed unused declaration.
2277 (debug_gbb): Same.
2278
2279 2010-02-03 Sebastian Pop <sebastian.pop@amd.com>
2280
2281 * g++.dg/graphite/graphite.exp: Rewritten.
2282 * gcc.dg/graphite/graphite.exp: Rewritten.
2283 * gfortran.dg/graphite/graphite.exp: Rewritten.
2284 * gcc.dg/graphite/block-0.c: Added runtime test.
2285 * gcc.dg/graphite/block-1.c: Same.
2286 * gcc.dg/graphite/block-3.c: Same.
2287 * gcc.dg/graphite/block-4.c: Same.
2288 * gcc.dg/graphite/block-5.c: Same.
2289 * gcc.dg/graphite/block-6.c: Same.
2290 * gcc.dg/graphite/block-7.c: Same.
2291 * gcc.dg/graphite/interchange-0.c: Same.
2292 * gcc.dg/graphite/interchange-1.c: Same.
2293 * gcc.dg/graphite/interchange-10.c: Same.
2294 * gcc.dg/graphite/interchange-11.c: Same.
2295 * gcc.dg/graphite/interchange-12.c: Same.
2296 * gcc.dg/graphite/interchange-2.c: Same.
2297 * gcc.dg/graphite/interchange-3.c: Same.
2298 * gcc.dg/graphite/interchange-4.c: Same.
2299 * gcc.dg/graphite/interchange-5.c: Same.
2300 * gcc.dg/graphite/interchange-6.c: Same.
2301 * gcc.dg/graphite/interchange-7.c: Same.
2302 * gcc.dg/graphite/interchange-8.c: Same.
2303 * gcc.dg/graphite/interchange-9.c: Same.
2304 * gcc.dg/graphite/interchange-mvt.c: Same.
2305 * gcc.dg/graphite/run-id-2.c: Remove useless dg-do run.
2306
2307 2010-01-22 Ramakrishna Upadrasta <Ramakrishna.Upadrasta@inria.fr>
2308
2309 * graphite-scop-detection.c (dot_all_scops): Make calls to dot run in
2310 background.
2311
2312 2010-01-22 Ramakrishna Upadrasta <Ramakrishna.Upadrasta@inria.fr>
2313
2314 * common.opt: Add -fgraphite-cloog-opts.
2315 * graphite-clast-to-gimple.c (set_cloog_options): Same.
2316 * opts.c (decode_options): Same.
2317
2318 2010-01-20 Sebastian Pop <sebastian.pop@amd.com>
2319
2320 * gcc.dg/graphite/id-17.c: New.
2321 * gcc.dg/graphite/pr41888.c: New.
2322 * gcc.dg/graphite/scop-22.c: New.
2323 * gfortran.dg/graphite/pr40982.f90: New.
2324
2325 2010-01-20 Sebastian Pop <sebastian.pop@amd.com>
2326
2327 * graphite-dependences.c: Clarify comments.
2328 (build_pddr): Add an extra parameter direction.
2329 (graphite_legal_transform_dr): Use build_pddr.
2330 (dot_original_deps_stmt_1): Update use of build_pddr.
2331 (dot_transformed_deps_stmt_1): Same.
2332 (dot_original_deps): Same.
2333 (dot_transformed_deps): Same.
2334
2335 * gcc.dg/graphite/interchange-12.c: New.
2336 * gcc.dg/graphite/block-7.c: New.
2337
2338 2010-01-20 Sebastian Pop <sebastian.pop@amd.com>
2339
2340 * graphite-dependences.c (pddr_original_scattering): Renamed build_pddr.
2341 (pddr_transformed_scattering): Removed.
2342 (graphite_legal_transform_dr): Use build_pddr.
2343 (dot_original_deps_stmt_1): Same.
2344 (dot_transformed_deps_stmt_1): Same.
2345 (dot_original_deps): Same.
2346 (dot_transformed_deps): Same.
2347
2348 2010-01-20 Sebastian Pop <sebastian.pop@amd.com>
2349
2350 * graphite-dependences.c (lexicographically_gt_p): Add comments.
2351 (build_lexicographically_gt_constraint): Same.
2352 (dependence_polyhedron_1): Same.
2353 (dependence_polyhedron): Same.
2354
2355 2010-01-20 Sebastian Pop <sebastian.pop@amd.com>
2356
2357 * graphite-dependences.c (build_pairwise_scheduling_equality): Removed.
2358 (build_pairwise_scheduling_inequality): Renamed build_pairwise_scheduling.
2359 (lexicographically_gt_p): Change type of direction to int.
2360 (build_lexicographically_gt_constraint): Same.
2361 (dependence_polyhedron_1): Same.
2362 (dependence_polyhedron): Same.
2363 (pddr_original_scattering): Use integers for direction.
2364 (pddr_transformed_scattering): Same.
2365 (graphite_legal_transform_dr): Same.
2366 (graphite_carried_dependence_level_k): Same.
2367
2368 2010-01-20 Sebastian Pop <sebastian.pop@amd.com>
2369
2370 * graphite-dependences.c (build_pairwise_constraint): Renamed
2371 ppl_build_relation. Moved...
2372 (dr_equality_constraints): Use ppl_build_relation.
2373 (build_pairwise_scheduling_equality): Same.
2374 (build_pairwise_scheduling_inequality): Same.
2375 * graphite-ppl.c (ppl_build_relation): ...here.
2376 * graphite-ppl.h (ppl_build_relation): Declared.
2377
2378 2010-01-14 Sebastian Pop <sebastian.pop@amd.com>
2379
2380 PR middle-end/42681
2381 * graphite-clast-to-gimple.c (gloog_error): New static variable.
2382 (clast_to_gcc_expression): Do not build MULT_EXPR of POINTER_TYPE_P.
2383 Set gloog_error when such an expression failed to be built.
2384 (translate_clast): Early return when gloog_error is set.
2385 (gloog): Clear gloog_error. When gloog_error is set, call
2386 set_ifsese_condition to enable the original code. Return the status
2387 of the code generation based on gloog_error.
2388 * sese.c (set_ifsese_condition): New.
2389 * sese.h (set_ifsese_condition): Declared.
2390
2391 * g++.dg/graphite/pr42681.C: New.
2392
2393 2010-01-14 Sebastian Pop <sebastian.pop@amd.com>
2394
2395 PR middle-end/42732
2396 * graphite-clast-to-gimple.c (gloog): Call scev_reset_htab and
2397 rename_nb_iterations.
2398 * sese.c (rename_variables_in_operand): New.
2399 (rename_variables_in_expr): New.
2400 (rename_nb_iterations): New.
2401 (sese_adjust_liveout_phis): Update the rename_map.
2402 * sese.h (rename_nb_iterations): Declared.
2403 * tree-scalar-evolution.c (scev_reset_htab): New.
2404 (scev_reset): Call scev_reset_htab.
2405 * tree-scalar-evolution.h (scev_reset_htab): Declared.
2406
2407 * gfortran.dg/graphite/pr42732.f: New.
2408
2409 2010-01-08 Sebastian Pop <sebastian.pop@amd.com>
2410
2411 PR middle-end/42393
2412 * graphite-clast-to-gimple.c: Fix formatting.
2413 * sese.c (defined_in_loop_p): Renamed name_defined_in_loop_p.
2414 (expr_defined_in_loop_p): New.
2415 (add_loop_exit_phis): Also handle full expressions: remove from
2416 the rename_map the expressions defined in the loop that we're closing.
2417
2418 * gfortran.dg/graphite/pr42393-1.f90: New.
2419 * gfortran.dg/graphite/pr42393.f90: Add new flags
2420 -fno-loop-block -fno-loop-interchange -fno-loop-strip-mine to also
2421 make this testcase useful in the Graphite branch.
2422
2423 2010-01-08 Sebastian Pop <sebastian.pop@amd.com>
2424
2425 * graphite-scop-detection.c (exclude_component_ref): Removed.
2426 (is_simple_operand): Removed.
2427 (stmt_simple_for_scop_p): Remove use of is_simple_operand.
2428
2429 2010-01-07 Sebastian Pop <sebastian.pop@amd.com>
2430
2431 PR middle-end/42221
2432 * sese.c (expand_scalar_variables_expr): Follow the SSA links into
2433 the array indexing of ADDR_EXPRs.
2434
2435 * gcc.dg/graphite/pr42221.c: New.
2436
2437 2010-01-07 Sebastian Pop <sebastian.pop@amd.com>
2438
2439 PR middle-end/42521
2440 * graphite.c (graphite_finalize): Call scev_reset.
2441 (graphite_transform_loops): Do not call scev_reset between the code
2442 generation of scops.
2443
2444 * gcc.dg/graphite/pr42521.c: New.
2445
2446 2010-01-07 Sebastian Pop <sebastian.pop@amd.com>
2447
2448 * graphite-interchange.c (memory_stride_in_loop): Renamed
2449 pdr_stride_in_loop.
2450 (memory_strides_in_loop): Renamed memory_strides_in_loop_1.
2451 (memory_strides_in_loop): Memoize the memory strides per loop.
2452 (lst_interchange_profitable_p): Do not initialize to zero the memory
2453 strides.
2454 * graphite-poly.h (struct lst): Add a field memory_strides.
2455 (LST_LOOP_MEMORY_STRIDES): New.
2456 (new_lst_loop): Initialize LST_LOOP_MEMORY_STRIDES to -1.
2457 (free_lst): Clear LST_LOOP_MEMORY_STRIDES.
2458
2459 2010-01-07 Sebastian Pop <sebastian.pop@amd.com>
2460
2461 * graphite-interchange.c (memory_strides_in_loop_depth): Renamed
2462 memory_strides_in_loop. Gather memory strides on a whole loop.
2463 (pbb_interchange_profitable_p): Renamed lst_interchange_profitable_p.
2464 (lst_interchange_profitable_p): Removed.
2465 (lst_try_interchange_loops): Call lst_interchange_profitable_p.
2466
2467 2010-01-07 Sebastian Pop <sebastian.pop@amd.com>
2468
2469 Revert patch 2009-11-23 Tobias Grosser <grosser@fim.uni-passau.de>
2470 * graphite-clast-to-gimple.c (try_mark_loop_parallel): New.
2471 (translate_clast_for, translate_clast_guard, translate_clast, gloog):
2472 Remove context_loop and level.
2473
2474 2010-01-07 Richard Guenther <rguenther@suse.de>
2475
2476 PR tree-optimization/42641
2477 * sese.c (rename_map_elt_info): Use the SSA name version, do
2478 not hash pointers.
2479
2480 2010-01-06 Sebastian Pop <sebastian.pop@amd.com>
2481
2482 * graphite-blocking.c (scop_do_block): Print "SCoP will be loop
2483 blocked" only when both the strip mine and the interchange have
2484 been applied.
2485
2486 * gcc.dg/graphite/block-2.c: Removed.
2487 * gcc.dg/graphite/block-3.c: Add scan pattern.
2488 * gcc.dg/graphite/block-4.c: Same.
2489 * gcc.dg/graphite/block-5.c: Same.
2490 * gcc.dg/graphite/block-6.c: Same.
2491
2492 2010-01-06 Sebastian Pop <sebastian.pop@amd.com>
2493
2494 * graphite-clast-to-gimple.c (save_clast_name_index): Free slot
2495 before allocating a new one.
2496 (copy_renames): Check that slot is not NULL.
2497 (mark_bb_with_pbb): Same.
2498 (compute_cloog_iv_types_1): Same.
2499 * graphite-interchange.c (lst_perfect_nestify): Free the before,
2500 nest, and after LSTs.
2501 (lst_try_interchange_loops): Same.
2502
2503 2010-01-05 Sebastian Pop <sebastian.pop@amd.com>
2504
2505 PR middle-end/42178
2506 * graphite-interchange.c (lst_try_interchange_loops): Do not return
2507 the before, nest, and after LSTs.
2508 (lst_try_interchange): Removed.
2509 (lst_interchange_select_inner): Do not iterate over the LSTs if they
2510 were modified.
2511 (lst_interchange_select_outer): Apply interchange on the outer loop
2512 until there are no more changes in the inner loops.
2513
2514 2009-12-18 Sebastian Pop <sebastian.pop@amd.com>
2515
2516 Revert patch fixing PR middle-end/42221.
2517
2518 2009-12-18 Sebastian Pop <sebastian.pop@amd.com>
2519
2520 PR middle-end/42180
2521 * graphite-sese-to-poly.c (follow_ssa_with_commutative_ops): Handle
2522 GIMPLE_CALL.
2523
2524 * gfortran.dg/graphite/pr42180.f90: Add compile flags.
2525
2526 2009-12-18 Sebastian Pop <sebastian.pop@amd.com>
2527
2528 PR middle-end/42180
2529 * graphite-sese-to-poly.c (split_reduction_stmt): Do not split blocks
2530 that contain only one statement.
2531
2532 * gfortran.dg/graphite/pr42180.f90: New.
2533
2534 2009-12-17 Sebastian Pop <sebastian.pop@amd.com>
2535
2536 PR middle-end/42393
2537 * gfortran.dg/graphite/pr42393.f90: New.
2538
2539 2009-12-17 Sebastian Pop <sebastian.pop@amd.com>
2540
2541 PR middle-end/42186
2542 * gfortran.dg/graphite/pr42186.f90: New.
2543
2544 2009-12-17 Sebastian Pop <sebastian.pop@amd.com>
2545
2546 PR middle-end/42205
2547 * graphite-sese-to-poly.c (translate_scalar_reduction_to_array_for_stmt):
2548 Insert the reduction copy in the same block as the phi node.
2549 (follow_ssa_with_commutative_ops): Handle GIMPLE_NOPs.
2550
2551 * gcc.dg/graphite/pr42205-1.c: New.
2552 * gcc.dg/graphite/pr42205-2.c: New.
2553
2554 2009-12-17 Sebastian Pop <sebastian.pop@amd.com>
2555
2556 PR middle-end/42221
2557 * sese.c (expand_scalar_variables_expr): Follow the SSA links into
2558 the array indexing of ADDR_EXPRs.
2559
2560 * gcc.dg/graphite/pr42221.c: New.
2561
2562 2009-12-17 Sebastian Pop <sebastian.pop@amd.com>
2563
2564 PR middle-end/42178
2565 PR middle-end/42334
2566 * graphite-interchange.c (lst_try_interchange): Do not modify OUTER
2567 index. Call lst_interchange_select_inner only once.
2568 (lst_interchange_select_inner): Update use of lst_try_interchange.
2569 (lst_interchange_select_outer): Update.
2570
2571 2009-12-15 Sebastian Pop <sebastian.pop@amd.com>
2572
2573 PR middle-end/42178
2574 PR middle-end/42334
2575 * graphite-interchange.c (lst_try_interchange): Do not increment the
2576 the OUTER index when there is no AFTER kernel. Do not increment the
2577 OUTER index for after processing the AFTER kernel.
2578 (lst_interchange_select_inner): Call lst_try_interchange only on loops.
2579 (lst_interchange_select_outer): Do not pass in a pointer to the OUTER
2580 index. Do not pass to lst_interchange_select_inner the OUTER index.
2581 (scop_do_interchange): Update use of lst_interchange_select_outer.
2582
2583 * gfortran.dg/graphite/graphite.exp
2584 (DEFAULT_FLAGS_GRAPHITE_IDENTITY): Remove -fdump-tree-graphite-all.
2585 * gfortran.dg/graphite/interchange-1.f: Add comment. Clean
2586 the graphite dump file.
2587 * gfortran.dg/graphite/interchange-2.f: Same.
2588 * gfortran.dg/graphite/pr42334-1.f: New.
2589
2590 2009-12-15 Sebastian Pop <sebastian.pop@amd.com>
2591
2592 PR middle-end/42178
2593 PR middle-end/42334
2594 * graphite-interchange.c (lst_perfect_nestify): Reset to NULL the LSTs
2595 that are empty.
2596 (lst_do_interchange_1): Renamed lst_interchange_select_inner.
2597 (lst_try_interchange): Reimplemented.
2598 (lst_interchange_select_inner): Same.
2599 (lst_do_interchange): Renamed lst_interchange_select_outer.
2600 Reimplemented.
2601 (scop_do_interchange): Update use of lst_interchange_select_outer.
2602
2603 * g++.dg/graphite/pr42130.C: Add -fgraphite-identity.
2604 * gcc.dg/graphite/block-0.c: Un-XFAILed.
2605 * gcc.dg/graphite/pr42211.c: New.
2606 * gfortran.dg/graphite/pr42334.f90: New.
2607
2608 2009-12-14 Sebastian Pop <sebastian.pop@amd.com>
2609
2610 PR middle-end/42181
2611 * graphite-scop-detection.c (graphite_can_represent_scev): Handle more
2612 carefully PLUS_EXPR, MINUS_EXPR, and MULT_EXPR.
2613
2614 * gfortran.dg/graphite/pr42181.f90: New.
2615
2616 2009-12-12 Sebastian Pop <sebpop@gmail.com>
2617
2618 PR middle-end/42284
2619 * graphite-sese-to-poly.c (rewrite_close_phi_out_of_ssa): Call
2620 insert_out_of_ssa_copy_on_edge for anything else than SSA_NAMEs.
2621 (detect_commutative_reduction_arg): Simplified.
2622 (detect_commutative_reduction): Early return when the argument of
2623 the close phi is not of an SSA_NAME.
2624
2625 * gcc.dg/graphite/pr42284.c: New.
2626
2627 2009-12-11 Alexander Monakov <amonakov@ispras.ru>
2628
2629 * dbgcnt.def (graphite_scop): New counter.
2630 * graphite.c: Include dbgcnt.h
2631 (graphite_transform_loops): Use new counter to limit transformations.
2632
2633 2009-12-08 Sebastian Pop <sebpop@gmail.com>
2634
2635 PR middle-end/42285
2636 * graphite-scop-detection.c (graphite_can_represent_init): Also
2637 handle more complex MULT_EXPRs containing parameters by recursion
2638 on the structure.
2639
2640 * gfortran.dg/graphite/pr42285.f90: New.
2641
2642 2009-12-01 Tobias Grosser <grosser@fim.uni-passau.de>
2643
2644 * g++.dg/graphite/pr42130.C: Fix type.
2645
2646 2009-11-29 Alexander Monakov <amonakov@gcc.gnu.org>
2647
2648 * g++.dg/graphite/pr42130.C: Correct testcase.
2649
2650 2009-11-28 Tobias Grosser <grosser@fim.uni-passau.de>
2651
2652 * Merge from mainline (154493:154734).
2653
2654 2009-11-28 Tobias Grosser <grosser@fim.uni-passau.de>
2655
2656 * Merge from mainline (151362:154491).
2657
2658 2009-11-24 Tobias Grosser <grosser@fim.uni-passau.de>
2659
2660 * graphite-clast-to-gimple.c (try_mark_loop_parallel,
2661 graphite_create_new_loop_guard, translate_clast_for): Fix comments.
2662
2663 2009-11-23 Tobias Grosser <grosser@fim.uni-passau.de>
2664
2665 PR middle-end/42130
2666 * graphite-clast-to-gimple.c (graphite_create_new_loop_guard,
2667 translate_clast_for_loop): New.
2668 (translate_clast_for): Add a condition around the loop, to do not
2669 execute loops with zero iterations.
2670 * g++.dg/graphite/pr42130.C: New.
2671 * gcc.dg/graphite/pr35356-2.c: Adapt.
2672
2673 2009-11-23 Tobias Grosser <grosser@fim.uni-passau.de>
2674
2675 * graphite-clast-to-gimple.c (try_mark_loop_parallel): New.
2676 (translate_clast_for, translate_clast_guard, translate_clast, gloog):
2677 Remove context_loop and level.
2678
2679 2009-11-23 Tobias Grosser <grosser@fim.uni-passau.de>
2680
2681 * graphite-clast-to-gimple.c (translate_clast_user,
2682 translate_clast_for, translate_clast_guard): Simplify and move common
2683 elements to translate_clast().
2684 (translate_clast): Simplify and get common elements.
2685
2686 2009-11-23 Tobias Grosser <grosser@fim.uni-passau.de>
2687
2688 * graphite-clast-to-gimple.c (translate_clast_user,
2689 translate_clast_for, translate_clast_guard): Split out of
2690 translate_clast.
2691
2692 2009-11-21 Tobias Grosser <grosser@fim.uni-passau.de>
2693
2694 * graphite-clast-to-gimple.c (clast_name_index, new_clast_name_index,
2695 clast_name_to_index, save_clast_name_index, debug_clast_name_index,
2696 debug_clast_name_indexes_1, debug_clast_name_indexes,
2697 clast_name_index_elt_info, eq_clast_name_indexes): Moved from sese.h.
2698 (clast_name_to_gcc, clast_to_gcc_expression,
2699 clast_to_gcc_expression_red, gcc_type_for_clast_expr,
2700 gcc_type_for_clast_eq, graphite_translate_clast_equation,
2701 graphite_create_guard_cond_expr, graphite_create_new_loop,
2702 translate_clast): Add params_index.
2703 (initialize_cloog_names): Create parameter strings from scratch, do
2704 not reference other strings.
2705 (create_params_index): New.
2706 (gloog): Initialize params_index.
2707 * graphite-scop-detection (free_scops_1): Removed.
2708 (limit_scops): Use normal free_scops.
2709 * graphite-sese-to-poly.c (save_var_names): Removed.
2710 (parameter_index_in_region): Do not initialize SESE_PARAM_NAMES
2711 and SESE_PARAMS_INDEX.
2712 * sese.c (new_sese, free_sese): Dito.
2713 * sese.h (struct sese): Remove params_index, params_names.
2714 (SESE_PARAMS_INDEX, SESE_PARAMS_NAMES): Removed.
2715
2716 2009-11-20 Sebastian Pop <sebastian.pop@amd.com>
2717
2718 Revert the following patch from 2009-09-14:
2719 * graphite-blocking.c: Fix order of includes: tree-chrec.h, then
2720 tree-scalar-evolution.h, and then tree-data-ref.h.
2721 * graphite-clast-to-gimple.c: Same.
2722 * graphite-dependences.c: Same.
2723 * graphite-interchange.c: Same.
2724 * graphite-poly.c: Same.
2725 * graphite-scop-detection.c: Same.
2726 * graphite-sese-to-poly.c: Same.
2727 * graphite.c: Same.
2728 * lambda-code.c: Same.
2729 * matrix-reorg.c: Same.
2730 * tree-data-ref.c: Same.
2731 * tree-if-conv.c: Same.
2732 * tree-loop-distribu: Same.: Same.
2733 * tree-loop-linear.c: Same.
2734 * tree-parloops.c: Same.
2735 * tree-predcom.c: Same.
2736 * tree-vect-patterns.c: Same.
2737
2738 2009-11-20 Sebastian Pop <sebastian.pop@amd.com>
2739
2740 Revert patch from 2009-09-14.
2741 * tree-ssa-loop.c (gate_graphite_transforms): Re-enable Graphite
2742 passes at -O1 and below.
2743
2744 2009-11-18 Sebastian Pop <sebastian.pop@amd.com>
2745
2746 PR middle-end/40281
2747 * gcc.dg/graphite/pr40281.c: New.
2748
2749 * tree-scalar-evolution.c (instantiate_scev_poly): Base and stride
2750 evolutions should not variate in inner loops.
2751
2752 2009-11-18 Sebastian Pop <sebastian.pop@amd.com>
2753
2754 PR middle-end/42050
2755 * gfortran.dg/graphite/pr42050.f90: New.
2756
2757 2009-11-18 Sebastian Pop <sebastian.pop@amd.com>
2758
2759 * graphite-interchange.c (memory_strides_in_loop_depth): New.
2760 (pbb_interchange_profitable_p): Call memory_strides_in_loop_depth.
2761
2762 2009-11-18 Sebastian Pop <sebastian.pop@amd.com>
2763
2764 * graphite-blocking.c (scop_do_block): New.
2765 * graphite-poly.c (apply_poly_transforms): Call scop_do_block.
2766 * graphite-poly.h (scop_do_block): Declared.
2767
2768 2009-11-18 Sebastian Pop <sebastian.pop@amd.com>
2769
2770 * graphite-blocking.c (pbb_strip_mine_profitable_p): The parameter
2771 depth is the loop nesting depth in the LST. Call psct_dynamic_dim
2772 to transform depth into the time_depth before calling
2773 pbb_number_of_iterations_at_time.
2774 (lst_do_strip_mine): Use a scalar variable instead of recomputing
2775 lst_depth.
2776
2777 2009-11-18 Sebastian Pop <sebastian.pop@amd.com>
2778
2779 Reverted the patch for "scattering permutations" from 2009-10-28.
2780
2781 * graphite-poly.c (print_permutation): New.
2782 (debug_permutation): New.
2783 (new_poly_bb): Initialize PBB_PERMUTATION.
2784 (free_poly_bb): Free PBB_PERMUTATION.
2785 * graphite-poly.h (pbb_permutation_elt_p): Declared.
2786 (struct pbb_permutation_elt): New.
2787 (PBB_PERMUTATION_ELT_STRIDE): New.
2788 (PBB_PERMUTATION_ELT_STRIDED_P): New.
2789 (PBB_PERMUTATION_ELT_TIME_DIMENSION): New.
2790 (new_pbb_permutation_elt): New.
2791 (pbb_permutation_elt_free): New.
2792 (struct poly_bb): Add field permutation.
2793 (PBB_PERMUTATION): New.
2794 (print_permutation): Declared.
2795 (debug_permutation): Declared.
2796
2797 2009-11-04 Konrad Trifunovic <konrad.trifunovic@inria.fr>
2798
2799 * graphite-interchange.c (build_partial_difference): New.
2800 (memory_stride_in_loop): Refactored the computation of
2801 equality constraints into build_partial_difference function.
2802 Added support for debugging stride computations.
2803
2804 2009-11-03 Sebastian Pop <sebastian.pop@amd.com>
2805
2806 * graphite-clast-to-gimple.c (gloog): Free if_region,
2807 if_region->true_region, and if_region->region.
2808 * sese.c (if_region_set_false_region): Free if_region->false_region.
2809 (create_if_region_on_edge): Do not use GGC_NEW.
2810 (move_sese_in_condition): Remove useless initialization.
2811
2812 2009-11-03 Sebastian Pop <sebastian.pop@amd.com>
2813
2814 * graphite-interchange.c (lst_perfect_nestify): Pass 3 parameters
2815 for the loops created by the loop distribution. Do not modify the
2816 input LSTs.
2817 (lst_try_interchange_loops): Same. Use a temporary LST for the
2818 transformed schedule. Call lst_update_scattering before data
2819 dependence analysis.
2820 (lst_try_interchange): Pass an extra parameter INDEX.
2821 (lst_do_interchange_1): New.
2822 (lst_do_interchange): Call lst_do_interchange_1.
2823 (scop_do_interchange): Call lst_update_scattering.
2824 * graphite-poly.c (apply_poly_transforms): Do not call
2825 lst_update_scattering.
2826 * graphite-poly.h (lst_pred): New.
2827 (lst_succ): New.
2828 (lst_find_first_pbb): Return NULL when not found.
2829 (lst_empty_p): New.
2830 (lst_insert_in_sequence): Allow LST1 to be NULL.
2831 (lst_replace): New.
2832 (lst_substitute_3): New.
2833 * gcc.dg/graphite/interchange-1.c: XFail.
2834 * gcc.dg/graphite/interchange-8.c: XFail.
2835 * gcc.dg/graphite/interchange-11.c: XFail.
2836
2837 2009-10-30 Sebastian Pop <sebastian.pop@amd.com>
2838
2839 * graphite-interchange.c (lst_perfectly_nested_p): New.
2840 (lst_perfect_nestify): New.
2841 (lst_try_interchange_loops): Call store_lst_schedule,
2842 lst_perfectly_nested_p, lst_perfect_nestify and restore_lst_schedule.
2843 (scop_do_interchange): Avoid redundant legality test.
2844 Call lst_do_interchange on a copy of SCOP_TRANSFORMED_SCHEDULE.
2845 * graphite-poly.c (apply_poly_transforms): Call lst_update_scattering.
2846 * graphite-poly.h (psct_static_dim): New.
2847 (lst_dewey_number_at_depth): New.
2848 (lst_find_pbb): Restructured.
2849 (lst_find_first_pbb): Restructured.
2850 (lst_find_last_pbb): New.
2851 (lst_contains_p): New.
2852 (lst_contains_pbb): New.
2853 (lst_create_nest): New.
2854 (lst_remove_from_sequence): New.
2855 (pbb_update_scattering): New.
2856 (lst_update_scattering_under): New.
2857 (lst_update_scattering_seq): New.
2858 (lst_update_scattering): New.
2859 (lst_insert_in_sequence): New.
2860 (lst_distribute_lst): New.
2861 (lst_remove_all_before_including_pbb): New.
2862 (lst_remove_all_before_excluding_pbb): New.
2863
2864 2009-10-30 Sebastian Pop <sebastian.pop@amd.com>
2865
2866 * tree-ssa-loop-niter.c (finite_loop_p): Do not call twice
2867 get_loop_exit_edges.
2868
2869 2009-10-30 Sebastian Pop <sebastian.pop@amd.com>
2870
2871 * graphite-poly.c (pbb_remove_duplicate_pdrs): Free collapsed.
2872
2873 2009-10-28 Konrad Trifunovic <konrad.trifunovic@gmail.com>
2874
2875 * graphite-poly.c (print_permutation): New.
2876 (debug_permutation): New.
2877 (new_poly_bb): Initialize PBB_PERMUTATION.
2878 (free_poly_bb): Free PBB_PERMUTATION.
2879 * graphite-poly.h (pbb_permutation_elt_p): Declared.
2880 (struct pbb_permutation_elt): New.
2881 (PBB_PERMUTATION_ELT_STRIDE): New.
2882 (PBB_PERMUTATION_ELT_STRIDED_P): New.
2883 (PBB_PERMUTATION_ELT_TIME_DIMENSION): New.
2884 (new_pbb_permutation_elt): New.
2885 (pbb_permutation_elt_free): New.
2886 (struct poly_bb): Add field permutation.
2887 (PBB_PERMUTATION): New.
2888 (print_permutation): Declared.
2889 (debug_permutation): Declared.
2890
2891 2009-10-26 Sebastian Pop <sebastian.pop@amd.com>
2892
2893 * graphite-clast-to-gimple.c (gloog): Do not call
2894 sese_reset_aux_in_loops.
2895 * graphite-sese-to-poly.c (build_loop_iteration_domains): Pass an
2896 extra argument for domains. Do not use loop->aux.
2897 (build_scop_iteration_domain): Initialize and free domains, pass it
2898 to build_loop_iteration_domains and extract the information from
2899 domains. Do not use loop->aux.
2900 * sese.c (sese_reset_aux_in_loops): Removed.
2901 * sese.h (sese_reset_aux_in_loops): Removed.
2902
2903 2009-10-26 Sebastian Pop <sebastian.pop@amd.com>
2904
2905 * graphite-clast-to-gimple.c (find_pbb_via_hash): Moved up.
2906 (dependency_in_loop_p): Same.
2907 (translate_clast): Do not use loop->aux. Initialize
2908 loop->can_be_parallel.
2909 (mark_loops_parallel): Removed.
2910 * graphite-clast-to-gimple.h (mark_loops_parallel): Removed.
2911 * graphite.c (free_aux_in_new_loops): Removed.
2912 (graphite_finalize): Do not call free_aux_in_new_loops.
2913 (graphite_transform_loops): Do not call mark_loops_parallel.
2914
2915 2009-10-26 Li Feng <nemokingdom@gmail.com>
2916
2917 * graphite-clast-to-gimple.c (get_stmtfor_depth): Removed.
2918 (translate_clast): Pass an extra parameter LEVEL.
2919 Call get_scattering_level.
2920 * graphite-clast-to-gimple.h (get_scattering_level): New.
2921
2922 2009-10-22 Sebastian Pop <sebastian.pop@amd.com>
2923
2924 * cfgloop.c (alloc_loop): Initialize loop->single_iv.
2925 * cfgloop.h (struct loop): New field single_iv.
2926
2927 * graphite-clast-to-gimple.c (pbb_to_depth_to_oldiv): Do not use
2928 loop->aux anymore: use loop->single_iv.
2929 (graphite_loop_normal_form): Moved...
2930 (build_graphite_loop_normal_form): Removed.
2931 (gloog): Do not call build_graphite_loop_normal_form.
2932 (free_aux_in_new_loops): Moved...
2933 (mark_loops_parallel): Restructure.
2934 * graphite-clast-to-gimple.h (free_aux_in_new_loops): Do not declare.
2935 * graphite-sese-to-poly.c (graphite_loop_normal_form): ...here.
2936 (scop_canonicalize_loops): New.
2937 (build_poly_scop): Call scop_canonicalize_loops.
2938 * graphite.c (free_aux_in_new_loops): ...here.
2939
2940 2009-10-22 Sebastian Pop <sebastian.pop@amd.com>
2941
2942 * g++.dg/graphite/graphite.exp: Add the same rules as in
2943 gcc.dg/graphite/graphite.exp.
2944
2945 2009-10-22 Sebastian Pop <sebastian.pop@amd.com>
2946
2947 * g++.dg/graphite/id-1.C: New.
2948
2949 2009-10-22 Sebastian Pop <sebastian.pop@amd.com>
2950
2951 * graphite-sese-to-poly.c (create_zero_dim_array): Pass an extra
2952 argument base_name.
2953 (rewrite_close_phi_out_of_ssa): Update use of create_zero_dim_array.
2954 (rewrite_phi_out_of_ssa): Same.
2955 (rewrite_cross_bb_scalar_deps): Same.
2956 (translate_scalar_reduction_to_array): Same.
2957
2958 2009-10-22 Sebastian Pop <sebastian.pop@amd.com>
2959
2960 * graphite-sese-to-poly.c (build_scop_drs): Disable call to
2961 dump_alias_graphs.
2962
2963 2009-10-22 Sebastian Pop <sebastian.pop@amd.com>
2964
2965 * graphite-sese-to-poly.c (dump_alias_graphs): New.
2966 (build_scop_drs): Call dump_alias_graphs.
2967
2968 2009-10-22 Sebastian Pop <sebastian.pop@amd.com>
2969
2970 * graphite-poly.c (new_scop): Initialize SCOP_ORIGINAL_SCHEDULE,
2971 SCOP_TRANSFORMED_SCHEDULE, and SCOP_SAVED_SCHEDULE.
2972 (free_scop): Call free_lst on SCOP_ORIGINAL_SCHEDULE,
2973 SCOP_TRANSFORMED_SCHEDULE, and SCOP_SAVED_SCHEDULE.
2974 * graphite-poly.h (free_lst): New.
2975 (store_lst_schedule): Free SCOP_SAVED_SCHEDULE.
2976 (restore_lst_schedule): Free SCOP_TRANSFORMED_SCHEDULE.
2977
2978 2009-10-22 Sebastian Pop <sebastian.pop@amd.com>
2979
2980 * graphite-poly.h (struct scop): Add a field saved_schedule.
2981 (SCOP_SAVED_SCHEDULE): New.
2982 (store_lst_schedule): New.
2983 (restore_lst_schedule): New.
2984 (store_scattering): Call store_lst_schedule.
2985 (restore_scattering): Call restore_lst_schedule.
2986
2987 2009-10-20 Sebastian Pop <sebastian.pop@amd.com>
2988
2989 * graphite-sese-to-poly.c (free_data_refs_aux): Fix formatting.
2990 (pdr_add_alias_set): Same.
2991 (build_poly_dr): Same.
2992 (build_alias_set_optimal_p): Same.
2993 (build_base_obj_set_for_drs): Same. Do not store the result of
2994 graphds_dfs.
2995
2996 2009-10-20 Sebastian Pop <sebastian.pop@amd.com>
2997
2998 * graphite-sese-to-poly.c (build_alias_set_optimal_p): Initialize
2999 all_components_are_cliques to 1.
3000
3001 2009-10-20 Li Feng <nemokingdom@gmail.com>
3002
3003 * graphite-sese-to-poly.c (free_data_refs_aux): Update to free
3004 the new structure.
3005 (pdr_add_alias_set): Update retrieving alias_set_num.
3006 (build_poly_dr): Update retrieving dr_base_object_set.
3007 (partition_drs_to_sets): Remove.
3008 (build_alias_set_optimal_p): New.
3009 (build_alias_set_for_drs): Rename.
3010 (build_scop_drs): Update.
3011 * graphite-sese-to-poly.h (struct base_alias_pair): New.
3012 (ALIAS_SET_INDEX): Remove.
3013 (BASE_OBJECT_SET_INDEX): Remove.
3014
3015 2009-10-20 Sebastian Pop <sebastian.pop@amd.com>
3016
3017 * sese.c (get_vdef_before_sese): Handle GIMPLE_ASSIGN and GIMPLE_CALL.
3018
3019 2009-10-20 Sebastian Pop <sebastian.pop@amd.com>
3020
3021 * graphite-sese-to-poly.c (pdr_add_data_dimensions): Do not infer
3022 loop upper bounds for 1-element arrays at end of structures.
3023 * tree-flow.h (array_at_struct_end_p): Declared.
3024 * tree-ssa-loop-niter.c (array_at_struct_end_p): Not static anymore.
3025
3026 2009-10-20 Sebastian Pop <sebastian.pop@amd.com>
3027
3028 * g++.dg/graphite/pr41305.C: New.
3029
3030 2009-10-20 Alexander Monakov <amonakov@ispras.ru>
3031
3032 * graphite-sese-to-poly.c (build_loop_iteration_domains): Generalize
3033 construction of parameter constraints from loop iteration analysis.
3034 * gcc.dg/graphite/run-id-2.c: New test.
3035
3036 2009-10-17 Sebastian Pop <sebastian.pop@amd.com>
3037
3038 * graphite-interchange.c (memory_stride_in_loop): Delete p1, lma
3039 and new_cstr.
3040
3041 2009-10-17 Sebastian Pop <sebastian.pop@amd.com>
3042
3043 * graphite-dependences.c (dependence_polyhedron_1): Remove
3044 unused gdim dimensions from the DDR polyhedron.
3045
3046 2009-10-17 Sebastian Pop <sebastian.pop@amd.com>
3047
3048 * graphite-dependences.c (pddr_transformed_scattering): New.
3049 (dot_original_deps_stmt_1): New.
3050 (dot_transformed_deps_stmt_1): New.
3051 (dot_deps_stmt_1): Call dot_original_deps_stmt_1 and
3052 dot_transformed_deps_stmt_1.
3053 (dot_original_deps): New.
3054 (dot_transformed_deps): New.
3055 (dot_deps_1): Call dot_original_deps and dot_transformed_deps.
3056
3057 2009-10-17 Sebastian Pop <sebastian.pop@amd.com>
3058
3059 * graphite-dependences.c (reduction_dr_1): Remove wrong
3060 assert: reduction BBs can have multiple reduction writes
3061 to memory. interchange-3.f90 is an example.
3062
3063 2009-10-17 Sebastian Pop <sebastian.pop@amd.com>
3064
3065 * gfortran.dg/graphite/interchange-3.f90: New.
3066
3067 2009-10-17 Sebastian Pop <sebastian.pop@amd.com>
3068
3069 * gcc.dg/graphite/interchange-1.c: Un-XFAILed.
3070
3071 2009-10-17 Sebastian Pop <sebastian.pop@amd.com>
3072
3073 * graphite-dependences.c (dependence_polyhedron_1): Add the
3074 context to the dependence polyhedron.
3075
3076 2009-10-17 Sebastian Pop <sebastian.pop@amd.com>
3077
3078 * graphite-poly.c (pbb_remove_duplicate_pdrs): Initialize
3079 PBB_PDR_DUPLICATES_REMOVED.
3080 (new_poly_bb): Same.
3081
3082 2009-10-17 Sebastian Pop <sebastian.pop@amd.com>
3083
3084 * graphite-sese-to-poly.c (find_scop_parameters): Initialize
3085 SCOP_CONTEXT.
3086 (build_loop_iteration_domains): Extract bounds on parameters
3087 based on the data size.
3088 (build_scop_context): Do not initialize SCOP_CONTEXT;
3089 add new constraints.
3090
3091 2009-10-17 Sebastian Pop <sebastian.pop@amd.com>
3092
3093 * graphite-ppl.c (ppl_min_for_le_polyhedron): New.
3094 * graphite-ppl.h (graphite-ppl.h): Declared.
3095
3096 2009-10-17 Sebastian Pop <sebastian.pop@amd.com>
3097
3098 * graphite-ppl.c (ppl_print_linear_expr): New.
3099 (debug_ppl_linear_expr): New.
3100 * graphite-ppl.h (ppl_print_linear_expr): Declared.
3101 (debug_ppl_linear_expr): Declared.
3102
3103 2009-10-16 Sebastian Pop <sebastian.pop@amd.com>
3104
3105 * graphite-interchange.c: Fix comments.
3106 * gcc.dg/graphite/block-1.c: Fix comments.
3107
3108 2009-10-16 Sebastian Pop <sebastian.pop@amd.com>
3109
3110 * gcc.dg/graphite/interchange-7.c: Un-XFAILed.
3111 * gcc.dg/graphite/interchange-9.c: Un-XFAILed.
3112
3113 2009-10-16 Sebastian Pop <sebastian.pop@amd.com>
3114
3115 Reapply the patch from Alexander Monakov that disappeared during
3116 the last merges from trunk.
3117
3118 2009-09-16 Alexander Monakov <amonakov@ispras.ru>
3119
3120 * graphite-sese-to-poly.c (pdr_add_data_dimensions): Add bounds only
3121 for ARRAY_REFs. Use array_ref_{low,up}_bound to determine bounds.
3122
3123 2009-10-15 Sebastian Pop <sebastian.pop@amd.com>
3124
3125 * graphite-interchange.c (memory_stride_in_loop): The depth
3126 argument corresponds to a dynamic time dimension, so use
3127 psct_dynamic_dim to refer to the transformed scattering dimension.
3128
3129 2009-10-15 Sebastian Pop <sebastian.pop@amd.com>
3130
3131 * graphite-interchange.c (memory_stride_in_loop): Fix comments.
3132
3133 2009-10-15 Sebastian Pop <sebastian.pop@amd.com>
3134
3135 * graphite-blocking.c (lst_do_strip_mine): Avoid strip mining the
3136 root of the LST.
3137 * graphite-interchange.c (lst_do_interchange): Avoid interchanging
3138 the root of the LST.
3139 * graphite-poly.c (scop_to_lst): Fix LST sequence in an outermost
3140 fake loop.
3141 (print_lst): Print the root of LST in a different format.
3142 * graphite-poly.h (lst_depth): Adjust to include the root of the LST.
3143
3144 2009-10-15 Sebastian Pop <sebastian.pop@amd.com>
3145
3146 * graphite-poly.c (print_scop): Fix pretty printing of a SCoP.
3147
3148 2009-10-15 Sebastian Pop <sebastian.pop@amd.com>
3149
3150 * doc/passes.texi: Document the Graphite infrastructure.
3151
3152 2009-10-15 Sebastian Pop <sebastian.pop@amd.com>
3153
3154 * graphite-sese-to-poly.c (insert_copyin): Use gsi_insert_seq_on_edge.
3155 (rewrite_commutative_reductions_out_of_ssa): Call gsi_commit_edge_inserts,
3156 and check the SSA representation.
3157
3158 * gfortran.dg/graphite/id-18.f90: New, reduced from PR41193.
3159
3160 2009-10-15 Sebastian Pop <sebastian.pop@amd.com>
3161
3162 * gcc.dg/graphite/pr40157.c: Use -floop-block as reported in the PR.
3163
3164 2009-10-14 Sebastian Pop <sebastian.pop@amd.com>
3165
3166 * gcc.dg/graphite/interchange-11.c: New.
3167
3168 2009-10-14 Sebastian Pop <sebastian.pop@amd.com>
3169
3170 * gcc.dg/graphite/interchange-8.c: Enable loop interchange.
3171
3172 2009-10-14 Sebastian Pop <sebastian.pop@amd.com>
3173
3174 * gcc.dg/graphite/graphite.exp (DEFAULT_CFLAGS_GRAPHITE_BLOCK):
3175 Add -fno-loop-strip-mine and -fno-loop-interchange.
3176 (DEFAULT_FLAGS_GRAPHITE_INTERCHANGE): Add -fno-loop-block and
3177 -fno-loop-strip-mine.
3178 * gfortran.dg/graphite/graphite.exp: Same.
3179
3180 2009-10-14 Sebastian Pop <sebastian.pop@amd.com>
3181
3182 * gcc.dg/graphite/graphite.exp (DEFAULT_CFLAGS_GRAPHITE_BLOCK):
3183 Renamed DEFAULT_FLAGS_GRAPHITE_BLOCK.
3184 (DEFAULT_CFLAGS_GRAPHITE_IDENTITY): Renamed
3185 DEFAULT_FLAGS_GRAPHITE_IDENTITY.
3186 (DEFAULT_CFLAGS_GRAPHITE_INTERCHANGE): Renamed
3187 DEFAULT_FLAGS_GRAPHITE_INTERCHANGE.
3188 (DEFAULT_CFLAGS_GRAPHITE_SCOP): Renamed
3189 DEFAULT_FLAGS_GRAPHITE_SCOP.
3190 (DEFAULT_CFLAGS_RUN_ID): Renamed DEFAULT_FLAGS_RUN_ID.
3191 (DEFAULT_CFLAGS_GRAPHITE): Renamed DEFAULT_FLAGS_GRAPHITE.
3192
3193 2009-10-14 Sebastian Pop <sebastian.pop@amd.com>
3194
3195 * graphite-poly.c (pbb_number_of_iterations_at_time): Cleanup comments.
3196
3197 2009-10-14 Konrad Trifunovic <konrad.trifunovic@gmail.com>
3198 Sebastian Pop <sebastian.pop@amd.com>
3199
3200 * graphite-interchange.c (build_linearized_memory_access): Pass an
3201 offset as parameter.
3202 (memory_stride_in_loop): Include transform scattering in the
3203 access functions to be able to querry the strides in the
3204 transformed loops.
3205 (pbb_interchange_loop_depths): Interchange the psct_dynamic_dim,
3206 not the psct_iterator_dim.
3207
3208 2009-10-14 Sebastian Pop <sebastian.pop@amd.com>
3209
3210 * graphite-blocking.c (pbb_do_strip_mine): Removed.
3211 (lst_do_strip_mine_loop): New.
3212 (lst_do_strip_mine): New.
3213 (scop_do_strip_mine): Call lst_do_strip_mine.
3214 * graphite-poly.h (lst_add_loop_under_loop): New.
3215 (lst_find_first_pbb): New.
3216
3217 2009-10-14 Sebastian Pop <sebastian.pop@amd.com>
3218
3219 * graphite-poly.c (loop_to_lst): Fix LST creation.
3220
3221 2009-10-14 Tobias Grosser <grosser@fim.uni-passau.de>
3222
3223 * gcc.dg/graphite/id-15.c: (8 * 8) replaced with
3224 sizeof(unsigned long) to make it run on 32bit systems.
3225
3226 2009-10-14 Tobias Grosser <grosser@fim.uni-passau.de>
3227
3228 * gcc.dg/graphite/run-id-1.c: Use smaller matrix to not
3229 SEGFAULT on 32bit.
3230
3231 2009-10-14 Ramakrishna Upadrasta <Ramakrishna.Upadrasta@inria.fr>
3232
3233 * graphite-sese-to-poly.c (write_alias_graph_to_ascii_dimacs): Fix
3234 Comment.
3235 (write_alias_graph_to_ascii_dot): New.
3236 (write_alias_graph_to_ascii_ecc): Ditto.
3237 (partition_drs_to_sets): Add testing of optimality of current method
3238 which assigns alias numbers according to DFS Comopnent number. used
3239 as heuristic for the upcoming ECC algorithm.
3240 (build_scop_drs): Write to file also with the ecc and dot format.
3241
3242 2009-10-13 Sebastian Pop <sebastian.pop@amd.com>
3243
3244 * gfortran.dg/graphite/interchange-1.f: XFail.
3245
3246 2009-10-13 Sebastian Pop <sebastian.pop@amd.com>
3247
3248 * graphite.c (graphite_initialize): Do not handle functions with
3249 more than 100 basic blocks.
3250
3251 2009-10-13 Sebastian Pop <sebastian.pop@amd.com>
3252
3253 * graphite-blocking.c (pbb_do_strip_mine): Use
3254 PARAM_LOOP_BLOCK_TILE_SIZE.
3255
3256 2009-10-13 Sebastian Pop <sebastian.pop@amd.com>
3257
3258 * graphite-poly.c (dot_lst_1): New.
3259 (dot_lst): New.
3260 * graphite-poly.h (dot_lst): Declared.
3261
3262 2009-10-13 Sebastian Pop <sebastian.pop@amd.com>
3263
3264 * graphite-dependences.c (dot_deps_stmt_1): New.
3265 (dot_deps_stmt): New.
3266 * graphite-dependences.h (dot_deps_stmt): Declared.
3267
3268 2009-10-09 Sebastian Pop <sebastian.pop@amd.com>
3269
3270 * graphite-sese-to-poly.c (rewrite_cross_bb_scalar_dependence): Do
3271 not replace cross BB scalar dependences ending on PHI nodes.
3272 (rewrite_cross_bb_scalar_deps): Filter out GIMPLE_PHI nodes.
3273
3274 2009-10-09 Sebastian Pop <sebastian.pop@amd.com>
3275
3276 * graphite-poly.c (apply_poly_transforms): Implement the high
3277 level driver for flag_loop_block.
3278 * opts.c (decode_options): Enable flag_loop_block at -O2.
3279 * tree-ssa-loop.c (gate_graphite_transforms): Remove call to sorry for
3280 flag_loop_block.
3281
3282 * gcc.dg/graphite/graphite.exp (DEFAULT_CFLAGS_GRAPHITE_BLOCK): Add
3283 -floop-block.
3284 * gfortran.dg/graphite/graphite.exp (DEFAULT_CFLAGS_GRAPHITE_BLOCK):
3285 Add -floop-block.
3286
3287 2009-10-09 Sebastian Pop <sebastian.pop@amd.com>
3288
3289 * graphite-poly.h (lst_find_pbb): New.
3290 (find_lst_loop): New.
3291
3292 2009-10-09 Sebastian Pop <sebastian.pop@amd.com>
3293
3294 * graphite-poly.c (new_scop): Remove init of SCOP_DEP_GRAPH.
3295 * graphite-poly.h (struct scop): Remove dep_graph field.
3296 (SCOP_DEP_GRAPH): Removed.
3297
3298 2009-10-09 Sebastian Pop <sebastian.pop@amd.com>
3299
3300 * graphite-poly.h (copy_lst): Do full copy of LST.
3301
3302 2009-10-07 Sebastian Pop <sebastian.pop@amd.com>
3303
3304 * graphite-sese-to-poly.c (reduction_phi_p): Call remove_invariant_phi
3305 when the loop stride is zero.
3306
3307 * gcc.dg/graphite/id-16.c: New.
3308
3309 2009-10-06 Sebastian Pop <sebastian.pop@amd.com>
3310
3311 * graphite-dependences.c (reduction_dr_1): New.
3312 (reduction_dr_p): New.
3313 (graphite_legal_transform_dr): Call reduction_dr_p.
3314 (reduction_ddr): Renamed reduction_ddr_p.
3315 * graphite-poly.h (same_pdr_p): New.
3316 (number_of_write_pdrs): New.
3317 * graphite-sese-to-poly.c (nb_data_writes_in_bb): New.
3318 (split_reduction_stmt): Do not split reduction statements
3319 when there are no writes to memory.
3320 (translate_scalar_reduction_to_array_for_stmt): Insert the
3321 memory reduction statement just after the scalar reduction statement.
3322
3323 * gcc.dg/graphite/interchange-10.c: Updated to differ from interchange-4.c.
3324 Un-XFAIL-ed.
3325 * gcc.dg/graphite/interchange-3.c: Un-XFAIL-ed.
3326 * gcc.dg/graphite/interchange-4.c: Un-XFAIL-ed.
3327
3328 2009-10-06 Sebastian Pop <sebastian.pop@amd.com>
3329
3330 * graphite-interchange.c (lst_apply_interchange): New.
3331 (lst_interchange_profitable_p): New.
3332 (lst_try_interchange_loops): New.
3333 (lst_try_interchange): New.
3334 (lst_do_interchange): New.
3335 (pbb_do_interchange): Removed.
3336 (scop_do_interchange): Call lst_do_interchange.
3337
3338 2009-10-06 Sebastian Pop <sebastian.pop@amd.com>
3339
3340 * graphite-poly.c (print_scop): Print SCOP_ORIGINAL_SCHEDULE and
3341 SCOP_TRANSFORMED_SCHEDULE.
3342 (loop_to_lst): New.
3343 (scop_to_lst): New.
3344 (print_lst): New.
3345 (debug_lst): New.
3346 * graphite-poly.h (lst_p): New.
3347 (struct lst): New.
3348 (LST_LOOP_P): New.
3349 (LST_LOOP_FATHER): New.
3350 (LST_PBB): New.
3351 (LST_SEQ): New.
3352 (scop_to_lst): Declared.
3353 (print_lst): Declared.
3354 (debug_lst): Declared.
3355 (new_lst_loop): New.
3356 (new_lst_stmt): New.
3357 (copy_lst): New.
3358 (lst_depth): New.
3359 (lst_dewey_number): New.
3360 (struct scop): Add original_schedule and transformed_schedule fields.
3361 (SCOP_ORIGINAL_SCHEDULE): New.
3362 (SCOP_TRANSFORMED_SCHEDULE): New.
3363 * graphite-sese-to-poly.c (build_poly_scop): Call scop_to_lst.
3364
3365 2009-10-05 Sebastian Pop <sebastian.pop@amd.com>
3366
3367 * graphite-dependences.c (reduction_ddr): New.
3368 (graphite_legal_transform_bb): Call reduction_ddr.
3369 * graphite-poly.c (new_poly_bb): Pass a new bool parameter.
3370 Initialize PBB_IS_REDUCTION.
3371 * graphite-poly.h (struct poly_bb): New bool field is_reduction.
3372 (PBB_IS_REDUCTION): New.
3373 (new_poly_bb): Update declaration.
3374 * graphite-scop-detection.h (build_scop_bbs): Removed.
3375 (nb_reductions_in_loop): Removed.
3376 * graphite-sese-to-poly.c (try_generate_gimple_bb): Pass a sbitmap
3377 parameter for reductions.
3378 (try_generate_gimple_bb): Update call to new_poly_bb.
3379 (build_scop_bbs_1): Same.
3380 (build_scop_bbs): Same.
3381 (gsi_for_phi_node): New.
3382 (scalar_close_phi_node_p): Remove gcc_assert.
3383 (split_reduction_stmt): New.
3384 (is_reduction_operation_p): New.
3385 (phi_contains_arg): New.
3386 (follow_ssa_with_commutative_ops): New.
3387 (detect_commutative_reduction_arg): New.
3388 (detect_commutative_reduction_assign): New.
3389 (follow_inital_value_to_phi): New.
3390 (edge_initial_value_for_loop_phi): New.
3391 (initial_value_for_loop_phi): New.
3392 (detect_commutative_reduction): New.
3393 (translate_scalar_reduction_to_array_for_stmt): New.
3394 (insert_copyout): New.
3395 (insert_copyin): New.
3396 (translate_scalar_reduction_to_array): New.
3397 (rewrite_commutative_reductions_out_of_ssa_close_phi): New.
3398 (rewrite_commutative_reductions_out_of_ssa_loop): New.
3399 (rewrite_commutative_reductions_out_of_ssa): New.
3400 (build_poly_scop): Call rewrite_commutative_reductions_out_of_ssa.
3401 * sese.h (split_region_for_bb): New.
3402
3403 * gcc.dg/graphite/graphite.exp (DEFAULT_CFLAGS_GRAPHITE_BLOCK): Add -ffast-math.
3404 * gcc.dg/graphite/interchange-1.c: Fix format.
3405 * gcc.dg/graphite/interchange-10.c: New.
3406
3407 2009-10-05 Sebastian Pop <sebastian.pop@amd.com>
3408
3409 * graphite-sese-to-poly.c (insert_out_of_ssa_copy): Remove
3410 buggy assert.
3411
3412 2009-10-05 Sebastian Pop <sebastian.pop@amd.com>
3413
3414 * graphite-sese-to-poly.c (scev_analyzable_p): New.
3415 (rewrite_cross_bb_scalar_dependence): New.
3416 (rewrite_cross_bb_scalar_deps): New.
3417 (rewrite_reductions_out_of_ssa): Use bb_in_sese_p.
3418 Call rewrite_cross_bb_scalar_deps.
3419
3420 2009-10-05 Sebastian Pop <sebastian.pop@amd.com>
3421
3422 * graphite-sese-to-poly.c (gsi_for_ssa_name_def): Removed.
3423 (insert_out_of_ssa_copy): Directly use gsi_after_labels and
3424 gsi_for_stmt.
3425
3426 2009-10-05 Sebastian Pop <sebastian.pop@amd.com>
3427
3428 * graphite-clast-to-gimple.c (build_cloog_prog): Use pbb_index.
3429 * graphite-interchange.c (pbb_do_interchange): Same.
3430 * graphite-poly.c (print_scattering_function): Same.
3431 (debug_pdrs): Same.
3432 * graphite-poly.h (pbb_loop): New.
3433 * graphite-sese-to-poly.c (create_linear_expr_from_tree): Use pbb_loop.
3434
3435 2009-09-27 Sebastian Pop <sebastian.pop@amd.com>
3436
3437 * graphite-scop-detection.c (limit_scops): Do not build poly_bbs.
3438
3439 2009-09-27 Sebastian Pop <sebastian.pop@amd.com>
3440
3441 * graphite-sese-to-poly.c (partition_drs_to_sets): Drs is not modified,
3442 so don't pass a pointer to it.
3443 (build_alias_set_for_drs): Same.
3444 (build_base_obj_set_for_drs): Same.
3445 (build_scop_drs): Same.
3446
3447 2009-09-26 Li Feng <nemokingdom@gmail.com>
3448
3449 * graphite-sese-to-poly.c (build_scop_drs): Disable writing to file
3450 the alias graph of data references.
3451
3452 2009-09-25 Li Feng <nemokingdom@gmail.com>
3453
3454 * graphite-sese-to-poly.c (write_alias_graph_to_ascii_dimacs): New.
3455 (build_scop_drs): When debugging, write the alias graph to file,
3456 otherwise, should be disabled.
3457
3458 2009-09-17 Sebastian Pop <sebastian.pop@amd.com>
3459
3460 * Merge from mainline (151310:151361).
3461
3462 2009-09-17 Sebastian Pop <sebastian.pop@amd.com>
3463
3464 * Merge from mainline (151171:151310).
3465
3466 2009-09-17 Sebastian Pop <sebastian.pop@amd.com>
3467
3468 * Merge from mainline (151171:151806).
3469
3470 2009-09-17 Sebastian Pop <sebastian.pop@amd.com>
3471
3472 * Revert the last commit.
3473
3474 2009-09-17 Sebastian Pop <sebastian.pop@amd.com>
3475
3476 * Merge from mainline (151171:151819).
3477
3478 2009-09-17 Sebastian Pop <sebastian.pop@amd.com>
3479
3480 * graphite-scop-detection.c (stmt_simple_memref_p): Removed.
3481 (is_simple_operand): Remove call to stmt_simple_memref_p.
3482 (stmt_simple_for_scop_p): Update call to is_simple_operand.
3483
3484 2009-09-17 David Edelsohn <edelsohn@gnu.org>
3485
3486 * gcc.dg/graphite/interchange-mvt.c: New File.
3487 * gcc.dg/graphite/scop-dsyrk.c: New File.
3488 * gcc.dg/graphite/scop-dsyr2k.c: New File.
3489 * gcc.dg/graphite/scop-mvt.c: New File.
3490 * gcc.dg/graphite/scop-sor.c: New File.
3491
3492 2009-09-17 Li Feng <nemokingdom@gmail.com>
3493
3494 * graphite-dependences.c (poly_drs_may_alias_p): Adjust definition.
3495 (pddr_original_scattering): Make sure 2 pdr2 in the same base object set.
3496 (graphite_carried_dependence_level_k): Ditto.
3497 * graphite-poly.c (new_poly_dr): Add init of PDR_BASE_OBJECT_SET.
3498 * graphite-poly.h (struct poly_dr): Add member dr_base_object_set.
3499 (new_poly_dr): Adjust declaration.
3500 * graphite-sese-to-poly.c (free_data_refs_aux): New.
3501 (free_gimple_bb): Added free_data_refs_aux.
3502 (build_poly_dr): Add dr_base_object_set.
3503 (partition_drs_to_sets): New.
3504 (dr_same_base_object_p): New.
3505 (build_alias_set_for_drs): New.
3506 (build_base_object_set_for_drs): New.
3507 (build_scop_drs): Add build_base_obj_set_for_drs.
3508 * graphite-sese-to-poly.h: Added #define for alias set number index and
3509 base object set index.
3510 * libgomp/testsuite/libgomp.graphite/force-parallel-6.c: Refine tests.
3511 * libgomp/testsuite/libgomp.graphite/pr4118.c: New.
3512
3513 2009-09-16 Alexander Monakov <amonakov@ispras.ru>
3514
3515 * graphite-sese-to-poly.c (pdr_add_data_dimensions): Add bounds only
3516 for ARRAY_REFs. Use array_ref_{low,up}_bound to determine bounds.
3517
3518 2009-09-14 Sebastian Pop <sebastian.pop@amd.com>
3519
3520 * graphite-sese-to-poly.c (struct irp_data): Removed.
3521 (idx_record_params): Removed.
3522 (find_params_in_bb): Scan for parameters the access functions; don't
3523 parse the tree representation.
3524
3525 2009-09-14 Sebastian Pop <sebastian.pop@amd.com>
3526
3527 * tree-ssa-loop.c (gate_graphite_transforms): Disable Graphite
3528 passes at -O1 and below.
3529
3530 2009-09-14 Sebastian Pop <sebastian.pop@amd.com>
3531
3532 * graphite-blocking.c: Fix order of includes: tree-chrec.h, then
3533 tree-scalar-evolution.h, and then tree-data-ref.h.
3534 * graphite-clast-to-gimple.c: Same.
3535 * graphite-dependences.c: Same.
3536 * graphite-interchange.c: Same.
3537 * graphite-poly.c: Same.
3538 * graphite-scop-detection.c: Same.
3539 * graphite-sese-to-poly.c: Same.
3540 * graphite.c: Same.
3541 * lambda-code.c: Same.
3542 * matrix-reorg.c: Same.
3543 * tree-data-ref.c: Same.
3544 * tree-if-conv.c: Same.
3545 * tree-loop-distribu: Same.: Same.
3546 * tree-loop-linear.c: Same.
3547 * tree-parloops.c: Same.
3548 * tree-predcom.c: Same.
3549 * tree-vect-patterns.c: Same.
3550
3551 2009-09-02 Sebastian Pop <sebastian.pop@amd.com>
3552
3553 Partially revert the previous patch, except the following.
3554 * tree-scalar-evolution.c (instantiate_scev_not): Adapted to pass
3555 as parameters the operands of the not expression.
3556
3557 2009-09-01 Sebastian Pop <sebastian.pop@amd.com>
3558
3559 * tree-scalar-evolution.c (instantiate_scev_assign): New.
3560 Do not call analyze_scalar_evolution on assignments.
3561 (instantiate_scev_phi): Call analyze_scalar_evolution.
3562 (instantiate_scev_name): Call instantiate_scev_assign and
3563 instantiate_scev_phi.
3564 (instantiate_scev_not): Adapted to pass as parameters the operands
3565 of the not expression.
3566
3567 2009-09-01 Sebastian Pop <sebastian.pop@amd.com>
3568
3569 * tree-scalar-evolution.c (instantiate_scev_binary): Adapted
3570 to pass as parameters the operands of the binary expression.
3571
3572 2009-09-01 Sebastian Pop <sebastian.pop@amd.com>
3573
3574 * tree-scalar-evolution.c (instantiate_scev_bitnot): Renamed
3575 instantiate_scev_not. Handle NEGATE_EXPR.
3576 (instantiate_scev_r): Handle NEGATE_EXPR.
3577
3578 2009-09-01 Sebastian Pop <sebastian.pop@amd.com>
3579
3580 * tree-scalar-evolution.c (instantiate_scev_1): Renamed
3581 instantiate_scev_r.
3582 (instantiate_scev_r): Move code in instantiate_scev_2
3583 and instantiate_scev_1.
3584
3585 2009-09-01 Sebastian Pop <sebastian.pop@amd.com>
3586
3587 * tree-scalar-evolution.c (instantiate_scev_3): New.
3588 (instantiate_scev_1): Move code in instantiate_scev_3.
3589
3590 2009-09-01 Sebastian Pop <sebastian.pop@amd.com>
3591
3592 * tree-scalar-evolution.c (instantiate_scev_poly): New.
3593 (instantiate_scev_1): Move code in instantiate_scev_poly.
3594
3595 2009-09-01 Sebastian Pop <sebastian.pop@amd.com>
3596
3597 * tree-scalar-evolution.c (instantiate_scev_bitnot): New.
3598 (instantiate_scev_1): Move code in instantiate_scev_bitnot.
3599
3600 2009-09-01 Sebastian Pop <sebastian.pop@amd.com>
3601
3602 * tree-scalar-evolution.c (instantiate_scev_convert): New.
3603 (instantiate_scev_1): Move code in instantiate_scev_convert.
3604
3605 2009-09-01 Sebastian Pop <sebastian.pop@amd.com>
3606
3607 * tree-scalar-evolution.c (instantiate_scev_binary): New.
3608 (instantiate_scev_1): Move code in instantiate_scev_binary.
3609
3610 2009-09-01 Sebastian Pop <sebastian.pop@amd.com>
3611
3612 * tree-scalar-evolution.c (instantiate_scev_name): New.
3613 (instantiate_scev_1): Move code in instantiate_scev_name.
3614
3615 2009-08-28 Sebastian Pop <sebastian.pop@amd.com>
3616
3617 * Merge from mainline (150992:151171).
3618
3619 2009-08-25 Sebastian Pop <sebastian.pop@amd.com>
3620
3621 * opts.c (decode_options): Enable flag_loop_interchange at -O2.
3622
3623 2009-08-25 Sebastian Pop <sebastian.pop@amd.com>
3624
3625 * graphite-dependences.c (graphite_legal_transform_bb): Call
3626 pbb_remove_duplicate_pdrs.
3627 * graphite-poly.c (can_collapse_pdr): Removed.
3628 (pdr_find_duplicate): Removed.
3629 (can_collapse_pdrs): New.
3630 (pbb_remove_duplicate_pdrs): New.
3631 (new_poly_dr): Do not look for duplicates.
3632 * graphite-poly.h (struct poly_bb): New field pdr_duplicates_removed.
3633 (PBB_PDR_DUPLICATES_REMOVED): New.
3634 (pbb_remove_duplicate_pdrs): Declared.
3635
3636 2009-08-25 Sebastian Pop <sebastian.pop@amd.com>
3637
3638 * graphite-interchange.c (pbb_interchange_profitable_p): Adjust
3639 the strides by multiplying by PDR_NB_REFS.
3640 * graphite-poly.c (can_collapse_pdr): New.
3641 (pdr_find_duplicate): New.
3642 (new_poly_dr): Call pdr_find_duplicate. Collapse duplicate PDRs.
3643 Initialize PDR_NB_REFS.
3644 * graphite-poly.h (struct poly_dr): Add field nb_refs.
3645 (PDR_NB_REFS): New.
3646 (new_poly_dr): Number of subscripts is a graphite_dim_t.
3647
3648 2009-08-25 Sebastian Pop <sebastian.pop@amd.com>
3649
3650 Revert one of the previous commits:
3651 * graphite-dependences.c (graphite_legal_transform_bb): Avoid
3652 the computation of symmetric data dependence relations.
3653 (dependency_between_pbbs_p): Same.
3654
3655 2009-08-25 Sebastian Pop <sebastian.pop@amd.com>
3656
3657 PR middle-end/40965
3658 * graphite-poly.c (apply_poly_transforms): Remove legality test before
3659 any transform.
3660
3661 2009-08-25 Sebastian Pop <sebastian.pop@amd.com>
3662
3663 * graphite-dependences.c (pddr_original_scattering): Return NULL
3664 for read-read dependence relations.
3665 * graphite-poly.h (enum poly_dr_type): Fix comment.
3666 (pdr_read_p): New.
3667 (pdr_write_p): New.
3668 (pdr_may_write_p): New.
3669
3670 2009-08-25 Sebastian Pop <sebastian.pop@amd.com>
3671
3672 * graphite-poly.h (enum POLY_DR_TYPE): Renamed poly_dr_type.
3673 (struct poly_dr): Same.
3674 (new_poly_dr): Same.
3675 * graphite-poly.c (new_poly_dr): Same.
3676
3677 2009-08-25 Konrad Trifunovic <konrad.trifunovic@gmail.com>
3678 Sebastian Pop <sebastian.pop@amd.com>
3679
3680 * graphite-blocking.c (pbb_strip_mine_loop_depth): Renamed
3681 pbb_strip_mine_time_depth. Changed the implementation so that
3682 transformation is expressed as a transformation on
3683 time (scatttering) dimensions. Also, ensures that the 2d+1
3684 scheduling format is preserved.
3685 (pbb_strip_mine_profitable_p): Profitability is based on the
3686 iteration number of a given time (scattering) dimension,
3687 and not on a original loop depth dimension.
3688 (pbb_strip_mine): Call pbb_number_of_iterations_at_time.
3689 (pbb_do_strip_mine): Call psct_dynamic_dim.
3690 * graphite-poly.c (pbb_number_of_iterations_at_time): New.
3691 * graphite-poly.h (pbb_number_of_iterations_at_time): Declared.
3692 (pbb_nb_dynamic_scattering_transform): New.
3693 (psct_dynamic_dim): New.
3694
3695 2009-08-25 Konrad Trifunovic <konrad.trifunovic@gmail.com>
3696
3697 * graphite-ppl.c (ppl_max_for_le): Renamed ppl_max_for_le_pointset.
3698 * graphite-ppl.h (ppl_max_for_le): Renamed ppl_max_for_le_pointset.
3699 * graphite-poly.c (pbb_number_of_iterations): Rename ppl_max_for_le.
3700 * graphite-interchange.c (build_linearized_memory_access): Same.
3701 (memory_stride_in_loop): Same.
3702
3703 2009-08-25 Sebastian Pop <sebastian.pop@amd.com>
3704
3705 * graphite-dependences.c (pddr_original_scattering): New.
3706 (graphite_legal_transform_dr): Call pddr_original_scattering.
3707 (dot_deps_1): New.
3708 (dot_deps): New.
3709 * graphite-dependences.h (dot_deps): Declared.
3710 * graphite-poly.c (new_poly_dr): Initialize PDR_ID.
3711 (print_pdr): Print PDR_ID.
3712 * graphite-poly.h (struct poly_dr): Add field id.
3713 (PDR_ID): New.
3714 (pbb_index): New.
3715 * graphite-scop-detection.c (dot_all_scops_1): Cleanup comment.
3716
3717 2009-08-22 Sebastian Pop <sebastian.pop@amd.com>
3718
3719 * graphite-dependences.c (graphite_carried_dependence_level_k): Do
3720 not delete the original dependence relation.
3721
3722 2009-08-21 Sebastian Pop <sebastian.pop@amd.com>
3723
3724 * graphite-dependences.c (graphite_legal_transform_bb): Avoid
3725 the computation of symmetric data dependence relations.
3726 (dependency_between_pbbs_p): Same.
3727
3728 2009-08-21 Sebastian Pop <sebastian.pop@amd.com>
3729
3730 * graphite-dependences.c (new_poly_dr_pair): Renamed new_poly_ddr.
3731 (eq_poly_dr_pair_p): Renamed eq_poly_ddr_p.
3732 (hash_poly_dr_pair_p): Renamed hash_poly_ddr_p.
3733 (free_poly_ddr): New.
3734 (pddr_is_empty): New.
3735 (dependence_polyhedron_1): Now returns a poly_ddr_p.
3736 (dependence_polyhedron): Same. Remove useless gcc_assert.
3737 Remove fprintfs.
3738 (graphite_legal_transform_dr): Call pddr_is_empty and free_poly_ddr.
3739 (graphite_carried_dependence_level_k): Call pddr_is_empty.
3740 * graphite-dependences.h (enum poly_dependence_kind): New.
3741 (poly_dr_pair): Renamed poly_ddr. Added a field kind.
3742 (PDRP_SOURCE): Renamed PDDR_SOURCE.
3743 (PDRP_SINK): Renamed PDDR_SINK.
3744 (PDRP_DDP): Renamed PDDR_DDP.
3745 (PDDR_KIND): New.
3746 (free_poly_ddr): Declared.
3747 * graphite-poly.c (new_scop): Use the new hash function names.
3748 * graphite-poly.h (struct scop): Renamed field original_pdr_pairs
3749 into original_pddrs.
3750 (SCOP_ORIGINAL_PDR_PAIRS): Renamed SCOP_ORIGINAL_PDDRS.
3751
3752 2009-08-21 Sebastian Pop <sebastian.pop@amd.com>
3753
3754 * Merge from mainline (150764:150992).
3755
3756 2009-08-18 Sebastian Pop <sebastian.pop@amd.com>
3757
3758 * cfgloopmanip.c (create_empty_loop_on_edge): Generate upper
3759 bounds with LT_EXPR to make niter analysis more precise on code
3760 generated by Graphite.
3761
3762 2009-08-18 Sebastian Pop <sebastian.pop@amd.com>
3763
3764 * graphite-dependences.c (graphite_legal_transform_dr): Fix formatting.
3765 (graphite_legal_transform_bb): Same.
3766 (poly_drs_may_alias_p): Same.
3767
3768 2009-08-15 Sebastian Pop <sebastian.pop@amd.com>
3769
3770 PR middle-end/40981
3771 * graphite-ppl.c (ppl_max_for_le): Correct the use of
3772 ppl_Pointset_Powerset_C_Polyhedron_maximize.
3773
3774 2009-08-13 Sebastian Pop <sebastian.pop@amd.com>
3775
3776 * graphite-poly.c (print_pbb): Print PBB index.
3777
3778 2009-08-13 Sebastian Pop <sebastian.pop@amd.com>
3779
3780 * Merge from mainline (r150672:150764).
3781
3782 2009-08-13 Sebastian Pop <sebastian.pop@amd.com>
3783
3784 * graphite-interchange.c (ppl_max_for_le): Moved...
3785 * graphite-poly.c (pbb_number_of_iterations): Call ppl_max_for_le.
3786 * graphite-ppl.c (ppl_max_for_le): ... here.
3787 * graphite-ppl.h (ppl_max_for_le): Declared.
3788
3789 2009-08-12 Sebastian Pop <sebastian.pop@amd.com>
3790
3791 * Merge from mainline (r150372:150672).
3792
3793 2009-08-11 Sebastian Pop <sebastian.pop@amd.com>
3794
3795 PR middle-end/40980
3796 * sese.c (convert_for_phi_arg): New.
3797 (add_guard_exit_phis): Use convert_for_phi_arg.
3798
3799 * gfortran.dg/graphite/id-17.f: New.
3800
3801 2009-08-11 Sebastian Pop <sebastian.pop@amd.com>
3802
3803 * graphite-sese-to-poly.c (pdr_add_data_dimensions): Dont add
3804 unknown subscript upper bounds.
3805
3806 * gcc.dg/graphite/interchange-6.c: Un-XFAIL.
3807
3808 2009-08-11 Sebastian Pop <sebastian.pop@amd.com>
3809 Pranav Garg <pranav.garg2107@gmail.com>
3810
3811 * graphite-interchange.c (gather_access_strides): Removed.
3812 (ppl_max_for_le): New.
3813 (build_linearized_memory_access): New.
3814 (memory_stride_in_loop): New.
3815 (pbb_interchange_profitable_p): Reimplemented.
3816 * graphite-ppl.h (ppl_new_id_map): New.
3817 (ppl_interchange): New.
3818
3819 * gcc.dg/graphite/interchange-6.c: XFAILed.
3820
3821 2009-08-11 Sebastian Pop <sebastian.pop@amd.com>
3822
3823 * graphite-interchange.c (compute_subscript): Removed.
3824 (compute_array_size_cstr): Removed.
3825 (compute_array_size_poly): Removed.
3826 (compute_array_size): Removed.
3827 (gather_access_strides_poly): Removed.
3828 (gather_access_strides): Empty.
3829
3830 2009-08-11 Sebastian Pop <sebastian.pop@amd.com>
3831
3832 * graphite-dependences.c (dependence_polyhedron_1): Replace
3833 pdr_nb_subscripts with PDR_NB_SUBSCRIPTS.
3834 (graphite_legal_transform_dr): Same.
3835 (graphite_carried_dependence_level_k): Same.
3836 * graphite-poly.c (new_poly_dr): Add a parameter nb_subscripts.
3837 Initialize PDR_NB_SUBSCRIPTS.
3838 (print_pdr_access_layout): Replace pdr_nb_subscripts with
3839 PDR_NB_SUBSCRIPTS.
3840 * graphite-poly.h (struct poly_dr): Add nb_subscripts field.
3841 (PDR_NB_SUBSCRIPTS): New.
3842 (pdr_nb_subscripts): Removed.
3843 (pdr_dim): Simplified.
3844 * graphite-sese-to-poly.c (build_poly_dr): Replace pdr_nb_subscripts
3845 with PDR_NB_SUBSCRIPTS.
3846
3847 2009-08-11 Sebastian Pop <sebastian.pop@amd.com>
3848
3849 * graphite-interchange.c (compute_array_size): Remove use of
3850 PDR_DATA_CONTAINER.
3851 * graphite-poly.c (new_poly_dr): Remove argument data_container.
3852 Do not initialize PDR_DATA_CONTAINER.
3853 (print_pdr): Do not print PDR_DATA_CONTAINER.
3854 * graphite-poly.h (struct poly_dr): Remove data_container field.
3855 (PDR_DATA_CONTAINER): Removed.
3856 * graphite-sese-to-poly.c (pdr_add_data_dimensions): Remove use of
3857 PDR_DATA_CONTAINER.
3858 (build_poly_dr): Same.
3859
3860 2009-08-11 Sebastian Pop <sebastian.pop@amd.com>
3861
3862 * gcc.dg/graphite/interchange-9.c: New.
3863
3864 2009-08-05 Konrad Trifunovic <konrad.trifunovic@gmail.com>
3865 Sebastian Pop <sebastian.pop@amd.com>
3866
3867 * graphite-dependences.c (graphite_legal_transform_dr): Work on a
3868 copy of the dependence polyhedron. Free the temporary objects.
3869 (graphite_carried_dependence_level_k): Free unused objects before
3870 returning.
3871
3872 * gcc.dg/graphite/interchange-1.c: XFAILed.
3873 * gcc.dg/graphite/interchange-2.c: XFAILed.
3874 * gcc.dg/graphite/interchange-3.c: XFAILed.
3875 * gcc.dg/graphite/interchange-4.c: XFAILed.
3876 * gcc.dg/graphite/interchange-7.c: XFAILed.
3877
3878 2009-08-05 Sebastian Pop <sebastian.pop@amd.com>
3879
3880 * graphite-blocking.c (scop_do_strip_mine): Call store_scattering.
3881 Early return without analyzing the data dependences if no
3882 transform has been done. Call restore_scattering if the transform
3883 is not legal.
3884 (graphite-interchange.c): Same.
3885 * graphite-poly.c (print_scattering_function): Test for PBB_TRANSFORMED.
3886 (graphite_read_transforms): Initialize PBB_TRANSFORMED.
3887 (apply_poly_transforms): Do not gcc_assert that
3888 the transform is legal.
3889 (new_poly_bb): Initialize PBB_TRANSFORMED, PBB_SAVED, and PBB_ORIGINAL.
3890 Do not initialize PBB_NB_SCATTERING_TRANSFORM, PBB_NB_LOCAL_VARIABLES,
3891 PBB_TRANSFORMED_SCATTERING, and PBB_ORIGINAL_SCATTERING.
3892 (free_poly_dr): Free PBB_TRANSFORMED, PBB_SAVED, and PBB_ORIGINAL.
3893 * graphite-poly.h (struct poly_scattering): New.
3894 (struct poly_bb): Add original, transformed, and saved fields.
3895 Remove transformed_scattering, original_scattering, nb_local_variables,
3896 and nb_scattering_transform fields.
3897 (PBB_ORIGINAL, PBB_TRANSFORMED, PBB_SAVED): New.
3898 (poly_scattering_new): New.
3899 (poly_scattering_free): New.
3900 (poly_scattering_copy): New.
3901 (store_scattering_pbb): New.
3902 (store_scattering): New.
3903 (restore_scattering_pbb): New.
3904 (restore_scattering): New.
3905 * graphite-sese-to-poly.c (build_pbb_scattering_polyhedrons):
3906 Initialize PBB_TRANSFORMED and PBB_ORIGINAL.
3907
3908 2009-08-05 Sebastian Pop <sebastian.pop@amd.com>
3909
3910 * graphite-poly.c (print_pbb): Add parentheses in the pretty print.
3911 (print_scop): Same.
3912
3913 2009-08-05 Sebastian Pop <sebastian.pop@amd.com>
3914
3915 * Makefile.in (graphite.o): Depends on PREDICT_H.
3916 * graphite.c: Include predict.h.
3917 (graphite_finalize): Call tree_estimate_probability.
3918 * predict.c (predict_loops): Do not call scev_initialize and
3919 scev_finalize.
3920 (tree_estimate_probability_bb): New.
3921 (tree_estimate_probability): Do not initialize loops: move that
3922 code to the driver. Call tree_estimate_probability_bb.
3923 (tree_estimate_probability_driver): New.
3924 (pass_profile): Use tree_estimate_probability_driver.
3925 * predict.h (tree_estimate_probability): Declared.
3926
3927 2009-08-05 Sebastian Pop <sebastian.pop@amd.com>
3928
3929 * graphite-clast-to-gimple.c (gloog): Add time to TV_GRAPHITE_CODE_GEN.
3930 * graphite-dependences.c (graphite_legal_transform): Add time to
3931 TV_GRAPHITE_DATA_DEPS.
3932 (dependency_between_pbbs_p): Same.
3933 * timevar.def (TV_GRAPHITE_DATA_DEPS, TV_GRAPHITE_CODE_GEN): New.
3934
3935 2009-08-03 Sebastian Pop <sebastian.pop@amd.com>
3936
3937 * Merge from mainline (r149952:150372).
3938
3939 2009-07-28 Sebastian Pop <sebastian.pop@amd.com>
3940
3941 * ChangeLog.graphite: Fix indenting, white spaces and 80 columns.
3942 * graphite-blocking.c: Same.
3943 * graphite-clast-to-gimple.c: Same.
3944 * graphite-dependences.c: Same.
3945 * graphite-poly.c: Same.
3946 * graphite-poly.h: Same.
3947 * graphite-ppl.c: Same.
3948 * graphite-scop-detection.c: Same.
3949 * graphite-sese-to-poly.c: Same.
3950 * graphite.c: Same.
3951
3952 2009-07-28 Sebastian Pop <sebastian.pop@amd.com>
3953
3954 * graphite-sese-to-poly.c (loop_entry_phi_arg): New.
3955 (remove_simple_copy_phi): New.
3956 (remove_invariant_phi): New.
3957 (simple_copy_phi_p): New.
3958 (reduction_phi_p): New.
3959 (gsi_for_ssa_name_def): New.
3960 (insert_out_of_ssa_copy): New.
3961 (insert_out_of_ssa_copy_on_edge): New.
3962 (create_zero_dim_array): New.
3963 (scalar_close_phi_node_p): New.
3964 (rewrite_close_phi_out_of_ssa): New.
3965 (rewrite_phi_out_of_ssa): New.
3966 (rewrite_reductions_out_of_ssa): New.
3967 (build_poly_scop): Call rewrite_reductions_out_of_ssa.
3968
3969 * gcc.dg/graphite/id-11.c: New.
3970 * gcc.dg/graphite/id-15.c: New.
3971 * gcc.dg/graphite/interchange-1.c: Un-XFAIL.
3972 * gcc.dg/graphite/interchange-2.c: Un-XFAIL.
3973 * gcc.dg/graphite/interchange-3.c: Un-XFAIL.
3974 * gcc.dg/graphite/interchange-4.c: Un-XFAIL.
3975 * gcc.dg/graphite/interchange-7.c: Un-XFAIL.
3976 * gcc.dg/graphite/scop-matmult.c: Un-XFAIL.
3977 * gfortran.dg/graphite/id-13.f: New.
3978 * gfortran.dg/graphite/id-5.f: New.
3979
3980 2009-07-28 Sebastian Pop <sebastian.pop@amd.com>
3981
3982 * graphite-clast-to-gimple.c (graphite_loop_normal_form): Do not
3983 check that nb_reductions_in_loop is zero.
3984 * graphite-scop-detection.c (harmful_stmt_in_bb): Don't filter out
3985 reduction phi nodes.
3986 (nb_reductions_in_loop): Removed.
3987 (graphite_can_represent_loop): Do not call nb_reductions_in_loop.
3988 * graphite-sese-to-poly.c (phi_node_is_iv): Removed.
3989 (bb_contains_non_iv_scalar_phi_nodes): Removed.
3990 (scop_contains_non_iv_scalar_phi_nodes): Removed.
3991 (build_poly_scop): Do not call scop_contains_non_iv_scalar_phi_nodes.
3992
3993 2009-07-28 Sebastian Pop <sebastian.pop@amd.com>
3994
3995 * graphite-clast-to-gimple.c (build_cloog_prog): Do not code generate
3996 statements that have an empty iteration domain.
3997 * gfortran.dg/graphite/id-16.f: New.
3998
3999 2009-07-28 Sebastian Pop <sebastian.pop@amd.com>
4000
4001 * tree-scalar-evolution.c (instantiate_scev_1): Return
4002 chrec_dont_know when the result is not above instantiate_below.
4003 * graphite-scop-detection.c (scopdet_basic_block_info): Fix formatting.
4004 * graphite-sese-to-poly.c (create_linear_expr_from_tree): Assert that
4005 the tree has a known scalar evolution.
4006 * gfortran.dg/graphite/id-14.f: New.
4007 * gfortran.dg/graphite/id-15.f: New.
4008
4009 2009-07-28 Sebastian Pop <sebastian.pop@amd.com>
4010
4011 * sese.c (rename_variables_in_stmt): Pass in an extra parameter
4012 insert_gsi.
4013 (rename_variables): Keep inserting renames after the ones already
4014 inserted.
4015
4016 2009-07-28 Sebastian Pop <sebastian.pop@amd.com>
4017
4018 * graphite-sese-to-poly.c (compare_bb_depths): New.
4019 (graphite_sort_dominated_info): New.
4020 (build_scop_bbs_1): Call graphite_sort_dominated_info.
4021 (build_scop_scattering): Fix comment.
4022
4023 2009-07-28 Sebastian Pop <sebastian.pop@amd.com>
4024
4025 * graphite.c (graphite_finalize): Call print_loops instead of
4026 dump_function_to_file.
4027 * gcc.dg/graphite/graphite.exp: Fix formatting.
4028 * gcc.dg/graphite/pr35356-1.c: New. Look for the number of
4029 loops generated in the graphite output file.
4030 * gcc.dg/graphite/pr35356-2.c: New.
4031 * gcc.dg/graphite/pr35356-3.c: New. XFAILed for now.
4032 * gfortran.dg/graphite/id-12.f: New.
4033
4034 2009-07-24 Li Feng <nemokingdom@gmail.com>
4035
4036 * gcc.dg/graphite/graphite_autopar/force-parallel-8.c:
4037 Remove 2 XFAIL.
4038
4039 2009-07-24 Li Feng <nemokingdom@gmail.com>
4040 Tobias Grosser <grosser@fim.uni-passau.de>
4041
4042 * graphite-sese-to-poly.c (pdr_add_alias_set): Use data reference's
4043 alias set number build alias in ACCESSES polyhedron.
4044 (build_alias_set_for_drs): New.
4045 (build_pbb_drs): Added build_alias_set_for_drs.
4046 * graphite-dependences.c (poly_drs_may_alias_p): New.
4047 (graphite_carried_dependence_level_k): Check alias information
4048 before building polyhedron.
4049
4050 2009-07-24 Tobias Grosser <grosser@fim.uni-passau.de>
4051
4052 * Makefile.in (lambda-code.o): Fix formatting.
4053
4054 2009-07-24 Tobias Grosser <grosser@fim.uni-passau.de>
4055
4056 * Merge from mainline (r149350-149952)
4057
4058 2009-07-18 Tobias Grosser <grosser@fim.uni-passau.de>
4059
4060 * graphite-poly.c (apply_poly_transforms): Move strip_mine
4061 before interchange to prepare for loop blocking.
4062
4063 2009-07-18 Tobias Grosser <grosser@fim.uni-passau.de>
4064
4065 * graphite-poly.c (apply_poly_transforms): Add checks after every
4066 transformation.
4067 * graphite-sese-to-poly.c (build_poly_scop): Remove check, as already
4068 done in apply_poly_transforms.
4069
4070 2009-07-17 Konrad Trifunovic <konrad.trifunovic@gmail.com>
4071
4072 * graphite-dependences.c (build_lexicographically_gt_constraint):
4073 Replace RES parameter with *RES.
4074 (dependence_polyhedron_1): Pass an address of the parameter RES
4075 instead of value of RES.
4076
4077 2009-07-16 Sebastian Pop <sebastian.pop@amd.com>
4078
4079 * graphite.c (graphite_finalize): Fix comment.
4080 (graphite_transform_loops): Reset scev info after code generation
4081 of each scop.
4082
4083 2009-07-16 Sebastian Pop <sebastian.pop@amd.com>
4084
4085 * graphite.c (graphite_finalize): Call scev_reset.
4086
4087 2009-07-16 Sebastian Pop <sebastian.pop@amd.com>
4088
4089 * graphite-clast-to-gimple.c (compute_cloog_iv_types): Do not create
4090 GBB_CLOOG_IV_TYPES hash table twice.
4091 * graphite-sese-to-poly.c (free_gimple_bb): Call free_data_refs.
4092 (add_condition_to_domain): Clear GMP values.
4093
4094 2009-07-16 Sebastian Pop <sebastian.pop@amd.com>
4095
4096 * graphite-dependences.c: Fix formatting.
4097 * graphite-poly.c (free_poly_dr): Also free PDR_DATA_CONTAINER.
4098 (pbb_number_of_iterations): Free ppl_Linear_Expression.
4099 * graphite-sese-to-poly.c: Fix formatting.
4100 * graphite.c (graphite_transform_loops): Create the hash table
4101 after the early return.
4102
4103 2009-07-16 Sebastian Pop <sebastian.pop@amd.com>
4104
4105 * gcc.dg/graphite/id-14.c: New.
4106 * gcc.dg/graphite/pr40157.c: New.
4107 * gfortran.dg/graphite/id-11.f: New.
4108
4109 2009-07-16 Sebastian Pop <sebastian.pop@amd.com>
4110
4111 * graphite-sese-to-poly.c (nb_pbbs_in_loops): New.
4112 (build_poly_scop): Return false when there are no pbbs within
4113 loops to avoid to pass to cloog scops with no loops.
4114
4115 2009-07-16 Sebastian Pop <sebastian.pop@amd.com>
4116
4117 * graphite-sese-to-poly.c (build_pbb_scattering_polyhedrons): Avoid
4118 useless test "i % 2".
4119 (build_pbb_scattering_polyhedrons): Fix formatting.
4120 (build_poly_dr): Same.
4121 * graphite.c (graphite_transform_loops): Restructure.
4122
4123 2009-07-14 Razya Ladelsky <razya@il.ibm.com>
4124
4125 * tree-ssa-loop-manip.c (rewrite_phi_with_iv): Remove
4126 reduction_list parameter.
4127 (rewrite_all_phi_nodes_with_iv): Same.
4128 (canonicalize_loop_ivs): Same.
4129 * tree-parloops.c (struct brli): Removed.
4130 (build_reduction_list_info): Removed.
4131 (build_new_reduction): New.
4132 (analyze_reduction_list): Removed.
4133 (gather_scalar_reductions): Find reductions instead of phi
4134 nodes that can't be canonicalized.
4135 (try_create_reduction_list): Remove reduction_list parameter.
4136 (gen_parallel_loop): Same.
4137 (parallelize_loops): Remove analyze_reductions variable,
4138 initialization and free.
4139 Change reduction_list htab initialization to reduction_info
4140 elements instead of ssa names.
4141 Call try_create_reduction_list and gen_parallel_loop without
4142 analyzed_reduction argument.
4143 * graphite-clast-to-gimple (graphite_loop_normal_form): Call
4144 canonicalize_loop_ivs with one less argument.
4145 * tree-flow.h (canonicalize_loop_ivs): Remove one argument.
4146
4147 2009-07-14 Konrad Trifunovic <konrad.trifunovic@gmail.com>
4148
4149 * graphite-dependences.c (new_poly_dr_pair): New.
4150 (dependence_polyhedron): Renamed into dependence_polyhedron_1.
4151 (new_poly_dr_pair): New.
4152 (eq_poly_dr_pair_p): New.
4153 (hash_poly_dr_pair_p): New.
4154 * graphite-dependences.h (struct poly_dr_pair): New.
4155 (eq_poly_dr_pair_p): Declared.
4156 (hash_poly_dr_pair_p): Declared.
4157 * graphite-poly.c (new_scop): Initialize SCOP_ORIGINAL_PDR_PAIRS.
4158 (free_scop): Free SCOP_ORIGINAL_PDR_PAIRS.
4159 * graphite-poly.h (struct scop): Add original_pdr_pairs field.
4160 * Makefile.in (graphite-poly.o): Add dependence on
4161 graphite-dependences.h.
4162
4163 2009-07-14 Sebastian Pop <sebastian.pop@amd.com>
4164
4165 * graphite-scop-detection.c (graphite_can_represent_scev): Do not let
4166 polynomials of degree > 1 pass to Graphite.
4167 * tree-chrec.c (scev_is_linear_expression): Call
4168 evolution_function_is_affine_multivariate_p.
4169 * gfortran.dg/graphite/id-10.f90: New.
4170
4171 2009-07-14 Sebastian Pop <sebastian.pop@amd.com>
4172
4173 * tree-scalar-evolution.c (compute_overall_effect_of_inner_loop):
4174 Instantiate scevs varying in outer loops.
4175 * gfortran.dg/graphite/id-9.f: Correct testcase.
4176
4177 2009-07-14 Sebastian Pop <sebastian.pop@amd.com>
4178
4179 * graphite-sese-to-poly.c (build_loop_iteration_domains): Do not insert
4180 redundant constraint.
4181
4182 2009-07-14 Sebastian Pop <sebastian.pop@amd.com>
4183
4184 * gcc.dg/graphite/graphite.exp: Fix comments.
4185 * gfortran.dg/graphite/graphite.exp: Trigger actions
4186 based on the file names as in the C testsuite.
4187 * gfortran.dg/graphite/block-1.f90: Fix patterns.
4188 * gfortran.dg/graphite/block-2.f: Same.
4189 * gfortran.dg/graphite/block-3.f90: Same.
4190 * gfortran.dg/graphite/block-4.f90: Same.
4191 * gfortran.dg/graphite/id-1.f90: Same.
4192 * gfortran.dg/graphite/id-2.f90: Same.
4193 * gfortran.dg/graphite/id-3.f90: Same.
4194 * gfortran.dg/graphite/id-4.f90: Same.
4195 * gfortran.dg/graphite/id-6.f: Same.
4196 * gfortran.dg/graphite/id-9.f: Same.
4197 * gfortran.dg/graphite/interchange-1.f: Same.
4198 * gfortran.dg/graphite/interchange-2.f: Same.
4199 * gfortran.dg/graphite/scop-1.f: Same.
4200
4201 2009-07-14 Sebastian Pop <sebastian.pop@amd.com>
4202
4203 * sese.c (expand_scalar_variables_call): New.
4204 (expand_scalar_variables_ssa_name): Handle calls in expander.
4205
4206 2009-07-13 Sebastian Pop <sebastian.pop@amd.com>
4207
4208 * gcc.dg/graphite/graphite_autopar/force-parallel-6.c:
4209 Expect to see the pattern twice.
4210 * gcc.dg/graphite/interchange-0.c: Un-XFAIL.
4211 * gcc.dg/graphite/interchange-5.c: Same.
4212 * gcc.dg/graphite/interchange-6.c: Same.
4213
4214 2009-07-13 Sebastian Pop <sebastian.pop@amd.com>
4215
4216 * gcc.dg/graphite/id-10.c: New.
4217 * gcc.dg/graphite/id-12.c: New.
4218 * gfortran.dg/graphite/id-7.f: New.
4219 * gfortran.dg/graphite/id-8.f: New.
4220
4221 2009-07-13 Sebastian Pop <sebastian.pop@amd.com>
4222
4223 * graphite-sese-to-poly.c (pdr_add_data_dimensions): Fix division by
4224 zero.
4225
4226 2009-07-13 Sebastian Pop <sebastian.pop@amd.com>
4227
4228 * sese.c (rename_variables_in_stmt): Call fold_convert during renaming.
4229
4230 2009-07-13 Sebastian Pop <sebastian.pop@amd.com>
4231
4232 * sese.c (expand_scalar_variables_stmt): Avoid unnecessary expansion.
4233
4234 2009-07-10 Sebastian Pop <sebastian.pop@amd.com>
4235
4236 * graphite-sese-to-poly.c (pdr_add_memory_accesses): Fix order of
4237 building PDR subscripts.
4238
4239 2009-07-10 Sebastian Pop <sebastian.pop@amd.com>
4240
4241 * graphite-sese-to-poly.c (pdr_add_data_dimensions): Fix the
4242 computation of array sizes.
4243
4244 2009-07-10 Sebastian Pop <sebastian.pop@amd.com>
4245
4246 * graphite-sese-to-poly.c (add_param_constraints): Disabled.
4247
4248 2009-07-10 Tobias Grosser <grosser@fim.uni-passau.de>
4249
4250 * graphite-dependences.c (map_into_dep_poly, map_dr_into_dep_poly,
4251 build_pairwise_constraint, dr_equality_constraints,
4252 build_pairwise_scheduling_equality,
4253 build_pairwise_scheduling_inequality, lexicographically_gt_p,
4254 build_lexicographically_gt_constraint, dependence_polyhedron,
4255 graphite_legal_transform_dr, graphite_carried_dependence_level_k):
4256 Move from NNC_Polyhedron to C_Polyhedron.
4257 * graphite-interchange.c (compute_array_size_poly,
4258 gather_access_strides): Dito.
4259 * graphite-poly.c (apply_poly_transforms, new_poly_dr, free_poly_bb,
4260 free_scop, pbb_number_of_iterations): Dito.
4261 * graphite-poly.h (struct poly_dr, pdr_nb_subscripts, struct poly_bb,
4262 pbb_dim_iter_domain, struct scop): Dito.
4263 * graphite-ppl.c (new_Constraint_System_from_Cloog_Matrix,
4264 new_Cloog_Domain_from_ppl_Polyhedron,
4265 new_Cloog_Domain_from_ppl_Pointset_Powerset, ppl_set_coef_gmp,
4266 ppl_insert_dimensions_pointset, ppl_insert_dimensions_pointset,
4267 ppl_strip_loop, ppl_strip_loop, ppl_print_polyhedron_matrix,
4268 ppl_print_powerset_matrix, debug_ppl_polyhedron_matrix,
4269 debug_ppl_powerset_matrix, ppl_read_polyhedron_matrix): Dito.
4270 * graphite-ppl.h (ppl_Pointset_Powerset_C_Polyhedron_t,
4271 new_C_Polyhedron_from_Cloog_Matrix, ppl_print_powerset_matrix,
4272 debug_ppl_powerset_matrix, ppl_insert_dimensions_pointset): Dito.
4273 * graphite-sese-to-poly.c (build_pbb_scattering_polyhedrons,
4274 build_loop_iteration_domains, ppl_constraint_type_from_tree_code,
4275 add_condition_to_domain, add_condition_to_pbb, build_scop_context,
4276 build_scop_iteration_domain, build_poly_dr): Dito
4277
4278 2009-07-09 Sebastian Pop <sebastian.pop@amd.com>
4279
4280 * gcc.dg/graphite/graphite.exp: Added a rule to execute
4281 run-id-*.c files.
4282 * gcc.dg/graphite/run-id-1.c: New.
4283
4284 2009-07-09 Sebastian Pop <sebastian.pop@amd.com>
4285
4286 * graphite-sese-to-poly.c (build_loop_iteration_domains): Add the
4287 positivity constraint on the symbolic number of iterations.
4288
4289 2009-07-09 Sebastian Pop <sebastian.pop@amd.com>
4290
4291 * graphite-sese-to-poly.c (build_loop_iteration_domains): Rewrite.
4292
4293 2009-07-09 Sebastian Pop <sebastian.pop@amd.com>
4294 Tobias Grosser <grosser@fim.uni-passau.de>
4295
4296 * graphite-clast-to-gimple.c (build_scop_context): Removed.
4297 (build_cloog_prog): Directly use SCOP_CONTEXT.
4298 * graphite-poly.c (new_scop): Initialize SCOP_CONTEXT.
4299 (free_scop): Free SCOP_CONTEXT.
4300 (print_scop_context): New.
4301 (print_scop): Call print_scop_context.
4302 (debug_scop_context): New.
4303 * graphite-poly.h (print_scop_context, debug_scop_context): Declared.
4304 (struct scop): Added field context.
4305 (SCOP_CONTEXT): New.
4306 * graphite-sese-to-poly.c (add_param_constraints): New.
4307 (build_scop_context): New.
4308 (build_poly_scop): Call build_scop_context.
4309
4310 2009-07-09 Sebastian Pop <sebastian.pop@amd.com>
4311
4312 * graphite-clast-to-gimple.c (gmp_cst_to_tree): Moved...
4313 * graphite-ppl.c (ppl_set_inhomogeneous_gmp, ppl_set_coef_gmp): New.
4314 (ppl_set_inhomogeneous, ppl_set_coef): Moved...
4315 * graphite-ppl.h: Include double-int.h and tree.h.
4316 (ppl_set_inhomogeneous_gmp, ppl_set_coef_gmp): Declared.
4317 (ppl_set_inhomogeneous, ppl_set_coef): ...here.
4318 (gmp_cst_to_tree): ...here. Reimplemented using mpz_get_double_int.
4319 (tree_int_to_gmp, ppl_set_inhomogeneous_tree, ppl_set_coef_tree): New.
4320
4321 2009-07-09 Sebastian Pop <sebastian.pop@amd.com>
4322
4323 * graphite-clast-to-gimple.c (clast_to_gcc_expression_red): Generate
4324 POINTER_PLUS_EXPR for pointer types.
4325 (clast_to_gcc_expression): Same.
4326
4327 2009-07-09 Sebastian Pop <sebastian.pop@amd.com>
4328
4329 * graphite-poly.c (print_scattering_function): Early return when
4330 PBB_TRANSFORMED_SCATTERING is not initialized.
4331 (print_pbb_domain): Early return when PBB_DOMAIN is not initialized.
4332
4333 2009-07-08 Sebastian Pop <sebastian.pop@amd.com>
4334
4335 * tree-parloops.c (analyze_reduction_list): Remove unused variable
4336 to fix bootstrap.
4337
4338 2009-07-08 Razya Ladelsky <razya@il.ibm.com>
4339
4340 * tree-parloops.c (analyze_reduction_list): Change return
4341 value to void.
4342 (try_create_reduction_list): Move the call to
4343 analyze_reduction_list to the beginining.
4344 Call reduction_phi with analyzed_reductions as argument
4345 instead of reduction_list.
4346
4347 2009-07-08 Tobias Grosser <grosser@fim.uni-passau.de>
4348
4349 * Merge from mainline (r148296:149346)
4350
4351 2009-07-07 Sebastian Pop <sebastian.pop@amd.com>
4352
4353 * graphite-scop-detection.c (graphite_can_represent_init): New.
4354 (graphite_can_represent_scev): Call graphite_can_represent_init:
4355 check that the initial value does not contain multiplications of
4356 parameters.
4357 (stmt_has_simple_data_refs_p): New.
4358 (stmt_simple_for_scop_p): Call stmt_simple_for_scop_p.
4359 (is_simple_operand): Fix formatting.
4360 * graphite-sese-to-poly.c (try_generate_gimple_bb): Fix formatting.
4361
4362 2009-07-07 Sebastian Pop <sebastian.pop@amd.com>
4363
4364 * gcc.dg/graphite/id-13.c: New.
4365 * graphite-sese-to-poly.c (graphite_stmt_p): Do not call
4366 analyze_scalar_evolution, use scalar_evolution_in_region.
4367 (scan_tree_for_params_right_scev): Add extra assert.
4368 (parameter_index_in_region_1): Split from parameter_index_in_region.
4369 (idx_record_params): Use scalar_evolution_in_region.
4370 (find_params_in_bb): Same.
4371 (find_scop_parameters): Same.
4372 (build_loop_iteration_domains): Same.
4373 (create_linear_expr_from_tree): Same.
4374 * sese.c (scalar_evolution_in_region): New.
4375 * sese.h (scalar_evolution_in_region): Declared.
4376 (defined_in_sese_p): New.
4377 * tree-scalar-evolution.c (compute_overall_effect_of_inner_loop): Not
4378 static anymore.
4379 * tree-scalar-evolution.h (compute_overall_effect_of_inner_loop):
4380 Declared.
4381
4382 2009-07-07 Sebastian Pop <sebastian.pop@amd.com>
4383
4384 * Makefile.in: Replace dependences on tree-chrec.h with SCEV_H.
4385 TREE_DATA_REF_H also implies SCEV_H.
4386
4387 2009-07-07 Sebastian Pop <sebastian.pop@amd.com>
4388
4389 * graphite-poly.c (print_scop_params): New.
4390 (print_scop): Call print_scop_params.
4391 (debug_scop_params): New.
4392 * graphite-poly.h (print_scop_params, debug_scop_params): Declared.
4393
4394 2009-07-07 Li Feng <nemokingdom@gmail.com>
4395
4396 * gcc.dg/graphite/graphite_autopar/force-parallel-4.c: New.
4397 * gcc.dg/graphite/graphite_autopar/force-parallel-5.c: New.
4398 * gcc.dg/graphite/graphite_autopar/force-parallel-6.c: New.
4399 * gcc.dg/graphite/graphite_autopar/force-parallel-7.c: New.
4400 * gcc.dg/graphite/graphite_autopar/force-parallel-8.c: New.
4401 * gcc.dg/graphite/graphite_autopar/force-parallel-9.c: New.
4402
4403 2009-07-07 Li Feng <nemokingdom@gmail.com>
4404
4405 * graphite-clast-to-gimple.c (mark_loops_parallel): Dump information
4406 for dependency checking part.
4407 * gcc.dg/graphite/graphite_autopar/force-parallel-1.c: Add
4408 tests for dependency checking.
4409 * gcc.dg/graphite/graphite_autopar/force-parallel-2.c: Ditto.
4410 * gcc.dg/graphite/graphite_autopar/force-parallel-3.c: Ditto.
4411 * gcc.dg/graphite/graphite_autopar/graphite_autopar.exp: Add
4412 flag -fdump-tree-graphite-all for autopar testsuites.
4413
4414 2009-07-06 Sebastian Pop <sebastian.pop@amd.com>
4415
4416 * Makefile.in (tree-ssa-loop-manip.o): Depends on langhooks.h.
4417 * tree-parloops.c (rewrite_phi_with_iv, rewrite_all_phi_nodes_with_iv,
4418 canonicalize_loop_ivs): Moved...
4419 * tree-ssa-loop-manip.c: ... here. Include langhooks.h.
4420
4421 2009-07-06 Sebastian Pop <sebastian.pop@amd.com>
4422
4423 * tree-parloops.c (try_create_reduction_list): Pass an extra
4424 argument analyzed_reductions. Call analyze_reduction_list.
4425 (gen_parallel_loop): Do not call analyze_reduction_list.
4426 (parallelize_loops): Init and finalize analyzed_reductions.
4427
4428 2009-07-06 Li Feng <nemokingdom@gmail.com>
4429
4430 * gcc.dg/graphite/graphite_autopar/graphite_autopar.exp:
4431 Added flag -fno-loop-strip-mine for autopar testcase.
4432
4433 2009-07-04 Li Feng <nemokingdom@gmail.com>
4434
4435 * graphite-dependences.c (graphite_carried_dependence_level_k): Use
4436 transformed scattering dimension instead of unmatch orignal when
4437 calling dependence_polyhedron.
4438
4439 2009-06-30 Sebastian Pop <sebastian.pop@amd.com>
4440
4441 * opts.c (decode_options): Enable flag_loop_strip_mine at -O2.
4442
4443 2009-06-30 Sebastian Pop <sebastian.pop@amd.com>
4444
4445 * graphite-poly.c (pbb_number_of_iterations): Check for returned
4446 value 1 from ppl_Pointset_Powerset_NNC_Polyhedron_maximize.
4447
4448 2009-06-30 Sebastian Pop <sebastian.pop@amd.com>
4449
4450 * graphite-blocking.c (pbb_strip_mine_profitable_p): New.
4451 (pbb_do_strip_mine): Call pbb_strip_mine_profitable_p.
4452 * graphite-poly.c (pbb_number_of_iterations): New.
4453 * graphite-poly.h (pbb_number_of_iterations): Declared.
4454 (pbb_iterator_dim, pbb_parameter_dim): New.
4455
4456 2009-06-29 Sebastian Pop <sebastian.pop@amd.com>
4457
4458 * graphite-clast-to-gimple.c (graphite_create_new_loop): Revert the
4459 last commit on type of lower and upper bound of loops.
4460
4461 2009-06-29 Li Feng <nemokingdom@gmail.com>
4462
4463 * Makefile.in (graphite-clast-to-gimple.o): Added dependence on
4464 graphite-dependences.h.
4465 * graphite-clast-to-gimple.c (new_bb_pbb_def): New.
4466 (mark_bb_with_pbb): New.
4467 (get_stmtfor_depth): New.
4468 (find_pbb_via_hash): New.
4469 (dependency_in_loop_p): New.
4470 (mark_loops_parallel): New.
4471 (free_aux_in_new_loops): New.
4472 (translate_clast): Add parameter BB_PBB_MAPPING. Mark newly created
4473 bb with it's relevant pbb. Mark newly created loops. Remove mark
4474 innermost loop parallel without checking.
4475 (gloog): Add parameter BB_PBB_MAPPING.
4476 * graphite-clast-to-gimple.h (struct bb_pbb_def): New.
4477 (gloog): Change declaration.
4478 (mark_loop_parallel): Make extern.
4479 (free_aux_in_new_loops): Declare.
4480 (bb_pbb_map_hash): New.
4481 (eq_bb_pbb_map): New.
4482 * graphite.c (graphite_transform_loops): Added BB_PBB_MAPPING. Trigger
4483 auto parallelization when flag_graphite_force_parallel is set.
4484 (graphite_finalize): Added free_aux_in_new_loops.
4485 * tree-parloops.c (parallelize_loops): Only generate parallel code for
4486 the innermost loop that marked parallel. Use
4487 flag_graphite_force_parallel instead of loop->can_be_parallel.
4488 (loop_parallel_p): Move inner most checking out of function.
4489
4490 2009-06-26 Sebastian Pop <sebastian.pop@amd.com>
4491
4492 * graphite-clast-to-gimple.c (graphite_create_new_loop): Make the
4493 type of lower and upper bound of loops signed long int.
4494
4495 2009-06-26 Sebastian Pop <sebastian.pop@amd.com>
4496
4497 * cfgloopmanip.c (create_empty_loop_on_edge): Gimplify the loop exit
4498 expression outside the loop.
4499
4500 2009-06-26 Sebastian Pop <sebastian.pop@amd.com>
4501
4502 * gcc.dg/graphite/interchange-8.c: New.
4503
4504 2009-06-26 Sebastian Pop <sebastian.pop@amd.com>
4505
4506 * gcc.dg/graphite/interchange-0.c: XFailed.
4507 * gcc.dg/graphite/interchange-5.c: XFailed.
4508 * gcc.dg/graphite/interchange-6.c: XFailed.
4509
4510 2009-06-26 Sebastian Pop <sebastian.pop@amd.com>
4511
4512 * graphite-interchange.c (compute_array_size_poly): The end of the
4513 recursion should return 1.
4514
4515 2009-06-26 Sebastian Pop <sebastian.pop@amd.com>
4516
4517 * graphite-interchange.c (compute_array_size_cstr): Allow the
4518 subscript multiplier to be -1.
4519 (compute_array_size): Use PDR_DATA_CONTAINER and not PDR_ACCESSES.
4520 * graphite-poly.c (new_poly_dr): Takes an extra argument for the
4521 data_container. Initializes PDR_DATA_CONTAINER.
4522 (print_pdr_access_layout): New.
4523 (print_pdr): Call print_pdr_access_layout. Print PDR_DATA_CONTAINER.
4524 * graphite-poly.h (struct poly_dr): Adjust comment. Add a new field
4525 data_container.
4526 (PDR_DATA_CONTAINER): New.
4527 (new_poly_dr): Update declaration.
4528 * graphite-sese-to-poly.c (pdr_add_data_dimensions): New.
4529 (build_poly_dr): Call pdr_add_data_dimensions.
4530
4531 2009-06-26 Sebastian Pop <sebastian.pop@amd.com>
4532
4533 * graphite-poly.h (struct poly_dr): Fix comment.
4534 * graphite-sese-to-poly.c (pdr_add_alias_set): New.
4535 (pdr_add_memory_accesses): New.
4536 (build_poly_dr): Call pdr_add_memory_accesses and pdr_add_alias_set.
4537
4538 2009-06-26 Sebastian Pop <sebastian.pop@amd.com>
4539
4540 * graphite-poly.c (print_pdrs, debug_pdrs): New.
4541 (print_pbb): Add call to print_pdrs.
4542 * graphite-poly.h (print_pdrs, debug_pdrs): Declared.
4543
4544 2009-06-24 Konrad Trifunovic <konrad.trifunovic@gmail.com>
4545 Li Feng <nemokingdom@gmail.com>
4546
4547 * graphite-dependences.c (graphite_carried_dependence_level_k): New.
4548 (dependency_between_pbbs_p): New.
4549 (lexicographically_gt_p): Assure !empty_p before polyhedron
4550 intersection assign.
4551 (build_lexicographically_gt_constraint): Correct lexicographically
4552 judging.
4553 * graphite-dependences.h: New.
4554 * Makefile.in (graphite-dependences.o): Add graphite-dependences.h.
4555
4556 2009-06-24 Sebastian Pop <sebastian.pop@amd.com>
4557
4558 * graphite-clast-to-gimple.c (print_clast_stmt): New.
4559 (gloog): Print to dump_file the generated clast.
4560 * graphite-clast-to-gimple.h (print_clast_stmt): Declared.
4561 * graphite-interchange.c (pbb_do_interchange): Fix dump formatting.
4562
4563 2009-06-24 Sebastian Pop <sebastian.pop@amd.com>
4564
4565 * graphite-poly.c (extend_scattering): Increment
4566 PBB_NB_LOCAL_VARIABLES by the number of added dimensions.
4567
4568 2009-06-24 Sebastian Pop <sebastian.pop@amd.com>
4569
4570 * graphite-interchange.c (compute_array_size_poly): Added exit of
4571 recursion condition. Continue iterating even after the first equality.
4572 (compute_array_size): Same.
4573
4574 2009-06-24 Li Feng <nemokingdom@gmail.com>
4575
4576 * gcc.dg/graphite/graphite_autopar/force-parallel-1.c: Update
4577 -fdump-tree-final_cleanup to -fdump-tree-optimized.
4578 * gcc.dg/graphite/graphite_autopar/force-parallel-2.c: Ditto.
4579 * gcc.dg/graphite/graphite_autopar/force-parallel-3.c: Ditto.
4580 * gcc.dg/graphite/graphite_autopar/graphite_autopar.exp: Ditto.
4581
4582 2009-06-23 Sebastian Pop <sebastian.pop@amd.com>
4583
4584 * sese.c (expand_scalar_variables_stmt): Expand scalar variables
4585 only when the use verifies is_gimple_reg.
4586
4587 2009-06-23 Sebastian Pop <sebastian.pop@amd.com>
4588
4589 * graphite-clast-to-gimple.c (build_cloog_prog): Fix memory corruption.
4590 Allocate scaldims after call to unify_scattering_dimensions.
4591
4592 2009-06-23 Sebastian Pop <sebastian.pop@amd.com>
4593
4594 * graphite-clast-to-gimple.c (translate_clast): Fix memory leak.
4595
4596 2009-06-23 Sebastian Pop <sebastian.pop@amd.com>
4597 Albert Cohen <albert.cohen@inria.fr>
4598
4599 * graphite-blocking.c (pbb_strip_mine_loop_depth): Do not use local
4600 variables for the strip mining.
4601
4602 2009-06-23 Sebastian Pop <sebastian.pop@amd.com>
4603 Pranav Garg <pranav.garg2107@gmail.com>
4604
4605 * Makefile.in (OBJS-common): Added graphite-blocking.o.
4606 (graphite-sese-to-poly.o): Moved down to be in lexicographical order.
4607 (graphite-blocking.o): New rule.
4608 (graphite-poly.o, graphite-ppl.o): Moved to be in lexicographical order.
4609 * graphite-blocking.c: New.
4610 * graphite-poly.c (apply_poly_transforms): Call scop_do_strip_mine for
4611 flag_loop_strip_mine.
4612 (psct_scattering_dim_for_loop_depth): New.
4613 * graphite-poly.h (scop_do_strip_mine): Declared.
4614 (psct_add_local_variable): Increment PBB_NB_LOCAL_VARIABLES.
4615 * tree-ssa-loop.c (gate_graphite_transforms): Do not fail when using
4616 flag_loop_strip_mine.
4617
4618 2009-06-23 Sebastian Pop <sebastian.pop@amd.com>
4619
4620 * graphite-poly.c (extend_scattering): Avoid initializing and freeing
4621 a GMP value and a PPL coefficient at each iteration of a loop.
4622
4623 2009-06-23 Sebastian Pop <sebastian.pop@amd.com>
4624
4625 * graphite-dependences.c (dependence_polyhedron): Do not use
4626 pbb_nb_scattering_dims anymore. Use pbb_nb_scattering_orig and
4627 pbb_nb_scattering_transform.
4628 (graphite_legal_transform_dr): Same.
4629 * graphite-poly.c (extend_scattering): Same.
4630 (unify_scattering_dimensions): Same.
4631 (print_scattering_function): Same.
4632 (new_poly_bb): Initialize PBB_NB_SCATTERING_TRANSFORM and
4633 PBB_NB_LOCAL_VARIABLES.
4634 * graphite-poly.h (pbb_nb_scattering): Removed declaration.
4635 (struct poly_bb): Added nb_local_variables and nb_scattering_transform.
4636 (PBB_NB_LOCAL_VARIABLES, PBB_NB_SCATTERING_TRANSFORM): New.
4637 (pbb_nb_scattering_orig, pbb_nb_scattering_transform): New.
4638 (pbb_nb_scattering_dims, pbb_nb_scattering): Removed.
4639 (pbb_nb_scattering_transform): New.
4640 (pbb_nb_local_vars): Return PBB_NB_LOCAL_VARIABLES.
4641 (psco_scattering_dim): Add assert on parameters.
4642 (psct_scattering_dim): Same.
4643 (psct_scattering_dim_for_loop_depth): Declared.
4644 (psct_local_var_dim): New.
4645 (psco_iterator_dim, psco_parameter_dim): Add assert on parameters.
4646 (psct_iterator_dim, psct_parameter_dim): Same. To maintain the
4647 correct layout, call pbb_nb_local_vars.
4648 (psct_add_local_variable, psct_add_scattering_dimension): New.
4649 * graphite-sese-to-poly.c (build_pbb_scattering_polyhedrons):
4650 Initialize PBB_NB_SCATTERING_TRANSFORM.
4651
4652 2009-06-23 Sebastian Pop <sebastian.pop@amd.com>
4653
4654 * graphite-ppl.c (set_inhomogeneous): Renamed ppl_set_inhomogeneous.
4655 (set_coef): Renamed ppl_set_coef.
4656 * graphite-ppl.h (ppl_set_inhomogeneous, ppl_set_coef): Declared.
4657
4658 2009-06-23 Sebastian Pop <sebastian.pop@amd.com>
4659
4660 * graphite-dependences.c (build_pairwise_scheduling_inequality): Don't
4661 test a boolean against 1.
4662 * graphite-interchange.c (pbb_interchange_loop_depths): Do not build
4663 a new polyhedron for the PBB_TRANSFORMED_SCATTERING.
4664 (pbb_do_interchange): Returns true when a transform has been performed.
4665 (scop_do_interchange): Same.
4666 * graphite-poly.c (apply_poly_transforms): Use the return value of
4667 scop_do_interchange.
4668 * graphite-poly.h (scop_do_interchange): Update declaration.
4669
4670 2009-06-23 Tobias Grosser <grosser@fim.uni-passau.de>
4671
4672 * graphite-clast-to-gimple.c (gloog): Reset loop->aux right
4673 after last use.
4674 * sese.c (sese_reset_aux_in_loops): New.
4675 * sese.h (sese_reset_aux_in_loops): New.
4676
4677 2009-06-19 Sebastian Pop <sebastian.pop@amd.com>
4678
4679 * graphite-sese-to-poly.c (scan_tree_for_params_int): Pass in the
4680 multiplier and multiply the constant by the multiplier.
4681 (scan_tree_for_params): Bound the multiplier to its MULT_EXPR.
4682 (build_poly_dr): Do not use the multiplier to define the subscript.
4683
4684 2009-06-19 Sebastian Pop <sebastian.pop@amd.com>
4685
4686 * graphite-poly.c (new_poly_dr): Pass an extra argument for the
4687 compiler's data reference. Initialize PDR_CDR.
4688 (print_pdr): Call dump_data_reference.
4689 * graphite-poly.h (struct poly_dr): Rename black_box into pbb.
4690 Add compiler_dr field.
4691 (PDR_BB): Renamed PDR_PBB.
4692 (PDR_CDR): New.
4693 * graphite-sese-to-poly.c (build_poly_dr): Pass to new_poly_dr
4694 GCC's data reference representation.
4695 * tree-data-ref.c (debug_data_references, debug_data_reference): New.
4696 * tree-data-ref.h (debug_data_references, debug_data_reference): Decl.
4697
4698 2009-06-19 Sebastian Pop <sebastian.pop@amd.com>
4699
4700 * graphite-poly.c (print_scattering_function): Also print the layout.
4701 * graphite-poly.h (pbb_nb_local_vars): New.
4702
4703 2009-06-19 Sebastian Pop <sebastian.pop@amd.com>
4704
4705 * graphite-poly.c (print_pbb_domain): Also print the layout names.
4706
4707 2009-06-19 Sebastian Pop <sebastian.pop@amd.com>
4708
4709 * graphite-poly.c (print_pdr, debug_pdr): New.
4710 * graphite-poly.h (print_pdr, debug_pdr): Declared.
4711 (PDR_BASE): Removed.
4712
4713 2009-06-18 Sebastian Pop <sebastian.pop@amd.com>
4714
4715 * gcc.dg/graphite/interchange-{1..7}.c: New avatars of
4716 ltrans-{1..6,8}.c.
4717
4718 2009-06-18 Sebastian Pop <sebastian.pop@amd.com>
4719
4720 * graphite-interchange.c (compute_subscript): Allow also -1 in the
4721 subscript identification column.
4722 (pbb_do_interchange): Print to dump_file that some loops "will be
4723 interchanged". Rely on that chain of characters in the testcases.
4724 * gcc.dg/graphite/interchange-0.c: New.
4725 * gcc.dg/graphite/graphite.exp: Iterate over the testsuite
4726 interchange-*.c files and compile them with -floop-interchange.
4727
4728 2009-06-18 Pranav Garg <pranav.garg2107@gmail.com>
4729
4730 * graphite-interchange.c (interchange_profitable_p): Renamed
4731 pbb_interchange_profitable_p.
4732
4733 2009-06-18 Sebastian Pop <sebastian.pop@amd.com>
4734 Harsha Jagasia <harsha.jagasia@amd.com>
4735 Pranav Garg <pranav.garg2107@gmail.com>
4736
4737 * graphite-interchange.c (interchange_profitable_p): Make static.
4738 (pbb_interchange_loop_depths, pbb_do_interchange,
4739 scop_do_interchange): New.
4740 * graphite-poly.c (apply_poly_transforms): Call scop_do_interchange
4741 for flag_loop_interchange.
4742 * graphite-poly.h (scop_do_interchange): Declared.
4743 * tree-ssa-loop.c (gate_graphite_transforms): Do not fail when
4744 flag_loop_interchange is used.
4745
4746 2009-06-18 Sebastian Pop <sebastian.pop@amd.com>
4747
4748 * graphite-dependences.c (dependence_polyhedron): Update use of
4749 pbb_nb_scattering_dims.
4750 * graphite-poly.h (pbb_nb_scattering_dims): Do not pass SCOP.
4751 (pbb_nb_scattering): Update use of pbb_nb_scattering_dims.
4752 (psco_scattering_dim, psct_scattering_dim, psco_iterator_dim,
4753 psct_iterator_dim, psco_parameter_dim, psct_parameter_dim): New.
4754
4755 2009-06-16 Sebastian Pop <sebastian.pop@amd.com>
4756
4757 * graphite.c: Cleanup foo.
4758
4759 2009-06-16 Sebastian Pop <sebastian.pop@amd.com>
4760
4761 * Merge from mainline (r143684:148293).
4762 * Disabled libpcp until it gets fixed.
4763
4764 2009-06-05 Sebastian Pop <sebastian.pop@amd.com>
4765 Harsha Jagasia <harsha.jagasia@amd.com>
4766
4767 * graphite-interchange.c: New.
4768 * Makefile.in (graphite-interchange.o): New.
4769 * graphite-poly.h (interchange_profitable_p): Declared.
4770 * graphite-ppl.h (value_max): New.
4771
4772 2009-06-04 Sebastian Pop <sebastian.pop@amd.com>
4773
4774 * graphite-dependences.c (dependence_polyhedron): Use pdr_dim.
4775 * graphite-poly.h: Fix some comments.
4776 (pdr_dim): New.
4777 (pdr_scop): New.
4778
4779 2009-06-04 Sebastian Pop <sebastian.pop@amd.com>
4780
4781 * graphite-poly.h
4782 (pdr_accessp_nb_subscripts): Renamed pdr_nb_subscripts.
4783 (pdr_accessp_nb_iterators): Renamed pdr_dim_iter_domain.
4784 (pdr_accessp_nb_params): Renamed pdr_nb_params.
4785 (pdr_accessp_alias_set_dim): Renamed pdr_alias_set_dim.
4786 (pdr_accessp_subscript_dim): Renamed pdr_subscript_dim.
4787 (pdr_accessp_iterator_dim): Renamed pdr_iterator_dim.
4788 (pdr_accessp_param_dim): Renamed pdr_parameter_dim.
4789 (pbb_nb_loops): Renamed pbb_dim_iter_domain.
4790 * graphite-clast-to-gimple.c: Same.
4791 * graphite-dependences.c: Same.
4792 * graphite-poly.c: Same.
4793 * graphite-sese-to-poly.c: Same.
4794
4795 2009-06-03 Sebastian Pop <sebastian.pop@amd.com>
4796
4797 * graphite-clast-to-gimple.c (build_iv_mapping): Insert full
4798 expressions for an IV rename, as returned by clast_to_gcc_expression.
4799 (copy_renames): Rename new_name to expr.
4800 * sese.c (debug_rename_elt): Same.
4801 (get_rename): Same.
4802 (set_rename): Same.
4803 (sese_adjust_liveout_phis): Call force_gimple_operand before using
4804 the information from the rename map.
4805 (rename_variables_in_stmt): Same.
4806 (add_loop_exit_phis): Rename new_name to expr.
4807 (insert_loop_close_phis): Same.
4808 (add_guard_exit_phis): Same. Call force_gimple_operand.
4809 * sese.h (struct rename_map_elt): Rename new_name to expr.
4810 (new_rename_map_elt): Same.
4811
4812 2009-06-03 Sebastian Pop <sebastian.pop@amd.com>
4813
4814 * graphite-clast-to-gimple.c (build_iv_mapping): Use set_rename.
4815 * sese.c (set_rename): Make it extern.
4816 * sese.h (set_rename): Declared.
4817
4818 2009-06-03 Sebastian Pop <sebastian.pop@amd.com>
4819
4820 * graphite-poly.c (extend_scattering): Free values.
4821 * graphite-ppl.c (new_Cloog_Domain_from_ppl_Pointset_Powerset):
4822 Free iterators.
4823 (ppl_print_powerset_matrix): Same.
4824 * graphite-scop-detection.c (free_scops_1): New.
4825 (limit_scops): Call free_scops_1.
4826 * graphite-sese-to-poly.c (build_scop_bbs_1): Free dom.
4827 (build_poly_dr): Free PPL coefficients.
4828 * tree-parloops.c (rewrite_all_phi_nodes_with_iv): Free bbs.
4829
4830 2009-06-02 Sebastian Pop <sebastian.pop@amd.com>
4831
4832 * graphite-dependences.c: New.
4833 * graphite-data-ref.c: Removed.
4834 * graphite-data-ref.h: Removed.
4835 * Makefile.in (graphite-data-ref.o): Removed.
4836 (graphite-dependences.o): Added.
4837 * graphite-clast-to-gimple.c: Remove dependence on graphite-data-ref.h.
4838 * graphite-poly.c: Same.
4839 Move the data dependence testing to graphite-dependences.c.
4840
4841 2009-05-19 Tobias Grosser <grosser@fim.uni-passau.de>
4842
4843 * graphite-scop-detection.c (graphite_can_represent_loop): Renamed
4844 from graphite_cannot_represent_loop. Code refactored.
4845 (scopdet_basic_block_info): Call graphite_can_represent_loop.
4846
4847 2009-05-17 Li Feng <nemokingdom@gmail.com>
4848
4849 * gcc.dg/graphite/graphite_autopar/graphite_autopar.exp:
4850 Cover all the testcases (not only the filtered ones).
4851
4852 2009-05-17 Tobias Grosser <grosser@fim.uni-passau.de>
4853
4854 * graphite-scop-detection.c (stmt_simple_for_scop_p): Remove
4855 unnecessary check. Update comments. Move check for REAL_TYPE here.
4856 (harmful_stmt_in_bb): Remove checks for conditions. This is already
4857 done in (stmt_simple_for_scop_p).
4858
4859 2009-05-14 Tobias Grosser <grosser@fim.uni-passau.de>
4860
4861 * graphite.c (print_global_statistics): New.
4862 (print_graphite_scop_statistic): New.
4863 (print_graphite_statistics): New.
4864 (graphite_initialize, graphite_transform_loops): Print statistics.
4865 * graphite-scop-detection (build_scops): Print statistics.
4866 (print_graphite_scop_statistics): New.
4867 (print_graphite_statistics): New.
4868
4869 2009-05-13 Sebastian Pop <sebastian.pop@amd.com>
4870
4871 * graphite-clast-to-gimple.c (struct clast_name_index): Removed.
4872 (debug_clast_name_index): Removed.
4873 (debug_clast_name_indexes_1): Removed.
4874 (debug_clast_name_indexes): Removed.
4875 (clast_name_index_elt_info): Removed.
4876 (eq_clast_name_indexes): Removed.
4877 (clast_name_to_index): Removed.
4878 (new_clast_name_index): Removed.
4879 (save_clast_name_index): Removed.
4880 (save_var_name): Moved...
4881 (init_sese_params_index): Removed.
4882 (clast_name_to_gcc): Remove use of name_tree.
4883 (initialize_cloog_names): Same.
4884 (gloog): Do not call init_sese_params_index.
4885 * graphite-sese-to-poly.c (save_var_name): ...here.
4886 (parameter_index_in_region): New.
4887 * sese.c (new_sese): Initialize SESE_PARAMS_NAMES.
4888 (parameter_index_in_region): Removed.
4889 (is_parameter): Remove use of name_tree.
4890 * sese.h (struct name_tree): Removed.
4891 (struct sese): Remove use of name_tree. New field params_names.
4892 (SESE_PARAMS_NAMES): New.
4893 (SESE_PARAMS): Remove duplicate.
4894 (parameter_index_in_region): Removed.
4895 (sese_nb_params): Remove use of name_tree.
4896 (struct clast_name_index): New.
4897 (new_clast_name_index): New.
4898 (clast_name_to_index): New.
4899 (save_clast_name_index): New.
4900 (debug_clast_name_index): New.
4901 (debug_clast_name_indexes_1): New.
4902 (debug_clast_name_indexes): New.
4903 (clast_name_index_elt_info): New.
4904 (eq_clast_name_indexes): New.
4905
4906 2009-05-13 Sebastian Pop <sebastian.pop@amd.com>
4907
4908 * graphite-clast-to-gimple.c (compute_cloog_iv_types_1): Call
4909 pbb_to_depth_to_oldiv. Remove call to oldiv_for_loop.
4910 (graphite_loop_normal_form): Do not pass region. Do not
4911 initialize SESE_OLDIVS.
4912 (build_graphite_loop_normal_form): Update call to
4913 graphite_loop_normal_form.
4914 * sese.c (debug_oldivs): Removed.
4915 (new_sese): Do not initialize SESE_OLDIVS.
4916 (free_sese): Do not free SESE_OLDIVS.
4917 (oldiv_for_loop): Removed.
4918 * sese.h (struct sese): Remove old_ivs.
4919 (SESE_OLDIVS): Removed.
4920 (oldiv_for_loop): Removed.
4921
4922 2009-05-13 Sebastian Pop <sebastian.pop@amd.com>
4923
4924 * graphite-clast-to-gimple.c (clast_name_to_gcc): Pass newivs,
4925 remove ivstack. Remove call to loop_iv_stack_get_iv_from_name,
4926 replaced by a call to newivs_to_depth_to_newiv.
4927 (clast_to_gcc_expression): Pass newivs, remove ivstack.
4928 (clast_to_gcc_expression_red): Same.
4929 (gcc_type_for_clast_expr): Same.
4930 (gcc_type_for_clast_eq): Same.
4931 (graphite_translate_clast_equation): Same.
4932 (graphite_create_guard_cond_expr): Same.
4933 (graphite_create_new_guard): Same.
4934 (graphite_create_new_loop): Same.
4935 (build_iv_mapping): Same.
4936 (translate_clast): Same.
4937 (gloog): Same.
4938 (loop_iv_stack_patch_for_consts): Removed. *
4939 sese.c (iv_stack_entry_is_constant): Removed.
4940 (iv_stack_entry_is_iv): Removed.
4941 (loop_iv_stack_push_iv): Removed.
4942 (loop_iv_stack_insert_constant): Removed.
4943 (loop_iv_stack_pop): Removed.
4944 (loop_iv_stack_get_iv): Removed.
4945 (loop_iv_stack_get_iv_from_name): Removed.
4946 (debug_loop_iv_stack): Removed.
4947 (free_loop_iv_stack): Removed.
4948 (loop_iv_stack_remove_constants): Removed. *
4949 sese.h (iv_stack_entry_kind): Removed.
4950 (iv_stack_entry_data_union): Removed.
4951 (iv_stack_entry_struct): Removed.
4952 (iv_stack_entry_p): Removed.
4953 (debug_oldivs, debug_loop_iv_stack, loop_iv_stack_insert_constant,
4954 loop_iv_stack_get_iv_from_name, loop_iv_stack_push_iv,
4955 loop_iv_stack_get_iv, loop_iv_stack_remove_constants,
4956 loop_iv_stack_pop, free_loop_iv_stack): Removed.
4957 (gbb_loop_at_index): Fix indenting.
4958 (gbb_loop_index): Removed.
4959
4960 2009-05-13 Sebastian Pop <sebastian.pop@amd.com>
4961
4962 * graphite-clast-to-gimple.c (clast_name_to_gcc): Do not use strcmp.
4963 Call clast_name_to_index.
4964
4965 2009-05-13 Sebastian Pop <sebastian.pop@amd.com>
4966
4967 * graphite-clast-to-gimple.c (clast_name_to_gcc): Pass region,
4968 do not pass params. Get params from SESE_PARAMS.
4969 (clast_to_gcc_expression): Same.
4970 (clast_to_gcc_expression_red): Same.
4971 (gcc_type_for_clast_eq): Same.
4972 (graphite_translate_clast_equation): Same.
4973 (graphite_create_new_loop): Same.
4974 * sese.c (rename_variables_in_stmt): Fix comment.
4975
4976 2009-05-13 Sebastian Pop <sebastian.pop@amd.com>
4977
4978 * graphite-clast-to-gimple.c (graphite_create_new_loop): Pass
4979 newivs_index.
4980 Call save_clast_name_index.
4981 (translate_clast): Pass newivs_index.
4982 (gloog): Create and free newivs_index.
4983
4984 2009-05-13 Sebastian Pop <sebastian.pop@amd.com>
4985
4986 * graphite-clast-to-gimple.c (clast_name_index): New structure.
4987 (clast_name_index_p): New type.
4988 (debug_clast_name_index): New.
4989 (debug_clast_name_indexes_1): New.
4990 (debug_clast_name_indexes): New.
4991 (clast_name_index_elt_info): New.
4992 (eq_clast_name_indexes): New.
4993 (clast_name_to_index): New.
4994 (new_clast_name_index): New.
4995 (save_clast_name_index): New.
4996 (init_sese_params_index): New.
4997 (gloog): Call init_sese_params_index.
4998 * graphite-clast-to-gimple.h (debug_clast_name_indexes): Declared.
4999 * sese.c (new_sese): Initialize SESE_PARAMS_INDEX.
5000 (free_sese): Free SESE_PARAMS_INDEX.
5001 * sese.h (struct sese): Add params_index.
5002 (SESE_PARAMS_INDEX): New.
5003
5004 2009-05-13 Sebastian Pop <sebastian.pop@amd.com>
5005
5006 * graphite-clast-to-gimple.c (newivs_to_depth_to_newiv): New.
5007 (graphite_create_new_loop): Pass the newivs vector. Push the
5008 newly created IV to newivs.
5009 (translate_clast): Pass the newivs vector.
5010 (gloog): Create and destroy the newivs vector.
5011
5012 2009-05-13 Sebastian Pop <sebastian.pop@amd.com>
5013
5014 * graphite-clast-to-gimple.c (pbb_to_depth_to_oldiv): New.
5015 (graphite_loop_normal_form): Initialize loop->aux with the unique
5016 IV that has been created.
5017
5018 2009-05-13 Tobias Grosser <grosser@fim.uni-passau.de>
5019
5020 * tree-chrec.c (evolution_function_right_is_integer_cst): Allow
5021 scev with parameters in the base part. They where forbidden
5022 exidently.
5023
5024 2009-05-11 Li Feng <nemokingdom@gmail.com>
5025
5026 * gcc.dg/graphite/graphite.exp: Set different default
5027 compile options by file names.
5028 * gcc.dg/graphite/block{0-6}.c: Remove dg-option line.
5029 * gcc.dg/graphite/id-{1-9}.c: Ditto.
5030 * gcc.dg/graphite/scop-{0-20}.c: Ditto.
5031 * gcc.dg/graphite/scop-matmult.c: Ditto.
5032
5033 2009-05-08 Li Feng <nemokingdom@gmail.com>
5034
5035 * gcc.dg/graphite/graphite_autopar/graphite_autopar.exp: New.
5036 * gcc.dg/graphite/graphite_autopar/force-parallel-1.c: New.
5037 * gcc.dg/graphite/graphite_autopar/force-parallel-2.c: New.
5038 * gcc.dg/graphite/graphite_autopar/force-parallel-3.c: New.
5039
5040 2009-05-07 Tobias Grosser <grosser@fim.uni-passau.de>
5041
5042 * graphite-scop-detection (build_scops_1): Fix little bug introduced
5043 by final cleanup.
5044
5045 2009-05-07 Tobias Grosser <grosser@fim.uni-passau.de>
5046
5047 * graphite-scop-detection.c (graphite_can_represent_scev): Only
5048 allow integer constant strides.
5049 (graphite_can_represent_expr): Depend on outermost_loop.
5050 (stmt_simple_memref_p, graphite_cannot_represent_loop,
5051 harmful_stmt_in_bb, is_simple_operand, stmt_simple_for_scop_p,
5052 build_scops_1): Same.
5053 (scopdet_basic_block_info): Same and insert layered SCoP
5054 detection.
5055 (try_generate_gimple_bb): Cleanup.
5056 (build_scops): Enable data references.
5057
5058 * gcc.dg/graphite/id-5.c: New.
5059 * gcc.dg/graphite/id-9.c: New.
5060 * tree-chrec.c (evolution_function_right_is_integer_cst): New.
5061 * tree-chrec.h (evolution_function_right_is_integer_cst): New.
5062
5063 2009-05-06 Tobias Grosser <grosser@fim.uni-passau.de>
5064
5065 * sese.c (expand_scalar_variables_ssa_name): Only build expressions,
5066 that we have not yet built for this SCoP.
5067
5068 2009-05-06 Tobias Grosser <grosser@fim.uni-passau.de>
5069
5070 * sese.c (expand_scalar_variables_expr): Fix expand_scalar_variables
5071 for complex numbers.
5072
5073 2009-05-06 Tobias Grosser <grosser@fim.uni-passau.de>
5074
5075 * graphite-ppl.c: Fix build if cloog is not available.
5076
5077 2009-05-04 Li Feng <nemokingdom@gmail.com>
5078
5079 * tree-parloops.c (loop_parallel_p): Remove construction of
5080 NITER and REDUCTION_LIST.
5081 (try_get_loop_niter): New.
5082 (try_create_reduction_list): New.
5083 (parallelize_loops): Bypass the failed checkings in autopar
5084 when can_be_parallel in loop structure is set to true.
5085
5086 2009-05-01 Tobias Grosser <grosser@fim.uni-passau.de>
5087
5088 * gcc.dg/graphite/id-6.c: Update testcase.
5089 * gcc.dg/graphite/scop-3.c: Dito.
5090
5091 2009-05-01 Tobias Grosser <grosser@fim.uni-passau.de>
5092
5093 * graphite-scop-detection.c (stmt_simple_for_scop_p):
5094 Enable EQ_EXPR and NE_EXPR again.
5095
5096 2009-04-30 Tobias Grosser <grosser@fim.uni-passau.de>
5097
5098 * graphite-scop-detection.c (graphite_can_represent_scev):
5099 Add check if scev is affine multivariate.
5100 (harmful_stmt_in_bb): Check if we can represent the conditions.
5101 (scopdet_basic_block_info (basic_block bb, VEC): Pass the loop to
5102 harmful_stmt_in_bb.
5103 * gcc.dg/graphite/id-7.c: New.
5104
5105 2009-04-30 Tobias Grosser <grosser@fim.uni-passau.de>
5106
5107 * graphite-sese-to-poly.c (bb_contains_non_iv_scalar_phi_nodes):
5108 Check all bbs in region, not only the bbs that are represented in
5109 GRAPHITE.
5110 (build_poly_scop): Add newline.
5111 * gcc.dg/graphite/id-8.c: New.
5112
5113 2009-04-30 Li Feng <nemokingdom@gmail.com>
5114
5115 * cfgloop.c (alloc_loop): Initialize can_be_parallel to false
5116 when loop initialize.
5117 * cfgloop.h (struct loop): Introduce flag can_be_parallel.
5118 * common.opt: Declare flag_graphite_force_parallel.
5119 * graphite-clast-to-gimple.c (translate_clast): Mark the innermost
5120 loop parallel.
5121 * graphite-poly.c (apply_poly_transforms): Introduce
5122 flag_graphite_force_parallel.
5123 * tree-ssa-loop.c (gate_graphite_transforms): ditto.
5124 * toplev.c (process_options): ditto and replace a not correctly
5125 encoded space.
5126
5127 2009-04-30 Li Feng <nemokingdom@gmail.com>
5128
5129 * graphite-clast-to-gimple.c (loop_iv_stack_patch_for_consts):
5130 Change the call of gbb_loop_at_index and/or gbb_loop_index due
5131 to the redefinition.
5132 (compute_cloog_iv_types_1): ditto.
5133 (build_iv_mapping): ditto.
5134 * graphite-sese-to-poly.c (new_gimple_bb): Remove GBB_LOOPS related
5135 initialization.
5136 (free_gimple_bb): Removed GBB_LOOPS related free part.
5137 (build_bb_loops): Removed.
5138 * sese.h (struct gimple_bb): Removed loops.
5139 (GBB_LOOPS): Removed.
5140 (gbb_loop_at_index): Instead of using GBB_LOOPS, we use sese instead.
5141 (gbb_loop_index): ditto.
5142
5143 2009-04-24 Tobias Grosser <grosser@fim.uni-passau.de>
5144
5145 * graphite-scop-detection.c (graphite_can_represent_scev): Do not
5146 allow non constant strides.
5147 * gcc.dg/graphite/scop-20.c: New.
5148
5149 2009-04-24 Sebastian Pop <sebastian.pop@amd.com>
5150
5151 * graphite-scop-detection.c (dot_all_scops): Fix system call
5152 return value warning.
5153 (dot_scop): Same.
5154
5155 2009-04-24 Sebastian Pop <sebastian.pop@amd.com>
5156
5157 * gcc.dg/graphite/id-6.c: Fix pattern.
5158 * gcc.dg/graphite/scop-3.c: Same.
5159
5160 2009-04-24 Sebastian Pop <sebastian.pop@amd.com>
5161
5162 * graphite-poly.c (map_into_dep_poly, map_dr_into_dep_poly,
5163 build_pairwise_constraint, dr_equality_constraints,
5164 build_pairwise_scheduling_equality,
5165 build_pairwise_scheduling_inequality, lexicographically_gt_p,
5166 build_lexicographically_gt_constraint, dependence_polyhedron,
5167 graphite_legal_transform_dr, graphite_legal_transform_bb,
5168 graphite_legal_transform): New.
5169 * graphite-poly.h (graphite_legal_transform): Declared.
5170 * graphite-sese-to-poly.c (build_poly_scop): Call to
5171 graphite_legal_transform is disabled for the moment.
5172
5173 2009-04-24 Sebastian Pop <sebastian.pop@amd.com>
5174
5175 * graphite-poly.h (pbb_nb_scattering_dims): New.
5176 (pbb_nb_scattering): Use it.
5177
5178 2009-04-24 Sebastian Pop <sebastian.pop@amd.com>
5179
5180 * graphite-ppl.c (ppl_insert_dimensions_pointset): Add
5181 Pointset_Powerset version of ppl_insert_dimensions.
5182 * graphite-ppl.h (ppl_insert_dimensions_pointset): Declared.
5183
5184 2009-04-24 Sebastian Pop <sebastian.pop@amd.com>
5185
5186 * graphite-ppl.c (ppl_insert_dimensions): Fix formatting.
5187
5188 2009-04-24 Sebastian Pop <sebastian.pop@amd.com>
5189
5190 * graphite-poly.h: Fix comment.
5191
5192 2009-04-24 Sebastian Pop <sebastian.pop@amd.com>
5193
5194 * graphite-sese-to-poly.c (build_poly_dr): Fix data ref multiplier.
5195
5196 2009-04-24 Tobias Grosser <grosser@fim.uni-passau.de>
5197
5198 * sese.c (expand_scalar_variables_stmt): Only iterate over the old
5199 statements.
5200
5201 2009-04-24 Tobias Grosser <grosser@fim.uni-passau.de>
5202
5203 * graphite-sese-to-poly.c (var_used_in_not_loop_header_phi_node): New.
5204 (graphite_stmt_p): Represent bbs necessary to build the phi nodes of
5205 conditions.
5206
5207 2009-04-20 Sebastian Pop <sebastian.pop@amd.com>
5208
5209 * graphite-scop-detection.c (stmt_simple_for_scop_p): Do not
5210 handle EQ_EXPR and NE_EXPR.
5211
5212 2009-04-17 Tobias Grosser <grosser@fim.uni-passau.de>
5213
5214 * graphite-poly.h (poly_dr): Fix comment.
5215
5216 2009-04-09 Sebastian Pop <sebastian.pop@amd.com>
5217 Tobias Grosser <grosser@fim.uni-passau.de>
5218
5219 * graphite-poly.c (new_poly_bb): Do not initialize PBB_DOMAIN
5220 with a zero dimension polyhedron.
5221 (find_scop_parameters): Move the call to scop_set_nb_params here.
5222 (build_loop_iteration_domains): Store in loop->aux the iteration
5223 domain polyhedron.
5224 (build_scop_iteration_domain): Fix PBB_DOMAIN for bbs not surrounded
5225 by any loop in scop.
5226 (build_poly_scop): Do not call scop_set_nb_params.
5227
5228 2009-04-09 Sebastian Pop <sebastian.pop@amd.com>
5229 Tobias Grosser <grosser@fim.uni-passau.de>
5230
5231 * graphite-sese-to-poly.c (add_condition_to_pbb): Pass code to
5232 add_condition_to_domain not GT_EXPR.
5233
5234 2009-04-09 Tobias Grosser <grosser@fim.uni-passau.de>
5235
5236 * graphite-ppl.c (debug_ppl_powerset_matrix): New.
5237 * graphite-ppl.h (debug_ppl_powerset_matrix): New.
5238 * graphite-sese-to-poly.c (add_condition_to_pbb): Use
5239 upper_bound_assign to calculate unions.
5240 * gcc.dg/graphite/id-6.c: New.
5241
5242 2009-04-09 Tobias Grosser <grosser@fim.uni-passau.de>
5243
5244 * graphite-scop-detection.c (canonicalize_loop_closed_ssa): Do not
5245 handle abnormal edges.
5246
5247 2009-04-09 Tobias Grosser <grosser@fim.uni-passau.de>
5248
5249 * graphite-poly.c (new_poly_dr, free_poly_dr): New.
5250 (free_poly_bb): Also free poly_drs.
5251 * graphite-poly.h (new_poly_dr, free_poly_dr): New.
5252 (poly_dr): Polyhedron to Pointset_Powerset.
5253 (pdr_accessp_nb_subscripts): Same.
5254 * graphite-sese-to-poly.c (build_poly_dr): Same. And actually build
5255 poly_drs.
5256
5257 2009-04-08 Sebastian Pop <sebastian.pop@amd.com>
5258
5259 * graphite-clast-to-gimple.c (initialize_cloog_names): Change cloog
5260 names into more meaningful names.
5261
5262 2009-04-08 Sebastian Pop <sebastian.pop@amd.com>
5263
5264 * gfortran.dg/graphite/interchange-1.c: New.
5265 * gfortran.dg/graphite/interchange-2.c: New.
5266
5267 2009-04-08 Sebastian Pop <sebastian.pop@amd.com>
5268
5269 * graphite-clast-to-gimple.c (graphite_loop_normal_form): Do not build
5270 the reduction_list.
5271 * tree-parloops.c (rewrite_phi_with_iv): New.
5272 (rewrite_all_phi_nodes_with_iv): New.
5273 (canonicalize_loop_ivs): Call them.
5274
5275 2009-04-08 Sebastian Pop <sebastian.pop@amd.com>
5276
5277 * graphite-sese-to-poly.c (try_generate_gimple_bb): Use
5278 graphite_find_data_references_in_stmt.
5279 * tree-data-ref.c (graphite_find_data_references_in_stmt): New.
5280 * tree-data-ref.h (graphite_find_data_references_in_stmt): Declared.
5281
5282 2009-04-08 Sebastian Pop <sebastian.pop@amd.com>
5283
5284 * sese.c (add_loop_exit_phis): Don't fail on non SSA_NAME renames.
5285
5286 2009-04-08 Sebastian Pop <sebastian.pop@amd.com>
5287
5288 * graphite-sese-to-poly.c (build_scop_bbs_1): Use bb_in_sese_p
5289 instead of bb_in_region.
5290 (flag_bb_in_region): Same. Renamed flag_bb_in_sese.
5291 (build_sese_conditions): Use flag_bb_in_sese.
5292 * sese.c (register_bb_in_sese): Removed.
5293 (new_sese): Remove initialization of SESE_REGION_BBS.
5294 (free_sese): Do not free SESE_REGION_BBS.
5295 * sese.h (struct sese): Remove field region_basic_blocks.
5296 (SESE_REGION_BBS): Removed.
5297 (bb_in_sese_p): Implement in function of bb_in_region.
5298
5299 2009-04-08 Sebastian Pop <sebastian.pop@amd.com>
5300
5301 * graphite-scop-detection.c (limit_scops): Deal only with single exit
5302 loops.
5303
5304 2009-04-08 Tobias Grosser <grosser@fim.uni-passau.de>
5305
5306 * graphite-scop-detection.c (stmt_simple_for_scop_p): Allow NE_EXPR
5307 and EQ_EXPR.
5308 * graphite-sese-to-poly.c (create_linear_expr_from_tree): New.
5309 (add_condition_to_domain): New.
5310 (add_condition_to_pbb): New.
5311 (add_conditions_to_domain): Cleanup and handle of NE_EXPR and EQ_EXPR.
5312 * gcc.dg/graphite/scop-3.c: Update number of detected SCoPs.
5313
5314 2009-04-08 Tobias Grosser <grosser@fim.uni-passau.de>
5315
5316 * graphite-clast-to-gimple.c (build_cloog_prog): ppl_Polyhedron ->
5317 ppl_Pointset_Powerset.
5318 * graphite-poly.c (new_poly_bb, free_poly_bb): Same.
5319 * graphite-poly.h (poly_bb): poly_bb.domain Same.
5320 (pbb_nb_loops): Same.
5321 * graphite-sese-to-poly.c (build_loop_iteration_domains,
5322 add_conditions_to_domain): Same.
5323 * graphite-ppl.c (new_Cloog_Domain_from_ppl_Pointset_Powerset): New.
5324 (ppl_print_polyhedron_matrix): ppl_Polyhedron_t ->
5325 ppl_const_Polyhedron_t.
5326 (ppl_print_powerset_matrix): New.
5327 * graphite-ppl.h (new_Cloog_Domain_from_ppl_Pointset_Powerset,
5328 ppl_print_powerset_matrix): New.
5329 (ppl_print_polyhedron_matrix): Updated.
5330
5331 2009-04-07 Sebastian Pop <sebastian.pop@amd.com>
5332
5333 * tree-scalar-evolution.c (analyze_scalar_evolution_1): Fix comment.
5334
5335 2009-04-07 Sebastian Pop <sebastian.pop@amd.com>
5336
5337 * graphite-poly.c (extend_scattering): Fix indenting. Free cstr.
5338 (print_iteration_domains, debug_iteration_domain,
5339 debug_iteration_domains): New.
5340 * graphite-poly.h (print_iteration_domains, debug_iteration_domain,
5341 debug_iteration_domains): Declared.
5342 * graphite-sese-to-poly.c (build_pbb_scattering_polyhedrons): Fix
5343 indenting.
5344
5345 2009-04-03 Tobias Grosser <grosser@fim.uni-passau.de>
5346 Sebastian Pop <sebastian.pop@amd.com>
5347
5348 * graphite-poly.h (print_iteration_domain): New.
5349 * graphite-sese-to-poly.c (add_conditions_to_domain): Fixed bug.
5350 (build_sese_conditions_1, build_sese_conditions_after,
5351 build_sese_conditions_before): New.
5352 (build_sese_conditions): Rewritten.
5353
5354 2009-04-03 Sebastian Pop <sebastian.pop@amd.com>
5355 Tobias Grosser <grosser@fim.uni-passau.de>
5356
5357 Cleanup of code generation liveouts.
5358 * graphite-clast-to-gimple.c (translate_clast): Use a single
5359 rename_map instead of one per translated statement.
5360 Do not use SESE_LIVEOUT_RENAMES.
5361 (graphite_loop_normal_form): Do not use SESE_REDUCTION_LIST.
5362 (gloog): Do not use SESE_LIVEOUT_RENAMES.
5363 * graphite-scop-detection.c (harmful_stmt_in_bb): Return the close
5364 phi node of a reduction: when a loop contains a reduction used outside
5365 the loop, there should be a scalar close phi node on the exit block.
5366 * sese.c (new_sese): Do not initialize SESE_LIVEOUT,
5367 SESE_LIVEOUT_RENAMES, and SESE_REDUCTION_LIST.
5368 (free_sese): Do not free them.
5369 (sese_build_liveouts_use): Do not use them.
5370 (sese_build_liveouts_bb): Same.
5371 (sese_build_liveouts): Same.
5372 (sese_insert_phis_for_liveouts): Same.
5373 (sese_adjust_phis_for_liveouts): Same. Renamed sese_adjust_liveout_phis.
5374 (defined_in_loop_p): New.
5375 (alive_after_loop): New.
5376 (close_phi_not_yet_inserted_p): New.
5377 (struct alep, alep_p): New.
5378 (add_loop_exit_phis): Remove from the rename_map all the names defined
5379 in the code generated loop.
5380 (insert_loop_close_phis): Traverse the rename_map passed to it.
5381 Don't use SESE_LIVEOUT_RENAMES.
5382 (default_liveout_before_guard): Renamed default_before_guard.
5383 (insert_guard_phis): Do not use SESE_LIVEOUT_RENAMES.
5384 (graphite_copy_stmts_from_block): Do not directly call set_rename.
5385 (register_sese_liveout_renames): Removed.
5386 (copy_bb_and_scalar_dependences): Do not call it.
5387 * sese.h (struct sese): Removed fields: liveout, liveout_renames, and
5388 reduction_list.
5389 (SESE_LIVEOUT): Removed.
5390 (SESE_LIVEOUT_RENAMES): Removed.
5391 (SESE_REDUCTION_LIST): Removed.
5392 (sese_build_liveouts): Removed.
5393 (sese_adjust_phis_for_liveouts): Renamed sese_adjust_liveout_phis.
5394 (insert_loop_close_phis): Pass a htab_t instead of a sese.
5395 (insert_guard_phis): Same.
5396 (rename_map_elt): Declare a VEC of them.
5397 * tree-parloops.c (canonicalize_loop_ivs): reduction_list contains
5398 trees not pointers to trees.
5399
5400 Rewrite in canonical close SSA form:
5401 * graphite-scop-detection.c (contains_only_close_phi_nodes): New.
5402 (limit_scops): Close the scop after the block containing the close phi
5403 nodes.
5404 (canonicalize_loop_closed_ssa): New.
5405 (canonicalize_loop_closed_ssa_form): New.
5406 (build_scops): Call canonicalize_loop_closed_ssa_form.
5407
5408 * graphite-sese-to-poly.c: Fix typos.
5409
5410 2009-04-03 Sebastian Pop <sebastian.pop@amd.com>
5411
5412 * graphite-poly.c (print_scattering_function, print_pbb_domain):
5413 Extended.
5414 (dump_gbb_conditions, dump_gbb_cases, print_iteration_domain): New.
5415 (print_pbb): Add conditions.
5416
5417 2009-04-01 Tobias Grosser <grosser@fim.uni-passau.de>
5418 Sebastian Pop <sebastian.pop@amd.com>
5419
5420 * graphite-scop-detection.c (bb_in_sd_region): Use bb_in_region.
5421 * graphite-sese-to-poly.c (all_non_dominated_preds_marked_p): New.
5422 (build_scop_bbs_1): New.
5423 (build_scop_bbs): Rewrite.
5424 * sese.h (bb_in_region): New.
5425
5426 2009-03-29 Tobias Grosser <grosser@fim.uni-passau.de>
5427
5428 * graphite-poly.c (new_poly_bb, free_poly_bb): Initialize/free
5429 poly_drs vector.
5430 (print_scop): Style.
5431 * graphite-poly.h (poly_bb): Add drs vector.
5432 (PBB_DRS): Add accessor.
5433 * graphite-sese-to-poly.c (build_poly_dr): New.
5434 (build_pbb_drs, build_scop_drs): New.
5435 (build_poly_scop): call build_scop_drs (Disabled at the moment).
5436
5437 2009-03-29 Tobias Grosser <grosser@fim.uni-passau.de>
5438
5439 * tree-ssa-loop.c: Include forgotten toplev.h
5440
5441 2009-03-29 Tobias Grosser <grosser@fim.uni-passau.de>
5442
5443 * graphite-poly.c: (apply_poly_transforms): sorry -> gcc_unreachable.
5444 * gcc.dg/graphite/pr37883.c: Remove -floop-*
5445 * gcc.dg/graphite/pr37928.c: Same
5446 * gcc.dg/graphite/pr38409.c: Same
5447 * gcc.dg/graphite/pr38498.c: Same
5448 * gcc.dg/graphite/pr38559.c: Same
5449 * gcc.dg/graphite/pr39335.c: Same
5450 * gcc.dg/graphite/pr39335_1.c: Same
5451 * gfortran.dg/graphite/block-2.f: Same
5452 * tree-ssa-loop.c (gate_graphite_transforms): Always fail if called
5453 with -floop-*.
5454
5455 2009-03-28 Tobias Grosser <grosser@fim.uni-passau.de>
5456
5457 * graphite-sese-to-poly.c (ref_nb_loops, build_access_matrix_with_af,
5458 build_access_matrix, build_scop_data_accesses): Remove access function
5459 building. (We get a new version soon).
5460 (build_bb_loops, scan_tree_for_params_right_scev): Update.
5461 * sese.h (nb_loops_around_loop_in_sese): Remove.
5462 (sese_loop_depth): Do not use SESE_LOOP_NEST any more.
5463
5464 2009-03-27 Tobias Grosser <grosser@fim.uni-passau.de>
5465 Sebastian Pop <sebastian.pop@amd.com>
5466
5467 * graphite-scop-detection.c (struct scopdet_info): Rename last
5468 field to exit.
5469 (scopdet_basic_block_info, build_scops_1): Don't use
5470 CDI_POST_DOMINATORS. CDI_POST_DOMINATORS should never be used.
5471
5472 2009-03-26 Tobias Grosser <grosser@fim.uni-passau.de>
5473 Sebastian Pop <sebastian.pop@amd.com>
5474
5475 * graphite-clast-to-gimple.c (gloog): Call sese_build_liveouts.
5476 * sese.c (sese_build_liveouts_use): Renamed from
5477 sese_build_livein_liveouts_use. Remove liveins.
5478 (sese_build_liveouts_bb): Renamed from sese_build_livein_liveouts_bb.
5479 Call sese_build_liveouts_use.
5480 (sese_build_liveouts): Renamed from sese_build_livein_liveouts.
5481 Call sese_build_liveouts_bb.
5482 (new_sese, free_sese): Remove liveins.
5483 (sese_add_exit_phis_var): Deleted.
5484 (sese_insert_phis_for_liveouts): Call sese_add_exit_phis_edge
5485 directly.
5486 (graphite_copy_stmts_from_block): Remove SESE_NUM_VER.
5487
5488 * sese.h (sese): Remove num_ver and livein.
5489 (SESE_LIVEIN, SESE_LIVEIN_VER, SESE_NUM_VER): Removed.
5490
5491 2009-03-25 Tobias Grosser <grosser@fim.uni-passau.de>
5492
5493 * graphite-sese-to-poly.c (build_scop_scattering): Fix compile.
5494
5495 2009-03-25 Tobias Grosser <grosser@fim.uni-passau.de>
5496
5497 * graphite-sese-to-poly.c (compare_prefix_loops): Removed.
5498 (build_scop_scattering): Do not use compare_prefix_loops any more.
5499 (nb_common_loops): New.
5500
5501 2009-03-24 Sebastian Pop <sebastian.pop@amd.com>
5502
5503 * sese.c (get_new_name_from_old_name): Renamed get_rename.
5504 (register_old_and_new_names): Renamed set_rename.
5505
5506 2009-03-24 Sebastian Pop <sebastian.pop@amd.com>
5507
5508 * graphite-scop-detection.h (nb_reductions_in_loop): Revert removal
5509 of the decl from the previous commit.
5510
5511 2009-03-24 Sebastian Pop <sebastian.pop@amd.com>
5512
5513 * graphite-scop-detection.c (dot_scop): New.
5514 * graphite-scop-detection.h (dot_scop): Declared.
5515
5516 2009-03-24 Sebastian Pop <sebastian.pop@amd.com>
5517
5518 * graphite-sese-to-poly.c (compare_prefix_loops): Fix compare.
5519
5520 2009-03-24 Sebastian Pop <sebastian.pop@amd.com>
5521
5522 * cfgloopmanip.c (create_empty_loop_on_edge): Generate the loop exit
5523 condition at the end of the loop.
5524 * graphite.c (graphite_initialize, graphite_finalize): Print to
5525 dump_file the compiled function.
5526 * graphite-clast-to-gimple.c (graphite_create_new_loop): Update use
5527 of create_empty_loop_on_edge.
5528 (translate_clast): Update the code generation of loops for the new
5529 shape of loops.
5530 * cfgloop.h (create_empty_loop_on_edge): Update declaration.
5531
5532 2009-03-24 Sebastian Pop <sebastian.pop@amd.com>
5533
5534 Reverted the patch from 2009-03-19.
5535
5536 2009-03-19 Tobias Grosser <grosser@fim.uni-passau.de>
5537
5538 * graphite-poly.c (new_poly_bb, free_poly_bb): Initialize/free
5539 poly_drs vector.
5540 (print_scop): Style.
5541 * graphite-poly.h (poly_bb): Add drs vector.
5542 (PBB_DRS): Add accessor.
5543 * graphite-sese-to-poly.c (ref_nb_loops): Remove.
5544 (build_access_matrix_with_af, build_access_matrix,
5545 build_scop_data_accesses): Delete.
5546 (build_poly_dr): New.
5547 (build_pbb_drs, build_scop_drs): New.
5548 (build_poly_scop): call build_scop_drs.
5549
5550 2009-03-13 Sebastian Pop <sebastian.pop@amd.com>
5551
5552 * graphite-scop-detection.c (dot_all_scops_1): Close the table
5553 once per basic block.
5554
5555 2009-03-13 Tobias Grosser <grosser@fim.uni-passau.de>
5556
5557 * graphite-scop-detection.c (graphite_can_represent_scev): New.
5558 (graphite_can_represent_expr): Renamed from loop_affine_expr
5559 and enhanced.
5560 (stmt_simple_for_scop_p): Call graphite_can_represent_expr.
5561 (graphite_cannot_represent_loop): Add scop_entry to parameters.
5562 (scopdet_basic_block_info): Actually define entry_block.
5563 (stmt_simple_memref_p): Moved here from ...
5564
5565 * tree-data-ref.c (stmt_simple_memref_p): here.
5566 * tree-data-ref.h (stmt_simple_memref_p): Removed.
5567
5568 2009-03-13 Tobias Grosser <grosser@fim.uni-passau.de>
5569
5570 * gcc.dg/graphite/id-4.c: New.
5571
5572 2009-03-12 Sebastian Pop <sebastian.pop@amd.com>
5573
5574 * sese.c (expand_scalar_variables_expr): Handle tcc_comparison.
5575 (register_old_and_new_names): Update the content of the map.
5576 When there was already a rename_map_elt in the map at that
5577 location, free it.
5578 (copy_bb_and_scalar_dependences): Do rename_variables after
5579 expand_scalar_variables.
5580 * graphite-clast-to-gimple.c (build_iv_mapping): Update the content
5581 of the map. When there was already a rename_map_elt in the
5582 map at that location, free it.
5583 (translate_clast): Pass the rename_map. Do not initialize and free
5584 a rename_map per stmt_user.
5585 (gloog): Initialize and free one rename_map and pass it to
5586 translate_clast.
5587
5588 2009-03-12 Sebastian Pop <sebastian.pop@amd.com>
5589
5590 * sese.c (expand_scalar_variables_stmt,
5591 expand_scalar_variables_ssa_name): Add a gimple_stmt_iterator
5592 parameter.
5593 (expand_scalar_variables_expr): Handle REALPART_EXPR and IMAGPART_EXPR.
5594 (expand_scalar_variables): Pass to expand_scalar_variables_stmt
5595 the gimple_stmt_iterator of the statement to be expanded.
5596 * graphite-scop-detection.c (is_simple_operand): Do handle
5597 REALPART_EXPR.
5598
5599 2009-03-11 Tobias Grosser <grosser@fim.uni-passau.de>
5600
5601 * graphite-scop-detection.c (is_simple_operand): Do not handle
5602 REALPART_EXPR.
5603 * gcc.dg/graphite/id-2.c: New.
5604
5605 * graphite-sese-to-poly.c (build_bb_loops,
5606 add_value_to_dim, scan_tree_for_params_right_scev,
5607 scan_tree_for_params_int, scan_tree_for_params, idx_record_params,
5608 find_params_in_bb, build_loop_iteration_domains,
5609 add_conditions_to_domain): Remove subtract.
5610
5611 2009-03-11 Tobias Grosser <grosser@fim.uni-passau.de>
5612
5613 * graphite-clast-to-gimple.c (loop_iv_stack_patch_for_consts,
5614 build_iv_mapping, compute_cloog_iv_types_1, build_cloog_prog):
5615 pbb_loop_at_index -> gbb_loop_at_index.
5616 * graphite-poly.c (new_poly_bb, new_scop): New accessors.
5617 (debug_loop_vec): Delete.
5618 * graphite-poly.h (poly_bb, scop): Change black_box and region to void
5619 pointer. Move LOOPS to gimple_bb_p and insert nb_params.
5620 (PBB_LOOPS): Removed.
5621 (PBB_BLACK_BOX): Insert cast.
5622 (pbb_set_black_box): New setter.
5623 (pbb_loop_at_index, pbb_loop_index): Removed.
5624 (scop_set_region, scop_set_nb_params): New.
5625 * graphite-sese-to-poly.c (new_gimple_bb, free_gimple_bb,
5626 build_scop_scattering, build_bb_loops): Add GBB_LOOPS.
5627 (build_poly_scop): Use scop_set_nb_params.
5628 * sese.h (gimple_bb): Add LOOPS.
5629 (GBB_LOOPS, gbb_loop_index, gbb_loop_at_index): New.
5630
5631 2009-03-11 Tobias Grosser <grosser@fim.uni-passau.de>
5632
5633 Revert previous commit.
5634
5635 2009-03-11 Sebastian Pop <sebastian.pop@amd.com>
5636
5637 * sese.c (expand_scalar_variables_expr): Handle tcc_comparison.
5638 (register_old_and_new_names): Update the content of the map.
5639 When there was already a rename_map_elt in the map at that
5640 location, free it.
5641 (copy_bb_and_scalar_dependences): Do rename_variables after
5642 expand_scalar_variables.
5643 * graphite-clast-to-gimple.c (build_iv_mapping): Update the content
5644 of the map. When there was already a rename_map_elt in the
5645 map at that location, free it.
5646 (translate_clast): Pass the rename_map. Do not initialize and free
5647 a rename_map per stmt_user.
5648 (gloog): Initialize and free one rename_map and pass it to
5649 translate_clast.
5650
5651 2009-03-11 Tobias Grosser <grosser@fim.uni-passau.de>
5652
5653 Remove forgotten line in revert.
5654
5655 2009-03-11 Sebastian Pop <sebastian.pop@amd.com>
5656
5657 Revert previous commit.
5658
5659 2009-03-10 Sebastian Pop <sebastian.pop@amd.com>
5660
5661 * sese.c (register_old_and_new_names): Update the content
5662 of the map. When there was already a rename_map_elt in the
5663 map at that location, free it.
5664 (copy_bb_and_scalar_dependences): Do rename_variables after
5665 expand_scalar_variables.
5666 * graphite-clast-to-gimple.c (build_iv_mapping): Update the content
5667 of the map. When there was already a rename_map_elt in the
5668 map at that location, free it.
5669 (translate_clast): Pass the rename_map. Do not initialize and free
5670 a rename_map per stmt_user.
5671 (gloog): Initialize and free one rename_map and pass it to
5672 translate_clast.
5673
5674 2009-03-10 Sebastian Pop <sebastian.pop@amd.com>
5675
5676 * graphite-clast-to-gimple.c (translate_clast): context_loop
5677 is never NULL.
5678
5679 2009-03-10 Tobias Grosser <grosser@fim.uni-passau.de>
5680 Sebastian Pop <sebastian.pop@amd.com>
5681
5682 * graphite-ppl.c (ppl_insert_dimensions): Fix stupid mistake
5683 of the use of ppl_Polyhedron_map_space_dimensions.
5684
5685 2009-03-10 Tobias Grosser <grosser@fim.uni-passau.de>
5686 Sebastian Pop <sebastian.pop@amd.com>
5687
5688 * graphite-poly.c (unify_scattering_dimensions): Fix types.
5689 * graphite-poly.h (poly_dr_p, poly_dr, POLY_DR_TYPE, PDR_BB,
5690 PDR_TYPE, PDR_ACCESSES, pdr_accessp_nb_subscripts,
5691 pdr_accessp_nb_iterators, pdr_accessp_nb_params,
5692 pdr_accessp_alias_set_dim, pdr_accessp_subscript_dim,
5693 pdr_accessp_iterator_dim, pdr_accessp_param_dim,
5694 pbb_nb_params): New.
5695 (pbb_nb_loops, pbb_nb_scattering, scop_nb_params,
5696 nb_loops_around_pbb): Adapt return types.
5697
5698 2009-03-09 Tobias Grosser <grosser@fim.uni-passau.de>
5699
5700 * Makefile.in (graphite.o, graphite-sese-to-poly.o,
5701 graphite-clast-to-gimple.o, graphite-data-ref.o,
5702 graphite-scop-detection.o, graphite-poly.o): Add
5703 more headers.
5704
5705 2009-03-05 Tobias Grosser <grosser@fim.uni-passau.de>
5706
5707 * Makefile.in (graphite.o, graphite-sese-to-poly.o,
5708 graphite-clast-to-gimple.o, graphite-data-ref.o,
5709 graphite-scop-detection.o, graphite-poly.o): Add graphite-poly.h.
5710
5711 2009-03-04 Tobias Grosser <grosser@fim.uni-passau.de>
5712
5713 * gcc.dg/graphite/pr37485.c: Remove -floop-block
5714 * gcc.dg/graphite/pr37828.c: Same.
5715 * gcc.dg/graphite/pr37684.c: Same.
5716 * gcc.dg/graphite/block-0.c: Same.
5717 * gcc.dg/graphite/block-1.c: Same.
5718 * gcc.dg/graphite/block-2.c: Same.
5719 * gcc.dg/graphite/block-3.c: Same.
5720 * gcc.dg/graphite/block-4.c: Same.
5721 * gcc.dg/graphite/block-5.c: Same.
5722 * gcc.dg/graphite/block-6.c: Same.
5723 * gfortran.dg/graphite/pr38083.f90: Same.
5724 * gfortran.dg/graphite/block-1.f90: Same.
5725 * gfortran.dg/graphite/block-3.f90: Same.
5726 * gfortran.dg/graphite/pr37852.f90: Same.
5727 * gfortran.dg/graphite/block-4.f90: Same.
5728 * gfortran.dg/graphite/pr37980.f90: Same.
5729 * gfortran.dg/graphite/pr38953.f90: Same.
5730 * gfortran.dg/graphite/pr37857.f90: Same.
5731 * opts.c: Remove -floop-block from -O2.
5732 * graphite-poly.c: Fail if -floop-block -floop-interchange or
5733 -floop-strip-mine are used.
5734
5735 2009-03-04 Tobias Grosser <grosser@fim.uni-passau.de>
5736 Sebastian Pop <sebastian.pop@amd.com>
5737
5738 * graphite-clast-to-gimple.c (build_cloog_prog): Unify scattering
5739 dimensions.
5740 * graphite-poly.c (pbb_compare, graphite_sort_pbbs,
5741 graphite_trans_bb_move_loop, graphite_trans_bb_strip_mine,
5742 strip_mine_profitable_p, is_interchange_valid,
5743 graphite_trans_bb_block, graphite_trans_loop_block,
5744 graphite_trans_scop_block): Temporary removed.
5745 (extend_scattering, unify_scattering_dimensions): New.
5746 (print_scattering_function, graphite_read_transforms):
5747 PBB_SCATTERING -> PBB_TRANSFORMED_SCATTERING.
5748 (graphite_generate_scattering_fns): Removed.
5749 (apply_poly_transforms): Cleanup.
5750 (free_poly_bb): Add PBB_SCATTERING -> PBB_TRANSFORMED_SCATTERING.
5751 (schedule_to_scattering): Moved.
5752 (PBB_STATIC_SCHEDULE, PBB_SCATTERING): Removed.
5753 (PBB_ORIGINAL_SCATTERING, PBB_TRANSFORMED_SCATTERING): New.
5754 (pbb_nb_scattering): New.
5755 (SCOP_ENTRY, SCOP_EXIT, SCOP_REGION_BBS, SCOP_DEP_GRAPH, SCOP_PARAMS,
5756 SCOP_LOOP_NEST, SCOP_PARAMS, SCOP_OLDIVS, SCOP_LIVEOUT_RENAMES):
5757 Removed.
5758 * graphite-ppl.c (ppl_insert_dimensions): Extended and renamed from
5759 shift_poly.
5760 (ppl_strip_loop): PBB_SCATTERING -> PBB_TRANSFORMED_SCATTERING.
5761 * graphite-scop-detection.c (dot_all_scops_1): PBB_SCATTERING
5762 -> PBB_TRANSFORMED_SCATTERING.
5763 * graphite-sese-to-poly.c (build_scop_bbs): Remove region.
5764 (build_pbb_scattering_polyhedron): Moved from schedule_to_scattering.
5765 (build_scop_scattering): Renamed from build_scop_canonical_schedules.
5766 (check_poly_representation): Do not return bool.
5767 (graphite_transform_loops): Reformat.
5768 * sese.h (SESE_ENTRY_BB, SESE_EXIT_BB): New.
5769
5770 2009-03-04 Sebastian Pop <sebastian.pop@amd.com>
5771
5772 * graphite-poly.c (print_pbb_domain, print_pbb, print_scop,
5773 debug_pbb_domain, debug_pbb, debug_scop): New.
5774 * graphite-poly.h (print_pbb_domain, print_pbb, print_scop,
5775 debug_pbb_domain, debug_pbb, debug_scop): Declared.
5776
5777 2009-03-02 Sebastian Pop <sebastian.pop@amd.com>
5778
5779 PR middle-end/39335
5780 * tree-parloops.c (canonicalize_loop_ivs): Call fold_convert
5781 when the type precision of the induction variable should be
5782 larger than the type precision of nit.
5783 (gen_parallel_loop): Update use of canonicalize_loop_ivs.
5784 * graphite-clast-to-gimple.c (graphite_loop_normal_form): Same.
5785 * tree-flow.h (canonicalize_loop_ivs): Update declaration.
5786
5787 * gcc.dg/graphite/pr39335_1.c: New.
5788 * gcc.dg/graphite/pr39335.c: New.
5789
5790 2009-03-02 Sebastian Pop <sebastian.pop@amd.com>
5791
5792 * tree-parloops.c (canonicalize_loop_ivs): reduction_list contains
5793 SSA_NAMES not struct reduction_info.
5794
5795 2009-03-02 Sebastian Pop <sebastian.pop@amd.com>
5796
5797 * sese.c (expand_scalar_variables_expr): Handle ADDR_EXPR.
5798
5799 2009-02-27 Sebastian Pop <sebastian.pop@amd.com>
5800 Tobias Grosser <grosser@fim.uni-passau.de>
5801
5802 * sese.c (new_sese): Initialize SESE_REDUCTION_LIST.
5803 (free_sese): Free SESE_REDUCTION_LIST.
5804 * sese.h (struct sese): Add field reduction_list.
5805 (SESE_REDUCTION_LIST): New.
5806 * graphite-clast-to-gimple.c (graphite_loop_normal_form): Call
5807 canonicalize_loop_ivs on SESE_REDUCTION_LIST.
5808
5809 2009-02-27 Sebastian Pop <sebastian.pop@amd.com>
5810 Tobias Grosser <grosser@fim.uni-passau.de>
5811
5812 * tree-flow.h (gather_scalar_reductions): Use struct loop * instead
5813 of loop_p.
5814
5815 2009-02-27 Sebastian Pop <sebastian.pop@amd.com>
5816 Tobias Grosser <grosser@fim.uni-passau.de>
5817
5818 * tree-parloops.c (struct brli, build_reduction_list_info,
5819 analyze_reduction_list, gather_scalar_reductions): New.
5820 (loop_parallel_p): Build a reduction list containing only
5821 PHI_RESULT SSA_NAMEs: call gather_scalar_reductions.
5822 (gen_parallel_loop): Call the analysis analyze_reduction_list.
5823 (parallelize_loops): Now reduction_list is a htab_t of SSA_NAMEs.
5824 * tree-flow.h (gather_scalar_reductions): Declared.
5825
5826 2009-02-26 Sebastian Pop <sebastian.pop@amd.com>
5827
5828 PR middle-end/39308
5829 * graphite-clast-to-gimple.c (graphite_loop_normal_form): Do not call
5830 number_of_iterations_exit from a gcc_assert.
5831
5832 2009-02-25 Sebastian Pop <sebastian.pop@amd.com>
5833 Jan Sjodin <jan.sjodin@amd.com>
5834
5835 * output.h (graphite_out_file, graphite_in_file): Declared.
5836 * toplev.c (graphite_out_file, graphite_in_file): New.
5837 (init_asm_output): Initialize graphite_in_file and graphite_out_file.
5838 * graphite-clast-to-gimple.c (build_cloog_prog): Read PBB_SCATTERING.
5839 Don't call schedule_to_scattering.
5840 * common.opt (fgraphite-write, fgraphite-read): New.
5841 * graphite-poly.c: Include output.h.
5842 (print_scattering_function, print_scattering_functions,
5843 debug_scattering_function, debug_scattering_functions,
5844 graphite_write_transforms, graphite_read_transforms,
5845 graphite_generate_scattering_fns): New.
5846 (apply_poly_transforms): Do not apply transform if flag_graphite_read.
5847 Call graphite_generate_scattering_fns, graphite_write_transforms,
5848 graphite_read_transforms.
5849 (new_poly_bb): Initialize PBB_SCATTERING.
5850 (free_poly_bb): Free PBB_SCATTERING.
5851 (schedule_to_scattering): Does not return, initialize PBB_SCATTERING.
5852 * graphite-poly.h (struct poly_bb): Add field scattering.
5853 (PBB_SCATTERING): New.
5854 (print_scattering_function, print_scattering_functions,
5855 debug_scattering_function, debug_scattering_functions): Declared.
5856 * graphite-ppl.c (cloog_matrix_to_ppl_constraint): Matrices contain
5857 GMP values, not integers!
5858 (ppl_print_polyhedron_matrix, debug_ppl_polyhedron_matrix,
5859 ppl_read_polyhedron_matrix): New.
5860 * graphite-ppl.h (ppl_print_polyhedron_matrix,
5861 debug_ppl_polyhedron_matrix,
5862 ppl_read_polyhedron_matrix): Declared.
5863 * Makefile.in (graphite-poly.o): Depends on output.h.
5864
5865 2009-02-23 Sebastian Pop <sebastian.pop@amd.com>
5866 Tobias Grosser <grosser@fim.uni-passau.de>
5867
5868 Revert this change:
5869 * graphite-scop-detection.c (stmt_simple_for_scop_p): Analyze
5870 scalar evolutions in the scop_entry->loop_father.
5871
5872 2009-02-23 Sebastian Pop <sebastian.pop@amd.com>
5873 Tobias Grosser <grosser@fim.uni-passau.de>
5874
5875 * graphite.h (ref_nb_loops): Remove declaration.
5876 (struct gimple_bb, gimple_bb_p, GBB_BB, GBB_DATA_REFS, GBB_CONDITIONS,
5877 GBB_CONDITION_CASES, GBB_CLOOG_IV_TYPES, gbb_loop, print_gimple_bb,
5878 debug_gbb): Moved to sese.h.
5879 * sese.h: As said.
5880
5881 2009-02-23 Sebastian Pop <sebastian.pop@amd.com>
5882 Tobias Grosser <grosser@fim.uni-passau.de>
5883
5884 * graphite-data-ref.[ch]: Disable.
5885
5886 2009-02-23 Sebastian Pop <sebastian.pop@amd.com>
5887 Tobias Grosser <grosser@fim.uni-passau.de>
5888
5889 * graphite-scop-detection.c (stmt_simple_for_scop_p): Analyze
5890 scalar evolutions in the scop_entry->loop_father.
5891
5892 2009-02-23 Sebastian Pop <sebastian.pop@amd.com>
5893
5894 * graphite-scop-detection.c (nb_reductions_in_loop): Moved here...
5895 (graphite_cannot_represent_loop_niter): Renamed
5896 graphite_cannot_represent_loop. Call nb_reductions_in_loop.
5897 (limit_scops): build_sese_loop_nests does not return a bool.
5898 * graphite-scop-detection.h (nb_reductions_in_loop): Declared.
5899 * sese.c (nb_reductions_in_loop): ... from here.
5900 (graphite_loop_normal_form): ... from here.
5901 (sese_record_loop): Does not fail, so does not return a bool.
5902 (build_sese_loop_nests): Same.
5903 * sese.h (build_sese_loop_nests): Update declaration.
5904 * graphite-clast-to-gimple.c (graphite_loop_normal_form): Moved here...
5905 (build_graphite_loop_normal_form): New.
5906 (gloog): Call build_graphite_loop_normal_form.
5907 * graphite-sese-to-poly.c (build_poly_scop): Don't fail on
5908 build_sese_loop_nests.
5909
5910 * gcc.dg/graphite/id-1.c: New.
5911
5912 2009-02-23 Sebastian Pop <sebastian.pop@amd.com>
5913 Tobias Grosser <grosser@fim.uni-passau.de>
5914
5915 * graphite-sese-to-poly.c (scan_tree_for_params): Remove REAL_CST.
5916 The SCoP detection fix is sufficient.
5917
5918 2009-02-21 Sebastian Pop <sebastian.pop@amd.com>
5919
5920 PR tree-optimization/39260
5921 * graphite-scop-detection.c (harmful_stmt_in_bb): Stop a SCoP when
5922 the basic block contains a condition with a real type.
5923 * graphite-sese-to-poly.c (scan_tree_for_params): Handle REAL_CST.
5924
5925 * gcc.dg/graphite/pr39260.c: New.
5926
5927 2009-02-21 Sebastian Pop <sebastian.pop@amd.com>
5928
5929 * graphite-poly.c: Inlcude params.h.
5930 (graphite_trans_loop_block): Use PARAM_LOOP_BLOCK_TILE_SIZE for
5931 the size of a tile.
5932 * Makefile.in (graphite-poly.o): Depend on PARAMS_H.
5933 * params.def (PARAM_LOOP_BLOCK_TILE_SIZE): Define.
5934
5935 2009-02-20 Sebastian Pop <sebastian.pop@amd.com>
5936 Tobias Grosser <grosser@fim.uni-passau.de>
5937
5938 * graphite-scop-detection.c (dot_all_scops_1,
5939 dot_all_scops): Moved here.
5940 * graphite-scop-detection.h (dot_all_scops): Declared here.
5941 * graphite.c (graphite_initialize, graphite_finalize): New.
5942 (graphite_transform_loops): Cleaned up.
5943 * sese.c (debug_oldivs): Moved here.
5944 * graphite-poly.c (graphite_apply_transformations): Renamed
5945 apply_poly_transforms.
5946 (debug_loop_vec): Moved here.
5947 * graphite-sese-to-poly.c (build_bb_loops, build_sese_conditions_1,
5948 scop_contains_non_iv_scalar_phi_nodes, build_sese_conditions,
5949 find_scop_parameters, build_scop_iteration_domain,
5950 add_conditions_to_constraints, build_scop_canonical_schedules,
5951 build_scop_data_accesses): Now static.
5952 (build_poly_scop, check_poly_representation): New.
5953
5954 2009-02-20 Sebastian Pop <sebastian.pop@amd.com>
5955
5956 * graphite.c (graphite_stmt_p, new_gimple_bb, free_gimple_bb,
5957 remove_gbbs_in_scop, free_scops, try_generate_gimple_bb,
5958 build_scop_bbs, ref_nb_loops, compare_prefix_loops,
5959 build_scop_canonical_schedules, build_bb_loops, add_value_to_dim,
5960 scan_tree_for_params_right_scev, scan_tree_for_params_int,
5961 scan_tree_for_params, struct irp_data, dx_record_params,
5962 find_params_in_bb, find_scop_parameters, gbb_from_bb,
5963 build_loop_iteration_domains, add_conditions_to_domain,
5964 phi_node_is_iv, bb_contains_non_iv_scalar_phi_nodes,
5965 scop_contains_non_iv_scalar_phi_nodes, build_sese_conditions_1,
5966 build_sese_conditions, add_conditions_to_constraints,
5967 build_scop_iteration_domain, build_access_matrix_with_af,
5968 build_access_matrix,
5969 build_scop_data_accesses): Moved to graphite-sese-to-poly.c.
5970
5971 * graphite-sese-to-poly.c: New.
5972 * graphite-sese-to-poly.h: New.
5973
5974 * Makefile.in: Add new rule for graphite-sese-to-poly.o.
5975
5976 2009-02-20 Sebastian Pop <sebastian.pop@amd.com>
5977
5978 * graphite.c: Split graphite code generation to a new file.
5979 (graphite_verify, gmp_cst_to_tree, clast_name_to_gcc,
5980 max_precision_type, clast_to_gcc_expression_red,
5981 clast_to_gcc_expression, gcc_type_for_clast_expr,
5982 gcc_type_for_clast_eq, loop_iv_stack_patch_for_consts,
5983 graphite_translate_clast_equation, graphite_create_guard_cond_expr,
5984 graphite_create_new_guard, clast_get_body_of_loop,
5985 gcc_type_for_cloog_iv, gcc_type_for_iv_of_clast_loop,
5986 graphite_create_new_loop, build_iv_mapping, copy_renames,
5987 translate_clast, find_cloog_iv_in_expr, compute_cloog_iv_types_1,
5988 compute_cloog_iv_types, free_scattering, save_var_name,
5989 initialize_cloog_names, build_scop_context, build_cloog_prog,
5990 set_cloog_options, debug_clast_stmt, scop_to_clast,
5991 print_generated_program, debug_generated_program,
5992 gloog): Moved to graphite-clast-to-gimple.c.
5993
5994 (struct cloog_prog_clast): Moved to graphite-clast-to-gimple.h.
5995
5996 (iv_stack_entry_is_constant, iv_stack_entry_is_iv,
5997 loop_iv_stack_push_iv, loop_iv_stack_insert_constant,
5998 loop_iv_stack_pop, loop_iv_stack_get_iv,
5999 loop_iv_stack_get_iv_from_name, debug_loop_iv_stack,
6000 free_loop_iv_stack, loop_iv_stack_remove_constants,
6001 debug_rename_elt, debug_rename_map_1, debug_rename_map,
6002 rename_map_elt_info, eq_rename_map_elts, debug_ivtype_elt,
6003 debug_ivtype_map_1, debug_ivtype_map, ivtype_map_elt_info,
6004 eq_ivtype_map_elts, sese_add_exit_phis_edge,
6005 sese_add_exit_phis_var, sese_insert_phis_for_liveouts,
6006 get_vdef_before_sese, sese_adjust_vphi,
6007 get_new_name_from_old_name, sese_adjust_phis_for_liveouts,
6008 oldiv_for_loop, rename_variables_in_stmt, is_parameter,
6009 is_iv, expand_scalar_variables_ssa_name,
6010 expand_scalar_variables_expr, expand_scalar_variables_stmt,
6011 expand_scalar_variables, rename_variables, remove_condition,
6012 get_true_edge_from_guard_bb, get_false_edge_from_guard_bb,
6013 add_loop_exit_phis, insert_loop_close_phis, struct igp,
6014 default_liveout_before_guard, add_guard_exit_phis,
6015 insert_guard_phis, register_old_and_new_names,
6016 graphite_copy_stmts_from_block, register_sese_liveout_renames,
6017 copy_bb_and_scalar_dependences, outermost_loop_in_sese,
6018 if_region_set_false_region, create_if_region_on_edge,
6019 move_sese_in_condition): Moved to sese.c.
6020
6021 (nb_loops_around_loop_in_sese, struct ifsese, if_region_entry,
6022 if_region_exit, if_region_get_condition_block,
6023 struct rename_map_elt, new_rename_map_elt, enum iv_stack_entry_kind,
6024 union iv_stack_entry_data_union, struct iv_stack_entry_struct,
6025 iv_stack_entry_p, loop_iv_stack, struct ivtype_map_elt,
6026 ivtype_map_elt, new_ivtype_map_elt,
6027 recompute_all_dominators): Moved to sese.h.
6028
6029 * graphite-clast-to-gimple.c: New.
6030 * graphite-clast-to-gimple.h: New.
6031 * Makefile.in: Add new rule for graphite-clast-to-gimple.o.
6032 * sese.c: Modified as said above.
6033 * sese.h: Same.
6034
6035 2009-02-20 Sebastian Pop <sebastian.pop@amd.com>
6036
6037 * graphite.c: Split scop detection to a new file.
6038 (enum gbb_type, gbb_type, get_bb_type, struct sd_region_p, sd_region,
6039 move_sd_regions, loop_affine_expr, exclude_component_ref,
6040 is_simple_operand, stmt_simple_for_scop_p, harmful_stmt_in_bb,
6041 graphite_cannot_represent_loop_niter, struct scopdet_info,
6042 scopdet_basic_block_info, build_scops_1, bb_in_sd_region,
6043 find_single_entry_edge, find_single_exit_edge,
6044 create_single_entry_edge, sd_region_without_exit,
6045 create_single_exit_edge, unmark_exit_edges, mark_exit_edges,
6046 create_sese_edges, build_graphite_scops, limit_scops, build_scops):
6047 Moved to graphite-scop-detection.c.
6048
6049 * graphite-scop-detection.c: New.
6050 * graphite-scop-detection.h: New.
6051 * Makefile.in: Add new rule for graphite-scop-detection.o.
6052
6053 * sese.c: Include tree-chrec.h, tree-data-ref.h, and
6054 tree-scalar-evolution.h.
6055 (nb_reductions_in_loop, graphite_loop_normal_form, sese_record_loop,
6056 build_sese_loop_nests): Moved here from graphite.c.
6057 (param_index): Renamed parameter_index_in_region.
6058
6059 2009-02-18 Tobias Grosser <grosser@fim.uni-passau.de>
6060 Sebastian Pop <sebastian.pop@amd.com>
6061
6062 * gcc.dg/graphite/block-0.c: Expected to fail now.
6063 * gcc.dg/graphite/block-1.c: Same.
6064 * gcc.dg/graphite/block-5.c: Same.
6065 * gcc.dg/graphite/block-6.c: Same.
6066
6067 2009-02-18 Tobias Grosser <grosser@fim.uni-passau.de>
6068 Sebastian Pop <sebastian.pop@amd.com>
6069
6070 * graphite.h: Separate from graphite_bb_p the polyhedral
6071 representation in poly_bb_p and the GCC specifics in gimple_bb_p.
6072 (struct data_dependence_polyhedron, RDGE_DDP, ddp_p): Moved to
6073 graphite-data-ref.h.
6074 (struct poly_bb, PBB_SCOP, PBB_STATIC_SCHEDULE, PBB_DOMAIN,
6075 PBB_BLACK_BOX, PBB_LOOPS, pbb_nb_loops, pbb_loop_at_index,
6076 pbb_loop_index, struct scop, SCOP_BBS, SCOP_REGION, SCOP_ENTRY,
6077 SCOP_EXIT, SCOP_REGION_BBS, SCOP_DEP_GRAPH, SCOP_PARAMS,
6078 SCOP_LOOP_NEST, SCOP_PARAMS, SCOP_OLDIVS, SCOP_LIVEOUT_RENAMES,
6079 scop_nb_params): Moved to graphite-poly.h.
6080 * graphite-data-ref.c: Same.
6081 * graphite-data-ref.h: New.
6082 * graphite.c: Same.
6083 (pbb_compare, graphite_sort_pbbs, graphite_trans_bb_move_loop,
6084 graphite_trans_bb_strip_mine, strip_mine_profitable_p,
6085 is_interchange_valid, graphite_trans_bb_block,
6086 graphite_trans_loop_block, scop_max_loop_depth,
6087 graphite_trans_scop_block, graphite_apply_transformations,
6088 new_poly_bb, free_poly_bb, new_scop, free_scop): Moved to
6089 graphite-poly.c.
6090 * graphite-poly.h: New.
6091 * graphite-poly.c: New.
6092 * Makefile.in (OBJS-common): Add graphite-poly.o.
6093 (graphite-poly.o): New rule.
6094 * tree-data-ref.h (struct data_reference): Remove unused scop field.
6095 (DR_SCOP): Removed.
6096
6097 2009-02-18 Sebastian Pop <sebastian.pop@amd.com>
6098 Tobias Grosser <grosser@fim.uni-passau.de>
6099
6100 * graphite.c: Replace gb -> gbb.
6101 * graphite.h: Same.
6102 * graphite-data-ref.c: Same.
6103
6104 2009-02-18 Sebastian Pop <sebastian.pop@amd.com>
6105 Tobias Grosser <grosser@fim.uni-passau.de>
6106
6107 * Makefile.in (OBJS-commmon): Add sese.o.
6108 (sese.o): New.
6109 (graphite.o): Add sese.h.
6110 * graphite.c (bb_in_ss_p, loop_in_sese_p,
6111 sese_build_livein_liveouts_use, sese_build_livein_liveouts_bb,
6112 sese_build_livein_liveouts, register_bb_in_sese, new_sese, free_sese):
6113 Move to sese.
6114 (block_before_scop): Add missing return.
6115 (new_scop, free_scop): Remove SESE data structures.
6116 (scop_record_loop, scan_tree_for_params, find_params_in_bb,
6117 find_scop_parameters, build_loop_iteration_domains,
6118 add_conditions_to_domain, register_scop_liveout_renames,
6119 copy_bb_and_scalar_dependences): Scop -> SESE.
6120
6121 (add_conditions_to_domain): SCoP -> SESE and remove check
6122 (scop_contains_non_iv_scalar_phi_nodes): New.
6123 (build_scop_conditions_1, build_scop_conditions): Remove check for
6124 non iv scalar phi nodes.
6125 (print_scop_statistics): New.
6126 (graphite_transform_loops): Cleanup.
6127
6128 * graphite.h: Move to sese & cleanup.
6129 * sese.c: New.
6130 * sese.h: New.
6131
6132 2009-02-16 Sebastian Pop <sebastian.pop@amd.com>
6133 Tobias Grosser <grosser@fim.uni-passau.de>
6134
6135 * graphite.c (build_scop_conditions_1): Conditions are only
6136 at the end of a basic block.
6137
6138 2009-02-16 Sebastian Pop <sebastian.pop@amd.com>
6139 Tobias Grosser <grosser@fim.uni-passau>
6140
6141 * graphite.h (struct graphite_bb): Remove compressed_alpha_matrix
6142 field.
6143 (GBB_ALPHA): Removed.
6144
6145 2009-02-16 Sebastian Pop <sebastian.pop@amd.com>
6146 Tobias Grosser <grosser@fim.uni-passau.de>
6147
6148 * graphite-data-ref.c (graphite_test_dependence): Don't use
6149 GBB_DYNAMIC_SCHEDULE.
6150 * graphite.c (new_graphite_bb): Same.
6151 (free_graphite_bb): Same.
6152 (build_scop_dynamic_schedules): Removed.
6153 (graphite_transform_loops): Don't call it.
6154 * graphite.h (struct graphite_bb): Remove dynamic_schedule field.
6155 (GBB_DYNAMIC_SCHEDULE): Removed.
6156
6157 2009-02-16 Sebastian Pop <sebastian.pop@amd.com>
6158 Tobias Grosser <grosser@fim.uni-passau.de>
6159
6160 * graphite.c (schedule_to_scattering): Don't use CloogMatrix.
6161 (print_graphite_bb): Same.
6162 (build_cloog_prog): Same.
6163
6164 2009-02-16 Sebastian Pop <sebastian.pop@amd.com>
6165 Tobias Grosser <grosser@fim.uni-passau.de>
6166
6167 * graphite.c (build_cloog_prog): Don't use CloogMatrix.
6168
6169 2009-02-16 Sebastian Pop <sebastian.pop@amd.com>
6170 Tobias Grosser <grosser@fim.uni-passau.de>
6171
6172 * graphite.c (build_scop_context): Don't use CloogMatrix.
6173 * graphite-ppl.c (new_Cloog_Domain_from_ppl_Polyhedron): New.
6174 * graphite-ppl.h (new_Cloog_Domain_from_ppl_Polyhedron): Declared.
6175
6176 2009-02-16 Sebastian Pop <sebastian.pop@amd.com>
6177 Tobias Grosser <grosser@fim.uni-passau.de>
6178
6179 * graphite.h (struct scop): Move params, old_ivs, loops, loop_nest,
6180 liveout_renames, add_params fields...
6181 (struct sese): ... here.
6182 (SESE_PARAMS, SESE_LOOPS, SESE_LOOP_NEST, SESE_ADD_PARAMS,
6183 SESE_PARAMS, SESE_OLDIVS, SESE_LIVEOUT_RENAMES): New.
6184
6185 2009-02-16 Sebastian Pop <sebastian.pop@amd.com>
6186 Tobias Grosser <grosser@fim.uni-passau.de>
6187
6188 * graphite.c (print_scop): Do not print the CLooG program.
6189 (new_scop, free_scop, initialize_cloog_names, build_scop_context,
6190 build_cloog_prog, gloog): Don't use SCOP_PROG.
6191 (find_transform): Renamed scop_to_clast.
6192 (print_generated_program, debug_generated_program): New.
6193 (graphite_transform_loops): Adapt to new interface.
6194 * graphite.h (struct scop): Remove program field.
6195 (SCOP_PROG): Removed.
6196 (print_generated_program, debug_generated_program): Declared.
6197
6198 2009-02-16 Sebastian Pop <sebastian.pop@amd.com>
6199
6200 * graphite-data-ref.c (schedule_precedes_p, schedule_same_p): New.
6201 (statement_precedes_p): Use schedule_same_p and schedule_precedes_p.
6202 * graphite.c (gbb_compare, schedule_to_scattering, print_graphite_bb,
6203 free_graphite_bb, build_scop_canonical_schedules,
6204 graphite_trans_bb_strip_mine, graphite_trans_scop_block): Static
6205 schedules are now represented using a ppl_Linear_Expression_t.
6206 * graphite.h (struct graphite_bb): Same.
6207 * graphite-ppl.c (ppl_lexico_compare_linear_expressions): New.
6208 * graphite-ppl.h (ppl_lexico_compare_linear_expressions): Declared.
6209
6210 2009-02-15 Sebastian Pop <sebastian.pop@amd.com>
6211
6212 * graphite.c: Free local memory.
6213 * graphite-ppl.c: Same.
6214
6215 2009-02-15 Sebastian Pop <sebastian.pop@amd.com>
6216
6217 * graphite.c (const_column_index, get_first_matching_sign_row_index,
6218 get_lower_bound_row, get_upper_bound_row, copy_constraint,
6219 swap_constraint_variables, scale_constraint_variable): Removed.
6220 (graphite_trans_bb_strip_mine): Remove pong.
6221 * graphite-ppl.c: Include missing header files.
6222 (set_inhomogeneous, set_coef, shift_poly, ppl_strip_loop): New.
6223 * graphite-ppl.h (ppl_strip_loop): Declared.
6224 * Makefile.in (graphite-ppl.o): Adjust dependences.
6225
6226 2009-02-14 Sebastian Pop <sebastian.pop@amd.com>
6227
6228 * graphite.c (build_loop_iteration_domains): Remove ping pong.
6229 (build_scop_iteration_domain): Same.
6230
6231 2009-02-13 Sebastian Pop <sebastian.pop@amd.com>
6232
6233 * graphite.c (scan_tree_for_params, add_conditions_to_domain): Remove
6234 ping pong.
6235 (add_value_to_dim, scan_tree_for_params_right_scev,
6236 scan_tree_for_params_int): New.
6237 * graphite-ppl.c (oppose_constraint): New.
6238 (insert_constraint_into_matrix): Implement missing cases.
6239 * graphite-ppl.h (insert_constraint_into_matrix): Declared.
6240
6241 2009-02-13 Sebastian Pop <sebastian.pop@amd.com>
6242
6243 * graphite.c (graphite_trans_bb_move_loop): Remove ping pong,
6244 use ppl_move_dimension.
6245
6246 2009-02-12 Sebastian Pop <sebastian.pop@amd.com>
6247
6248 * graphite-data-ref.c: Domains are now ppl_Polyhedra_t.
6249 * graphite.c: Same.
6250 * graphite.h: Same.
6251 * graphite-ppl.c: Same.
6252 * graphite-ppl.h: Same.
6253
6254 2009-02-12 Sebastian Pop <sebastian.pop@amd.com>
6255
6256 Revert last 3 commits.
6257
6258 2009-02-10 Sebastian Pop <sebastian.pop@amd.com>
6259
6260 * graphite.c (scan_tree_for_params, add_conditions_to_domain): Remove
6261 ping pong.
6262 (add_value_to_dim, scan_tree_for_params_right_scev,
6263 scan_tree_for_params_int): New.
6264 * graphite-ppl.c (oppose_constraint): New.
6265 (insert_constraint_into_matrix): Implement missing cases.
6266 * graphite-ppl.h (insert_constraint_into_matrix): Declared.
6267
6268 2009-02-10 Sebastian Pop <sebastian.pop@amd.com>
6269
6270 * graphite.c (graphite_trans_bb_move_loop): Remove unused variables.
6271
6272 2009-02-10 Sebastian Pop <sebastian.pop@amd.com>
6273 Tobias Grosser <grosser@fim.uni-passau.de>
6274
6275 * graphite.c (graphite_trans_bb_move_loop): Remove ping pong,
6276 use ppl_move_dimension.
6277 * graphite-ppl.c (ppl_move_dimension): New.
6278 * graphite-ppl.h (ppl_move_dimension): Declared.
6279
6280 2009-02-10 Sebastian Pop <sebastian.pop@amd.com>
6281
6282 * graphite.c: Do not include cloog/cloog.h.
6283 (print_graphite_bb): Remove ping pong, call PPL print function.
6284
6285 2009-02-10 Tobias Grosser <grosser@fim.uni-passau.de>
6286
6287 * Makefile.in (OBJS-common): Add graphite-ppl.o.
6288 (graphite.o): Add dependence on graphite-ppl.h.
6289 (graphite-ppl.o): New.
6290 (graphite-data-ref.c): Ping pong between PPL data structures
6291 and matrices.
6292 * graphite-ppl.c: New.
6293 * graphite-ppl.h: New.
6294 * graphite.c: Include graphite-ppl.h.
6295 (print_graphite_bb, add_conditions_to_domain, build_cloog_prog,
6296 graphite_trans_bb_move_loop, graphite_trans_bb_strip_mine):
6297 Ping pong between PPL data structures and matrices.
6298 (new_graphite_bb): Create a PPL constraint system.
6299 Call ppl_delete_Constraint_System instead of cloog_matrix_free.
6300 (build_loop_iteration_domains): Use PPL functions.
6301 * graphite.h: Include graphite-ppl.h. Fix comments.
6302 (graphite_bb): Use a ppl_Constraint_System_t instead of
6303 CloogMatrix for representing the domain.
6304 (scop): Remove static_schedule.
6305 (gbb_nb_loops): Ping pong between PPL data structures and matrices.
6306
6307 2009-02-06 Sebastian Pop <sebastian.pop@amd.com>
6308
6309 * graphite.c: Fix some comments.
6310
6311 2009-02-05 Sebastian Pop <sebastian.pop@amd.com>
6312
6313 PR middle-end/38953
6314 * graphite.c (if_region_set_false_region): After moving a region
6315 in the false branch of a condition, remove the empty dummy
6316 basic block.
6317 (gloog): Remove wrong fix for PR38953.
6318
6319 2009-02-03 Tobias Grosser <grosser@fim.uni-passau.de>
6320
6321 * graphite.c (bb_in_sese_p, sese_build_livein_liveouts_use,
6322 sese_build_livein_liveouts_bb, sese_build_livein_liveouts,
6323 register_bb_in_sese, new_sese, free_sese): Moved.
6324 (dot_scop_1, build_scop_loop_nests, build_loop_iteration_domains,
6325 outermost_loop_in_scop, build_scop_iteration_domain,
6326 expand_scalar_variables_ssa_name, get_vdef_before_scop,
6327 limit_scops): Use bb_in_sese_p instead of bb_in_scop_p.
6328 Use loop_in_sese_p instead of loop_in_scop_p.
6329 (new_graphite_bb, new_scop, gloog): Do not initialize SCOP_BBS_B.
6330 (free_scop): Do not free SCOP_BBS_B.
6331 (nb_loops_around_loop_in_scop, nb_loops_around_gb,
6332 ref_nb_loops): Moved here...
6333 * graphite.h (ref_nb_loops): ... from here.
6334 (struct scop): Remove bbs_b bitmap.
6335 (SCOP_BBS_B, bb_in_scop_p, loop_in_scop_p): Removed.
6336 * gcc.dg/graphite/scop-19.c: New
6337
6338 2009-02-03 Tobias Grosser <grosser@fim.uni-passau.de>
6339
6340 * graphite.c (scopdet_basic_block_info): Fix bug in scop
6341 detection.
6342
6343 2009-01-30 Tobias Grosser <grosser@fim.uni-passau.de>
6344
6345 * graphite.c (new_loop_to_cloog_loop_str, hash_loop_to_cloog_loop,
6346 eq_loop_to_cloog_loop): Remove.
6347 (new_scop, free_scop): Remove SCOP_LOOP2CLOOG_LOOP.
6348 * graphite.h (struct scop): Remove loop2cloog_loop.
6349 (loop_domain_dim, loop_iteration_vector_dim): Remove.
6350
6351 2009-01-30 Tobias Grosser <grosser@fim.uni-passau.de>
6352
6353 * opts.c (decode_options): Only add graphite options to O2
6354 if we compile with graphite enabled.
6355
6356 2009-01-26 Sebastian Pop <sebastian.pop@amd.com>
6357
6358 * Merge from mainline (r143163:143684).
6359
6360 2009-01-26 Sebastian Pop <sebastian.pop@amd.com>
6361
6362 * graphite.c (debug_value): Removed.
6363 * graphite.h (debug_value): Removed.
6364
6365 2009-01-23 Sebastian Pop <sebastian.pop@amd.com>
6366
6367 * passes.c (init_optimization_passes): Do not call pass_copy_prop
6368 after graphite: pass_copy_prop does not maintain a proper loop closed
6369 SSA form. pass_copy_prop should be fixed.
6370
6371 2009-01-23 Sebastian Pop <sebastian.pop@amd.com>
6372
6373 * graphite.c (scop_adjust_phis_for_liveouts): Fix warning.
6374
6375 2009-01-23 Sebastian Pop <sebastian.pop@amd.com>
6376
6377 * graphite.c (graphite_verify): Add a call to verify_loop_closed_ssa.
6378 (gloog): Split the exit of the scop when the scop exit is a loop exit.
6379 (graphite_transform_loops): Only call cleanup_tree_cfg if gloog
6380 changed the CFG.
6381
6382 2009-01-20 Sebastian Pop <sebastian.pop@amd.com>
6383
6384 * graphite.c (gloog): Return true when code gen succeeded.
6385 (graphite_transform_loops): Do not call cleanup_tree_cfg if
6386 the code of the function did not changed. After cleanup_tree_cfg
6387 call rewrite_into_loop_closed_ssa to maintain the loop closed ssa
6388 form.
6389
6390 2009-01-19 Sebastian Pop <sebastian.pop@amd.com>
6391
6392 * graphite.c (stmt_simple_for_scop_p): Also handle cases when
6393 gimple_call_lhs is NULL.
6394
6395 2009-01-16 Sebastian Pop <sebastian.pop@amd.com>
6396 Tobias Grosser <tobi.grosser@amd.com>
6397
6398 * graphite.c (graphite_trans_scop_block): Do not block single
6399 nested loops.
6400
6401 2009-01-15 Sebastian Pop <sebastian.pop@amd.com>
6402 Tobias Grosser <tobi.grosser@amd.com>
6403
6404 * graphite.c (build_scop_canonical_schedules): Start schedules at
6405 zero.
6406
6407 2009-01-15 Sebastian Pop <sebastian.pop@amd.com>
6408 Tobias Grosser <tobi.grosser@amd.com>
6409
6410 * graphite.c (compare_prefix_loops): New.
6411 (build_scop_canonical_schedules): Rewritten.
6412 (graphite_transform_loops): Move build_scop_canonical_schedules
6413 after build_scop_iteration_domain.
6414
6415 2009-01-14 Sebastian Pop <sebastian.pop@amd.com>
6416 Tobias Grosser <tobi.grosser@amd.com>
6417
6418 * graphite.c (add_conditions_to_domain): Add the loops to
6419 the dimension of the iteration domain. Do copy the domain
6420 only when it exists.
6421 (build_scop_conditions_1): Do not call add_conditions_to_domain.
6422 (add_conditions_to_constraints): New.
6423 (can_generate_code_stmt, can_generate_code): Removed.
6424 (gloog): Do not call can_generate_code.
6425 (graphite_transform_loops): Call add_conditions_to_constraints
6426 after building the iteration domain.
6427
6428 2009-01-14 Sebastian Pop <sebastian.pop@amd.com>
6429 Tobias Grosser <tobi.grosser@amd.com>
6430 Jan Sjodin <jan.sjodin@amd.com>
6431
6432 * graphite.c (scan_tree_for_params): On substractions negate
6433 all the coefficients of the term.
6434 (clast_to_gcc_expression_red): New. Handle reduction expressions
6435 of more than two operands.
6436 (clast_to_gcc_expression): Call clast_to_gcc_expression_red.
6437 (get_vdef_before_scop): Handle also the case of default definitions.
6438
6439 2009-01-14 Sebastian Pop <sebastian.pop@amd.com>
6440
6441 PR middle-end/38431
6442 * graphite.c (get_vdef_before_scop, scop_adjust_vphi): New.
6443 (scop_adjust_phis_for_liveouts): Call scop_adjust_vphi.
6444 (gloog): Do not call cleanup_tree_cfg.
6445 (graphite_transform_loops): Call cleanup_tree_cfg after all
6446 scops have been code generated.
6447
6448 2009-01-13 Sebastian Pop <sebastian.pop@amd.com>
6449
6450 * passes.c (init_optimization_passes): Schedule after
6451 graphite transforms pass_copy_prop, pass_dce_loop and pass_lim.
6452
6453 2009-01-13 Sebastian Pop <sebastian.pop@amd.com>
6454
6455 * graphite.c (expand_scalar_variables_stmt): Do not pass loop_p.
6456 Fix comment.
6457 (expand_scalar_variables_ssa_name): Do not pass loop_p. Fix comment.
6458 Set the type of an expression to the type of its assign statement.
6459 (expand_scalar_variables_expr): Do not pass loop_p.
6460 Fix comment. Stop recursion on tcc_constant or tcc_declaration.
6461 (copy_bb_and_scalar_dependences): Do not pass loop_p.
6462 (translate_clast): Update call to copy_bb_and_scalar_dependences.
6463
6464 2009-01-11 Sebastian Pop <sebastian.pop@amd.com>
6465
6466 * graphite.c (expand_scalar_variables_ssa_name): Set the type of
6467 an expression to the gimple_expr_type of its assign statement.
6468 (expand_scalar_variables_expr): Stop recursion on tcc_constant
6469 or tcc_declaration.
6470
6471 2009-01-11 Sebastian Pop <sebastian.pop@amd.com>
6472
6473 PR tree-optimization/38786
6474 * gcc.dg/graphite/pr38786.c: New.
6475 * graphite.c (expand_scalar_variables_ssa_name): New, outlined from
6476 the SSA_NAME case of expand_scalar_variables_expr.
6477 (expand_scalar_variables_expr): Also gather the scalar computation
6478 used to index the memory access.
6479 (expand_scalar_variables_stmt): Pass to expand_scalar_variables_expr
6480 the gimple_stmt_iterator where it inserts new code.
6481
6482 2009-01-10 Sebastian Pop <sebastian.pop@amd.com>
6483
6484 * gcc.dg/graphite/block-3.c: Fix compile error on 32bit.
6485
6486 2009-01-10 Sebastian Pop <sebastian.pop@amd.com>
6487
6488 * opts.c (decode_options): Enable flag_graphite_identity and
6489 flag_loop_block in -O2 and above.
6490
6491 2009-01-08 Sebastian Pop <sebastian.pop@amd.com>
6492
6493 * libjava/classpath/lib/gnu/java/awt/peer/gtk/GtkMouseInfoPeer.class:
6494 Fix merge problem: replace with the file from trunk.
6495
6496 2009-01-08 Sebastian Pop <sebastian.pop@amd.com>
6497
6498 * Merge from mainline (r141727:143163).
6499
6500 2009-01-07 Sebastian Pop <sebastian.pop@amd.com>
6501 Jan Sjodin <jan.sjodin@amd.com>
6502
6503 PR tree-optimization/38559
6504 * gcc.dg/graphite/pr38559.c: New.
6505
6506 * graphite.c (debug_value, copy_constraint,
6507 swap_constraint_variables, scale_constraint_variable, ): New.
6508 (get_lower_bound, get_upper_bound): Removed.
6509 (graphite_trans_bb_strip_mine): Clean up this code that works
6510 only for constant number of iterations. Fully copy upper and
6511 lower bound constraints, not only the constant part of them.
6512 * graphite.h (debug_value): Declared.
6513
6514 2009-01-06 Jan Sjodin <jan.sjodin@amd.com>
6515
6516 PR tree-optimization/38492
6517 PR tree-optimization/38498
6518 * tree-check.c (operator_is_linear, scev_is_linear_expression): New.
6519 * tree-chrec.h (scev_is_linear_expression): Declared.
6520 * graphite.c (graphite_cannot_represent_loop_niter): New.
6521 (scopdet_basic_block_info): Call graphite_cannot_represent_loop_niter.
6522 (graphite_loop_normal_form): Use gcc_assert.
6523 (scan_tree_for_params): Use CASE_CONVERT.
6524 (phi_node_is_iv, bb_contains_non_iv_scalar_phi_nodes): New.
6525 (build_scop_conditions_1): Call bb_contains_non_iv_scalar_phi_nodes.
6526 Use gcc_assert. Discard scops that contain unhandled cases.
6527 (build_scop_conditions): Return a boolean status for unhandled cases.
6528 (strip_mine_profitable_p): Print the loop number, not its depth.
6529 (is_interchange_valid): Pass the depth of the loop nest, don't
6530 recompute it wrongly.
6531 (graphite_trans_bb_block): Same.
6532 (graphite_trans_bb_block): Print tentative of loop blocking.
6533 (graphite_trans_scop_block): Do not print that the loop has been
6534 blocked.
6535 (graphite_transform_loops): Do not handle scops that contain condition
6536 scalar phi nodes.
6537
6538 * gcc.dg/graphite/pr38500.c: Fixed warning as committed
6539 in trunk.
6540 * gcc.dg/graphite/block-0.c: Update test.
6541 * gcc.dg/graphite/block-1.c: Same.
6542 * gcc.dg/graphite/block-2.c: Remove xfail and test for
6543 blocking.
6544 * gcc.dg/graphite/block-4.c: Remove test for strip mine.
6545 * gcc.dg/graphite/block-3.c: New.
6546 * gcc.dg/graphite/pr38498.c: New.
6547
6548 2008-12-22 Harsha Jagasia <harsha.jagasia@amd.com>
6549
6550 PR tree-optimization/38510
6551 * gcc.dg/graphite/pr38510.c: New.
6552 * graphite.c (recompute_all_dominators): Call mark_irreducible_loops.
6553 (translate_clast): Call recompute_all_dominators before
6554 graphite_verify.
6555 (gloog): Call recompute_all_dominators before graphite_verify.
6556
6557 2008-12-12 Sebastian Pop <sebastian.pop@amd.com>
6558
6559 PR tree-optimization/38492
6560 * graphite.c (rename_map_elt, debug_rename_elt,
6561 debug_rename_map_1, debug_rename_map, new_rename_map_elt,
6562 rename_map_elt_info, eq_rename_map_elts,
6563 get_new_name_from_old_name, bb_in_sese_p): Moved around.
6564 (sese_find_uses_to_rename_use): Renamed sese_build_livein_liveouts_use.
6565 (sese_find_uses_to_rename_bb): Renamed sese_build_livein_liveouts_bb.
6566 (sese_build_livein_liveouts): New.
6567 (new_sese, free_sese): New.
6568 (new_scop): Call new_sese.
6569 (free_scop): Call free_sese.
6570 (rename_variables_from_edge, rename_phis_end_scop): Removed.
6571 (register_old_new_names): Renamed register_old_and_new_names.
6572 (register_scop_liveout_renames, add_loop_exit_phis,
6573 insert_loop_close_phis, struct igp,
6574 default_liveout_before_guard, add_guard_exit_phis,
6575 insert_guard_phis, copy_renames): New.
6576 (translate_clast): Call insert_loop_close_phis and insert_guard_phis.
6577 (sese_add_exit_phis_edge): Renamed scop_add_exit_phis_edge.
6578 (rewrite_into_sese_closed_ssa): Renamed scop_insert_phis_for_liveouts.
6579 (scop_adjust_phis_for_liveouts): New.
6580 (gloog): Call scop_adjust_phis_for_liveouts.
6581
6582 * graphite.h (struct sese): Documented. Added fields liveout,
6583 num_ver and livein.
6584 (SESE_LIVEOUT, SESE_LIVEIN, SESE_LIVEIN_VER, SESE_NUM_VER): New.
6585 (new_sese, free_sese, sese_build_livein_liveouts): Declared.
6586 (struct scop): Added field liveout_renames.
6587 (SCOP_LIVEOUT_RENAMES): New.
6588
6589 2008-12-11 Sebastian Pop <sebastian.pop@amd.com>
6590
6591 PR tree-optimization/38409
6592 * gcc.dg/graphite/pr38409.c: New.
6593 * graphite.c (nb_reductions_in_loop): Use simple_iv.
6594
6595 2008-12-11 Sebastian Pop <sebastian.pop@amd.com>
6596
6597 * graphite.c (gcc_type_for_cloog_iv): By default return
6598 integer_type_node.
6599 (graphite_create_new_loop): Don't fold_convert the already
6600 fold_convert-ed expression.
6601
6602 2008-12-11 Harsha Jagasia <harsha.jagasia@amd.com>
6603
6604 PR tree-optimization/38446
6605 * gcc.dg/graphite/pr38446.c: New.
6606 * graphite.c (register_bb_in_sese): New.
6607 (bb_in_sese_p): Check if bb belongs to sese region by explicitly
6608 looking at the bbs in the region.
6609 * graphite.h (sese): Add region_basic_blocks pointer set to
6610 structure and initialize at the time of defining new scop.
6611
6612 2008-12-11 Tobias Grosser <grosser@fim.uni-passau.de>
6613
6614 * graphite.c (new_graphite_bb): Initialize GBB_STATIC_SCHEDULE.
6615 (find_params_in_bb): Do not free data refs.
6616 (free_graphite_bb): Add FIXME on disabled free_data_refs.
6617
6618 2008-12-11 Sebastian Pop <sebastian.pop@amd.com>
6619
6620 * gcc.dg/graphite/scop-16.c: Test only scop specific info.
6621 * gcc.dg/graphite/scop-17.c: Same.
6622 * gcc.dg/graphite/block-5.c: New.
6623 * gcc.dg/graphite/block-6.c: New.
6624 * gcc.dg/graphite/pr37485.c: Clean dump file after.
6625 * gcc.dg/graphite/pr37684.c: Same.
6626 * gcc.dg/graphite/block-2.c: Same.
6627
6628 * graphite.c (struct ivtype_map_elt): New.
6629 (debug_ivtype_elt, debug_ivtype_map_1, debug_ivtype_map,
6630 new_ivtype_map_elt, ivtype_map_elt_info, eq_ivtype_map_elts,
6631 gcc_type_for_cloog_iv): New.
6632 (loop_iv_stack_patch_for_consts): Use the type of the induction
6633 variable from the original loop, except for the automatically
6634 generated loops, i.e., in the case of a strip-mined loop, in
6635 which case there is no original loop: in that case just use
6636 integer_type_node.
6637 (new_graphite_bb): Initialize GBB_CLOOG_IV_TYPES.
6638 (free_graphite_bb): Free GBB_CLOOG_IV_TYPES.
6639 (clast_name_to_gcc): Accept params to be NULL.
6640 (clast_to_gcc_expression): Take an extra parameter for the type.
6641 Convert to that type all the expressions built by this function.
6642 (gcc_type_for_clast_expr, gcc_type_for_clast_eq): New.
6643 (graphite_translate_clast_equation): Compute the type of the
6644 clast_equation before translating its LHS and RHS.
6645 (clast_get_body_of_loop, gcc_type_for_iv_of_clast_loop): New.
6646 (graphite_create_new_loop): Compute the type of the induction
6647 variable before translating the lower and upper bounds and before
6648 creating the induction variable.
6649 (rename_variables_from_edge, rename_phis_end_scop): New.
6650 (copy_bb_and_scalar_dependences): Call rename_phis_end_scop.
6651 (sese_add_exit_phis_edge): Do not use integer_zero_node.
6652 (find_cloog_iv_in_expr, compute_cloog_iv_types_1,
6653 compute_cloog_iv_types): New.
6654 (gloog): Call compute_cloog_iv_types before starting the
6655 translation of the clast.
6656
6657 * graphite.h (struct graphite_bb): New field cloog_iv_types.
6658 (GBB_CLOOG_IV_TYPES): New.
6659 (debug_ivtype_map): Declared.
6660 (oldiv_for_loop): New.
6661
6662 2008-12-10 Tobias Grosser <grosser@fim.uni-passau.de>
6663
6664 PR middle-end/38459
6665 * graphite.c (new_scop): Initialize SCOP_ADD_PARAMS.
6666 (param_index): Assert if parameter is not know after parameter
6667 detection.
6668 (find_params_in_bb): Detect params directly in GBB_CONDITIONS.
6669 (find_scop_parameters): Mark, that we have finished parameter
6670 detection.
6671 (graphite_transform_loops): Move condition detection before parameter
6672 detection.
6673 * graphite.h (struct scop): Add SCOP_ADD_PARAMS.
6674 * gfortran.dg/graphite/pr38459.f90: New.
6675
6676 2008-12-09 Tobias Grosser <grosser@fim.uni-passau.de>
6677
6678 * graphite.c (graphite_transform_loops): Always call find_transform ()
6679 in ENABLE_CHECKING. So we test these code paths, even if we do not
6680 generate code.
6681
6682 2008-12-09 Tobias Grosser <grosser@fim.uni-passau.de>
6683
6684 * graphite.c (print_graphite_bb): Fix printing to file != dump_file.
6685 (print_scop): Ditto.
6686
6687 2008-12-08 Tobias Grosser <grosser@fim.uni-passau.de>
6688
6689 PR middle-end/38084
6690 Fix gfortran.dg/graphite/id-3.f90.
6691 * graphite.c (scopdet_basic_block_info): Fix bug that found some
6692 regions more than once.
6693
6694 2008-12-03 Sebastian Pop <sebastian.pop@amd.com>
6695
6696 Fix gfortran.dg/graphite/id-4.f90.
6697 * graphite.c (scan_tree_for_params): Do not compute the multiplicand
6698 when not needed.
6699
6700 2008-12-03 Sebastian Pop <sebastian.pop@amd.com>
6701
6702 Fix gfortran.dg/graphite/id-1.f90.
6703 * graphite.c (gmp_cst_to_tree): Pass the type in parameter.
6704 (loop_iv_stack_patch_for_consts): Update use of gmp_cst_to_tree.
6705 (max_precision_type): New.
6706 (value_clast): Removed.
6707 (clast_to_gcc_expression): Be more careful to types of expressions.
6708 Use max_precision_type and update use of gmp_cst_to_tree.
6709 (graphite_translate_clast_equation): Use max_precision_type.
6710 (graphite_create_guard_cond_expr): Do not use integer_type_node,
6711 use the type of the condition.
6712 (graphite_create_new_loop): Do not use integer_type_node, use the
6713 max_precision_type of lb and ub.
6714
6715 2008-12-03 Sebastian Pop <sebastian.pop@amd.com>
6716
6717 * graphite.c (build_scops_1): Initialize open_scop.exit
6718 and sinfo.last.
6719
6720 2008-12-02 Sebastian Pop <sebastian.pop@amd.com>
6721
6722 * gcc.dg/graphite/pr38084.c: New.
6723 * gfortran.dg/graphite/id-1.f90: New.
6724 * gfortran.dg/graphite/id-2.f90: New.
6725 * gfortran.dg/graphite/id-3.f90: New.
6726 * gfortran.dg/graphite/id-4.f90: New.
6727 * gfortran.dg/graphite/pr37857.f90: New.
6728
6729 2008-12-02 Sebastian Pop <sebastian.pop@amd.com>
6730 Jan Sjodin <jan.sjodin@amd.com>
6731 Harsha Jagasia <harsha.jagasia@amd.com>
6732
6733 PR middle-end/37852
6734 PR middle-end/37883
6735 PR middle-end/37928
6736 PR middle-end/37980
6737 PR middle-end/38038
6738 PR middle-end/38039
6739 PR middle-end/38073
6740 PR middle-end/38083
6741 PR middle-end/38125
6742
6743 * gcc.dg/graphite/pr38073.c: New.
6744 * gcc.dg/graphite/pr37928.c: New.
6745 * gcc.dg/graphite/pr37883.c: New.
6746 * gcc.dg/graphite/pr38125.c: New.
6747 * gfortran.dg/graphite/pr38083.f90: New.
6748 * gfortran.dg/graphite/pr37852.f90: New.
6749 * gfortran.dg/graphite/pr37980.f90: New.
6750
6751 * gcc.dg/graphite/scop-18.c: Remove reduction, test for
6752 the number of detected scops. Copy exact same test for loop
6753 blocking...
6754 * gcc.dg/graphite/block-1.c: Fix the number of expected
6755 loops to be blocked as reductions are not handled.
6756 * gcc.dg/graphite/block-4.c: ...here. New.
6757
6758 * tree-phinodes.c (remove_phi_nodes): New, extracted from...
6759 * tree-cfg.c (remove_phi_nodes_and_edges_for_unreachable_block):
6760 ...here.
6761 * tree-flow.h (remove_phi_nodes, canonicalize_loop_ivs): Declared.
6762 * Makefile.in (graphite.o): Depend on value-prof.h.
6763 (graphite.o-warn): Removed -Wno-error.
6764 * tree-parloops.c (canonicalize_loop_ivs): Allow reduction_list
6765 to be a NULL pointer. Call update_stmt. Return the newly created
6766 cannonical induction variable.
6767
6768 * graphite.h (debug_rename_map): Declared. Fix some comments.
6769
6770 * graphite.c: Reimplement the code generation from graphite to gimple.
6771 Include value-prof.h.
6772 (loop_iv_stack_get_iv): Do not return NULL for constant substitutions.
6773 (get_old_iv_from_ssa_name): Removed.
6774 (graphite_stmt_p): New.
6775 (new_graphite_bb): Test for useful statements before building a
6776 graphite statement for the basic block.
6777 (free_graphite_bb): Do not free GBB_DATA_REFS: this is a bug
6778 in free_data_ref that calls BITMAP_FREE (DR_VOPS (dr)) without
6779 reason.
6780 (recompute_all_dominators, graphite_verify,
6781 nb_reductions_in_loop, graphite_loop_normal_form): New.
6782 (scop_record_loop): Call graphite_loop_normal_form.
6783 (build_scop_loop_nests): Iterate over all the blocks of the
6784 function instead of relying on the incomplete information from
6785 SCOP_BBS. Return the success of the operation.
6786 (find_params_in_bb): Use the data from GBB_DATA_REFS.
6787 (add_bb_domains): Removed.
6788 (build_loop_iteration_domains): Don't call add_bb_domains.
6789 Add the iteration domain only to the basic blocks that have been
6790 translated to graphite.
6791 (build_scop_conditions_1): Add constraints only if the basic
6792 block have been translated to graphite.
6793 (build_scop_data_accesses): Completely disabled until data
6794 dependence is correctly implemented.
6795 (debug_rename_elt, debug_rename_map_1, debug_rename_map): New.
6796 (remove_all_edges_1, remove_all_edges): Removed.
6797 (get_new_name_from_old_name): New.
6798 (graphite_rename_variables_in_stmt): Renamed
6799 rename_variables_in_stmt. Call get_new_name_from_old_name.
6800 Use replace_exp and update_stmt.
6801 (is_old_iv): Renamed is_iv.
6802 (expand_scalar_variables_stmt): Extra parameter for renaming map.
6803 Use replace_exp and update_stmt.
6804 (expand_scalar_variables_expr): Same. Use the map to get the
6805 new names for the renaming of induction variables and for the
6806 renaming of variables after a basic block has been copied.
6807 (expand_scalar_variables): Same.
6808 (graphite_rename_variables): Renamed rename_variables.
6809 (move_phi_nodes): Removed.
6810 (get_false_edge_from_guard_bb): New.
6811 (build_iv_mapping): Do not insert the induction variable of a
6812 loop in the renaming iv map if the basic block does not belong
6813 to that loop.
6814 (register_old_new_names, graphite_copy_stmts_from_block,
6815 copy_bb_and_scalar_dependences): New.
6816 (translate_clast): Heavily reimplemented: copy basic blocks,
6817 do not move them. Finally, in call cleanup_tree_cfg in gloog.
6818 At each translation step call graphite_verify ensuring the
6819 consistency of the SSA, loops and dominators information.
6820 (collect_virtual_phis, find_vdef_for_var_in_bb,
6821 find_vdef_for_var_1, find_vdef_for_var,
6822 patch_phis_for_virtual_defs): Removed huge hack.
6823 (mark_old_loops, remove_dead_loops, skip_phi_defs,
6824 collect_scop_exit_phi_args, patch_scop_exit_phi_args,
6825 gbb_can_be_ignored, scop_remove_ignoreable_gbbs, ): Removed.
6826 (remove_sese_region, ifsese, if_region_entry, if_region_exit,
6827 if_region_get_condition_block, if_region_set_false_region,
6828 create_if_region_on_edge, move_sese_in_condition, bb_in_sese_p,
6829 sese_find_uses_to_rename_use, sese_find_uses_to_rename_bb,
6830 sese_add_exit_phis_edge, sese_add_exit_phis_var,
6831 rewrite_into_sese_closed_ssa): New.
6832 (gloog): Remove dead code. Early return if code cannot be
6833 generated. Call cleanup_tree_cfg once the scop has been code
6834 generated.
6835 (graphite_trans_scop_block, graphite_trans_loop_block): Do not
6836 block loops with less than two loops.
6837 (graphite_apply_transformations): Remove the call to
6838 scop_remove_ignoreable_gbbs.
6839 (limit_scops): When build_scop_loop_nests fails, continue on
6840 the next scop. Fix open_scop.entry.
6841 (graphite_transform_loops): Call recompute_all_dominators: force the
6842 recomputation of correct CDI_DOMINATORS and CDI_POST_DOMINATORS.
6843 Call initialize_original_copy_tables and free_original_copy_tables
6844 to be able to copy basic blocks during code generation.
6845 When build_scop_loop_nests fails, continue on next scop.
6846 (value_clast): New union.
6847 (clast_to_gcc_expression): Fix type cast warning.
6848
6849 2008-11-09 Sebastian Pop <sebastian.pop@amd.com>
6850
6851 * Merge from mainline (r140838:141727).
6852
6853 2008-11-05 Tobias Grosser <grosser@fim.uni-passau.de>
6854
6855 PR middle-end/37833
6856
6857 * graphite.c (scan_tree_for_params): Add POINTER_PLUS_EXPR.
6858
6859 2008-11-05 Tobias Grosser <grosser@fim.uni-passau.de>
6860
6861 PR middle-end/37943
6862
6863 * graphite.c (scopdet_basic_block_info): Fix loops with multiple
6864 exits and conditions.
6865 * gcc.dg/graphite/pr37943.c: New.
6866
6867 2008-10-23 Tobias Grosser <grosser@fim.uni-passau.de>
6868
6869 PR middle-end/37886
6870 * graphite.c (gloog): Replace EXIT_BLOCK_PTR with scop exit.
6871
6872 2008-10-23 Tobias Grosser <grosser@fim.uni-passau.de>
6873
6874 * doc/invoke.texi: Fix spaces.
6875
6876 2008-10-22 Sebastian Pop <sebastian.pop@amd.com>
6877
6878 PR tree-optimization/37891
6879 Reverted last commit.
6880 * graphite.c (create_single_entry_edge): Set
6881 EDGE_IRREDUCIBLE_LOOP and BB_IRREDUCIBLE_LOOP.
6882
6883 2008-10-21 Sebastian Pop <sebastian.pop@amd.com>
6884 Mitul Thakkar <mitul.thakkar@amd.com>
6885
6886 * graphite.c (create_single_entry_edge): Set
6887 EDGE_IRREDUCIBLE_LOOP and BB_IRREDUCIBLE_LOOP.
6888
6889 2008-10-16 Tobias Grosser <grosser@fim.uni-passau.de>
6890
6891 * doc/invoke.texi: Add -fgraphite-identity.
6892 * graphite.c (graphite_apply_transformations): Check for
6893 -fgraphite-identity.
6894 * toplev.c (process_options): Add flag_graphite_identity.
6895 * tree-ssa-loop.c: Add flag_graphite_identity.
6896
6897 2008-10-14 Sebastian Pop <sebastian.pop@amd.com>
6898
6899 Undo changes from 2008-10-02:
6900 * tree-ssa-loop-ivopts.c (rewrite_use_nonlinear_expr): Convert
6901 operand type when copying the operand to a variable of different type.
6902 * cfgloopmanip.c (create_empty_loop_on_edge): Write exit condition
6903 with the IV name after increment.
6904
6905 2008-10-14 Sebastian Pop <sebastian.pop@amd.com>
6906 Harsha Jagasia <harsha.jagasia@amd.com>
6907
6908 PR tree-optimization/37828
6909 * gcc.dg/graphite/pr37828.c: New.
6910 * graphite.c (graphite_trans_loop_block): Do not loop block
6911 single nested loops.
6912
6913 2008-10-09 Harsha Jagasia <harsha.jagasia@amd.com>
6914 Sebastian Pop <sebastian.pop@amd.com>
6915
6916 * graphite.c (struct rename_map_elt, new_rename_map_elt,
6917 rename_map_elt_info, eq_rename_map_elts): New.
6918 (graphite_rename_ivs_stmt): Renamed graphite_rename_variables_in_stmt.
6919 (expand_scalar_variables_expr): Change parameters.
6920 (expand_scalar_variables_stmt): Same.
6921 (expand_scalar_variables): Same.
6922 (graphite_rename_ivs): Rename graphite_rename_variables.
6923 (build_iv_mapping): New.
6924 (translate_clast): Call build_iv_mapping.
6925 * graphite.h (gbb_p): New name.
6926
6927 2008-10-03 Harsha Jagasia <harsha.jagasia@amd.com>
6928
6929 PR tree-optimization/37684
6930 * gcc.dg/graphite/pr37684.c: New.
6931 * graphite.c (exclude_component_ref): New.
6932 (is_simple_operand): Call exclude_component_ref.
6933
6934 2008-10-02 Jan Sjodin <jan.sjodin@amd.com>
6935 Harsha Jagasia <harsha.jagasia@amd.com>
6936
6937 PR tree-optimization/37485
6938 * gcc.dg/graphite/block-2.c: New
6939 * graphite.c (gmp_cst_to_tree): Moved.
6940 (iv_stack_entry_is_constant): New.
6941 (iv_stack_entry_is_iv): New.
6942 (loop_iv_stack_push): Renamed to loop_iv_stack_push_iv.
6943 (loop_iv_stack_insert_constant): New.
6944 (loop_iv_stack_pop): Use new datatpype.
6945 (loop_iv_stack_get_iv): Same.
6946 (loop_iv_stack_get_iv_from_name): Same.
6947 (loop_iv_stack_debug): Renamed to debug_loop_iv_stack.
6948 (loop_iv_stack_patch_for_consts): New.
6949 (loop_iv_stack_remove_constants): New.
6950 (graphite_create_new_loop): Use loop_iv_stack_push_iv.
6951 (translate_clast): Call loop_iv_stack_patch_for_consts and
6952 loop_iv_stack_remove_constants.
6953 (gloog): Use new datatype. Redirect construction edge to end
6954 block to avoid accidental deletion.
6955 * graphite.h (enum iv_stack_entry_kind): New. Tag for data in
6956 iv stack entry.
6957 (union iv_stack_entry_data): New. Data in iv stack entry.
6958 (struct iv_stack_entry): New. Datatype for iv stack entries.
6959
6960 2008-10-02 Sebastian Pop <sebastian.pop@amd.com>
6961
6962 * tree-ssa-loop-ivopts.c (rewrite_use_nonlinear_expr): Convert
6963 operand type when copying the operand to a variable of different type.
6964
6965 2008-10-02 Sebastian Pop <sebastian.pop@amd.com>
6966
6967 * cfgloopmanip.c (create_empty_loop_on_edge): Write exit condition
6968 with the IV name after increment.
6969
6970 2008-10-02 Sebastian Pop <sebastian.pop@amd.com>
6971
6972 * Merge from mainline (r140164:140838).
6973
6974 2008-09-10 Konrad Trifunovic <konrad.trifunovic@inria.fr>
6975
6976 * graphite-data-ref.c: New.
6977 * graphite.c (print_scop): Also dump the dependence graph.
6978 (bb_in_scop_p, loop_in_scop_p, nb_loops_around_gb): Moved...
6979 (new_scop): Initialize SCOP_DEP_GRAPH.
6980 (build_scop_dynamic_schedules): New.
6981 (build_access_matrix_with_af): Fixed column numbering.
6982 (graphite_transform_loops): Call build_scop_dynamic_schedules.
6983 * graphite.h: Add ifndef/define guards against multiple inclusion.
6984 (struct scop): Add dep_graph field.
6985 (SCOP_DEP_GRAPH): Defined.
6986 (ref_nb_loops): Fixed and moved to other position.
6987 (bb_in_scop_p, loop_in_scop_p, nb_loops_around_gb): ... here.
6988 (nb_loops_around_loop_in_scop): New.
6989 (graphite_dump_dependence_graph): Declared.
6990 (graphite_build_rdg_all_levels): Declared.
6991 (graphite_test_dependence): Declared.
6992 * Makefile.in (graphite-data-ref.o): New target.
6993
6994 2008-09-09 Sebastian Pop <sebastian.pop@amd.com>
6995
6996 * Merge from mainline (139870:140164).
6997
6998 2008-09-01 Sebastian Pop <sebastian.pop@amd.com>
6999
7000 * Merge from mainline (138275:139870).
7001 * gcc.dg/graphite/scop-matmult.c: XFailed as one of
7002 the commits from trunk broke the niter detection.
7003
7004 2008-09-01 Sebastian Pop <sebastian.pop@amd.com>
7005
7006 * graphite.c: Add more documentation. Fix formatting.
7007 (debug_loop_vec, debug_oldivs, loop_iv_stack,
7008 loop_iv_stack_debug): Moved...
7009 (schedule_to_scattering): Move before use.
7010 (dot_all_scops): Include in "#if 0" the code for system
7011 call dotty.
7012
7013 * graphite.h: (debug_loop_vec, debug_oldivs, loop_iv_stack,
7014 loop_iv_stack_debug): ...here.
7015
7016 2008-08-29 Jan Sjodin <jan.sjodin@amd.com>
7017
7018 * tree-phinodes.c (make_phi_node): Extern.
7019 (add_phi_node_to_bb): New.
7020 (create_phi_node): Call add_phi_node_to_bb.
7021 * tree-ssa-loop-ivopts.c (get_phi_with_result): New.
7022 (remove_statement): Handle case where stored phi was updated
7023 and is no longer the same.
7024 * graphite.c (is_parameter): New.
7025 (is_old_iv): New.
7026 (expand_scalar_variables_expr): New.
7027 (expand_scalar_variables_stmt): New.
7028 (expand_scalar_variables): New.
7029 (move_phi_nodes): Create new phi instead of moving old one.
7030 (translate_clast): Call expand_scalar_variables.
7031 (find_vdef_for_var_in_bb): Also scan regular definitions.
7032 (skip_phi_defs): New.
7033 (collect_scop_exit_phi_args): New.
7034 (patch_scop_exit_phi_args): New.
7035 (gloog): Patch phis after scop.
7036 * tree-flow.h: (add_phi_node_to_bb): Declared.
7037 (make_phi_node): Declared.
7038
7039 2008-08-26 Sebastian Pop <sebastian.pop@amd.com>
7040
7041 * graphite.c (end_scop): Split the entry of the scop when it
7042 is the header of the loop in which the scop is ending.
7043 (build_scops_1, limit_scops): Update uses of end_scop.
7044
7045 2008-08-26 Sebastian Pop <sebastian.pop@amd.com>
7046
7047 * graphite.c (dot_all_scops_1): Do not fail on uninitialized
7048 SCOP_ENTRY or SCOP_EXIT.
7049
7050 2008-08-25 Sebastian Pop <sebastian.pop@amd.com>
7051
7052 * graphite.c (get_construction_edge): Removed.
7053 (gloog): Construction edge is the scop entry edge.
7054
7055 2008-08-25 Sebastian Pop <sebastian.pop@amd.com>
7056
7057 * graphite.c (can_generate_for_scop): Removed.
7058 (gloog): Do not call it.
7059
7060 2008-08-25 Sebastian Pop <sebastian.pop@amd.com>
7061
7062 * graphite.c (new_scop): Entry of a scop is an edge.
7063 Initialize SESE region.
7064 (free_scop): Free SESE region.
7065 (build_scops_1, scopdet_bb_info): Work on edges, not on bbs.
7066 (split_difficult_bb): New, split from end_scop.
7067 (end_scop): Exit of a scop is an edge.
7068 (build_scop_bbs): Never check CDI_POST_DOMINATORS: this info is
7069 not automatically updated and thus is always wrong.
7070 * graphite.h (struct sese): New.
7071 (SESE_ENTRY): New.
7072 (SESE_EXIT): New.
7073 (struct scop): New field for a SESE region. Remove entry, exit.
7074 (SCOP_ENTRY, SCOP_EXIT): Update definitions to match same
7075 semantics as before. Moved comment around.
7076
7077 2008-08-25 Tobias Grosser <grosser@fim.uni-passau.de>
7078 Sebastian Pop <sebastian.pop@amd.com>
7079
7080 * graphite.c (graphite_transform_loops): Always enable gloog
7081 and find_transform when ENABLE_CHECKING.
7082
7083 2008-08-25 Sebastian Pop <sebastian.pop@amd.com>
7084
7085 * graphite.c (graphite_transform_loops): Move pretty printer
7086 of SCOPs before doing any transform. Remove call to print_scops
7087 and dot_all_scops_1.
7088
7089 2008-08-25 Sebastian Pop <sebastian.pop@amd.com>
7090
7091 * graphite.c (dump_gbb_conditions): Don't try to print NULL pointers.
7092 (print_graphite_bb): Same.
7093
7094 2008-08-25 Sebastian Pop <sebastian.pop@amd.com>
7095
7096 * graphite.c (dot_all_scops_1): Cleanup.
7097 (move_scops): Fix comment.
7098
7099 2008-08-25 Sebastian Pop <sebastian.pop@amd.com>
7100
7101 * graphite.c (build_scop_bbs): Revert commit 139355:
7102
7103 2008-08-20 Sebastian Pop <sebastian.pop@amd.com>
7104 Dwarakanath Rajagopal <dwarak.rajagopal@amd.com>
7105
7106 * graphite.c (build_scop_bbs): Factor up code.
7107
7108 2008-08-25 Tobias Grosser <grosser@fim.uni-passau.de>
7109
7110 * graphite.c (gloog): Update dominator info.
7111
7112 2008-08-25 Tobias Grosser <grosser@fim.uni-passau.de>
7113
7114 * graphite.c (remove_cond_exprs): Do not fail on empty bbs.
7115
7116 2008-08-24 Sebastian Pop <sebastian.pop@amd.com>
7117
7118 * graphite.c (new_graphite_bb): Remove GBB_INDEX_TO_NUM_MAP
7119 initialization.
7120 (free_graphite_bb): Remove GBB_INDEX_TO_NUM_MAP free.
7121 (translate_clast): Correct formatting.
7122 * graphite.h (struct num_map): Removed.
7123 (struct graphite_bb): Remove num_map field.
7124 (GBB_INDEX_TO_NUM_MAP): Removed.
7125
7126 2008-08-24 Sebastian Pop <sebastian.pop@amd.com>
7127
7128 * graphite.c (build_access_matrix_with_af): Fix comments.
7129 (build_scop_data_accesses): Same.
7130
7131 2008-08-24 Sebastian Pop <sebastian.pop@amd.com>
7132
7133 * graphite.c (build_scop_data_accesses): Don't construct
7134 access matrices. Add a FIXME and an assert condition that
7135 should pass when the access matrices will be needed.
7136
7137 2008-08-24 Sebastian Pop <sebastian.pop@amd.com>
7138
7139 * tree-data-ref.c (stmt_simple_memref_p): Don't call
7140 really_constant_p.
7141 * graphite.c (build_graphite_bb): Renamed new_graphite_bb.
7142 Moved close by free_graphite_bb.
7143 (free_graphite_bb): Call free_data_refs. Reset bb->aux.
7144 (new_scop): Move close by free_scop.
7145 (graphite_transform_loops): Avoid linear scan to reset bb->aux.
7146
7147 2008-08-22 Jan Sjodin <jan.sjodin@amd.com>
7148
7149 * cfgloopmanip.c (create_empty_if_region_on_edge): New.
7150 * graphite.c (clast_to_gcc_expression): Call gmp_cst_to_tree
7151 instead of recursive call.
7152 (graphite_translate_clast_equation): New.
7153 (graphite_create_guard_cond_expr): New.
7154 (graphite_create_new_guard): New.
7155 (get_stack_index_from_iv): Removed.
7156 (graphite_rename_ivs_stmt): Use gbb_loop_index.
7157 (get_true_edge_from_guard_bb): New.
7158 (translate_clast): Handle stmt_guard in clast.
7159 (get_construction_edge): Allow construction edge detection for
7160 a scope entry with multiple predecessors if one predecessor is
7161 the immediate dominator of scope entry.
7162 (can_generate_code_stmt): Enable code generation for clast_guard.
7163 (gloog): Use correct context loop. Removed check for post dominators.
7164 * cfgloop.h (create_empty_if_region_on_edge): Declared.
7165
7166 2008-08-21 Sebastian Pop <sebastian.pop@amd.com>
7167
7168 * graphite.c (remove_dead_loops): Document better which
7169 loops are removed.
7170
7171 2008-08-21 Sebastian Pop <sebastian.pop@amd.com>
7172
7173 * Makefile.in: Rename POLYLIBLIBS and POLYLIBINC to PPLLIBS
7174 and PPLINC.
7175 (graphite.o): Also depends on pointer-set.h.
7176
7177 2008-08-21 Sebastian Pop <sebastian.pop@amd.com>
7178
7179 * graphite.c (scop_record_loop): Fix compile warning.
7180
7181 2008-08-21 Harsha Jagasia <harsha.jagasia@amd.com>
7182 Sebastian Pop <sebastian.pop@amd.com>
7183
7184 * graphite.c (scop_record_loop): DECL_NAME can be NULL.
7185
7186 2008-08-21 Sebastian Pop <sebastian.pop@amd.com>
7187
7188 * graphite.c (build_graphite_bb): Initialize bb->aux to
7189 point to the graphite_bb_p.
7190 (graphite_bb_from_bb): Renamed gbb_from_bb; returns the
7191 content of bb->aux.
7192 (add_bb_domains): Does not use the scop parameter.
7193 (graphite_transform_loops): Clean bb->aux at the end.
7194
7195 2008-08-20 Dwarakanath Rajagopal <dwarak.rajagopal@amd.com>
7196 Sebastian Pop <sebastian.pop@amd.com>
7197
7198 * lib/target-supports.exp
7199 (check_effective_target_fgraphite): New.
7200
7201 * gcc.dg/graphite/graphite.exp: Early exit when
7202 check_effective_target_fgraphite returns false.
7203 Set dg-do-what-default to compile.
7204 (scan-graphite-dump-times): Removed.
7205 * gfortran.dg/graphite/graphite.exp: Same.
7206
7207 * gcc.dg/graphite/scop-0.c: Do not use "dg-do compile".
7208 Use scan-tree-dump-times instead of scan-graphite-dump-times.
7209 * gcc.dg/graphite/scop-1.c: Same.
7210 * gcc.dg/graphite/scop-2.c: Same.
7211 * gcc.dg/graphite/scop-3.c: Same.
7212 * gcc.dg/graphite/scop-4.c: Same.
7213 * gcc.dg/graphite/scop-5.c: Same.
7214 * gcc.dg/graphite/scop-6.c: Same.
7215 * gcc.dg/graphite/scop-7.c: Same.
7216 * gcc.dg/graphite/scop-8.c: Same.
7217 * gcc.dg/graphite/scop-9.c: Same.
7218 * gcc.dg/graphite/scop-10.c: Same.
7219 * gcc.dg/graphite/scop-11.c: Same.
7220 * gcc.dg/graphite/scop-12.c: Same.
7221 * gcc.dg/graphite/scop-13.c: Same.
7222 * gcc.dg/graphite/scop-matmult.c: Same.
7223 * gcc.dg/graphite/scop-14.c: Same.
7224 * gcc.dg/graphite/scop-15.c: Same.
7225 * gcc.dg/graphite/block-0.c: Same.
7226 * gcc.dg/graphite/scop-16.c: Same.
7227 * gcc.dg/graphite/block-1.c: Same.
7228 * gcc.dg/graphite/scop-17.c: Same.
7229 * gcc.dg/graphite/scop-18.c: Same.
7230 * gfortran.dg/graphite/block-1.f90: Same.
7231 * gfortran.dg/graphite/scop-1.f: Same.
7232 * gfortran.dg/graphite/block-2.f: Same.
7233
7234 2008-08-20 Sebastian Pop <sebastian.pop@amd.com>
7235
7236 * graphite.c: Fix some XXX comments.
7237 (build_scop_dynamic_schedules): Removed.
7238
7239 2008-08-20 Sebastian Pop <sebastian.pop@amd.com>
7240
7241 * graphite.h (scop_max_loop_depth): Moved...
7242 * graphite.c (scop_max_loop_depth): ...here.
7243 (remove_all_edges_1): New.
7244 (remove_all_edges): Factored code.
7245 (remove_cond_exprs): Check only the last statement for
7246 a GIMPLE_COND expression.
7247
7248 2008-08-20 Sebastian Pop <sebastian.pop@amd.com>
7249
7250 * graphite.c (scan_tree_for_params): Early return when the
7251 expression is a chrec_dont_know. Handle case NEGATE_EXPR.
7252 (find_scop_parameters): Factor out code.
7253 (graphite_trans_bb_strip_mine): Remove dead code.
7254
7255 2008-08-20 Sebastian Pop <sebastian.pop@amd.com>
7256
7257 * graphite.c (clast_to_gcc_expression, graphite_create_new_loop,
7258 graphite_trans_bb_move_loop): Factor asserts.
7259 (gloog): Perform sanity checks only for ENABLE_CHECKING.
7260 Do not call calculate_dominance_info and estimate_bb_frequencies.
7261
7262 2008-08-20 Jan Sjodin <jan.sjodin@amd.com>
7263
7264 * graphite.c (create_loops_mapping, free_loops_mapping,
7265 create_loops_mapping_num, debug_loop_mapping_1,
7266 debug_loop_mapping, graphite_loops_mapping_max_loop_num,
7267 get_loop_mapping_for_num, graphite_loops_mapping_add_child,
7268 graphite_loops_mapping_add_child_num,
7269 graphite_loops_mapping_insert_child,
7270 graphite_loops_mapping_parent, get_loop_mapped_depth_for_num,
7271 get_loop_mapped_depth, split_loop_mapped_depth_for_num,
7272 loop_mapped_depth_split_loop, swap_loop_mapped_depth_for_num,
7273 create_num_from_index, get_num_from_index,
7274 swap_loop_mapped_depth): Removed.
7275 (new_scop): Do not initialize SCOP_LOOPS_MAPPING.
7276 (free_scop): Do not call free_loops_mapping.
7277 (graphite_get_new_iv_stack_index_from_old_iv): Renamed
7278 get_stack_index_from_iv. Use GBB_LOOPS instead of calling
7279 get_loop_mapped_depth.
7280 (graphite_trans_bb_move_loop): Do not update the loop mapping.
7281 (graphite_trans_bb_strip_mine): Same.
7282 * graphite.h (graphite_loops_mapping, graphite_loop_node): Removed.
7283 (struct scop): Remove field loops_mapping.
7284
7285 2008-08-20 Sebastian Pop <sebastian.pop@amd.com>
7286 Dwarakanath Rajagopal <dwarak.rajagopal@amd.com>
7287
7288 * graphite.c (scop_record_loop): Factor out one level of the
7289 condition by early return.
7290 (build_scop_loop_nests): Format following FSF coding style.
7291 (build_scop_dynamic_schedules): Factor out code.
7292 (scopdet_bb_info): Reindent. Default case should not be reachable.
7293
7294 2008-08-20 Sebastian Pop <sebastian.pop@amd.com>
7295 Dwarakanath Rajagopal <dwarak.rajagopal@amd.com>
7296
7297 * graphite.c (loop_affine_expr): Check for DECL_P or struct
7298 assignments that are not handled as simple operands for now.
7299
7300 2008-08-20 Sebastian Pop <sebastian.pop@amd.com>
7301 Dwarakanath Rajagopal <dwarak.rajagopal@amd.com>
7302
7303 * graphite.c (build_scop_bbs): Factor up code.
7304
7305 2008-08-20 Sebastian Pop <sebastian.pop@amd.com>
7306 Dwarakanath Rajagopal <dwarak.rajagopal@amd.com>
7307
7308 * graphite.c (stmt_simple_for_scop_p): Factor code out
7309 of the loop.
7310 (enum gbb_type): New. Group all the GBB_* types under it.
7311 (is_loop_exit): Moved...
7312 (end_scop): Enable BB spliting.
7313 * cfgloop.c (is_loop_exit): ...here. Reimplemented.
7314 * cfgloop.h (is_loop_exit): Declared.
7315
7316 2008-08-20 Sebastian Pop <sebastian.pop@amd.com>
7317
7318 * doc/invoke.texi: Remove strides from examples containing
7319 DO loops when the strides are equal to 1.
7320
7321 2008-08-20 Harsha Jagasia <harsha.jagasia@amd.com>
7322 Dwarakanath Rajagopal <dwarak.rajagopal@amd.com>
7323
7324 * graphite.c (graphite_trans_scop_block): Or the result with
7325 the result from graphite_trans_loop_block.
7326 * gcc.dg/graphite/block-1.c: New.
7327 * gfortran.dg/graphite/block-1.f90: New.
7328 * gfortran.dg/graphite/block-2.f: New.
7329
7330 2008-08-20 Sebastian Pop <sebastian.pop@amd.com>
7331
7332 * graphite.c (graphite_transform_loops): Call cloog_initialize
7333 and cloog_finalize.
7334
7335 2008-08-20 Sebastian Pop <sebastian.pop@amd.com>
7336
7337 * tree-data-ref.c) (stmt_simple_memref_p): New.
7338 * tree-data-ref.h (stmt_simple_memref_p): Declared.
7339 * graphite.c (stmt_simple_memref_for_scop_p): Removed.
7340 (is_simple_operand): Call stmt_simple_memref_p.
7341
7342 * gcc.dg/graphite/scop-matmult.c: Updated for not
7343 using pointer arithmetic, as this is optimized by PRE and
7344 makes the code too difficult to analyze.
7345
7346 * gcc.dg/graphite/scop-18.c: Same.
7347
7348 2008-08-20 Sebastian Pop <sebastian.pop@amd.com>
7349
7350 * gdbinit.in (pgg): New.
7351
7352 2008-08-15 Tobias Grosser <grosser@fim.uni-passau.de>
7353
7354 * graphite.c (graphite_trans_loop_block): Fix warning.
7355
7356 2008-08-15 Tobias Grosser <grosser@fim.uni-passau.de>
7357
7358 * graphite.c (graphite_trans_loop_block): Fix my merge error.
7359
7360 2008-08-15 Tobias Grosser <grosser@fim.uni-passau.de>
7361
7362 * graphite.c (graphite_trans_bb_block): Remove check for
7363 flag_loop_strip_mine, flag_loop_block, flag_loop_interchange.
7364 Check if loop blocking is profitable for every loop, before applying
7365 the changes.
7366 (graphite_apply_transformations): Call graphite_trans_bb_block only,
7367 if flag_loop_block is set.
7368
7369 2008-08-14 Sebastian Pop <sebastian.pop@amd.com>
7370
7371 * graphite.c: Add some more documentation for the loop
7372 mapping.
7373
7374 2008-08-14 Sebastian Pop <sebastian.pop@amd.com>
7375
7376 * Makefile.in (tree-data-ref.o): Remove dependence on graphite.h.
7377 * graphite.c: Format on less than 80 columns.
7378 * graphite.h: Same.
7379
7380 2008-08-14 Sebastian Pop <sebastian.pop@amd.com>
7381
7382 * cfgloopmanip.c (loopify): Use update_dominators_in_loop.
7383
7384 2008-08-14 Sebastian Pop <sebastian.pop@amd.com>
7385
7386 * doc/invoke.texi (floop-block, floop-strip-mine,
7387 floop-interchange): Update documentation with examples.
7388
7389 2008-08-13 Sebastian Pop <sebastian.pop@amd.com>
7390
7391 * cfgloopmanip.c (create_empty_loop_on_edge): Don't call
7392 add_referenced_var.
7393 * graphite.c (graphite_create_new_loop): Call add_referenced_var.
7394
7395 2008-08-13 Sebastian Pop <sebastian.pop@amd.com>
7396
7397 * cfgloopmanip.c (create_empty_loop_on_edge): Improve documentation.
7398 Factor gcc_asserts into a single one. Use force_gimple_operand_gsi.
7399 * tree-scalar-evolution.c: Revert useless changes.
7400 * tree-phinodes.c: Same.
7401 * cfghooks.c: Same.
7402 * vec.h: Same.
7403 * tree-vectorizer.h: Same.
7404 * tree-flow.h: Same.
7405 * tree-cfg.c: Same.
7406 * common.opt (fgraphite): Update documentation.
7407
7408 2008-08-12 Harsha Jagasia <harsha.jagasia@amd.com>
7409
7410 * doc/invoke.texi (-floop-block, -floop-strip-mine,
7411 -floop-interchange): Add more text for explaining what each of these
7412 flags is doing.
7413 * tree-into-ssa.c (gimple_vec): Moved to...
7414 * graphite.c: Include gimple.h.
7415 (gimple_vec): Moved to...
7416 (del_loop_to_cloog_loop): Removed.
7417 (loop_affine_expr): Do not call create_data_ref when the
7418 operand is a constant.
7419 (new_scop): Use free instead of del_loop_to_cloog_loop.
7420 * Makefile.in (graphite.o): Depend on GIMPLE_H.
7421 * gimple.h (gimple_vec): ... here.
7422
7423 2008-08-11 Tobias Grosser <grosser@fim.uni-passau.de>
7424
7425 * graphite.c (scopdet_bb_info): Only allow loops with known number of
7426 latch executions.
7427 (build_loop_iteration_domains): Fail, if latch executions unknown.
7428
7429 2008-08-11 Tobias Grosser <grosser@fim.uni-passau.de>
7430
7431 * graphite.c (add_conditions_to_domain): New.
7432 (build_scop_conditions_1): Call add_conditions_to_domain.
7433 (set_cloog_options): Allow to disable optimizations.
7434
7435 2008-08-11 Tobias Grosser <grosser@fim.uni-passau.de>
7436
7437 * graphite.c (find_params_in_bb): Look for parameters in conditions.
7438 Do not use walk_dominator_tree.
7439 (find_scop_parameters): Do not use walk_dominator_tree.
7440
7441 2008-08-11 Tobias Grosser <grosser@fim.uni-passau.de>
7442
7443 * graphite.c (scan_tree_for_params) Add / Subtract inequality.
7444 (idx_record_params): Adapt.
7445 * graphite.h (scop_gimple_loop_depth): New.
7446
7447 2008-08-11 Tobias Grosser <grosser@fim.uni-passau.de>
7448
7449 * graphite.c (build_scop_dynamic_schedules): Remove value_init.
7450 (scan_tree_for_params): Remove value_init.
7451 (build_scop_context): Remove value_init.
7452 (build_loop_iteration_domains): Remove value_init.
7453 (schedule_to_scattering): Remove value_init.
7454 (graphite_trans_bb_strip_mine): Remove value_init.
7455
7456 2008-08-11 Tobias Grosser <grosser@fim.uni-passau.de>
7457
7458 * gcc/graphite.c (limit_scops): New.
7459 (graphite_transform_loops): Add limit SCoPs.
7460 * gcc.dg/graphite/scop-0.c: Update number of SCoPs.
7461 * gcc.dg/graphite/scop-1.c: Update number of SCoPs.
7462 * gcc.dg/graphite/scop-10.c: Update number of SCoPs.
7463 * gcc.dg/graphite/scop-11.c: Update number of SCoPs.
7464 * gcc.dg/graphite/scop-12.c: Update number of SCoPs.
7465 * gcc.dg/graphite/scop-13.c: Update number of SCoPs.
7466 * gcc.dg/graphite/scop-14.c: Update number of SCoPs.
7467 * gcc.dg/graphite/scop-15.c: Update number of SCoPs.
7468 * gcc.dg/graphite/scop-16.c: Update number of SCoPs.
7469 Change loop numbers.
7470 * gcc.dg/graphite/scop-17.c: Update number of SCoPs.
7471 Change loop numbers.
7472 * gcc.dg/graphite/scop-18.c: Update number of SCoPs.
7473 * gcc.dg/graphite/scop-2.c: Update number of SCoPs.
7474 * gcc.dg/graphite/scop-3.c: Update number of SCoPs.
7475 * gcc.dg/graphite/scop-4.c: Update number of SCoPs.
7476 * gcc.dg/graphite/scop-5.c: Update number of SCoPs.
7477 * gcc.dg/graphite/scop-6.c: Update number of SCoPs.
7478 * gcc.dg/graphite/scop-7.c: Update number of SCoPs.
7479 * gcc.dg/graphite/scop-8.c: Update number of SCoPs.
7480 * gcc.dg/graphite/scop-9.c: Update number of SCoPs.
7481 * gcc.dg/graphite/scop-matmult.c: Update number of SCoPs.
7482
7483 2008-08-11 Tobias Grosser <grosser@fim.uni-passau.de>
7484
7485 * graphite.c (graphite_transform_loops): Call always find_transform.
7486
7487 2008-08-08 Tobias Grosser <grosser@fim.uni-passau.de>
7488
7489 * graphite.c (free_loops_mapping): New.
7490 (stmt_simple_for_scop_p): Fix typo.
7491 (stmt_simple_for_scop_p): Fix tuples functions, that
7492 broke polyhedron.
7493 (free_graphite_bb): Fix some memleaks.
7494 (free_scop): Fix some memleaks.
7495 (scopdet_bb_info): Do not forget some tmp SCoPs.
7496 (find_params_in_bb): Fix some memleaks.
7497 (clast_to_gcc_expression): Fix warning.
7498
7499 2008-08-07 Tobias Grosser <grosser@fim.uni-passau.de>
7500
7501 * gcc.dg/graphite/scop-16.c: Fix for 32bit.
7502 * gcc.dg/graphite/scop-17.c: Fix for 32bit.
7503
7504 2008-08-04 Sebastian Pop <sebastian.pop@amd.com>
7505
7506 * tree-ssa-loop.c (tree-ssa-loop.o): Do not include toplev.h.
7507 Move code ifdef-ed HAVE_cloog...
7508 * graphite.c: Include toplev.h.
7509 ... here.
7510 * Makefile.in (OBJS-common): Always build graphite.o.
7511 (BACKEND): Remove @GRAPHITE@.
7512 (tree-ssa-loop.o): Do not depend on TOPLEV_H.
7513 (graphite.o): Depend on TOPLEV_H.
7514
7515 2008-08-04 Sebastian Pop <sebastian.pop@amd.com>
7516
7517 * Makefile.in (tree-ssa-loop.o): Depend on TOPLEV_H.
7518 Remove typo left from polylib to ppl conversion.
7519 * graphite.c (graphite_transforms): Use sorry instead of fatal.
7520
7521 2008-08-03 Sebastian Pop <sebastian.pop@amd.com>
7522
7523 * toplev.c (process_options): Move the graphite loop optimization
7524 flags...
7525 * tree-ssa-loop.c (graphite_transforms): ... here.
7526 When not configured with CLooG, print to dump_file that
7527 Graphite transforms were not performed.
7528 * gcc.dg/graphite/graphite.exp (scan-graphite-dump-times):
7529 New.
7530 * gcc.dg/graphite/*.c: Updated all testcases to use
7531 scan-graphite-dump-times.
7532
7533 2008-08-03 Sebastian Pop <sebastian.pop@amd.com>
7534
7535 * graphite.c (dot_scop, dot_all_scops): Do not call system.
7536 Do not open /tmp/scop.dot and /tmp/allscops.dot.
7537
7538 2008-08-02 Sebastian Pop <sebastian.pop@amd.com>
7539 Jan Sjodin <jan.sjodin@amd.com>
7540
7541 * configure: Regenerated.
7542 * omp-low.c (expand_omp_sections): Remove now unused code.
7543 * config.in (HAVE_polylib): Removed.
7544 * configure.ac (HAVE_polylib, POLYLIBLIBS, POLYLIBINC): Removed.
7545 (PPLLIBS, PPLINC): Added.
7546 * graphite.c: Replace unsigned with int wherever possible.
7547 Don't access Cloog's data structures, but use accessor functions.
7548 Clast's stmt->type is now implemented as a vtable: change the
7549 switches of stmt->type into ifs.
7550 (polylib/polylibgmp.h): Don't include.
7551 (initialize_dependence_polyhedron,
7552 initialize_data_dependence_polyhedron, is_empty_polyhedron,
7553 statement_precedes_p, test_dependence, build_rdg_all_levels,
7554 dump_dependence_graph): Removed until this code is cleaned up
7555 or ported to Cloog.
7556 * Makefile.in (POLYLIBLIBS): Renamed PPLLIBS.
7557 (POLYLIBINC): Renamed PPLINC.
7558
7559 2008-08-01 Harsha Jagasia <harsha.jagasia@amd.com>
7560 Dwarakanath Rajagopal <dwarak.rajagopal@amd.com>
7561 Jan Sjodin <jan.sjodin@amd.com>
7562
7563 Finish the merge and tuplification of graphite.
7564
7565 2008-07-24 Sebastian Pop <sebastian.pop@amd.com>
7566 Jan Sjodin <jan.sjodin@amd.com>
7567
7568 Partial merge from mainline (138072:138275).
7569 * graphite.c still has to be tuplified.
7570
7571 2008-07-29 Jan Sjodin <jan.sjodin@amd.com>
7572
7573 * graphite.c (graphite_loops_mapping_max_loop_num): New.
7574 (create_num_from_index): New.
7575 (get_num_from_index): Also pass in the graphite BB.
7576 (free_graphite_bb): Free GBB_INDEX_TO_NUM_MAP.
7577 (build_graphite_bb): Initialize GBB_INDEX_TO_NUM_MAP.
7578 (graphite_trans_bb_strip_mine): Call create_num_from_index.
7579 (is_interchange_valid): Return false when failing.
7580 * graphite.h (struct num_map): New.
7581 (struct graphite_bb): New field num_map.
7582 (GBB_LOOPS_MAPPING): Renamed GBB_INDEX_TO_NUM_MAP.
7583
7584 2008-07-29 Tobias Grosser <grosser@fim.uni-passau.de>
7585
7586 * graphite.c (dump_gbb_conditions): Print also conditions like
7587 "if (a)". Remove dublicated code and use print_generic_expr ().
7588 (stmt_simple_for_scop_p): Only allow conditions we can handle
7589 {<, <=, >, >=}.
7590
7591 2008-07-25 Jan Sjodin <jan.sjodin@amd.com>
7592
7593 * graphite.h (struct scop): Removed new_ivs field.
7594 (SCOP_NEWIVS): Deleted.
7595 * graphite.c (new_scop, free_scop, clast_name_to_gcc,
7596 clast_to_gcc_expression, graphite_create_new_loop):
7597 Removed use of new_ivs.
7598
7599 2008-07-25 Jan Sjodin <jan.sjodin@amd.com>
7600
7601 * graphite.c (debug_oldivs, debug_loop_vec, create_loops_mapping,
7602 create_loops_mapping_num, debug_loop_mapping_1): New.
7603 (debug_loop_mapping): Call debug_loop_mapping_1.
7604 (get_loop_mapping_for_num,
7605 graphite_loops_mapping_add_child,
7606 graphite_loops_mapping_add_child_num,
7607 graphite_loops_mapping_insert_child,
7608 graphite_loops_mapping_parent,
7609 split_loop_mapped_depth_for_num,
7610 loop_mapped_depth_split_loop): New.
7611 (increment_loop_mapped_depths): Removed.
7612 (swap_loop_mapped_depth_for_num): Reimplemented.
7613 (new_scop): Call create_loops_mapping.
7614 (scop_record_loop): Call graphite_loops_mapping_insert_child.
7615 (translate_clast): Pass the old loop father in parameter, and pass
7616 it to get_old_iv_from_ssa_name.
7617 (remove_edges_around_useless_blocks, can_generate_code_stmt,
7618 can_generate_code, can_generate_for_scop): New.
7619 (graphite_trans_bb_block): Returns false when it fails to transform.
7620 * graphite.h (graphite_loop_node, graphite_loops_mapping): New.
7621
7622 2008-07-25 Sebastian Pop <sebastian.pop@amd.com>
7623
7624 Reverted all the changes related to the streamization and
7625 loop fusion.
7626 These changes are now tracked in the streamization branch.
7627
7628 2008-07-25 Sebastian Pop <sebastian.pop@amd.com>
7629 Jan Sjodin <jan.sjodin@amd.com>
7630
7631 * graphite.c (gbb_compare): Correctly constify.
7632 (gbb_can_be_ignored): Indent.
7633 (graphite_trans_scop_swap_1and2): Add legality check.
7634 Remove dead FIXMEs.
7635
7636 2008-07-25 Sebastian Pop <sebastian.pop@amd.com>
7637
7638 Remove fallouts from "Reverted the Condate changes".
7639 * tree.h: Remove unused decl.
7640 * gcc.dg/tree-checker: Same.
7641 * timevar.def: Remove counter.
7642
7643 2008-07-24 Sebastian Pop <sebastian.pop@amd.com>
7644
7645 * Merge from mainline (135673:138072).
7646
7647 Reverted the MIRO changes (from 2008-04-05) that are now
7648 tracked in the miro branch.
7649 * tree-bounds.c: Removed.
7650 * tree-bounds.h: Removed.
7651
7652 Reverted the Condate changes (from 2006-07-04, 2007-03-20) that
7653 are now tracked in the condate branch.
7654 * tree-check.c: Removed.
7655 * tree-match.c: Removed.
7656 * condate.y: Removed.
7657
7658 2008-07-24 Dwarakanath Rajagopal <dwarak.rajagopal@amd.com>
7659
7660 * common.opt: New user flag -floop-block, -floop-strip-mine
7661 and -floop-interchange.
7662 * toplev.c (process_options): Enable -fgraphite pass if any one of the
7663 graphite loop optimization flags is turned on.
7664 * graphite.c (graphite_apply_transformations): Add flag_loop_block,
7665 flag_loop_strip_mine and flag_loop_interchange checks before
7666 optimizations.
7667 * doc/invoke.texi: Remove -fgraphite and add -floop-block,
7668 -floop-strip-mine and -floop-interchange.
7669 * gcc.dg/graphite/block-0.c: Add -floop-block and remove
7670 -fgraphite.
7671 * gcc.dg/graphite/scop-16.c: Ditto.
7672 * gcc.dg/graphite/scop-17.c: Ditto.
7673 * gcc.dg/graphite/scop-18.c: Ditto.
7674
7675 2008-07-23 Jan Sjodin <jan.sjodin@amd.com>
7676 Sebastian Pop <sebastian.pop@amd.com>
7677
7678 * cfgloopmanip.c (update_dominators_in_loop): Make it static.
7679 (create_empty_loop_on_edge): More fixes.
7680 * tree-phinodes.c (resize_phi_node): Extern.
7681 (unlink_phi_node, move_phi_node): New split from remove_phi_node.
7682 * cfghooks.c (update_dominator_information): New split from
7683 split_edge.
7684 * tree-vectorizer.c (rename_variables_in_bb): Extern.
7685 * tree-dfa.c (collect_dfa_stats): Start walking the CFG on the
7686 successor of the function entry block.
7687
7688 * graphite.c: Include pointer-set.h.
7689 (debug_loop_mapping, increment_loop_mapped_depths,
7690 get_loop_mapped_depth_for_num, get_loop_mapped_depth,
7691 set_loop_mapped_depth_for_num, set_loop_mapped_depth,
7692 swap_loop_mapped_depth_for_num, get_num_from_index,
7693 swap_loop_mapped_depth, loop_iv_stack_debug,
7694 loop_iv_stack_push, loop_iv_stack_pop, loop_iv_stack_get_iv,
7695 loop_iv_stack_get_iv_from_name, loop_iv_stack_debug,
7696 get_old_iv_from_ssa_name): New.
7697 (new_scop): Initialize SCOP_LOOPS_MAPPING.
7698 (free_scop): Free SCOP_LOOPS_MAPPING.
7699 (scop_record_loop): Record old ivs.
7700 (create_var_name): Removed.
7701 (initialize_cloog_names): Allocate double space in case strip mine
7702 applies to all loops once.
7703 (clast_name_to_gcc): Look up in the map ivstack passed in parameter.
7704 (clast_to_gcc_expression): Same. Implement more clast to gimple
7705 translation.
7706 (graphite_create_new_loop): Pass in ivstack.
7707 (remove_all_edges): Pass in the construction_edge.
7708 (graphite_remove_iv): Removed.
7709 (graphite_rename_ivs, graphite_rename_ivs_stmt,
7710 remove_cond_exprs): Rewritten.
7711 (move_phi_nodes): New.
7712 (disconnect_virtual_phi_nodes, disconnect_cond_expr): Removed.
7713 (translate_clast): Pass in ivstack. Rewrite some cases.
7714 (set_cloog_options, debug_clast_stmt): New.
7715 (find_transform): Use set_cloog_options.
7716 (outermost_loop_layer): Removed.
7717 (get_construction_edge, collect_virtual_phis, find_vdef_for_var_in_bb,
7718 find_vdef_for_var_1, find_vdef_for_var, patch_phis_for_virtual_defs,
7719 mark_old_loops, remove_dead_loops): New.
7720 (gloog): Rewritten.
7721 (graphite_trans_bb_move_loop): Call swap_loop_mapped_depth.
7722 (const_column_index, get_first_matching_sign_row_index,
7723 get_lower_bound_row, get_upper_bound_row, get_lower_bound,
7724 get_upper_bound): New.
7725 (graphite_trans_bb_strip_mine): Also update the iv map.
7726
7727 * graphite.h (graphite_loops_mapping, GBB_LOOPS_MAPPING): New.
7728 (struct name_tree): Add a loop field.
7729 (struct scop): Add a graphite_loops_mapping field.
7730 (SCOP_LOOPS_MAPPING): New.
7731 (debug_clast_stmt): Declare.
7732 * lambda.h (find_induction_var_from_exit_cond): Declare.
7733 (lambda-code.c): (find_induction_var_from_exit_cond): Extern.
7734 * cfgloop.h (update_dominators_in_loop): Removed declaration.
7735 (create_empty_loop_on_edge): Updated.
7736 * tree-flow.h (remove_bb, resize_phi_node, move_phi_node,
7737 rename_variables_in_bb): Declare.
7738 * tree-cfg.c (remove_bb): Extern.
7739
7740 * gcc.dg/graphite/block-0.c: New.
7741
7742 2008-07-21 Dwarakanath Rajagopal <dwarak.rajagopal@amd.com>
7743 Sebastian Pop <sebastian.pop@amd.com>
7744
7745 * graphite.c (strip_mine_profitable_p): New.
7746 (graphite_trans_bb_block): Disable strip mining if not profitable.
7747
7748 * gcc.dg/graphite/scop-18.c: New.
7749 * gcc.dg/graphite/scop-17.c: Fixed.
7750 * gcc.dg/graphite/scop-16.c: Fixed.
7751
7752 2008-07-17 Harsha Jagasia <harsha.jagasia@amd.com>
7753 Jan Sjodin <jan.sjodin@amd.com>
7754 Sebastian Pop <sebastian.pop@amd.com>
7755
7756 * graphite.c (is_interchange_valid): New.
7757 (graphite_trans_bb_block): Check loop nest of basic block for legality
7758 of interchange.
7759
7760 * graphite.h (gbb_inner_most_loop_index, outer_most_loop_1,
7761 outer_most_loop, gbb_outer_most_loop_index): New.
7762
7763 * tree-loop-linear.c (perfect_loop_nest_depth): Remove static.
7764 * tree-flow.h (perfect_loop_nest_depth): Declare as extern.
7765 * gcc.dg/graphite/scop-16.c: New.
7766 * gcc.dg/graphite/scop-17.c: New.
7767
7768 2008-07-11 Tobias Grosser <grosser@fim.uni-passau.de>
7769
7770 * graphite.c (scop_remove_ignoreable_gbbs): Also update bitmap.
7771 (graphite_trans_scop_block): Ignore SCoPs without bbs.
7772
7773 2008-07-11 Tobias Grosser <grosser@fim.uni-passau.de>
7774
7775 * graphite.c (new_scop): Initialize SCOP_EXIT.
7776 (scopdet_info): Add.
7777 (scopdet_bb_info): Rename from is_bb_addable. Cleanup, bugfixes.
7778 (build_scops_1): Cleanup, bugfixes.
7779 (build_scops): Cleanup.
7780
7781 * gcc.dg/graphite/scop-matmult.c: Remove duplicated code.
7782 * gcc.dg/graphite/scop-15.c: Add SCoP numbers.
7783
7784 2008-07-10 Harsha Jagasia <harsha.jagasia@amd.com>
7785
7786 * gfortran.dg/graphite/scop-1.f: Update to reduced test case.
7787
7788 * gfortran.dg/graphite/graphite.exp: Use
7789 DEFAULT_GRAPHITE_FLAGS.
7790
7791 * gcc.dg/graphite/scop-15.c: Update to reduced test case.
7792
7793 2008-07-10 Harsha Jagasia <harsha.jagasia@amd.com>
7794
7795 * graphite.c (scan_tree_for_params): Do not assert any more if
7796 MULT_EXPR parameter is negative.
7797
7798 * gfortran.dg/graphite/scop-1.f: New.
7799
7800 * gfortran.dg/graphite/graphite.exp: New.
7801
7802 * gcc.dg/graphite/scop-15.c: New.
7803
7804 2008-07-10 Harsha Jagasia <harsha.jagasia@amd.com>
7805
7806 * graphite.c (is_bb_addable): Fix segfault in spec gzip and reformat.
7807
7808 2008-07-10 Tobias Grosser <grosser@fim.uni-passau.de>
7809
7810 * graphite.c (graphite_trans_bb_swap_loops): Rename from
7811 graphite_swap_loops.
7812 (graphite_trans_bb_move_loop): New.
7813 (graphite_trans_bb_strip_mine): Rename from graphite_strip_mine_loop.
7814 (graphite_trans_bb_block): New.
7815 (graphite_trans_loop_block): New.
7816 (graphite_trans_scop_swap_1and2): Rename from
7817 graphite_trans_swap_1and2.
7818 (graphite_trans_scop_strip): Rename from graphite_trans_strip.
7819 (graphite_trans_scop_block): New.
7820 (graphite_apply_transformations): Rename from
7821 graphite_transformations.
7822
7823 * gcc.dg/graphite/scop-matmult.c: New.
7824
7825 2008-07-10 Tobias Grosser <grosser@fim.uni-passau.de>
7826
7827 * graphite.c (gbb_compare): New.
7828 (graphite_sort_gbbs): New.
7829 (gbb_can_be_ignored): New.
7830 (scop_remove_ignoreable_gbbs): New.
7831 (graphite_transformations): Cleanup and add
7832 scop_remove_ignoreable_gbbs.
7833 * lambda.h (lambda_vector_compare): New.
7834
7835 2008-07-09 Tobias Grosser <grosser@fim.uni-passau.de>
7836
7837 * graphite.c (print_graphite_bb): Correct printing of static schedule.
7838 (graphite_swap_loops): int -> unsigned
7839 (graphite_strip_mine_loop): int -> unsigned, Fix SCHEDULE
7840 (graphite_transformations): New.
7841 (graphite_transform_loops): Move to graphite_transformations.
7842 * graphite.h (gbb_nb_loops): Return unsigned.
7843
7844 2008-07-04 Tobias Grosser <grosser@fim.uni-passau.de>
7845
7846 * graphite.c (scan_tree_for_params): Fix insertion of parameters into
7847 the domain matrix. This makes scop-0.c work again.
7848
7849 2008-06-20 Richard Guenther <rguenther@suse.de>
7850
7851 * graphite.h: Adjust copyright to GPLv3.
7852 * graphite.c: Likewise.
7853 (stmt_simple_memref_for_scop_p): Split out from ...
7854 (stmt_simple_for_scop_p): ... here. Fix handling of calls
7855 and simplify.
7856 (get_bb_type): Optimize.
7857 (is_pred): Remove.
7858 (is_bb_addable): Fix memleak, replace is_pred call with
7859 single_pred.
7860 (build_scops): Use current_loops.
7861 (param_index): Fix memleak.
7862
7863 2008-06-20 Konrad Trifunovic <konrad.trifunovic@inria.fr>
7864
7865 * graphite.c: Fix formatting.
7866
7867 2008-06-19 Konrad Trifunovic <konrad.trifunovic@inria.fr>
7868
7869 * graphite.c (new_scop): Memory allocation for SCOP_{NEWIVS, OLDIVS}.
7870 (free_scop): Memory deallocation for SCOP_NEWIVS, SCOP_OLDIVS.
7871 (create_var_name, save_var_name): Newly defined functions.
7872 (initialize_cloog_names): Part of the code factored out to
7873 save_var_name.
7874 (clast_to_gcc_expression): Now handles the case of clast_red_sum
7875 in clast_reduction statement.
7876 (graphite_create_new_loop): Now takes a new parameter
7877 for outer_loop.
7878 (translate_clast): Now also takes the context_loop and bb_exit
7879 parameters. Rewritten the code so that it creates a gimple code
7880 inside the given context.
7881 (outermost_loop_layer, graphite_remove_iv, graphite_rename_ivs,
7882 remove_cond_expr, disconnect_cond_expr,
7883 disconnect_virtual_phi_nodes): Newly defined functions.
7884 * graphite.h (struct scop): added old_ivs vector.
7885 SCOP_OLDIVS: New macro.
7886
7887 2008-06-19 Sebastian Pop <sebastian.pop@amd.com>
7888
7889 * cfgloopmanip.c: Add missing function comments, fix formatting.
7890
7891 2008-06-18 Konrad Trifunovic <konrad.trifunovic@inria.fr>
7892
7893 * cfgloopmanip.c (update_dominators_in_loop): Defined.
7894 (create_empty_loop_on_edge): Defined.
7895 * tree-parloops.c (canonicalize_loop_ivs): Returns tree
7896 instead of void.
7897 * cfgloop.h (create_empty_loop_on_edge): Declared as extern.
7898 (update_dominators_in_loop): Declared as extern
7899 * tree-flow.h (canonicalize_loop_ivs): Declared as extern.
7900
7901 2008-06-16 Tobias Grosser <grosser@fim.uni-passau.de>
7902
7903 * graphite.c (print_graphite_bb): Allow changing number of loops
7904 in SCoP domain.
7905 (initialize_cloog_names): Allow changing number of loops.
7906 (build_cloog_prog): Simplify.
7907 (find_transform): Enable cloog option --strides.
7908 (graphite_swap_loops): New.
7909 (graphite_strip_mine_loop): New.
7910 (graphite_trans_swap_1and2): New.
7911 (graphite_trans_strip): New.
7912 (graphite_transform_loops): Add graphite_trans_strip.
7913 * graphite.h (scop_max_loop_depth): New.
7914
7915 2008-06-15 Tobias Grosser <grosser@fim.uni-passau.de>
7916
7917 * graphite.c (build_scop_iteration_domain): Remove forgotten
7918 line. (Fixes compile)
7919
7920 2008-06-15 Tobias Grosser <grosser@fim.uni-passau.de>
7921
7922 * graphite.c (print_graphite_bb): Add output of GBB_LOOPS.
7923 (build_graphite_bb): Add GBB_LOOPS and GBB_DOMAIN and reorder.
7924 (build_bb_loops): New.
7925 (graphite_transform_loops): Add build_bb_loops.
7926 (schedule_to_scattering): Use gbb_nb_loops to support changing loop
7927 numbers.
7928 * graphite.h (graphite_bb): Add loops.
7929 (gbb_nb_loops): New.
7930 (gbb_loop_at_index): New.
7931 (gbb_loop_index): New.
7932 (nb_params_in_scop): Renamed to scop_nb_params. Updated all functions
7933 using nb_params_in_scop.
7934
7935 2008-06-14 Tobias Grosser <grosser@fim.uni-passau.de>
7936
7937 * graphite.c (print_graphite_bb): Adapt to minimized schedule.
7938 (build_scop_canonical_schedules): Build minimized schedule.
7939 (schedule_to_scattering): Adapt to minimized schedule.
7940 * graphite.h (graphite_bb): Add/Update descriptions.
7941
7942 2008-06-14 Adrien Eliche <aeliche@isty.uvsq.fr>
7943 Tobias Grosser <grosser@fim.uni-passau.de>
7944
7945 * graphite.c (print_graphite_bb): Add condition printing.
7946 (dump_value): New.
7947 (dump_gbb_conditions): New.
7948 (build_scop_conditions_1): New.
7949 (build_scop_conditions): New.
7950 * graphite.h (graphite_bb): Add conditions.
7951
7952 2008-06-14 Tobias Grosser <grosser@fim.uni-passau.de>
7953
7954 * graphite.c (print_graphite_bb):
7955 (free_graphite_bb): New.
7956 (free_scop): Free bbs.
7957 (get_bb_type): Free doms.
7958 (build_scop_context): Free context matrix.
7959 (build_loop_iteration_domains): Remove unused code.
7960 (build_cloog_prog): Free scattering function and blocklist.
7961 (find_transform): Free options.
7962
7963 2008-06-13 Tobias Grosser <grosser@fim.uni-passau.de>
7964
7965 * graphite.c (loop_body_to_cloog_stmts): Rename to add_bb_domains.
7966 Remove unnecessery cloog data structures. Make a copy of the domain
7967 (setup_cloog_loop): Rename to build_loop_iteration_domains. Remove
7968 unnecessary cloog data structures. Fix memory leaks. Remove insert
7969 into SCOP_LOOP2CLOOG_LOOP as the inserted CloogLoops will never be
7970 used.
7971 (build_scop_iteration_domain): Remove unnecessary cloog
7972 data structures. Fix memory leaks.
7973 (graphite_transform_loops): Disable build_scop_dynamic_schedules as it
7974 uses SCOP_LOOP2CLOOG_LOOP, that is at the moment not working.
7975
7976 2008-06-12 Tobias Grosser <grosser@fim.uni-passau.de>
7977
7978 * graphite.c (find_scop_params): Remove initialize_cloog_names.
7979
7980 2008-06-12 Tobias Grosser <grosser@fim.uni-passau.de>
7981
7982 * graphite.c (end_scop): Style fix.
7983 (schedule_to_scattering): Style and comment fix.
7984
7985 2008-06-12 Tobias Grosser <grosser@fim.uni-passau.de>
7986 * graphite.c (print_graphite_bb): Fix definiton of
7987 schedule_to_scattering.
7988 (initialize_cloog_names): Change nb_scattdims to max loop
7989 depth in SCoP.
7990 (schedule_to_scattering): Take parameter for number of scattering
7991 dimensions.
7992 (build_cloog_prog): Only build as much scattering dimensions as
7993 necessary.
7994
7995 2008-06-12 Tobias Grosser <grosser@fim.uni-passau.de>
7996
7997 * graphite.c (end_scop): Disable bb splitting. Fixes SIGSEGV
7998 in polyhedron/aermod.f90.
7999
8000 2008-06-11 Tobias Grosser <grosser@fim.uni-passau.de>
8001 Dwarak Rajagopal <dwarak.rajagopal@amd.com>
8002 Harsha Jagasia <harsha.jagasia@amd.com>
8003
8004 * graphite.c (is_bb_addable): Fix segfault.
8005
8006 2008-06-10 Tobias Grosser <grosser@fim.uni-passau.de>
8007
8008 * graphite.c (is_bb_addable): Fix memory leak, handling of loops
8009 with multiple exits and conditional handling in edge cases.
8010 (is_loop_exit): Fix memory leak. (Forgotten in last commit)
8011
8012 * gcc.dg/graphite/scop-14.c: New.
8013
8014 2008-06-06 Tobias Grosser <grosser@fim.uni-passau.de>
8015 Adrien Eliche <aeliche@isty.uvsq.fr>
8016
8017 * graphite.c (is_bb_addable): Add more comments and enhance
8018 readablity of the source code. Fix memory leak.
8019 (is_loop_exit): Fix memory leak.
8020
8021 2008-06-05 Tobias Grosser <grosser@fim.uni-passau.de>
8022
8023 * graphite.c (first_loop_in_scop): Deleted.
8024 (setup_cloog_loop): Only walk the loop chain for inner loops.
8025 (build_scop_iteration_domain): Execute setup_cloog_loop for
8026 all loops in the first layer.
8027
8028 2008-06-05 Tobias Grosser <grosser@fim.uni-passau.de>
8029
8030 * graphite.c (scan_tree_for_params): Change the way params are
8031 added to be indepenent of the number of loops.
8032 (setup_cloog_loop): Revert to short matrix format. Fix parameter
8033 handling.
8034 (build_cloog_prog): Revert to short matrix format.
8035
8036 2008-06-05 Sebastian Pop <sebastian.pop@amd.com>
8037 Dwarak Rajagopal <dwarak.rajagopal@amd.com>
8038
8039 * tree-loop-fusion.c (fuse_loops): Fix uninitialized variable
8040 warning.
8041
8042 2008-06-05 Sebastian Pop <sebastian.pop@amd.com>
8043
8044 * graphite.c (nb_data_refs_in_scop): New.
8045 (graphite_transform_loops): Print more stats: number of
8046 loops, basic blocks and data references per scop.
8047
8048 2008-06-04 Sebastian Pop <sebastian.pop@amd.com>
8049 Jan Sjodin <jan.sjodin@amd.com>
8050
8051 * graphite.c (loop_affine_expr, idx_record_params,
8052 find_scop_parameters, setup_cloog_loop): Use instantiate_scev
8053 instead of instantiate_parameters.
8054
8055 2008-06-04 Tobias Grosser <grosser@fim.uni-passau.de>
8056
8057 * graphite.c (schedule_to_scattering): Fix scattering dimensions,
8058 add support for parameters, add STATIC_SCHEDULE at the right places,
8059 cleanup.
8060
8061 2008-06-04 Tobias Grosser <grosser@fim.uni-passau.de>
8062
8063 * graphite.c (build_scop_loop_nests): Only add the loops, that
8064 are contained completely in the SCoP.
8065 (build_cloog_prog): Disable scattering, until schedule_to_scattering
8066 and the domains are fixed.
8067 (build_scop_canonical_schedules): Add support for bbs not contained
8068 in any SCoP.
8069
8070 2008-06-04 Tobias Grosser <grosser@fim.uni-passau.de>
8071
8072 * graphite.h (scop_contains_loop): Update comments to match
8073 the actual behavior.
8074 (scop_contains_loop): New.
8075 * graphite.c (schedule_to_scattering): Use scop_contains_loop.
8076
8077 2008-06-04 Sebastian Pop <sebastian.pop@amd.com>
8078
8079 * graphite.c (get_bb_type): On function body, i.e. loop_0,
8080 don't mark blocks as GBB_LOOP_SING_EXIT_HEADER, mark them
8081 as GBB_COND_HEADER.
8082
8083 2008-06-04 Sebastian Pop <sebastian.pop@amd.com>
8084 Tobias Grosser <grosser@fim.uni-passau.de>
8085
8086 * graphite.c (graphite_transform_loops): Early return when
8087 there are no loops in the function.
8088
8089 2008-05-31 Sebastian Pop <sebastian.pop@amd.com>
8090 Jan Sjodin <jan.sjodin@amd.com>
8091
8092 * graphite.c (scan_tree_for_params, setup_cloog_loop): Compute the
8093 offset of the last loop.
8094 (setup_cloog_loop): Copy the entire outer constraint matrix.
8095
8096 2008-05-31 Sebastian Pop <sebastian.pop@amd.com>
8097 Jan Sjodin <jan.sjodin@amd.com>
8098
8099 * graphite.c (stmt_in_scop_p, function_parameter_p,
8100 invariant_in_scop_p): Removed.
8101 (scan_tree_for_params): Can be used with no constraint
8102 matrix for gathering parameters.
8103 (idx_record_params): Don't use idx_record_param, instead use
8104 scan_tree_for_params.
8105 (find_scop_parameters): Same.
8106 (setup_cloog_loop, build_scop_iteration_domain, build_cloog_prog):
8107 Fix the size of loop domains.
8108 (schedule_to_scattering): Exit when the outer loop is not in scop.
8109 (find_transform): Enable build_cloog_prog.
8110
8111 2008-05-31 Sebastian Pop <sebastian.pop@amd.com>
8112 Jan Sjodin <jan.sjodin@amd.com>
8113
8114 * graphite.c (schedule_to_scattering): Make scattering domains
8115 uniformly of the same size, as required by CLooG 0.14.0 and before.
8116
8117 2008-05-31 Sebastian Pop <sebastian.pop@amd.com>
8118 Jan Sjodin <jan.sjodin@amd.com>
8119
8120 * graphite.c (schedule_to_scattering): Rewrite, correct the
8121 translation of the scheduling function to scattering.
8122 (build_cloog_prog): Call schedule_to_scattering only once.
8123 * graphite.h (scop_loop_index): Do not fail for loops not
8124 in the scop: return -1.
8125
8126 2008-05-30 Tobias Grosser <grosser@fim.uni-passau.de>
8127
8128 * graphite.c (build_graphite_bb): Initialize GBB_DOMAIN.
8129 (loop_body_to_cloog_stmts): Export GBB_DOMAIN.
8130 (setup_cloog_loop): Export GBB_DOMAIN.
8131 (build_cloog_prog): New. Create new CLOOG_PROG, which should be
8132 able to rebuild the original control flow.
8133 * graphite.h (graphite_bb): Add domain field and access macro.
8134 (GBB_DOMAIN): New.
8135
8136 2008-05-30 Sebastian Pop <sebastian.pop@amd.com>
8137
8138 * graphite.c (debug_gbb): New.
8139 (print_scop, build_graphite_bb): Use SCOP_BBS.
8140 (build_scop_bbs): Reimplemented.
8141 (dfs_bb_in_scop_p): Removed.
8142 (build_scop_loop_nests): Reorder loops inserted in
8143 SCOP_LOOP_NEST: outer loops should come first.
8144 (build_scop_canonical_schedules): Reinitialize at zero
8145 the components of the SCOP_STATIC_SCHEDULE for the loops
8146 that have already been parsed.
8147
8148 * graphite.h (debug_gbb): Declared.
8149
8150 2008-05-30 Sebastian Pop <sebastian.pop@amd.com>
8151 Jan Sjodin <jan.sjodin@amd.com>
8152
8153 * graphite.c (create_empty_loop): Renamed graphite_create_new_loop.
8154 (graphite_loop_to_gcc_loop): Removed.
8155 (remove_all_edges): New.
8156 (graphite_stmt_to_gcc_stmt): Renamed translate_clast.
8157 (gloog): Remove useless code.
8158
8159 2008-05-29 Tobias Grosser <grosser@fim.uni-passau.de>
8160
8161 * graphite.c (get_bb_type): Reworked. We distinguish between
8162 loops with one or multiple exits.
8163 (is_loop_exit): New.
8164 (is_pred): New.
8165 (is_bb_addable): Rework condition handling, now support for case
8166 case statements and loops with multiple exits.
8167
8168 * gcc.dg/graphite/scop-11.c: New.
8169 * gcc.dg/graphite/scop-12.c: New.
8170 * gcc.dg/graphite/scop-13.c: New.
8171
8172 2008-05-29 Tobias Grosser <grosser@fim.uni-passau.de>
8173
8174 * graphite.c (dot_all_scops_1): Fix some colors. Reuse colors, if
8175 we have too many colors.
8176
8177 2008-05-22 Sandeep Maram <smaram_b04@iiita.ac.in>
8178
8179 * doc/invoke.texi (-ftree-loop-fusion): Document.
8180 * tree-pass.h (pass_loop_fusion): Declared.
8181 * tree-loop-fusion.c: New.
8182 * timevar.def (TV_TREE_LOOP_FUSION): Declared.
8183 * tree-data-ref.c (find_data_references_in_loop): Make extern.
8184 * tree-data-ref.h (find_data_references_in_loop): Declared.
8185 * common.opt (ftree-loop-fusion): Declared.
8186 * Makefile.in (tree-loop-fusion.o): Added rule and to OBJS-common.
8187
8188 2008-05-21 Sebastian Pop <sebastian.pop@amd.com>
8189
8190 * graphite.c (build_access_matrix): Fix typo from the merge.
8191
8192 2008-05-20 Sebastian Pop <sebastian.pop@amd.com>
8193
8194 * Merge from mainline (130800:135673).
8195
8196 2008-05-07 Sebastian Pop <sebastian.pop@amd.com>
8197
8198 * graphite.c (end_scop): The exit of the scop is not part of the scop.
8199 Update dominators after splitting.
8200
8201 2008-05-07 Sebastian Pop <sebastian.pop@amd.com>
8202
8203 * graphite.c (is_bb_addable): Return the harmful statement.
8204 Factor up some code.
8205 (end_scop): New. Splits end of scope bbs on a harmful statement.
8206 (build_scops_1): Call end_scop.
8207
8208 2008-05-07 Sebastian Pop <sebastian.pop@amd.com>
8209
8210 * graphite.c: (succs_at_same_depth, end_scop, all_preds_visited_p,
8211 all_succs_visited_p, start_new_scop_for_each_succ, start_new_scop,
8212 add_dominators_to_open_scops, stop_last_open_scop, scop_end_loop,
8213 build_scops_1): Removed.
8214 (build_scops_2): Renamed build_scops_1.
8215
8216 2008-05-06 Sebastian Pop <sebastian.pop@amd.com>
8217
8218 * graphite.c: Fix formatting.
8219
8220 2008-05-06 Tobias Grosser <grosser@fim.uni-passau.de>
8221
8222 * graphite.c (get_bb_type): New.
8223 (move_scops): New.
8224 (build_scops_2): New.
8225 (is_bb_addable): New.
8226 (build_scops): Switch the scop detection.
8227 (build_scop_bbs): Add entry bb to scop.
8228 * graphite.h (struct scop): Update comment.
8229
8230 2008-05-06 Tobias Grosser <grosser@fim.uni-passau.de>
8231
8232 * graphite.c (dot_all_scops_1): Fix some incorrect colors and add
8233 more colors.
8234
8235 2008-05-06 Tobias Grosser <grosser@fim.uni-passau.de>
8236
8237 * gcc.dg/graphite/scop-1.c: Update.
8238 * gcc.dg/graphite/scop-2.c: Update.
8239 * gcc.dg/graphite/scop-4.c: Update.
8240 * gcc.dg/graphite/scop-5.c: Add.
8241 * gcc.dg/graphite/scop-6.c: Add.
8242
8243 2008-05-06 Sebastian Pop <sebastian.pop@amd.com>
8244
8245 * gcc.dg/graphite/scop-0.c: Add.
8246 * gcc.dg/graphite/scop-7.c: Add.
8247 * gcc.dg/graphite/scop-8.c: Add.
8248 * gcc.dg/graphite/scop-9.c: Add.
8249 * gcc.dg/graphite/scop-10.c: Add.
8250
8251 2008-05-06 Tobias Grosser <grosser@fim.uni-passau.de>
8252
8253 * graphite.c (scop_affine_expr): Renamed to loop_affine_expr.
8254 Check affine expressions depending on the outermost loop
8255 instead of a scop.
8256 (stmt_simple_for_scop_p): Same.
8257 (harmfule_stmt_in_scop): Same.
8258
8259 2008-04-28 Tobias Grosser <grosser@fim.uni-passau.de>
8260
8261 * graphite.c (dot_all_scops): Remove incorrect difficult bb coloring,
8262 mark entry and exit, that are not part of the SCoP and update HTML
8263 formatting.
8264
8265 2008-04-25 Sebastian Pop <sebastian.pop@amd.com>
8266
8267 * graphite.c (basic_block_simple_for_scop_p): Renamed
8268 harmful_stmt_in_bb.
8269 (save_scop, preds_at_same_depth, test_for_scop_bound): Removed.
8270 (add_dominators_to_open_scops, build_scops_1): Reimplemented.
8271 (all_preds_visited_p, all_succs_visited_p,
8272 start_new_scop_for_each_succ, start_new_scop, stop_last_open_scop,
8273 scop_end_loop): New.
8274 (build_scops): Do not use dfs_enumerate_from.
8275
8276 * gcc.dg/graphite/scop-{1,2,4}.c: Updated.
8277
8278 2008-04-23 Sebastian Pop <sebastian.pop@amd.com>
8279
8280 * graphite.c: Add comments to functions that are missing a
8281 description.
8282 (graphite_create_iv): Removed. Merged in graphite_loop_to_gcc_loop.
8283
8284 2008-04-23 Sebastian Pop <sebastian.pop@amd.com>
8285
8286 * graphite.c (nb_params_in_scop): Moved...
8287 (graphite_bb_from_bb, loop_body_to_cloog_stmts): New.
8288 (setup_cloog_loop): Call loop_body_to_cloog_stmts.
8289 (clast_to_gcc_expression): Reduce column size to less than 80.
8290 (graphite_create_iv): Return the new name of the IV.
8291 (find_transform): Set options->esp and options->cpp.
8292 (gloog): Comment out the invalidation of the old loop code.
8293 (initialize_dependence_polyhedron): Replace scop_nb_params with
8294 nb_params_in_scop.
8295
8296 * graphite.h (nb_params_in_scop): ... here.
8297 (scop_nb_params): Removed.
8298 (loop_domain_dim): Return something even when the loop was not
8299 found in the hash table: avoid ICEing on all the graphite.exp
8300 testcases.
8301
8302 2008-04-14 Konrad Trifunovic <konrad.trifunovic@inria.fr>
8303
8304 * tree-chrec.c (for_each_scev_op): SCEV can have 3 operands.
8305
8306 * graphite.c (build_scop_dynamic_schedules): Schedule is built
8307 according to nesting level.
8308 (find_scop_parameters): Call instantiate_parameters.
8309 (scan_tree_for_params): Extend it to handle general affine bounds.
8310 Inner loop bound can depend on outer loop induction variable.
8311 (setup_cloog_loop): tmp variable is allocated on stack. Call
8312 instantiate_parameters with respect to outermost_loop_in_scop.
8313 (loop_domain_dim, ref_nb_loops, loop_iteration_vector_dim): moved to
8314 graphite.h.
8315 (create_empty_loop): Function loopify should be given edge
8316 probability, instead of edge frequency. Dominance relation from
8317 switch_bb to loop_header.
8318 (clast_to_gcc_expression): Added handling of clast_reduction node.
8319 (gloog): New functionality for removing old loop.
8320 (test_dependence): Factored out from build_rdg_all_levels.
8321 (build_rdg_all_levels): Dependence testing factored out to
8322 test_dependence function.
8323
8324 * graphite.h (struct graphite_bb): Extended with dynamic_schedule.
8325 (loop_domain_dim, ref_nb_loops, loop_iteration_vector_dim): Moved
8326 from graphite.c
8327
8328 2008-04-07 Sebastian Pop <sebastian.pop@amd.com>
8329
8330 * graphite.c (free_scop, param_index, initialize_cloog_names,
8331 nb_params_in_scop): Use name_tree map instead of just a tree
8332 for keeping track of the variable name associated to that tree.
8333 (create_empty_loop, gmp_cst_to_tree, clast_name_to_gcc,
8334 clast_to_gcc_expression, graphite_create_iv,
8335 graphite_loop_to_gcc_loop, graphite_cond_to_gcc_cond,
8336 graphite_stmt_to_gcc_stmt): New.
8337 (gloog): Call these.
8338 * graphite.h (struct name_tree): New.
8339 (struct scop): Use name_tree instead of tree for params.
8340 Store a vector of name_tree for new_ivs.
8341 (SCOP_NEWIVS): New.
8342 (scop_nb_params): Use name_tree instead of tree.
8343
8344 2008-04-05 Alexander Lamaison <awl03@doc.ic.ac.uk>
8345 Sebastian Pop <sebastian.pop@amd.com>
8346
8347 * tree-bounds.c: New.
8348 * tree-bounds.h: New.
8349 * tree-pass.h: Declare pass_bounds_early and pass_bounds_late.
8350 * passes.c: Schedule pass_bounds_early, pass_bounds_late.
8351 * builtins.c (expand_builtin_alloca): Add flag_bounds as for
8352 flag_mudflap.
8353 * gcc.c: Same.
8354 * toplev.c: Same.
8355 * c-cppbuiltin.c: Same.
8356 * c-pragma.c: Same.
8357 * common.opt: Same.
8358 * varasm.c: Same.
8359 * tree-outof-ssa.c: Same.
8360 * c-common.c: Same.
8361 * Makefile.in: Same.
8362
8363 2008-03-15 Antoniu Pop <antoniu.pop@gmail.com>
8364 Sebastian Pop <sebastian.pop@amd.com>
8365
8366 * tree-loop-distribution.c (remaining_stmts,
8367 upstream_mem_writes): Removed static variables.
8368 (copy_loop_before, create_bb_after_loop,
8369 mark_nodes_having_upstream_mem_writes, free_rdg_components,
8370 rdg_build_components, rdg_build_partitions,
8371 dump_rdg_partitions): Extern.
8372 (generate_loops_for_partition, generate_code_for_partition): Do not
8373 return a bool.
8374 (already_processed_vertex_p, predecessor_has_mem_write,
8375 mark_nodes_having_upstream_mem_writes, has_upstream_mem_writes,
8376 rdg_flag_all_uses, rdg_flag_uses, rdg_flag_vertex_and_dependent,
8377 rdg_flag_loop_exits, rdg_flag_similar_memory_accesses,
8378 build_rdg_partition_for_component, rdg_build_partitions, ldist_gen):
8379 Pass remaining_stmts and upstream_mem_writes as parameters.
8380 (rdg_component): Moved...
8381 (build_rdg_partition_for_component): Do not aggregate components when
8382 flag_streamize_loops is set.
8383 (gen_sequential_loops): New.
8384 (ldist_gen): Call gen_sequential_loops.
8385
8386 * tree-pass.h (pass_loop_streamization): Declared.
8387
8388 * omp-low.c (expand_omp_sections): Call add_bb_to_loop on created
8389 basic blocks when loops structures exist.
8390
8391 * builtin-types.def (BT_FN_VOID_PTR_PTR_INT): New.
8392
8393 * tree-ssa-loop-ivopts.c (expr_invariant_in_region_p): New.
8394
8395 * tree-parloops.c (take_address_of, eliminate_local_variables_1,
8396 eliminate_local_variables_stmt, eliminate_local_variables,
8397 separate_decls_in_loop_name, separate_decls_in_loop_stmt,
8398 separate_decls_in_loop, gen_parallel_loop): Make them work on a region
8399 of code delimited by two edges in the CFG.
8400 (separate_decls_in_loop_name): Renamed separate_decls_in_region_name.
8401 (separate_decls_in_loop_stmt): Renamed separate_decls_in_region_stmt.
8402 (separate_decls_in_loop): Renamed separate_decls_in_region. Isolate
8403 the case of parallelisation of reductions.
8404 (create_loop_fn): Extern.
8405 (create_omp_parallel_region): New.
8406
8407 * tree-data-ref.c (dump_data_dependence_relation): Don't call
8408 dump_data_reference for printing dra and drb.
8409 (create_rdg_edge_for_ddr, create_rdg_edges_for_scalar): Initialise
8410 RDGE_RELATION.
8411 (build_rdg): Don't call free_dependence_relations for the moment, as
8412 we attach dependence relations on each edge of the RDG.
8413 To be fixed later.
8414
8415 * tree-data-ref.h (rdg_component): ...here.
8416 (struct rdg_edge): New field ddr_p relation.
8417 (RDGE_RELATION): New.
8418 (create_bb_after_loop, copy_loop_before,
8419 mark_nodes_having_upstream_mem_writes, rdg_build_components,
8420 rdg_build_partitions, dump_rdg_partitions,
8421 free_rdg_components): Declared.
8422
8423 * omp-builtins.def (BUILT_IN_GOMP_STREAM_ALIGN_PUSH,
8424 BUILT_IN_GOMP_STREAM_ALIGN_POP): New.
8425
8426 * tree-loop-streamization.c: New.
8427
8428 * tree-flow.h (gather_blocks_in_sese_region, create_loop_fn,
8429 create_omp_parallel_region, expr_invariant_in_region_p): Declared.
8430
8431 * Makefile.in (tree-loop-streamization.o): Added to OBJS-common.
8432
8433 * tree-cfg.c (gather_blocks_in_sese_region): Extern.
8434
8435 * passes.c: Schedule pass_loop_streamization.
8436
8437 2008-03-08 Tobias Grosser <grosser@fmi.uni-passau.de>
8438
8439 * graphite.c (dot_all_scops_1): Fix formatting for difficult bbs and
8440 update comment.
8441
8442 2008-03-07 Tobias Grosser <grosser@fim.uni-passau.de>
8443
8444 * graphite.c (dot_all_scops): Update formatting.
8445 Bbs can now be part of more than one SCoP.
8446
8447 2008-03-04 Sebastian Pop <sebastian.pop@amd.com>
8448
8449 * graphite.c (new_loop_to_cloog_loop_str, setup_cloog_loop): Fix
8450 malloc problems.
8451 (loop_domain_dim): Check for unregistered toplev SCOP loop.
8452 * graphite.h (loop_to_cloog_loop): New.
8453
8454 2008-03-04 Konrad Trifunovic <konrad.trifunovic@inria.fr>
8455
8456 * graphite.c (loop_domain_dim, ref_nb_loops,
8457 loop_iteration_vector_dim): New.
8458 (build_access_matrix_with_af, build_access_matrix,
8459 initialize_dependence_polyhedron): Fixed for new matrix layout.
8460 No longer assume that all iteration domains are of the same
8461 dimensionality.
8462
8463 2008-03-02 Sebastian Pop <sebastian.pop@amd.com>
8464
8465 * tree-scalar-evolution.c (instantiate_parameters_1): An SSA_NAME
8466 defined in a loop at depth 0 is invariant.
8467 * tree-chrec.c (evolution_function_is_invariant_rec_p): Ditto.
8468 * tree-ssa-loop-ivopts.c (expr_invariant_in_loop_p): Should never
8469 be called at loop depth 0.
8470
8471 * graphite.c (basic_block_simple_for_scop_p): Take the scop as
8472 a parameter.
8473 (dot_all_scops_1): Update use of basic_block_simple_for_scop_p.
8474 (down_open_scop): Removed.
8475 (loop_in_scop_p): Redefined.
8476 (scop_affine_expr): New argument: scop.
8477 (stmt_simple_for_scop_p): New argument: scop. RETURN_EXPR is not
8478 a harmful statement ending a scop.
8479 (basic_block_simple_for_scop_p): New argument: scop.
8480 (get_loop_start): Removed.
8481 (new_scop): Initialize SCOP_LOOPS.
8482 (free_scop): Free SCOP_LOOPS.
8483 (succs_at_same_depth, preds_at_same_depth): New.
8484 (end_scop): Test the validity of a scop.
8485 (add_dominators_to_open_scops): New.
8486 (test_for_scop_bound): Call add_dominators_to_open_scops.
8487 Add cases for opening and closing multiple scops.
8488 (build_scops, build_scop_bbs): Iterate over basic blocks in
8489 depth first order.
8490 (build_graphite_bb): Pass scop directly.
8491 (dfs_bb_in_scop_p): New.
8492 (scop_record_loop): Use SCOP_LOOPS for not recording the same loop
8493 several times.
8494 (nb_loops_around_gb): Use loop_in_scop_p.
8495 (schedule_to_scattering): Disabled for the moment the code computing
8496 the "textual order for outer loop".
8497
8498 * graphite.h (struct scop): New field loops.
8499 (SCOP_LOOPS): New.
8500 (scop_loop_index): Test that the given loop belongs to SCOP_LOOPS.
8501
8502 * gcc.dg/graphite/scop-{1,...,7}.c: Updated.
8503
8504 2008-02-27 Antoniu Pop <antoniu.pop@gmail.com>
8505 Sebastian Pop <sebastian.pop@amd.com>
8506
8507 * builtin-types.def (BT_FN_PTR_SIZE_UINT, BT_FN_BOOL_PTR): New.
8508 * common.opt (fstreamize-loops): New.
8509 * omp-builtins.def (BUILT_IN_GOMP_STREAM_CREATE,
8510 BUILT_IN_GOMP_STREAM_PUSH, BUILT_IN_GOMP_STREAM_HEAD,
8511 BUILT_IN_GOMP_STREAM_POP, BUILT_IN_GOMP_STREAM_EOS_P,
8512 BUILT_IN_GOMP_STREAM_SET_EOS, BUILT_IN_GOMP_STREAM_DESTROY): New.
8513
8514 2008-02-22 Konrad Trifunovic <konrad.trifunovic@inria.fr>
8515
8516 * tree-data-ref.c (build_empty_rdg): New.
8517 (build_rdg): Use it.
8518 * tree-data-ref.h (build_empty_rdg): Declared.
8519 * graphite.c (free_scop): Free SCOP_LOOP2CLOOG_LOOP.
8520 (find_vertex_for_stmt): Removed.
8521 (build_rdg_all_levels): Use build_empty_rdg and rdg_vertex_for_stmt.
8522
8523 2008-02-21 Sebastian Pop <sebastian.pop@amd.com>
8524
8525 * tree-loop-distribution.c (generate_builtin): After cancelling the
8526 loop tree, also delete basic blocks.
8527 (rdg_flag_uses): Stop recursion when a vertex has already been
8528 processed.
8529
8530 2008-02-15 Konrad Trifunovic <konrad.trifunovic@inria.fr>
8531
8532 * graphite.c (build_scop_alpha): Removed.
8533 (graphite_transform_loops): Add a dummy call to build_all_rdg_levels
8534 and dump_dependence_graph to avoid compiler warnings.
8535
8536 2008-02-14 Konrad Trifunovic <konrad.trifunovic@inria.fr>
8537
8538 * tree-data-ref.c (dr_may_alias_p, create_rdg_vertices): Extern.
8539 * tree-data-ref.h (dr_may_alias_p, create_rdg_vertices): Declared.
8540 * graphite.c (new_loop_to_cloog_loop_str, hash_loop_to_cloog_loop,
8541 eq_loop_to_cloog_loop, del_loop_to_cloog_loop): New.
8542 (new_scop, setup_cloog_loop): Initialize SCOP_LOOP2CLOOG_LOOP.
8543 (initialize_dependence_polyhedron, find_vertex_for_stmt,
8544 initialize_data_dependence_polyhedron, is_empty_polyhedron,
8545 statement_precedes_p, build_rdg_all_levels, build_scop_alpha,
8546 dump_dependence_graph): New.
8547 * graphite.h (struct graphite_bb): New field compressed_alpha_matrix.
8548 (GBB_ALPHA): New.
8549 (struct scop): New field loop2cloog_loop.
8550 (SCOP_LOOP2CLOOG_LOOP, struct data_dependence_polyhedron,
8551 RDGE_DDP, ddp_p, struct loop_to_cloog_loop_str): New.
8552
8553 2008-02-10 Konrad Trifunovic <konrad.trifunovic@inria.fr>
8554
8555 * graphite.c (build_graphite_bb): Fix initialization
8556 of the graphite basic block.
8557
8558 2008-02-05 Sebastian Pop <sebastian.pop@amd.com>
8559
8560 * graphite.c (scan_tree_for_params): Rewrite for the new layout of
8561 loop domain matrix. Pass in the number of loops contained in the
8562 constraint matrix.
8563 (nb_loops_around_gb): Moved before setup_cloog_loop that uses it.
8564 (setup_cloog_loop): Rewrite for the new layout of loop domain matrix:
8565 loops that are not surrounding the current loop are not represented
8566 in the domain constraint matrix.
8567 (build_scop_iteration_domain): Initial domain constraint matrix
8568 contains only the eq/ineq, cst, and scop parameters columns.
8569
8570 2008-01-29 Tobias Grosser <grosser@fim.uni-passau.de>
8571
8572 * graphite.c (schedule_to_scattering, nb_loops_around_gb): New.
8573 (print_graphite_bb): Print scattering.
8574
8575 2008-01-29 Tobias Grosser <grosser@fim.uni-passau.de>
8576
8577 * graphite.c (initialize_cloog_names): Initialize names of
8578 scattering variables.
8579
8580 2009-01-29 Tobias Grosser <grosser@fim.uni-passau.de>
8581
8582 * graphite.c (dot_all_scops_1): Disable debug output while
8583 printing graph.
8584
8585 2008-01-29 Tobias Grosser <grosser@fim.uni-passau.de>
8586
8587 * graphite.c (find_transform): Change cloog output language to C.
8588
8589 2008-01-27 Sebastian Pop <sebastian.pop@amd.com>
8590
8591 * tree-loop-distribution.c (generate_memset_zero,
8592 generate_builtin, generate_code_for_partition,
8593 rdg_flag_all_uses): New.
8594 (rdg_flag_uses): Gather in the same partition the statements defining
8595 the VUSES of the current statement.
8596 (rdg_flag_similar_stores): Renamed rdg_flag_similar_memory_accesses.
8597 Gather in the same partition not only the stores to the same memory
8598 access, but also the reads.
8599 (ldist_generate_loops): Renamed ldist_gen.
8600
8601 2008-01-24 Sebastian Pop <sebastian.pop@amd.com>
8602 Tobias Grosser <grosser@fmi.uni-passau.de>
8603
8604 * graphite.c (setup_cloog_loop): Chain all cloog loops with the
8605 next pointer, don't use the inner pointer.
8606
8607 2008-01-20 Tobias Grosser <grosser@fmi.uni-passau.de>
8608
8609 * graphite.c (dot_all_scops, dot_all_scops_1): New.
8610 (find_transform): Call dot_all_1.
8611 * graphite.h (dot_all_scops): Declared.
8612
8613 2007-12-14 Sebastian Pop <sebastian.pop@amd.com>
8614
8615 * tree-loop-distribution.c: Fix apsi.f ICE.
8616 (create_bb_after_loop): New.
8617 (generate_loops_for_partition): Use it.
8618 * gfortran.dg/ldist-1.f90: New.
8619
8620 * tree-data-ref.c (dot_rdg): Use /tmp/rdg.dot for dotty format.
8621 * graphite.c (dot_scop): Use /tmp/scop.dot for dotty format.
8622
8623 2007-12-13 Tobias Grosser <grosser@fmi.uni-passau.de>
8624
8625 * graphite.c (find_transform): Dump cloog program sent to cloog.
8626
8627 2007-12-13 Tobias Grosser <grosser@fmi.uni-passau.de>
8628
8629 * graphite.c (initialize_cloog_names): Initialize cloog
8630 iterator names.
8631
8632 2007-12-13 Tobias Grosser <grosser@fmi.uni-passau.de>
8633
8634 * graphite.c (build_scop_context): Fix typo, for the matrix
8635 format: insert '0 >= 0' instead of '-1 >= 0'.
8636
8637 2007-12-13 Sebastian Pop <sebastian.pop@amd.com>
8638
8639 * Fix merge problems.
8640
8641 2007-12-13 Sebastian Pop <sebastian.pop@amd.com>
8642
8643 * graphite.c (setup_cloog_loop): Fix typo.
8644
8645 2007-12-12 Sebastian Pop <sebastian.pop@amd.com>
8646
8647 * doc/invoke.texi (-ftree-loop-distribution): Documented.
8648 * tree-loop-distribution.c: Reimplemented.
8649 * tree-pass.h (pass_loop_distribution): New.
8650 * tree-scalar-evolution.c (number_of_iterations_for_all_loops): Use
8651 print_loops.
8652 * graphds.h (struct graph): New field indexes.
8653 * timevar.def (TV_TREE_LOOP_DISTRIBUTION): New.
8654
8655 * tree-vect-analyze.c: Remove declaration of static functions when not
8656 needed.
8657 * tree-vectorizer.c: Same.
8658 (rename_variables_in_loop): Now extern.
8659 (slpeel_tree_duplicate_loop_to_edge_cfg): Renamed
8660 tree_duplicate_loop_to_edge_cfg. Reset PENDING_STMT for edges after
8661 calling redirect_edge_and_branch_force.
8662
8663 * tree-vectorizer.h (tree_duplicate_loop_on_edge): Declared.
8664
8665 * tree-data-ref.c: Don't include tree-chrec.h.
8666 (debug_data_dependence_relations): New.
8667 (dump_data_dependence_relation): Call dump_data_reference on data refs
8668 in the relation.
8669 (same_access_functions): Moved...
8670 (find_vertex_for_stmt): Renamed rdg_vertex_for_stmt.
8671 (dump_rdg_vertex, debug_rdg_vertex, dump_rdg_component,
8672 debug_rdg_component, dump_rdg, debug_rdg, dot_rdg_1, dot_rdg,
8673 struct rdg_vertex_info, ): New.
8674 (create_rdg_edge_for_ddr): Compute the dependence level before looking
8675 at DDR_REVERSED_P.
8676 (create_rdg_vertices): Initialize the htab of graph->indexes.
8677 Initialize RDG_MEM_WRITE_STMT and RDG_MEM_READS_STMT.
8678 (stmts_from_loop): Don't save LABEL_EXPR.
8679 (hash_stmt_vertex_info, eq_stmt_vertex_info,
8680 hash_stmt_vertex_del): New.
8681 (build_rdg): Initialize rdg->indexes.
8682 (free_rdg, stores_from_loop, ref_base_address,
8683 rdg_defs_used_in_other_loops_p, have_similar_memory_accesses,
8684 have_similar_memory_accesses_1, ref_base_address_1,
8685 remove_similar_memory_refs): New.
8686
8687 * tree-data-ref.h: Include tree-chrec.h.
8688 (debug_data_dependence_relations): Declared.
8689 (same_access_functions): ...here. Now static inline.
8690 (ddr_is_anti_dependent, ddrs_have_anti_deps,
8691 ddr_dependence_level): New.
8692 (struct rdg_vertex): New fields has_mem_write, has_mem_reads.
8693 (RDGV_HAS_MEM_WRITE, RDGV_HAS_MEM_READS, RDG_STMT, RDG_MEM_WRITE_STMT,
8694 RDG_MEM_READS_STMT): New.
8695 (dump_rdg_vertex, debug_rdg_vertex, dump_rdg_component,
8696 debug_rdg_component, dump_rdg, debug_rdg, dot_rdg,
8697 rdg_vertex_for_stmt): Declared.
8698 (struct rdg_edge): New field level.
8699 (RDGE_LEVEL, free_rdg): New.
8700 (stores_from_loop, remove_similar_memory_refs,
8701 rdg_defs_used_in_other_loops_p,
8702 have_similar_memory_accesses): Declared.
8703 (rdg_has_similar_memory_accesses): New.
8704
8705 * lambda.h (dependence_level): New.
8706 * common.opt (ftree-loop-distribution): New.
8707 * tree-flow.h (debug_loop_ir): Renamed debug_loops.
8708 (print_loop_ir): Renamed print_loops.
8709 (debug_loop, debug_loop_num, print_loops_bb, mark_virtual_ops_in_bb,
8710 tree_duplicate_loop_to_edge_cfg, rename_variables_in_loop): Declared.
8711 * Makefile.in (TREE_DATA_REF_H): Depends on tree-chrec.h.
8712 (tree-loop-distribution.o): Added.
8713 * tree-cfg.c (mark_virtual_ops_in_region): Use mark_virtual_ops_in_bb.
8714 (mark_virtual_ops_in_bb): New.
8715 (print_loops_bb, debug_loop_num, debug_loop): New.
8716 * passes.c: Scheduled pass_loop_distribution.
8717
8718 2007-12-12 Konrad Trifunovic <konrad.trifunovic@inria.fr>
8719
8720 * graphite.c (scan_tree_for_params): Correct the number of columns
8721 for polylib format.
8722 (nb_flat_iterator): New.
8723 (setup_cloog_loop): Initialize to 1 the first column for inequalities.
8724 (build_scop_iteration_domain): Correct the number of columns for
8725 polylib format.
8726
8727 2007-12-12 Sebastian Pop <sebastian.pop@amd.com>
8728
8729 * Merge from mainline (129697:130800).
8730
8731 2007-10-30 Sebastian Pop <sebastian.pop@amd.com>
8732
8733 * graphite.c (build_graphite_bb): SCoP's basic blocks are post
8734 dominated by SCoP's exit.
8735 (graphite_transform_loops): Compute post dominators.
8736
8737 2007-10-28 Sebastian Pop <sebastian.pop@amd.com>
8738
8739 * Merge from mainline (127169:129697).
8740
8741 2007-10-28 Sebastian Pop <sebastian.pop@amd.com>
8742
8743 * graphite.c (affine_expr): Renamed scop_affine_expr. Use an extra
8744 parameter for the basic block that contains the expression. Use
8745 outermost_loop_in_scop for evolution_function_is_affine_multivariate_p.
8746 (stmt_simple_for_scop_p): Pass to scop_affine_expr the basic block of
8747 the expression.
8748 * graphite.h (gbb_loop): New.
8749 (GBB_LOOP): Removed.
8750
8751 2007-08-03 Sebastian Pop <sebpop@gmail.com>
8752
8753 * Makefile.in: Fix merge problem.
8754
8755 2007-08-03 Sebastian Pop <sebpop@gmail.com>
8756
8757 * Merge from mainline (125309:127169).
8758 * tree-loop-distribution.c: Disabled.
8759
8760 2007-06-05 Sebastian Pop <sebpop@gmail.com>
8761
8762 * Merge from mainline (r123693:125309).
8763
8764 2007-05-30 Sebastian Pop <sebpop@gmail.com>
8765
8766 * tree-loop-distribution.c (correct_modify_expr_p): Renamed
8767 correct_modify_p
8768 (correct_modify_p, check_statements, number_of_lvalue_uses,
8769 number_of_scalar_dependences, create_edges): Use GIMPLE_MODIFY_STMT
8770 instead of MODIFY_EXPR.
8771 (update_edge_with_ddv): Don't pass index_of_edge. Initialize
8772 and push new edges.
8773
8774 2007-05-24 Sebastian Pop <sebpop@gmail.com>
8775
8776 * tree-loop-distribution.c (struct rdg): Replace arrays by
8777 VECs for edges and vertices.
8778 (RDG_NBV, RDG_NBE, RDG_VERTEX, RDG_EDGE): Removed.
8779 (RDGV_NB_PARTITIONS): New.
8780 (PRDG_NBV, PRDG_NBE): Removed.
8781 (build_scc_graph, correct_partitions_p, mark_partitions, build_prdg,
8782 dump_rdg, find_vertex_with_stmt, create_vertices, free_rdg,
8783 number_of_scalar_dependences, create_edges, build_rdg): Use VECs.
8784
8785 2007-05-17 Georges-Andre Silber <silber@cri.ensmp.fr>
8786 Sebastian Pop <sebpop@gmail.com>
8787
8788 * doc/invoke.texi (-ftree-loop-distribution): Document.
8789 * tree-loop-distribution.c: New file.
8790 * tree-pass.h (pass_loop_distribution): Declared.
8791 * timevar.def (TV_TREE_LOOP_DISTRIBUTION): New.
8792 * tree-data-ref.c (initialize_data_dependence_relation): Initialize
8793 and set reversed_p.
8794 * tree-data-ref.h (data_dependence_relation): Add reversed_p.
8795 (DDR_REVERSED_P): New.
8796 * common.opt (-ftree-loop-distribution): New.
8797 * tree-flow.h (distribute_loops): Declared.
8798 * Makefile.in (OBJS-common): Depend on tree-loop-distribution.o.
8799 * passes.c (init_optimization_passes): Schedule loop distribution.
8800
8801 2007-05-12 Sebastian Pop <sebastian.pop@inria.fr>
8802
8803 * graphite.c (print_graphite_bb): Don't call dump_data_references.
8804 (print_scop): Don't print when scop is NULL.
8805 (build_scop_context, find_transform): Don't output to stderr.
8806
8807 2007-05-09 Sebastian Pop <sebastian.pop@inria.fr>
8808
8809 * tree-data-ref.c: Don't include graphite.h.
8810 Comment out the code for printing data reference's scop.
8811 (build_access_matrix_with_af): Moved...
8812 * tree-data-ref.h (build_access_matrix_with_af): Removed declaration.
8813 * graphite.c (build_access_matrix_with_af): ... here. Now static.
8814 (print_graphite_bb): Print basic block's schedule.
8815 (print_scop): Don't print the schedule, call cloog's pretty printer.
8816 (bb_in_scop_p): A basic block is in a scop only if it is both
8817 dominated and postdominated by the scop's entry and exit basic blocks.
8818 (function_parameter_p): New.
8819 (invariant_in_scop_p): Use function_parameter_p.
8820 (new_scop, save_scop): New.
8821 (end_scop, test_for_scop_bound, build_scops): Use new_scop, and
8822 save_scop.
8823 (scan_tree_for_params): Directly build the constraint as CloogMatrix.
8824 (loop_in_scop_p): New.
8825 (scop_record_loop): Use loop_in_scop_p.
8826 (build_scop_domain): Renamed build_scop_iteration_domain.
8827 (setup_cloog_loop, initialize_cloog_names, find_scop_parameters,
8828 nb_params_in_scop, build_scop_context, first_loop_in_scop,
8829 setup_cloog_loop, dot_scop_1, dot_scop): New.
8830 * graphite.h (GBB_LOOP, SCOP_PROG, dot_scop): New.
8831 (struct scop): Add a pointer to cloog's representation of a program.
8832
8833 2007-04-14 Sebastian Pop <sebastian.pop@inria.fr>
8834
8835 * doc/invoke.texi (-ftree-check-verbose): Renamed
8836 -ftree-checks-verbose.
8837 * common.opt (flag_tree_check_verbose): Renamed
8838 flag_tree_checks_verbose.
8839 * tree-check.c (tree_check_warning): Use flag_tree_checks_verbose.
8840
8841 2007-04-14 Sebastian Pop <sebastian.pop@inria.fr>
8842
8843 * configure: Regenerated.
8844 * config.in: Regenerated.
8845 * tree-ssa-loop.c (graphite_transforms): Execute
8846 graphite_transform_loops only when HAVE_cloog.
8847 * configure.ac (HAVE_polylib, HAVE_cloog, GRAPHITE): Defined.
8848 * graphite.c: Include polylibgmp.h and cloog.h.
8849 (graphite_transform_loops): Removed loops parameter.
8850 * tree-flow.h (graphite_transform_loops): Update declaration.
8851 * Makefile.in (POLYLIBLIBS, POLYLIBINC, CLOOGLIBS, CLOOGINC): New.
8852 (LIBS): Depend on CLOOGLIBS and on POLYLIBLIBS.
8853 (INCLUDES): Depend on POLYLIBINC and on CLOOGINC.
8854 (OBJS-common): Remove dependence on graphite.o.
8855 (BACKEND): Depend on @GRAPHITE@.
8856
8857 2007-04-13 Sebastian Pop <sebastian.pop@inria.fr>
8858
8859 * doc/invoke.texi (-ftree-check-verbose): Documented.
8860 * gcc.dg/tree-checker/tree-checks-1.c: New.
8861 * gcc.dg/tree-checker/tree-checks-2.c: New.
8862 * gcc.dg/tree-checker/tree-checks-3.c: New.
8863 * gcc.dg/tree-checker/tree-checks-4.c: New.
8864 * gcc.dg/tree-checker/tree-checks.exp: New.
8865 * gcc.dg/tree-checker/condates.crp: New.
8866 * common.opt (ftree-checks-verbose): New.
8867 * tree-check.c (tree_check_warning): Move extra stderr output
8868 under control of flag_tree_check_verbose.
8869
8870 2007-04-12 Sebastian Pop <sebastian.pop@inria.fr>
8871
8872 * tree-match.c: Fix comments formatting.
8873 * tree-match.h: Fix comments formatting.
8874 * tree-check.c: Fix comments formatting.
8875 (tree_check_init): Restructure.
8876
8877 2007-04-12 Nic Volanschi <nic.volanschi@free.fr>
8878
8879 * doc/invoke.texi (-ftree-check, -ftree-checks): Documented.
8880
8881 2007-04-10 Sebastian Pop <sebastian.pop@inria.fr>
8882
8883 * Merge from mainline (r120733:123693).
8884
8885 2007-03-20 Nic Volanschi <nic.volanschi@free.fr>
8886
8887 * condate.y: New file.
8888 * tree-match.h (struct patt_info_s): New field sign.
8889 (struct condate_s): New field msg.
8890 (normalize_condate, name_condate, add_condate): New.
8891 (conds[], condate_parse): Made extern.
8892 * tree-check.c (tree_check_warning): First arg changed to cond;
8893 warning reformatted.
8894 (tree_check_init): Reset the TREE_VISITED bit on every CFG node.
8895 (tree_scan): New.
8896 (tree_check): Process trivial condates.
8897 (read_delimited_string): Removed.
8898 (print_cond): Print name and msg.
8899 (conds[]): Made extern.
8900 (parse_tree_check_file_once): Rewritten to use the parser in
8901 condate.y.
8902 Processing of option --tree_check_string moved to tree_scan().
8903 * Makefile.in: Added condate.y
8904
8905 2007-03-12 Sebastian Pop <sebastian.pop@inria.fr>
8906
8907 * tree-pretty-print.c (dump_generic_bb_buff, lazy_dump_generic_node):
8908 Use VECs instead of varrays.
8909 * diagnostic.h (lazy_dump_generic_node): Update declaration.
8910 * Makefile.in (pretty-print.o): Depend on vec.h.
8911 * pretty-print.c: Include tree.h and vec.h.
8912 (pp_clear_state, pp_write_list_to_stream, pp_base_format,
8913 pp_base_format, pp_construct, pp_base_string, pp_lazy_mode,
8914 new_tree_chunk, pp_add_tree, pp_add_string, pp_add_char, pp_write_list,
8915 pp_free_list): Use VECs instead of varrays.
8916 * pretty-print.h: Do not include varray.h.
8917 (struct tree_chunk_s): Declaration moved before its use.
8918 (output_buffer): Rename varray field to chunks.
8919 * tree-match.c (tree_equal, chunk_1st_char, chunks_lookahead,
8920 tree_1st_char, match_chunks_pattinfo, match_tree_pattinfo,
8921 save_global_holes): Use VECs instead of varrays.
8922 * tree-match.h: Declare VECs of cfg_node, and hole_p.
8923 * tree-check.c (scan_cfg_stmts, push_node,
8924 print_matching_stmt): Removed.
8925 (tree_check_instance, push_global_holes_if_new, tree_check,
8926 execute_tree_check): Use VECs instead of varrays.
8927 (gate_tree_check): Don't execute the CFG check when basic_block_info
8928 is not available.
8929
8930 2007-01-12 Sebastian Pop <sebastian.pop@inria.fr>
8931
8932 * Merge from mainline (r115016:120733).
8933
8934 2007-01-12 Sebastian Pop <sebastian.pop@inria.fr>
8935
8936 * Merge from mainline (r117632:117661).
8937
8938 2007-01-12 Sebastian Pop <sebastian.pop@inria.fr>
8939
8940 * tree-dump.c (dump_option_value_in): Add TDF_DEBUG.
8941 * tree-pass.h (TDF_DEBUG, debug_p): New.
8942 * tree-scalar-evolution.c (set_scalar_evolution, get_scalar_evolution,
8943 get_scalar_evolution, add_to_evolution, set_nb_iterations_in_loop,
8944 get_loop_exit_condition, analyze_evolution_in_loop,
8945 analyze_initial_condition, analyze_scalar_evolution,
8946 instantiate_parameters, number_of_latch_executions): Use debug_p.
8947 * tree-chrec.c (chrec_apply): Use debug_p.
8948 * tree-data-ref.c: Include graphite.h.
8949 (dump_data_reference): Print also the access matrix.
8950 (analyze_array, analyze_indirect_ref, init_data_ref,
8951 analyze_offset_expr, address_analysis, object_analysis,
8952 create_data_ref, finalize_ddr_dependent,
8953 non_affine_dependence_relation, analyze_ziv_subscript,
8954 analyze_siv_subscript_cst_affine,
8955 compute_overlap_steps_for_affine_1_2, analyze_subscript_affine_affine,
8956 can_use_analyze_subscript_affine_affine, analyze_siv_subscript,
8957 analyze_miv_subscript, analyze_overlapping_iterations,
8958 build_classic_dist_vector, subscript_dependence_tester,
8959 compute_affine_dependence, analyze_all_data_dependences): Use debug_p.
8960 (build_access_matrix_with_af): No longer static.
8961 * tree-data-ref.h (scop_p): ... declaration here.
8962 (data_reference.scop): New field.
8963 (DR_SCOP, DR_ACCESS_MATRIX): New.
8964 (build_access_matrix_with_af, dr_num_subscripts): Declared.
8965 * graphite.c (print_graphite_bb): Call dump_data_references.
8966 (print_scop): Use scop_nb_loops and scop_dim_domain.
8967 (test_for_scop_bound): Use debug_p.
8968 (scan_tree_for_params): Use scop_nb_loops, scop_nb_loops and
8969 scop_nb_params.
8970 (scop_loop_index): Moved...
8971 (scop_record_loop): New.
8972 (build_scop_loop_nests): Use scop_record_loop.
8973 (build_scop_domain): Use scop_dim_domain.
8974 (build_access_matrix): Implemented.
8975 (build_scop_canonical_schedules): Use scop_nb_loops.
8976 (build_graphite_bb): Initialize GBB_SCOP.
8977 * graphite.h (scop_p): Moved...
8978 (graphite_bb.scop): New field.
8979 (graphite_bb.iteration_domain, GBB_DOMAIN, scop.nb_params,
8980 scop.nb_loops, scop.dim_domain, SCOP_NB_LOOPS, SCOP_NB_PARAMS,
8981 SCOP_DIM_DOMAIN, SCOP_STMTS): Removed.
8982 (scop_nb_params, scop_nb_loops, scop_dim_domain, gbb_dim_domain,
8983 scop_loop_index): New.
8984 * Makefile.in (tree-data-ref.o): Depends on graphite.h.
8985
8986 2007-01-05 Sebastian Pop <sebastian.pop@inria.fr>
8987
8988 * Merge from mainline (r117661:120450).
8989
8990 2006-10-12 Sebastian Pop <sebastian.pop@inria.fr>
8991
8992 * tree-scalar-evolution.c (instantiate_parameters_1): Don't stop
8993 at the first declaration outside the varying loop, instantiate as
8994 far as possible.
8995 * tree-chrec.c (for_each_scev_op): New.
8996 * tree-chrec.h (for_each_scev_op): Declared.
8997 * tree-ssa-loop.c (pass_graphite_trans): Don't dump the function.
8998 * tree-data-ref.c (get_references_in_stmt,
8999 find_data_references_in_stmt): New, from trunk.
9000 (find_data_references_in_loop): Use get_references_in_stmt
9001 and find_data_references_in_loop, modified as in trunk.
9002 (build_access_matrix_with_af): New.
9003 * tree-data-ref.h (data_reference): Add a field access_matrix.
9004 (data_ref_loc): New, as in trunk.
9005 * graphite.c (print_graphite_bb, bb_in_scop_p, stmt_in_scop_p,
9006 invariant_in_scop_p, param_index, scan_tree_for_params,
9007 scop_loop_index, build_scop_loop_nests, build_scop_domain, irp_data,
9008 idx_record_param, idx_record_params, build_access_matrix,
9009 build_scop_data_accesses, build_scop_canonical_schedules,
9010 build_graphite_bb, build_scop_bbs, find_params_in_bb,
9011 build_scop_params): New.
9012 * graphite.h (graphite_bb): New.
9013 (scop): Add fields static_schedule, params, loop_nest,
9014 iteration_domain.
9015 * lambda.h: Declare vecs of lambda_matrix.
9016 * tree-flow.h (print_loop_ir_bb): Declared.
9017 * tree-cfg.c (print_loop_ir_bb): New.
9018 (print_loop): Use print_loop_ir_bb.
9019
9020 2006-10-12 Sebastian Pop <pop@cri.ensmp.fr>
9021
9022 * Merge from mainline (r115016:117632).
9023
9024 2006-10-11 Sebastian Pop <pop@cri.ensmp.fr>
9025
9026 * graphite.c (debug_scops): Adjust definition for avoiding a bootstrap
9027 break due to a warning.
9028
9029 2006-10-10 Sebastian Pop <pop@cri.ensmp.fr>
9030
9031 * graphite.c (print_scops, debug_scops): New.
9032 (graphite_transform): Renamed graphite_find_transform.
9033 * graphite.h (debug_scops): Declared.
9034
9035 2006-08-17 Sebastian Pop <pop@cri.ensmp.fr>
9036
9037 * tree-match.c: Reformat following the GNU style.
9038 * tree-match.h: Reformat following the GNU style.
9039 * tree-pattern.h: Removed empty file.
9040 * Makefile.in: Remove references to tree-pattern.h.
9041 * tree-check.c: Reformat following the GNU style.
9042 (execute_tree_check): Move gate condition code to...
9043 (gate_tree_check): ...here. New function.
9044 (pass_check): Use the gate function.
9045
9046 2006-07-04 Nic Volanschi <nic.volanschi@free.fr>
9047
9048 * tree-pattern.h: New. Tree pattern matching and checking using
9049 concrete syntax.
9050 * tree-check.c: New. Tree/CFG checking pass.
9051 * tree-match.c: New. Library for tree pattern matching.
9052 * opts.c, common.opt: Add options --ftree-check & --ftree-checks.
9053 * toplev.c, flags.h: Add globals for tree-check pass.
9054 * Makefile.in: Integrate the files in tree-check pass.
9055 * timevar.def, tree-optimize.c, tree-pass.h: Register tree-check pass.
9056 * pretty-print.c, pretty-print.h, tree-pretty-print.c, diagnostic.h:
9057 Introduce a "lazy" pretty-print mode.
9058 * tree.c, tree.h: Add tree_name.
9059
9060 2006-07-04 Sebastian Pop <pop@cri.ensmp.fr>
9061
9062 * doc/invoke.texi (-fgraphite): Correct typo.
9063 * tree-scalar-evolution.c (number_of_iterations_for_all_loops): Update
9064 use of print_loop_ir.
9065 * gcc.dg/graphite/scop-1.c: New.
9066 * gcc.dg/graphite/scop-2.c: New.
9067 * gcc.dg/graphite/graphite.exp: New.
9068 * graphite.c: Include domwalk.h.
9069 (print_scop): Print only the entry and exit blocks.
9070 (debug_scop): No longer static.
9071 (affine_expr): Fix formating. Return also true when the expression is
9072 constant.
9073 (stmt_simple_for_scop_p): Fix formating.
9074 (build_scops): Use domwalk.
9075 (get_loop_start, end_scop, test_for_scop_bound): New.
9076 (graphite_transform_loops): Avoid printing on stderr.
9077 * graphite.h (debug_scop): Declared.
9078 * tree-flow.h (debug_loop_ir, print_loop_ir): Update declarations.
9079 * Makefile.in (graphite.o): Depend on domwalk.h.
9080 * tree-cfg.c (print_loop, print_pred_bbs, print_succ_bbs): Remove
9081 declarations for static functions.
9082 (print_loop, print_loop_ir, debug_loop_ir): Use an extra parameter for
9083 controlling output verbosity.
9084
9085 2006-06-26 Sebastian Pop <pop@cri.ensmp.fr>
9086 Plesco Alexandru <shurikx@gmail.com>
9087
9088 * doc/invoke.texi (-fgraphite): Document.
9089 * tree-pass.h (pass_graphite_transforms): Declared.
9090 * timevar.def (TV_GRAPHITE_TRANSFORMS): New.
9091 * tree-ssa-loop.c (graphite_transforms, gate_graphite_transforms): New.
9092 (pass_graphite_transforms): Defined.
9093 * tree-data-ref.c (free_data_ref, data_reference): Extern.
9094 * tree-data-ref.h (free_data_ref, data_reference): Declared.
9095 * graphite.c, graphite.h: New.
9096 * common.opt (fgraphite): Declared.
9097 * tree-flow.h (graphite_transform_loops): Declared.
9098 * Makefile.in (OBJS-common): Add graphite.o.
9099 (graphite.o): New rule.
9100 * passes.c (pass_graphite_transforms): Scheduled.
9101