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