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