1 2010-01-14 Sebastian Pop <sebastian.pop@amd.com>
4 * graphite-clast-to-gimple.c (gloog_error): New static variable.
5 (clast_to_gcc_expression): Do not build MULT_EXPR of POINTER_TYPE_P.
6 Set gloog_error when such an expression failed to be built.
7 (translate_clast): Early return when gloog_error is set.
8 (gloog): Clear gloog_error. When gloog_error is set, call
9 set_ifsese_condition to enable the original code. Return the status
10 of the code generation based on gloog_error.
11 * sese.c (set_ifsese_condition): New.
12 * sese.h (set_ifsese_condition): Declared.
14 * testsuite/g++.dg/graphite/pr42681.C: New.
16 2010-01-14 Sebastian Pop <sebastian.pop@amd.com>
19 * graphite-clast-to-gimple.c (gloog): Call scev_reset_htab and
21 * sese.c (rename_variables_in_operand): New.
22 (rename_variables_in_expr): New.
23 (rename_nb_iterations): New.
24 (sese_adjust_liveout_phis): Update the rename_map.
25 * sese.h (rename_nb_iterations): Declared.
26 * tree-scalar-evolution.c (scev_reset_htab): New.
27 (scev_reset): Call scev_reset_htab.
28 * tree-scalar-evolution.h (scev_reset_htab): Declared.
30 * testsuite/gfortran.dg/graphite/pr42732.f: New.
32 2010-01-08 Sebastian Pop <sebastian.pop@amd.com>
35 * graphite-clast-to-gimple.c: Fix formatting.
36 * sese.c (defined_in_loop_p): Renamed name_defined_in_loop_p.
37 (expr_defined_in_loop_p): New.
38 (add_loop_exit_phis): Also handle full expressions: remove from
39 the rename_map the expressions defined in the loop that we're closing.
41 * testsuite/gfortran.dg/graphite/pr42393-1.f90: New.
42 * testsuite/gfortran.dg/graphite/pr42393.f90: Add new flags
43 -fno-loop-block -fno-loop-interchange -fno-loop-strip-mine to also
44 make this testcase useful in the Graphite branch.
46 2010-01-08 Sebastian Pop <sebastian.pop@amd.com>
48 * graphite-scop-detection.c (exclude_component_ref): Removed.
49 (is_simple_operand): Removed.
50 (stmt_simple_for_scop_p): Remove use of is_simple_operand.
52 2010-01-07 Sebastian Pop <sebastian.pop@amd.com>
55 * sese.c (expand_scalar_variables_expr): Follow the SSA links into
56 the array indexing of ADDR_EXPRs.
58 * testsuite/gcc.dg/graphite/pr42221.c: New.
60 2010-01-07 Sebastian Pop <sebastian.pop@amd.com>
63 * graphite.c (graphite_finalize): Call scev_reset.
64 (graphite_transform_loops): Do not call scev_reset between the code
67 * testsuite/gcc.dg/graphite/pr42521.c: New.
69 2010-01-07 Sebastian Pop <sebastian.pop@amd.com>
71 * graphite-interchange.c (memory_stride_in_loop): Renamed
73 (memory_strides_in_loop): Renamed memory_strides_in_loop_1.
74 (memory_strides_in_loop): Memoize the memory strides per loop.
75 (lst_interchange_profitable_p): Do not initialize to zero the memory
77 * graphite-poly.h (struct lst): Add a field memory_strides.
78 (LST_LOOP_MEMORY_STRIDES): New.
79 (new_lst_loop): Initialize LST_LOOP_MEMORY_STRIDES to -1.
80 (free_lst): Clear LST_LOOP_MEMORY_STRIDES.
82 2010-01-07 Sebastian Pop <sebastian.pop@amd.com>
84 * graphite-interchange.c (memory_strides_in_loop_depth): Renamed
85 memory_strides_in_loop. Gather memory strides on a whole loop.
86 (pbb_interchange_profitable_p): Renamed lst_interchange_profitable_p.
87 (lst_interchange_profitable_p): Removed.
88 (lst_try_interchange_loops): Call lst_interchange_profitable_p.
90 2010-01-07 Sebastian Pop <sebastian.pop@amd.com>
92 Revert patch 2009-11-23 Tobias Grosser <grosser@fim.uni-passau.de>
93 * graphite-clast-to-gimple.c (try_mark_loop_parallel): New.
94 (translate_clast_for, translate_clast_guard, translate_clast, gloog):
95 Remove context_loop and level.
97 2010-01-07 Richard Guenther <rguenther@suse.de>
99 PR tree-optimization/42641
100 * sese.c (rename_map_elt_info): Use the SSA name version, do
103 2010-01-06 Sebastian Pop <sebastian.pop@amd.com>
105 * graphite-blocking.c (scop_do_block): Print "SCoP will be loop
106 blocked" only when both the strip mine and the interchange have
109 * testsuite/gcc.dg/graphite/block-2.c: Removed.
110 * testsuite/gcc.dg/graphite/block-3.c: Add scan pattern.
111 * testsuite/gcc.dg/graphite/block-4.c: Same.
112 * testsuite/gcc.dg/graphite/block-5.c: Same.
113 * testsuite/gcc.dg/graphite/block-6.c: Same.
115 2010-01-06 Sebastian Pop <sebastian.pop@amd.com>
117 * graphite-clast-to-gimple.c (save_clast_name_index): Free slot
118 before allocating a new one.
119 (copy_renames): Check that slot is not NULL.
120 (mark_bb_with_pbb): Same.
121 (compute_cloog_iv_types_1): Same.
122 * graphite-interchange.c (lst_perfect_nestify): Free the before,
123 nest, and after LSTs.
124 (lst_try_interchange_loops): Same.
126 2010-01-05 Sebastian Pop <sebastian.pop@amd.com>
129 * graphite-interchange.c (lst_try_interchange_loops): Do not return
130 the before, nest, and after LSTs.
131 (lst_try_interchange): Removed.
132 (lst_interchange_select_inner): Do not iterate over the LSTs if they
134 (lst_interchange_select_outer): Apply interchange on the outer loop
135 until there are no more changes in the inner loops.
137 2009-12-18 Sebastian Pop <sebastian.pop@amd.com>
139 Revert patch fixing PR middle-end/42221.
141 2009-12-18 Sebastian Pop <sebastian.pop@amd.com>
144 * graphite-sese-to-poly.c (follow_ssa_with_commutative_ops): Handle
147 * testsuite/gfortran.dg/graphite/pr42180.f90: Add compile flags.
149 2009-12-18 Sebastian Pop <sebastian.pop@amd.com>
152 * graphite-sese-to-poly.c (split_reduction_stmt): Do not split blocks
153 that contain only one statement.
155 * testsuite/gfortran.dg/graphite/pr42180.f90: New.
157 2009-12-17 Sebastian Pop <sebastian.pop@amd.com>
160 * testsuite/gfortran.dg/graphite/pr42393.f90: New.
162 2009-12-17 Sebastian Pop <sebastian.pop@amd.com>
165 * testsuite/gfortran.dg/graphite/pr42186.f90: New.
167 2009-12-17 Sebastian Pop <sebastian.pop@amd.com>
170 * graphite-sese-to-poly.c (translate_scalar_reduction_to_array_for_stmt):
171 Insert the reduction copy in the same block as the phi node.
172 (follow_ssa_with_commutative_ops): Handle GIMPLE_NOPs.
174 * testsuite/gcc.dg/graphite/pr42205-1.c: New.
175 * testsuite/gcc.dg/graphite/pr42205-2.c: New.
177 2009-12-17 Sebastian Pop <sebastian.pop@amd.com>
180 * sese.c (expand_scalar_variables_expr): Follow the SSA links into
181 the array indexing of ADDR_EXPRs.
183 * testsuite/gcc.dg/graphite/pr42221.c: New.
185 2009-12-17 Sebastian Pop <sebastian.pop@amd.com>
189 * graphite-interchange.c (lst_try_interchange): Do not modify OUTER
190 index. Call lst_interchange_select_inner only once.
191 (lst_interchange_select_inner): Update use of lst_try_interchange.
192 (lst_interchange_select_outer): Update.
194 2009-12-15 Sebastian Pop <sebastian.pop@amd.com>
198 * graphite-interchange.c (lst_try_interchange): Do not increment the
199 the OUTER index when there is no AFTER kernel. Do not increment the
200 OUTER index for after processing the AFTER kernel.
201 (lst_interchange_select_inner): Call lst_try_interchange only on loops.
202 (lst_interchange_select_outer): Do not pass in a pointer to the OUTER
203 index. Do not pass to lst_interchange_select_inner the OUTER index.
204 (scop_do_interchange): Update use of lst_interchange_select_outer.
206 * testsuite/gfortran.dg/graphite/graphite.exp
207 (DEFAULT_FLAGS_GRAPHITE_IDENTITY): Remove -fdump-tree-graphite-all.
208 * testsuite/gfortran.dg/graphite/interchange-1.f: Add comment. Clean
209 the graphite dump file.
210 * testsuite/gfortran.dg/graphite/interchange-2.f: Same.
211 * testsuite/gfortran.dg/graphite/pr42334-1.f: New.
213 2009-12-15 Sebastian Pop <sebastian.pop@amd.com>
217 * graphite-interchange.c (lst_perfect_nestify): Reset to NULL the LSTs
219 (lst_do_interchange_1): Renamed lst_interchange_select_inner.
220 (lst_try_interchange): Reimplemented.
221 (lst_interchange_select_inner): Same.
222 (lst_do_interchange): Renamed lst_interchange_select_outer.
224 (scop_do_interchange): Update use of lst_interchange_select_outer.
226 * testsuite/g++.dg/graphite/pr42130.C: Add -fgraphite-identity.
227 * testsuite/gcc.dg/graphite/block-0.c: Un-XFAILed.
228 * testsuite/gcc.dg/graphite/pr42211.c: New.
229 * testsuite/gfortran.dg/graphite/pr42334.f90: New.
231 2009-12-14 Sebastian Pop <sebastian.pop@amd.com>
234 * graphite-scop-detection.c (graphite_can_represent_scev): Handle more
235 carefully PLUS_EXPR, MINUS_EXPR, and MULT_EXPR.
237 * testsuite/gfortran.dg/graphite/pr42181.f90: New.
239 2009-12-12 Sebastian Pop <sebpop@gmail.com>
242 * graphite-sese-to-poly.c (rewrite_close_phi_out_of_ssa): Call
243 insert_out_of_ssa_copy_on_edge for anything else than SSA_NAMEs.
244 (detect_commutative_reduction_arg): Simplified.
245 (detect_commutative_reduction): Early return when the argument of
246 the close phi is not of an SSA_NAME.
248 * testsuite/gcc.dg/graphite/pr42284.c: New.
250 2009-12-11 Alexander Monakov <amonakov@ispras.ru>
252 * dbgcnt.def (graphite_scop): New counter.
253 * graphite.c: Include dbgcnt.h
254 (graphite_transform_loops): Use new counter to limit transformations.
256 2009-12-08 Sebastian Pop <sebpop@gmail.com>
259 * graphite-scop-detection.c (graphite_can_represent_init): Also
260 handle more complex MULT_EXPRs containing parameters by recursion
263 * testsuite/gfortran.dg/graphite/pr42285.f90: New.
265 2009-12-01 Tobias Grosser <grosser@fim.uni-passau.de>
267 * testsuite/g++.dg/graphite/pr42130.C: Fix type.
269 2009-11-29 Alexander Monakov <amonakov@gcc.gnu.org>
271 * testsuite/g++.dg/graphite/pr42130.C: Correct testcase.
273 2009-11-24 Tobias Grosser <grosser@fim.uni-passau.de>
275 * graphite-clast-to-gimple.c (try_mark_loop_parallel,
276 graphite_create_new_loop_guard, translate_clast_for): Fix comments.
278 2009-11-23 Tobias Grosser <grosser@fim.uni-passau.de>
281 * graphite-clast-to-gimple.c (graphite_create_new_loop_guard,
282 translate_clast_for_loop): New.
283 (translate_clast_for): Add a condition around the loop, to do not
284 execute loops with zero iterations.
285 * testsuite/g++.dg/graphite/pr42130.C: New.
286 * testsuite/gcc.dg/graphite/pr35356-2.c: Adapt.
288 2009-11-23 Tobias Grosser <grosser@fim.uni-passau.de>
290 * graphite-clast-to-gimple.c (try_mark_loop_parallel): New.
291 (translate_clast_for, translate_clast_guard, translate_clast, gloog):
292 Remove context_loop and level.
294 2009-11-23 Tobias Grosser <grosser@fim.uni-passau.de>
296 * graphite-clast-to-gimple.c (translate_clast_user,
297 translate_clast_for, translate_clast_guard): Simplify and move common
298 elements to translate_clast().
299 (translate_clast): Simplify and get common elements.
301 2009-11-23 Tobias Grosser <grosser@fim.uni-passau.de>
303 * graphite-clast-to-gimple.c (translate_clast_user,
304 translate_clast_for, translate_clast_guard): Split out of
307 2009-11-21 Tobias Grosser <grosser@fim.uni-passau.de>
309 * graphite-clast-to-gimple.c (clast_name_index, new_clast_name_index,
310 clast_name_to_index, save_clast_name_index, debug_clast_name_index,
311 debug_clast_name_indexes_1, debug_clast_name_indexes,
312 clast_name_index_elt_info, eq_clast_name_indexes): Moved from sese.h.
313 (clast_name_to_gcc, clast_to_gcc_expression,
314 clast_to_gcc_expression_red, gcc_type_for_clast_expr,
315 gcc_type_for_clast_eq, graphite_translate_clast_equation,
316 graphite_create_guard_cond_expr, graphite_create_new_loop,
317 translate_clast): Add params_index.
318 (initialize_cloog_names): Create parameter strings from scratch, do
319 not reference other strings.
320 (create_params_index): New.
321 (gloog): Initialize params_index.
322 * graphite-scop-detection (free_scops_1): Removed.
323 (limit_scops): Use normal free_scops.
324 * graphite-sese-to-poly.c (save_var_names): Removed.
325 (parameter_index_in_region): Do not initialize SESE_PARAM_NAMES
326 and SESE_PARAMS_INDEX.
327 * sese.c (new_sese, free_sese): Dito.
328 * sese.h (struct sese): Remove params_index, params_names.
329 (SESE_PARAMS_INDEX, SESE_PARAMS_NAMES): Removed.
331 2009-11-20 Sebastian Pop <sebastian.pop@amd.com>
333 Revert the following patch from 2009-09-14:
334 * graphite-blocking.c: Fix order of includes: tree-chrec.h, then
335 tree-scalar-evolution.h, and then tree-data-ref.h.
336 * graphite-clast-to-gimple.c: Same.
337 * graphite-dependences.c: Same.
338 * graphite-interchange.c: Same.
339 * graphite-poly.c: Same.
340 * graphite-scop-detection.c: Same.
341 * graphite-sese-to-poly.c: Same.
343 * lambda-code.c: Same.
344 * matrix-reorg.c: Same.
345 * tree-data-ref.c: Same.
346 * tree-if-conv.c: Same.
347 * tree-loop-distribu: Same.: Same.
348 * tree-loop-linear.c: Same.
349 * tree-parloops.c: Same.
350 * tree-predcom.c: Same.
351 * tree-vect-patterns.c: Same.
353 2009-11-20 Sebastian Pop <sebastian.pop@amd.com>
355 Revert patch from 2009-09-14.
356 * tree-ssa-loop.c (gate_graphite_transforms): Re-enable Graphite
357 passes at -O1 and below.
359 2009-11-18 Sebastian Pop <sebastian.pop@amd.com>
362 * testsuite/gcc.dg/graphite/pr40281.c: New.
364 * tree-scalar-evolution.c (instantiate_scev_poly): Base and stride
365 evolutions should not variate in inner loops.
367 2009-11-18 Sebastian Pop <sebastian.pop@amd.com>
370 * testsuite/gfortran.dg/graphite/pr42050.f90: New.
372 2009-11-18 Sebastian Pop <sebastian.pop@amd.com>
374 * graphite-interchange.c (memory_strides_in_loop_depth): New.
375 (pbb_interchange_profitable_p): Call memory_strides_in_loop_depth.
377 2009-11-18 Sebastian Pop <sebastian.pop@amd.com>
379 * graphite-blocking.c (scop_do_block): New.
380 * graphite-poly.c (apply_poly_transforms): Call scop_do_block.
381 * graphite-poly.h (scop_do_block): Declared.
383 2009-11-18 Sebastian Pop <sebastian.pop@amd.com>
385 * graphite-blocking.c (pbb_strip_mine_profitable_p): The parameter
386 depth is the loop nesting depth in the LST. Call psct_dynamic_dim
387 to transform depth into the time_depth before calling
388 pbb_number_of_iterations_at_time.
389 (lst_do_strip_mine): Use a scalar variable instead of recomputing
392 2009-11-18 Sebastian Pop <sebastian.pop@amd.com>
394 Reverted the patch for "scattering permutations" from 2009-10-28.
396 * graphite-poly.c (print_permutation): New.
397 (debug_permutation): New.
398 (new_poly_bb): Initialize PBB_PERMUTATION.
399 (free_poly_bb): Free PBB_PERMUTATION.
400 * graphite-poly.h (pbb_permutation_elt_p): Declared.
401 (struct pbb_permutation_elt): New.
402 (PBB_PERMUTATION_ELT_STRIDE): New.
403 (PBB_PERMUTATION_ELT_STRIDED_P): New.
404 (PBB_PERMUTATION_ELT_TIME_DIMENSION): New.
405 (new_pbb_permutation_elt): New.
406 (pbb_permutation_elt_free): New.
407 (struct poly_bb): Add field permutation.
408 (PBB_PERMUTATION): New.
409 (print_permutation): Declared.
410 (debug_permutation): Declared.
412 2009-11-04 Konrad Trifunovic <konrad.trifunovic@inria.fr>
414 * graphite-interchange.c (build_partial_difference): New.
415 (memory_stride_in_loop): Refactored the computation of
416 equality constraints into build_partial_difference function.
417 Added support for debugging stride computations.
419 2009-11-03 Sebastian Pop <sebastian.pop@amd.com>
421 * graphite-clast-to-gimple.c (gloog): Free if_region,
422 if_region->true_region, and if_region->region.
423 * sese.c (if_region_set_false_region): Free if_region->false_region.
424 (create_if_region_on_edge): Do not use GGC_NEW.
425 (move_sese_in_condition): Remove useless initialization.
427 2009-11-03 Sebastian Pop <sebastian.pop@amd.com>
429 * graphite-interchange.c (lst_perfect_nestify): Pass 3 parameters
430 for the loops created by the loop distribution. Do not modify the
432 (lst_try_interchange_loops): Same. Use a temporary LST for the
433 transformed schedule. Call lst_update_scattering before data
435 (lst_try_interchange): Pass an extra parameter INDEX.
436 (lst_do_interchange_1): New.
437 (lst_do_interchange): Call lst_do_interchange_1.
438 (scop_do_interchange): Call lst_update_scattering.
439 * graphite-poly.c (apply_poly_transforms): Do not call
440 lst_update_scattering.
441 * graphite-poly.h (lst_pred): New.
443 (lst_find_first_pbb): Return NULL when not found.
445 (lst_insert_in_sequence): Allow LST1 to be NULL.
447 (lst_substitute_3): New.
448 * gcc.dg/graphite/interchange-1.c: XFail.
449 * gcc.dg/graphite/interchange-8.c: XFail.
450 * gcc.dg/graphite/interchange-11.c: XFail.
452 2009-10-30 Sebastian Pop <sebastian.pop@amd.com>
454 * graphite-interchange.c (lst_perfectly_nested_p): New.
455 (lst_perfect_nestify): New.
456 (lst_try_interchange_loops): Call store_lst_schedule,
457 lst_perfectly_nested_p, lst_perfect_nestify and restore_lst_schedule.
458 (scop_do_interchange): Avoid redundant legality test.
459 Call lst_do_interchange on a copy of SCOP_TRANSFORMED_SCHEDULE.
460 * graphite-poly.c (apply_poly_transforms): Call lst_update_scattering.
461 * graphite-poly.h (psct_static_dim): New.
462 (lst_dewey_number_at_depth): New.
463 (lst_find_pbb): Restructured.
464 (lst_find_first_pbb): Restructured.
465 (lst_find_last_pbb): New.
466 (lst_contains_p): New.
467 (lst_contains_pbb): New.
468 (lst_create_nest): New.
469 (lst_remove_from_sequence): New.
470 (pbb_update_scattering): New.
471 (lst_update_scattering_under): New.
472 (lst_update_scattering_seq): New.
473 (lst_update_scattering): New.
474 (lst_insert_in_sequence): New.
475 (lst_distribute_lst): New.
476 (lst_remove_all_before_including_pbb): New.
477 (lst_remove_all_before_excluding_pbb): New.
479 2009-10-30 Sebastian Pop <sebastian.pop@amd.com>
481 * tree-ssa-loop-niter.c (finite_loop_p): Do not call twice
484 2009-10-30 Sebastian Pop <sebastian.pop@amd.com>
486 * graphite-poly.c (pbb_remove_duplicate_pdrs): Free collapsed.
488 2009-10-28 Konrad Trifunovic <konrad.trifunovic@gmail.com>
490 * graphite-poly.c (print_permutation): New.
491 (debug_permutation): New.
492 (new_poly_bb): Initialize PBB_PERMUTATION.
493 (free_poly_bb): Free PBB_PERMUTATION.
494 * graphite-poly.h (pbb_permutation_elt_p): Declared.
495 (struct pbb_permutation_elt): New.
496 (PBB_PERMUTATION_ELT_STRIDE): New.
497 (PBB_PERMUTATION_ELT_STRIDED_P): New.
498 (PBB_PERMUTATION_ELT_TIME_DIMENSION): New.
499 (new_pbb_permutation_elt): New.
500 (pbb_permutation_elt_free): New.
501 (struct poly_bb): Add field permutation.
502 (PBB_PERMUTATION): New.
503 (print_permutation): Declared.
504 (debug_permutation): Declared.
506 2009-10-26 Sebastian Pop <sebastian.pop@amd.com>
508 * graphite-clast-to-gimple.c (gloog): Do not call
509 sese_reset_aux_in_loops.
510 * graphite-sese-to-poly.c (build_loop_iteration_domains): Pass an
511 extra argument for domains. Do not use loop->aux.
512 (build_scop_iteration_domain): Initialize and free domains, pass it
513 to build_loop_iteration_domains and extract the information from
514 domains. Do not use loop->aux.
515 * sese.c (sese_reset_aux_in_loops): Removed.
516 * sese.h (sese_reset_aux_in_loops): Removed.
518 2009-10-26 Sebastian Pop <sebastian.pop@amd.com>
520 * graphite-clast-to-gimple.c (find_pbb_via_hash): Moved up.
521 (dependency_in_loop_p): Same.
522 (translate_clast): Do not use loop->aux. Initialize
523 loop->can_be_parallel.
524 (mark_loops_parallel): Removed.
525 * graphite-clast-to-gimple.h (mark_loops_parallel): Removed.
526 * graphite.c (free_aux_in_new_loops): Removed.
527 (graphite_finalize): Do not call free_aux_in_new_loops.
528 (graphite_transform_loops): Do not call mark_loops_parallel.
530 2009-10-26 Li Feng <nemokingdom@gmail.com>
532 * graphite-clast-to-gimple.c (get_stmtfor_depth): Removed.
533 (translate_clast): Pass an extra parameter LEVEL.
534 Call get_scattering_level.
535 * graphite-clast-to-gimple.h (get_scattering_level): New.
537 2009-10-22 Sebastian Pop <sebastian.pop@amd.com>
539 * cfgloop.c (alloc_loop): Initialize loop->single_iv.
540 * cfgloop.h (struct loop): New field single_iv.
542 * graphite-clast-to-gimple.c (pbb_to_depth_to_oldiv): Do not use
543 loop->aux anymore: use loop->single_iv.
544 (graphite_loop_normal_form): Moved...
545 (build_graphite_loop_normal_form): Removed.
546 (gloog): Do not call build_graphite_loop_normal_form.
547 (free_aux_in_new_loops): Moved...
548 (mark_loops_parallel): Restructure.
549 * graphite-clast-to-gimple.h (free_aux_in_new_loops): Do not declare.
550 * graphite-sese-to-poly.c (graphite_loop_normal_form): ...here.
551 (scop_canonicalize_loops): New.
552 (build_poly_scop): Call scop_canonicalize_loops.
553 * graphite.c (free_aux_in_new_loops): ...here.
555 2009-10-22 Sebastian Pop <sebastian.pop@amd.com>
557 * g++.dg/graphite/graphite.exp: Add the same rules as in
558 gcc.dg/graphite/graphite.exp.
560 2009-10-22 Sebastian Pop <sebastian.pop@amd.com>
562 * g++.dg/graphite/id-1.C: New.
564 2009-10-22 Sebastian Pop <sebastian.pop@amd.com>
566 * graphite-sese-to-poly.c (create_zero_dim_array): Pass an extra
568 (rewrite_close_phi_out_of_ssa): Update use of create_zero_dim_array.
569 (rewrite_phi_out_of_ssa): Same.
570 (rewrite_cross_bb_scalar_deps): Same.
571 (translate_scalar_reduction_to_array): Same.
573 2009-10-22 Sebastian Pop <sebastian.pop@amd.com>
575 * graphite-sese-to-poly.c (build_scop_drs): Disable call to
578 2009-10-22 Sebastian Pop <sebastian.pop@amd.com>
580 * graphite-sese-to-poly.c (dump_alias_graphs): New.
581 (build_scop_drs): Call dump_alias_graphs.
583 2009-10-22 Sebastian Pop <sebastian.pop@amd.com>
585 * graphite-poly.c (new_scop): Initialize SCOP_ORIGINAL_SCHEDULE,
586 SCOP_TRANSFORMED_SCHEDULE, and SCOP_SAVED_SCHEDULE.
587 (free_scop): Call free_lst on SCOP_ORIGINAL_SCHEDULE,
588 SCOP_TRANSFORMED_SCHEDULE, and SCOP_SAVED_SCHEDULE.
589 * graphite-poly.h (free_lst): New.
590 (store_lst_schedule): Free SCOP_SAVED_SCHEDULE.
591 (restore_lst_schedule): Free SCOP_TRANSFORMED_SCHEDULE.
593 2009-10-22 Sebastian Pop <sebastian.pop@amd.com>
595 * graphite-poly.h (struct scop): Add a field saved_schedule.
596 (SCOP_SAVED_SCHEDULE): New.
597 (store_lst_schedule): New.
598 (restore_lst_schedule): New.
599 (store_scattering): Call store_lst_schedule.
600 (restore_scattering): Call restore_lst_schedule.
602 2009-10-20 Sebastian Pop <sebastian.pop@amd.com>
604 * graphite-sese-to-poly.c (free_data_refs_aux): Fix formatting.
605 (pdr_add_alias_set): Same.
606 (build_poly_dr): Same.
607 (build_alias_set_optimal_p): Same.
608 (build_base_obj_set_for_drs): Same. Do not store the result of
611 2009-10-20 Sebastian Pop <sebastian.pop@amd.com>
613 * graphite-sese-to-poly.c (build_alias_set_optimal_p): Initialize
614 all_components_are_cliques to 1.
616 2009-10-20 Li Feng <nemokingdom@gmail.com>
618 * graphite-sese-to-poly.c (free_data_refs_aux): Update to free
620 (pdr_add_alias_set): Update retrieving alias_set_num.
621 (build_poly_dr): Update retrieving dr_base_object_set.
622 (partition_drs_to_sets): Remove.
623 (build_alias_set_optimal_p): New.
624 (build_alias_set_for_drs): Rename.
625 (build_scop_drs): Update.
626 * graphite-sese-to-poly.h (struct base_alias_pair): New.
627 (ALIAS_SET_INDEX): Remove.
628 (BASE_OBJECT_SET_INDEX): Remove.
630 2009-10-20 Sebastian Pop <sebastian.pop@amd.com>
632 * sese.c (get_vdef_before_sese): Handle GIMPLE_ASSIGN and GIMPLE_CALL.
634 2009-10-20 Sebastian Pop <sebastian.pop@amd.com>
636 * graphite-sese-to-poly.c (pdr_add_data_dimensions): Do not infer
637 loop upper bounds for 1-element arrays at end of structures.
638 * tree-flow.h (array_at_struct_end_p): Declared.
639 * tree-ssa-loop-niter.c (array_at_struct_end_p): Not static anymore.
641 2009-10-20 Sebastian Pop <sebastian.pop@amd.com>
643 * g++.dg/graphite/pr41305.C: New.
645 2009-10-20 Alexander Monakov <amonakov@ispras.ru>
647 * graphite-sese-to-poly.c (build_loop_iteration_domains): Generalize
648 construction of parameter constraints from loop iteration analysis.
649 * gcc.dg/graphite/run-id-2.c: New test.
651 2009-10-17 Sebastian Pop <sebastian.pop@amd.com>
653 * graphite-interchange.c (memory_stride_in_loop): Delete p1, lma
656 2009-10-17 Sebastian Pop <sebastian.pop@amd.com>
658 * graphite-dependences.c (dependence_polyhedron_1): Remove
659 unused gdim dimensions from the DDR polyhedron.
661 2009-10-17 Sebastian Pop <sebastian.pop@amd.com>
663 * graphite-dependences.c (pddr_transformed_scattering): New.
664 (dot_original_deps_stmt_1): New.
665 (dot_transformed_deps_stmt_1): New.
666 (dot_deps_stmt_1): Call dot_original_deps_stmt_1 and
667 dot_transformed_deps_stmt_1.
668 (dot_original_deps): New.
669 (dot_transformed_deps): New.
670 (dot_deps_1): Call dot_original_deps and dot_transformed_deps.
672 2009-10-17 Sebastian Pop <sebastian.pop@amd.com>
674 * graphite-dependences.c (reduction_dr_1): Remove wrong
675 assert: reduction BBs can have multiple reduction writes
676 to memory. interchange-3.f90 is an example.
678 2009-10-17 Sebastian Pop <sebastian.pop@amd.com>
680 * gfortran.dg/graphite/interchange-3.f90: New.
682 2009-10-17 Sebastian Pop <sebastian.pop@amd.com>
684 * gcc.dg/graphite/interchange-1.c: Un-XFAILed.
686 2009-10-17 Sebastian Pop <sebastian.pop@amd.com>
688 * graphite-dependences.c (dependence_polyhedron_1): Add the
689 context to the dependence polyhedron.
691 2009-10-17 Sebastian Pop <sebastian.pop@amd.com>
693 * graphite-poly.c (pbb_remove_duplicate_pdrs): Initialize
694 PBB_PDR_DUPLICATES_REMOVED.
697 2009-10-17 Sebastian Pop <sebastian.pop@amd.com>
699 * graphite-sese-to-poly.c (find_scop_parameters): Initialize
701 (build_loop_iteration_domains): Extract bounds on parameters
702 based on the data size.
703 (build_scop_context): Do not initialize SCOP_CONTEXT;
706 2009-10-17 Sebastian Pop <sebastian.pop@amd.com>
708 * graphite-ppl.c (ppl_min_for_le_polyhedron): New.
709 * graphite-ppl.h (graphite-ppl.h): Declared.
711 2009-10-17 Sebastian Pop <sebastian.pop@amd.com>
713 * graphite-ppl.c (ppl_print_linear_expr): New.
714 (debug_ppl_linear_expr): New.
715 * graphite-ppl.h (ppl_print_linear_expr): Declared.
716 (debug_ppl_linear_expr): Declared.
718 2009-10-16 Sebastian Pop <sebastian.pop@amd.com>
720 * graphite-interchange.c: Fix comments.
721 * gcc.dg/graphite/block-1.c: Fix comments.
723 2009-10-16 Sebastian Pop <sebastian.pop@amd.com>
725 * gcc.dg/graphite/interchange-7.c: Un-XFAILed.
726 * gcc.dg/graphite/interchange-9.c: Un-XFAILed.
728 2009-10-16 Sebastian Pop <sebastian.pop@amd.com>
730 Reapply the patch from Alexander Monakov that disappeared during
731 the last merges from trunk.
733 2009-09-16 Alexander Monakov <amonakov@ispras.ru>
735 * graphite-sese-to-poly.c (pdr_add_data_dimensions): Add bounds only
736 for ARRAY_REFs. Use array_ref_{low,up}_bound to determine bounds.
738 2009-10-15 Sebastian Pop <sebastian.pop@amd.com>
740 * graphite-interchange.c (memory_stride_in_loop): The depth
741 argument corresponds to a dynamic time dimension, so use
742 psct_dynamic_dim to refer to the transformed scattering dimension.
744 2009-10-15 Sebastian Pop <sebastian.pop@amd.com>
746 * graphite-interchange.c (memory_stride_in_loop): Fix comments.
748 2009-10-15 Sebastian Pop <sebastian.pop@amd.com>
750 * graphite-blocking.c (lst_do_strip_mine): Avoid strip mining the
752 * graphite-interchange.c (lst_do_interchange): Avoid interchanging
754 * graphite-poly.c (scop_to_lst): Fix LST sequence in an outermost
756 (print_lst): Print the root of LST in a different format.
757 * graphite-poly.h (lst_depth): Adjust to include the root of the LST.
759 2009-10-15 Sebastian Pop <sebastian.pop@amd.com>
761 * graphite-poly.c (print_scop): Fix pretty printing of a SCoP.
763 2009-10-15 Sebastian Pop <sebastian.pop@amd.com>
765 * doc/passes.texi: Document the Graphite infrastructure.
767 2009-10-15 Sebastian Pop <sebastian.pop@amd.com>
769 * graphite-sese-to-poly.c (insert_copyin): Use gsi_insert_seq_on_edge.
770 (rewrite_commutative_reductions_out_of_ssa): Call gsi_commit_edge_inserts,
771 and check the SSA representation.
773 * gfortran.dg/graphite/id-18.f90: New, reduced from PR41193.
775 2009-10-15 Sebastian Pop <sebastian.pop@amd.com>
777 * gcc.dg/graphite/pr40157.c: Use -floop-block as reported in the PR.
779 2009-10-14 Sebastian Pop <sebastian.pop@amd.com>
781 * gcc.dg/graphite/interchange-11.c: New.
783 2009-10-14 Sebastian Pop <sebastian.pop@amd.com>
785 * gcc.dg/graphite/interchange-8.c: Enable loop interchange.
787 2009-10-14 Sebastian Pop <sebastian.pop@amd.com>
789 * gcc.dg/graphite/graphite.exp (DEFAULT_CFLAGS_GRAPHITE_BLOCK):
790 Add -fno-loop-strip-mine and -fno-loop-interchange.
791 (DEFAULT_FLAGS_GRAPHITE_INTERCHANGE): Add -fno-loop-block and
792 -fno-loop-strip-mine.
793 * gfortran.dg/graphite/graphite.exp: Same.
795 2009-10-14 Sebastian Pop <sebastian.pop@amd.com>
797 * gcc.dg/graphite/graphite.exp (DEFAULT_CFLAGS_GRAPHITE_BLOCK):
798 Renamed DEFAULT_FLAGS_GRAPHITE_BLOCK.
799 (DEFAULT_CFLAGS_GRAPHITE_IDENTITY): Renamed
800 DEFAULT_FLAGS_GRAPHITE_IDENTITY.
801 (DEFAULT_CFLAGS_GRAPHITE_INTERCHANGE): Renamed
802 DEFAULT_FLAGS_GRAPHITE_INTERCHANGE.
803 (DEFAULT_CFLAGS_GRAPHITE_SCOP): Renamed
804 DEFAULT_FLAGS_GRAPHITE_SCOP.
805 (DEFAULT_CFLAGS_RUN_ID): Renamed DEFAULT_FLAGS_RUN_ID.
806 (DEFAULT_CFLAGS_GRAPHITE): Renamed DEFAULT_FLAGS_GRAPHITE.
808 2009-10-14 Sebastian Pop <sebastian.pop@amd.com>
810 * graphite-poly.c (pbb_number_of_iterations_at_time): Cleanup comments.
812 2009-10-14 Konrad Trifunovic <konrad.trifunovic@gmail.com>
813 Sebastian Pop <sebastian.pop@amd.com>
815 * graphite-interchange.c (build_linearized_memory_access): Pass an
817 (memory_stride_in_loop): Include transform scattering in the
818 access functions to be able to querry the strides in the
820 (pbb_interchange_loop_depths): Interchange the psct_dynamic_dim,
821 not the psct_iterator_dim.
823 2009-10-14 Sebastian Pop <sebastian.pop@amd.com>
825 * graphite-blocking.c (pbb_do_strip_mine): Removed.
826 (lst_do_strip_mine_loop): New.
827 (lst_do_strip_mine): New.
828 (scop_do_strip_mine): Call lst_do_strip_mine.
829 * graphite-poly.h (lst_add_loop_under_loop): New.
830 (lst_find_first_pbb): New.
832 2009-10-14 Sebastian Pop <sebastian.pop@amd.com>
834 * graphite-poly.c (loop_to_lst): Fix LST creation.
836 2009-10-14 Tobias Grosser <grosser@fim.uni-passau.de>
838 * testsuite/gcc.dg/graphite/id-15.c: (8 * 8) replaced with
839 sizeof(unsigned long) to make it run on 32bit systems.
841 2009-10-14 Tobias Grosser <grosser@fim.uni-passau.de>
843 * testsuite/gcc.dg/graphite/run-id-1.c: Use smaller matrix to not
846 2009-10-14 Ramakrishna Upadrasta <Ramakrishna.Upadrasta@inria.fr>
848 * graphite-sese-to-poly.c (write_alias_graph_to_ascii_dimacs): Fix
850 (write_alias_graph_to_ascii_dot): New.
851 (write_alias_graph_to_ascii_ecc): Ditto.
852 (partition_drs_to_sets): Add testing of optimality of current method
853 which assigns alias numbers according to DFS Comopnent number. used
854 as heuristic for the upcoming ECC algorithm.
855 (build_scop_drs): Write to file also with the ecc and dot format.
857 2009-10-13 Sebastian Pop <sebastian.pop@amd.com>
859 * gfortran.dg/graphite/interchange-1.f: XFail.
861 2009-10-13 Sebastian Pop <sebastian.pop@amd.com>
863 * graphite.c (graphite_initialize): Do not handle functions with
864 more than 100 basic blocks.
866 2009-10-13 Sebastian Pop <sebastian.pop@amd.com>
868 * graphite-blocking.c (pbb_do_strip_mine): Use
869 PARAM_LOOP_BLOCK_TILE_SIZE.
871 2009-10-13 Sebastian Pop <sebastian.pop@amd.com>
873 * graphite-poly.c (dot_lst_1): New.
875 * graphite-poly.h (dot_lst): Declared.
877 2009-10-13 Sebastian Pop <sebastian.pop@amd.com>
879 * graphite-dependences.c (dot_deps_stmt_1): New.
880 (dot_deps_stmt): New.
881 * graphite-dependences.h (dot_deps_stmt): Declared.
883 2009-10-09 Sebastian Pop <sebastian.pop@amd.com>
885 * graphite-sese-to-poly.c (rewrite_cross_bb_scalar_dependence): Do
886 not replace cross BB scalar dependences ending on PHI nodes.
887 (rewrite_cross_bb_scalar_deps): Filter out GIMPLE_PHI nodes.
889 2009-10-09 Sebastian Pop <sebastian.pop@amd.com>
891 * graphite-poly.c (apply_poly_transforms): Implement the high
892 level driver for flag_loop_block.
893 * tree-ssa-loop.c (gate_graphite_transforms): Remove call to sorry for
896 * gcc.dg/graphite/graphite.exp (DEFAULT_CFLAGS_GRAPHITE_BLOCK): Add
898 * gfortran.dg/graphite/graphite.exp (DEFAULT_CFLAGS_GRAPHITE_BLOCK):
901 2009-10-09 Sebastian Pop <sebastian.pop@amd.com>
903 * graphite-poly.h (lst_find_pbb): New.
904 (find_lst_loop): New.
906 2009-10-09 Sebastian Pop <sebastian.pop@amd.com>
908 * graphite-poly.c (new_scop): Remove init of SCOP_DEP_GRAPH.
909 * graphite-poly.h (struct scop): Remove dep_graph field.
910 (SCOP_DEP_GRAPH): Removed.
912 2009-10-09 Sebastian Pop <sebastian.pop@amd.com>
914 * graphite-poly.h (copy_lst): Do full copy of LST.
916 2009-10-07 Sebastian Pop <sebastian.pop@amd.com>
918 * graphite-sese-to-poly.c (reduction_phi_p): Call remove_invariant_phi
919 when the loop stride is zero.
921 * gcc.dg/graphite/id-16.c: New.
923 2009-10-06 Sebastian Pop <sebastian.pop@amd.com>
925 * graphite-dependences.c (reduction_dr_1): New.
926 (reduction_dr_p): New.
927 (graphite_legal_transform_dr): Call reduction_dr_p.
928 (reduction_ddr): Renamed reduction_ddr_p.
929 * graphite-poly.h (same_pdr_p): New.
930 (number_of_write_pdrs): New.
931 * graphite-sese-to-poly.c (nb_data_writes_in_bb): New.
932 (split_reduction_stmt): Do not split reduction statements
933 when there are no writes to memory.
934 (translate_scalar_reduction_to_array_for_stmt): Insert the
935 memory reduction statement just after the scalar reduction statement.
937 * gcc.dg/graphite/interchange-10.c: Updated to differ from interchange-4.c.
939 * gcc.dg/graphite/interchange-3.c: Un-XFAIL-ed.
940 * gcc.dg/graphite/interchange-4.c: Un-XFAIL-ed.
942 2009-10-06 Sebastian Pop <sebastian.pop@amd.com>
944 * graphite-interchange.c (lst_apply_interchange): New.
945 (lst_interchange_profitable_p): New.
946 (lst_try_interchange_loops): New.
947 (lst_try_interchange): New.
948 (lst_do_interchange): New.
949 (pbb_do_interchange): Removed.
950 (scop_do_interchange): Call lst_do_interchange.
952 2009-10-06 Sebastian Pop <sebastian.pop@amd.com>
954 * graphite-poly.c (print_scop): Print SCOP_ORIGINAL_SCHEDULE and
955 SCOP_TRANSFORMED_SCHEDULE.
960 * graphite-poly.h (lst_p): New.
963 (LST_LOOP_FATHER): New.
966 (scop_to_lst): Declared.
967 (print_lst): Declared.
968 (debug_lst): Declared.
973 (lst_dewey_number): New.
974 (struct scop): Add original_schedule and transformed_schedule fields.
975 (SCOP_ORIGINAL_SCHEDULE): New.
976 (SCOP_TRANSFORMED_SCHEDULE): New.
977 * graphite-sese-to-poly.c (build_poly_scop): Call scop_to_lst.
979 2009-10-05 Sebastian Pop <sebastian.pop@amd.com>
981 * graphite-dependences.c (reduction_ddr): New.
982 (graphite_legal_transform_bb): Call reduction_ddr.
983 * graphite-poly.c (new_poly_bb): Pass a new bool parameter.
984 Initialize PBB_IS_REDUCTION.
985 * graphite-poly.h (struct poly_bb): New bool field is_reduction.
986 (PBB_IS_REDUCTION): New.
987 (new_poly_bb): Update declaration.
988 * graphite-scop-detection.h (build_scop_bbs): Removed.
989 (nb_reductions_in_loop): Removed.
990 * graphite-sese-to-poly.c (try_generate_gimple_bb): Pass a sbitmap
991 parameter for reductions.
992 (try_generate_gimple_bb): Update call to new_poly_bb.
993 (build_scop_bbs_1): Same.
994 (build_scop_bbs): Same.
995 (gsi_for_phi_node): New.
996 (scalar_close_phi_node_p): Remove gcc_assert.
997 (split_reduction_stmt): New.
998 (is_reduction_operation_p): New.
999 (phi_contains_arg): New.
1000 (follow_ssa_with_commutative_ops): New.
1001 (detect_commutative_reduction_arg): New.
1002 (detect_commutative_reduction_assign): New.
1003 (follow_inital_value_to_phi): New.
1004 (edge_initial_value_for_loop_phi): New.
1005 (initial_value_for_loop_phi): New.
1006 (detect_commutative_reduction): New.
1007 (translate_scalar_reduction_to_array_for_stmt): New.
1008 (insert_copyout): New.
1009 (insert_copyin): New.
1010 (translate_scalar_reduction_to_array): New.
1011 (rewrite_commutative_reductions_out_of_ssa_close_phi): New.
1012 (rewrite_commutative_reductions_out_of_ssa_loop): New.
1013 (rewrite_commutative_reductions_out_of_ssa): New.
1014 (build_poly_scop): Call rewrite_commutative_reductions_out_of_ssa.
1015 * sese.h (split_region_for_bb): New.
1017 * gcc.dg/graphite/graphite.exp (DEFAULT_CFLAGS_GRAPHITE_BLOCK): Add -ffast-math.
1018 * gcc.dg/graphite/interchange-1.c: Fix format.
1019 * gcc.dg/graphite/interchange-10.c: New.
1021 2009-10-05 Sebastian Pop <sebastian.pop@amd.com>
1023 * graphite-sese-to-poly.c (insert_out_of_ssa_copy): Remove
1026 2009-10-05 Sebastian Pop <sebastian.pop@amd.com>
1028 * graphite-sese-to-poly.c (scev_analyzable_p): New.
1029 (rewrite_cross_bb_scalar_dependence): New.
1030 (rewrite_cross_bb_scalar_deps): New.
1031 (rewrite_reductions_out_of_ssa): Use bb_in_sese_p.
1032 Call rewrite_cross_bb_scalar_deps.
1034 2009-10-05 Sebastian Pop <sebastian.pop@amd.com>
1036 * graphite-sese-to-poly.c (gsi_for_ssa_name_def): Removed.
1037 (insert_out_of_ssa_copy): Directly use gsi_after_labels and
1040 2009-10-05 Sebastian Pop <sebastian.pop@amd.com>
1042 * graphite-clast-to-gimple.c (build_cloog_prog): Use pbb_index.
1043 * graphite-interchange.c (pbb_do_interchange): Same.
1044 * graphite-poly.c (print_scattering_function): Same.
1046 * graphite-poly.h (pbb_loop): New.
1047 * graphite-sese-to-poly.c (create_linear_expr_from_tree): Use pbb_loop.
1049 2009-09-27 Sebastian Pop <sebastian.pop@amd.com>
1051 * graphite-scop-detection.c (limit_scops): Do not build poly_bbs.
1053 2009-09-27 Sebastian Pop <sebastian.pop@amd.com>
1055 * graphite-sese-to-poly.c (partition_drs_to_sets): Drs is not modified,
1056 so don't pass a pointer to it.
1057 (build_alias_set_for_drs): Same.
1058 (build_base_obj_set_for_drs): Same.
1059 (build_scop_drs): Same.
1061 2009-09-26 Li Feng <nemokingdom@gmail.com>
1063 * graphite-sese-to-poly.c (build_scop_drs): Disable writing to file
1064 the alias graph of data references.
1066 2009-09-25 Li Feng <nemokingdom@gmail.com>
1068 * graphite-sese-to-poly.c (write_alias_graph_to_ascii_dimacs): New.
1069 (build_scop_drs): When debugging, write the alias graph to file,
1070 otherwise, should be disabled.
1072 2009-09-17 Sebastian Pop <sebastian.pop@amd.com>
1074 * graphite-scop-detection.c (stmt_simple_memref_p): Removed.
1075 (is_simple_operand): Remove call to stmt_simple_memref_p.
1076 (stmt_simple_for_scop_p): Update call to is_simple_operand.
1078 2009-09-17 David Edelsohn <edelsohn@gnu.org>
1080 * testsuite/gcc.dg/graphite/interchange-mvt.c: New File.
1081 * testsuite/gcc.dg/graphite/scop-dsyrk.c: New File.
1082 * testsuite/gcc.dg/graphite/scop-dsyr2k.c: New File.
1083 * testsuite/gcc.dg/graphite/scop-mvt.c: New File.
1084 * testsuite/gcc.dg/graphite/scop-sor.c: New File.
1086 2009-09-17 Li Feng <nemokingdom@gmail.com>
1089 * graphite-dependences.c (poly_drs_may_alias_p): Adjust definition.
1090 (pddr_original_scattering): Make sure 2 pdr2 in the same base object set.
1091 (graphite_carried_dependence_level_k): Ditto.
1092 * graphite-poly.c (new_poly_dr): Add init of PDR_BASE_OBJECT_SET.
1093 * graphite-poly.h (struct poly_dr): Add member dr_base_object_set.
1094 (new_poly_dr): Adjust declaration.
1095 * graphite-sese-to-poly.c (free_data_refs_aux): New.
1096 (free_gimple_bb): Added free_data_refs_aux.
1097 (build_poly_dr): Add dr_base_object_set.
1098 (partition_drs_to_sets): New.
1099 (dr_same_base_object_p): New.
1100 (build_alias_set_for_drs): New.
1101 (build_base_object_set_for_drs): New.
1102 (build_scop_drs): Add build_base_obj_set_for_drs.
1103 * graphite-sese-to-poly.h: Added #define for alias set number index and
1104 base object set index.
1105 * libgomp/testsuite/libgomp.graphite/force-parallel-6.c: Refine tests.
1106 * libgomp/testsuite/libgomp.graphite/pr4118.c: New.
1108 2009-09-16 Alexander Monakov <amonakov@ispras.ru>
1110 * graphite-sese-to-poly.c (pdr_add_data_dimensions): Add bounds only
1111 for ARRAY_REFs. Use array_ref_{low,up}_bound to determine bounds.
1113 2009-09-14 Sebastian Pop <sebastian.pop@amd.com>
1115 * graphite-sese-to-poly.c (struct irp_data): Removed.
1116 (idx_record_params): Removed.
1117 (find_params_in_bb): Scan for parameters the access functions; don't
1118 parse the tree representation.
1120 2009-09-14 Sebastian Pop <sebastian.pop@amd.com>
1122 * tree-ssa-loop.c (gate_graphite_transforms): Disable Graphite
1123 passes at -O1 and below.
1125 2009-09-14 Sebastian Pop <sebastian.pop@amd.com>
1127 * graphite-blocking.c: Fix order of includes: tree-chrec.h, then
1128 tree-scalar-evolution.h, and then tree-data-ref.h.
1129 * graphite-clast-to-gimple.c: Same.
1130 * graphite-dependences.c: Same.
1131 * graphite-interchange.c: Same.
1132 * graphite-poly.c: Same.
1133 * graphite-scop-detection.c: Same.
1134 * graphite-sese-to-poly.c: Same.
1136 * lambda-code.c: Same.
1137 * matrix-reorg.c: Same.
1138 * tree-data-ref.c: Same.
1139 * tree-if-conv.c: Same.
1140 * tree-loop-distribu: Same.: Same.
1141 * tree-loop-linear.c: Same.
1142 * tree-parloops.c: Same.
1143 * tree-predcom.c: Same.
1144 * tree-vect-patterns.c: Same.
1146 2009-09-02 Sebastian Pop <sebastian.pop@amd.com>
1148 Partially revert the previous patch, except the following.
1149 * tree-scalar-evolution.c (instantiate_scev_not): Adapted to pass
1150 as parameters the operands of the not expression.
1152 2009-09-01 Sebastian Pop <sebastian.pop@amd.com>
1154 * tree-scalar-evolution.c (instantiate_scev_assign): New.
1155 Do not call analyze_scalar_evolution on assignments.
1156 (instantiate_scev_phi): Call analyze_scalar_evolution.
1157 (instantiate_scev_name): Call instantiate_scev_assign and
1158 instantiate_scev_phi.
1159 (instantiate_scev_not): Adapted to pass as parameters the operands
1160 of the not expression.
1162 2009-09-01 Sebastian Pop <sebastian.pop@amd.com>
1164 * tree-scalar-evolution.c (instantiate_scev_binary): Adapted
1165 to pass as parameters the operands of the binary expression.
1167 2009-09-01 Sebastian Pop <sebastian.pop@amd.com>
1169 * tree-scalar-evolution.c (instantiate_scev_bitnot): Renamed
1170 instantiate_scev_not. Handle NEGATE_EXPR.
1171 (instantiate_scev_r): Handle NEGATE_EXPR.
1173 2009-09-01 Sebastian Pop <sebastian.pop@amd.com>
1175 * tree-scalar-evolution.c (instantiate_scev_1): Renamed
1177 (instantiate_scev_r): Move code in instantiate_scev_2
1178 and instantiate_scev_1.
1180 2009-09-01 Sebastian Pop <sebastian.pop@amd.com>
1182 * tree-scalar-evolution.c (instantiate_scev_3): New.
1183 (instantiate_scev_1): Move code in instantiate_scev_3.
1185 2009-09-01 Sebastian Pop <sebastian.pop@amd.com>
1187 * tree-scalar-evolution.c (instantiate_scev_poly): New.
1188 (instantiate_scev_1): Move code in instantiate_scev_poly.
1190 2009-09-01 Sebastian Pop <sebastian.pop@amd.com>
1192 * tree-scalar-evolution.c (instantiate_scev_bitnot): New.
1193 (instantiate_scev_1): Move code in instantiate_scev_bitnot.
1195 2009-09-01 Sebastian Pop <sebastian.pop@amd.com>
1197 * tree-scalar-evolution.c (instantiate_scev_convert): New.
1198 (instantiate_scev_1): Move code in instantiate_scev_convert.
1200 2009-09-01 Sebastian Pop <sebastian.pop@amd.com>
1202 * tree-scalar-evolution.c (instantiate_scev_binary): New.
1203 (instantiate_scev_1): Move code in instantiate_scev_binary.
1205 2009-09-01 Sebastian Pop <sebastian.pop@amd.com>
1207 * tree-scalar-evolution.c (instantiate_scev_name): New.
1208 (instantiate_scev_1): Move code in instantiate_scev_name.
1210 2009-08-28 Sebastian Pop <sebastian.pop@amd.com>
1212 * Merge from mainline (150992:151171).
1214 2009-08-25 Sebastian Pop <sebastian.pop@amd.com>
1216 * graphite-dependences.c (graphite_legal_transform_bb): Call
1217 pbb_remove_duplicate_pdrs.
1218 * graphite-poly.c (can_collapse_pdr): Removed.
1219 (pdr_find_duplicate): Removed.
1220 (can_collapse_pdrs): New.
1221 (pbb_remove_duplicate_pdrs): New.
1222 (new_poly_dr): Do not look for duplicates.
1223 * graphite-poly.h (struct poly_bb): New field pdr_duplicates_removed.
1224 (PBB_PDR_DUPLICATES_REMOVED): New.
1225 (pbb_remove_duplicate_pdrs): Declared.
1227 2009-08-25 Sebastian Pop <sebastian.pop@amd.com>
1229 * graphite-interchange.c (pbb_interchange_profitable_p): Adjust
1230 the strides by multiplying by PDR_NB_REFS.
1231 * graphite-poly.c (can_collapse_pdr): New.
1232 (pdr_find_duplicate): New.
1233 (new_poly_dr): Call pdr_find_duplicate. Collapse duplicate PDRs.
1234 Initialize PDR_NB_REFS.
1235 * graphite-poly.h (struct poly_dr): Add field nb_refs.
1237 (new_poly_dr): Number of subscripts is a graphite_dim_t.
1239 2009-08-25 Sebastian Pop <sebastian.pop@amd.com>
1241 Revert one of the previous commits:
1242 * graphite-dependences.c (graphite_legal_transform_bb): Avoid
1243 the computation of symmetric data dependence relations.
1244 (dependency_between_pbbs_p): Same.
1246 2009-08-25 Sebastian Pop <sebastian.pop@amd.com>
1249 * graphite-poly.c (apply_poly_transforms): Remove legality test before
1252 2009-08-25 Sebastian Pop <sebastian.pop@amd.com>
1254 * graphite-dependences.c (pddr_original_scattering): Return NULL
1255 for read-read dependence relations.
1256 * graphite-poly.h (enum poly_dr_type): Fix comment.
1259 (pdr_may_write_p): New.
1261 2009-08-25 Sebastian Pop <sebastian.pop@amd.com>
1263 * graphite-poly.h (enum POLY_DR_TYPE): Renamed poly_dr_type.
1264 (struct poly_dr): Same.
1265 (new_poly_dr): Same.
1266 * graphite-poly.c (new_poly_dr): Same.
1268 2009-08-25 Konrad Trifunovic <konrad.trifunovic@gmail.com>
1269 Sebastian Pop <sebastian.pop@amd.com>
1271 * graphite-blocking.c (pbb_strip_mine_loop_depth): Renamed
1272 pbb_strip_mine_time_depth. Changed the implementation so that
1273 transformation is expressed as a transformation on
1274 time (scatttering) dimensions. Also, ensures that the 2d+1
1275 scheduling format is preserved.
1276 (pbb_strip_mine_profitable_p): Profitability is based on the
1277 iteration number of a given time (scattering) dimension,
1278 and not on a original loop depth dimension.
1279 (pbb_strip_mine): Call pbb_number_of_iterations_at_time.
1280 (pbb_do_strip_mine): Call psct_dynamic_dim.
1281 * graphite-poly.c (pbb_number_of_iterations_at_time): New.
1282 * graphite-poly.h (pbb_number_of_iterations_at_time): Declared.
1283 (pbb_nb_dynamic_scattering_transform): New.
1284 (psct_dynamic_dim): New.
1286 2009-08-25 Konrad Trifunovic <konrad.trifunovic@gmail.com>
1288 * graphite-ppl.c (ppl_max_for_le): Renamed ppl_max_for_le_pointset.
1289 * graphite-ppl.h (ppl_max_for_le): Renamed ppl_max_for_le_pointset.
1290 * graphite-poly.c (pbb_number_of_iterations): Rename ppl_max_for_le.
1291 * graphite-interchange.c (build_linearized_memory_access): Same.
1292 (memory_stride_in_loop): Same.
1294 2009-08-25 Sebastian Pop <sebastian.pop@amd.com>
1296 * graphite-dependences.c (pddr_original_scattering): New.
1297 (graphite_legal_transform_dr): Call pddr_original_scattering.
1300 * graphite-dependences.h (dot_deps): Declared.
1301 * graphite-poly.c (new_poly_dr): Initialize PDR_ID.
1302 (print_pdr): Print PDR_ID.
1303 * graphite-poly.h (struct poly_dr): Add field id.
1306 * graphite-scop-detection.c (dot_all_scops_1): Cleanup comment.
1308 2009-08-22 Sebastian Pop <sebastian.pop@amd.com>
1310 * graphite-dependences.c (graphite_carried_dependence_level_k): Do
1311 not delete the original dependence relation.
1313 2009-08-21 Sebastian Pop <sebastian.pop@amd.com>
1315 * graphite-dependences.c (graphite_legal_transform_bb): Avoid
1316 the computation of symmetric data dependence relations.
1317 (dependency_between_pbbs_p): Same.
1319 2009-08-21 Sebastian Pop <sebastian.pop@amd.com>
1321 * graphite-dependences.c (new_poly_dr_pair): Renamed new_poly_ddr.
1322 (eq_poly_dr_pair_p): Renamed eq_poly_ddr_p.
1323 (hash_poly_dr_pair_p): Renamed hash_poly_ddr_p.
1324 (free_poly_ddr): New.
1325 (pddr_is_empty): New.
1326 (dependence_polyhedron_1): Now returns a poly_ddr_p.
1327 (dependence_polyhedron): Same. Remove useless gcc_assert.
1329 (graphite_legal_transform_dr): Call pddr_is_empty and free_poly_ddr.
1330 (graphite_carried_dependence_level_k): Call pddr_is_empty.
1331 * graphite-dependences.h (enum poly_dependence_kind): New.
1332 (poly_dr_pair): Renamed poly_ddr. Added a field kind.
1333 (PDRP_SOURCE): Renamed PDDR_SOURCE.
1334 (PDRP_SINK): Renamed PDDR_SINK.
1335 (PDRP_DDP): Renamed PDDR_DDP.
1337 (free_poly_ddr): Declared.
1338 * graphite-poly.c (new_scop): Use the new hash function names.
1339 * graphite-poly.h (struct scop): Renamed field original_pdr_pairs
1340 into original_pddrs.
1341 (SCOP_ORIGINAL_PDR_PAIRS): Renamed SCOP_ORIGINAL_PDDRS.
1343 2009-08-21 Sebastian Pop <sebastian.pop@amd.com>
1345 * Merge from mainline (150764:150992).
1347 2009-08-18 Sebastian Pop <sebastian.pop@amd.com>
1349 * cfgloopmanip.c (create_empty_loop_on_edge): Generate upper
1350 bounds with LT_EXPR to make niter analysis more precise on code
1351 generated by Graphite.
1353 2009-08-18 Sebastian Pop <sebastian.pop@amd.com>
1355 * graphite-dependences.c (graphite_legal_transform_dr): Fix formatting.
1356 (graphite_legal_transform_bb): Same.
1357 (poly_drs_may_alias_p): Same.
1359 2009-08-15 Sebastian Pop <sebastian.pop@amd.com>
1362 * graphite-ppl.c (ppl_max_for_le): Correct the use of
1363 ppl_Pointset_Powerset_C_Polyhedron_maximize.
1365 2009-08-13 Sebastian Pop <sebastian.pop@amd.com>
1367 * graphite-poly.c (print_pbb): Print PBB index.
1369 2009-08-13 Sebastian Pop <sebastian.pop@amd.com>
1371 * Merge from mainline (r150672:150764).
1373 2009-08-13 Sebastian Pop <sebastian.pop@amd.com>
1375 * graphite-interchange.c (ppl_max_for_le): Moved...
1376 * graphite-poly.c (pbb_number_of_iterations): Call ppl_max_for_le.
1377 * graphite-ppl.c (ppl_max_for_le): ... here.
1378 * graphite-ppl.h (ppl_max_for_le): Declared.
1380 2009-08-12 Sebastian Pop <sebastian.pop@amd.com>
1382 * Merge from mainline (r150372:150672).
1384 2009-08-11 Sebastian Pop <sebastian.pop@amd.com>
1387 * sese.c (convert_for_phi_arg): New.
1388 (add_guard_exit_phis): Use convert_for_phi_arg.
1390 * testsuite/gfortran.dg/graphite/id-17.f: New.
1392 2009-08-11 Sebastian Pop <sebastian.pop@amd.com>
1394 * graphite-sese-to-poly.c (pdr_add_data_dimensions): Dont add
1395 unknown subscript upper bounds.
1397 * testsuite/gcc.dg/graphite/interchange-6.c: Un-XFAIL.
1399 2009-08-11 Sebastian Pop <sebastian.pop@amd.com>
1400 Pranav Garg <pranav.garg2107@gmail.com>
1402 * graphite-interchange.c (gather_access_strides): Removed.
1403 (ppl_max_for_le): New.
1404 (build_linearized_memory_access): New.
1405 (memory_stride_in_loop): New.
1406 (pbb_interchange_profitable_p): Reimplemented.
1407 * graphite-ppl.h (ppl_new_id_map): New.
1408 (ppl_interchange): New.
1410 * testsuite/gcc.dg/graphite/interchange-6.c: XFAILed.
1412 2009-08-11 Sebastian Pop <sebastian.pop@amd.com>
1414 * graphite-interchange.c (compute_subscript): Removed.
1415 (compute_array_size_cstr): Removed.
1416 (compute_array_size_poly): Removed.
1417 (compute_array_size): Removed.
1418 (gather_access_strides_poly): Removed.
1419 (gather_access_strides): Empty.
1421 2009-08-11 Sebastian Pop <sebastian.pop@amd.com>
1423 * graphite-dependences.c (dependence_polyhedron_1): Replace
1424 pdr_nb_subscripts with PDR_NB_SUBSCRIPTS.
1425 (graphite_legal_transform_dr): Same.
1426 (graphite_carried_dependence_level_k): Same.
1427 * graphite-poly.c (new_poly_dr): Add a parameter nb_subscripts.
1428 Initialize PDR_NB_SUBSCRIPTS.
1429 (print_pdr_access_layout): Replace pdr_nb_subscripts with
1431 * graphite-poly.h (struct poly_dr): Add nb_subscripts field.
1432 (PDR_NB_SUBSCRIPTS): New.
1433 (pdr_nb_subscripts): Removed.
1434 (pdr_dim): Simplified.
1435 * graphite-sese-to-poly.c (build_poly_dr): Replace pdr_nb_subscripts
1436 with PDR_NB_SUBSCRIPTS.
1438 2009-08-11 Sebastian Pop <sebastian.pop@amd.com>
1440 * graphite-interchange.c (compute_array_size): Remove use of
1442 * graphite-poly.c (new_poly_dr): Remove argument data_container.
1443 Do not initialize PDR_DATA_CONTAINER.
1444 (print_pdr): Do not print PDR_DATA_CONTAINER.
1445 * graphite-poly.h (struct poly_dr): Remove data_container field.
1446 (PDR_DATA_CONTAINER): Removed.
1447 * graphite-sese-to-poly.c (pdr_add_data_dimensions): Remove use of
1449 (build_poly_dr): Same.
1451 2009-08-11 Sebastian Pop <sebastian.pop@amd.com>
1453 * testsuite/gcc.dg/graphite/interchange-9.c: New.
1455 2009-08-05 Konrad Trifunovic <konrad.trifunovic@gmail.com>
1456 Sebastian Pop <sebastian.pop@amd.com>
1458 * graphite-dependences.c (graphite_legal_transform_dr): Work on a
1459 copy of the dependence polyhedron. Free the temporary objects.
1460 (graphite_carried_dependence_level_k): Free unused objects before
1463 * testsuite/gcc.dg/graphite/interchange-1.c: XFAILed.
1464 * testsuite/gcc.dg/graphite/interchange-2.c: XFAILed.
1465 * testsuite/gcc.dg/graphite/interchange-3.c: XFAILed.
1466 * testsuite/gcc.dg/graphite/interchange-4.c: XFAILed.
1467 * testsuite/gcc.dg/graphite/interchange-7.c: XFAILed.
1469 2009-08-05 Sebastian Pop <sebastian.pop@amd.com>
1471 * graphite-blocking.c (scop_do_strip_mine): Call store_scattering.
1472 Early return without analyzing the data dependences if no
1473 transform has been done. Call restore_scattering if the transform
1475 (graphite-interchange.c): Same.
1476 * graphite-poly.c (print_scattering_function): Test for PBB_TRANSFORMED.
1477 (graphite_read_transforms): Initialize PBB_TRANSFORMED.
1478 (apply_poly_transforms): Do not gcc_assert that
1479 the transform is legal.
1480 (new_poly_bb): Initialize PBB_TRANSFORMED, PBB_SAVED, and PBB_ORIGINAL.
1481 Do not initialize PBB_NB_SCATTERING_TRANSFORM, PBB_NB_LOCAL_VARIABLES,
1482 PBB_TRANSFORMED_SCATTERING, and PBB_ORIGINAL_SCATTERING.
1483 (free_poly_dr): Free PBB_TRANSFORMED, PBB_SAVED, and PBB_ORIGINAL.
1484 * graphite-poly.h (struct poly_scattering): New.
1485 (struct poly_bb): Add original, transformed, and saved fields.
1486 Remove transformed_scattering, original_scattering, nb_local_variables,
1487 and nb_scattering_transform fields.
1488 (PBB_ORIGINAL, PBB_TRANSFORMED, PBB_SAVED): New.
1489 (poly_scattering_new): New.
1490 (poly_scattering_free): New.
1491 (poly_scattering_copy): New.
1492 (store_scattering_pbb): New.
1493 (store_scattering): New.
1494 (restore_scattering_pbb): New.
1495 (restore_scattering): New.
1496 * graphite-sese-to-poly.c (build_pbb_scattering_polyhedrons):
1497 Initialize PBB_TRANSFORMED and PBB_ORIGINAL.
1499 2009-08-05 Sebastian Pop <sebastian.pop@amd.com>
1501 * graphite-poly.c (print_pbb): Add parentheses in the pretty print.
1504 2009-08-05 Sebastian Pop <sebastian.pop@amd.com>
1506 * Makefile.in (graphite.o): Depends on PREDICT_H.
1507 * graphite.c: Include predict.h.
1508 (graphite_finalize): Call tree_estimate_probability.
1509 * predict.c (predict_loops): Do not call scev_initialize and
1511 (tree_estimate_probability_bb): New.
1512 (tree_estimate_probability): Do not initialize loops: move that
1513 code to the driver. Call tree_estimate_probability_bb.
1514 (tree_estimate_probability_driver): New.
1515 (pass_profile): Use tree_estimate_probability_driver.
1516 * predict.h (tree_estimate_probability): Declared.
1518 2009-08-05 Sebastian Pop <sebastian.pop@amd.com>
1520 * graphite-clast-to-gimple.c (gloog): Add time to TV_GRAPHITE_CODE_GEN.
1521 * graphite-dependences.c (graphite_legal_transform): Add time to
1522 TV_GRAPHITE_DATA_DEPS.
1523 (dependency_between_pbbs_p): Same.
1524 * timevar.def (TV_GRAPHITE_DATA_DEPS, TV_GRAPHITE_CODE_GEN): New.
1526 2009-08-03 Sebastian Pop <sebastian.pop@amd.com>
1528 * Merge from mainline (r149952:150372).
1530 2009-07-28 Sebastian Pop <sebastian.pop@amd.com>
1532 * ChangeLog.graphite: Fix indenting, white spaces and 80 columns.
1533 * graphite-blocking.c: Same.
1534 * graphite-clast-to-gimple.c: Same.
1535 * graphite-dependences.c: Same.
1536 * graphite-poly.c: Same.
1537 * graphite-poly.h: Same.
1538 * graphite-ppl.c: Same.
1539 * graphite-scop-detection.c: Same.
1540 * graphite-sese-to-poly.c: Same.
1543 2009-07-28 Sebastian Pop <sebastian.pop@amd.com>
1545 * graphite-sese-to-poly.c (loop_entry_phi_arg): New.
1546 (remove_simple_copy_phi): New.
1547 (remove_invariant_phi): New.
1548 (simple_copy_phi_p): New.
1549 (reduction_phi_p): New.
1550 (gsi_for_ssa_name_def): New.
1551 (insert_out_of_ssa_copy): New.
1552 (insert_out_of_ssa_copy_on_edge): New.
1553 (create_zero_dim_array): New.
1554 (scalar_close_phi_node_p): New.
1555 (rewrite_close_phi_out_of_ssa): New.
1556 (rewrite_phi_out_of_ssa): New.
1557 (rewrite_reductions_out_of_ssa): New.
1558 (build_poly_scop): Call rewrite_reductions_out_of_ssa.
1560 * testsuite/gcc.dg/graphite/id-11.c: New.
1561 * testsuite/gcc.dg/graphite/id-15.c: New.
1562 * testsuite/gcc.dg/graphite/interchange-1.c: Un-XFAIL.
1563 * testsuite/gcc.dg/graphite/interchange-2.c: Un-XFAIL.
1564 * testsuite/gcc.dg/graphite/interchange-3.c: Un-XFAIL.
1565 * testsuite/gcc.dg/graphite/interchange-4.c: Un-XFAIL.
1566 * testsuite/gcc.dg/graphite/interchange-7.c: Un-XFAIL.
1567 * testsuite/gcc.dg/graphite/scop-matmult.c: Un-XFAIL.
1568 * testsuite/gfortran.dg/graphite/id-13.f: New.
1569 * testsuite/gfortran.dg/graphite/id-5.f: New.
1571 2009-07-28 Sebastian Pop <sebastian.pop@amd.com>
1573 * graphite-clast-to-gimple.c (graphite_loop_normal_form): Do not
1574 check that nb_reductions_in_loop is zero.
1575 * graphite-scop-detection.c (harmful_stmt_in_bb): Don't filter out
1576 reduction phi nodes.
1577 (nb_reductions_in_loop): Removed.
1578 (graphite_can_represent_loop): Do not call nb_reductions_in_loop.
1579 * graphite-sese-to-poly.c (phi_node_is_iv): Removed.
1580 (bb_contains_non_iv_scalar_phi_nodes): Removed.
1581 (scop_contains_non_iv_scalar_phi_nodes): Removed.
1582 (build_poly_scop): Do not call scop_contains_non_iv_scalar_phi_nodes.
1584 2009-07-28 Sebastian Pop <sebastian.pop@amd.com>
1586 * graphite-clast-to-gimple.c (build_cloog_prog): Do not code generate
1587 statements that have an empty iteration domain.
1588 * testsuite/gfortran.dg/graphite/id-16.f: New.
1590 2009-07-28 Sebastian Pop <sebastian.pop@amd.com>
1592 * tree-scalar-evolution.c (instantiate_scev_1): Return
1593 chrec_dont_know when the result is not above instantiate_below.
1594 * graphite-scop-detection.c (scopdet_basic_block_info): Fix formatting.
1595 * graphite-sese-to-poly.c (create_linear_expr_from_tree): Assert that
1596 the tree has a known scalar evolution.
1597 * testsuite/gfortran.dg/graphite/id-14.f: New.
1598 * testsuite/gfortran.dg/graphite/id-15.f: New.
1600 2009-07-28 Sebastian Pop <sebastian.pop@amd.com>
1602 * sese.c (rename_variables_in_stmt): Pass in an extra parameter
1604 (rename_variables): Keep inserting renames after the ones already
1607 2009-07-28 Sebastian Pop <sebastian.pop@amd.com>
1609 * graphite-sese-to-poly.c (compare_bb_depths): New.
1610 (graphite_sort_dominated_info): New.
1611 (build_scop_bbs_1): Call graphite_sort_dominated_info.
1612 (build_scop_scattering): Fix comment.
1614 2009-07-28 Sebastian Pop <sebastian.pop@amd.com>
1616 * graphite.c (graphite_finalize): Call print_loops instead of
1617 dump_function_to_file.
1618 * testsuite/gcc.dg/graphite/graphite.exp: Fix formatting.
1619 * testsuite/gcc.dg/graphite/pr35356-1.c: New. Look for the number of
1620 loops generated in the graphite output file.
1621 * testsuite/gcc.dg/graphite/pr35356-2.c: New.
1622 * testsuite/gcc.dg/graphite/pr35356-3.c: New. XFAILed for now.
1623 * testsuite/gfortran.dg/graphite/id-12.f: New.
1625 2009-07-24 Li Feng <nemokingdom@gmail.com>
1627 * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-8.c:
1630 2009-07-24 Li Feng <nemokingdom@gmail.com>
1631 Tobias Grosser <grosser@fim.uni-passau.de>
1633 * graphite-sese-to-poly.c (pdr_add_alias_set): Use data reference's
1634 alias set number build alias in ACCESSES polyhedron.
1635 (build_alias_set_for_drs): New.
1636 (build_pbb_drs): Added build_alias_set_for_drs.
1637 * graphite-dependences.c (poly_drs_may_alias_p): New.
1638 (graphite_carried_dependence_level_k): Check alias information
1639 before building polyhedron.
1641 2009-07-24 Tobias Grosser <grosser@fim.uni-passau.de>
1643 * Makefile.in (lambda-code.o): Fix formatting.
1645 2009-07-24 Tobias Grosser <grosser@fim.uni-passau.de>
1647 * Merge from mainline (r149350-149952)
1649 2009-07-18 Tobias Grosser <grosser@fim.uni-passau.de>
1651 * graphite-poly.c (apply_poly_transforms): Move strip_mine
1652 before interchange to prepare for loop blocking.
1654 2009-07-18 Tobias Grosser <grosser@fim.uni-passau.de>
1656 * graphite-poly.c (apply_poly_transforms): Add checks after every
1658 * graphite-sese-to-poly.c (build_poly_scop): Remove check, as already
1659 done in apply_poly_transforms.
1661 2009-07-17 Konrad Trifunovic <konrad.trifunovic@gmail.com>
1663 * graphite-dependences.c (build_lexicographically_gt_constraint):
1664 Replace RES parameter with *RES.
1665 (dependence_polyhedron_1): Pass an address of the parameter RES
1666 instead of value of RES.
1668 2009-07-16 Sebastian Pop <sebastian.pop@amd.com>
1670 * graphite.c (graphite_finalize): Fix comment.
1671 (graphite_transform_loops): Reset scev info after code generation
1674 2009-07-16 Sebastian Pop <sebastian.pop@amd.com>
1676 * graphite.c (graphite_finalize): Call scev_reset.
1678 2009-07-16 Sebastian Pop <sebastian.pop@amd.com>
1680 * graphite-clast-to-gimple.c (compute_cloog_iv_types): Do not create
1681 GBB_CLOOG_IV_TYPES hash table twice.
1682 * graphite-sese-to-poly.c (free_gimple_bb): Call free_data_refs.
1683 (add_condition_to_domain): Clear GMP values.
1685 2009-07-16 Sebastian Pop <sebastian.pop@amd.com>
1687 * graphite-dependences.c: Fix formatting.
1688 * graphite-poly.c (free_poly_dr): Also free PDR_DATA_CONTAINER.
1689 (pbb_number_of_iterations): Free ppl_Linear_Expression.
1690 * graphite-sese-to-poly.c: Fix formatting.
1691 * graphite.c (graphite_transform_loops): Create the hash table
1692 after the early return.
1694 2009-07-16 Sebastian Pop <sebastian.pop@amd.com>
1696 * testsuite/gcc.dg/graphite/id-14.c: New.
1697 * testsuite/gcc.dg/graphite/pr40157.c: New.
1698 * testsuite/gfortran.dg/graphite/id-11.f: New.
1700 2009-07-16 Sebastian Pop <sebastian.pop@amd.com>
1702 * graphite-sese-to-poly.c (nb_pbbs_in_loops): New.
1703 (build_poly_scop): Return false when there are no pbbs within
1704 loops to avoid to pass to cloog scops with no loops.
1706 2009-07-16 Sebastian Pop <sebastian.pop@amd.com>
1708 * graphite-sese-to-poly.c (build_pbb_scattering_polyhedrons): Avoid
1709 useless test "i % 2".
1710 (build_pbb_scattering_polyhedrons): Fix formatting.
1711 (build_poly_dr): Same.
1712 * graphite.c (graphite_transform_loops): Restructure.
1714 2009-07-14 Razya Ladelsky <razya@il.ibm.com>
1716 * tree-ssa-loop-manip.c (rewrite_phi_with_iv): Remove
1717 reduction_list parameter.
1718 (rewrite_all_phi_nodes_with_iv): Same.
1719 (canonicalize_loop_ivs): Same.
1720 * tree-parloops.c (struct brli): Removed.
1721 (build_reduction_list_info): Removed.
1722 (build_new_reduction): New.
1723 (analyze_reduction_list): Removed.
1724 (gather_scalar_reductions): Find reductions instead of phi
1725 nodes that can't be canonicalized.
1726 (try_create_reduction_list): Remove reduction_list parameter.
1727 (gen_parallel_loop): Same.
1728 (parallelize_loops): Remove analyze_reductions variable,
1729 initialization and free.
1730 Change reduction_list htab initialization to reduction_info
1731 elements instead of ssa names.
1732 Call try_create_reduction_list and gen_parallel_loop without
1733 analyzed_reduction argument.
1734 * graphite-clast-to-gimple (graphite_loop_normal_form): Call
1735 canonicalize_loop_ivs with one less argument.
1736 * tree-flow.h (canonicalize_loop_ivs): Remove one argument.
1738 2009-07-14 Konrad Trifunovic <konrad.trifunovic@gmail.com>
1740 * graphite-dependences.c (new_poly_dr_pair): New.
1741 (dependence_polyhedron): Renamed into dependence_polyhedron_1.
1742 (new_poly_dr_pair): New.
1743 (eq_poly_dr_pair_p): New.
1744 (hash_poly_dr_pair_p): New.
1745 * graphite-dependences.h (struct poly_dr_pair): New.
1746 (eq_poly_dr_pair_p): Declared.
1747 (hash_poly_dr_pair_p): Declared.
1748 * graphite-poly.c (new_scop): Initialize SCOP_ORIGINAL_PDR_PAIRS.
1749 (free_scop): Free SCOP_ORIGINAL_PDR_PAIRS.
1750 * graphite-poly.h (struct scop): Add original_pdr_pairs field.
1751 * Makefile.in (graphite-poly.o): Add dependence on
1752 graphite-dependences.h.
1754 2009-07-14 Sebastian Pop <sebastian.pop@amd.com>
1756 * graphite-scop-detection.c (graphite_can_represent_scev): Do not let
1757 polynomials of degree > 1 pass to Graphite.
1758 * tree-chrec.c (scev_is_linear_expression): Call
1759 evolution_function_is_affine_multivariate_p.
1760 * testsuite/gfortran.dg/graphite/id-10.f90: New.
1762 2009-07-14 Sebastian Pop <sebastian.pop@amd.com>
1764 * tree-scalar-evolution.c (compute_overall_effect_of_inner_loop):
1765 Instantiate scevs varying in outer loops.
1766 * testsuite/gfortran.dg/graphite/id-9.f: Correct testcase.
1768 2009-07-14 Sebastian Pop <sebastian.pop@amd.com>
1770 * graphite-sese-to-poly.c (build_loop_iteration_domains): Do not insert
1771 redundant constraint.
1773 2009-07-14 Sebastian Pop <sebastian.pop@amd.com>
1775 * testsuite/gcc.dg/graphite/graphite.exp: Fix comments.
1776 * testsuite/gfortran.dg/graphite/graphite.exp: Trigger actions
1777 based on the file names as in the C testsuite.
1778 * testsuite/gfortran.dg/graphite/block-1.f90: Fix patterns.
1779 * testsuite/gfortran.dg/graphite/block-2.f: Same.
1780 * testsuite/gfortran.dg/graphite/block-3.f90: Same.
1781 * testsuite/gfortran.dg/graphite/block-4.f90: Same.
1782 * testsuite/gfortran.dg/graphite/id-1.f90: Same.
1783 * testsuite/gfortran.dg/graphite/id-2.f90: Same.
1784 * testsuite/gfortran.dg/graphite/id-3.f90: Same.
1785 * testsuite/gfortran.dg/graphite/id-4.f90: Same.
1786 * testsuite/gfortran.dg/graphite/id-6.f: Same.
1787 * testsuite/gfortran.dg/graphite/id-9.f: Same.
1788 * testsuite/gfortran.dg/graphite/interchange-1.f: Same.
1789 * testsuite/gfortran.dg/graphite/interchange-2.f: Same.
1790 * testsuite/gfortran.dg/graphite/scop-1.f: Same.
1792 2009-07-14 Sebastian Pop <sebastian.pop@amd.com>
1794 * sese.c (expand_scalar_variables_call): New.
1795 (expand_scalar_variables_ssa_name): Handle calls in expander.
1797 2009-07-13 Sebastian Pop <sebastian.pop@amd.com>
1799 * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-6.c:
1800 Expect to see the pattern twice.
1801 * testsuite/gcc.dg/graphite/interchange-0.c: Un-XFAIL.
1802 * testsuite/gcc.dg/graphite/interchange-5.c: Same.
1803 * testsuite/gcc.dg/graphite/interchange-6.c: Same.
1805 2009-07-13 Sebastian Pop <sebastian.pop@amd.com>
1807 * testsuite/gcc.dg/graphite/id-10.c: New.
1808 * testsuite/gcc.dg/graphite/id-12.c: New.
1809 * testsuite/gfortran.dg/graphite/id-7.f: New.
1810 * testsuite/gfortran.dg/graphite/id-8.f: New.
1812 2009-07-13 Sebastian Pop <sebastian.pop@amd.com>
1814 * graphite-sese-to-poly.c (pdr_add_data_dimensions): Fix division by
1817 2009-07-13 Sebastian Pop <sebastian.pop@amd.com>
1819 * sese.c (rename_variables_in_stmt): Call fold_convert during renaming.
1821 2009-07-13 Sebastian Pop <sebastian.pop@amd.com>
1823 * sese.c (expand_scalar_variables_stmt): Avoid unnecessary expansion.
1825 2009-07-10 Sebastian Pop <sebastian.pop@amd.com>
1827 * graphite-sese-to-poly.c (pdr_add_memory_accesses): Fix order of
1828 building PDR subscripts.
1830 2009-07-10 Sebastian Pop <sebastian.pop@amd.com>
1832 * graphite-sese-to-poly.c (pdr_add_data_dimensions): Fix the
1833 computation of array sizes.
1835 2009-07-10 Sebastian Pop <sebastian.pop@amd.com>
1837 * graphite-sese-to-poly.c (add_param_constraints): Disabled.
1839 2009-07-10 Tobias Grosser <grosser@fim.uni-passau.de>
1841 * graphite-dependences.c (map_into_dep_poly, map_dr_into_dep_poly,
1842 build_pairwise_constraint, dr_equality_constraints,
1843 build_pairwise_scheduling_equality,
1844 build_pairwise_scheduling_inequality, lexicographically_gt_p,
1845 build_lexicographically_gt_constraint, dependence_polyhedron,
1846 graphite_legal_transform_dr, graphite_carried_dependence_level_k):
1847 Move from NNC_Polyhedron to C_Polyhedron.
1848 * graphite-interchange.c (compute_array_size_poly,
1849 gather_access_strides): Dito.
1850 * graphite-poly.c (apply_poly_transforms, new_poly_dr, free_poly_bb,
1851 free_scop, pbb_number_of_iterations): Dito.
1852 * graphite-poly.h (struct poly_dr, pdr_nb_subscripts, struct poly_bb,
1853 pbb_dim_iter_domain, struct scop): Dito.
1854 * graphite-ppl.c (new_Constraint_System_from_Cloog_Matrix,
1855 new_Cloog_Domain_from_ppl_Polyhedron,
1856 new_Cloog_Domain_from_ppl_Pointset_Powerset, ppl_set_coef_gmp,
1857 ppl_insert_dimensions_pointset, ppl_insert_dimensions_pointset,
1858 ppl_strip_loop, ppl_strip_loop, ppl_print_polyhedron_matrix,
1859 ppl_print_powerset_matrix, debug_ppl_polyhedron_matrix,
1860 debug_ppl_powerset_matrix, ppl_read_polyhedron_matrix): Dito.
1861 * graphite-ppl.h (ppl_Pointset_Powerset_C_Polyhedron_t,
1862 new_C_Polyhedron_from_Cloog_Matrix, ppl_print_powerset_matrix,
1863 debug_ppl_powerset_matrix, ppl_insert_dimensions_pointset): Dito.
1864 * graphite-sese-to-poly.c (build_pbb_scattering_polyhedrons,
1865 build_loop_iteration_domains, ppl_constraint_type_from_tree_code,
1866 add_condition_to_domain, add_condition_to_pbb, build_scop_context,
1867 build_scop_iteration_domain, build_poly_dr): Dito
1869 2009-07-09 Sebastian Pop <sebastian.pop@amd.com>
1871 * testsuite/gcc.dg/graphite/graphite.exp: Added a rule to execute
1873 * testsuite/gcc.dg/graphite/run-id-1.c: New.
1875 2009-07-09 Sebastian Pop <sebastian.pop@amd.com>
1877 * graphite-sese-to-poly.c (build_loop_iteration_domains): Add the
1878 positivity constraint on the symbolic number of iterations.
1880 2009-07-09 Sebastian Pop <sebastian.pop@amd.com>
1882 * graphite-sese-to-poly.c (build_loop_iteration_domains): Rewrite.
1884 2009-07-09 Sebastian Pop <sebastian.pop@amd.com>
1885 Tobias Grosser <grosser@fim.uni-passau.de>
1887 * graphite-clast-to-gimple.c (build_scop_context): Removed.
1888 (build_cloog_prog): Directly use SCOP_CONTEXT.
1889 * graphite-poly.c (new_scop): Initialize SCOP_CONTEXT.
1890 (free_scop): Free SCOP_CONTEXT.
1891 (print_scop_context): New.
1892 (print_scop): Call print_scop_context.
1893 (debug_scop_context): New.
1894 * graphite-poly.h (print_scop_context, debug_scop_context): Declared.
1895 (struct scop): Added field context.
1896 (SCOP_CONTEXT): New.
1897 * graphite-sese-to-poly.c (add_param_constraints): New.
1898 (build_scop_context): New.
1899 (build_poly_scop): Call build_scop_context.
1901 2009-07-09 Sebastian Pop <sebastian.pop@amd.com>
1903 * graphite-clast-to-gimple.c (gmp_cst_to_tree): Moved...
1904 * graphite-ppl.c (ppl_set_inhomogeneous_gmp, ppl_set_coef_gmp): New.
1905 (ppl_set_inhomogeneous, ppl_set_coef): Moved...
1906 * graphite-ppl.h: Include double-int.h and tree.h.
1907 (ppl_set_inhomogeneous_gmp, ppl_set_coef_gmp): Declared.
1908 (ppl_set_inhomogeneous, ppl_set_coef): ...here.
1909 (gmp_cst_to_tree): ...here. Reimplemented using mpz_get_double_int.
1910 (tree_int_to_gmp, ppl_set_inhomogeneous_tree, ppl_set_coef_tree): New.
1912 2009-07-09 Sebastian Pop <sebastian.pop@amd.com>
1914 * graphite-clast-to-gimple.c (clast_to_gcc_expression_red): Generate
1915 POINTER_PLUS_EXPR for pointer types.
1916 (clast_to_gcc_expression): Same.
1918 2009-07-09 Sebastian Pop <sebastian.pop@amd.com>
1920 * graphite-poly.c (print_scattering_function): Early return when
1921 PBB_TRANSFORMED_SCATTERING is not initialized.
1922 (print_pbb_domain): Early return when PBB_DOMAIN is not initialized.
1924 2009-07-08 Sebastian Pop <sebastian.pop@amd.com>
1926 * tree-parloops.c (analyze_reduction_list): Remove unused variable
1929 2009-07-08 Razya Ladelsky <razya@il.ibm.com>
1931 * tree-parloops.c (analyze_reduction_list): Change return
1933 (try_create_reduction_list): Move the call to
1934 analyze_reduction_list to the beginining.
1935 Call reduction_phi with analyzed_reductions as argument
1936 instead of reduction_list.
1938 2009-07-08 Tobias Grosser <grosser@fim.uni-passau.de>
1940 * Merge from mainline (r148296:149346)
1942 2009-07-07 Sebastian Pop <sebastian.pop@amd.com>
1944 * graphite-scop-detection.c (graphite_can_represent_init): New.
1945 (graphite_can_represent_scev): Call graphite_can_represent_init:
1946 check that the initial value does not contain multiplications of
1948 (stmt_has_simple_data_refs_p): New.
1949 (stmt_simple_for_scop_p): Call stmt_simple_for_scop_p.
1950 (is_simple_operand): Fix formatting.
1951 * graphite-sese-to-poly.c (try_generate_gimple_bb): Fix formatting.
1953 2009-07-07 Sebastian Pop <sebastian.pop@amd.com>
1955 * testsuite/gcc.dg/graphite/id-13.c: New.
1956 * graphite-sese-to-poly.c (graphite_stmt_p): Do not call
1957 analyze_scalar_evolution, use scalar_evolution_in_region.
1958 (scan_tree_for_params_right_scev): Add extra assert.
1959 (parameter_index_in_region_1): Split from parameter_index_in_region.
1960 (idx_record_params): Use scalar_evolution_in_region.
1961 (find_params_in_bb): Same.
1962 (find_scop_parameters): Same.
1963 (build_loop_iteration_domains): Same.
1964 (create_linear_expr_from_tree): Same.
1965 * sese.c (scalar_evolution_in_region): New.
1966 * sese.h (scalar_evolution_in_region): Declared.
1967 (defined_in_sese_p): New.
1968 * tree-scalar-evolution.c (compute_overall_effect_of_inner_loop): Not
1970 * tree-scalar-evolution.h (compute_overall_effect_of_inner_loop):
1973 2009-07-07 Sebastian Pop <sebastian.pop@amd.com>
1975 * Makefile.in: Replace dependences on tree-chrec.h with SCEV_H.
1976 TREE_DATA_REF_H also implies SCEV_H.
1978 2009-07-07 Sebastian Pop <sebastian.pop@amd.com>
1980 * graphite-poly.c (print_scop_params): New.
1981 (print_scop): Call print_scop_params.
1982 (debug_scop_params): New.
1983 * graphite-poly.h (print_scop_params, debug_scop_params): Declared.
1985 2009-07-07 Li Feng <nemokingdom@gmail.com>
1987 * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-4.c: New.
1988 * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-5.c: New.
1989 * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-6.c: New.
1990 * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-7.c: New.
1991 * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-8.c: New.
1992 * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-9.c: New.
1994 2009-07-07 Li Feng <nemokingdom@gmail.com>
1996 * graphite-clast-to-gimple.c (mark_loops_parallel): Dump information
1997 for dependency checking part.
1998 * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-1.c: Add
1999 tests for dependency checking.
2000 * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-2.c: Ditto.
2001 * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-3.c: Ditto.
2002 * testsuite/gcc.dg/graphite/graphite_autopar/graphite_autopar.exp: Add
2003 flag -fdump-tree-graphite-all for autopar testsuites.
2005 2009-07-06 Sebastian Pop <sebastian.pop@amd.com>
2007 * Makefile.in (tree-ssa-loop-manip.o): Depends on langhooks.h.
2008 * tree-parloops.c (rewrite_phi_with_iv, rewrite_all_phi_nodes_with_iv,
2009 canonicalize_loop_ivs): Moved...
2010 * tree-ssa-loop-manip.c: ... here. Include langhooks.h.
2012 2009-07-06 Sebastian Pop <sebastian.pop@amd.com>
2014 * tree-parloops.c (try_create_reduction_list): Pass an extra
2015 argument analyzed_reductions. Call analyze_reduction_list.
2016 (gen_parallel_loop): Do not call analyze_reduction_list.
2017 (parallelize_loops): Init and finalize analyzed_reductions.
2019 2009-07-06 Li Feng <nemokingdom@gmail.com>
2021 * testsuite/gcc.dg/graphite/graphite_autopar/graphite_autopar.exp:
2022 Added flag -fno-loop-strip-mine for autopar testcase.
2024 2009-07-04 Li Feng <nemokingdom@gmail.com>
2026 * graphite-dependences.c (graphite_carried_dependence_level_k): Use
2027 transformed scattering dimension instead of unmatch orignal when
2028 calling dependence_polyhedron.
2030 2009-06-30 Sebastian Pop <sebastian.pop@amd.com>
2032 * opts.c (decode_options): Enable flag_loop_strip_mine at -O2.
2034 2009-06-30 Sebastian Pop <sebastian.pop@amd.com>
2036 * graphite-poly.c (pbb_number_of_iterations): Check for returned
2037 value 1 from ppl_Pointset_Powerset_NNC_Polyhedron_maximize.
2039 2009-06-30 Sebastian Pop <sebastian.pop@amd.com>
2041 * graphite-blocking.c (pbb_strip_mine_profitable_p): New.
2042 (pbb_do_strip_mine): Call pbb_strip_mine_profitable_p.
2043 * graphite-poly.c (pbb_number_of_iterations): New.
2044 * graphite-poly.h (pbb_number_of_iterations): Declared.
2045 (pbb_iterator_dim, pbb_parameter_dim): New.
2047 2009-06-29 Sebastian Pop <sebastian.pop@amd.com>
2049 * graphite-clast-to-gimple.c (graphite_create_new_loop): Revert the
2050 last commit on type of lower and upper bound of loops.
2052 2009-06-29 Li Feng <nemokingdom@gmail.com>
2054 * Makefile.in (graphite-clast-to-gimple.o): Added dependence on
2055 graphite-dependences.h.
2056 * graphite-clast-to-gimple.c (new_bb_pbb_def): New.
2057 (mark_bb_with_pbb): New.
2058 (get_stmtfor_depth): New.
2059 (find_pbb_via_hash): New.
2060 (dependency_in_loop_p): New.
2061 (mark_loops_parallel): New.
2062 (free_aux_in_new_loops): New.
2063 (translate_clast): Add parameter BB_PBB_MAPPING. Mark newly created
2064 bb with it's relevant pbb. Mark newly created loops. Remove mark
2065 innermost loop parallel without checking.
2066 (gloog): Add parameter BB_PBB_MAPPING.
2067 * graphite-clast-to-gimple.h (struct bb_pbb_def): New.
2068 (gloog): Change declaration.
2069 (mark_loop_parallel): Make extern.
2070 (free_aux_in_new_loops): Declare.
2071 (bb_pbb_map_hash): New.
2072 (eq_bb_pbb_map): New.
2073 * graphite.c (graphite_transform_loops): Added BB_PBB_MAPPING. Trigger
2074 auto parallelization when flag_graphite_force_parallel is set.
2075 (graphite_finalize): Added free_aux_in_new_loops.
2076 * tree-parloops.c (parallelize_loops): Only generate parallel code for
2077 the innermost loop that marked parallel. Use
2078 flag_graphite_force_parallel instead of loop->can_be_parallel.
2079 (loop_parallel_p): Move inner most checking out of function.
2081 2009-06-26 Sebastian Pop <sebastian.pop@amd.com>
2083 * graphite-clast-to-gimple.c (graphite_create_new_loop): Make the
2084 type of lower and upper bound of loops signed long int.
2086 2009-06-26 Sebastian Pop <sebastian.pop@amd.com>
2088 * cfgloopmanip.c (create_empty_loop_on_edge): Gimplify the loop exit
2089 expression outside the loop.
2091 2009-06-26 Sebastian Pop <sebastian.pop@amd.com>
2093 * gcc.dg/graphite/interchange-8.c: New.
2095 2009-06-26 Sebastian Pop <sebastian.pop@amd.com>
2097 * gcc.dg/graphite/interchange-0.c: XFailed.
2098 * gcc.dg/graphite/interchange-5.c: XFailed.
2099 * gcc.dg/graphite/interchange-6.c: XFailed.
2101 2009-06-26 Sebastian Pop <sebastian.pop@amd.com>
2103 * graphite-interchange.c (compute_array_size_poly): The end of the
2104 recursion should return 1.
2106 2009-06-26 Sebastian Pop <sebastian.pop@amd.com>
2108 * graphite-interchange.c (compute_array_size_cstr): Allow the
2109 subscript multiplier to be -1.
2110 (compute_array_size): Use PDR_DATA_CONTAINER and not PDR_ACCESSES.
2111 * graphite-poly.c (new_poly_dr): Takes an extra argument for the
2112 data_container. Initializes PDR_DATA_CONTAINER.
2113 (print_pdr_access_layout): New.
2114 (print_pdr): Call print_pdr_access_layout. Print PDR_DATA_CONTAINER.
2115 * graphite-poly.h (struct poly_dr): Adjust comment. Add a new field
2117 (PDR_DATA_CONTAINER): New.
2118 (new_poly_dr): Update declaration.
2119 * graphite-sese-to-poly.c (pdr_add_data_dimensions): New.
2120 (build_poly_dr): Call pdr_add_data_dimensions.
2122 2009-06-26 Sebastian Pop <sebastian.pop@amd.com>
2124 * graphite-poly.h (struct poly_dr): Fix comment.
2125 * graphite-sese-to-poly.c (pdr_add_alias_set): New.
2126 (pdr_add_memory_accesses): New.
2127 (build_poly_dr): Call pdr_add_memory_accesses and pdr_add_alias_set.
2129 2009-06-26 Sebastian Pop <sebastian.pop@amd.com>
2131 * graphite-poly.c (print_pdrs, debug_pdrs): New.
2132 (print_pbb): Add call to print_pdrs.
2133 * graphite-poly.h (print_pdrs, debug_pdrs): Declared.
2135 2009-06-24 Konrad Trifunovic <konrad.trifunovic@gmail.com>
2136 Li Feng <nemokingdom@gmail.com>
2138 * graphite-dependences.c (graphite_carried_dependence_level_k): New.
2139 (dependency_between_pbbs_p): New.
2140 (lexicographically_gt_p): Assure !empty_p before polyhedron
2141 intersection assign.
2142 (build_lexicographically_gt_constraint): Correct lexicographically
2144 * graphite-dependences.h: New.
2145 * Makefile.in (graphite-dependences.o): Add graphite-dependences.h.
2147 2009-06-24 Sebastian Pop <sebastian.pop@amd.com>
2149 * graphite-clast-to-gimple.c (print_clast_stmt): New.
2150 (gloog): Print to dump_file the generated clast.
2151 * graphite-clast-to-gimple.h (print_clast_stmt): Declared.
2152 * graphite-interchange.c (pbb_do_interchange): Fix dump formatting.
2154 2009-06-24 Sebastian Pop <sebastian.pop@amd.com>
2156 * graphite-poly.c (extend_scattering): Increment
2157 PBB_NB_LOCAL_VARIABLES by the number of added dimensions.
2159 2009-06-24 Sebastian Pop <sebastian.pop@amd.com>
2161 * graphite-interchange.c (compute_array_size_poly): Added exit of
2162 recursion condition. Continue iterating even after the first equality.
2163 (compute_array_size): Same.
2165 2009-06-24 Li Feng <nemokingdom@gmail.com>
2167 * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-1.c: Update
2168 -fdump-tree-final_cleanup to -fdump-tree-optimized.
2169 * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-2.c: Ditto.
2170 * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-3.c: Ditto.
2171 * testsuite/gcc.dg/graphite/graphite_autopar/graphite_autopar.exp: Ditto.
2173 2009-06-23 Sebastian Pop <sebastian.pop@amd.com>
2175 * sese.c (expand_scalar_variables_stmt): Expand scalar variables
2176 only when the use verifies is_gimple_reg.
2178 2009-06-23 Sebastian Pop <sebastian.pop@amd.com>
2180 * graphite-clast-to-gimple.c (build_cloog_prog): Fix memory corruption.
2181 Allocate scaldims after call to unify_scattering_dimensions.
2183 2009-06-23 Sebastian Pop <sebastian.pop@amd.com>
2185 * graphite-clast-to-gimple.c (translate_clast): Fix memory leak.
2187 2009-06-23 Sebastian Pop <sebastian.pop@amd.com>
2188 Albert Cohen <albert.cohen@inria.fr>
2190 * graphite-blocking.c (pbb_strip_mine_loop_depth): Do not use local
2191 variables for the strip mining.
2193 2009-06-23 Sebastian Pop <sebastian.pop@amd.com>
2194 Pranav Garg <pranav.garg2107@gmail.com>
2196 * Makefile.in (OBJS-common): Added graphite-blocking.o.
2197 (graphite-sese-to-poly.o): Moved down to be in lexicographical order.
2198 (graphite-blocking.o): New rule.
2199 (graphite-poly.o, graphite-ppl.o): Moved to be in lexicographical order.
2200 * graphite-blocking.c: New.
2201 * graphite-poly.c (apply_poly_transforms): Call scop_do_strip_mine for
2202 flag_loop_strip_mine.
2203 (psct_scattering_dim_for_loop_depth): New.
2204 * graphite-poly.h (scop_do_strip_mine): Declared.
2205 (psct_add_local_variable): Increment PBB_NB_LOCAL_VARIABLES.
2206 * tree-ssa-loop.c (gate_graphite_transforms): Do not fail when using
2207 flag_loop_strip_mine.
2209 2009-06-23 Sebastian Pop <sebastian.pop@amd.com>
2211 * graphite-poly.c (extend_scattering): Avoid initializing and freeing
2212 a GMP value and a PPL coefficient at each iteration of a loop.
2214 2009-06-23 Sebastian Pop <sebastian.pop@amd.com>
2216 * graphite-dependences.c (dependence_polyhedron): Do not use
2217 pbb_nb_scattering_dims anymore. Use pbb_nb_scattering_orig and
2218 pbb_nb_scattering_transform.
2219 (graphite_legal_transform_dr): Same.
2220 * graphite-poly.c (extend_scattering): Same.
2221 (unify_scattering_dimensions): Same.
2222 (print_scattering_function): Same.
2223 (new_poly_bb): Initialize PBB_NB_SCATTERING_TRANSFORM and
2224 PBB_NB_LOCAL_VARIABLES.
2225 * graphite-poly.h (pbb_nb_scattering): Removed declaration.
2226 (struct poly_bb): Added nb_local_variables and nb_scattering_transform.
2227 (PBB_NB_LOCAL_VARIABLES, PBB_NB_SCATTERING_TRANSFORM): New.
2228 (pbb_nb_scattering_orig, pbb_nb_scattering_transform): New.
2229 (pbb_nb_scattering_dims, pbb_nb_scattering): Removed.
2230 (pbb_nb_scattering_transform): New.
2231 (pbb_nb_local_vars): Return PBB_NB_LOCAL_VARIABLES.
2232 (psco_scattering_dim): Add assert on parameters.
2233 (psct_scattering_dim): Same.
2234 (psct_scattering_dim_for_loop_depth): Declared.
2235 (psct_local_var_dim): New.
2236 (psco_iterator_dim, psco_parameter_dim): Add assert on parameters.
2237 (psct_iterator_dim, psct_parameter_dim): Same. To maintain the
2238 correct layout, call pbb_nb_local_vars.
2239 (psct_add_local_variable, psct_add_scattering_dimension): New.
2240 * graphite-sese-to-poly.c (build_pbb_scattering_polyhedrons):
2241 Initialize PBB_NB_SCATTERING_TRANSFORM.
2243 2009-06-23 Sebastian Pop <sebastian.pop@amd.com>
2245 * graphite-ppl.c (set_inhomogeneous): Renamed ppl_set_inhomogeneous.
2246 (set_coef): Renamed ppl_set_coef.
2247 * graphite-ppl.h (ppl_set_inhomogeneous, ppl_set_coef): Declared.
2249 2009-06-23 Sebastian Pop <sebastian.pop@amd.com>
2251 * graphite-dependences.c (build_pairwise_scheduling_inequality): Don't
2252 test a boolean against 1.
2253 * graphite-interchange.c (pbb_interchange_loop_depths): Do not build
2254 a new polyhedron for the PBB_TRANSFORMED_SCATTERING.
2255 (pbb_do_interchange): Returns true when a transform has been performed.
2256 (scop_do_interchange): Same.
2257 * graphite-poly.c (apply_poly_transforms): Use the return value of
2258 scop_do_interchange.
2259 * graphite-poly.h (scop_do_interchange): Update declaration.
2261 2009-06-23 Tobias Grosser <grosser@fim.uni-passau.de>
2263 * graphite-clast-to-gimple.c (gloog): Reset loop->aux right
2265 * sese.c (sese_reset_aux_in_loops): New.
2266 * sese.h (sese_reset_aux_in_loops): New.
2268 2009-06-19 Sebastian Pop <sebastian.pop@amd.com>
2270 * graphite-sese-to-poly.c (scan_tree_for_params_int): Pass in the
2271 multiplier and multiply the constant by the multiplier.
2272 (scan_tree_for_params): Bound the multiplier to its MULT_EXPR.
2273 (build_poly_dr): Do not use the multiplier to define the subscript.
2275 2009-06-19 Sebastian Pop <sebastian.pop@amd.com>
2277 * graphite-poly.c (new_poly_dr): Pass an extra argument for the
2278 compiler's data reference. Initialize PDR_CDR.
2279 (print_pdr): Call dump_data_reference.
2280 * graphite-poly.h (struct poly_dr): Rename black_box into pbb.
2281 Add compiler_dr field.
2282 (PDR_BB): Renamed PDR_PBB.
2284 * graphite-sese-to-poly.c (build_poly_dr): Pass to new_poly_dr
2285 GCC's data reference representation.
2286 * tree-data-ref.c (debug_data_references, debug_data_reference): New.
2287 * tree-data-ref.h (debug_data_references, debug_data_reference): Decl.
2289 2009-06-19 Sebastian Pop <sebastian.pop@amd.com>
2291 * graphite-poly.c (print_scattering_function): Also print the layout.
2292 * graphite-poly.h (pbb_nb_local_vars): New.
2294 2009-06-19 Sebastian Pop <sebastian.pop@amd.com>
2296 * graphite-poly.c (print_pbb_domain): Also print the layout names.
2298 2009-06-19 Sebastian Pop <sebastian.pop@amd.com>
2300 * graphite-poly.c (print_pdr, debug_pdr): New.
2301 * graphite-poly.h (print_pdr, debug_pdr): Declared.
2302 (PDR_BASE): Removed.
2304 2009-06-18 Sebastian Pop <sebastian.pop@amd.com>
2306 * gcc/testsuite/gcc.dg/graphite/interchange-{1..7}.c: New avatars of
2309 2009-06-18 Sebastian Pop <sebastian.pop@amd.com>
2311 * graphite-interchange.c (compute_subscript): Allow also -1 in the
2312 subscript identification column.
2313 (pbb_do_interchange): Print to dump_file that some loops "will be
2314 interchanged". Rely on that chain of characters in the testcases.
2315 * gcc.dg/graphite/interchange-0.c: New.
2316 * gcc.dg/graphite/graphite.exp: Iterate over the testsuite
2317 interchange-*.c files and compile them with -floop-interchange.
2319 2009-06-18 Pranav Garg <pranav.garg2107@gmail.com>
2321 * graphite-interchange.c (interchange_profitable_p): Renamed
2322 pbb_interchange_profitable_p.
2324 2009-06-18 Sebastian Pop <sebastian.pop@amd.com>
2325 Harsha Jagasia <harsha.jagasia@amd.com>
2326 Pranav Garg <pranav.garg2107@gmail.com>
2328 * graphite-interchange.c (interchange_profitable_p): Make static.
2329 (pbb_interchange_loop_depths, pbb_do_interchange,
2330 scop_do_interchange): New.
2331 * graphite-poly.c (apply_poly_transforms): Call scop_do_interchange
2332 for flag_loop_interchange.
2333 * graphite-poly.h (scop_do_interchange): Declared.
2334 * tree-ssa-loop.c (gate_graphite_transforms): Do not fail when
2335 flag_loop_interchange is used.
2337 2009-06-18 Sebastian Pop <sebastian.pop@amd.com>
2339 * graphite-dependences.c (dependence_polyhedron): Update use of
2340 pbb_nb_scattering_dims.
2341 * graphite-poly.h (pbb_nb_scattering_dims): Do not pass SCOP.
2342 (pbb_nb_scattering): Update use of pbb_nb_scattering_dims.
2343 (psco_scattering_dim, psct_scattering_dim, psco_iterator_dim,
2344 psct_iterator_dim, psco_parameter_dim, psct_parameter_dim): New.
2346 2009-06-16 Sebastian Pop <sebastian.pop@amd.com>
2348 * graphite.c: Cleanup foo.
2350 2009-06-16 Sebastian Pop <sebastian.pop@amd.com>
2352 * Merge from mainline (r143684:148293).
2353 * Disabled libpcp until it gets fixed.
2355 2009-06-05 Sebastian Pop <sebastian.pop@amd.com>
2356 Harsha Jagasia <harsha.jagasia@amd.com>
2358 * graphite-interchange.c: New.
2359 * Makefile.in (graphite-interchange.o): New.
2360 * graphite-poly.h (interchange_profitable_p): Declared.
2361 * graphite-ppl.h (value_max): New.
2363 2009-06-04 Sebastian Pop <sebastian.pop@amd.com>
2365 * graphite-dependences.c (dependence_polyhedron): Use pdr_dim.
2366 * graphite-poly.h: Fix some comments.
2370 2009-06-04 Sebastian Pop <sebastian.pop@amd.com>
2373 (pdr_accessp_nb_subscripts): Renamed pdr_nb_subscripts.
2374 (pdr_accessp_nb_iterators): Renamed pdr_dim_iter_domain.
2375 (pdr_accessp_nb_params): Renamed pdr_nb_params.
2376 (pdr_accessp_alias_set_dim): Renamed pdr_alias_set_dim.
2377 (pdr_accessp_subscript_dim): Renamed pdr_subscript_dim.
2378 (pdr_accessp_iterator_dim): Renamed pdr_iterator_dim.
2379 (pdr_accessp_param_dim): Renamed pdr_parameter_dim.
2380 (pbb_nb_loops): Renamed pbb_dim_iter_domain.
2381 * graphite-clast-to-gimple.c: Same.
2382 * graphite-dependences.c: Same.
2383 * graphite-poly.c: Same.
2384 * graphite-sese-to-poly.c: Same.
2386 2009-06-03 Sebastian Pop <sebastian.pop@amd.com>
2388 * graphite-clast-to-gimple.c (build_iv_mapping): Insert full
2389 expressions for an IV rename, as returned by clast_to_gcc_expression.
2390 (copy_renames): Rename new_name to expr.
2391 * sese.c (debug_rename_elt): Same.
2394 (sese_adjust_liveout_phis): Call force_gimple_operand before using
2395 the information from the rename map.
2396 (rename_variables_in_stmt): Same.
2397 (add_loop_exit_phis): Rename new_name to expr.
2398 (insert_loop_close_phis): Same.
2399 (add_guard_exit_phis): Same. Call force_gimple_operand.
2400 * sese.h (struct rename_map_elt): Rename new_name to expr.
2401 (new_rename_map_elt): Same.
2403 2009-06-03 Sebastian Pop <sebastian.pop@amd.com>
2405 * graphite-clast-to-gimple.c (build_iv_mapping): Use set_rename.
2406 * sese.c (set_rename): Make it extern.
2407 * sese.h (set_rename): Declared.
2409 2009-06-03 Sebastian Pop <sebastian.pop@amd.com>
2411 * graphite-poly.c (extend_scattering): Free values.
2412 * graphite-ppl.c (new_Cloog_Domain_from_ppl_Pointset_Powerset):
2414 (ppl_print_powerset_matrix): Same.
2415 * graphite-scop-detection.c (free_scops_1): New.
2416 (limit_scops): Call free_scops_1.
2417 * graphite-sese-to-poly.c (build_scop_bbs_1): Free dom.
2418 (build_poly_dr): Free PPL coefficients.
2419 * tree-parloops.c (rewrite_all_phi_nodes_with_iv): Free bbs.
2421 2009-06-02 Sebastian Pop <sebastian.pop@amd.com>
2423 * graphite-dependences.c: New.
2424 * graphite-data-ref.c: Removed.
2425 * graphite-data-ref.h: Removed.
2426 * Makefile.in (graphite-data-ref.o): Removed.
2427 (graphite-dependences.o): Added.
2428 * graphite-clast-to-gimple.c: Remove dependence on graphite-data-ref.h.
2429 * graphite-poly.c: Same.
2430 Move the data dependence testing to graphite-dependences.c.
2432 2009-05-19 Tobias Grosser <grosser@fim.uni-passau.de>
2434 * graphite-scop-detection.c (graphite_can_represent_loop): Renamed
2435 from graphite_cannot_represent_loop. Code refactored.
2436 (scopdet_basic_block_info): Call graphite_can_represent_loop.
2438 2009-05-17 Li Feng <nemokingdom@gmail.com>
2440 * testsuite/gcc.dg/graphite/graphite_autopar/graphite_autopar.exp:
2441 Cover all the testcases (not only the filtered ones).
2443 2009-05-17 Tobias Grosser <grosser@fim.uni-passau.de>
2445 * graphite-scop-detection.c (stmt_simple_for_scop_p): Remove
2446 unnecessary check. Update comments. Move check for REAL_TYPE here.
2447 (harmful_stmt_in_bb): Remove checks for conditions. This is already
2448 done in (stmt_simple_for_scop_p).
2450 2009-05-14 Tobias Grosser <grosser@fim.uni-passau.de>
2452 * graphite.c (print_global_statistics): New.
2453 (print_graphite_scop_statistic): New.
2454 (print_graphite_statistics): New.
2455 (graphite_initialize, graphite_transform_loops): Print statistics.
2456 * graphite-scop-detection (build_scops): Print statistics.
2457 (print_graphite_scop_statistics): New.
2458 (print_graphite_statistics): New.
2460 2009-05-13 Sebastian Pop <sebastian.pop@amd.com>
2462 * graphite-clast-to-gimple.c (struct clast_name_index): Removed.
2463 (debug_clast_name_index): Removed.
2464 (debug_clast_name_indexes_1): Removed.
2465 (debug_clast_name_indexes): Removed.
2466 (clast_name_index_elt_info): Removed.
2467 (eq_clast_name_indexes): Removed.
2468 (clast_name_to_index): Removed.
2469 (new_clast_name_index): Removed.
2470 (save_clast_name_index): Removed.
2471 (save_var_name): Moved...
2472 (init_sese_params_index): Removed.
2473 (clast_name_to_gcc): Remove use of name_tree.
2474 (initialize_cloog_names): Same.
2475 (gloog): Do not call init_sese_params_index.
2476 * graphite-sese-to-poly.c (save_var_name): ...here.
2477 (parameter_index_in_region): New.
2478 * sese.c (new_sese): Initialize SESE_PARAMS_NAMES.
2479 (parameter_index_in_region): Removed.
2480 (is_parameter): Remove use of name_tree.
2481 * sese.h (struct name_tree): Removed.
2482 (struct sese): Remove use of name_tree. New field params_names.
2483 (SESE_PARAMS_NAMES): New.
2484 (SESE_PARAMS): Remove duplicate.
2485 (parameter_index_in_region): Removed.
2486 (sese_nb_params): Remove use of name_tree.
2487 (struct clast_name_index): New.
2488 (new_clast_name_index): New.
2489 (clast_name_to_index): New.
2490 (save_clast_name_index): New.
2491 (debug_clast_name_index): New.
2492 (debug_clast_name_indexes_1): New.
2493 (debug_clast_name_indexes): New.
2494 (clast_name_index_elt_info): New.
2495 (eq_clast_name_indexes): New.
2497 2009-05-13 Sebastian Pop <sebastian.pop@amd.com>
2499 * graphite-clast-to-gimple.c (compute_cloog_iv_types_1): Call
2500 pbb_to_depth_to_oldiv. Remove call to oldiv_for_loop.
2501 (graphite_loop_normal_form): Do not pass region. Do not
2502 initialize SESE_OLDIVS.
2503 (build_graphite_loop_normal_form): Update call to
2504 graphite_loop_normal_form.
2505 * sese.c (debug_oldivs): Removed.
2506 (new_sese): Do not initialize SESE_OLDIVS.
2507 (free_sese): Do not free SESE_OLDIVS.
2508 (oldiv_for_loop): Removed.
2509 * sese.h (struct sese): Remove old_ivs.
2510 (SESE_OLDIVS): Removed.
2511 (oldiv_for_loop): Removed.
2513 2009-05-13 Sebastian Pop <sebastian.pop@amd.com>
2515 * graphite-clast-to-gimple.c (clast_name_to_gcc): Pass newivs,
2516 remove ivstack. Remove call to loop_iv_stack_get_iv_from_name,
2517 replaced by a call to newivs_to_depth_to_newiv.
2518 (clast_to_gcc_expression): Pass newivs, remove ivstack.
2519 (clast_to_gcc_expression_red): Same.
2520 (gcc_type_for_clast_expr): Same.
2521 (gcc_type_for_clast_eq): Same.
2522 (graphite_translate_clast_equation): Same.
2523 (graphite_create_guard_cond_expr): Same.
2524 (graphite_create_new_guard): Same.
2525 (graphite_create_new_loop): Same.
2526 (build_iv_mapping): Same.
2527 (translate_clast): Same.
2529 (loop_iv_stack_patch_for_consts): Removed. *
2530 sese.c (iv_stack_entry_is_constant): Removed.
2531 (iv_stack_entry_is_iv): Removed.
2532 (loop_iv_stack_push_iv): Removed.
2533 (loop_iv_stack_insert_constant): Removed.
2534 (loop_iv_stack_pop): Removed.
2535 (loop_iv_stack_get_iv): Removed.
2536 (loop_iv_stack_get_iv_from_name): Removed.
2537 (debug_loop_iv_stack): Removed.
2538 (free_loop_iv_stack): Removed.
2539 (loop_iv_stack_remove_constants): Removed. *
2540 sese.h (iv_stack_entry_kind): Removed.
2541 (iv_stack_entry_data_union): Removed.
2542 (iv_stack_entry_struct): Removed.
2543 (iv_stack_entry_p): Removed.
2544 (debug_oldivs, debug_loop_iv_stack, loop_iv_stack_insert_constant,
2545 loop_iv_stack_get_iv_from_name, loop_iv_stack_push_iv,
2546 loop_iv_stack_get_iv, loop_iv_stack_remove_constants,
2547 loop_iv_stack_pop, free_loop_iv_stack): Removed.
2548 (gbb_loop_at_index): Fix indenting.
2549 (gbb_loop_index): Removed.
2551 2009-05-13 Sebastian Pop <sebastian.pop@amd.com>
2553 * graphite-clast-to-gimple.c (clast_name_to_gcc): Do not use strcmp.
2554 Call clast_name_to_index.
2556 2009-05-13 Sebastian Pop <sebastian.pop@amd.com>
2558 * graphite-clast-to-gimple.c (clast_name_to_gcc): Pass region,
2559 do not pass params. Get params from SESE_PARAMS.
2560 (clast_to_gcc_expression): Same.
2561 (clast_to_gcc_expression_red): Same.
2562 (gcc_type_for_clast_eq): Same.
2563 (graphite_translate_clast_equation): Same.
2564 (graphite_create_new_loop): Same.
2565 * sese.c (rename_variables_in_stmt): Fix comment.
2567 2009-05-13 Sebastian Pop <sebastian.pop@amd.com>
2569 * graphite-clast-to-gimple.c (graphite_create_new_loop): Pass
2571 Call save_clast_name_index.
2572 (translate_clast): Pass newivs_index.
2573 (gloog): Create and free newivs_index.
2575 2009-05-13 Sebastian Pop <sebastian.pop@amd.com>
2577 * graphite-clast-to-gimple.c (clast_name_index): New structure.
2578 (clast_name_index_p): New type.
2579 (debug_clast_name_index): New.
2580 (debug_clast_name_indexes_1): New.
2581 (debug_clast_name_indexes): New.
2582 (clast_name_index_elt_info): New.
2583 (eq_clast_name_indexes): New.
2584 (clast_name_to_index): New.
2585 (new_clast_name_index): New.
2586 (save_clast_name_index): New.
2587 (init_sese_params_index): New.
2588 (gloog): Call init_sese_params_index.
2589 * graphite-clast-to-gimple.h (debug_clast_name_indexes): Declared.
2590 * sese.c (new_sese): Initialize SESE_PARAMS_INDEX.
2591 (free_sese): Free SESE_PARAMS_INDEX.
2592 * sese.h (struct sese): Add params_index.
2593 (SESE_PARAMS_INDEX): New.
2595 2009-05-13 Sebastian Pop <sebastian.pop@amd.com>
2597 * graphite-clast-to-gimple.c (newivs_to_depth_to_newiv): New.
2598 (graphite_create_new_loop): Pass the newivs vector. Push the
2599 newly created IV to newivs.
2600 (translate_clast): Pass the newivs vector.
2601 (gloog): Create and destroy the newivs vector.
2603 2009-05-13 Sebastian Pop <sebastian.pop@amd.com>
2605 * graphite-clast-to-gimple.c (pbb_to_depth_to_oldiv): New.
2606 (graphite_loop_normal_form): Initialize loop->aux with the unique
2607 IV that has been created.
2609 2009-05-13 Tobias Grosser <grosser@fim.uni-passau.de>
2611 * tree-chrec.c (evolution_function_right_is_integer_cst): Allow
2612 scev with parameters in the base part. They where forbidden
2615 2009-05-11 Li Feng <nemokingdom@gmail.com>
2617 * testsuite/gcc.dg/graphite/graphite.exp: Set different default
2618 compile options by file names.
2619 * testsuite/gcc.dg/graphite/block{0-6}.c: Remove dg-option line.
2620 * testsuite/gcc.dg/graphite/id-{1-9}.c: Ditto.
2621 * testsuite/gcc.dg/graphite/scop-{0-20}.c: Ditto.
2622 * testsuite/gcc.dg/graphite/scop-matmult.c: Ditto.
2624 2009-05-08 Li Feng <nemokingdom@gmail.com>
2626 * testsuite/gcc.dg/graphite/graphite_autopar/graphite_autopar.exp: New.
2627 * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-1.c: New.
2628 * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-2.c: New.
2629 * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-3.c: New.
2631 2009-05-07 Tobias Grosser <grosser@fim.uni-passau.de>
2633 * graphite-scop-detection (build_scops_1): Fix little bug introduced
2636 2009-05-07 Tobias Grosser <grosser@fim.uni-passau.de>
2638 * graphite-scop-detection.c (graphite_can_represent_scev): Only
2639 allow integer constant strides.
2640 (graphite_can_represent_expr): Depend on outermost_loop.
2641 (stmt_simple_memref_p, graphite_cannot_represent_loop,
2642 harmful_stmt_in_bb, is_simple_operand, stmt_simple_for_scop_p,
2643 build_scops_1): Same.
2644 (scopdet_basic_block_info): Same and insert layered SCoP
2646 (try_generate_gimple_bb): Cleanup.
2647 (build_scops): Enable data references.
2649 * testsuite/gcc.dg/graphite/id-5.c: New.
2650 * testsuite/gcc.dg/graphite/id-9.c: New.
2651 * tree-chrec.c (evolution_function_right_is_integer_cst): New.
2652 * tree-chrec.h (evolution_function_right_is_integer_cst): New.
2654 2009-05-06 Tobias Grosser <grosser@fim.uni-passau.de>
2656 * sese.c (expand_scalar_variables_ssa_name): Only build expressions,
2657 that we have not yet built for this SCoP.
2659 2009-05-06 Tobias Grosser <grosser@fim.uni-passau.de>
2661 * sese.c (expand_scalar_variables_expr): Fix expand_scalar_variables
2662 for complex numbers.
2664 2009-05-06 Tobias Grosser <grosser@fim.uni-passau.de>
2666 * graphite-ppl.c: Fix build if cloog is not available.
2668 2009-05-04 Li Feng <nemokingdom@gmail.com>
2670 * tree-parloops.c (loop_parallel_p): Remove construction of
2671 NITER and REDUCTION_LIST.
2672 (try_get_loop_niter): New.
2673 (try_create_reduction_list): New.
2674 (parallelize_loops): Bypass the failed checkings in autopar
2675 when can_be_parallel in loop structure is set to true.
2677 2009-05-01 Tobias Grosser <grosser@fim.uni-passau.de>
2679 * testsuite/gcc.dg/graphite/id-6.c: Update testcase.
2680 * testsuite/gcc.dg/graphite/scop-3.c: Dito.
2682 2009-05-01 Tobias Grosser <grosser@fim.uni-passau.de>
2684 * graphite-scop-detection.c (stmt_simple_for_scop_p):
2685 Enable EQ_EXPR and NE_EXPR again.
2687 2009-04-30 Tobias Grosser <grosser@fim.uni-passau.de>
2689 * graphite-scop-detection.c (graphite_can_represent_scev):
2690 Add check if scev is affine multivariate.
2691 (harmful_stmt_in_bb): Check if we can represent the conditions.
2692 (scopdet_basic_block_info (basic_block bb, VEC): Pass the loop to
2694 * testsuite/gcc.dg/graphite/id-7.c: New.
2696 2009-04-30 Tobias Grosser <grosser@fim.uni-passau.de>
2698 * graphite-sese-to-poly.c (bb_contains_non_iv_scalar_phi_nodes):
2699 Check all bbs in region, not only the bbs that are represented in
2701 (build_poly_scop): Add newline.
2702 * testsuite/gcc.dg/graphite/id-8.c: New.
2704 2009-04-30 Li Feng <nemokingdom@gmail.com>
2706 * cfgloop.c (alloc_loop): Initialize can_be_parallel to false
2707 when loop initialize.
2708 * cfgloop.h (struct loop): Introduce flag can_be_parallel.
2709 * common.opt: Declare flag_graphite_force_parallel.
2710 * graphite-clast-to-gimple.c (translate_clast): Mark the innermost
2712 * graphite-poly.c (apply_poly_transforms): Introduce
2713 flag_graphite_force_parallel.
2714 * tree-ssa-loop.c (gate_graphite_transforms): ditto.
2715 * toplev.c (process_options): ditto and replace a not correctly
2718 2009-04-30 Li Feng <nemokingdom@gmail.com>
2720 * graphite-clast-to-gimple.c (loop_iv_stack_patch_for_consts):
2721 Change the call of gbb_loop_at_index and/or gbb_loop_index due
2722 to the redefinition.
2723 (compute_cloog_iv_types_1): ditto.
2724 (build_iv_mapping): ditto.
2725 * graphite-sese-to-poly.c (new_gimple_bb): Remove GBB_LOOPS related
2727 (free_gimple_bb): Removed GBB_LOOPS related free part.
2728 (build_bb_loops): Removed.
2729 * sese.h (struct gimple_bb): Removed loops.
2730 (GBB_LOOPS): Removed.
2731 (gbb_loop_at_index): Instead of using GBB_LOOPS, we use sese instead.
2732 (gbb_loop_index): ditto.
2734 2009-04-24 Tobias Grosser <grosser@fim.uni-passau.de>
2736 * graphite-scop-detection.c (graphite_can_represent_scev): Do not
2737 allow non constant strides.
2738 * testsuite/gcc.dg/graphite/scop-20.c: New.
2740 2009-04-24 Sebastian Pop <sebastian.pop@amd.com>
2742 * graphite-scop-detection.c (dot_all_scops): Fix system call
2743 return value warning.
2746 2009-04-24 Sebastian Pop <sebastian.pop@amd.com>
2748 * testsuite/gcc.dg/graphite/id-6.c: Fix pattern.
2749 * testsuite/gcc.dg/graphite/scop-3.c: Same.
2751 2009-04-24 Sebastian Pop <sebastian.pop@amd.com>
2753 * graphite-poly.c (map_into_dep_poly, map_dr_into_dep_poly,
2754 build_pairwise_constraint, dr_equality_constraints,
2755 build_pairwise_scheduling_equality,
2756 build_pairwise_scheduling_inequality, lexicographically_gt_p,
2757 build_lexicographically_gt_constraint, dependence_polyhedron,
2758 graphite_legal_transform_dr, graphite_legal_transform_bb,
2759 graphite_legal_transform): New.
2760 * graphite-poly.h (graphite_legal_transform): Declared.
2761 * graphite-sese-to-poly.c (build_poly_scop): Call to
2762 graphite_legal_transform is disabled for the moment.
2764 2009-04-24 Sebastian Pop <sebastian.pop@amd.com>
2766 * graphite-poly.h (pbb_nb_scattering_dims): New.
2767 (pbb_nb_scattering): Use it.
2769 2009-04-24 Sebastian Pop <sebastian.pop@amd.com>
2771 * graphite-ppl.c (ppl_insert_dimensions_pointset): Add
2772 Pointset_Powerset version of ppl_insert_dimensions.
2773 * graphite-ppl.h (ppl_insert_dimensions_pointset): Declared.
2775 2009-04-24 Sebastian Pop <sebastian.pop@amd.com>
2777 * graphite-ppl.c (ppl_insert_dimensions): Fix formatting.
2779 2009-04-24 Sebastian Pop <sebastian.pop@amd.com>
2781 * graphite-poly.h: Fix comment.
2783 2009-04-24 Sebastian Pop <sebastian.pop@amd.com>
2785 * graphite-sese-to-poly.c (build_poly_dr): Fix data ref multiplier.
2787 2009-04-24 Tobias Grosser <grosser@fim.uni-passau.de>
2789 * sese.c (expand_scalar_variables_stmt): Only iterate over the old
2792 2009-04-24 Tobias Grosser <grosser@fim.uni-passau.de>
2794 * graphite-sese-to-poly.c (var_used_in_not_loop_header_phi_node): New.
2795 (graphite_stmt_p): Represent bbs necessary to build the phi nodes of
2798 2009-04-20 Sebastian Pop <sebastian.pop@amd.com>
2800 * graphite-scop-detection.c (stmt_simple_for_scop_p): Do not
2801 handle EQ_EXPR and NE_EXPR.
2803 2009-04-17 Tobias Grosser <grosser@fim.uni-passau.de>
2805 * graphite-poly.h (poly_dr): Fix comment.
2807 2009-04-09 Sebastian Pop <sebastian.pop@amd.com>
2808 Tobias Grosser <grosser@fim.uni-passau.de>
2810 * graphite-poly.c (new_poly_bb): Do not initialize PBB_DOMAIN
2811 with a zero dimension polyhedron.
2812 (find_scop_parameters): Move the call to scop_set_nb_params here.
2813 (build_loop_iteration_domains): Store in loop->aux the iteration
2815 (build_scop_iteration_domain): Fix PBB_DOMAIN for bbs not surrounded
2816 by any loop in scop.
2817 (build_poly_scop): Do not call scop_set_nb_params.
2819 2009-04-09 Sebastian Pop <sebastian.pop@amd.com>
2820 Tobias Grosser <grosser@fim.uni-passau.de>
2822 * graphite-sese-to-poly.c (add_condition_to_pbb): Pass code to
2823 add_condition_to_domain not GT_EXPR.
2825 2009-04-09 Tobias Grosser <grosser@fim.uni-passau.de>
2827 * graphite-ppl.c (debug_ppl_powerset_matrix): New.
2828 * graphite-ppl.h (debug_ppl_powerset_matrix): New.
2829 * graphite-sese-to-poly.c (add_condition_to_pbb): Use
2830 upper_bound_assign to calculate unions.
2831 * testsuite/gcc.dg/graphite/id-6.c: New.
2833 2009-04-09 Tobias Grosser <grosser@fim.uni-passau.de>
2835 * graphite-scop-detection.c (canonicalize_loop_closed_ssa): Do not
2836 handle abnormal edges.
2838 2009-04-09 Tobias Grosser <grosser@fim.uni-passau.de>
2840 * graphite-poly.c (new_poly_dr, free_poly_dr): New.
2841 (free_poly_bb): Also free poly_drs.
2842 * graphite-poly.h (new_poly_dr, free_poly_dr): New.
2843 (poly_dr): Polyhedron to Pointset_Powerset.
2844 (pdr_accessp_nb_subscripts): Same.
2845 * graphite-sese-to-poly.c (build_poly_dr): Same. And actually build
2848 2009-04-08 Sebastian Pop <sebastian.pop@amd.com>
2850 * graphite-clast-to-gimple.c (initialize_cloog_names): Change cloog
2851 names into more meaningful names.
2853 2009-04-08 Sebastian Pop <sebastian.pop@amd.com>
2855 * testsuite/gfortran.dg/graphite/interchange-1.c: New.
2856 * testsuite/gfortran.dg/graphite/interchange-2.c: New.
2858 2009-04-08 Sebastian Pop <sebastian.pop@amd.com>
2860 * graphite-clast-to-gimple.c (graphite_loop_normal_form): Do not build
2862 * tree-parloops.c (rewrite_phi_with_iv): New.
2863 (rewrite_all_phi_nodes_with_iv): New.
2864 (canonicalize_loop_ivs): Call them.
2866 2009-04-08 Sebastian Pop <sebastian.pop@amd.com>
2868 * graphite-sese-to-poly.c (try_generate_gimple_bb): Use
2869 graphite_find_data_references_in_stmt.
2870 * tree-data-ref.c (graphite_find_data_references_in_stmt): New.
2871 * tree-data-ref.h (graphite_find_data_references_in_stmt): Declared.
2873 2009-04-08 Sebastian Pop <sebastian.pop@amd.com>
2875 * sese.c (add_loop_exit_phis): Don't fail on non SSA_NAME renames.
2877 2009-04-08 Sebastian Pop <sebastian.pop@amd.com>
2879 * graphite-sese-to-poly.c (build_scop_bbs_1): Use bb_in_sese_p
2880 instead of bb_in_region.
2881 (flag_bb_in_region): Same. Renamed flag_bb_in_sese.
2882 (build_sese_conditions): Use flag_bb_in_sese.
2883 * sese.c (register_bb_in_sese): Removed.
2884 (new_sese): Remove initialization of SESE_REGION_BBS.
2885 (free_sese): Do not free SESE_REGION_BBS.
2886 * sese.h (struct sese): Remove field region_basic_blocks.
2887 (SESE_REGION_BBS): Removed.
2888 (bb_in_sese_p): Implement in function of bb_in_region.
2890 2009-04-08 Sebastian Pop <sebastian.pop@amd.com>
2892 * graphite-scop-detection.c (limit_scops): Deal only with single exit
2895 2009-04-08 Tobias Grosser <grosser@fim.uni-passau.de>
2897 * graphite-scop-detection.c (stmt_simple_for_scop_p): Allow NE_EXPR
2899 * graphite-sese-to-poly.c (create_linear_expr_from_tree): New.
2900 (add_condition_to_domain): New.
2901 (add_condition_to_pbb): New.
2902 (add_conditions_to_domain): Cleanup and handle of NE_EXPR and EQ_EXPR.
2903 * testsuite/gcc.dg/graphite/scop-3.c: Update number of detected SCoPs.
2905 2009-04-08 Tobias Grosser <grosser@fim.uni-passau.de>
2907 * graphite-clast-to-gimple.c (build_cloog_prog): ppl_Polyhedron ->
2908 ppl_Pointset_Powerset.
2909 * graphite-poly.c (new_poly_bb, free_poly_bb): Same.
2910 * graphite-poly.h (poly_bb): poly_bb.domain Same.
2911 (pbb_nb_loops): Same.
2912 * graphite-sese-to-poly.c (build_loop_iteration_domains,
2913 add_conditions_to_domain): Same.
2914 * graphite-ppl.c (new_Cloog_Domain_from_ppl_Pointset_Powerset): New.
2915 (ppl_print_polyhedron_matrix): ppl_Polyhedron_t ->
2916 ppl_const_Polyhedron_t.
2917 (ppl_print_powerset_matrix): New.
2918 * graphite-ppl.h (new_Cloog_Domain_from_ppl_Pointset_Powerset,
2919 ppl_print_powerset_matrix): New.
2920 (ppl_print_polyhedron_matrix): Updated.
2922 2009-04-07 Sebastian Pop <sebastian.pop@amd.com>
2924 * tree-scalar-evolution.c (analyze_scalar_evolution_1): Fix comment.
2926 2009-04-07 Sebastian Pop <sebastian.pop@amd.com>
2928 * graphite-poly.c (extend_scattering): Fix indenting. Free cstr.
2929 (print_iteration_domains, debug_iteration_domain,
2930 debug_iteration_domains): New.
2931 * graphite-poly.h (print_iteration_domains, debug_iteration_domain,
2932 debug_iteration_domains): Declared.
2933 * graphite-sese-to-poly.c (build_pbb_scattering_polyhedrons): Fix
2936 2009-04-03 Tobias Grosser <grosser@fim.uni-passau.de>
2937 Sebastian Pop <sebastian.pop@amd.com>
2939 * graphite-poly.h (print_iteration_domain): New.
2940 * graphite-sese-to-poly.c (add_conditions_to_domain): Fixed bug.
2941 (build_sese_conditions_1, build_sese_conditions_after,
2942 build_sese_conditions_before): New.
2943 (build_sese_conditions): Rewritten.
2945 2009-04-03 Sebastian Pop <sebastian.pop@amd.com>
2946 Tobias Grosser <grosser@fim.uni-passau.de>
2948 Cleanup of code generation liveouts.
2949 * graphite-clast-to-gimple.c (translate_clast): Use a single
2950 rename_map instead of one per translated statement.
2951 Do not use SESE_LIVEOUT_RENAMES.
2952 (graphite_loop_normal_form): Do not use SESE_REDUCTION_LIST.
2953 (gloog): Do not use SESE_LIVEOUT_RENAMES.
2954 * graphite-scop-detection.c (harmful_stmt_in_bb): Return the close
2955 phi node of a reduction: when a loop contains a reduction used outside
2956 the loop, there should be a scalar close phi node on the exit block.
2957 * sese.c (new_sese): Do not initialize SESE_LIVEOUT,
2958 SESE_LIVEOUT_RENAMES, and SESE_REDUCTION_LIST.
2959 (free_sese): Do not free them.
2960 (sese_build_liveouts_use): Do not use them.
2961 (sese_build_liveouts_bb): Same.
2962 (sese_build_liveouts): Same.
2963 (sese_insert_phis_for_liveouts): Same.
2964 (sese_adjust_phis_for_liveouts): Same. Renamed sese_adjust_liveout_phis.
2965 (defined_in_loop_p): New.
2966 (alive_after_loop): New.
2967 (close_phi_not_yet_inserted_p): New.
2968 (struct alep, alep_p): New.
2969 (add_loop_exit_phis): Remove from the rename_map all the names defined
2970 in the code generated loop.
2971 (insert_loop_close_phis): Traverse the rename_map passed to it.
2972 Don't use SESE_LIVEOUT_RENAMES.
2973 (default_liveout_before_guard): Renamed default_before_guard.
2974 (insert_guard_phis): Do not use SESE_LIVEOUT_RENAMES.
2975 (graphite_copy_stmts_from_block): Do not directly call set_rename.
2976 (register_sese_liveout_renames): Removed.
2977 (copy_bb_and_scalar_dependences): Do not call it.
2978 * sese.h (struct sese): Removed fields: liveout, liveout_renames, and
2980 (SESE_LIVEOUT): Removed.
2981 (SESE_LIVEOUT_RENAMES): Removed.
2982 (SESE_REDUCTION_LIST): Removed.
2983 (sese_build_liveouts): Removed.
2984 (sese_adjust_phis_for_liveouts): Renamed sese_adjust_liveout_phis.
2985 (insert_loop_close_phis): Pass a htab_t instead of a sese.
2986 (insert_guard_phis): Same.
2987 (rename_map_elt): Declare a VEC of them.
2988 * tree-parloops.c (canonicalize_loop_ivs): reduction_list contains
2989 trees not pointers to trees.
2991 Rewrite in canonical close SSA form:
2992 * graphite-scop-detection.c (contains_only_close_phi_nodes): New.
2993 (limit_scops): Close the scop after the block containing the close phi
2995 (canonicalize_loop_closed_ssa): New.
2996 (canonicalize_loop_closed_ssa_form): New.
2997 (build_scops): Call canonicalize_loop_closed_ssa_form.
2999 * graphite-sese-to-poly.c: Fix typos.
3001 2009-04-03 Sebastian Pop <sebastian.pop@amd.com>
3003 * graphite-poly.c (print_scattering_function, print_pbb_domain):
3005 (dump_gbb_conditions, dump_gbb_cases, print_iteration_domain): New.
3006 (print_pbb): Add conditions.
3008 2009-04-01 Tobias Grosser <grosser@fim.uni-passau.de>
3009 Sebastian Pop <sebastian.pop@amd.com>
3011 * graphite-scop-detection.c (bb_in_sd_region): Use bb_in_region.
3012 * graphite-sese-to-poly.c (all_non_dominated_preds_marked_p): New.
3013 (build_scop_bbs_1): New.
3014 (build_scop_bbs): Rewrite.
3015 * sese.h (bb_in_region): New.
3017 2009-03-29 Tobias Grosser <grosser@fim.uni-passau.de>
3019 * graphite-poly.c (new_poly_bb, free_poly_bb): Initialize/free
3021 (print_scop): Style.
3022 * graphite-poly.h (poly_bb): Add drs vector.
3023 (PBB_DRS): Add accessor.
3024 * graphite-sese-to-poly.c (build_poly_dr): New.
3025 (build_pbb_drs, build_scop_drs): New.
3026 (build_poly_scop): call build_scop_drs (Disabled at the moment).
3028 2009-03-29 Tobias Grosser <grosser@fim.uni-passau.de>
3030 * tree-ssa-loop.c: Include forgotten toplev.h
3032 2009-03-29 Tobias Grosser <grosser@fim.uni-passau.de>
3034 * graphite-poly.c: (apply_poly_transforms): sorry -> gcc_unreachable.
3035 * testsuite/gcc.dg/graphite/pr37883.c: Remove -floop-*
3036 * testsuite/gcc.dg/graphite/pr37928.c: Same
3037 * testsuite/gcc.dg/graphite/pr38409.c: Same
3038 * testsuite/gcc.dg/graphite/pr38498.c: Same
3039 * testsuite/gcc.dg/graphite/pr38559.c: Same
3040 * testsuite/gcc.dg/graphite/pr39335.c: Same
3041 * testsuite/gcc.dg/graphite/pr39335_1.c: Same
3042 * testsuite/gfortran.dg/graphite/block-2.f: Same
3043 * tree-ssa-loop.c (gate_graphite_transforms): Always fail if called
3046 2009-03-28 Tobias Grosser <grosser@fim.uni-passau.de>
3048 * graphite-sese-to-poly.c (ref_nb_loops, build_access_matrix_with_af,
3049 build_access_matrix, build_scop_data_accesses): Remove access function
3050 building. (We get a new version soon).
3051 (build_bb_loops, scan_tree_for_params_right_scev): Update.
3052 * sese.h (nb_loops_around_loop_in_sese): Remove.
3053 (sese_loop_depth): Do not use SESE_LOOP_NEST any more.
3055 2009-03-27 Tobias Grosser <grosser@fim.uni-passau.de>
3056 Sebastian Pop <sebastian.pop@amd.com>
3058 * graphite-scop-detection.c (struct scopdet_info): Rename last
3060 (scopdet_basic_block_info, build_scops_1): Don't use
3061 CDI_POST_DOMINATORS. CDI_POST_DOMINATORS should never be used.
3063 2009-03-26 Tobias Grosser <grosser@fim.uni-passau.de>
3064 Sebastian Pop <sebastian.pop@amd.com>
3066 * graphite-clast-to-gimple.c (gloog): Call sese_build_liveouts.
3067 * sese.c (sese_build_liveouts_use): Renamed from
3068 sese_build_livein_liveouts_use. Remove liveins.
3069 (sese_build_liveouts_bb): Renamed from sese_build_livein_liveouts_bb.
3070 Call sese_build_liveouts_use.
3071 (sese_build_liveouts): Renamed from sese_build_livein_liveouts.
3072 Call sese_build_liveouts_bb.
3073 (new_sese, free_sese): Remove liveins.
3074 (sese_add_exit_phis_var): Deleted.
3075 (sese_insert_phis_for_liveouts): Call sese_add_exit_phis_edge
3077 (graphite_copy_stmts_from_block): Remove SESE_NUM_VER.
3079 * sese.h (sese): Remove num_ver and livein.
3080 (SESE_LIVEIN, SESE_LIVEIN_VER, SESE_NUM_VER): Removed.
3082 2009-03-25 Tobias Grosser <grosser@fim.uni-passau.de>
3084 * graphite-sese-to-poly.c (build_scop_scattering): Fix compile.
3086 2009-03-25 Tobias Grosser <grosser@fim.uni-passau.de>
3088 * graphite-sese-to-poly.c (compare_prefix_loops): Removed.
3089 (build_scop_scattering): Do not use compare_prefix_loops any more.
3090 (nb_common_loops): New.
3092 2009-03-24 Sebastian Pop <sebastian.pop@amd.com>
3094 * sese.c (get_new_name_from_old_name): Renamed get_rename.
3095 (register_old_and_new_names): Renamed set_rename.
3097 2009-03-24 Sebastian Pop <sebastian.pop@amd.com>
3099 * graphite-scop-detection.h (nb_reductions_in_loop): Revert removal
3100 of the decl from the previous commit.
3102 2009-03-24 Sebastian Pop <sebastian.pop@amd.com>
3104 * graphite-scop-detection.c (dot_scop): New.
3105 * graphite-scop-detection.h (dot_scop): Declared.
3107 2009-03-24 Sebastian Pop <sebastian.pop@amd.com>
3109 * graphite-sese-to-poly.c (compare_prefix_loops): Fix compare.
3111 2009-03-24 Sebastian Pop <sebastian.pop@amd.com>
3113 * cfgloopmanip.c (create_empty_loop_on_edge): Generate the loop exit
3114 condition at the end of the loop.
3115 * graphite.c (graphite_initialize, graphite_finalize): Print to
3116 dump_file the compiled function.
3117 * graphite-clast-to-gimple.c (graphite_create_new_loop): Update use
3118 of create_empty_loop_on_edge.
3119 (translate_clast): Update the code generation of loops for the new
3121 * cfgloop.h (create_empty_loop_on_edge): Update declaration.
3123 2009-03-24 Sebastian Pop <sebastian.pop@amd.com>
3125 Reverted the patch from 2009-03-19.
3127 2009-03-19 Tobias Grosser <grosser@fim.uni-passau.de>
3129 * graphite-poly.c (new_poly_bb, free_poly_bb): Initialize/free
3131 (print_scop): Style.
3132 * graphite-poly.h (poly_bb): Add drs vector.
3133 (PBB_DRS): Add accessor.
3134 * graphite-sese-to-poly.c (ref_nb_loops): Remove.
3135 (build_access_matrix_with_af, build_access_matrix,
3136 build_scop_data_accesses): Delete.
3137 (build_poly_dr): New.
3138 (build_pbb_drs, build_scop_drs): New.
3139 (build_poly_scop): call build_scop_drs.
3141 2009-03-13 Sebastian Pop <sebastian.pop@amd.com>
3143 * graphite-scop-detection.c (dot_all_scops_1): Close the table
3144 once per basic block.
3146 2009-03-13 Tobias Grosser <grosser@fim.uni-passau.de>
3148 * graphite-scop-detection.c (graphite_can_represent_scev): New.
3149 (graphite_can_represent_expr): Renamed from loop_affine_expr
3151 (stmt_simple_for_scop_p): Call graphite_can_represent_expr.
3152 (graphite_cannot_represent_loop): Add scop_entry to parameters.
3153 (scopdet_basic_block_info): Actually define entry_block.
3154 (stmt_simple_memref_p): Moved here from ...
3156 * tree-data-ref.c (stmt_simple_memref_p): here.
3157 * tree-data-ref.h (stmt_simple_memref_p): Removed.
3159 2009-03-13 Tobias Grosser <grosser@fim.uni-passau.de>
3161 * testsuite/gcc.dg/graphite/id-4.c: New.
3163 2009-03-12 Sebastian Pop <sebastian.pop@amd.com>
3165 * sese.c (expand_scalar_variables_expr): Handle tcc_comparison.
3166 (register_old_and_new_names): Update the content of the map.
3167 When there was already a rename_map_elt in the map at that
3169 (copy_bb_and_scalar_dependences): Do rename_variables after
3170 expand_scalar_variables.
3171 * graphite-clast-to-gimple.c (build_iv_mapping): Update the content
3172 of the map. When there was already a rename_map_elt in the
3173 map at that location, free it.
3174 (translate_clast): Pass the rename_map. Do not initialize and free
3175 a rename_map per stmt_user.
3176 (gloog): Initialize and free one rename_map and pass it to
3179 2009-03-12 Sebastian Pop <sebastian.pop@amd.com>
3181 * sese.c (expand_scalar_variables_stmt,
3182 expand_scalar_variables_ssa_name): Add a gimple_stmt_iterator
3184 (expand_scalar_variables_expr): Handle REALPART_EXPR and IMAGPART_EXPR.
3185 (expand_scalar_variables): Pass to expand_scalar_variables_stmt
3186 the gimple_stmt_iterator of the statement to be expanded.
3187 * graphite-scop-detection.c (is_simple_operand): Do handle
3190 2009-03-11 Tobias Grosser <grosser@fim.uni-passau.de>
3192 * graphite-scop-detection.c (is_simple_operand): Do not handle
3194 * testsuite/gcc.dg/graphite/id-2.c: New.
3196 * graphite-sese-to-poly.c (build_bb_loops,
3197 add_value_to_dim, scan_tree_for_params_right_scev,
3198 scan_tree_for_params_int, scan_tree_for_params, idx_record_params,
3199 find_params_in_bb, build_loop_iteration_domains,
3200 add_conditions_to_domain): Remove subtract.
3202 2009-03-11 Tobias Grosser <grosser@fim.uni-passau.de>
3204 * graphite-clast-to-gimple.c (loop_iv_stack_patch_for_consts,
3205 build_iv_mapping, compute_cloog_iv_types_1, build_cloog_prog):
3206 pbb_loop_at_index -> gbb_loop_at_index.
3207 * graphite-poly.c (new_poly_bb, new_scop): New accessors.
3208 (debug_loop_vec): Delete.
3209 * graphite-poly.h (poly_bb, scop): Change black_box and region to void
3210 pointer. Move LOOPS to gimple_bb_p and insert nb_params.
3211 (PBB_LOOPS): Removed.
3212 (PBB_BLACK_BOX): Insert cast.
3213 (pbb_set_black_box): New setter.
3214 (pbb_loop_at_index, pbb_loop_index): Removed.
3215 (scop_set_region, scop_set_nb_params): New.
3216 * graphite-sese-to-poly.c (new_gimple_bb, free_gimple_bb,
3217 build_scop_scattering, build_bb_loops): Add GBB_LOOPS.
3218 (build_poly_scop): Use scop_set_nb_params.
3219 * sese.h (gimple_bb): Add LOOPS.
3220 (GBB_LOOPS, gbb_loop_index, gbb_loop_at_index): New.
3222 2009-03-11 Tobias Grosser <grosser@fim.uni-passau.de>
3224 Revert previous commit.
3226 2009-03-11 Sebastian Pop <sebastian.pop@amd.com>
3228 * sese.c (expand_scalar_variables_expr): Handle tcc_comparison.
3229 (register_old_and_new_names): Update the content of the map.
3230 When there was already a rename_map_elt in the map at that
3232 (copy_bb_and_scalar_dependences): Do rename_variables after
3233 expand_scalar_variables.
3234 * graphite-clast-to-gimple.c (build_iv_mapping): Update the content
3235 of the map. When there was already a rename_map_elt in the
3236 map at that location, free it.
3237 (translate_clast): Pass the rename_map. Do not initialize and free
3238 a rename_map per stmt_user.
3239 (gloog): Initialize and free one rename_map and pass it to
3242 2009-03-11 Tobias Grosser <grosser@fim.uni-passau.de>
3244 Remove forgotten line in revert.
3246 2009-03-11 Sebastian Pop <sebastian.pop@amd.com>
3248 Revert previous commit.
3250 2009-03-10 Sebastian Pop <sebastian.pop@amd.com>
3252 * sese.c (register_old_and_new_names): Update the content
3253 of the map. When there was already a rename_map_elt in the
3254 map at that location, free it.
3255 (copy_bb_and_scalar_dependences): Do rename_variables after
3256 expand_scalar_variables.
3257 * graphite-clast-to-gimple.c (build_iv_mapping): Update the content
3258 of the map. When there was already a rename_map_elt in the
3259 map at that location, free it.
3260 (translate_clast): Pass the rename_map. Do not initialize and free
3261 a rename_map per stmt_user.
3262 (gloog): Initialize and free one rename_map and pass it to
3265 2009-03-10 Sebastian Pop <sebastian.pop@amd.com>
3267 * graphite-clast-to-gimple.c (translate_clast): context_loop
3270 2009-03-10 Tobias Grosser <grosser@fim.uni-passau.de>
3271 Sebastian Pop <sebastian.pop@amd.com>
3273 * graphite-ppl.c (ppl_insert_dimensions): Fix stupid mistake
3274 of the use of ppl_Polyhedron_map_space_dimensions.
3276 2009-03-10 Tobias Grosser <grosser@fim.uni-passau.de>
3277 Sebastian Pop <sebastian.pop@amd.com>
3279 * graphite-poly.c (unify_scattering_dimensions): Fix types.
3280 * graphite-poly.h (poly_dr_p, poly_dr, POLY_DR_TYPE, PDR_BB,
3281 PDR_TYPE, PDR_ACCESSES, pdr_accessp_nb_subscripts,
3282 pdr_accessp_nb_iterators, pdr_accessp_nb_params,
3283 pdr_accessp_alias_set_dim, pdr_accessp_subscript_dim,
3284 pdr_accessp_iterator_dim, pdr_accessp_param_dim,
3285 pbb_nb_params): New.
3286 (pbb_nb_loops, pbb_nb_scattering, scop_nb_params,
3287 nb_loops_around_pbb): Adapt return types.
3289 2009-03-09 Tobias Grosser <grosser@fim.uni-passau.de>
3291 * Makefile.in (graphite.o, graphite-sese-to-poly.o,
3292 graphite-clast-to-gimple.o, graphite-data-ref.o,
3293 graphite-scop-detection.o, graphite-poly.o): Add
3296 2009-03-05 Tobias Grosser <grosser@fim.uni-passau.de>
3298 * Makefile.in (graphite.o, graphite-sese-to-poly.o,
3299 graphite-clast-to-gimple.o, graphite-data-ref.o,
3300 graphite-scop-detection.o, graphite-poly.o): Add graphite-poly.h.
3302 2009-03-04 Tobias Grosser <grosser@fim.uni-passau.de>
3304 * testsuite/gcc.dg/graphite/pr37485.c: Remove -floop-block
3305 * testsuite/gcc.dg/graphite/pr37828.c: Same.
3306 * testsuite/gcc.dg/graphite/pr37684.c: Same.
3307 * testsuite/gcc.dg/graphite/block-0.c: Same.
3308 * testsuite/gcc.dg/graphite/block-1.c: Same.
3309 * testsuite/gcc.dg/graphite/block-2.c: Same.
3310 * testsuite/gcc.dg/graphite/block-3.c: Same.
3311 * testsuite/gcc.dg/graphite/block-4.c: Same.
3312 * testsuite/gcc.dg/graphite/block-5.c: Same.
3313 * testsuite/gcc.dg/graphite/block-6.c: Same.
3314 * testsuite/gfortran.dg/graphite/pr38083.f90: Same.
3315 * testsuite/gfortran.dg/graphite/block-1.f90: Same.
3316 * testsuite/gfortran.dg/graphite/block-3.f90: Same.
3317 * testsuite/gfortran.dg/graphite/pr37852.f90: Same.
3318 * testsuite/gfortran.dg/graphite/block-4.f90: Same.
3319 * testsuite/gfortran.dg/graphite/pr37980.f90: Same.
3320 * testsuite/gfortran.dg/graphite/pr38953.f90: Same.
3321 * testsuite/gfortran.dg/graphite/pr37857.f90: Same.
3322 * opts.c: Remove -floop-block from -O2.
3323 * graphite-poly.c: Fail if -floop-block -floop-interchange or
3324 -floop-strip-mine are used.
3326 2009-03-04 Tobias Grosser <grosser@fim.uni-passau.de>
3327 Sebastian Pop <sebastian.pop@amd.com>
3329 * graphite-clast-to-gimple.c (build_cloog_prog): Unify scattering
3331 * graphite-poly.c (pbb_compare, graphite_sort_pbbs,
3332 graphite_trans_bb_move_loop, graphite_trans_bb_strip_mine,
3333 strip_mine_profitable_p, is_interchange_valid,
3334 graphite_trans_bb_block, graphite_trans_loop_block,
3335 graphite_trans_scop_block): Temporary removed.
3336 (extend_scattering, unify_scattering_dimensions): New.
3337 (print_scattering_function, graphite_read_transforms):
3338 PBB_SCATTERING -> PBB_TRANSFORMED_SCATTERING.
3339 (graphite_generate_scattering_fns): Removed.
3340 (apply_poly_transforms): Cleanup.
3341 (free_poly_bb): Add PBB_SCATTERING -> PBB_TRANSFORMED_SCATTERING.
3342 (schedule_to_scattering): Moved.
3343 (PBB_STATIC_SCHEDULE, PBB_SCATTERING): Removed.
3344 (PBB_ORIGINAL_SCATTERING, PBB_TRANSFORMED_SCATTERING): New.
3345 (pbb_nb_scattering): New.
3346 (SCOP_ENTRY, SCOP_EXIT, SCOP_REGION_BBS, SCOP_DEP_GRAPH, SCOP_PARAMS,
3347 SCOP_LOOP_NEST, SCOP_PARAMS, SCOP_OLDIVS, SCOP_LIVEOUT_RENAMES):
3349 * graphite-ppl.c (ppl_insert_dimensions): Extended and renamed from
3351 (ppl_strip_loop): PBB_SCATTERING -> PBB_TRANSFORMED_SCATTERING.
3352 * graphite-scop-detection.c (dot_all_scops_1): PBB_SCATTERING
3353 -> PBB_TRANSFORMED_SCATTERING.
3354 * graphite-sese-to-poly.c (build_scop_bbs): Remove region.
3355 (build_pbb_scattering_polyhedron): Moved from schedule_to_scattering.
3356 (build_scop_scattering): Renamed from build_scop_canonical_schedules.
3357 (check_poly_representation): Do not return bool.
3358 (graphite_transform_loops): Reformat.
3359 * sese.h (SESE_ENTRY_BB, SESE_EXIT_BB): New.
3361 2009-03-04 Sebastian Pop <sebastian.pop@amd.com>
3363 * graphite-poly.c (print_pbb_domain, print_pbb, print_scop,
3364 debug_pbb_domain, debug_pbb, debug_scop): New.
3365 * graphite-poly.h (print_pbb_domain, print_pbb, print_scop,
3366 debug_pbb_domain, debug_pbb, debug_scop): Declared.
3368 2009-03-02 Sebastian Pop <sebastian.pop@amd.com>
3371 * tree-parloops.c (canonicalize_loop_ivs): Call fold_convert
3372 when the type precision of the induction variable should be
3373 larger than the type precision of nit.
3374 (gen_parallel_loop): Update use of canonicalize_loop_ivs.
3375 * graphite-clast-to-gimple.c (graphite_loop_normal_form): Same.
3376 * tree-flow.h (canonicalize_loop_ivs): Update declaration.
3378 * testsuite/gcc.dg/graphite/pr39335_1.c: New.
3379 * testsuite/gcc.dg/graphite/pr39335.c: New.
3381 2009-03-02 Sebastian Pop <sebastian.pop@amd.com>
3383 * tree-parloops.c (canonicalize_loop_ivs): reduction_list contains
3384 SSA_NAMES not struct reduction_info.
3386 2009-03-02 Sebastian Pop <sebastian.pop@amd.com>
3388 * sese.c (expand_scalar_variables_expr): Handle ADDR_EXPR.
3390 2009-02-27 Sebastian Pop <sebastian.pop@amd.com>
3391 Tobias Grosser <grosser@fim.uni-passau.de>
3393 * sese.c (new_sese): Initialize SESE_REDUCTION_LIST.
3394 (free_sese): Free SESE_REDUCTION_LIST.
3395 * sese.h (struct sese): Add field reduction_list.
3396 (SESE_REDUCTION_LIST): New.
3397 * graphite-clast-to-gimple.c (graphite_loop_normal_form): Call
3398 canonicalize_loop_ivs on SESE_REDUCTION_LIST.
3400 2009-02-27 Sebastian Pop <sebastian.pop@amd.com>
3401 Tobias Grosser <grosser@fim.uni-passau.de>
3403 * tree-flow.h (gather_scalar_reductions): Use struct loop * instead
3406 2009-02-27 Sebastian Pop <sebastian.pop@amd.com>
3407 Tobias Grosser <grosser@fim.uni-passau.de>
3409 * tree-parloops.c (struct brli, build_reduction_list_info,
3410 analyze_reduction_list, gather_scalar_reductions): New.
3411 (loop_parallel_p): Build a reduction list containing only
3412 PHI_RESULT SSA_NAMEs: call gather_scalar_reductions.
3413 (gen_parallel_loop): Call the analysis analyze_reduction_list.
3414 (parallelize_loops): Now reduction_list is a htab_t of SSA_NAMEs.
3415 * tree-flow.h (gather_scalar_reductions): Declared.
3417 2009-02-26 Sebastian Pop <sebastian.pop@amd.com>
3420 * graphite-clast-to-gimple.c (graphite_loop_normal_form): Do not call
3421 number_of_iterations_exit from a gcc_assert.
3423 2009-02-25 Sebastian Pop <sebastian.pop@amd.com>
3424 Jan Sjodin <jan.sjodin@amd.com>
3426 * output.h (graphite_out_file, graphite_in_file): Declared.
3427 * toplev.c (graphite_out_file, graphite_in_file): New.
3428 (init_asm_output): Initialize graphite_in_file and graphite_out_file.
3429 * graphite-clast-to-gimple.c (build_cloog_prog): Read PBB_SCATTERING.
3430 Don't call schedule_to_scattering.
3431 * common.opt (fgraphite-write, fgraphite-read): New.
3432 * graphite-poly.c: Include output.h.
3433 (print_scattering_function, print_scattering_functions,
3434 debug_scattering_function, debug_scattering_functions,
3435 graphite_write_transforms, graphite_read_transforms,
3436 graphite_generate_scattering_fns): New.
3437 (apply_poly_transforms): Do not apply transform if flag_graphite_read.
3438 Call graphite_generate_scattering_fns, graphite_write_transforms,
3439 graphite_read_transforms.
3440 (new_poly_bb): Initialize PBB_SCATTERING.
3441 (free_poly_bb): Free PBB_SCATTERING.
3442 (schedule_to_scattering): Does not return, initialize PBB_SCATTERING.
3443 * graphite-poly.h (struct poly_bb): Add field scattering.
3444 (PBB_SCATTERING): New.
3445 (print_scattering_function, print_scattering_functions,
3446 debug_scattering_function, debug_scattering_functions): Declared.
3447 * graphite-ppl.c (cloog_matrix_to_ppl_constraint): Matrices contain
3448 GMP values, not integers!
3449 (ppl_print_polyhedron_matrix, debug_ppl_polyhedron_matrix,
3450 ppl_read_polyhedron_matrix): New.
3451 * graphite-ppl.h (ppl_print_polyhedron_matrix,
3452 debug_ppl_polyhedron_matrix,
3453 ppl_read_polyhedron_matrix): Declared.
3454 * Makefile.in (graphite-poly.o): Depends on output.h.
3456 2009-02-23 Sebastian Pop <sebastian.pop@amd.com>
3457 Tobias Grosser <grosser@fim.uni-passau.de>
3460 * graphite-scop-detection.c (stmt_simple_for_scop_p): Analyze
3461 scalar evolutions in the scop_entry->loop_father.
3463 2009-02-23 Sebastian Pop <sebastian.pop@amd.com>
3464 Tobias Grosser <grosser@fim.uni-passau.de>
3466 * graphite.h (ref_nb_loops): Remove declaration.
3467 (struct gimple_bb, gimple_bb_p, GBB_BB, GBB_DATA_REFS, GBB_CONDITIONS,
3468 GBB_CONDITION_CASES, GBB_CLOOG_IV_TYPES, gbb_loop, print_gimple_bb,
3469 debug_gbb): Moved to sese.h.
3472 2009-02-23 Sebastian Pop <sebastian.pop@amd.com>
3473 Tobias Grosser <grosser@fim.uni-passau.de>
3475 * graphite-data-ref.[ch]: Disable.
3477 2009-02-23 Sebastian Pop <sebastian.pop@amd.com>
3478 Tobias Grosser <grosser@fim.uni-passau.de>
3480 * graphite-scop-detection.c (stmt_simple_for_scop_p): Analyze
3481 scalar evolutions in the scop_entry->loop_father.
3483 2009-02-23 Sebastian Pop <sebastian.pop@amd.com>
3485 * graphite-scop-detection.c (nb_reductions_in_loop): Moved here...
3486 (graphite_cannot_represent_loop_niter): Renamed
3487 graphite_cannot_represent_loop. Call nb_reductions_in_loop.
3488 (limit_scops): build_sese_loop_nests does not return a bool.
3489 * graphite-scop-detection.h (nb_reductions_in_loop): Declared.
3490 * sese.c (nb_reductions_in_loop): ... from here.
3491 (graphite_loop_normal_form): ... from here.
3492 (sese_record_loop): Does not fail, so does not return a bool.
3493 (build_sese_loop_nests): Same.
3494 * sese.h (build_sese_loop_nests): Update declaration.
3495 * graphite-clast-to-gimple.c (graphite_loop_normal_form): Moved here...
3496 (build_graphite_loop_normal_form): New.
3497 (gloog): Call build_graphite_loop_normal_form.
3498 * graphite-sese-to-poly.c (build_poly_scop): Don't fail on
3499 build_sese_loop_nests.
3501 * testsuite/gcc.dg/graphite/id-1.c: New.
3503 2009-02-23 Sebastian Pop <sebastian.pop@amd.com>
3504 Tobias Grosser <grosser@fim.uni-passau.de>
3506 * graphite-sese-to-poly.c (scan_tree_for_params): Remove REAL_CST.
3507 The SCoP detection fix is sufficient.
3509 2009-02-21 Sebastian Pop <sebastian.pop@amd.com>
3511 PR tree-optimization/39260
3512 * graphite-scop-detection.c (harmful_stmt_in_bb): Stop a SCoP when
3513 the basic block contains a condition with a real type.
3514 * graphite-sese-to-poly.c (scan_tree_for_params): Handle REAL_CST.
3516 * gcc.dg/graphite/pr39260.c: New.
3518 2009-02-21 Sebastian Pop <sebastian.pop@amd.com>
3520 * graphite-poly.c: Inlcude params.h.
3521 (graphite_trans_loop_block): Use PARAM_LOOP_BLOCK_TILE_SIZE for
3523 * Makefile.in (graphite-poly.o): Depend on PARAMS_H.
3524 * params.def (PARAM_LOOP_BLOCK_TILE_SIZE): Define.
3526 2009-02-20 Sebastian Pop <sebastian.pop@amd.com>
3527 Tobias Grosser <grosser@fim.uni-passau.de>
3529 * graphite-scop-detection.c (dot_all_scops_1,
3530 dot_all_scops): Moved here.
3531 * graphite-scop-detection.h (dot_all_scops): Declared here.
3532 * graphite.c (graphite_initialize, graphite_finalize): New.
3533 (graphite_transform_loops): Cleaned up.
3534 * sese.c (debug_oldivs): Moved here.
3535 * graphite-poly.c (graphite_apply_transformations): Renamed
3536 apply_poly_transforms.
3537 (debug_loop_vec): Moved here.
3538 * graphite-sese-to-poly.c (build_bb_loops, build_sese_conditions_1,
3539 scop_contains_non_iv_scalar_phi_nodes, build_sese_conditions,
3540 find_scop_parameters, build_scop_iteration_domain,
3541 add_conditions_to_constraints, build_scop_canonical_schedules,
3542 build_scop_data_accesses): Now static.
3543 (build_poly_scop, check_poly_representation): New.
3545 2009-02-20 Sebastian Pop <sebastian.pop@amd.com>
3547 * graphite.c (graphite_stmt_p, new_gimple_bb, free_gimple_bb,
3548 remove_gbbs_in_scop, free_scops, try_generate_gimple_bb,
3549 build_scop_bbs, ref_nb_loops, compare_prefix_loops,
3550 build_scop_canonical_schedules, build_bb_loops, add_value_to_dim,
3551 scan_tree_for_params_right_scev, scan_tree_for_params_int,
3552 scan_tree_for_params, struct irp_data, dx_record_params,
3553 find_params_in_bb, find_scop_parameters, gbb_from_bb,
3554 build_loop_iteration_domains, add_conditions_to_domain,
3555 phi_node_is_iv, bb_contains_non_iv_scalar_phi_nodes,
3556 scop_contains_non_iv_scalar_phi_nodes, build_sese_conditions_1,
3557 build_sese_conditions, add_conditions_to_constraints,
3558 build_scop_iteration_domain, build_access_matrix_with_af,
3559 build_access_matrix,
3560 build_scop_data_accesses): Moved to graphite-sese-to-poly.c.
3562 * graphite-sese-to-poly.c: New.
3563 * graphite-sese-to-poly.h: New.
3565 * Makefile.in: Add new rule for graphite-sese-to-poly.o.
3567 2009-02-20 Sebastian Pop <sebastian.pop@amd.com>
3569 * graphite.c: Split graphite code generation to a new file.
3570 (graphite_verify, gmp_cst_to_tree, clast_name_to_gcc,
3571 max_precision_type, clast_to_gcc_expression_red,
3572 clast_to_gcc_expression, gcc_type_for_clast_expr,
3573 gcc_type_for_clast_eq, loop_iv_stack_patch_for_consts,
3574 graphite_translate_clast_equation, graphite_create_guard_cond_expr,
3575 graphite_create_new_guard, clast_get_body_of_loop,
3576 gcc_type_for_cloog_iv, gcc_type_for_iv_of_clast_loop,
3577 graphite_create_new_loop, build_iv_mapping, copy_renames,
3578 translate_clast, find_cloog_iv_in_expr, compute_cloog_iv_types_1,
3579 compute_cloog_iv_types, free_scattering, save_var_name,
3580 initialize_cloog_names, build_scop_context, build_cloog_prog,
3581 set_cloog_options, debug_clast_stmt, scop_to_clast,
3582 print_generated_program, debug_generated_program,
3583 gloog): Moved to graphite-clast-to-gimple.c.
3585 (struct cloog_prog_clast): Moved to graphite-clast-to-gimple.h.
3587 (iv_stack_entry_is_constant, iv_stack_entry_is_iv,
3588 loop_iv_stack_push_iv, loop_iv_stack_insert_constant,
3589 loop_iv_stack_pop, loop_iv_stack_get_iv,
3590 loop_iv_stack_get_iv_from_name, debug_loop_iv_stack,
3591 free_loop_iv_stack, loop_iv_stack_remove_constants,
3592 debug_rename_elt, debug_rename_map_1, debug_rename_map,
3593 rename_map_elt_info, eq_rename_map_elts, debug_ivtype_elt,
3594 debug_ivtype_map_1, debug_ivtype_map, ivtype_map_elt_info,
3595 eq_ivtype_map_elts, sese_add_exit_phis_edge,
3596 sese_add_exit_phis_var, sese_insert_phis_for_liveouts,
3597 get_vdef_before_sese, sese_adjust_vphi,
3598 get_new_name_from_old_name, sese_adjust_phis_for_liveouts,
3599 oldiv_for_loop, rename_variables_in_stmt, is_parameter,
3600 is_iv, expand_scalar_variables_ssa_name,
3601 expand_scalar_variables_expr, expand_scalar_variables_stmt,
3602 expand_scalar_variables, rename_variables, remove_condition,
3603 get_true_edge_from_guard_bb, get_false_edge_from_guard_bb,
3604 add_loop_exit_phis, insert_loop_close_phis, struct igp,
3605 default_liveout_before_guard, add_guard_exit_phis,
3606 insert_guard_phis, register_old_and_new_names,
3607 graphite_copy_stmts_from_block, register_sese_liveout_renames,
3608 copy_bb_and_scalar_dependences, outermost_loop_in_sese,
3609 if_region_set_false_region, create_if_region_on_edge,
3610 move_sese_in_condition): Moved to sese.c.
3612 (nb_loops_around_loop_in_sese, struct ifsese, if_region_entry,
3613 if_region_exit, if_region_get_condition_block,
3614 struct rename_map_elt, new_rename_map_elt, enum iv_stack_entry_kind,
3615 union iv_stack_entry_data_union, struct iv_stack_entry_struct,
3616 iv_stack_entry_p, loop_iv_stack, struct ivtype_map_elt,
3617 ivtype_map_elt, new_ivtype_map_elt,
3618 recompute_all_dominators): Moved to sese.h.
3620 * graphite-clast-to-gimple.c: New.
3621 * graphite-clast-to-gimple.h: New.
3622 * Makefile.in: Add new rule for graphite-clast-to-gimple.o.
3623 * sese.c: Modified as said above.
3626 2009-02-20 Sebastian Pop <sebastian.pop@amd.com>
3628 * graphite.c: Split scop detection to a new file.
3629 (enum gbb_type, gbb_type, get_bb_type, struct sd_region_p, sd_region,
3630 move_sd_regions, loop_affine_expr, exclude_component_ref,
3631 is_simple_operand, stmt_simple_for_scop_p, harmful_stmt_in_bb,
3632 graphite_cannot_represent_loop_niter, struct scopdet_info,
3633 scopdet_basic_block_info, build_scops_1, bb_in_sd_region,
3634 find_single_entry_edge, find_single_exit_edge,
3635 create_single_entry_edge, sd_region_without_exit,
3636 create_single_exit_edge, unmark_exit_edges, mark_exit_edges,
3637 create_sese_edges, build_graphite_scops, limit_scops, build_scops):
3638 Moved to graphite-scop-detection.c.
3640 * graphite-scop-detection.c: New.
3641 * graphite-scop-detection.h: New.
3642 * Makefile.in: Add new rule for graphite-scop-detection.o.
3644 * sese.c: Include tree-chrec.h, tree-data-ref.h, and
3645 tree-scalar-evolution.h.
3646 (nb_reductions_in_loop, graphite_loop_normal_form, sese_record_loop,
3647 build_sese_loop_nests): Moved here from graphite.c.
3648 (param_index): Renamed parameter_index_in_region.
3650 2009-02-18 Tobias Grosser <grosser@fim.uni-passau.de>
3651 Sebastian Pop <sebastian.pop@amd.com>
3653 * gcc.dg/graphite/block-0.c: Expected to fail now.
3654 * gcc.dg/graphite/block-1.c: Same.
3655 * gcc.dg/graphite/block-5.c: Same.
3656 * gcc.dg/graphite/block-6.c: Same.
3658 2009-02-18 Tobias Grosser <grosser@fim.uni-passau.de>
3659 Sebastian Pop <sebastian.pop@amd.com>
3661 * graphite.h: Separate from graphite_bb_p the polyhedral
3662 representation in poly_bb_p and the GCC specifics in gimple_bb_p.
3663 (struct data_dependence_polyhedron, RDGE_DDP, ddp_p): Moved to
3664 graphite-data-ref.h.
3665 (struct poly_bb, PBB_SCOP, PBB_STATIC_SCHEDULE, PBB_DOMAIN,
3666 PBB_BLACK_BOX, PBB_LOOPS, pbb_nb_loops, pbb_loop_at_index,
3667 pbb_loop_index, struct scop, SCOP_BBS, SCOP_REGION, SCOP_ENTRY,
3668 SCOP_EXIT, SCOP_REGION_BBS, SCOP_DEP_GRAPH, SCOP_PARAMS,
3669 SCOP_LOOP_NEST, SCOP_PARAMS, SCOP_OLDIVS, SCOP_LIVEOUT_RENAMES,
3670 scop_nb_params): Moved to graphite-poly.h.
3671 * graphite-data-ref.c: Same.
3672 * graphite-data-ref.h: New.
3674 (pbb_compare, graphite_sort_pbbs, graphite_trans_bb_move_loop,
3675 graphite_trans_bb_strip_mine, strip_mine_profitable_p,
3676 is_interchange_valid, graphite_trans_bb_block,
3677 graphite_trans_loop_block, scop_max_loop_depth,
3678 graphite_trans_scop_block, graphite_apply_transformations,
3679 new_poly_bb, free_poly_bb, new_scop, free_scop): Moved to
3681 * graphite-poly.h: New.
3682 * graphite-poly.c: New.
3683 * Makefile.in (OBJS-common): Add graphite-poly.o.
3684 (graphite-poly.o): New rule.
3685 * tree-data-ref.h (struct data_reference): Remove unused scop field.
3688 2009-02-18 Sebastian Pop <sebastian.pop@amd.com>
3689 Tobias Grosser <grosser@fim.uni-passau.de>
3691 * graphite.c: Replace gb -> gbb.
3693 * graphite-data-ref.c: Same.
3695 2009-02-18 Sebastian Pop <sebastian.pop@amd.com>
3696 Tobias Grosser <grosser@fim.uni-passau.de>
3698 * Makefile.in (OBJS-commmon): Add sese.o.
3700 (graphite.o): Add sese.h.
3701 * graphite.c (bb_in_ss_p, loop_in_sese_p,
3702 sese_build_livein_liveouts_use, sese_build_livein_liveouts_bb,
3703 sese_build_livein_liveouts, register_bb_in_sese, new_sese, free_sese):
3705 (block_before_scop): Add missing return.
3706 (new_scop, free_scop): Remove SESE data structures.
3707 (scop_record_loop, scan_tree_for_params, find_params_in_bb,
3708 find_scop_parameters, build_loop_iteration_domains,
3709 add_conditions_to_domain, register_scop_liveout_renames,
3710 copy_bb_and_scalar_dependences): Scop -> SESE.
3712 (add_conditions_to_domain): SCoP -> SESE and remove check
3713 (scop_contains_non_iv_scalar_phi_nodes): New.
3714 (build_scop_conditions_1, build_scop_conditions): Remove check for
3715 non iv scalar phi nodes.
3716 (print_scop_statistics): New.
3717 (graphite_transform_loops): Cleanup.
3719 * graphite.h: Move to sese & cleanup.
3723 2009-02-16 Sebastian Pop <sebastian.pop@amd.com>
3724 Tobias Grosser <grosser@fim.uni-passau.de>
3726 * graphite.c (build_scop_conditions_1): Conditions are only
3727 at the end of a basic block.
3729 2009-02-16 Sebastian Pop <sebastian.pop@amd.com>
3730 Tobias Grosser <grosser@fim.uni-passau>
3732 * graphite.h (struct graphite_bb): Remove compressed_alpha_matrix
3734 (GBB_ALPHA): Removed.
3736 2009-02-16 Sebastian Pop <sebastian.pop@amd.com>
3737 Tobias Grosser <grosser@fim.uni-passau.de>
3739 * graphite-data-ref.c (graphite_test_dependence): Don't use
3740 GBB_DYNAMIC_SCHEDULE.
3741 * graphite.c (new_graphite_bb): Same.
3742 (free_graphite_bb): Same.
3743 (build_scop_dynamic_schedules): Removed.
3744 (graphite_transform_loops): Don't call it.
3745 * graphite.h (struct graphite_bb): Remove dynamic_schedule field.
3746 (GBB_DYNAMIC_SCHEDULE): Removed.
3748 2009-02-16 Sebastian Pop <sebastian.pop@amd.com>
3749 Tobias Grosser <grosser@fim.uni-passau.de>
3751 * graphite.c (schedule_to_scattering): Don't use CloogMatrix.
3752 (print_graphite_bb): Same.
3753 (build_cloog_prog): Same.
3755 2009-02-16 Sebastian Pop <sebastian.pop@amd.com>
3756 Tobias Grosser <grosser@fim.uni-passau.de>
3758 * graphite.c (build_cloog_prog): Don't use CloogMatrix.
3760 2009-02-16 Sebastian Pop <sebastian.pop@amd.com>
3761 Tobias Grosser <grosser@fim.uni-passau.de>
3763 * graphite.c (build_scop_context): Don't use CloogMatrix.
3764 * graphite-ppl.c (new_Cloog_Domain_from_ppl_Polyhedron): New.
3765 * graphite-ppl.h (new_Cloog_Domain_from_ppl_Polyhedron): Declared.
3767 2009-02-16 Sebastian Pop <sebastian.pop@amd.com>
3768 Tobias Grosser <grosser@fim.uni-passau.de>
3770 * graphite.h (struct scop): Move params, old_ivs, loops, loop_nest,
3771 liveout_renames, add_params fields...
3772 (struct sese): ... here.
3773 (SESE_PARAMS, SESE_LOOPS, SESE_LOOP_NEST, SESE_ADD_PARAMS,
3774 SESE_PARAMS, SESE_OLDIVS, SESE_LIVEOUT_RENAMES): New.
3776 2009-02-16 Sebastian Pop <sebastian.pop@amd.com>
3777 Tobias Grosser <grosser@fim.uni-passau.de>
3779 * graphite.c (print_scop): Do not print the CLooG program.
3780 (new_scop, free_scop, initialize_cloog_names, build_scop_context,
3781 build_cloog_prog, gloog): Don't use SCOP_PROG.
3782 (find_transform): Renamed scop_to_clast.
3783 (print_generated_program, debug_generated_program): New.
3784 (graphite_transform_loops): Adapt to new interface.
3785 * graphite.h (struct scop): Remove program field.
3786 (SCOP_PROG): Removed.
3787 (print_generated_program, debug_generated_program): Declared.
3789 2009-02-16 Sebastian Pop <sebastian.pop@amd.com>
3791 * graphite-data-ref.c (schedule_precedes_p, schedule_same_p): New.
3792 (statement_precedes_p): Use schedule_same_p and schedule_precedes_p.
3793 * graphite.c (gbb_compare, schedule_to_scattering, print_graphite_bb,
3794 free_graphite_bb, build_scop_canonical_schedules,
3795 graphite_trans_bb_strip_mine, graphite_trans_scop_block): Static
3796 schedules are now represented using a ppl_Linear_Expression_t.
3797 * graphite.h (struct graphite_bb): Same.
3798 * graphite-ppl.c (ppl_lexico_compare_linear_expressions): New.
3799 * graphite-ppl.h (ppl_lexico_compare_linear_expressions): Declared.
3801 2009-02-15 Sebastian Pop <sebastian.pop@amd.com>
3803 * graphite.c: Free local memory.
3804 * graphite-ppl.c: Same.
3806 2009-02-15 Sebastian Pop <sebastian.pop@amd.com>
3808 * graphite.c (const_column_index, get_first_matching_sign_row_index,
3809 get_lower_bound_row, get_upper_bound_row, copy_constraint,
3810 swap_constraint_variables, scale_constraint_variable): Removed.
3811 (graphite_trans_bb_strip_mine): Remove pong.
3812 * graphite-ppl.c: Include missing header files.
3813 (set_inhomogeneous, set_coef, shift_poly, ppl_strip_loop): New.
3814 * graphite-ppl.h (ppl_strip_loop): Declared.
3815 * Makefile.in (graphite-ppl.o): Adjust dependences.
3817 2009-02-14 Sebastian Pop <sebastian.pop@amd.com>
3819 * graphite.c (build_loop_iteration_domains): Remove ping pong.
3820 (build_scop_iteration_domain): Same.
3822 2009-02-13 Sebastian Pop <sebastian.pop@amd.com>
3824 * graphite.c (scan_tree_for_params, add_conditions_to_domain): Remove
3826 (add_value_to_dim, scan_tree_for_params_right_scev,
3827 scan_tree_for_params_int): New.
3828 * graphite-ppl.c (oppose_constraint): New.
3829 (insert_constraint_into_matrix): Implement missing cases.
3830 * graphite-ppl.h (insert_constraint_into_matrix): Declared.
3832 2009-02-13 Sebastian Pop <sebastian.pop@amd.com>
3834 * graphite.c (graphite_trans_bb_move_loop): Remove ping pong,
3835 use ppl_move_dimension.
3837 2009-02-12 Sebastian Pop <sebastian.pop@amd.com>
3839 * graphite-data-ref.c: Domains are now ppl_Polyhedra_t.
3842 * graphite-ppl.c: Same.
3843 * graphite-ppl.h: Same.
3845 2009-02-12 Sebastian Pop <sebastian.pop@amd.com>
3847 Revert last 3 commits.
3849 2009-02-10 Sebastian Pop <sebastian.pop@amd.com>
3851 * graphite.c (scan_tree_for_params, add_conditions_to_domain): Remove
3853 (add_value_to_dim, scan_tree_for_params_right_scev,
3854 scan_tree_for_params_int): New.
3855 * graphite-ppl.c (oppose_constraint): New.
3856 (insert_constraint_into_matrix): Implement missing cases.
3857 * graphite-ppl.h (insert_constraint_into_matrix): Declared.
3859 2009-02-10 Sebastian Pop <sebastian.pop@amd.com>
3861 * graphite.c (graphite_trans_bb_move_loop): Remove unused variables.
3863 2009-02-10 Sebastian Pop <sebastian.pop@amd.com>
3864 Tobias Grosser <grosser@fim.uni-passau.de>
3866 * graphite.c (graphite_trans_bb_move_loop): Remove ping pong,
3867 use ppl_move_dimension.
3868 * graphite-ppl.c (ppl_move_dimension): New.
3869 * graphite-ppl.h (ppl_move_dimension): Declared.
3871 2009-02-10 Sebastian Pop <sebastian.pop@amd.com>
3873 * graphite.c: Do not include cloog/cloog.h.
3874 (print_graphite_bb): Remove ping pong, call PPL print function.
3876 2009-02-10 Tobias Grosser <grosser@fim.uni-passau.de>
3878 * Makefile.in (OBJS-common): Add graphite-ppl.o.
3879 (graphite.o): Add dependence on graphite-ppl.h.
3880 (graphite-ppl.o): New.
3881 (graphite-data-ref.c): Ping pong between PPL data structures
3883 * graphite-ppl.c: New.
3884 * graphite-ppl.h: New.
3885 * graphite.c: Include graphite-ppl.h.
3886 (print_graphite_bb, add_conditions_to_domain, build_cloog_prog,
3887 graphite_trans_bb_move_loop, graphite_trans_bb_strip_mine):
3888 Ping pong between PPL data structures and matrices.
3889 (new_graphite_bb): Create a PPL constraint system.
3890 Call ppl_delete_Constraint_System instead of cloog_matrix_free.
3891 (build_loop_iteration_domains): Use PPL functions.
3892 * graphite.h: Include graphite-ppl.h. Fix comments.
3893 (graphite_bb): Use a ppl_Constraint_System_t instead of
3894 CloogMatrix for representing the domain.
3895 (scop): Remove static_schedule.
3896 (gbb_nb_loops): Ping pong between PPL data structures and matrices.
3898 2009-02-06 Sebastian Pop <sebastian.pop@amd.com>
3900 * graphite.c: Fix some comments.
3902 2009-02-05 Sebastian Pop <sebastian.pop@amd.com>
3905 * graphite.c (if_region_set_false_region): After moving a region
3906 in the false branch of a condition, remove the empty dummy
3908 (gloog): Remove wrong fix for PR38953.
3910 2009-02-03 Tobias Grosser <grosser@fim.uni-passau.de>
3912 * graphite.c (bb_in_sese_p, sese_build_livein_liveouts_use,
3913 sese_build_livein_liveouts_bb, sese_build_livein_liveouts,
3914 register_bb_in_sese, new_sese, free_sese): Moved.
3915 (dot_scop_1, build_scop_loop_nests, build_loop_iteration_domains,
3916 outermost_loop_in_scop, build_scop_iteration_domain,
3917 expand_scalar_variables_ssa_name, get_vdef_before_scop,
3918 limit_scops): Use bb_in_sese_p instead of bb_in_scop_p.
3919 Use loop_in_sese_p instead of loop_in_scop_p.
3920 (new_graphite_bb, new_scop, gloog): Do not initialize SCOP_BBS_B.
3921 (free_scop): Do not free SCOP_BBS_B.
3922 (nb_loops_around_loop_in_scop, nb_loops_around_gb,
3923 ref_nb_loops): Moved here...
3924 * graphite.h (ref_nb_loops): ... from here.
3925 (struct scop): Remove bbs_b bitmap.
3926 (SCOP_BBS_B, bb_in_scop_p, loop_in_scop_p): Removed.
3927 * testsuite/gcc.dg/graphite/scop-19.c: New
3929 2009-02-03 Tobias Grosser <grosser@fim.uni-passau.de>
3931 * graphite.c (scopdet_basic_block_info): Fix bug in scop
3934 2009-01-30 Tobias Grosser <grosser@fim.uni-passau.de>
3936 * graphite.c (new_loop_to_cloog_loop_str, hash_loop_to_cloog_loop,
3937 eq_loop_to_cloog_loop): Remove.
3938 (new_scop, free_scop): Remove SCOP_LOOP2CLOOG_LOOP.
3939 * graphite.h (struct scop): Remove loop2cloog_loop.
3940 (loop_domain_dim, loop_iteration_vector_dim): Remove.
3942 2009-01-30 Tobias Grosser <grosser@fim.uni-passau.de>
3944 * opts.c (decode_options): Only add graphite options to O2
3945 if we compile with graphite enabled.
3947 2009-01-26 Sebastian Pop <sebastian.pop@amd.com>
3949 * Merge from mainline (r143163:143684).
3951 2009-01-26 Sebastian Pop <sebastian.pop@amd.com>
3953 * graphite.c (debug_value): Removed.
3954 * graphite.h (debug_value): Removed.
3956 2009-01-23 Sebastian Pop <sebastian.pop@amd.com>
3958 * passes.c (init_optimization_passes): Do not call pass_copy_prop
3959 after graphite: pass_copy_prop does not maintain a proper loop closed
3960 SSA form. pass_copy_prop should be fixed.
3962 2009-01-23 Sebastian Pop <sebastian.pop@amd.com>
3964 * graphite.c (scop_adjust_phis_for_liveouts): Fix warning.
3966 2009-01-23 Sebastian Pop <sebastian.pop@amd.com>
3968 * graphite.c (graphite_verify): Add a call to verify_loop_closed_ssa.
3969 (gloog): Split the exit of the scop when the scop exit is a loop exit.
3970 (graphite_transform_loops): Only call cleanup_tree_cfg if gloog
3973 2009-01-20 Sebastian Pop <sebastian.pop@amd.com>
3975 * graphite.c (gloog): Return true when code gen succeeded.
3976 (graphite_transform_loops): Do not call cleanup_tree_cfg if
3977 the code of the function did not changed. After cleanup_tree_cfg
3978 call rewrite_into_loop_closed_ssa to maintain the loop closed ssa
3981 2009-01-19 Sebastian Pop <sebastian.pop@amd.com>
3983 * graphite.c (stmt_simple_for_scop_p): Also handle cases when
3984 gimple_call_lhs is NULL.
3986 2009-01-16 Sebastian Pop <sebastian.pop@amd.com>
3987 Tobias Grosser <tobi.grosser@amd.com>
3989 * graphite.c (graphite_trans_scop_block): Do not block single
3992 2009-01-15 Sebastian Pop <sebastian.pop@amd.com>
3993 Tobias Grosser <tobi.grosser@amd.com>
3995 * graphite.c (build_scop_canonical_schedules): Start schedules at
3998 2009-01-15 Sebastian Pop <sebastian.pop@amd.com>
3999 Tobias Grosser <tobi.grosser@amd.com>
4001 * graphite.c (compare_prefix_loops): New.
4002 (build_scop_canonical_schedules): Rewritten.
4003 (graphite_transform_loops): Move build_scop_canonical_schedules
4004 after build_scop_iteration_domain.
4006 2009-01-14 Sebastian Pop <sebastian.pop@amd.com>
4007 Tobias Grosser <tobi.grosser@amd.com>
4009 * graphite.c (add_conditions_to_domain): Add the loops to
4010 the dimension of the iteration domain. Do copy the domain
4011 only when it exists.
4012 (build_scop_conditions_1): Do not call add_conditions_to_domain.
4013 (add_conditions_to_constraints): New.
4014 (can_generate_code_stmt, can_generate_code): Removed.
4015 (gloog): Do not call can_generate_code.
4016 (graphite_transform_loops): Call add_conditions_to_constraints
4017 after building the iteration domain.
4019 2009-01-14 Sebastian Pop <sebastian.pop@amd.com>
4020 Tobias Grosser <tobi.grosser@amd.com>
4021 Jan Sjodin <jan.sjodin@amd.com>
4023 * graphite.c (scan_tree_for_params): On substractions negate
4024 all the coefficients of the term.
4025 (clast_to_gcc_expression_red): New. Handle reduction expressions
4026 of more than two operands.
4027 (clast_to_gcc_expression): Call clast_to_gcc_expression_red.
4028 (get_vdef_before_scop): Handle also the case of default definitions.
4030 2009-01-14 Sebastian Pop <sebastian.pop@amd.com>
4033 * graphite.c (get_vdef_before_scop, scop_adjust_vphi): New.
4034 (scop_adjust_phis_for_liveouts): Call scop_adjust_vphi.
4035 (gloog): Do not call cleanup_tree_cfg.
4036 (graphite_transform_loops): Call cleanup_tree_cfg after all
4037 scops have been code generated.
4039 2009-01-13 Sebastian Pop <sebastian.pop@amd.com>
4041 * passes.c (init_optimization_passes): Schedule after
4042 graphite transforms pass_copy_prop, pass_dce_loop and pass_lim.
4044 2009-01-13 Sebastian Pop <sebastian.pop@amd.com>
4046 * graphite.c (expand_scalar_variables_stmt): Do not pass loop_p.
4048 (expand_scalar_variables_ssa_name): Do not pass loop_p. Fix comment.
4049 Set the type of an expression to the type of its assign statement.
4050 (expand_scalar_variables_expr): Do not pass loop_p.
4051 Fix comment. Stop recursion on tcc_constant or tcc_declaration.
4052 (copy_bb_and_scalar_dependences): Do not pass loop_p.
4053 (translate_clast): Update call to copy_bb_and_scalar_dependences.
4055 2009-01-11 Sebastian Pop <sebastian.pop@amd.com>
4057 * graphite.c (expand_scalar_variables_ssa_name): Set the type of
4058 an expression to the gimple_expr_type of its assign statement.
4059 (expand_scalar_variables_expr): Stop recursion on tcc_constant
4062 2009-01-11 Sebastian Pop <sebastian.pop@amd.com>
4064 PR tree-optimization/38786
4065 * testsuite/gcc.dg/graphite/pr38786.c: New.
4066 * graphite.c (expand_scalar_variables_ssa_name): New, outlined from
4067 the SSA_NAME case of expand_scalar_variables_expr.
4068 (expand_scalar_variables_expr): Also gather the scalar computation
4069 used to index the memory access.
4070 (expand_scalar_variables_stmt): Pass to expand_scalar_variables_expr
4071 the gimple_stmt_iterator where it inserts new code.
4073 2009-01-10 Sebastian Pop <sebastian.pop@amd.com>
4075 * testsuite/gcc.dg/graphite/block-3.c: Fix compile error on 32bit.
4077 2009-01-10 Sebastian Pop <sebastian.pop@amd.com>
4079 * opts.c (decode_options): Enable flag_graphite_identity and
4080 flag_loop_block in -O2 and above.
4082 2009-01-08 Sebastian Pop <sebastian.pop@amd.com>
4084 * libjava/classpath/lib/gnu/java/awt/peer/gtk/GtkMouseInfoPeer.class:
4085 Fix merge problem: replace with the file from trunk.
4087 2009-01-08 Sebastian Pop <sebastian.pop@amd.com>
4089 * Merge from mainline (r141727:143163).
4091 2009-01-07 Sebastian Pop <sebastian.pop@amd.com>
4092 Jan Sjodin <jan.sjodin@amd.com>
4094 PR tree-optimization/38559
4095 * testsuite/gcc.dg/graphite/pr38559.c: New.
4097 * graphite.c (debug_value, copy_constraint,
4098 swap_constraint_variables, scale_constraint_variable, ): New.
4099 (get_lower_bound, get_upper_bound): Removed.
4100 (graphite_trans_bb_strip_mine): Clean up this code that works
4101 only for constant number of iterations. Fully copy upper and
4102 lower bound constraints, not only the constant part of them.
4103 * graphite.h (debug_value): Declared.
4105 2009-01-06 Jan Sjodin <jan.sjodin@amd.com>
4107 PR tree-optimization/38492
4108 PR tree-optimization/38498
4109 * tree-check.c (operator_is_linear, scev_is_linear_expression): New.
4110 * tree-chrec.h (scev_is_linear_expression): Declared.
4111 * graphite.c (graphite_cannot_represent_loop_niter): New.
4112 (scopdet_basic_block_info): Call graphite_cannot_represent_loop_niter.
4113 (graphite_loop_normal_form): Use gcc_assert.
4114 (scan_tree_for_params): Use CASE_CONVERT.
4115 (phi_node_is_iv, bb_contains_non_iv_scalar_phi_nodes): New.
4116 (build_scop_conditions_1): Call bb_contains_non_iv_scalar_phi_nodes.
4117 Use gcc_assert. Discard scops that contain unhandled cases.
4118 (build_scop_conditions): Return a boolean status for unhandled cases.
4119 (strip_mine_profitable_p): Print the loop number, not its depth.
4120 (is_interchange_valid): Pass the depth of the loop nest, don't
4121 recompute it wrongly.
4122 (graphite_trans_bb_block): Same.
4123 (graphite_trans_bb_block): Print tentative of loop blocking.
4124 (graphite_trans_scop_block): Do not print that the loop has been
4126 (graphite_transform_loops): Do not handle scops that contain condition
4129 * testsuite/gcc.dg/graphite/pr38500.c: Fixed warning as committed
4131 * testsuite/gcc.dg/graphite/block-0.c: Update test.
4132 * testsuite/gcc.dg/graphite/block-1.c: Same.
4133 * testsuite/gcc.dg/graphite/block-2.c: Remove xfail and test for
4135 * testsuite/gcc.dg/graphite/block-4.c: Remove test for strip mine.
4136 * testsuite/gcc.dg/graphite/block-3.c: New.
4137 * testsuite/gcc.dg/graphite/pr38498.c: New.
4139 2008-12-22 Harsha Jagasia <harsha.jagasia@amd.com>
4141 PR tree-optimization/38510
4142 * gcc.dg/graphite/pr38510.c: New.
4143 * graphite.c (recompute_all_dominators): Call mark_irreducible_loops.
4144 (translate_clast): Call recompute_all_dominators before
4146 (gloog): Call recompute_all_dominators before graphite_verify.
4148 2008-12-12 Sebastian Pop <sebastian.pop@amd.com>
4150 PR tree-optimization/38492
4151 * graphite.c (rename_map_elt, debug_rename_elt,
4152 debug_rename_map_1, debug_rename_map, new_rename_map_elt,
4153 rename_map_elt_info, eq_rename_map_elts,
4154 get_new_name_from_old_name, bb_in_sese_p): Moved around.
4155 (sese_find_uses_to_rename_use): Renamed sese_build_livein_liveouts_use.
4156 (sese_find_uses_to_rename_bb): Renamed sese_build_livein_liveouts_bb.
4157 (sese_build_livein_liveouts): New.
4158 (new_sese, free_sese): New.
4159 (new_scop): Call new_sese.
4160 (free_scop): Call free_sese.
4161 (rename_variables_from_edge, rename_phis_end_scop): Removed.
4162 (register_old_new_names): Renamed register_old_and_new_names.
4163 (register_scop_liveout_renames, add_loop_exit_phis,
4164 insert_loop_close_phis, struct igp,
4165 default_liveout_before_guard, add_guard_exit_phis,
4166 insert_guard_phis, copy_renames): New.
4167 (translate_clast): Call insert_loop_close_phis and insert_guard_phis.
4168 (sese_add_exit_phis_edge): Renamed scop_add_exit_phis_edge.
4169 (rewrite_into_sese_closed_ssa): Renamed scop_insert_phis_for_liveouts.
4170 (scop_adjust_phis_for_liveouts): New.
4171 (gloog): Call scop_adjust_phis_for_liveouts.
4173 * graphite.h (struct sese): Documented. Added fields liveout,
4175 (SESE_LIVEOUT, SESE_LIVEIN, SESE_LIVEIN_VER, SESE_NUM_VER): New.
4176 (new_sese, free_sese, sese_build_livein_liveouts): Declared.
4177 (struct scop): Added field liveout_renames.
4178 (SCOP_LIVEOUT_RENAMES): New.
4180 2008-12-11 Sebastian Pop <sebastian.pop@amd.com>
4182 PR tree-optimization/38409
4183 * gcc.dg/graphite/pr38409.c: New.
4184 * graphite.c (nb_reductions_in_loop): Use simple_iv.
4186 2008-12-11 Sebastian Pop <sebastian.pop@amd.com>
4188 * graphite.c (gcc_type_for_cloog_iv): By default return
4190 (graphite_create_new_loop): Don't fold_convert the already
4191 fold_convert-ed expression.
4193 2008-12-11 Harsha Jagasia <harsha.jagasia@amd.com>
4195 PR tree-optimization/38446
4196 * gcc.dg/graphite/pr38446.c: New.
4197 * graphite.c (register_bb_in_sese): New.
4198 (bb_in_sese_p): Check if bb belongs to sese region by explicitly
4199 looking at the bbs in the region.
4200 * graphite.h (sese): Add region_basic_blocks pointer set to
4201 structure and initialize at the time of defining new scop.
4203 2008-12-11 Tobias Grosser <grosser@fim.uni-passau.de>
4205 * graphite.c (new_graphite_bb): Initialize GBB_STATIC_SCHEDULE.
4206 (find_params_in_bb): Do not free data refs.
4207 (free_graphite_bb): Add FIXME on disabled free_data_refs.
4209 2008-12-11 Sebastian Pop <sebastian.pop@amd.com>
4211 * testsuite/gcc.dg/graphite/scop-16.c: Test only scop specific info.
4212 * testsuite/gcc.dg/graphite/scop-17.c: Same.
4213 * testsuite/gcc.dg/graphite/block-5.c: New.
4214 * testsuite/gcc.dg/graphite/block-6.c: New.
4215 * testsuite/gcc.dg/graphite/pr37485.c: Clean dump file after.
4216 * testsuite/gcc.dg/graphite/pr37684.c: Same.
4217 * testsuite/gcc.dg/graphite/block-2.c: Same.
4219 * graphite.c (struct ivtype_map_elt): New.
4220 (debug_ivtype_elt, debug_ivtype_map_1, debug_ivtype_map,
4221 new_ivtype_map_elt, ivtype_map_elt_info, eq_ivtype_map_elts,
4222 gcc_type_for_cloog_iv): New.
4223 (loop_iv_stack_patch_for_consts): Use the type of the induction
4224 variable from the original loop, except for the automatically
4225 generated loops, i.e., in the case of a strip-mined loop, in
4226 which case there is no original loop: in that case just use
4228 (new_graphite_bb): Initialize GBB_CLOOG_IV_TYPES.
4229 (free_graphite_bb): Free GBB_CLOOG_IV_TYPES.
4230 (clast_name_to_gcc): Accept params to be NULL.
4231 (clast_to_gcc_expression): Take an extra parameter for the type.
4232 Convert to that type all the expressions built by this function.
4233 (gcc_type_for_clast_expr, gcc_type_for_clast_eq): New.
4234 (graphite_translate_clast_equation): Compute the type of the
4235 clast_equation before translating its LHS and RHS.
4236 (clast_get_body_of_loop, gcc_type_for_iv_of_clast_loop): New.
4237 (graphite_create_new_loop): Compute the type of the induction
4238 variable before translating the lower and upper bounds and before
4239 creating the induction variable.
4240 (rename_variables_from_edge, rename_phis_end_scop): New.
4241 (copy_bb_and_scalar_dependences): Call rename_phis_end_scop.
4242 (sese_add_exit_phis_edge): Do not use integer_zero_node.
4243 (find_cloog_iv_in_expr, compute_cloog_iv_types_1,
4244 compute_cloog_iv_types): New.
4245 (gloog): Call compute_cloog_iv_types before starting the
4246 translation of the clast.
4248 * graphite.h (struct graphite_bb): New field cloog_iv_types.
4249 (GBB_CLOOG_IV_TYPES): New.
4250 (debug_ivtype_map): Declared.
4251 (oldiv_for_loop): New.
4253 2008-12-10 Tobias Grosser <grosser@fim.uni-passau.de>
4256 * graphite.c (new_scop): Initialize SCOP_ADD_PARAMS.
4257 (param_index): Assert if parameter is not know after parameter
4259 (find_params_in_bb): Detect params directly in GBB_CONDITIONS.
4260 (find_scop_parameters): Mark, that we have finished parameter
4262 (graphite_transform_loops): Move condition detection before parameter
4264 * graphite.h (struct scop): Add SCOP_ADD_PARAMS.
4265 * testsuite/gfortran.dg/graphite/pr38459.f90: New.
4267 2008-12-09 Tobias Grosser <grosser@fim.uni-passau.de>
4269 * graphite.c (graphite_transform_loops): Always call find_transform ()
4270 in ENABLE_CHECKING. So we test these code paths, even if we do not
4273 2008-12-09 Tobias Grosser <grosser@fim.uni-passau.de>
4275 * graphite.c (print_graphite_bb): Fix printing to file != dump_file.
4276 (print_scop): Ditto.
4278 2008-12-08 Tobias Grosser <grosser@fim.uni-passau.de>
4281 Fix testsuite/gfortran.dg/graphite/id-3.f90.
4282 * graphite.c (scopdet_basic_block_info): Fix bug that found some
4283 regions more than once.
4285 2008-12-03 Sebastian Pop <sebastian.pop@amd.com>
4287 Fix testsuite/gfortran.dg/graphite/id-4.f90.
4288 * graphite.c (scan_tree_for_params): Do not compute the multiplicand
4291 2008-12-03 Sebastian Pop <sebastian.pop@amd.com>
4293 Fix testsuite/gfortran.dg/graphite/id-1.f90.
4294 * graphite.c (gmp_cst_to_tree): Pass the type in parameter.
4295 (loop_iv_stack_patch_for_consts): Update use of gmp_cst_to_tree.
4296 (max_precision_type): New.
4297 (value_clast): Removed.
4298 (clast_to_gcc_expression): Be more careful to types of expressions.
4299 Use max_precision_type and update use of gmp_cst_to_tree.
4300 (graphite_translate_clast_equation): Use max_precision_type.
4301 (graphite_create_guard_cond_expr): Do not use integer_type_node,
4302 use the type of the condition.
4303 (graphite_create_new_loop): Do not use integer_type_node, use the
4304 max_precision_type of lb and ub.
4306 2008-12-03 Sebastian Pop <sebastian.pop@amd.com>
4308 * graphite.c (build_scops_1): Initialize open_scop.exit
4311 2008-12-02 Sebastian Pop <sebastian.pop@amd.com>
4313 * testsuite/gcc.dg/graphite/pr38084.c: New.
4314 * testsuite/gfortran.dg/graphite/id-1.f90: New.
4315 * testsuite/gfortran.dg/graphite/id-2.f90: New.
4316 * testsuite/gfortran.dg/graphite/id-3.f90: New.
4317 * testsuite/gfortran.dg/graphite/id-4.f90: New.
4318 * testsuite/gfortran.dg/graphite/pr37857.f90: New.
4320 2008-12-02 Sebastian Pop <sebastian.pop@amd.com>
4321 Jan Sjodin <jan.sjodin@amd.com>
4322 Harsha Jagasia <harsha.jagasia@amd.com>
4334 * testsuite/gcc.dg/graphite/pr38073.c: New.
4335 * testsuite/gcc.dg/graphite/pr37928.c: New.
4336 * testsuite/gcc.dg/graphite/pr37883.c: New.
4337 * testsuite/gcc.dg/graphite/pr38125.c: New.
4338 * testsuite/gfortran.dg/graphite/pr38083.f90: New.
4339 * testsuite/gfortran.dg/graphite/pr37852.f90: New.
4340 * testsuite/gfortran.dg/graphite/pr37980.f90: New.
4342 * testsuite/gcc.dg/graphite/scop-18.c: Remove reduction, test for
4343 the number of detected scops. Copy exact same test for loop
4345 * testsuite/gcc.dg/graphite/block-1.c: Fix the number of expected
4346 loops to be blocked as reductions are not handled.
4347 * testsuite/gcc.dg/graphite/block-4.c: ...here. New.
4349 * tree-phinodes.c (remove_phi_nodes): New, extracted from...
4350 * tree-cfg.c (remove_phi_nodes_and_edges_for_unreachable_block):
4352 * tree-flow.h (remove_phi_nodes, canonicalize_loop_ivs): Declared.
4353 * Makefile.in (graphite.o): Depend on value-prof.h.
4354 (graphite.o-warn): Removed -Wno-error.
4355 * tree-parloops.c (canonicalize_loop_ivs): Allow reduction_list
4356 to be a NULL pointer. Call update_stmt. Return the newly created
4357 cannonical induction variable.
4359 * graphite.h (debug_rename_map): Declared. Fix some comments.
4361 * graphite.c: Reimplement the code generation from graphite to gimple.
4362 Include value-prof.h.
4363 (loop_iv_stack_get_iv): Do not return NULL for constant substitutions.
4364 (get_old_iv_from_ssa_name): Removed.
4365 (graphite_stmt_p): New.
4366 (new_graphite_bb): Test for useful statements before building a
4367 graphite statement for the basic block.
4368 (free_graphite_bb): Do not free GBB_DATA_REFS: this is a bug
4369 in free_data_ref that calls BITMAP_FREE (DR_VOPS (dr)) without
4371 (recompute_all_dominators, graphite_verify,
4372 nb_reductions_in_loop, graphite_loop_normal_form): New.
4373 (scop_record_loop): Call graphite_loop_normal_form.
4374 (build_scop_loop_nests): Iterate over all the blocks of the
4375 function instead of relying on the incomplete information from
4376 SCOP_BBS. Return the success of the operation.
4377 (find_params_in_bb): Use the data from GBB_DATA_REFS.
4378 (add_bb_domains): Removed.
4379 (build_loop_iteration_domains): Don't call add_bb_domains.
4380 Add the iteration domain only to the basic blocks that have been
4381 translated to graphite.
4382 (build_scop_conditions_1): Add constraints only if the basic
4383 block have been translated to graphite.
4384 (build_scop_data_accesses): Completely disabled until data
4385 dependence is correctly implemented.
4386 (debug_rename_elt, debug_rename_map_1, debug_rename_map): New.
4387 (remove_all_edges_1, remove_all_edges): Removed.
4388 (get_new_name_from_old_name): New.
4389 (graphite_rename_variables_in_stmt): Renamed
4390 rename_variables_in_stmt. Call get_new_name_from_old_name.
4391 Use replace_exp and update_stmt.
4392 (is_old_iv): Renamed is_iv.
4393 (expand_scalar_variables_stmt): Extra parameter for renaming map.
4394 Use replace_exp and update_stmt.
4395 (expand_scalar_variables_expr): Same. Use the map to get the
4396 new names for the renaming of induction variables and for the
4397 renaming of variables after a basic block has been copied.
4398 (expand_scalar_variables): Same.
4399 (graphite_rename_variables): Renamed rename_variables.
4400 (move_phi_nodes): Removed.
4401 (get_false_edge_from_guard_bb): New.
4402 (build_iv_mapping): Do not insert the induction variable of a
4403 loop in the renaming iv map if the basic block does not belong
4405 (register_old_new_names, graphite_copy_stmts_from_block,
4406 copy_bb_and_scalar_dependences): New.
4407 (translate_clast): Heavily reimplemented: copy basic blocks,
4408 do not move them. Finally, in call cleanup_tree_cfg in gloog.
4409 At each translation step call graphite_verify ensuring the
4410 consistency of the SSA, loops and dominators information.
4411 (collect_virtual_phis, find_vdef_for_var_in_bb,
4412 find_vdef_for_var_1, find_vdef_for_var,
4413 patch_phis_for_virtual_defs): Removed huge hack.
4414 (mark_old_loops, remove_dead_loops, skip_phi_defs,
4415 collect_scop_exit_phi_args, patch_scop_exit_phi_args,
4416 gbb_can_be_ignored, scop_remove_ignoreable_gbbs, ): Removed.
4417 (remove_sese_region, ifsese, if_region_entry, if_region_exit,
4418 if_region_get_condition_block, if_region_set_false_region,
4419 create_if_region_on_edge, move_sese_in_condition, bb_in_sese_p,
4420 sese_find_uses_to_rename_use, sese_find_uses_to_rename_bb,
4421 sese_add_exit_phis_edge, sese_add_exit_phis_var,
4422 rewrite_into_sese_closed_ssa): New.
4423 (gloog): Remove dead code. Early return if code cannot be
4424 generated. Call cleanup_tree_cfg once the scop has been code
4426 (graphite_trans_scop_block, graphite_trans_loop_block): Do not
4427 block loops with less than two loops.
4428 (graphite_apply_transformations): Remove the call to
4429 scop_remove_ignoreable_gbbs.
4430 (limit_scops): When build_scop_loop_nests fails, continue on
4431 the next scop. Fix open_scop.entry.
4432 (graphite_transform_loops): Call recompute_all_dominators: force the
4433 recomputation of correct CDI_DOMINATORS and CDI_POST_DOMINATORS.
4434 Call initialize_original_copy_tables and free_original_copy_tables
4435 to be able to copy basic blocks during code generation.
4436 When build_scop_loop_nests fails, continue on next scop.
4437 (value_clast): New union.
4438 (clast_to_gcc_expression): Fix type cast warning.
4440 2008-11-09 Sebastian Pop <sebastian.pop@amd.com>
4442 * Merge from mainline (r140838:141727).
4444 2008-11-05 Tobias Grosser <grosser@fim.uni-passau.de>
4448 * graphite.c (scan_tree_for_params): Add POINTER_PLUS_EXPR.
4450 2008-11-05 Tobias Grosser <grosser@fim.uni-passau.de>
4454 * graphite.c (scopdet_basic_block_info): Fix loops with multiple
4455 exits and conditions.
4456 * testsuite/gcc.dg/graphite/pr37943.c: New.
4458 2008-10-23 Tobias Grosser <grosser@fim.uni-passau.de>
4461 * graphite.c (gloog): Replace EXIT_BLOCK_PTR with scop exit.
4463 2008-10-23 Tobias Grosser <grosser@fim.uni-passau.de>
4465 * doc/invoke.texi: Fix spaces.
4467 2008-10-22 Sebastian Pop <sebastian.pop@amd.com>
4469 PR tree-optimization/37891
4470 Reverted last commit.
4471 * graphite.c (create_single_entry_edge): Set
4472 EDGE_IRREDUCIBLE_LOOP and BB_IRREDUCIBLE_LOOP.
4474 2008-10-21 Sebastian Pop <sebastian.pop@amd.com>
4475 Mitul Thakkar <mitul.thakkar@amd.com>
4477 * graphite.c (create_single_entry_edge): Set
4478 EDGE_IRREDUCIBLE_LOOP and BB_IRREDUCIBLE_LOOP.
4480 2008-10-16 Tobias Grosser <grosser@fim.uni-passau.de>
4482 * doc/invoke.texi: Add -fgraphite-identity.
4483 * graphite.c (graphite_apply_transformations): Check for
4484 -fgraphite-identity.
4485 * toplev.c (process_options): Add flag_graphite_identity.
4486 * tree-ssa-loop.c: Add flag_graphite_identity.
4488 2008-10-14 Sebastian Pop <sebastian.pop@amd.com>
4490 Undo changes from 2008-10-02:
4491 * tree-ssa-loop-ivopts.c (rewrite_use_nonlinear_expr): Convert
4492 operand type when copying the operand to a variable of different type.
4493 * cfgloopmanip.c (create_empty_loop_on_edge): Write exit condition
4494 with the IV name after increment.
4496 2008-10-14 Sebastian Pop <sebastian.pop@amd.com>
4497 Harsha Jagasia <harsha.jagasia@amd.com>
4499 PR tree-optimization/37828
4500 * testsuite/gcc.dg/graphite/pr37828.c: New.
4501 * graphite.c (graphite_trans_loop_block): Do not loop block
4502 single nested loops.
4504 2008-10-09 Harsha Jagasia <harsha.jagasia@amd.com>
4505 Sebastian Pop <sebastian.pop@amd.com>
4507 * graphite.c (struct rename_map_elt, new_rename_map_elt,
4508 rename_map_elt_info, eq_rename_map_elts): New.
4509 (graphite_rename_ivs_stmt): Renamed graphite_rename_variables_in_stmt.
4510 (expand_scalar_variables_expr): Change parameters.
4511 (expand_scalar_variables_stmt): Same.
4512 (expand_scalar_variables): Same.
4513 (graphite_rename_ivs): Rename graphite_rename_variables.
4514 (build_iv_mapping): New.
4515 (translate_clast): Call build_iv_mapping.
4516 * graphite.h (gbb_p): New name.
4518 2008-10-03 Harsha Jagasia <harsha.jagasia@amd.com>
4520 PR tree-optimization/37684
4521 * gcc.dg/graphite/pr37684.c: New.
4522 * graphite.c (exclude_component_ref): New.
4523 (is_simple_operand): Call exclude_component_ref.
4525 2008-10-02 Jan Sjodin <jan.sjodin@amd.com>
4526 Harsha Jagasia <harsha.jagasia@amd.com>
4528 PR tree-optimization/37485
4529 * gcc.dg/graphite/block-2.c: New
4530 * graphite.c (gmp_cst_to_tree): Moved.
4531 (iv_stack_entry_is_constant): New.
4532 (iv_stack_entry_is_iv): New.
4533 (loop_iv_stack_push): Renamed to loop_iv_stack_push_iv.
4534 (loop_iv_stack_insert_constant): New.
4535 (loop_iv_stack_pop): Use new datatpype.
4536 (loop_iv_stack_get_iv): Same.
4537 (loop_iv_stack_get_iv_from_name): Same.
4538 (loop_iv_stack_debug): Renamed to debug_loop_iv_stack.
4539 (loop_iv_stack_patch_for_consts): New.
4540 (loop_iv_stack_remove_constants): New.
4541 (graphite_create_new_loop): Use loop_iv_stack_push_iv.
4542 (translate_clast): Call loop_iv_stack_patch_for_consts and
4543 loop_iv_stack_remove_constants.
4544 (gloog): Use new datatype. Redirect construction edge to end
4545 block to avoid accidental deletion.
4546 * graphite.h (enum iv_stack_entry_kind): New. Tag for data in
4548 (union iv_stack_entry_data): New. Data in iv stack entry.
4549 (struct iv_stack_entry): New. Datatype for iv stack entries.
4551 2008-10-02 Sebastian Pop <sebastian.pop@amd.com>
4553 * tree-ssa-loop-ivopts.c (rewrite_use_nonlinear_expr): Convert
4554 operand type when copying the operand to a variable of different type.
4556 2008-10-02 Sebastian Pop <sebastian.pop@amd.com>
4558 * cfgloopmanip.c (create_empty_loop_on_edge): Write exit condition
4559 with the IV name after increment.
4561 2008-10-02 Sebastian Pop <sebastian.pop@amd.com>
4563 * Merge from mainline (r140164:140838).
4565 2008-09-10 Konrad Trifunovic <konrad.trifunovic@inria.fr>
4567 * graphite-data-ref.c: New.
4568 * graphite.c (print_scop): Also dump the dependence graph.
4569 (bb_in_scop_p, loop_in_scop_p, nb_loops_around_gb): Moved...
4570 (new_scop): Initialize SCOP_DEP_GRAPH.
4571 (build_scop_dynamic_schedules): New.
4572 (build_access_matrix_with_af): Fixed column numbering.
4573 (graphite_transform_loops): Call build_scop_dynamic_schedules.
4574 * graphite.h: Add ifndef/define guards against multiple inclusion.
4575 (struct scop): Add dep_graph field.
4576 (SCOP_DEP_GRAPH): Defined.
4577 (ref_nb_loops): Fixed and moved to other position.
4578 (bb_in_scop_p, loop_in_scop_p, nb_loops_around_gb): ... here.
4579 (nb_loops_around_loop_in_scop): New.
4580 (graphite_dump_dependence_graph): Declared.
4581 (graphite_build_rdg_all_levels): Declared.
4582 (graphite_test_dependence): Declared.
4583 * Makefile.in (graphite-data-ref.o): New target.
4585 2008-09-09 Sebastian Pop <sebastian.pop@amd.com>
4587 * Merge from mainline (139870:140164).
4589 2008-09-01 Sebastian Pop <sebastian.pop@amd.com>
4591 * Merge from mainline (138275:139870).
4592 * testsuite/gcc.dg/graphite/scop-matmult.c: XFailed as one of
4593 the commits from trunk broke the niter detection.
4595 2008-09-01 Sebastian Pop <sebastian.pop@amd.com>
4597 * graphite.c: Add more documentation. Fix formatting.
4598 (debug_loop_vec, debug_oldivs, loop_iv_stack,
4599 loop_iv_stack_debug): Moved...
4600 (schedule_to_scattering): Move before use.
4601 (dot_all_scops): Include in "#if 0" the code for system
4604 * graphite.h: (debug_loop_vec, debug_oldivs, loop_iv_stack,
4605 loop_iv_stack_debug): ...here.
4607 2008-08-29 Jan Sjodin <jan.sjodin@amd.com>
4609 * tree-phinodes.c (make_phi_node): Extern.
4610 (add_phi_node_to_bb): New.
4611 (create_phi_node): Call add_phi_node_to_bb.
4612 * tree-ssa-loop-ivopts.c (get_phi_with_result): New.
4613 (remove_statement): Handle case where stored phi was updated
4614 and is no longer the same.
4615 * graphite.c (is_parameter): New.
4617 (expand_scalar_variables_expr): New.
4618 (expand_scalar_variables_stmt): New.
4619 (expand_scalar_variables): New.
4620 (move_phi_nodes): Create new phi instead of moving old one.
4621 (translate_clast): Call expand_scalar_variables.
4622 (find_vdef_for_var_in_bb): Also scan regular definitions.
4623 (skip_phi_defs): New.
4624 (collect_scop_exit_phi_args): New.
4625 (patch_scop_exit_phi_args): New.
4626 (gloog): Patch phis after scop.
4627 * tree-flow.h: (add_phi_node_to_bb): Declared.
4628 (make_phi_node): Declared.
4630 2008-08-26 Sebastian Pop <sebastian.pop@amd.com>
4632 * graphite.c (end_scop): Split the entry of the scop when it
4633 is the header of the loop in which the scop is ending.
4634 (build_scops_1, limit_scops): Update uses of end_scop.
4636 2008-08-26 Sebastian Pop <sebastian.pop@amd.com>
4638 * graphite.c (dot_all_scops_1): Do not fail on uninitialized
4639 SCOP_ENTRY or SCOP_EXIT.
4641 2008-08-25 Sebastian Pop <sebastian.pop@amd.com>
4643 * graphite.c (get_construction_edge): Removed.
4644 (gloog): Construction edge is the scop entry edge.
4646 2008-08-25 Sebastian Pop <sebastian.pop@amd.com>
4648 * graphite.c (can_generate_for_scop): Removed.
4649 (gloog): Do not call it.
4651 2008-08-25 Sebastian Pop <sebastian.pop@amd.com>
4653 * graphite.c (new_scop): Entry of a scop is an edge.
4654 Initialize SESE region.
4655 (free_scop): Free SESE region.
4656 (build_scops_1, scopdet_bb_info): Work on edges, not on bbs.
4657 (split_difficult_bb): New, split from end_scop.
4658 (end_scop): Exit of a scop is an edge.
4659 (build_scop_bbs): Never check CDI_POST_DOMINATORS: this info is
4660 not automatically updated and thus is always wrong.
4661 * graphite.h (struct sese): New.
4664 (struct scop): New field for a SESE region. Remove entry, exit.
4665 (SCOP_ENTRY, SCOP_EXIT): Update definitions to match same
4666 semantics as before. Moved comment around.
4668 2008-08-25 Tobias Grosser <grosser@fim.uni-passau.de>
4669 Sebastian Pop <sebastian.pop@amd.com>
4671 * graphite.c (graphite_transform_loops): Always enable gloog
4672 and find_transform when ENABLE_CHECKING.
4674 2008-08-25 Sebastian Pop <sebastian.pop@amd.com>
4676 * graphite.c (graphite_transform_loops): Move pretty printer
4677 of SCOPs before doing any transform. Remove call to print_scops
4678 and dot_all_scops_1.
4680 2008-08-25 Sebastian Pop <sebastian.pop@amd.com>
4682 * graphite.c (dump_gbb_conditions): Don't try to print NULL pointers.
4683 (print_graphite_bb): Same.
4685 2008-08-25 Sebastian Pop <sebastian.pop@amd.com>
4687 * graphite.c (dot_all_scops_1): Cleanup.
4688 (move_scops): Fix comment.
4690 2008-08-25 Sebastian Pop <sebastian.pop@amd.com>
4692 * graphite.c (build_scop_bbs): Revert commit 139355:
4694 2008-08-20 Sebastian Pop <sebastian.pop@amd.com>
4695 Dwarakanath Rajagopal <dwarak.rajagopal@amd.com>
4697 * graphite.c (build_scop_bbs): Factor up code.
4699 2008-08-25 Tobias Grosser <grosser@fim.uni-passau.de>
4701 * graphite.c (gloog): Update dominator info.
4703 2008-08-25 Tobias Grosser <grosser@fim.uni-passau.de>
4705 * graphite.c (remove_cond_exprs): Do not fail on empty bbs.
4707 2008-08-24 Sebastian Pop <sebastian.pop@amd.com>
4709 * graphite.c (new_graphite_bb): Remove GBB_INDEX_TO_NUM_MAP
4711 (free_graphite_bb): Remove GBB_INDEX_TO_NUM_MAP free.
4712 (translate_clast): Correct formatting.
4713 * graphite.h (struct num_map): Removed.
4714 (struct graphite_bb): Remove num_map field.
4715 (GBB_INDEX_TO_NUM_MAP): Removed.
4717 2008-08-24 Sebastian Pop <sebastian.pop@amd.com>
4719 * graphite.c (build_access_matrix_with_af): Fix comments.
4720 (build_scop_data_accesses): Same.
4722 2008-08-24 Sebastian Pop <sebastian.pop@amd.com>
4724 * graphite.c (build_scop_data_accesses): Don't construct
4725 access matrices. Add a FIXME and an assert condition that
4726 should pass when the access matrices will be needed.
4728 2008-08-24 Sebastian Pop <sebastian.pop@amd.com>
4730 * tree-data-ref.c (stmt_simple_memref_p): Don't call
4732 * graphite.c (build_graphite_bb): Renamed new_graphite_bb.
4733 Moved close by free_graphite_bb.
4734 (free_graphite_bb): Call free_data_refs. Reset bb->aux.
4735 (new_scop): Move close by free_scop.
4736 (graphite_transform_loops): Avoid linear scan to reset bb->aux.
4738 2008-08-22 Jan Sjodin <jan.sjodin@amd.com>
4740 * cfgloopmanip.c (create_empty_if_region_on_edge): New.
4741 * graphite.c (clast_to_gcc_expression): Call gmp_cst_to_tree
4742 instead of recursive call.
4743 (graphite_translate_clast_equation): New.
4744 (graphite_create_guard_cond_expr): New.
4745 (graphite_create_new_guard): New.
4746 (get_stack_index_from_iv): Removed.
4747 (graphite_rename_ivs_stmt): Use gbb_loop_index.
4748 (get_true_edge_from_guard_bb): New.
4749 (translate_clast): Handle stmt_guard in clast.
4750 (get_construction_edge): Allow construction edge detection for
4751 a scope entry with multiple predecessors if one predecessor is
4752 the immediate dominator of scope entry.
4753 (can_generate_code_stmt): Enable code generation for clast_guard.
4754 (gloog): Use correct context loop. Removed check for post dominators.
4755 * cfgloop.h (create_empty_if_region_on_edge): Declared.
4757 2008-08-21 Sebastian Pop <sebastian.pop@amd.com>
4759 * graphite.c (remove_dead_loops): Document better which
4762 2008-08-21 Sebastian Pop <sebastian.pop@amd.com>
4764 * Makefile.in: Rename POLYLIBLIBS and POLYLIBINC to PPLLIBS
4766 (graphite.o): Also depends on pointer-set.h.
4768 2008-08-21 Sebastian Pop <sebastian.pop@amd.com>
4770 * graphite.c (scop_record_loop): Fix compile warning.
4772 2008-08-21 Harsha Jagasia <harsha.jagasia@amd.com>
4773 Sebastian Pop <sebastian.pop@amd.com>
4775 * graphite.c (scop_record_loop): DECL_NAME can be NULL.
4777 2008-08-21 Sebastian Pop <sebastian.pop@amd.com>
4779 * graphite.c (build_graphite_bb): Initialize bb->aux to
4780 point to the graphite_bb_p.
4781 (graphite_bb_from_bb): Renamed gbb_from_bb; returns the
4783 (add_bb_domains): Does not use the scop parameter.
4784 (graphite_transform_loops): Clean bb->aux at the end.
4786 2008-08-20 Dwarakanath Rajagopal <dwarak.rajagopal@amd.com>
4787 Sebastian Pop <sebastian.pop@amd.com>
4789 * testsuite/lib/target-supports.exp
4790 (check_effective_target_fgraphite): New.
4792 * testsuite/gcc.dg/graphite/graphite.exp: Early exit when
4793 check_effective_target_fgraphite returns false.
4794 Set dg-do-what-default to compile.
4795 (scan-graphite-dump-times): Removed.
4796 * testsuite/gfortran.dg/graphite/graphite.exp: Same.
4798 * testsuite/gcc.dg/graphite/scop-0.c: Do not use "dg-do compile".
4799 Use scan-tree-dump-times instead of scan-graphite-dump-times.
4800 * testsuite/gcc.dg/graphite/scop-1.c: Same.
4801 * testsuite/gcc.dg/graphite/scop-2.c: Same.
4802 * testsuite/gcc.dg/graphite/scop-3.c: Same.
4803 * testsuite/gcc.dg/graphite/scop-4.c: Same.
4804 * testsuite/gcc.dg/graphite/scop-5.c: Same.
4805 * testsuite/gcc.dg/graphite/scop-6.c: Same.
4806 * testsuite/gcc.dg/graphite/scop-7.c: Same.
4807 * testsuite/gcc.dg/graphite/scop-8.c: Same.
4808 * testsuite/gcc.dg/graphite/scop-9.c: Same.
4809 * testsuite/gcc.dg/graphite/scop-10.c: Same.
4810 * testsuite/gcc.dg/graphite/scop-11.c: Same.
4811 * testsuite/gcc.dg/graphite/scop-12.c: Same.
4812 * testsuite/gcc.dg/graphite/scop-13.c: Same.
4813 * testsuite/gcc.dg/graphite/scop-matmult.c: Same.
4814 * testsuite/gcc.dg/graphite/scop-14.c: Same.
4815 * testsuite/gcc.dg/graphite/scop-15.c: Same.
4816 * testsuite/gcc.dg/graphite/block-0.c: Same.
4817 * testsuite/gcc.dg/graphite/scop-16.c: Same.
4818 * testsuite/gcc.dg/graphite/block-1.c: Same.
4819 * testsuite/gcc.dg/graphite/scop-17.c: Same.
4820 * testsuite/gcc.dg/graphite/scop-18.c: Same.
4821 * testsuite/gfortran.dg/graphite/block-1.f90: Same.
4822 * testsuite/gfortran.dg/graphite/scop-1.f: Same.
4823 * testsuite/gfortran.dg/graphite/block-2.f: Same.
4825 2008-08-20 Sebastian Pop <sebastian.pop@amd.com>
4827 * graphite.c: Fix some XXX comments.
4828 (build_scop_dynamic_schedules): Removed.
4830 2008-08-20 Sebastian Pop <sebastian.pop@amd.com>
4832 * graphite.h (scop_max_loop_depth): Moved...
4833 * graphite.c (scop_max_loop_depth): ...here.
4834 (remove_all_edges_1): New.
4835 (remove_all_edges): Factored code.
4836 (remove_cond_exprs): Check only the last statement for
4837 a GIMPLE_COND expression.
4839 2008-08-20 Sebastian Pop <sebastian.pop@amd.com>
4841 * graphite.c (scan_tree_for_params): Early return when the
4842 expression is a chrec_dont_know. Handle case NEGATE_EXPR.
4843 (find_scop_parameters): Factor out code.
4844 (graphite_trans_bb_strip_mine): Remove dead code.
4846 2008-08-20 Sebastian Pop <sebastian.pop@amd.com>
4848 * graphite.c (clast_to_gcc_expression, graphite_create_new_loop,
4849 graphite_trans_bb_move_loop): Factor asserts.
4850 (gloog): Perform sanity checks only for ENABLE_CHECKING.
4851 Do not call calculate_dominance_info and estimate_bb_frequencies.
4853 2008-08-20 Jan Sjodin <jan.sjodin@amd.com>
4855 * graphite.c (create_loops_mapping, free_loops_mapping,
4856 create_loops_mapping_num, debug_loop_mapping_1,
4857 debug_loop_mapping, graphite_loops_mapping_max_loop_num,
4858 get_loop_mapping_for_num, graphite_loops_mapping_add_child,
4859 graphite_loops_mapping_add_child_num,
4860 graphite_loops_mapping_insert_child,
4861 graphite_loops_mapping_parent, get_loop_mapped_depth_for_num,
4862 get_loop_mapped_depth, split_loop_mapped_depth_for_num,
4863 loop_mapped_depth_split_loop, swap_loop_mapped_depth_for_num,
4864 create_num_from_index, get_num_from_index,
4865 swap_loop_mapped_depth): Removed.
4866 (new_scop): Do not initialize SCOP_LOOPS_MAPPING.
4867 (free_scop): Do not call free_loops_mapping.
4868 (graphite_get_new_iv_stack_index_from_old_iv): Renamed
4869 get_stack_index_from_iv. Use GBB_LOOPS instead of calling
4870 get_loop_mapped_depth.
4871 (graphite_trans_bb_move_loop): Do not update the loop mapping.
4872 (graphite_trans_bb_strip_mine): Same.
4873 * graphite.h (graphite_loops_mapping, graphite_loop_node): Removed.
4874 (struct scop): Remove field loops_mapping.
4876 2008-08-20 Sebastian Pop <sebastian.pop@amd.com>
4877 Dwarakanath Rajagopal <dwarak.rajagopal@amd.com>
4879 * graphite.c (scop_record_loop): Factor out one level of the
4880 condition by early return.
4881 (build_scop_loop_nests): Format following FSF coding style.
4882 (build_scop_dynamic_schedules): Factor out code.
4883 (scopdet_bb_info): Reindent. Default case should not be reachable.
4885 2008-08-20 Sebastian Pop <sebastian.pop@amd.com>
4886 Dwarakanath Rajagopal <dwarak.rajagopal@amd.com>
4888 * graphite.c (loop_affine_expr): Check for DECL_P or struct
4889 assignments that are not handled as simple operands for now.
4891 2008-08-20 Sebastian Pop <sebastian.pop@amd.com>
4892 Dwarakanath Rajagopal <dwarak.rajagopal@amd.com>
4894 * graphite.c (build_scop_bbs): Factor up code.
4896 2008-08-20 Sebastian Pop <sebastian.pop@amd.com>
4897 Dwarakanath Rajagopal <dwarak.rajagopal@amd.com>
4899 * graphite.c (stmt_simple_for_scop_p): Factor code out
4901 (enum gbb_type): New. Group all the GBB_* types under it.
4902 (is_loop_exit): Moved...
4903 (end_scop): Enable BB spliting.
4904 * cfgloop.c (is_loop_exit): ...here. Reimplemented.
4905 * cfgloop.h (is_loop_exit): Declared.
4907 2008-08-20 Sebastian Pop <sebastian.pop@amd.com>
4909 * doc/invoke.texi: Remove strides from examples containing
4910 DO loops when the strides are equal to 1.
4912 2008-08-20 Harsha Jagasia <harsha.jagasia@amd.com>
4913 Dwarakanath Rajagopal <dwarak.rajagopal@amd.com>
4915 * graphite.c (graphite_trans_scop_block): Or the result with
4916 the result from graphite_trans_loop_block.
4917 * testsuite/gcc.dg/graphite/block-1.c: New.
4918 * testsuite/gfortran.dg/graphite/block-1.f90: New.
4919 * testsuite/gfortran.dg/graphite/block-2.f: New.
4921 2008-08-20 Sebastian Pop <sebastian.pop@amd.com>
4923 * graphite.c (graphite_transform_loops): Call cloog_initialize
4926 2008-08-20 Sebastian Pop <sebastian.pop@amd.com>
4928 * tree-data-ref.c) (stmt_simple_memref_p): New.
4929 * tree-data-ref.h (stmt_simple_memref_p): Declared.
4930 * graphite.c (stmt_simple_memref_for_scop_p): Removed.
4931 (is_simple_operand): Call stmt_simple_memref_p.
4933 * testsuite/gcc.dg/graphite/scop-matmult.c: Updated for not
4934 using pointer arithmetic, as this is optimized by PRE and
4935 makes the code too difficult to analyze.
4937 * testsuite/gcc.dg/graphite/scop-18.c: Same.
4939 2008-08-20 Sebastian Pop <sebastian.pop@amd.com>
4941 * gdbinit.in (pgg): New.
4943 2008-08-15 Tobias Grosser <grosser@fim.uni-passau.de>
4945 * graphite.c (graphite_trans_loop_block): Fix warning.
4947 2008-08-15 Tobias Grosser <grosser@fim.uni-passau.de>
4949 * graphite.c (graphite_trans_loop_block): Fix my merge error.
4951 2008-08-15 Tobias Grosser <grosser@fim.uni-passau.de>
4953 * graphite.c (graphite_trans_bb_block): Remove check for
4954 flag_loop_strip_mine, flag_loop_block, flag_loop_interchange.
4955 Check if loop blocking is profitable for every loop, before applying
4957 (graphite_apply_transformations): Call graphite_trans_bb_block only,
4958 if flag_loop_block is set.
4960 2008-08-14 Sebastian Pop <sebastian.pop@amd.com>
4962 * graphite.c: Add some more documentation for the loop
4965 2008-08-14 Sebastian Pop <sebastian.pop@amd.com>
4967 * Makefile.in (tree-data-ref.o): Remove dependence on graphite.h.
4968 * graphite.c: Format on less than 80 columns.
4971 2008-08-14 Sebastian Pop <sebastian.pop@amd.com>
4973 * cfgloopmanip.c (loopify): Use update_dominators_in_loop.
4975 2008-08-14 Sebastian Pop <sebastian.pop@amd.com>
4977 * doc/invoke.texi (floop-block, floop-strip-mine,
4978 floop-interchange): Update documentation with examples.
4980 2008-08-13 Sebastian Pop <sebastian.pop@amd.com>
4982 * cfgloopmanip.c (create_empty_loop_on_edge): Don't call
4984 * graphite.c (graphite_create_new_loop): Call add_referenced_var.
4986 2008-08-13 Sebastian Pop <sebastian.pop@amd.com>
4988 * cfgloopmanip.c (create_empty_loop_on_edge): Improve documentation.
4989 Factor gcc_asserts into a single one. Use force_gimple_operand_gsi.
4990 * tree-scalar-evolution.c: Revert useless changes.
4991 * tree-phinodes.c: Same.
4994 * tree-vectorizer.h: Same.
4995 * tree-flow.h: Same.
4997 * common.opt (fgraphite): Update documentation.
4999 2008-08-12 Harsha Jagasia <harsha.jagasia@amd.com>
5001 * doc/invoke.texi (-floop-block, -floop-strip-mine,
5002 -floop-interchange): Add more text for explaining what each of these
5004 * tree-into-ssa.c (gimple_vec): Moved to...
5005 * graphite.c: Include gimple.h.
5006 (gimple_vec): Moved to...
5007 (del_loop_to_cloog_loop): Removed.
5008 (loop_affine_expr): Do not call create_data_ref when the
5009 operand is a constant.
5010 (new_scop): Use free instead of del_loop_to_cloog_loop.
5011 * Makefile.in (graphite.o): Depend on GIMPLE_H.
5012 * gimple.h (gimple_vec): ... here.
5014 2008-08-11 Tobias Grosser <grosser@fim.uni-passau.de>
5016 * graphite.c (scopdet_bb_info): Only allow loops with known number of
5018 (build_loop_iteration_domains): Fail, if latch executions unknown.
5020 2008-08-11 Tobias Grosser <grosser@fim.uni-passau.de>
5022 * graphite.c (add_conditions_to_domain): New.
5023 (build_scop_conditions_1): Call add_conditions_to_domain.
5024 (set_cloog_options): Allow to disable optimizations.
5026 2008-08-11 Tobias Grosser <grosser@fim.uni-passau.de>
5028 * graphite.c (find_params_in_bb): Look for parameters in conditions.
5029 Do not use walk_dominator_tree.
5030 (find_scop_parameters): Do not use walk_dominator_tree.
5032 2008-08-11 Tobias Grosser <grosser@fim.uni-passau.de>
5034 * graphite.c (scan_tree_for_params) Add / Subtract inequality.
5035 (idx_record_params): Adapt.
5036 * graphite.h (scop_gimple_loop_depth): New.
5038 2008-08-11 Tobias Grosser <grosser@fim.uni-passau.de>
5040 * graphite.c (build_scop_dynamic_schedules): Remove value_init.
5041 (scan_tree_for_params): Remove value_init.
5042 (build_scop_context): Remove value_init.
5043 (build_loop_iteration_domains): Remove value_init.
5044 (schedule_to_scattering): Remove value_init.
5045 (graphite_trans_bb_strip_mine): Remove value_init.
5047 2008-08-11 Tobias Grosser <grosser@fim.uni-passau.de>
5049 * gcc/graphite.c (limit_scops): New.
5050 (graphite_transform_loops): Add limit SCoPs.
5051 * gcc/testsuite/gcc.dg/graphite/scop-0.c: Update number of SCoPs.
5052 * gcc/testsuite/gcc.dg/graphite/scop-1.c: Update number of SCoPs.
5053 * gcc/testsuite/gcc.dg/graphite/scop-10.c: Update number of SCoPs.
5054 * gcc/testsuite/gcc.dg/graphite/scop-11.c: Update number of SCoPs.
5055 * gcc/testsuite/gcc.dg/graphite/scop-12.c: Update number of SCoPs.
5056 * gcc/testsuite/gcc.dg/graphite/scop-13.c: Update number of SCoPs.
5057 * gcc/testsuite/gcc.dg/graphite/scop-14.c: Update number of SCoPs.
5058 * gcc/testsuite/gcc.dg/graphite/scop-15.c: Update number of SCoPs.
5059 * gcc/testsuite/gcc.dg/graphite/scop-16.c: Update number of SCoPs.
5060 Change loop numbers.
5061 * gcc/testsuite/gcc.dg/graphite/scop-17.c: Update number of SCoPs.
5062 Change loop numbers.
5063 * gcc/testsuite/gcc.dg/graphite/scop-18.c: Update number of SCoPs.
5064 * gcc/testsuite/gcc.dg/graphite/scop-2.c: Update number of SCoPs.
5065 * gcc/testsuite/gcc.dg/graphite/scop-3.c: Update number of SCoPs.
5066 * gcc/testsuite/gcc.dg/graphite/scop-4.c: Update number of SCoPs.
5067 * gcc/testsuite/gcc.dg/graphite/scop-5.c: Update number of SCoPs.
5068 * gcc/testsuite/gcc.dg/graphite/scop-6.c: Update number of SCoPs.
5069 * gcc/testsuite/gcc.dg/graphite/scop-7.c: Update number of SCoPs.
5070 * gcc/testsuite/gcc.dg/graphite/scop-8.c: Update number of SCoPs.
5071 * gcc/testsuite/gcc.dg/graphite/scop-9.c: Update number of SCoPs.
5072 * gcc/testsuite/gcc.dg/graphite/scop-matmult.c: Update number of SCoPs.
5074 2008-08-11 Tobias Grosser <grosser@fim.uni-passau.de>
5076 * graphite.c (graphite_transform_loops): Call always find_transform.
5078 2008-08-08 Tobias Grosser <grosser@fim.uni-passau.de>
5080 * graphite.c (free_loops_mapping): New.
5081 (stmt_simple_for_scop_p): Fix typo.
5082 (stmt_simple_for_scop_p): Fix tuples functions, that
5084 (free_graphite_bb): Fix some memleaks.
5085 (free_scop): Fix some memleaks.
5086 (scopdet_bb_info): Do not forget some tmp SCoPs.
5087 (find_params_in_bb): Fix some memleaks.
5088 (clast_to_gcc_expression): Fix warning.
5090 2008-08-07 Tobias Grosser <grosser@fim.uni-passau.de>
5092 * testsuite/gcc.dg/graphite/scop-16.c: Fix for 32bit.
5093 * testsuite/gcc.dg/graphite/scop-17.c: Fix for 32bit.
5095 2008-08-04 Sebastian Pop <sebastian.pop@amd.com>
5097 * tree-ssa-loop.c (tree-ssa-loop.o): Do not include toplev.h.
5098 Move code ifdef-ed HAVE_cloog...
5099 * graphite.c: Include toplev.h.
5101 * Makefile.in (OBJS-common): Always build graphite.o.
5102 (BACKEND): Remove @GRAPHITE@.
5103 (tree-ssa-loop.o): Do not depend on TOPLEV_H.
5104 (graphite.o): Depend on TOPLEV_H.
5106 2008-08-04 Sebastian Pop <sebastian.pop@amd.com>
5108 * Makefile.in (tree-ssa-loop.o): Depend on TOPLEV_H.
5109 Remove typo left from polylib to ppl conversion.
5110 * graphite.c (graphite_transforms): Use sorry instead of fatal.
5112 2008-08-03 Sebastian Pop <sebastian.pop@amd.com>
5114 * toplev.c (process_options): Move the graphite loop optimization
5116 * tree-ssa-loop.c (graphite_transforms): ... here.
5117 When not configured with CLooG, print to dump_file that
5118 Graphite transforms were not performed.
5119 * testsuite/gcc.dg/graphite/graphite.exp (scan-graphite-dump-times):
5121 * testsuite/gcc.dg/graphite/*.c: Updated all testcases to use
5122 scan-graphite-dump-times.
5124 2008-08-03 Sebastian Pop <sebastian.pop@amd.com>
5126 * graphite.c (dot_scop, dot_all_scops): Do not call system.
5127 Do not open /tmp/scop.dot and /tmp/allscops.dot.
5129 2008-08-02 Sebastian Pop <sebastian.pop@amd.com>
5130 Jan Sjodin <jan.sjodin@amd.com>
5132 * configure: Regenerated.
5133 * omp-low.c (expand_omp_sections): Remove now unused code.
5134 * config.in (HAVE_polylib): Removed.
5135 * configure.ac (HAVE_polylib, POLYLIBLIBS, POLYLIBINC): Removed.
5136 (PPLLIBS, PPLINC): Added.
5137 * graphite.c: Replace unsigned with int wherever possible.
5138 Don't access Cloog's data structures, but use accessor functions.
5139 Clast's stmt->type is now implemented as a vtable: change the
5140 switches of stmt->type into ifs.
5141 (polylib/polylibgmp.h): Don't include.
5142 (initialize_dependence_polyhedron,
5143 initialize_data_dependence_polyhedron, is_empty_polyhedron,
5144 statement_precedes_p, test_dependence, build_rdg_all_levels,
5145 dump_dependence_graph): Removed until this code is cleaned up
5147 * Makefile.in (POLYLIBLIBS): Renamed PPLLIBS.
5148 (POLYLIBINC): Renamed PPLINC.
5150 2008-08-01 Harsha Jagasia <harsha.jagasia@amd.com>
5151 Dwarakanath Rajagopal <dwarak.rajagopal@amd.com>
5152 Jan Sjodin <jan.sjodin@amd.com>
5154 Finish the merge and tuplification of graphite.
5156 2008-07-24 Sebastian Pop <sebastian.pop@amd.com>
5157 Jan Sjodin <jan.sjodin@amd.com>
5159 Partial merge from mainline (138072:138275).
5160 * graphite.c still has to be tuplified.
5162 2008-07-29 Jan Sjodin <jan.sjodin@amd.com>
5164 * graphite.c (graphite_loops_mapping_max_loop_num): New.
5165 (create_num_from_index): New.
5166 (get_num_from_index): Also pass in the graphite BB.
5167 (free_graphite_bb): Free GBB_INDEX_TO_NUM_MAP.
5168 (build_graphite_bb): Initialize GBB_INDEX_TO_NUM_MAP.
5169 (graphite_trans_bb_strip_mine): Call create_num_from_index.
5170 (is_interchange_valid): Return false when failing.
5171 * graphite.h (struct num_map): New.
5172 (struct graphite_bb): New field num_map.
5173 (GBB_LOOPS_MAPPING): Renamed GBB_INDEX_TO_NUM_MAP.
5175 2008-07-29 Tobias Grosser <grosser@fim.uni-passau.de>
5177 * graphite.c (dump_gbb_conditions): Print also conditions like
5178 "if (a)". Remove dublicated code and use print_generic_expr ().
5179 (stmt_simple_for_scop_p): Only allow conditions we can handle
5182 2008-07-25 Jan Sjodin <jan.sjodin@amd.com>
5184 * graphite.h (struct scop): Removed new_ivs field.
5185 (SCOP_NEWIVS): Deleted.
5186 * graphite.c (new_scop, free_scop, clast_name_to_gcc,
5187 clast_to_gcc_expression, graphite_create_new_loop):
5188 Removed use of new_ivs.
5190 2008-07-25 Jan Sjodin <jan.sjodin@amd.com>
5192 * graphite.c (debug_oldivs, debug_loop_vec, create_loops_mapping,
5193 create_loops_mapping_num, debug_loop_mapping_1): New.
5194 (debug_loop_mapping): Call debug_loop_mapping_1.
5195 (get_loop_mapping_for_num,
5196 graphite_loops_mapping_add_child,
5197 graphite_loops_mapping_add_child_num,
5198 graphite_loops_mapping_insert_child,
5199 graphite_loops_mapping_parent,
5200 split_loop_mapped_depth_for_num,
5201 loop_mapped_depth_split_loop): New.
5202 (increment_loop_mapped_depths): Removed.
5203 (swap_loop_mapped_depth_for_num): Reimplemented.
5204 (new_scop): Call create_loops_mapping.
5205 (scop_record_loop): Call graphite_loops_mapping_insert_child.
5206 (translate_clast): Pass the old loop father in parameter, and pass
5207 it to get_old_iv_from_ssa_name.
5208 (remove_edges_around_useless_blocks, can_generate_code_stmt,
5209 can_generate_code, can_generate_for_scop): New.
5210 (graphite_trans_bb_block): Returns false when it fails to transform.
5211 * graphite.h (graphite_loop_node, graphite_loops_mapping): New.
5213 2008-07-25 Sebastian Pop <sebastian.pop@amd.com>
5215 Reverted all the changes related to the streamization and
5217 These changes are now tracked in the streamization branch.
5219 2008-07-25 Sebastian Pop <sebastian.pop@amd.com>
5220 Jan Sjodin <jan.sjodin@amd.com>
5222 * graphite.c (gbb_compare): Correctly constify.
5223 (gbb_can_be_ignored): Indent.
5224 (graphite_trans_scop_swap_1and2): Add legality check.
5227 2008-07-25 Sebastian Pop <sebastian.pop@amd.com>
5229 Remove fallouts from "Reverted the Condate changes".
5230 * tree.h: Remove unused decl.
5231 * testsuite/gcc.dg/tree-checker: Same.
5232 * timevar.def: Remove counter.
5234 2008-07-24 Sebastian Pop <sebastian.pop@amd.com>
5236 * Merge from mainline (135673:138072).
5238 Reverted the MIRO changes (from 2008-04-05) that are now
5239 tracked in the miro branch.
5240 * tree-bounds.c: Removed.
5241 * tree-bounds.h: Removed.
5243 Reverted the Condate changes (from 2006-07-04, 2007-03-20) that
5244 are now tracked in the condate branch.
5245 * tree-check.c: Removed.
5246 * tree-match.c: Removed.
5247 * condate.y: Removed.
5249 2008-07-24 Dwarakanath Rajagopal <dwarak.rajagopal@amd.com>
5251 * common.opt: New user flag -floop-block, -floop-strip-mine
5252 and -floop-interchange.
5253 * toplev.c (process_options): Enable -fgraphite pass if any one of the
5254 graphite loop optimization flags is turned on.
5255 * graphite.c (graphite_apply_transformations): Add flag_loop_block,
5256 flag_loop_strip_mine and flag_loop_interchange checks before
5258 * doc/invoke.texi: Remove -fgraphite and add -floop-block,
5259 -floop-strip-mine and -floop-interchange.
5260 * testsuite/gcc.dg/graphite/block-0.c: Add -floop-block and remove
5262 * testsuite/gcc.dg/graphite/scop-16.c: Ditto.
5263 * testsuite/gcc.dg/graphite/scop-17.c: Ditto.
5264 * testsuite/gcc.dg/graphite/scop-18.c: Ditto.
5266 2008-07-23 Jan Sjodin <jan.sjodin@amd.com>
5267 Sebastian Pop <sebastian.pop@amd.com>
5269 * cfgloopmanip.c (update_dominators_in_loop): Make it static.
5270 (create_empty_loop_on_edge): More fixes.
5271 * tree-phinodes.c (resize_phi_node): Extern.
5272 (unlink_phi_node, move_phi_node): New split from remove_phi_node.
5273 * cfghooks.c (update_dominator_information): New split from
5275 * tree-vectorizer.c (rename_variables_in_bb): Extern.
5276 * tree-dfa.c (collect_dfa_stats): Start walking the CFG on the
5277 successor of the function entry block.
5279 * graphite.c: Include pointer-set.h.
5280 (debug_loop_mapping, increment_loop_mapped_depths,
5281 get_loop_mapped_depth_for_num, get_loop_mapped_depth,
5282 set_loop_mapped_depth_for_num, set_loop_mapped_depth,
5283 swap_loop_mapped_depth_for_num, get_num_from_index,
5284 swap_loop_mapped_depth, loop_iv_stack_debug,
5285 loop_iv_stack_push, loop_iv_stack_pop, loop_iv_stack_get_iv,
5286 loop_iv_stack_get_iv_from_name, loop_iv_stack_debug,
5287 get_old_iv_from_ssa_name): New.
5288 (new_scop): Initialize SCOP_LOOPS_MAPPING.
5289 (free_scop): Free SCOP_LOOPS_MAPPING.
5290 (scop_record_loop): Record old ivs.
5291 (create_var_name): Removed.
5292 (initialize_cloog_names): Allocate double space in case strip mine
5293 applies to all loops once.
5294 (clast_name_to_gcc): Look up in the map ivstack passed in parameter.
5295 (clast_to_gcc_expression): Same. Implement more clast to gimple
5297 (graphite_create_new_loop): Pass in ivstack.
5298 (remove_all_edges): Pass in the construction_edge.
5299 (graphite_remove_iv): Removed.
5300 (graphite_rename_ivs, graphite_rename_ivs_stmt,
5301 remove_cond_exprs): Rewritten.
5302 (move_phi_nodes): New.
5303 (disconnect_virtual_phi_nodes, disconnect_cond_expr): Removed.
5304 (translate_clast): Pass in ivstack. Rewrite some cases.
5305 (set_cloog_options, debug_clast_stmt): New.
5306 (find_transform): Use set_cloog_options.
5307 (outermost_loop_layer): Removed.
5308 (get_construction_edge, collect_virtual_phis, find_vdef_for_var_in_bb,
5309 find_vdef_for_var_1, find_vdef_for_var, patch_phis_for_virtual_defs,
5310 mark_old_loops, remove_dead_loops): New.
5312 (graphite_trans_bb_move_loop): Call swap_loop_mapped_depth.
5313 (const_column_index, get_first_matching_sign_row_index,
5314 get_lower_bound_row, get_upper_bound_row, get_lower_bound,
5315 get_upper_bound): New.
5316 (graphite_trans_bb_strip_mine): Also update the iv map.
5318 * graphite.h (graphite_loops_mapping, GBB_LOOPS_MAPPING): New.
5319 (struct name_tree): Add a loop field.
5320 (struct scop): Add a graphite_loops_mapping field.
5321 (SCOP_LOOPS_MAPPING): New.
5322 (debug_clast_stmt): Declare.
5323 * lambda.h (find_induction_var_from_exit_cond): Declare.
5324 (lambda-code.c): (find_induction_var_from_exit_cond): Extern.
5325 * cfgloop.h (update_dominators_in_loop): Removed declaration.
5326 (create_empty_loop_on_edge): Updated.
5327 * tree-flow.h (remove_bb, resize_phi_node, move_phi_node,
5328 rename_variables_in_bb): Declare.
5329 * tree-cfg.c (remove_bb): Extern.
5331 * testsuite/gcc.dg/graphite/block-0.c: New.
5333 2008-07-21 Dwarakanath Rajagopal <dwarak.rajagopal@amd.com>
5334 Sebastian Pop <sebastian.pop@amd.com>
5336 * graphite.c (strip_mine_profitable_p): New.
5337 (graphite_trans_bb_block): Disable strip mining if not profitable.
5339 * testsuite/gcc.dg/graphite/scop-18.c: New.
5340 * testsuite/gcc.dg/graphite/scop-17.c: Fixed.
5341 * testsuite/gcc.dg/graphite/scop-16.c: Fixed.
5343 2008-07-17 Harsha Jagasia <harsha.jagasia@amd.com>
5344 Jan Sjodin <jan.sjodin@amd.com>
5345 Sebastian Pop <sebastian.pop@amd.com>
5347 * graphite.c (is_interchange_valid): New.
5348 (graphite_trans_bb_block): Check loop nest of basic block for legality
5351 * graphite.h (gbb_inner_most_loop_index, outer_most_loop_1,
5352 outer_most_loop, gbb_outer_most_loop_index): New.
5354 * tree-loop-linear.c (perfect_loop_nest_depth): Remove static.
5355 * tree-flow.h (perfect_loop_nest_depth): Declare as extern.
5356 * testsuite/gcc.dg/graphite/scop-16.c: New.
5357 * testsuite/gcc.dg/graphite/scop-17.c: New.
5359 2008-07-11 Tobias Grosser <grosser@fim.uni-passau.de>
5361 * graphite.c (scop_remove_ignoreable_gbbs): Also update bitmap.
5362 (graphite_trans_scop_block): Ignore SCoPs without bbs.
5364 2008-07-11 Tobias Grosser <grosser@fim.uni-passau.de>
5366 * graphite.c (new_scop): Initialize SCOP_EXIT.
5367 (scopdet_info): Add.
5368 (scopdet_bb_info): Rename from is_bb_addable. Cleanup, bugfixes.
5369 (build_scops_1): Cleanup, bugfixes.
5370 (build_scops): Cleanup.
5372 * testsuite/gcc.dg/graphite/scop-matmult.c: Remove duplicated code.
5373 * testsuite/gcc.dg/graphite/scop-15.c: Add SCoP numbers.
5375 2008-07-10 Harsha Jagasia <harsha.jagasia@amd.com>
5377 * testsuite/gfortran.dg/graphite/scop-1.f: Update to reduced test case.
5379 * testsuite/gfortran.dg/graphite/graphite.exp: Use
5380 DEFAULT_GRAPHITE_FLAGS.
5382 * testsuite/gcc.dg/graphite/scop-15.c: Update to reduced test case.
5384 2008-07-10 Harsha Jagasia <harsha.jagasia@amd.com>
5386 * graphite.c (scan_tree_for_params): Do not assert any more if
5387 MULT_EXPR parameter is negative.
5389 * testsuite/gfortran.dg/graphite/scop-1.f: New.
5391 * testsuite/gfortran.dg/graphite/graphite.exp: New.
5393 * testsuite/gcc.dg/graphite/scop-15.c: New.
5395 2008-07-10 Harsha Jagasia <harsha.jagasia@amd.com>
5397 * graphite.c (is_bb_addable): Fix segfault in spec gzip and reformat.
5399 2008-07-10 Tobias Grosser <grosser@fim.uni-passau.de>
5401 * graphite.c (graphite_trans_bb_swap_loops): Rename from
5402 graphite_swap_loops.
5403 (graphite_trans_bb_move_loop): New.
5404 (graphite_trans_bb_strip_mine): Rename from graphite_strip_mine_loop.
5405 (graphite_trans_bb_block): New.
5406 (graphite_trans_loop_block): New.
5407 (graphite_trans_scop_swap_1and2): Rename from
5408 graphite_trans_swap_1and2.
5409 (graphite_trans_scop_strip): Rename from graphite_trans_strip.
5410 (graphite_trans_scop_block): New.
5411 (graphite_apply_transformations): Rename from
5412 graphite_transformations.
5414 * testsuite/gcc.dg/graphite/scop-matmult.c: New.
5416 2008-07-10 Tobias Grosser <grosser@fim.uni-passau.de>
5418 * graphite.c (gbb_compare): New.
5419 (graphite_sort_gbbs): New.
5420 (gbb_can_be_ignored): New.
5421 (scop_remove_ignoreable_gbbs): New.
5422 (graphite_transformations): Cleanup and add
5423 scop_remove_ignoreable_gbbs.
5424 * lambda.h (lambda_vector_compare): New.
5426 2008-07-09 Tobias Grosser <grosser@fim.uni-passau.de>
5428 * graphite.c (print_graphite_bb): Correct printing of static schedule.
5429 (graphite_swap_loops): int -> unsigned
5430 (graphite_strip_mine_loop): int -> unsigned, Fix SCHEDULE
5431 (graphite_transformations): New.
5432 (graphite_transform_loops): Move to graphite_transformations.
5433 * graphite.h (gbb_nb_loops): Return unsigned.
5435 2008-07-04 Tobias Grosser <grosser@fim.uni-passau.de>
5437 * graphite.c (scan_tree_for_params): Fix insertion of parameters into
5438 the domain matrix. This makes scop-0.c work again.
5440 2008-06-20 Richard Guenther <rguenther@suse.de>
5442 * graphite.h: Adjust copyright to GPLv3.
5443 * graphite.c: Likewise.
5444 (stmt_simple_memref_for_scop_p): Split out from ...
5445 (stmt_simple_for_scop_p): ... here. Fix handling of calls
5447 (get_bb_type): Optimize.
5449 (is_bb_addable): Fix memleak, replace is_pred call with
5451 (build_scops): Use current_loops.
5452 (param_index): Fix memleak.
5454 2008-06-20 Konrad Trifunovic <konrad.trifunovic@inria.fr>
5456 * graphite.c: Fix formatting.
5458 2008-06-19 Konrad Trifunovic <konrad.trifunovic@inria.fr>
5460 * graphite.c (new_scop): Memory allocation for SCOP_{NEWIVS, OLDIVS}.
5461 (free_scop): Memory deallocation for SCOP_NEWIVS, SCOP_OLDIVS.
5462 (create_var_name, save_var_name): Newly defined functions.
5463 (initialize_cloog_names): Part of the code factored out to
5465 (clast_to_gcc_expression): Now handles the case of clast_red_sum
5466 in clast_reduction statement.
5467 (graphite_create_new_loop): Now takes a new parameter
5469 (translate_clast): Now also takes the context_loop and bb_exit
5470 parameters. Rewritten the code so that it creates a gimple code
5471 inside the given context.
5472 (outermost_loop_layer, graphite_remove_iv, graphite_rename_ivs,
5473 remove_cond_expr, disconnect_cond_expr,
5474 disconnect_virtual_phi_nodes): Newly defined functions.
5475 * graphite.h (struct scop): added old_ivs vector.
5476 SCOP_OLDIVS: New macro.
5478 2008-06-19 Sebastian Pop <sebastian.pop@amd.com>
5480 * cfgloopmanip.c: Add missing function comments, fix formatting.
5482 2008-06-18 Konrad Trifunovic <konrad.trifunovic@inria.fr>
5484 * cfgloopmanip.c (update_dominators_in_loop): Defined.
5485 (create_empty_loop_on_edge): Defined.
5486 * tree-parloops.c (canonicalize_loop_ivs): Returns tree
5488 * cfgloop.h (create_empty_loop_on_edge): Declared as extern.
5489 (update_dominators_in_loop): Declared as extern
5490 * tree-flow.h (canonicalize_loop_ivs): Declared as extern.
5492 2008-06-16 Tobias Grosser <grosser@fim.uni-passau.de>
5494 * graphite.c (print_graphite_bb): Allow changing number of loops
5496 (initialize_cloog_names): Allow changing number of loops.
5497 (build_cloog_prog): Simplify.
5498 (find_transform): Enable cloog option --strides.
5499 (graphite_swap_loops): New.
5500 (graphite_strip_mine_loop): New.
5501 (graphite_trans_swap_1and2): New.
5502 (graphite_trans_strip): New.
5503 (graphite_transform_loops): Add graphite_trans_strip.
5504 * graphite.h (scop_max_loop_depth): New.
5506 2008-06-15 Tobias Grosser <grosser@fim.uni-passau.de>
5508 * graphite.c (build_scop_iteration_domain): Remove forgotten
5509 line. (Fixes compile)
5511 2008-06-15 Tobias Grosser <grosser@fim.uni-passau.de>
5513 * graphite.c (print_graphite_bb): Add output of GBB_LOOPS.
5514 (build_graphite_bb): Add GBB_LOOPS and GBB_DOMAIN and reorder.
5515 (build_bb_loops): New.
5516 (graphite_transform_loops): Add build_bb_loops.
5517 (schedule_to_scattering): Use gbb_nb_loops to support changing loop
5519 * graphite.h (graphite_bb): Add loops.
5520 (gbb_nb_loops): New.
5521 (gbb_loop_at_index): New.
5522 (gbb_loop_index): New.
5523 (nb_params_in_scop): Renamed to scop_nb_params. Updated all functions
5524 using nb_params_in_scop.
5526 2008-06-14 Tobias Grosser <grosser@fim.uni-passau.de>
5528 * graphite.c (print_graphite_bb): Adapt to minimized schedule.
5529 (build_scop_canonical_schedules): Build minimized schedule.
5530 (schedule_to_scattering): Adapt to minimized schedule.
5531 * graphite.h (graphite_bb): Add/Update descriptions.
5533 2008-06-14 Adrien Eliche <aeliche@isty.uvsq.fr>
5534 Tobias Grosser <grosser@fim.uni-passau.de>
5536 * graphite.c (print_graphite_bb): Add condition printing.
5538 (dump_gbb_conditions): New.
5539 (build_scop_conditions_1): New.
5540 (build_scop_conditions): New.
5541 * graphite.h (graphite_bb): Add conditions.
5543 2008-06-14 Tobias Grosser <grosser@fim.uni-passau.de>
5545 * graphite.c (print_graphite_bb):
5546 (free_graphite_bb): New.
5547 (free_scop): Free bbs.
5548 (get_bb_type): Free doms.
5549 (build_scop_context): Free context matrix.
5550 (build_loop_iteration_domains): Remove unused code.
5551 (build_cloog_prog): Free scattering function and blocklist.
5552 (find_transform): Free options.
5554 2008-06-13 Tobias Grosser <grosser@fim.uni-passau.de>
5556 * graphite.c (loop_body_to_cloog_stmts): Rename to add_bb_domains.
5557 Remove unnecessery cloog data structures. Make a copy of the domain
5558 (setup_cloog_loop): Rename to build_loop_iteration_domains. Remove
5559 unnecessary cloog data structures. Fix memory leaks. Remove insert
5560 into SCOP_LOOP2CLOOG_LOOP as the inserted CloogLoops will never be
5562 (build_scop_iteration_domain): Remove unnecessary cloog
5563 data structures. Fix memory leaks.
5564 (graphite_transform_loops): Disable build_scop_dynamic_schedules as it
5565 uses SCOP_LOOP2CLOOG_LOOP, that is at the moment not working.
5567 2008-06-12 Tobias Grosser <grosser@fim.uni-passau.de>
5569 * graphite.c (find_scop_params): Remove initialize_cloog_names.
5571 2008-06-12 Tobias Grosser <grosser@fim.uni-passau.de>
5573 * graphite.c (end_scop): Style fix.
5574 (schedule_to_scattering): Style and comment fix.
5576 2008-06-12 Tobias Grosser <grosser@fim.uni-passau.de>
5577 * graphite.c (print_graphite_bb): Fix definiton of
5578 schedule_to_scattering.
5579 (initialize_cloog_names): Change nb_scattdims to max loop
5581 (schedule_to_scattering): Take parameter for number of scattering
5583 (build_cloog_prog): Only build as much scattering dimensions as
5586 2008-06-12 Tobias Grosser <grosser@fim.uni-passau.de>
5588 * graphite.c (end_scop): Disable bb splitting. Fixes SIGSEGV
5589 in polyhedron/aermod.f90.
5591 2008-06-11 Tobias Grosser <grosser@fim.uni-passau.de>
5592 Dwarak Rajagopal <dwarak.rajagopal@amd.com>
5593 Harsha Jagasia <harsha.jagasia@amd.com>
5595 * graphite.c (is_bb_addable): Fix segfault.
5597 2008-06-10 Tobias Grosser <grosser@fim.uni-passau.de>
5599 * graphite.c (is_bb_addable): Fix memory leak, handling of loops
5600 with multiple exits and conditional handling in edge cases.
5601 (is_loop_exit): Fix memory leak. (Forgotten in last commit)
5603 * testsuite/gcc.dg/graphite/scop-14.c: New.
5605 2008-06-06 Tobias Grosser <grosser@fim.uni-passau.de>
5606 Adrien Eliche <aeliche@isty.uvsq.fr>
5608 * graphite.c (is_bb_addable): Add more comments and enhance
5609 readablity of the source code. Fix memory leak.
5610 (is_loop_exit): Fix memory leak.
5612 2008-06-05 Tobias Grosser <grosser@fim.uni-passau.de>
5614 * graphite.c (first_loop_in_scop): Deleted.
5615 (setup_cloog_loop): Only walk the loop chain for inner loops.
5616 (build_scop_iteration_domain): Execute setup_cloog_loop for
5617 all loops in the first layer.
5619 2008-06-05 Tobias Grosser <grosser@fim.uni-passau.de>
5621 * graphite.c (scan_tree_for_params): Change the way params are
5622 added to be indepenent of the number of loops.
5623 (setup_cloog_loop): Revert to short matrix format. Fix parameter
5625 (build_cloog_prog): Revert to short matrix format.
5627 2008-06-05 Sebastian Pop <sebastian.pop@amd.com>
5628 Dwarak Rajagopal <dwarak.rajagopal@amd.com>
5630 * tree-loop-fusion.c (fuse_loops): Fix uninitialized variable
5633 2008-06-05 Sebastian Pop <sebastian.pop@amd.com>
5635 * graphite.c (nb_data_refs_in_scop): New.
5636 (graphite_transform_loops): Print more stats: number of
5637 loops, basic blocks and data references per scop.
5639 2008-06-04 Sebastian Pop <sebastian.pop@amd.com>
5640 Jan Sjodin <jan.sjodin@amd.com>
5642 * graphite.c (loop_affine_expr, idx_record_params,
5643 find_scop_parameters, setup_cloog_loop): Use instantiate_scev
5644 instead of instantiate_parameters.
5646 2008-06-04 Tobias Grosser <grosser@fim.uni-passau.de>
5648 * graphite.c (schedule_to_scattering): Fix scattering dimensions,
5649 add support for parameters, add STATIC_SCHEDULE at the right places,
5652 2008-06-04 Tobias Grosser <grosser@fim.uni-passau.de>
5654 * graphite.c (build_scop_loop_nests): Only add the loops, that
5655 are contained completely in the SCoP.
5656 (build_cloog_prog): Disable scattering, until schedule_to_scattering
5657 and the domains are fixed.
5658 (build_scop_canonical_schedules): Add support for bbs not contained
5661 2008-06-04 Tobias Grosser <grosser@fim.uni-passau.de>
5663 * graphite.h (scop_contains_loop): Update comments to match
5664 the actual behavior.
5665 (scop_contains_loop): New.
5666 * graphite.c (schedule_to_scattering): Use scop_contains_loop.
5668 2008-06-04 Sebastian Pop <sebastian.pop@amd.com>
5670 * graphite.c (get_bb_type): On function body, i.e. loop_0,
5671 don't mark blocks as GBB_LOOP_SING_EXIT_HEADER, mark them
5674 2008-06-04 Sebastian Pop <sebastian.pop@amd.com>
5675 Tobias Grosser <grosser@fim.uni-passau.de>
5677 * graphite.c (graphite_transform_loops): Early return when
5678 there are no loops in the function.
5680 2008-05-31 Sebastian Pop <sebastian.pop@amd.com>
5681 Jan Sjodin <jan.sjodin@amd.com>
5683 * graphite.c (scan_tree_for_params, setup_cloog_loop): Compute the
5684 offset of the last loop.
5685 (setup_cloog_loop): Copy the entire outer constraint matrix.
5687 2008-05-31 Sebastian Pop <sebastian.pop@amd.com>
5688 Jan Sjodin <jan.sjodin@amd.com>
5690 * graphite.c (stmt_in_scop_p, function_parameter_p,
5691 invariant_in_scop_p): Removed.
5692 (scan_tree_for_params): Can be used with no constraint
5693 matrix for gathering parameters.
5694 (idx_record_params): Don't use idx_record_param, instead use
5695 scan_tree_for_params.
5696 (find_scop_parameters): Same.
5697 (setup_cloog_loop, build_scop_iteration_domain, build_cloog_prog):
5698 Fix the size of loop domains.
5699 (schedule_to_scattering): Exit when the outer loop is not in scop.
5700 (find_transform): Enable build_cloog_prog.
5702 2008-05-31 Sebastian Pop <sebastian.pop@amd.com>
5703 Jan Sjodin <jan.sjodin@amd.com>
5705 * graphite.c (schedule_to_scattering): Make scattering domains
5706 uniformly of the same size, as required by CLooG 0.14.0 and before.
5708 2008-05-31 Sebastian Pop <sebastian.pop@amd.com>
5709 Jan Sjodin <jan.sjodin@amd.com>
5711 * graphite.c (schedule_to_scattering): Rewrite, correct the
5712 translation of the scheduling function to scattering.
5713 (build_cloog_prog): Call schedule_to_scattering only once.
5714 * graphite.h (scop_loop_index): Do not fail for loops not
5715 in the scop: return -1.
5717 2008-05-30 Tobias Grosser <grosser@fim.uni-passau.de>
5719 * graphite.c (build_graphite_bb): Initialize GBB_DOMAIN.
5720 (loop_body_to_cloog_stmts): Export GBB_DOMAIN.
5721 (setup_cloog_loop): Export GBB_DOMAIN.
5722 (build_cloog_prog): New. Create new CLOOG_PROG, which should be
5723 able to rebuild the original control flow.
5724 * graphite.h (graphite_bb): Add domain field and access macro.
5727 2008-05-30 Sebastian Pop <sebastian.pop@amd.com>
5729 * graphite.c (debug_gbb): New.
5730 (print_scop, build_graphite_bb): Use SCOP_BBS.
5731 (build_scop_bbs): Reimplemented.
5732 (dfs_bb_in_scop_p): Removed.
5733 (build_scop_loop_nests): Reorder loops inserted in
5734 SCOP_LOOP_NEST: outer loops should come first.
5735 (build_scop_canonical_schedules): Reinitialize at zero
5736 the components of the SCOP_STATIC_SCHEDULE for the loops
5737 that have already been parsed.
5739 * graphite.h (debug_gbb): Declared.
5741 2008-05-30 Sebastian Pop <sebastian.pop@amd.com>
5742 Jan Sjodin <jan.sjodin@amd.com>
5744 * graphite.c (create_empty_loop): Renamed graphite_create_new_loop.
5745 (graphite_loop_to_gcc_loop): Removed.
5746 (remove_all_edges): New.
5747 (graphite_stmt_to_gcc_stmt): Renamed translate_clast.
5748 (gloog): Remove useless code.
5750 2008-05-29 Tobias Grosser <grosser@fim.uni-passau.de>
5752 * graphite.c (get_bb_type): Reworked. We distinguish between
5753 loops with one or multiple exits.
5754 (is_loop_exit): New.
5756 (is_bb_addable): Rework condition handling, now support for case
5757 case statements and loops with multiple exits.
5759 * testsuite/gcc.dg/graphite/scop-11.c: New.
5760 * testsuite/gcc.dg/graphite/scop-12.c: New.
5761 * testsuite/gcc.dg/graphite/scop-13.c: New.
5763 2008-05-29 Tobias Grosser <grosser@fim.uni-passau.de>
5765 * graphite.c (dot_all_scops_1): Fix some colors. Reuse colors, if
5766 we have too many colors.
5768 2008-05-22 Sandeep Maram <smaram_b04@iiita.ac.in>
5770 * doc/invoke.texi (-ftree-loop-fusion): Document.
5771 * tree-pass.h (pass_loop_fusion): Declared.
5772 * tree-loop-fusion.c: New.
5773 * timevar.def (TV_TREE_LOOP_FUSION): Declared.
5774 * tree-data-ref.c (find_data_references_in_loop): Make extern.
5775 * tree-data-ref.h (find_data_references_in_loop): Declared.
5776 * common.opt (ftree-loop-fusion): Declared.
5777 * Makefile.in (tree-loop-fusion.o): Added rule and to OBJS-common.
5779 2008-05-21 Sebastian Pop <sebastian.pop@amd.com>
5781 * graphite.c (build_access_matrix): Fix typo from the merge.
5783 2008-05-20 Sebastian Pop <sebastian.pop@amd.com>
5785 * Merge from mainline (130800:135673).
5787 2008-05-07 Sebastian Pop <sebastian.pop@amd.com>
5789 * graphite.c (end_scop): The exit of the scop is not part of the scop.
5790 Update dominators after splitting.
5792 2008-05-07 Sebastian Pop <sebastian.pop@amd.com>
5794 * graphite.c (is_bb_addable): Return the harmful statement.
5795 Factor up some code.
5796 (end_scop): New. Splits end of scope bbs on a harmful statement.
5797 (build_scops_1): Call end_scop.
5799 2008-05-07 Sebastian Pop <sebastian.pop@amd.com>
5801 * graphite.c: (succs_at_same_depth, end_scop, all_preds_visited_p,
5802 all_succs_visited_p, start_new_scop_for_each_succ, start_new_scop,
5803 add_dominators_to_open_scops, stop_last_open_scop, scop_end_loop,
5804 build_scops_1): Removed.
5805 (build_scops_2): Renamed build_scops_1.
5807 2008-05-06 Sebastian Pop <sebastian.pop@amd.com>
5809 * graphite.c: Fix formatting.
5811 2008-05-06 Tobias Grosser <grosser@fim.uni-passau.de>
5813 * graphite.c (get_bb_type): New.
5815 (build_scops_2): New.
5816 (is_bb_addable): New.
5817 (build_scops): Switch the scop detection.
5818 (build_scop_bbs): Add entry bb to scop.
5819 * graphite.h (struct scop): Update comment.
5821 2008-05-06 Tobias Grosser <grosser@fim.uni-passau.de>
5823 * graphite.c (dot_all_scops_1): Fix some incorrect colors and add
5826 2008-05-06 Tobias Grosser <grosser@fim.uni-passau.de>
5828 * testsuite/gcc.dg/graphite/scop-1.c: Update.
5829 * testsuite/gcc.dg/graphite/scop-2.c: Update.
5830 * testsuite/gcc.dg/graphite/scop-4.c: Update.
5831 * testsuite/gcc.dg/graphite/scop-5.c: Add.
5832 * testsuite/gcc.dg/graphite/scop-6.c: Add.
5834 2008-05-06 Sebastian Pop <sebastian.pop@amd.com>
5836 * testsuite/gcc.dg/graphite/scop-0.c: Add.
5837 * testsuite/gcc.dg/graphite/scop-7.c: Add.
5838 * testsuite/gcc.dg/graphite/scop-8.c: Add.
5839 * testsuite/gcc.dg/graphite/scop-9.c: Add.
5840 * testsuite/gcc.dg/graphite/scop-10.c: Add.
5842 2008-05-06 Tobias Grosser <grosser@fim.uni-passau.de>
5844 * graphite.c (scop_affine_expr): Renamed to loop_affine_expr.
5845 Check affine expressions depending on the outermost loop
5847 (stmt_simple_for_scop_p): Same.
5848 (harmfule_stmt_in_scop): Same.
5850 2008-04-28 Tobias Grosser <grosser@fim.uni-passau.de>
5852 * graphite.c (dot_all_scops): Remove incorrect difficult bb coloring,
5853 mark entry and exit, that are not part of the SCoP and update HTML
5856 2008-04-25 Sebastian Pop <sebastian.pop@amd.com>
5858 * graphite.c (basic_block_simple_for_scop_p): Renamed
5860 (save_scop, preds_at_same_depth, test_for_scop_bound): Removed.
5861 (add_dominators_to_open_scops, build_scops_1): Reimplemented.
5862 (all_preds_visited_p, all_succs_visited_p,
5863 start_new_scop_for_each_succ, start_new_scop, stop_last_open_scop,
5864 scop_end_loop): New.
5865 (build_scops): Do not use dfs_enumerate_from.
5867 * testsuite/gcc.dg/graphite/scop-{1,2,4}.c: Updated.
5869 2008-04-23 Sebastian Pop <sebastian.pop@amd.com>
5871 * graphite.c: Add comments to functions that are missing a
5873 (graphite_create_iv): Removed. Merged in graphite_loop_to_gcc_loop.
5875 2008-04-23 Sebastian Pop <sebastian.pop@amd.com>
5877 * graphite.c (nb_params_in_scop): Moved...
5878 (graphite_bb_from_bb, loop_body_to_cloog_stmts): New.
5879 (setup_cloog_loop): Call loop_body_to_cloog_stmts.
5880 (clast_to_gcc_expression): Reduce column size to less than 80.
5881 (graphite_create_iv): Return the new name of the IV.
5882 (find_transform): Set options->esp and options->cpp.
5883 (gloog): Comment out the invalidation of the old loop code.
5884 (initialize_dependence_polyhedron): Replace scop_nb_params with
5887 * graphite.h (nb_params_in_scop): ... here.
5888 (scop_nb_params): Removed.
5889 (loop_domain_dim): Return something even when the loop was not
5890 found in the hash table: avoid ICEing on all the graphite.exp
5893 2008-04-14 Konrad Trifunovic <konrad.trifunovic@inria.fr>
5895 * tree-chrec.c (for_each_scev_op): SCEV can have 3 operands.
5897 * graphite.c (build_scop_dynamic_schedules): Schedule is built
5898 according to nesting level.
5899 (find_scop_parameters): Call instantiate_parameters.
5900 (scan_tree_for_params): Extend it to handle general affine bounds.
5901 Inner loop bound can depend on outer loop induction variable.
5902 (setup_cloog_loop): tmp variable is allocated on stack. Call
5903 instantiate_parameters with respect to outermost_loop_in_scop.
5904 (loop_domain_dim, ref_nb_loops, loop_iteration_vector_dim): moved to
5906 (create_empty_loop): Function loopify should be given edge
5907 probability, instead of edge frequency. Dominance relation from
5908 switch_bb to loop_header.
5909 (clast_to_gcc_expression): Added handling of clast_reduction node.
5910 (gloog): New functionality for removing old loop.
5911 (test_dependence): Factored out from build_rdg_all_levels.
5912 (build_rdg_all_levels): Dependence testing factored out to
5913 test_dependence function.
5915 * graphite.h (struct graphite_bb): Extended with dynamic_schedule.
5916 (loop_domain_dim, ref_nb_loops, loop_iteration_vector_dim): Moved
5919 2008-04-07 Sebastian Pop <sebastian.pop@amd.com>
5921 * graphite.c (free_scop, param_index, initialize_cloog_names,
5922 nb_params_in_scop): Use name_tree map instead of just a tree
5923 for keeping track of the variable name associated to that tree.
5924 (create_empty_loop, gmp_cst_to_tree, clast_name_to_gcc,
5925 clast_to_gcc_expression, graphite_create_iv,
5926 graphite_loop_to_gcc_loop, graphite_cond_to_gcc_cond,
5927 graphite_stmt_to_gcc_stmt): New.
5928 (gloog): Call these.
5929 * graphite.h (struct name_tree): New.
5930 (struct scop): Use name_tree instead of tree for params.
5931 Store a vector of name_tree for new_ivs.
5933 (scop_nb_params): Use name_tree instead of tree.
5935 2008-04-05 Alexander Lamaison <awl03@doc.ic.ac.uk>
5936 Sebastian Pop <sebastian.pop@amd.com>
5938 * tree-bounds.c: New.
5939 * tree-bounds.h: New.
5940 * tree-pass.h: Declare pass_bounds_early and pass_bounds_late.
5941 * passes.c: Schedule pass_bounds_early, pass_bounds_late.
5942 * builtins.c (expand_builtin_alloca): Add flag_bounds as for
5946 * c-cppbuiltin.c: Same.
5950 * tree-outof-ssa.c: Same.
5952 * Makefile.in: Same.
5954 2008-03-15 Antoniu Pop <antoniu.pop@gmail.com>
5955 Sebastian Pop <sebastian.pop@amd.com>
5957 * tree-loop-distribution.c (remaining_stmts,
5958 upstream_mem_writes): Removed static variables.
5959 (copy_loop_before, create_bb_after_loop,
5960 mark_nodes_having_upstream_mem_writes, free_rdg_components,
5961 rdg_build_components, rdg_build_partitions,
5962 dump_rdg_partitions): Extern.
5963 (generate_loops_for_partition, generate_code_for_partition): Do not
5965 (already_processed_vertex_p, predecessor_has_mem_write,
5966 mark_nodes_having_upstream_mem_writes, has_upstream_mem_writes,
5967 rdg_flag_all_uses, rdg_flag_uses, rdg_flag_vertex_and_dependent,
5968 rdg_flag_loop_exits, rdg_flag_similar_memory_accesses,
5969 build_rdg_partition_for_component, rdg_build_partitions, ldist_gen):
5970 Pass remaining_stmts and upstream_mem_writes as parameters.
5971 (rdg_component): Moved...
5972 (build_rdg_partition_for_component): Do not aggregate components when
5973 flag_streamize_loops is set.
5974 (gen_sequential_loops): New.
5975 (ldist_gen): Call gen_sequential_loops.
5977 * tree-pass.h (pass_loop_streamization): Declared.
5979 * omp-low.c (expand_omp_sections): Call add_bb_to_loop on created
5980 basic blocks when loops structures exist.
5982 * builtin-types.def (BT_FN_VOID_PTR_PTR_INT): New.
5984 * tree-ssa-loop-ivopts.c (expr_invariant_in_region_p): New.
5986 * tree-parloops.c (take_address_of, eliminate_local_variables_1,
5987 eliminate_local_variables_stmt, eliminate_local_variables,
5988 separate_decls_in_loop_name, separate_decls_in_loop_stmt,
5989 separate_decls_in_loop, gen_parallel_loop): Make them work on a region
5990 of code delimited by two edges in the CFG.
5991 (separate_decls_in_loop_name): Renamed separate_decls_in_region_name.
5992 (separate_decls_in_loop_stmt): Renamed separate_decls_in_region_stmt.
5993 (separate_decls_in_loop): Renamed separate_decls_in_region. Isolate
5994 the case of parallelisation of reductions.
5995 (create_loop_fn): Extern.
5996 (create_omp_parallel_region): New.
5998 * tree-data-ref.c (dump_data_dependence_relation): Don't call
5999 dump_data_reference for printing dra and drb.
6000 (create_rdg_edge_for_ddr, create_rdg_edges_for_scalar): Initialise
6002 (build_rdg): Don't call free_dependence_relations for the moment, as
6003 we attach dependence relations on each edge of the RDG.
6006 * tree-data-ref.h (rdg_component): ...here.
6007 (struct rdg_edge): New field ddr_p relation.
6008 (RDGE_RELATION): New.
6009 (create_bb_after_loop, copy_loop_before,
6010 mark_nodes_having_upstream_mem_writes, rdg_build_components,
6011 rdg_build_partitions, dump_rdg_partitions,
6012 free_rdg_components): Declared.
6014 * omp-builtins.def (BUILT_IN_GOMP_STREAM_ALIGN_PUSH,
6015 BUILT_IN_GOMP_STREAM_ALIGN_POP): New.
6017 * tree-loop-streamization.c: New.
6019 * tree-flow.h (gather_blocks_in_sese_region, create_loop_fn,
6020 create_omp_parallel_region, expr_invariant_in_region_p): Declared.
6022 * Makefile.in (tree-loop-streamization.o): Added to OBJS-common.
6024 * tree-cfg.c (gather_blocks_in_sese_region): Extern.
6026 * passes.c: Schedule pass_loop_streamization.
6028 2008-03-08 Tobias Grosser <grosser@fmi.uni-passau.de>
6030 * graphite.c (dot_all_scops_1): Fix formatting for difficult bbs and
6033 2008-03-07 Tobias Grosser <grosser@fim.uni-passau.de>
6035 * graphite.c (dot_all_scops): Update formatting.
6036 Bbs can now be part of more than one SCoP.
6038 2008-03-04 Sebastian Pop <sebastian.pop@amd.com>
6040 * graphite.c (new_loop_to_cloog_loop_str, setup_cloog_loop): Fix
6042 (loop_domain_dim): Check for unregistered toplev SCOP loop.
6043 * graphite.h (loop_to_cloog_loop): New.
6045 2008-03-04 Konrad Trifunovic <konrad.trifunovic@inria.fr>
6047 * graphite.c (loop_domain_dim, ref_nb_loops,
6048 loop_iteration_vector_dim): New.
6049 (build_access_matrix_with_af, build_access_matrix,
6050 initialize_dependence_polyhedron): Fixed for new matrix layout.
6051 No longer assume that all iteration domains are of the same
6054 2008-03-02 Sebastian Pop <sebastian.pop@amd.com>
6056 * tree-scalar-evolution.c (instantiate_parameters_1): An SSA_NAME
6057 defined in a loop at depth 0 is invariant.
6058 * tree-chrec.c (evolution_function_is_invariant_rec_p): Ditto.
6059 * tree-ssa-loop-ivopts.c (expr_invariant_in_loop_p): Should never
6060 be called at loop depth 0.
6062 * graphite.c (basic_block_simple_for_scop_p): Take the scop as
6064 (dot_all_scops_1): Update use of basic_block_simple_for_scop_p.
6065 (down_open_scop): Removed.
6066 (loop_in_scop_p): Redefined.
6067 (scop_affine_expr): New argument: scop.
6068 (stmt_simple_for_scop_p): New argument: scop. RETURN_EXPR is not
6069 a harmful statement ending a scop.
6070 (basic_block_simple_for_scop_p): New argument: scop.
6071 (get_loop_start): Removed.
6072 (new_scop): Initialize SCOP_LOOPS.
6073 (free_scop): Free SCOP_LOOPS.
6074 (succs_at_same_depth, preds_at_same_depth): New.
6075 (end_scop): Test the validity of a scop.
6076 (add_dominators_to_open_scops): New.
6077 (test_for_scop_bound): Call add_dominators_to_open_scops.
6078 Add cases for opening and closing multiple scops.
6079 (build_scops, build_scop_bbs): Iterate over basic blocks in
6081 (build_graphite_bb): Pass scop directly.
6082 (dfs_bb_in_scop_p): New.
6083 (scop_record_loop): Use SCOP_LOOPS for not recording the same loop
6085 (nb_loops_around_gb): Use loop_in_scop_p.
6086 (schedule_to_scattering): Disabled for the moment the code computing
6087 the "textual order for outer loop".
6089 * graphite.h (struct scop): New field loops.
6091 (scop_loop_index): Test that the given loop belongs to SCOP_LOOPS.
6093 * testsuite/gcc.dg/graphite/scop-{1,...,7}.c: Updated.
6095 2008-02-27 Antoniu Pop <antoniu.pop@gmail.com>
6096 Sebastian Pop <sebastian.pop@amd.com>
6098 * builtin-types.def (BT_FN_PTR_SIZE_UINT, BT_FN_BOOL_PTR): New.
6099 * common.opt (fstreamize-loops): New.
6100 * omp-builtins.def (BUILT_IN_GOMP_STREAM_CREATE,
6101 BUILT_IN_GOMP_STREAM_PUSH, BUILT_IN_GOMP_STREAM_HEAD,
6102 BUILT_IN_GOMP_STREAM_POP, BUILT_IN_GOMP_STREAM_EOS_P,
6103 BUILT_IN_GOMP_STREAM_SET_EOS, BUILT_IN_GOMP_STREAM_DESTROY): New.
6105 2008-02-22 Konrad Trifunovic <konrad.trifunovic@inria.fr>
6107 * tree-data-ref.c (build_empty_rdg): New.
6108 (build_rdg): Use it.
6109 * tree-data-ref.h (build_empty_rdg): Declared.
6110 * graphite.c (free_scop): Free SCOP_LOOP2CLOOG_LOOP.
6111 (find_vertex_for_stmt): Removed.
6112 (build_rdg_all_levels): Use build_empty_rdg and rdg_vertex_for_stmt.
6114 2008-02-21 Sebastian Pop <sebastian.pop@amd.com>
6116 * tree-loop-distribution.c (generate_builtin): After cancelling the
6117 loop tree, also delete basic blocks.
6118 (rdg_flag_uses): Stop recursion when a vertex has already been
6121 2008-02-15 Konrad Trifunovic <konrad.trifunovic@inria.fr>
6123 * graphite.c (build_scop_alpha): Removed.
6124 (graphite_transform_loops): Add a dummy call to build_all_rdg_levels
6125 and dump_dependence_graph to avoid compiler warnings.
6127 2008-02-14 Konrad Trifunovic <konrad.trifunovic@inria.fr>
6129 * tree-data-ref.c (dr_may_alias_p, create_rdg_vertices): Extern.
6130 * tree-data-ref.h (dr_may_alias_p, create_rdg_vertices): Declared.
6131 * graphite.c (new_loop_to_cloog_loop_str, hash_loop_to_cloog_loop,
6132 eq_loop_to_cloog_loop, del_loop_to_cloog_loop): New.
6133 (new_scop, setup_cloog_loop): Initialize SCOP_LOOP2CLOOG_LOOP.
6134 (initialize_dependence_polyhedron, find_vertex_for_stmt,
6135 initialize_data_dependence_polyhedron, is_empty_polyhedron,
6136 statement_precedes_p, build_rdg_all_levels, build_scop_alpha,
6137 dump_dependence_graph): New.
6138 * graphite.h (struct graphite_bb): New field compressed_alpha_matrix.
6140 (struct scop): New field loop2cloog_loop.
6141 (SCOP_LOOP2CLOOG_LOOP, struct data_dependence_polyhedron,
6142 RDGE_DDP, ddp_p, struct loop_to_cloog_loop_str): New.
6144 2008-02-10 Konrad Trifunovic <konrad.trifunovic@inria.fr>
6146 * graphite.c (build_graphite_bb): Fix initialization
6147 of the graphite basic block.
6149 2008-02-05 Sebastian Pop <sebastian.pop@amd.com>
6151 * graphite.c (scan_tree_for_params): Rewrite for the new layout of
6152 loop domain matrix. Pass in the number of loops contained in the
6154 (nb_loops_around_gb): Moved before setup_cloog_loop that uses it.
6155 (setup_cloog_loop): Rewrite for the new layout of loop domain matrix:
6156 loops that are not surrounding the current loop are not represented
6157 in the domain constraint matrix.
6158 (build_scop_iteration_domain): Initial domain constraint matrix
6159 contains only the eq/ineq, cst, and scop parameters columns.
6161 2008-01-29 Tobias Grosser <grosser@fim.uni-passau.de>
6163 * graphite.c (schedule_to_scattering, nb_loops_around_gb): New.
6164 (print_graphite_bb): Print scattering.
6166 2008-01-29 Tobias Grosser <grosser@fim.uni-passau.de>
6168 * graphite.c (initialize_cloog_names): Initialize names of
6169 scattering variables.
6171 2009-01-29 Tobias Grosser <grosser@fim.uni-passau.de>
6173 * graphite.c (dot_all_scops_1): Disable debug output while
6176 2008-01-29 Tobias Grosser <grosser@fim.uni-passau.de>
6178 * graphite.c (find_transform): Change cloog output language to C.
6180 2008-01-27 Sebastian Pop <sebastian.pop@amd.com>
6182 * tree-loop-distribution.c (generate_memset_zero,
6183 generate_builtin, generate_code_for_partition,
6184 rdg_flag_all_uses): New.
6185 (rdg_flag_uses): Gather in the same partition the statements defining
6186 the VUSES of the current statement.
6187 (rdg_flag_similar_stores): Renamed rdg_flag_similar_memory_accesses.
6188 Gather in the same partition not only the stores to the same memory
6189 access, but also the reads.
6190 (ldist_generate_loops): Renamed ldist_gen.
6192 2008-01-24 Sebastian Pop <sebastian.pop@amd.com>
6193 Tobias Grosser <grosser@fmi.uni-passau.de>
6195 * graphite.c (setup_cloog_loop): Chain all cloog loops with the
6196 next pointer, don't use the inner pointer.
6198 2008-01-20 Tobias Grosser <grosser@fmi.uni-passau.de>
6200 * graphite.c (dot_all_scops, dot_all_scops_1): New.
6201 (find_transform): Call dot_all_1.
6202 * graphite.h (dot_all_scops): Declared.
6204 2007-12-14 Sebastian Pop <sebastian.pop@amd.com>
6206 * tree-loop-distribution.c: Fix apsi.f ICE.
6207 (create_bb_after_loop): New.
6208 (generate_loops_for_partition): Use it.
6209 * testsuite/gfortran.dg/ldist-1.f90: New.
6211 * tree-data-ref.c (dot_rdg): Use /tmp/rdg.dot for dotty format.
6212 * graphite.c (dot_scop): Use /tmp/scop.dot for dotty format.
6214 2007-12-13 Tobias Grosser <grosser@fmi.uni-passau.de>
6216 * graphite.c (find_transform): Dump cloog program sent to cloog.
6218 2007-12-13 Tobias Grosser <grosser@fmi.uni-passau.de>
6220 * graphite.c (initialize_cloog_names): Initialize cloog
6223 2007-12-13 Tobias Grosser <grosser@fmi.uni-passau.de>
6225 * graphite.c (build_scop_context): Fix typo, for the matrix
6226 format: insert '0 >= 0' instead of '-1 >= 0'.
6228 2007-12-13 Sebastian Pop <sebastian.pop@amd.com>
6230 * Fix merge problems.
6232 2007-12-13 Sebastian Pop <sebastian.pop@amd.com>
6234 * graphite.c (setup_cloog_loop): Fix typo.
6236 2007-12-12 Sebastian Pop <sebastian.pop@amd.com>
6238 * doc/invoke.texi (-ftree-loop-distribution): Documented.
6239 * tree-loop-distribution.c: Reimplemented.
6240 * tree-pass.h (pass_loop_distribution): New.
6241 * tree-scalar-evolution.c (number_of_iterations_for_all_loops): Use
6243 * graphds.h (struct graph): New field indexes.
6244 * timevar.def (TV_TREE_LOOP_DISTRIBUTION): New.
6246 * tree-vect-analyze.c: Remove declaration of static functions when not
6248 * tree-vectorizer.c: Same.
6249 (rename_variables_in_loop): Now extern.
6250 (slpeel_tree_duplicate_loop_to_edge_cfg): Renamed
6251 tree_duplicate_loop_to_edge_cfg. Reset PENDING_STMT for edges after
6252 calling redirect_edge_and_branch_force.
6254 * tree-vectorizer.h (tree_duplicate_loop_on_edge): Declared.
6256 * tree-data-ref.c: Don't include tree-chrec.h.
6257 (debug_data_dependence_relations): New.
6258 (dump_data_dependence_relation): Call dump_data_reference on data refs
6260 (same_access_functions): Moved...
6261 (find_vertex_for_stmt): Renamed rdg_vertex_for_stmt.
6262 (dump_rdg_vertex, debug_rdg_vertex, dump_rdg_component,
6263 debug_rdg_component, dump_rdg, debug_rdg, dot_rdg_1, dot_rdg,
6264 struct rdg_vertex_info, ): New.
6265 (create_rdg_edge_for_ddr): Compute the dependence level before looking
6267 (create_rdg_vertices): Initialize the htab of graph->indexes.
6268 Initialize RDG_MEM_WRITE_STMT and RDG_MEM_READS_STMT.
6269 (stmts_from_loop): Don't save LABEL_EXPR.
6270 (hash_stmt_vertex_info, eq_stmt_vertex_info,
6271 hash_stmt_vertex_del): New.
6272 (build_rdg): Initialize rdg->indexes.
6273 (free_rdg, stores_from_loop, ref_base_address,
6274 rdg_defs_used_in_other_loops_p, have_similar_memory_accesses,
6275 have_similar_memory_accesses_1, ref_base_address_1,
6276 remove_similar_memory_refs): New.
6278 * tree-data-ref.h: Include tree-chrec.h.
6279 (debug_data_dependence_relations): Declared.
6280 (same_access_functions): ...here. Now static inline.
6281 (ddr_is_anti_dependent, ddrs_have_anti_deps,
6282 ddr_dependence_level): New.
6283 (struct rdg_vertex): New fields has_mem_write, has_mem_reads.
6284 (RDGV_HAS_MEM_WRITE, RDGV_HAS_MEM_READS, RDG_STMT, RDG_MEM_WRITE_STMT,
6285 RDG_MEM_READS_STMT): New.
6286 (dump_rdg_vertex, debug_rdg_vertex, dump_rdg_component,
6287 debug_rdg_component, dump_rdg, debug_rdg, dot_rdg,
6288 rdg_vertex_for_stmt): Declared.
6289 (struct rdg_edge): New field level.
6290 (RDGE_LEVEL, free_rdg): New.
6291 (stores_from_loop, remove_similar_memory_refs,
6292 rdg_defs_used_in_other_loops_p,
6293 have_similar_memory_accesses): Declared.
6294 (rdg_has_similar_memory_accesses): New.
6296 * lambda.h (dependence_level): New.
6297 * common.opt (ftree-loop-distribution): New.
6298 * tree-flow.h (debug_loop_ir): Renamed debug_loops.
6299 (print_loop_ir): Renamed print_loops.
6300 (debug_loop, debug_loop_num, print_loops_bb, mark_virtual_ops_in_bb,
6301 tree_duplicate_loop_to_edge_cfg, rename_variables_in_loop): Declared.
6302 * Makefile.in (TREE_DATA_REF_H): Depends on tree-chrec.h.
6303 (tree-loop-distribution.o): Added.
6304 * tree-cfg.c (mark_virtual_ops_in_region): Use mark_virtual_ops_in_bb.
6305 (mark_virtual_ops_in_bb): New.
6306 (print_loops_bb, debug_loop_num, debug_loop): New.
6307 * passes.c: Scheduled pass_loop_distribution.
6309 2007-12-12 Konrad Trifunovic <konrad.trifunovic@inria.fr>
6311 * graphite.c (scan_tree_for_params): Correct the number of columns
6313 (nb_flat_iterator): New.
6314 (setup_cloog_loop): Initialize to 1 the first column for inequalities.
6315 (build_scop_iteration_domain): Correct the number of columns for
6318 2007-12-12 Sebastian Pop <sebastian.pop@amd.com>
6320 * Merge from mainline (129697:130800).
6322 2007-10-30 Sebastian Pop <sebastian.pop@amd.com>
6324 * graphite.c (build_graphite_bb): SCoP's basic blocks are post
6325 dominated by SCoP's exit.
6326 (graphite_transform_loops): Compute post dominators.
6328 2007-10-28 Sebastian Pop <sebastian.pop@amd.com>
6330 * Merge from mainline (127169:129697).
6332 2007-10-28 Sebastian Pop <sebastian.pop@amd.com>
6334 * graphite.c (affine_expr): Renamed scop_affine_expr. Use an extra
6335 parameter for the basic block that contains the expression. Use
6336 outermost_loop_in_scop for evolution_function_is_affine_multivariate_p.
6337 (stmt_simple_for_scop_p): Pass to scop_affine_expr the basic block of
6339 * graphite.h (gbb_loop): New.
6340 (GBB_LOOP): Removed.
6342 2007-08-03 Sebastian Pop <sebpop@gmail.com>
6344 * Makefile.in: Fix merge problem.
6346 2007-08-03 Sebastian Pop <sebpop@gmail.com>
6348 * Merge from mainline (125309:127169).
6349 * tree-loop-distribution.c: Disabled.
6351 2007-06-05 Sebastian Pop <sebpop@gmail.com>
6353 * Merge from mainline (r123693:125309).
6355 2007-05-30 Sebastian Pop <sebpop@gmail.com>
6357 * tree-loop-distribution.c (correct_modify_expr_p): Renamed
6359 (correct_modify_p, check_statements, number_of_lvalue_uses,
6360 number_of_scalar_dependences, create_edges): Use GIMPLE_MODIFY_STMT
6361 instead of MODIFY_EXPR.
6362 (update_edge_with_ddv): Don't pass index_of_edge. Initialize
6365 2007-05-24 Sebastian Pop <sebpop@gmail.com>
6367 * tree-loop-distribution.c (struct rdg): Replace arrays by
6368 VECs for edges and vertices.
6369 (RDG_NBV, RDG_NBE, RDG_VERTEX, RDG_EDGE): Removed.
6370 (RDGV_NB_PARTITIONS): New.
6371 (PRDG_NBV, PRDG_NBE): Removed.
6372 (build_scc_graph, correct_partitions_p, mark_partitions, build_prdg,
6373 dump_rdg, find_vertex_with_stmt, create_vertices, free_rdg,
6374 number_of_scalar_dependences, create_edges, build_rdg): Use VECs.
6376 2007-05-17 Georges-Andre Silber <silber@cri.ensmp.fr>
6377 Sebastian Pop <sebpop@gmail.com>
6379 * doc/invoke.texi (-ftree-loop-distribution): Document.
6380 * tree-loop-distribution.c: New file.
6381 * tree-pass.h (pass_loop_distribution): Declared.
6382 * timevar.def (TV_TREE_LOOP_DISTRIBUTION): New.
6383 * tree-data-ref.c (initialize_data_dependence_relation): Initialize
6385 * tree-data-ref.h (data_dependence_relation): Add reversed_p.
6386 (DDR_REVERSED_P): New.
6387 * common.opt (-ftree-loop-distribution): New.
6388 * tree-flow.h (distribute_loops): Declared.
6389 * Makefile.in (OBJS-common): Depend on tree-loop-distribution.o.
6390 * passes.c (init_optimization_passes): Schedule loop distribution.
6392 2007-05-12 Sebastian Pop <sebastian.pop@inria.fr>
6394 * graphite.c (print_graphite_bb): Don't call dump_data_references.
6395 (print_scop): Don't print when scop is NULL.
6396 (build_scop_context, find_transform): Don't output to stderr.
6398 2007-05-09 Sebastian Pop <sebastian.pop@inria.fr>
6400 * tree-data-ref.c: Don't include graphite.h.
6401 Comment out the code for printing data reference's scop.
6402 (build_access_matrix_with_af): Moved...
6403 * tree-data-ref.h (build_access_matrix_with_af): Removed declaration.
6404 * graphite.c (build_access_matrix_with_af): ... here. Now static.
6405 (print_graphite_bb): Print basic block's schedule.
6406 (print_scop): Don't print the schedule, call cloog's pretty printer.
6407 (bb_in_scop_p): A basic block is in a scop only if it is both
6408 dominated and postdominated by the scop's entry and exit basic blocks.
6409 (function_parameter_p): New.
6410 (invariant_in_scop_p): Use function_parameter_p.
6411 (new_scop, save_scop): New.
6412 (end_scop, test_for_scop_bound, build_scops): Use new_scop, and
6414 (scan_tree_for_params): Directly build the constraint as CloogMatrix.
6415 (loop_in_scop_p): New.
6416 (scop_record_loop): Use loop_in_scop_p.
6417 (build_scop_domain): Renamed build_scop_iteration_domain.
6418 (setup_cloog_loop, initialize_cloog_names, find_scop_parameters,
6419 nb_params_in_scop, build_scop_context, first_loop_in_scop,
6420 setup_cloog_loop, dot_scop_1, dot_scop): New.
6421 * graphite.h (GBB_LOOP, SCOP_PROG, dot_scop): New.
6422 (struct scop): Add a pointer to cloog's representation of a program.
6424 2007-04-14 Sebastian Pop <sebastian.pop@inria.fr>
6426 * doc/invoke.texi (-ftree-check-verbose): Renamed
6427 -ftree-checks-verbose.
6428 * common.opt (flag_tree_check_verbose): Renamed
6429 flag_tree_checks_verbose.
6430 * tree-check.c (tree_check_warning): Use flag_tree_checks_verbose.
6432 2007-04-14 Sebastian Pop <sebastian.pop@inria.fr>
6434 * configure: Regenerated.
6435 * config.in: Regenerated.
6436 * tree-ssa-loop.c (graphite_transforms): Execute
6437 graphite_transform_loops only when HAVE_cloog.
6438 * configure.ac (HAVE_polylib, HAVE_cloog, GRAPHITE): Defined.
6439 * graphite.c: Include polylibgmp.h and cloog.h.
6440 (graphite_transform_loops): Removed loops parameter.
6441 * tree-flow.h (graphite_transform_loops): Update declaration.
6442 * Makefile.in (POLYLIBLIBS, POLYLIBINC, CLOOGLIBS, CLOOGINC): New.
6443 (LIBS): Depend on CLOOGLIBS and on POLYLIBLIBS.
6444 (INCLUDES): Depend on POLYLIBINC and on CLOOGINC.
6445 (OBJS-common): Remove dependence on graphite.o.
6446 (BACKEND): Depend on @GRAPHITE@.
6448 2007-04-13 Sebastian Pop <sebastian.pop@inria.fr>
6450 * doc/invoke.texi (-ftree-check-verbose): Documented.
6451 * testsuite/gcc.dg/tree-checker/tree-checks-1.c: New.
6452 * testsuite/gcc.dg/tree-checker/tree-checks-2.c: New.
6453 * testsuite/gcc.dg/tree-checker/tree-checks-3.c: New.
6454 * testsuite/gcc.dg/tree-checker/tree-checks-4.c: New.
6455 * testsuite/gcc.dg/tree-checker/tree-checks.exp: New.
6456 * testsuite/gcc.dg/tree-checker/condates.crp: New.
6457 * common.opt (ftree-checks-verbose): New.
6458 * tree-check.c (tree_check_warning): Move extra stderr output
6459 under control of flag_tree_check_verbose.
6461 2007-04-12 Sebastian Pop <sebastian.pop@inria.fr>
6463 * tree-match.c: Fix comments formatting.
6464 * tree-match.h: Fix comments formatting.
6465 * tree-check.c: Fix comments formatting.
6466 (tree_check_init): Restructure.
6468 2007-04-12 Nic Volanschi <nic.volanschi@free.fr>
6470 * doc/invoke.texi (-ftree-check, -ftree-checks): Documented.
6472 2007-04-10 Sebastian Pop <sebastian.pop@inria.fr>
6474 * Merge from mainline (r120733:123693).
6476 2007-03-20 Nic Volanschi <nic.volanschi@free.fr>
6478 * condate.y: New file.
6479 * tree-match.h (struct patt_info_s): New field sign.
6480 (struct condate_s): New field msg.
6481 (normalize_condate, name_condate, add_condate): New.
6482 (conds[], condate_parse): Made extern.
6483 * tree-check.c (tree_check_warning): First arg changed to cond;
6484 warning reformatted.
6485 (tree_check_init): Reset the TREE_VISITED bit on every CFG node.
6487 (tree_check): Process trivial condates.
6488 (read_delimited_string): Removed.
6489 (print_cond): Print name and msg.
6490 (conds[]): Made extern.
6491 (parse_tree_check_file_once): Rewritten to use the parser in
6493 Processing of option --tree_check_string moved to tree_scan().
6494 * Makefile.in: Added condate.y
6496 2007-03-12 Sebastian Pop <sebastian.pop@inria.fr>
6498 * tree-pretty-print.c (dump_generic_bb_buff, lazy_dump_generic_node):
6499 Use VECs instead of varrays.
6500 * diagnostic.h (lazy_dump_generic_node): Update declaration.
6501 * Makefile.in (pretty-print.o): Depend on vec.h.
6502 * pretty-print.c: Include tree.h and vec.h.
6503 (pp_clear_state, pp_write_list_to_stream, pp_base_format,
6504 pp_base_format, pp_construct, pp_base_string, pp_lazy_mode,
6505 new_tree_chunk, pp_add_tree, pp_add_string, pp_add_char, pp_write_list,
6506 pp_free_list): Use VECs instead of varrays.
6507 * pretty-print.h: Do not include varray.h.
6508 (struct tree_chunk_s): Declaration moved before its use.
6509 (output_buffer): Rename varray field to chunks.
6510 * tree-match.c (tree_equal, chunk_1st_char, chunks_lookahead,
6511 tree_1st_char, match_chunks_pattinfo, match_tree_pattinfo,
6512 save_global_holes): Use VECs instead of varrays.
6513 * tree-match.h: Declare VECs of cfg_node, and hole_p.
6514 * tree-check.c (scan_cfg_stmts, push_node,
6515 print_matching_stmt): Removed.
6516 (tree_check_instance, push_global_holes_if_new, tree_check,
6517 execute_tree_check): Use VECs instead of varrays.
6518 (gate_tree_check): Don't execute the CFG check when basic_block_info
6521 2007-01-12 Sebastian Pop <sebastian.pop@inria.fr>
6523 * Merge from mainline (r115016:120733).
6525 2007-01-12 Sebastian Pop <sebastian.pop@inria.fr>
6527 * Merge from mainline (r117632:117661).
6529 2007-01-12 Sebastian Pop <sebastian.pop@inria.fr>
6531 * tree-dump.c (dump_option_value_in): Add TDF_DEBUG.
6532 * tree-pass.h (TDF_DEBUG, debug_p): New.
6533 * tree-scalar-evolution.c (set_scalar_evolution, get_scalar_evolution,
6534 get_scalar_evolution, add_to_evolution, set_nb_iterations_in_loop,
6535 get_loop_exit_condition, analyze_evolution_in_loop,
6536 analyze_initial_condition, analyze_scalar_evolution,
6537 instantiate_parameters, number_of_latch_executions): Use debug_p.
6538 * tree-chrec.c (chrec_apply): Use debug_p.
6539 * tree-data-ref.c: Include graphite.h.
6540 (dump_data_reference): Print also the access matrix.
6541 (analyze_array, analyze_indirect_ref, init_data_ref,
6542 analyze_offset_expr, address_analysis, object_analysis,
6543 create_data_ref, finalize_ddr_dependent,
6544 non_affine_dependence_relation, analyze_ziv_subscript,
6545 analyze_siv_subscript_cst_affine,
6546 compute_overlap_steps_for_affine_1_2, analyze_subscript_affine_affine,
6547 can_use_analyze_subscript_affine_affine, analyze_siv_subscript,
6548 analyze_miv_subscript, analyze_overlapping_iterations,
6549 build_classic_dist_vector, subscript_dependence_tester,
6550 compute_affine_dependence, analyze_all_data_dependences): Use debug_p.
6551 (build_access_matrix_with_af): No longer static.
6552 * tree-data-ref.h (scop_p): ... declaration here.
6553 (data_reference.scop): New field.
6554 (DR_SCOP, DR_ACCESS_MATRIX): New.
6555 (build_access_matrix_with_af, dr_num_subscripts): Declared.
6556 * graphite.c (print_graphite_bb): Call dump_data_references.
6557 (print_scop): Use scop_nb_loops and scop_dim_domain.
6558 (test_for_scop_bound): Use debug_p.
6559 (scan_tree_for_params): Use scop_nb_loops, scop_nb_loops and
6561 (scop_loop_index): Moved...
6562 (scop_record_loop): New.
6563 (build_scop_loop_nests): Use scop_record_loop.
6564 (build_scop_domain): Use scop_dim_domain.
6565 (build_access_matrix): Implemented.
6566 (build_scop_canonical_schedules): Use scop_nb_loops.
6567 (build_graphite_bb): Initialize GBB_SCOP.
6568 * graphite.h (scop_p): Moved...
6569 (graphite_bb.scop): New field.
6570 (graphite_bb.iteration_domain, GBB_DOMAIN, scop.nb_params,
6571 scop.nb_loops, scop.dim_domain, SCOP_NB_LOOPS, SCOP_NB_PARAMS,
6572 SCOP_DIM_DOMAIN, SCOP_STMTS): Removed.
6573 (scop_nb_params, scop_nb_loops, scop_dim_domain, gbb_dim_domain,
6574 scop_loop_index): New.
6575 * Makefile.in (tree-data-ref.o): Depends on graphite.h.
6577 2007-01-05 Sebastian Pop <sebastian.pop@inria.fr>
6579 * Merge from mainline (r117661:120450).
6581 2006-10-12 Sebastian Pop <sebastian.pop@inria.fr>
6583 * tree-scalar-evolution.c (instantiate_parameters_1): Don't stop
6584 at the first declaration outside the varying loop, instantiate as
6586 * tree-chrec.c (for_each_scev_op): New.
6587 * tree-chrec.h (for_each_scev_op): Declared.
6588 * tree-ssa-loop.c (pass_graphite_trans): Don't dump the function.
6589 * tree-data-ref.c (get_references_in_stmt,
6590 find_data_references_in_stmt): New, from trunk.
6591 (find_data_references_in_loop): Use get_references_in_stmt
6592 and find_data_references_in_loop, modified as in trunk.
6593 (build_access_matrix_with_af): New.
6594 * tree-data-ref.h (data_reference): Add a field access_matrix.
6595 (data_ref_loc): New, as in trunk.
6596 * graphite.c (print_graphite_bb, bb_in_scop_p, stmt_in_scop_p,
6597 invariant_in_scop_p, param_index, scan_tree_for_params,
6598 scop_loop_index, build_scop_loop_nests, build_scop_domain, irp_data,
6599 idx_record_param, idx_record_params, build_access_matrix,
6600 build_scop_data_accesses, build_scop_canonical_schedules,
6601 build_graphite_bb, build_scop_bbs, find_params_in_bb,
6602 build_scop_params): New.
6603 * graphite.h (graphite_bb): New.
6604 (scop): Add fields static_schedule, params, loop_nest,
6606 * lambda.h: Declare vecs of lambda_matrix.
6607 * tree-flow.h (print_loop_ir_bb): Declared.
6608 * tree-cfg.c (print_loop_ir_bb): New.
6609 (print_loop): Use print_loop_ir_bb.
6611 2006-10-12 Sebastian Pop <pop@cri.ensmp.fr>
6613 * Merge from mainline (r115016:117632).
6615 2006-10-11 Sebastian Pop <pop@cri.ensmp.fr>
6617 * graphite.c (debug_scops): Adjust definition for avoiding a bootstrap
6618 break due to a warning.
6620 2006-10-10 Sebastian Pop <pop@cri.ensmp.fr>
6622 * graphite.c (print_scops, debug_scops): New.
6623 (graphite_transform): Renamed graphite_find_transform.
6624 * graphite.h (debug_scops): Declared.
6626 2006-08-17 Sebastian Pop <pop@cri.ensmp.fr>
6628 * tree-match.c: Reformat following the GNU style.
6629 * tree-match.h: Reformat following the GNU style.
6630 * tree-pattern.h: Removed empty file.
6631 * Makefile.in: Remove references to tree-pattern.h.
6632 * tree-check.c: Reformat following the GNU style.
6633 (execute_tree_check): Move gate condition code to...
6634 (gate_tree_check): ...here. New function.
6635 (pass_check): Use the gate function.
6637 2006-07-04 Nic Volanschi <nic.volanschi@free.fr>
6639 * tree-pattern.h: New. Tree pattern matching and checking using
6641 * tree-check.c: New. Tree/CFG checking pass.
6642 * tree-match.c: New. Library for tree pattern matching.
6643 * opts.c, common.opt: Add options --ftree-check & --ftree-checks.
6644 * toplev.c, flags.h: Add globals for tree-check pass.
6645 * Makefile.in: Integrate the files in tree-check pass.
6646 * timevar.def, tree-optimize.c, tree-pass.h: Register tree-check pass.
6647 * pretty-print.c, pretty-print.h, tree-pretty-print.c, diagnostic.h:
6648 Introduce a "lazy" pretty-print mode.
6649 * tree.c, tree.h: Add tree_name.
6651 2006-07-04 Sebastian Pop <pop@cri.ensmp.fr>
6653 * doc/invoke.texi (-fgraphite): Correct typo.
6654 * tree-scalar-evolution.c (number_of_iterations_for_all_loops): Update
6655 use of print_loop_ir.
6656 * testsuite/gcc.dg/graphite/scop-1.c: New.
6657 * testsuite/gcc.dg/graphite/scop-2.c: New.
6658 * testsuite/gcc.dg/graphite/graphite.exp: New.
6659 * graphite.c: Include domwalk.h.
6660 (print_scop): Print only the entry and exit blocks.
6661 (debug_scop): No longer static.
6662 (affine_expr): Fix formating. Return also true when the expression is
6664 (stmt_simple_for_scop_p): Fix formating.
6665 (build_scops): Use domwalk.
6666 (get_loop_start, end_scop, test_for_scop_bound): New.
6667 (graphite_transform_loops): Avoid printing on stderr.
6668 * graphite.h (debug_scop): Declared.
6669 * tree-flow.h (debug_loop_ir, print_loop_ir): Update declarations.
6670 * Makefile.in (graphite.o): Depend on domwalk.h.
6671 * tree-cfg.c (print_loop, print_pred_bbs, print_succ_bbs): Remove
6672 declarations for static functions.
6673 (print_loop, print_loop_ir, debug_loop_ir): Use an extra parameter for
6674 controlling output verbosity.
6676 2006-06-26 Sebastian Pop <pop@cri.ensmp.fr>
6677 Plesco Alexandru <shurikx@gmail.com>
6679 * doc/invoke.texi (-fgraphite): Document.
6680 * tree-pass.h (pass_graphite_transforms): Declared.
6681 * timevar.def (TV_GRAPHITE_TRANSFORMS): New.
6682 * tree-ssa-loop.c (graphite_transforms, gate_graphite_transforms): New.
6683 (pass_graphite_transforms): Defined.
6684 * tree-data-ref.c (free_data_ref, data_reference): Extern.
6685 * tree-data-ref.h (free_data_ref, data_reference): Declared.
6686 * graphite.c, graphite.h: New.
6687 * common.opt (fgraphite): Declared.
6688 * tree-flow.h (graphite_transform_loops): Declared.
6689 * Makefile.in (OBJS-common): Add graphite.o.
6690 (graphite.o): New rule.
6691 * passes.c (pass_graphite_transforms): Scheduled.