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