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