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