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