1 2010-01-22 Ramakrishna Upadrasta <Ramakrishna.Upadrasta@inria.fr>
3 * graphite-scop-detection.c (dot_all_scops): Make calls to dot run in
6 2010-01-22 Ramakrishna Upadrasta <Ramakrishna.Upadrasta@inria.fr>
8 * common.opt: Add -fgraphite-cloog-opts.
9 * graphite-clast-to-gimple.c (set_cloog_options): Same.
10 * opts.c (decode_options): Same.
12 2010-01-20 Sebastian Pop <sebastian.pop@amd.com>
14 * testsuite/gcc.dg/graphite/id-17.c: New.
15 * testsuite/gcc.dg/graphite/pr41888.c: New.
16 * testsuite/gcc.dg/graphite/scop-22.c: New.
17 * testsuite/gfortran.dg/graphite/pr40982.f90: New.
19 2010-01-20 Sebastian Pop <sebastian.pop@amd.com>
21 * graphite-dependences.c: Clarify comments.
22 (build_pddr): Add an extra parameter direction.
23 (graphite_legal_transform_dr): Use build_pddr.
24 (dot_original_deps_stmt_1): Update use of build_pddr.
25 (dot_transformed_deps_stmt_1): Same.
26 (dot_original_deps): Same.
27 (dot_transformed_deps): Same.
29 * testsuite/gcc.dg/graphite/interchange-12.c: New.
30 * testsuite/gcc.dg/graphite/block-7.c: New.
32 2010-01-20 Sebastian Pop <sebastian.pop@amd.com>
34 * graphite-dependences.c (pddr_original_scattering): Renamed build_pddr.
35 (pddr_transformed_scattering): Removed.
36 (graphite_legal_transform_dr): Use build_pddr.
37 (dot_original_deps_stmt_1): Same.
38 (dot_transformed_deps_stmt_1): Same.
39 (dot_original_deps): Same.
40 (dot_transformed_deps): Same.
42 2010-01-20 Sebastian Pop <sebastian.pop@amd.com>
44 * graphite-dependences.c (lexicographically_gt_p): Add comments.
45 (build_lexicographically_gt_constraint): Same.
46 (dependence_polyhedron_1): Same.
47 (dependence_polyhedron): Same.
49 2010-01-20 Sebastian Pop <sebastian.pop@amd.com>
51 * graphite-dependences.c (build_pairwise_scheduling_equality): Removed.
52 (build_pairwise_scheduling_inequality): Renamed build_pairwise_scheduling.
53 (lexicographically_gt_p): Change type of direction to int.
54 (build_lexicographically_gt_constraint): Same.
55 (dependence_polyhedron_1): Same.
56 (dependence_polyhedron): Same.
57 (pddr_original_scattering): Use integers for direction.
58 (pddr_transformed_scattering): Same.
59 (graphite_legal_transform_dr): Same.
60 (graphite_carried_dependence_level_k): Same.
62 2010-01-20 Sebastian Pop <sebastian.pop@amd.com>
64 * graphite-dependences.c (build_pairwise_constraint): Renamed
65 ppl_build_relation. Moved...
66 (dr_equality_constraints): Use ppl_build_relation.
67 (build_pairwise_scheduling_equality): Same.
68 (build_pairwise_scheduling_inequality): Same.
69 * graphite-ppl.c (ppl_build_relation): ...here.
70 * graphite-ppl.h (ppl_build_relation): Declared.
72 2010-01-14 Sebastian Pop <sebastian.pop@amd.com>
75 * graphite-clast-to-gimple.c (gloog_error): New static variable.
76 (clast_to_gcc_expression): Do not build MULT_EXPR of POINTER_TYPE_P.
77 Set gloog_error when such an expression failed to be built.
78 (translate_clast): Early return when gloog_error is set.
79 (gloog): Clear gloog_error. When gloog_error is set, call
80 set_ifsese_condition to enable the original code. Return the status
81 of the code generation based on gloog_error.
82 * sese.c (set_ifsese_condition): New.
83 * sese.h (set_ifsese_condition): Declared.
85 * testsuite/g++.dg/graphite/pr42681.C: New.
87 2010-01-14 Sebastian Pop <sebastian.pop@amd.com>
90 * graphite-clast-to-gimple.c (gloog): Call scev_reset_htab and
92 * sese.c (rename_variables_in_operand): New.
93 (rename_variables_in_expr): New.
94 (rename_nb_iterations): New.
95 (sese_adjust_liveout_phis): Update the rename_map.
96 * sese.h (rename_nb_iterations): Declared.
97 * tree-scalar-evolution.c (scev_reset_htab): New.
98 (scev_reset): Call scev_reset_htab.
99 * tree-scalar-evolution.h (scev_reset_htab): Declared.
101 * testsuite/gfortran.dg/graphite/pr42732.f: New.
103 2010-01-08 Sebastian Pop <sebastian.pop@amd.com>
106 * graphite-clast-to-gimple.c: Fix formatting.
107 * sese.c (defined_in_loop_p): Renamed name_defined_in_loop_p.
108 (expr_defined_in_loop_p): New.
109 (add_loop_exit_phis): Also handle full expressions: remove from
110 the rename_map the expressions defined in the loop that we're closing.
112 * testsuite/gfortran.dg/graphite/pr42393-1.f90: New.
113 * testsuite/gfortran.dg/graphite/pr42393.f90: Add new flags
114 -fno-loop-block -fno-loop-interchange -fno-loop-strip-mine to also
115 make this testcase useful in the Graphite branch.
117 2010-01-08 Sebastian Pop <sebastian.pop@amd.com>
119 * graphite-scop-detection.c (exclude_component_ref): Removed.
120 (is_simple_operand): Removed.
121 (stmt_simple_for_scop_p): Remove use of is_simple_operand.
123 2010-01-07 Sebastian Pop <sebastian.pop@amd.com>
126 * sese.c (expand_scalar_variables_expr): Follow the SSA links into
127 the array indexing of ADDR_EXPRs.
129 * testsuite/gcc.dg/graphite/pr42221.c: New.
131 2010-01-07 Sebastian Pop <sebastian.pop@amd.com>
134 * graphite.c (graphite_finalize): Call scev_reset.
135 (graphite_transform_loops): Do not call scev_reset between the code
138 * testsuite/gcc.dg/graphite/pr42521.c: New.
140 2010-01-07 Sebastian Pop <sebastian.pop@amd.com>
142 * graphite-interchange.c (memory_stride_in_loop): Renamed
144 (memory_strides_in_loop): Renamed memory_strides_in_loop_1.
145 (memory_strides_in_loop): Memoize the memory strides per loop.
146 (lst_interchange_profitable_p): Do not initialize to zero the memory
148 * graphite-poly.h (struct lst): Add a field memory_strides.
149 (LST_LOOP_MEMORY_STRIDES): New.
150 (new_lst_loop): Initialize LST_LOOP_MEMORY_STRIDES to -1.
151 (free_lst): Clear LST_LOOP_MEMORY_STRIDES.
153 2010-01-07 Sebastian Pop <sebastian.pop@amd.com>
155 * graphite-interchange.c (memory_strides_in_loop_depth): Renamed
156 memory_strides_in_loop. Gather memory strides on a whole loop.
157 (pbb_interchange_profitable_p): Renamed lst_interchange_profitable_p.
158 (lst_interchange_profitable_p): Removed.
159 (lst_try_interchange_loops): Call lst_interchange_profitable_p.
161 2010-01-07 Sebastian Pop <sebastian.pop@amd.com>
163 Revert patch 2009-11-23 Tobias Grosser <grosser@fim.uni-passau.de>
164 * graphite-clast-to-gimple.c (try_mark_loop_parallel): New.
165 (translate_clast_for, translate_clast_guard, translate_clast, gloog):
166 Remove context_loop and level.
168 2010-01-07 Richard Guenther <rguenther@suse.de>
170 PR tree-optimization/42641
171 * sese.c (rename_map_elt_info): Use the SSA name version, do
174 2010-01-06 Sebastian Pop <sebastian.pop@amd.com>
176 * graphite-blocking.c (scop_do_block): Print "SCoP will be loop
177 blocked" only when both the strip mine and the interchange have
180 * testsuite/gcc.dg/graphite/block-2.c: Removed.
181 * testsuite/gcc.dg/graphite/block-3.c: Add scan pattern.
182 * testsuite/gcc.dg/graphite/block-4.c: Same.
183 * testsuite/gcc.dg/graphite/block-5.c: Same.
184 * testsuite/gcc.dg/graphite/block-6.c: Same.
186 2010-01-06 Sebastian Pop <sebastian.pop@amd.com>
188 * graphite-clast-to-gimple.c (save_clast_name_index): Free slot
189 before allocating a new one.
190 (copy_renames): Check that slot is not NULL.
191 (mark_bb_with_pbb): Same.
192 (compute_cloog_iv_types_1): Same.
193 * graphite-interchange.c (lst_perfect_nestify): Free the before,
194 nest, and after LSTs.
195 (lst_try_interchange_loops): Same.
197 2010-01-05 Sebastian Pop <sebastian.pop@amd.com>
200 * graphite-interchange.c (lst_try_interchange_loops): Do not return
201 the before, nest, and after LSTs.
202 (lst_try_interchange): Removed.
203 (lst_interchange_select_inner): Do not iterate over the LSTs if they
205 (lst_interchange_select_outer): Apply interchange on the outer loop
206 until there are no more changes in the inner loops.
208 2009-12-18 Sebastian Pop <sebastian.pop@amd.com>
210 Revert patch fixing PR middle-end/42221.
212 2009-12-18 Sebastian Pop <sebastian.pop@amd.com>
215 * graphite-sese-to-poly.c (follow_ssa_with_commutative_ops): Handle
218 * testsuite/gfortran.dg/graphite/pr42180.f90: Add compile flags.
220 2009-12-18 Sebastian Pop <sebastian.pop@amd.com>
223 * graphite-sese-to-poly.c (split_reduction_stmt): Do not split blocks
224 that contain only one statement.
226 * testsuite/gfortran.dg/graphite/pr42180.f90: New.
228 2009-12-17 Sebastian Pop <sebastian.pop@amd.com>
231 * testsuite/gfortran.dg/graphite/pr42393.f90: New.
233 2009-12-17 Sebastian Pop <sebastian.pop@amd.com>
236 * testsuite/gfortran.dg/graphite/pr42186.f90: New.
238 2009-12-17 Sebastian Pop <sebastian.pop@amd.com>
241 * graphite-sese-to-poly.c (translate_scalar_reduction_to_array_for_stmt):
242 Insert the reduction copy in the same block as the phi node.
243 (follow_ssa_with_commutative_ops): Handle GIMPLE_NOPs.
245 * testsuite/gcc.dg/graphite/pr42205-1.c: New.
246 * testsuite/gcc.dg/graphite/pr42205-2.c: New.
248 2009-12-17 Sebastian Pop <sebastian.pop@amd.com>
251 * sese.c (expand_scalar_variables_expr): Follow the SSA links into
252 the array indexing of ADDR_EXPRs.
254 * testsuite/gcc.dg/graphite/pr42221.c: New.
256 2009-12-17 Sebastian Pop <sebastian.pop@amd.com>
260 * graphite-interchange.c (lst_try_interchange): Do not modify OUTER
261 index. Call lst_interchange_select_inner only once.
262 (lst_interchange_select_inner): Update use of lst_try_interchange.
263 (lst_interchange_select_outer): Update.
265 2009-12-15 Sebastian Pop <sebastian.pop@amd.com>
269 * graphite-interchange.c (lst_try_interchange): Do not increment the
270 the OUTER index when there is no AFTER kernel. Do not increment the
271 OUTER index for after processing the AFTER kernel.
272 (lst_interchange_select_inner): Call lst_try_interchange only on loops.
273 (lst_interchange_select_outer): Do not pass in a pointer to the OUTER
274 index. Do not pass to lst_interchange_select_inner the OUTER index.
275 (scop_do_interchange): Update use of lst_interchange_select_outer.
277 * testsuite/gfortran.dg/graphite/graphite.exp
278 (DEFAULT_FLAGS_GRAPHITE_IDENTITY): Remove -fdump-tree-graphite-all.
279 * testsuite/gfortran.dg/graphite/interchange-1.f: Add comment. Clean
280 the graphite dump file.
281 * testsuite/gfortran.dg/graphite/interchange-2.f: Same.
282 * testsuite/gfortran.dg/graphite/pr42334-1.f: New.
284 2009-12-15 Sebastian Pop <sebastian.pop@amd.com>
288 * graphite-interchange.c (lst_perfect_nestify): Reset to NULL the LSTs
290 (lst_do_interchange_1): Renamed lst_interchange_select_inner.
291 (lst_try_interchange): Reimplemented.
292 (lst_interchange_select_inner): Same.
293 (lst_do_interchange): Renamed lst_interchange_select_outer.
295 (scop_do_interchange): Update use of lst_interchange_select_outer.
297 * testsuite/g++.dg/graphite/pr42130.C: Add -fgraphite-identity.
298 * testsuite/gcc.dg/graphite/block-0.c: Un-XFAILed.
299 * testsuite/gcc.dg/graphite/pr42211.c: New.
300 * testsuite/gfortran.dg/graphite/pr42334.f90: New.
302 2009-12-14 Sebastian Pop <sebastian.pop@amd.com>
305 * graphite-scop-detection.c (graphite_can_represent_scev): Handle more
306 carefully PLUS_EXPR, MINUS_EXPR, and MULT_EXPR.
308 * testsuite/gfortran.dg/graphite/pr42181.f90: New.
310 2009-12-12 Sebastian Pop <sebpop@gmail.com>
313 * graphite-sese-to-poly.c (rewrite_close_phi_out_of_ssa): Call
314 insert_out_of_ssa_copy_on_edge for anything else than SSA_NAMEs.
315 (detect_commutative_reduction_arg): Simplified.
316 (detect_commutative_reduction): Early return when the argument of
317 the close phi is not of an SSA_NAME.
319 * testsuite/gcc.dg/graphite/pr42284.c: New.
321 2009-12-11 Alexander Monakov <amonakov@ispras.ru>
323 * dbgcnt.def (graphite_scop): New counter.
324 * graphite.c: Include dbgcnt.h
325 (graphite_transform_loops): Use new counter to limit transformations.
327 2009-12-08 Sebastian Pop <sebpop@gmail.com>
330 * graphite-scop-detection.c (graphite_can_represent_init): Also
331 handle more complex MULT_EXPRs containing parameters by recursion
334 * testsuite/gfortran.dg/graphite/pr42285.f90: New.
336 2009-12-01 Tobias Grosser <grosser@fim.uni-passau.de>
338 * testsuite/g++.dg/graphite/pr42130.C: Fix type.
340 2009-11-29 Alexander Monakov <amonakov@gcc.gnu.org>
342 * testsuite/g++.dg/graphite/pr42130.C: Correct testcase.
344 2009-11-24 Tobias Grosser <grosser@fim.uni-passau.de>
346 * graphite-clast-to-gimple.c (try_mark_loop_parallel,
347 graphite_create_new_loop_guard, translate_clast_for): Fix comments.
349 2009-11-23 Tobias Grosser <grosser@fim.uni-passau.de>
352 * graphite-clast-to-gimple.c (graphite_create_new_loop_guard,
353 translate_clast_for_loop): New.
354 (translate_clast_for): Add a condition around the loop, to do not
355 execute loops with zero iterations.
356 * testsuite/g++.dg/graphite/pr42130.C: New.
357 * testsuite/gcc.dg/graphite/pr35356-2.c: Adapt.
359 2009-11-23 Tobias Grosser <grosser@fim.uni-passau.de>
361 * graphite-clast-to-gimple.c (try_mark_loop_parallel): New.
362 (translate_clast_for, translate_clast_guard, translate_clast, gloog):
363 Remove context_loop and level.
365 2009-11-23 Tobias Grosser <grosser@fim.uni-passau.de>
367 * graphite-clast-to-gimple.c (translate_clast_user,
368 translate_clast_for, translate_clast_guard): Simplify and move common
369 elements to translate_clast().
370 (translate_clast): Simplify and get common elements.
372 2009-11-23 Tobias Grosser <grosser@fim.uni-passau.de>
374 * graphite-clast-to-gimple.c (translate_clast_user,
375 translate_clast_for, translate_clast_guard): Split out of
378 2009-11-21 Tobias Grosser <grosser@fim.uni-passau.de>
380 * graphite-clast-to-gimple.c (clast_name_index, new_clast_name_index,
381 clast_name_to_index, save_clast_name_index, debug_clast_name_index,
382 debug_clast_name_indexes_1, debug_clast_name_indexes,
383 clast_name_index_elt_info, eq_clast_name_indexes): Moved from sese.h.
384 (clast_name_to_gcc, clast_to_gcc_expression,
385 clast_to_gcc_expression_red, gcc_type_for_clast_expr,
386 gcc_type_for_clast_eq, graphite_translate_clast_equation,
387 graphite_create_guard_cond_expr, graphite_create_new_loop,
388 translate_clast): Add params_index.
389 (initialize_cloog_names): Create parameter strings from scratch, do
390 not reference other strings.
391 (create_params_index): New.
392 (gloog): Initialize params_index.
393 * graphite-scop-detection (free_scops_1): Removed.
394 (limit_scops): Use normal free_scops.
395 * graphite-sese-to-poly.c (save_var_names): Removed.
396 (parameter_index_in_region): Do not initialize SESE_PARAM_NAMES
397 and SESE_PARAMS_INDEX.
398 * sese.c (new_sese, free_sese): Dito.
399 * sese.h (struct sese): Remove params_index, params_names.
400 (SESE_PARAMS_INDEX, SESE_PARAMS_NAMES): Removed.
402 2009-11-20 Sebastian Pop <sebastian.pop@amd.com>
404 Revert the following patch from 2009-09-14:
405 * graphite-blocking.c: Fix order of includes: tree-chrec.h, then
406 tree-scalar-evolution.h, and then tree-data-ref.h.
407 * graphite-clast-to-gimple.c: Same.
408 * graphite-dependences.c: Same.
409 * graphite-interchange.c: Same.
410 * graphite-poly.c: Same.
411 * graphite-scop-detection.c: Same.
412 * graphite-sese-to-poly.c: Same.
414 * lambda-code.c: Same.
415 * matrix-reorg.c: Same.
416 * tree-data-ref.c: Same.
417 * tree-if-conv.c: Same.
418 * tree-loop-distribu: Same.: Same.
419 * tree-loop-linear.c: Same.
420 * tree-parloops.c: Same.
421 * tree-predcom.c: Same.
422 * tree-vect-patterns.c: Same.
424 2009-11-20 Sebastian Pop <sebastian.pop@amd.com>
426 Revert patch from 2009-09-14.
427 * tree-ssa-loop.c (gate_graphite_transforms): Re-enable Graphite
428 passes at -O1 and below.
430 2009-11-18 Sebastian Pop <sebastian.pop@amd.com>
433 * testsuite/gcc.dg/graphite/pr40281.c: New.
435 * tree-scalar-evolution.c (instantiate_scev_poly): Base and stride
436 evolutions should not variate in inner loops.
438 2009-11-18 Sebastian Pop <sebastian.pop@amd.com>
441 * testsuite/gfortran.dg/graphite/pr42050.f90: New.
443 2009-11-18 Sebastian Pop <sebastian.pop@amd.com>
445 * graphite-interchange.c (memory_strides_in_loop_depth): New.
446 (pbb_interchange_profitable_p): Call memory_strides_in_loop_depth.
448 2009-11-18 Sebastian Pop <sebastian.pop@amd.com>
450 * graphite-blocking.c (scop_do_block): New.
451 * graphite-poly.c (apply_poly_transforms): Call scop_do_block.
452 * graphite-poly.h (scop_do_block): Declared.
454 2009-11-18 Sebastian Pop <sebastian.pop@amd.com>
456 * graphite-blocking.c (pbb_strip_mine_profitable_p): The parameter
457 depth is the loop nesting depth in the LST. Call psct_dynamic_dim
458 to transform depth into the time_depth before calling
459 pbb_number_of_iterations_at_time.
460 (lst_do_strip_mine): Use a scalar variable instead of recomputing
463 2009-11-18 Sebastian Pop <sebastian.pop@amd.com>
465 Reverted the patch for "scattering permutations" from 2009-10-28.
467 * graphite-poly.c (print_permutation): New.
468 (debug_permutation): New.
469 (new_poly_bb): Initialize PBB_PERMUTATION.
470 (free_poly_bb): Free PBB_PERMUTATION.
471 * graphite-poly.h (pbb_permutation_elt_p): Declared.
472 (struct pbb_permutation_elt): New.
473 (PBB_PERMUTATION_ELT_STRIDE): New.
474 (PBB_PERMUTATION_ELT_STRIDED_P): New.
475 (PBB_PERMUTATION_ELT_TIME_DIMENSION): New.
476 (new_pbb_permutation_elt): New.
477 (pbb_permutation_elt_free): New.
478 (struct poly_bb): Add field permutation.
479 (PBB_PERMUTATION): New.
480 (print_permutation): Declared.
481 (debug_permutation): Declared.
483 2009-11-04 Konrad Trifunovic <konrad.trifunovic@inria.fr>
485 * graphite-interchange.c (build_partial_difference): New.
486 (memory_stride_in_loop): Refactored the computation of
487 equality constraints into build_partial_difference function.
488 Added support for debugging stride computations.
490 2009-11-03 Sebastian Pop <sebastian.pop@amd.com>
492 * graphite-clast-to-gimple.c (gloog): Free if_region,
493 if_region->true_region, and if_region->region.
494 * sese.c (if_region_set_false_region): Free if_region->false_region.
495 (create_if_region_on_edge): Do not use GGC_NEW.
496 (move_sese_in_condition): Remove useless initialization.
498 2009-11-03 Sebastian Pop <sebastian.pop@amd.com>
500 * graphite-interchange.c (lst_perfect_nestify): Pass 3 parameters
501 for the loops created by the loop distribution. Do not modify the
503 (lst_try_interchange_loops): Same. Use a temporary LST for the
504 transformed schedule. Call lst_update_scattering before data
506 (lst_try_interchange): Pass an extra parameter INDEX.
507 (lst_do_interchange_1): New.
508 (lst_do_interchange): Call lst_do_interchange_1.
509 (scop_do_interchange): Call lst_update_scattering.
510 * graphite-poly.c (apply_poly_transforms): Do not call
511 lst_update_scattering.
512 * graphite-poly.h (lst_pred): New.
514 (lst_find_first_pbb): Return NULL when not found.
516 (lst_insert_in_sequence): Allow LST1 to be NULL.
518 (lst_substitute_3): New.
519 * gcc.dg/graphite/interchange-1.c: XFail.
520 * gcc.dg/graphite/interchange-8.c: XFail.
521 * gcc.dg/graphite/interchange-11.c: XFail.
523 2009-10-30 Sebastian Pop <sebastian.pop@amd.com>
525 * graphite-interchange.c (lst_perfectly_nested_p): New.
526 (lst_perfect_nestify): New.
527 (lst_try_interchange_loops): Call store_lst_schedule,
528 lst_perfectly_nested_p, lst_perfect_nestify and restore_lst_schedule.
529 (scop_do_interchange): Avoid redundant legality test.
530 Call lst_do_interchange on a copy of SCOP_TRANSFORMED_SCHEDULE.
531 * graphite-poly.c (apply_poly_transforms): Call lst_update_scattering.
532 * graphite-poly.h (psct_static_dim): New.
533 (lst_dewey_number_at_depth): New.
534 (lst_find_pbb): Restructured.
535 (lst_find_first_pbb): Restructured.
536 (lst_find_last_pbb): New.
537 (lst_contains_p): New.
538 (lst_contains_pbb): New.
539 (lst_create_nest): New.
540 (lst_remove_from_sequence): New.
541 (pbb_update_scattering): New.
542 (lst_update_scattering_under): New.
543 (lst_update_scattering_seq): New.
544 (lst_update_scattering): New.
545 (lst_insert_in_sequence): New.
546 (lst_distribute_lst): New.
547 (lst_remove_all_before_including_pbb): New.
548 (lst_remove_all_before_excluding_pbb): New.
550 2009-10-30 Sebastian Pop <sebastian.pop@amd.com>
552 * tree-ssa-loop-niter.c (finite_loop_p): Do not call twice
555 2009-10-30 Sebastian Pop <sebastian.pop@amd.com>
557 * graphite-poly.c (pbb_remove_duplicate_pdrs): Free collapsed.
559 2009-10-28 Konrad Trifunovic <konrad.trifunovic@gmail.com>
561 * graphite-poly.c (print_permutation): New.
562 (debug_permutation): New.
563 (new_poly_bb): Initialize PBB_PERMUTATION.
564 (free_poly_bb): Free PBB_PERMUTATION.
565 * graphite-poly.h (pbb_permutation_elt_p): Declared.
566 (struct pbb_permutation_elt): New.
567 (PBB_PERMUTATION_ELT_STRIDE): New.
568 (PBB_PERMUTATION_ELT_STRIDED_P): New.
569 (PBB_PERMUTATION_ELT_TIME_DIMENSION): New.
570 (new_pbb_permutation_elt): New.
571 (pbb_permutation_elt_free): New.
572 (struct poly_bb): Add field permutation.
573 (PBB_PERMUTATION): New.
574 (print_permutation): Declared.
575 (debug_permutation): Declared.
577 2009-10-26 Sebastian Pop <sebastian.pop@amd.com>
579 * graphite-clast-to-gimple.c (gloog): Do not call
580 sese_reset_aux_in_loops.
581 * graphite-sese-to-poly.c (build_loop_iteration_domains): Pass an
582 extra argument for domains. Do not use loop->aux.
583 (build_scop_iteration_domain): Initialize and free domains, pass it
584 to build_loop_iteration_domains and extract the information from
585 domains. Do not use loop->aux.
586 * sese.c (sese_reset_aux_in_loops): Removed.
587 * sese.h (sese_reset_aux_in_loops): Removed.
589 2009-10-26 Sebastian Pop <sebastian.pop@amd.com>
591 * graphite-clast-to-gimple.c (find_pbb_via_hash): Moved up.
592 (dependency_in_loop_p): Same.
593 (translate_clast): Do not use loop->aux. Initialize
594 loop->can_be_parallel.
595 (mark_loops_parallel): Removed.
596 * graphite-clast-to-gimple.h (mark_loops_parallel): Removed.
597 * graphite.c (free_aux_in_new_loops): Removed.
598 (graphite_finalize): Do not call free_aux_in_new_loops.
599 (graphite_transform_loops): Do not call mark_loops_parallel.
601 2009-10-26 Li Feng <nemokingdom@gmail.com>
603 * graphite-clast-to-gimple.c (get_stmtfor_depth): Removed.
604 (translate_clast): Pass an extra parameter LEVEL.
605 Call get_scattering_level.
606 * graphite-clast-to-gimple.h (get_scattering_level): New.
608 2009-10-22 Sebastian Pop <sebastian.pop@amd.com>
610 * cfgloop.c (alloc_loop): Initialize loop->single_iv.
611 * cfgloop.h (struct loop): New field single_iv.
613 * graphite-clast-to-gimple.c (pbb_to_depth_to_oldiv): Do not use
614 loop->aux anymore: use loop->single_iv.
615 (graphite_loop_normal_form): Moved...
616 (build_graphite_loop_normal_form): Removed.
617 (gloog): Do not call build_graphite_loop_normal_form.
618 (free_aux_in_new_loops): Moved...
619 (mark_loops_parallel): Restructure.
620 * graphite-clast-to-gimple.h (free_aux_in_new_loops): Do not declare.
621 * graphite-sese-to-poly.c (graphite_loop_normal_form): ...here.
622 (scop_canonicalize_loops): New.
623 (build_poly_scop): Call scop_canonicalize_loops.
624 * graphite.c (free_aux_in_new_loops): ...here.
626 2009-10-22 Sebastian Pop <sebastian.pop@amd.com>
628 * g++.dg/graphite/graphite.exp: Add the same rules as in
629 gcc.dg/graphite/graphite.exp.
631 2009-10-22 Sebastian Pop <sebastian.pop@amd.com>
633 * g++.dg/graphite/id-1.C: New.
635 2009-10-22 Sebastian Pop <sebastian.pop@amd.com>
637 * graphite-sese-to-poly.c (create_zero_dim_array): Pass an extra
639 (rewrite_close_phi_out_of_ssa): Update use of create_zero_dim_array.
640 (rewrite_phi_out_of_ssa): Same.
641 (rewrite_cross_bb_scalar_deps): Same.
642 (translate_scalar_reduction_to_array): Same.
644 2009-10-22 Sebastian Pop <sebastian.pop@amd.com>
646 * graphite-sese-to-poly.c (build_scop_drs): Disable call to
649 2009-10-22 Sebastian Pop <sebastian.pop@amd.com>
651 * graphite-sese-to-poly.c (dump_alias_graphs): New.
652 (build_scop_drs): Call dump_alias_graphs.
654 2009-10-22 Sebastian Pop <sebastian.pop@amd.com>
656 * graphite-poly.c (new_scop): Initialize SCOP_ORIGINAL_SCHEDULE,
657 SCOP_TRANSFORMED_SCHEDULE, and SCOP_SAVED_SCHEDULE.
658 (free_scop): Call free_lst on SCOP_ORIGINAL_SCHEDULE,
659 SCOP_TRANSFORMED_SCHEDULE, and SCOP_SAVED_SCHEDULE.
660 * graphite-poly.h (free_lst): New.
661 (store_lst_schedule): Free SCOP_SAVED_SCHEDULE.
662 (restore_lst_schedule): Free SCOP_TRANSFORMED_SCHEDULE.
664 2009-10-22 Sebastian Pop <sebastian.pop@amd.com>
666 * graphite-poly.h (struct scop): Add a field saved_schedule.
667 (SCOP_SAVED_SCHEDULE): New.
668 (store_lst_schedule): New.
669 (restore_lst_schedule): New.
670 (store_scattering): Call store_lst_schedule.
671 (restore_scattering): Call restore_lst_schedule.
673 2009-10-20 Sebastian Pop <sebastian.pop@amd.com>
675 * graphite-sese-to-poly.c (free_data_refs_aux): Fix formatting.
676 (pdr_add_alias_set): Same.
677 (build_poly_dr): Same.
678 (build_alias_set_optimal_p): Same.
679 (build_base_obj_set_for_drs): Same. Do not store the result of
682 2009-10-20 Sebastian Pop <sebastian.pop@amd.com>
684 * graphite-sese-to-poly.c (build_alias_set_optimal_p): Initialize
685 all_components_are_cliques to 1.
687 2009-10-20 Li Feng <nemokingdom@gmail.com>
689 * graphite-sese-to-poly.c (free_data_refs_aux): Update to free
691 (pdr_add_alias_set): Update retrieving alias_set_num.
692 (build_poly_dr): Update retrieving dr_base_object_set.
693 (partition_drs_to_sets): Remove.
694 (build_alias_set_optimal_p): New.
695 (build_alias_set_for_drs): Rename.
696 (build_scop_drs): Update.
697 * graphite-sese-to-poly.h (struct base_alias_pair): New.
698 (ALIAS_SET_INDEX): Remove.
699 (BASE_OBJECT_SET_INDEX): Remove.
701 2009-10-20 Sebastian Pop <sebastian.pop@amd.com>
703 * sese.c (get_vdef_before_sese): Handle GIMPLE_ASSIGN and GIMPLE_CALL.
705 2009-10-20 Sebastian Pop <sebastian.pop@amd.com>
707 * graphite-sese-to-poly.c (pdr_add_data_dimensions): Do not infer
708 loop upper bounds for 1-element arrays at end of structures.
709 * tree-flow.h (array_at_struct_end_p): Declared.
710 * tree-ssa-loop-niter.c (array_at_struct_end_p): Not static anymore.
712 2009-10-20 Sebastian Pop <sebastian.pop@amd.com>
714 * g++.dg/graphite/pr41305.C: New.
716 2009-10-20 Alexander Monakov <amonakov@ispras.ru>
718 * graphite-sese-to-poly.c (build_loop_iteration_domains): Generalize
719 construction of parameter constraints from loop iteration analysis.
720 * gcc.dg/graphite/run-id-2.c: New test.
722 2009-10-17 Sebastian Pop <sebastian.pop@amd.com>
724 * graphite-interchange.c (memory_stride_in_loop): Delete p1, lma
727 2009-10-17 Sebastian Pop <sebastian.pop@amd.com>
729 * graphite-dependences.c (dependence_polyhedron_1): Remove
730 unused gdim dimensions from the DDR polyhedron.
732 2009-10-17 Sebastian Pop <sebastian.pop@amd.com>
734 * graphite-dependences.c (pddr_transformed_scattering): New.
735 (dot_original_deps_stmt_1): New.
736 (dot_transformed_deps_stmt_1): New.
737 (dot_deps_stmt_1): Call dot_original_deps_stmt_1 and
738 dot_transformed_deps_stmt_1.
739 (dot_original_deps): New.
740 (dot_transformed_deps): New.
741 (dot_deps_1): Call dot_original_deps and dot_transformed_deps.
743 2009-10-17 Sebastian Pop <sebastian.pop@amd.com>
745 * graphite-dependences.c (reduction_dr_1): Remove wrong
746 assert: reduction BBs can have multiple reduction writes
747 to memory. interchange-3.f90 is an example.
749 2009-10-17 Sebastian Pop <sebastian.pop@amd.com>
751 * gfortran.dg/graphite/interchange-3.f90: New.
753 2009-10-17 Sebastian Pop <sebastian.pop@amd.com>
755 * gcc.dg/graphite/interchange-1.c: Un-XFAILed.
757 2009-10-17 Sebastian Pop <sebastian.pop@amd.com>
759 * graphite-dependences.c (dependence_polyhedron_1): Add the
760 context to the dependence polyhedron.
762 2009-10-17 Sebastian Pop <sebastian.pop@amd.com>
764 * graphite-poly.c (pbb_remove_duplicate_pdrs): Initialize
765 PBB_PDR_DUPLICATES_REMOVED.
768 2009-10-17 Sebastian Pop <sebastian.pop@amd.com>
770 * graphite-sese-to-poly.c (find_scop_parameters): Initialize
772 (build_loop_iteration_domains): Extract bounds on parameters
773 based on the data size.
774 (build_scop_context): Do not initialize SCOP_CONTEXT;
777 2009-10-17 Sebastian Pop <sebastian.pop@amd.com>
779 * graphite-ppl.c (ppl_min_for_le_polyhedron): New.
780 * graphite-ppl.h (graphite-ppl.h): Declared.
782 2009-10-17 Sebastian Pop <sebastian.pop@amd.com>
784 * graphite-ppl.c (ppl_print_linear_expr): New.
785 (debug_ppl_linear_expr): New.
786 * graphite-ppl.h (ppl_print_linear_expr): Declared.
787 (debug_ppl_linear_expr): Declared.
789 2009-10-16 Sebastian Pop <sebastian.pop@amd.com>
791 * graphite-interchange.c: Fix comments.
792 * gcc.dg/graphite/block-1.c: Fix comments.
794 2009-10-16 Sebastian Pop <sebastian.pop@amd.com>
796 * gcc.dg/graphite/interchange-7.c: Un-XFAILed.
797 * gcc.dg/graphite/interchange-9.c: Un-XFAILed.
799 2009-10-16 Sebastian Pop <sebastian.pop@amd.com>
801 Reapply the patch from Alexander Monakov that disappeared during
802 the last merges from trunk.
804 2009-09-16 Alexander Monakov <amonakov@ispras.ru>
806 * graphite-sese-to-poly.c (pdr_add_data_dimensions): Add bounds only
807 for ARRAY_REFs. Use array_ref_{low,up}_bound to determine bounds.
809 2009-10-15 Sebastian Pop <sebastian.pop@amd.com>
811 * graphite-interchange.c (memory_stride_in_loop): The depth
812 argument corresponds to a dynamic time dimension, so use
813 psct_dynamic_dim to refer to the transformed scattering dimension.
815 2009-10-15 Sebastian Pop <sebastian.pop@amd.com>
817 * graphite-interchange.c (memory_stride_in_loop): Fix comments.
819 2009-10-15 Sebastian Pop <sebastian.pop@amd.com>
821 * graphite-blocking.c (lst_do_strip_mine): Avoid strip mining the
823 * graphite-interchange.c (lst_do_interchange): Avoid interchanging
825 * graphite-poly.c (scop_to_lst): Fix LST sequence in an outermost
827 (print_lst): Print the root of LST in a different format.
828 * graphite-poly.h (lst_depth): Adjust to include the root of the LST.
830 2009-10-15 Sebastian Pop <sebastian.pop@amd.com>
832 * graphite-poly.c (print_scop): Fix pretty printing of a SCoP.
834 2009-10-15 Sebastian Pop <sebastian.pop@amd.com>
836 * doc/passes.texi: Document the Graphite infrastructure.
838 2009-10-15 Sebastian Pop <sebastian.pop@amd.com>
840 * graphite-sese-to-poly.c (insert_copyin): Use gsi_insert_seq_on_edge.
841 (rewrite_commutative_reductions_out_of_ssa): Call gsi_commit_edge_inserts,
842 and check the SSA representation.
844 * gfortran.dg/graphite/id-18.f90: New, reduced from PR41193.
846 2009-10-15 Sebastian Pop <sebastian.pop@amd.com>
848 * gcc.dg/graphite/pr40157.c: Use -floop-block as reported in the PR.
850 2009-10-14 Sebastian Pop <sebastian.pop@amd.com>
852 * gcc.dg/graphite/interchange-11.c: New.
854 2009-10-14 Sebastian Pop <sebastian.pop@amd.com>
856 * gcc.dg/graphite/interchange-8.c: Enable loop interchange.
858 2009-10-14 Sebastian Pop <sebastian.pop@amd.com>
860 * gcc.dg/graphite/graphite.exp (DEFAULT_CFLAGS_GRAPHITE_BLOCK):
861 Add -fno-loop-strip-mine and -fno-loop-interchange.
862 (DEFAULT_FLAGS_GRAPHITE_INTERCHANGE): Add -fno-loop-block and
863 -fno-loop-strip-mine.
864 * gfortran.dg/graphite/graphite.exp: Same.
866 2009-10-14 Sebastian Pop <sebastian.pop@amd.com>
868 * gcc.dg/graphite/graphite.exp (DEFAULT_CFLAGS_GRAPHITE_BLOCK):
869 Renamed DEFAULT_FLAGS_GRAPHITE_BLOCK.
870 (DEFAULT_CFLAGS_GRAPHITE_IDENTITY): Renamed
871 DEFAULT_FLAGS_GRAPHITE_IDENTITY.
872 (DEFAULT_CFLAGS_GRAPHITE_INTERCHANGE): Renamed
873 DEFAULT_FLAGS_GRAPHITE_INTERCHANGE.
874 (DEFAULT_CFLAGS_GRAPHITE_SCOP): Renamed
875 DEFAULT_FLAGS_GRAPHITE_SCOP.
876 (DEFAULT_CFLAGS_RUN_ID): Renamed DEFAULT_FLAGS_RUN_ID.
877 (DEFAULT_CFLAGS_GRAPHITE): Renamed DEFAULT_FLAGS_GRAPHITE.
879 2009-10-14 Sebastian Pop <sebastian.pop@amd.com>
881 * graphite-poly.c (pbb_number_of_iterations_at_time): Cleanup comments.
883 2009-10-14 Konrad Trifunovic <konrad.trifunovic@gmail.com>
884 Sebastian Pop <sebastian.pop@amd.com>
886 * graphite-interchange.c (build_linearized_memory_access): Pass an
888 (memory_stride_in_loop): Include transform scattering in the
889 access functions to be able to querry the strides in the
891 (pbb_interchange_loop_depths): Interchange the psct_dynamic_dim,
892 not the psct_iterator_dim.
894 2009-10-14 Sebastian Pop <sebastian.pop@amd.com>
896 * graphite-blocking.c (pbb_do_strip_mine): Removed.
897 (lst_do_strip_mine_loop): New.
898 (lst_do_strip_mine): New.
899 (scop_do_strip_mine): Call lst_do_strip_mine.
900 * graphite-poly.h (lst_add_loop_under_loop): New.
901 (lst_find_first_pbb): New.
903 2009-10-14 Sebastian Pop <sebastian.pop@amd.com>
905 * graphite-poly.c (loop_to_lst): Fix LST creation.
907 2009-10-14 Tobias Grosser <grosser@fim.uni-passau.de>
909 * testsuite/gcc.dg/graphite/id-15.c: (8 * 8) replaced with
910 sizeof(unsigned long) to make it run on 32bit systems.
912 2009-10-14 Tobias Grosser <grosser@fim.uni-passau.de>
914 * testsuite/gcc.dg/graphite/run-id-1.c: Use smaller matrix to not
917 2009-10-14 Ramakrishna Upadrasta <Ramakrishna.Upadrasta@inria.fr>
919 * graphite-sese-to-poly.c (write_alias_graph_to_ascii_dimacs): Fix
921 (write_alias_graph_to_ascii_dot): New.
922 (write_alias_graph_to_ascii_ecc): Ditto.
923 (partition_drs_to_sets): Add testing of optimality of current method
924 which assigns alias numbers according to DFS Comopnent number. used
925 as heuristic for the upcoming ECC algorithm.
926 (build_scop_drs): Write to file also with the ecc and dot format.
928 2009-10-13 Sebastian Pop <sebastian.pop@amd.com>
930 * gfortran.dg/graphite/interchange-1.f: XFail.
932 2009-10-13 Sebastian Pop <sebastian.pop@amd.com>
934 * graphite.c (graphite_initialize): Do not handle functions with
935 more than 100 basic blocks.
937 2009-10-13 Sebastian Pop <sebastian.pop@amd.com>
939 * graphite-blocking.c (pbb_do_strip_mine): Use
940 PARAM_LOOP_BLOCK_TILE_SIZE.
942 2009-10-13 Sebastian Pop <sebastian.pop@amd.com>
944 * graphite-poly.c (dot_lst_1): New.
946 * graphite-poly.h (dot_lst): Declared.
948 2009-10-13 Sebastian Pop <sebastian.pop@amd.com>
950 * graphite-dependences.c (dot_deps_stmt_1): New.
951 (dot_deps_stmt): New.
952 * graphite-dependences.h (dot_deps_stmt): Declared.
954 2009-10-09 Sebastian Pop <sebastian.pop@amd.com>
956 * graphite-sese-to-poly.c (rewrite_cross_bb_scalar_dependence): Do
957 not replace cross BB scalar dependences ending on PHI nodes.
958 (rewrite_cross_bb_scalar_deps): Filter out GIMPLE_PHI nodes.
960 2009-10-09 Sebastian Pop <sebastian.pop@amd.com>
962 * graphite-poly.c (apply_poly_transforms): Implement the high
963 level driver for flag_loop_block.
964 * tree-ssa-loop.c (gate_graphite_transforms): Remove call to sorry for
967 * gcc.dg/graphite/graphite.exp (DEFAULT_CFLAGS_GRAPHITE_BLOCK): Add
969 * gfortran.dg/graphite/graphite.exp (DEFAULT_CFLAGS_GRAPHITE_BLOCK):
972 2009-10-09 Sebastian Pop <sebastian.pop@amd.com>
974 * graphite-poly.h (lst_find_pbb): New.
975 (find_lst_loop): New.
977 2009-10-09 Sebastian Pop <sebastian.pop@amd.com>
979 * graphite-poly.c (new_scop): Remove init of SCOP_DEP_GRAPH.
980 * graphite-poly.h (struct scop): Remove dep_graph field.
981 (SCOP_DEP_GRAPH): Removed.
983 2009-10-09 Sebastian Pop <sebastian.pop@amd.com>
985 * graphite-poly.h (copy_lst): Do full copy of LST.
987 2009-10-07 Sebastian Pop <sebastian.pop@amd.com>
989 * graphite-sese-to-poly.c (reduction_phi_p): Call remove_invariant_phi
990 when the loop stride is zero.
992 * gcc.dg/graphite/id-16.c: New.
994 2009-10-06 Sebastian Pop <sebastian.pop@amd.com>
996 * graphite-dependences.c (reduction_dr_1): New.
997 (reduction_dr_p): New.
998 (graphite_legal_transform_dr): Call reduction_dr_p.
999 (reduction_ddr): Renamed reduction_ddr_p.
1000 * graphite-poly.h (same_pdr_p): New.
1001 (number_of_write_pdrs): New.
1002 * graphite-sese-to-poly.c (nb_data_writes_in_bb): New.
1003 (split_reduction_stmt): Do not split reduction statements
1004 when there are no writes to memory.
1005 (translate_scalar_reduction_to_array_for_stmt): Insert the
1006 memory reduction statement just after the scalar reduction statement.
1008 * gcc.dg/graphite/interchange-10.c: Updated to differ from interchange-4.c.
1010 * gcc.dg/graphite/interchange-3.c: Un-XFAIL-ed.
1011 * gcc.dg/graphite/interchange-4.c: Un-XFAIL-ed.
1013 2009-10-06 Sebastian Pop <sebastian.pop@amd.com>
1015 * graphite-interchange.c (lst_apply_interchange): New.
1016 (lst_interchange_profitable_p): New.
1017 (lst_try_interchange_loops): New.
1018 (lst_try_interchange): New.
1019 (lst_do_interchange): New.
1020 (pbb_do_interchange): Removed.
1021 (scop_do_interchange): Call lst_do_interchange.
1023 2009-10-06 Sebastian Pop <sebastian.pop@amd.com>
1025 * graphite-poly.c (print_scop): Print SCOP_ORIGINAL_SCHEDULE and
1026 SCOP_TRANSFORMED_SCHEDULE.
1031 * graphite-poly.h (lst_p): New.
1034 (LST_LOOP_FATHER): New.
1037 (scop_to_lst): Declared.
1038 (print_lst): Declared.
1039 (debug_lst): Declared.
1040 (new_lst_loop): New.
1041 (new_lst_stmt): New.
1044 (lst_dewey_number): New.
1045 (struct scop): Add original_schedule and transformed_schedule fields.
1046 (SCOP_ORIGINAL_SCHEDULE): New.
1047 (SCOP_TRANSFORMED_SCHEDULE): New.
1048 * graphite-sese-to-poly.c (build_poly_scop): Call scop_to_lst.
1050 2009-10-05 Sebastian Pop <sebastian.pop@amd.com>
1052 * graphite-dependences.c (reduction_ddr): New.
1053 (graphite_legal_transform_bb): Call reduction_ddr.
1054 * graphite-poly.c (new_poly_bb): Pass a new bool parameter.
1055 Initialize PBB_IS_REDUCTION.
1056 * graphite-poly.h (struct poly_bb): New bool field is_reduction.
1057 (PBB_IS_REDUCTION): New.
1058 (new_poly_bb): Update declaration.
1059 * graphite-scop-detection.h (build_scop_bbs): Removed.
1060 (nb_reductions_in_loop): Removed.
1061 * graphite-sese-to-poly.c (try_generate_gimple_bb): Pass a sbitmap
1062 parameter for reductions.
1063 (try_generate_gimple_bb): Update call to new_poly_bb.
1064 (build_scop_bbs_1): Same.
1065 (build_scop_bbs): Same.
1066 (gsi_for_phi_node): New.
1067 (scalar_close_phi_node_p): Remove gcc_assert.
1068 (split_reduction_stmt): New.
1069 (is_reduction_operation_p): New.
1070 (phi_contains_arg): New.
1071 (follow_ssa_with_commutative_ops): New.
1072 (detect_commutative_reduction_arg): New.
1073 (detect_commutative_reduction_assign): New.
1074 (follow_inital_value_to_phi): New.
1075 (edge_initial_value_for_loop_phi): New.
1076 (initial_value_for_loop_phi): New.
1077 (detect_commutative_reduction): New.
1078 (translate_scalar_reduction_to_array_for_stmt): New.
1079 (insert_copyout): New.
1080 (insert_copyin): New.
1081 (translate_scalar_reduction_to_array): New.
1082 (rewrite_commutative_reductions_out_of_ssa_close_phi): New.
1083 (rewrite_commutative_reductions_out_of_ssa_loop): New.
1084 (rewrite_commutative_reductions_out_of_ssa): New.
1085 (build_poly_scop): Call rewrite_commutative_reductions_out_of_ssa.
1086 * sese.h (split_region_for_bb): New.
1088 * gcc.dg/graphite/graphite.exp (DEFAULT_CFLAGS_GRAPHITE_BLOCK): Add -ffast-math.
1089 * gcc.dg/graphite/interchange-1.c: Fix format.
1090 * gcc.dg/graphite/interchange-10.c: New.
1092 2009-10-05 Sebastian Pop <sebastian.pop@amd.com>
1094 * graphite-sese-to-poly.c (insert_out_of_ssa_copy): Remove
1097 2009-10-05 Sebastian Pop <sebastian.pop@amd.com>
1099 * graphite-sese-to-poly.c (scev_analyzable_p): New.
1100 (rewrite_cross_bb_scalar_dependence): New.
1101 (rewrite_cross_bb_scalar_deps): New.
1102 (rewrite_reductions_out_of_ssa): Use bb_in_sese_p.
1103 Call rewrite_cross_bb_scalar_deps.
1105 2009-10-05 Sebastian Pop <sebastian.pop@amd.com>
1107 * graphite-sese-to-poly.c (gsi_for_ssa_name_def): Removed.
1108 (insert_out_of_ssa_copy): Directly use gsi_after_labels and
1111 2009-10-05 Sebastian Pop <sebastian.pop@amd.com>
1113 * graphite-clast-to-gimple.c (build_cloog_prog): Use pbb_index.
1114 * graphite-interchange.c (pbb_do_interchange): Same.
1115 * graphite-poly.c (print_scattering_function): Same.
1117 * graphite-poly.h (pbb_loop): New.
1118 * graphite-sese-to-poly.c (create_linear_expr_from_tree): Use pbb_loop.
1120 2009-09-27 Sebastian Pop <sebastian.pop@amd.com>
1122 * graphite-scop-detection.c (limit_scops): Do not build poly_bbs.
1124 2009-09-27 Sebastian Pop <sebastian.pop@amd.com>
1126 * graphite-sese-to-poly.c (partition_drs_to_sets): Drs is not modified,
1127 so don't pass a pointer to it.
1128 (build_alias_set_for_drs): Same.
1129 (build_base_obj_set_for_drs): Same.
1130 (build_scop_drs): Same.
1132 2009-09-26 Li Feng <nemokingdom@gmail.com>
1134 * graphite-sese-to-poly.c (build_scop_drs): Disable writing to file
1135 the alias graph of data references.
1137 2009-09-25 Li Feng <nemokingdom@gmail.com>
1139 * graphite-sese-to-poly.c (write_alias_graph_to_ascii_dimacs): New.
1140 (build_scop_drs): When debugging, write the alias graph to file,
1141 otherwise, should be disabled.
1143 2009-09-17 Sebastian Pop <sebastian.pop@amd.com>
1145 * graphite-scop-detection.c (stmt_simple_memref_p): Removed.
1146 (is_simple_operand): Remove call to stmt_simple_memref_p.
1147 (stmt_simple_for_scop_p): Update call to is_simple_operand.
1149 2009-09-17 David Edelsohn <edelsohn@gnu.org>
1151 * testsuite/gcc.dg/graphite/interchange-mvt.c: New File.
1152 * testsuite/gcc.dg/graphite/scop-dsyrk.c: New File.
1153 * testsuite/gcc.dg/graphite/scop-dsyr2k.c: New File.
1154 * testsuite/gcc.dg/graphite/scop-mvt.c: New File.
1155 * testsuite/gcc.dg/graphite/scop-sor.c: New File.
1157 2009-09-17 Li Feng <nemokingdom@gmail.com>
1160 * graphite-dependences.c (poly_drs_may_alias_p): Adjust definition.
1161 (pddr_original_scattering): Make sure 2 pdr2 in the same base object set.
1162 (graphite_carried_dependence_level_k): Ditto.
1163 * graphite-poly.c (new_poly_dr): Add init of PDR_BASE_OBJECT_SET.
1164 * graphite-poly.h (struct poly_dr): Add member dr_base_object_set.
1165 (new_poly_dr): Adjust declaration.
1166 * graphite-sese-to-poly.c (free_data_refs_aux): New.
1167 (free_gimple_bb): Added free_data_refs_aux.
1168 (build_poly_dr): Add dr_base_object_set.
1169 (partition_drs_to_sets): New.
1170 (dr_same_base_object_p): New.
1171 (build_alias_set_for_drs): New.
1172 (build_base_object_set_for_drs): New.
1173 (build_scop_drs): Add build_base_obj_set_for_drs.
1174 * graphite-sese-to-poly.h: Added #define for alias set number index and
1175 base object set index.
1176 * libgomp/testsuite/libgomp.graphite/force-parallel-6.c: Refine tests.
1177 * libgomp/testsuite/libgomp.graphite/pr4118.c: New.
1179 2009-09-16 Alexander Monakov <amonakov@ispras.ru>
1181 * graphite-sese-to-poly.c (pdr_add_data_dimensions): Add bounds only
1182 for ARRAY_REFs. Use array_ref_{low,up}_bound to determine bounds.
1184 2009-09-14 Sebastian Pop <sebastian.pop@amd.com>
1186 * graphite-sese-to-poly.c (struct irp_data): Removed.
1187 (idx_record_params): Removed.
1188 (find_params_in_bb): Scan for parameters the access functions; don't
1189 parse the tree representation.
1191 2009-09-14 Sebastian Pop <sebastian.pop@amd.com>
1193 * tree-ssa-loop.c (gate_graphite_transforms): Disable Graphite
1194 passes at -O1 and below.
1196 2009-09-14 Sebastian Pop <sebastian.pop@amd.com>
1198 * graphite-blocking.c: Fix order of includes: tree-chrec.h, then
1199 tree-scalar-evolution.h, and then tree-data-ref.h.
1200 * graphite-clast-to-gimple.c: Same.
1201 * graphite-dependences.c: Same.
1202 * graphite-interchange.c: Same.
1203 * graphite-poly.c: Same.
1204 * graphite-scop-detection.c: Same.
1205 * graphite-sese-to-poly.c: Same.
1207 * lambda-code.c: Same.
1208 * matrix-reorg.c: Same.
1209 * tree-data-ref.c: Same.
1210 * tree-if-conv.c: Same.
1211 * tree-loop-distribu: Same.: Same.
1212 * tree-loop-linear.c: Same.
1213 * tree-parloops.c: Same.
1214 * tree-predcom.c: Same.
1215 * tree-vect-patterns.c: Same.
1217 2009-09-02 Sebastian Pop <sebastian.pop@amd.com>
1219 Partially revert the previous patch, except the following.
1220 * tree-scalar-evolution.c (instantiate_scev_not): Adapted to pass
1221 as parameters the operands of the not expression.
1223 2009-09-01 Sebastian Pop <sebastian.pop@amd.com>
1225 * tree-scalar-evolution.c (instantiate_scev_assign): New.
1226 Do not call analyze_scalar_evolution on assignments.
1227 (instantiate_scev_phi): Call analyze_scalar_evolution.
1228 (instantiate_scev_name): Call instantiate_scev_assign and
1229 instantiate_scev_phi.
1230 (instantiate_scev_not): Adapted to pass as parameters the operands
1231 of the not expression.
1233 2009-09-01 Sebastian Pop <sebastian.pop@amd.com>
1235 * tree-scalar-evolution.c (instantiate_scev_binary): Adapted
1236 to pass as parameters the operands of the binary expression.
1238 2009-09-01 Sebastian Pop <sebastian.pop@amd.com>
1240 * tree-scalar-evolution.c (instantiate_scev_bitnot): Renamed
1241 instantiate_scev_not. Handle NEGATE_EXPR.
1242 (instantiate_scev_r): Handle NEGATE_EXPR.
1244 2009-09-01 Sebastian Pop <sebastian.pop@amd.com>
1246 * tree-scalar-evolution.c (instantiate_scev_1): Renamed
1248 (instantiate_scev_r): Move code in instantiate_scev_2
1249 and instantiate_scev_1.
1251 2009-09-01 Sebastian Pop <sebastian.pop@amd.com>
1253 * tree-scalar-evolution.c (instantiate_scev_3): New.
1254 (instantiate_scev_1): Move code in instantiate_scev_3.
1256 2009-09-01 Sebastian Pop <sebastian.pop@amd.com>
1258 * tree-scalar-evolution.c (instantiate_scev_poly): New.
1259 (instantiate_scev_1): Move code in instantiate_scev_poly.
1261 2009-09-01 Sebastian Pop <sebastian.pop@amd.com>
1263 * tree-scalar-evolution.c (instantiate_scev_bitnot): New.
1264 (instantiate_scev_1): Move code in instantiate_scev_bitnot.
1266 2009-09-01 Sebastian Pop <sebastian.pop@amd.com>
1268 * tree-scalar-evolution.c (instantiate_scev_convert): New.
1269 (instantiate_scev_1): Move code in instantiate_scev_convert.
1271 2009-09-01 Sebastian Pop <sebastian.pop@amd.com>
1273 * tree-scalar-evolution.c (instantiate_scev_binary): New.
1274 (instantiate_scev_1): Move code in instantiate_scev_binary.
1276 2009-09-01 Sebastian Pop <sebastian.pop@amd.com>
1278 * tree-scalar-evolution.c (instantiate_scev_name): New.
1279 (instantiate_scev_1): Move code in instantiate_scev_name.
1281 2009-08-28 Sebastian Pop <sebastian.pop@amd.com>
1283 * Merge from mainline (150992:151171).
1285 2009-08-25 Sebastian Pop <sebastian.pop@amd.com>
1287 * graphite-dependences.c (graphite_legal_transform_bb): Call
1288 pbb_remove_duplicate_pdrs.
1289 * graphite-poly.c (can_collapse_pdr): Removed.
1290 (pdr_find_duplicate): Removed.
1291 (can_collapse_pdrs): New.
1292 (pbb_remove_duplicate_pdrs): New.
1293 (new_poly_dr): Do not look for duplicates.
1294 * graphite-poly.h (struct poly_bb): New field pdr_duplicates_removed.
1295 (PBB_PDR_DUPLICATES_REMOVED): New.
1296 (pbb_remove_duplicate_pdrs): Declared.
1298 2009-08-25 Sebastian Pop <sebastian.pop@amd.com>
1300 * graphite-interchange.c (pbb_interchange_profitable_p): Adjust
1301 the strides by multiplying by PDR_NB_REFS.
1302 * graphite-poly.c (can_collapse_pdr): New.
1303 (pdr_find_duplicate): New.
1304 (new_poly_dr): Call pdr_find_duplicate. Collapse duplicate PDRs.
1305 Initialize PDR_NB_REFS.
1306 * graphite-poly.h (struct poly_dr): Add field nb_refs.
1308 (new_poly_dr): Number of subscripts is a graphite_dim_t.
1310 2009-08-25 Sebastian Pop <sebastian.pop@amd.com>
1312 Revert one of the previous commits:
1313 * graphite-dependences.c (graphite_legal_transform_bb): Avoid
1314 the computation of symmetric data dependence relations.
1315 (dependency_between_pbbs_p): Same.
1317 2009-08-25 Sebastian Pop <sebastian.pop@amd.com>
1320 * graphite-poly.c (apply_poly_transforms): Remove legality test before
1323 2009-08-25 Sebastian Pop <sebastian.pop@amd.com>
1325 * graphite-dependences.c (pddr_original_scattering): Return NULL
1326 for read-read dependence relations.
1327 * graphite-poly.h (enum poly_dr_type): Fix comment.
1330 (pdr_may_write_p): New.
1332 2009-08-25 Sebastian Pop <sebastian.pop@amd.com>
1334 * graphite-poly.h (enum POLY_DR_TYPE): Renamed poly_dr_type.
1335 (struct poly_dr): Same.
1336 (new_poly_dr): Same.
1337 * graphite-poly.c (new_poly_dr): Same.
1339 2009-08-25 Konrad Trifunovic <konrad.trifunovic@gmail.com>
1340 Sebastian Pop <sebastian.pop@amd.com>
1342 * graphite-blocking.c (pbb_strip_mine_loop_depth): Renamed
1343 pbb_strip_mine_time_depth. Changed the implementation so that
1344 transformation is expressed as a transformation on
1345 time (scatttering) dimensions. Also, ensures that the 2d+1
1346 scheduling format is preserved.
1347 (pbb_strip_mine_profitable_p): Profitability is based on the
1348 iteration number of a given time (scattering) dimension,
1349 and not on a original loop depth dimension.
1350 (pbb_strip_mine): Call pbb_number_of_iterations_at_time.
1351 (pbb_do_strip_mine): Call psct_dynamic_dim.
1352 * graphite-poly.c (pbb_number_of_iterations_at_time): New.
1353 * graphite-poly.h (pbb_number_of_iterations_at_time): Declared.
1354 (pbb_nb_dynamic_scattering_transform): New.
1355 (psct_dynamic_dim): New.
1357 2009-08-25 Konrad Trifunovic <konrad.trifunovic@gmail.com>
1359 * graphite-ppl.c (ppl_max_for_le): Renamed ppl_max_for_le_pointset.
1360 * graphite-ppl.h (ppl_max_for_le): Renamed ppl_max_for_le_pointset.
1361 * graphite-poly.c (pbb_number_of_iterations): Rename ppl_max_for_le.
1362 * graphite-interchange.c (build_linearized_memory_access): Same.
1363 (memory_stride_in_loop): Same.
1365 2009-08-25 Sebastian Pop <sebastian.pop@amd.com>
1367 * graphite-dependences.c (pddr_original_scattering): New.
1368 (graphite_legal_transform_dr): Call pddr_original_scattering.
1371 * graphite-dependences.h (dot_deps): Declared.
1372 * graphite-poly.c (new_poly_dr): Initialize PDR_ID.
1373 (print_pdr): Print PDR_ID.
1374 * graphite-poly.h (struct poly_dr): Add field id.
1377 * graphite-scop-detection.c (dot_all_scops_1): Cleanup comment.
1379 2009-08-22 Sebastian Pop <sebastian.pop@amd.com>
1381 * graphite-dependences.c (graphite_carried_dependence_level_k): Do
1382 not delete the original dependence relation.
1384 2009-08-21 Sebastian Pop <sebastian.pop@amd.com>
1386 * graphite-dependences.c (graphite_legal_transform_bb): Avoid
1387 the computation of symmetric data dependence relations.
1388 (dependency_between_pbbs_p): Same.
1390 2009-08-21 Sebastian Pop <sebastian.pop@amd.com>
1392 * graphite-dependences.c (new_poly_dr_pair): Renamed new_poly_ddr.
1393 (eq_poly_dr_pair_p): Renamed eq_poly_ddr_p.
1394 (hash_poly_dr_pair_p): Renamed hash_poly_ddr_p.
1395 (free_poly_ddr): New.
1396 (pddr_is_empty): New.
1397 (dependence_polyhedron_1): Now returns a poly_ddr_p.
1398 (dependence_polyhedron): Same. Remove useless gcc_assert.
1400 (graphite_legal_transform_dr): Call pddr_is_empty and free_poly_ddr.
1401 (graphite_carried_dependence_level_k): Call pddr_is_empty.
1402 * graphite-dependences.h (enum poly_dependence_kind): New.
1403 (poly_dr_pair): Renamed poly_ddr. Added a field kind.
1404 (PDRP_SOURCE): Renamed PDDR_SOURCE.
1405 (PDRP_SINK): Renamed PDDR_SINK.
1406 (PDRP_DDP): Renamed PDDR_DDP.
1408 (free_poly_ddr): Declared.
1409 * graphite-poly.c (new_scop): Use the new hash function names.
1410 * graphite-poly.h (struct scop): Renamed field original_pdr_pairs
1411 into original_pddrs.
1412 (SCOP_ORIGINAL_PDR_PAIRS): Renamed SCOP_ORIGINAL_PDDRS.
1414 2009-08-21 Sebastian Pop <sebastian.pop@amd.com>
1416 * Merge from mainline (150764:150992).
1418 2009-08-18 Sebastian Pop <sebastian.pop@amd.com>
1420 * cfgloopmanip.c (create_empty_loop_on_edge): Generate upper
1421 bounds with LT_EXPR to make niter analysis more precise on code
1422 generated by Graphite.
1424 2009-08-18 Sebastian Pop <sebastian.pop@amd.com>
1426 * graphite-dependences.c (graphite_legal_transform_dr): Fix formatting.
1427 (graphite_legal_transform_bb): Same.
1428 (poly_drs_may_alias_p): Same.
1430 2009-08-15 Sebastian Pop <sebastian.pop@amd.com>
1433 * graphite-ppl.c (ppl_max_for_le): Correct the use of
1434 ppl_Pointset_Powerset_C_Polyhedron_maximize.
1436 2009-08-13 Sebastian Pop <sebastian.pop@amd.com>
1438 * graphite-poly.c (print_pbb): Print PBB index.
1440 2009-08-13 Sebastian Pop <sebastian.pop@amd.com>
1442 * Merge from mainline (r150672:150764).
1444 2009-08-13 Sebastian Pop <sebastian.pop@amd.com>
1446 * graphite-interchange.c (ppl_max_for_le): Moved...
1447 * graphite-poly.c (pbb_number_of_iterations): Call ppl_max_for_le.
1448 * graphite-ppl.c (ppl_max_for_le): ... here.
1449 * graphite-ppl.h (ppl_max_for_le): Declared.
1451 2009-08-12 Sebastian Pop <sebastian.pop@amd.com>
1453 * Merge from mainline (r150372:150672).
1455 2009-08-11 Sebastian Pop <sebastian.pop@amd.com>
1458 * sese.c (convert_for_phi_arg): New.
1459 (add_guard_exit_phis): Use convert_for_phi_arg.
1461 * testsuite/gfortran.dg/graphite/id-17.f: New.
1463 2009-08-11 Sebastian Pop <sebastian.pop@amd.com>
1465 * graphite-sese-to-poly.c (pdr_add_data_dimensions): Dont add
1466 unknown subscript upper bounds.
1468 * testsuite/gcc.dg/graphite/interchange-6.c: Un-XFAIL.
1470 2009-08-11 Sebastian Pop <sebastian.pop@amd.com>
1471 Pranav Garg <pranav.garg2107@gmail.com>
1473 * graphite-interchange.c (gather_access_strides): Removed.
1474 (ppl_max_for_le): New.
1475 (build_linearized_memory_access): New.
1476 (memory_stride_in_loop): New.
1477 (pbb_interchange_profitable_p): Reimplemented.
1478 * graphite-ppl.h (ppl_new_id_map): New.
1479 (ppl_interchange): New.
1481 * testsuite/gcc.dg/graphite/interchange-6.c: XFAILed.
1483 2009-08-11 Sebastian Pop <sebastian.pop@amd.com>
1485 * graphite-interchange.c (compute_subscript): Removed.
1486 (compute_array_size_cstr): Removed.
1487 (compute_array_size_poly): Removed.
1488 (compute_array_size): Removed.
1489 (gather_access_strides_poly): Removed.
1490 (gather_access_strides): Empty.
1492 2009-08-11 Sebastian Pop <sebastian.pop@amd.com>
1494 * graphite-dependences.c (dependence_polyhedron_1): Replace
1495 pdr_nb_subscripts with PDR_NB_SUBSCRIPTS.
1496 (graphite_legal_transform_dr): Same.
1497 (graphite_carried_dependence_level_k): Same.
1498 * graphite-poly.c (new_poly_dr): Add a parameter nb_subscripts.
1499 Initialize PDR_NB_SUBSCRIPTS.
1500 (print_pdr_access_layout): Replace pdr_nb_subscripts with
1502 * graphite-poly.h (struct poly_dr): Add nb_subscripts field.
1503 (PDR_NB_SUBSCRIPTS): New.
1504 (pdr_nb_subscripts): Removed.
1505 (pdr_dim): Simplified.
1506 * graphite-sese-to-poly.c (build_poly_dr): Replace pdr_nb_subscripts
1507 with PDR_NB_SUBSCRIPTS.
1509 2009-08-11 Sebastian Pop <sebastian.pop@amd.com>
1511 * graphite-interchange.c (compute_array_size): Remove use of
1513 * graphite-poly.c (new_poly_dr): Remove argument data_container.
1514 Do not initialize PDR_DATA_CONTAINER.
1515 (print_pdr): Do not print PDR_DATA_CONTAINER.
1516 * graphite-poly.h (struct poly_dr): Remove data_container field.
1517 (PDR_DATA_CONTAINER): Removed.
1518 * graphite-sese-to-poly.c (pdr_add_data_dimensions): Remove use of
1520 (build_poly_dr): Same.
1522 2009-08-11 Sebastian Pop <sebastian.pop@amd.com>
1524 * testsuite/gcc.dg/graphite/interchange-9.c: New.
1526 2009-08-05 Konrad Trifunovic <konrad.trifunovic@gmail.com>
1527 Sebastian Pop <sebastian.pop@amd.com>
1529 * graphite-dependences.c (graphite_legal_transform_dr): Work on a
1530 copy of the dependence polyhedron. Free the temporary objects.
1531 (graphite_carried_dependence_level_k): Free unused objects before
1534 * testsuite/gcc.dg/graphite/interchange-1.c: XFAILed.
1535 * testsuite/gcc.dg/graphite/interchange-2.c: XFAILed.
1536 * testsuite/gcc.dg/graphite/interchange-3.c: XFAILed.
1537 * testsuite/gcc.dg/graphite/interchange-4.c: XFAILed.
1538 * testsuite/gcc.dg/graphite/interchange-7.c: XFAILed.
1540 2009-08-05 Sebastian Pop <sebastian.pop@amd.com>
1542 * graphite-blocking.c (scop_do_strip_mine): Call store_scattering.
1543 Early return without analyzing the data dependences if no
1544 transform has been done. Call restore_scattering if the transform
1546 (graphite-interchange.c): Same.
1547 * graphite-poly.c (print_scattering_function): Test for PBB_TRANSFORMED.
1548 (graphite_read_transforms): Initialize PBB_TRANSFORMED.
1549 (apply_poly_transforms): Do not gcc_assert that
1550 the transform is legal.
1551 (new_poly_bb): Initialize PBB_TRANSFORMED, PBB_SAVED, and PBB_ORIGINAL.
1552 Do not initialize PBB_NB_SCATTERING_TRANSFORM, PBB_NB_LOCAL_VARIABLES,
1553 PBB_TRANSFORMED_SCATTERING, and PBB_ORIGINAL_SCATTERING.
1554 (free_poly_dr): Free PBB_TRANSFORMED, PBB_SAVED, and PBB_ORIGINAL.
1555 * graphite-poly.h (struct poly_scattering): New.
1556 (struct poly_bb): Add original, transformed, and saved fields.
1557 Remove transformed_scattering, original_scattering, nb_local_variables,
1558 and nb_scattering_transform fields.
1559 (PBB_ORIGINAL, PBB_TRANSFORMED, PBB_SAVED): New.
1560 (poly_scattering_new): New.
1561 (poly_scattering_free): New.
1562 (poly_scattering_copy): New.
1563 (store_scattering_pbb): New.
1564 (store_scattering): New.
1565 (restore_scattering_pbb): New.
1566 (restore_scattering): New.
1567 * graphite-sese-to-poly.c (build_pbb_scattering_polyhedrons):
1568 Initialize PBB_TRANSFORMED and PBB_ORIGINAL.
1570 2009-08-05 Sebastian Pop <sebastian.pop@amd.com>
1572 * graphite-poly.c (print_pbb): Add parentheses in the pretty print.
1575 2009-08-05 Sebastian Pop <sebastian.pop@amd.com>
1577 * Makefile.in (graphite.o): Depends on PREDICT_H.
1578 * graphite.c: Include predict.h.
1579 (graphite_finalize): Call tree_estimate_probability.
1580 * predict.c (predict_loops): Do not call scev_initialize and
1582 (tree_estimate_probability_bb): New.
1583 (tree_estimate_probability): Do not initialize loops: move that
1584 code to the driver. Call tree_estimate_probability_bb.
1585 (tree_estimate_probability_driver): New.
1586 (pass_profile): Use tree_estimate_probability_driver.
1587 * predict.h (tree_estimate_probability): Declared.
1589 2009-08-05 Sebastian Pop <sebastian.pop@amd.com>
1591 * graphite-clast-to-gimple.c (gloog): Add time to TV_GRAPHITE_CODE_GEN.
1592 * graphite-dependences.c (graphite_legal_transform): Add time to
1593 TV_GRAPHITE_DATA_DEPS.
1594 (dependency_between_pbbs_p): Same.
1595 * timevar.def (TV_GRAPHITE_DATA_DEPS, TV_GRAPHITE_CODE_GEN): New.
1597 2009-08-03 Sebastian Pop <sebastian.pop@amd.com>
1599 * Merge from mainline (r149952:150372).
1601 2009-07-28 Sebastian Pop <sebastian.pop@amd.com>
1603 * ChangeLog.graphite: Fix indenting, white spaces and 80 columns.
1604 * graphite-blocking.c: Same.
1605 * graphite-clast-to-gimple.c: Same.
1606 * graphite-dependences.c: Same.
1607 * graphite-poly.c: Same.
1608 * graphite-poly.h: Same.
1609 * graphite-ppl.c: Same.
1610 * graphite-scop-detection.c: Same.
1611 * graphite-sese-to-poly.c: Same.
1614 2009-07-28 Sebastian Pop <sebastian.pop@amd.com>
1616 * graphite-sese-to-poly.c (loop_entry_phi_arg): New.
1617 (remove_simple_copy_phi): New.
1618 (remove_invariant_phi): New.
1619 (simple_copy_phi_p): New.
1620 (reduction_phi_p): New.
1621 (gsi_for_ssa_name_def): New.
1622 (insert_out_of_ssa_copy): New.
1623 (insert_out_of_ssa_copy_on_edge): New.
1624 (create_zero_dim_array): New.
1625 (scalar_close_phi_node_p): New.
1626 (rewrite_close_phi_out_of_ssa): New.
1627 (rewrite_phi_out_of_ssa): New.
1628 (rewrite_reductions_out_of_ssa): New.
1629 (build_poly_scop): Call rewrite_reductions_out_of_ssa.
1631 * testsuite/gcc.dg/graphite/id-11.c: New.
1632 * testsuite/gcc.dg/graphite/id-15.c: New.
1633 * testsuite/gcc.dg/graphite/interchange-1.c: Un-XFAIL.
1634 * testsuite/gcc.dg/graphite/interchange-2.c: Un-XFAIL.
1635 * testsuite/gcc.dg/graphite/interchange-3.c: Un-XFAIL.
1636 * testsuite/gcc.dg/graphite/interchange-4.c: Un-XFAIL.
1637 * testsuite/gcc.dg/graphite/interchange-7.c: Un-XFAIL.
1638 * testsuite/gcc.dg/graphite/scop-matmult.c: Un-XFAIL.
1639 * testsuite/gfortran.dg/graphite/id-13.f: New.
1640 * testsuite/gfortran.dg/graphite/id-5.f: New.
1642 2009-07-28 Sebastian Pop <sebastian.pop@amd.com>
1644 * graphite-clast-to-gimple.c (graphite_loop_normal_form): Do not
1645 check that nb_reductions_in_loop is zero.
1646 * graphite-scop-detection.c (harmful_stmt_in_bb): Don't filter out
1647 reduction phi nodes.
1648 (nb_reductions_in_loop): Removed.
1649 (graphite_can_represent_loop): Do not call nb_reductions_in_loop.
1650 * graphite-sese-to-poly.c (phi_node_is_iv): Removed.
1651 (bb_contains_non_iv_scalar_phi_nodes): Removed.
1652 (scop_contains_non_iv_scalar_phi_nodes): Removed.
1653 (build_poly_scop): Do not call scop_contains_non_iv_scalar_phi_nodes.
1655 2009-07-28 Sebastian Pop <sebastian.pop@amd.com>
1657 * graphite-clast-to-gimple.c (build_cloog_prog): Do not code generate
1658 statements that have an empty iteration domain.
1659 * testsuite/gfortran.dg/graphite/id-16.f: New.
1661 2009-07-28 Sebastian Pop <sebastian.pop@amd.com>
1663 * tree-scalar-evolution.c (instantiate_scev_1): Return
1664 chrec_dont_know when the result is not above instantiate_below.
1665 * graphite-scop-detection.c (scopdet_basic_block_info): Fix formatting.
1666 * graphite-sese-to-poly.c (create_linear_expr_from_tree): Assert that
1667 the tree has a known scalar evolution.
1668 * testsuite/gfortran.dg/graphite/id-14.f: New.
1669 * testsuite/gfortran.dg/graphite/id-15.f: New.
1671 2009-07-28 Sebastian Pop <sebastian.pop@amd.com>
1673 * sese.c (rename_variables_in_stmt): Pass in an extra parameter
1675 (rename_variables): Keep inserting renames after the ones already
1678 2009-07-28 Sebastian Pop <sebastian.pop@amd.com>
1680 * graphite-sese-to-poly.c (compare_bb_depths): New.
1681 (graphite_sort_dominated_info): New.
1682 (build_scop_bbs_1): Call graphite_sort_dominated_info.
1683 (build_scop_scattering): Fix comment.
1685 2009-07-28 Sebastian Pop <sebastian.pop@amd.com>
1687 * graphite.c (graphite_finalize): Call print_loops instead of
1688 dump_function_to_file.
1689 * testsuite/gcc.dg/graphite/graphite.exp: Fix formatting.
1690 * testsuite/gcc.dg/graphite/pr35356-1.c: New. Look for the number of
1691 loops generated in the graphite output file.
1692 * testsuite/gcc.dg/graphite/pr35356-2.c: New.
1693 * testsuite/gcc.dg/graphite/pr35356-3.c: New. XFAILed for now.
1694 * testsuite/gfortran.dg/graphite/id-12.f: New.
1696 2009-07-24 Li Feng <nemokingdom@gmail.com>
1698 * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-8.c:
1701 2009-07-24 Li Feng <nemokingdom@gmail.com>
1702 Tobias Grosser <grosser@fim.uni-passau.de>
1704 * graphite-sese-to-poly.c (pdr_add_alias_set): Use data reference's
1705 alias set number build alias in ACCESSES polyhedron.
1706 (build_alias_set_for_drs): New.
1707 (build_pbb_drs): Added build_alias_set_for_drs.
1708 * graphite-dependences.c (poly_drs_may_alias_p): New.
1709 (graphite_carried_dependence_level_k): Check alias information
1710 before building polyhedron.
1712 2009-07-24 Tobias Grosser <grosser@fim.uni-passau.de>
1714 * Makefile.in (lambda-code.o): Fix formatting.
1716 2009-07-24 Tobias Grosser <grosser@fim.uni-passau.de>
1718 * Merge from mainline (r149350-149952)
1720 2009-07-18 Tobias Grosser <grosser@fim.uni-passau.de>
1722 * graphite-poly.c (apply_poly_transforms): Move strip_mine
1723 before interchange to prepare for loop blocking.
1725 2009-07-18 Tobias Grosser <grosser@fim.uni-passau.de>
1727 * graphite-poly.c (apply_poly_transforms): Add checks after every
1729 * graphite-sese-to-poly.c (build_poly_scop): Remove check, as already
1730 done in apply_poly_transforms.
1732 2009-07-17 Konrad Trifunovic <konrad.trifunovic@gmail.com>
1734 * graphite-dependences.c (build_lexicographically_gt_constraint):
1735 Replace RES parameter with *RES.
1736 (dependence_polyhedron_1): Pass an address of the parameter RES
1737 instead of value of RES.
1739 2009-07-16 Sebastian Pop <sebastian.pop@amd.com>
1741 * graphite.c (graphite_finalize): Fix comment.
1742 (graphite_transform_loops): Reset scev info after code generation
1745 2009-07-16 Sebastian Pop <sebastian.pop@amd.com>
1747 * graphite.c (graphite_finalize): Call scev_reset.
1749 2009-07-16 Sebastian Pop <sebastian.pop@amd.com>
1751 * graphite-clast-to-gimple.c (compute_cloog_iv_types): Do not create
1752 GBB_CLOOG_IV_TYPES hash table twice.
1753 * graphite-sese-to-poly.c (free_gimple_bb): Call free_data_refs.
1754 (add_condition_to_domain): Clear GMP values.
1756 2009-07-16 Sebastian Pop <sebastian.pop@amd.com>
1758 * graphite-dependences.c: Fix formatting.
1759 * graphite-poly.c (free_poly_dr): Also free PDR_DATA_CONTAINER.
1760 (pbb_number_of_iterations): Free ppl_Linear_Expression.
1761 * graphite-sese-to-poly.c: Fix formatting.
1762 * graphite.c (graphite_transform_loops): Create the hash table
1763 after the early return.
1765 2009-07-16 Sebastian Pop <sebastian.pop@amd.com>
1767 * testsuite/gcc.dg/graphite/id-14.c: New.
1768 * testsuite/gcc.dg/graphite/pr40157.c: New.
1769 * testsuite/gfortran.dg/graphite/id-11.f: New.
1771 2009-07-16 Sebastian Pop <sebastian.pop@amd.com>
1773 * graphite-sese-to-poly.c (nb_pbbs_in_loops): New.
1774 (build_poly_scop): Return false when there are no pbbs within
1775 loops to avoid to pass to cloog scops with no loops.
1777 2009-07-16 Sebastian Pop <sebastian.pop@amd.com>
1779 * graphite-sese-to-poly.c (build_pbb_scattering_polyhedrons): Avoid
1780 useless test "i % 2".
1781 (build_pbb_scattering_polyhedrons): Fix formatting.
1782 (build_poly_dr): Same.
1783 * graphite.c (graphite_transform_loops): Restructure.
1785 2009-07-14 Razya Ladelsky <razya@il.ibm.com>
1787 * tree-ssa-loop-manip.c (rewrite_phi_with_iv): Remove
1788 reduction_list parameter.
1789 (rewrite_all_phi_nodes_with_iv): Same.
1790 (canonicalize_loop_ivs): Same.
1791 * tree-parloops.c (struct brli): Removed.
1792 (build_reduction_list_info): Removed.
1793 (build_new_reduction): New.
1794 (analyze_reduction_list): Removed.
1795 (gather_scalar_reductions): Find reductions instead of phi
1796 nodes that can't be canonicalized.
1797 (try_create_reduction_list): Remove reduction_list parameter.
1798 (gen_parallel_loop): Same.
1799 (parallelize_loops): Remove analyze_reductions variable,
1800 initialization and free.
1801 Change reduction_list htab initialization to reduction_info
1802 elements instead of ssa names.
1803 Call try_create_reduction_list and gen_parallel_loop without
1804 analyzed_reduction argument.
1805 * graphite-clast-to-gimple (graphite_loop_normal_form): Call
1806 canonicalize_loop_ivs with one less argument.
1807 * tree-flow.h (canonicalize_loop_ivs): Remove one argument.
1809 2009-07-14 Konrad Trifunovic <konrad.trifunovic@gmail.com>
1811 * graphite-dependences.c (new_poly_dr_pair): New.
1812 (dependence_polyhedron): Renamed into dependence_polyhedron_1.
1813 (new_poly_dr_pair): New.
1814 (eq_poly_dr_pair_p): New.
1815 (hash_poly_dr_pair_p): New.
1816 * graphite-dependences.h (struct poly_dr_pair): New.
1817 (eq_poly_dr_pair_p): Declared.
1818 (hash_poly_dr_pair_p): Declared.
1819 * graphite-poly.c (new_scop): Initialize SCOP_ORIGINAL_PDR_PAIRS.
1820 (free_scop): Free SCOP_ORIGINAL_PDR_PAIRS.
1821 * graphite-poly.h (struct scop): Add original_pdr_pairs field.
1822 * Makefile.in (graphite-poly.o): Add dependence on
1823 graphite-dependences.h.
1825 2009-07-14 Sebastian Pop <sebastian.pop@amd.com>
1827 * graphite-scop-detection.c (graphite_can_represent_scev): Do not let
1828 polynomials of degree > 1 pass to Graphite.
1829 * tree-chrec.c (scev_is_linear_expression): Call
1830 evolution_function_is_affine_multivariate_p.
1831 * testsuite/gfortran.dg/graphite/id-10.f90: New.
1833 2009-07-14 Sebastian Pop <sebastian.pop@amd.com>
1835 * tree-scalar-evolution.c (compute_overall_effect_of_inner_loop):
1836 Instantiate scevs varying in outer loops.
1837 * testsuite/gfortran.dg/graphite/id-9.f: Correct testcase.
1839 2009-07-14 Sebastian Pop <sebastian.pop@amd.com>
1841 * graphite-sese-to-poly.c (build_loop_iteration_domains): Do not insert
1842 redundant constraint.
1844 2009-07-14 Sebastian Pop <sebastian.pop@amd.com>
1846 * testsuite/gcc.dg/graphite/graphite.exp: Fix comments.
1847 * testsuite/gfortran.dg/graphite/graphite.exp: Trigger actions
1848 based on the file names as in the C testsuite.
1849 * testsuite/gfortran.dg/graphite/block-1.f90: Fix patterns.
1850 * testsuite/gfortran.dg/graphite/block-2.f: Same.
1851 * testsuite/gfortran.dg/graphite/block-3.f90: Same.
1852 * testsuite/gfortran.dg/graphite/block-4.f90: Same.
1853 * testsuite/gfortran.dg/graphite/id-1.f90: Same.
1854 * testsuite/gfortran.dg/graphite/id-2.f90: Same.
1855 * testsuite/gfortran.dg/graphite/id-3.f90: Same.
1856 * testsuite/gfortran.dg/graphite/id-4.f90: Same.
1857 * testsuite/gfortran.dg/graphite/id-6.f: Same.
1858 * testsuite/gfortran.dg/graphite/id-9.f: Same.
1859 * testsuite/gfortran.dg/graphite/interchange-1.f: Same.
1860 * testsuite/gfortran.dg/graphite/interchange-2.f: Same.
1861 * testsuite/gfortran.dg/graphite/scop-1.f: Same.
1863 2009-07-14 Sebastian Pop <sebastian.pop@amd.com>
1865 * sese.c (expand_scalar_variables_call): New.
1866 (expand_scalar_variables_ssa_name): Handle calls in expander.
1868 2009-07-13 Sebastian Pop <sebastian.pop@amd.com>
1870 * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-6.c:
1871 Expect to see the pattern twice.
1872 * testsuite/gcc.dg/graphite/interchange-0.c: Un-XFAIL.
1873 * testsuite/gcc.dg/graphite/interchange-5.c: Same.
1874 * testsuite/gcc.dg/graphite/interchange-6.c: Same.
1876 2009-07-13 Sebastian Pop <sebastian.pop@amd.com>
1878 * testsuite/gcc.dg/graphite/id-10.c: New.
1879 * testsuite/gcc.dg/graphite/id-12.c: New.
1880 * testsuite/gfortran.dg/graphite/id-7.f: New.
1881 * testsuite/gfortran.dg/graphite/id-8.f: New.
1883 2009-07-13 Sebastian Pop <sebastian.pop@amd.com>
1885 * graphite-sese-to-poly.c (pdr_add_data_dimensions): Fix division by
1888 2009-07-13 Sebastian Pop <sebastian.pop@amd.com>
1890 * sese.c (rename_variables_in_stmt): Call fold_convert during renaming.
1892 2009-07-13 Sebastian Pop <sebastian.pop@amd.com>
1894 * sese.c (expand_scalar_variables_stmt): Avoid unnecessary expansion.
1896 2009-07-10 Sebastian Pop <sebastian.pop@amd.com>
1898 * graphite-sese-to-poly.c (pdr_add_memory_accesses): Fix order of
1899 building PDR subscripts.
1901 2009-07-10 Sebastian Pop <sebastian.pop@amd.com>
1903 * graphite-sese-to-poly.c (pdr_add_data_dimensions): Fix the
1904 computation of array sizes.
1906 2009-07-10 Sebastian Pop <sebastian.pop@amd.com>
1908 * graphite-sese-to-poly.c (add_param_constraints): Disabled.
1910 2009-07-10 Tobias Grosser <grosser@fim.uni-passau.de>
1912 * graphite-dependences.c (map_into_dep_poly, map_dr_into_dep_poly,
1913 build_pairwise_constraint, dr_equality_constraints,
1914 build_pairwise_scheduling_equality,
1915 build_pairwise_scheduling_inequality, lexicographically_gt_p,
1916 build_lexicographically_gt_constraint, dependence_polyhedron,
1917 graphite_legal_transform_dr, graphite_carried_dependence_level_k):
1918 Move from NNC_Polyhedron to C_Polyhedron.
1919 * graphite-interchange.c (compute_array_size_poly,
1920 gather_access_strides): Dito.
1921 * graphite-poly.c (apply_poly_transforms, new_poly_dr, free_poly_bb,
1922 free_scop, pbb_number_of_iterations): Dito.
1923 * graphite-poly.h (struct poly_dr, pdr_nb_subscripts, struct poly_bb,
1924 pbb_dim_iter_domain, struct scop): Dito.
1925 * graphite-ppl.c (new_Constraint_System_from_Cloog_Matrix,
1926 new_Cloog_Domain_from_ppl_Polyhedron,
1927 new_Cloog_Domain_from_ppl_Pointset_Powerset, ppl_set_coef_gmp,
1928 ppl_insert_dimensions_pointset, ppl_insert_dimensions_pointset,
1929 ppl_strip_loop, ppl_strip_loop, ppl_print_polyhedron_matrix,
1930 ppl_print_powerset_matrix, debug_ppl_polyhedron_matrix,
1931 debug_ppl_powerset_matrix, ppl_read_polyhedron_matrix): Dito.
1932 * graphite-ppl.h (ppl_Pointset_Powerset_C_Polyhedron_t,
1933 new_C_Polyhedron_from_Cloog_Matrix, ppl_print_powerset_matrix,
1934 debug_ppl_powerset_matrix, ppl_insert_dimensions_pointset): Dito.
1935 * graphite-sese-to-poly.c (build_pbb_scattering_polyhedrons,
1936 build_loop_iteration_domains, ppl_constraint_type_from_tree_code,
1937 add_condition_to_domain, add_condition_to_pbb, build_scop_context,
1938 build_scop_iteration_domain, build_poly_dr): Dito
1940 2009-07-09 Sebastian Pop <sebastian.pop@amd.com>
1942 * testsuite/gcc.dg/graphite/graphite.exp: Added a rule to execute
1944 * testsuite/gcc.dg/graphite/run-id-1.c: New.
1946 2009-07-09 Sebastian Pop <sebastian.pop@amd.com>
1948 * graphite-sese-to-poly.c (build_loop_iteration_domains): Add the
1949 positivity constraint on the symbolic number of iterations.
1951 2009-07-09 Sebastian Pop <sebastian.pop@amd.com>
1953 * graphite-sese-to-poly.c (build_loop_iteration_domains): Rewrite.
1955 2009-07-09 Sebastian Pop <sebastian.pop@amd.com>
1956 Tobias Grosser <grosser@fim.uni-passau.de>
1958 * graphite-clast-to-gimple.c (build_scop_context): Removed.
1959 (build_cloog_prog): Directly use SCOP_CONTEXT.
1960 * graphite-poly.c (new_scop): Initialize SCOP_CONTEXT.
1961 (free_scop): Free SCOP_CONTEXT.
1962 (print_scop_context): New.
1963 (print_scop): Call print_scop_context.
1964 (debug_scop_context): New.
1965 * graphite-poly.h (print_scop_context, debug_scop_context): Declared.
1966 (struct scop): Added field context.
1967 (SCOP_CONTEXT): New.
1968 * graphite-sese-to-poly.c (add_param_constraints): New.
1969 (build_scop_context): New.
1970 (build_poly_scop): Call build_scop_context.
1972 2009-07-09 Sebastian Pop <sebastian.pop@amd.com>
1974 * graphite-clast-to-gimple.c (gmp_cst_to_tree): Moved...
1975 * graphite-ppl.c (ppl_set_inhomogeneous_gmp, ppl_set_coef_gmp): New.
1976 (ppl_set_inhomogeneous, ppl_set_coef): Moved...
1977 * graphite-ppl.h: Include double-int.h and tree.h.
1978 (ppl_set_inhomogeneous_gmp, ppl_set_coef_gmp): Declared.
1979 (ppl_set_inhomogeneous, ppl_set_coef): ...here.
1980 (gmp_cst_to_tree): ...here. Reimplemented using mpz_get_double_int.
1981 (tree_int_to_gmp, ppl_set_inhomogeneous_tree, ppl_set_coef_tree): New.
1983 2009-07-09 Sebastian Pop <sebastian.pop@amd.com>
1985 * graphite-clast-to-gimple.c (clast_to_gcc_expression_red): Generate
1986 POINTER_PLUS_EXPR for pointer types.
1987 (clast_to_gcc_expression): Same.
1989 2009-07-09 Sebastian Pop <sebastian.pop@amd.com>
1991 * graphite-poly.c (print_scattering_function): Early return when
1992 PBB_TRANSFORMED_SCATTERING is not initialized.
1993 (print_pbb_domain): Early return when PBB_DOMAIN is not initialized.
1995 2009-07-08 Sebastian Pop <sebastian.pop@amd.com>
1997 * tree-parloops.c (analyze_reduction_list): Remove unused variable
2000 2009-07-08 Razya Ladelsky <razya@il.ibm.com>
2002 * tree-parloops.c (analyze_reduction_list): Change return
2004 (try_create_reduction_list): Move the call to
2005 analyze_reduction_list to the beginining.
2006 Call reduction_phi with analyzed_reductions as argument
2007 instead of reduction_list.
2009 2009-07-08 Tobias Grosser <grosser@fim.uni-passau.de>
2011 * Merge from mainline (r148296:149346)
2013 2009-07-07 Sebastian Pop <sebastian.pop@amd.com>
2015 * graphite-scop-detection.c (graphite_can_represent_init): New.
2016 (graphite_can_represent_scev): Call graphite_can_represent_init:
2017 check that the initial value does not contain multiplications of
2019 (stmt_has_simple_data_refs_p): New.
2020 (stmt_simple_for_scop_p): Call stmt_simple_for_scop_p.
2021 (is_simple_operand): Fix formatting.
2022 * graphite-sese-to-poly.c (try_generate_gimple_bb): Fix formatting.
2024 2009-07-07 Sebastian Pop <sebastian.pop@amd.com>
2026 * testsuite/gcc.dg/graphite/id-13.c: New.
2027 * graphite-sese-to-poly.c (graphite_stmt_p): Do not call
2028 analyze_scalar_evolution, use scalar_evolution_in_region.
2029 (scan_tree_for_params_right_scev): Add extra assert.
2030 (parameter_index_in_region_1): Split from parameter_index_in_region.
2031 (idx_record_params): Use scalar_evolution_in_region.
2032 (find_params_in_bb): Same.
2033 (find_scop_parameters): Same.
2034 (build_loop_iteration_domains): Same.
2035 (create_linear_expr_from_tree): Same.
2036 * sese.c (scalar_evolution_in_region): New.
2037 * sese.h (scalar_evolution_in_region): Declared.
2038 (defined_in_sese_p): New.
2039 * tree-scalar-evolution.c (compute_overall_effect_of_inner_loop): Not
2041 * tree-scalar-evolution.h (compute_overall_effect_of_inner_loop):
2044 2009-07-07 Sebastian Pop <sebastian.pop@amd.com>
2046 * Makefile.in: Replace dependences on tree-chrec.h with SCEV_H.
2047 TREE_DATA_REF_H also implies SCEV_H.
2049 2009-07-07 Sebastian Pop <sebastian.pop@amd.com>
2051 * graphite-poly.c (print_scop_params): New.
2052 (print_scop): Call print_scop_params.
2053 (debug_scop_params): New.
2054 * graphite-poly.h (print_scop_params, debug_scop_params): Declared.
2056 2009-07-07 Li Feng <nemokingdom@gmail.com>
2058 * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-4.c: New.
2059 * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-5.c: New.
2060 * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-6.c: New.
2061 * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-7.c: New.
2062 * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-8.c: New.
2063 * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-9.c: New.
2065 2009-07-07 Li Feng <nemokingdom@gmail.com>
2067 * graphite-clast-to-gimple.c (mark_loops_parallel): Dump information
2068 for dependency checking part.
2069 * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-1.c: Add
2070 tests for dependency checking.
2071 * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-2.c: Ditto.
2072 * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-3.c: Ditto.
2073 * testsuite/gcc.dg/graphite/graphite_autopar/graphite_autopar.exp: Add
2074 flag -fdump-tree-graphite-all for autopar testsuites.
2076 2009-07-06 Sebastian Pop <sebastian.pop@amd.com>
2078 * Makefile.in (tree-ssa-loop-manip.o): Depends on langhooks.h.
2079 * tree-parloops.c (rewrite_phi_with_iv, rewrite_all_phi_nodes_with_iv,
2080 canonicalize_loop_ivs): Moved...
2081 * tree-ssa-loop-manip.c: ... here. Include langhooks.h.
2083 2009-07-06 Sebastian Pop <sebastian.pop@amd.com>
2085 * tree-parloops.c (try_create_reduction_list): Pass an extra
2086 argument analyzed_reductions. Call analyze_reduction_list.
2087 (gen_parallel_loop): Do not call analyze_reduction_list.
2088 (parallelize_loops): Init and finalize analyzed_reductions.
2090 2009-07-06 Li Feng <nemokingdom@gmail.com>
2092 * testsuite/gcc.dg/graphite/graphite_autopar/graphite_autopar.exp:
2093 Added flag -fno-loop-strip-mine for autopar testcase.
2095 2009-07-04 Li Feng <nemokingdom@gmail.com>
2097 * graphite-dependences.c (graphite_carried_dependence_level_k): Use
2098 transformed scattering dimension instead of unmatch orignal when
2099 calling dependence_polyhedron.
2101 2009-06-30 Sebastian Pop <sebastian.pop@amd.com>
2103 * opts.c (decode_options): Enable flag_loop_strip_mine at -O2.
2105 2009-06-30 Sebastian Pop <sebastian.pop@amd.com>
2107 * graphite-poly.c (pbb_number_of_iterations): Check for returned
2108 value 1 from ppl_Pointset_Powerset_NNC_Polyhedron_maximize.
2110 2009-06-30 Sebastian Pop <sebastian.pop@amd.com>
2112 * graphite-blocking.c (pbb_strip_mine_profitable_p): New.
2113 (pbb_do_strip_mine): Call pbb_strip_mine_profitable_p.
2114 * graphite-poly.c (pbb_number_of_iterations): New.
2115 * graphite-poly.h (pbb_number_of_iterations): Declared.
2116 (pbb_iterator_dim, pbb_parameter_dim): New.
2118 2009-06-29 Sebastian Pop <sebastian.pop@amd.com>
2120 * graphite-clast-to-gimple.c (graphite_create_new_loop): Revert the
2121 last commit on type of lower and upper bound of loops.
2123 2009-06-29 Li Feng <nemokingdom@gmail.com>
2125 * Makefile.in (graphite-clast-to-gimple.o): Added dependence on
2126 graphite-dependences.h.
2127 * graphite-clast-to-gimple.c (new_bb_pbb_def): New.
2128 (mark_bb_with_pbb): New.
2129 (get_stmtfor_depth): New.
2130 (find_pbb_via_hash): New.
2131 (dependency_in_loop_p): New.
2132 (mark_loops_parallel): New.
2133 (free_aux_in_new_loops): New.
2134 (translate_clast): Add parameter BB_PBB_MAPPING. Mark newly created
2135 bb with it's relevant pbb. Mark newly created loops. Remove mark
2136 innermost loop parallel without checking.
2137 (gloog): Add parameter BB_PBB_MAPPING.
2138 * graphite-clast-to-gimple.h (struct bb_pbb_def): New.
2139 (gloog): Change declaration.
2140 (mark_loop_parallel): Make extern.
2141 (free_aux_in_new_loops): Declare.
2142 (bb_pbb_map_hash): New.
2143 (eq_bb_pbb_map): New.
2144 * graphite.c (graphite_transform_loops): Added BB_PBB_MAPPING. Trigger
2145 auto parallelization when flag_graphite_force_parallel is set.
2146 (graphite_finalize): Added free_aux_in_new_loops.
2147 * tree-parloops.c (parallelize_loops): Only generate parallel code for
2148 the innermost loop that marked parallel. Use
2149 flag_graphite_force_parallel instead of loop->can_be_parallel.
2150 (loop_parallel_p): Move inner most checking out of function.
2152 2009-06-26 Sebastian Pop <sebastian.pop@amd.com>
2154 * graphite-clast-to-gimple.c (graphite_create_new_loop): Make the
2155 type of lower and upper bound of loops signed long int.
2157 2009-06-26 Sebastian Pop <sebastian.pop@amd.com>
2159 * cfgloopmanip.c (create_empty_loop_on_edge): Gimplify the loop exit
2160 expression outside the loop.
2162 2009-06-26 Sebastian Pop <sebastian.pop@amd.com>
2164 * gcc.dg/graphite/interchange-8.c: New.
2166 2009-06-26 Sebastian Pop <sebastian.pop@amd.com>
2168 * gcc.dg/graphite/interchange-0.c: XFailed.
2169 * gcc.dg/graphite/interchange-5.c: XFailed.
2170 * gcc.dg/graphite/interchange-6.c: XFailed.
2172 2009-06-26 Sebastian Pop <sebastian.pop@amd.com>
2174 * graphite-interchange.c (compute_array_size_poly): The end of the
2175 recursion should return 1.
2177 2009-06-26 Sebastian Pop <sebastian.pop@amd.com>
2179 * graphite-interchange.c (compute_array_size_cstr): Allow the
2180 subscript multiplier to be -1.
2181 (compute_array_size): Use PDR_DATA_CONTAINER and not PDR_ACCESSES.
2182 * graphite-poly.c (new_poly_dr): Takes an extra argument for the
2183 data_container. Initializes PDR_DATA_CONTAINER.
2184 (print_pdr_access_layout): New.
2185 (print_pdr): Call print_pdr_access_layout. Print PDR_DATA_CONTAINER.
2186 * graphite-poly.h (struct poly_dr): Adjust comment. Add a new field
2188 (PDR_DATA_CONTAINER): New.
2189 (new_poly_dr): Update declaration.
2190 * graphite-sese-to-poly.c (pdr_add_data_dimensions): New.
2191 (build_poly_dr): Call pdr_add_data_dimensions.
2193 2009-06-26 Sebastian Pop <sebastian.pop@amd.com>
2195 * graphite-poly.h (struct poly_dr): Fix comment.
2196 * graphite-sese-to-poly.c (pdr_add_alias_set): New.
2197 (pdr_add_memory_accesses): New.
2198 (build_poly_dr): Call pdr_add_memory_accesses and pdr_add_alias_set.
2200 2009-06-26 Sebastian Pop <sebastian.pop@amd.com>
2202 * graphite-poly.c (print_pdrs, debug_pdrs): New.
2203 (print_pbb): Add call to print_pdrs.
2204 * graphite-poly.h (print_pdrs, debug_pdrs): Declared.
2206 2009-06-24 Konrad Trifunovic <konrad.trifunovic@gmail.com>
2207 Li Feng <nemokingdom@gmail.com>
2209 * graphite-dependences.c (graphite_carried_dependence_level_k): New.
2210 (dependency_between_pbbs_p): New.
2211 (lexicographically_gt_p): Assure !empty_p before polyhedron
2212 intersection assign.
2213 (build_lexicographically_gt_constraint): Correct lexicographically
2215 * graphite-dependences.h: New.
2216 * Makefile.in (graphite-dependences.o): Add graphite-dependences.h.
2218 2009-06-24 Sebastian Pop <sebastian.pop@amd.com>
2220 * graphite-clast-to-gimple.c (print_clast_stmt): New.
2221 (gloog): Print to dump_file the generated clast.
2222 * graphite-clast-to-gimple.h (print_clast_stmt): Declared.
2223 * graphite-interchange.c (pbb_do_interchange): Fix dump formatting.
2225 2009-06-24 Sebastian Pop <sebastian.pop@amd.com>
2227 * graphite-poly.c (extend_scattering): Increment
2228 PBB_NB_LOCAL_VARIABLES by the number of added dimensions.
2230 2009-06-24 Sebastian Pop <sebastian.pop@amd.com>
2232 * graphite-interchange.c (compute_array_size_poly): Added exit of
2233 recursion condition. Continue iterating even after the first equality.
2234 (compute_array_size): Same.
2236 2009-06-24 Li Feng <nemokingdom@gmail.com>
2238 * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-1.c: Update
2239 -fdump-tree-final_cleanup to -fdump-tree-optimized.
2240 * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-2.c: Ditto.
2241 * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-3.c: Ditto.
2242 * testsuite/gcc.dg/graphite/graphite_autopar/graphite_autopar.exp: Ditto.
2244 2009-06-23 Sebastian Pop <sebastian.pop@amd.com>
2246 * sese.c (expand_scalar_variables_stmt): Expand scalar variables
2247 only when the use verifies is_gimple_reg.
2249 2009-06-23 Sebastian Pop <sebastian.pop@amd.com>
2251 * graphite-clast-to-gimple.c (build_cloog_prog): Fix memory corruption.
2252 Allocate scaldims after call to unify_scattering_dimensions.
2254 2009-06-23 Sebastian Pop <sebastian.pop@amd.com>
2256 * graphite-clast-to-gimple.c (translate_clast): Fix memory leak.
2258 2009-06-23 Sebastian Pop <sebastian.pop@amd.com>
2259 Albert Cohen <albert.cohen@inria.fr>
2261 * graphite-blocking.c (pbb_strip_mine_loop_depth): Do not use local
2262 variables for the strip mining.
2264 2009-06-23 Sebastian Pop <sebastian.pop@amd.com>
2265 Pranav Garg <pranav.garg2107@gmail.com>
2267 * Makefile.in (OBJS-common): Added graphite-blocking.o.
2268 (graphite-sese-to-poly.o): Moved down to be in lexicographical order.
2269 (graphite-blocking.o): New rule.
2270 (graphite-poly.o, graphite-ppl.o): Moved to be in lexicographical order.
2271 * graphite-blocking.c: New.
2272 * graphite-poly.c (apply_poly_transforms): Call scop_do_strip_mine for
2273 flag_loop_strip_mine.
2274 (psct_scattering_dim_for_loop_depth): New.
2275 * graphite-poly.h (scop_do_strip_mine): Declared.
2276 (psct_add_local_variable): Increment PBB_NB_LOCAL_VARIABLES.
2277 * tree-ssa-loop.c (gate_graphite_transforms): Do not fail when using
2278 flag_loop_strip_mine.
2280 2009-06-23 Sebastian Pop <sebastian.pop@amd.com>
2282 * graphite-poly.c (extend_scattering): Avoid initializing and freeing
2283 a GMP value and a PPL coefficient at each iteration of a loop.
2285 2009-06-23 Sebastian Pop <sebastian.pop@amd.com>
2287 * graphite-dependences.c (dependence_polyhedron): Do not use
2288 pbb_nb_scattering_dims anymore. Use pbb_nb_scattering_orig and
2289 pbb_nb_scattering_transform.
2290 (graphite_legal_transform_dr): Same.
2291 * graphite-poly.c (extend_scattering): Same.
2292 (unify_scattering_dimensions): Same.
2293 (print_scattering_function): Same.
2294 (new_poly_bb): Initialize PBB_NB_SCATTERING_TRANSFORM and
2295 PBB_NB_LOCAL_VARIABLES.
2296 * graphite-poly.h (pbb_nb_scattering): Removed declaration.
2297 (struct poly_bb): Added nb_local_variables and nb_scattering_transform.
2298 (PBB_NB_LOCAL_VARIABLES, PBB_NB_SCATTERING_TRANSFORM): New.
2299 (pbb_nb_scattering_orig, pbb_nb_scattering_transform): New.
2300 (pbb_nb_scattering_dims, pbb_nb_scattering): Removed.
2301 (pbb_nb_scattering_transform): New.
2302 (pbb_nb_local_vars): Return PBB_NB_LOCAL_VARIABLES.
2303 (psco_scattering_dim): Add assert on parameters.
2304 (psct_scattering_dim): Same.
2305 (psct_scattering_dim_for_loop_depth): Declared.
2306 (psct_local_var_dim): New.
2307 (psco_iterator_dim, psco_parameter_dim): Add assert on parameters.
2308 (psct_iterator_dim, psct_parameter_dim): Same. To maintain the
2309 correct layout, call pbb_nb_local_vars.
2310 (psct_add_local_variable, psct_add_scattering_dimension): New.
2311 * graphite-sese-to-poly.c (build_pbb_scattering_polyhedrons):
2312 Initialize PBB_NB_SCATTERING_TRANSFORM.
2314 2009-06-23 Sebastian Pop <sebastian.pop@amd.com>
2316 * graphite-ppl.c (set_inhomogeneous): Renamed ppl_set_inhomogeneous.
2317 (set_coef): Renamed ppl_set_coef.
2318 * graphite-ppl.h (ppl_set_inhomogeneous, ppl_set_coef): Declared.
2320 2009-06-23 Sebastian Pop <sebastian.pop@amd.com>
2322 * graphite-dependences.c (build_pairwise_scheduling_inequality): Don't
2323 test a boolean against 1.
2324 * graphite-interchange.c (pbb_interchange_loop_depths): Do not build
2325 a new polyhedron for the PBB_TRANSFORMED_SCATTERING.
2326 (pbb_do_interchange): Returns true when a transform has been performed.
2327 (scop_do_interchange): Same.
2328 * graphite-poly.c (apply_poly_transforms): Use the return value of
2329 scop_do_interchange.
2330 * graphite-poly.h (scop_do_interchange): Update declaration.
2332 2009-06-23 Tobias Grosser <grosser@fim.uni-passau.de>
2334 * graphite-clast-to-gimple.c (gloog): Reset loop->aux right
2336 * sese.c (sese_reset_aux_in_loops): New.
2337 * sese.h (sese_reset_aux_in_loops): New.
2339 2009-06-19 Sebastian Pop <sebastian.pop@amd.com>
2341 * graphite-sese-to-poly.c (scan_tree_for_params_int): Pass in the
2342 multiplier and multiply the constant by the multiplier.
2343 (scan_tree_for_params): Bound the multiplier to its MULT_EXPR.
2344 (build_poly_dr): Do not use the multiplier to define the subscript.
2346 2009-06-19 Sebastian Pop <sebastian.pop@amd.com>
2348 * graphite-poly.c (new_poly_dr): Pass an extra argument for the
2349 compiler's data reference. Initialize PDR_CDR.
2350 (print_pdr): Call dump_data_reference.
2351 * graphite-poly.h (struct poly_dr): Rename black_box into pbb.
2352 Add compiler_dr field.
2353 (PDR_BB): Renamed PDR_PBB.
2355 * graphite-sese-to-poly.c (build_poly_dr): Pass to new_poly_dr
2356 GCC's data reference representation.
2357 * tree-data-ref.c (debug_data_references, debug_data_reference): New.
2358 * tree-data-ref.h (debug_data_references, debug_data_reference): Decl.
2360 2009-06-19 Sebastian Pop <sebastian.pop@amd.com>
2362 * graphite-poly.c (print_scattering_function): Also print the layout.
2363 * graphite-poly.h (pbb_nb_local_vars): New.
2365 2009-06-19 Sebastian Pop <sebastian.pop@amd.com>
2367 * graphite-poly.c (print_pbb_domain): Also print the layout names.
2369 2009-06-19 Sebastian Pop <sebastian.pop@amd.com>
2371 * graphite-poly.c (print_pdr, debug_pdr): New.
2372 * graphite-poly.h (print_pdr, debug_pdr): Declared.
2373 (PDR_BASE): Removed.
2375 2009-06-18 Sebastian Pop <sebastian.pop@amd.com>
2377 * gcc/testsuite/gcc.dg/graphite/interchange-{1..7}.c: New avatars of
2380 2009-06-18 Sebastian Pop <sebastian.pop@amd.com>
2382 * graphite-interchange.c (compute_subscript): Allow also -1 in the
2383 subscript identification column.
2384 (pbb_do_interchange): Print to dump_file that some loops "will be
2385 interchanged". Rely on that chain of characters in the testcases.
2386 * gcc.dg/graphite/interchange-0.c: New.
2387 * gcc.dg/graphite/graphite.exp: Iterate over the testsuite
2388 interchange-*.c files and compile them with -floop-interchange.
2390 2009-06-18 Pranav Garg <pranav.garg2107@gmail.com>
2392 * graphite-interchange.c (interchange_profitable_p): Renamed
2393 pbb_interchange_profitable_p.
2395 2009-06-18 Sebastian Pop <sebastian.pop@amd.com>
2396 Harsha Jagasia <harsha.jagasia@amd.com>
2397 Pranav Garg <pranav.garg2107@gmail.com>
2399 * graphite-interchange.c (interchange_profitable_p): Make static.
2400 (pbb_interchange_loop_depths, pbb_do_interchange,
2401 scop_do_interchange): New.
2402 * graphite-poly.c (apply_poly_transforms): Call scop_do_interchange
2403 for flag_loop_interchange.
2404 * graphite-poly.h (scop_do_interchange): Declared.
2405 * tree-ssa-loop.c (gate_graphite_transforms): Do not fail when
2406 flag_loop_interchange is used.
2408 2009-06-18 Sebastian Pop <sebastian.pop@amd.com>
2410 * graphite-dependences.c (dependence_polyhedron): Update use of
2411 pbb_nb_scattering_dims.
2412 * graphite-poly.h (pbb_nb_scattering_dims): Do not pass SCOP.
2413 (pbb_nb_scattering): Update use of pbb_nb_scattering_dims.
2414 (psco_scattering_dim, psct_scattering_dim, psco_iterator_dim,
2415 psct_iterator_dim, psco_parameter_dim, psct_parameter_dim): New.
2417 2009-06-16 Sebastian Pop <sebastian.pop@amd.com>
2419 * graphite.c: Cleanup foo.
2421 2009-06-16 Sebastian Pop <sebastian.pop@amd.com>
2423 * Merge from mainline (r143684:148293).
2424 * Disabled libpcp until it gets fixed.
2426 2009-06-05 Sebastian Pop <sebastian.pop@amd.com>
2427 Harsha Jagasia <harsha.jagasia@amd.com>
2429 * graphite-interchange.c: New.
2430 * Makefile.in (graphite-interchange.o): New.
2431 * graphite-poly.h (interchange_profitable_p): Declared.
2432 * graphite-ppl.h (value_max): New.
2434 2009-06-04 Sebastian Pop <sebastian.pop@amd.com>
2436 * graphite-dependences.c (dependence_polyhedron): Use pdr_dim.
2437 * graphite-poly.h: Fix some comments.
2441 2009-06-04 Sebastian Pop <sebastian.pop@amd.com>
2444 (pdr_accessp_nb_subscripts): Renamed pdr_nb_subscripts.
2445 (pdr_accessp_nb_iterators): Renamed pdr_dim_iter_domain.
2446 (pdr_accessp_nb_params): Renamed pdr_nb_params.
2447 (pdr_accessp_alias_set_dim): Renamed pdr_alias_set_dim.
2448 (pdr_accessp_subscript_dim): Renamed pdr_subscript_dim.
2449 (pdr_accessp_iterator_dim): Renamed pdr_iterator_dim.
2450 (pdr_accessp_param_dim): Renamed pdr_parameter_dim.
2451 (pbb_nb_loops): Renamed pbb_dim_iter_domain.
2452 * graphite-clast-to-gimple.c: Same.
2453 * graphite-dependences.c: Same.
2454 * graphite-poly.c: Same.
2455 * graphite-sese-to-poly.c: Same.
2457 2009-06-03 Sebastian Pop <sebastian.pop@amd.com>
2459 * graphite-clast-to-gimple.c (build_iv_mapping): Insert full
2460 expressions for an IV rename, as returned by clast_to_gcc_expression.
2461 (copy_renames): Rename new_name to expr.
2462 * sese.c (debug_rename_elt): Same.
2465 (sese_adjust_liveout_phis): Call force_gimple_operand before using
2466 the information from the rename map.
2467 (rename_variables_in_stmt): Same.
2468 (add_loop_exit_phis): Rename new_name to expr.
2469 (insert_loop_close_phis): Same.
2470 (add_guard_exit_phis): Same. Call force_gimple_operand.
2471 * sese.h (struct rename_map_elt): Rename new_name to expr.
2472 (new_rename_map_elt): Same.
2474 2009-06-03 Sebastian Pop <sebastian.pop@amd.com>
2476 * graphite-clast-to-gimple.c (build_iv_mapping): Use set_rename.
2477 * sese.c (set_rename): Make it extern.
2478 * sese.h (set_rename): Declared.
2480 2009-06-03 Sebastian Pop <sebastian.pop@amd.com>
2482 * graphite-poly.c (extend_scattering): Free values.
2483 * graphite-ppl.c (new_Cloog_Domain_from_ppl_Pointset_Powerset):
2485 (ppl_print_powerset_matrix): Same.
2486 * graphite-scop-detection.c (free_scops_1): New.
2487 (limit_scops): Call free_scops_1.
2488 * graphite-sese-to-poly.c (build_scop_bbs_1): Free dom.
2489 (build_poly_dr): Free PPL coefficients.
2490 * tree-parloops.c (rewrite_all_phi_nodes_with_iv): Free bbs.
2492 2009-06-02 Sebastian Pop <sebastian.pop@amd.com>
2494 * graphite-dependences.c: New.
2495 * graphite-data-ref.c: Removed.
2496 * graphite-data-ref.h: Removed.
2497 * Makefile.in (graphite-data-ref.o): Removed.
2498 (graphite-dependences.o): Added.
2499 * graphite-clast-to-gimple.c: Remove dependence on graphite-data-ref.h.
2500 * graphite-poly.c: Same.
2501 Move the data dependence testing to graphite-dependences.c.
2503 2009-05-19 Tobias Grosser <grosser@fim.uni-passau.de>
2505 * graphite-scop-detection.c (graphite_can_represent_loop): Renamed
2506 from graphite_cannot_represent_loop. Code refactored.
2507 (scopdet_basic_block_info): Call graphite_can_represent_loop.
2509 2009-05-17 Li Feng <nemokingdom@gmail.com>
2511 * testsuite/gcc.dg/graphite/graphite_autopar/graphite_autopar.exp:
2512 Cover all the testcases (not only the filtered ones).
2514 2009-05-17 Tobias Grosser <grosser@fim.uni-passau.de>
2516 * graphite-scop-detection.c (stmt_simple_for_scop_p): Remove
2517 unnecessary check. Update comments. Move check for REAL_TYPE here.
2518 (harmful_stmt_in_bb): Remove checks for conditions. This is already
2519 done in (stmt_simple_for_scop_p).
2521 2009-05-14 Tobias Grosser <grosser@fim.uni-passau.de>
2523 * graphite.c (print_global_statistics): New.
2524 (print_graphite_scop_statistic): New.
2525 (print_graphite_statistics): New.
2526 (graphite_initialize, graphite_transform_loops): Print statistics.
2527 * graphite-scop-detection (build_scops): Print statistics.
2528 (print_graphite_scop_statistics): New.
2529 (print_graphite_statistics): New.
2531 2009-05-13 Sebastian Pop <sebastian.pop@amd.com>
2533 * graphite-clast-to-gimple.c (struct clast_name_index): Removed.
2534 (debug_clast_name_index): Removed.
2535 (debug_clast_name_indexes_1): Removed.
2536 (debug_clast_name_indexes): Removed.
2537 (clast_name_index_elt_info): Removed.
2538 (eq_clast_name_indexes): Removed.
2539 (clast_name_to_index): Removed.
2540 (new_clast_name_index): Removed.
2541 (save_clast_name_index): Removed.
2542 (save_var_name): Moved...
2543 (init_sese_params_index): Removed.
2544 (clast_name_to_gcc): Remove use of name_tree.
2545 (initialize_cloog_names): Same.
2546 (gloog): Do not call init_sese_params_index.
2547 * graphite-sese-to-poly.c (save_var_name): ...here.
2548 (parameter_index_in_region): New.
2549 * sese.c (new_sese): Initialize SESE_PARAMS_NAMES.
2550 (parameter_index_in_region): Removed.
2551 (is_parameter): Remove use of name_tree.
2552 * sese.h (struct name_tree): Removed.
2553 (struct sese): Remove use of name_tree. New field params_names.
2554 (SESE_PARAMS_NAMES): New.
2555 (SESE_PARAMS): Remove duplicate.
2556 (parameter_index_in_region): Removed.
2557 (sese_nb_params): Remove use of name_tree.
2558 (struct clast_name_index): New.
2559 (new_clast_name_index): New.
2560 (clast_name_to_index): New.
2561 (save_clast_name_index): New.
2562 (debug_clast_name_index): New.
2563 (debug_clast_name_indexes_1): New.
2564 (debug_clast_name_indexes): New.
2565 (clast_name_index_elt_info): New.
2566 (eq_clast_name_indexes): New.
2568 2009-05-13 Sebastian Pop <sebastian.pop@amd.com>
2570 * graphite-clast-to-gimple.c (compute_cloog_iv_types_1): Call
2571 pbb_to_depth_to_oldiv. Remove call to oldiv_for_loop.
2572 (graphite_loop_normal_form): Do not pass region. Do not
2573 initialize SESE_OLDIVS.
2574 (build_graphite_loop_normal_form): Update call to
2575 graphite_loop_normal_form.
2576 * sese.c (debug_oldivs): Removed.
2577 (new_sese): Do not initialize SESE_OLDIVS.
2578 (free_sese): Do not free SESE_OLDIVS.
2579 (oldiv_for_loop): Removed.
2580 * sese.h (struct sese): Remove old_ivs.
2581 (SESE_OLDIVS): Removed.
2582 (oldiv_for_loop): Removed.
2584 2009-05-13 Sebastian Pop <sebastian.pop@amd.com>
2586 * graphite-clast-to-gimple.c (clast_name_to_gcc): Pass newivs,
2587 remove ivstack. Remove call to loop_iv_stack_get_iv_from_name,
2588 replaced by a call to newivs_to_depth_to_newiv.
2589 (clast_to_gcc_expression): Pass newivs, remove ivstack.
2590 (clast_to_gcc_expression_red): Same.
2591 (gcc_type_for_clast_expr): Same.
2592 (gcc_type_for_clast_eq): Same.
2593 (graphite_translate_clast_equation): Same.
2594 (graphite_create_guard_cond_expr): Same.
2595 (graphite_create_new_guard): Same.
2596 (graphite_create_new_loop): Same.
2597 (build_iv_mapping): Same.
2598 (translate_clast): Same.
2600 (loop_iv_stack_patch_for_consts): Removed. *
2601 sese.c (iv_stack_entry_is_constant): Removed.
2602 (iv_stack_entry_is_iv): Removed.
2603 (loop_iv_stack_push_iv): Removed.
2604 (loop_iv_stack_insert_constant): Removed.
2605 (loop_iv_stack_pop): Removed.
2606 (loop_iv_stack_get_iv): Removed.
2607 (loop_iv_stack_get_iv_from_name): Removed.
2608 (debug_loop_iv_stack): Removed.
2609 (free_loop_iv_stack): Removed.
2610 (loop_iv_stack_remove_constants): Removed. *
2611 sese.h (iv_stack_entry_kind): Removed.
2612 (iv_stack_entry_data_union): Removed.
2613 (iv_stack_entry_struct): Removed.
2614 (iv_stack_entry_p): Removed.
2615 (debug_oldivs, debug_loop_iv_stack, loop_iv_stack_insert_constant,
2616 loop_iv_stack_get_iv_from_name, loop_iv_stack_push_iv,
2617 loop_iv_stack_get_iv, loop_iv_stack_remove_constants,
2618 loop_iv_stack_pop, free_loop_iv_stack): Removed.
2619 (gbb_loop_at_index): Fix indenting.
2620 (gbb_loop_index): Removed.
2622 2009-05-13 Sebastian Pop <sebastian.pop@amd.com>
2624 * graphite-clast-to-gimple.c (clast_name_to_gcc): Do not use strcmp.
2625 Call clast_name_to_index.
2627 2009-05-13 Sebastian Pop <sebastian.pop@amd.com>
2629 * graphite-clast-to-gimple.c (clast_name_to_gcc): Pass region,
2630 do not pass params. Get params from SESE_PARAMS.
2631 (clast_to_gcc_expression): Same.
2632 (clast_to_gcc_expression_red): Same.
2633 (gcc_type_for_clast_eq): Same.
2634 (graphite_translate_clast_equation): Same.
2635 (graphite_create_new_loop): Same.
2636 * sese.c (rename_variables_in_stmt): Fix comment.
2638 2009-05-13 Sebastian Pop <sebastian.pop@amd.com>
2640 * graphite-clast-to-gimple.c (graphite_create_new_loop): Pass
2642 Call save_clast_name_index.
2643 (translate_clast): Pass newivs_index.
2644 (gloog): Create and free newivs_index.
2646 2009-05-13 Sebastian Pop <sebastian.pop@amd.com>
2648 * graphite-clast-to-gimple.c (clast_name_index): New structure.
2649 (clast_name_index_p): New type.
2650 (debug_clast_name_index): New.
2651 (debug_clast_name_indexes_1): New.
2652 (debug_clast_name_indexes): New.
2653 (clast_name_index_elt_info): New.
2654 (eq_clast_name_indexes): New.
2655 (clast_name_to_index): New.
2656 (new_clast_name_index): New.
2657 (save_clast_name_index): New.
2658 (init_sese_params_index): New.
2659 (gloog): Call init_sese_params_index.
2660 * graphite-clast-to-gimple.h (debug_clast_name_indexes): Declared.
2661 * sese.c (new_sese): Initialize SESE_PARAMS_INDEX.
2662 (free_sese): Free SESE_PARAMS_INDEX.
2663 * sese.h (struct sese): Add params_index.
2664 (SESE_PARAMS_INDEX): New.
2666 2009-05-13 Sebastian Pop <sebastian.pop@amd.com>
2668 * graphite-clast-to-gimple.c (newivs_to_depth_to_newiv): New.
2669 (graphite_create_new_loop): Pass the newivs vector. Push the
2670 newly created IV to newivs.
2671 (translate_clast): Pass the newivs vector.
2672 (gloog): Create and destroy the newivs vector.
2674 2009-05-13 Sebastian Pop <sebastian.pop@amd.com>
2676 * graphite-clast-to-gimple.c (pbb_to_depth_to_oldiv): New.
2677 (graphite_loop_normal_form): Initialize loop->aux with the unique
2678 IV that has been created.
2680 2009-05-13 Tobias Grosser <grosser@fim.uni-passau.de>
2682 * tree-chrec.c (evolution_function_right_is_integer_cst): Allow
2683 scev with parameters in the base part. They where forbidden
2686 2009-05-11 Li Feng <nemokingdom@gmail.com>
2688 * testsuite/gcc.dg/graphite/graphite.exp: Set different default
2689 compile options by file names.
2690 * testsuite/gcc.dg/graphite/block{0-6}.c: Remove dg-option line.
2691 * testsuite/gcc.dg/graphite/id-{1-9}.c: Ditto.
2692 * testsuite/gcc.dg/graphite/scop-{0-20}.c: Ditto.
2693 * testsuite/gcc.dg/graphite/scop-matmult.c: Ditto.
2695 2009-05-08 Li Feng <nemokingdom@gmail.com>
2697 * testsuite/gcc.dg/graphite/graphite_autopar/graphite_autopar.exp: New.
2698 * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-1.c: New.
2699 * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-2.c: New.
2700 * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-3.c: New.
2702 2009-05-07 Tobias Grosser <grosser@fim.uni-passau.de>
2704 * graphite-scop-detection (build_scops_1): Fix little bug introduced
2707 2009-05-07 Tobias Grosser <grosser@fim.uni-passau.de>
2709 * graphite-scop-detection.c (graphite_can_represent_scev): Only
2710 allow integer constant strides.
2711 (graphite_can_represent_expr): Depend on outermost_loop.
2712 (stmt_simple_memref_p, graphite_cannot_represent_loop,
2713 harmful_stmt_in_bb, is_simple_operand, stmt_simple_for_scop_p,
2714 build_scops_1): Same.
2715 (scopdet_basic_block_info): Same and insert layered SCoP
2717 (try_generate_gimple_bb): Cleanup.
2718 (build_scops): Enable data references.
2720 * testsuite/gcc.dg/graphite/id-5.c: New.
2721 * testsuite/gcc.dg/graphite/id-9.c: New.
2722 * tree-chrec.c (evolution_function_right_is_integer_cst): New.
2723 * tree-chrec.h (evolution_function_right_is_integer_cst): New.
2725 2009-05-06 Tobias Grosser <grosser@fim.uni-passau.de>
2727 * sese.c (expand_scalar_variables_ssa_name): Only build expressions,
2728 that we have not yet built for this SCoP.
2730 2009-05-06 Tobias Grosser <grosser@fim.uni-passau.de>
2732 * sese.c (expand_scalar_variables_expr): Fix expand_scalar_variables
2733 for complex numbers.
2735 2009-05-06 Tobias Grosser <grosser@fim.uni-passau.de>
2737 * graphite-ppl.c: Fix build if cloog is not available.
2739 2009-05-04 Li Feng <nemokingdom@gmail.com>
2741 * tree-parloops.c (loop_parallel_p): Remove construction of
2742 NITER and REDUCTION_LIST.
2743 (try_get_loop_niter): New.
2744 (try_create_reduction_list): New.
2745 (parallelize_loops): Bypass the failed checkings in autopar
2746 when can_be_parallel in loop structure is set to true.
2748 2009-05-01 Tobias Grosser <grosser@fim.uni-passau.de>
2750 * testsuite/gcc.dg/graphite/id-6.c: Update testcase.
2751 * testsuite/gcc.dg/graphite/scop-3.c: Dito.
2753 2009-05-01 Tobias Grosser <grosser@fim.uni-passau.de>
2755 * graphite-scop-detection.c (stmt_simple_for_scop_p):
2756 Enable EQ_EXPR and NE_EXPR again.
2758 2009-04-30 Tobias Grosser <grosser@fim.uni-passau.de>
2760 * graphite-scop-detection.c (graphite_can_represent_scev):
2761 Add check if scev is affine multivariate.
2762 (harmful_stmt_in_bb): Check if we can represent the conditions.
2763 (scopdet_basic_block_info (basic_block bb, VEC): Pass the loop to
2765 * testsuite/gcc.dg/graphite/id-7.c: New.
2767 2009-04-30 Tobias Grosser <grosser@fim.uni-passau.de>
2769 * graphite-sese-to-poly.c (bb_contains_non_iv_scalar_phi_nodes):
2770 Check all bbs in region, not only the bbs that are represented in
2772 (build_poly_scop): Add newline.
2773 * testsuite/gcc.dg/graphite/id-8.c: New.
2775 2009-04-30 Li Feng <nemokingdom@gmail.com>
2777 * cfgloop.c (alloc_loop): Initialize can_be_parallel to false
2778 when loop initialize.
2779 * cfgloop.h (struct loop): Introduce flag can_be_parallel.
2780 * common.opt: Declare flag_graphite_force_parallel.
2781 * graphite-clast-to-gimple.c (translate_clast): Mark the innermost
2783 * graphite-poly.c (apply_poly_transforms): Introduce
2784 flag_graphite_force_parallel.
2785 * tree-ssa-loop.c (gate_graphite_transforms): ditto.
2786 * toplev.c (process_options): ditto and replace a not correctly
2789 2009-04-30 Li Feng <nemokingdom@gmail.com>
2791 * graphite-clast-to-gimple.c (loop_iv_stack_patch_for_consts):
2792 Change the call of gbb_loop_at_index and/or gbb_loop_index due
2793 to the redefinition.
2794 (compute_cloog_iv_types_1): ditto.
2795 (build_iv_mapping): ditto.
2796 * graphite-sese-to-poly.c (new_gimple_bb): Remove GBB_LOOPS related
2798 (free_gimple_bb): Removed GBB_LOOPS related free part.
2799 (build_bb_loops): Removed.
2800 * sese.h (struct gimple_bb): Removed loops.
2801 (GBB_LOOPS): Removed.
2802 (gbb_loop_at_index): Instead of using GBB_LOOPS, we use sese instead.
2803 (gbb_loop_index): ditto.
2805 2009-04-24 Tobias Grosser <grosser@fim.uni-passau.de>
2807 * graphite-scop-detection.c (graphite_can_represent_scev): Do not
2808 allow non constant strides.
2809 * testsuite/gcc.dg/graphite/scop-20.c: New.
2811 2009-04-24 Sebastian Pop <sebastian.pop@amd.com>
2813 * graphite-scop-detection.c (dot_all_scops): Fix system call
2814 return value warning.
2817 2009-04-24 Sebastian Pop <sebastian.pop@amd.com>
2819 * testsuite/gcc.dg/graphite/id-6.c: Fix pattern.
2820 * testsuite/gcc.dg/graphite/scop-3.c: Same.
2822 2009-04-24 Sebastian Pop <sebastian.pop@amd.com>
2824 * graphite-poly.c (map_into_dep_poly, map_dr_into_dep_poly,
2825 build_pairwise_constraint, dr_equality_constraints,
2826 build_pairwise_scheduling_equality,
2827 build_pairwise_scheduling_inequality, lexicographically_gt_p,
2828 build_lexicographically_gt_constraint, dependence_polyhedron,
2829 graphite_legal_transform_dr, graphite_legal_transform_bb,
2830 graphite_legal_transform): New.
2831 * graphite-poly.h (graphite_legal_transform): Declared.
2832 * graphite-sese-to-poly.c (build_poly_scop): Call to
2833 graphite_legal_transform is disabled for the moment.
2835 2009-04-24 Sebastian Pop <sebastian.pop@amd.com>
2837 * graphite-poly.h (pbb_nb_scattering_dims): New.
2838 (pbb_nb_scattering): Use it.
2840 2009-04-24 Sebastian Pop <sebastian.pop@amd.com>
2842 * graphite-ppl.c (ppl_insert_dimensions_pointset): Add
2843 Pointset_Powerset version of ppl_insert_dimensions.
2844 * graphite-ppl.h (ppl_insert_dimensions_pointset): Declared.
2846 2009-04-24 Sebastian Pop <sebastian.pop@amd.com>
2848 * graphite-ppl.c (ppl_insert_dimensions): Fix formatting.
2850 2009-04-24 Sebastian Pop <sebastian.pop@amd.com>
2852 * graphite-poly.h: Fix comment.
2854 2009-04-24 Sebastian Pop <sebastian.pop@amd.com>
2856 * graphite-sese-to-poly.c (build_poly_dr): Fix data ref multiplier.
2858 2009-04-24 Tobias Grosser <grosser@fim.uni-passau.de>
2860 * sese.c (expand_scalar_variables_stmt): Only iterate over the old
2863 2009-04-24 Tobias Grosser <grosser@fim.uni-passau.de>
2865 * graphite-sese-to-poly.c (var_used_in_not_loop_header_phi_node): New.
2866 (graphite_stmt_p): Represent bbs necessary to build the phi nodes of
2869 2009-04-20 Sebastian Pop <sebastian.pop@amd.com>
2871 * graphite-scop-detection.c (stmt_simple_for_scop_p): Do not
2872 handle EQ_EXPR and NE_EXPR.
2874 2009-04-17 Tobias Grosser <grosser@fim.uni-passau.de>
2876 * graphite-poly.h (poly_dr): Fix comment.
2878 2009-04-09 Sebastian Pop <sebastian.pop@amd.com>
2879 Tobias Grosser <grosser@fim.uni-passau.de>
2881 * graphite-poly.c (new_poly_bb): Do not initialize PBB_DOMAIN
2882 with a zero dimension polyhedron.
2883 (find_scop_parameters): Move the call to scop_set_nb_params here.
2884 (build_loop_iteration_domains): Store in loop->aux the iteration
2886 (build_scop_iteration_domain): Fix PBB_DOMAIN for bbs not surrounded
2887 by any loop in scop.
2888 (build_poly_scop): Do not call scop_set_nb_params.
2890 2009-04-09 Sebastian Pop <sebastian.pop@amd.com>
2891 Tobias Grosser <grosser@fim.uni-passau.de>
2893 * graphite-sese-to-poly.c (add_condition_to_pbb): Pass code to
2894 add_condition_to_domain not GT_EXPR.
2896 2009-04-09 Tobias Grosser <grosser@fim.uni-passau.de>
2898 * graphite-ppl.c (debug_ppl_powerset_matrix): New.
2899 * graphite-ppl.h (debug_ppl_powerset_matrix): New.
2900 * graphite-sese-to-poly.c (add_condition_to_pbb): Use
2901 upper_bound_assign to calculate unions.
2902 * testsuite/gcc.dg/graphite/id-6.c: New.
2904 2009-04-09 Tobias Grosser <grosser@fim.uni-passau.de>
2906 * graphite-scop-detection.c (canonicalize_loop_closed_ssa): Do not
2907 handle abnormal edges.
2909 2009-04-09 Tobias Grosser <grosser@fim.uni-passau.de>
2911 * graphite-poly.c (new_poly_dr, free_poly_dr): New.
2912 (free_poly_bb): Also free poly_drs.
2913 * graphite-poly.h (new_poly_dr, free_poly_dr): New.
2914 (poly_dr): Polyhedron to Pointset_Powerset.
2915 (pdr_accessp_nb_subscripts): Same.
2916 * graphite-sese-to-poly.c (build_poly_dr): Same. And actually build
2919 2009-04-08 Sebastian Pop <sebastian.pop@amd.com>
2921 * graphite-clast-to-gimple.c (initialize_cloog_names): Change cloog
2922 names into more meaningful names.
2924 2009-04-08 Sebastian Pop <sebastian.pop@amd.com>
2926 * testsuite/gfortran.dg/graphite/interchange-1.c: New.
2927 * testsuite/gfortran.dg/graphite/interchange-2.c: New.
2929 2009-04-08 Sebastian Pop <sebastian.pop@amd.com>
2931 * graphite-clast-to-gimple.c (graphite_loop_normal_form): Do not build
2933 * tree-parloops.c (rewrite_phi_with_iv): New.
2934 (rewrite_all_phi_nodes_with_iv): New.
2935 (canonicalize_loop_ivs): Call them.
2937 2009-04-08 Sebastian Pop <sebastian.pop@amd.com>
2939 * graphite-sese-to-poly.c (try_generate_gimple_bb): Use
2940 graphite_find_data_references_in_stmt.
2941 * tree-data-ref.c (graphite_find_data_references_in_stmt): New.
2942 * tree-data-ref.h (graphite_find_data_references_in_stmt): Declared.
2944 2009-04-08 Sebastian Pop <sebastian.pop@amd.com>
2946 * sese.c (add_loop_exit_phis): Don't fail on non SSA_NAME renames.
2948 2009-04-08 Sebastian Pop <sebastian.pop@amd.com>
2950 * graphite-sese-to-poly.c (build_scop_bbs_1): Use bb_in_sese_p
2951 instead of bb_in_region.
2952 (flag_bb_in_region): Same. Renamed flag_bb_in_sese.
2953 (build_sese_conditions): Use flag_bb_in_sese.
2954 * sese.c (register_bb_in_sese): Removed.
2955 (new_sese): Remove initialization of SESE_REGION_BBS.
2956 (free_sese): Do not free SESE_REGION_BBS.
2957 * sese.h (struct sese): Remove field region_basic_blocks.
2958 (SESE_REGION_BBS): Removed.
2959 (bb_in_sese_p): Implement in function of bb_in_region.
2961 2009-04-08 Sebastian Pop <sebastian.pop@amd.com>
2963 * graphite-scop-detection.c (limit_scops): Deal only with single exit
2966 2009-04-08 Tobias Grosser <grosser@fim.uni-passau.de>
2968 * graphite-scop-detection.c (stmt_simple_for_scop_p): Allow NE_EXPR
2970 * graphite-sese-to-poly.c (create_linear_expr_from_tree): New.
2971 (add_condition_to_domain): New.
2972 (add_condition_to_pbb): New.
2973 (add_conditions_to_domain): Cleanup and handle of NE_EXPR and EQ_EXPR.
2974 * testsuite/gcc.dg/graphite/scop-3.c: Update number of detected SCoPs.
2976 2009-04-08 Tobias Grosser <grosser@fim.uni-passau.de>
2978 * graphite-clast-to-gimple.c (build_cloog_prog): ppl_Polyhedron ->
2979 ppl_Pointset_Powerset.
2980 * graphite-poly.c (new_poly_bb, free_poly_bb): Same.
2981 * graphite-poly.h (poly_bb): poly_bb.domain Same.
2982 (pbb_nb_loops): Same.
2983 * graphite-sese-to-poly.c (build_loop_iteration_domains,
2984 add_conditions_to_domain): Same.
2985 * graphite-ppl.c (new_Cloog_Domain_from_ppl_Pointset_Powerset): New.
2986 (ppl_print_polyhedron_matrix): ppl_Polyhedron_t ->
2987 ppl_const_Polyhedron_t.
2988 (ppl_print_powerset_matrix): New.
2989 * graphite-ppl.h (new_Cloog_Domain_from_ppl_Pointset_Powerset,
2990 ppl_print_powerset_matrix): New.
2991 (ppl_print_polyhedron_matrix): Updated.
2993 2009-04-07 Sebastian Pop <sebastian.pop@amd.com>
2995 * tree-scalar-evolution.c (analyze_scalar_evolution_1): Fix comment.
2997 2009-04-07 Sebastian Pop <sebastian.pop@amd.com>
2999 * graphite-poly.c (extend_scattering): Fix indenting. Free cstr.
3000 (print_iteration_domains, debug_iteration_domain,
3001 debug_iteration_domains): New.
3002 * graphite-poly.h (print_iteration_domains, debug_iteration_domain,
3003 debug_iteration_domains): Declared.
3004 * graphite-sese-to-poly.c (build_pbb_scattering_polyhedrons): Fix
3007 2009-04-03 Tobias Grosser <grosser@fim.uni-passau.de>
3008 Sebastian Pop <sebastian.pop@amd.com>
3010 * graphite-poly.h (print_iteration_domain): New.
3011 * graphite-sese-to-poly.c (add_conditions_to_domain): Fixed bug.
3012 (build_sese_conditions_1, build_sese_conditions_after,
3013 build_sese_conditions_before): New.
3014 (build_sese_conditions): Rewritten.
3016 2009-04-03 Sebastian Pop <sebastian.pop@amd.com>
3017 Tobias Grosser <grosser@fim.uni-passau.de>
3019 Cleanup of code generation liveouts.
3020 * graphite-clast-to-gimple.c (translate_clast): Use a single
3021 rename_map instead of one per translated statement.
3022 Do not use SESE_LIVEOUT_RENAMES.
3023 (graphite_loop_normal_form): Do not use SESE_REDUCTION_LIST.
3024 (gloog): Do not use SESE_LIVEOUT_RENAMES.
3025 * graphite-scop-detection.c (harmful_stmt_in_bb): Return the close
3026 phi node of a reduction: when a loop contains a reduction used outside
3027 the loop, there should be a scalar close phi node on the exit block.
3028 * sese.c (new_sese): Do not initialize SESE_LIVEOUT,
3029 SESE_LIVEOUT_RENAMES, and SESE_REDUCTION_LIST.
3030 (free_sese): Do not free them.
3031 (sese_build_liveouts_use): Do not use them.
3032 (sese_build_liveouts_bb): Same.
3033 (sese_build_liveouts): Same.
3034 (sese_insert_phis_for_liveouts): Same.
3035 (sese_adjust_phis_for_liveouts): Same. Renamed sese_adjust_liveout_phis.
3036 (defined_in_loop_p): New.
3037 (alive_after_loop): New.
3038 (close_phi_not_yet_inserted_p): New.
3039 (struct alep, alep_p): New.
3040 (add_loop_exit_phis): Remove from the rename_map all the names defined
3041 in the code generated loop.
3042 (insert_loop_close_phis): Traverse the rename_map passed to it.
3043 Don't use SESE_LIVEOUT_RENAMES.
3044 (default_liveout_before_guard): Renamed default_before_guard.
3045 (insert_guard_phis): Do not use SESE_LIVEOUT_RENAMES.
3046 (graphite_copy_stmts_from_block): Do not directly call set_rename.
3047 (register_sese_liveout_renames): Removed.
3048 (copy_bb_and_scalar_dependences): Do not call it.
3049 * sese.h (struct sese): Removed fields: liveout, liveout_renames, and
3051 (SESE_LIVEOUT): Removed.
3052 (SESE_LIVEOUT_RENAMES): Removed.
3053 (SESE_REDUCTION_LIST): Removed.
3054 (sese_build_liveouts): Removed.
3055 (sese_adjust_phis_for_liveouts): Renamed sese_adjust_liveout_phis.
3056 (insert_loop_close_phis): Pass a htab_t instead of a sese.
3057 (insert_guard_phis): Same.
3058 (rename_map_elt): Declare a VEC of them.
3059 * tree-parloops.c (canonicalize_loop_ivs): reduction_list contains
3060 trees not pointers to trees.
3062 Rewrite in canonical close SSA form:
3063 * graphite-scop-detection.c (contains_only_close_phi_nodes): New.
3064 (limit_scops): Close the scop after the block containing the close phi
3066 (canonicalize_loop_closed_ssa): New.
3067 (canonicalize_loop_closed_ssa_form): New.
3068 (build_scops): Call canonicalize_loop_closed_ssa_form.
3070 * graphite-sese-to-poly.c: Fix typos.
3072 2009-04-03 Sebastian Pop <sebastian.pop@amd.com>
3074 * graphite-poly.c (print_scattering_function, print_pbb_domain):
3076 (dump_gbb_conditions, dump_gbb_cases, print_iteration_domain): New.
3077 (print_pbb): Add conditions.
3079 2009-04-01 Tobias Grosser <grosser@fim.uni-passau.de>
3080 Sebastian Pop <sebastian.pop@amd.com>
3082 * graphite-scop-detection.c (bb_in_sd_region): Use bb_in_region.
3083 * graphite-sese-to-poly.c (all_non_dominated_preds_marked_p): New.
3084 (build_scop_bbs_1): New.
3085 (build_scop_bbs): Rewrite.
3086 * sese.h (bb_in_region): New.
3088 2009-03-29 Tobias Grosser <grosser@fim.uni-passau.de>
3090 * graphite-poly.c (new_poly_bb, free_poly_bb): Initialize/free
3092 (print_scop): Style.
3093 * graphite-poly.h (poly_bb): Add drs vector.
3094 (PBB_DRS): Add accessor.
3095 * graphite-sese-to-poly.c (build_poly_dr): New.
3096 (build_pbb_drs, build_scop_drs): New.
3097 (build_poly_scop): call build_scop_drs (Disabled at the moment).
3099 2009-03-29 Tobias Grosser <grosser@fim.uni-passau.de>
3101 * tree-ssa-loop.c: Include forgotten toplev.h
3103 2009-03-29 Tobias Grosser <grosser@fim.uni-passau.de>
3105 * graphite-poly.c: (apply_poly_transforms): sorry -> gcc_unreachable.
3106 * testsuite/gcc.dg/graphite/pr37883.c: Remove -floop-*
3107 * testsuite/gcc.dg/graphite/pr37928.c: Same
3108 * testsuite/gcc.dg/graphite/pr38409.c: Same
3109 * testsuite/gcc.dg/graphite/pr38498.c: Same
3110 * testsuite/gcc.dg/graphite/pr38559.c: Same
3111 * testsuite/gcc.dg/graphite/pr39335.c: Same
3112 * testsuite/gcc.dg/graphite/pr39335_1.c: Same
3113 * testsuite/gfortran.dg/graphite/block-2.f: Same
3114 * tree-ssa-loop.c (gate_graphite_transforms): Always fail if called
3117 2009-03-28 Tobias Grosser <grosser@fim.uni-passau.de>
3119 * graphite-sese-to-poly.c (ref_nb_loops, build_access_matrix_with_af,
3120 build_access_matrix, build_scop_data_accesses): Remove access function
3121 building. (We get a new version soon).
3122 (build_bb_loops, scan_tree_for_params_right_scev): Update.
3123 * sese.h (nb_loops_around_loop_in_sese): Remove.
3124 (sese_loop_depth): Do not use SESE_LOOP_NEST any more.
3126 2009-03-27 Tobias Grosser <grosser@fim.uni-passau.de>
3127 Sebastian Pop <sebastian.pop@amd.com>
3129 * graphite-scop-detection.c (struct scopdet_info): Rename last
3131 (scopdet_basic_block_info, build_scops_1): Don't use
3132 CDI_POST_DOMINATORS. CDI_POST_DOMINATORS should never be used.
3134 2009-03-26 Tobias Grosser <grosser@fim.uni-passau.de>
3135 Sebastian Pop <sebastian.pop@amd.com>
3137 * graphite-clast-to-gimple.c (gloog): Call sese_build_liveouts.
3138 * sese.c (sese_build_liveouts_use): Renamed from
3139 sese_build_livein_liveouts_use. Remove liveins.
3140 (sese_build_liveouts_bb): Renamed from sese_build_livein_liveouts_bb.
3141 Call sese_build_liveouts_use.
3142 (sese_build_liveouts): Renamed from sese_build_livein_liveouts.
3143 Call sese_build_liveouts_bb.
3144 (new_sese, free_sese): Remove liveins.
3145 (sese_add_exit_phis_var): Deleted.
3146 (sese_insert_phis_for_liveouts): Call sese_add_exit_phis_edge
3148 (graphite_copy_stmts_from_block): Remove SESE_NUM_VER.
3150 * sese.h (sese): Remove num_ver and livein.
3151 (SESE_LIVEIN, SESE_LIVEIN_VER, SESE_NUM_VER): Removed.
3153 2009-03-25 Tobias Grosser <grosser@fim.uni-passau.de>
3155 * graphite-sese-to-poly.c (build_scop_scattering): Fix compile.
3157 2009-03-25 Tobias Grosser <grosser@fim.uni-passau.de>
3159 * graphite-sese-to-poly.c (compare_prefix_loops): Removed.
3160 (build_scop_scattering): Do not use compare_prefix_loops any more.
3161 (nb_common_loops): New.
3163 2009-03-24 Sebastian Pop <sebastian.pop@amd.com>
3165 * sese.c (get_new_name_from_old_name): Renamed get_rename.
3166 (register_old_and_new_names): Renamed set_rename.
3168 2009-03-24 Sebastian Pop <sebastian.pop@amd.com>
3170 * graphite-scop-detection.h (nb_reductions_in_loop): Revert removal
3171 of the decl from the previous commit.
3173 2009-03-24 Sebastian Pop <sebastian.pop@amd.com>
3175 * graphite-scop-detection.c (dot_scop): New.
3176 * graphite-scop-detection.h (dot_scop): Declared.
3178 2009-03-24 Sebastian Pop <sebastian.pop@amd.com>
3180 * graphite-sese-to-poly.c (compare_prefix_loops): Fix compare.
3182 2009-03-24 Sebastian Pop <sebastian.pop@amd.com>
3184 * cfgloopmanip.c (create_empty_loop_on_edge): Generate the loop exit
3185 condition at the end of the loop.
3186 * graphite.c (graphite_initialize, graphite_finalize): Print to
3187 dump_file the compiled function.
3188 * graphite-clast-to-gimple.c (graphite_create_new_loop): Update use
3189 of create_empty_loop_on_edge.
3190 (translate_clast): Update the code generation of loops for the new
3192 * cfgloop.h (create_empty_loop_on_edge): Update declaration.
3194 2009-03-24 Sebastian Pop <sebastian.pop@amd.com>
3196 Reverted the patch from 2009-03-19.
3198 2009-03-19 Tobias Grosser <grosser@fim.uni-passau.de>
3200 * graphite-poly.c (new_poly_bb, free_poly_bb): Initialize/free
3202 (print_scop): Style.
3203 * graphite-poly.h (poly_bb): Add drs vector.
3204 (PBB_DRS): Add accessor.
3205 * graphite-sese-to-poly.c (ref_nb_loops): Remove.
3206 (build_access_matrix_with_af, build_access_matrix,
3207 build_scop_data_accesses): Delete.
3208 (build_poly_dr): New.
3209 (build_pbb_drs, build_scop_drs): New.
3210 (build_poly_scop): call build_scop_drs.
3212 2009-03-13 Sebastian Pop <sebastian.pop@amd.com>
3214 * graphite-scop-detection.c (dot_all_scops_1): Close the table
3215 once per basic block.
3217 2009-03-13 Tobias Grosser <grosser@fim.uni-passau.de>
3219 * graphite-scop-detection.c (graphite_can_represent_scev): New.
3220 (graphite_can_represent_expr): Renamed from loop_affine_expr
3222 (stmt_simple_for_scop_p): Call graphite_can_represent_expr.
3223 (graphite_cannot_represent_loop): Add scop_entry to parameters.
3224 (scopdet_basic_block_info): Actually define entry_block.
3225 (stmt_simple_memref_p): Moved here from ...
3227 * tree-data-ref.c (stmt_simple_memref_p): here.
3228 * tree-data-ref.h (stmt_simple_memref_p): Removed.
3230 2009-03-13 Tobias Grosser <grosser@fim.uni-passau.de>
3232 * testsuite/gcc.dg/graphite/id-4.c: New.
3234 2009-03-12 Sebastian Pop <sebastian.pop@amd.com>
3236 * sese.c (expand_scalar_variables_expr): Handle tcc_comparison.
3237 (register_old_and_new_names): Update the content of the map.
3238 When there was already a rename_map_elt in the map at that
3240 (copy_bb_and_scalar_dependences): Do rename_variables after
3241 expand_scalar_variables.
3242 * graphite-clast-to-gimple.c (build_iv_mapping): Update the content
3243 of the map. When there was already a rename_map_elt in the
3244 map at that location, free it.
3245 (translate_clast): Pass the rename_map. Do not initialize and free
3246 a rename_map per stmt_user.
3247 (gloog): Initialize and free one rename_map and pass it to
3250 2009-03-12 Sebastian Pop <sebastian.pop@amd.com>
3252 * sese.c (expand_scalar_variables_stmt,
3253 expand_scalar_variables_ssa_name): Add a gimple_stmt_iterator
3255 (expand_scalar_variables_expr): Handle REALPART_EXPR and IMAGPART_EXPR.
3256 (expand_scalar_variables): Pass to expand_scalar_variables_stmt
3257 the gimple_stmt_iterator of the statement to be expanded.
3258 * graphite-scop-detection.c (is_simple_operand): Do handle
3261 2009-03-11 Tobias Grosser <grosser@fim.uni-passau.de>
3263 * graphite-scop-detection.c (is_simple_operand): Do not handle
3265 * testsuite/gcc.dg/graphite/id-2.c: New.
3267 * graphite-sese-to-poly.c (build_bb_loops,
3268 add_value_to_dim, scan_tree_for_params_right_scev,
3269 scan_tree_for_params_int, scan_tree_for_params, idx_record_params,
3270 find_params_in_bb, build_loop_iteration_domains,
3271 add_conditions_to_domain): Remove subtract.
3273 2009-03-11 Tobias Grosser <grosser@fim.uni-passau.de>
3275 * graphite-clast-to-gimple.c (loop_iv_stack_patch_for_consts,
3276 build_iv_mapping, compute_cloog_iv_types_1, build_cloog_prog):
3277 pbb_loop_at_index -> gbb_loop_at_index.
3278 * graphite-poly.c (new_poly_bb, new_scop): New accessors.
3279 (debug_loop_vec): Delete.
3280 * graphite-poly.h (poly_bb, scop): Change black_box and region to void
3281 pointer. Move LOOPS to gimple_bb_p and insert nb_params.
3282 (PBB_LOOPS): Removed.
3283 (PBB_BLACK_BOX): Insert cast.
3284 (pbb_set_black_box): New setter.
3285 (pbb_loop_at_index, pbb_loop_index): Removed.
3286 (scop_set_region, scop_set_nb_params): New.
3287 * graphite-sese-to-poly.c (new_gimple_bb, free_gimple_bb,
3288 build_scop_scattering, build_bb_loops): Add GBB_LOOPS.
3289 (build_poly_scop): Use scop_set_nb_params.
3290 * sese.h (gimple_bb): Add LOOPS.
3291 (GBB_LOOPS, gbb_loop_index, gbb_loop_at_index): New.
3293 2009-03-11 Tobias Grosser <grosser@fim.uni-passau.de>
3295 Revert previous commit.
3297 2009-03-11 Sebastian Pop <sebastian.pop@amd.com>
3299 * sese.c (expand_scalar_variables_expr): Handle tcc_comparison.
3300 (register_old_and_new_names): Update the content of the map.
3301 When there was already a rename_map_elt in the map at that
3303 (copy_bb_and_scalar_dependences): Do rename_variables after
3304 expand_scalar_variables.
3305 * graphite-clast-to-gimple.c (build_iv_mapping): Update the content
3306 of the map. When there was already a rename_map_elt in the
3307 map at that location, free it.
3308 (translate_clast): Pass the rename_map. Do not initialize and free
3309 a rename_map per stmt_user.
3310 (gloog): Initialize and free one rename_map and pass it to
3313 2009-03-11 Tobias Grosser <grosser@fim.uni-passau.de>
3315 Remove forgotten line in revert.
3317 2009-03-11 Sebastian Pop <sebastian.pop@amd.com>
3319 Revert previous commit.
3321 2009-03-10 Sebastian Pop <sebastian.pop@amd.com>
3323 * sese.c (register_old_and_new_names): Update the content
3324 of the map. When there was already a rename_map_elt in the
3325 map at that location, free it.
3326 (copy_bb_and_scalar_dependences): Do rename_variables after
3327 expand_scalar_variables.
3328 * graphite-clast-to-gimple.c (build_iv_mapping): Update the content
3329 of the map. When there was already a rename_map_elt in the
3330 map at that location, free it.
3331 (translate_clast): Pass the rename_map. Do not initialize and free
3332 a rename_map per stmt_user.
3333 (gloog): Initialize and free one rename_map and pass it to
3336 2009-03-10 Sebastian Pop <sebastian.pop@amd.com>
3338 * graphite-clast-to-gimple.c (translate_clast): context_loop
3341 2009-03-10 Tobias Grosser <grosser@fim.uni-passau.de>
3342 Sebastian Pop <sebastian.pop@amd.com>
3344 * graphite-ppl.c (ppl_insert_dimensions): Fix stupid mistake
3345 of the use of ppl_Polyhedron_map_space_dimensions.
3347 2009-03-10 Tobias Grosser <grosser@fim.uni-passau.de>
3348 Sebastian Pop <sebastian.pop@amd.com>
3350 * graphite-poly.c (unify_scattering_dimensions): Fix types.
3351 * graphite-poly.h (poly_dr_p, poly_dr, POLY_DR_TYPE, PDR_BB,
3352 PDR_TYPE, PDR_ACCESSES, pdr_accessp_nb_subscripts,
3353 pdr_accessp_nb_iterators, pdr_accessp_nb_params,
3354 pdr_accessp_alias_set_dim, pdr_accessp_subscript_dim,
3355 pdr_accessp_iterator_dim, pdr_accessp_param_dim,
3356 pbb_nb_params): New.
3357 (pbb_nb_loops, pbb_nb_scattering, scop_nb_params,
3358 nb_loops_around_pbb): Adapt return types.
3360 2009-03-09 Tobias Grosser <grosser@fim.uni-passau.de>
3362 * Makefile.in (graphite.o, graphite-sese-to-poly.o,
3363 graphite-clast-to-gimple.o, graphite-data-ref.o,
3364 graphite-scop-detection.o, graphite-poly.o): Add
3367 2009-03-05 Tobias Grosser <grosser@fim.uni-passau.de>
3369 * Makefile.in (graphite.o, graphite-sese-to-poly.o,
3370 graphite-clast-to-gimple.o, graphite-data-ref.o,
3371 graphite-scop-detection.o, graphite-poly.o): Add graphite-poly.h.
3373 2009-03-04 Tobias Grosser <grosser@fim.uni-passau.de>
3375 * testsuite/gcc.dg/graphite/pr37485.c: Remove -floop-block
3376 * testsuite/gcc.dg/graphite/pr37828.c: Same.
3377 * testsuite/gcc.dg/graphite/pr37684.c: Same.
3378 * testsuite/gcc.dg/graphite/block-0.c: Same.
3379 * testsuite/gcc.dg/graphite/block-1.c: Same.
3380 * testsuite/gcc.dg/graphite/block-2.c: Same.
3381 * testsuite/gcc.dg/graphite/block-3.c: Same.
3382 * testsuite/gcc.dg/graphite/block-4.c: Same.
3383 * testsuite/gcc.dg/graphite/block-5.c: Same.
3384 * testsuite/gcc.dg/graphite/block-6.c: Same.
3385 * testsuite/gfortran.dg/graphite/pr38083.f90: Same.
3386 * testsuite/gfortran.dg/graphite/block-1.f90: Same.
3387 * testsuite/gfortran.dg/graphite/block-3.f90: Same.
3388 * testsuite/gfortran.dg/graphite/pr37852.f90: Same.
3389 * testsuite/gfortran.dg/graphite/block-4.f90: Same.
3390 * testsuite/gfortran.dg/graphite/pr37980.f90: Same.
3391 * testsuite/gfortran.dg/graphite/pr38953.f90: Same.
3392 * testsuite/gfortran.dg/graphite/pr37857.f90: Same.
3393 * opts.c: Remove -floop-block from -O2.
3394 * graphite-poly.c: Fail if -floop-block -floop-interchange or
3395 -floop-strip-mine are used.
3397 2009-03-04 Tobias Grosser <grosser@fim.uni-passau.de>
3398 Sebastian Pop <sebastian.pop@amd.com>
3400 * graphite-clast-to-gimple.c (build_cloog_prog): Unify scattering
3402 * graphite-poly.c (pbb_compare, graphite_sort_pbbs,
3403 graphite_trans_bb_move_loop, graphite_trans_bb_strip_mine,
3404 strip_mine_profitable_p, is_interchange_valid,
3405 graphite_trans_bb_block, graphite_trans_loop_block,
3406 graphite_trans_scop_block): Temporary removed.
3407 (extend_scattering, unify_scattering_dimensions): New.
3408 (print_scattering_function, graphite_read_transforms):
3409 PBB_SCATTERING -> PBB_TRANSFORMED_SCATTERING.
3410 (graphite_generate_scattering_fns): Removed.
3411 (apply_poly_transforms): Cleanup.
3412 (free_poly_bb): Add PBB_SCATTERING -> PBB_TRANSFORMED_SCATTERING.
3413 (schedule_to_scattering): Moved.
3414 (PBB_STATIC_SCHEDULE, PBB_SCATTERING): Removed.
3415 (PBB_ORIGINAL_SCATTERING, PBB_TRANSFORMED_SCATTERING): New.
3416 (pbb_nb_scattering): New.
3417 (SCOP_ENTRY, SCOP_EXIT, SCOP_REGION_BBS, SCOP_DEP_GRAPH, SCOP_PARAMS,
3418 SCOP_LOOP_NEST, SCOP_PARAMS, SCOP_OLDIVS, SCOP_LIVEOUT_RENAMES):
3420 * graphite-ppl.c (ppl_insert_dimensions): Extended and renamed from
3422 (ppl_strip_loop): PBB_SCATTERING -> PBB_TRANSFORMED_SCATTERING.
3423 * graphite-scop-detection.c (dot_all_scops_1): PBB_SCATTERING
3424 -> PBB_TRANSFORMED_SCATTERING.
3425 * graphite-sese-to-poly.c (build_scop_bbs): Remove region.
3426 (build_pbb_scattering_polyhedron): Moved from schedule_to_scattering.
3427 (build_scop_scattering): Renamed from build_scop_canonical_schedules.
3428 (check_poly_representation): Do not return bool.
3429 (graphite_transform_loops): Reformat.
3430 * sese.h (SESE_ENTRY_BB, SESE_EXIT_BB): New.
3432 2009-03-04 Sebastian Pop <sebastian.pop@amd.com>
3434 * graphite-poly.c (print_pbb_domain, print_pbb, print_scop,
3435 debug_pbb_domain, debug_pbb, debug_scop): New.
3436 * graphite-poly.h (print_pbb_domain, print_pbb, print_scop,
3437 debug_pbb_domain, debug_pbb, debug_scop): Declared.
3439 2009-03-02 Sebastian Pop <sebastian.pop@amd.com>
3442 * tree-parloops.c (canonicalize_loop_ivs): Call fold_convert
3443 when the type precision of the induction variable should be
3444 larger than the type precision of nit.
3445 (gen_parallel_loop): Update use of canonicalize_loop_ivs.
3446 * graphite-clast-to-gimple.c (graphite_loop_normal_form): Same.
3447 * tree-flow.h (canonicalize_loop_ivs): Update declaration.
3449 * testsuite/gcc.dg/graphite/pr39335_1.c: New.
3450 * testsuite/gcc.dg/graphite/pr39335.c: New.
3452 2009-03-02 Sebastian Pop <sebastian.pop@amd.com>
3454 * tree-parloops.c (canonicalize_loop_ivs): reduction_list contains
3455 SSA_NAMES not struct reduction_info.
3457 2009-03-02 Sebastian Pop <sebastian.pop@amd.com>
3459 * sese.c (expand_scalar_variables_expr): Handle ADDR_EXPR.
3461 2009-02-27 Sebastian Pop <sebastian.pop@amd.com>
3462 Tobias Grosser <grosser@fim.uni-passau.de>
3464 * sese.c (new_sese): Initialize SESE_REDUCTION_LIST.
3465 (free_sese): Free SESE_REDUCTION_LIST.
3466 * sese.h (struct sese): Add field reduction_list.
3467 (SESE_REDUCTION_LIST): New.
3468 * graphite-clast-to-gimple.c (graphite_loop_normal_form): Call
3469 canonicalize_loop_ivs on SESE_REDUCTION_LIST.
3471 2009-02-27 Sebastian Pop <sebastian.pop@amd.com>
3472 Tobias Grosser <grosser@fim.uni-passau.de>
3474 * tree-flow.h (gather_scalar_reductions): Use struct loop * instead
3477 2009-02-27 Sebastian Pop <sebastian.pop@amd.com>
3478 Tobias Grosser <grosser@fim.uni-passau.de>
3480 * tree-parloops.c (struct brli, build_reduction_list_info,
3481 analyze_reduction_list, gather_scalar_reductions): New.
3482 (loop_parallel_p): Build a reduction list containing only
3483 PHI_RESULT SSA_NAMEs: call gather_scalar_reductions.
3484 (gen_parallel_loop): Call the analysis analyze_reduction_list.
3485 (parallelize_loops): Now reduction_list is a htab_t of SSA_NAMEs.
3486 * tree-flow.h (gather_scalar_reductions): Declared.
3488 2009-02-26 Sebastian Pop <sebastian.pop@amd.com>
3491 * graphite-clast-to-gimple.c (graphite_loop_normal_form): Do not call
3492 number_of_iterations_exit from a gcc_assert.
3494 2009-02-25 Sebastian Pop <sebastian.pop@amd.com>
3495 Jan Sjodin <jan.sjodin@amd.com>
3497 * output.h (graphite_out_file, graphite_in_file): Declared.
3498 * toplev.c (graphite_out_file, graphite_in_file): New.
3499 (init_asm_output): Initialize graphite_in_file and graphite_out_file.
3500 * graphite-clast-to-gimple.c (build_cloog_prog): Read PBB_SCATTERING.
3501 Don't call schedule_to_scattering.
3502 * common.opt (fgraphite-write, fgraphite-read): New.
3503 * graphite-poly.c: Include output.h.
3504 (print_scattering_function, print_scattering_functions,
3505 debug_scattering_function, debug_scattering_functions,
3506 graphite_write_transforms, graphite_read_transforms,
3507 graphite_generate_scattering_fns): New.
3508 (apply_poly_transforms): Do not apply transform if flag_graphite_read.
3509 Call graphite_generate_scattering_fns, graphite_write_transforms,
3510 graphite_read_transforms.
3511 (new_poly_bb): Initialize PBB_SCATTERING.
3512 (free_poly_bb): Free PBB_SCATTERING.
3513 (schedule_to_scattering): Does not return, initialize PBB_SCATTERING.
3514 * graphite-poly.h (struct poly_bb): Add field scattering.
3515 (PBB_SCATTERING): New.
3516 (print_scattering_function, print_scattering_functions,
3517 debug_scattering_function, debug_scattering_functions): Declared.
3518 * graphite-ppl.c (cloog_matrix_to_ppl_constraint): Matrices contain
3519 GMP values, not integers!
3520 (ppl_print_polyhedron_matrix, debug_ppl_polyhedron_matrix,
3521 ppl_read_polyhedron_matrix): New.
3522 * graphite-ppl.h (ppl_print_polyhedron_matrix,
3523 debug_ppl_polyhedron_matrix,
3524 ppl_read_polyhedron_matrix): Declared.
3525 * Makefile.in (graphite-poly.o): Depends on output.h.
3527 2009-02-23 Sebastian Pop <sebastian.pop@amd.com>
3528 Tobias Grosser <grosser@fim.uni-passau.de>
3531 * graphite-scop-detection.c (stmt_simple_for_scop_p): Analyze
3532 scalar evolutions in the scop_entry->loop_father.
3534 2009-02-23 Sebastian Pop <sebastian.pop@amd.com>
3535 Tobias Grosser <grosser@fim.uni-passau.de>
3537 * graphite.h (ref_nb_loops): Remove declaration.
3538 (struct gimple_bb, gimple_bb_p, GBB_BB, GBB_DATA_REFS, GBB_CONDITIONS,
3539 GBB_CONDITION_CASES, GBB_CLOOG_IV_TYPES, gbb_loop, print_gimple_bb,
3540 debug_gbb): Moved to sese.h.
3543 2009-02-23 Sebastian Pop <sebastian.pop@amd.com>
3544 Tobias Grosser <grosser@fim.uni-passau.de>
3546 * graphite-data-ref.[ch]: Disable.
3548 2009-02-23 Sebastian Pop <sebastian.pop@amd.com>
3549 Tobias Grosser <grosser@fim.uni-passau.de>
3551 * graphite-scop-detection.c (stmt_simple_for_scop_p): Analyze
3552 scalar evolutions in the scop_entry->loop_father.
3554 2009-02-23 Sebastian Pop <sebastian.pop@amd.com>
3556 * graphite-scop-detection.c (nb_reductions_in_loop): Moved here...
3557 (graphite_cannot_represent_loop_niter): Renamed
3558 graphite_cannot_represent_loop. Call nb_reductions_in_loop.
3559 (limit_scops): build_sese_loop_nests does not return a bool.
3560 * graphite-scop-detection.h (nb_reductions_in_loop): Declared.
3561 * sese.c (nb_reductions_in_loop): ... from here.
3562 (graphite_loop_normal_form): ... from here.
3563 (sese_record_loop): Does not fail, so does not return a bool.
3564 (build_sese_loop_nests): Same.
3565 * sese.h (build_sese_loop_nests): Update declaration.
3566 * graphite-clast-to-gimple.c (graphite_loop_normal_form): Moved here...
3567 (build_graphite_loop_normal_form): New.
3568 (gloog): Call build_graphite_loop_normal_form.
3569 * graphite-sese-to-poly.c (build_poly_scop): Don't fail on
3570 build_sese_loop_nests.
3572 * testsuite/gcc.dg/graphite/id-1.c: New.
3574 2009-02-23 Sebastian Pop <sebastian.pop@amd.com>
3575 Tobias Grosser <grosser@fim.uni-passau.de>
3577 * graphite-sese-to-poly.c (scan_tree_for_params): Remove REAL_CST.
3578 The SCoP detection fix is sufficient.
3580 2009-02-21 Sebastian Pop <sebastian.pop@amd.com>
3582 PR tree-optimization/39260
3583 * graphite-scop-detection.c (harmful_stmt_in_bb): Stop a SCoP when
3584 the basic block contains a condition with a real type.
3585 * graphite-sese-to-poly.c (scan_tree_for_params): Handle REAL_CST.
3587 * gcc.dg/graphite/pr39260.c: New.
3589 2009-02-21 Sebastian Pop <sebastian.pop@amd.com>
3591 * graphite-poly.c: Inlcude params.h.
3592 (graphite_trans_loop_block): Use PARAM_LOOP_BLOCK_TILE_SIZE for
3594 * Makefile.in (graphite-poly.o): Depend on PARAMS_H.
3595 * params.def (PARAM_LOOP_BLOCK_TILE_SIZE): Define.
3597 2009-02-20 Sebastian Pop <sebastian.pop@amd.com>
3598 Tobias Grosser <grosser@fim.uni-passau.de>
3600 * graphite-scop-detection.c (dot_all_scops_1,
3601 dot_all_scops): Moved here.
3602 * graphite-scop-detection.h (dot_all_scops): Declared here.
3603 * graphite.c (graphite_initialize, graphite_finalize): New.
3604 (graphite_transform_loops): Cleaned up.
3605 * sese.c (debug_oldivs): Moved here.
3606 * graphite-poly.c (graphite_apply_transformations): Renamed
3607 apply_poly_transforms.
3608 (debug_loop_vec): Moved here.
3609 * graphite-sese-to-poly.c (build_bb_loops, build_sese_conditions_1,
3610 scop_contains_non_iv_scalar_phi_nodes, build_sese_conditions,
3611 find_scop_parameters, build_scop_iteration_domain,
3612 add_conditions_to_constraints, build_scop_canonical_schedules,
3613 build_scop_data_accesses): Now static.
3614 (build_poly_scop, check_poly_representation): New.
3616 2009-02-20 Sebastian Pop <sebastian.pop@amd.com>
3618 * graphite.c (graphite_stmt_p, new_gimple_bb, free_gimple_bb,
3619 remove_gbbs_in_scop, free_scops, try_generate_gimple_bb,
3620 build_scop_bbs, ref_nb_loops, compare_prefix_loops,
3621 build_scop_canonical_schedules, build_bb_loops, add_value_to_dim,
3622 scan_tree_for_params_right_scev, scan_tree_for_params_int,
3623 scan_tree_for_params, struct irp_data, dx_record_params,
3624 find_params_in_bb, find_scop_parameters, gbb_from_bb,
3625 build_loop_iteration_domains, add_conditions_to_domain,
3626 phi_node_is_iv, bb_contains_non_iv_scalar_phi_nodes,
3627 scop_contains_non_iv_scalar_phi_nodes, build_sese_conditions_1,
3628 build_sese_conditions, add_conditions_to_constraints,
3629 build_scop_iteration_domain, build_access_matrix_with_af,
3630 build_access_matrix,
3631 build_scop_data_accesses): Moved to graphite-sese-to-poly.c.
3633 * graphite-sese-to-poly.c: New.
3634 * graphite-sese-to-poly.h: New.
3636 * Makefile.in: Add new rule for graphite-sese-to-poly.o.
3638 2009-02-20 Sebastian Pop <sebastian.pop@amd.com>
3640 * graphite.c: Split graphite code generation to a new file.
3641 (graphite_verify, gmp_cst_to_tree, clast_name_to_gcc,
3642 max_precision_type, clast_to_gcc_expression_red,
3643 clast_to_gcc_expression, gcc_type_for_clast_expr,
3644 gcc_type_for_clast_eq, loop_iv_stack_patch_for_consts,
3645 graphite_translate_clast_equation, graphite_create_guard_cond_expr,
3646 graphite_create_new_guard, clast_get_body_of_loop,
3647 gcc_type_for_cloog_iv, gcc_type_for_iv_of_clast_loop,
3648 graphite_create_new_loop, build_iv_mapping, copy_renames,
3649 translate_clast, find_cloog_iv_in_expr, compute_cloog_iv_types_1,
3650 compute_cloog_iv_types, free_scattering, save_var_name,
3651 initialize_cloog_names, build_scop_context, build_cloog_prog,
3652 set_cloog_options, debug_clast_stmt, scop_to_clast,
3653 print_generated_program, debug_generated_program,
3654 gloog): Moved to graphite-clast-to-gimple.c.
3656 (struct cloog_prog_clast): Moved to graphite-clast-to-gimple.h.
3658 (iv_stack_entry_is_constant, iv_stack_entry_is_iv,
3659 loop_iv_stack_push_iv, loop_iv_stack_insert_constant,
3660 loop_iv_stack_pop, loop_iv_stack_get_iv,
3661 loop_iv_stack_get_iv_from_name, debug_loop_iv_stack,
3662 free_loop_iv_stack, loop_iv_stack_remove_constants,
3663 debug_rename_elt, debug_rename_map_1, debug_rename_map,
3664 rename_map_elt_info, eq_rename_map_elts, debug_ivtype_elt,
3665 debug_ivtype_map_1, debug_ivtype_map, ivtype_map_elt_info,
3666 eq_ivtype_map_elts, sese_add_exit_phis_edge,
3667 sese_add_exit_phis_var, sese_insert_phis_for_liveouts,
3668 get_vdef_before_sese, sese_adjust_vphi,
3669 get_new_name_from_old_name, sese_adjust_phis_for_liveouts,
3670 oldiv_for_loop, rename_variables_in_stmt, is_parameter,
3671 is_iv, expand_scalar_variables_ssa_name,
3672 expand_scalar_variables_expr, expand_scalar_variables_stmt,
3673 expand_scalar_variables, rename_variables, remove_condition,
3674 get_true_edge_from_guard_bb, get_false_edge_from_guard_bb,
3675 add_loop_exit_phis, insert_loop_close_phis, struct igp,
3676 default_liveout_before_guard, add_guard_exit_phis,
3677 insert_guard_phis, register_old_and_new_names,
3678 graphite_copy_stmts_from_block, register_sese_liveout_renames,
3679 copy_bb_and_scalar_dependences, outermost_loop_in_sese,
3680 if_region_set_false_region, create_if_region_on_edge,
3681 move_sese_in_condition): Moved to sese.c.
3683 (nb_loops_around_loop_in_sese, struct ifsese, if_region_entry,
3684 if_region_exit, if_region_get_condition_block,
3685 struct rename_map_elt, new_rename_map_elt, enum iv_stack_entry_kind,
3686 union iv_stack_entry_data_union, struct iv_stack_entry_struct,
3687 iv_stack_entry_p, loop_iv_stack, struct ivtype_map_elt,
3688 ivtype_map_elt, new_ivtype_map_elt,
3689 recompute_all_dominators): Moved to sese.h.
3691 * graphite-clast-to-gimple.c: New.
3692 * graphite-clast-to-gimple.h: New.
3693 * Makefile.in: Add new rule for graphite-clast-to-gimple.o.
3694 * sese.c: Modified as said above.
3697 2009-02-20 Sebastian Pop <sebastian.pop@amd.com>
3699 * graphite.c: Split scop detection to a new file.
3700 (enum gbb_type, gbb_type, get_bb_type, struct sd_region_p, sd_region,
3701 move_sd_regions, loop_affine_expr, exclude_component_ref,
3702 is_simple_operand, stmt_simple_for_scop_p, harmful_stmt_in_bb,
3703 graphite_cannot_represent_loop_niter, struct scopdet_info,
3704 scopdet_basic_block_info, build_scops_1, bb_in_sd_region,
3705 find_single_entry_edge, find_single_exit_edge,
3706 create_single_entry_edge, sd_region_without_exit,
3707 create_single_exit_edge, unmark_exit_edges, mark_exit_edges,
3708 create_sese_edges, build_graphite_scops, limit_scops, build_scops):
3709 Moved to graphite-scop-detection.c.
3711 * graphite-scop-detection.c: New.
3712 * graphite-scop-detection.h: New.
3713 * Makefile.in: Add new rule for graphite-scop-detection.o.
3715 * sese.c: Include tree-chrec.h, tree-data-ref.h, and
3716 tree-scalar-evolution.h.
3717 (nb_reductions_in_loop, graphite_loop_normal_form, sese_record_loop,
3718 build_sese_loop_nests): Moved here from graphite.c.
3719 (param_index): Renamed parameter_index_in_region.
3721 2009-02-18 Tobias Grosser <grosser@fim.uni-passau.de>
3722 Sebastian Pop <sebastian.pop@amd.com>
3724 * gcc.dg/graphite/block-0.c: Expected to fail now.
3725 * gcc.dg/graphite/block-1.c: Same.
3726 * gcc.dg/graphite/block-5.c: Same.
3727 * gcc.dg/graphite/block-6.c: Same.
3729 2009-02-18 Tobias Grosser <grosser@fim.uni-passau.de>
3730 Sebastian Pop <sebastian.pop@amd.com>
3732 * graphite.h: Separate from graphite_bb_p the polyhedral
3733 representation in poly_bb_p and the GCC specifics in gimple_bb_p.
3734 (struct data_dependence_polyhedron, RDGE_DDP, ddp_p): Moved to
3735 graphite-data-ref.h.
3736 (struct poly_bb, PBB_SCOP, PBB_STATIC_SCHEDULE, PBB_DOMAIN,
3737 PBB_BLACK_BOX, PBB_LOOPS, pbb_nb_loops, pbb_loop_at_index,
3738 pbb_loop_index, struct scop, SCOP_BBS, SCOP_REGION, SCOP_ENTRY,
3739 SCOP_EXIT, SCOP_REGION_BBS, SCOP_DEP_GRAPH, SCOP_PARAMS,
3740 SCOP_LOOP_NEST, SCOP_PARAMS, SCOP_OLDIVS, SCOP_LIVEOUT_RENAMES,
3741 scop_nb_params): Moved to graphite-poly.h.
3742 * graphite-data-ref.c: Same.
3743 * graphite-data-ref.h: New.
3745 (pbb_compare, graphite_sort_pbbs, graphite_trans_bb_move_loop,
3746 graphite_trans_bb_strip_mine, strip_mine_profitable_p,
3747 is_interchange_valid, graphite_trans_bb_block,
3748 graphite_trans_loop_block, scop_max_loop_depth,
3749 graphite_trans_scop_block, graphite_apply_transformations,
3750 new_poly_bb, free_poly_bb, new_scop, free_scop): Moved to
3752 * graphite-poly.h: New.
3753 * graphite-poly.c: New.
3754 * Makefile.in (OBJS-common): Add graphite-poly.o.
3755 (graphite-poly.o): New rule.
3756 * tree-data-ref.h (struct data_reference): Remove unused scop field.
3759 2009-02-18 Sebastian Pop <sebastian.pop@amd.com>
3760 Tobias Grosser <grosser@fim.uni-passau.de>
3762 * graphite.c: Replace gb -> gbb.
3764 * graphite-data-ref.c: Same.
3766 2009-02-18 Sebastian Pop <sebastian.pop@amd.com>
3767 Tobias Grosser <grosser@fim.uni-passau.de>
3769 * Makefile.in (OBJS-commmon): Add sese.o.
3771 (graphite.o): Add sese.h.
3772 * graphite.c (bb_in_ss_p, loop_in_sese_p,
3773 sese_build_livein_liveouts_use, sese_build_livein_liveouts_bb,
3774 sese_build_livein_liveouts, register_bb_in_sese, new_sese, free_sese):
3776 (block_before_scop): Add missing return.
3777 (new_scop, free_scop): Remove SESE data structures.
3778 (scop_record_loop, scan_tree_for_params, find_params_in_bb,
3779 find_scop_parameters, build_loop_iteration_domains,
3780 add_conditions_to_domain, register_scop_liveout_renames,
3781 copy_bb_and_scalar_dependences): Scop -> SESE.
3783 (add_conditions_to_domain): SCoP -> SESE and remove check
3784 (scop_contains_non_iv_scalar_phi_nodes): New.
3785 (build_scop_conditions_1, build_scop_conditions): Remove check for
3786 non iv scalar phi nodes.
3787 (print_scop_statistics): New.
3788 (graphite_transform_loops): Cleanup.
3790 * graphite.h: Move to sese & cleanup.
3794 2009-02-16 Sebastian Pop <sebastian.pop@amd.com>
3795 Tobias Grosser <grosser@fim.uni-passau.de>
3797 * graphite.c (build_scop_conditions_1): Conditions are only
3798 at the end of a basic block.
3800 2009-02-16 Sebastian Pop <sebastian.pop@amd.com>
3801 Tobias Grosser <grosser@fim.uni-passau>
3803 * graphite.h (struct graphite_bb): Remove compressed_alpha_matrix
3805 (GBB_ALPHA): Removed.
3807 2009-02-16 Sebastian Pop <sebastian.pop@amd.com>
3808 Tobias Grosser <grosser@fim.uni-passau.de>
3810 * graphite-data-ref.c (graphite_test_dependence): Don't use
3811 GBB_DYNAMIC_SCHEDULE.
3812 * graphite.c (new_graphite_bb): Same.
3813 (free_graphite_bb): Same.
3814 (build_scop_dynamic_schedules): Removed.
3815 (graphite_transform_loops): Don't call it.
3816 * graphite.h (struct graphite_bb): Remove dynamic_schedule field.
3817 (GBB_DYNAMIC_SCHEDULE): Removed.
3819 2009-02-16 Sebastian Pop <sebastian.pop@amd.com>
3820 Tobias Grosser <grosser@fim.uni-passau.de>
3822 * graphite.c (schedule_to_scattering): Don't use CloogMatrix.
3823 (print_graphite_bb): Same.
3824 (build_cloog_prog): Same.
3826 2009-02-16 Sebastian Pop <sebastian.pop@amd.com>
3827 Tobias Grosser <grosser@fim.uni-passau.de>
3829 * graphite.c (build_cloog_prog): Don't use CloogMatrix.
3831 2009-02-16 Sebastian Pop <sebastian.pop@amd.com>
3832 Tobias Grosser <grosser@fim.uni-passau.de>
3834 * graphite.c (build_scop_context): Don't use CloogMatrix.
3835 * graphite-ppl.c (new_Cloog_Domain_from_ppl_Polyhedron): New.
3836 * graphite-ppl.h (new_Cloog_Domain_from_ppl_Polyhedron): Declared.
3838 2009-02-16 Sebastian Pop <sebastian.pop@amd.com>
3839 Tobias Grosser <grosser@fim.uni-passau.de>
3841 * graphite.h (struct scop): Move params, old_ivs, loops, loop_nest,
3842 liveout_renames, add_params fields...
3843 (struct sese): ... here.
3844 (SESE_PARAMS, SESE_LOOPS, SESE_LOOP_NEST, SESE_ADD_PARAMS,
3845 SESE_PARAMS, SESE_OLDIVS, SESE_LIVEOUT_RENAMES): New.
3847 2009-02-16 Sebastian Pop <sebastian.pop@amd.com>
3848 Tobias Grosser <grosser@fim.uni-passau.de>
3850 * graphite.c (print_scop): Do not print the CLooG program.
3851 (new_scop, free_scop, initialize_cloog_names, build_scop_context,
3852 build_cloog_prog, gloog): Don't use SCOP_PROG.
3853 (find_transform): Renamed scop_to_clast.
3854 (print_generated_program, debug_generated_program): New.
3855 (graphite_transform_loops): Adapt to new interface.
3856 * graphite.h (struct scop): Remove program field.
3857 (SCOP_PROG): Removed.
3858 (print_generated_program, debug_generated_program): Declared.
3860 2009-02-16 Sebastian Pop <sebastian.pop@amd.com>
3862 * graphite-data-ref.c (schedule_precedes_p, schedule_same_p): New.
3863 (statement_precedes_p): Use schedule_same_p and schedule_precedes_p.
3864 * graphite.c (gbb_compare, schedule_to_scattering, print_graphite_bb,
3865 free_graphite_bb, build_scop_canonical_schedules,
3866 graphite_trans_bb_strip_mine, graphite_trans_scop_block): Static
3867 schedules are now represented using a ppl_Linear_Expression_t.
3868 * graphite.h (struct graphite_bb): Same.
3869 * graphite-ppl.c (ppl_lexico_compare_linear_expressions): New.
3870 * graphite-ppl.h (ppl_lexico_compare_linear_expressions): Declared.
3872 2009-02-15 Sebastian Pop <sebastian.pop@amd.com>
3874 * graphite.c: Free local memory.
3875 * graphite-ppl.c: Same.
3877 2009-02-15 Sebastian Pop <sebastian.pop@amd.com>
3879 * graphite.c (const_column_index, get_first_matching_sign_row_index,
3880 get_lower_bound_row, get_upper_bound_row, copy_constraint,
3881 swap_constraint_variables, scale_constraint_variable): Removed.
3882 (graphite_trans_bb_strip_mine): Remove pong.
3883 * graphite-ppl.c: Include missing header files.
3884 (set_inhomogeneous, set_coef, shift_poly, ppl_strip_loop): New.
3885 * graphite-ppl.h (ppl_strip_loop): Declared.
3886 * Makefile.in (graphite-ppl.o): Adjust dependences.
3888 2009-02-14 Sebastian Pop <sebastian.pop@amd.com>
3890 * graphite.c (build_loop_iteration_domains): Remove ping pong.
3891 (build_scop_iteration_domain): Same.
3893 2009-02-13 Sebastian Pop <sebastian.pop@amd.com>
3895 * graphite.c (scan_tree_for_params, add_conditions_to_domain): Remove
3897 (add_value_to_dim, scan_tree_for_params_right_scev,
3898 scan_tree_for_params_int): New.
3899 * graphite-ppl.c (oppose_constraint): New.
3900 (insert_constraint_into_matrix): Implement missing cases.
3901 * graphite-ppl.h (insert_constraint_into_matrix): Declared.
3903 2009-02-13 Sebastian Pop <sebastian.pop@amd.com>
3905 * graphite.c (graphite_trans_bb_move_loop): Remove ping pong,
3906 use ppl_move_dimension.
3908 2009-02-12 Sebastian Pop <sebastian.pop@amd.com>
3910 * graphite-data-ref.c: Domains are now ppl_Polyhedra_t.
3913 * graphite-ppl.c: Same.
3914 * graphite-ppl.h: Same.
3916 2009-02-12 Sebastian Pop <sebastian.pop@amd.com>
3918 Revert last 3 commits.
3920 2009-02-10 Sebastian Pop <sebastian.pop@amd.com>
3922 * graphite.c (scan_tree_for_params, add_conditions_to_domain): Remove
3924 (add_value_to_dim, scan_tree_for_params_right_scev,
3925 scan_tree_for_params_int): New.
3926 * graphite-ppl.c (oppose_constraint): New.
3927 (insert_constraint_into_matrix): Implement missing cases.
3928 * graphite-ppl.h (insert_constraint_into_matrix): Declared.
3930 2009-02-10 Sebastian Pop <sebastian.pop@amd.com>
3932 * graphite.c (graphite_trans_bb_move_loop): Remove unused variables.
3934 2009-02-10 Sebastian Pop <sebastian.pop@amd.com>
3935 Tobias Grosser <grosser@fim.uni-passau.de>
3937 * graphite.c (graphite_trans_bb_move_loop): Remove ping pong,
3938 use ppl_move_dimension.
3939 * graphite-ppl.c (ppl_move_dimension): New.
3940 * graphite-ppl.h (ppl_move_dimension): Declared.
3942 2009-02-10 Sebastian Pop <sebastian.pop@amd.com>
3944 * graphite.c: Do not include cloog/cloog.h.
3945 (print_graphite_bb): Remove ping pong, call PPL print function.
3947 2009-02-10 Tobias Grosser <grosser@fim.uni-passau.de>
3949 * Makefile.in (OBJS-common): Add graphite-ppl.o.
3950 (graphite.o): Add dependence on graphite-ppl.h.
3951 (graphite-ppl.o): New.
3952 (graphite-data-ref.c): Ping pong between PPL data structures
3954 * graphite-ppl.c: New.
3955 * graphite-ppl.h: New.
3956 * graphite.c: Include graphite-ppl.h.
3957 (print_graphite_bb, add_conditions_to_domain, build_cloog_prog,
3958 graphite_trans_bb_move_loop, graphite_trans_bb_strip_mine):
3959 Ping pong between PPL data structures and matrices.
3960 (new_graphite_bb): Create a PPL constraint system.
3961 Call ppl_delete_Constraint_System instead of cloog_matrix_free.
3962 (build_loop_iteration_domains): Use PPL functions.
3963 * graphite.h: Include graphite-ppl.h. Fix comments.
3964 (graphite_bb): Use a ppl_Constraint_System_t instead of
3965 CloogMatrix for representing the domain.
3966 (scop): Remove static_schedule.
3967 (gbb_nb_loops): Ping pong between PPL data structures and matrices.
3969 2009-02-06 Sebastian Pop <sebastian.pop@amd.com>
3971 * graphite.c: Fix some comments.
3973 2009-02-05 Sebastian Pop <sebastian.pop@amd.com>
3976 * graphite.c (if_region_set_false_region): After moving a region
3977 in the false branch of a condition, remove the empty dummy
3979 (gloog): Remove wrong fix for PR38953.
3981 2009-02-03 Tobias Grosser <grosser@fim.uni-passau.de>
3983 * graphite.c (bb_in_sese_p, sese_build_livein_liveouts_use,
3984 sese_build_livein_liveouts_bb, sese_build_livein_liveouts,
3985 register_bb_in_sese, new_sese, free_sese): Moved.
3986 (dot_scop_1, build_scop_loop_nests, build_loop_iteration_domains,
3987 outermost_loop_in_scop, build_scop_iteration_domain,
3988 expand_scalar_variables_ssa_name, get_vdef_before_scop,
3989 limit_scops): Use bb_in_sese_p instead of bb_in_scop_p.
3990 Use loop_in_sese_p instead of loop_in_scop_p.
3991 (new_graphite_bb, new_scop, gloog): Do not initialize SCOP_BBS_B.
3992 (free_scop): Do not free SCOP_BBS_B.
3993 (nb_loops_around_loop_in_scop, nb_loops_around_gb,
3994 ref_nb_loops): Moved here...
3995 * graphite.h (ref_nb_loops): ... from here.
3996 (struct scop): Remove bbs_b bitmap.
3997 (SCOP_BBS_B, bb_in_scop_p, loop_in_scop_p): Removed.
3998 * testsuite/gcc.dg/graphite/scop-19.c: New
4000 2009-02-03 Tobias Grosser <grosser@fim.uni-passau.de>
4002 * graphite.c (scopdet_basic_block_info): Fix bug in scop
4005 2009-01-30 Tobias Grosser <grosser@fim.uni-passau.de>
4007 * graphite.c (new_loop_to_cloog_loop_str, hash_loop_to_cloog_loop,
4008 eq_loop_to_cloog_loop): Remove.
4009 (new_scop, free_scop): Remove SCOP_LOOP2CLOOG_LOOP.
4010 * graphite.h (struct scop): Remove loop2cloog_loop.
4011 (loop_domain_dim, loop_iteration_vector_dim): Remove.
4013 2009-01-30 Tobias Grosser <grosser@fim.uni-passau.de>
4015 * opts.c (decode_options): Only add graphite options to O2
4016 if we compile with graphite enabled.
4018 2009-01-26 Sebastian Pop <sebastian.pop@amd.com>
4020 * Merge from mainline (r143163:143684).
4022 2009-01-26 Sebastian Pop <sebastian.pop@amd.com>
4024 * graphite.c (debug_value): Removed.
4025 * graphite.h (debug_value): Removed.
4027 2009-01-23 Sebastian Pop <sebastian.pop@amd.com>
4029 * passes.c (init_optimization_passes): Do not call pass_copy_prop
4030 after graphite: pass_copy_prop does not maintain a proper loop closed
4031 SSA form. pass_copy_prop should be fixed.
4033 2009-01-23 Sebastian Pop <sebastian.pop@amd.com>
4035 * graphite.c (scop_adjust_phis_for_liveouts): Fix warning.
4037 2009-01-23 Sebastian Pop <sebastian.pop@amd.com>
4039 * graphite.c (graphite_verify): Add a call to verify_loop_closed_ssa.
4040 (gloog): Split the exit of the scop when the scop exit is a loop exit.
4041 (graphite_transform_loops): Only call cleanup_tree_cfg if gloog
4044 2009-01-20 Sebastian Pop <sebastian.pop@amd.com>
4046 * graphite.c (gloog): Return true when code gen succeeded.
4047 (graphite_transform_loops): Do not call cleanup_tree_cfg if
4048 the code of the function did not changed. After cleanup_tree_cfg
4049 call rewrite_into_loop_closed_ssa to maintain the loop closed ssa
4052 2009-01-19 Sebastian Pop <sebastian.pop@amd.com>
4054 * graphite.c (stmt_simple_for_scop_p): Also handle cases when
4055 gimple_call_lhs is NULL.
4057 2009-01-16 Sebastian Pop <sebastian.pop@amd.com>
4058 Tobias Grosser <tobi.grosser@amd.com>
4060 * graphite.c (graphite_trans_scop_block): Do not block single
4063 2009-01-15 Sebastian Pop <sebastian.pop@amd.com>
4064 Tobias Grosser <tobi.grosser@amd.com>
4066 * graphite.c (build_scop_canonical_schedules): Start schedules at
4069 2009-01-15 Sebastian Pop <sebastian.pop@amd.com>
4070 Tobias Grosser <tobi.grosser@amd.com>
4072 * graphite.c (compare_prefix_loops): New.
4073 (build_scop_canonical_schedules): Rewritten.
4074 (graphite_transform_loops): Move build_scop_canonical_schedules
4075 after build_scop_iteration_domain.
4077 2009-01-14 Sebastian Pop <sebastian.pop@amd.com>
4078 Tobias Grosser <tobi.grosser@amd.com>
4080 * graphite.c (add_conditions_to_domain): Add the loops to
4081 the dimension of the iteration domain. Do copy the domain
4082 only when it exists.
4083 (build_scop_conditions_1): Do not call add_conditions_to_domain.
4084 (add_conditions_to_constraints): New.
4085 (can_generate_code_stmt, can_generate_code): Removed.
4086 (gloog): Do not call can_generate_code.
4087 (graphite_transform_loops): Call add_conditions_to_constraints
4088 after building the iteration domain.
4090 2009-01-14 Sebastian Pop <sebastian.pop@amd.com>
4091 Tobias Grosser <tobi.grosser@amd.com>
4092 Jan Sjodin <jan.sjodin@amd.com>
4094 * graphite.c (scan_tree_for_params): On substractions negate
4095 all the coefficients of the term.
4096 (clast_to_gcc_expression_red): New. Handle reduction expressions
4097 of more than two operands.
4098 (clast_to_gcc_expression): Call clast_to_gcc_expression_red.
4099 (get_vdef_before_scop): Handle also the case of default definitions.
4101 2009-01-14 Sebastian Pop <sebastian.pop@amd.com>
4104 * graphite.c (get_vdef_before_scop, scop_adjust_vphi): New.
4105 (scop_adjust_phis_for_liveouts): Call scop_adjust_vphi.
4106 (gloog): Do not call cleanup_tree_cfg.
4107 (graphite_transform_loops): Call cleanup_tree_cfg after all
4108 scops have been code generated.
4110 2009-01-13 Sebastian Pop <sebastian.pop@amd.com>
4112 * passes.c (init_optimization_passes): Schedule after
4113 graphite transforms pass_copy_prop, pass_dce_loop and pass_lim.
4115 2009-01-13 Sebastian Pop <sebastian.pop@amd.com>
4117 * graphite.c (expand_scalar_variables_stmt): Do not pass loop_p.
4119 (expand_scalar_variables_ssa_name): Do not pass loop_p. Fix comment.
4120 Set the type of an expression to the type of its assign statement.
4121 (expand_scalar_variables_expr): Do not pass loop_p.
4122 Fix comment. Stop recursion on tcc_constant or tcc_declaration.
4123 (copy_bb_and_scalar_dependences): Do not pass loop_p.
4124 (translate_clast): Update call to copy_bb_and_scalar_dependences.
4126 2009-01-11 Sebastian Pop <sebastian.pop@amd.com>
4128 * graphite.c (expand_scalar_variables_ssa_name): Set the type of
4129 an expression to the gimple_expr_type of its assign statement.
4130 (expand_scalar_variables_expr): Stop recursion on tcc_constant
4133 2009-01-11 Sebastian Pop <sebastian.pop@amd.com>
4135 PR tree-optimization/38786
4136 * testsuite/gcc.dg/graphite/pr38786.c: New.
4137 * graphite.c (expand_scalar_variables_ssa_name): New, outlined from
4138 the SSA_NAME case of expand_scalar_variables_expr.
4139 (expand_scalar_variables_expr): Also gather the scalar computation
4140 used to index the memory access.
4141 (expand_scalar_variables_stmt): Pass to expand_scalar_variables_expr
4142 the gimple_stmt_iterator where it inserts new code.
4144 2009-01-10 Sebastian Pop <sebastian.pop@amd.com>
4146 * testsuite/gcc.dg/graphite/block-3.c: Fix compile error on 32bit.
4148 2009-01-10 Sebastian Pop <sebastian.pop@amd.com>
4150 * opts.c (decode_options): Enable flag_graphite_identity and
4151 flag_loop_block in -O2 and above.
4153 2009-01-08 Sebastian Pop <sebastian.pop@amd.com>
4155 * libjava/classpath/lib/gnu/java/awt/peer/gtk/GtkMouseInfoPeer.class:
4156 Fix merge problem: replace with the file from trunk.
4158 2009-01-08 Sebastian Pop <sebastian.pop@amd.com>
4160 * Merge from mainline (r141727:143163).
4162 2009-01-07 Sebastian Pop <sebastian.pop@amd.com>
4163 Jan Sjodin <jan.sjodin@amd.com>
4165 PR tree-optimization/38559
4166 * testsuite/gcc.dg/graphite/pr38559.c: New.
4168 * graphite.c (debug_value, copy_constraint,
4169 swap_constraint_variables, scale_constraint_variable, ): New.
4170 (get_lower_bound, get_upper_bound): Removed.
4171 (graphite_trans_bb_strip_mine): Clean up this code that works
4172 only for constant number of iterations. Fully copy upper and
4173 lower bound constraints, not only the constant part of them.
4174 * graphite.h (debug_value): Declared.
4176 2009-01-06 Jan Sjodin <jan.sjodin@amd.com>
4178 PR tree-optimization/38492
4179 PR tree-optimization/38498
4180 * tree-check.c (operator_is_linear, scev_is_linear_expression): New.
4181 * tree-chrec.h (scev_is_linear_expression): Declared.
4182 * graphite.c (graphite_cannot_represent_loop_niter): New.
4183 (scopdet_basic_block_info): Call graphite_cannot_represent_loop_niter.
4184 (graphite_loop_normal_form): Use gcc_assert.
4185 (scan_tree_for_params): Use CASE_CONVERT.
4186 (phi_node_is_iv, bb_contains_non_iv_scalar_phi_nodes): New.
4187 (build_scop_conditions_1): Call bb_contains_non_iv_scalar_phi_nodes.
4188 Use gcc_assert. Discard scops that contain unhandled cases.
4189 (build_scop_conditions): Return a boolean status for unhandled cases.
4190 (strip_mine_profitable_p): Print the loop number, not its depth.
4191 (is_interchange_valid): Pass the depth of the loop nest, don't
4192 recompute it wrongly.
4193 (graphite_trans_bb_block): Same.
4194 (graphite_trans_bb_block): Print tentative of loop blocking.
4195 (graphite_trans_scop_block): Do not print that the loop has been
4197 (graphite_transform_loops): Do not handle scops that contain condition
4200 * testsuite/gcc.dg/graphite/pr38500.c: Fixed warning as committed
4202 * testsuite/gcc.dg/graphite/block-0.c: Update test.
4203 * testsuite/gcc.dg/graphite/block-1.c: Same.
4204 * testsuite/gcc.dg/graphite/block-2.c: Remove xfail and test for
4206 * testsuite/gcc.dg/graphite/block-4.c: Remove test for strip mine.
4207 * testsuite/gcc.dg/graphite/block-3.c: New.
4208 * testsuite/gcc.dg/graphite/pr38498.c: New.
4210 2008-12-22 Harsha Jagasia <harsha.jagasia@amd.com>
4212 PR tree-optimization/38510
4213 * gcc.dg/graphite/pr38510.c: New.
4214 * graphite.c (recompute_all_dominators): Call mark_irreducible_loops.
4215 (translate_clast): Call recompute_all_dominators before
4217 (gloog): Call recompute_all_dominators before graphite_verify.
4219 2008-12-12 Sebastian Pop <sebastian.pop@amd.com>
4221 PR tree-optimization/38492
4222 * graphite.c (rename_map_elt, debug_rename_elt,
4223 debug_rename_map_1, debug_rename_map, new_rename_map_elt,
4224 rename_map_elt_info, eq_rename_map_elts,
4225 get_new_name_from_old_name, bb_in_sese_p): Moved around.
4226 (sese_find_uses_to_rename_use): Renamed sese_build_livein_liveouts_use.
4227 (sese_find_uses_to_rename_bb): Renamed sese_build_livein_liveouts_bb.
4228 (sese_build_livein_liveouts): New.
4229 (new_sese, free_sese): New.
4230 (new_scop): Call new_sese.
4231 (free_scop): Call free_sese.
4232 (rename_variables_from_edge, rename_phis_end_scop): Removed.
4233 (register_old_new_names): Renamed register_old_and_new_names.
4234 (register_scop_liveout_renames, add_loop_exit_phis,
4235 insert_loop_close_phis, struct igp,
4236 default_liveout_before_guard, add_guard_exit_phis,
4237 insert_guard_phis, copy_renames): New.
4238 (translate_clast): Call insert_loop_close_phis and insert_guard_phis.
4239 (sese_add_exit_phis_edge): Renamed scop_add_exit_phis_edge.
4240 (rewrite_into_sese_closed_ssa): Renamed scop_insert_phis_for_liveouts.
4241 (scop_adjust_phis_for_liveouts): New.
4242 (gloog): Call scop_adjust_phis_for_liveouts.
4244 * graphite.h (struct sese): Documented. Added fields liveout,
4246 (SESE_LIVEOUT, SESE_LIVEIN, SESE_LIVEIN_VER, SESE_NUM_VER): New.
4247 (new_sese, free_sese, sese_build_livein_liveouts): Declared.
4248 (struct scop): Added field liveout_renames.
4249 (SCOP_LIVEOUT_RENAMES): New.
4251 2008-12-11 Sebastian Pop <sebastian.pop@amd.com>
4253 PR tree-optimization/38409
4254 * gcc.dg/graphite/pr38409.c: New.
4255 * graphite.c (nb_reductions_in_loop): Use simple_iv.
4257 2008-12-11 Sebastian Pop <sebastian.pop@amd.com>
4259 * graphite.c (gcc_type_for_cloog_iv): By default return
4261 (graphite_create_new_loop): Don't fold_convert the already
4262 fold_convert-ed expression.
4264 2008-12-11 Harsha Jagasia <harsha.jagasia@amd.com>
4266 PR tree-optimization/38446
4267 * gcc.dg/graphite/pr38446.c: New.
4268 * graphite.c (register_bb_in_sese): New.
4269 (bb_in_sese_p): Check if bb belongs to sese region by explicitly
4270 looking at the bbs in the region.
4271 * graphite.h (sese): Add region_basic_blocks pointer set to
4272 structure and initialize at the time of defining new scop.
4274 2008-12-11 Tobias Grosser <grosser@fim.uni-passau.de>
4276 * graphite.c (new_graphite_bb): Initialize GBB_STATIC_SCHEDULE.
4277 (find_params_in_bb): Do not free data refs.
4278 (free_graphite_bb): Add FIXME on disabled free_data_refs.
4280 2008-12-11 Sebastian Pop <sebastian.pop@amd.com>
4282 * testsuite/gcc.dg/graphite/scop-16.c: Test only scop specific info.
4283 * testsuite/gcc.dg/graphite/scop-17.c: Same.
4284 * testsuite/gcc.dg/graphite/block-5.c: New.
4285 * testsuite/gcc.dg/graphite/block-6.c: New.
4286 * testsuite/gcc.dg/graphite/pr37485.c: Clean dump file after.
4287 * testsuite/gcc.dg/graphite/pr37684.c: Same.
4288 * testsuite/gcc.dg/graphite/block-2.c: Same.
4290 * graphite.c (struct ivtype_map_elt): New.
4291 (debug_ivtype_elt, debug_ivtype_map_1, debug_ivtype_map,
4292 new_ivtype_map_elt, ivtype_map_elt_info, eq_ivtype_map_elts,
4293 gcc_type_for_cloog_iv): New.
4294 (loop_iv_stack_patch_for_consts): Use the type of the induction
4295 variable from the original loop, except for the automatically
4296 generated loops, i.e., in the case of a strip-mined loop, in
4297 which case there is no original loop: in that case just use
4299 (new_graphite_bb): Initialize GBB_CLOOG_IV_TYPES.
4300 (free_graphite_bb): Free GBB_CLOOG_IV_TYPES.
4301 (clast_name_to_gcc): Accept params to be NULL.
4302 (clast_to_gcc_expression): Take an extra parameter for the type.
4303 Convert to that type all the expressions built by this function.
4304 (gcc_type_for_clast_expr, gcc_type_for_clast_eq): New.
4305 (graphite_translate_clast_equation): Compute the type of the
4306 clast_equation before translating its LHS and RHS.
4307 (clast_get_body_of_loop, gcc_type_for_iv_of_clast_loop): New.
4308 (graphite_create_new_loop): Compute the type of the induction
4309 variable before translating the lower and upper bounds and before
4310 creating the induction variable.
4311 (rename_variables_from_edge, rename_phis_end_scop): New.
4312 (copy_bb_and_scalar_dependences): Call rename_phis_end_scop.
4313 (sese_add_exit_phis_edge): Do not use integer_zero_node.
4314 (find_cloog_iv_in_expr, compute_cloog_iv_types_1,
4315 compute_cloog_iv_types): New.
4316 (gloog): Call compute_cloog_iv_types before starting the
4317 translation of the clast.
4319 * graphite.h (struct graphite_bb): New field cloog_iv_types.
4320 (GBB_CLOOG_IV_TYPES): New.
4321 (debug_ivtype_map): Declared.
4322 (oldiv_for_loop): New.
4324 2008-12-10 Tobias Grosser <grosser@fim.uni-passau.de>
4327 * graphite.c (new_scop): Initialize SCOP_ADD_PARAMS.
4328 (param_index): Assert if parameter is not know after parameter
4330 (find_params_in_bb): Detect params directly in GBB_CONDITIONS.
4331 (find_scop_parameters): Mark, that we have finished parameter
4333 (graphite_transform_loops): Move condition detection before parameter
4335 * graphite.h (struct scop): Add SCOP_ADD_PARAMS.
4336 * testsuite/gfortran.dg/graphite/pr38459.f90: New.
4338 2008-12-09 Tobias Grosser <grosser@fim.uni-passau.de>
4340 * graphite.c (graphite_transform_loops): Always call find_transform ()
4341 in ENABLE_CHECKING. So we test these code paths, even if we do not
4344 2008-12-09 Tobias Grosser <grosser@fim.uni-passau.de>
4346 * graphite.c (print_graphite_bb): Fix printing to file != dump_file.
4347 (print_scop): Ditto.
4349 2008-12-08 Tobias Grosser <grosser@fim.uni-passau.de>
4352 Fix testsuite/gfortran.dg/graphite/id-3.f90.
4353 * graphite.c (scopdet_basic_block_info): Fix bug that found some
4354 regions more than once.
4356 2008-12-03 Sebastian Pop <sebastian.pop@amd.com>
4358 Fix testsuite/gfortran.dg/graphite/id-4.f90.
4359 * graphite.c (scan_tree_for_params): Do not compute the multiplicand
4362 2008-12-03 Sebastian Pop <sebastian.pop@amd.com>
4364 Fix testsuite/gfortran.dg/graphite/id-1.f90.
4365 * graphite.c (gmp_cst_to_tree): Pass the type in parameter.
4366 (loop_iv_stack_patch_for_consts): Update use of gmp_cst_to_tree.
4367 (max_precision_type): New.
4368 (value_clast): Removed.
4369 (clast_to_gcc_expression): Be more careful to types of expressions.
4370 Use max_precision_type and update use of gmp_cst_to_tree.
4371 (graphite_translate_clast_equation): Use max_precision_type.
4372 (graphite_create_guard_cond_expr): Do not use integer_type_node,
4373 use the type of the condition.
4374 (graphite_create_new_loop): Do not use integer_type_node, use the
4375 max_precision_type of lb and ub.
4377 2008-12-03 Sebastian Pop <sebastian.pop@amd.com>
4379 * graphite.c (build_scops_1): Initialize open_scop.exit
4382 2008-12-02 Sebastian Pop <sebastian.pop@amd.com>
4384 * testsuite/gcc.dg/graphite/pr38084.c: New.
4385 * testsuite/gfortran.dg/graphite/id-1.f90: New.
4386 * testsuite/gfortran.dg/graphite/id-2.f90: New.
4387 * testsuite/gfortran.dg/graphite/id-3.f90: New.
4388 * testsuite/gfortran.dg/graphite/id-4.f90: New.
4389 * testsuite/gfortran.dg/graphite/pr37857.f90: New.
4391 2008-12-02 Sebastian Pop <sebastian.pop@amd.com>
4392 Jan Sjodin <jan.sjodin@amd.com>
4393 Harsha Jagasia <harsha.jagasia@amd.com>
4405 * testsuite/gcc.dg/graphite/pr38073.c: New.
4406 * testsuite/gcc.dg/graphite/pr37928.c: New.
4407 * testsuite/gcc.dg/graphite/pr37883.c: New.
4408 * testsuite/gcc.dg/graphite/pr38125.c: New.
4409 * testsuite/gfortran.dg/graphite/pr38083.f90: New.
4410 * testsuite/gfortran.dg/graphite/pr37852.f90: New.
4411 * testsuite/gfortran.dg/graphite/pr37980.f90: New.
4413 * testsuite/gcc.dg/graphite/scop-18.c: Remove reduction, test for
4414 the number of detected scops. Copy exact same test for loop
4416 * testsuite/gcc.dg/graphite/block-1.c: Fix the number of expected
4417 loops to be blocked as reductions are not handled.
4418 * testsuite/gcc.dg/graphite/block-4.c: ...here. New.
4420 * tree-phinodes.c (remove_phi_nodes): New, extracted from...
4421 * tree-cfg.c (remove_phi_nodes_and_edges_for_unreachable_block):
4423 * tree-flow.h (remove_phi_nodes, canonicalize_loop_ivs): Declared.
4424 * Makefile.in (graphite.o): Depend on value-prof.h.
4425 (graphite.o-warn): Removed -Wno-error.
4426 * tree-parloops.c (canonicalize_loop_ivs): Allow reduction_list
4427 to be a NULL pointer. Call update_stmt. Return the newly created
4428 cannonical induction variable.
4430 * graphite.h (debug_rename_map): Declared. Fix some comments.
4432 * graphite.c: Reimplement the code generation from graphite to gimple.
4433 Include value-prof.h.
4434 (loop_iv_stack_get_iv): Do not return NULL for constant substitutions.
4435 (get_old_iv_from_ssa_name): Removed.
4436 (graphite_stmt_p): New.
4437 (new_graphite_bb): Test for useful statements before building a
4438 graphite statement for the basic block.
4439 (free_graphite_bb): Do not free GBB_DATA_REFS: this is a bug
4440 in free_data_ref that calls BITMAP_FREE (DR_VOPS (dr)) without
4442 (recompute_all_dominators, graphite_verify,
4443 nb_reductions_in_loop, graphite_loop_normal_form): New.
4444 (scop_record_loop): Call graphite_loop_normal_form.
4445 (build_scop_loop_nests): Iterate over all the blocks of the
4446 function instead of relying on the incomplete information from
4447 SCOP_BBS. Return the success of the operation.
4448 (find_params_in_bb): Use the data from GBB_DATA_REFS.
4449 (add_bb_domains): Removed.
4450 (build_loop_iteration_domains): Don't call add_bb_domains.
4451 Add the iteration domain only to the basic blocks that have been
4452 translated to graphite.
4453 (build_scop_conditions_1): Add constraints only if the basic
4454 block have been translated to graphite.
4455 (build_scop_data_accesses): Completely disabled until data
4456 dependence is correctly implemented.
4457 (debug_rename_elt, debug_rename_map_1, debug_rename_map): New.
4458 (remove_all_edges_1, remove_all_edges): Removed.
4459 (get_new_name_from_old_name): New.
4460 (graphite_rename_variables_in_stmt): Renamed
4461 rename_variables_in_stmt. Call get_new_name_from_old_name.
4462 Use replace_exp and update_stmt.
4463 (is_old_iv): Renamed is_iv.
4464 (expand_scalar_variables_stmt): Extra parameter for renaming map.
4465 Use replace_exp and update_stmt.
4466 (expand_scalar_variables_expr): Same. Use the map to get the
4467 new names for the renaming of induction variables and for the
4468 renaming of variables after a basic block has been copied.
4469 (expand_scalar_variables): Same.
4470 (graphite_rename_variables): Renamed rename_variables.
4471 (move_phi_nodes): Removed.
4472 (get_false_edge_from_guard_bb): New.
4473 (build_iv_mapping): Do not insert the induction variable of a
4474 loop in the renaming iv map if the basic block does not belong
4476 (register_old_new_names, graphite_copy_stmts_from_block,
4477 copy_bb_and_scalar_dependences): New.
4478 (translate_clast): Heavily reimplemented: copy basic blocks,
4479 do not move them. Finally, in call cleanup_tree_cfg in gloog.
4480 At each translation step call graphite_verify ensuring the
4481 consistency of the SSA, loops and dominators information.
4482 (collect_virtual_phis, find_vdef_for_var_in_bb,
4483 find_vdef_for_var_1, find_vdef_for_var,
4484 patch_phis_for_virtual_defs): Removed huge hack.
4485 (mark_old_loops, remove_dead_loops, skip_phi_defs,
4486 collect_scop_exit_phi_args, patch_scop_exit_phi_args,
4487 gbb_can_be_ignored, scop_remove_ignoreable_gbbs, ): Removed.
4488 (remove_sese_region, ifsese, if_region_entry, if_region_exit,
4489 if_region_get_condition_block, if_region_set_false_region,
4490 create_if_region_on_edge, move_sese_in_condition, bb_in_sese_p,
4491 sese_find_uses_to_rename_use, sese_find_uses_to_rename_bb,
4492 sese_add_exit_phis_edge, sese_add_exit_phis_var,
4493 rewrite_into_sese_closed_ssa): New.
4494 (gloog): Remove dead code. Early return if code cannot be
4495 generated. Call cleanup_tree_cfg once the scop has been code
4497 (graphite_trans_scop_block, graphite_trans_loop_block): Do not
4498 block loops with less than two loops.
4499 (graphite_apply_transformations): Remove the call to
4500 scop_remove_ignoreable_gbbs.
4501 (limit_scops): When build_scop_loop_nests fails, continue on
4502 the next scop. Fix open_scop.entry.
4503 (graphite_transform_loops): Call recompute_all_dominators: force the
4504 recomputation of correct CDI_DOMINATORS and CDI_POST_DOMINATORS.
4505 Call initialize_original_copy_tables and free_original_copy_tables
4506 to be able to copy basic blocks during code generation.
4507 When build_scop_loop_nests fails, continue on next scop.
4508 (value_clast): New union.
4509 (clast_to_gcc_expression): Fix type cast warning.
4511 2008-11-09 Sebastian Pop <sebastian.pop@amd.com>
4513 * Merge from mainline (r140838:141727).
4515 2008-11-05 Tobias Grosser <grosser@fim.uni-passau.de>
4519 * graphite.c (scan_tree_for_params): Add POINTER_PLUS_EXPR.
4521 2008-11-05 Tobias Grosser <grosser@fim.uni-passau.de>
4525 * graphite.c (scopdet_basic_block_info): Fix loops with multiple
4526 exits and conditions.
4527 * testsuite/gcc.dg/graphite/pr37943.c: New.
4529 2008-10-23 Tobias Grosser <grosser@fim.uni-passau.de>
4532 * graphite.c (gloog): Replace EXIT_BLOCK_PTR with scop exit.
4534 2008-10-23 Tobias Grosser <grosser@fim.uni-passau.de>
4536 * doc/invoke.texi: Fix spaces.
4538 2008-10-22 Sebastian Pop <sebastian.pop@amd.com>
4540 PR tree-optimization/37891
4541 Reverted last commit.
4542 * graphite.c (create_single_entry_edge): Set
4543 EDGE_IRREDUCIBLE_LOOP and BB_IRREDUCIBLE_LOOP.
4545 2008-10-21 Sebastian Pop <sebastian.pop@amd.com>
4546 Mitul Thakkar <mitul.thakkar@amd.com>
4548 * graphite.c (create_single_entry_edge): Set
4549 EDGE_IRREDUCIBLE_LOOP and BB_IRREDUCIBLE_LOOP.
4551 2008-10-16 Tobias Grosser <grosser@fim.uni-passau.de>
4553 * doc/invoke.texi: Add -fgraphite-identity.
4554 * graphite.c (graphite_apply_transformations): Check for
4555 -fgraphite-identity.
4556 * toplev.c (process_options): Add flag_graphite_identity.
4557 * tree-ssa-loop.c: Add flag_graphite_identity.
4559 2008-10-14 Sebastian Pop <sebastian.pop@amd.com>
4561 Undo changes from 2008-10-02:
4562 * tree-ssa-loop-ivopts.c (rewrite_use_nonlinear_expr): Convert
4563 operand type when copying the operand to a variable of different type.
4564 * cfgloopmanip.c (create_empty_loop_on_edge): Write exit condition
4565 with the IV name after increment.
4567 2008-10-14 Sebastian Pop <sebastian.pop@amd.com>
4568 Harsha Jagasia <harsha.jagasia@amd.com>
4570 PR tree-optimization/37828
4571 * testsuite/gcc.dg/graphite/pr37828.c: New.
4572 * graphite.c (graphite_trans_loop_block): Do not loop block
4573 single nested loops.
4575 2008-10-09 Harsha Jagasia <harsha.jagasia@amd.com>
4576 Sebastian Pop <sebastian.pop@amd.com>
4578 * graphite.c (struct rename_map_elt, new_rename_map_elt,
4579 rename_map_elt_info, eq_rename_map_elts): New.
4580 (graphite_rename_ivs_stmt): Renamed graphite_rename_variables_in_stmt.
4581 (expand_scalar_variables_expr): Change parameters.
4582 (expand_scalar_variables_stmt): Same.
4583 (expand_scalar_variables): Same.
4584 (graphite_rename_ivs): Rename graphite_rename_variables.
4585 (build_iv_mapping): New.
4586 (translate_clast): Call build_iv_mapping.
4587 * graphite.h (gbb_p): New name.
4589 2008-10-03 Harsha Jagasia <harsha.jagasia@amd.com>
4591 PR tree-optimization/37684
4592 * gcc.dg/graphite/pr37684.c: New.
4593 * graphite.c (exclude_component_ref): New.
4594 (is_simple_operand): Call exclude_component_ref.
4596 2008-10-02 Jan Sjodin <jan.sjodin@amd.com>
4597 Harsha Jagasia <harsha.jagasia@amd.com>
4599 PR tree-optimization/37485
4600 * gcc.dg/graphite/block-2.c: New
4601 * graphite.c (gmp_cst_to_tree): Moved.
4602 (iv_stack_entry_is_constant): New.
4603 (iv_stack_entry_is_iv): New.
4604 (loop_iv_stack_push): Renamed to loop_iv_stack_push_iv.
4605 (loop_iv_stack_insert_constant): New.
4606 (loop_iv_stack_pop): Use new datatpype.
4607 (loop_iv_stack_get_iv): Same.
4608 (loop_iv_stack_get_iv_from_name): Same.
4609 (loop_iv_stack_debug): Renamed to debug_loop_iv_stack.
4610 (loop_iv_stack_patch_for_consts): New.
4611 (loop_iv_stack_remove_constants): New.
4612 (graphite_create_new_loop): Use loop_iv_stack_push_iv.
4613 (translate_clast): Call loop_iv_stack_patch_for_consts and
4614 loop_iv_stack_remove_constants.
4615 (gloog): Use new datatype. Redirect construction edge to end
4616 block to avoid accidental deletion.
4617 * graphite.h (enum iv_stack_entry_kind): New. Tag for data in
4619 (union iv_stack_entry_data): New. Data in iv stack entry.
4620 (struct iv_stack_entry): New. Datatype for iv stack entries.
4622 2008-10-02 Sebastian Pop <sebastian.pop@amd.com>
4624 * tree-ssa-loop-ivopts.c (rewrite_use_nonlinear_expr): Convert
4625 operand type when copying the operand to a variable of different type.
4627 2008-10-02 Sebastian Pop <sebastian.pop@amd.com>
4629 * cfgloopmanip.c (create_empty_loop_on_edge): Write exit condition
4630 with the IV name after increment.
4632 2008-10-02 Sebastian Pop <sebastian.pop@amd.com>
4634 * Merge from mainline (r140164:140838).
4636 2008-09-10 Konrad Trifunovic <konrad.trifunovic@inria.fr>
4638 * graphite-data-ref.c: New.
4639 * graphite.c (print_scop): Also dump the dependence graph.
4640 (bb_in_scop_p, loop_in_scop_p, nb_loops_around_gb): Moved...
4641 (new_scop): Initialize SCOP_DEP_GRAPH.
4642 (build_scop_dynamic_schedules): New.
4643 (build_access_matrix_with_af): Fixed column numbering.
4644 (graphite_transform_loops): Call build_scop_dynamic_schedules.
4645 * graphite.h: Add ifndef/define guards against multiple inclusion.
4646 (struct scop): Add dep_graph field.
4647 (SCOP_DEP_GRAPH): Defined.
4648 (ref_nb_loops): Fixed and moved to other position.
4649 (bb_in_scop_p, loop_in_scop_p, nb_loops_around_gb): ... here.
4650 (nb_loops_around_loop_in_scop): New.
4651 (graphite_dump_dependence_graph): Declared.
4652 (graphite_build_rdg_all_levels): Declared.
4653 (graphite_test_dependence): Declared.
4654 * Makefile.in (graphite-data-ref.o): New target.
4656 2008-09-09 Sebastian Pop <sebastian.pop@amd.com>
4658 * Merge from mainline (139870:140164).
4660 2008-09-01 Sebastian Pop <sebastian.pop@amd.com>
4662 * Merge from mainline (138275:139870).
4663 * testsuite/gcc.dg/graphite/scop-matmult.c: XFailed as one of
4664 the commits from trunk broke the niter detection.
4666 2008-09-01 Sebastian Pop <sebastian.pop@amd.com>
4668 * graphite.c: Add more documentation. Fix formatting.
4669 (debug_loop_vec, debug_oldivs, loop_iv_stack,
4670 loop_iv_stack_debug): Moved...
4671 (schedule_to_scattering): Move before use.
4672 (dot_all_scops): Include in "#if 0" the code for system
4675 * graphite.h: (debug_loop_vec, debug_oldivs, loop_iv_stack,
4676 loop_iv_stack_debug): ...here.
4678 2008-08-29 Jan Sjodin <jan.sjodin@amd.com>
4680 * tree-phinodes.c (make_phi_node): Extern.
4681 (add_phi_node_to_bb): New.
4682 (create_phi_node): Call add_phi_node_to_bb.
4683 * tree-ssa-loop-ivopts.c (get_phi_with_result): New.
4684 (remove_statement): Handle case where stored phi was updated
4685 and is no longer the same.
4686 * graphite.c (is_parameter): New.
4688 (expand_scalar_variables_expr): New.
4689 (expand_scalar_variables_stmt): New.
4690 (expand_scalar_variables): New.
4691 (move_phi_nodes): Create new phi instead of moving old one.
4692 (translate_clast): Call expand_scalar_variables.
4693 (find_vdef_for_var_in_bb): Also scan regular definitions.
4694 (skip_phi_defs): New.
4695 (collect_scop_exit_phi_args): New.
4696 (patch_scop_exit_phi_args): New.
4697 (gloog): Patch phis after scop.
4698 * tree-flow.h: (add_phi_node_to_bb): Declared.
4699 (make_phi_node): Declared.
4701 2008-08-26 Sebastian Pop <sebastian.pop@amd.com>
4703 * graphite.c (end_scop): Split the entry of the scop when it
4704 is the header of the loop in which the scop is ending.
4705 (build_scops_1, limit_scops): Update uses of end_scop.
4707 2008-08-26 Sebastian Pop <sebastian.pop@amd.com>
4709 * graphite.c (dot_all_scops_1): Do not fail on uninitialized
4710 SCOP_ENTRY or SCOP_EXIT.
4712 2008-08-25 Sebastian Pop <sebastian.pop@amd.com>
4714 * graphite.c (get_construction_edge): Removed.
4715 (gloog): Construction edge is the scop entry edge.
4717 2008-08-25 Sebastian Pop <sebastian.pop@amd.com>
4719 * graphite.c (can_generate_for_scop): Removed.
4720 (gloog): Do not call it.
4722 2008-08-25 Sebastian Pop <sebastian.pop@amd.com>
4724 * graphite.c (new_scop): Entry of a scop is an edge.
4725 Initialize SESE region.
4726 (free_scop): Free SESE region.
4727 (build_scops_1, scopdet_bb_info): Work on edges, not on bbs.
4728 (split_difficult_bb): New, split from end_scop.
4729 (end_scop): Exit of a scop is an edge.
4730 (build_scop_bbs): Never check CDI_POST_DOMINATORS: this info is
4731 not automatically updated and thus is always wrong.
4732 * graphite.h (struct sese): New.
4735 (struct scop): New field for a SESE region. Remove entry, exit.
4736 (SCOP_ENTRY, SCOP_EXIT): Update definitions to match same
4737 semantics as before. Moved comment around.
4739 2008-08-25 Tobias Grosser <grosser@fim.uni-passau.de>
4740 Sebastian Pop <sebastian.pop@amd.com>
4742 * graphite.c (graphite_transform_loops): Always enable gloog
4743 and find_transform when ENABLE_CHECKING.
4745 2008-08-25 Sebastian Pop <sebastian.pop@amd.com>
4747 * graphite.c (graphite_transform_loops): Move pretty printer
4748 of SCOPs before doing any transform. Remove call to print_scops
4749 and dot_all_scops_1.
4751 2008-08-25 Sebastian Pop <sebastian.pop@amd.com>
4753 * graphite.c (dump_gbb_conditions): Don't try to print NULL pointers.
4754 (print_graphite_bb): Same.
4756 2008-08-25 Sebastian Pop <sebastian.pop@amd.com>
4758 * graphite.c (dot_all_scops_1): Cleanup.
4759 (move_scops): Fix comment.
4761 2008-08-25 Sebastian Pop <sebastian.pop@amd.com>
4763 * graphite.c (build_scop_bbs): Revert commit 139355:
4765 2008-08-20 Sebastian Pop <sebastian.pop@amd.com>
4766 Dwarakanath Rajagopal <dwarak.rajagopal@amd.com>
4768 * graphite.c (build_scop_bbs): Factor up code.
4770 2008-08-25 Tobias Grosser <grosser@fim.uni-passau.de>
4772 * graphite.c (gloog): Update dominator info.
4774 2008-08-25 Tobias Grosser <grosser@fim.uni-passau.de>
4776 * graphite.c (remove_cond_exprs): Do not fail on empty bbs.
4778 2008-08-24 Sebastian Pop <sebastian.pop@amd.com>
4780 * graphite.c (new_graphite_bb): Remove GBB_INDEX_TO_NUM_MAP
4782 (free_graphite_bb): Remove GBB_INDEX_TO_NUM_MAP free.
4783 (translate_clast): Correct formatting.
4784 * graphite.h (struct num_map): Removed.
4785 (struct graphite_bb): Remove num_map field.
4786 (GBB_INDEX_TO_NUM_MAP): Removed.
4788 2008-08-24 Sebastian Pop <sebastian.pop@amd.com>
4790 * graphite.c (build_access_matrix_with_af): Fix comments.
4791 (build_scop_data_accesses): Same.
4793 2008-08-24 Sebastian Pop <sebastian.pop@amd.com>
4795 * graphite.c (build_scop_data_accesses): Don't construct
4796 access matrices. Add a FIXME and an assert condition that
4797 should pass when the access matrices will be needed.
4799 2008-08-24 Sebastian Pop <sebastian.pop@amd.com>
4801 * tree-data-ref.c (stmt_simple_memref_p): Don't call
4803 * graphite.c (build_graphite_bb): Renamed new_graphite_bb.
4804 Moved close by free_graphite_bb.
4805 (free_graphite_bb): Call free_data_refs. Reset bb->aux.
4806 (new_scop): Move close by free_scop.
4807 (graphite_transform_loops): Avoid linear scan to reset bb->aux.
4809 2008-08-22 Jan Sjodin <jan.sjodin@amd.com>
4811 * cfgloopmanip.c (create_empty_if_region_on_edge): New.
4812 * graphite.c (clast_to_gcc_expression): Call gmp_cst_to_tree
4813 instead of recursive call.
4814 (graphite_translate_clast_equation): New.
4815 (graphite_create_guard_cond_expr): New.
4816 (graphite_create_new_guard): New.
4817 (get_stack_index_from_iv): Removed.
4818 (graphite_rename_ivs_stmt): Use gbb_loop_index.
4819 (get_true_edge_from_guard_bb): New.
4820 (translate_clast): Handle stmt_guard in clast.
4821 (get_construction_edge): Allow construction edge detection for
4822 a scope entry with multiple predecessors if one predecessor is
4823 the immediate dominator of scope entry.
4824 (can_generate_code_stmt): Enable code generation for clast_guard.
4825 (gloog): Use correct context loop. Removed check for post dominators.
4826 * cfgloop.h (create_empty_if_region_on_edge): Declared.
4828 2008-08-21 Sebastian Pop <sebastian.pop@amd.com>
4830 * graphite.c (remove_dead_loops): Document better which
4833 2008-08-21 Sebastian Pop <sebastian.pop@amd.com>
4835 * Makefile.in: Rename POLYLIBLIBS and POLYLIBINC to PPLLIBS
4837 (graphite.o): Also depends on pointer-set.h.
4839 2008-08-21 Sebastian Pop <sebastian.pop@amd.com>
4841 * graphite.c (scop_record_loop): Fix compile warning.
4843 2008-08-21 Harsha Jagasia <harsha.jagasia@amd.com>
4844 Sebastian Pop <sebastian.pop@amd.com>
4846 * graphite.c (scop_record_loop): DECL_NAME can be NULL.
4848 2008-08-21 Sebastian Pop <sebastian.pop@amd.com>
4850 * graphite.c (build_graphite_bb): Initialize bb->aux to
4851 point to the graphite_bb_p.
4852 (graphite_bb_from_bb): Renamed gbb_from_bb; returns the
4854 (add_bb_domains): Does not use the scop parameter.
4855 (graphite_transform_loops): Clean bb->aux at the end.
4857 2008-08-20 Dwarakanath Rajagopal <dwarak.rajagopal@amd.com>
4858 Sebastian Pop <sebastian.pop@amd.com>
4860 * testsuite/lib/target-supports.exp
4861 (check_effective_target_fgraphite): New.
4863 * testsuite/gcc.dg/graphite/graphite.exp: Early exit when
4864 check_effective_target_fgraphite returns false.
4865 Set dg-do-what-default to compile.
4866 (scan-graphite-dump-times): Removed.
4867 * testsuite/gfortran.dg/graphite/graphite.exp: Same.
4869 * testsuite/gcc.dg/graphite/scop-0.c: Do not use "dg-do compile".
4870 Use scan-tree-dump-times instead of scan-graphite-dump-times.
4871 * testsuite/gcc.dg/graphite/scop-1.c: Same.
4872 * testsuite/gcc.dg/graphite/scop-2.c: Same.
4873 * testsuite/gcc.dg/graphite/scop-3.c: Same.
4874 * testsuite/gcc.dg/graphite/scop-4.c: Same.
4875 * testsuite/gcc.dg/graphite/scop-5.c: Same.
4876 * testsuite/gcc.dg/graphite/scop-6.c: Same.
4877 * testsuite/gcc.dg/graphite/scop-7.c: Same.
4878 * testsuite/gcc.dg/graphite/scop-8.c: Same.
4879 * testsuite/gcc.dg/graphite/scop-9.c: Same.
4880 * testsuite/gcc.dg/graphite/scop-10.c: Same.
4881 * testsuite/gcc.dg/graphite/scop-11.c: Same.
4882 * testsuite/gcc.dg/graphite/scop-12.c: Same.
4883 * testsuite/gcc.dg/graphite/scop-13.c: Same.
4884 * testsuite/gcc.dg/graphite/scop-matmult.c: Same.
4885 * testsuite/gcc.dg/graphite/scop-14.c: Same.
4886 * testsuite/gcc.dg/graphite/scop-15.c: Same.
4887 * testsuite/gcc.dg/graphite/block-0.c: Same.
4888 * testsuite/gcc.dg/graphite/scop-16.c: Same.
4889 * testsuite/gcc.dg/graphite/block-1.c: Same.
4890 * testsuite/gcc.dg/graphite/scop-17.c: Same.
4891 * testsuite/gcc.dg/graphite/scop-18.c: Same.
4892 * testsuite/gfortran.dg/graphite/block-1.f90: Same.
4893 * testsuite/gfortran.dg/graphite/scop-1.f: Same.
4894 * testsuite/gfortran.dg/graphite/block-2.f: Same.
4896 2008-08-20 Sebastian Pop <sebastian.pop@amd.com>
4898 * graphite.c: Fix some XXX comments.
4899 (build_scop_dynamic_schedules): Removed.
4901 2008-08-20 Sebastian Pop <sebastian.pop@amd.com>
4903 * graphite.h (scop_max_loop_depth): Moved...
4904 * graphite.c (scop_max_loop_depth): ...here.
4905 (remove_all_edges_1): New.
4906 (remove_all_edges): Factored code.
4907 (remove_cond_exprs): Check only the last statement for
4908 a GIMPLE_COND expression.
4910 2008-08-20 Sebastian Pop <sebastian.pop@amd.com>
4912 * graphite.c (scan_tree_for_params): Early return when the
4913 expression is a chrec_dont_know. Handle case NEGATE_EXPR.
4914 (find_scop_parameters): Factor out code.
4915 (graphite_trans_bb_strip_mine): Remove dead code.
4917 2008-08-20 Sebastian Pop <sebastian.pop@amd.com>
4919 * graphite.c (clast_to_gcc_expression, graphite_create_new_loop,
4920 graphite_trans_bb_move_loop): Factor asserts.
4921 (gloog): Perform sanity checks only for ENABLE_CHECKING.
4922 Do not call calculate_dominance_info and estimate_bb_frequencies.
4924 2008-08-20 Jan Sjodin <jan.sjodin@amd.com>
4926 * graphite.c (create_loops_mapping, free_loops_mapping,
4927 create_loops_mapping_num, debug_loop_mapping_1,
4928 debug_loop_mapping, graphite_loops_mapping_max_loop_num,
4929 get_loop_mapping_for_num, graphite_loops_mapping_add_child,
4930 graphite_loops_mapping_add_child_num,
4931 graphite_loops_mapping_insert_child,
4932 graphite_loops_mapping_parent, get_loop_mapped_depth_for_num,
4933 get_loop_mapped_depth, split_loop_mapped_depth_for_num,
4934 loop_mapped_depth_split_loop, swap_loop_mapped_depth_for_num,
4935 create_num_from_index, get_num_from_index,
4936 swap_loop_mapped_depth): Removed.
4937 (new_scop): Do not initialize SCOP_LOOPS_MAPPING.
4938 (free_scop): Do not call free_loops_mapping.
4939 (graphite_get_new_iv_stack_index_from_old_iv): Renamed
4940 get_stack_index_from_iv. Use GBB_LOOPS instead of calling
4941 get_loop_mapped_depth.
4942 (graphite_trans_bb_move_loop): Do not update the loop mapping.
4943 (graphite_trans_bb_strip_mine): Same.
4944 * graphite.h (graphite_loops_mapping, graphite_loop_node): Removed.
4945 (struct scop): Remove field loops_mapping.
4947 2008-08-20 Sebastian Pop <sebastian.pop@amd.com>
4948 Dwarakanath Rajagopal <dwarak.rajagopal@amd.com>
4950 * graphite.c (scop_record_loop): Factor out one level of the
4951 condition by early return.
4952 (build_scop_loop_nests): Format following FSF coding style.
4953 (build_scop_dynamic_schedules): Factor out code.
4954 (scopdet_bb_info): Reindent. Default case should not be reachable.
4956 2008-08-20 Sebastian Pop <sebastian.pop@amd.com>
4957 Dwarakanath Rajagopal <dwarak.rajagopal@amd.com>
4959 * graphite.c (loop_affine_expr): Check for DECL_P or struct
4960 assignments that are not handled as simple operands for now.
4962 2008-08-20 Sebastian Pop <sebastian.pop@amd.com>
4963 Dwarakanath Rajagopal <dwarak.rajagopal@amd.com>
4965 * graphite.c (build_scop_bbs): Factor up code.
4967 2008-08-20 Sebastian Pop <sebastian.pop@amd.com>
4968 Dwarakanath Rajagopal <dwarak.rajagopal@amd.com>
4970 * graphite.c (stmt_simple_for_scop_p): Factor code out
4972 (enum gbb_type): New. Group all the GBB_* types under it.
4973 (is_loop_exit): Moved...
4974 (end_scop): Enable BB spliting.
4975 * cfgloop.c (is_loop_exit): ...here. Reimplemented.
4976 * cfgloop.h (is_loop_exit): Declared.
4978 2008-08-20 Sebastian Pop <sebastian.pop@amd.com>
4980 * doc/invoke.texi: Remove strides from examples containing
4981 DO loops when the strides are equal to 1.
4983 2008-08-20 Harsha Jagasia <harsha.jagasia@amd.com>
4984 Dwarakanath Rajagopal <dwarak.rajagopal@amd.com>
4986 * graphite.c (graphite_trans_scop_block): Or the result with
4987 the result from graphite_trans_loop_block.
4988 * testsuite/gcc.dg/graphite/block-1.c: New.
4989 * testsuite/gfortran.dg/graphite/block-1.f90: New.
4990 * testsuite/gfortran.dg/graphite/block-2.f: New.
4992 2008-08-20 Sebastian Pop <sebastian.pop@amd.com>
4994 * graphite.c (graphite_transform_loops): Call cloog_initialize
4997 2008-08-20 Sebastian Pop <sebastian.pop@amd.com>
4999 * tree-data-ref.c) (stmt_simple_memref_p): New.
5000 * tree-data-ref.h (stmt_simple_memref_p): Declared.
5001 * graphite.c (stmt_simple_memref_for_scop_p): Removed.
5002 (is_simple_operand): Call stmt_simple_memref_p.
5004 * testsuite/gcc.dg/graphite/scop-matmult.c: Updated for not
5005 using pointer arithmetic, as this is optimized by PRE and
5006 makes the code too difficult to analyze.
5008 * testsuite/gcc.dg/graphite/scop-18.c: Same.
5010 2008-08-20 Sebastian Pop <sebastian.pop@amd.com>
5012 * gdbinit.in (pgg): New.
5014 2008-08-15 Tobias Grosser <grosser@fim.uni-passau.de>
5016 * graphite.c (graphite_trans_loop_block): Fix warning.
5018 2008-08-15 Tobias Grosser <grosser@fim.uni-passau.de>
5020 * graphite.c (graphite_trans_loop_block): Fix my merge error.
5022 2008-08-15 Tobias Grosser <grosser@fim.uni-passau.de>
5024 * graphite.c (graphite_trans_bb_block): Remove check for
5025 flag_loop_strip_mine, flag_loop_block, flag_loop_interchange.
5026 Check if loop blocking is profitable for every loop, before applying
5028 (graphite_apply_transformations): Call graphite_trans_bb_block only,
5029 if flag_loop_block is set.
5031 2008-08-14 Sebastian Pop <sebastian.pop@amd.com>
5033 * graphite.c: Add some more documentation for the loop
5036 2008-08-14 Sebastian Pop <sebastian.pop@amd.com>
5038 * Makefile.in (tree-data-ref.o): Remove dependence on graphite.h.
5039 * graphite.c: Format on less than 80 columns.
5042 2008-08-14 Sebastian Pop <sebastian.pop@amd.com>
5044 * cfgloopmanip.c (loopify): Use update_dominators_in_loop.
5046 2008-08-14 Sebastian Pop <sebastian.pop@amd.com>
5048 * doc/invoke.texi (floop-block, floop-strip-mine,
5049 floop-interchange): Update documentation with examples.
5051 2008-08-13 Sebastian Pop <sebastian.pop@amd.com>
5053 * cfgloopmanip.c (create_empty_loop_on_edge): Don't call
5055 * graphite.c (graphite_create_new_loop): Call add_referenced_var.
5057 2008-08-13 Sebastian Pop <sebastian.pop@amd.com>
5059 * cfgloopmanip.c (create_empty_loop_on_edge): Improve documentation.
5060 Factor gcc_asserts into a single one. Use force_gimple_operand_gsi.
5061 * tree-scalar-evolution.c: Revert useless changes.
5062 * tree-phinodes.c: Same.
5065 * tree-vectorizer.h: Same.
5066 * tree-flow.h: Same.
5068 * common.opt (fgraphite): Update documentation.
5070 2008-08-12 Harsha Jagasia <harsha.jagasia@amd.com>
5072 * doc/invoke.texi (-floop-block, -floop-strip-mine,
5073 -floop-interchange): Add more text for explaining what each of these
5075 * tree-into-ssa.c (gimple_vec): Moved to...
5076 * graphite.c: Include gimple.h.
5077 (gimple_vec): Moved to...
5078 (del_loop_to_cloog_loop): Removed.
5079 (loop_affine_expr): Do not call create_data_ref when the
5080 operand is a constant.
5081 (new_scop): Use free instead of del_loop_to_cloog_loop.
5082 * Makefile.in (graphite.o): Depend on GIMPLE_H.
5083 * gimple.h (gimple_vec): ... here.
5085 2008-08-11 Tobias Grosser <grosser@fim.uni-passau.de>
5087 * graphite.c (scopdet_bb_info): Only allow loops with known number of
5089 (build_loop_iteration_domains): Fail, if latch executions unknown.
5091 2008-08-11 Tobias Grosser <grosser@fim.uni-passau.de>
5093 * graphite.c (add_conditions_to_domain): New.
5094 (build_scop_conditions_1): Call add_conditions_to_domain.
5095 (set_cloog_options): Allow to disable optimizations.
5097 2008-08-11 Tobias Grosser <grosser@fim.uni-passau.de>
5099 * graphite.c (find_params_in_bb): Look for parameters in conditions.
5100 Do not use walk_dominator_tree.
5101 (find_scop_parameters): Do not use walk_dominator_tree.
5103 2008-08-11 Tobias Grosser <grosser@fim.uni-passau.de>
5105 * graphite.c (scan_tree_for_params) Add / Subtract inequality.
5106 (idx_record_params): Adapt.
5107 * graphite.h (scop_gimple_loop_depth): New.
5109 2008-08-11 Tobias Grosser <grosser@fim.uni-passau.de>
5111 * graphite.c (build_scop_dynamic_schedules): Remove value_init.
5112 (scan_tree_for_params): Remove value_init.
5113 (build_scop_context): Remove value_init.
5114 (build_loop_iteration_domains): Remove value_init.
5115 (schedule_to_scattering): Remove value_init.
5116 (graphite_trans_bb_strip_mine): Remove value_init.
5118 2008-08-11 Tobias Grosser <grosser@fim.uni-passau.de>
5120 * gcc/graphite.c (limit_scops): New.
5121 (graphite_transform_loops): Add limit SCoPs.
5122 * gcc/testsuite/gcc.dg/graphite/scop-0.c: Update number of SCoPs.
5123 * gcc/testsuite/gcc.dg/graphite/scop-1.c: Update number of SCoPs.
5124 * gcc/testsuite/gcc.dg/graphite/scop-10.c: Update number of SCoPs.
5125 * gcc/testsuite/gcc.dg/graphite/scop-11.c: Update number of SCoPs.
5126 * gcc/testsuite/gcc.dg/graphite/scop-12.c: Update number of SCoPs.
5127 * gcc/testsuite/gcc.dg/graphite/scop-13.c: Update number of SCoPs.
5128 * gcc/testsuite/gcc.dg/graphite/scop-14.c: Update number of SCoPs.
5129 * gcc/testsuite/gcc.dg/graphite/scop-15.c: Update number of SCoPs.
5130 * gcc/testsuite/gcc.dg/graphite/scop-16.c: Update number of SCoPs.
5131 Change loop numbers.
5132 * gcc/testsuite/gcc.dg/graphite/scop-17.c: Update number of SCoPs.
5133 Change loop numbers.
5134 * gcc/testsuite/gcc.dg/graphite/scop-18.c: Update number of SCoPs.
5135 * gcc/testsuite/gcc.dg/graphite/scop-2.c: Update number of SCoPs.
5136 * gcc/testsuite/gcc.dg/graphite/scop-3.c: Update number of SCoPs.
5137 * gcc/testsuite/gcc.dg/graphite/scop-4.c: Update number of SCoPs.
5138 * gcc/testsuite/gcc.dg/graphite/scop-5.c: Update number of SCoPs.
5139 * gcc/testsuite/gcc.dg/graphite/scop-6.c: Update number of SCoPs.
5140 * gcc/testsuite/gcc.dg/graphite/scop-7.c: Update number of SCoPs.
5141 * gcc/testsuite/gcc.dg/graphite/scop-8.c: Update number of SCoPs.
5142 * gcc/testsuite/gcc.dg/graphite/scop-9.c: Update number of SCoPs.
5143 * gcc/testsuite/gcc.dg/graphite/scop-matmult.c: Update number of SCoPs.
5145 2008-08-11 Tobias Grosser <grosser@fim.uni-passau.de>
5147 * graphite.c (graphite_transform_loops): Call always find_transform.
5149 2008-08-08 Tobias Grosser <grosser@fim.uni-passau.de>
5151 * graphite.c (free_loops_mapping): New.
5152 (stmt_simple_for_scop_p): Fix typo.
5153 (stmt_simple_for_scop_p): Fix tuples functions, that
5155 (free_graphite_bb): Fix some memleaks.
5156 (free_scop): Fix some memleaks.
5157 (scopdet_bb_info): Do not forget some tmp SCoPs.
5158 (find_params_in_bb): Fix some memleaks.
5159 (clast_to_gcc_expression): Fix warning.
5161 2008-08-07 Tobias Grosser <grosser@fim.uni-passau.de>
5163 * testsuite/gcc.dg/graphite/scop-16.c: Fix for 32bit.
5164 * testsuite/gcc.dg/graphite/scop-17.c: Fix for 32bit.
5166 2008-08-04 Sebastian Pop <sebastian.pop@amd.com>
5168 * tree-ssa-loop.c (tree-ssa-loop.o): Do not include toplev.h.
5169 Move code ifdef-ed HAVE_cloog...
5170 * graphite.c: Include toplev.h.
5172 * Makefile.in (OBJS-common): Always build graphite.o.
5173 (BACKEND): Remove @GRAPHITE@.
5174 (tree-ssa-loop.o): Do not depend on TOPLEV_H.
5175 (graphite.o): Depend on TOPLEV_H.
5177 2008-08-04 Sebastian Pop <sebastian.pop@amd.com>
5179 * Makefile.in (tree-ssa-loop.o): Depend on TOPLEV_H.
5180 Remove typo left from polylib to ppl conversion.
5181 * graphite.c (graphite_transforms): Use sorry instead of fatal.
5183 2008-08-03 Sebastian Pop <sebastian.pop@amd.com>
5185 * toplev.c (process_options): Move the graphite loop optimization
5187 * tree-ssa-loop.c (graphite_transforms): ... here.
5188 When not configured with CLooG, print to dump_file that
5189 Graphite transforms were not performed.
5190 * testsuite/gcc.dg/graphite/graphite.exp (scan-graphite-dump-times):
5192 * testsuite/gcc.dg/graphite/*.c: Updated all testcases to use
5193 scan-graphite-dump-times.
5195 2008-08-03 Sebastian Pop <sebastian.pop@amd.com>
5197 * graphite.c (dot_scop, dot_all_scops): Do not call system.
5198 Do not open /tmp/scop.dot and /tmp/allscops.dot.
5200 2008-08-02 Sebastian Pop <sebastian.pop@amd.com>
5201 Jan Sjodin <jan.sjodin@amd.com>
5203 * configure: Regenerated.
5204 * omp-low.c (expand_omp_sections): Remove now unused code.
5205 * config.in (HAVE_polylib): Removed.
5206 * configure.ac (HAVE_polylib, POLYLIBLIBS, POLYLIBINC): Removed.
5207 (PPLLIBS, PPLINC): Added.
5208 * graphite.c: Replace unsigned with int wherever possible.
5209 Don't access Cloog's data structures, but use accessor functions.
5210 Clast's stmt->type is now implemented as a vtable: change the
5211 switches of stmt->type into ifs.
5212 (polylib/polylibgmp.h): Don't include.
5213 (initialize_dependence_polyhedron,
5214 initialize_data_dependence_polyhedron, is_empty_polyhedron,
5215 statement_precedes_p, test_dependence, build_rdg_all_levels,
5216 dump_dependence_graph): Removed until this code is cleaned up
5218 * Makefile.in (POLYLIBLIBS): Renamed PPLLIBS.
5219 (POLYLIBINC): Renamed PPLINC.
5221 2008-08-01 Harsha Jagasia <harsha.jagasia@amd.com>
5222 Dwarakanath Rajagopal <dwarak.rajagopal@amd.com>
5223 Jan Sjodin <jan.sjodin@amd.com>
5225 Finish the merge and tuplification of graphite.
5227 2008-07-24 Sebastian Pop <sebastian.pop@amd.com>
5228 Jan Sjodin <jan.sjodin@amd.com>
5230 Partial merge from mainline (138072:138275).
5231 * graphite.c still has to be tuplified.
5233 2008-07-29 Jan Sjodin <jan.sjodin@amd.com>
5235 * graphite.c (graphite_loops_mapping_max_loop_num): New.
5236 (create_num_from_index): New.
5237 (get_num_from_index): Also pass in the graphite BB.
5238 (free_graphite_bb): Free GBB_INDEX_TO_NUM_MAP.
5239 (build_graphite_bb): Initialize GBB_INDEX_TO_NUM_MAP.
5240 (graphite_trans_bb_strip_mine): Call create_num_from_index.
5241 (is_interchange_valid): Return false when failing.
5242 * graphite.h (struct num_map): New.
5243 (struct graphite_bb): New field num_map.
5244 (GBB_LOOPS_MAPPING): Renamed GBB_INDEX_TO_NUM_MAP.
5246 2008-07-29 Tobias Grosser <grosser@fim.uni-passau.de>
5248 * graphite.c (dump_gbb_conditions): Print also conditions like
5249 "if (a)". Remove dublicated code and use print_generic_expr ().
5250 (stmt_simple_for_scop_p): Only allow conditions we can handle
5253 2008-07-25 Jan Sjodin <jan.sjodin@amd.com>
5255 * graphite.h (struct scop): Removed new_ivs field.
5256 (SCOP_NEWIVS): Deleted.
5257 * graphite.c (new_scop, free_scop, clast_name_to_gcc,
5258 clast_to_gcc_expression, graphite_create_new_loop):
5259 Removed use of new_ivs.
5261 2008-07-25 Jan Sjodin <jan.sjodin@amd.com>
5263 * graphite.c (debug_oldivs, debug_loop_vec, create_loops_mapping,
5264 create_loops_mapping_num, debug_loop_mapping_1): New.
5265 (debug_loop_mapping): Call debug_loop_mapping_1.
5266 (get_loop_mapping_for_num,
5267 graphite_loops_mapping_add_child,
5268 graphite_loops_mapping_add_child_num,
5269 graphite_loops_mapping_insert_child,
5270 graphite_loops_mapping_parent,
5271 split_loop_mapped_depth_for_num,
5272 loop_mapped_depth_split_loop): New.
5273 (increment_loop_mapped_depths): Removed.
5274 (swap_loop_mapped_depth_for_num): Reimplemented.
5275 (new_scop): Call create_loops_mapping.
5276 (scop_record_loop): Call graphite_loops_mapping_insert_child.
5277 (translate_clast): Pass the old loop father in parameter, and pass
5278 it to get_old_iv_from_ssa_name.
5279 (remove_edges_around_useless_blocks, can_generate_code_stmt,
5280 can_generate_code, can_generate_for_scop): New.
5281 (graphite_trans_bb_block): Returns false when it fails to transform.
5282 * graphite.h (graphite_loop_node, graphite_loops_mapping): New.
5284 2008-07-25 Sebastian Pop <sebastian.pop@amd.com>
5286 Reverted all the changes related to the streamization and
5288 These changes are now tracked in the streamization branch.
5290 2008-07-25 Sebastian Pop <sebastian.pop@amd.com>
5291 Jan Sjodin <jan.sjodin@amd.com>
5293 * graphite.c (gbb_compare): Correctly constify.
5294 (gbb_can_be_ignored): Indent.
5295 (graphite_trans_scop_swap_1and2): Add legality check.
5298 2008-07-25 Sebastian Pop <sebastian.pop@amd.com>
5300 Remove fallouts from "Reverted the Condate changes".
5301 * tree.h: Remove unused decl.
5302 * testsuite/gcc.dg/tree-checker: Same.
5303 * timevar.def: Remove counter.
5305 2008-07-24 Sebastian Pop <sebastian.pop@amd.com>
5307 * Merge from mainline (135673:138072).
5309 Reverted the MIRO changes (from 2008-04-05) that are now
5310 tracked in the miro branch.
5311 * tree-bounds.c: Removed.
5312 * tree-bounds.h: Removed.
5314 Reverted the Condate changes (from 2006-07-04, 2007-03-20) that
5315 are now tracked in the condate branch.
5316 * tree-check.c: Removed.
5317 * tree-match.c: Removed.
5318 * condate.y: Removed.
5320 2008-07-24 Dwarakanath Rajagopal <dwarak.rajagopal@amd.com>
5322 * common.opt: New user flag -floop-block, -floop-strip-mine
5323 and -floop-interchange.
5324 * toplev.c (process_options): Enable -fgraphite pass if any one of the
5325 graphite loop optimization flags is turned on.
5326 * graphite.c (graphite_apply_transformations): Add flag_loop_block,
5327 flag_loop_strip_mine and flag_loop_interchange checks before
5329 * doc/invoke.texi: Remove -fgraphite and add -floop-block,
5330 -floop-strip-mine and -floop-interchange.
5331 * testsuite/gcc.dg/graphite/block-0.c: Add -floop-block and remove
5333 * testsuite/gcc.dg/graphite/scop-16.c: Ditto.
5334 * testsuite/gcc.dg/graphite/scop-17.c: Ditto.
5335 * testsuite/gcc.dg/graphite/scop-18.c: Ditto.
5337 2008-07-23 Jan Sjodin <jan.sjodin@amd.com>
5338 Sebastian Pop <sebastian.pop@amd.com>
5340 * cfgloopmanip.c (update_dominators_in_loop): Make it static.
5341 (create_empty_loop_on_edge): More fixes.
5342 * tree-phinodes.c (resize_phi_node): Extern.
5343 (unlink_phi_node, move_phi_node): New split from remove_phi_node.
5344 * cfghooks.c (update_dominator_information): New split from
5346 * tree-vectorizer.c (rename_variables_in_bb): Extern.
5347 * tree-dfa.c (collect_dfa_stats): Start walking the CFG on the
5348 successor of the function entry block.
5350 * graphite.c: Include pointer-set.h.
5351 (debug_loop_mapping, increment_loop_mapped_depths,
5352 get_loop_mapped_depth_for_num, get_loop_mapped_depth,
5353 set_loop_mapped_depth_for_num, set_loop_mapped_depth,
5354 swap_loop_mapped_depth_for_num, get_num_from_index,
5355 swap_loop_mapped_depth, loop_iv_stack_debug,
5356 loop_iv_stack_push, loop_iv_stack_pop, loop_iv_stack_get_iv,
5357 loop_iv_stack_get_iv_from_name, loop_iv_stack_debug,
5358 get_old_iv_from_ssa_name): New.
5359 (new_scop): Initialize SCOP_LOOPS_MAPPING.
5360 (free_scop): Free SCOP_LOOPS_MAPPING.
5361 (scop_record_loop): Record old ivs.
5362 (create_var_name): Removed.
5363 (initialize_cloog_names): Allocate double space in case strip mine
5364 applies to all loops once.
5365 (clast_name_to_gcc): Look up in the map ivstack passed in parameter.
5366 (clast_to_gcc_expression): Same. Implement more clast to gimple
5368 (graphite_create_new_loop): Pass in ivstack.
5369 (remove_all_edges): Pass in the construction_edge.
5370 (graphite_remove_iv): Removed.
5371 (graphite_rename_ivs, graphite_rename_ivs_stmt,
5372 remove_cond_exprs): Rewritten.
5373 (move_phi_nodes): New.
5374 (disconnect_virtual_phi_nodes, disconnect_cond_expr): Removed.
5375 (translate_clast): Pass in ivstack. Rewrite some cases.
5376 (set_cloog_options, debug_clast_stmt): New.
5377 (find_transform): Use set_cloog_options.
5378 (outermost_loop_layer): Removed.
5379 (get_construction_edge, collect_virtual_phis, find_vdef_for_var_in_bb,
5380 find_vdef_for_var_1, find_vdef_for_var, patch_phis_for_virtual_defs,
5381 mark_old_loops, remove_dead_loops): New.
5383 (graphite_trans_bb_move_loop): Call swap_loop_mapped_depth.
5384 (const_column_index, get_first_matching_sign_row_index,
5385 get_lower_bound_row, get_upper_bound_row, get_lower_bound,
5386 get_upper_bound): New.
5387 (graphite_trans_bb_strip_mine): Also update the iv map.
5389 * graphite.h (graphite_loops_mapping, GBB_LOOPS_MAPPING): New.
5390 (struct name_tree): Add a loop field.
5391 (struct scop): Add a graphite_loops_mapping field.
5392 (SCOP_LOOPS_MAPPING): New.
5393 (debug_clast_stmt): Declare.
5394 * lambda.h (find_induction_var_from_exit_cond): Declare.
5395 (lambda-code.c): (find_induction_var_from_exit_cond): Extern.
5396 * cfgloop.h (update_dominators_in_loop): Removed declaration.
5397 (create_empty_loop_on_edge): Updated.
5398 * tree-flow.h (remove_bb, resize_phi_node, move_phi_node,
5399 rename_variables_in_bb): Declare.
5400 * tree-cfg.c (remove_bb): Extern.
5402 * testsuite/gcc.dg/graphite/block-0.c: New.
5404 2008-07-21 Dwarakanath Rajagopal <dwarak.rajagopal@amd.com>
5405 Sebastian Pop <sebastian.pop@amd.com>
5407 * graphite.c (strip_mine_profitable_p): New.
5408 (graphite_trans_bb_block): Disable strip mining if not profitable.
5410 * testsuite/gcc.dg/graphite/scop-18.c: New.
5411 * testsuite/gcc.dg/graphite/scop-17.c: Fixed.
5412 * testsuite/gcc.dg/graphite/scop-16.c: Fixed.
5414 2008-07-17 Harsha Jagasia <harsha.jagasia@amd.com>
5415 Jan Sjodin <jan.sjodin@amd.com>
5416 Sebastian Pop <sebastian.pop@amd.com>
5418 * graphite.c (is_interchange_valid): New.
5419 (graphite_trans_bb_block): Check loop nest of basic block for legality
5422 * graphite.h (gbb_inner_most_loop_index, outer_most_loop_1,
5423 outer_most_loop, gbb_outer_most_loop_index): New.
5425 * tree-loop-linear.c (perfect_loop_nest_depth): Remove static.
5426 * tree-flow.h (perfect_loop_nest_depth): Declare as extern.
5427 * testsuite/gcc.dg/graphite/scop-16.c: New.
5428 * testsuite/gcc.dg/graphite/scop-17.c: New.
5430 2008-07-11 Tobias Grosser <grosser@fim.uni-passau.de>
5432 * graphite.c (scop_remove_ignoreable_gbbs): Also update bitmap.
5433 (graphite_trans_scop_block): Ignore SCoPs without bbs.
5435 2008-07-11 Tobias Grosser <grosser@fim.uni-passau.de>
5437 * graphite.c (new_scop): Initialize SCOP_EXIT.
5438 (scopdet_info): Add.
5439 (scopdet_bb_info): Rename from is_bb_addable. Cleanup, bugfixes.
5440 (build_scops_1): Cleanup, bugfixes.
5441 (build_scops): Cleanup.
5443 * testsuite/gcc.dg/graphite/scop-matmult.c: Remove duplicated code.
5444 * testsuite/gcc.dg/graphite/scop-15.c: Add SCoP numbers.
5446 2008-07-10 Harsha Jagasia <harsha.jagasia@amd.com>
5448 * testsuite/gfortran.dg/graphite/scop-1.f: Update to reduced test case.
5450 * testsuite/gfortran.dg/graphite/graphite.exp: Use
5451 DEFAULT_GRAPHITE_FLAGS.
5453 * testsuite/gcc.dg/graphite/scop-15.c: Update to reduced test case.
5455 2008-07-10 Harsha Jagasia <harsha.jagasia@amd.com>
5457 * graphite.c (scan_tree_for_params): Do not assert any more if
5458 MULT_EXPR parameter is negative.
5460 * testsuite/gfortran.dg/graphite/scop-1.f: New.
5462 * testsuite/gfortran.dg/graphite/graphite.exp: New.
5464 * testsuite/gcc.dg/graphite/scop-15.c: New.
5466 2008-07-10 Harsha Jagasia <harsha.jagasia@amd.com>
5468 * graphite.c (is_bb_addable): Fix segfault in spec gzip and reformat.
5470 2008-07-10 Tobias Grosser <grosser@fim.uni-passau.de>
5472 * graphite.c (graphite_trans_bb_swap_loops): Rename from
5473 graphite_swap_loops.
5474 (graphite_trans_bb_move_loop): New.
5475 (graphite_trans_bb_strip_mine): Rename from graphite_strip_mine_loop.
5476 (graphite_trans_bb_block): New.
5477 (graphite_trans_loop_block): New.
5478 (graphite_trans_scop_swap_1and2): Rename from
5479 graphite_trans_swap_1and2.
5480 (graphite_trans_scop_strip): Rename from graphite_trans_strip.
5481 (graphite_trans_scop_block): New.
5482 (graphite_apply_transformations): Rename from
5483 graphite_transformations.
5485 * testsuite/gcc.dg/graphite/scop-matmult.c: New.
5487 2008-07-10 Tobias Grosser <grosser@fim.uni-passau.de>
5489 * graphite.c (gbb_compare): New.
5490 (graphite_sort_gbbs): New.
5491 (gbb_can_be_ignored): New.
5492 (scop_remove_ignoreable_gbbs): New.
5493 (graphite_transformations): Cleanup and add
5494 scop_remove_ignoreable_gbbs.
5495 * lambda.h (lambda_vector_compare): New.
5497 2008-07-09 Tobias Grosser <grosser@fim.uni-passau.de>
5499 * graphite.c (print_graphite_bb): Correct printing of static schedule.
5500 (graphite_swap_loops): int -> unsigned
5501 (graphite_strip_mine_loop): int -> unsigned, Fix SCHEDULE
5502 (graphite_transformations): New.
5503 (graphite_transform_loops): Move to graphite_transformations.
5504 * graphite.h (gbb_nb_loops): Return unsigned.
5506 2008-07-04 Tobias Grosser <grosser@fim.uni-passau.de>
5508 * graphite.c (scan_tree_for_params): Fix insertion of parameters into
5509 the domain matrix. This makes scop-0.c work again.
5511 2008-06-20 Richard Guenther <rguenther@suse.de>
5513 * graphite.h: Adjust copyright to GPLv3.
5514 * graphite.c: Likewise.
5515 (stmt_simple_memref_for_scop_p): Split out from ...
5516 (stmt_simple_for_scop_p): ... here. Fix handling of calls
5518 (get_bb_type): Optimize.
5520 (is_bb_addable): Fix memleak, replace is_pred call with
5522 (build_scops): Use current_loops.
5523 (param_index): Fix memleak.
5525 2008-06-20 Konrad Trifunovic <konrad.trifunovic@inria.fr>
5527 * graphite.c: Fix formatting.
5529 2008-06-19 Konrad Trifunovic <konrad.trifunovic@inria.fr>
5531 * graphite.c (new_scop): Memory allocation for SCOP_{NEWIVS, OLDIVS}.
5532 (free_scop): Memory deallocation for SCOP_NEWIVS, SCOP_OLDIVS.
5533 (create_var_name, save_var_name): Newly defined functions.
5534 (initialize_cloog_names): Part of the code factored out to
5536 (clast_to_gcc_expression): Now handles the case of clast_red_sum
5537 in clast_reduction statement.
5538 (graphite_create_new_loop): Now takes a new parameter
5540 (translate_clast): Now also takes the context_loop and bb_exit
5541 parameters. Rewritten the code so that it creates a gimple code
5542 inside the given context.
5543 (outermost_loop_layer, graphite_remove_iv, graphite_rename_ivs,
5544 remove_cond_expr, disconnect_cond_expr,
5545 disconnect_virtual_phi_nodes): Newly defined functions.
5546 * graphite.h (struct scop): added old_ivs vector.
5547 SCOP_OLDIVS: New macro.
5549 2008-06-19 Sebastian Pop <sebastian.pop@amd.com>
5551 * cfgloopmanip.c: Add missing function comments, fix formatting.
5553 2008-06-18 Konrad Trifunovic <konrad.trifunovic@inria.fr>
5555 * cfgloopmanip.c (update_dominators_in_loop): Defined.
5556 (create_empty_loop_on_edge): Defined.
5557 * tree-parloops.c (canonicalize_loop_ivs): Returns tree
5559 * cfgloop.h (create_empty_loop_on_edge): Declared as extern.
5560 (update_dominators_in_loop): Declared as extern
5561 * tree-flow.h (canonicalize_loop_ivs): Declared as extern.
5563 2008-06-16 Tobias Grosser <grosser@fim.uni-passau.de>
5565 * graphite.c (print_graphite_bb): Allow changing number of loops
5567 (initialize_cloog_names): Allow changing number of loops.
5568 (build_cloog_prog): Simplify.
5569 (find_transform): Enable cloog option --strides.
5570 (graphite_swap_loops): New.
5571 (graphite_strip_mine_loop): New.
5572 (graphite_trans_swap_1and2): New.
5573 (graphite_trans_strip): New.
5574 (graphite_transform_loops): Add graphite_trans_strip.
5575 * graphite.h (scop_max_loop_depth): New.
5577 2008-06-15 Tobias Grosser <grosser@fim.uni-passau.de>
5579 * graphite.c (build_scop_iteration_domain): Remove forgotten
5580 line. (Fixes compile)
5582 2008-06-15 Tobias Grosser <grosser@fim.uni-passau.de>
5584 * graphite.c (print_graphite_bb): Add output of GBB_LOOPS.
5585 (build_graphite_bb): Add GBB_LOOPS and GBB_DOMAIN and reorder.
5586 (build_bb_loops): New.
5587 (graphite_transform_loops): Add build_bb_loops.
5588 (schedule_to_scattering): Use gbb_nb_loops to support changing loop
5590 * graphite.h (graphite_bb): Add loops.
5591 (gbb_nb_loops): New.
5592 (gbb_loop_at_index): New.
5593 (gbb_loop_index): New.
5594 (nb_params_in_scop): Renamed to scop_nb_params. Updated all functions
5595 using nb_params_in_scop.
5597 2008-06-14 Tobias Grosser <grosser@fim.uni-passau.de>
5599 * graphite.c (print_graphite_bb): Adapt to minimized schedule.
5600 (build_scop_canonical_schedules): Build minimized schedule.
5601 (schedule_to_scattering): Adapt to minimized schedule.
5602 * graphite.h (graphite_bb): Add/Update descriptions.
5604 2008-06-14 Adrien Eliche <aeliche@isty.uvsq.fr>
5605 Tobias Grosser <grosser@fim.uni-passau.de>
5607 * graphite.c (print_graphite_bb): Add condition printing.
5609 (dump_gbb_conditions): New.
5610 (build_scop_conditions_1): New.
5611 (build_scop_conditions): New.
5612 * graphite.h (graphite_bb): Add conditions.
5614 2008-06-14 Tobias Grosser <grosser@fim.uni-passau.de>
5616 * graphite.c (print_graphite_bb):
5617 (free_graphite_bb): New.
5618 (free_scop): Free bbs.
5619 (get_bb_type): Free doms.
5620 (build_scop_context): Free context matrix.
5621 (build_loop_iteration_domains): Remove unused code.
5622 (build_cloog_prog): Free scattering function and blocklist.
5623 (find_transform): Free options.
5625 2008-06-13 Tobias Grosser <grosser@fim.uni-passau.de>
5627 * graphite.c (loop_body_to_cloog_stmts): Rename to add_bb_domains.
5628 Remove unnecessery cloog data structures. Make a copy of the domain
5629 (setup_cloog_loop): Rename to build_loop_iteration_domains. Remove
5630 unnecessary cloog data structures. Fix memory leaks. Remove insert
5631 into SCOP_LOOP2CLOOG_LOOP as the inserted CloogLoops will never be
5633 (build_scop_iteration_domain): Remove unnecessary cloog
5634 data structures. Fix memory leaks.
5635 (graphite_transform_loops): Disable build_scop_dynamic_schedules as it
5636 uses SCOP_LOOP2CLOOG_LOOP, that is at the moment not working.
5638 2008-06-12 Tobias Grosser <grosser@fim.uni-passau.de>
5640 * graphite.c (find_scop_params): Remove initialize_cloog_names.
5642 2008-06-12 Tobias Grosser <grosser@fim.uni-passau.de>
5644 * graphite.c (end_scop): Style fix.
5645 (schedule_to_scattering): Style and comment fix.
5647 2008-06-12 Tobias Grosser <grosser@fim.uni-passau.de>
5648 * graphite.c (print_graphite_bb): Fix definiton of
5649 schedule_to_scattering.
5650 (initialize_cloog_names): Change nb_scattdims to max loop
5652 (schedule_to_scattering): Take parameter for number of scattering
5654 (build_cloog_prog): Only build as much scattering dimensions as
5657 2008-06-12 Tobias Grosser <grosser@fim.uni-passau.de>
5659 * graphite.c (end_scop): Disable bb splitting. Fixes SIGSEGV
5660 in polyhedron/aermod.f90.
5662 2008-06-11 Tobias Grosser <grosser@fim.uni-passau.de>
5663 Dwarak Rajagopal <dwarak.rajagopal@amd.com>
5664 Harsha Jagasia <harsha.jagasia@amd.com>
5666 * graphite.c (is_bb_addable): Fix segfault.
5668 2008-06-10 Tobias Grosser <grosser@fim.uni-passau.de>
5670 * graphite.c (is_bb_addable): Fix memory leak, handling of loops
5671 with multiple exits and conditional handling in edge cases.
5672 (is_loop_exit): Fix memory leak. (Forgotten in last commit)
5674 * testsuite/gcc.dg/graphite/scop-14.c: New.
5676 2008-06-06 Tobias Grosser <grosser@fim.uni-passau.de>
5677 Adrien Eliche <aeliche@isty.uvsq.fr>
5679 * graphite.c (is_bb_addable): Add more comments and enhance
5680 readablity of the source code. Fix memory leak.
5681 (is_loop_exit): Fix memory leak.
5683 2008-06-05 Tobias Grosser <grosser@fim.uni-passau.de>
5685 * graphite.c (first_loop_in_scop): Deleted.
5686 (setup_cloog_loop): Only walk the loop chain for inner loops.
5687 (build_scop_iteration_domain): Execute setup_cloog_loop for
5688 all loops in the first layer.
5690 2008-06-05 Tobias Grosser <grosser@fim.uni-passau.de>
5692 * graphite.c (scan_tree_for_params): Change the way params are
5693 added to be indepenent of the number of loops.
5694 (setup_cloog_loop): Revert to short matrix format. Fix parameter
5696 (build_cloog_prog): Revert to short matrix format.
5698 2008-06-05 Sebastian Pop <sebastian.pop@amd.com>
5699 Dwarak Rajagopal <dwarak.rajagopal@amd.com>
5701 * tree-loop-fusion.c (fuse_loops): Fix uninitialized variable
5704 2008-06-05 Sebastian Pop <sebastian.pop@amd.com>
5706 * graphite.c (nb_data_refs_in_scop): New.
5707 (graphite_transform_loops): Print more stats: number of
5708 loops, basic blocks and data references per scop.
5710 2008-06-04 Sebastian Pop <sebastian.pop@amd.com>
5711 Jan Sjodin <jan.sjodin@amd.com>
5713 * graphite.c (loop_affine_expr, idx_record_params,
5714 find_scop_parameters, setup_cloog_loop): Use instantiate_scev
5715 instead of instantiate_parameters.
5717 2008-06-04 Tobias Grosser <grosser@fim.uni-passau.de>
5719 * graphite.c (schedule_to_scattering): Fix scattering dimensions,
5720 add support for parameters, add STATIC_SCHEDULE at the right places,
5723 2008-06-04 Tobias Grosser <grosser@fim.uni-passau.de>
5725 * graphite.c (build_scop_loop_nests): Only add the loops, that
5726 are contained completely in the SCoP.
5727 (build_cloog_prog): Disable scattering, until schedule_to_scattering
5728 and the domains are fixed.
5729 (build_scop_canonical_schedules): Add support for bbs not contained
5732 2008-06-04 Tobias Grosser <grosser@fim.uni-passau.de>
5734 * graphite.h (scop_contains_loop): Update comments to match
5735 the actual behavior.
5736 (scop_contains_loop): New.
5737 * graphite.c (schedule_to_scattering): Use scop_contains_loop.
5739 2008-06-04 Sebastian Pop <sebastian.pop@amd.com>
5741 * graphite.c (get_bb_type): On function body, i.e. loop_0,
5742 don't mark blocks as GBB_LOOP_SING_EXIT_HEADER, mark them
5745 2008-06-04 Sebastian Pop <sebastian.pop@amd.com>
5746 Tobias Grosser <grosser@fim.uni-passau.de>
5748 * graphite.c (graphite_transform_loops): Early return when
5749 there are no loops in the function.
5751 2008-05-31 Sebastian Pop <sebastian.pop@amd.com>
5752 Jan Sjodin <jan.sjodin@amd.com>
5754 * graphite.c (scan_tree_for_params, setup_cloog_loop): Compute the
5755 offset of the last loop.
5756 (setup_cloog_loop): Copy the entire outer constraint matrix.
5758 2008-05-31 Sebastian Pop <sebastian.pop@amd.com>
5759 Jan Sjodin <jan.sjodin@amd.com>
5761 * graphite.c (stmt_in_scop_p, function_parameter_p,
5762 invariant_in_scop_p): Removed.
5763 (scan_tree_for_params): Can be used with no constraint
5764 matrix for gathering parameters.
5765 (idx_record_params): Don't use idx_record_param, instead use
5766 scan_tree_for_params.
5767 (find_scop_parameters): Same.
5768 (setup_cloog_loop, build_scop_iteration_domain, build_cloog_prog):
5769 Fix the size of loop domains.
5770 (schedule_to_scattering): Exit when the outer loop is not in scop.
5771 (find_transform): Enable build_cloog_prog.
5773 2008-05-31 Sebastian Pop <sebastian.pop@amd.com>
5774 Jan Sjodin <jan.sjodin@amd.com>
5776 * graphite.c (schedule_to_scattering): Make scattering domains
5777 uniformly of the same size, as required by CLooG 0.14.0 and before.
5779 2008-05-31 Sebastian Pop <sebastian.pop@amd.com>
5780 Jan Sjodin <jan.sjodin@amd.com>
5782 * graphite.c (schedule_to_scattering): Rewrite, correct the
5783 translation of the scheduling function to scattering.
5784 (build_cloog_prog): Call schedule_to_scattering only once.
5785 * graphite.h (scop_loop_index): Do not fail for loops not
5786 in the scop: return -1.
5788 2008-05-30 Tobias Grosser <grosser@fim.uni-passau.de>
5790 * graphite.c (build_graphite_bb): Initialize GBB_DOMAIN.
5791 (loop_body_to_cloog_stmts): Export GBB_DOMAIN.
5792 (setup_cloog_loop): Export GBB_DOMAIN.
5793 (build_cloog_prog): New. Create new CLOOG_PROG, which should be
5794 able to rebuild the original control flow.
5795 * graphite.h (graphite_bb): Add domain field and access macro.
5798 2008-05-30 Sebastian Pop <sebastian.pop@amd.com>
5800 * graphite.c (debug_gbb): New.
5801 (print_scop, build_graphite_bb): Use SCOP_BBS.
5802 (build_scop_bbs): Reimplemented.
5803 (dfs_bb_in_scop_p): Removed.
5804 (build_scop_loop_nests): Reorder loops inserted in
5805 SCOP_LOOP_NEST: outer loops should come first.
5806 (build_scop_canonical_schedules): Reinitialize at zero
5807 the components of the SCOP_STATIC_SCHEDULE for the loops
5808 that have already been parsed.
5810 * graphite.h (debug_gbb): Declared.
5812 2008-05-30 Sebastian Pop <sebastian.pop@amd.com>
5813 Jan Sjodin <jan.sjodin@amd.com>
5815 * graphite.c (create_empty_loop): Renamed graphite_create_new_loop.
5816 (graphite_loop_to_gcc_loop): Removed.
5817 (remove_all_edges): New.
5818 (graphite_stmt_to_gcc_stmt): Renamed translate_clast.
5819 (gloog): Remove useless code.
5821 2008-05-29 Tobias Grosser <grosser@fim.uni-passau.de>
5823 * graphite.c (get_bb_type): Reworked. We distinguish between
5824 loops with one or multiple exits.
5825 (is_loop_exit): New.
5827 (is_bb_addable): Rework condition handling, now support for case
5828 case statements and loops with multiple exits.
5830 * testsuite/gcc.dg/graphite/scop-11.c: New.
5831 * testsuite/gcc.dg/graphite/scop-12.c: New.
5832 * testsuite/gcc.dg/graphite/scop-13.c: New.
5834 2008-05-29 Tobias Grosser <grosser@fim.uni-passau.de>
5836 * graphite.c (dot_all_scops_1): Fix some colors. Reuse colors, if
5837 we have too many colors.
5839 2008-05-22 Sandeep Maram <smaram_b04@iiita.ac.in>
5841 * doc/invoke.texi (-ftree-loop-fusion): Document.
5842 * tree-pass.h (pass_loop_fusion): Declared.
5843 * tree-loop-fusion.c: New.
5844 * timevar.def (TV_TREE_LOOP_FUSION): Declared.
5845 * tree-data-ref.c (find_data_references_in_loop): Make extern.
5846 * tree-data-ref.h (find_data_references_in_loop): Declared.
5847 * common.opt (ftree-loop-fusion): Declared.
5848 * Makefile.in (tree-loop-fusion.o): Added rule and to OBJS-common.
5850 2008-05-21 Sebastian Pop <sebastian.pop@amd.com>
5852 * graphite.c (build_access_matrix): Fix typo from the merge.
5854 2008-05-20 Sebastian Pop <sebastian.pop@amd.com>
5856 * Merge from mainline (130800:135673).
5858 2008-05-07 Sebastian Pop <sebastian.pop@amd.com>
5860 * graphite.c (end_scop): The exit of the scop is not part of the scop.
5861 Update dominators after splitting.
5863 2008-05-07 Sebastian Pop <sebastian.pop@amd.com>
5865 * graphite.c (is_bb_addable): Return the harmful statement.
5866 Factor up some code.
5867 (end_scop): New. Splits end of scope bbs on a harmful statement.
5868 (build_scops_1): Call end_scop.
5870 2008-05-07 Sebastian Pop <sebastian.pop@amd.com>
5872 * graphite.c: (succs_at_same_depth, end_scop, all_preds_visited_p,
5873 all_succs_visited_p, start_new_scop_for_each_succ, start_new_scop,
5874 add_dominators_to_open_scops, stop_last_open_scop, scop_end_loop,
5875 build_scops_1): Removed.
5876 (build_scops_2): Renamed build_scops_1.
5878 2008-05-06 Sebastian Pop <sebastian.pop@amd.com>
5880 * graphite.c: Fix formatting.
5882 2008-05-06 Tobias Grosser <grosser@fim.uni-passau.de>
5884 * graphite.c (get_bb_type): New.
5886 (build_scops_2): New.
5887 (is_bb_addable): New.
5888 (build_scops): Switch the scop detection.
5889 (build_scop_bbs): Add entry bb to scop.
5890 * graphite.h (struct scop): Update comment.
5892 2008-05-06 Tobias Grosser <grosser@fim.uni-passau.de>
5894 * graphite.c (dot_all_scops_1): Fix some incorrect colors and add
5897 2008-05-06 Tobias Grosser <grosser@fim.uni-passau.de>
5899 * testsuite/gcc.dg/graphite/scop-1.c: Update.
5900 * testsuite/gcc.dg/graphite/scop-2.c: Update.
5901 * testsuite/gcc.dg/graphite/scop-4.c: Update.
5902 * testsuite/gcc.dg/graphite/scop-5.c: Add.
5903 * testsuite/gcc.dg/graphite/scop-6.c: Add.
5905 2008-05-06 Sebastian Pop <sebastian.pop@amd.com>
5907 * testsuite/gcc.dg/graphite/scop-0.c: Add.
5908 * testsuite/gcc.dg/graphite/scop-7.c: Add.
5909 * testsuite/gcc.dg/graphite/scop-8.c: Add.
5910 * testsuite/gcc.dg/graphite/scop-9.c: Add.
5911 * testsuite/gcc.dg/graphite/scop-10.c: Add.
5913 2008-05-06 Tobias Grosser <grosser@fim.uni-passau.de>
5915 * graphite.c (scop_affine_expr): Renamed to loop_affine_expr.
5916 Check affine expressions depending on the outermost loop
5918 (stmt_simple_for_scop_p): Same.
5919 (harmfule_stmt_in_scop): Same.
5921 2008-04-28 Tobias Grosser <grosser@fim.uni-passau.de>
5923 * graphite.c (dot_all_scops): Remove incorrect difficult bb coloring,
5924 mark entry and exit, that are not part of the SCoP and update HTML
5927 2008-04-25 Sebastian Pop <sebastian.pop@amd.com>
5929 * graphite.c (basic_block_simple_for_scop_p): Renamed
5931 (save_scop, preds_at_same_depth, test_for_scop_bound): Removed.
5932 (add_dominators_to_open_scops, build_scops_1): Reimplemented.
5933 (all_preds_visited_p, all_succs_visited_p,
5934 start_new_scop_for_each_succ, start_new_scop, stop_last_open_scop,
5935 scop_end_loop): New.
5936 (build_scops): Do not use dfs_enumerate_from.
5938 * testsuite/gcc.dg/graphite/scop-{1,2,4}.c: Updated.
5940 2008-04-23 Sebastian Pop <sebastian.pop@amd.com>
5942 * graphite.c: Add comments to functions that are missing a
5944 (graphite_create_iv): Removed. Merged in graphite_loop_to_gcc_loop.
5946 2008-04-23 Sebastian Pop <sebastian.pop@amd.com>
5948 * graphite.c (nb_params_in_scop): Moved...
5949 (graphite_bb_from_bb, loop_body_to_cloog_stmts): New.
5950 (setup_cloog_loop): Call loop_body_to_cloog_stmts.
5951 (clast_to_gcc_expression): Reduce column size to less than 80.
5952 (graphite_create_iv): Return the new name of the IV.
5953 (find_transform): Set options->esp and options->cpp.
5954 (gloog): Comment out the invalidation of the old loop code.
5955 (initialize_dependence_polyhedron): Replace scop_nb_params with
5958 * graphite.h (nb_params_in_scop): ... here.
5959 (scop_nb_params): Removed.
5960 (loop_domain_dim): Return something even when the loop was not
5961 found in the hash table: avoid ICEing on all the graphite.exp
5964 2008-04-14 Konrad Trifunovic <konrad.trifunovic@inria.fr>
5966 * tree-chrec.c (for_each_scev_op): SCEV can have 3 operands.
5968 * graphite.c (build_scop_dynamic_schedules): Schedule is built
5969 according to nesting level.
5970 (find_scop_parameters): Call instantiate_parameters.
5971 (scan_tree_for_params): Extend it to handle general affine bounds.
5972 Inner loop bound can depend on outer loop induction variable.
5973 (setup_cloog_loop): tmp variable is allocated on stack. Call
5974 instantiate_parameters with respect to outermost_loop_in_scop.
5975 (loop_domain_dim, ref_nb_loops, loop_iteration_vector_dim): moved to
5977 (create_empty_loop): Function loopify should be given edge
5978 probability, instead of edge frequency. Dominance relation from
5979 switch_bb to loop_header.
5980 (clast_to_gcc_expression): Added handling of clast_reduction node.
5981 (gloog): New functionality for removing old loop.
5982 (test_dependence): Factored out from build_rdg_all_levels.
5983 (build_rdg_all_levels): Dependence testing factored out to
5984 test_dependence function.
5986 * graphite.h (struct graphite_bb): Extended with dynamic_schedule.
5987 (loop_domain_dim, ref_nb_loops, loop_iteration_vector_dim): Moved
5990 2008-04-07 Sebastian Pop <sebastian.pop@amd.com>
5992 * graphite.c (free_scop, param_index, initialize_cloog_names,
5993 nb_params_in_scop): Use name_tree map instead of just a tree
5994 for keeping track of the variable name associated to that tree.
5995 (create_empty_loop, gmp_cst_to_tree, clast_name_to_gcc,
5996 clast_to_gcc_expression, graphite_create_iv,
5997 graphite_loop_to_gcc_loop, graphite_cond_to_gcc_cond,
5998 graphite_stmt_to_gcc_stmt): New.
5999 (gloog): Call these.
6000 * graphite.h (struct name_tree): New.
6001 (struct scop): Use name_tree instead of tree for params.
6002 Store a vector of name_tree for new_ivs.
6004 (scop_nb_params): Use name_tree instead of tree.
6006 2008-04-05 Alexander Lamaison <awl03@doc.ic.ac.uk>
6007 Sebastian Pop <sebastian.pop@amd.com>
6009 * tree-bounds.c: New.
6010 * tree-bounds.h: New.
6011 * tree-pass.h: Declare pass_bounds_early and pass_bounds_late.
6012 * passes.c: Schedule pass_bounds_early, pass_bounds_late.
6013 * builtins.c (expand_builtin_alloca): Add flag_bounds as for
6017 * c-cppbuiltin.c: Same.
6021 * tree-outof-ssa.c: Same.
6023 * Makefile.in: Same.
6025 2008-03-15 Antoniu Pop <antoniu.pop@gmail.com>
6026 Sebastian Pop <sebastian.pop@amd.com>
6028 * tree-loop-distribution.c (remaining_stmts,
6029 upstream_mem_writes): Removed static variables.
6030 (copy_loop_before, create_bb_after_loop,
6031 mark_nodes_having_upstream_mem_writes, free_rdg_components,
6032 rdg_build_components, rdg_build_partitions,
6033 dump_rdg_partitions): Extern.
6034 (generate_loops_for_partition, generate_code_for_partition): Do not
6036 (already_processed_vertex_p, predecessor_has_mem_write,
6037 mark_nodes_having_upstream_mem_writes, has_upstream_mem_writes,
6038 rdg_flag_all_uses, rdg_flag_uses, rdg_flag_vertex_and_dependent,
6039 rdg_flag_loop_exits, rdg_flag_similar_memory_accesses,
6040 build_rdg_partition_for_component, rdg_build_partitions, ldist_gen):
6041 Pass remaining_stmts and upstream_mem_writes as parameters.
6042 (rdg_component): Moved...
6043 (build_rdg_partition_for_component): Do not aggregate components when
6044 flag_streamize_loops is set.
6045 (gen_sequential_loops): New.
6046 (ldist_gen): Call gen_sequential_loops.
6048 * tree-pass.h (pass_loop_streamization): Declared.
6050 * omp-low.c (expand_omp_sections): Call add_bb_to_loop on created
6051 basic blocks when loops structures exist.
6053 * builtin-types.def (BT_FN_VOID_PTR_PTR_INT): New.
6055 * tree-ssa-loop-ivopts.c (expr_invariant_in_region_p): New.
6057 * tree-parloops.c (take_address_of, eliminate_local_variables_1,
6058 eliminate_local_variables_stmt, eliminate_local_variables,
6059 separate_decls_in_loop_name, separate_decls_in_loop_stmt,
6060 separate_decls_in_loop, gen_parallel_loop): Make them work on a region
6061 of code delimited by two edges in the CFG.
6062 (separate_decls_in_loop_name): Renamed separate_decls_in_region_name.
6063 (separate_decls_in_loop_stmt): Renamed separate_decls_in_region_stmt.
6064 (separate_decls_in_loop): Renamed separate_decls_in_region. Isolate
6065 the case of parallelisation of reductions.
6066 (create_loop_fn): Extern.
6067 (create_omp_parallel_region): New.
6069 * tree-data-ref.c (dump_data_dependence_relation): Don't call
6070 dump_data_reference for printing dra and drb.
6071 (create_rdg_edge_for_ddr, create_rdg_edges_for_scalar): Initialise
6073 (build_rdg): Don't call free_dependence_relations for the moment, as
6074 we attach dependence relations on each edge of the RDG.
6077 * tree-data-ref.h (rdg_component): ...here.
6078 (struct rdg_edge): New field ddr_p relation.
6079 (RDGE_RELATION): New.
6080 (create_bb_after_loop, copy_loop_before,
6081 mark_nodes_having_upstream_mem_writes, rdg_build_components,
6082 rdg_build_partitions, dump_rdg_partitions,
6083 free_rdg_components): Declared.
6085 * omp-builtins.def (BUILT_IN_GOMP_STREAM_ALIGN_PUSH,
6086 BUILT_IN_GOMP_STREAM_ALIGN_POP): New.
6088 * tree-loop-streamization.c: New.
6090 * tree-flow.h (gather_blocks_in_sese_region, create_loop_fn,
6091 create_omp_parallel_region, expr_invariant_in_region_p): Declared.
6093 * Makefile.in (tree-loop-streamization.o): Added to OBJS-common.
6095 * tree-cfg.c (gather_blocks_in_sese_region): Extern.
6097 * passes.c: Schedule pass_loop_streamization.
6099 2008-03-08 Tobias Grosser <grosser@fmi.uni-passau.de>
6101 * graphite.c (dot_all_scops_1): Fix formatting for difficult bbs and
6104 2008-03-07 Tobias Grosser <grosser@fim.uni-passau.de>
6106 * graphite.c (dot_all_scops): Update formatting.
6107 Bbs can now be part of more than one SCoP.
6109 2008-03-04 Sebastian Pop <sebastian.pop@amd.com>
6111 * graphite.c (new_loop_to_cloog_loop_str, setup_cloog_loop): Fix
6113 (loop_domain_dim): Check for unregistered toplev SCOP loop.
6114 * graphite.h (loop_to_cloog_loop): New.
6116 2008-03-04 Konrad Trifunovic <konrad.trifunovic@inria.fr>
6118 * graphite.c (loop_domain_dim, ref_nb_loops,
6119 loop_iteration_vector_dim): New.
6120 (build_access_matrix_with_af, build_access_matrix,
6121 initialize_dependence_polyhedron): Fixed for new matrix layout.
6122 No longer assume that all iteration domains are of the same
6125 2008-03-02 Sebastian Pop <sebastian.pop@amd.com>
6127 * tree-scalar-evolution.c (instantiate_parameters_1): An SSA_NAME
6128 defined in a loop at depth 0 is invariant.
6129 * tree-chrec.c (evolution_function_is_invariant_rec_p): Ditto.
6130 * tree-ssa-loop-ivopts.c (expr_invariant_in_loop_p): Should never
6131 be called at loop depth 0.
6133 * graphite.c (basic_block_simple_for_scop_p): Take the scop as
6135 (dot_all_scops_1): Update use of basic_block_simple_for_scop_p.
6136 (down_open_scop): Removed.
6137 (loop_in_scop_p): Redefined.
6138 (scop_affine_expr): New argument: scop.
6139 (stmt_simple_for_scop_p): New argument: scop. RETURN_EXPR is not
6140 a harmful statement ending a scop.
6141 (basic_block_simple_for_scop_p): New argument: scop.
6142 (get_loop_start): Removed.
6143 (new_scop): Initialize SCOP_LOOPS.
6144 (free_scop): Free SCOP_LOOPS.
6145 (succs_at_same_depth, preds_at_same_depth): New.
6146 (end_scop): Test the validity of a scop.
6147 (add_dominators_to_open_scops): New.
6148 (test_for_scop_bound): Call add_dominators_to_open_scops.
6149 Add cases for opening and closing multiple scops.
6150 (build_scops, build_scop_bbs): Iterate over basic blocks in
6152 (build_graphite_bb): Pass scop directly.
6153 (dfs_bb_in_scop_p): New.
6154 (scop_record_loop): Use SCOP_LOOPS for not recording the same loop
6156 (nb_loops_around_gb): Use loop_in_scop_p.
6157 (schedule_to_scattering): Disabled for the moment the code computing
6158 the "textual order for outer loop".
6160 * graphite.h (struct scop): New field loops.
6162 (scop_loop_index): Test that the given loop belongs to SCOP_LOOPS.
6164 * testsuite/gcc.dg/graphite/scop-{1,...,7}.c: Updated.
6166 2008-02-27 Antoniu Pop <antoniu.pop@gmail.com>
6167 Sebastian Pop <sebastian.pop@amd.com>
6169 * builtin-types.def (BT_FN_PTR_SIZE_UINT, BT_FN_BOOL_PTR): New.
6170 * common.opt (fstreamize-loops): New.
6171 * omp-builtins.def (BUILT_IN_GOMP_STREAM_CREATE,
6172 BUILT_IN_GOMP_STREAM_PUSH, BUILT_IN_GOMP_STREAM_HEAD,
6173 BUILT_IN_GOMP_STREAM_POP, BUILT_IN_GOMP_STREAM_EOS_P,
6174 BUILT_IN_GOMP_STREAM_SET_EOS, BUILT_IN_GOMP_STREAM_DESTROY): New.
6176 2008-02-22 Konrad Trifunovic <konrad.trifunovic@inria.fr>
6178 * tree-data-ref.c (build_empty_rdg): New.
6179 (build_rdg): Use it.
6180 * tree-data-ref.h (build_empty_rdg): Declared.
6181 * graphite.c (free_scop): Free SCOP_LOOP2CLOOG_LOOP.
6182 (find_vertex_for_stmt): Removed.
6183 (build_rdg_all_levels): Use build_empty_rdg and rdg_vertex_for_stmt.
6185 2008-02-21 Sebastian Pop <sebastian.pop@amd.com>
6187 * tree-loop-distribution.c (generate_builtin): After cancelling the
6188 loop tree, also delete basic blocks.
6189 (rdg_flag_uses): Stop recursion when a vertex has already been
6192 2008-02-15 Konrad Trifunovic <konrad.trifunovic@inria.fr>
6194 * graphite.c (build_scop_alpha): Removed.
6195 (graphite_transform_loops): Add a dummy call to build_all_rdg_levels
6196 and dump_dependence_graph to avoid compiler warnings.
6198 2008-02-14 Konrad Trifunovic <konrad.trifunovic@inria.fr>
6200 * tree-data-ref.c (dr_may_alias_p, create_rdg_vertices): Extern.
6201 * tree-data-ref.h (dr_may_alias_p, create_rdg_vertices): Declared.
6202 * graphite.c (new_loop_to_cloog_loop_str, hash_loop_to_cloog_loop,
6203 eq_loop_to_cloog_loop, del_loop_to_cloog_loop): New.
6204 (new_scop, setup_cloog_loop): Initialize SCOP_LOOP2CLOOG_LOOP.
6205 (initialize_dependence_polyhedron, find_vertex_for_stmt,
6206 initialize_data_dependence_polyhedron, is_empty_polyhedron,
6207 statement_precedes_p, build_rdg_all_levels, build_scop_alpha,
6208 dump_dependence_graph): New.
6209 * graphite.h (struct graphite_bb): New field compressed_alpha_matrix.
6211 (struct scop): New field loop2cloog_loop.
6212 (SCOP_LOOP2CLOOG_LOOP, struct data_dependence_polyhedron,
6213 RDGE_DDP, ddp_p, struct loop_to_cloog_loop_str): New.
6215 2008-02-10 Konrad Trifunovic <konrad.trifunovic@inria.fr>
6217 * graphite.c (build_graphite_bb): Fix initialization
6218 of the graphite basic block.
6220 2008-02-05 Sebastian Pop <sebastian.pop@amd.com>
6222 * graphite.c (scan_tree_for_params): Rewrite for the new layout of
6223 loop domain matrix. Pass in the number of loops contained in the
6225 (nb_loops_around_gb): Moved before setup_cloog_loop that uses it.
6226 (setup_cloog_loop): Rewrite for the new layout of loop domain matrix:
6227 loops that are not surrounding the current loop are not represented
6228 in the domain constraint matrix.
6229 (build_scop_iteration_domain): Initial domain constraint matrix
6230 contains only the eq/ineq, cst, and scop parameters columns.
6232 2008-01-29 Tobias Grosser <grosser@fim.uni-passau.de>
6234 * graphite.c (schedule_to_scattering, nb_loops_around_gb): New.
6235 (print_graphite_bb): Print scattering.
6237 2008-01-29 Tobias Grosser <grosser@fim.uni-passau.de>
6239 * graphite.c (initialize_cloog_names): Initialize names of
6240 scattering variables.
6242 2009-01-29 Tobias Grosser <grosser@fim.uni-passau.de>
6244 * graphite.c (dot_all_scops_1): Disable debug output while
6247 2008-01-29 Tobias Grosser <grosser@fim.uni-passau.de>
6249 * graphite.c (find_transform): Change cloog output language to C.
6251 2008-01-27 Sebastian Pop <sebastian.pop@amd.com>
6253 * tree-loop-distribution.c (generate_memset_zero,
6254 generate_builtin, generate_code_for_partition,
6255 rdg_flag_all_uses): New.
6256 (rdg_flag_uses): Gather in the same partition the statements defining
6257 the VUSES of the current statement.
6258 (rdg_flag_similar_stores): Renamed rdg_flag_similar_memory_accesses.
6259 Gather in the same partition not only the stores to the same memory
6260 access, but also the reads.
6261 (ldist_generate_loops): Renamed ldist_gen.
6263 2008-01-24 Sebastian Pop <sebastian.pop@amd.com>
6264 Tobias Grosser <grosser@fmi.uni-passau.de>
6266 * graphite.c (setup_cloog_loop): Chain all cloog loops with the
6267 next pointer, don't use the inner pointer.
6269 2008-01-20 Tobias Grosser <grosser@fmi.uni-passau.de>
6271 * graphite.c (dot_all_scops, dot_all_scops_1): New.
6272 (find_transform): Call dot_all_1.
6273 * graphite.h (dot_all_scops): Declared.
6275 2007-12-14 Sebastian Pop <sebastian.pop@amd.com>
6277 * tree-loop-distribution.c: Fix apsi.f ICE.
6278 (create_bb_after_loop): New.
6279 (generate_loops_for_partition): Use it.
6280 * testsuite/gfortran.dg/ldist-1.f90: New.
6282 * tree-data-ref.c (dot_rdg): Use /tmp/rdg.dot for dotty format.
6283 * graphite.c (dot_scop): Use /tmp/scop.dot for dotty format.
6285 2007-12-13 Tobias Grosser <grosser@fmi.uni-passau.de>
6287 * graphite.c (find_transform): Dump cloog program sent to cloog.
6289 2007-12-13 Tobias Grosser <grosser@fmi.uni-passau.de>
6291 * graphite.c (initialize_cloog_names): Initialize cloog
6294 2007-12-13 Tobias Grosser <grosser@fmi.uni-passau.de>
6296 * graphite.c (build_scop_context): Fix typo, for the matrix
6297 format: insert '0 >= 0' instead of '-1 >= 0'.
6299 2007-12-13 Sebastian Pop <sebastian.pop@amd.com>
6301 * Fix merge problems.
6303 2007-12-13 Sebastian Pop <sebastian.pop@amd.com>
6305 * graphite.c (setup_cloog_loop): Fix typo.
6307 2007-12-12 Sebastian Pop <sebastian.pop@amd.com>
6309 * doc/invoke.texi (-ftree-loop-distribution): Documented.
6310 * tree-loop-distribution.c: Reimplemented.
6311 * tree-pass.h (pass_loop_distribution): New.
6312 * tree-scalar-evolution.c (number_of_iterations_for_all_loops): Use
6314 * graphds.h (struct graph): New field indexes.
6315 * timevar.def (TV_TREE_LOOP_DISTRIBUTION): New.
6317 * tree-vect-analyze.c: Remove declaration of static functions when not
6319 * tree-vectorizer.c: Same.
6320 (rename_variables_in_loop): Now extern.
6321 (slpeel_tree_duplicate_loop_to_edge_cfg): Renamed
6322 tree_duplicate_loop_to_edge_cfg. Reset PENDING_STMT for edges after
6323 calling redirect_edge_and_branch_force.
6325 * tree-vectorizer.h (tree_duplicate_loop_on_edge): Declared.
6327 * tree-data-ref.c: Don't include tree-chrec.h.
6328 (debug_data_dependence_relations): New.
6329 (dump_data_dependence_relation): Call dump_data_reference on data refs
6331 (same_access_functions): Moved...
6332 (find_vertex_for_stmt): Renamed rdg_vertex_for_stmt.
6333 (dump_rdg_vertex, debug_rdg_vertex, dump_rdg_component,
6334 debug_rdg_component, dump_rdg, debug_rdg, dot_rdg_1, dot_rdg,
6335 struct rdg_vertex_info, ): New.
6336 (create_rdg_edge_for_ddr): Compute the dependence level before looking
6338 (create_rdg_vertices): Initialize the htab of graph->indexes.
6339 Initialize RDG_MEM_WRITE_STMT and RDG_MEM_READS_STMT.
6340 (stmts_from_loop): Don't save LABEL_EXPR.
6341 (hash_stmt_vertex_info, eq_stmt_vertex_info,
6342 hash_stmt_vertex_del): New.
6343 (build_rdg): Initialize rdg->indexes.
6344 (free_rdg, stores_from_loop, ref_base_address,
6345 rdg_defs_used_in_other_loops_p, have_similar_memory_accesses,
6346 have_similar_memory_accesses_1, ref_base_address_1,
6347 remove_similar_memory_refs): New.
6349 * tree-data-ref.h: Include tree-chrec.h.
6350 (debug_data_dependence_relations): Declared.
6351 (same_access_functions): ...here. Now static inline.
6352 (ddr_is_anti_dependent, ddrs_have_anti_deps,
6353 ddr_dependence_level): New.
6354 (struct rdg_vertex): New fields has_mem_write, has_mem_reads.
6355 (RDGV_HAS_MEM_WRITE, RDGV_HAS_MEM_READS, RDG_STMT, RDG_MEM_WRITE_STMT,
6356 RDG_MEM_READS_STMT): New.
6357 (dump_rdg_vertex, debug_rdg_vertex, dump_rdg_component,
6358 debug_rdg_component, dump_rdg, debug_rdg, dot_rdg,
6359 rdg_vertex_for_stmt): Declared.
6360 (struct rdg_edge): New field level.
6361 (RDGE_LEVEL, free_rdg): New.
6362 (stores_from_loop, remove_similar_memory_refs,
6363 rdg_defs_used_in_other_loops_p,
6364 have_similar_memory_accesses): Declared.
6365 (rdg_has_similar_memory_accesses): New.
6367 * lambda.h (dependence_level): New.
6368 * common.opt (ftree-loop-distribution): New.
6369 * tree-flow.h (debug_loop_ir): Renamed debug_loops.
6370 (print_loop_ir): Renamed print_loops.
6371 (debug_loop, debug_loop_num, print_loops_bb, mark_virtual_ops_in_bb,
6372 tree_duplicate_loop_to_edge_cfg, rename_variables_in_loop): Declared.
6373 * Makefile.in (TREE_DATA_REF_H): Depends on tree-chrec.h.
6374 (tree-loop-distribution.o): Added.
6375 * tree-cfg.c (mark_virtual_ops_in_region): Use mark_virtual_ops_in_bb.
6376 (mark_virtual_ops_in_bb): New.
6377 (print_loops_bb, debug_loop_num, debug_loop): New.
6378 * passes.c: Scheduled pass_loop_distribution.
6380 2007-12-12 Konrad Trifunovic <konrad.trifunovic@inria.fr>
6382 * graphite.c (scan_tree_for_params): Correct the number of columns
6384 (nb_flat_iterator): New.
6385 (setup_cloog_loop): Initialize to 1 the first column for inequalities.
6386 (build_scop_iteration_domain): Correct the number of columns for
6389 2007-12-12 Sebastian Pop <sebastian.pop@amd.com>
6391 * Merge from mainline (129697:130800).
6393 2007-10-30 Sebastian Pop <sebastian.pop@amd.com>
6395 * graphite.c (build_graphite_bb): SCoP's basic blocks are post
6396 dominated by SCoP's exit.
6397 (graphite_transform_loops): Compute post dominators.
6399 2007-10-28 Sebastian Pop <sebastian.pop@amd.com>
6401 * Merge from mainline (127169:129697).
6403 2007-10-28 Sebastian Pop <sebastian.pop@amd.com>
6405 * graphite.c (affine_expr): Renamed scop_affine_expr. Use an extra
6406 parameter for the basic block that contains the expression. Use
6407 outermost_loop_in_scop for evolution_function_is_affine_multivariate_p.
6408 (stmt_simple_for_scop_p): Pass to scop_affine_expr the basic block of
6410 * graphite.h (gbb_loop): New.
6411 (GBB_LOOP): Removed.
6413 2007-08-03 Sebastian Pop <sebpop@gmail.com>
6415 * Makefile.in: Fix merge problem.
6417 2007-08-03 Sebastian Pop <sebpop@gmail.com>
6419 * Merge from mainline (125309:127169).
6420 * tree-loop-distribution.c: Disabled.
6422 2007-06-05 Sebastian Pop <sebpop@gmail.com>
6424 * Merge from mainline (r123693:125309).
6426 2007-05-30 Sebastian Pop <sebpop@gmail.com>
6428 * tree-loop-distribution.c (correct_modify_expr_p): Renamed
6430 (correct_modify_p, check_statements, number_of_lvalue_uses,
6431 number_of_scalar_dependences, create_edges): Use GIMPLE_MODIFY_STMT
6432 instead of MODIFY_EXPR.
6433 (update_edge_with_ddv): Don't pass index_of_edge. Initialize
6436 2007-05-24 Sebastian Pop <sebpop@gmail.com>
6438 * tree-loop-distribution.c (struct rdg): Replace arrays by
6439 VECs for edges and vertices.
6440 (RDG_NBV, RDG_NBE, RDG_VERTEX, RDG_EDGE): Removed.
6441 (RDGV_NB_PARTITIONS): New.
6442 (PRDG_NBV, PRDG_NBE): Removed.
6443 (build_scc_graph, correct_partitions_p, mark_partitions, build_prdg,
6444 dump_rdg, find_vertex_with_stmt, create_vertices, free_rdg,
6445 number_of_scalar_dependences, create_edges, build_rdg): Use VECs.
6447 2007-05-17 Georges-Andre Silber <silber@cri.ensmp.fr>
6448 Sebastian Pop <sebpop@gmail.com>
6450 * doc/invoke.texi (-ftree-loop-distribution): Document.
6451 * tree-loop-distribution.c: New file.
6452 * tree-pass.h (pass_loop_distribution): Declared.
6453 * timevar.def (TV_TREE_LOOP_DISTRIBUTION): New.
6454 * tree-data-ref.c (initialize_data_dependence_relation): Initialize
6456 * tree-data-ref.h (data_dependence_relation): Add reversed_p.
6457 (DDR_REVERSED_P): New.
6458 * common.opt (-ftree-loop-distribution): New.
6459 * tree-flow.h (distribute_loops): Declared.
6460 * Makefile.in (OBJS-common): Depend on tree-loop-distribution.o.
6461 * passes.c (init_optimization_passes): Schedule loop distribution.
6463 2007-05-12 Sebastian Pop <sebastian.pop@inria.fr>
6465 * graphite.c (print_graphite_bb): Don't call dump_data_references.
6466 (print_scop): Don't print when scop is NULL.
6467 (build_scop_context, find_transform): Don't output to stderr.
6469 2007-05-09 Sebastian Pop <sebastian.pop@inria.fr>
6471 * tree-data-ref.c: Don't include graphite.h.
6472 Comment out the code for printing data reference's scop.
6473 (build_access_matrix_with_af): Moved...
6474 * tree-data-ref.h (build_access_matrix_with_af): Removed declaration.
6475 * graphite.c (build_access_matrix_with_af): ... here. Now static.
6476 (print_graphite_bb): Print basic block's schedule.
6477 (print_scop): Don't print the schedule, call cloog's pretty printer.
6478 (bb_in_scop_p): A basic block is in a scop only if it is both
6479 dominated and postdominated by the scop's entry and exit basic blocks.
6480 (function_parameter_p): New.
6481 (invariant_in_scop_p): Use function_parameter_p.
6482 (new_scop, save_scop): New.
6483 (end_scop, test_for_scop_bound, build_scops): Use new_scop, and
6485 (scan_tree_for_params): Directly build the constraint as CloogMatrix.
6486 (loop_in_scop_p): New.
6487 (scop_record_loop): Use loop_in_scop_p.
6488 (build_scop_domain): Renamed build_scop_iteration_domain.
6489 (setup_cloog_loop, initialize_cloog_names, find_scop_parameters,
6490 nb_params_in_scop, build_scop_context, first_loop_in_scop,
6491 setup_cloog_loop, dot_scop_1, dot_scop): New.
6492 * graphite.h (GBB_LOOP, SCOP_PROG, dot_scop): New.
6493 (struct scop): Add a pointer to cloog's representation of a program.
6495 2007-04-14 Sebastian Pop <sebastian.pop@inria.fr>
6497 * doc/invoke.texi (-ftree-check-verbose): Renamed
6498 -ftree-checks-verbose.
6499 * common.opt (flag_tree_check_verbose): Renamed
6500 flag_tree_checks_verbose.
6501 * tree-check.c (tree_check_warning): Use flag_tree_checks_verbose.
6503 2007-04-14 Sebastian Pop <sebastian.pop@inria.fr>
6505 * configure: Regenerated.
6506 * config.in: Regenerated.
6507 * tree-ssa-loop.c (graphite_transforms): Execute
6508 graphite_transform_loops only when HAVE_cloog.
6509 * configure.ac (HAVE_polylib, HAVE_cloog, GRAPHITE): Defined.
6510 * graphite.c: Include polylibgmp.h and cloog.h.
6511 (graphite_transform_loops): Removed loops parameter.
6512 * tree-flow.h (graphite_transform_loops): Update declaration.
6513 * Makefile.in (POLYLIBLIBS, POLYLIBINC, CLOOGLIBS, CLOOGINC): New.
6514 (LIBS): Depend on CLOOGLIBS and on POLYLIBLIBS.
6515 (INCLUDES): Depend on POLYLIBINC and on CLOOGINC.
6516 (OBJS-common): Remove dependence on graphite.o.
6517 (BACKEND): Depend on @GRAPHITE@.
6519 2007-04-13 Sebastian Pop <sebastian.pop@inria.fr>
6521 * doc/invoke.texi (-ftree-check-verbose): Documented.
6522 * testsuite/gcc.dg/tree-checker/tree-checks-1.c: New.
6523 * testsuite/gcc.dg/tree-checker/tree-checks-2.c: New.
6524 * testsuite/gcc.dg/tree-checker/tree-checks-3.c: New.
6525 * testsuite/gcc.dg/tree-checker/tree-checks-4.c: New.
6526 * testsuite/gcc.dg/tree-checker/tree-checks.exp: New.
6527 * testsuite/gcc.dg/tree-checker/condates.crp: New.
6528 * common.opt (ftree-checks-verbose): New.
6529 * tree-check.c (tree_check_warning): Move extra stderr output
6530 under control of flag_tree_check_verbose.
6532 2007-04-12 Sebastian Pop <sebastian.pop@inria.fr>
6534 * tree-match.c: Fix comments formatting.
6535 * tree-match.h: Fix comments formatting.
6536 * tree-check.c: Fix comments formatting.
6537 (tree_check_init): Restructure.
6539 2007-04-12 Nic Volanschi <nic.volanschi@free.fr>
6541 * doc/invoke.texi (-ftree-check, -ftree-checks): Documented.
6543 2007-04-10 Sebastian Pop <sebastian.pop@inria.fr>
6545 * Merge from mainline (r120733:123693).
6547 2007-03-20 Nic Volanschi <nic.volanschi@free.fr>
6549 * condate.y: New file.
6550 * tree-match.h (struct patt_info_s): New field sign.
6551 (struct condate_s): New field msg.
6552 (normalize_condate, name_condate, add_condate): New.
6553 (conds[], condate_parse): Made extern.
6554 * tree-check.c (tree_check_warning): First arg changed to cond;
6555 warning reformatted.
6556 (tree_check_init): Reset the TREE_VISITED bit on every CFG node.
6558 (tree_check): Process trivial condates.
6559 (read_delimited_string): Removed.
6560 (print_cond): Print name and msg.
6561 (conds[]): Made extern.
6562 (parse_tree_check_file_once): Rewritten to use the parser in
6564 Processing of option --tree_check_string moved to tree_scan().
6565 * Makefile.in: Added condate.y
6567 2007-03-12 Sebastian Pop <sebastian.pop@inria.fr>
6569 * tree-pretty-print.c (dump_generic_bb_buff, lazy_dump_generic_node):
6570 Use VECs instead of varrays.
6571 * diagnostic.h (lazy_dump_generic_node): Update declaration.
6572 * Makefile.in (pretty-print.o): Depend on vec.h.
6573 * pretty-print.c: Include tree.h and vec.h.
6574 (pp_clear_state, pp_write_list_to_stream, pp_base_format,
6575 pp_base_format, pp_construct, pp_base_string, pp_lazy_mode,
6576 new_tree_chunk, pp_add_tree, pp_add_string, pp_add_char, pp_write_list,
6577 pp_free_list): Use VECs instead of varrays.
6578 * pretty-print.h: Do not include varray.h.
6579 (struct tree_chunk_s): Declaration moved before its use.
6580 (output_buffer): Rename varray field to chunks.
6581 * tree-match.c (tree_equal, chunk_1st_char, chunks_lookahead,
6582 tree_1st_char, match_chunks_pattinfo, match_tree_pattinfo,
6583 save_global_holes): Use VECs instead of varrays.
6584 * tree-match.h: Declare VECs of cfg_node, and hole_p.
6585 * tree-check.c (scan_cfg_stmts, push_node,
6586 print_matching_stmt): Removed.
6587 (tree_check_instance, push_global_holes_if_new, tree_check,
6588 execute_tree_check): Use VECs instead of varrays.
6589 (gate_tree_check): Don't execute the CFG check when basic_block_info
6592 2007-01-12 Sebastian Pop <sebastian.pop@inria.fr>
6594 * Merge from mainline (r115016:120733).
6596 2007-01-12 Sebastian Pop <sebastian.pop@inria.fr>
6598 * Merge from mainline (r117632:117661).
6600 2007-01-12 Sebastian Pop <sebastian.pop@inria.fr>
6602 * tree-dump.c (dump_option_value_in): Add TDF_DEBUG.
6603 * tree-pass.h (TDF_DEBUG, debug_p): New.
6604 * tree-scalar-evolution.c (set_scalar_evolution, get_scalar_evolution,
6605 get_scalar_evolution, add_to_evolution, set_nb_iterations_in_loop,
6606 get_loop_exit_condition, analyze_evolution_in_loop,
6607 analyze_initial_condition, analyze_scalar_evolution,
6608 instantiate_parameters, number_of_latch_executions): Use debug_p.
6609 * tree-chrec.c (chrec_apply): Use debug_p.
6610 * tree-data-ref.c: Include graphite.h.
6611 (dump_data_reference): Print also the access matrix.
6612 (analyze_array, analyze_indirect_ref, init_data_ref,
6613 analyze_offset_expr, address_analysis, object_analysis,
6614 create_data_ref, finalize_ddr_dependent,
6615 non_affine_dependence_relation, analyze_ziv_subscript,
6616 analyze_siv_subscript_cst_affine,
6617 compute_overlap_steps_for_affine_1_2, analyze_subscript_affine_affine,
6618 can_use_analyze_subscript_affine_affine, analyze_siv_subscript,
6619 analyze_miv_subscript, analyze_overlapping_iterations,
6620 build_classic_dist_vector, subscript_dependence_tester,
6621 compute_affine_dependence, analyze_all_data_dependences): Use debug_p.
6622 (build_access_matrix_with_af): No longer static.
6623 * tree-data-ref.h (scop_p): ... declaration here.
6624 (data_reference.scop): New field.
6625 (DR_SCOP, DR_ACCESS_MATRIX): New.
6626 (build_access_matrix_with_af, dr_num_subscripts): Declared.
6627 * graphite.c (print_graphite_bb): Call dump_data_references.
6628 (print_scop): Use scop_nb_loops and scop_dim_domain.
6629 (test_for_scop_bound): Use debug_p.
6630 (scan_tree_for_params): Use scop_nb_loops, scop_nb_loops and
6632 (scop_loop_index): Moved...
6633 (scop_record_loop): New.
6634 (build_scop_loop_nests): Use scop_record_loop.
6635 (build_scop_domain): Use scop_dim_domain.
6636 (build_access_matrix): Implemented.
6637 (build_scop_canonical_schedules): Use scop_nb_loops.
6638 (build_graphite_bb): Initialize GBB_SCOP.
6639 * graphite.h (scop_p): Moved...
6640 (graphite_bb.scop): New field.
6641 (graphite_bb.iteration_domain, GBB_DOMAIN, scop.nb_params,
6642 scop.nb_loops, scop.dim_domain, SCOP_NB_LOOPS, SCOP_NB_PARAMS,
6643 SCOP_DIM_DOMAIN, SCOP_STMTS): Removed.
6644 (scop_nb_params, scop_nb_loops, scop_dim_domain, gbb_dim_domain,
6645 scop_loop_index): New.
6646 * Makefile.in (tree-data-ref.o): Depends on graphite.h.
6648 2007-01-05 Sebastian Pop <sebastian.pop@inria.fr>
6650 * Merge from mainline (r117661:120450).
6652 2006-10-12 Sebastian Pop <sebastian.pop@inria.fr>
6654 * tree-scalar-evolution.c (instantiate_parameters_1): Don't stop
6655 at the first declaration outside the varying loop, instantiate as
6657 * tree-chrec.c (for_each_scev_op): New.
6658 * tree-chrec.h (for_each_scev_op): Declared.
6659 * tree-ssa-loop.c (pass_graphite_trans): Don't dump the function.
6660 * tree-data-ref.c (get_references_in_stmt,
6661 find_data_references_in_stmt): New, from trunk.
6662 (find_data_references_in_loop): Use get_references_in_stmt
6663 and find_data_references_in_loop, modified as in trunk.
6664 (build_access_matrix_with_af): New.
6665 * tree-data-ref.h (data_reference): Add a field access_matrix.
6666 (data_ref_loc): New, as in trunk.
6667 * graphite.c (print_graphite_bb, bb_in_scop_p, stmt_in_scop_p,
6668 invariant_in_scop_p, param_index, scan_tree_for_params,
6669 scop_loop_index, build_scop_loop_nests, build_scop_domain, irp_data,
6670 idx_record_param, idx_record_params, build_access_matrix,
6671 build_scop_data_accesses, build_scop_canonical_schedules,
6672 build_graphite_bb, build_scop_bbs, find_params_in_bb,
6673 build_scop_params): New.
6674 * graphite.h (graphite_bb): New.
6675 (scop): Add fields static_schedule, params, loop_nest,
6677 * lambda.h: Declare vecs of lambda_matrix.
6678 * tree-flow.h (print_loop_ir_bb): Declared.
6679 * tree-cfg.c (print_loop_ir_bb): New.
6680 (print_loop): Use print_loop_ir_bb.
6682 2006-10-12 Sebastian Pop <pop@cri.ensmp.fr>
6684 * Merge from mainline (r115016:117632).
6686 2006-10-11 Sebastian Pop <pop@cri.ensmp.fr>
6688 * graphite.c (debug_scops): Adjust definition for avoiding a bootstrap
6689 break due to a warning.
6691 2006-10-10 Sebastian Pop <pop@cri.ensmp.fr>
6693 * graphite.c (print_scops, debug_scops): New.
6694 (graphite_transform): Renamed graphite_find_transform.
6695 * graphite.h (debug_scops): Declared.
6697 2006-08-17 Sebastian Pop <pop@cri.ensmp.fr>
6699 * tree-match.c: Reformat following the GNU style.
6700 * tree-match.h: Reformat following the GNU style.
6701 * tree-pattern.h: Removed empty file.
6702 * Makefile.in: Remove references to tree-pattern.h.
6703 * tree-check.c: Reformat following the GNU style.
6704 (execute_tree_check): Move gate condition code to...
6705 (gate_tree_check): ...here. New function.
6706 (pass_check): Use the gate function.
6708 2006-07-04 Nic Volanschi <nic.volanschi@free.fr>
6710 * tree-pattern.h: New. Tree pattern matching and checking using
6712 * tree-check.c: New. Tree/CFG checking pass.
6713 * tree-match.c: New. Library for tree pattern matching.
6714 * opts.c, common.opt: Add options --ftree-check & --ftree-checks.
6715 * toplev.c, flags.h: Add globals for tree-check pass.
6716 * Makefile.in: Integrate the files in tree-check pass.
6717 * timevar.def, tree-optimize.c, tree-pass.h: Register tree-check pass.
6718 * pretty-print.c, pretty-print.h, tree-pretty-print.c, diagnostic.h:
6719 Introduce a "lazy" pretty-print mode.
6720 * tree.c, tree.h: Add tree_name.
6722 2006-07-04 Sebastian Pop <pop@cri.ensmp.fr>
6724 * doc/invoke.texi (-fgraphite): Correct typo.
6725 * tree-scalar-evolution.c (number_of_iterations_for_all_loops): Update
6726 use of print_loop_ir.
6727 * testsuite/gcc.dg/graphite/scop-1.c: New.
6728 * testsuite/gcc.dg/graphite/scop-2.c: New.
6729 * testsuite/gcc.dg/graphite/graphite.exp: New.
6730 * graphite.c: Include domwalk.h.
6731 (print_scop): Print only the entry and exit blocks.
6732 (debug_scop): No longer static.
6733 (affine_expr): Fix formating. Return also true when the expression is
6735 (stmt_simple_for_scop_p): Fix formating.
6736 (build_scops): Use domwalk.
6737 (get_loop_start, end_scop, test_for_scop_bound): New.
6738 (graphite_transform_loops): Avoid printing on stderr.
6739 * graphite.h (debug_scop): Declared.
6740 * tree-flow.h (debug_loop_ir, print_loop_ir): Update declarations.
6741 * Makefile.in (graphite.o): Depend on domwalk.h.
6742 * tree-cfg.c (print_loop, print_pred_bbs, print_succ_bbs): Remove
6743 declarations for static functions.
6744 (print_loop, print_loop_ir, debug_loop_ir): Use an extra parameter for
6745 controlling output verbosity.
6747 2006-06-26 Sebastian Pop <pop@cri.ensmp.fr>
6748 Plesco Alexandru <shurikx@gmail.com>
6750 * doc/invoke.texi (-fgraphite): Document.
6751 * tree-pass.h (pass_graphite_transforms): Declared.
6752 * timevar.def (TV_GRAPHITE_TRANSFORMS): New.
6753 * tree-ssa-loop.c (graphite_transforms, gate_graphite_transforms): New.
6754 (pass_graphite_transforms): Defined.
6755 * tree-data-ref.c (free_data_ref, data_reference): Extern.
6756 * tree-data-ref.h (free_data_ref, data_reference): Declared.
6757 * graphite.c, graphite.h: New.
6758 * common.opt (fgraphite): Declared.
6759 * tree-flow.h (graphite_transform_loops): Declared.
6760 * Makefile.in (OBJS-common): Add graphite.o.
6761 (graphite.o): New rule.
6762 * passes.c (pass_graphite_transforms): Scheduled.