1 2009-11-18 Sebastian Pop <sebastian.pop@amd.com>
4 * testsuite/gcc.dg/graphite/pr40281.c: New.
6 * tree-scalar-evolution.c (instantiate_scev_poly): Base and stride
7 evolutions should not variate in inner loops.
9 2009-11-18 Sebastian Pop <sebastian.pop@amd.com>
12 * testsuite/gfortran.dg/graphite/pr42050.f90: New.
14 2009-11-18 Sebastian Pop <sebastian.pop@amd.com>
16 * graphite-interchange.c (memory_strides_in_loop_depth): New.
17 (pbb_interchange_profitable_p): Call memory_strides_in_loop_depth.
19 2009-11-18 Sebastian Pop <sebastian.pop@amd.com>
21 * graphite-blocking.c (scop_do_block): New.
22 * graphite-poly.c (apply_poly_transforms): Call scop_do_block.
23 * graphite-poly.h (scop_do_block): Declared.
25 2009-11-18 Sebastian Pop <sebastian.pop@amd.com>
27 * graphite-blocking.c (pbb_strip_mine_profitable_p): The parameter
28 depth is the loop nesting depth in the LST. Call psct_dynamic_dim
29 to transform depth into the time_depth before calling
30 pbb_number_of_iterations_at_time.
31 (lst_do_strip_mine): Use a scalar variable instead of recomputing
34 2009-11-18 Sebastian Pop <sebastian.pop@amd.com>
36 Reverted the patch for "scattering permutations" from 2009-10-28.
38 * graphite-poly.c (print_permutation): New.
39 (debug_permutation): New.
40 (new_poly_bb): Initialize PBB_PERMUTATION.
41 (free_poly_bb): Free PBB_PERMUTATION.
42 * graphite-poly.h (pbb_permutation_elt_p): Declared.
43 (struct pbb_permutation_elt): New.
44 (PBB_PERMUTATION_ELT_STRIDE): New.
45 (PBB_PERMUTATION_ELT_STRIDED_P): New.
46 (PBB_PERMUTATION_ELT_TIME_DIMENSION): New.
47 (new_pbb_permutation_elt): New.
48 (pbb_permutation_elt_free): New.
49 (struct poly_bb): Add field permutation.
50 (PBB_PERMUTATION): New.
51 (print_permutation): Declared.
52 (debug_permutation): Declared.
54 2009-11-04 Konrad Trifunovic <konrad.trifunovic@inria.fr>
56 * graphite-interchange.c (build_partial_difference): New.
57 (memory_stride_in_loop): Refactored the computation of
58 equality constraints into build_partial_difference function.
59 Added support for debugging stride computations.
61 2009-11-03 Sebastian Pop <sebastian.pop@amd.com>
63 * graphite-clast-to-gimple.c (gloog): Free if_region,
64 if_region->true_region, and if_region->region.
65 * sese.c (if_region_set_false_region): Free if_region->false_region.
66 (create_if_region_on_edge): Do not use GGC_NEW.
67 (move_sese_in_condition): Remove useless initialization.
69 2009-11-03 Sebastian Pop <sebastian.pop@amd.com>
71 * graphite-interchange.c (lst_perfect_nestify): Pass 3 parameters
72 for the loops created by the loop distribution. Do not modify the
74 (lst_try_interchange_loops): Same. Use a temporary LST for the
75 transformed schedule. Call lst_update_scattering before data
77 (lst_try_interchange): Pass an extra parameter INDEX.
78 (lst_do_interchange_1): New.
79 (lst_do_interchange): Call lst_do_interchange_1.
80 (scop_do_interchange): Call lst_update_scattering.
81 * graphite-poly.c (apply_poly_transforms): Do not call
82 lst_update_scattering.
83 * graphite-poly.h (lst_pred): New.
85 (lst_find_first_pbb): Return NULL when not found.
87 (lst_insert_in_sequence): Allow LST1 to be NULL.
89 (lst_substitute_3): New.
90 * gcc.dg/graphite/interchange-1.c: XFail.
91 * gcc.dg/graphite/interchange-8.c: XFail.
92 * gcc.dg/graphite/interchange-11.c: XFail.
94 2009-10-30 Sebastian Pop <sebastian.pop@amd.com>
96 * graphite-interchange.c (lst_perfectly_nested_p): New.
97 (lst_perfect_nestify): New.
98 (lst_try_interchange_loops): Call store_lst_schedule,
99 lst_perfectly_nested_p, lst_perfect_nestify and restore_lst_schedule.
100 (scop_do_interchange): Avoid redundant legality test.
101 Call lst_do_interchange on a copy of SCOP_TRANSFORMED_SCHEDULE.
102 * graphite-poly.c (apply_poly_transforms): Call lst_update_scattering.
103 * graphite-poly.h (psct_static_dim): New.
104 (lst_dewey_number_at_depth): New.
105 (lst_find_pbb): Restructured.
106 (lst_find_first_pbb): Restructured.
107 (lst_find_last_pbb): New.
108 (lst_contains_p): New.
109 (lst_contains_pbb): New.
110 (lst_create_nest): New.
111 (lst_remove_from_sequence): New.
112 (pbb_update_scattering): New.
113 (lst_update_scattering_under): New.
114 (lst_update_scattering_seq): New.
115 (lst_update_scattering): New.
116 (lst_insert_in_sequence): New.
117 (lst_distribute_lst): New.
118 (lst_remove_all_before_including_pbb): New.
119 (lst_remove_all_before_excluding_pbb): New.
121 2009-10-30 Sebastian Pop <sebastian.pop@amd.com>
123 * tree-ssa-loop-niter.c (finite_loop_p): Do not call twice
126 2009-10-30 Sebastian Pop <sebastian.pop@amd.com>
128 * graphite-poly.c (pbb_remove_duplicate_pdrs): Free collapsed.
130 2009-10-28 Konrad Trifunovic <konrad.trifunovic@gmail.com>
132 * graphite-poly.c (print_permutation): New.
133 (debug_permutation): New.
134 (new_poly_bb): Initialize PBB_PERMUTATION.
135 (free_poly_bb): Free PBB_PERMUTATION.
136 * graphite-poly.h (pbb_permutation_elt_p): Declared.
137 (struct pbb_permutation_elt): New.
138 (PBB_PERMUTATION_ELT_STRIDE): New.
139 (PBB_PERMUTATION_ELT_STRIDED_P): New.
140 (PBB_PERMUTATION_ELT_TIME_DIMENSION): New.
141 (new_pbb_permutation_elt): New.
142 (pbb_permutation_elt_free): New.
143 (struct poly_bb): Add field permutation.
144 (PBB_PERMUTATION): New.
145 (print_permutation): Declared.
146 (debug_permutation): Declared.
148 2009-10-26 Sebastian Pop <sebastian.pop@amd.com>
150 * graphite-clast-to-gimple.c (gloog): Do not call
151 sese_reset_aux_in_loops.
152 * graphite-sese-to-poly.c (build_loop_iteration_domains): Pass an
153 extra argument for domains. Do not use loop->aux.
154 (build_scop_iteration_domain): Initialize and free domains, pass it
155 to build_loop_iteration_domains and extract the information from
156 domains. Do not use loop->aux.
157 * sese.c (sese_reset_aux_in_loops): Removed.
158 * sese.h (sese_reset_aux_in_loops): Removed.
160 2009-10-26 Sebastian Pop <sebastian.pop@amd.com>
162 * graphite-clast-to-gimple.c (find_pbb_via_hash): Moved up.
163 (dependency_in_loop_p): Same.
164 (translate_clast): Do not use loop->aux. Initialize
165 loop->can_be_parallel.
166 (mark_loops_parallel): Removed.
167 * graphite-clast-to-gimple.h (mark_loops_parallel): Removed.
168 * graphite.c (free_aux_in_new_loops): Removed.
169 (graphite_finalize): Do not call free_aux_in_new_loops.
170 (graphite_transform_loops): Do not call mark_loops_parallel.
172 2009-10-26 Li Feng <nemokingdom@gmail.com>
174 * graphite-clast-to-gimple.c (get_stmtfor_depth): Removed.
175 (translate_clast): Pass an extra parameter LEVEL.
176 Call get_scattering_level.
177 * graphite-clast-to-gimple.h (get_scattering_level): New.
179 2009-10-22 Sebastian Pop <sebastian.pop@amd.com>
181 * cfgloop.c (alloc_loop): Initialize loop->single_iv.
182 * cfgloop.h (struct loop): New field single_iv.
184 * graphite-clast-to-gimple.c (pbb_to_depth_to_oldiv): Do not use
185 loop->aux anymore: use loop->single_iv.
186 (graphite_loop_normal_form): Moved...
187 (build_graphite_loop_normal_form): Removed.
188 (gloog): Do not call build_graphite_loop_normal_form.
189 (free_aux_in_new_loops): Moved...
190 (mark_loops_parallel): Restructure.
191 * graphite-clast-to-gimple.h (free_aux_in_new_loops): Do not declare.
192 * graphite-sese-to-poly.c (graphite_loop_normal_form): ...here.
193 (scop_canonicalize_loops): New.
194 (build_poly_scop): Call scop_canonicalize_loops.
195 * graphite.c (free_aux_in_new_loops): ...here.
197 2009-10-22 Sebastian Pop <sebastian.pop@amd.com>
199 * g++.dg/graphite/graphite.exp: Add the same rules as in
200 gcc.dg/graphite/graphite.exp.
202 2009-10-22 Sebastian Pop <sebastian.pop@amd.com>
204 * g++.dg/graphite/id-1.C: New.
206 2009-10-22 Sebastian Pop <sebastian.pop@amd.com>
208 * graphite-sese-to-poly.c (create_zero_dim_array): Pass an extra
210 (rewrite_close_phi_out_of_ssa): Update use of create_zero_dim_array.
211 (rewrite_phi_out_of_ssa): Same.
212 (rewrite_cross_bb_scalar_deps): Same.
213 (translate_scalar_reduction_to_array): Same.
215 2009-10-22 Sebastian Pop <sebastian.pop@amd.com>
217 * graphite-sese-to-poly.c (build_scop_drs): Disable call to
220 2009-10-22 Sebastian Pop <sebastian.pop@amd.com>
222 * graphite-sese-to-poly.c (dump_alias_graphs): New.
223 (build_scop_drs): Call dump_alias_graphs.
225 2009-10-22 Sebastian Pop <sebastian.pop@amd.com>
227 * graphite-poly.c (new_scop): Initialize SCOP_ORIGINAL_SCHEDULE,
228 SCOP_TRANSFORMED_SCHEDULE, and SCOP_SAVED_SCHEDULE.
229 (free_scop): Call free_lst on SCOP_ORIGINAL_SCHEDULE,
230 SCOP_TRANSFORMED_SCHEDULE, and SCOP_SAVED_SCHEDULE.
231 * graphite-poly.h (free_lst): New.
232 (store_lst_schedule): Free SCOP_SAVED_SCHEDULE.
233 (restore_lst_schedule): Free SCOP_TRANSFORMED_SCHEDULE.
235 2009-10-22 Sebastian Pop <sebastian.pop@amd.com>
237 * graphite-poly.h (struct scop): Add a field saved_schedule.
238 (SCOP_SAVED_SCHEDULE): New.
239 (store_lst_schedule): New.
240 (restore_lst_schedule): New.
241 (store_scattering): Call store_lst_schedule.
242 (restore_scattering): Call restore_lst_schedule.
244 2009-10-20 Sebastian Pop <sebastian.pop@amd.com>
246 * graphite-sese-to-poly.c (free_data_refs_aux): Fix formatting.
247 (pdr_add_alias_set): Same.
248 (build_poly_dr): Same.
249 (build_alias_set_optimal_p): Same.
250 (build_base_obj_set_for_drs): Same. Do not store the result of
253 2009-10-20 Sebastian Pop <sebastian.pop@amd.com>
255 * graphite-sese-to-poly.c (build_alias_set_optimal_p): Initialize
256 all_components_are_cliques to 1.
258 2009-10-20 Li Feng <nemokingdom@gmail.com>
260 * graphite-sese-to-poly.c (free_data_refs_aux): Update to free
262 (pdr_add_alias_set): Update retrieving alias_set_num.
263 (build_poly_dr): Update retrieving dr_base_object_set.
264 (partition_drs_to_sets): Remove.
265 (build_alias_set_optimal_p): New.
266 (build_alias_set_for_drs): Rename.
267 (build_scop_drs): Update.
268 * graphite-sese-to-poly.h (struct base_alias_pair): New.
269 (ALIAS_SET_INDEX): Remove.
270 (BASE_OBJECT_SET_INDEX): Remove.
272 2009-10-20 Sebastian Pop <sebastian.pop@amd.com>
274 * sese.c (get_vdef_before_sese): Handle GIMPLE_ASSIGN and GIMPLE_CALL.
276 2009-10-20 Sebastian Pop <sebastian.pop@amd.com>
278 * graphite-sese-to-poly.c (pdr_add_data_dimensions): Do not infer
279 loop upper bounds for 1-element arrays at end of structures.
280 * tree-flow.h (array_at_struct_end_p): Declared.
281 * tree-ssa-loop-niter.c (array_at_struct_end_p): Not static anymore.
283 2009-10-20 Sebastian Pop <sebastian.pop@amd.com>
285 * g++.dg/graphite/pr41305.C: New.
287 2009-10-20 Alexander Monakov <amonakov@ispras.ru>
289 * graphite-sese-to-poly.c (build_loop_iteration_domains): Generalize
290 construction of parameter constraints from loop iteration analysis.
291 * gcc.dg/graphite/run-id-2.c: New test.
293 2009-10-17 Sebastian Pop <sebastian.pop@amd.com>
295 * graphite-interchange.c (memory_stride_in_loop): Delete p1, lma
298 2009-10-17 Sebastian Pop <sebastian.pop@amd.com>
300 * graphite-dependences.c (dependence_polyhedron_1): Remove
301 unused gdim dimensions from the DDR polyhedron.
303 2009-10-17 Sebastian Pop <sebastian.pop@amd.com>
305 * graphite-dependences.c (pddr_transformed_scattering): New.
306 (dot_original_deps_stmt_1): New.
307 (dot_transformed_deps_stmt_1): New.
308 (dot_deps_stmt_1): Call dot_original_deps_stmt_1 and
309 dot_transformed_deps_stmt_1.
310 (dot_original_deps): New.
311 (dot_transformed_deps): New.
312 (dot_deps_1): Call dot_original_deps and dot_transformed_deps.
314 2009-10-17 Sebastian Pop <sebastian.pop@amd.com>
316 * graphite-dependences.c (reduction_dr_1): Remove wrong
317 assert: reduction BBs can have multiple reduction writes
318 to memory. interchange-3.f90 is an example.
320 2009-10-17 Sebastian Pop <sebastian.pop@amd.com>
322 * gfortran.dg/graphite/interchange-3.f90: New.
324 2009-10-17 Sebastian Pop <sebastian.pop@amd.com>
326 * gcc.dg/graphite/interchange-1.c: Un-XFAILed.
328 2009-10-17 Sebastian Pop <sebastian.pop@amd.com>
330 * graphite-dependences.c (dependence_polyhedron_1): Add the
331 context to the dependence polyhedron.
333 2009-10-17 Sebastian Pop <sebastian.pop@amd.com>
335 * graphite-poly.c (pbb_remove_duplicate_pdrs): Initialize
336 PBB_PDR_DUPLICATES_REMOVED.
339 2009-10-17 Sebastian Pop <sebastian.pop@amd.com>
341 * graphite-sese-to-poly.c (find_scop_parameters): Initialize
343 (build_loop_iteration_domains): Extract bounds on parameters
344 based on the data size.
345 (build_scop_context): Do not initialize SCOP_CONTEXT;
348 2009-10-17 Sebastian Pop <sebastian.pop@amd.com>
350 * graphite-ppl.c (ppl_min_for_le_polyhedron): New.
351 * graphite-ppl.h (graphite-ppl.h): Declared.
353 2009-10-17 Sebastian Pop <sebastian.pop@amd.com>
355 * graphite-ppl.c (ppl_print_linear_expr): New.
356 (debug_ppl_linear_expr): New.
357 * graphite-ppl.h (ppl_print_linear_expr): Declared.
358 (debug_ppl_linear_expr): Declared.
360 2009-10-16 Sebastian Pop <sebastian.pop@amd.com>
362 * graphite-interchange.c: Fix comments.
363 * gcc.dg/graphite/block-1.c: Fix comments.
365 2009-10-16 Sebastian Pop <sebastian.pop@amd.com>
367 * gcc.dg/graphite/interchange-7.c: Un-XFAILed.
368 * gcc.dg/graphite/interchange-9.c: Un-XFAILed.
370 2009-10-16 Sebastian Pop <sebastian.pop@amd.com>
372 Reapply the patch from Alexander Monakov that disappeared during
373 the last merges from trunk.
375 2009-09-16 Alexander Monakov <amonakov@ispras.ru>
377 * graphite-sese-to-poly.c (pdr_add_data_dimensions): Add bounds only
378 for ARRAY_REFs. Use array_ref_{low,up}_bound to determine bounds.
380 2009-10-15 Sebastian Pop <sebastian.pop@amd.com>
382 * graphite-interchange.c (memory_stride_in_loop): The depth
383 argument corresponds to a dynamic time dimension, so use
384 psct_dynamic_dim to refer to the transformed scattering dimension.
386 2009-10-15 Sebastian Pop <sebastian.pop@amd.com>
388 * graphite-interchange.c (memory_stride_in_loop): Fix comments.
390 2009-10-15 Sebastian Pop <sebastian.pop@amd.com>
392 * graphite-blocking.c (lst_do_strip_mine): Avoid strip mining the
394 * graphite-interchange.c (lst_do_interchange): Avoid interchanging
396 * graphite-poly.c (scop_to_lst): Fix LST sequence in an outermost
398 (print_lst): Print the root of LST in a different format.
399 * graphite-poly.h (lst_depth): Adjust to include the root of the LST.
401 2009-10-15 Sebastian Pop <sebastian.pop@amd.com>
403 * graphite-poly.c (print_scop): Fix pretty printing of a SCoP.
405 2009-10-15 Sebastian Pop <sebastian.pop@amd.com>
407 * doc/passes.texi: Document the Graphite infrastructure.
409 2009-10-15 Sebastian Pop <sebastian.pop@amd.com>
411 * graphite-sese-to-poly.c (insert_copyin): Use gsi_insert_seq_on_edge.
412 (rewrite_commutative_reductions_out_of_ssa): Call gsi_commit_edge_inserts,
413 and check the SSA representation.
415 * gfortran.dg/graphite/id-18.f90: New, reduced from PR41193.
417 2009-10-15 Sebastian Pop <sebastian.pop@amd.com>
419 * gcc.dg/graphite/pr40157.c: Use -floop-block as reported in the PR.
421 2009-10-14 Sebastian Pop <sebastian.pop@amd.com>
423 * gcc.dg/graphite/interchange-11.c: New.
425 2009-10-14 Sebastian Pop <sebastian.pop@amd.com>
427 * gcc.dg/graphite/interchange-8.c: Enable loop interchange.
429 2009-10-14 Sebastian Pop <sebastian.pop@amd.com>
431 * gcc.dg/graphite/graphite.exp (DEFAULT_CFLAGS_GRAPHITE_BLOCK):
432 Add -fno-loop-strip-mine and -fno-loop-interchange.
433 (DEFAULT_FLAGS_GRAPHITE_INTERCHANGE): Add -fno-loop-block and
434 -fno-loop-strip-mine.
435 * gfortran.dg/graphite/graphite.exp: Same.
437 2009-10-14 Sebastian Pop <sebastian.pop@amd.com>
439 * gcc.dg/graphite/graphite.exp (DEFAULT_CFLAGS_GRAPHITE_BLOCK):
440 Renamed DEFAULT_FLAGS_GRAPHITE_BLOCK.
441 (DEFAULT_CFLAGS_GRAPHITE_IDENTITY): Renamed
442 DEFAULT_FLAGS_GRAPHITE_IDENTITY.
443 (DEFAULT_CFLAGS_GRAPHITE_INTERCHANGE): Renamed
444 DEFAULT_FLAGS_GRAPHITE_INTERCHANGE.
445 (DEFAULT_CFLAGS_GRAPHITE_SCOP): Renamed
446 DEFAULT_FLAGS_GRAPHITE_SCOP.
447 (DEFAULT_CFLAGS_RUN_ID): Renamed DEFAULT_FLAGS_RUN_ID.
448 (DEFAULT_CFLAGS_GRAPHITE): Renamed DEFAULT_FLAGS_GRAPHITE.
450 2009-10-14 Sebastian Pop <sebastian.pop@amd.com>
452 * graphite-poly.c (pbb_number_of_iterations_at_time): Cleanup comments.
454 2009-10-14 Konrad Trifunovic <konrad.trifunovic@gmail.com>
455 Sebastian Pop <sebastian.pop@amd.com>
457 * graphite-interchange.c (build_linearized_memory_access): Pass an
459 (memory_stride_in_loop): Include transform scattering in the
460 access functions to be able to querry the strides in the
462 (pbb_interchange_loop_depths): Interchange the psct_dynamic_dim,
463 not the psct_iterator_dim.
465 2009-10-14 Sebastian Pop <sebastian.pop@amd.com>
467 * graphite-blocking.c (pbb_do_strip_mine): Removed.
468 (lst_do_strip_mine_loop): New.
469 (lst_do_strip_mine): New.
470 (scop_do_strip_mine): Call lst_do_strip_mine.
471 * graphite-poly.h (lst_add_loop_under_loop): New.
472 (lst_find_first_pbb): New.
474 2009-10-14 Sebastian Pop <sebastian.pop@amd.com>
476 * graphite-poly.c (loop_to_lst): Fix LST creation.
478 2009-10-14 Tobias Grosser <grosser@fim.uni-passau.de>
480 * testsuite/gcc.dg/graphite/id-15.c: (8 * 8) replaced with
481 sizeof(unsigned long) to make it run on 32bit systems.
483 2009-10-14 Tobias Grosser <grosser@fim.uni-passau.de>
485 * testsuite/gcc.dg/graphite/run-id-1.c: Use smaller matrix to not
488 2009-10-14 Ramakrishna Upadrasta <Ramakrishna.Upadrasta@inria.fr>
490 * graphite-sese-to-poly.c (write_alias_graph_to_ascii_dimacs): Fix
492 (write_alias_graph_to_ascii_dot): New.
493 (write_alias_graph_to_ascii_ecc): Ditto.
494 (partition_drs_to_sets): Add testing of optimality of current method
495 which assigns alias numbers according to DFS Comopnent number. used
496 as heuristic for the upcoming ECC algorithm.
497 (build_scop_drs): Write to file also with the ecc and dot format.
499 2009-10-13 Sebastian Pop <sebastian.pop@amd.com>
501 * gfortran.dg/graphite/interchange-1.f: XFail.
503 2009-10-13 Sebastian Pop <sebastian.pop@amd.com>
505 * graphite.c (graphite_initialize): Do not handle functions with
506 more than 100 basic blocks.
508 2009-10-13 Sebastian Pop <sebastian.pop@amd.com>
510 * graphite-blocking.c (pbb_do_strip_mine): Use
511 PARAM_LOOP_BLOCK_TILE_SIZE.
513 2009-10-13 Sebastian Pop <sebastian.pop@amd.com>
515 * graphite-poly.c (dot_lst_1): New.
517 * graphite-poly.h (dot_lst): Declared.
519 2009-10-13 Sebastian Pop <sebastian.pop@amd.com>
521 * graphite-dependences.c (dot_deps_stmt_1): New.
522 (dot_deps_stmt): New.
523 * graphite-dependences.h (dot_deps_stmt): Declared.
525 2009-10-09 Sebastian Pop <sebastian.pop@amd.com>
527 * graphite-sese-to-poly.c (rewrite_cross_bb_scalar_dependence): Do
528 not replace cross BB scalar dependences ending on PHI nodes.
529 (rewrite_cross_bb_scalar_deps): Filter out GIMPLE_PHI nodes.
531 2009-10-09 Sebastian Pop <sebastian.pop@amd.com>
533 * graphite-poly.c (apply_poly_transforms): Implement the high
534 level driver for flag_loop_block.
535 * tree-ssa-loop.c (gate_graphite_transforms): Remove call to sorry for
538 * gcc.dg/graphite/graphite.exp (DEFAULT_CFLAGS_GRAPHITE_BLOCK): Add
540 * gfortran.dg/graphite/graphite.exp (DEFAULT_CFLAGS_GRAPHITE_BLOCK):
543 2009-10-09 Sebastian Pop <sebastian.pop@amd.com>
545 * graphite-poly.h (lst_find_pbb): New.
546 (find_lst_loop): New.
548 2009-10-09 Sebastian Pop <sebastian.pop@amd.com>
550 * graphite-poly.c (new_scop): Remove init of SCOP_DEP_GRAPH.
551 * graphite-poly.h (struct scop): Remove dep_graph field.
552 (SCOP_DEP_GRAPH): Removed.
554 2009-10-09 Sebastian Pop <sebastian.pop@amd.com>
556 * graphite-poly.h (copy_lst): Do full copy of LST.
558 2009-10-07 Sebastian Pop <sebastian.pop@amd.com>
560 * graphite-sese-to-poly.c (reduction_phi_p): Call remove_invariant_phi
561 when the loop stride is zero.
563 * gcc.dg/graphite/id-16.c: New.
565 2009-10-06 Sebastian Pop <sebastian.pop@amd.com>
567 * graphite-dependences.c (reduction_dr_1): New.
568 (reduction_dr_p): New.
569 (graphite_legal_transform_dr): Call reduction_dr_p.
570 (reduction_ddr): Renamed reduction_ddr_p.
571 * graphite-poly.h (same_pdr_p): New.
572 (number_of_write_pdrs): New.
573 * graphite-sese-to-poly.c (nb_data_writes_in_bb): New.
574 (split_reduction_stmt): Do not split reduction statements
575 when there are no writes to memory.
576 (translate_scalar_reduction_to_array_for_stmt): Insert the
577 memory reduction statement just after the scalar reduction statement.
579 * gcc.dg/graphite/interchange-10.c: Updated to differ from interchange-4.c.
581 * gcc.dg/graphite/interchange-3.c: Un-XFAIL-ed.
582 * gcc.dg/graphite/interchange-4.c: Un-XFAIL-ed.
584 2009-10-06 Sebastian Pop <sebastian.pop@amd.com>
586 * graphite-interchange.c (lst_apply_interchange): New.
587 (lst_interchange_profitable_p): New.
588 (lst_try_interchange_loops): New.
589 (lst_try_interchange): New.
590 (lst_do_interchange): New.
591 (pbb_do_interchange): Removed.
592 (scop_do_interchange): Call lst_do_interchange.
594 2009-10-06 Sebastian Pop <sebastian.pop@amd.com>
596 * graphite-poly.c (print_scop): Print SCOP_ORIGINAL_SCHEDULE and
597 SCOP_TRANSFORMED_SCHEDULE.
602 * graphite-poly.h (lst_p): New.
605 (LST_LOOP_FATHER): New.
608 (scop_to_lst): Declared.
609 (print_lst): Declared.
610 (debug_lst): Declared.
615 (lst_dewey_number): New.
616 (struct scop): Add original_schedule and transformed_schedule fields.
617 (SCOP_ORIGINAL_SCHEDULE): New.
618 (SCOP_TRANSFORMED_SCHEDULE): New.
619 * graphite-sese-to-poly.c (build_poly_scop): Call scop_to_lst.
621 2009-10-05 Sebastian Pop <sebastian.pop@amd.com>
623 * graphite-dependences.c (reduction_ddr): New.
624 (graphite_legal_transform_bb): Call reduction_ddr.
625 * graphite-poly.c (new_poly_bb): Pass a new bool parameter.
626 Initialize PBB_IS_REDUCTION.
627 * graphite-poly.h (struct poly_bb): New bool field is_reduction.
628 (PBB_IS_REDUCTION): New.
629 (new_poly_bb): Update declaration.
630 * graphite-scop-detection.h (build_scop_bbs): Removed.
631 (nb_reductions_in_loop): Removed.
632 * graphite-sese-to-poly.c (try_generate_gimple_bb): Pass a sbitmap
633 parameter for reductions.
634 (try_generate_gimple_bb): Update call to new_poly_bb.
635 (build_scop_bbs_1): Same.
636 (build_scop_bbs): Same.
637 (gsi_for_phi_node): New.
638 (scalar_close_phi_node_p): Remove gcc_assert.
639 (split_reduction_stmt): New.
640 (is_reduction_operation_p): New.
641 (phi_contains_arg): New.
642 (follow_ssa_with_commutative_ops): New.
643 (detect_commutative_reduction_arg): New.
644 (detect_commutative_reduction_assign): New.
645 (follow_inital_value_to_phi): New.
646 (edge_initial_value_for_loop_phi): New.
647 (initial_value_for_loop_phi): New.
648 (detect_commutative_reduction): New.
649 (translate_scalar_reduction_to_array_for_stmt): New.
650 (insert_copyout): New.
651 (insert_copyin): New.
652 (translate_scalar_reduction_to_array): New.
653 (rewrite_commutative_reductions_out_of_ssa_close_phi): New.
654 (rewrite_commutative_reductions_out_of_ssa_loop): New.
655 (rewrite_commutative_reductions_out_of_ssa): New.
656 (build_poly_scop): Call rewrite_commutative_reductions_out_of_ssa.
657 * sese.h (split_region_for_bb): New.
659 * gcc.dg/graphite/graphite.exp (DEFAULT_CFLAGS_GRAPHITE_BLOCK): Add -ffast-math.
660 * gcc.dg/graphite/interchange-1.c: Fix format.
661 * gcc.dg/graphite/interchange-10.c: New.
663 2009-10-05 Sebastian Pop <sebastian.pop@amd.com>
665 * graphite-sese-to-poly.c (insert_out_of_ssa_copy): Remove
668 2009-10-05 Sebastian Pop <sebastian.pop@amd.com>
670 * graphite-sese-to-poly.c (scev_analyzable_p): New.
671 (rewrite_cross_bb_scalar_dependence): New.
672 (rewrite_cross_bb_scalar_deps): New.
673 (rewrite_reductions_out_of_ssa): Use bb_in_sese_p.
674 Call rewrite_cross_bb_scalar_deps.
676 2009-10-05 Sebastian Pop <sebastian.pop@amd.com>
678 * graphite-sese-to-poly.c (gsi_for_ssa_name_def): Removed.
679 (insert_out_of_ssa_copy): Directly use gsi_after_labels and
682 2009-10-05 Sebastian Pop <sebastian.pop@amd.com>
684 * graphite-clast-to-gimple.c (build_cloog_prog): Use pbb_index.
685 * graphite-interchange.c (pbb_do_interchange): Same.
686 * graphite-poly.c (print_scattering_function): Same.
688 * graphite-poly.h (pbb_loop): New.
689 * graphite-sese-to-poly.c (create_linear_expr_from_tree): Use pbb_loop.
691 2009-09-27 Sebastian Pop <sebastian.pop@amd.com>
693 * graphite-scop-detection.c (limit_scops): Do not build poly_bbs.
695 2009-09-27 Sebastian Pop <sebastian.pop@amd.com>
697 * graphite-sese-to-poly.c (partition_drs_to_sets): Drs is not modified,
698 so don't pass a pointer to it.
699 (build_alias_set_for_drs): Same.
700 (build_base_obj_set_for_drs): Same.
701 (build_scop_drs): Same.
703 2009-09-26 Li Feng <nemokingdom@gmail.com>
705 * graphite-sese-to-poly.c (build_scop_drs): Disable writing to file
706 the alias graph of data references.
708 2009-09-25 Li Feng <nemokingdom@gmail.com>
710 * graphite-sese-to-poly.c (write_alias_graph_to_ascii_dimacs): New.
711 (build_scop_drs): When debugging, write the alias graph to file,
712 otherwise, should be disabled.
714 2009-09-17 Sebastian Pop <sebastian.pop@amd.com>
716 * graphite-scop-detection.c (stmt_simple_memref_p): Removed.
717 (is_simple_operand): Remove call to stmt_simple_memref_p.
718 (stmt_simple_for_scop_p): Update call to is_simple_operand.
720 2009-09-17 David Edelsohn <edelsohn@gnu.org>
722 * testsuite/gcc.dg/graphite/interchange-mvt.c: New File.
723 * testsuite/gcc.dg/graphite/scop-dsyrk.c: New File.
724 * testsuite/gcc.dg/graphite/scop-dsyr2k.c: New File.
725 * testsuite/gcc.dg/graphite/scop-mvt.c: New File.
726 * testsuite/gcc.dg/graphite/scop-sor.c: New File.
728 2009-09-17 Li Feng <nemokingdom@gmail.com>
731 * graphite-dependences.c (poly_drs_may_alias_p): Adjust definition.
732 (pddr_original_scattering): Make sure 2 pdr2 in the same base object set.
733 (graphite_carried_dependence_level_k): Ditto.
734 * graphite-poly.c (new_poly_dr): Add init of PDR_BASE_OBJECT_SET.
735 * graphite-poly.h (struct poly_dr): Add member dr_base_object_set.
736 (new_poly_dr): Adjust declaration.
737 * graphite-sese-to-poly.c (free_data_refs_aux): New.
738 (free_gimple_bb): Added free_data_refs_aux.
739 (build_poly_dr): Add dr_base_object_set.
740 (partition_drs_to_sets): New.
741 (dr_same_base_object_p): New.
742 (build_alias_set_for_drs): New.
743 (build_base_object_set_for_drs): New.
744 (build_scop_drs): Add build_base_obj_set_for_drs.
745 * graphite-sese-to-poly.h: Added #define for alias set number index and
746 base object set index.
747 * libgomp/testsuite/libgomp.graphite/force-parallel-6.c: Refine tests.
748 * libgomp/testsuite/libgomp.graphite/pr4118.c: New.
750 2009-09-16 Alexander Monakov <amonakov@ispras.ru>
752 * graphite-sese-to-poly.c (pdr_add_data_dimensions): Add bounds only
753 for ARRAY_REFs. Use array_ref_{low,up}_bound to determine bounds.
755 2009-09-14 Sebastian Pop <sebastian.pop@amd.com>
757 * graphite-sese-to-poly.c (struct irp_data): Removed.
758 (idx_record_params): Removed.
759 (find_params_in_bb): Scan for parameters the access functions; don't
760 parse the tree representation.
762 2009-09-14 Sebastian Pop <sebastian.pop@amd.com>
764 * tree-ssa-loop.c (gate_graphite_transforms): Disable Graphite
765 passes at -O1 and below.
767 2009-09-14 Sebastian Pop <sebastian.pop@amd.com>
769 * graphite-blocking.c: Fix order of includes: tree-chrec.h, then
770 tree-scalar-evolution.h, and then tree-data-ref.h.
771 * graphite-clast-to-gimple.c: Same.
772 * graphite-dependences.c: Same.
773 * graphite-interchange.c: Same.
774 * graphite-poly.c: Same.
775 * graphite-scop-detection.c: Same.
776 * graphite-sese-to-poly.c: Same.
778 * lambda-code.c: Same.
779 * matrix-reorg.c: Same.
780 * tree-data-ref.c: Same.
781 * tree-if-conv.c: Same.
782 * tree-loop-distribu: Same.: Same.
783 * tree-loop-linear.c: Same.
784 * tree-parloops.c: Same.
785 * tree-predcom.c: Same.
786 * tree-vect-patterns.c: Same.
788 2009-09-02 Sebastian Pop <sebastian.pop@amd.com>
790 Partially revert the previous patch, except the following.
791 * tree-scalar-evolution.c (instantiate_scev_not): Adapted to pass
792 as parameters the operands of the not expression.
794 2009-09-01 Sebastian Pop <sebastian.pop@amd.com>
796 * tree-scalar-evolution.c (instantiate_scev_assign): New.
797 Do not call analyze_scalar_evolution on assignments.
798 (instantiate_scev_phi): Call analyze_scalar_evolution.
799 (instantiate_scev_name): Call instantiate_scev_assign and
800 instantiate_scev_phi.
801 (instantiate_scev_not): Adapted to pass as parameters the operands
802 of the not expression.
804 2009-09-01 Sebastian Pop <sebastian.pop@amd.com>
806 * tree-scalar-evolution.c (instantiate_scev_binary): Adapted
807 to pass as parameters the operands of the binary expression.
809 2009-09-01 Sebastian Pop <sebastian.pop@amd.com>
811 * tree-scalar-evolution.c (instantiate_scev_bitnot): Renamed
812 instantiate_scev_not. Handle NEGATE_EXPR.
813 (instantiate_scev_r): Handle NEGATE_EXPR.
815 2009-09-01 Sebastian Pop <sebastian.pop@amd.com>
817 * tree-scalar-evolution.c (instantiate_scev_1): Renamed
819 (instantiate_scev_r): Move code in instantiate_scev_2
820 and instantiate_scev_1.
822 2009-09-01 Sebastian Pop <sebastian.pop@amd.com>
824 * tree-scalar-evolution.c (instantiate_scev_3): New.
825 (instantiate_scev_1): Move code in instantiate_scev_3.
827 2009-09-01 Sebastian Pop <sebastian.pop@amd.com>
829 * tree-scalar-evolution.c (instantiate_scev_poly): New.
830 (instantiate_scev_1): Move code in instantiate_scev_poly.
832 2009-09-01 Sebastian Pop <sebastian.pop@amd.com>
834 * tree-scalar-evolution.c (instantiate_scev_bitnot): New.
835 (instantiate_scev_1): Move code in instantiate_scev_bitnot.
837 2009-09-01 Sebastian Pop <sebastian.pop@amd.com>
839 * tree-scalar-evolution.c (instantiate_scev_convert): New.
840 (instantiate_scev_1): Move code in instantiate_scev_convert.
842 2009-09-01 Sebastian Pop <sebastian.pop@amd.com>
844 * tree-scalar-evolution.c (instantiate_scev_binary): New.
845 (instantiate_scev_1): Move code in instantiate_scev_binary.
847 2009-09-01 Sebastian Pop <sebastian.pop@amd.com>
849 * tree-scalar-evolution.c (instantiate_scev_name): New.
850 (instantiate_scev_1): Move code in instantiate_scev_name.
852 2009-08-28 Sebastian Pop <sebastian.pop@amd.com>
854 * Merge from mainline (150992:151171).
856 2009-08-25 Sebastian Pop <sebastian.pop@amd.com>
858 * graphite-dependences.c (graphite_legal_transform_bb): Call
859 pbb_remove_duplicate_pdrs.
860 * graphite-poly.c (can_collapse_pdr): Removed.
861 (pdr_find_duplicate): Removed.
862 (can_collapse_pdrs): New.
863 (pbb_remove_duplicate_pdrs): New.
864 (new_poly_dr): Do not look for duplicates.
865 * graphite-poly.h (struct poly_bb): New field pdr_duplicates_removed.
866 (PBB_PDR_DUPLICATES_REMOVED): New.
867 (pbb_remove_duplicate_pdrs): Declared.
869 2009-08-25 Sebastian Pop <sebastian.pop@amd.com>
871 * graphite-interchange.c (pbb_interchange_profitable_p): Adjust
872 the strides by multiplying by PDR_NB_REFS.
873 * graphite-poly.c (can_collapse_pdr): New.
874 (pdr_find_duplicate): New.
875 (new_poly_dr): Call pdr_find_duplicate. Collapse duplicate PDRs.
876 Initialize PDR_NB_REFS.
877 * graphite-poly.h (struct poly_dr): Add field nb_refs.
879 (new_poly_dr): Number of subscripts is a graphite_dim_t.
881 2009-08-25 Sebastian Pop <sebastian.pop@amd.com>
883 Revert one of the previous commits:
884 * graphite-dependences.c (graphite_legal_transform_bb): Avoid
885 the computation of symmetric data dependence relations.
886 (dependency_between_pbbs_p): Same.
888 2009-08-25 Sebastian Pop <sebastian.pop@amd.com>
891 * graphite-poly.c (apply_poly_transforms): Remove legality test before
894 2009-08-25 Sebastian Pop <sebastian.pop@amd.com>
896 * graphite-dependences.c (pddr_original_scattering): Return NULL
897 for read-read dependence relations.
898 * graphite-poly.h (enum poly_dr_type): Fix comment.
901 (pdr_may_write_p): New.
903 2009-08-25 Sebastian Pop <sebastian.pop@amd.com>
905 * graphite-poly.h (enum POLY_DR_TYPE): Renamed poly_dr_type.
906 (struct poly_dr): Same.
908 * graphite-poly.c (new_poly_dr): Same.
910 2009-08-25 Konrad Trifunovic <konrad.trifunovic@gmail.com>
911 Sebastian Pop <sebastian.pop@amd.com>
913 * graphite-blocking.c (pbb_strip_mine_loop_depth): Renamed
914 pbb_strip_mine_time_depth. Changed the implementation so that
915 transformation is expressed as a transformation on
916 time (scatttering) dimensions. Also, ensures that the 2d+1
917 scheduling format is preserved.
918 (pbb_strip_mine_profitable_p): Profitability is based on the
919 iteration number of a given time (scattering) dimension,
920 and not on a original loop depth dimension.
921 (pbb_strip_mine): Call pbb_number_of_iterations_at_time.
922 (pbb_do_strip_mine): Call psct_dynamic_dim.
923 * graphite-poly.c (pbb_number_of_iterations_at_time): New.
924 * graphite-poly.h (pbb_number_of_iterations_at_time): Declared.
925 (pbb_nb_dynamic_scattering_transform): New.
926 (psct_dynamic_dim): New.
928 2009-08-25 Konrad Trifunovic <konrad.trifunovic@gmail.com>
930 * graphite-ppl.c (ppl_max_for_le): Renamed ppl_max_for_le_pointset.
931 * graphite-ppl.h (ppl_max_for_le): Renamed ppl_max_for_le_pointset.
932 * graphite-poly.c (pbb_number_of_iterations): Rename ppl_max_for_le.
933 * graphite-interchange.c (build_linearized_memory_access): Same.
934 (memory_stride_in_loop): Same.
936 2009-08-25 Sebastian Pop <sebastian.pop@amd.com>
938 * graphite-dependences.c (pddr_original_scattering): New.
939 (graphite_legal_transform_dr): Call pddr_original_scattering.
942 * graphite-dependences.h (dot_deps): Declared.
943 * graphite-poly.c (new_poly_dr): Initialize PDR_ID.
944 (print_pdr): Print PDR_ID.
945 * graphite-poly.h (struct poly_dr): Add field id.
948 * graphite-scop-detection.c (dot_all_scops_1): Cleanup comment.
950 2009-08-22 Sebastian Pop <sebastian.pop@amd.com>
952 * graphite-dependences.c (graphite_carried_dependence_level_k): Do
953 not delete the original dependence relation.
955 2009-08-21 Sebastian Pop <sebastian.pop@amd.com>
957 * graphite-dependences.c (graphite_legal_transform_bb): Avoid
958 the computation of symmetric data dependence relations.
959 (dependency_between_pbbs_p): Same.
961 2009-08-21 Sebastian Pop <sebastian.pop@amd.com>
963 * graphite-dependences.c (new_poly_dr_pair): Renamed new_poly_ddr.
964 (eq_poly_dr_pair_p): Renamed eq_poly_ddr_p.
965 (hash_poly_dr_pair_p): Renamed hash_poly_ddr_p.
966 (free_poly_ddr): New.
967 (pddr_is_empty): New.
968 (dependence_polyhedron_1): Now returns a poly_ddr_p.
969 (dependence_polyhedron): Same. Remove useless gcc_assert.
971 (graphite_legal_transform_dr): Call pddr_is_empty and free_poly_ddr.
972 (graphite_carried_dependence_level_k): Call pddr_is_empty.
973 * graphite-dependences.h (enum poly_dependence_kind): New.
974 (poly_dr_pair): Renamed poly_ddr. Added a field kind.
975 (PDRP_SOURCE): Renamed PDDR_SOURCE.
976 (PDRP_SINK): Renamed PDDR_SINK.
977 (PDRP_DDP): Renamed PDDR_DDP.
979 (free_poly_ddr): Declared.
980 * graphite-poly.c (new_scop): Use the new hash function names.
981 * graphite-poly.h (struct scop): Renamed field original_pdr_pairs
983 (SCOP_ORIGINAL_PDR_PAIRS): Renamed SCOP_ORIGINAL_PDDRS.
985 2009-08-21 Sebastian Pop <sebastian.pop@amd.com>
987 * Merge from mainline (150764:150992).
989 2009-08-18 Sebastian Pop <sebastian.pop@amd.com>
991 * cfgloopmanip.c (create_empty_loop_on_edge): Generate upper
992 bounds with LT_EXPR to make niter analysis more precise on code
993 generated by Graphite.
995 2009-08-18 Sebastian Pop <sebastian.pop@amd.com>
997 * graphite-dependences.c (graphite_legal_transform_dr): Fix formatting.
998 (graphite_legal_transform_bb): Same.
999 (poly_drs_may_alias_p): Same.
1001 2009-08-15 Sebastian Pop <sebastian.pop@amd.com>
1004 * graphite-ppl.c (ppl_max_for_le): Correct the use of
1005 ppl_Pointset_Powerset_C_Polyhedron_maximize.
1007 2009-08-13 Sebastian Pop <sebastian.pop@amd.com>
1009 * graphite-poly.c (print_pbb): Print PBB index.
1011 2009-08-13 Sebastian Pop <sebastian.pop@amd.com>
1013 * Merge from mainline (r150672:150764).
1015 2009-08-13 Sebastian Pop <sebastian.pop@amd.com>
1017 * graphite-interchange.c (ppl_max_for_le): Moved...
1018 * graphite-poly.c (pbb_number_of_iterations): Call ppl_max_for_le.
1019 * graphite-ppl.c (ppl_max_for_le): ... here.
1020 * graphite-ppl.h (ppl_max_for_le): Declared.
1022 2009-08-12 Sebastian Pop <sebastian.pop@amd.com>
1024 * Merge from mainline (r150372:150672).
1026 2009-08-11 Sebastian Pop <sebastian.pop@amd.com>
1029 * sese.c (convert_for_phi_arg): New.
1030 (add_guard_exit_phis): Use convert_for_phi_arg.
1032 * testsuite/gfortran.dg/graphite/id-17.f: New.
1034 2009-08-11 Sebastian Pop <sebastian.pop@amd.com>
1036 * graphite-sese-to-poly.c (pdr_add_data_dimensions): Dont add
1037 unknown subscript upper bounds.
1039 * testsuite/gcc.dg/graphite/interchange-6.c: Un-XFAIL.
1041 2009-08-11 Sebastian Pop <sebastian.pop@amd.com>
1042 Pranav Garg <pranav.garg2107@gmail.com>
1044 * graphite-interchange.c (gather_access_strides): Removed.
1045 (ppl_max_for_le): New.
1046 (build_linearized_memory_access): New.
1047 (memory_stride_in_loop): New.
1048 (pbb_interchange_profitable_p): Reimplemented.
1049 * graphite-ppl.h (ppl_new_id_map): New.
1050 (ppl_interchange): New.
1052 * testsuite/gcc.dg/graphite/interchange-6.c: XFAILed.
1054 2009-08-11 Sebastian Pop <sebastian.pop@amd.com>
1056 * graphite-interchange.c (compute_subscript): Removed.
1057 (compute_array_size_cstr): Removed.
1058 (compute_array_size_poly): Removed.
1059 (compute_array_size): Removed.
1060 (gather_access_strides_poly): Removed.
1061 (gather_access_strides): Empty.
1063 2009-08-11 Sebastian Pop <sebastian.pop@amd.com>
1065 * graphite-dependences.c (dependence_polyhedron_1): Replace
1066 pdr_nb_subscripts with PDR_NB_SUBSCRIPTS.
1067 (graphite_legal_transform_dr): Same.
1068 (graphite_carried_dependence_level_k): Same.
1069 * graphite-poly.c (new_poly_dr): Add a parameter nb_subscripts.
1070 Initialize PDR_NB_SUBSCRIPTS.
1071 (print_pdr_access_layout): Replace pdr_nb_subscripts with
1073 * graphite-poly.h (struct poly_dr): Add nb_subscripts field.
1074 (PDR_NB_SUBSCRIPTS): New.
1075 (pdr_nb_subscripts): Removed.
1076 (pdr_dim): Simplified.
1077 * graphite-sese-to-poly.c (build_poly_dr): Replace pdr_nb_subscripts
1078 with PDR_NB_SUBSCRIPTS.
1080 2009-08-11 Sebastian Pop <sebastian.pop@amd.com>
1082 * graphite-interchange.c (compute_array_size): Remove use of
1084 * graphite-poly.c (new_poly_dr): Remove argument data_container.
1085 Do not initialize PDR_DATA_CONTAINER.
1086 (print_pdr): Do not print PDR_DATA_CONTAINER.
1087 * graphite-poly.h (struct poly_dr): Remove data_container field.
1088 (PDR_DATA_CONTAINER): Removed.
1089 * graphite-sese-to-poly.c (pdr_add_data_dimensions): Remove use of
1091 (build_poly_dr): Same.
1093 2009-08-11 Sebastian Pop <sebastian.pop@amd.com>
1095 * testsuite/gcc.dg/graphite/interchange-9.c: New.
1097 2009-08-05 Konrad Trifunovic <konrad.trifunovic@gmail.com>
1098 Sebastian Pop <sebastian.pop@amd.com>
1100 * graphite-dependences.c (graphite_legal_transform_dr): Work on a
1101 copy of the dependence polyhedron. Free the temporary objects.
1102 (graphite_carried_dependence_level_k): Free unused objects before
1105 * testsuite/gcc.dg/graphite/interchange-1.c: XFAILed.
1106 * testsuite/gcc.dg/graphite/interchange-2.c: XFAILed.
1107 * testsuite/gcc.dg/graphite/interchange-3.c: XFAILed.
1108 * testsuite/gcc.dg/graphite/interchange-4.c: XFAILed.
1109 * testsuite/gcc.dg/graphite/interchange-7.c: XFAILed.
1111 2009-08-05 Sebastian Pop <sebastian.pop@amd.com>
1113 * graphite-blocking.c (scop_do_strip_mine): Call store_scattering.
1114 Early return without analyzing the data dependences if no
1115 transform has been done. Call restore_scattering if the transform
1117 (graphite-interchange.c): Same.
1118 * graphite-poly.c (print_scattering_function): Test for PBB_TRANSFORMED.
1119 (graphite_read_transforms): Initialize PBB_TRANSFORMED.
1120 (apply_poly_transforms): Do not gcc_assert that
1121 the transform is legal.
1122 (new_poly_bb): Initialize PBB_TRANSFORMED, PBB_SAVED, and PBB_ORIGINAL.
1123 Do not initialize PBB_NB_SCATTERING_TRANSFORM, PBB_NB_LOCAL_VARIABLES,
1124 PBB_TRANSFORMED_SCATTERING, and PBB_ORIGINAL_SCATTERING.
1125 (free_poly_dr): Free PBB_TRANSFORMED, PBB_SAVED, and PBB_ORIGINAL.
1126 * graphite-poly.h (struct poly_scattering): New.
1127 (struct poly_bb): Add original, transformed, and saved fields.
1128 Remove transformed_scattering, original_scattering, nb_local_variables,
1129 and nb_scattering_transform fields.
1130 (PBB_ORIGINAL, PBB_TRANSFORMED, PBB_SAVED): New.
1131 (poly_scattering_new): New.
1132 (poly_scattering_free): New.
1133 (poly_scattering_copy): New.
1134 (store_scattering_pbb): New.
1135 (store_scattering): New.
1136 (restore_scattering_pbb): New.
1137 (restore_scattering): New.
1138 * graphite-sese-to-poly.c (build_pbb_scattering_polyhedrons):
1139 Initialize PBB_TRANSFORMED and PBB_ORIGINAL.
1141 2009-08-05 Sebastian Pop <sebastian.pop@amd.com>
1143 * graphite-poly.c (print_pbb): Add parentheses in the pretty print.
1146 2009-08-05 Sebastian Pop <sebastian.pop@amd.com>
1148 * Makefile.in (graphite.o): Depends on PREDICT_H.
1149 * graphite.c: Include predict.h.
1150 (graphite_finalize): Call tree_estimate_probability.
1151 * predict.c (predict_loops): Do not call scev_initialize and
1153 (tree_estimate_probability_bb): New.
1154 (tree_estimate_probability): Do not initialize loops: move that
1155 code to the driver. Call tree_estimate_probability_bb.
1156 (tree_estimate_probability_driver): New.
1157 (pass_profile): Use tree_estimate_probability_driver.
1158 * predict.h (tree_estimate_probability): Declared.
1160 2009-08-05 Sebastian Pop <sebastian.pop@amd.com>
1162 * graphite-clast-to-gimple.c (gloog): Add time to TV_GRAPHITE_CODE_GEN.
1163 * graphite-dependences.c (graphite_legal_transform): Add time to
1164 TV_GRAPHITE_DATA_DEPS.
1165 (dependency_between_pbbs_p): Same.
1166 * timevar.def (TV_GRAPHITE_DATA_DEPS, TV_GRAPHITE_CODE_GEN): New.
1168 2009-08-03 Sebastian Pop <sebastian.pop@amd.com>
1170 * Merge from mainline (r149952:150372).
1172 2009-07-28 Sebastian Pop <sebastian.pop@amd.com>
1174 * ChangeLog.graphite: Fix indenting, white spaces and 80 columns.
1175 * graphite-blocking.c: Same.
1176 * graphite-clast-to-gimple.c: Same.
1177 * graphite-dependences.c: Same.
1178 * graphite-poly.c: Same.
1179 * graphite-poly.h: Same.
1180 * graphite-ppl.c: Same.
1181 * graphite-scop-detection.c: Same.
1182 * graphite-sese-to-poly.c: Same.
1185 2009-07-28 Sebastian Pop <sebastian.pop@amd.com>
1187 * graphite-sese-to-poly.c (loop_entry_phi_arg): New.
1188 (remove_simple_copy_phi): New.
1189 (remove_invariant_phi): New.
1190 (simple_copy_phi_p): New.
1191 (reduction_phi_p): New.
1192 (gsi_for_ssa_name_def): New.
1193 (insert_out_of_ssa_copy): New.
1194 (insert_out_of_ssa_copy_on_edge): New.
1195 (create_zero_dim_array): New.
1196 (scalar_close_phi_node_p): New.
1197 (rewrite_close_phi_out_of_ssa): New.
1198 (rewrite_phi_out_of_ssa): New.
1199 (rewrite_reductions_out_of_ssa): New.
1200 (build_poly_scop): Call rewrite_reductions_out_of_ssa.
1202 * testsuite/gcc.dg/graphite/id-11.c: New.
1203 * testsuite/gcc.dg/graphite/id-15.c: New.
1204 * testsuite/gcc.dg/graphite/interchange-1.c: Un-XFAIL.
1205 * testsuite/gcc.dg/graphite/interchange-2.c: Un-XFAIL.
1206 * testsuite/gcc.dg/graphite/interchange-3.c: Un-XFAIL.
1207 * testsuite/gcc.dg/graphite/interchange-4.c: Un-XFAIL.
1208 * testsuite/gcc.dg/graphite/interchange-7.c: Un-XFAIL.
1209 * testsuite/gcc.dg/graphite/scop-matmult.c: Un-XFAIL.
1210 * testsuite/gfortran.dg/graphite/id-13.f: New.
1211 * testsuite/gfortran.dg/graphite/id-5.f: New.
1213 2009-07-28 Sebastian Pop <sebastian.pop@amd.com>
1215 * graphite-clast-to-gimple.c (graphite_loop_normal_form): Do not
1216 check that nb_reductions_in_loop is zero.
1217 * graphite-scop-detection.c (harmful_stmt_in_bb): Don't filter out
1218 reduction phi nodes.
1219 (nb_reductions_in_loop): Removed.
1220 (graphite_can_represent_loop): Do not call nb_reductions_in_loop.
1221 * graphite-sese-to-poly.c (phi_node_is_iv): Removed.
1222 (bb_contains_non_iv_scalar_phi_nodes): Removed.
1223 (scop_contains_non_iv_scalar_phi_nodes): Removed.
1224 (build_poly_scop): Do not call scop_contains_non_iv_scalar_phi_nodes.
1226 2009-07-28 Sebastian Pop <sebastian.pop@amd.com>
1228 * graphite-clast-to-gimple.c (build_cloog_prog): Do not code generate
1229 statements that have an empty iteration domain.
1230 * testsuite/gfortran.dg/graphite/id-16.f: New.
1232 2009-07-28 Sebastian Pop <sebastian.pop@amd.com>
1234 * tree-scalar-evolution.c (instantiate_scev_1): Return
1235 chrec_dont_know when the result is not above instantiate_below.
1236 * graphite-scop-detection.c (scopdet_basic_block_info): Fix formatting.
1237 * graphite-sese-to-poly.c (create_linear_expr_from_tree): Assert that
1238 the tree has a known scalar evolution.
1239 * testsuite/gfortran.dg/graphite/id-14.f: New.
1240 * testsuite/gfortran.dg/graphite/id-15.f: New.
1242 2009-07-28 Sebastian Pop <sebastian.pop@amd.com>
1244 * sese.c (rename_variables_in_stmt): Pass in an extra parameter
1246 (rename_variables): Keep inserting renames after the ones already
1249 2009-07-28 Sebastian Pop <sebastian.pop@amd.com>
1251 * graphite-sese-to-poly.c (compare_bb_depths): New.
1252 (graphite_sort_dominated_info): New.
1253 (build_scop_bbs_1): Call graphite_sort_dominated_info.
1254 (build_scop_scattering): Fix comment.
1256 2009-07-28 Sebastian Pop <sebastian.pop@amd.com>
1258 * graphite.c (graphite_finalize): Call print_loops instead of
1259 dump_function_to_file.
1260 * testsuite/gcc.dg/graphite/graphite.exp: Fix formatting.
1261 * testsuite/gcc.dg/graphite/pr35356-1.c: New. Look for the number of
1262 loops generated in the graphite output file.
1263 * testsuite/gcc.dg/graphite/pr35356-2.c: New.
1264 * testsuite/gcc.dg/graphite/pr35356-3.c: New. XFAILed for now.
1265 * testsuite/gfortran.dg/graphite/id-12.f: New.
1267 2009-07-24 Li Feng <nemokingdom@gmail.com>
1269 * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-8.c:
1272 2009-07-24 Li Feng <nemokingdom@gmail.com>
1273 Tobias Grosser <grosser@fim.uni-passau.de>
1275 * graphite-sese-to-poly.c (pdr_add_alias_set): Use data reference's
1276 alias set number build alias in ACCESSES polyhedron.
1277 (build_alias_set_for_drs): New.
1278 (build_pbb_drs): Added build_alias_set_for_drs.
1279 * graphite-dependences.c (poly_drs_may_alias_p): New.
1280 (graphite_carried_dependence_level_k): Check alias information
1281 before building polyhedron.
1283 2009-07-24 Tobias Grosser <grosser@fim.uni-passau.de>
1285 * Makefile.in (lambda-code.o): Fix formatting.
1287 2009-07-24 Tobias Grosser <grosser@fim.uni-passau.de>
1289 * Merge from mainline (r149350-149952)
1291 2009-07-18 Tobias Grosser <grosser@fim.uni-passau.de>
1293 * graphite-poly.c (apply_poly_transforms): Move strip_mine
1294 before interchange to prepare for loop blocking.
1296 2009-07-18 Tobias Grosser <grosser@fim.uni-passau.de>
1298 * graphite-poly.c (apply_poly_transforms): Add checks after every
1300 * graphite-sese-to-poly.c (build_poly_scop): Remove check, as already
1301 done in apply_poly_transforms.
1303 2009-07-17 Konrad Trifunovic <konrad.trifunovic@gmail.com>
1305 * graphite-dependences.c (build_lexicographically_gt_constraint):
1306 Replace RES parameter with *RES.
1307 (dependence_polyhedron_1): Pass an address of the parameter RES
1308 instead of value of RES.
1310 2009-07-16 Sebastian Pop <sebastian.pop@amd.com>
1312 * graphite.c (graphite_finalize): Fix comment.
1313 (graphite_transform_loops): Reset scev info after code generation
1316 2009-07-16 Sebastian Pop <sebastian.pop@amd.com>
1318 * graphite.c (graphite_finalize): Call scev_reset.
1320 2009-07-16 Sebastian Pop <sebastian.pop@amd.com>
1322 * graphite-clast-to-gimple.c (compute_cloog_iv_types): Do not create
1323 GBB_CLOOG_IV_TYPES hash table twice.
1324 * graphite-sese-to-poly.c (free_gimple_bb): Call free_data_refs.
1325 (add_condition_to_domain): Clear GMP values.
1327 2009-07-16 Sebastian Pop <sebastian.pop@amd.com>
1329 * graphite-dependences.c: Fix formatting.
1330 * graphite-poly.c (free_poly_dr): Also free PDR_DATA_CONTAINER.
1331 (pbb_number_of_iterations): Free ppl_Linear_Expression.
1332 * graphite-sese-to-poly.c: Fix formatting.
1333 * graphite.c (graphite_transform_loops): Create the hash table
1334 after the early return.
1336 2009-07-16 Sebastian Pop <sebastian.pop@amd.com>
1338 * testsuite/gcc.dg/graphite/id-14.c: New.
1339 * testsuite/gcc.dg/graphite/pr40157.c: New.
1340 * testsuite/gfortran.dg/graphite/id-11.f: New.
1342 2009-07-16 Sebastian Pop <sebastian.pop@amd.com>
1344 * graphite-sese-to-poly.c (nb_pbbs_in_loops): New.
1345 (build_poly_scop): Return false when there are no pbbs within
1346 loops to avoid to pass to cloog scops with no loops.
1348 2009-07-16 Sebastian Pop <sebastian.pop@amd.com>
1350 * graphite-sese-to-poly.c (build_pbb_scattering_polyhedrons): Avoid
1351 useless test "i % 2".
1352 (build_pbb_scattering_polyhedrons): Fix formatting.
1353 (build_poly_dr): Same.
1354 * graphite.c (graphite_transform_loops): Restructure.
1356 2009-07-14 Razya Ladelsky <razya@il.ibm.com>
1358 * tree-ssa-loop-manip.c (rewrite_phi_with_iv): Remove
1359 reduction_list parameter.
1360 (rewrite_all_phi_nodes_with_iv): Same.
1361 (canonicalize_loop_ivs): Same.
1362 * tree-parloops.c (struct brli): Removed.
1363 (build_reduction_list_info): Removed.
1364 (build_new_reduction): New.
1365 (analyze_reduction_list): Removed.
1366 (gather_scalar_reductions): Find reductions instead of phi
1367 nodes that can't be canonicalized.
1368 (try_create_reduction_list): Remove reduction_list parameter.
1369 (gen_parallel_loop): Same.
1370 (parallelize_loops): Remove analyze_reductions variable,
1371 initialization and free.
1372 Change reduction_list htab initialization to reduction_info
1373 elements instead of ssa names.
1374 Call try_create_reduction_list and gen_parallel_loop without
1375 analyzed_reduction argument.
1376 * graphite-clast-to-gimple (graphite_loop_normal_form): Call
1377 canonicalize_loop_ivs with one less argument.
1378 * tree-flow.h (canonicalize_loop_ivs): Remove one argument.
1380 2009-07-14 Konrad Trifunovic <konrad.trifunovic@gmail.com>
1382 * graphite-dependences.c (new_poly_dr_pair): New.
1383 (dependence_polyhedron): Renamed into dependence_polyhedron_1.
1384 (new_poly_dr_pair): New.
1385 (eq_poly_dr_pair_p): New.
1386 (hash_poly_dr_pair_p): New.
1387 * graphite-dependences.h (struct poly_dr_pair): New.
1388 (eq_poly_dr_pair_p): Declared.
1389 (hash_poly_dr_pair_p): Declared.
1390 * graphite-poly.c (new_scop): Initialize SCOP_ORIGINAL_PDR_PAIRS.
1391 (free_scop): Free SCOP_ORIGINAL_PDR_PAIRS.
1392 * graphite-poly.h (struct scop): Add original_pdr_pairs field.
1393 * Makefile.in (graphite-poly.o): Add dependence on
1394 graphite-dependences.h.
1396 2009-07-14 Sebastian Pop <sebastian.pop@amd.com>
1398 * graphite-scop-detection.c (graphite_can_represent_scev): Do not let
1399 polynomials of degree > 1 pass to Graphite.
1400 * tree-chrec.c (scev_is_linear_expression): Call
1401 evolution_function_is_affine_multivariate_p.
1402 * testsuite/gfortran.dg/graphite/id-10.f90: New.
1404 2009-07-14 Sebastian Pop <sebastian.pop@amd.com>
1406 * tree-scalar-evolution.c (compute_overall_effect_of_inner_loop):
1407 Instantiate scevs varying in outer loops.
1408 * testsuite/gfortran.dg/graphite/id-9.f: Correct testcase.
1410 2009-07-14 Sebastian Pop <sebastian.pop@amd.com>
1412 * graphite-sese-to-poly.c (build_loop_iteration_domains): Do not insert
1413 redundant constraint.
1415 2009-07-14 Sebastian Pop <sebastian.pop@amd.com>
1417 * testsuite/gcc.dg/graphite/graphite.exp: Fix comments.
1418 * testsuite/gfortran.dg/graphite/graphite.exp: Trigger actions
1419 based on the file names as in the C testsuite.
1420 * testsuite/gfortran.dg/graphite/block-1.f90: Fix patterns.
1421 * testsuite/gfortran.dg/graphite/block-2.f: Same.
1422 * testsuite/gfortran.dg/graphite/block-3.f90: Same.
1423 * testsuite/gfortran.dg/graphite/block-4.f90: Same.
1424 * testsuite/gfortran.dg/graphite/id-1.f90: Same.
1425 * testsuite/gfortran.dg/graphite/id-2.f90: Same.
1426 * testsuite/gfortran.dg/graphite/id-3.f90: Same.
1427 * testsuite/gfortran.dg/graphite/id-4.f90: Same.
1428 * testsuite/gfortran.dg/graphite/id-6.f: Same.
1429 * testsuite/gfortran.dg/graphite/id-9.f: Same.
1430 * testsuite/gfortran.dg/graphite/interchange-1.f: Same.
1431 * testsuite/gfortran.dg/graphite/interchange-2.f: Same.
1432 * testsuite/gfortran.dg/graphite/scop-1.f: Same.
1434 2009-07-14 Sebastian Pop <sebastian.pop@amd.com>
1436 * sese.c (expand_scalar_variables_call): New.
1437 (expand_scalar_variables_ssa_name): Handle calls in expander.
1439 2009-07-13 Sebastian Pop <sebastian.pop@amd.com>
1441 * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-6.c:
1442 Expect to see the pattern twice.
1443 * testsuite/gcc.dg/graphite/interchange-0.c: Un-XFAIL.
1444 * testsuite/gcc.dg/graphite/interchange-5.c: Same.
1445 * testsuite/gcc.dg/graphite/interchange-6.c: Same.
1447 2009-07-13 Sebastian Pop <sebastian.pop@amd.com>
1449 * testsuite/gcc.dg/graphite/id-10.c: New.
1450 * testsuite/gcc.dg/graphite/id-12.c: New.
1451 * testsuite/gfortran.dg/graphite/id-7.f: New.
1452 * testsuite/gfortran.dg/graphite/id-8.f: New.
1454 2009-07-13 Sebastian Pop <sebastian.pop@amd.com>
1456 * graphite-sese-to-poly.c (pdr_add_data_dimensions): Fix division by
1459 2009-07-13 Sebastian Pop <sebastian.pop@amd.com>
1461 * sese.c (rename_variables_in_stmt): Call fold_convert during renaming.
1463 2009-07-13 Sebastian Pop <sebastian.pop@amd.com>
1465 * sese.c (expand_scalar_variables_stmt): Avoid unnecessary expansion.
1467 2009-07-10 Sebastian Pop <sebastian.pop@amd.com>
1469 * graphite-sese-to-poly.c (pdr_add_memory_accesses): Fix order of
1470 building PDR subscripts.
1472 2009-07-10 Sebastian Pop <sebastian.pop@amd.com>
1474 * graphite-sese-to-poly.c (pdr_add_data_dimensions): Fix the
1475 computation of array sizes.
1477 2009-07-10 Sebastian Pop <sebastian.pop@amd.com>
1479 * graphite-sese-to-poly.c (add_param_constraints): Disabled.
1481 2009-07-10 Tobias Grosser <grosser@fim.uni-passau.de>
1483 * graphite-dependences.c (map_into_dep_poly, map_dr_into_dep_poly,
1484 build_pairwise_constraint, dr_equality_constraints,
1485 build_pairwise_scheduling_equality,
1486 build_pairwise_scheduling_inequality, lexicographically_gt_p,
1487 build_lexicographically_gt_constraint, dependence_polyhedron,
1488 graphite_legal_transform_dr, graphite_carried_dependence_level_k):
1489 Move from NNC_Polyhedron to C_Polyhedron.
1490 * graphite-interchange.c (compute_array_size_poly,
1491 gather_access_strides): Dito.
1492 * graphite-poly.c (apply_poly_transforms, new_poly_dr, free_poly_bb,
1493 free_scop, pbb_number_of_iterations): Dito.
1494 * graphite-poly.h (struct poly_dr, pdr_nb_subscripts, struct poly_bb,
1495 pbb_dim_iter_domain, struct scop): Dito.
1496 * graphite-ppl.c (new_Constraint_System_from_Cloog_Matrix,
1497 new_Cloog_Domain_from_ppl_Polyhedron,
1498 new_Cloog_Domain_from_ppl_Pointset_Powerset, ppl_set_coef_gmp,
1499 ppl_insert_dimensions_pointset, ppl_insert_dimensions_pointset,
1500 ppl_strip_loop, ppl_strip_loop, ppl_print_polyhedron_matrix,
1501 ppl_print_powerset_matrix, debug_ppl_polyhedron_matrix,
1502 debug_ppl_powerset_matrix, ppl_read_polyhedron_matrix): Dito.
1503 * graphite-ppl.h (ppl_Pointset_Powerset_C_Polyhedron_t,
1504 new_C_Polyhedron_from_Cloog_Matrix, ppl_print_powerset_matrix,
1505 debug_ppl_powerset_matrix, ppl_insert_dimensions_pointset): Dito.
1506 * graphite-sese-to-poly.c (build_pbb_scattering_polyhedrons,
1507 build_loop_iteration_domains, ppl_constraint_type_from_tree_code,
1508 add_condition_to_domain, add_condition_to_pbb, build_scop_context,
1509 build_scop_iteration_domain, build_poly_dr): Dito
1511 2009-07-09 Sebastian Pop <sebastian.pop@amd.com>
1513 * testsuite/gcc.dg/graphite/graphite.exp: Added a rule to execute
1515 * testsuite/gcc.dg/graphite/run-id-1.c: New.
1517 2009-07-09 Sebastian Pop <sebastian.pop@amd.com>
1519 * graphite-sese-to-poly.c (build_loop_iteration_domains): Add the
1520 positivity constraint on the symbolic number of iterations.
1522 2009-07-09 Sebastian Pop <sebastian.pop@amd.com>
1524 * graphite-sese-to-poly.c (build_loop_iteration_domains): Rewrite.
1526 2009-07-09 Sebastian Pop <sebastian.pop@amd.com>
1527 Tobias Grosser <grosser@fim.uni-passau.de>
1529 * graphite-clast-to-gimple.c (build_scop_context): Removed.
1530 (build_cloog_prog): Directly use SCOP_CONTEXT.
1531 * graphite-poly.c (new_scop): Initialize SCOP_CONTEXT.
1532 (free_scop): Free SCOP_CONTEXT.
1533 (print_scop_context): New.
1534 (print_scop): Call print_scop_context.
1535 (debug_scop_context): New.
1536 * graphite-poly.h (print_scop_context, debug_scop_context): Declared.
1537 (struct scop): Added field context.
1538 (SCOP_CONTEXT): New.
1539 * graphite-sese-to-poly.c (add_param_constraints): New.
1540 (build_scop_context): New.
1541 (build_poly_scop): Call build_scop_context.
1543 2009-07-09 Sebastian Pop <sebastian.pop@amd.com>
1545 * graphite-clast-to-gimple.c (gmp_cst_to_tree): Moved...
1546 * graphite-ppl.c (ppl_set_inhomogeneous_gmp, ppl_set_coef_gmp): New.
1547 (ppl_set_inhomogeneous, ppl_set_coef): Moved...
1548 * graphite-ppl.h: Include double-int.h and tree.h.
1549 (ppl_set_inhomogeneous_gmp, ppl_set_coef_gmp): Declared.
1550 (ppl_set_inhomogeneous, ppl_set_coef): ...here.
1551 (gmp_cst_to_tree): ...here. Reimplemented using mpz_get_double_int.
1552 (tree_int_to_gmp, ppl_set_inhomogeneous_tree, ppl_set_coef_tree): New.
1554 2009-07-09 Sebastian Pop <sebastian.pop@amd.com>
1556 * graphite-clast-to-gimple.c (clast_to_gcc_expression_red): Generate
1557 POINTER_PLUS_EXPR for pointer types.
1558 (clast_to_gcc_expression): Same.
1560 2009-07-09 Sebastian Pop <sebastian.pop@amd.com>
1562 * graphite-poly.c (print_scattering_function): Early return when
1563 PBB_TRANSFORMED_SCATTERING is not initialized.
1564 (print_pbb_domain): Early return when PBB_DOMAIN is not initialized.
1566 2009-07-08 Sebastian Pop <sebastian.pop@amd.com>
1568 * tree-parloops.c (analyze_reduction_list): Remove unused variable
1571 2009-07-08 Razya Ladelsky <razya@il.ibm.com>
1573 * tree-parloops.c (analyze_reduction_list): Change return
1575 (try_create_reduction_list): Move the call to
1576 analyze_reduction_list to the beginining.
1577 Call reduction_phi with analyzed_reductions as argument
1578 instead of reduction_list.
1580 2009-07-08 Tobias Grosser <grosser@fim.uni-passau.de>
1582 * Merge from mainline (r148296:149346)
1584 2009-07-07 Sebastian Pop <sebastian.pop@amd.com>
1586 * graphite-scop-detection.c (graphite_can_represent_init): New.
1587 (graphite_can_represent_scev): Call graphite_can_represent_init:
1588 check that the initial value does not contain multiplications of
1590 (stmt_has_simple_data_refs_p): New.
1591 (stmt_simple_for_scop_p): Call stmt_simple_for_scop_p.
1592 (is_simple_operand): Fix formatting.
1593 * graphite-sese-to-poly.c (try_generate_gimple_bb): Fix formatting.
1595 2009-07-07 Sebastian Pop <sebastian.pop@amd.com>
1597 * testsuite/gcc.dg/graphite/id-13.c: New.
1598 * graphite-sese-to-poly.c (graphite_stmt_p): Do not call
1599 analyze_scalar_evolution, use scalar_evolution_in_region.
1600 (scan_tree_for_params_right_scev): Add extra assert.
1601 (parameter_index_in_region_1): Split from parameter_index_in_region.
1602 (idx_record_params): Use scalar_evolution_in_region.
1603 (find_params_in_bb): Same.
1604 (find_scop_parameters): Same.
1605 (build_loop_iteration_domains): Same.
1606 (create_linear_expr_from_tree): Same.
1607 * sese.c (scalar_evolution_in_region): New.
1608 * sese.h (scalar_evolution_in_region): Declared.
1609 (defined_in_sese_p): New.
1610 * tree-scalar-evolution.c (compute_overall_effect_of_inner_loop): Not
1612 * tree-scalar-evolution.h (compute_overall_effect_of_inner_loop):
1615 2009-07-07 Sebastian Pop <sebastian.pop@amd.com>
1617 * Makefile.in: Replace dependences on tree-chrec.h with SCEV_H.
1618 TREE_DATA_REF_H also implies SCEV_H.
1620 2009-07-07 Sebastian Pop <sebastian.pop@amd.com>
1622 * graphite-poly.c (print_scop_params): New.
1623 (print_scop): Call print_scop_params.
1624 (debug_scop_params): New.
1625 * graphite-poly.h (print_scop_params, debug_scop_params): Declared.
1627 2009-07-07 Li Feng <nemokingdom@gmail.com>
1629 * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-4.c: New.
1630 * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-5.c: New.
1631 * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-6.c: New.
1632 * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-7.c: New.
1633 * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-8.c: New.
1634 * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-9.c: New.
1636 2009-07-07 Li Feng <nemokingdom@gmail.com>
1638 * graphite-clast-to-gimple.c (mark_loops_parallel): Dump information
1639 for dependency checking part.
1640 * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-1.c: Add
1641 tests for dependency checking.
1642 * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-2.c: Ditto.
1643 * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-3.c: Ditto.
1644 * testsuite/gcc.dg/graphite/graphite_autopar/graphite_autopar.exp: Add
1645 flag -fdump-tree-graphite-all for autopar testsuites.
1647 2009-07-06 Sebastian Pop <sebastian.pop@amd.com>
1649 * Makefile.in (tree-ssa-loop-manip.o): Depends on langhooks.h.
1650 * tree-parloops.c (rewrite_phi_with_iv, rewrite_all_phi_nodes_with_iv,
1651 canonicalize_loop_ivs): Moved...
1652 * tree-ssa-loop-manip.c: ... here. Include langhooks.h.
1654 2009-07-06 Sebastian Pop <sebastian.pop@amd.com>
1656 * tree-parloops.c (try_create_reduction_list): Pass an extra
1657 argument analyzed_reductions. Call analyze_reduction_list.
1658 (gen_parallel_loop): Do not call analyze_reduction_list.
1659 (parallelize_loops): Init and finalize analyzed_reductions.
1661 2009-07-06 Li Feng <nemokingdom@gmail.com>
1663 * testsuite/gcc.dg/graphite/graphite_autopar/graphite_autopar.exp:
1664 Added flag -fno-loop-strip-mine for autopar testcase.
1666 2009-07-04 Li Feng <nemokingdom@gmail.com>
1668 * graphite-dependences.c (graphite_carried_dependence_level_k): Use
1669 transformed scattering dimension instead of unmatch orignal when
1670 calling dependence_polyhedron.
1672 2009-06-30 Sebastian Pop <sebastian.pop@amd.com>
1674 * opts.c (decode_options): Enable flag_loop_strip_mine at -O2.
1676 2009-06-30 Sebastian Pop <sebastian.pop@amd.com>
1678 * graphite-poly.c (pbb_number_of_iterations): Check for returned
1679 value 1 from ppl_Pointset_Powerset_NNC_Polyhedron_maximize.
1681 2009-06-30 Sebastian Pop <sebastian.pop@amd.com>
1683 * graphite-blocking.c (pbb_strip_mine_profitable_p): New.
1684 (pbb_do_strip_mine): Call pbb_strip_mine_profitable_p.
1685 * graphite-poly.c (pbb_number_of_iterations): New.
1686 * graphite-poly.h (pbb_number_of_iterations): Declared.
1687 (pbb_iterator_dim, pbb_parameter_dim): New.
1689 2009-06-29 Sebastian Pop <sebastian.pop@amd.com>
1691 * graphite-clast-to-gimple.c (graphite_create_new_loop): Revert the
1692 last commit on type of lower and upper bound of loops.
1694 2009-06-29 Li Feng <nemokingdom@gmail.com>
1696 * Makefile.in (graphite-clast-to-gimple.o): Added dependence on
1697 graphite-dependences.h.
1698 * graphite-clast-to-gimple.c (new_bb_pbb_def): New.
1699 (mark_bb_with_pbb): New.
1700 (get_stmtfor_depth): New.
1701 (find_pbb_via_hash): New.
1702 (dependency_in_loop_p): New.
1703 (mark_loops_parallel): New.
1704 (free_aux_in_new_loops): New.
1705 (translate_clast): Add parameter BB_PBB_MAPPING. Mark newly created
1706 bb with it's relevant pbb. Mark newly created loops. Remove mark
1707 innermost loop parallel without checking.
1708 (gloog): Add parameter BB_PBB_MAPPING.
1709 * graphite-clast-to-gimple.h (struct bb_pbb_def): New.
1710 (gloog): Change declaration.
1711 (mark_loop_parallel): Make extern.
1712 (free_aux_in_new_loops): Declare.
1713 (bb_pbb_map_hash): New.
1714 (eq_bb_pbb_map): New.
1715 * graphite.c (graphite_transform_loops): Added BB_PBB_MAPPING. Trigger
1716 auto parallelization when flag_graphite_force_parallel is set.
1717 (graphite_finalize): Added free_aux_in_new_loops.
1718 * tree-parloops.c (parallelize_loops): Only generate parallel code for
1719 the innermost loop that marked parallel. Use
1720 flag_graphite_force_parallel instead of loop->can_be_parallel.
1721 (loop_parallel_p): Move inner most checking out of function.
1723 2009-06-26 Sebastian Pop <sebastian.pop@amd.com>
1725 * graphite-clast-to-gimple.c (graphite_create_new_loop): Make the
1726 type of lower and upper bound of loops signed long int.
1728 2009-06-26 Sebastian Pop <sebastian.pop@amd.com>
1730 * cfgloopmanip.c (create_empty_loop_on_edge): Gimplify the loop exit
1731 expression outside the loop.
1733 2009-06-26 Sebastian Pop <sebastian.pop@amd.com>
1735 * gcc.dg/graphite/interchange-8.c: New.
1737 2009-06-26 Sebastian Pop <sebastian.pop@amd.com>
1739 * gcc.dg/graphite/interchange-0.c: XFailed.
1740 * gcc.dg/graphite/interchange-5.c: XFailed.
1741 * gcc.dg/graphite/interchange-6.c: XFailed.
1743 2009-06-26 Sebastian Pop <sebastian.pop@amd.com>
1745 * graphite-interchange.c (compute_array_size_poly): The end of the
1746 recursion should return 1.
1748 2009-06-26 Sebastian Pop <sebastian.pop@amd.com>
1750 * graphite-interchange.c (compute_array_size_cstr): Allow the
1751 subscript multiplier to be -1.
1752 (compute_array_size): Use PDR_DATA_CONTAINER and not PDR_ACCESSES.
1753 * graphite-poly.c (new_poly_dr): Takes an extra argument for the
1754 data_container. Initializes PDR_DATA_CONTAINER.
1755 (print_pdr_access_layout): New.
1756 (print_pdr): Call print_pdr_access_layout. Print PDR_DATA_CONTAINER.
1757 * graphite-poly.h (struct poly_dr): Adjust comment. Add a new field
1759 (PDR_DATA_CONTAINER): New.
1760 (new_poly_dr): Update declaration.
1761 * graphite-sese-to-poly.c (pdr_add_data_dimensions): New.
1762 (build_poly_dr): Call pdr_add_data_dimensions.
1764 2009-06-26 Sebastian Pop <sebastian.pop@amd.com>
1766 * graphite-poly.h (struct poly_dr): Fix comment.
1767 * graphite-sese-to-poly.c (pdr_add_alias_set): New.
1768 (pdr_add_memory_accesses): New.
1769 (build_poly_dr): Call pdr_add_memory_accesses and pdr_add_alias_set.
1771 2009-06-26 Sebastian Pop <sebastian.pop@amd.com>
1773 * graphite-poly.c (print_pdrs, debug_pdrs): New.
1774 (print_pbb): Add call to print_pdrs.
1775 * graphite-poly.h (print_pdrs, debug_pdrs): Declared.
1777 2009-06-24 Konrad Trifunovic <konrad.trifunovic@gmail.com>
1778 Li Feng <nemokingdom@gmail.com>
1780 * graphite-dependences.c (graphite_carried_dependence_level_k): New.
1781 (dependency_between_pbbs_p): New.
1782 (lexicographically_gt_p): Assure !empty_p before polyhedron
1783 intersection assign.
1784 (build_lexicographically_gt_constraint): Correct lexicographically
1786 * graphite-dependences.h: New.
1787 * Makefile.in (graphite-dependences.o): Add graphite-dependences.h.
1789 2009-06-24 Sebastian Pop <sebastian.pop@amd.com>
1791 * graphite-clast-to-gimple.c (print_clast_stmt): New.
1792 (gloog): Print to dump_file the generated clast.
1793 * graphite-clast-to-gimple.h (print_clast_stmt): Declared.
1794 * graphite-interchange.c (pbb_do_interchange): Fix dump formatting.
1796 2009-06-24 Sebastian Pop <sebastian.pop@amd.com>
1798 * graphite-poly.c (extend_scattering): Increment
1799 PBB_NB_LOCAL_VARIABLES by the number of added dimensions.
1801 2009-06-24 Sebastian Pop <sebastian.pop@amd.com>
1803 * graphite-interchange.c (compute_array_size_poly): Added exit of
1804 recursion condition. Continue iterating even after the first equality.
1805 (compute_array_size): Same.
1807 2009-06-24 Li Feng <nemokingdom@gmail.com>
1809 * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-1.c: Update
1810 -fdump-tree-final_cleanup to -fdump-tree-optimized.
1811 * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-2.c: Ditto.
1812 * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-3.c: Ditto.
1813 * testsuite/gcc.dg/graphite/graphite_autopar/graphite_autopar.exp: Ditto.
1815 2009-06-23 Sebastian Pop <sebastian.pop@amd.com>
1817 * sese.c (expand_scalar_variables_stmt): Expand scalar variables
1818 only when the use verifies is_gimple_reg.
1820 2009-06-23 Sebastian Pop <sebastian.pop@amd.com>
1822 * graphite-clast-to-gimple.c (build_cloog_prog): Fix memory corruption.
1823 Allocate scaldims after call to unify_scattering_dimensions.
1825 2009-06-23 Sebastian Pop <sebastian.pop@amd.com>
1827 * graphite-clast-to-gimple.c (translate_clast): Fix memory leak.
1829 2009-06-23 Sebastian Pop <sebastian.pop@amd.com>
1830 Albert Cohen <albert.cohen@inria.fr>
1832 * graphite-blocking.c (pbb_strip_mine_loop_depth): Do not use local
1833 variables for the strip mining.
1835 2009-06-23 Sebastian Pop <sebastian.pop@amd.com>
1836 Pranav Garg <pranav.garg2107@gmail.com>
1838 * Makefile.in (OBJS-common): Added graphite-blocking.o.
1839 (graphite-sese-to-poly.o): Moved down to be in lexicographical order.
1840 (graphite-blocking.o): New rule.
1841 (graphite-poly.o, graphite-ppl.o): Moved to be in lexicographical order.
1842 * graphite-blocking.c: New.
1843 * graphite-poly.c (apply_poly_transforms): Call scop_do_strip_mine for
1844 flag_loop_strip_mine.
1845 (psct_scattering_dim_for_loop_depth): New.
1846 * graphite-poly.h (scop_do_strip_mine): Declared.
1847 (psct_add_local_variable): Increment PBB_NB_LOCAL_VARIABLES.
1848 * tree-ssa-loop.c (gate_graphite_transforms): Do not fail when using
1849 flag_loop_strip_mine.
1851 2009-06-23 Sebastian Pop <sebastian.pop@amd.com>
1853 * graphite-poly.c (extend_scattering): Avoid initializing and freeing
1854 a GMP value and a PPL coefficient at each iteration of a loop.
1856 2009-06-23 Sebastian Pop <sebastian.pop@amd.com>
1858 * graphite-dependences.c (dependence_polyhedron): Do not use
1859 pbb_nb_scattering_dims anymore. Use pbb_nb_scattering_orig and
1860 pbb_nb_scattering_transform.
1861 (graphite_legal_transform_dr): Same.
1862 * graphite-poly.c (extend_scattering): Same.
1863 (unify_scattering_dimensions): Same.
1864 (print_scattering_function): Same.
1865 (new_poly_bb): Initialize PBB_NB_SCATTERING_TRANSFORM and
1866 PBB_NB_LOCAL_VARIABLES.
1867 * graphite-poly.h (pbb_nb_scattering): Removed declaration.
1868 (struct poly_bb): Added nb_local_variables and nb_scattering_transform.
1869 (PBB_NB_LOCAL_VARIABLES, PBB_NB_SCATTERING_TRANSFORM): New.
1870 (pbb_nb_scattering_orig, pbb_nb_scattering_transform): New.
1871 (pbb_nb_scattering_dims, pbb_nb_scattering): Removed.
1872 (pbb_nb_scattering_transform): New.
1873 (pbb_nb_local_vars): Return PBB_NB_LOCAL_VARIABLES.
1874 (psco_scattering_dim): Add assert on parameters.
1875 (psct_scattering_dim): Same.
1876 (psct_scattering_dim_for_loop_depth): Declared.
1877 (psct_local_var_dim): New.
1878 (psco_iterator_dim, psco_parameter_dim): Add assert on parameters.
1879 (psct_iterator_dim, psct_parameter_dim): Same. To maintain the
1880 correct layout, call pbb_nb_local_vars.
1881 (psct_add_local_variable, psct_add_scattering_dimension): New.
1882 * graphite-sese-to-poly.c (build_pbb_scattering_polyhedrons):
1883 Initialize PBB_NB_SCATTERING_TRANSFORM.
1885 2009-06-23 Sebastian Pop <sebastian.pop@amd.com>
1887 * graphite-ppl.c (set_inhomogeneous): Renamed ppl_set_inhomogeneous.
1888 (set_coef): Renamed ppl_set_coef.
1889 * graphite-ppl.h (ppl_set_inhomogeneous, ppl_set_coef): Declared.
1891 2009-06-23 Sebastian Pop <sebastian.pop@amd.com>
1893 * graphite-dependences.c (build_pairwise_scheduling_inequality): Don't
1894 test a boolean against 1.
1895 * graphite-interchange.c (pbb_interchange_loop_depths): Do not build
1896 a new polyhedron for the PBB_TRANSFORMED_SCATTERING.
1897 (pbb_do_interchange): Returns true when a transform has been performed.
1898 (scop_do_interchange): Same.
1899 * graphite-poly.c (apply_poly_transforms): Use the return value of
1900 scop_do_interchange.
1901 * graphite-poly.h (scop_do_interchange): Update declaration.
1903 2009-06-23 Tobias Grosser <grosser@fim.uni-passau.de>
1905 * graphite-clast-to-gimple.c (gloog): Reset loop->aux right
1907 * sese.c (sese_reset_aux_in_loops): New.
1908 * sese.h (sese_reset_aux_in_loops): New.
1910 2009-06-19 Sebastian Pop <sebastian.pop@amd.com>
1912 * graphite-sese-to-poly.c (scan_tree_for_params_int): Pass in the
1913 multiplier and multiply the constant by the multiplier.
1914 (scan_tree_for_params): Bound the multiplier to its MULT_EXPR.
1915 (build_poly_dr): Do not use the multiplier to define the subscript.
1917 2009-06-19 Sebastian Pop <sebastian.pop@amd.com>
1919 * graphite-poly.c (new_poly_dr): Pass an extra argument for the
1920 compiler's data reference. Initialize PDR_CDR.
1921 (print_pdr): Call dump_data_reference.
1922 * graphite-poly.h (struct poly_dr): Rename black_box into pbb.
1923 Add compiler_dr field.
1924 (PDR_BB): Renamed PDR_PBB.
1926 * graphite-sese-to-poly.c (build_poly_dr): Pass to new_poly_dr
1927 GCC's data reference representation.
1928 * tree-data-ref.c (debug_data_references, debug_data_reference): New.
1929 * tree-data-ref.h (debug_data_references, debug_data_reference): Decl.
1931 2009-06-19 Sebastian Pop <sebastian.pop@amd.com>
1933 * graphite-poly.c (print_scattering_function): Also print the layout.
1934 * graphite-poly.h (pbb_nb_local_vars): New.
1936 2009-06-19 Sebastian Pop <sebastian.pop@amd.com>
1938 * graphite-poly.c (print_pbb_domain): Also print the layout names.
1940 2009-06-19 Sebastian Pop <sebastian.pop@amd.com>
1942 * graphite-poly.c (print_pdr, debug_pdr): New.
1943 * graphite-poly.h (print_pdr, debug_pdr): Declared.
1944 (PDR_BASE): Removed.
1946 2009-06-18 Sebastian Pop <sebastian.pop@amd.com>
1948 * gcc/testsuite/gcc.dg/graphite/interchange-{1..7}.c: New avatars of
1951 2009-06-18 Sebastian Pop <sebastian.pop@amd.com>
1953 * graphite-interchange.c (compute_subscript): Allow also -1 in the
1954 subscript identification column.
1955 (pbb_do_interchange): Print to dump_file that some loops "will be
1956 interchanged". Rely on that chain of characters in the testcases.
1957 * gcc.dg/graphite/interchange-0.c: New.
1958 * gcc.dg/graphite/graphite.exp: Iterate over the testsuite
1959 interchange-*.c files and compile them with -floop-interchange.
1961 2009-06-18 Pranav Garg <pranav.garg2107@gmail.com>
1963 * graphite-interchange.c (interchange_profitable_p): Renamed
1964 pbb_interchange_profitable_p.
1966 2009-06-18 Sebastian Pop <sebastian.pop@amd.com>
1967 Harsha Jagasia <harsha.jagasia@amd.com>
1968 Pranav Garg <pranav.garg2107@gmail.com>
1970 * graphite-interchange.c (interchange_profitable_p): Make static.
1971 (pbb_interchange_loop_depths, pbb_do_interchange,
1972 scop_do_interchange): New.
1973 * graphite-poly.c (apply_poly_transforms): Call scop_do_interchange
1974 for flag_loop_interchange.
1975 * graphite-poly.h (scop_do_interchange): Declared.
1976 * tree-ssa-loop.c (gate_graphite_transforms): Do not fail when
1977 flag_loop_interchange is used.
1979 2009-06-18 Sebastian Pop <sebastian.pop@amd.com>
1981 * graphite-dependences.c (dependence_polyhedron): Update use of
1982 pbb_nb_scattering_dims.
1983 * graphite-poly.h (pbb_nb_scattering_dims): Do not pass SCOP.
1984 (pbb_nb_scattering): Update use of pbb_nb_scattering_dims.
1985 (psco_scattering_dim, psct_scattering_dim, psco_iterator_dim,
1986 psct_iterator_dim, psco_parameter_dim, psct_parameter_dim): New.
1988 2009-06-16 Sebastian Pop <sebastian.pop@amd.com>
1990 * graphite.c: Cleanup foo.
1992 2009-06-16 Sebastian Pop <sebastian.pop@amd.com>
1994 * Merge from mainline (r143684:148293).
1995 * Disabled libpcp until it gets fixed.
1997 2009-06-05 Sebastian Pop <sebastian.pop@amd.com>
1998 Harsha Jagasia <harsha.jagasia@amd.com>
2000 * graphite-interchange.c: New.
2001 * Makefile.in (graphite-interchange.o): New.
2002 * graphite-poly.h (interchange_profitable_p): Declared.
2003 * graphite-ppl.h (value_max): New.
2005 2009-06-04 Sebastian Pop <sebastian.pop@amd.com>
2007 * graphite-dependences.c (dependence_polyhedron): Use pdr_dim.
2008 * graphite-poly.h: Fix some comments.
2012 2009-06-04 Sebastian Pop <sebastian.pop@amd.com>
2015 (pdr_accessp_nb_subscripts): Renamed pdr_nb_subscripts.
2016 (pdr_accessp_nb_iterators): Renamed pdr_dim_iter_domain.
2017 (pdr_accessp_nb_params): Renamed pdr_nb_params.
2018 (pdr_accessp_alias_set_dim): Renamed pdr_alias_set_dim.
2019 (pdr_accessp_subscript_dim): Renamed pdr_subscript_dim.
2020 (pdr_accessp_iterator_dim): Renamed pdr_iterator_dim.
2021 (pdr_accessp_param_dim): Renamed pdr_parameter_dim.
2022 (pbb_nb_loops): Renamed pbb_dim_iter_domain.
2023 * graphite-clast-to-gimple.c: Same.
2024 * graphite-dependences.c: Same.
2025 * graphite-poly.c: Same.
2026 * graphite-sese-to-poly.c: Same.
2028 2009-06-03 Sebastian Pop <sebastian.pop@amd.com>
2030 * graphite-clast-to-gimple.c (build_iv_mapping): Insert full
2031 expressions for an IV rename, as returned by clast_to_gcc_expression.
2032 (copy_renames): Rename new_name to expr.
2033 * sese.c (debug_rename_elt): Same.
2036 (sese_adjust_liveout_phis): Call force_gimple_operand before using
2037 the information from the rename map.
2038 (rename_variables_in_stmt): Same.
2039 (add_loop_exit_phis): Rename new_name to expr.
2040 (insert_loop_close_phis): Same.
2041 (add_guard_exit_phis): Same. Call force_gimple_operand.
2042 * sese.h (struct rename_map_elt): Rename new_name to expr.
2043 (new_rename_map_elt): Same.
2045 2009-06-03 Sebastian Pop <sebastian.pop@amd.com>
2047 * graphite-clast-to-gimple.c (build_iv_mapping): Use set_rename.
2048 * sese.c (set_rename): Make it extern.
2049 * sese.h (set_rename): Declared.
2051 2009-06-03 Sebastian Pop <sebastian.pop@amd.com>
2053 * graphite-poly.c (extend_scattering): Free values.
2054 * graphite-ppl.c (new_Cloog_Domain_from_ppl_Pointset_Powerset):
2056 (ppl_print_powerset_matrix): Same.
2057 * graphite-scop-detection.c (free_scops_1): New.
2058 (limit_scops): Call free_scops_1.
2059 * graphite-sese-to-poly.c (build_scop_bbs_1): Free dom.
2060 (build_poly_dr): Free PPL coefficients.
2061 * tree-parloops.c (rewrite_all_phi_nodes_with_iv): Free bbs.
2063 2009-06-02 Sebastian Pop <sebastian.pop@amd.com>
2065 * graphite-dependences.c: New.
2066 * graphite-data-ref.c: Removed.
2067 * graphite-data-ref.h: Removed.
2068 * Makefile.in (graphite-data-ref.o): Removed.
2069 (graphite-dependences.o): Added.
2070 * graphite-clast-to-gimple.c: Remove dependence on graphite-data-ref.h.
2071 * graphite-poly.c: Same.
2072 Move the data dependence testing to graphite-dependences.c.
2074 2009-05-19 Tobias Grosser <grosser@fim.uni-passau.de>
2076 * graphite-scop-detection.c (graphite_can_represent_loop): Renamed
2077 from graphite_cannot_represent_loop. Code refactored.
2078 (scopdet_basic_block_info): Call graphite_can_represent_loop.
2080 2009-05-17 Li Feng <nemokingdom@gmail.com>
2082 * testsuite/gcc.dg/graphite/graphite_autopar/graphite_autopar.exp:
2083 Cover all the testcases (not only the filtered ones).
2085 2009-05-17 Tobias Grosser <grosser@fim.uni-passau.de>
2087 * graphite-scop-detection.c (stmt_simple_for_scop_p): Remove
2088 unnecessary check. Update comments. Move check for REAL_TYPE here.
2089 (harmful_stmt_in_bb): Remove checks for conditions. This is already
2090 done in (stmt_simple_for_scop_p).
2092 2009-05-14 Tobias Grosser <grosser@fim.uni-passau.de>
2094 * graphite.c (print_global_statistics): New.
2095 (print_graphite_scop_statistic): New.
2096 (print_graphite_statistics): New.
2097 (graphite_initialize, graphite_transform_loops): Print statistics.
2098 * graphite-scop-detection (build_scops): Print statistics.
2099 (print_graphite_scop_statistics): New.
2100 (print_graphite_statistics): New.
2102 2009-05-13 Sebastian Pop <sebastian.pop@amd.com>
2104 * graphite-clast-to-gimple.c (struct clast_name_index): Removed.
2105 (debug_clast_name_index): Removed.
2106 (debug_clast_name_indexes_1): Removed.
2107 (debug_clast_name_indexes): Removed.
2108 (clast_name_index_elt_info): Removed.
2109 (eq_clast_name_indexes): Removed.
2110 (clast_name_to_index): Removed.
2111 (new_clast_name_index): Removed.
2112 (save_clast_name_index): Removed.
2113 (save_var_name): Moved...
2114 (init_sese_params_index): Removed.
2115 (clast_name_to_gcc): Remove use of name_tree.
2116 (initialize_cloog_names): Same.
2117 (gloog): Do not call init_sese_params_index.
2118 * graphite-sese-to-poly.c (save_var_name): ...here.
2119 (parameter_index_in_region): New.
2120 * sese.c (new_sese): Initialize SESE_PARAMS_NAMES.
2121 (parameter_index_in_region): Removed.
2122 (is_parameter): Remove use of name_tree.
2123 * sese.h (struct name_tree): Removed.
2124 (struct sese): Remove use of name_tree. New field params_names.
2125 (SESE_PARAMS_NAMES): New.
2126 (SESE_PARAMS): Remove duplicate.
2127 (parameter_index_in_region): Removed.
2128 (sese_nb_params): Remove use of name_tree.
2129 (struct clast_name_index): New.
2130 (new_clast_name_index): New.
2131 (clast_name_to_index): New.
2132 (save_clast_name_index): New.
2133 (debug_clast_name_index): New.
2134 (debug_clast_name_indexes_1): New.
2135 (debug_clast_name_indexes): New.
2136 (clast_name_index_elt_info): New.
2137 (eq_clast_name_indexes): New.
2139 2009-05-13 Sebastian Pop <sebastian.pop@amd.com>
2141 * graphite-clast-to-gimple.c (compute_cloog_iv_types_1): Call
2142 pbb_to_depth_to_oldiv. Remove call to oldiv_for_loop.
2143 (graphite_loop_normal_form): Do not pass region. Do not
2144 initialize SESE_OLDIVS.
2145 (build_graphite_loop_normal_form): Update call to
2146 graphite_loop_normal_form.
2147 * sese.c (debug_oldivs): Removed.
2148 (new_sese): Do not initialize SESE_OLDIVS.
2149 (free_sese): Do not free SESE_OLDIVS.
2150 (oldiv_for_loop): Removed.
2151 * sese.h (struct sese): Remove old_ivs.
2152 (SESE_OLDIVS): Removed.
2153 (oldiv_for_loop): Removed.
2155 2009-05-13 Sebastian Pop <sebastian.pop@amd.com>
2157 * graphite-clast-to-gimple.c (clast_name_to_gcc): Pass newivs,
2158 remove ivstack. Remove call to loop_iv_stack_get_iv_from_name,
2159 replaced by a call to newivs_to_depth_to_newiv.
2160 (clast_to_gcc_expression): Pass newivs, remove ivstack.
2161 (clast_to_gcc_expression_red): Same.
2162 (gcc_type_for_clast_expr): Same.
2163 (gcc_type_for_clast_eq): Same.
2164 (graphite_translate_clast_equation): Same.
2165 (graphite_create_guard_cond_expr): Same.
2166 (graphite_create_new_guard): Same.
2167 (graphite_create_new_loop): Same.
2168 (build_iv_mapping): Same.
2169 (translate_clast): Same.
2171 (loop_iv_stack_patch_for_consts): Removed. *
2172 sese.c (iv_stack_entry_is_constant): Removed.
2173 (iv_stack_entry_is_iv): Removed.
2174 (loop_iv_stack_push_iv): Removed.
2175 (loop_iv_stack_insert_constant): Removed.
2176 (loop_iv_stack_pop): Removed.
2177 (loop_iv_stack_get_iv): Removed.
2178 (loop_iv_stack_get_iv_from_name): Removed.
2179 (debug_loop_iv_stack): Removed.
2180 (free_loop_iv_stack): Removed.
2181 (loop_iv_stack_remove_constants): Removed. *
2182 sese.h (iv_stack_entry_kind): Removed.
2183 (iv_stack_entry_data_union): Removed.
2184 (iv_stack_entry_struct): Removed.
2185 (iv_stack_entry_p): Removed.
2186 (debug_oldivs, debug_loop_iv_stack, loop_iv_stack_insert_constant,
2187 loop_iv_stack_get_iv_from_name, loop_iv_stack_push_iv,
2188 loop_iv_stack_get_iv, loop_iv_stack_remove_constants,
2189 loop_iv_stack_pop, free_loop_iv_stack): Removed.
2190 (gbb_loop_at_index): Fix indenting.
2191 (gbb_loop_index): Removed.
2193 2009-05-13 Sebastian Pop <sebastian.pop@amd.com>
2195 * graphite-clast-to-gimple.c (clast_name_to_gcc): Do not use strcmp.
2196 Call clast_name_to_index.
2198 2009-05-13 Sebastian Pop <sebastian.pop@amd.com>
2200 * graphite-clast-to-gimple.c (clast_name_to_gcc): Pass region,
2201 do not pass params. Get params from SESE_PARAMS.
2202 (clast_to_gcc_expression): Same.
2203 (clast_to_gcc_expression_red): Same.
2204 (gcc_type_for_clast_eq): Same.
2205 (graphite_translate_clast_equation): Same.
2206 (graphite_create_new_loop): Same.
2207 * sese.c (rename_variables_in_stmt): Fix comment.
2209 2009-05-13 Sebastian Pop <sebastian.pop@amd.com>
2211 * graphite-clast-to-gimple.c (graphite_create_new_loop): Pass
2213 Call save_clast_name_index.
2214 (translate_clast): Pass newivs_index.
2215 (gloog): Create and free newivs_index.
2217 2009-05-13 Sebastian Pop <sebastian.pop@amd.com>
2219 * graphite-clast-to-gimple.c (clast_name_index): New structure.
2220 (clast_name_index_p): New type.
2221 (debug_clast_name_index): New.
2222 (debug_clast_name_indexes_1): New.
2223 (debug_clast_name_indexes): New.
2224 (clast_name_index_elt_info): New.
2225 (eq_clast_name_indexes): New.
2226 (clast_name_to_index): New.
2227 (new_clast_name_index): New.
2228 (save_clast_name_index): New.
2229 (init_sese_params_index): New.
2230 (gloog): Call init_sese_params_index.
2231 * graphite-clast-to-gimple.h (debug_clast_name_indexes): Declared.
2232 * sese.c (new_sese): Initialize SESE_PARAMS_INDEX.
2233 (free_sese): Free SESE_PARAMS_INDEX.
2234 * sese.h (struct sese): Add params_index.
2235 (SESE_PARAMS_INDEX): New.
2237 2009-05-13 Sebastian Pop <sebastian.pop@amd.com>
2239 * graphite-clast-to-gimple.c (newivs_to_depth_to_newiv): New.
2240 (graphite_create_new_loop): Pass the newivs vector. Push the
2241 newly created IV to newivs.
2242 (translate_clast): Pass the newivs vector.
2243 (gloog): Create and destroy the newivs vector.
2245 2009-05-13 Sebastian Pop <sebastian.pop@amd.com>
2247 * graphite-clast-to-gimple.c (pbb_to_depth_to_oldiv): New.
2248 (graphite_loop_normal_form): Initialize loop->aux with the unique
2249 IV that has been created.
2251 2009-05-13 Tobias Grosser <grosser@fim.uni-passau.de>
2253 * tree-chrec.c (evolution_function_right_is_integer_cst): Allow
2254 scev with parameters in the base part. They where forbidden
2257 2009-05-11 Li Feng <nemokingdom@gmail.com>
2259 * testsuite/gcc.dg/graphite/graphite.exp: Set different default
2260 compile options by file names.
2261 * testsuite/gcc.dg/graphite/block{0-6}.c: Remove dg-option line.
2262 * testsuite/gcc.dg/graphite/id-{1-9}.c: Ditto.
2263 * testsuite/gcc.dg/graphite/scop-{0-20}.c: Ditto.
2264 * testsuite/gcc.dg/graphite/scop-matmult.c: Ditto.
2266 2009-05-08 Li Feng <nemokingdom@gmail.com>
2268 * testsuite/gcc.dg/graphite/graphite_autopar/graphite_autopar.exp: New.
2269 * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-1.c: New.
2270 * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-2.c: New.
2271 * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-3.c: New.
2273 2009-05-07 Tobias Grosser <grosser@fim.uni-passau.de>
2275 * graphite-scop-detection (build_scops_1): Fix little bug introduced
2278 2009-05-07 Tobias Grosser <grosser@fim.uni-passau.de>
2280 * graphite-scop-detection.c (graphite_can_represent_scev): Only
2281 allow integer constant strides.
2282 (graphite_can_represent_expr): Depend on outermost_loop.
2283 (stmt_simple_memref_p, graphite_cannot_represent_loop,
2284 harmful_stmt_in_bb, is_simple_operand, stmt_simple_for_scop_p,
2285 build_scops_1): Same.
2286 (scopdet_basic_block_info): Same and insert layered SCoP
2288 (try_generate_gimple_bb): Cleanup.
2289 (build_scops): Enable data references.
2291 * testsuite/gcc.dg/graphite/id-5.c: New.
2292 * testsuite/gcc.dg/graphite/id-9.c: New.
2293 * tree-chrec.c (evolution_function_right_is_integer_cst): New.
2294 * tree-chrec.h (evolution_function_right_is_integer_cst): New.
2296 2009-05-06 Tobias Grosser <grosser@fim.uni-passau.de>
2298 * sese.c (expand_scalar_variables_ssa_name): Only build expressions,
2299 that we have not yet built for this SCoP.
2301 2009-05-06 Tobias Grosser <grosser@fim.uni-passau.de>
2303 * sese.c (expand_scalar_variables_expr): Fix expand_scalar_variables
2304 for complex numbers.
2306 2009-05-06 Tobias Grosser <grosser@fim.uni-passau.de>
2308 * graphite-ppl.c: Fix build if cloog is not available.
2310 2009-05-04 Li Feng <nemokingdom@gmail.com>
2312 * tree-parloops.c (loop_parallel_p): Remove construction of
2313 NITER and REDUCTION_LIST.
2314 (try_get_loop_niter): New.
2315 (try_create_reduction_list): New.
2316 (parallelize_loops): Bypass the failed checkings in autopar
2317 when can_be_parallel in loop structure is set to true.
2319 2009-05-01 Tobias Grosser <grosser@fim.uni-passau.de>
2321 * testsuite/gcc.dg/graphite/id-6.c: Update testcase.
2322 * testsuite/gcc.dg/graphite/scop-3.c: Dito.
2324 2009-05-01 Tobias Grosser <grosser@fim.uni-passau.de>
2326 * graphite-scop-detection.c (stmt_simple_for_scop_p):
2327 Enable EQ_EXPR and NE_EXPR again.
2329 2009-04-30 Tobias Grosser <grosser@fim.uni-passau.de>
2331 * graphite-scop-detection.c (graphite_can_represent_scev):
2332 Add check if scev is affine multivariate.
2333 (harmful_stmt_in_bb): Check if we can represent the conditions.
2334 (scopdet_basic_block_info (basic_block bb, VEC): Pass the loop to
2336 * testsuite/gcc.dg/graphite/id-7.c: New.
2338 2009-04-30 Tobias Grosser <grosser@fim.uni-passau.de>
2340 * graphite-sese-to-poly.c (bb_contains_non_iv_scalar_phi_nodes):
2341 Check all bbs in region, not only the bbs that are represented in
2343 (build_poly_scop): Add newline.
2344 * testsuite/gcc.dg/graphite/id-8.c: New.
2346 2009-04-30 Li Feng <nemokingdom@gmail.com>
2348 * cfgloop.c (alloc_loop): Initialize can_be_parallel to false
2349 when loop initialize.
2350 * cfgloop.h (struct loop): Introduce flag can_be_parallel.
2351 * common.opt: Declare flag_graphite_force_parallel.
2352 * graphite-clast-to-gimple.c (translate_clast): Mark the innermost
2354 * graphite-poly.c (apply_poly_transforms): Introduce
2355 flag_graphite_force_parallel.
2356 * tree-ssa-loop.c (gate_graphite_transforms): ditto.
2357 * toplev.c (process_options): ditto and replace a not correctly
2360 2009-04-30 Li Feng <nemokingdom@gmail.com>
2362 * graphite-clast-to-gimple.c (loop_iv_stack_patch_for_consts):
2363 Change the call of gbb_loop_at_index and/or gbb_loop_index due
2364 to the redefinition.
2365 (compute_cloog_iv_types_1): ditto.
2366 (build_iv_mapping): ditto.
2367 * graphite-sese-to-poly.c (new_gimple_bb): Remove GBB_LOOPS related
2369 (free_gimple_bb): Removed GBB_LOOPS related free part.
2370 (build_bb_loops): Removed.
2371 * sese.h (struct gimple_bb): Removed loops.
2372 (GBB_LOOPS): Removed.
2373 (gbb_loop_at_index): Instead of using GBB_LOOPS, we use sese instead.
2374 (gbb_loop_index): ditto.
2376 2009-04-24 Tobias Grosser <grosser@fim.uni-passau.de>
2378 * graphite-scop-detection.c (graphite_can_represent_scev): Do not
2379 allow non constant strides.
2380 * testsuite/gcc.dg/graphite/scop-20.c: New.
2382 2009-04-24 Sebastian Pop <sebastian.pop@amd.com>
2384 * graphite-scop-detection.c (dot_all_scops): Fix system call
2385 return value warning.
2388 2009-04-24 Sebastian Pop <sebastian.pop@amd.com>
2390 * testsuite/gcc.dg/graphite/id-6.c: Fix pattern.
2391 * testsuite/gcc.dg/graphite/scop-3.c: Same.
2393 2009-04-24 Sebastian Pop <sebastian.pop@amd.com>
2395 * graphite-poly.c (map_into_dep_poly, map_dr_into_dep_poly,
2396 build_pairwise_constraint, dr_equality_constraints,
2397 build_pairwise_scheduling_equality,
2398 build_pairwise_scheduling_inequality, lexicographically_gt_p,
2399 build_lexicographically_gt_constraint, dependence_polyhedron,
2400 graphite_legal_transform_dr, graphite_legal_transform_bb,
2401 graphite_legal_transform): New.
2402 * graphite-poly.h (graphite_legal_transform): Declared.
2403 * graphite-sese-to-poly.c (build_poly_scop): Call to
2404 graphite_legal_transform is disabled for the moment.
2406 2009-04-24 Sebastian Pop <sebastian.pop@amd.com>
2408 * graphite-poly.h (pbb_nb_scattering_dims): New.
2409 (pbb_nb_scattering): Use it.
2411 2009-04-24 Sebastian Pop <sebastian.pop@amd.com>
2413 * graphite-ppl.c (ppl_insert_dimensions_pointset): Add
2414 Pointset_Powerset version of ppl_insert_dimensions.
2415 * graphite-ppl.h (ppl_insert_dimensions_pointset): Declared.
2417 2009-04-24 Sebastian Pop <sebastian.pop@amd.com>
2419 * graphite-ppl.c (ppl_insert_dimensions): Fix formatting.
2421 2009-04-24 Sebastian Pop <sebastian.pop@amd.com>
2423 * graphite-poly.h: Fix comment.
2425 2009-04-24 Sebastian Pop <sebastian.pop@amd.com>
2427 * graphite-sese-to-poly.c (build_poly_dr): Fix data ref multiplier.
2429 2009-04-24 Tobias Grosser <grosser@fim.uni-passau.de>
2431 * sese.c (expand_scalar_variables_stmt): Only iterate over the old
2434 2009-04-24 Tobias Grosser <grosser@fim.uni-passau.de>
2436 * graphite-sese-to-poly.c (var_used_in_not_loop_header_phi_node): New.
2437 (graphite_stmt_p): Represent bbs necessary to build the phi nodes of
2440 2009-04-20 Sebastian Pop <sebastian.pop@amd.com>
2442 * graphite-scop-detection.c (stmt_simple_for_scop_p): Do not
2443 handle EQ_EXPR and NE_EXPR.
2445 2009-04-17 Tobias Grosser <grosser@fim.uni-passau.de>
2447 * graphite-poly.h (poly_dr): Fix comment.
2449 2009-04-09 Sebastian Pop <sebastian.pop@amd.com>
2450 Tobias Grosser <grosser@fim.uni-passau.de>
2452 * graphite-poly.c (new_poly_bb): Do not initialize PBB_DOMAIN
2453 with a zero dimension polyhedron.
2454 (find_scop_parameters): Move the call to scop_set_nb_params here.
2455 (build_loop_iteration_domains): Store in loop->aux the iteration
2457 (build_scop_iteration_domain): Fix PBB_DOMAIN for bbs not surrounded
2458 by any loop in scop.
2459 (build_poly_scop): Do not call scop_set_nb_params.
2461 2009-04-09 Sebastian Pop <sebastian.pop@amd.com>
2462 Tobias Grosser <grosser@fim.uni-passau.de>
2464 * graphite-sese-to-poly.c (add_condition_to_pbb): Pass code to
2465 add_condition_to_domain not GT_EXPR.
2467 2009-04-09 Tobias Grosser <grosser@fim.uni-passau.de>
2469 * graphite-ppl.c (debug_ppl_powerset_matrix): New.
2470 * graphite-ppl.h (debug_ppl_powerset_matrix): New.
2471 * graphite-sese-to-poly.c (add_condition_to_pbb): Use
2472 upper_bound_assign to calculate unions.
2473 * testsuite/gcc.dg/graphite/id-6.c: New.
2475 2009-04-09 Tobias Grosser <grosser@fim.uni-passau.de>
2477 * graphite-scop-detection.c (canonicalize_loop_closed_ssa): Do not
2478 handle abnormal edges.
2480 2009-04-09 Tobias Grosser <grosser@fim.uni-passau.de>
2482 * graphite-poly.c (new_poly_dr, free_poly_dr): New.
2483 (free_poly_bb): Also free poly_drs.
2484 * graphite-poly.h (new_poly_dr, free_poly_dr): New.
2485 (poly_dr): Polyhedron to Pointset_Powerset.
2486 (pdr_accessp_nb_subscripts): Same.
2487 * graphite-sese-to-poly.c (build_poly_dr): Same. And actually build
2490 2009-04-08 Sebastian Pop <sebastian.pop@amd.com>
2492 * graphite-clast-to-gimple.c (initialize_cloog_names): Change cloog
2493 names into more meaningful names.
2495 2009-04-08 Sebastian Pop <sebastian.pop@amd.com>
2497 * testsuite/gfortran.dg/graphite/interchange-1.c: New.
2498 * testsuite/gfortran.dg/graphite/interchange-2.c: New.
2500 2009-04-08 Sebastian Pop <sebastian.pop@amd.com>
2502 * graphite-clast-to-gimple.c (graphite_loop_normal_form): Do not build
2504 * tree-parloops.c (rewrite_phi_with_iv): New.
2505 (rewrite_all_phi_nodes_with_iv): New.
2506 (canonicalize_loop_ivs): Call them.
2508 2009-04-08 Sebastian Pop <sebastian.pop@amd.com>
2510 * graphite-sese-to-poly.c (try_generate_gimple_bb): Use
2511 graphite_find_data_references_in_stmt.
2512 * tree-data-ref.c (graphite_find_data_references_in_stmt): New.
2513 * tree-data-ref.h (graphite_find_data_references_in_stmt): Declared.
2515 2009-04-08 Sebastian Pop <sebastian.pop@amd.com>
2517 * sese.c (add_loop_exit_phis): Don't fail on non SSA_NAME renames.
2519 2009-04-08 Sebastian Pop <sebastian.pop@amd.com>
2521 * graphite-sese-to-poly.c (build_scop_bbs_1): Use bb_in_sese_p
2522 instead of bb_in_region.
2523 (flag_bb_in_region): Same. Renamed flag_bb_in_sese.
2524 (build_sese_conditions): Use flag_bb_in_sese.
2525 * sese.c (register_bb_in_sese): Removed.
2526 (new_sese): Remove initialization of SESE_REGION_BBS.
2527 (free_sese): Do not free SESE_REGION_BBS.
2528 * sese.h (struct sese): Remove field region_basic_blocks.
2529 (SESE_REGION_BBS): Removed.
2530 (bb_in_sese_p): Implement in function of bb_in_region.
2532 2009-04-08 Sebastian Pop <sebastian.pop@amd.com>
2534 * graphite-scop-detection.c (limit_scops): Deal only with single exit
2537 2009-04-08 Tobias Grosser <grosser@fim.uni-passau.de>
2539 * graphite-scop-detection.c (stmt_simple_for_scop_p): Allow NE_EXPR
2541 * graphite-sese-to-poly.c (create_linear_expr_from_tree): New.
2542 (add_condition_to_domain): New.
2543 (add_condition_to_pbb): New.
2544 (add_conditions_to_domain): Cleanup and handle of NE_EXPR and EQ_EXPR.
2545 * testsuite/gcc.dg/graphite/scop-3.c: Update number of detected SCoPs.
2547 2009-04-08 Tobias Grosser <grosser@fim.uni-passau.de>
2549 * graphite-clast-to-gimple.c (build_cloog_prog): ppl_Polyhedron ->
2550 ppl_Pointset_Powerset.
2551 * graphite-poly.c (new_poly_bb, free_poly_bb): Same.
2552 * graphite-poly.h (poly_bb): poly_bb.domain Same.
2553 (pbb_nb_loops): Same.
2554 * graphite-sese-to-poly.c (build_loop_iteration_domains,
2555 add_conditions_to_domain): Same.
2556 * graphite-ppl.c (new_Cloog_Domain_from_ppl_Pointset_Powerset): New.
2557 (ppl_print_polyhedron_matrix): ppl_Polyhedron_t ->
2558 ppl_const_Polyhedron_t.
2559 (ppl_print_powerset_matrix): New.
2560 * graphite-ppl.h (new_Cloog_Domain_from_ppl_Pointset_Powerset,
2561 ppl_print_powerset_matrix): New.
2562 (ppl_print_polyhedron_matrix): Updated.
2564 2009-04-07 Sebastian Pop <sebastian.pop@amd.com>
2566 * tree-scalar-evolution.c (analyze_scalar_evolution_1): Fix comment.
2568 2009-04-07 Sebastian Pop <sebastian.pop@amd.com>
2570 * graphite-poly.c (extend_scattering): Fix indenting. Free cstr.
2571 (print_iteration_domains, debug_iteration_domain,
2572 debug_iteration_domains): New.
2573 * graphite-poly.h (print_iteration_domains, debug_iteration_domain,
2574 debug_iteration_domains): Declared.
2575 * graphite-sese-to-poly.c (build_pbb_scattering_polyhedrons): Fix
2578 2009-04-03 Tobias Grosser <grosser@fim.uni-passau.de>
2579 Sebastian Pop <sebastian.pop@amd.com>
2581 * graphite-poly.h (print_iteration_domain): New.
2582 * graphite-sese-to-poly.c (add_conditions_to_domain): Fixed bug.
2583 (build_sese_conditions_1, build_sese_conditions_after,
2584 build_sese_conditions_before): New.
2585 (build_sese_conditions): Rewritten.
2587 2009-04-03 Sebastian Pop <sebastian.pop@amd.com>
2588 Tobias Grosser <grosser@fim.uni-passau.de>
2590 Cleanup of code generation liveouts.
2591 * graphite-clast-to-gimple.c (translate_clast): Use a single
2592 rename_map instead of one per translated statement.
2593 Do not use SESE_LIVEOUT_RENAMES.
2594 (graphite_loop_normal_form): Do not use SESE_REDUCTION_LIST.
2595 (gloog): Do not use SESE_LIVEOUT_RENAMES.
2596 * graphite-scop-detection.c (harmful_stmt_in_bb): Return the close
2597 phi node of a reduction: when a loop contains a reduction used outside
2598 the loop, there should be a scalar close phi node on the exit block.
2599 * sese.c (new_sese): Do not initialize SESE_LIVEOUT,
2600 SESE_LIVEOUT_RENAMES, and SESE_REDUCTION_LIST.
2601 (free_sese): Do not free them.
2602 (sese_build_liveouts_use): Do not use them.
2603 (sese_build_liveouts_bb): Same.
2604 (sese_build_liveouts): Same.
2605 (sese_insert_phis_for_liveouts): Same.
2606 (sese_adjust_phis_for_liveouts): Same. Renamed sese_adjust_liveout_phis.
2607 (defined_in_loop_p): New.
2608 (alive_after_loop): New.
2609 (close_phi_not_yet_inserted_p): New.
2610 (struct alep, alep_p): New.
2611 (add_loop_exit_phis): Remove from the rename_map all the names defined
2612 in the code generated loop.
2613 (insert_loop_close_phis): Traverse the rename_map passed to it.
2614 Don't use SESE_LIVEOUT_RENAMES.
2615 (default_liveout_before_guard): Renamed default_before_guard.
2616 (insert_guard_phis): Do not use SESE_LIVEOUT_RENAMES.
2617 (graphite_copy_stmts_from_block): Do not directly call set_rename.
2618 (register_sese_liveout_renames): Removed.
2619 (copy_bb_and_scalar_dependences): Do not call it.
2620 * sese.h (struct sese): Removed fields: liveout, liveout_renames, and
2622 (SESE_LIVEOUT): Removed.
2623 (SESE_LIVEOUT_RENAMES): Removed.
2624 (SESE_REDUCTION_LIST): Removed.
2625 (sese_build_liveouts): Removed.
2626 (sese_adjust_phis_for_liveouts): Renamed sese_adjust_liveout_phis.
2627 (insert_loop_close_phis): Pass a htab_t instead of a sese.
2628 (insert_guard_phis): Same.
2629 (rename_map_elt): Declare a VEC of them.
2630 * tree-parloops.c (canonicalize_loop_ivs): reduction_list contains
2631 trees not pointers to trees.
2633 Rewrite in canonical close SSA form:
2634 * graphite-scop-detection.c (contains_only_close_phi_nodes): New.
2635 (limit_scops): Close the scop after the block containing the close phi
2637 (canonicalize_loop_closed_ssa): New.
2638 (canonicalize_loop_closed_ssa_form): New.
2639 (build_scops): Call canonicalize_loop_closed_ssa_form.
2641 * graphite-sese-to-poly.c: Fix typos.
2643 2009-04-03 Sebastian Pop <sebastian.pop@amd.com>
2645 * graphite-poly.c (print_scattering_function, print_pbb_domain):
2647 (dump_gbb_conditions, dump_gbb_cases, print_iteration_domain): New.
2648 (print_pbb): Add conditions.
2650 2009-04-01 Tobias Grosser <grosser@fim.uni-passau.de>
2651 Sebastian Pop <sebastian.pop@amd.com>
2653 * graphite-scop-detection.c (bb_in_sd_region): Use bb_in_region.
2654 * graphite-sese-to-poly.c (all_non_dominated_preds_marked_p): New.
2655 (build_scop_bbs_1): New.
2656 (build_scop_bbs): Rewrite.
2657 * sese.h (bb_in_region): New.
2659 2009-03-29 Tobias Grosser <grosser@fim.uni-passau.de>
2661 * graphite-poly.c (new_poly_bb, free_poly_bb): Initialize/free
2663 (print_scop): Style.
2664 * graphite-poly.h (poly_bb): Add drs vector.
2665 (PBB_DRS): Add accessor.
2666 * graphite-sese-to-poly.c (build_poly_dr): New.
2667 (build_pbb_drs, build_scop_drs): New.
2668 (build_poly_scop): call build_scop_drs (Disabled at the moment).
2670 2009-03-29 Tobias Grosser <grosser@fim.uni-passau.de>
2672 * tree-ssa-loop.c: Include forgotten toplev.h
2674 2009-03-29 Tobias Grosser <grosser@fim.uni-passau.de>
2676 * graphite-poly.c: (apply_poly_transforms): sorry -> gcc_unreachable.
2677 * testsuite/gcc.dg/graphite/pr37883.c: Remove -floop-*
2678 * testsuite/gcc.dg/graphite/pr37928.c: Same
2679 * testsuite/gcc.dg/graphite/pr38409.c: Same
2680 * testsuite/gcc.dg/graphite/pr38498.c: Same
2681 * testsuite/gcc.dg/graphite/pr38559.c: Same
2682 * testsuite/gcc.dg/graphite/pr39335.c: Same
2683 * testsuite/gcc.dg/graphite/pr39335_1.c: Same
2684 * testsuite/gfortran.dg/graphite/block-2.f: Same
2685 * tree-ssa-loop.c (gate_graphite_transforms): Always fail if called
2688 2009-03-28 Tobias Grosser <grosser@fim.uni-passau.de>
2690 * graphite-sese-to-poly.c (ref_nb_loops, build_access_matrix_with_af,
2691 build_access_matrix, build_scop_data_accesses): Remove access function
2692 building. (We get a new version soon).
2693 (build_bb_loops, scan_tree_for_params_right_scev): Update.
2694 * sese.h (nb_loops_around_loop_in_sese): Remove.
2695 (sese_loop_depth): Do not use SESE_LOOP_NEST any more.
2697 2009-03-27 Tobias Grosser <grosser@fim.uni-passau.de>
2698 Sebastian Pop <sebastian.pop@amd.com>
2700 * graphite-scop-detection.c (struct scopdet_info): Rename last
2702 (scopdet_basic_block_info, build_scops_1): Don't use
2703 CDI_POST_DOMINATORS. CDI_POST_DOMINATORS should never be used.
2705 2009-03-26 Tobias Grosser <grosser@fim.uni-passau.de>
2706 Sebastian Pop <sebastian.pop@amd.com>
2708 * graphite-clast-to-gimple.c (gloog): Call sese_build_liveouts.
2709 * sese.c (sese_build_liveouts_use): Renamed from
2710 sese_build_livein_liveouts_use. Remove liveins.
2711 (sese_build_liveouts_bb): Renamed from sese_build_livein_liveouts_bb.
2712 Call sese_build_liveouts_use.
2713 (sese_build_liveouts): Renamed from sese_build_livein_liveouts.
2714 Call sese_build_liveouts_bb.
2715 (new_sese, free_sese): Remove liveins.
2716 (sese_add_exit_phis_var): Deleted.
2717 (sese_insert_phis_for_liveouts): Call sese_add_exit_phis_edge
2719 (graphite_copy_stmts_from_block): Remove SESE_NUM_VER.
2721 * sese.h (sese): Remove num_ver and livein.
2722 (SESE_LIVEIN, SESE_LIVEIN_VER, SESE_NUM_VER): Removed.
2724 2009-03-25 Tobias Grosser <grosser@fim.uni-passau.de>
2726 * graphite-sese-to-poly.c (build_scop_scattering): Fix compile.
2728 2009-03-25 Tobias Grosser <grosser@fim.uni-passau.de>
2730 * graphite-sese-to-poly.c (compare_prefix_loops): Removed.
2731 (build_scop_scattering): Do not use compare_prefix_loops any more.
2732 (nb_common_loops): New.
2734 2009-03-24 Sebastian Pop <sebastian.pop@amd.com>
2736 * sese.c (get_new_name_from_old_name): Renamed get_rename.
2737 (register_old_and_new_names): Renamed set_rename.
2739 2009-03-24 Sebastian Pop <sebastian.pop@amd.com>
2741 * graphite-scop-detection.h (nb_reductions_in_loop): Revert removal
2742 of the decl from the previous commit.
2744 2009-03-24 Sebastian Pop <sebastian.pop@amd.com>
2746 * graphite-scop-detection.c (dot_scop): New.
2747 * graphite-scop-detection.h (dot_scop): Declared.
2749 2009-03-24 Sebastian Pop <sebastian.pop@amd.com>
2751 * graphite-sese-to-poly.c (compare_prefix_loops): Fix compare.
2753 2009-03-24 Sebastian Pop <sebastian.pop@amd.com>
2755 * cfgloopmanip.c (create_empty_loop_on_edge): Generate the loop exit
2756 condition at the end of the loop.
2757 * graphite.c (graphite_initialize, graphite_finalize): Print to
2758 dump_file the compiled function.
2759 * graphite-clast-to-gimple.c (graphite_create_new_loop): Update use
2760 of create_empty_loop_on_edge.
2761 (translate_clast): Update the code generation of loops for the new
2763 * cfgloop.h (create_empty_loop_on_edge): Update declaration.
2765 2009-03-24 Sebastian Pop <sebastian.pop@amd.com>
2767 Reverted the patch from 2009-03-19.
2769 2009-03-19 Tobias Grosser <grosser@fim.uni-passau.de>
2771 * graphite-poly.c (new_poly_bb, free_poly_bb): Initialize/free
2773 (print_scop): Style.
2774 * graphite-poly.h (poly_bb): Add drs vector.
2775 (PBB_DRS): Add accessor.
2776 * graphite-sese-to-poly.c (ref_nb_loops): Remove.
2777 (build_access_matrix_with_af, build_access_matrix,
2778 build_scop_data_accesses): Delete.
2779 (build_poly_dr): New.
2780 (build_pbb_drs, build_scop_drs): New.
2781 (build_poly_scop): call build_scop_drs.
2783 2009-03-13 Sebastian Pop <sebastian.pop@amd.com>
2785 * graphite-scop-detection.c (dot_all_scops_1): Close the table
2786 once per basic block.
2788 2009-03-13 Tobias Grosser <grosser@fim.uni-passau.de>
2790 * graphite-scop-detection.c (graphite_can_represent_scev): New.
2791 (graphite_can_represent_expr): Renamed from loop_affine_expr
2793 (stmt_simple_for_scop_p): Call graphite_can_represent_expr.
2794 (graphite_cannot_represent_loop): Add scop_entry to parameters.
2795 (scopdet_basic_block_info): Actually define entry_block.
2796 (stmt_simple_memref_p): Moved here from ...
2798 * tree-data-ref.c (stmt_simple_memref_p): here.
2799 * tree-data-ref.h (stmt_simple_memref_p): Removed.
2801 2009-03-13 Tobias Grosser <grosser@fim.uni-passau.de>
2803 * testsuite/gcc.dg/graphite/id-4.c: New.
2805 2009-03-12 Sebastian Pop <sebastian.pop@amd.com>
2807 * sese.c (expand_scalar_variables_expr): Handle tcc_comparison.
2808 (register_old_and_new_names): Update the content of the map.
2809 When there was already a rename_map_elt in the map at that
2811 (copy_bb_and_scalar_dependences): Do rename_variables after
2812 expand_scalar_variables.
2813 * graphite-clast-to-gimple.c (build_iv_mapping): Update the content
2814 of the map. When there was already a rename_map_elt in the
2815 map at that location, free it.
2816 (translate_clast): Pass the rename_map. Do not initialize and free
2817 a rename_map per stmt_user.
2818 (gloog): Initialize and free one rename_map and pass it to
2821 2009-03-12 Sebastian Pop <sebastian.pop@amd.com>
2823 * sese.c (expand_scalar_variables_stmt,
2824 expand_scalar_variables_ssa_name): Add a gimple_stmt_iterator
2826 (expand_scalar_variables_expr): Handle REALPART_EXPR and IMAGPART_EXPR.
2827 (expand_scalar_variables): Pass to expand_scalar_variables_stmt
2828 the gimple_stmt_iterator of the statement to be expanded.
2829 * graphite-scop-detection.c (is_simple_operand): Do handle
2832 2009-03-11 Tobias Grosser <grosser@fim.uni-passau.de>
2834 * graphite-scop-detection.c (is_simple_operand): Do not handle
2836 * testsuite/gcc.dg/graphite/id-2.c: New.
2838 * graphite-sese-to-poly.c (build_bb_loops,
2839 add_value_to_dim, scan_tree_for_params_right_scev,
2840 scan_tree_for_params_int, scan_tree_for_params, idx_record_params,
2841 find_params_in_bb, build_loop_iteration_domains,
2842 add_conditions_to_domain): Remove subtract.
2844 2009-03-11 Tobias Grosser <grosser@fim.uni-passau.de>
2846 * graphite-clast-to-gimple.c (loop_iv_stack_patch_for_consts,
2847 build_iv_mapping, compute_cloog_iv_types_1, build_cloog_prog):
2848 pbb_loop_at_index -> gbb_loop_at_index.
2849 * graphite-poly.c (new_poly_bb, new_scop): New accessors.
2850 (debug_loop_vec): Delete.
2851 * graphite-poly.h (poly_bb, scop): Change black_box and region to void
2852 pointer. Move LOOPS to gimple_bb_p and insert nb_params.
2853 (PBB_LOOPS): Removed.
2854 (PBB_BLACK_BOX): Insert cast.
2855 (pbb_set_black_box): New setter.
2856 (pbb_loop_at_index, pbb_loop_index): Removed.
2857 (scop_set_region, scop_set_nb_params): New.
2858 * graphite-sese-to-poly.c (new_gimple_bb, free_gimple_bb,
2859 build_scop_scattering, build_bb_loops): Add GBB_LOOPS.
2860 (build_poly_scop): Use scop_set_nb_params.
2861 * sese.h (gimple_bb): Add LOOPS.
2862 (GBB_LOOPS, gbb_loop_index, gbb_loop_at_index): New.
2864 2009-03-11 Tobias Grosser <grosser@fim.uni-passau.de>
2866 Revert previous commit.
2868 2009-03-11 Sebastian Pop <sebastian.pop@amd.com>
2870 * sese.c (expand_scalar_variables_expr): Handle tcc_comparison.
2871 (register_old_and_new_names): Update the content of the map.
2872 When there was already a rename_map_elt in the map at that
2874 (copy_bb_and_scalar_dependences): Do rename_variables after
2875 expand_scalar_variables.
2876 * graphite-clast-to-gimple.c (build_iv_mapping): Update the content
2877 of the map. When there was already a rename_map_elt in the
2878 map at that location, free it.
2879 (translate_clast): Pass the rename_map. Do not initialize and free
2880 a rename_map per stmt_user.
2881 (gloog): Initialize and free one rename_map and pass it to
2884 2009-03-11 Tobias Grosser <grosser@fim.uni-passau.de>
2886 Remove forgotten line in revert.
2888 2009-03-11 Sebastian Pop <sebastian.pop@amd.com>
2890 Revert previous commit.
2892 2009-03-10 Sebastian Pop <sebastian.pop@amd.com>
2894 * sese.c (register_old_and_new_names): Update the content
2895 of the map. When there was already a rename_map_elt in the
2896 map at that location, free it.
2897 (copy_bb_and_scalar_dependences): Do rename_variables after
2898 expand_scalar_variables.
2899 * graphite-clast-to-gimple.c (build_iv_mapping): Update the content
2900 of the map. When there was already a rename_map_elt in the
2901 map at that location, free it.
2902 (translate_clast): Pass the rename_map. Do not initialize and free
2903 a rename_map per stmt_user.
2904 (gloog): Initialize and free one rename_map and pass it to
2907 2009-03-10 Sebastian Pop <sebastian.pop@amd.com>
2909 * graphite-clast-to-gimple.c (translate_clast): context_loop
2912 2009-03-10 Tobias Grosser <grosser@fim.uni-passau.de>
2913 Sebastian Pop <sebastian.pop@amd.com>
2915 * graphite-ppl.c (ppl_insert_dimensions): Fix stupid mistake
2916 of the use of ppl_Polyhedron_map_space_dimensions.
2918 2009-03-10 Tobias Grosser <grosser@fim.uni-passau.de>
2919 Sebastian Pop <sebastian.pop@amd.com>
2921 * graphite-poly.c (unify_scattering_dimensions): Fix types.
2922 * graphite-poly.h (poly_dr_p, poly_dr, POLY_DR_TYPE, PDR_BB,
2923 PDR_TYPE, PDR_ACCESSES, pdr_accessp_nb_subscripts,
2924 pdr_accessp_nb_iterators, pdr_accessp_nb_params,
2925 pdr_accessp_alias_set_dim, pdr_accessp_subscript_dim,
2926 pdr_accessp_iterator_dim, pdr_accessp_param_dim,
2927 pbb_nb_params): New.
2928 (pbb_nb_loops, pbb_nb_scattering, scop_nb_params,
2929 nb_loops_around_pbb): Adapt return types.
2931 2009-03-09 Tobias Grosser <grosser@fim.uni-passau.de>
2933 * Makefile.in (graphite.o, graphite-sese-to-poly.o,
2934 graphite-clast-to-gimple.o, graphite-data-ref.o,
2935 graphite-scop-detection.o, graphite-poly.o): Add
2938 2009-03-05 Tobias Grosser <grosser@fim.uni-passau.de>
2940 * Makefile.in (graphite.o, graphite-sese-to-poly.o,
2941 graphite-clast-to-gimple.o, graphite-data-ref.o,
2942 graphite-scop-detection.o, graphite-poly.o): Add graphite-poly.h.
2944 2009-03-04 Tobias Grosser <grosser@fim.uni-passau.de>
2946 * testsuite/gcc.dg/graphite/pr37485.c: Remove -floop-block
2947 * testsuite/gcc.dg/graphite/pr37828.c: Same.
2948 * testsuite/gcc.dg/graphite/pr37684.c: Same.
2949 * testsuite/gcc.dg/graphite/block-0.c: Same.
2950 * testsuite/gcc.dg/graphite/block-1.c: Same.
2951 * testsuite/gcc.dg/graphite/block-2.c: Same.
2952 * testsuite/gcc.dg/graphite/block-3.c: Same.
2953 * testsuite/gcc.dg/graphite/block-4.c: Same.
2954 * testsuite/gcc.dg/graphite/block-5.c: Same.
2955 * testsuite/gcc.dg/graphite/block-6.c: Same.
2956 * testsuite/gfortran.dg/graphite/pr38083.f90: Same.
2957 * testsuite/gfortran.dg/graphite/block-1.f90: Same.
2958 * testsuite/gfortran.dg/graphite/block-3.f90: Same.
2959 * testsuite/gfortran.dg/graphite/pr37852.f90: Same.
2960 * testsuite/gfortran.dg/graphite/block-4.f90: Same.
2961 * testsuite/gfortran.dg/graphite/pr37980.f90: Same.
2962 * testsuite/gfortran.dg/graphite/pr38953.f90: Same.
2963 * testsuite/gfortran.dg/graphite/pr37857.f90: Same.
2964 * opts.c: Remove -floop-block from -O2.
2965 * graphite-poly.c: Fail if -floop-block -floop-interchange or
2966 -floop-strip-mine are used.
2968 2009-03-04 Tobias Grosser <grosser@fim.uni-passau.de>
2969 Sebastian Pop <sebastian.pop@amd.com>
2971 * graphite-clast-to-gimple.c (build_cloog_prog): Unify scattering
2973 * graphite-poly.c (pbb_compare, graphite_sort_pbbs,
2974 graphite_trans_bb_move_loop, graphite_trans_bb_strip_mine,
2975 strip_mine_profitable_p, is_interchange_valid,
2976 graphite_trans_bb_block, graphite_trans_loop_block,
2977 graphite_trans_scop_block): Temporary removed.
2978 (extend_scattering, unify_scattering_dimensions): New.
2979 (print_scattering_function, graphite_read_transforms):
2980 PBB_SCATTERING -> PBB_TRANSFORMED_SCATTERING.
2981 (graphite_generate_scattering_fns): Removed.
2982 (apply_poly_transforms): Cleanup.
2983 (free_poly_bb): Add PBB_SCATTERING -> PBB_TRANSFORMED_SCATTERING.
2984 (schedule_to_scattering): Moved.
2985 (PBB_STATIC_SCHEDULE, PBB_SCATTERING): Removed.
2986 (PBB_ORIGINAL_SCATTERING, PBB_TRANSFORMED_SCATTERING): New.
2987 (pbb_nb_scattering): New.
2988 (SCOP_ENTRY, SCOP_EXIT, SCOP_REGION_BBS, SCOP_DEP_GRAPH, SCOP_PARAMS,
2989 SCOP_LOOP_NEST, SCOP_PARAMS, SCOP_OLDIVS, SCOP_LIVEOUT_RENAMES):
2991 * graphite-ppl.c (ppl_insert_dimensions): Extended and renamed from
2993 (ppl_strip_loop): PBB_SCATTERING -> PBB_TRANSFORMED_SCATTERING.
2994 * graphite-scop-detection.c (dot_all_scops_1): PBB_SCATTERING
2995 -> PBB_TRANSFORMED_SCATTERING.
2996 * graphite-sese-to-poly.c (build_scop_bbs): Remove region.
2997 (build_pbb_scattering_polyhedron): Moved from schedule_to_scattering.
2998 (build_scop_scattering): Renamed from build_scop_canonical_schedules.
2999 (check_poly_representation): Do not return bool.
3000 (graphite_transform_loops): Reformat.
3001 * sese.h (SESE_ENTRY_BB, SESE_EXIT_BB): New.
3003 2009-03-04 Sebastian Pop <sebastian.pop@amd.com>
3005 * graphite-poly.c (print_pbb_domain, print_pbb, print_scop,
3006 debug_pbb_domain, debug_pbb, debug_scop): New.
3007 * graphite-poly.h (print_pbb_domain, print_pbb, print_scop,
3008 debug_pbb_domain, debug_pbb, debug_scop): Declared.
3010 2009-03-02 Sebastian Pop <sebastian.pop@amd.com>
3013 * tree-parloops.c (canonicalize_loop_ivs): Call fold_convert
3014 when the type precision of the induction variable should be
3015 larger than the type precision of nit.
3016 (gen_parallel_loop): Update use of canonicalize_loop_ivs.
3017 * graphite-clast-to-gimple.c (graphite_loop_normal_form): Same.
3018 * tree-flow.h (canonicalize_loop_ivs): Update declaration.
3020 * testsuite/gcc.dg/graphite/pr39335_1.c: New.
3021 * testsuite/gcc.dg/graphite/pr39335.c: New.
3023 2009-03-02 Sebastian Pop <sebastian.pop@amd.com>
3025 * tree-parloops.c (canonicalize_loop_ivs): reduction_list contains
3026 SSA_NAMES not struct reduction_info.
3028 2009-03-02 Sebastian Pop <sebastian.pop@amd.com>
3030 * sese.c (expand_scalar_variables_expr): Handle ADDR_EXPR.
3032 2009-02-27 Sebastian Pop <sebastian.pop@amd.com>
3033 Tobias Grosser <grosser@fim.uni-passau.de>
3035 * sese.c (new_sese): Initialize SESE_REDUCTION_LIST.
3036 (free_sese): Free SESE_REDUCTION_LIST.
3037 * sese.h (struct sese): Add field reduction_list.
3038 (SESE_REDUCTION_LIST): New.
3039 * graphite-clast-to-gimple.c (graphite_loop_normal_form): Call
3040 canonicalize_loop_ivs on SESE_REDUCTION_LIST.
3042 2009-02-27 Sebastian Pop <sebastian.pop@amd.com>
3043 Tobias Grosser <grosser@fim.uni-passau.de>
3045 * tree-flow.h (gather_scalar_reductions): Use struct loop * instead
3048 2009-02-27 Sebastian Pop <sebastian.pop@amd.com>
3049 Tobias Grosser <grosser@fim.uni-passau.de>
3051 * tree-parloops.c (struct brli, build_reduction_list_info,
3052 analyze_reduction_list, gather_scalar_reductions): New.
3053 (loop_parallel_p): Build a reduction list containing only
3054 PHI_RESULT SSA_NAMEs: call gather_scalar_reductions.
3055 (gen_parallel_loop): Call the analysis analyze_reduction_list.
3056 (parallelize_loops): Now reduction_list is a htab_t of SSA_NAMEs.
3057 * tree-flow.h (gather_scalar_reductions): Declared.
3059 2009-02-26 Sebastian Pop <sebastian.pop@amd.com>
3062 * graphite-clast-to-gimple.c (graphite_loop_normal_form): Do not call
3063 number_of_iterations_exit from a gcc_assert.
3065 2009-02-25 Sebastian Pop <sebastian.pop@amd.com>
3066 Jan Sjodin <jan.sjodin@amd.com>
3068 * output.h (graphite_out_file, graphite_in_file): Declared.
3069 * toplev.c (graphite_out_file, graphite_in_file): New.
3070 (init_asm_output): Initialize graphite_in_file and graphite_out_file.
3071 * graphite-clast-to-gimple.c (build_cloog_prog): Read PBB_SCATTERING.
3072 Don't call schedule_to_scattering.
3073 * common.opt (fgraphite-write, fgraphite-read): New.
3074 * graphite-poly.c: Include output.h.
3075 (print_scattering_function, print_scattering_functions,
3076 debug_scattering_function, debug_scattering_functions,
3077 graphite_write_transforms, graphite_read_transforms,
3078 graphite_generate_scattering_fns): New.
3079 (apply_poly_transforms): Do not apply transform if flag_graphite_read.
3080 Call graphite_generate_scattering_fns, graphite_write_transforms,
3081 graphite_read_transforms.
3082 (new_poly_bb): Initialize PBB_SCATTERING.
3083 (free_poly_bb): Free PBB_SCATTERING.
3084 (schedule_to_scattering): Does not return, initialize PBB_SCATTERING.
3085 * graphite-poly.h (struct poly_bb): Add field scattering.
3086 (PBB_SCATTERING): New.
3087 (print_scattering_function, print_scattering_functions,
3088 debug_scattering_function, debug_scattering_functions): Declared.
3089 * graphite-ppl.c (cloog_matrix_to_ppl_constraint): Matrices contain
3090 GMP values, not integers!
3091 (ppl_print_polyhedron_matrix, debug_ppl_polyhedron_matrix,
3092 ppl_read_polyhedron_matrix): New.
3093 * graphite-ppl.h (ppl_print_polyhedron_matrix,
3094 debug_ppl_polyhedron_matrix,
3095 ppl_read_polyhedron_matrix): Declared.
3096 * Makefile.in (graphite-poly.o): Depends on output.h.
3098 2009-02-23 Sebastian Pop <sebastian.pop@amd.com>
3099 Tobias Grosser <grosser@fim.uni-passau.de>
3102 * graphite-scop-detection.c (stmt_simple_for_scop_p): Analyze
3103 scalar evolutions in the scop_entry->loop_father.
3105 2009-02-23 Sebastian Pop <sebastian.pop@amd.com>
3106 Tobias Grosser <grosser@fim.uni-passau.de>
3108 * graphite.h (ref_nb_loops): Remove declaration.
3109 (struct gimple_bb, gimple_bb_p, GBB_BB, GBB_DATA_REFS, GBB_CONDITIONS,
3110 GBB_CONDITION_CASES, GBB_CLOOG_IV_TYPES, gbb_loop, print_gimple_bb,
3111 debug_gbb): Moved to sese.h.
3114 2009-02-23 Sebastian Pop <sebastian.pop@amd.com>
3115 Tobias Grosser <grosser@fim.uni-passau.de>
3117 * graphite-data-ref.[ch]: Disable.
3119 2009-02-23 Sebastian Pop <sebastian.pop@amd.com>
3120 Tobias Grosser <grosser@fim.uni-passau.de>
3122 * graphite-scop-detection.c (stmt_simple_for_scop_p): Analyze
3123 scalar evolutions in the scop_entry->loop_father.
3125 2009-02-23 Sebastian Pop <sebastian.pop@amd.com>
3127 * graphite-scop-detection.c (nb_reductions_in_loop): Moved here...
3128 (graphite_cannot_represent_loop_niter): Renamed
3129 graphite_cannot_represent_loop. Call nb_reductions_in_loop.
3130 (limit_scops): build_sese_loop_nests does not return a bool.
3131 * graphite-scop-detection.h (nb_reductions_in_loop): Declared.
3132 * sese.c (nb_reductions_in_loop): ... from here.
3133 (graphite_loop_normal_form): ... from here.
3134 (sese_record_loop): Does not fail, so does not return a bool.
3135 (build_sese_loop_nests): Same.
3136 * sese.h (build_sese_loop_nests): Update declaration.
3137 * graphite-clast-to-gimple.c (graphite_loop_normal_form): Moved here...
3138 (build_graphite_loop_normal_form): New.
3139 (gloog): Call build_graphite_loop_normal_form.
3140 * graphite-sese-to-poly.c (build_poly_scop): Don't fail on
3141 build_sese_loop_nests.
3143 * testsuite/gcc.dg/graphite/id-1.c: New.
3145 2009-02-23 Sebastian Pop <sebastian.pop@amd.com>
3146 Tobias Grosser <grosser@fim.uni-passau.de>
3148 * graphite-sese-to-poly.c (scan_tree_for_params): Remove REAL_CST.
3149 The SCoP detection fix is sufficient.
3151 2009-02-21 Sebastian Pop <sebastian.pop@amd.com>
3153 PR tree-optimization/39260
3154 * graphite-scop-detection.c (harmful_stmt_in_bb): Stop a SCoP when
3155 the basic block contains a condition with a real type.
3156 * graphite-sese-to-poly.c (scan_tree_for_params): Handle REAL_CST.
3158 * gcc.dg/graphite/pr39260.c: New.
3160 2009-02-21 Sebastian Pop <sebastian.pop@amd.com>
3162 * graphite-poly.c: Inlcude params.h.
3163 (graphite_trans_loop_block): Use PARAM_LOOP_BLOCK_TILE_SIZE for
3165 * Makefile.in (graphite-poly.o): Depend on PARAMS_H.
3166 * params.def (PARAM_LOOP_BLOCK_TILE_SIZE): Define.
3168 2009-02-20 Sebastian Pop <sebastian.pop@amd.com>
3169 Tobias Grosser <grosser@fim.uni-passau.de>
3171 * graphite-scop-detection.c (dot_all_scops_1,
3172 dot_all_scops): Moved here.
3173 * graphite-scop-detection.h (dot_all_scops): Declared here.
3174 * graphite.c (graphite_initialize, graphite_finalize): New.
3175 (graphite_transform_loops): Cleaned up.
3176 * sese.c (debug_oldivs): Moved here.
3177 * graphite-poly.c (graphite_apply_transformations): Renamed
3178 apply_poly_transforms.
3179 (debug_loop_vec): Moved here.
3180 * graphite-sese-to-poly.c (build_bb_loops, build_sese_conditions_1,
3181 scop_contains_non_iv_scalar_phi_nodes, build_sese_conditions,
3182 find_scop_parameters, build_scop_iteration_domain,
3183 add_conditions_to_constraints, build_scop_canonical_schedules,
3184 build_scop_data_accesses): Now static.
3185 (build_poly_scop, check_poly_representation): New.
3187 2009-02-20 Sebastian Pop <sebastian.pop@amd.com>
3189 * graphite.c (graphite_stmt_p, new_gimple_bb, free_gimple_bb,
3190 remove_gbbs_in_scop, free_scops, try_generate_gimple_bb,
3191 build_scop_bbs, ref_nb_loops, compare_prefix_loops,
3192 build_scop_canonical_schedules, build_bb_loops, add_value_to_dim,
3193 scan_tree_for_params_right_scev, scan_tree_for_params_int,
3194 scan_tree_for_params, struct irp_data, dx_record_params,
3195 find_params_in_bb, find_scop_parameters, gbb_from_bb,
3196 build_loop_iteration_domains, add_conditions_to_domain,
3197 phi_node_is_iv, bb_contains_non_iv_scalar_phi_nodes,
3198 scop_contains_non_iv_scalar_phi_nodes, build_sese_conditions_1,
3199 build_sese_conditions, add_conditions_to_constraints,
3200 build_scop_iteration_domain, build_access_matrix_with_af,
3201 build_access_matrix,
3202 build_scop_data_accesses): Moved to graphite-sese-to-poly.c.
3204 * graphite-sese-to-poly.c: New.
3205 * graphite-sese-to-poly.h: New.
3207 * Makefile.in: Add new rule for graphite-sese-to-poly.o.
3209 2009-02-20 Sebastian Pop <sebastian.pop@amd.com>
3211 * graphite.c: Split graphite code generation to a new file.
3212 (graphite_verify, gmp_cst_to_tree, clast_name_to_gcc,
3213 max_precision_type, clast_to_gcc_expression_red,
3214 clast_to_gcc_expression, gcc_type_for_clast_expr,
3215 gcc_type_for_clast_eq, loop_iv_stack_patch_for_consts,
3216 graphite_translate_clast_equation, graphite_create_guard_cond_expr,
3217 graphite_create_new_guard, clast_get_body_of_loop,
3218 gcc_type_for_cloog_iv, gcc_type_for_iv_of_clast_loop,
3219 graphite_create_new_loop, build_iv_mapping, copy_renames,
3220 translate_clast, find_cloog_iv_in_expr, compute_cloog_iv_types_1,
3221 compute_cloog_iv_types, free_scattering, save_var_name,
3222 initialize_cloog_names, build_scop_context, build_cloog_prog,
3223 set_cloog_options, debug_clast_stmt, scop_to_clast,
3224 print_generated_program, debug_generated_program,
3225 gloog): Moved to graphite-clast-to-gimple.c.
3227 (struct cloog_prog_clast): Moved to graphite-clast-to-gimple.h.
3229 (iv_stack_entry_is_constant, iv_stack_entry_is_iv,
3230 loop_iv_stack_push_iv, loop_iv_stack_insert_constant,
3231 loop_iv_stack_pop, loop_iv_stack_get_iv,
3232 loop_iv_stack_get_iv_from_name, debug_loop_iv_stack,
3233 free_loop_iv_stack, loop_iv_stack_remove_constants,
3234 debug_rename_elt, debug_rename_map_1, debug_rename_map,
3235 rename_map_elt_info, eq_rename_map_elts, debug_ivtype_elt,
3236 debug_ivtype_map_1, debug_ivtype_map, ivtype_map_elt_info,
3237 eq_ivtype_map_elts, sese_add_exit_phis_edge,
3238 sese_add_exit_phis_var, sese_insert_phis_for_liveouts,
3239 get_vdef_before_sese, sese_adjust_vphi,
3240 get_new_name_from_old_name, sese_adjust_phis_for_liveouts,
3241 oldiv_for_loop, rename_variables_in_stmt, is_parameter,
3242 is_iv, expand_scalar_variables_ssa_name,
3243 expand_scalar_variables_expr, expand_scalar_variables_stmt,
3244 expand_scalar_variables, rename_variables, remove_condition,
3245 get_true_edge_from_guard_bb, get_false_edge_from_guard_bb,
3246 add_loop_exit_phis, insert_loop_close_phis, struct igp,
3247 default_liveout_before_guard, add_guard_exit_phis,
3248 insert_guard_phis, register_old_and_new_names,
3249 graphite_copy_stmts_from_block, register_sese_liveout_renames,
3250 copy_bb_and_scalar_dependences, outermost_loop_in_sese,
3251 if_region_set_false_region, create_if_region_on_edge,
3252 move_sese_in_condition): Moved to sese.c.
3254 (nb_loops_around_loop_in_sese, struct ifsese, if_region_entry,
3255 if_region_exit, if_region_get_condition_block,
3256 struct rename_map_elt, new_rename_map_elt, enum iv_stack_entry_kind,
3257 union iv_stack_entry_data_union, struct iv_stack_entry_struct,
3258 iv_stack_entry_p, loop_iv_stack, struct ivtype_map_elt,
3259 ivtype_map_elt, new_ivtype_map_elt,
3260 recompute_all_dominators): Moved to sese.h.
3262 * graphite-clast-to-gimple.c: New.
3263 * graphite-clast-to-gimple.h: New.
3264 * Makefile.in: Add new rule for graphite-clast-to-gimple.o.
3265 * sese.c: Modified as said above.
3268 2009-02-20 Sebastian Pop <sebastian.pop@amd.com>
3270 * graphite.c: Split scop detection to a new file.
3271 (enum gbb_type, gbb_type, get_bb_type, struct sd_region_p, sd_region,
3272 move_sd_regions, loop_affine_expr, exclude_component_ref,
3273 is_simple_operand, stmt_simple_for_scop_p, harmful_stmt_in_bb,
3274 graphite_cannot_represent_loop_niter, struct scopdet_info,
3275 scopdet_basic_block_info, build_scops_1, bb_in_sd_region,
3276 find_single_entry_edge, find_single_exit_edge,
3277 create_single_entry_edge, sd_region_without_exit,
3278 create_single_exit_edge, unmark_exit_edges, mark_exit_edges,
3279 create_sese_edges, build_graphite_scops, limit_scops, build_scops):
3280 Moved to graphite-scop-detection.c.
3282 * graphite-scop-detection.c: New.
3283 * graphite-scop-detection.h: New.
3284 * Makefile.in: Add new rule for graphite-scop-detection.o.
3286 * sese.c: Include tree-chrec.h, tree-data-ref.h, and
3287 tree-scalar-evolution.h.
3288 (nb_reductions_in_loop, graphite_loop_normal_form, sese_record_loop,
3289 build_sese_loop_nests): Moved here from graphite.c.
3290 (param_index): Renamed parameter_index_in_region.
3292 2009-02-18 Tobias Grosser <grosser@fim.uni-passau.de>
3293 Sebastian Pop <sebastian.pop@amd.com>
3295 * gcc.dg/graphite/block-0.c: Expected to fail now.
3296 * gcc.dg/graphite/block-1.c: Same.
3297 * gcc.dg/graphite/block-5.c: Same.
3298 * gcc.dg/graphite/block-6.c: Same.
3300 2009-02-18 Tobias Grosser <grosser@fim.uni-passau.de>
3301 Sebastian Pop <sebastian.pop@amd.com>
3303 * graphite.h: Separate from graphite_bb_p the polyhedral
3304 representation in poly_bb_p and the GCC specifics in gimple_bb_p.
3305 (struct data_dependence_polyhedron, RDGE_DDP, ddp_p): Moved to
3306 graphite-data-ref.h.
3307 (struct poly_bb, PBB_SCOP, PBB_STATIC_SCHEDULE, PBB_DOMAIN,
3308 PBB_BLACK_BOX, PBB_LOOPS, pbb_nb_loops, pbb_loop_at_index,
3309 pbb_loop_index, struct scop, SCOP_BBS, SCOP_REGION, SCOP_ENTRY,
3310 SCOP_EXIT, SCOP_REGION_BBS, SCOP_DEP_GRAPH, SCOP_PARAMS,
3311 SCOP_LOOP_NEST, SCOP_PARAMS, SCOP_OLDIVS, SCOP_LIVEOUT_RENAMES,
3312 scop_nb_params): Moved to graphite-poly.h.
3313 * graphite-data-ref.c: Same.
3314 * graphite-data-ref.h: New.
3316 (pbb_compare, graphite_sort_pbbs, graphite_trans_bb_move_loop,
3317 graphite_trans_bb_strip_mine, strip_mine_profitable_p,
3318 is_interchange_valid, graphite_trans_bb_block,
3319 graphite_trans_loop_block, scop_max_loop_depth,
3320 graphite_trans_scop_block, graphite_apply_transformations,
3321 new_poly_bb, free_poly_bb, new_scop, free_scop): Moved to
3323 * graphite-poly.h: New.
3324 * graphite-poly.c: New.
3325 * Makefile.in (OBJS-common): Add graphite-poly.o.
3326 (graphite-poly.o): New rule.
3327 * tree-data-ref.h (struct data_reference): Remove unused scop field.
3330 2009-02-18 Sebastian Pop <sebastian.pop@amd.com>
3331 Tobias Grosser <grosser@fim.uni-passau.de>
3333 * graphite.c: Replace gb -> gbb.
3335 * graphite-data-ref.c: Same.
3337 2009-02-18 Sebastian Pop <sebastian.pop@amd.com>
3338 Tobias Grosser <grosser@fim.uni-passau.de>
3340 * Makefile.in (OBJS-commmon): Add sese.o.
3342 (graphite.o): Add sese.h.
3343 * graphite.c (bb_in_ss_p, loop_in_sese_p,
3344 sese_build_livein_liveouts_use, sese_build_livein_liveouts_bb,
3345 sese_build_livein_liveouts, register_bb_in_sese, new_sese, free_sese):
3347 (block_before_scop): Add missing return.
3348 (new_scop, free_scop): Remove SESE data structures.
3349 (scop_record_loop, scan_tree_for_params, find_params_in_bb,
3350 find_scop_parameters, build_loop_iteration_domains,
3351 add_conditions_to_domain, register_scop_liveout_renames,
3352 copy_bb_and_scalar_dependences): Scop -> SESE.
3354 (add_conditions_to_domain): SCoP -> SESE and remove check
3355 (scop_contains_non_iv_scalar_phi_nodes): New.
3356 (build_scop_conditions_1, build_scop_conditions): Remove check for
3357 non iv scalar phi nodes.
3358 (print_scop_statistics): New.
3359 (graphite_transform_loops): Cleanup.
3361 * graphite.h: Move to sese & cleanup.
3365 2009-02-16 Sebastian Pop <sebastian.pop@amd.com>
3366 Tobias Grosser <grosser@fim.uni-passau.de>
3368 * graphite.c (build_scop_conditions_1): Conditions are only
3369 at the end of a basic block.
3371 2009-02-16 Sebastian Pop <sebastian.pop@amd.com>
3372 Tobias Grosser <grosser@fim.uni-passau>
3374 * graphite.h (struct graphite_bb): Remove compressed_alpha_matrix
3376 (GBB_ALPHA): Removed.
3378 2009-02-16 Sebastian Pop <sebastian.pop@amd.com>
3379 Tobias Grosser <grosser@fim.uni-passau.de>
3381 * graphite-data-ref.c (graphite_test_dependence): Don't use
3382 GBB_DYNAMIC_SCHEDULE.
3383 * graphite.c (new_graphite_bb): Same.
3384 (free_graphite_bb): Same.
3385 (build_scop_dynamic_schedules): Removed.
3386 (graphite_transform_loops): Don't call it.
3387 * graphite.h (struct graphite_bb): Remove dynamic_schedule field.
3388 (GBB_DYNAMIC_SCHEDULE): Removed.
3390 2009-02-16 Sebastian Pop <sebastian.pop@amd.com>
3391 Tobias Grosser <grosser@fim.uni-passau.de>
3393 * graphite.c (schedule_to_scattering): Don't use CloogMatrix.
3394 (print_graphite_bb): Same.
3395 (build_cloog_prog): Same.
3397 2009-02-16 Sebastian Pop <sebastian.pop@amd.com>
3398 Tobias Grosser <grosser@fim.uni-passau.de>
3400 * graphite.c (build_cloog_prog): Don't use CloogMatrix.
3402 2009-02-16 Sebastian Pop <sebastian.pop@amd.com>
3403 Tobias Grosser <grosser@fim.uni-passau.de>
3405 * graphite.c (build_scop_context): Don't use CloogMatrix.
3406 * graphite-ppl.c (new_Cloog_Domain_from_ppl_Polyhedron): New.
3407 * graphite-ppl.h (new_Cloog_Domain_from_ppl_Polyhedron): Declared.
3409 2009-02-16 Sebastian Pop <sebastian.pop@amd.com>
3410 Tobias Grosser <grosser@fim.uni-passau.de>
3412 * graphite.h (struct scop): Move params, old_ivs, loops, loop_nest,
3413 liveout_renames, add_params fields...
3414 (struct sese): ... here.
3415 (SESE_PARAMS, SESE_LOOPS, SESE_LOOP_NEST, SESE_ADD_PARAMS,
3416 SESE_PARAMS, SESE_OLDIVS, SESE_LIVEOUT_RENAMES): New.
3418 2009-02-16 Sebastian Pop <sebastian.pop@amd.com>
3419 Tobias Grosser <grosser@fim.uni-passau.de>
3421 * graphite.c (print_scop): Do not print the CLooG program.
3422 (new_scop, free_scop, initialize_cloog_names, build_scop_context,
3423 build_cloog_prog, gloog): Don't use SCOP_PROG.
3424 (find_transform): Renamed scop_to_clast.
3425 (print_generated_program, debug_generated_program): New.
3426 (graphite_transform_loops): Adapt to new interface.
3427 * graphite.h (struct scop): Remove program field.
3428 (SCOP_PROG): Removed.
3429 (print_generated_program, debug_generated_program): Declared.
3431 2009-02-16 Sebastian Pop <sebastian.pop@amd.com>
3433 * graphite-data-ref.c (schedule_precedes_p, schedule_same_p): New.
3434 (statement_precedes_p): Use schedule_same_p and schedule_precedes_p.
3435 * graphite.c (gbb_compare, schedule_to_scattering, print_graphite_bb,
3436 free_graphite_bb, build_scop_canonical_schedules,
3437 graphite_trans_bb_strip_mine, graphite_trans_scop_block): Static
3438 schedules are now represented using a ppl_Linear_Expression_t.
3439 * graphite.h (struct graphite_bb): Same.
3440 * graphite-ppl.c (ppl_lexico_compare_linear_expressions): New.
3441 * graphite-ppl.h (ppl_lexico_compare_linear_expressions): Declared.
3443 2009-02-15 Sebastian Pop <sebastian.pop@amd.com>
3445 * graphite.c: Free local memory.
3446 * graphite-ppl.c: Same.
3448 2009-02-15 Sebastian Pop <sebastian.pop@amd.com>
3450 * graphite.c (const_column_index, get_first_matching_sign_row_index,
3451 get_lower_bound_row, get_upper_bound_row, copy_constraint,
3452 swap_constraint_variables, scale_constraint_variable): Removed.
3453 (graphite_trans_bb_strip_mine): Remove pong.
3454 * graphite-ppl.c: Include missing header files.
3455 (set_inhomogeneous, set_coef, shift_poly, ppl_strip_loop): New.
3456 * graphite-ppl.h (ppl_strip_loop): Declared.
3457 * Makefile.in (graphite-ppl.o): Adjust dependences.
3459 2009-02-14 Sebastian Pop <sebastian.pop@amd.com>
3461 * graphite.c (build_loop_iteration_domains): Remove ping pong.
3462 (build_scop_iteration_domain): Same.
3464 2009-02-13 Sebastian Pop <sebastian.pop@amd.com>
3466 * graphite.c (scan_tree_for_params, add_conditions_to_domain): Remove
3468 (add_value_to_dim, scan_tree_for_params_right_scev,
3469 scan_tree_for_params_int): New.
3470 * graphite-ppl.c (oppose_constraint): New.
3471 (insert_constraint_into_matrix): Implement missing cases.
3472 * graphite-ppl.h (insert_constraint_into_matrix): Declared.
3474 2009-02-13 Sebastian Pop <sebastian.pop@amd.com>
3476 * graphite.c (graphite_trans_bb_move_loop): Remove ping pong,
3477 use ppl_move_dimension.
3479 2009-02-12 Sebastian Pop <sebastian.pop@amd.com>
3481 * graphite-data-ref.c: Domains are now ppl_Polyhedra_t.
3484 * graphite-ppl.c: Same.
3485 * graphite-ppl.h: Same.
3487 2009-02-12 Sebastian Pop <sebastian.pop@amd.com>
3489 Revert last 3 commits.
3491 2009-02-10 Sebastian Pop <sebastian.pop@amd.com>
3493 * graphite.c (scan_tree_for_params, add_conditions_to_domain): Remove
3495 (add_value_to_dim, scan_tree_for_params_right_scev,
3496 scan_tree_for_params_int): New.
3497 * graphite-ppl.c (oppose_constraint): New.
3498 (insert_constraint_into_matrix): Implement missing cases.
3499 * graphite-ppl.h (insert_constraint_into_matrix): Declared.
3501 2009-02-10 Sebastian Pop <sebastian.pop@amd.com>
3503 * graphite.c (graphite_trans_bb_move_loop): Remove unused variables.
3505 2009-02-10 Sebastian Pop <sebastian.pop@amd.com>
3506 Tobias Grosser <grosser@fim.uni-passau.de>
3508 * graphite.c (graphite_trans_bb_move_loop): Remove ping pong,
3509 use ppl_move_dimension.
3510 * graphite-ppl.c (ppl_move_dimension): New.
3511 * graphite-ppl.h (ppl_move_dimension): Declared.
3513 2009-02-10 Sebastian Pop <sebastian.pop@amd.com>
3515 * graphite.c: Do not include cloog/cloog.h.
3516 (print_graphite_bb): Remove ping pong, call PPL print function.
3518 2009-02-10 Tobias Grosser <grosser@fim.uni-passau.de>
3520 * Makefile.in (OBJS-common): Add graphite-ppl.o.
3521 (graphite.o): Add dependence on graphite-ppl.h.
3522 (graphite-ppl.o): New.
3523 (graphite-data-ref.c): Ping pong between PPL data structures
3525 * graphite-ppl.c: New.
3526 * graphite-ppl.h: New.
3527 * graphite.c: Include graphite-ppl.h.
3528 (print_graphite_bb, add_conditions_to_domain, build_cloog_prog,
3529 graphite_trans_bb_move_loop, graphite_trans_bb_strip_mine):
3530 Ping pong between PPL data structures and matrices.
3531 (new_graphite_bb): Create a PPL constraint system.
3532 Call ppl_delete_Constraint_System instead of cloog_matrix_free.
3533 (build_loop_iteration_domains): Use PPL functions.
3534 * graphite.h: Include graphite-ppl.h. Fix comments.
3535 (graphite_bb): Use a ppl_Constraint_System_t instead of
3536 CloogMatrix for representing the domain.
3537 (scop): Remove static_schedule.
3538 (gbb_nb_loops): Ping pong between PPL data structures and matrices.
3540 2009-02-06 Sebastian Pop <sebastian.pop@amd.com>
3542 * graphite.c: Fix some comments.
3544 2009-02-05 Sebastian Pop <sebastian.pop@amd.com>
3547 * graphite.c (if_region_set_false_region): After moving a region
3548 in the false branch of a condition, remove the empty dummy
3550 (gloog): Remove wrong fix for PR38953.
3552 2009-02-03 Tobias Grosser <grosser@fim.uni-passau.de>
3554 * graphite.c (bb_in_sese_p, sese_build_livein_liveouts_use,
3555 sese_build_livein_liveouts_bb, sese_build_livein_liveouts,
3556 register_bb_in_sese, new_sese, free_sese): Moved.
3557 (dot_scop_1, build_scop_loop_nests, build_loop_iteration_domains,
3558 outermost_loop_in_scop, build_scop_iteration_domain,
3559 expand_scalar_variables_ssa_name, get_vdef_before_scop,
3560 limit_scops): Use bb_in_sese_p instead of bb_in_scop_p.
3561 Use loop_in_sese_p instead of loop_in_scop_p.
3562 (new_graphite_bb, new_scop, gloog): Do not initialize SCOP_BBS_B.
3563 (free_scop): Do not free SCOP_BBS_B.
3564 (nb_loops_around_loop_in_scop, nb_loops_around_gb,
3565 ref_nb_loops): Moved here...
3566 * graphite.h (ref_nb_loops): ... from here.
3567 (struct scop): Remove bbs_b bitmap.
3568 (SCOP_BBS_B, bb_in_scop_p, loop_in_scop_p): Removed.
3569 * testsuite/gcc.dg/graphite/scop-19.c: New
3571 2009-02-03 Tobias Grosser <grosser@fim.uni-passau.de>
3573 * graphite.c (scopdet_basic_block_info): Fix bug in scop
3576 2009-01-30 Tobias Grosser <grosser@fim.uni-passau.de>
3578 * graphite.c (new_loop_to_cloog_loop_str, hash_loop_to_cloog_loop,
3579 eq_loop_to_cloog_loop): Remove.
3580 (new_scop, free_scop): Remove SCOP_LOOP2CLOOG_LOOP.
3581 * graphite.h (struct scop): Remove loop2cloog_loop.
3582 (loop_domain_dim, loop_iteration_vector_dim): Remove.
3584 2009-01-30 Tobias Grosser <grosser@fim.uni-passau.de>
3586 * opts.c (decode_options): Only add graphite options to O2
3587 if we compile with graphite enabled.
3589 2009-01-26 Sebastian Pop <sebastian.pop@amd.com>
3591 * Merge from mainline (r143163:143684).
3593 2009-01-26 Sebastian Pop <sebastian.pop@amd.com>
3595 * graphite.c (debug_value): Removed.
3596 * graphite.h (debug_value): Removed.
3598 2009-01-23 Sebastian Pop <sebastian.pop@amd.com>
3600 * passes.c (init_optimization_passes): Do not call pass_copy_prop
3601 after graphite: pass_copy_prop does not maintain a proper loop closed
3602 SSA form. pass_copy_prop should be fixed.
3604 2009-01-23 Sebastian Pop <sebastian.pop@amd.com>
3606 * graphite.c (scop_adjust_phis_for_liveouts): Fix warning.
3608 2009-01-23 Sebastian Pop <sebastian.pop@amd.com>
3610 * graphite.c (graphite_verify): Add a call to verify_loop_closed_ssa.
3611 (gloog): Split the exit of the scop when the scop exit is a loop exit.
3612 (graphite_transform_loops): Only call cleanup_tree_cfg if gloog
3615 2009-01-20 Sebastian Pop <sebastian.pop@amd.com>
3617 * graphite.c (gloog): Return true when code gen succeeded.
3618 (graphite_transform_loops): Do not call cleanup_tree_cfg if
3619 the code of the function did not changed. After cleanup_tree_cfg
3620 call rewrite_into_loop_closed_ssa to maintain the loop closed ssa
3623 2009-01-19 Sebastian Pop <sebastian.pop@amd.com>
3625 * graphite.c (stmt_simple_for_scop_p): Also handle cases when
3626 gimple_call_lhs is NULL.
3628 2009-01-16 Sebastian Pop <sebastian.pop@amd.com>
3629 Tobias Grosser <tobi.grosser@amd.com>
3631 * graphite.c (graphite_trans_scop_block): Do not block single
3634 2009-01-15 Sebastian Pop <sebastian.pop@amd.com>
3635 Tobias Grosser <tobi.grosser@amd.com>
3637 * graphite.c (build_scop_canonical_schedules): Start schedules at
3640 2009-01-15 Sebastian Pop <sebastian.pop@amd.com>
3641 Tobias Grosser <tobi.grosser@amd.com>
3643 * graphite.c (compare_prefix_loops): New.
3644 (build_scop_canonical_schedules): Rewritten.
3645 (graphite_transform_loops): Move build_scop_canonical_schedules
3646 after build_scop_iteration_domain.
3648 2009-01-14 Sebastian Pop <sebastian.pop@amd.com>
3649 Tobias Grosser <tobi.grosser@amd.com>
3651 * graphite.c (add_conditions_to_domain): Add the loops to
3652 the dimension of the iteration domain. Do copy the domain
3653 only when it exists.
3654 (build_scop_conditions_1): Do not call add_conditions_to_domain.
3655 (add_conditions_to_constraints): New.
3656 (can_generate_code_stmt, can_generate_code): Removed.
3657 (gloog): Do not call can_generate_code.
3658 (graphite_transform_loops): Call add_conditions_to_constraints
3659 after building the iteration domain.
3661 2009-01-14 Sebastian Pop <sebastian.pop@amd.com>
3662 Tobias Grosser <tobi.grosser@amd.com>
3663 Jan Sjodin <jan.sjodin@amd.com>
3665 * graphite.c (scan_tree_for_params): On substractions negate
3666 all the coefficients of the term.
3667 (clast_to_gcc_expression_red): New. Handle reduction expressions
3668 of more than two operands.
3669 (clast_to_gcc_expression): Call clast_to_gcc_expression_red.
3670 (get_vdef_before_scop): Handle also the case of default definitions.
3672 2009-01-14 Sebastian Pop <sebastian.pop@amd.com>
3675 * graphite.c (get_vdef_before_scop, scop_adjust_vphi): New.
3676 (scop_adjust_phis_for_liveouts): Call scop_adjust_vphi.
3677 (gloog): Do not call cleanup_tree_cfg.
3678 (graphite_transform_loops): Call cleanup_tree_cfg after all
3679 scops have been code generated.
3681 2009-01-13 Sebastian Pop <sebastian.pop@amd.com>
3683 * passes.c (init_optimization_passes): Schedule after
3684 graphite transforms pass_copy_prop, pass_dce_loop and pass_lim.
3686 2009-01-13 Sebastian Pop <sebastian.pop@amd.com>
3688 * graphite.c (expand_scalar_variables_stmt): Do not pass loop_p.
3690 (expand_scalar_variables_ssa_name): Do not pass loop_p. Fix comment.
3691 Set the type of an expression to the type of its assign statement.
3692 (expand_scalar_variables_expr): Do not pass loop_p.
3693 Fix comment. Stop recursion on tcc_constant or tcc_declaration.
3694 (copy_bb_and_scalar_dependences): Do not pass loop_p.
3695 (translate_clast): Update call to copy_bb_and_scalar_dependences.
3697 2009-01-11 Sebastian Pop <sebastian.pop@amd.com>
3699 * graphite.c (expand_scalar_variables_ssa_name): Set the type of
3700 an expression to the gimple_expr_type of its assign statement.
3701 (expand_scalar_variables_expr): Stop recursion on tcc_constant
3704 2009-01-11 Sebastian Pop <sebastian.pop@amd.com>
3706 PR tree-optimization/38786
3707 * testsuite/gcc.dg/graphite/pr38786.c: New.
3708 * graphite.c (expand_scalar_variables_ssa_name): New, outlined from
3709 the SSA_NAME case of expand_scalar_variables_expr.
3710 (expand_scalar_variables_expr): Also gather the scalar computation
3711 used to index the memory access.
3712 (expand_scalar_variables_stmt): Pass to expand_scalar_variables_expr
3713 the gimple_stmt_iterator where it inserts new code.
3715 2009-01-10 Sebastian Pop <sebastian.pop@amd.com>
3717 * testsuite/gcc.dg/graphite/block-3.c: Fix compile error on 32bit.
3719 2009-01-10 Sebastian Pop <sebastian.pop@amd.com>
3721 * opts.c (decode_options): Enable flag_graphite_identity and
3722 flag_loop_block in -O2 and above.
3724 2009-01-08 Sebastian Pop <sebastian.pop@amd.com>
3726 * libjava/classpath/lib/gnu/java/awt/peer/gtk/GtkMouseInfoPeer.class:
3727 Fix merge problem: replace with the file from trunk.
3729 2009-01-08 Sebastian Pop <sebastian.pop@amd.com>
3731 * Merge from mainline (r141727:143163).
3733 2009-01-07 Sebastian Pop <sebastian.pop@amd.com>
3734 Jan Sjodin <jan.sjodin@amd.com>
3736 PR tree-optimization/38559
3737 * testsuite/gcc.dg/graphite/pr38559.c: New.
3739 * graphite.c (debug_value, copy_constraint,
3740 swap_constraint_variables, scale_constraint_variable, ): New.
3741 (get_lower_bound, get_upper_bound): Removed.
3742 (graphite_trans_bb_strip_mine): Clean up this code that works
3743 only for constant number of iterations. Fully copy upper and
3744 lower bound constraints, not only the constant part of them.
3745 * graphite.h (debug_value): Declared.
3747 2009-01-06 Jan Sjodin <jan.sjodin@amd.com>
3749 PR tree-optimization/38492
3750 PR tree-optimization/38498
3751 * tree-check.c (operator_is_linear, scev_is_linear_expression): New.
3752 * tree-chrec.h (scev_is_linear_expression): Declared.
3753 * graphite.c (graphite_cannot_represent_loop_niter): New.
3754 (scopdet_basic_block_info): Call graphite_cannot_represent_loop_niter.
3755 (graphite_loop_normal_form): Use gcc_assert.
3756 (scan_tree_for_params): Use CASE_CONVERT.
3757 (phi_node_is_iv, bb_contains_non_iv_scalar_phi_nodes): New.
3758 (build_scop_conditions_1): Call bb_contains_non_iv_scalar_phi_nodes.
3759 Use gcc_assert. Discard scops that contain unhandled cases.
3760 (build_scop_conditions): Return a boolean status for unhandled cases.
3761 (strip_mine_profitable_p): Print the loop number, not its depth.
3762 (is_interchange_valid): Pass the depth of the loop nest, don't
3763 recompute it wrongly.
3764 (graphite_trans_bb_block): Same.
3765 (graphite_trans_bb_block): Print tentative of loop blocking.
3766 (graphite_trans_scop_block): Do not print that the loop has been
3768 (graphite_transform_loops): Do not handle scops that contain condition
3771 * testsuite/gcc.dg/graphite/pr38500.c: Fixed warning as committed
3773 * testsuite/gcc.dg/graphite/block-0.c: Update test.
3774 * testsuite/gcc.dg/graphite/block-1.c: Same.
3775 * testsuite/gcc.dg/graphite/block-2.c: Remove xfail and test for
3777 * testsuite/gcc.dg/graphite/block-4.c: Remove test for strip mine.
3778 * testsuite/gcc.dg/graphite/block-3.c: New.
3779 * testsuite/gcc.dg/graphite/pr38498.c: New.
3781 2008-12-22 Harsha Jagasia <harsha.jagasia@amd.com>
3783 PR tree-optimization/38510
3784 * gcc.dg/graphite/pr38510.c: New.
3785 * graphite.c (recompute_all_dominators): Call mark_irreducible_loops.
3786 (translate_clast): Call recompute_all_dominators before
3788 (gloog): Call recompute_all_dominators before graphite_verify.
3790 2008-12-12 Sebastian Pop <sebastian.pop@amd.com>
3792 PR tree-optimization/38492
3793 * graphite.c (rename_map_elt, debug_rename_elt,
3794 debug_rename_map_1, debug_rename_map, new_rename_map_elt,
3795 rename_map_elt_info, eq_rename_map_elts,
3796 get_new_name_from_old_name, bb_in_sese_p): Moved around.
3797 (sese_find_uses_to_rename_use): Renamed sese_build_livein_liveouts_use.
3798 (sese_find_uses_to_rename_bb): Renamed sese_build_livein_liveouts_bb.
3799 (sese_build_livein_liveouts): New.
3800 (new_sese, free_sese): New.
3801 (new_scop): Call new_sese.
3802 (free_scop): Call free_sese.
3803 (rename_variables_from_edge, rename_phis_end_scop): Removed.
3804 (register_old_new_names): Renamed register_old_and_new_names.
3805 (register_scop_liveout_renames, add_loop_exit_phis,
3806 insert_loop_close_phis, struct igp,
3807 default_liveout_before_guard, add_guard_exit_phis,
3808 insert_guard_phis, copy_renames): New.
3809 (translate_clast): Call insert_loop_close_phis and insert_guard_phis.
3810 (sese_add_exit_phis_edge): Renamed scop_add_exit_phis_edge.
3811 (rewrite_into_sese_closed_ssa): Renamed scop_insert_phis_for_liveouts.
3812 (scop_adjust_phis_for_liveouts): New.
3813 (gloog): Call scop_adjust_phis_for_liveouts.
3815 * graphite.h (struct sese): Documented. Added fields liveout,
3817 (SESE_LIVEOUT, SESE_LIVEIN, SESE_LIVEIN_VER, SESE_NUM_VER): New.
3818 (new_sese, free_sese, sese_build_livein_liveouts): Declared.
3819 (struct scop): Added field liveout_renames.
3820 (SCOP_LIVEOUT_RENAMES): New.
3822 2008-12-11 Sebastian Pop <sebastian.pop@amd.com>
3824 PR tree-optimization/38409
3825 * gcc.dg/graphite/pr38409.c: New.
3826 * graphite.c (nb_reductions_in_loop): Use simple_iv.
3828 2008-12-11 Sebastian Pop <sebastian.pop@amd.com>
3830 * graphite.c (gcc_type_for_cloog_iv): By default return
3832 (graphite_create_new_loop): Don't fold_convert the already
3833 fold_convert-ed expression.
3835 2008-12-11 Harsha Jagasia <harsha.jagasia@amd.com>
3837 PR tree-optimization/38446
3838 * gcc.dg/graphite/pr38446.c: New.
3839 * graphite.c (register_bb_in_sese): New.
3840 (bb_in_sese_p): Check if bb belongs to sese region by explicitly
3841 looking at the bbs in the region.
3842 * graphite.h (sese): Add region_basic_blocks pointer set to
3843 structure and initialize at the time of defining new scop.
3845 2008-12-11 Tobias Grosser <grosser@fim.uni-passau.de>
3847 * graphite.c (new_graphite_bb): Initialize GBB_STATIC_SCHEDULE.
3848 (find_params_in_bb): Do not free data refs.
3849 (free_graphite_bb): Add FIXME on disabled free_data_refs.
3851 2008-12-11 Sebastian Pop <sebastian.pop@amd.com>
3853 * testsuite/gcc.dg/graphite/scop-16.c: Test only scop specific info.
3854 * testsuite/gcc.dg/graphite/scop-17.c: Same.
3855 * testsuite/gcc.dg/graphite/block-5.c: New.
3856 * testsuite/gcc.dg/graphite/block-6.c: New.
3857 * testsuite/gcc.dg/graphite/pr37485.c: Clean dump file after.
3858 * testsuite/gcc.dg/graphite/pr37684.c: Same.
3859 * testsuite/gcc.dg/graphite/block-2.c: Same.
3861 * graphite.c (struct ivtype_map_elt): New.
3862 (debug_ivtype_elt, debug_ivtype_map_1, debug_ivtype_map,
3863 new_ivtype_map_elt, ivtype_map_elt_info, eq_ivtype_map_elts,
3864 gcc_type_for_cloog_iv): New.
3865 (loop_iv_stack_patch_for_consts): Use the type of the induction
3866 variable from the original loop, except for the automatically
3867 generated loops, i.e., in the case of a strip-mined loop, in
3868 which case there is no original loop: in that case just use
3870 (new_graphite_bb): Initialize GBB_CLOOG_IV_TYPES.
3871 (free_graphite_bb): Free GBB_CLOOG_IV_TYPES.
3872 (clast_name_to_gcc): Accept params to be NULL.
3873 (clast_to_gcc_expression): Take an extra parameter for the type.
3874 Convert to that type all the expressions built by this function.
3875 (gcc_type_for_clast_expr, gcc_type_for_clast_eq): New.
3876 (graphite_translate_clast_equation): Compute the type of the
3877 clast_equation before translating its LHS and RHS.
3878 (clast_get_body_of_loop, gcc_type_for_iv_of_clast_loop): New.
3879 (graphite_create_new_loop): Compute the type of the induction
3880 variable before translating the lower and upper bounds and before
3881 creating the induction variable.
3882 (rename_variables_from_edge, rename_phis_end_scop): New.
3883 (copy_bb_and_scalar_dependences): Call rename_phis_end_scop.
3884 (sese_add_exit_phis_edge): Do not use integer_zero_node.
3885 (find_cloog_iv_in_expr, compute_cloog_iv_types_1,
3886 compute_cloog_iv_types): New.
3887 (gloog): Call compute_cloog_iv_types before starting the
3888 translation of the clast.
3890 * graphite.h (struct graphite_bb): New field cloog_iv_types.
3891 (GBB_CLOOG_IV_TYPES): New.
3892 (debug_ivtype_map): Declared.
3893 (oldiv_for_loop): New.
3895 2008-12-10 Tobias Grosser <grosser@fim.uni-passau.de>
3898 * graphite.c (new_scop): Initialize SCOP_ADD_PARAMS.
3899 (param_index): Assert if parameter is not know after parameter
3901 (find_params_in_bb): Detect params directly in GBB_CONDITIONS.
3902 (find_scop_parameters): Mark, that we have finished parameter
3904 (graphite_transform_loops): Move condition detection before parameter
3906 * graphite.h (struct scop): Add SCOP_ADD_PARAMS.
3907 * testsuite/gfortran.dg/graphite/pr38459.f90: New.
3909 2008-12-09 Tobias Grosser <grosser@fim.uni-passau.de>
3911 * graphite.c (graphite_transform_loops): Always call find_transform ()
3912 in ENABLE_CHECKING. So we test these code paths, even if we do not
3915 2008-12-09 Tobias Grosser <grosser@fim.uni-passau.de>
3917 * graphite.c (print_graphite_bb): Fix printing to file != dump_file.
3918 (print_scop): Ditto.
3920 2008-12-08 Tobias Grosser <grosser@fim.uni-passau.de>
3923 Fix testsuite/gfortran.dg/graphite/id-3.f90.
3924 * graphite.c (scopdet_basic_block_info): Fix bug that found some
3925 regions more than once.
3927 2008-12-03 Sebastian Pop <sebastian.pop@amd.com>
3929 Fix testsuite/gfortran.dg/graphite/id-4.f90.
3930 * graphite.c (scan_tree_for_params): Do not compute the multiplicand
3933 2008-12-03 Sebastian Pop <sebastian.pop@amd.com>
3935 Fix testsuite/gfortran.dg/graphite/id-1.f90.
3936 * graphite.c (gmp_cst_to_tree): Pass the type in parameter.
3937 (loop_iv_stack_patch_for_consts): Update use of gmp_cst_to_tree.
3938 (max_precision_type): New.