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