1 2009-11-04 Konrad Trifunovic <konrad.trifunovic@inria.fr>
3 * graphite-interchange.c (build_partial_difference): New.
4 (memory_stride_in_loop): Refactored the computation of
5 equality constraints into build_partial_difference function.
6 Added support for debugging stride computations.
8 2009-11-03 Sebastian Pop <sebastian.pop@amd.com>
10 * graphite-clast-to-gimple.c (gloog): Free if_region,
11 if_region->true_region, and if_region->region.
12 * sese.c (if_region_set_false_region): Free if_region->false_region.
13 (create_if_region_on_edge): Do not use GGC_NEW.
14 (move_sese_in_condition): Remove useless initialization.
16 2009-11-03 Sebastian Pop <sebastian.pop@amd.com>
18 * graphite-interchange.c (lst_perfect_nestify): Pass 3 parameters
19 for the loops created by the loop distribution. Do not modify the
21 (lst_try_interchange_loops): Same. Use a temporary LST for the
22 transformed schedule. Call lst_update_scattering before data
24 (lst_try_interchange): Pass an extra parameter INDEX.
25 (lst_do_interchange_1): New.
26 (lst_do_interchange): Call lst_do_interchange_1.
27 (scop_do_interchange): Call lst_update_scattering.
28 * graphite-poly.c (apply_poly_transforms): Do not call
29 lst_update_scattering.
30 * graphite-poly.h (lst_pred): New.
32 (lst_find_first_pbb): Return NULL when not found.
34 (lst_insert_in_sequence): Allow LST1 to be NULL.
36 (lst_substitute_3): New.
37 * gcc.dg/graphite/interchange-1.c: XFail.
38 * gcc.dg/graphite/interchange-8.c: XFail.
39 * gcc.dg/graphite/interchange-11.c: XFail.
41 2009-10-30 Sebastian Pop <sebastian.pop@amd.com>
43 * graphite-interchange.c (lst_perfectly_nested_p): New.
44 (lst_perfect_nestify): New.
45 (lst_try_interchange_loops): Call store_lst_schedule,
46 lst_perfectly_nested_p, lst_perfect_nestify and restore_lst_schedule.
47 (scop_do_interchange): Avoid redundant legality test.
48 Call lst_do_interchange on a copy of SCOP_TRANSFORMED_SCHEDULE.
49 * graphite-poly.c (apply_poly_transforms): Call lst_update_scattering.
50 * graphite-poly.h (psct_static_dim): New.
51 (lst_dewey_number_at_depth): New.
52 (lst_find_pbb): Restructured.
53 (lst_find_first_pbb): Restructured.
54 (lst_find_last_pbb): New.
55 (lst_contains_p): New.
56 (lst_contains_pbb): New.
57 (lst_create_nest): New.
58 (lst_remove_from_sequence): New.
59 (pbb_update_scattering): New.
60 (lst_update_scattering_under): New.
61 (lst_update_scattering_seq): New.
62 (lst_update_scattering): New.
63 (lst_insert_in_sequence): New.
64 (lst_distribute_lst): New.
65 (lst_remove_all_before_including_pbb): New.
66 (lst_remove_all_before_excluding_pbb): New.
68 2009-10-30 Sebastian Pop <sebastian.pop@amd.com>
70 * tree-ssa-loop-niter.c (finite_loop_p): Do not call twice
73 2009-10-30 Sebastian Pop <sebastian.pop@amd.com>
75 * graphite-poly.c (pbb_remove_duplicate_pdrs): Free collapsed.
77 2009-10-28 Konrad Trifunovic <konrad.trifunovic@gmail.com>
79 * graphite-poly.c (print_permutation): New.
80 (debug_permutation): New.
81 (new_poly_bb): Initialize PBB_PERMUTATION.
82 (free_poly_bb): Free PBB_PERMUTATION.
83 * graphite-poly.h (pbb_permutation_elt_p): Declared.
84 (struct pbb_permutation_elt): New.
85 (PBB_PERMUTATION_ELT_STRIDE): New.
86 (PBB_PERMUTATION_ELT_STRIDED_P): New.
87 (PBB_PERMUTATION_ELT_TIME_DIMENSION): New.
88 (new_pbb_permutation_elt): New.
89 (pbb_permutation_elt_free): New.
90 (struct poly_bb): Add field permutation.
91 (PBB_PERMUTATION): New.
92 (print_permutation): Declared.
93 (debug_permutation): Declared.
95 2009-10-26 Sebastian Pop <sebastian.pop@amd.com>
97 * graphite-clast-to-gimple.c (gloog): Do not call
98 sese_reset_aux_in_loops.
99 * graphite-sese-to-poly.c (build_loop_iteration_domains): Pass an
100 extra argument for domains. Do not use loop->aux.
101 (build_scop_iteration_domain): Initialize and free domains, pass it
102 to build_loop_iteration_domains and extract the information from
103 domains. Do not use loop->aux.
104 * sese.c (sese_reset_aux_in_loops): Removed.
105 * sese.h (sese_reset_aux_in_loops): Removed.
107 2009-10-26 Sebastian Pop <sebastian.pop@amd.com>
109 * graphite-clast-to-gimple.c (find_pbb_via_hash): Moved up.
110 (dependency_in_loop_p): Same.
111 (translate_clast): Do not use loop->aux. Initialize
112 loop->can_be_parallel.
113 (mark_loops_parallel): Removed.
114 * graphite-clast-to-gimple.h (mark_loops_parallel): Removed.
115 * graphite.c (free_aux_in_new_loops): Removed.
116 (graphite_finalize): Do not call free_aux_in_new_loops.
117 (graphite_transform_loops): Do not call mark_loops_parallel.
119 2009-10-26 Li Feng <nemokingdom@gmail.com>
121 * graphite-clast-to-gimple.c (get_stmtfor_depth): Removed.
122 (translate_clast): Pass an extra parameter LEVEL.
123 Call get_scattering_level.
124 * graphite-clast-to-gimple.h (get_scattering_level): New.
126 2009-10-22 Sebastian Pop <sebastian.pop@amd.com>
128 * cfgloop.c (alloc_loop): Initialize loop->single_iv.
129 * cfgloop.h (struct loop): New field single_iv.
131 * graphite-clast-to-gimple.c (pbb_to_depth_to_oldiv): Do not use
132 loop->aux anymore: use loop->single_iv.
133 (graphite_loop_normal_form): Moved...
134 (build_graphite_loop_normal_form): Removed.
135 (gloog): Do not call build_graphite_loop_normal_form.
136 (free_aux_in_new_loops): Moved...
137 (mark_loops_parallel): Restructure.
138 * graphite-clast-to-gimple.h (free_aux_in_new_loops): Do not declare.
139 * graphite-sese-to-poly.c (graphite_loop_normal_form): ...here.
140 (scop_canonicalize_loops): New.
141 (build_poly_scop): Call scop_canonicalize_loops.
142 * graphite.c (free_aux_in_new_loops): ...here.
144 2009-10-22 Sebastian Pop <sebastian.pop@amd.com>
146 * g++.dg/graphite/graphite.exp: Add the same rules as in
147 gcc.dg/graphite/graphite.exp.
149 2009-10-22 Sebastian Pop <sebastian.pop@amd.com>
151 * g++.dg/graphite/id-1.C: New.
153 2009-10-22 Sebastian Pop <sebastian.pop@amd.com>
155 * graphite-sese-to-poly.c (create_zero_dim_array): Pass an extra
157 (rewrite_close_phi_out_of_ssa): Update use of create_zero_dim_array.
158 (rewrite_phi_out_of_ssa): Same.
159 (rewrite_cross_bb_scalar_deps): Same.
160 (translate_scalar_reduction_to_array): Same.
162 2009-10-22 Sebastian Pop <sebastian.pop@amd.com>
164 * graphite-sese-to-poly.c (build_scop_drs): Disable call to
167 2009-10-22 Sebastian Pop <sebastian.pop@amd.com>
169 * graphite-sese-to-poly.c (dump_alias_graphs): New.
170 (build_scop_drs): Call dump_alias_graphs.
172 2009-10-22 Sebastian Pop <sebastian.pop@amd.com>
174 * graphite-poly.c (new_scop): Initialize SCOP_ORIGINAL_SCHEDULE,
175 SCOP_TRANSFORMED_SCHEDULE, and SCOP_SAVED_SCHEDULE.
176 (free_scop): Call free_lst on SCOP_ORIGINAL_SCHEDULE,
177 SCOP_TRANSFORMED_SCHEDULE, and SCOP_SAVED_SCHEDULE.
178 * graphite-poly.h (free_lst): New.
179 (store_lst_schedule): Free SCOP_SAVED_SCHEDULE.
180 (restore_lst_schedule): Free SCOP_TRANSFORMED_SCHEDULE.
182 2009-10-22 Sebastian Pop <sebastian.pop@amd.com>
184 * graphite-poly.h (struct scop): Add a field saved_schedule.
185 (SCOP_SAVED_SCHEDULE): New.
186 (store_lst_schedule): New.
187 (restore_lst_schedule): New.
188 (store_scattering): Call store_lst_schedule.
189 (restore_scattering): Call restore_lst_schedule.
191 2009-10-20 Sebastian Pop <sebastian.pop@amd.com>
193 * graphite-sese-to-poly.c (free_data_refs_aux): Fix formatting.
194 (pdr_add_alias_set): Same.
195 (build_poly_dr): Same.
196 (build_alias_set_optimal_p): Same.
197 (build_base_obj_set_for_drs): Same. Do not store the result of
200 2009-10-20 Sebastian Pop <sebastian.pop@amd.com>
202 * graphite-sese-to-poly.c (build_alias_set_optimal_p): Initialize
203 all_components_are_cliques to 1.
205 2009-10-20 Li Feng <nemokingdom@gmail.com>
207 * graphite-sese-to-poly.c (free_data_refs_aux): Update to free
209 (pdr_add_alias_set): Update retrieving alias_set_num.
210 (build_poly_dr): Update retrieving dr_base_object_set.
211 (partition_drs_to_sets): Remove.
212 (build_alias_set_optimal_p): New.
213 (build_alias_set_for_drs): Rename.
214 (build_scop_drs): Update.
215 * graphite-sese-to-poly.h (struct base_alias_pair): New.
216 (ALIAS_SET_INDEX): Remove.
217 (BASE_OBJECT_SET_INDEX): Remove.
219 2009-10-20 Sebastian Pop <sebastian.pop@amd.com>
221 * sese.c (get_vdef_before_sese): Handle GIMPLE_ASSIGN and GIMPLE_CALL.
223 2009-10-20 Sebastian Pop <sebastian.pop@amd.com>
225 * graphite-sese-to-poly.c (pdr_add_data_dimensions): Do not infer
226 loop upper bounds for 1-element arrays at end of structures.
227 * tree-flow.h (array_at_struct_end_p): Declared.
228 * tree-ssa-loop-niter.c (array_at_struct_end_p): Not static anymore.
230 2009-10-20 Sebastian Pop <sebastian.pop@amd.com>
232 * g++.dg/graphite/pr41305.C: New.
234 2009-10-20 Alexander Monakov <amonakov@ispras.ru>
236 * graphite-sese-to-poly.c (build_loop_iteration_domains): Generalize
237 construction of parameter constraints from loop iteration analysis.
238 * gcc.dg/graphite/run-id-2.c: New test.
240 2009-10-17 Sebastian Pop <sebastian.pop@amd.com>
242 * graphite-interchange.c (memory_stride_in_loop): Delete p1, lma
245 2009-10-17 Sebastian Pop <sebastian.pop@amd.com>
247 * graphite-dependences.c (dependence_polyhedron_1): Remove
248 unused gdim dimensions from the DDR polyhedron.
250 2009-10-17 Sebastian Pop <sebastian.pop@amd.com>
252 * graphite-dependences.c (pddr_transformed_scattering): New.
253 (dot_original_deps_stmt_1): New.
254 (dot_transformed_deps_stmt_1): New.
255 (dot_deps_stmt_1): Call dot_original_deps_stmt_1 and
256 dot_transformed_deps_stmt_1.
257 (dot_original_deps): New.
258 (dot_transformed_deps): New.
259 (dot_deps_1): Call dot_original_deps and dot_transformed_deps.
261 2009-10-17 Sebastian Pop <sebastian.pop@amd.com>
263 * graphite-dependences.c (reduction_dr_1): Remove wrong
264 assert: reduction BBs can have multiple reduction writes
265 to memory. interchange-3.f90 is an example.
267 2009-10-17 Sebastian Pop <sebastian.pop@amd.com>
269 * gfortran.dg/graphite/interchange-3.f90: New.
271 2009-10-17 Sebastian Pop <sebastian.pop@amd.com>
273 * gcc.dg/graphite/interchange-1.c: Un-XFAILed.
275 2009-10-17 Sebastian Pop <sebastian.pop@amd.com>
277 * graphite-dependences.c (dependence_polyhedron_1): Add the
278 context to the dependence polyhedron.
280 2009-10-17 Sebastian Pop <sebastian.pop@amd.com>
282 * graphite-poly.c (pbb_remove_duplicate_pdrs): Initialize
283 PBB_PDR_DUPLICATES_REMOVED.
286 2009-10-17 Sebastian Pop <sebastian.pop@amd.com>
288 * graphite-sese-to-poly.c (find_scop_parameters): Initialize
290 (build_loop_iteration_domains): Extract bounds on parameters
291 based on the data size.
292 (build_scop_context): Do not initialize SCOP_CONTEXT;
295 2009-10-17 Sebastian Pop <sebastian.pop@amd.com>
297 * graphite-ppl.c (ppl_min_for_le_polyhedron): New.
298 * graphite-ppl.h (graphite-ppl.h): Declared.
300 2009-10-17 Sebastian Pop <sebastian.pop@amd.com>
302 * graphite-ppl.c (ppl_print_linear_expr): New.
303 (debug_ppl_linear_expr): New.
304 * graphite-ppl.h (ppl_print_linear_expr): Declared.
305 (debug_ppl_linear_expr): Declared.
307 2009-10-16 Sebastian Pop <sebastian.pop@amd.com>
309 * graphite-interchange.c: Fix comments.
310 * gcc.dg/graphite/block-1.c: Fix comments.
312 2009-10-16 Sebastian Pop <sebastian.pop@amd.com>
314 * gcc.dg/graphite/interchange-7.c: Un-XFAILed.
315 * gcc.dg/graphite/interchange-9.c: Un-XFAILed.
317 2009-10-16 Sebastian Pop <sebastian.pop@amd.com>
319 Reapply the patch from Alexander Monakov that disappeared during
320 the last merges from trunk.
322 2009-09-16 Alexander Monakov <amonakov@ispras.ru>
324 * graphite-sese-to-poly.c (pdr_add_data_dimensions): Add bounds only
325 for ARRAY_REFs. Use array_ref_{low,up}_bound to determine bounds.
327 2009-10-15 Sebastian Pop <sebastian.pop@amd.com>
329 * graphite-interchange.c (memory_stride_in_loop): The depth
330 argument corresponds to a dynamic time dimension, so use
331 psct_dynamic_dim to refer to the transformed scattering dimension.
333 2009-10-15 Sebastian Pop <sebastian.pop@amd.com>
335 * graphite-interchange.c (memory_stride_in_loop): Fix comments.
337 2009-10-15 Sebastian Pop <sebastian.pop@amd.com>
339 * graphite-blocking.c (lst_do_strip_mine): Avoid strip mining the
341 * graphite-interchange.c (lst_do_interchange): Avoid interchanging
343 * graphite-poly.c (scop_to_lst): Fix LST sequence in an outermost
345 (print_lst): Print the root of LST in a different format.
346 * graphite-poly.h (lst_depth): Adjust to include the root of the LST.
348 2009-10-15 Sebastian Pop <sebastian.pop@amd.com>
350 * graphite-poly.c (print_scop): Fix pretty printing of a SCoP.
352 2009-10-15 Sebastian Pop <sebastian.pop@amd.com>
354 * doc/passes.texi: Document the Graphite infrastructure.
356 2009-10-15 Sebastian Pop <sebastian.pop@amd.com>
358 * graphite-sese-to-poly.c (insert_copyin): Use gsi_insert_seq_on_edge.
359 (rewrite_commutative_reductions_out_of_ssa): Call gsi_commit_edge_inserts,
360 and check the SSA representation.
362 * gfortran.dg/graphite/id-18.f90: New, reduced from PR41193.
364 2009-10-15 Sebastian Pop <sebastian.pop@amd.com>
366 * gcc.dg/graphite/pr40157.c: Use -floop-block as reported in the PR.
368 2009-10-14 Sebastian Pop <sebastian.pop@amd.com>
370 * gcc.dg/graphite/interchange-11.c: New.
372 2009-10-14 Sebastian Pop <sebastian.pop@amd.com>
374 * gcc.dg/graphite/interchange-8.c: Enable loop interchange.
376 2009-10-14 Sebastian Pop <sebastian.pop@amd.com>
378 * gcc.dg/graphite/graphite.exp (DEFAULT_CFLAGS_GRAPHITE_BLOCK):
379 Add -fno-loop-strip-mine and -fno-loop-interchange.
380 (DEFAULT_FLAGS_GRAPHITE_INTERCHANGE): Add -fno-loop-block and
381 -fno-loop-strip-mine.
382 * gfortran.dg/graphite/graphite.exp: Same.
384 2009-10-14 Sebastian Pop <sebastian.pop@amd.com>
386 * gcc.dg/graphite/graphite.exp (DEFAULT_CFLAGS_GRAPHITE_BLOCK):
387 Renamed DEFAULT_FLAGS_GRAPHITE_BLOCK.
388 (DEFAULT_CFLAGS_GRAPHITE_IDENTITY): Renamed
389 DEFAULT_FLAGS_GRAPHITE_IDENTITY.
390 (DEFAULT_CFLAGS_GRAPHITE_INTERCHANGE): Renamed
391 DEFAULT_FLAGS_GRAPHITE_INTERCHANGE.
392 (DEFAULT_CFLAGS_GRAPHITE_SCOP): Renamed
393 DEFAULT_FLAGS_GRAPHITE_SCOP.
394 (DEFAULT_CFLAGS_RUN_ID): Renamed DEFAULT_FLAGS_RUN_ID.
395 (DEFAULT_CFLAGS_GRAPHITE): Renamed DEFAULT_FLAGS_GRAPHITE.
397 2009-10-14 Sebastian Pop <sebastian.pop@amd.com>
399 * graphite-poly.c (pbb_number_of_iterations_at_time): Cleanup comments.
401 2009-10-14 Konrad Trifunovic <konrad.trifunovic@gmail.com>
402 Sebastian Pop <sebastian.pop@amd.com>
404 * graphite-interchange.c (build_linearized_memory_access): Pass an
406 (memory_stride_in_loop): Include transform scattering in the
407 access functions to be able to querry the strides in the
409 (pbb_interchange_loop_depths): Interchange the psct_dynamic_dim,
410 not the psct_iterator_dim.
412 2009-10-14 Sebastian Pop <sebastian.pop@amd.com>
414 * graphite-blocking.c (pbb_do_strip_mine): Removed.
415 (lst_do_strip_mine_loop): New.
416 (lst_do_strip_mine): New.
417 (scop_do_strip_mine): Call lst_do_strip_mine.
418 * graphite-poly.h (lst_add_loop_under_loop): New.
419 (lst_find_first_pbb): New.
421 2009-10-14 Sebastian Pop <sebastian.pop@amd.com>
423 * graphite-poly.c (loop_to_lst): Fix LST creation.
425 2009-10-14 Tobias Grosser <grosser@fim.uni-passau.de>
427 * testsuite/gcc.dg/graphite/id-15.c: (8 * 8) replaced with
428 sizeof(unsigned long) to make it run on 32bit systems.
430 2009-10-14 Tobias Grosser <grosser@fim.uni-passau.de>
432 * testsuite/gcc.dg/graphite/run-id-1.c: Use smaller matrix to not
435 2009-10-14 Ramakrishna Upadrasta <Ramakrishna.Upadrasta@inria.fr>
437 * graphite-sese-to-poly.c (write_alias_graph_to_ascii_dimacs): Fix
439 (write_alias_graph_to_ascii_dot): New.
440 (write_alias_graph_to_ascii_ecc): Ditto.
441 (partition_drs_to_sets): Add testing of optimality of current method
442 which assigns alias numbers according to DFS Comopnent number. used
443 as heuristic for the upcoming ECC algorithm.
444 (build_scop_drs): Write to file also with the ecc and dot format.
446 2009-10-13 Sebastian Pop <sebastian.pop@amd.com>
448 * gfortran.dg/graphite/interchange-1.f: XFail.
450 2009-10-13 Sebastian Pop <sebastian.pop@amd.com>
452 * graphite.c (graphite_initialize): Do not handle functions with
453 more than 100 basic blocks.
455 2009-10-13 Sebastian Pop <sebastian.pop@amd.com>
457 * graphite-blocking.c (pbb_do_strip_mine): Use
458 PARAM_LOOP_BLOCK_TILE_SIZE.
460 2009-10-13 Sebastian Pop <sebastian.pop@amd.com>
462 * graphite-poly.c (dot_lst_1): New.
464 * graphite-poly.h (dot_lst): Declared.
466 2009-10-13 Sebastian Pop <sebastian.pop@amd.com>
468 * graphite-dependences.c (dot_deps_stmt_1): New.
469 (dot_deps_stmt): New.
470 * graphite-dependences.h (dot_deps_stmt): Declared.
472 2009-10-09 Sebastian Pop <sebastian.pop@amd.com>
474 * graphite-sese-to-poly.c (rewrite_cross_bb_scalar_dependence): Do
475 not replace cross BB scalar dependences ending on PHI nodes.
476 (rewrite_cross_bb_scalar_deps): Filter out GIMPLE_PHI nodes.
478 2009-10-09 Sebastian Pop <sebastian.pop@amd.com>
480 * graphite-poly.c (apply_poly_transforms): Implement the high
481 level driver for flag_loop_block.
482 * tree-ssa-loop.c (gate_graphite_transforms): Remove call to sorry for
485 * gcc.dg/graphite/graphite.exp (DEFAULT_CFLAGS_GRAPHITE_BLOCK): Add
487 * gfortran.dg/graphite/graphite.exp (DEFAULT_CFLAGS_GRAPHITE_BLOCK):
490 2009-10-09 Sebastian Pop <sebastian.pop@amd.com>
492 * graphite-poly.h (lst_find_pbb): New.
493 (find_lst_loop): New.
495 2009-10-09 Sebastian Pop <sebastian.pop@amd.com>
497 * graphite-poly.c (new_scop): Remove init of SCOP_DEP_GRAPH.
498 * graphite-poly.h (struct scop): Remove dep_graph field.
499 (SCOP_DEP_GRAPH): Removed.
501 2009-10-09 Sebastian Pop <sebastian.pop@amd.com>
503 * graphite-poly.h (copy_lst): Do full copy of LST.
505 2009-10-07 Sebastian Pop <sebastian.pop@amd.com>
507 * graphite-sese-to-poly.c (reduction_phi_p): Call remove_invariant_phi
508 when the loop stride is zero.
510 * gcc.dg/graphite/id-16.c: New.
512 2009-10-06 Sebastian Pop <sebastian.pop@amd.com>
514 * graphite-dependences.c (reduction_dr_1): New.
515 (reduction_dr_p): New.
516 (graphite_legal_transform_dr): Call reduction_dr_p.
517 (reduction_ddr): Renamed reduction_ddr_p.
518 * graphite-poly.h (same_pdr_p): New.
519 (number_of_write_pdrs): New.
520 * graphite-sese-to-poly.c (nb_data_writes_in_bb): New.
521 (split_reduction_stmt): Do not split reduction statements
522 when there are no writes to memory.
523 (translate_scalar_reduction_to_array_for_stmt): Insert the
524 memory reduction statement just after the scalar reduction statement.
526 * gcc.dg/graphite/interchange-10.c: Updated to differ from interchange-4.c.
528 * gcc.dg/graphite/interchange-3.c: Un-XFAIL-ed.
529 * gcc.dg/graphite/interchange-4.c: Un-XFAIL-ed.
531 2009-10-06 Sebastian Pop <sebastian.pop@amd.com>
533 * graphite-interchange.c (lst_apply_interchange): New.
534 (lst_interchange_profitable_p): New.
535 (lst_try_interchange_loops): New.
536 (lst_try_interchange): New.
537 (lst_do_interchange): New.
538 (pbb_do_interchange): Removed.
539 (scop_do_interchange): Call lst_do_interchange.
541 2009-10-06 Sebastian Pop <sebastian.pop@amd.com>
543 * graphite-poly.c (print_scop): Print SCOP_ORIGINAL_SCHEDULE and
544 SCOP_TRANSFORMED_SCHEDULE.
549 * graphite-poly.h (lst_p): New.
552 (LST_LOOP_FATHER): New.
555 (scop_to_lst): Declared.
556 (print_lst): Declared.
557 (debug_lst): Declared.
562 (lst_dewey_number): New.
563 (struct scop): Add original_schedule and transformed_schedule fields.
564 (SCOP_ORIGINAL_SCHEDULE): New.
565 (SCOP_TRANSFORMED_SCHEDULE): New.
566 * graphite-sese-to-poly.c (build_poly_scop): Call scop_to_lst.
568 2009-10-05 Sebastian Pop <sebastian.pop@amd.com>
570 * graphite-dependences.c (reduction_ddr): New.
571 (graphite_legal_transform_bb): Call reduction_ddr.
572 * graphite-poly.c (new_poly_bb): Pass a new bool parameter.
573 Initialize PBB_IS_REDUCTION.
574 * graphite-poly.h (struct poly_bb): New bool field is_reduction.
575 (PBB_IS_REDUCTION): New.
576 (new_poly_bb): Update declaration.
577 * graphite-scop-detection.h (build_scop_bbs): Removed.
578 (nb_reductions_in_loop): Removed.
579 * graphite-sese-to-poly.c (try_generate_gimple_bb): Pass a sbitmap
580 parameter for reductions.
581 (try_generate_gimple_bb): Update call to new_poly_bb.
582 (build_scop_bbs_1): Same.
583 (build_scop_bbs): Same.
584 (gsi_for_phi_node): New.
585 (scalar_close_phi_node_p): Remove gcc_assert.
586 (split_reduction_stmt): New.
587 (is_reduction_operation_p): New.
588 (phi_contains_arg): New.
589 (follow_ssa_with_commutative_ops): New.
590 (detect_commutative_reduction_arg): New.
591 (detect_commutative_reduction_assign): New.
592 (follow_inital_value_to_phi): New.
593 (edge_initial_value_for_loop_phi): New.
594 (initial_value_for_loop_phi): New.
595 (detect_commutative_reduction): New.
596 (translate_scalar_reduction_to_array_for_stmt): New.
597 (insert_copyout): New.
598 (insert_copyin): New.
599 (translate_scalar_reduction_to_array): New.
600 (rewrite_commutative_reductions_out_of_ssa_close_phi): New.
601 (rewrite_commutative_reductions_out_of_ssa_loop): New.
602 (rewrite_commutative_reductions_out_of_ssa): New.
603 (build_poly_scop): Call rewrite_commutative_reductions_out_of_ssa.
604 * sese.h (split_region_for_bb): New.
606 * gcc.dg/graphite/graphite.exp (DEFAULT_CFLAGS_GRAPHITE_BLOCK): Add -ffast-math.
607 * gcc.dg/graphite/interchange-1.c: Fix format.
608 * gcc.dg/graphite/interchange-10.c: New.
610 2009-10-05 Sebastian Pop <sebastian.pop@amd.com>
612 * graphite-sese-to-poly.c (insert_out_of_ssa_copy): Remove
615 2009-10-05 Sebastian Pop <sebastian.pop@amd.com>
617 * graphite-sese-to-poly.c (scev_analyzable_p): New.
618 (rewrite_cross_bb_scalar_dependence): New.
619 (rewrite_cross_bb_scalar_deps): New.
620 (rewrite_reductions_out_of_ssa): Use bb_in_sese_p.
621 Call rewrite_cross_bb_scalar_deps.
623 2009-10-05 Sebastian Pop <sebastian.pop@amd.com>
625 * graphite-sese-to-poly.c (gsi_for_ssa_name_def): Removed.
626 (insert_out_of_ssa_copy): Directly use gsi_after_labels and
629 2009-10-05 Sebastian Pop <sebastian.pop@amd.com>
631 * graphite-clast-to-gimple.c (build_cloog_prog): Use pbb_index.
632 * graphite-interchange.c (pbb_do_interchange): Same.
633 * graphite-poly.c (print_scattering_function): Same.
635 * graphite-poly.h (pbb_loop): New.
636 * graphite-sese-to-poly.c (create_linear_expr_from_tree): Use pbb_loop.
638 2009-09-27 Sebastian Pop <sebastian.pop@amd.com>
640 * graphite-scop-detection.c (limit_scops): Do not build poly_bbs.
642 2009-09-27 Sebastian Pop <sebastian.pop@amd.com>
644 * graphite-sese-to-poly.c (partition_drs_to_sets): Drs is not modified,
645 so don't pass a pointer to it.
646 (build_alias_set_for_drs): Same.
647 (build_base_obj_set_for_drs): Same.
648 (build_scop_drs): Same.
650 2009-09-26 Li Feng <nemokingdom@gmail.com>
652 * graphite-sese-to-poly.c (build_scop_drs): Disable writing to file
653 the alias graph of data references.
655 2009-09-25 Li Feng <nemokingdom@gmail.com>
657 * graphite-sese-to-poly.c (write_alias_graph_to_ascii_dimacs): New.
658 (build_scop_drs): When debugging, write the alias graph to file,
659 otherwise, should be disabled.
661 2009-09-17 Sebastian Pop <sebastian.pop@amd.com>
663 * graphite-scop-detection.c (stmt_simple_memref_p): Removed.
664 (is_simple_operand): Remove call to stmt_simple_memref_p.
665 (stmt_simple_for_scop_p): Update call to is_simple_operand.
667 2009-09-17 David Edelsohn <edelsohn@gnu.org>
669 * testsuite/gcc.dg/graphite/interchange-mvt.c: New File.
670 * testsuite/gcc.dg/graphite/scop-dsyrk.c: New File.
671 * testsuite/gcc.dg/graphite/scop-dsyr2k.c: New File.
672 * testsuite/gcc.dg/graphite/scop-mvt.c: New File.
673 * testsuite/gcc.dg/graphite/scop-sor.c: New File.
675 2009-09-17 Li Feng <nemokingdom@gmail.com>
678 * graphite-dependences.c (poly_drs_may_alias_p): Adjust definition.
679 (pddr_original_scattering): Make sure 2 pdr2 in the same base object set.
680 (graphite_carried_dependence_level_k): Ditto.
681 * graphite-poly.c (new_poly_dr): Add init of PDR_BASE_OBJECT_SET.
682 * graphite-poly.h (struct poly_dr): Add member dr_base_object_set.
683 (new_poly_dr): Adjust declaration.
684 * graphite-sese-to-poly.c (free_data_refs_aux): New.
685 (free_gimple_bb): Added free_data_refs_aux.
686 (build_poly_dr): Add dr_base_object_set.
687 (partition_drs_to_sets): New.
688 (dr_same_base_object_p): New.
689 (build_alias_set_for_drs): New.
690 (build_base_object_set_for_drs): New.
691 (build_scop_drs): Add build_base_obj_set_for_drs.
692 * graphite-sese-to-poly.h: Added #define for alias set number index and
693 base object set index.
694 * libgomp/testsuite/libgomp.graphite/force-parallel-6.c: Refine tests.
695 * libgomp/testsuite/libgomp.graphite/pr4118.c: New.
697 2009-09-16 Alexander Monakov <amonakov@ispras.ru>
699 * graphite-sese-to-poly.c (pdr_add_data_dimensions): Add bounds only
700 for ARRAY_REFs. Use array_ref_{low,up}_bound to determine bounds.
702 2009-09-14 Sebastian Pop <sebastian.pop@amd.com>
704 * graphite-sese-to-poly.c (struct irp_data): Removed.
705 (idx_record_params): Removed.
706 (find_params_in_bb): Scan for parameters the access functions; don't
707 parse the tree representation.
709 2009-09-14 Sebastian Pop <sebastian.pop@amd.com>
711 * tree-ssa-loop.c (gate_graphite_transforms): Disable Graphite
712 passes at -O1 and below.
714 2009-09-14 Sebastian Pop <sebastian.pop@amd.com>
716 * graphite-blocking.c: Fix order of includes: tree-chrec.h, then
717 tree-scalar-evolution.h, and then tree-data-ref.h.
718 * graphite-clast-to-gimple.c: Same.
719 * graphite-dependences.c: Same.
720 * graphite-interchange.c: Same.
721 * graphite-poly.c: Same.
722 * graphite-scop-detection.c: Same.
723 * graphite-sese-to-poly.c: Same.
725 * lambda-code.c: Same.
726 * matrix-reorg.c: Same.
727 * tree-data-ref.c: Same.
728 * tree-if-conv.c: Same.
729 * tree-loop-distribu: Same.: Same.
730 * tree-loop-linear.c: Same.
731 * tree-parloops.c: Same.
732 * tree-predcom.c: Same.
733 * tree-vect-patterns.c: Same.
735 2009-09-02 Sebastian Pop <sebastian.pop@amd.com>
737 Partially revert the previous patch, except the following.
738 * tree-scalar-evolution.c (instantiate_scev_not): Adapted to pass
739 as parameters the operands of the not expression.
741 2009-09-01 Sebastian Pop <sebastian.pop@amd.com>
743 * tree-scalar-evolution.c (instantiate_scev_assign): New.
744 Do not call analyze_scalar_evolution on assignments.
745 (instantiate_scev_phi): Call analyze_scalar_evolution.
746 (instantiate_scev_name): Call instantiate_scev_assign and
747 instantiate_scev_phi.
748 (instantiate_scev_not): Adapted to pass as parameters the operands
749 of the not expression.
751 2009-09-01 Sebastian Pop <sebastian.pop@amd.com>
753 * tree-scalar-evolution.c (instantiate_scev_binary): Adapted
754 to pass as parameters the operands of the binary expression.
756 2009-09-01 Sebastian Pop <sebastian.pop@amd.com>
758 * tree-scalar-evolution.c (instantiate_scev_bitnot): Renamed
759 instantiate_scev_not. Handle NEGATE_EXPR.
760 (instantiate_scev_r): Handle NEGATE_EXPR.
762 2009-09-01 Sebastian Pop <sebastian.pop@amd.com>
764 * tree-scalar-evolution.c (instantiate_scev_1): Renamed
766 (instantiate_scev_r): Move code in instantiate_scev_2
767 and instantiate_scev_1.
769 2009-09-01 Sebastian Pop <sebastian.pop@amd.com>
771 * tree-scalar-evolution.c (instantiate_scev_3): New.
772 (instantiate_scev_1): Move code in instantiate_scev_3.
774 2009-09-01 Sebastian Pop <sebastian.pop@amd.com>
776 * tree-scalar-evolution.c (instantiate_scev_poly): New.
777 (instantiate_scev_1): Move code in instantiate_scev_poly.
779 2009-09-01 Sebastian Pop <sebastian.pop@amd.com>
781 * tree-scalar-evolution.c (instantiate_scev_bitnot): New.
782 (instantiate_scev_1): Move code in instantiate_scev_bitnot.
784 2009-09-01 Sebastian Pop <sebastian.pop@amd.com>
786 * tree-scalar-evolution.c (instantiate_scev_convert): New.
787 (instantiate_scev_1): Move code in instantiate_scev_convert.
789 2009-09-01 Sebastian Pop <sebastian.pop@amd.com>
791 * tree-scalar-evolution.c (instantiate_scev_binary): New.
792 (instantiate_scev_1): Move code in instantiate_scev_binary.
794 2009-09-01 Sebastian Pop <sebastian.pop@amd.com>
796 * tree-scalar-evolution.c (instantiate_scev_name): New.
797 (instantiate_scev_1): Move code in instantiate_scev_name.
799 2009-08-28 Sebastian Pop <sebastian.pop@amd.com>
801 * Merge from mainline (150992:151171).
803 2009-08-25 Sebastian Pop <sebastian.pop@amd.com>
805 * graphite-dependences.c (graphite_legal_transform_bb): Call
806 pbb_remove_duplicate_pdrs.
807 * graphite-poly.c (can_collapse_pdr): Removed.
808 (pdr_find_duplicate): Removed.
809 (can_collapse_pdrs): New.
810 (pbb_remove_duplicate_pdrs): New.
811 (new_poly_dr): Do not look for duplicates.
812 * graphite-poly.h (struct poly_bb): New field pdr_duplicates_removed.
813 (PBB_PDR_DUPLICATES_REMOVED): New.
814 (pbb_remove_duplicate_pdrs): Declared.
816 2009-08-25 Sebastian Pop <sebastian.pop@amd.com>
818 * graphite-interchange.c (pbb_interchange_profitable_p): Adjust
819 the strides by multiplying by PDR_NB_REFS.
820 * graphite-poly.c (can_collapse_pdr): New.
821 (pdr_find_duplicate): New.
822 (new_poly_dr): Call pdr_find_duplicate. Collapse duplicate PDRs.
823 Initialize PDR_NB_REFS.
824 * graphite-poly.h (struct poly_dr): Add field nb_refs.
826 (new_poly_dr): Number of subscripts is a graphite_dim_t.
828 2009-08-25 Sebastian Pop <sebastian.pop@amd.com>
830 Revert one of the previous commits:
831 * graphite-dependences.c (graphite_legal_transform_bb): Avoid
832 the computation of symmetric data dependence relations.
833 (dependency_between_pbbs_p): Same.
835 2009-08-25 Sebastian Pop <sebastian.pop@amd.com>
838 * graphite-poly.c (apply_poly_transforms): Remove legality test before
841 2009-08-25 Sebastian Pop <sebastian.pop@amd.com>
843 * graphite-dependences.c (pddr_original_scattering): Return NULL
844 for read-read dependence relations.
845 * graphite-poly.h (enum poly_dr_type): Fix comment.
848 (pdr_may_write_p): New.
850 2009-08-25 Sebastian Pop <sebastian.pop@amd.com>
852 * graphite-poly.h (enum POLY_DR_TYPE): Renamed poly_dr_type.
853 (struct poly_dr): Same.
855 * graphite-poly.c (new_poly_dr): Same.
857 2009-08-25 Konrad Trifunovic <konrad.trifunovic@gmail.com>
858 Sebastian Pop <sebastian.pop@amd.com>
860 * graphite-blocking.c (pbb_strip_mine_loop_depth): Renamed
861 pbb_strip_mine_time_depth. Changed the implementation so that
862 transformation is expressed as a transformation on
863 time (scatttering) dimensions. Also, ensures that the 2d+1
864 scheduling format is preserved.
865 (pbb_strip_mine_profitable_p): Profitability is based on the
866 iteration number of a given time (scattering) dimension,
867 and not on a original loop depth dimension.
868 (pbb_strip_mine): Call pbb_number_of_iterations_at_time.
869 (pbb_do_strip_mine): Call psct_dynamic_dim.
870 * graphite-poly.c (pbb_number_of_iterations_at_time): New.
871 * graphite-poly.h (pbb_number_of_iterations_at_time): Declared.
872 (pbb_nb_dynamic_scattering_transform): New.
873 (psct_dynamic_dim): New.
875 2009-08-25 Konrad Trifunovic <konrad.trifunovic@gmail.com>
877 * graphite-ppl.c (ppl_max_for_le): Renamed ppl_max_for_le_pointset.
878 * graphite-ppl.h (ppl_max_for_le): Renamed ppl_max_for_le_pointset.
879 * graphite-poly.c (pbb_number_of_iterations): Rename ppl_max_for_le.
880 * graphite-interchange.c (build_linearized_memory_access): Same.
881 (memory_stride_in_loop): Same.
883 2009-08-25 Sebastian Pop <sebastian.pop@amd.com>
885 * graphite-dependences.c (pddr_original_scattering): New.
886 (graphite_legal_transform_dr): Call pddr_original_scattering.
889 * graphite-dependences.h (dot_deps): Declared.
890 * graphite-poly.c (new_poly_dr): Initialize PDR_ID.
891 (print_pdr): Print PDR_ID.
892 * graphite-poly.h (struct poly_dr): Add field id.
895 * graphite-scop-detection.c (dot_all_scops_1): Cleanup comment.
897 2009-08-22 Sebastian Pop <sebastian.pop@amd.com>
899 * graphite-dependences.c (graphite_carried_dependence_level_k): Do
900 not delete the original dependence relation.
902 2009-08-21 Sebastian Pop <sebastian.pop@amd.com>
904 * graphite-dependences.c (graphite_legal_transform_bb): Avoid
905 the computation of symmetric data dependence relations.
906 (dependency_between_pbbs_p): Same.
908 2009-08-21 Sebastian Pop <sebastian.pop@amd.com>
910 * graphite-dependences.c (new_poly_dr_pair): Renamed new_poly_ddr.
911 (eq_poly_dr_pair_p): Renamed eq_poly_ddr_p.
912 (hash_poly_dr_pair_p): Renamed hash_poly_ddr_p.
913 (free_poly_ddr): New.
914 (pddr_is_empty): New.
915 (dependence_polyhedron_1): Now returns a poly_ddr_p.
916 (dependence_polyhedron): Same. Remove useless gcc_assert.
918 (graphite_legal_transform_dr): Call pddr_is_empty and free_poly_ddr.
919 (graphite_carried_dependence_level_k): Call pddr_is_empty.
920 * graphite-dependences.h (enum poly_dependence_kind): New.
921 (poly_dr_pair): Renamed poly_ddr. Added a field kind.
922 (PDRP_SOURCE): Renamed PDDR_SOURCE.
923 (PDRP_SINK): Renamed PDDR_SINK.
924 (PDRP_DDP): Renamed PDDR_DDP.
926 (free_poly_ddr): Declared.
927 * graphite-poly.c (new_scop): Use the new hash function names.
928 * graphite-poly.h (struct scop): Renamed field original_pdr_pairs
930 (SCOP_ORIGINAL_PDR_PAIRS): Renamed SCOP_ORIGINAL_PDDRS.
932 2009-08-21 Sebastian Pop <sebastian.pop@amd.com>
934 * Merge from mainline (150764:150992).
936 2009-08-18 Sebastian Pop <sebastian.pop@amd.com>
938 * cfgloopmanip.c (create_empty_loop_on_edge): Generate upper
939 bounds with LT_EXPR to make niter analysis more precise on code
940 generated by Graphite.
942 2009-08-18 Sebastian Pop <sebastian.pop@amd.com>
944 * graphite-dependences.c (graphite_legal_transform_dr): Fix formatting.
945 (graphite_legal_transform_bb): Same.
946 (poly_drs_may_alias_p): Same.
948 2009-08-15 Sebastian Pop <sebastian.pop@amd.com>
951 * graphite-ppl.c (ppl_max_for_le): Correct the use of
952 ppl_Pointset_Powerset_C_Polyhedron_maximize.
954 2009-08-13 Sebastian Pop <sebastian.pop@amd.com>
956 * graphite-poly.c (print_pbb): Print PBB index.
958 2009-08-13 Sebastian Pop <sebastian.pop@amd.com>
960 * Merge from mainline (r150672:150764).
962 2009-08-13 Sebastian Pop <sebastian.pop@amd.com>
964 * graphite-interchange.c (ppl_max_for_le): Moved...
965 * graphite-poly.c (pbb_number_of_iterations): Call ppl_max_for_le.
966 * graphite-ppl.c (ppl_max_for_le): ... here.
967 * graphite-ppl.h (ppl_max_for_le): Declared.
969 2009-08-12 Sebastian Pop <sebastian.pop@amd.com>
971 * Merge from mainline (r150372:150672).
973 2009-08-11 Sebastian Pop <sebastian.pop@amd.com>
976 * sese.c (convert_for_phi_arg): New.
977 (add_guard_exit_phis): Use convert_for_phi_arg.
979 * testsuite/gfortran.dg/graphite/id-17.f: New.
981 2009-08-11 Sebastian Pop <sebastian.pop@amd.com>
983 * graphite-sese-to-poly.c (pdr_add_data_dimensions): Dont add
984 unknown subscript upper bounds.
986 * testsuite/gcc.dg/graphite/interchange-6.c: Un-XFAIL.
988 2009-08-11 Sebastian Pop <sebastian.pop@amd.com>
989 Pranav Garg <pranav.garg2107@gmail.com>
991 * graphite-interchange.c (gather_access_strides): Removed.
992 (ppl_max_for_le): New.
993 (build_linearized_memory_access): New.
994 (memory_stride_in_loop): New.
995 (pbb_interchange_profitable_p): Reimplemented.
996 * graphite-ppl.h (ppl_new_id_map): New.
997 (ppl_interchange): New.
999 * testsuite/gcc.dg/graphite/interchange-6.c: XFAILed.
1001 2009-08-11 Sebastian Pop <sebastian.pop@amd.com>
1003 * graphite-interchange.c (compute_subscript): Removed.
1004 (compute_array_size_cstr): Removed.
1005 (compute_array_size_poly): Removed.
1006 (compute_array_size): Removed.
1007 (gather_access_strides_poly): Removed.
1008 (gather_access_strides): Empty.
1010 2009-08-11 Sebastian Pop <sebastian.pop@amd.com>
1012 * graphite-dependences.c (dependence_polyhedron_1): Replace
1013 pdr_nb_subscripts with PDR_NB_SUBSCRIPTS.
1014 (graphite_legal_transform_dr): Same.
1015 (graphite_carried_dependence_level_k): Same.
1016 * graphite-poly.c (new_poly_dr): Add a parameter nb_subscripts.
1017 Initialize PDR_NB_SUBSCRIPTS.
1018 (print_pdr_access_layout): Replace pdr_nb_subscripts with
1020 * graphite-poly.h (struct poly_dr): Add nb_subscripts field.
1021 (PDR_NB_SUBSCRIPTS): New.
1022 (pdr_nb_subscripts): Removed.
1023 (pdr_dim): Simplified.
1024 * graphite-sese-to-poly.c (build_poly_dr): Replace pdr_nb_subscripts
1025 with PDR_NB_SUBSCRIPTS.
1027 2009-08-11 Sebastian Pop <sebastian.pop@amd.com>
1029 * graphite-interchange.c (compute_array_size): Remove use of
1031 * graphite-poly.c (new_poly_dr): Remove argument data_container.
1032 Do not initialize PDR_DATA_CONTAINER.
1033 (print_pdr): Do not print PDR_DATA_CONTAINER.
1034 * graphite-poly.h (struct poly_dr): Remove data_container field.
1035 (PDR_DATA_CONTAINER): Removed.
1036 * graphite-sese-to-poly.c (pdr_add_data_dimensions): Remove use of
1038 (build_poly_dr): Same.
1040 2009-08-11 Sebastian Pop <sebastian.pop@amd.com>
1042 * testsuite/gcc.dg/graphite/interchange-9.c: New.
1044 2009-08-05 Konrad Trifunovic <konrad.trifunovic@gmail.com>
1045 Sebastian Pop <sebastian.pop@amd.com>
1047 * graphite-dependences.c (graphite_legal_transform_dr): Work on a
1048 copy of the dependence polyhedron. Free the temporary objects.
1049 (graphite_carried_dependence_level_k): Free unused objects before
1052 * testsuite/gcc.dg/graphite/interchange-1.c: XFAILed.
1053 * testsuite/gcc.dg/graphite/interchange-2.c: XFAILed.
1054 * testsuite/gcc.dg/graphite/interchange-3.c: XFAILed.
1055 * testsuite/gcc.dg/graphite/interchange-4.c: XFAILed.
1056 * testsuite/gcc.dg/graphite/interchange-7.c: XFAILed.
1058 2009-08-05 Sebastian Pop <sebastian.pop@amd.com>
1060 * graphite-blocking.c (scop_do_strip_mine): Call store_scattering.
1061 Early return without analyzing the data dependences if no
1062 transform has been done. Call restore_scattering if the transform
1064 (graphite-interchange.c): Same.
1065 * graphite-poly.c (print_scattering_function): Test for PBB_TRANSFORMED.
1066 (graphite_read_transforms): Initialize PBB_TRANSFORMED.
1067 (apply_poly_transforms): Do not gcc_assert that
1068 the transform is legal.
1069 (new_poly_bb): Initialize PBB_TRANSFORMED, PBB_SAVED, and PBB_ORIGINAL.
1070 Do not initialize PBB_NB_SCATTERING_TRANSFORM, PBB_NB_LOCAL_VARIABLES,
1071 PBB_TRANSFORMED_SCATTERING, and PBB_ORIGINAL_SCATTERING.
1072 (free_poly_dr): Free PBB_TRANSFORMED, PBB_SAVED, and PBB_ORIGINAL.
1073 * graphite-poly.h (struct poly_scattering): New.
1074 (struct poly_bb): Add original, transformed, and saved fields.
1075 Remove transformed_scattering, original_scattering, nb_local_variables,
1076 and nb_scattering_transform fields.
1077 (PBB_ORIGINAL, PBB_TRANSFORMED, PBB_SAVED): New.
1078 (poly_scattering_new): New.
1079 (poly_scattering_free): New.
1080 (poly_scattering_copy): New.
1081 (store_scattering_pbb): New.
1082 (store_scattering): New.
1083 (restore_scattering_pbb): New.
1084 (restore_scattering): New.
1085 * graphite-sese-to-poly.c (build_pbb_scattering_polyhedrons):
1086 Initialize PBB_TRANSFORMED and PBB_ORIGINAL.
1088 2009-08-05 Sebastian Pop <sebastian.pop@amd.com>
1090 * graphite-poly.c (print_pbb): Add parentheses in the pretty print.
1093 2009-08-05 Sebastian Pop <sebastian.pop@amd.com>
1095 * Makefile.in (graphite.o): Depends on PREDICT_H.
1096 * graphite.c: Include predict.h.
1097 (graphite_finalize): Call tree_estimate_probability.
1098 * predict.c (predict_loops): Do not call scev_initialize and
1100 (tree_estimate_probability_bb): New.
1101 (tree_estimate_probability): Do not initialize loops: move that
1102 code to the driver. Call tree_estimate_probability_bb.
1103 (tree_estimate_probability_driver): New.
1104 (pass_profile): Use tree_estimate_probability_driver.
1105 * predict.h (tree_estimate_probability): Declared.
1107 2009-08-05 Sebastian Pop <sebastian.pop@amd.com>
1109 * graphite-clast-to-gimple.c (gloog): Add time to TV_GRAPHITE_CODE_GEN.
1110 * graphite-dependences.c (graphite_legal_transform): Add time to
1111 TV_GRAPHITE_DATA_DEPS.
1112 (dependency_between_pbbs_p): Same.
1113 * timevar.def (TV_GRAPHITE_DATA_DEPS, TV_GRAPHITE_CODE_GEN): New.
1115 2009-08-03 Sebastian Pop <sebastian.pop@amd.com>
1117 * Merge from mainline (r149952:150372).
1119 2009-07-28 Sebastian Pop <sebastian.pop@amd.com>
1121 * ChangeLog.graphite: Fix indenting, white spaces and 80 columns.
1122 * graphite-blocking.c: Same.
1123 * graphite-clast-to-gimple.c: Same.
1124 * graphite-dependences.c: Same.
1125 * graphite-poly.c: Same.
1126 * graphite-poly.h: Same.
1127 * graphite-ppl.c: Same.
1128 * graphite-scop-detection.c: Same.
1129 * graphite-sese-to-poly.c: Same.
1132 2009-07-28 Sebastian Pop <sebastian.pop@amd.com>
1134 * graphite-sese-to-poly.c (loop_entry_phi_arg): New.
1135 (remove_simple_copy_phi): New.
1136 (remove_invariant_phi): New.
1137 (simple_copy_phi_p): New.
1138 (reduction_phi_p): New.
1139 (gsi_for_ssa_name_def): New.
1140 (insert_out_of_ssa_copy): New.
1141 (insert_out_of_ssa_copy_on_edge): New.
1142 (create_zero_dim_array): New.
1143 (scalar_close_phi_node_p): New.
1144 (rewrite_close_phi_out_of_ssa): New.
1145 (rewrite_phi_out_of_ssa): New.
1146 (rewrite_reductions_out_of_ssa): New.
1147 (build_poly_scop): Call rewrite_reductions_out_of_ssa.
1149 * testsuite/gcc.dg/graphite/id-11.c: New.
1150 * testsuite/gcc.dg/graphite/id-15.c: New.
1151 * testsuite/gcc.dg/graphite/interchange-1.c: Un-XFAIL.
1152 * testsuite/gcc.dg/graphite/interchange-2.c: Un-XFAIL.
1153 * testsuite/gcc.dg/graphite/interchange-3.c: Un-XFAIL.
1154 * testsuite/gcc.dg/graphite/interchange-4.c: Un-XFAIL.
1155 * testsuite/gcc.dg/graphite/interchange-7.c: Un-XFAIL.
1156 * testsuite/gcc.dg/graphite/scop-matmult.c: Un-XFAIL.
1157 * testsuite/gfortran.dg/graphite/id-13.f: New.
1158 * testsuite/gfortran.dg/graphite/id-5.f: New.
1160 2009-07-28 Sebastian Pop <sebastian.pop@amd.com>
1162 * graphite-clast-to-gimple.c (graphite_loop_normal_form): Do not
1163 check that nb_reductions_in_loop is zero.
1164 * graphite-scop-detection.c (harmful_stmt_in_bb): Don't filter out
1165 reduction phi nodes.
1166 (nb_reductions_in_loop): Removed.
1167 (graphite_can_represent_loop): Do not call nb_reductions_in_loop.
1168 * graphite-sese-to-poly.c (phi_node_is_iv): Removed.
1169 (bb_contains_non_iv_scalar_phi_nodes): Removed.
1170 (scop_contains_non_iv_scalar_phi_nodes): Removed.
1171 (build_poly_scop): Do not call scop_contains_non_iv_scalar_phi_nodes.
1173 2009-07-28 Sebastian Pop <sebastian.pop@amd.com>
1175 * graphite-clast-to-gimple.c (build_cloog_prog): Do not code generate
1176 statements that have an empty iteration domain.
1177 * testsuite/gfortran.dg/graphite/id-16.f: New.
1179 2009-07-28 Sebastian Pop <sebastian.pop@amd.com>
1181 * tree-scalar-evolution.c (instantiate_scev_1): Return
1182 chrec_dont_know when the result is not above instantiate_below.
1183 * graphite-scop-detection.c (scopdet_basic_block_info): Fix formatting.
1184 * graphite-sese-to-poly.c (create_linear_expr_from_tree): Assert that
1185 the tree has a known scalar evolution.
1186 * testsuite/gfortran.dg/graphite/id-14.f: New.
1187 * testsuite/gfortran.dg/graphite/id-15.f: New.
1189 2009-07-28 Sebastian Pop <sebastian.pop@amd.com>
1191 * sese.c (rename_variables_in_stmt): Pass in an extra parameter
1193 (rename_variables): Keep inserting renames after the ones already
1196 2009-07-28 Sebastian Pop <sebastian.pop@amd.com>
1198 * graphite-sese-to-poly.c (compare_bb_depths): New.
1199 (graphite_sort_dominated_info): New.
1200 (build_scop_bbs_1): Call graphite_sort_dominated_info.
1201 (build_scop_scattering): Fix comment.
1203 2009-07-28 Sebastian Pop <sebastian.pop@amd.com>
1205 * graphite.c (graphite_finalize): Call print_loops instead of
1206 dump_function_to_file.
1207 * testsuite/gcc.dg/graphite/graphite.exp: Fix formatting.
1208 * testsuite/gcc.dg/graphite/pr35356-1.c: New. Look for the number of
1209 loops generated in the graphite output file.
1210 * testsuite/gcc.dg/graphite/pr35356-2.c: New.
1211 * testsuite/gcc.dg/graphite/pr35356-3.c: New. XFAILed for now.
1212 * testsuite/gfortran.dg/graphite/id-12.f: New.
1214 2009-07-24 Li Feng <nemokingdom@gmail.com>
1216 * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-8.c:
1219 2009-07-24 Li Feng <nemokingdom@gmail.com>
1220 Tobias Grosser <grosser@fim.uni-passau.de>
1222 * graphite-sese-to-poly.c (pdr_add_alias_set): Use data reference's
1223 alias set number build alias in ACCESSES polyhedron.
1224 (build_alias_set_for_drs): New.
1225 (build_pbb_drs): Added build_alias_set_for_drs.
1226 * graphite-dependences.c (poly_drs_may_alias_p): New.
1227 (graphite_carried_dependence_level_k): Check alias information
1228 before building polyhedron.
1230 2009-07-24 Tobias Grosser <grosser@fim.uni-passau.de>
1232 * Makefile.in (lambda-code.o): Fix formatting.
1234 2009-07-24 Tobias Grosser <grosser@fim.uni-passau.de>
1236 * Merge from mainline (r149350-149952)
1238 2009-07-18 Tobias Grosser <grosser@fim.uni-passau.de>
1240 * graphite-poly.c (apply_poly_transforms): Move strip_mine
1241 before interchange to prepare for loop blocking.
1243 2009-07-18 Tobias Grosser <grosser@fim.uni-passau.de>
1245 * graphite-poly.c (apply_poly_transforms): Add checks after every
1247 * graphite-sese-to-poly.c (build_poly_scop): Remove check, as already
1248 done in apply_poly_transforms.
1250 2009-07-17 Konrad Trifunovic <konrad.trifunovic@gmail.com>
1252 * graphite-dependences.c (build_lexicographically_gt_constraint):
1253 Replace RES parameter with *RES.
1254 (dependence_polyhedron_1): Pass an address of the parameter RES
1255 instead of value of RES.
1257 2009-07-16 Sebastian Pop <sebastian.pop@amd.com>
1259 * graphite.c (graphite_finalize): Fix comment.
1260 (graphite_transform_loops): Reset scev info after code generation
1263 2009-07-16 Sebastian Pop <sebastian.pop@amd.com>
1265 * graphite.c (graphite_finalize): Call scev_reset.
1267 2009-07-16 Sebastian Pop <sebastian.pop@amd.com>
1269 * graphite-clast-to-gimple.c (compute_cloog_iv_types): Do not create
1270 GBB_CLOOG_IV_TYPES hash table twice.
1271 * graphite-sese-to-poly.c (free_gimple_bb): Call free_data_refs.
1272 (add_condition_to_domain): Clear GMP values.
1274 2009-07-16 Sebastian Pop <sebastian.pop@amd.com>
1276 * graphite-dependences.c: Fix formatting.
1277 * graphite-poly.c (free_poly_dr): Also free PDR_DATA_CONTAINER.
1278 (pbb_number_of_iterations): Free ppl_Linear_Expression.
1279 * graphite-sese-to-poly.c: Fix formatting.
1280 * graphite.c (graphite_transform_loops): Create the hash table
1281 after the early return.
1283 2009-07-16 Sebastian Pop <sebastian.pop@amd.com>
1285 * testsuite/gcc.dg/graphite/id-14.c: New.
1286 * testsuite/gcc.dg/graphite/pr40157.c: New.
1287 * testsuite/gfortran.dg/graphite/id-11.f: New.
1289 2009-07-16 Sebastian Pop <sebastian.pop@amd.com>
1291 * graphite-sese-to-poly.c (nb_pbbs_in_loops): New.
1292 (build_poly_scop): Return false when there are no pbbs within
1293 loops to avoid to pass to cloog scops with no loops.
1295 2009-07-16 Sebastian Pop <sebastian.pop@amd.com>
1297 * graphite-sese-to-poly.c (build_pbb_scattering_polyhedrons): Avoid
1298 useless test "i % 2".
1299 (build_pbb_scattering_polyhedrons): Fix formatting.
1300 (build_poly_dr): Same.
1301 * graphite.c (graphite_transform_loops): Restructure.
1303 2009-07-14 Razya Ladelsky <razya@il.ibm.com>
1305 * tree-ssa-loop-manip.c (rewrite_phi_with_iv): Remove
1306 reduction_list parameter.
1307 (rewrite_all_phi_nodes_with_iv): Same.
1308 (canonicalize_loop_ivs): Same.
1309 * tree-parloops.c (struct brli): Removed.
1310 (build_reduction_list_info): Removed.
1311 (build_new_reduction): New.
1312 (analyze_reduction_list): Removed.
1313 (gather_scalar_reductions): Find reductions instead of phi
1314 nodes that can't be canonicalized.
1315 (try_create_reduction_list): Remove reduction_list parameter.
1316 (gen_parallel_loop): Same.
1317 (parallelize_loops): Remove analyze_reductions variable,
1318 initialization and free.
1319 Change reduction_list htab initialization to reduction_info
1320 elements instead of ssa names.
1321 Call try_create_reduction_list and gen_parallel_loop without
1322 analyzed_reduction argument.
1323 * graphite-clast-to-gimple (graphite_loop_normal_form): Call
1324 canonicalize_loop_ivs with one less argument.
1325 * tree-flow.h (canonicalize_loop_ivs): Remove one argument.
1327 2009-07-14 Konrad Trifunovic <konrad.trifunovic@gmail.com>
1329 * graphite-dependences.c (new_poly_dr_pair): New.
1330 (dependence_polyhedron): Renamed into dependence_polyhedron_1.
1331 (new_poly_dr_pair): New.
1332 (eq_poly_dr_pair_p): New.
1333 (hash_poly_dr_pair_p): New.
1334 * graphite-dependences.h (struct poly_dr_pair): New.
1335 (eq_poly_dr_pair_p): Declared.
1336 (hash_poly_dr_pair_p): Declared.
1337 * graphite-poly.c (new_scop): Initialize SCOP_ORIGINAL_PDR_PAIRS.
1338 (free_scop): Free SCOP_ORIGINAL_PDR_PAIRS.
1339 * graphite-poly.h (struct scop): Add original_pdr_pairs field.
1340 * Makefile.in (graphite-poly.o): Add dependence on
1341 graphite-dependences.h.
1343 2009-07-14 Sebastian Pop <sebastian.pop@amd.com>
1345 * graphite-scop-detection.c (graphite_can_represent_scev): Do not let
1346 polynomials of degree > 1 pass to Graphite.
1347 * tree-chrec.c (scev_is_linear_expression): Call
1348 evolution_function_is_affine_multivariate_p.
1349 * testsuite/gfortran.dg/graphite/id-10.f90: New.
1351 2009-07-14 Sebastian Pop <sebastian.pop@amd.com>
1353 * tree-scalar-evolution.c (compute_overall_effect_of_inner_loop):
1354 Instantiate scevs varying in outer loops.
1355 * testsuite/gfortran.dg/graphite/id-9.f: Correct testcase.
1357 2009-07-14 Sebastian Pop <sebastian.pop@amd.com>
1359 * graphite-sese-to-poly.c (build_loop_iteration_domains): Do not insert
1360 redundant constraint.
1362 2009-07-14 Sebastian Pop <sebastian.pop@amd.com>
1364 * testsuite/gcc.dg/graphite/graphite.exp: Fix comments.
1365 * testsuite/gfortran.dg/graphite/graphite.exp: Trigger actions
1366 based on the file names as in the C testsuite.
1367 * testsuite/gfortran.dg/graphite/block-1.f90: Fix patterns.
1368 * testsuite/gfortran.dg/graphite/block-2.f: Same.
1369 * testsuite/gfortran.dg/graphite/block-3.f90: Same.
1370 * testsuite/gfortran.dg/graphite/block-4.f90: Same.
1371 * testsuite/gfortran.dg/graphite/id-1.f90: Same.
1372 * testsuite/gfortran.dg/graphite/id-2.f90: Same.
1373 * testsuite/gfortran.dg/graphite/id-3.f90: Same.
1374 * testsuite/gfortran.dg/graphite/id-4.f90: Same.
1375 * testsuite/gfortran.dg/graphite/id-6.f: Same.
1376 * testsuite/gfortran.dg/graphite/id-9.f: Same.
1377 * testsuite/gfortran.dg/graphite/interchange-1.f: Same.
1378 * testsuite/gfortran.dg/graphite/interchange-2.f: Same.
1379 * testsuite/gfortran.dg/graphite/scop-1.f: Same.
1381 2009-07-14 Sebastian Pop <sebastian.pop@amd.com>
1383 * sese.c (expand_scalar_variables_call): New.
1384 (expand_scalar_variables_ssa_name): Handle calls in expander.
1386 2009-07-13 Sebastian Pop <sebastian.pop@amd.com>
1388 * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-6.c:
1389 Expect to see the pattern twice.
1390 * testsuite/gcc.dg/graphite/interchange-0.c: Un-XFAIL.
1391 * testsuite/gcc.dg/graphite/interchange-5.c: Same.
1392 * testsuite/gcc.dg/graphite/interchange-6.c: Same.
1394 2009-07-13 Sebastian Pop <sebastian.pop@amd.com>
1396 * testsuite/gcc.dg/graphite/id-10.c: New.
1397 * testsuite/gcc.dg/graphite/id-12.c: New.
1398 * testsuite/gfortran.dg/graphite/id-7.f: New.
1399 * testsuite/gfortran.dg/graphite/id-8.f: New.
1401 2009-07-13 Sebastian Pop <sebastian.pop@amd.com>
1403 * graphite-sese-to-poly.c (pdr_add_data_dimensions): Fix division by
1406 2009-07-13 Sebastian Pop <sebastian.pop@amd.com>
1408 * sese.c (rename_variables_in_stmt): Call fold_convert during renaming.
1410 2009-07-13 Sebastian Pop <sebastian.pop@amd.com>
1412 * sese.c (expand_scalar_variables_stmt): Avoid unnecessary expansion.
1414 2009-07-10 Sebastian Pop <sebastian.pop@amd.com>
1416 * graphite-sese-to-poly.c (pdr_add_memory_accesses): Fix order of
1417 building PDR subscripts.
1419 2009-07-10 Sebastian Pop <sebastian.pop@amd.com>
1421 * graphite-sese-to-poly.c (pdr_add_data_dimensions): Fix the
1422 computation of array sizes.
1424 2009-07-10 Sebastian Pop <sebastian.pop@amd.com>
1426 * graphite-sese-to-poly.c (add_param_constraints): Disabled.
1428 2009-07-10 Tobias Grosser <grosser@fim.uni-passau.de>
1430 * graphite-dependences.c (map_into_dep_poly, map_dr_into_dep_poly,
1431 build_pairwise_constraint, dr_equality_constraints,
1432 build_pairwise_scheduling_equality,
1433 build_pairwise_scheduling_inequality, lexicographically_gt_p,
1434 build_lexicographically_gt_constraint, dependence_polyhedron,
1435 graphite_legal_transform_dr, graphite_carried_dependence_level_k):
1436 Move from NNC_Polyhedron to C_Polyhedron.
1437 * graphite-interchange.c (compute_array_size_poly,
1438 gather_access_strides): Dito.
1439 * graphite-poly.c (apply_poly_transforms, new_poly_dr, free_poly_bb,
1440 free_scop, pbb_number_of_iterations): Dito.
1441 * graphite-poly.h (struct poly_dr, pdr_nb_subscripts, struct poly_bb,
1442 pbb_dim_iter_domain, struct scop): Dito.
1443 * graphite-ppl.c (new_Constraint_System_from_Cloog_Matrix,
1444 new_Cloog_Domain_from_ppl_Polyhedron,
1445 new_Cloog_Domain_from_ppl_Pointset_Powerset, ppl_set_coef_gmp,
1446 ppl_insert_dimensions_pointset, ppl_insert_dimensions_pointset,
1447 ppl_strip_loop, ppl_strip_loop, ppl_print_polyhedron_matrix,
1448 ppl_print_powerset_matrix, debug_ppl_polyhedron_matrix,
1449 debug_ppl_powerset_matrix, ppl_read_polyhedron_matrix): Dito.
1450 * graphite-ppl.h (ppl_Pointset_Powerset_C_Polyhedron_t,
1451 new_C_Polyhedron_from_Cloog_Matrix, ppl_print_powerset_matrix,
1452 debug_ppl_powerset_matrix, ppl_insert_dimensions_pointset): Dito.
1453 * graphite-sese-to-poly.c (build_pbb_scattering_polyhedrons,
1454 build_loop_iteration_domains, ppl_constraint_type_from_tree_code,
1455 add_condition_to_domain, add_condition_to_pbb, build_scop_context,
1456 build_scop_iteration_domain, build_poly_dr): Dito
1458 2009-07-09 Sebastian Pop <sebastian.pop@amd.com>
1460 * testsuite/gcc.dg/graphite/graphite.exp: Added a rule to execute
1462 * testsuite/gcc.dg/graphite/run-id-1.c: New.
1464 2009-07-09 Sebastian Pop <sebastian.pop@amd.com>
1466 * graphite-sese-to-poly.c (build_loop_iteration_domains): Add the
1467 positivity constraint on the symbolic number of iterations.
1469 2009-07-09 Sebastian Pop <sebastian.pop@amd.com>
1471 * graphite-sese-to-poly.c (build_loop_iteration_domains): Rewrite.
1473 2009-07-09 Sebastian Pop <sebastian.pop@amd.com>
1474 Tobias Grosser <grosser@fim.uni-passau.de>
1476 * graphite-clast-to-gimple.c (build_scop_context): Removed.
1477 (build_cloog_prog): Directly use SCOP_CONTEXT.
1478 * graphite-poly.c (new_scop): Initialize SCOP_CONTEXT.
1479 (free_scop): Free SCOP_CONTEXT.
1480 (print_scop_context): New.
1481 (print_scop): Call print_scop_context.
1482 (debug_scop_context): New.
1483 * graphite-poly.h (print_scop_context, debug_scop_context): Declared.
1484 (struct scop): Added field context.
1485 (SCOP_CONTEXT): New.
1486 * graphite-sese-to-poly.c (add_param_constraints): New.
1487 (build_scop_context): New.
1488 (build_poly_scop): Call build_scop_context.
1490 2009-07-09 Sebastian Pop <sebastian.pop@amd.com>
1492 * graphite-clast-to-gimple.c (gmp_cst_to_tree): Moved...
1493 * graphite-ppl.c (ppl_set_inhomogeneous_gmp, ppl_set_coef_gmp): New.
1494 (ppl_set_inhomogeneous, ppl_set_coef): Moved...
1495 * graphite-ppl.h: Include double-int.h and tree.h.
1496 (ppl_set_inhomogeneous_gmp, ppl_set_coef_gmp): Declared.
1497 (ppl_set_inhomogeneous, ppl_set_coef): ...here.
1498 (gmp_cst_to_tree): ...here. Reimplemented using mpz_get_double_int.
1499 (tree_int_to_gmp, ppl_set_inhomogeneous_tree, ppl_set_coef_tree): New.
1501 2009-07-09 Sebastian Pop <sebastian.pop@amd.com>
1503 * graphite-clast-to-gimple.c (clast_to_gcc_expression_red): Generate
1504 POINTER_PLUS_EXPR for pointer types.
1505 (clast_to_gcc_expression): Same.
1507 2009-07-09 Sebastian Pop <sebastian.pop@amd.com>
1509 * graphite-poly.c (print_scattering_function): Early return when
1510 PBB_TRANSFORMED_SCATTERING is not initialized.
1511 (print_pbb_domain): Early return when PBB_DOMAIN is not initialized.
1513 2009-07-08 Sebastian Pop <sebastian.pop@amd.com>
1515 * tree-parloops.c (analyze_reduction_list): Remove unused variable
1518 2009-07-08 Razya Ladelsky <razya@il.ibm.com>
1520 * tree-parloops.c (analyze_reduction_list): Change return
1522 (try_create_reduction_list): Move the call to
1523 analyze_reduction_list to the beginining.
1524 Call reduction_phi with analyzed_reductions as argument
1525 instead of reduction_list.
1527 2009-07-08 Tobias Grosser <grosser@fim.uni-passau.de>
1529 * Merge from mainline (r148296:149346)
1531 2009-07-07 Sebastian Pop <sebastian.pop@amd.com>
1533 * graphite-scop-detection.c (graphite_can_represent_init): New.
1534 (graphite_can_represent_scev): Call graphite_can_represent_init:
1535 check that the initial value does not contain multiplications of
1537 (stmt_has_simple_data_refs_p): New.
1538 (stmt_simple_for_scop_p): Call stmt_simple_for_scop_p.
1539 (is_simple_operand): Fix formatting.
1540 * graphite-sese-to-poly.c (try_generate_gimple_bb): Fix formatting.
1542 2009-07-07 Sebastian Pop <sebastian.pop@amd.com>
1544 * testsuite/gcc.dg/graphite/id-13.c: New.
1545 * graphite-sese-to-poly.c (graphite_stmt_p): Do not call
1546 analyze_scalar_evolution, use scalar_evolution_in_region.
1547 (scan_tree_for_params_right_scev): Add extra assert.
1548 (parameter_index_in_region_1): Split from parameter_index_in_region.
1549 (idx_record_params): Use scalar_evolution_in_region.
1550 (find_params_in_bb): Same.
1551 (find_scop_parameters): Same.
1552 (build_loop_iteration_domains): Same.
1553 (create_linear_expr_from_tree): Same.
1554 * sese.c (scalar_evolution_in_region): New.
1555 * sese.h (scalar_evolution_in_region): Declared.
1556 (defined_in_sese_p): New.
1557 * tree-scalar-evolution.c (compute_overall_effect_of_inner_loop): Not
1559 * tree-scalar-evolution.h (compute_overall_effect_of_inner_loop):
1562 2009-07-07 Sebastian Pop <sebastian.pop@amd.com>
1564 * Makefile.in: Replace dependences on tree-chrec.h with SCEV_H.
1565 TREE_DATA_REF_H also implies SCEV_H.
1567 2009-07-07 Sebastian Pop <sebastian.pop@amd.com>
1569 * graphite-poly.c (print_scop_params): New.
1570 (print_scop): Call print_scop_params.
1571 (debug_scop_params): New.
1572 * graphite-poly.h (print_scop_params, debug_scop_params): Declared.
1574 2009-07-07 Li Feng <nemokingdom@gmail.com>
1576 * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-4.c: New.
1577 * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-5.c: New.
1578 * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-6.c: New.
1579 * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-7.c: New.
1580 * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-8.c: New.
1581 * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-9.c: New.
1583 2009-07-07 Li Feng <nemokingdom@gmail.com>
1585 * graphite-clast-to-gimple.c (mark_loops_parallel): Dump information
1586 for dependency checking part.
1587 * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-1.c: Add
1588 tests for dependency checking.
1589 * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-2.c: Ditto.
1590 * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-3.c: Ditto.
1591 * testsuite/gcc.dg/graphite/graphite_autopar/graphite_autopar.exp: Add
1592 flag -fdump-tree-graphite-all for autopar testsuites.
1594 2009-07-06 Sebastian Pop <sebastian.pop@amd.com>
1596 * Makefile.in (tree-ssa-loop-manip.o): Depends on langhooks.h.
1597 * tree-parloops.c (rewrite_phi_with_iv, rewrite_all_phi_nodes_with_iv,
1598 canonicalize_loop_ivs): Moved...
1599 * tree-ssa-loop-manip.c: ... here. Include langhooks.h.
1601 2009-07-06 Sebastian Pop <sebastian.pop@amd.com>
1603 * tree-parloops.c (try_create_reduction_list): Pass an extra
1604 argument analyzed_reductions. Call analyze_reduction_list.
1605 (gen_parallel_loop): Do not call analyze_reduction_list.
1606 (parallelize_loops): Init and finalize analyzed_reductions.
1608 2009-07-06 Li Feng <nemokingdom@gmail.com>
1610 * testsuite/gcc.dg/graphite/graphite_autopar/graphite_autopar.exp:
1611 Added flag -fno-loop-strip-mine for autopar testcase.
1613 2009-07-04 Li Feng <nemokingdom@gmail.com>
1615 * graphite-dependences.c (graphite_carried_dependence_level_k): Use
1616 transformed scattering dimension instead of unmatch orignal when
1617 calling dependence_polyhedron.
1619 2009-06-30 Sebastian Pop <sebastian.pop@amd.com>
1621 * opts.c (decode_options): Enable flag_loop_strip_mine at -O2.
1623 2009-06-30 Sebastian Pop <sebastian.pop@amd.com>
1625 * graphite-poly.c (pbb_number_of_iterations): Check for returned
1626 value 1 from ppl_Pointset_Powerset_NNC_Polyhedron_maximize.
1628 2009-06-30 Sebastian Pop <sebastian.pop@amd.com>
1630 * graphite-blocking.c (pbb_strip_mine_profitable_p): New.
1631 (pbb_do_strip_mine): Call pbb_strip_mine_profitable_p.
1632 * graphite-poly.c (pbb_number_of_iterations): New.
1633 * graphite-poly.h (pbb_number_of_iterations): Declared.
1634 (pbb_iterator_dim, pbb_parameter_dim): New.
1636 2009-06-29 Sebastian Pop <sebastian.pop@amd.com>
1638 * graphite-clast-to-gimple.c (graphite_create_new_loop): Revert the
1639 last commit on type of lower and upper bound of loops.
1641 2009-06-29 Li Feng <nemokingdom@gmail.com>
1643 * Makefile.in (graphite-clast-to-gimple.o): Added dependence on
1644 graphite-dependences.h.
1645 * graphite-clast-to-gimple.c (new_bb_pbb_def): New.
1646 (mark_bb_with_pbb): New.
1647 (get_stmtfor_depth): New.
1648 (find_pbb_via_hash): New.
1649 (dependency_in_loop_p): New.
1650 (mark_loops_parallel): New.
1651 (free_aux_in_new_loops): New.
1652 (translate_clast): Add parameter BB_PBB_MAPPING. Mark newly created
1653 bb with it's relevant pbb. Mark newly created loops. Remove mark
1654 innermost loop parallel without checking.
1655 (gloog): Add parameter BB_PBB_MAPPING.
1656 * graphite-clast-to-gimple.h (struct bb_pbb_def): New.
1657 (gloog): Change declaration.
1658 (mark_loop_parallel): Make extern.
1659 (free_aux_in_new_loops): Declare.
1660 (bb_pbb_map_hash): New.
1661 (eq_bb_pbb_map): New.
1662 * graphite.c (graphite_transform_loops): Added BB_PBB_MAPPING. Trigger
1663 auto parallelization when flag_graphite_force_parallel is set.
1664 (graphite_finalize): Added free_aux_in_new_loops.
1665 * tree-parloops.c (parallelize_loops): Only generate parallel code for
1666 the innermost loop that marked parallel. Use
1667 flag_graphite_force_parallel instead of loop->can_be_parallel.
1668 (loop_parallel_p): Move inner most checking out of function.
1670 2009-06-26 Sebastian Pop <sebastian.pop@amd.com>
1672 * graphite-clast-to-gimple.c (graphite_create_new_loop): Make the
1673 type of lower and upper bound of loops signed long int.
1675 2009-06-26 Sebastian Pop <sebastian.pop@amd.com>
1677 * cfgloopmanip.c (create_empty_loop_on_edge): Gimplify the loop exit
1678 expression outside the loop.
1680 2009-06-26 Sebastian Pop <sebastian.pop@amd.com>
1682 * gcc.dg/graphite/interchange-8.c: New.
1684 2009-06-26 Sebastian Pop <sebastian.pop@amd.com>
1686 * gcc.dg/graphite/interchange-0.c: XFailed.
1687 * gcc.dg/graphite/interchange-5.c: XFailed.
1688 * gcc.dg/graphite/interchange-6.c: XFailed.
1690 2009-06-26 Sebastian Pop <sebastian.pop@amd.com>
1692 * graphite-interchange.c (compute_array_size_poly): The end of the
1693 recursion should return 1.
1695 2009-06-26 Sebastian Pop <sebastian.pop@amd.com>
1697 * graphite-interchange.c (compute_array_size_cstr): Allow the
1698 subscript multiplier to be -1.
1699 (compute_array_size): Use PDR_DATA_CONTAINER and not PDR_ACCESSES.
1700 * graphite-poly.c (new_poly_dr): Takes an extra argument for the
1701 data_container. Initializes PDR_DATA_CONTAINER.
1702 (print_pdr_access_layout): New.
1703 (print_pdr): Call print_pdr_access_layout. Print PDR_DATA_CONTAINER.
1704 * graphite-poly.h (struct poly_dr): Adjust comment. Add a new field
1706 (PDR_DATA_CONTAINER): New.
1707 (new_poly_dr): Update declaration.
1708 * graphite-sese-to-poly.c (pdr_add_data_dimensions): New.
1709 (build_poly_dr): Call pdr_add_data_dimensions.
1711 2009-06-26 Sebastian Pop <sebastian.pop@amd.com>
1713 * graphite-poly.h (struct poly_dr): Fix comment.
1714 * graphite-sese-to-poly.c (pdr_add_alias_set): New.
1715 (pdr_add_memory_accesses): New.
1716 (build_poly_dr): Call pdr_add_memory_accesses and pdr_add_alias_set.
1718 2009-06-26 Sebastian Pop <sebastian.pop@amd.com>
1720 * graphite-poly.c (print_pdrs, debug_pdrs): New.
1721 (print_pbb): Add call to print_pdrs.
1722 * graphite-poly.h (print_pdrs, debug_pdrs): Declared.
1724 2009-06-24 Konrad Trifunovic <konrad.trifunovic@gmail.com>
1725 Li Feng <nemokingdom@gmail.com>
1727 * graphite-dependences.c (graphite_carried_dependence_level_k): New.
1728 (dependency_between_pbbs_p): New.
1729 (lexicographically_gt_p): Assure !empty_p before polyhedron
1730 intersection assign.
1731 (build_lexicographically_gt_constraint): Correct lexicographically
1733 * graphite-dependences.h: New.
1734 * Makefile.in (graphite-dependences.o): Add graphite-dependences.h.
1736 2009-06-24 Sebastian Pop <sebastian.pop@amd.com>
1738 * graphite-clast-to-gimple.c (print_clast_stmt): New.
1739 (gloog): Print to dump_file the generated clast.
1740 * graphite-clast-to-gimple.h (print_clast_stmt): Declared.
1741 * graphite-interchange.c (pbb_do_interchange): Fix dump formatting.
1743 2009-06-24 Sebastian Pop <sebastian.pop@amd.com>
1745 * graphite-poly.c (extend_scattering): Increment
1746 PBB_NB_LOCAL_VARIABLES by the number of added dimensions.
1748 2009-06-24 Sebastian Pop <sebastian.pop@amd.com>
1750 * graphite-interchange.c (compute_array_size_poly): Added exit of
1751 recursion condition. Continue iterating even after the first equality.
1752 (compute_array_size): Same.
1754 2009-06-24 Li Feng <nemokingdom@gmail.com>
1756 * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-1.c: Update
1757 -fdump-tree-final_cleanup to -fdump-tree-optimized.
1758 * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-2.c: Ditto.
1759 * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-3.c: Ditto.
1760 * testsuite/gcc.dg/graphite/graphite_autopar/graphite_autopar.exp: Ditto.
1762 2009-06-23 Sebastian Pop <sebastian.pop@amd.com>
1764 * sese.c (expand_scalar_variables_stmt): Expand scalar variables
1765 only when the use verifies is_gimple_reg.
1767 2009-06-23 Sebastian Pop <sebastian.pop@amd.com>
1769 * graphite-clast-to-gimple.c (build_cloog_prog): Fix memory corruption.
1770 Allocate scaldims after call to unify_scattering_dimensions.
1772 2009-06-23 Sebastian Pop <sebastian.pop@amd.com>
1774 * graphite-clast-to-gimple.c (translate_clast): Fix memory leak.
1776 2009-06-23 Sebastian Pop <sebastian.pop@amd.com>
1777 Albert Cohen <albert.cohen@inria.fr>
1779 * graphite-blocking.c (pbb_strip_mine_loop_depth): Do not use local
1780 variables for the strip mining.
1782 2009-06-23 Sebastian Pop <sebastian.pop@amd.com>
1783 Pranav Garg <pranav.garg2107@gmail.com>
1785 * Makefile.in (OBJS-common): Added graphite-blocking.o.
1786 (graphite-sese-to-poly.o): Moved down to be in lexicographical order.
1787 (graphite-blocking.o): New rule.
1788 (graphite-poly.o, graphite-ppl.o): Moved to be in lexicographical order.
1789 * graphite-blocking.c: New.
1790 * graphite-poly.c (apply_poly_transforms): Call scop_do_strip_mine for
1791 flag_loop_strip_mine.
1792 (psct_scattering_dim_for_loop_depth): New.
1793 * graphite-poly.h (scop_do_strip_mine): Declared.
1794 (psct_add_local_variable): Increment PBB_NB_LOCAL_VARIABLES.
1795 * tree-ssa-loop.c (gate_graphite_transforms): Do not fail when using
1796 flag_loop_strip_mine.
1798 2009-06-23 Sebastian Pop <sebastian.pop@amd.com>
1800 * graphite-poly.c (extend_scattering): Avoid initializing and freeing
1801 a GMP value and a PPL coefficient at each iteration of a loop.
1803 2009-06-23 Sebastian Pop <sebastian.pop@amd.com>
1805 * graphite-dependences.c (dependence_polyhedron): Do not use
1806 pbb_nb_scattering_dims anymore. Use pbb_nb_scattering_orig and
1807 pbb_nb_scattering_transform.
1808 (graphite_legal_transform_dr): Same.
1809 * graphite-poly.c (extend_scattering): Same.
1810 (unify_scattering_dimensions): Same.
1811 (print_scattering_function): Same.
1812 (new_poly_bb): Initialize PBB_NB_SCATTERING_TRANSFORM and
1813 PBB_NB_LOCAL_VARIABLES.
1814 * graphite-poly.h (pbb_nb_scattering): Removed declaration.
1815 (struct poly_bb): Added nb_local_variables and nb_scattering_transform.
1816 (PBB_NB_LOCAL_VARIABLES, PBB_NB_SCATTERING_TRANSFORM): New.
1817 (pbb_nb_scattering_orig, pbb_nb_scattering_transform): New.
1818 (pbb_nb_scattering_dims, pbb_nb_scattering): Removed.
1819 (pbb_nb_scattering_transform): New.
1820 (pbb_nb_local_vars): Return PBB_NB_LOCAL_VARIABLES.
1821 (psco_scattering_dim): Add assert on parameters.
1822 (psct_scattering_dim): Same.
1823 (psct_scattering_dim_for_loop_depth): Declared.
1824 (psct_local_var_dim): New.
1825 (psco_iterator_dim, psco_parameter_dim): Add assert on parameters.
1826 (psct_iterator_dim, psct_parameter_dim): Same. To maintain the
1827 correct layout, call pbb_nb_local_vars.
1828 (psct_add_local_variable, psct_add_scattering_dimension): New.
1829 * graphite-sese-to-poly.c (build_pbb_scattering_polyhedrons):
1830 Initialize PBB_NB_SCATTERING_TRANSFORM.
1832 2009-06-23 Sebastian Pop <sebastian.pop@amd.com>
1834 * graphite-ppl.c (set_inhomogeneous): Renamed ppl_set_inhomogeneous.
1835 (set_coef): Renamed ppl_set_coef.
1836 * graphite-ppl.h (ppl_set_inhomogeneous, ppl_set_coef): Declared.
1838 2009-06-23 Sebastian Pop <sebastian.pop@amd.com>
1840 * graphite-dependences.c (build_pairwise_scheduling_inequality): Don't
1841 test a boolean against 1.
1842 * graphite-interchange.c (pbb_interchange_loop_depths): Do not build
1843 a new polyhedron for the PBB_TRANSFORMED_SCATTERING.
1844 (pbb_do_interchange): Returns true when a transform has been performed.
1845 (scop_do_interchange): Same.
1846 * graphite-poly.c (apply_poly_transforms): Use the return value of
1847 scop_do_interchange.
1848 * graphite-poly.h (scop_do_interchange): Update declaration.
1850 2009-06-23 Tobias Grosser <grosser@fim.uni-passau.de>
1852 * graphite-clast-to-gimple.c (gloog): Reset loop->aux right
1854 * sese.c (sese_reset_aux_in_loops): New.
1855 * sese.h (sese_reset_aux_in_loops): New.
1857 2009-06-19 Sebastian Pop <sebastian.pop@amd.com>
1859 * graphite-sese-to-poly.c (scan_tree_for_params_int): Pass in the
1860 multiplier and multiply the constant by the multiplier.
1861 (scan_tree_for_params): Bound the multiplier to its MULT_EXPR.
1862 (build_poly_dr): Do not use the multiplier to define the subscript.
1864 2009-06-19 Sebastian Pop <sebastian.pop@amd.com>
1866 * graphite-poly.c (new_poly_dr): Pass an extra argument for the
1867 compiler's data reference. Initialize PDR_CDR.
1868 (print_pdr): Call dump_data_reference.
1869 * graphite-poly.h (struct poly_dr): Rename black_box into pbb.
1870 Add compiler_dr field.
1871 (PDR_BB): Renamed PDR_PBB.
1873 * graphite-sese-to-poly.c (build_poly_dr): Pass to new_poly_dr
1874 GCC's data reference representation.
1875 * tree-data-ref.c (debug_data_references, debug_data_reference): New.
1876 * tree-data-ref.h (debug_data_references, debug_data_reference): Decl.
1878 2009-06-19 Sebastian Pop <sebastian.pop@amd.com>
1880 * graphite-poly.c (print_scattering_function): Also print the layout.
1881 * graphite-poly.h (pbb_nb_local_vars): New.
1883 2009-06-19 Sebastian Pop <sebastian.pop@amd.com>
1885 * graphite-poly.c (print_pbb_domain): Also print the layout names.
1887 2009-06-19 Sebastian Pop <sebastian.pop@amd.com>
1889 * graphite-poly.c (print_pdr, debug_pdr): New.
1890 * graphite-poly.h (print_pdr, debug_pdr): Declared.
1891 (PDR_BASE): Removed.
1893 2009-06-18 Sebastian Pop <sebastian.pop@amd.com>
1895 * gcc/testsuite/gcc.dg/graphite/interchange-{1..7}.c: New avatars of
1898 2009-06-18 Sebastian Pop <sebastian.pop@amd.com>
1900 * graphite-interchange.c (compute_subscript): Allow also -1 in the
1901 subscript identification column.
1902 (pbb_do_interchange): Print to dump_file that some loops "will be
1903 interchanged". Rely on that chain of characters in the testcases.
1904 * gcc.dg/graphite/interchange-0.c: New.
1905 * gcc.dg/graphite/graphite.exp: Iterate over the testsuite
1906 interchange-*.c files and compile them with -floop-interchange.
1908 2009-06-18 Pranav Garg <pranav.garg2107@gmail.com>
1910 * graphite-interchange.c (interchange_profitable_p): Renamed
1911 pbb_interchange_profitable_p.
1913 2009-06-18 Sebastian Pop <sebastian.pop@amd.com>
1914 Harsha Jagasia <harsha.jagasia@amd.com>
1915 Pranav Garg <pranav.garg2107@gmail.com>
1917 * graphite-interchange.c (interchange_profitable_p): Make static.
1918 (pbb_interchange_loop_depths, pbb_do_interchange,
1919 scop_do_interchange): New.
1920 * graphite-poly.c (apply_poly_transforms): Call scop_do_interchange
1921 for flag_loop_interchange.
1922 * graphite-poly.h (scop_do_interchange): Declared.
1923 * tree-ssa-loop.c (gate_graphite_transforms): Do not fail when
1924 flag_loop_interchange is used.
1926 2009-06-18 Sebastian Pop <sebastian.pop@amd.com>
1928 * graphite-dependences.c (dependence_polyhedron): Update use of
1929 pbb_nb_scattering_dims.
1930 * graphite-poly.h (pbb_nb_scattering_dims): Do not pass SCOP.
1931 (pbb_nb_scattering): Update use of pbb_nb_scattering_dims.
1932 (psco_scattering_dim, psct_scattering_dim, psco_iterator_dim,
1933 psct_iterator_dim, psco_parameter_dim, psct_parameter_dim): New.
1935 2009-06-16 Sebastian Pop <sebastian.pop@amd.com>
1937 * graphite.c: Cleanup foo.
1939 2009-06-16 Sebastian Pop <sebastian.pop@amd.com>
1941 * Merge from mainline (r143684:148293).
1942 * Disabled libpcp until it gets fixed.
1944 2009-06-05 Sebastian Pop <sebastian.pop@amd.com>
1945 Harsha Jagasia <harsha.jagasia@amd.com>
1947 * graphite-interchange.c: New.
1948 * Makefile.in (graphite-interchange.o): New.
1949 * graphite-poly.h (interchange_profitable_p): Declared.
1950 * graphite-ppl.h (value_max): New.
1952 2009-06-04 Sebastian Pop <sebastian.pop@amd.com>
1954 * graphite-dependences.c (dependence_polyhedron): Use pdr_dim.
1955 * graphite-poly.h: Fix some comments.
1959 2009-06-04 Sebastian Pop <sebastian.pop@amd.com>
1962 (pdr_accessp_nb_subscripts): Renamed pdr_nb_subscripts.
1963 (pdr_accessp_nb_iterators): Renamed pdr_dim_iter_domain.
1964 (pdr_accessp_nb_params): Renamed pdr_nb_params.
1965 (pdr_accessp_alias_set_dim): Renamed pdr_alias_set_dim.
1966 (pdr_accessp_subscript_dim): Renamed pdr_subscript_dim.
1967 (pdr_accessp_iterator_dim): Renamed pdr_iterator_dim.
1968 (pdr_accessp_param_dim): Renamed pdr_parameter_dim.
1969 (pbb_nb_loops): Renamed pbb_dim_iter_domain.
1970 * graphite-clast-to-gimple.c: Same.
1971 * graphite-dependences.c: Same.
1972 * graphite-poly.c: Same.
1973 * graphite-sese-to-poly.c: Same.
1975 2009-06-03 Sebastian Pop <sebastian.pop@amd.com>
1977 * graphite-clast-to-gimple.c (build_iv_mapping): Insert full
1978 expressions for an IV rename, as returned by clast_to_gcc_expression.
1979 (copy_renames): Rename new_name to expr.
1980 * sese.c (debug_rename_elt): Same.
1983 (sese_adjust_liveout_phis): Call force_gimple_operand before using
1984 the information from the rename map.
1985 (rename_variables_in_stmt): Same.
1986 (add_loop_exit_phis): Rename new_name to expr.
1987 (insert_loop_close_phis): Same.
1988 (add_guard_exit_phis): Same. Call force_gimple_operand.
1989 * sese.h (struct rename_map_elt): Rename new_name to expr.
1990 (new_rename_map_elt): Same.
1992 2009-06-03 Sebastian Pop <sebastian.pop@amd.com>
1994 * graphite-clast-to-gimple.c (build_iv_mapping): Use set_rename.
1995 * sese.c (set_rename): Make it extern.
1996 * sese.h (set_rename): Declared.
1998 2009-06-03 Sebastian Pop <sebastian.pop@amd.com>
2000 * graphite-poly.c (extend_scattering): Free values.
2001 * graphite-ppl.c (new_Cloog_Domain_from_ppl_Pointset_Powerset):
2003 (ppl_print_powerset_matrix): Same.
2004 * graphite-scop-detection.c (free_scops_1): New.
2005 (limit_scops): Call free_scops_1.
2006 * graphite-sese-to-poly.c (build_scop_bbs_1): Free dom.
2007 (build_poly_dr): Free PPL coefficients.
2008 * tree-parloops.c (rewrite_all_phi_nodes_with_iv): Free bbs.
2010 2009-06-02 Sebastian Pop <sebastian.pop@amd.com>
2012 * graphite-dependences.c: New.
2013 * graphite-data-ref.c: Removed.
2014 * graphite-data-ref.h: Removed.
2015 * Makefile.in (graphite-data-ref.o): Removed.
2016 (graphite-dependences.o): Added.
2017 * graphite-clast-to-gimple.c: Remove dependence on graphite-data-ref.h.
2018 * graphite-poly.c: Same.
2019 Move the data dependence testing to graphite-dependences.c.
2021 2009-05-19 Tobias Grosser <grosser@fim.uni-passau.de>
2023 * graphite-scop-detection.c (graphite_can_represent_loop): Renamed
2024 from graphite_cannot_represent_loop. Code refactored.
2025 (scopdet_basic_block_info): Call graphite_can_represent_loop.
2027 2009-05-17 Li Feng <nemokingdom@gmail.com>
2029 * testsuite/gcc.dg/graphite/graphite_autopar/graphite_autopar.exp:
2030 Cover all the testcases (not only the filtered ones).
2032 2009-05-17 Tobias Grosser <grosser@fim.uni-passau.de>
2034 * graphite-scop-detection.c (stmt_simple_for_scop_p): Remove
2035 unnecessary check. Update comments. Move check for REAL_TYPE here.
2036 (harmful_stmt_in_bb): Remove checks for conditions. This is already
2037 done in (stmt_simple_for_scop_p).
2039 2009-05-14 Tobias Grosser <grosser@fim.uni-passau.de>
2041 * graphite.c (print_global_statistics): New.
2042 (print_graphite_scop_statistic): New.
2043 (print_graphite_statistics): New.
2044 (graphite_initialize, graphite_transform_loops): Print statistics.
2045 * graphite-scop-detection (build_scops): Print statistics.
2046 (print_graphite_scop_statistics): New.
2047 (print_graphite_statistics): New.
2049 2009-05-13 Sebastian Pop <sebastian.pop@amd.com>
2051 * graphite-clast-to-gimple.c (struct clast_name_index): Removed.
2052 (debug_clast_name_index): Removed.
2053 (debug_clast_name_indexes_1): Removed.
2054 (debug_clast_name_indexes): Removed.
2055 (clast_name_index_elt_info): Removed.
2056 (eq_clast_name_indexes): Removed.
2057 (clast_name_to_index): Removed.
2058 (new_clast_name_index): Removed.
2059 (save_clast_name_index): Removed.
2060 (save_var_name): Moved...
2061 (init_sese_params_index): Removed.
2062 (clast_name_to_gcc): Remove use of name_tree.
2063 (initialize_cloog_names): Same.
2064 (gloog): Do not call init_sese_params_index.
2065 * graphite-sese-to-poly.c (save_var_name): ...here.
2066 (parameter_index_in_region): New.
2067 * sese.c (new_sese): Initialize SESE_PARAMS_NAMES.
2068 (parameter_index_in_region): Removed.
2069 (is_parameter): Remove use of name_tree.
2070 * sese.h (struct name_tree): Removed.
2071 (struct sese): Remove use of name_tree. New field params_names.
2072 (SESE_PARAMS_NAMES): New.
2073 (SESE_PARAMS): Remove duplicate.
2074 (parameter_index_in_region): Removed.
2075 (sese_nb_params): Remove use of name_tree.
2076 (struct clast_name_index): New.
2077 (new_clast_name_index): New.
2078 (clast_name_to_index): New.
2079 (save_clast_name_index): New.
2080 (debug_clast_name_index): New.
2081 (debug_clast_name_indexes_1): New.
2082 (debug_clast_name_indexes): New.
2083 (clast_name_index_elt_info): New.
2084 (eq_clast_name_indexes): New.
2086 2009-05-13 Sebastian Pop <sebastian.pop@amd.com>
2088 * graphite-clast-to-gimple.c (compute_cloog_iv_types_1): Call
2089 pbb_to_depth_to_oldiv. Remove call to oldiv_for_loop.
2090 (graphite_loop_normal_form): Do not pass region. Do not
2091 initialize SESE_OLDIVS.
2092 (build_graphite_loop_normal_form): Update call to
2093 graphite_loop_normal_form.
2094 * sese.c (debug_oldivs): Removed.
2095 (new_sese): Do not initialize SESE_OLDIVS.
2096 (free_sese): Do not free SESE_OLDIVS.
2097 (oldiv_for_loop): Removed.
2098 * sese.h (struct sese): Remove old_ivs.
2099 (SESE_OLDIVS): Removed.
2100 (oldiv_for_loop): Removed.
2102 2009-05-13 Sebastian Pop <sebastian.pop@amd.com>
2104 * graphite-clast-to-gimple.c (clast_name_to_gcc): Pass newivs,
2105 remove ivstack. Remove call to loop_iv_stack_get_iv_from_name,
2106 replaced by a call to newivs_to_depth_to_newiv.
2107 (clast_to_gcc_expression): Pass newivs, remove ivstack.
2108 (clast_to_gcc_expression_red): Same.
2109 (gcc_type_for_clast_expr): Same.
2110 (gcc_type_for_clast_eq): Same.
2111 (graphite_translate_clast_equation): Same.
2112 (graphite_create_guard_cond_expr): Same.
2113 (graphite_create_new_guard): Same.
2114 (graphite_create_new_loop): Same.
2115 (build_iv_mapping): Same.
2116 (translate_clast): Same.
2118 (loop_iv_stack_patch_for_consts): Removed. *
2119 sese.c (iv_stack_entry_is_constant): Removed.
2120 (iv_stack_entry_is_iv): Removed.
2121 (loop_iv_stack_push_iv): Removed.
2122 (loop_iv_stack_insert_constant): Removed.
2123 (loop_iv_stack_pop): Removed.
2124 (loop_iv_stack_get_iv): Removed.
2125 (loop_iv_stack_get_iv_from_name): Removed.
2126 (debug_loop_iv_stack): Removed.
2127 (free_loop_iv_stack): Removed.
2128 (loop_iv_stack_remove_constants): Removed. *
2129 sese.h (iv_stack_entry_kind): Removed.
2130 (iv_stack_entry_data_union): Removed.
2131 (iv_stack_entry_struct): Removed.
2132 (iv_stack_entry_p): Removed.
2133 (debug_oldivs, debug_loop_iv_stack, loop_iv_stack_insert_constant,
2134 loop_iv_stack_get_iv_from_name, loop_iv_stack_push_iv,
2135 loop_iv_stack_get_iv, loop_iv_stack_remove_constants,
2136 loop_iv_stack_pop, free_loop_iv_stack): Removed.
2137 (gbb_loop_at_index): Fix indenting.
2138 (gbb_loop_index): Removed.
2140 2009-05-13 Sebastian Pop <sebastian.pop@amd.com>
2142 * graphite-clast-to-gimple.c (clast_name_to_gcc): Do not use strcmp.
2143 Call clast_name_to_index.
2145 2009-05-13 Sebastian Pop <sebastian.pop@amd.com>
2147 * graphite-clast-to-gimple.c (clast_name_to_gcc): Pass region,
2148 do not pass params. Get params from SESE_PARAMS.
2149 (clast_to_gcc_expression): Same.
2150 (clast_to_gcc_expression_red): Same.
2151 (gcc_type_for_clast_eq): Same.
2152 (graphite_translate_clast_equation): Same.
2153 (graphite_create_new_loop): Same.
2154 * sese.c (rename_variables_in_stmt): Fix comment.
2156 2009-05-13 Sebastian Pop <sebastian.pop@amd.com>
2158 * graphite-clast-to-gimple.c (graphite_create_new_loop): Pass
2160 Call save_clast_name_index.
2161 (translate_clast): Pass newivs_index.
2162 (gloog): Create and free newivs_index.
2164 2009-05-13 Sebastian Pop <sebastian.pop@amd.com>
2166 * graphite-clast-to-gimple.c (clast_name_index): New structure.
2167 (clast_name_index_p): New type.
2168 (debug_clast_name_index): New.
2169 (debug_clast_name_indexes_1): New.
2170 (debug_clast_name_indexes): New.
2171 (clast_name_index_elt_info): New.
2172 (eq_clast_name_indexes): New.
2173 (clast_name_to_index): New.
2174 (new_clast_name_index): New.
2175 (save_clast_name_index): New.
2176 (init_sese_params_index): New.
2177 (gloog): Call init_sese_params_index.
2178 * graphite-clast-to-gimple.h (debug_clast_name_indexes): Declared.
2179 * sese.c (new_sese): Initialize SESE_PARAMS_INDEX.
2180 (free_sese): Free SESE_PARAMS_INDEX.
2181 * sese.h (struct sese): Add params_index.
2182 (SESE_PARAMS_INDEX): New.
2184 2009-05-13 Sebastian Pop <sebastian.pop@amd.com>
2186 * graphite-clast-to-gimple.c (newivs_to_depth_to_newiv): New.
2187 (graphite_create_new_loop): Pass the newivs vector. Push the
2188 newly created IV to newivs.
2189 (translate_clast): Pass the newivs vector.
2190 (gloog): Create and destroy the newivs vector.
2192 2009-05-13 Sebastian Pop <sebastian.pop@amd.com>
2194 * graphite-clast-to-gimple.c (pbb_to_depth_to_oldiv): New.
2195 (graphite_loop_normal_form): Initialize loop->aux with the unique
2196 IV that has been created.
2198 2009-05-13 Tobias Grosser <grosser@fim.uni-passau.de>
2200 * tree-chrec.c (evolution_function_right_is_integer_cst): Allow
2201 scev with parameters in the base part. They where forbidden
2204 2009-05-11 Li Feng <nemokingdom@gmail.com>
2206 * testsuite/gcc.dg/graphite/graphite.exp: Set different default
2207 compile options by file names.
2208 * testsuite/gcc.dg/graphite/block{0-6}.c: Remove dg-option line.
2209 * testsuite/gcc.dg/graphite/id-{1-9}.c: Ditto.
2210 * testsuite/gcc.dg/graphite/scop-{0-20}.c: Ditto.
2211 * testsuite/gcc.dg/graphite/scop-matmult.c: Ditto.
2213 2009-05-08 Li Feng <nemokingdom@gmail.com>
2215 * testsuite/gcc.dg/graphite/graphite_autopar/graphite_autopar.exp: New.
2216 * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-1.c: New.
2217 * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-2.c: New.
2218 * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-3.c: New.
2220 2009-05-07 Tobias Grosser <grosser@fim.uni-passau.de>
2222 * graphite-scop-detection (build_scops_1): Fix little bug introduced
2225 2009-05-07 Tobias Grosser <grosser@fim.uni-passau.de>
2227 * graphite-scop-detection.c (graphite_can_represent_scev): Only
2228 allow integer constant strides.
2229 (graphite_can_represent_expr): Depend on outermost_loop.
2230 (stmt_simple_memref_p, graphite_cannot_represent_loop,
2231 harmful_stmt_in_bb, is_simple_operand, stmt_simple_for_scop_p,
2232 build_scops_1): Same.
2233 (scopdet_basic_block_info): Same and insert layered SCoP
2235 (try_generate_gimple_bb): Cleanup.
2236 (build_scops): Enable data references.
2238 * testsuite/gcc.dg/graphite/id-5.c: New.
2239 * testsuite/gcc.dg/graphite/id-9.c: New.
2240 * tree-chrec.c (evolution_function_right_is_integer_cst): New.
2241 * tree-chrec.h (evolution_function_right_is_integer_cst): New.
2243 2009-05-06 Tobias Grosser <grosser@fim.uni-passau.de>
2245 * sese.c (expand_scalar_variables_ssa_name): Only build expressions,
2246 that we have not yet built for this SCoP.
2248 2009-05-06 Tobias Grosser <grosser@fim.uni-passau.de>
2250 * sese.c (expand_scalar_variables_expr): Fix expand_scalar_variables
2251 for complex numbers.
2253 2009-05-06 Tobias Grosser <grosser@fim.uni-passau.de>
2255 * graphite-ppl.c: Fix build if cloog is not available.
2257 2009-05-04 Li Feng <nemokingdom@gmail.com>
2259 * tree-parloops.c (loop_parallel_p): Remove construction of
2260 NITER and REDUCTION_LIST.
2261 (try_get_loop_niter): New.
2262 (try_create_reduction_list): New.
2263 (parallelize_loops): Bypass the failed checkings in autopar
2264 when can_be_parallel in loop structure is set to true.
2266 2009-05-01 Tobias Grosser <grosser@fim.uni-passau.de>
2268 * testsuite/gcc.dg/graphite/id-6.c: Update testcase.
2269 * testsuite/gcc.dg/graphite/scop-3.c: Dito.
2271 2009-05-01 Tobias Grosser <grosser@fim.uni-passau.de>
2273 * graphite-scop-detection.c (stmt_simple_for_scop_p):
2274 Enable EQ_EXPR and NE_EXPR again.
2276 2009-04-30 Tobias Grosser <grosser@fim.uni-passau.de>
2278 * graphite-scop-detection.c (graphite_can_represent_scev):
2279 Add check if scev is affine multivariate.
2280 (harmful_stmt_in_bb): Check if we can represent the conditions.
2281 (scopdet_basic_block_info (basic_block bb, VEC): Pass the loop to
2283 * testsuite/gcc.dg/graphite/id-7.c: New.
2285 2009-04-30 Tobias Grosser <grosser@fim.uni-passau.de>
2287 * graphite-sese-to-poly.c (bb_contains_non_iv_scalar_phi_nodes):
2288 Check all bbs in region, not only the bbs that are represented in
2290 (build_poly_scop): Add newline.
2291 * testsuite/gcc.dg/graphite/id-8.c: New.
2293 2009-04-30 Li Feng <nemokingdom@gmail.com>
2295 * cfgloop.c (alloc_loop): Initialize can_be_parallel to false
2296 when loop initialize.
2297 * cfgloop.h (struct loop): Introduce flag can_be_parallel.
2298 * common.opt: Declare flag_graphite_force_parallel.
2299 * graphite-clast-to-gimple.c (translate_clast): Mark the innermost
2301 * graphite-poly.c (apply_poly_transforms): Introduce
2302 flag_graphite_force_parallel.
2303 * tree-ssa-loop.c (gate_graphite_transforms): ditto.
2304 * toplev.c (process_options): ditto and replace a not correctly
2307 2009-04-30 Li Feng <nemokingdom@gmail.com>
2309 * graphite-clast-to-gimple.c (loop_iv_stack_patch_for_consts):
2310 Change the call of gbb_loop_at_index and/or gbb_loop_index due
2311 to the redefinition.
2312 (compute_cloog_iv_types_1): ditto.
2313 (build_iv_mapping): ditto.
2314 * graphite-sese-to-poly.c (new_gimple_bb): Remove GBB_LOOPS related
2316 (free_gimple_bb): Removed GBB_LOOPS related free part.
2317 (build_bb_loops): Removed.
2318 * sese.h (struct gimple_bb): Removed loops.
2319 (GBB_LOOPS): Removed.
2320 (gbb_loop_at_index): Instead of using GBB_LOOPS, we use sese instead.
2321 (gbb_loop_index): ditto.
2323 2009-04-24 Tobias Grosser <grosser@fim.uni-passau.de>
2325 * graphite-scop-detection.c (graphite_can_represent_scev): Do not
2326 allow non constant strides.
2327 * testsuite/gcc.dg/graphite/scop-20.c: New.
2329 2009-04-24 Sebastian Pop <sebastian.pop@amd.com>
2331 * graphite-scop-detection.c (dot_all_scops): Fix system call
2332 return value warning.
2335 2009-04-24 Sebastian Pop <sebastian.pop@amd.com>
2337 * testsuite/gcc.dg/graphite/id-6.c: Fix pattern.
2338 * testsuite/gcc.dg/graphite/scop-3.c: Same.
2340 2009-04-24 Sebastian Pop <sebastian.pop@amd.com>
2342 * graphite-poly.c (map_into_dep_poly, map_dr_into_dep_poly,
2343 build_pairwise_constraint, dr_equality_constraints,
2344 build_pairwise_scheduling_equality,
2345 build_pairwise_scheduling_inequality, lexicographically_gt_p,
2346 build_lexicographically_gt_constraint, dependence_polyhedron,
2347 graphite_legal_transform_dr, graphite_legal_transform_bb,
2348 graphite_legal_transform): New.
2349 * graphite-poly.h (graphite_legal_transform): Declared.
2350 * graphite-sese-to-poly.c (build_poly_scop): Call to
2351 graphite_legal_transform is disabled for the moment.
2353 2009-04-24 Sebastian Pop <sebastian.pop@amd.com>
2355 * graphite-poly.h (pbb_nb_scattering_dims): New.
2356 (pbb_nb_scattering): Use it.
2358 2009-04-24 Sebastian Pop <sebastian.pop@amd.com>
2360 * graphite-ppl.c (ppl_insert_dimensions_pointset): Add
2361 Pointset_Powerset version of ppl_insert_dimensions.
2362 * graphite-ppl.h (ppl_insert_dimensions_pointset): Declared.
2364 2009-04-24 Sebastian Pop <sebastian.pop@amd.com>
2366 * graphite-ppl.c (ppl_insert_dimensions): Fix formatting.
2368 2009-04-24 Sebastian Pop <sebastian.pop@amd.com>
2370 * graphite-poly.h: Fix comment.
2372 2009-04-24 Sebastian Pop <sebastian.pop@amd.com>
2374 * graphite-sese-to-poly.c (build_poly_dr): Fix data ref multiplier.
2376 2009-04-24 Tobias Grosser <grosser@fim.uni-passau.de>
2378 * sese.c (expand_scalar_variables_stmt): Only iterate over the old
2381 2009-04-24 Tobias Grosser <grosser@fim.uni-passau.de>
2383 * graphite-sese-to-poly.c (var_used_in_not_loop_header_phi_node): New.
2384 (graphite_stmt_p): Represent bbs necessary to build the phi nodes of
2387 2009-04-20 Sebastian Pop <sebastian.pop@amd.com>
2389 * graphite-scop-detection.c (stmt_simple_for_scop_p): Do not
2390 handle EQ_EXPR and NE_EXPR.
2392 2009-04-17 Tobias Grosser <grosser@fim.uni-passau.de>
2394 * graphite-poly.h (poly_dr): Fix comment.
2396 2009-04-09 Sebastian Pop <sebastian.pop@amd.com>
2397 Tobias Grosser <grosser@fim.uni-passau.de>
2399 * graphite-poly.c (new_poly_bb): Do not initialize PBB_DOMAIN
2400 with a zero dimension polyhedron.
2401 (find_scop_parameters): Move the call to scop_set_nb_params here.
2402 (build_loop_iteration_domains): Store in loop->aux the iteration
2404 (build_scop_iteration_domain): Fix PBB_DOMAIN for bbs not surrounded
2405 by any loop in scop.
2406 (build_poly_scop): Do not call scop_set_nb_params.
2408 2009-04-09 Sebastian Pop <sebastian.pop@amd.com>
2409 Tobias Grosser <grosser@fim.uni-passau.de>
2411 * graphite-sese-to-poly.c (add_condition_to_pbb): Pass code to
2412 add_condition_to_domain not GT_EXPR.
2414 2009-04-09 Tobias Grosser <grosser@fim.uni-passau.de>
2416 * graphite-ppl.c (debug_ppl_powerset_matrix): New.
2417 * graphite-ppl.h (debug_ppl_powerset_matrix): New.
2418 * graphite-sese-to-poly.c (add_condition_to_pbb): Use
2419 upper_bound_assign to calculate unions.
2420 * testsuite/gcc.dg/graphite/id-6.c: New.
2422 2009-04-09 Tobias Grosser <grosser@fim.uni-passau.de>
2424 * graphite-scop-detection.c (canonicalize_loop_closed_ssa): Do not
2425 handle abnormal edges.
2427 2009-04-09 Tobias Grosser <grosser@fim.uni-passau.de>
2429 * graphite-poly.c (new_poly_dr, free_poly_dr): New.
2430 (free_poly_bb): Also free poly_drs.
2431 * graphite-poly.h (new_poly_dr, free_poly_dr): New.
2432 (poly_dr): Polyhedron to Pointset_Powerset.
2433 (pdr_accessp_nb_subscripts): Same.
2434 * graphite-sese-to-poly.c (build_poly_dr): Same. And actually build
2437 2009-04-08 Sebastian Pop <sebastian.pop@amd.com>
2439 * graphite-clast-to-gimple.c (initialize_cloog_names): Change cloog
2440 names into more meaningful names.
2442 2009-04-08 Sebastian Pop <sebastian.pop@amd.com>
2444 * testsuite/gfortran.dg/graphite/interchange-1.c: New.
2445 * testsuite/gfortran.dg/graphite/interchange-2.c: New.
2447 2009-04-08 Sebastian Pop <sebastian.pop@amd.com>
2449 * graphite-clast-to-gimple.c (graphite_loop_normal_form): Do not build
2451 * tree-parloops.c (rewrite_phi_with_iv): New.
2452 (rewrite_all_phi_nodes_with_iv): New.
2453 (canonicalize_loop_ivs): Call them.
2455 2009-04-08 Sebastian Pop <sebastian.pop@amd.com>
2457 * graphite-sese-to-poly.c (try_generate_gimple_bb): Use
2458 graphite_find_data_references_in_stmt.
2459 * tree-data-ref.c (graphite_find_data_references_in_stmt): New.
2460 * tree-data-ref.h (graphite_find_data_references_in_stmt): Declared.
2462 2009-04-08 Sebastian Pop <sebastian.pop@amd.com>
2464 * sese.c (add_loop_exit_phis): Don't fail on non SSA_NAME renames.
2466 2009-04-08 Sebastian Pop <sebastian.pop@amd.com>
2468 * graphite-sese-to-poly.c (build_scop_bbs_1): Use bb_in_sese_p
2469 instead of bb_in_region.
2470 (flag_bb_in_region): Same. Renamed flag_bb_in_sese.
2471 (build_sese_conditions): Use flag_bb_in_sese.
2472 * sese.c (register_bb_in_sese): Removed.
2473 (new_sese): Remove initialization of SESE_REGION_BBS.
2474 (free_sese): Do not free SESE_REGION_BBS.
2475 * sese.h (struct sese): Remove field region_basic_blocks.
2476 (SESE_REGION_BBS): Removed.
2477 (bb_in_sese_p): Implement in function of bb_in_region.
2479 2009-04-08 Sebastian Pop <sebastian.pop@amd.com>
2481 * graphite-scop-detection.c (limit_scops): Deal only with single exit
2484 2009-04-08 Tobias Grosser <grosser@fim.uni-passau.de>
2486 * graphite-scop-detection.c (stmt_simple_for_scop_p): Allow NE_EXPR
2488 * graphite-sese-to-poly.c (create_linear_expr_from_tree): New.
2489 (add_condition_to_domain): New.
2490 (add_condition_to_pbb): New.
2491 (add_conditions_to_domain): Cleanup and handle of NE_EXPR and EQ_EXPR.
2492 * testsuite/gcc.dg/graphite/scop-3.c: Update number of detected SCoPs.
2494 2009-04-08 Tobias Grosser <grosser@fim.uni-passau.de>
2496 * graphite-clast-to-gimple.c (build_cloog_prog): ppl_Polyhedron ->
2497 ppl_Pointset_Powerset.
2498 * graphite-poly.c (new_poly_bb, free_poly_bb): Same.
2499 * graphite-poly.h (poly_bb): poly_bb.domain Same.
2500 (pbb_nb_loops): Same.
2501 * graphite-sese-to-poly.c (build_loop_iteration_domains,
2502 add_conditions_to_domain): Same.
2503 * graphite-ppl.c (new_Cloog_Domain_from_ppl_Pointset_Powerset): New.
2504 (ppl_print_polyhedron_matrix): ppl_Polyhedron_t ->
2505 ppl_const_Polyhedron_t.
2506 (ppl_print_powerset_matrix): New.
2507 * graphite-ppl.h (new_Cloog_Domain_from_ppl_Pointset_Powerset,
2508 ppl_print_powerset_matrix): New.
2509 (ppl_print_polyhedron_matrix): Updated.
2511 2009-04-07 Sebastian Pop <sebastian.pop@amd.com>
2513 * tree-scalar-evolution.c (analyze_scalar_evolution_1): Fix comment.
2515 2009-04-07 Sebastian Pop <sebastian.pop@amd.com>
2517 * graphite-poly.c (extend_scattering): Fix indenting. Free cstr.
2518 (print_iteration_domains, debug_iteration_domain,
2519 debug_iteration_domains): New.
2520 * graphite-poly.h (print_iteration_domains, debug_iteration_domain,
2521 debug_iteration_domains): Declared.
2522 * graphite-sese-to-poly.c (build_pbb_scattering_polyhedrons): Fix
2525 2009-04-03 Tobias Grosser <grosser@fim.uni-passau.de>
2526 Sebastian Pop <sebastian.pop@amd.com>
2528 * graphite-poly.h (print_iteration_domain): New.
2529 * graphite-sese-to-poly.c (add_conditions_to_domain): Fixed bug.
2530 (build_sese_conditions_1, build_sese_conditions_after,
2531 build_sese_conditions_before): New.
2532 (build_sese_conditions): Rewritten.
2534 2009-04-03 Sebastian Pop <sebastian.pop@amd.com>
2535 Tobias Grosser <grosser@fim.uni-passau.de>
2537 Cleanup of code generation liveouts.
2538 * graphite-clast-to-gimple.c (translate_clast): Use a single
2539 rename_map instead of one per translated statement.
2540 Do not use SESE_LIVEOUT_RENAMES.
2541 (graphite_loop_normal_form): Do not use SESE_REDUCTION_LIST.
2542 (gloog): Do not use SESE_LIVEOUT_RENAMES.
2543 * graphite-scop-detection.c (harmful_stmt_in_bb): Return the close
2544 phi node of a reduction: when a loop contains a reduction used outside
2545 the loop, there should be a scalar close phi node on the exit block.
2546 * sese.c (new_sese): Do not initialize SESE_LIVEOUT,
2547 SESE_LIVEOUT_RENAMES, and SESE_REDUCTION_LIST.
2548 (free_sese): Do not free them.
2549 (sese_build_liveouts_use): Do not use them.
2550 (sese_build_liveouts_bb): Same.
2551 (sese_build_liveouts): Same.
2552 (sese_insert_phis_for_liveouts): Same.
2553 (sese_adjust_phis_for_liveouts): Same. Renamed sese_adjust_liveout_phis.
2554 (defined_in_loop_p): New.
2555 (alive_after_loop): New.
2556 (close_phi_not_yet_inserted_p): New.
2557 (struct alep, alep_p): New.
2558 (add_loop_exit_phis): Remove from the rename_map all the names defined
2559 in the code generated loop.
2560 (insert_loop_close_phis): Traverse the rename_map passed to it.
2561 Don't use SESE_LIVEOUT_RENAMES.
2562 (default_liveout_before_guard): Renamed default_before_guard.
2563 (insert_guard_phis): Do not use SESE_LIVEOUT_RENAMES.
2564 (graphite_copy_stmts_from_block): Do not directly call set_rename.
2565 (register_sese_liveout_renames): Removed.
2566 (copy_bb_and_scalar_dependences): Do not call it.
2567 * sese.h (struct sese): Removed fields: liveout, liveout_renames, and
2569 (SESE_LIVEOUT): Removed.
2570 (SESE_LIVEOUT_RENAMES): Removed.
2571 (SESE_REDUCTION_LIST): Removed.
2572 (sese_build_liveouts): Removed.
2573 (sese_adjust_phis_for_liveouts): Renamed sese_adjust_liveout_phis.
2574 (insert_loop_close_phis): Pass a htab_t instead of a sese.
2575 (insert_guard_phis): Same.
2576 (rename_map_elt): Declare a VEC of them.
2577 * tree-parloops.c (canonicalize_loop_ivs): reduction_list contains
2578 trees not pointers to trees.
2580 Rewrite in canonical close SSA form:
2581 * graphite-scop-detection.c (contains_only_close_phi_nodes): New.
2582 (limit_scops): Close the scop after the block containing the close phi
2584 (canonicalize_loop_closed_ssa): New.
2585 (canonicalize_loop_closed_ssa_form): New.
2586 (build_scops): Call canonicalize_loop_closed_ssa_form.
2588 * graphite-sese-to-poly.c: Fix typos.
2590 2009-04-03 Sebastian Pop <sebastian.pop@amd.com>
2592 * graphite-poly.c (print_scattering_function, print_pbb_domain):
2594 (dump_gbb_conditions, dump_gbb_cases, print_iteration_domain): New.
2595 (print_pbb): Add conditions.
2597 2009-04-01 Tobias Grosser <grosser@fim.uni-passau.de>
2598 Sebastian Pop <sebastian.pop@amd.com>
2600 * graphite-scop-detection.c (bb_in_sd_region): Use bb_in_region.
2601 * graphite-sese-to-poly.c (all_non_dominated_preds_marked_p): New.
2602 (build_scop_bbs_1): New.
2603 (build_scop_bbs): Rewrite.
2604 * sese.h (bb_in_region): New.
2606 2009-03-29 Tobias Grosser <grosser@fim.uni-passau.de>
2608 * graphite-poly.c (new_poly_bb, free_poly_bb): Initialize/free
2610 (print_scop): Style.
2611 * graphite-poly.h (poly_bb): Add drs vector.
2612 (PBB_DRS): Add accessor.
2613 * graphite-sese-to-poly.c (build_poly_dr): New.
2614 (build_pbb_drs, build_scop_drs): New.
2615 (build_poly_scop): call build_scop_drs (Disabled at the moment).
2617 2009-03-29 Tobias Grosser <grosser@fim.uni-passau.de>
2619 * tree-ssa-loop.c: Include forgotten toplev.h
2621 2009-03-29 Tobias Grosser <grosser@fim.uni-passau.de>
2623 * graphite-poly.c: (apply_poly_transforms): sorry -> gcc_unreachable.
2624 * testsuite/gcc.dg/graphite/pr37883.c: Remove -floop-*
2625 * testsuite/gcc.dg/graphite/pr37928.c: Same
2626 * testsuite/gcc.dg/graphite/pr38409.c: Same
2627 * testsuite/gcc.dg/graphite/pr38498.c: Same
2628 * testsuite/gcc.dg/graphite/pr38559.c: Same
2629 * testsuite/gcc.dg/graphite/pr39335.c: Same
2630 * testsuite/gcc.dg/graphite/pr39335_1.c: Same
2631 * testsuite/gfortran.dg/graphite/block-2.f: Same
2632 * tree-ssa-loop.c (gate_graphite_transforms): Always fail if called
2635 2009-03-28 Tobias Grosser <grosser@fim.uni-passau.de>
2637 * graphite-sese-to-poly.c (ref_nb_loops, build_access_matrix_with_af,
2638 build_access_matrix, build_scop_data_accesses): Remove access function
2639 building. (We get a new version soon).
2640 (build_bb_loops, scan_tree_for_params_right_scev): Update.
2641 * sese.h (nb_loops_around_loop_in_sese): Remove.
2642 (sese_loop_depth): Do not use SESE_LOOP_NEST any more.
2644 2009-03-27 Tobias Grosser <grosser@fim.uni-passau.de>
2645 Sebastian Pop <sebastian.pop@amd.com>
2647 * graphite-scop-detection.c (struct scopdet_info): Rename last
2649 (scopdet_basic_block_info, build_scops_1): Don't use
2650 CDI_POST_DOMINATORS. CDI_POST_DOMINATORS should never be used.
2652 2009-03-26 Tobias Grosser <grosser@fim.uni-passau.de>
2653 Sebastian Pop <sebastian.pop@amd.com>
2655 * graphite-clast-to-gimple.c (gloog): Call sese_build_liveouts.
2656 * sese.c (sese_build_liveouts_use): Renamed from
2657 sese_build_livein_liveouts_use. Remove liveins.
2658 (sese_build_liveouts_bb): Renamed from sese_build_livein_liveouts_bb.
2659 Call sese_build_liveouts_use.
2660 (sese_build_liveouts): Renamed from sese_build_livein_liveouts.
2661 Call sese_build_liveouts_bb.
2662 (new_sese, free_sese): Remove liveins.
2663 (sese_add_exit_phis_var): Deleted.
2664 (sese_insert_phis_for_liveouts): Call sese_add_exit_phis_edge
2666 (graphite_copy_stmts_from_block): Remove SESE_NUM_VER.
2668 * sese.h (sese): Remove num_ver and livein.
2669 (SESE_LIVEIN, SESE_LIVEIN_VER, SESE_NUM_VER): Removed.
2671 2009-03-25 Tobias Grosser <grosser@fim.uni-passau.de>
2673 * graphite-sese-to-poly.c (build_scop_scattering): Fix compile.
2675 2009-03-25 Tobias Grosser <grosser@fim.uni-passau.de>
2677 * graphite-sese-to-poly.c (compare_prefix_loops): Removed.
2678 (build_scop_scattering): Do not use compare_prefix_loops any more.
2679 (nb_common_loops): New.
2681 2009-03-24 Sebastian Pop <sebastian.pop@amd.com>
2683 * sese.c (get_new_name_from_old_name): Renamed get_rename.
2684 (register_old_and_new_names): Renamed set_rename.
2686 2009-03-24 Sebastian Pop <sebastian.pop@amd.com>
2688 * graphite-scop-detection.h (nb_reductions_in_loop): Revert removal
2689 of the decl from the previous commit.
2691 2009-03-24 Sebastian Pop <sebastian.pop@amd.com>
2693 * graphite-scop-detection.c (dot_scop): New.
2694 * graphite-scop-detection.h (dot_scop): Declared.
2696 2009-03-24 Sebastian Pop <sebastian.pop@amd.com>
2698 * graphite-sese-to-poly.c (compare_prefix_loops): Fix compare.
2700 2009-03-24 Sebastian Pop <sebastian.pop@amd.com>
2702 * cfgloopmanip.c (create_empty_loop_on_edge): Generate the loop exit
2703 condition at the end of the loop.
2704 * graphite.c (graphite_initialize, graphite_finalize): Print to
2705 dump_file the compiled function.
2706 * graphite-clast-to-gimple.c (graphite_create_new_loop): Update use
2707 of create_empty_loop_on_edge.
2708 (translate_clast): Update the code generation of loops for the new
2710 * cfgloop.h (create_empty_loop_on_edge): Update declaration.
2712 2009-03-24 Sebastian Pop <sebastian.pop@amd.com>
2714 Reverted the patch from 2009-03-19.
2716 2009-03-19 Tobias Grosser <grosser@fim.uni-passau.de>
2718 * graphite-poly.c (new_poly_bb, free_poly_bb): Initialize/free
2720 (print_scop): Style.
2721 * graphite-poly.h (poly_bb): Add drs vector.
2722 (PBB_DRS): Add accessor.
2723 * graphite-sese-to-poly.c (ref_nb_loops): Remove.
2724 (build_access_matrix_with_af, build_access_matrix,
2725 build_scop_data_accesses): Delete.
2726 (build_poly_dr): New.
2727 (build_pbb_drs, build_scop_drs): New.
2728 (build_poly_scop): call build_scop_drs.
2730 2009-03-13 Sebastian Pop <sebastian.pop@amd.com>
2732 * graphite-scop-detection.c (dot_all_scops_1): Close the table
2733 once per basic block.
2735 2009-03-13 Tobias Grosser <grosser@fim.uni-passau.de>
2737 * graphite-scop-detection.c (graphite_can_represent_scev): New.
2738 (graphite_can_represent_expr): Renamed from loop_affine_expr
2740 (stmt_simple_for_scop_p): Call graphite_can_represent_expr.
2741 (graphite_cannot_represent_loop): Add scop_entry to parameters.
2742 (scopdet_basic_block_info): Actually define entry_block.
2743 (stmt_simple_memref_p): Moved here from ...
2745 * tree-data-ref.c (stmt_simple_memref_p): here.
2746 * tree-data-ref.h (stmt_simple_memref_p): Removed.
2748 2009-03-13 Tobias Grosser <grosser@fim.uni-passau.de>
2750 * testsuite/gcc.dg/graphite/id-4.c: New.
2752 2009-03-12 Sebastian Pop <sebastian.pop@amd.com>
2754 * sese.c (expand_scalar_variables_expr): Handle tcc_comparison.
2755 (register_old_and_new_names): Update the content of the map.
2756 When there was already a rename_map_elt in the map at that
2758 (copy_bb_and_scalar_dependences): Do rename_variables after
2759 expand_scalar_variables.
2760 * graphite-clast-to-gimple.c (build_iv_mapping): Update the content
2761 of the map. When there was already a rename_map_elt in the
2762 map at that location, free it.
2763 (translate_clast): Pass the rename_map. Do not initialize and free
2764 a rename_map per stmt_user.
2765 (gloog): Initialize and free one rename_map and pass it to
2768 2009-03-12 Sebastian Pop <sebastian.pop@amd.com>
2770 * sese.c (expand_scalar_variables_stmt,
2771 expand_scalar_variables_ssa_name): Add a gimple_stmt_iterator
2773 (expand_scalar_variables_expr): Handle REALPART_EXPR and IMAGPART_EXPR.
2774 (expand_scalar_variables): Pass to expand_scalar_variables_stmt
2775 the gimple_stmt_iterator of the statement to be expanded.
2776 * graphite-scop-detection.c (is_simple_operand): Do handle
2779 2009-03-11 Tobias Grosser <grosser@fim.uni-passau.de>
2781 * graphite-scop-detection.c (is_simple_operand): Do not handle
2783 * testsuite/gcc.dg/graphite/id-2.c: New.
2785 * graphite-sese-to-poly.c (build_bb_loops,
2786 add_value_to_dim, scan_tree_for_params_right_scev,
2787 scan_tree_for_params_int, scan_tree_for_params, idx_record_params,
2788 find_params_in_bb, build_loop_iteration_domains,
2789 add_conditions_to_domain): Remove subtract.
2791 2009-03-11 Tobias Grosser <grosser@fim.uni-passau.de>
2793 * graphite-clast-to-gimple.c (loop_iv_stack_patch_for_consts,
2794 build_iv_mapping, compute_cloog_iv_types_1, build_cloog_prog):
2795 pbb_loop_at_index -> gbb_loop_at_index.
2796 * graphite-poly.c (new_poly_bb, new_scop): New accessors.
2797 (debug_loop_vec): Delete.
2798 * graphite-poly.h (poly_bb, scop): Change black_box and region to void
2799 pointer. Move LOOPS to gimple_bb_p and insert nb_params.
2800 (PBB_LOOPS): Removed.
2801 (PBB_BLACK_BOX): Insert cast.
2802 (pbb_set_black_box): New setter.
2803 (pbb_loop_at_index, pbb_loop_index): Removed.
2804 (scop_set_region, scop_set_nb_params): New.
2805 * graphite-sese-to-poly.c (new_gimple_bb, free_gimple_bb,
2806 build_scop_scattering, build_bb_loops): Add GBB_LOOPS.
2807 (build_poly_scop): Use scop_set_nb_params.
2808 * sese.h (gimple_bb): Add LOOPS.
2809 (GBB_LOOPS, gbb_loop_index, gbb_loop_at_index): New.
2811 2009-03-11 Tobias Grosser <grosser@fim.uni-passau.de>
2813 Revert previous commit.
2815 2009-03-11 Sebastian Pop <sebastian.pop@amd.com>
2817 * sese.c (expand_scalar_variables_expr): Handle tcc_comparison.
2818 (register_old_and_new_names): Update the content of the map.
2819 When there was already a rename_map_elt in the map at that
2821 (copy_bb_and_scalar_dependences): Do rename_variables after
2822 expand_scalar_variables.
2823 * graphite-clast-to-gimple.c (build_iv_mapping): Update the content
2824 of the map. When there was already a rename_map_elt in the
2825 map at that location, free it.
2826 (translate_clast): Pass the rename_map. Do not initialize and free
2827 a rename_map per stmt_user.
2828 (gloog): Initialize and free one rename_map and pass it to
2831 2009-03-11 Tobias Grosser <grosser@fim.uni-passau.de>
2833 Remove forgotten line in revert.
2835 2009-03-11 Sebastian Pop <sebastian.pop@amd.com>
2837 Revert previous commit.
2839 2009-03-10 Sebastian Pop <sebastian.pop@amd.com>
2841 * sese.c (register_old_and_new_names): Update the content
2842 of the map. When there was already a rename_map_elt in the
2843 map at that location, free it.
2844 (copy_bb_and_scalar_dependences): Do rename_variables after
2845 expand_scalar_variables.
2846 * graphite-clast-to-gimple.c (build_iv_mapping): Update the content
2847 of the map. When there was already a rename_map_elt in the
2848 map at that location, free it.
2849 (translate_clast): Pass the rename_map. Do not initialize and free
2850 a rename_map per stmt_user.
2851 (gloog): Initialize and free one rename_map and pass it to
2854 2009-03-10 Sebastian Pop <sebastian.pop@amd.com>
2856 * graphite-clast-to-gimple.c (translate_clast): context_loop
2859 2009-03-10 Tobias Grosser <grosser@fim.uni-passau.de>
2860 Sebastian Pop <sebastian.pop@amd.com>
2862 * graphite-ppl.c (ppl_insert_dimensions): Fix stupid mistake
2863 of the use of ppl_Polyhedron_map_space_dimensions.
2865 2009-03-10 Tobias Grosser <grosser@fim.uni-passau.de>
2866 Sebastian Pop <sebastian.pop@amd.com>
2868 * graphite-poly.c (unify_scattering_dimensions): Fix types.
2869 * graphite-poly.h (poly_dr_p, poly_dr, POLY_DR_TYPE, PDR_BB,
2870 PDR_TYPE, PDR_ACCESSES, pdr_accessp_nb_subscripts,
2871 pdr_accessp_nb_iterators, pdr_accessp_nb_params,
2872 pdr_accessp_alias_set_dim, pdr_accessp_subscript_dim,
2873 pdr_accessp_iterator_dim, pdr_accessp_param_dim,
2874 pbb_nb_params): New.
2875 (pbb_nb_loops, pbb_nb_scattering, scop_nb_params,
2876 nb_loops_around_pbb): Adapt return types.
2878 2009-03-09 Tobias Grosser <grosser@fim.uni-passau.de>
2880 * Makefile.in (graphite.o, graphite-sese-to-poly.o,
2881 graphite-clast-to-gimple.o, graphite-data-ref.o,
2882 graphite-scop-detection.o, graphite-poly.o): Add
2885 2009-03-05 Tobias Grosser <grosser@fim.uni-passau.de>
2887 * Makefile.in (graphite.o, graphite-sese-to-poly.o,
2888 graphite-clast-to-gimple.o, graphite-data-ref.o,
2889 graphite-scop-detection.o, graphite-poly.o): Add graphite-poly.h.
2891 2009-03-04 Tobias Grosser <grosser@fim.uni-passau.de>
2893 * testsuite/gcc.dg/graphite/pr37485.c: Remove -floop-block
2894 * testsuite/gcc.dg/graphite/pr37828.c: Same.
2895 * testsuite/gcc.dg/graphite/pr37684.c: Same.
2896 * testsuite/gcc.dg/graphite/block-0.c: Same.
2897 * testsuite/gcc.dg/graphite/block-1.c: Same.
2898 * testsuite/gcc.dg/graphite/block-2.c: Same.
2899 * testsuite/gcc.dg/graphite/block-3.c: Same.
2900 * testsuite/gcc.dg/graphite/block-4.c: Same.
2901 * testsuite/gcc.dg/graphite/block-5.c: Same.
2902 * testsuite/gcc.dg/graphite/block-6.c: Same.
2903 * testsuite/gfortran.dg/graphite/pr38083.f90: Same.
2904 * testsuite/gfortran.dg/graphite/block-1.f90: Same.
2905 * testsuite/gfortran.dg/graphite/block-3.f90: Same.
2906 * testsuite/gfortran.dg/graphite/pr37852.f90: Same.
2907 * testsuite/gfortran.dg/graphite/block-4.f90: Same.
2908 * testsuite/gfortran.dg/graphite/pr37980.f90: Same.
2909 * testsuite/gfortran.dg/graphite/pr38953.f90: Same.
2910 * testsuite/gfortran.dg/graphite/pr37857.f90: Same.
2911 * opts.c: Remove -floop-block from -O2.
2912 * graphite-poly.c: Fail if -floop-block -floop-interchange or
2913 -floop-strip-mine are used.
2915 2009-03-04 Tobias Grosser <grosser@fim.uni-passau.de>
2916 Sebastian Pop <sebastian.pop@amd.com>
2918 * graphite-clast-to-gimple.c (build_cloog_prog): Unify scattering
2920 * graphite-poly.c (pbb_compare, graphite_sort_pbbs,
2921 graphite_trans_bb_move_loop, graphite_trans_bb_strip_mine,
2922 strip_mine_profitable_p, is_interchange_valid,
2923 graphite_trans_bb_block, graphite_trans_loop_block,
2924 graphite_trans_scop_block): Temporary removed.
2925 (extend_scattering, unify_scattering_dimensions): New.
2926 (print_scattering_function, graphite_read_transforms):
2927 PBB_SCATTERING -> PBB_TRANSFORMED_SCATTERING.
2928 (graphite_generate_scattering_fns): Removed.
2929 (apply_poly_transforms): Cleanup.
2930 (free_poly_bb): Add PBB_SCATTERING -> PBB_TRANSFORMED_SCATTERING.
2931 (schedule_to_scattering): Moved.
2932 (PBB_STATIC_SCHEDULE, PBB_SCATTERING): Removed.
2933 (PBB_ORIGINAL_SCATTERING, PBB_TRANSFORMED_SCATTERING): New.
2934 (pbb_nb_scattering): New.
2935 (SCOP_ENTRY, SCOP_EXIT, SCOP_REGION_BBS, SCOP_DEP_GRAPH, SCOP_PARAMS,
2936 SCOP_LOOP_NEST, SCOP_PARAMS, SCOP_OLDIVS, SCOP_LIVEOUT_RENAMES):
2938 * graphite-ppl.c (ppl_insert_dimensions): Extended and renamed from
2940 (ppl_strip_loop): PBB_SCATTERING -> PBB_TRANSFORMED_SCATTERING.
2941 * graphite-scop-detection.c (dot_all_scops_1): PBB_SCATTERING
2942 -> PBB_TRANSFORMED_SCATTERING.
2943 * graphite-sese-to-poly.c (build_scop_bbs): Remove region.
2944 (build_pbb_scattering_polyhedron): Moved from schedule_to_scattering.
2945 (build_scop_scattering): Renamed from build_scop_canonical_schedules.
2946 (check_poly_representation): Do not return bool.
2947 (graphite_transform_loops): Reformat.
2948 * sese.h (SESE_ENTRY_BB, SESE_EXIT_BB): New.
2950 2009-03-04 Sebastian Pop <sebastian.pop@amd.com>
2952 * graphite-poly.c (print_pbb_domain, print_pbb, print_scop,
2953 debug_pbb_domain, debug_pbb, debug_scop): New.
2954 * graphite-poly.h (print_pbb_domain, print_pbb, print_scop,
2955 debug_pbb_domain, debug_pbb, debug_scop): Declared.
2957 2009-03-02 Sebastian Pop <sebastian.pop@amd.com>
2960 * tree-parloops.c (canonicalize_loop_ivs): Call fold_convert
2961 when the type precision of the induction variable should be
2962 larger than the type precision of nit.
2963 (gen_parallel_loop): Update use of canonicalize_loop_ivs.
2964 * graphite-clast-to-gimple.c (graphite_loop_normal_form): Same.
2965 * tree-flow.h (canonicalize_loop_ivs): Update declaration.
2967 * testsuite/gcc.dg/graphite/pr39335_1.c: New.
2968 * testsuite/gcc.dg/graphite/pr39335.c: New.
2970 2009-03-02 Sebastian Pop <sebastian.pop@amd.com>
2972 * tree-parloops.c (canonicalize_loop_ivs): reduction_list contains
2973 SSA_NAMES not struct reduction_info.
2975 2009-03-02 Sebastian Pop <sebastian.pop@amd.com>
2977 * sese.c (expand_scalar_variables_expr): Handle ADDR_EXPR.
2979 2009-02-27 Sebastian Pop <sebastian.pop@amd.com>
2980 Tobias Grosser <grosser@fim.uni-passau.de>
2982 * sese.c (new_sese): Initialize SESE_REDUCTION_LIST.
2983 (free_sese): Free SESE_REDUCTION_LIST.
2984 * sese.h (struct sese): Add field reduction_list.
2985 (SESE_REDUCTION_LIST): New.
2986 * graphite-clast-to-gimple.c (graphite_loop_normal_form): Call
2987 canonicalize_loop_ivs on SESE_REDUCTION_LIST.
2989 2009-02-27 Sebastian Pop <sebastian.pop@amd.com>
2990 Tobias Grosser <grosser@fim.uni-passau.de>
2992 * tree-flow.h (gather_scalar_reductions): Use struct loop * instead
2995 2009-02-27 Sebastian Pop <sebastian.pop@amd.com>
2996 Tobias Grosser <grosser@fim.uni-passau.de>
2998 * tree-parloops.c (struct brli, build_reduction_list_info,
2999 analyze_reduction_list, gather_scalar_reductions): New.
3000 (loop_parallel_p): Build a reduction list containing only
3001 PHI_RESULT SSA_NAMEs: call gather_scalar_reductions.
3002 (gen_parallel_loop): Call the analysis analyze_reduction_list.
3003 (parallelize_loops): Now reduction_list is a htab_t of SSA_NAMEs.
3004 * tree-flow.h (gather_scalar_reductions): Declared.
3006 2009-02-26 Sebastian Pop <sebastian.pop@amd.com>
3009 * graphite-clast-to-gimple.c (graphite_loop_normal_form): Do not call
3010 number_of_iterations_exit from a gcc_assert.
3012 2009-02-25 Sebastian Pop <sebastian.pop@amd.com>
3013 Jan Sjodin <jan.sjodin@amd.com>
3015 * output.h (graphite_out_file, graphite_in_file): Declared.
3016 * toplev.c (graphite_out_file, graphite_in_file): New.
3017 (init_asm_output): Initialize graphite_in_file and graphite_out_file.
3018 * graphite-clast-to-gimple.c (build_cloog_prog): Read PBB_SCATTERING.
3019 Don't call schedule_to_scattering.
3020 * common.opt (fgraphite-write, fgraphite-read): New.
3021 * graphite-poly.c: Include output.h.
3022 (print_scattering_function, print_scattering_functions,
3023 debug_scattering_function, debug_scattering_functions,
3024 graphite_write_transforms, graphite_read_transforms,
3025 graphite_generate_scattering_fns): New.
3026 (apply_poly_transforms): Do not apply transform if flag_graphite_read.
3027 Call graphite_generate_scattering_fns, graphite_write_transforms,
3028 graphite_read_transforms.
3029 (new_poly_bb): Initialize PBB_SCATTERING.
3030 (free_poly_bb): Free PBB_SCATTERING.
3031 (schedule_to_scattering): Does not return, initialize PBB_SCATTERING.
3032 * graphite-poly.h (struct poly_bb): Add field scattering.
3033 (PBB_SCATTERING): New.
3034 (print_scattering_function, print_scattering_functions,
3035 debug_scattering_function, debug_scattering_functions): Declared.
3036 * graphite-ppl.c (cloog_matrix_to_ppl_constraint): Matrices contain
3037 GMP values, not integers!
3038 (ppl_print_polyhedron_matrix, debug_ppl_polyhedron_matrix,
3039 ppl_read_polyhedron_matrix): New.
3040 * graphite-ppl.h (ppl_print_polyhedron_matrix,
3041 debug_ppl_polyhedron_matrix,
3042 ppl_read_polyhedron_matrix): Declared.
3043 * Makefile.in (graphite-poly.o): Depends on output.h.
3045 2009-02-23 Sebastian Pop <sebastian.pop@amd.com>
3046 Tobias Grosser <grosser@fim.uni-passau.de>
3049 * graphite-scop-detection.c (stmt_simple_for_scop_p): Analyze
3050 scalar evolutions in the scop_entry->loop_father.
3052 2009-02-23 Sebastian Pop <sebastian.pop@amd.com>
3053 Tobias Grosser <grosser@fim.uni-passau.de>
3055 * graphite.h (ref_nb_loops): Remove declaration.
3056 (struct gimple_bb, gimple_bb_p, GBB_BB, GBB_DATA_REFS, GBB_CONDITIONS,
3057 GBB_CONDITION_CASES, GBB_CLOOG_IV_TYPES, gbb_loop, print_gimple_bb,
3058 debug_gbb): Moved to sese.h.
3061 2009-02-23 Sebastian Pop <sebastian.pop@amd.com>
3062 Tobias Grosser <grosser@fim.uni-passau.de>
3064 * graphite-data-ref.[ch]: Disable.
3066 2009-02-23 Sebastian Pop <sebastian.pop@amd.com>
3067 Tobias Grosser <grosser@fim.uni-passau.de>
3069 * graphite-scop-detection.c (stmt_simple_for_scop_p): Analyze
3070 scalar evolutions in the scop_entry->loop_father.
3072 2009-02-23 Sebastian Pop <sebastian.pop@amd.com>
3074 * graphite-scop-detection.c (nb_reductions_in_loop): Moved here...
3075 (graphite_cannot_represent_loop_niter): Renamed
3076 graphite_cannot_represent_loop. Call nb_reductions_in_loop.
3077 (limit_scops): build_sese_loop_nests does not return a bool.
3078 * graphite-scop-detection.h (nb_reductions_in_loop): Declared.
3079 * sese.c (nb_reductions_in_loop): ... from here.
3080 (graphite_loop_normal_form): ... from here.
3081 (sese_record_loop): Does not fail, so does not return a bool.
3082 (build_sese_loop_nests): Same.
3083 * sese.h (build_sese_loop_nests): Update declaration.
3084 * graphite-clast-to-gimple.c (graphite_loop_normal_form): Moved here...
3085 (build_graphite_loop_normal_form): New.
3086 (gloog): Call build_graphite_loop_normal_form.
3087 * graphite-sese-to-poly.c (build_poly_scop): Don't fail on
3088 build_sese_loop_nests.
3090 * testsuite/gcc.dg/graphite/id-1.c: New.
3092 2009-02-23 Sebastian Pop <sebastian.pop@amd.com>
3093 Tobias Grosser <grosser@fim.uni-passau.de>
3095 * graphite-sese-to-poly.c (scan_tree_for_params): Remove REAL_CST.
3096 The SCoP detection fix is sufficient.
3098 2009-02-21 Sebastian Pop <sebastian.pop@amd.com>
3100 PR tree-optimization/39260
3101 * graphite-scop-detection.c (harmful_stmt_in_bb): Stop a SCoP when
3102 the basic block contains a condition with a real type.
3103 * graphite-sese-to-poly.c (scan_tree_for_params): Handle REAL_CST.
3105 * gcc.dg/graphite/pr39260.c: New.
3107 2009-02-21 Sebastian Pop <sebastian.pop@amd.com>
3109 * graphite-poly.c: Inlcude params.h.
3110 (graphite_trans_loop_block): Use PARAM_LOOP_BLOCK_TILE_SIZE for
3112 * Makefile.in (graphite-poly.o): Depend on PARAMS_H.
3113 * params.def (PARAM_LOOP_BLOCK_TILE_SIZE): Define.
3115 2009-02-20 Sebastian Pop <sebastian.pop@amd.com>
3116 Tobias Grosser <grosser@fim.uni-passau.de>
3118 * graphite-scop-detection.c (dot_all_scops_1,
3119 dot_all_scops): Moved here.
3120 * graphite-scop-detection.h (dot_all_scops): Declared here.
3121 * graphite.c (graphite_initialize, graphite_finalize): New.
3122 (graphite_transform_loops): Cleaned up.
3123 * sese.c (debug_oldivs): Moved here.
3124 * graphite-poly.c (graphite_apply_transformations): Renamed
3125 apply_poly_transforms.
3126 (debug_loop_vec): Moved here.
3127 * graphite-sese-to-poly.c (build_bb_loops, build_sese_conditions_1,
3128 scop_contains_non_iv_scalar_phi_nodes, build_sese_conditions,
3129 find_scop_parameters, build_scop_iteration_domain,
3130 add_conditions_to_constraints, build_scop_canonical_schedules,
3131 build_scop_data_accesses): Now static.
3132 (build_poly_scop, check_poly_representation): New.
3134 2009-02-20 Sebastian Pop <sebastian.pop@amd.com>
3136 * graphite.c (graphite_stmt_p, new_gimple_bb, free_gimple_bb,
3137 remove_gbbs_in_scop, free_scops, try_generate_gimple_bb,
3138 build_scop_bbs, ref_nb_loops, compare_prefix_loops,
3139 build_scop_canonical_schedules, build_bb_loops, add_value_to_dim,
3140 scan_tree_for_params_right_scev, scan_tree_for_params_int,
3141 scan_tree_for_params, struct irp_data, dx_record_params,
3142 find_params_in_bb, find_scop_parameters, gbb_from_bb,
3143 build_loop_iteration_domains, add_conditions_to_domain,
3144 phi_node_is_iv, bb_contains_non_iv_scalar_phi_nodes,
3145 scop_contains_non_iv_scalar_phi_nodes, build_sese_conditions_1,
3146 build_sese_conditions, add_conditions_to_constraints,
3147 build_scop_iteration_domain, build_access_matrix_with_af,
3148 build_access_matrix,
3149 build_scop_data_accesses): Moved to graphite-sese-to-poly.c.
3151 * graphite-sese-to-poly.c: New.
3152 * graphite-sese-to-poly.h: New.
3154 * Makefile.in: Add new rule for graphite-sese-to-poly.o.
3156 2009-02-20 Sebastian Pop <sebastian.pop@amd.com>
3158 * graphite.c: Split graphite code generation to a new file.
3159 (graphite_verify, gmp_cst_to_tree, clast_name_to_gcc,
3160 max_precision_type, clast_to_gcc_expression_red,
3161 clast_to_gcc_expression, gcc_type_for_clast_expr,
3162 gcc_type_for_clast_eq, loop_iv_stack_patch_for_consts,
3163 graphite_translate_clast_equation, graphite_create_guard_cond_expr,
3164 graphite_create_new_guard, clast_get_body_of_loop,
3165 gcc_type_for_cloog_iv, gcc_type_for_iv_of_clast_loop,
3166 graphite_create_new_loop, build_iv_mapping, copy_renames,
3167 translate_clast, find_cloog_iv_in_expr, compute_cloog_iv_types_1,
3168 compute_cloog_iv_types, free_scattering, save_var_name,
3169 initialize_cloog_names, build_scop_context, build_cloog_prog,
3170 set_cloog_options, debug_clast_stmt, scop_to_clast,
3171 print_generated_program, debug_generated_program,
3172 gloog): Moved to graphite-clast-to-gimple.c.
3174 (struct cloog_prog_clast): Moved to graphite-clast-to-gimple.h.
3176 (iv_stack_entry_is_constant, iv_stack_entry_is_iv,
3177 loop_iv_stack_push_iv, loop_iv_stack_insert_constant,
3178 loop_iv_stack_pop, loop_iv_stack_get_iv,
3179 loop_iv_stack_get_iv_from_name, debug_loop_iv_stack,
3180 free_loop_iv_stack, loop_iv_stack_remove_constants,
3181 debug_rename_elt, debug_rename_map_1, debug_rename_map,
3182 rename_map_elt_info, eq_rename_map_elts, debug_ivtype_elt,
3183 debug_ivtype_map_1, debug_ivtype_map, ivtype_map_elt_info,
3184 eq_ivtype_map_elts, sese_add_exit_phis_edge,
3185 sese_add_exit_phis_var, sese_insert_phis_for_liveouts,
3186 get_vdef_before_sese, sese_adjust_vphi,
3187 get_new_name_from_old_name, sese_adjust_phis_for_liveouts,
3188 oldiv_for_loop, rename_variables_in_stmt, is_parameter,
3189 is_iv, expand_scalar_variables_ssa_name,
3190 expand_scalar_variables_expr, expand_scalar_variables_stmt,
3191 expand_scalar_variables, rename_variables, remove_condition,
3192 get_true_edge_from_guard_bb, get_false_edge_from_guard_bb,
3193 add_loop_exit_phis, insert_loop_close_phis, struct igp,
3194 default_liveout_before_guard, add_guard_exit_phis,
3195 insert_guard_phis, register_old_and_new_names,
3196 graphite_copy_stmts_from_block, register_sese_liveout_renames,
3197 copy_bb_and_scalar_dependences, outermost_loop_in_sese,
3198 if_region_set_false_region, create_if_region_on_edge,
3199 move_sese_in_condition): Moved to sese.c.
3201 (nb_loops_around_loop_in_sese, struct ifsese, if_region_entry,
3202 if_region_exit, if_region_get_condition_block,
3203 struct rename_map_elt, new_rename_map_elt, enum iv_stack_entry_kind,
3204 union iv_stack_entry_data_union, struct iv_stack_entry_struct,
3205 iv_stack_entry_p, loop_iv_stack, struct ivtype_map_elt,
3206 ivtype_map_elt, new_ivtype_map_elt,
3207 recompute_all_dominators): Moved to sese.h.
3209 * graphite-clast-to-gimple.c: New.
3210 * graphite-clast-to-gimple.h: New.
3211 * Makefile.in: Add new rule for graphite-clast-to-gimple.o.
3212 * sese.c: Modified as said above.
3215 2009-02-20 Sebastian Pop <sebastian.pop@amd.com>
3217 * graphite.c: Split scop detection to a new file.
3218 (enum gbb_type, gbb_type, get_bb_type, struct sd_region_p, sd_region,
3219 move_sd_regions, loop_affine_expr, exclude_component_ref,
3220 is_simple_operand, stmt_simple_for_scop_p, harmful_stmt_in_bb,
3221 graphite_cannot_represent_loop_niter, struct scopdet_info,
3222 scopdet_basic_block_info, build_scops_1, bb_in_sd_region,
3223 find_single_entry_edge, find_single_exit_edge,
3224 create_single_entry_edge, sd_region_without_exit,
3225 create_single_exit_edge, unmark_exit_edges, mark_exit_edges,
3226 create_sese_edges, build_graphite_scops, limit_scops, build_scops):
3227 Moved to graphite-scop-detection.c.
3229 * graphite-scop-detection.c: New.
3230 * graphite-scop-detection.h: New.
3231 * Makefile.in: Add new rule for graphite-scop-detection.o.
3233 * sese.c: Include tree-chrec.h, tree-data-ref.h, and
3234 tree-scalar-evolution.h.
3235 (nb_reductions_in_loop, graphite_loop_normal_form, sese_record_loop,
3236 build_sese_loop_nests): Moved here from graphite.c.
3237 (param_index): Renamed parameter_index_in_region.
3239 2009-02-18 Tobias Grosser <grosser@fim.uni-passau.de>
3240 Sebastian Pop <sebastian.pop@amd.com>
3242 * gcc.dg/graphite/block-0.c: Expected to fail now.
3243 * gcc.dg/graphite/block-1.c: Same.
3244 * gcc.dg/graphite/block-5.c: Same.
3245 * gcc.dg/graphite/block-6.c: Same.
3247 2009-02-18 Tobias Grosser <grosser@fim.uni-passau.de>
3248 Sebastian Pop <sebastian.pop@amd.com>
3250 * graphite.h: Separate from graphite_bb_p the polyhedral
3251 representation in poly_bb_p and the GCC specifics in gimple_bb_p.
3252 (struct data_dependence_polyhedron, RDGE_DDP, ddp_p): Moved to
3253 graphite-data-ref.h.
3254 (struct poly_bb, PBB_SCOP, PBB_STATIC_SCHEDULE, PBB_DOMAIN,
3255 PBB_BLACK_BOX, PBB_LOOPS, pbb_nb_loops, pbb_loop_at_index,
3256 pbb_loop_index, struct scop, SCOP_BBS, SCOP_REGION, SCOP_ENTRY,
3257 SCOP_EXIT, SCOP_REGION_BBS, SCOP_DEP_GRAPH, SCOP_PARAMS,
3258 SCOP_LOOP_NEST, SCOP_PARAMS, SCOP_OLDIVS, SCOP_LIVEOUT_RENAMES,
3259 scop_nb_params): Moved to graphite-poly.h.
3260 * graphite-data-ref.c: Same.
3261 * graphite-data-ref.h: New.
3263 (pbb_compare, graphite_sort_pbbs, graphite_trans_bb_move_loop,
3264 graphite_trans_bb_strip_mine, strip_mine_profitable_p,
3265 is_interchange_valid, graphite_trans_bb_block,
3266 graphite_trans_loop_block, scop_max_loop_depth,
3267 graphite_trans_scop_block, graphite_apply_transformations,
3268 new_poly_bb, free_poly_bb, new_scop, free_scop): Moved to
3270 * graphite-poly.h: New.
3271 * graphite-poly.c: New.
3272 * Makefile.in (OBJS-common): Add graphite-poly.o.
3273 (graphite-poly.o): New rule.
3274 * tree-data-ref.h (struct data_reference): Remove unused scop field.
3277 2009-02-18 Sebastian Pop <sebastian.pop@amd.com>
3278 Tobias Grosser <grosser@fim.uni-passau.de>
3280 * graphite.c: Replace gb -> gbb.
3282 * graphite-data-ref.c: Same.
3284 2009-02-18 Sebastian Pop <sebastian.pop@amd.com>
3285 Tobias Grosser <grosser@fim.uni-passau.de>
3287 * Makefile.in (OBJS-commmon): Add sese.o.
3289 (graphite.o): Add sese.h.
3290 * graphite.c (bb_in_ss_p, loop_in_sese_p,
3291 sese_build_livein_liveouts_use, sese_build_livein_liveouts_bb,
3292 sese_build_livein_liveouts, register_bb_in_sese, new_sese, free_sese):
3294 (block_before_scop): Add missing return.
3295 (new_scop, free_scop): Remove SESE data structures.
3296 (scop_record_loop, scan_tree_for_params, find_params_in_bb,
3297 find_scop_parameters, build_loop_iteration_domains,
3298 add_conditions_to_domain, register_scop_liveout_renames,
3299 copy_bb_and_scalar_dependences): Scop -> SESE.
3301 (add_conditions_to_domain): SCoP -> SESE and remove check
3302 (scop_contains_non_iv_scalar_phi_nodes): New.
3303 (build_scop_conditions_1, build_scop_conditions): Remove check for
3304 non iv scalar phi nodes.
3305 (print_scop_statistics): New.
3306 (graphite_transform_loops): Cleanup.
3308 * graphite.h: Move to sese & cleanup.
3312 2009-02-16 Sebastian Pop <sebastian.pop@amd.com>
3313 Tobias Grosser <grosser@fim.uni-passau.de>
3315 * graphite.c (build_scop_conditions_1): Conditions are only
3316 at the end of a basic block.
3318 2009-02-16 Sebastian Pop <sebastian.pop@amd.com>
3319 Tobias Grosser <grosser@fim.uni-passau>
3321 * graphite.h (struct graphite_bb): Remove compressed_alpha_matrix
3323 (GBB_ALPHA): Removed.
3325 2009-02-16 Sebastian Pop <sebastian.pop@amd.com>
3326 Tobias Grosser <grosser@fim.uni-passau.de>
3328 * graphite-data-ref.c (graphite_test_dependence): Don't use
3329 GBB_DYNAMIC_SCHEDULE.
3330 * graphite.c (new_graphite_bb): Same.
3331 (free_graphite_bb): Same.
3332 (build_scop_dynamic_schedules): Removed.
3333 (graphite_transform_loops): Don't call it.
3334 * graphite.h (struct graphite_bb): Remove dynamic_schedule field.
3335 (GBB_DYNAMIC_SCHEDULE): Removed.
3337 2009-02-16 Sebastian Pop <sebastian.pop@amd.com>
3338 Tobias Grosser <grosser@fim.uni-passau.de>
3340 * graphite.c (schedule_to_scattering): Don't use CloogMatrix.
3341 (print_graphite_bb): Same.
3342 (build_cloog_prog): Same.
3344 2009-02-16 Sebastian Pop <sebastian.pop@amd.com>
3345 Tobias Grosser <grosser@fim.uni-passau.de>
3347 * graphite.c (build_cloog_prog): Don't use CloogMatrix.
3349 2009-02-16 Sebastian Pop <sebastian.pop@amd.com>
3350 Tobias Grosser <grosser@fim.uni-passau.de>
3352 * graphite.c (build_scop_context): Don't use CloogMatrix.
3353 * graphite-ppl.c (new_Cloog_Domain_from_ppl_Polyhedron): New.
3354 * graphite-ppl.h (new_Cloog_Domain_from_ppl_Polyhedron): Declared.
3356 2009-02-16 Sebastian Pop <sebastian.pop@amd.com>
3357 Tobias Grosser <grosser@fim.uni-passau.de>
3359 * graphite.h (struct scop): Move params, old_ivs, loops, loop_nest,
3360 liveout_renames, add_params fields...
3361 (struct sese): ... here.
3362 (SESE_PARAMS, SESE_LOOPS, SESE_LOOP_NEST, SESE_ADD_PARAMS,
3363 SESE_PARAMS, SESE_OLDIVS, SESE_LIVEOUT_RENAMES): New.
3365 2009-02-16 Sebastian Pop <sebastian.pop@amd.com>
3366 Tobias Grosser <grosser@fim.uni-passau.de>
3368 * graphite.c (print_scop): Do not print the CLooG program.
3369 (new_scop, free_scop, initialize_cloog_names, build_scop_context,
3370 build_cloog_prog, gloog): Don't use SCOP_PROG.
3371 (find_transform): Renamed scop_to_clast.
3372 (print_generated_program, debug_generated_program): New.
3373 (graphite_transform_loops): Adapt to new interface.
3374 * graphite.h (struct scop): Remove program field.
3375 (SCOP_PROG): Removed.
3376 (print_generated_program, debug_generated_program): Declared.
3378 2009-02-16 Sebastian Pop <sebastian.pop@amd.com>
3380 * graphite-data-ref.c (schedule_precedes_p, schedule_same_p): New.
3381 (statement_precedes_p): Use schedule_same_p and schedule_precedes_p.
3382 * graphite.c (gbb_compare, schedule_to_scattering, print_graphite_bb,
3383 free_graphite_bb, build_scop_canonical_schedules,
3384 graphite_trans_bb_strip_mine, graphite_trans_scop_block): Static
3385 schedules are now represented using a ppl_Linear_Expression_t.
3386 * graphite.h (struct graphite_bb): Same.
3387 * graphite-ppl.c (ppl_lexico_compare_linear_expressions): New.
3388 * graphite-ppl.h (ppl_lexico_compare_linear_expressions): Declared.
3390 2009-02-15 Sebastian Pop <sebastian.pop@amd.com>
3392 * graphite.c: Free local memory.
3393 * graphite-ppl.c: Same.
3395 2009-02-15 Sebastian Pop <sebastian.pop@amd.com>
3397 * graphite.c (const_column_index, get_first_matching_sign_row_index,
3398 get_lower_bound_row, get_upper_bound_row, copy_constraint,
3399 swap_constraint_variables, scale_constraint_variable): Removed.
3400 (graphite_trans_bb_strip_mine): Remove pong.
3401 * graphite-ppl.c: Include missing header files.
3402 (set_inhomogeneous, set_coef, shift_poly, ppl_strip_loop): New.
3403 * graphite-ppl.h (ppl_strip_loop): Declared.
3404 * Makefile.in (graphite-ppl.o): Adjust dependences.
3406 2009-02-14 Sebastian Pop <sebastian.pop@amd.com>
3408 * graphite.c (build_loop_iteration_domains): Remove ping pong.
3409 (build_scop_iteration_domain): Same.
3411 2009-02-13 Sebastian Pop <sebastian.pop@amd.com>
3413 * graphite.c (scan_tree_for_params, add_conditions_to_domain): Remove
3415 (add_value_to_dim, scan_tree_for_params_right_scev,
3416 scan_tree_for_params_int): New.
3417 * graphite-ppl.c (oppose_constraint): New.
3418 (insert_constraint_into_matrix): Implement missing cases.
3419 * graphite-ppl.h (insert_constraint_into_matrix): Declared.
3421 2009-02-13 Sebastian Pop <sebastian.pop@amd.com>
3423 * graphite.c (graphite_trans_bb_move_loop): Remove ping pong,
3424 use ppl_move_dimension.
3426 2009-02-12 Sebastian Pop <sebastian.pop@amd.com>
3428 * graphite-data-ref.c: Domains are now ppl_Polyhedra_t.
3431 * graphite-ppl.c: Same.
3432 * graphite-ppl.h: Same.
3434 2009-02-12 Sebastian Pop <sebastian.pop@amd.com>
3436 Revert last 3 commits.
3438 2009-02-10 Sebastian Pop <sebastian.pop@amd.com>
3440 * graphite.c (scan_tree_for_params, add_conditions_to_domain): Remove
3442 (add_value_to_dim, scan_tree_for_params_right_scev,
3443 scan_tree_for_params_int): New.
3444 * graphite-ppl.c (oppose_constraint): New.
3445 (insert_constraint_into_matrix): Implement missing cases.
3446 * graphite-ppl.h (insert_constraint_into_matrix): Declared.
3448 2009-02-10 Sebastian Pop <sebastian.pop@amd.com>
3450 * graphite.c (graphite_trans_bb_move_loop): Remove unused variables.
3452 2009-02-10 Sebastian Pop <sebastian.pop@amd.com>
3453 Tobias Grosser <grosser@fim.uni-passau.de>
3455 * graphite.c (graphite_trans_bb_move_loop): Remove ping pong,
3456 use ppl_move_dimension.
3457 * graphite-ppl.c (ppl_move_dimension): New.
3458 * graphite-ppl.h (ppl_move_dimension): Declared.
3460 2009-02-10 Sebastian Pop <sebastian.pop@amd.com>
3462 * graphite.c: Do not include cloog/cloog.h.
3463 (print_graphite_bb): Remove ping pong, call PPL print function.
3465 2009-02-10 Tobias Grosser <grosser@fim.uni-passau.de>
3467 * Makefile.in (OBJS-common): Add graphite-ppl.o.
3468 (graphite.o): Add dependence on graphite-ppl.h.
3469 (graphite-ppl.o): New.
3470 (graphite-data-ref.c): Ping pong between PPL data structures
3472 * graphite-ppl.c: New.
3473 * graphite-ppl.h: New.
3474 * graphite.c: Include graphite-ppl.h.
3475 (print_graphite_bb, add_conditions_to_domain, build_cloog_prog,
3476 graphite_trans_bb_move_loop, graphite_trans_bb_strip_mine):
3477 Ping pong between PPL data structures and matrices.
3478 (new_graphite_bb): Create a PPL constraint system.
3479 Call ppl_delete_Constraint_System instead of cloog_matrix_free.
3480 (build_loop_iteration_domains): Use PPL functions.
3481 * graphite.h: Include graphite-ppl.h. Fix comments.
3482 (graphite_bb): Use a ppl_Constraint_System_t instead of
3483 CloogMatrix for representing the domain.
3484 (scop): Remove static_schedule.
3485 (gbb_nb_loops): Ping pong between PPL data structures and matrices.
3487 2009-02-06 Sebastian Pop <sebastian.pop@amd.com>
3489 * graphite.c: Fix some comments.
3491 2009-02-05 Sebastian Pop <sebastian.pop@amd.com>
3494 * graphite.c (if_region_set_false_region): After moving a region
3495 in the false branch of a condition, remove the empty dummy
3497 (gloog): Remove wrong fix for PR38953.
3499 2009-02-03 Tobias Grosser <grosser@fim.uni-passau.de>
3501 * graphite.c (bb_in_sese_p, sese_build_livein_liveouts_use,
3502 sese_build_livein_liveouts_bb, sese_build_livein_liveouts,
3503 register_bb_in_sese, new_sese, free_sese): Moved.
3504 (dot_scop_1, build_scop_loop_nests, build_loop_iteration_domains,
3505 outermost_loop_in_scop, build_scop_iteration_domain,
3506 expand_scalar_variables_ssa_name, get_vdef_before_scop,
3507 limit_scops): Use bb_in_sese_p instead of bb_in_scop_p.
3508 Use loop_in_sese_p instead of loop_in_scop_p.
3509 (new_graphite_bb, new_scop, gloog): Do not initialize SCOP_BBS_B.
3510 (free_scop): Do not free SCOP_BBS_B.
3511 (nb_loops_around_loop_in_scop, nb_loops_around_gb,
3512 ref_nb_loops): Moved here...
3513 * graphite.h (ref_nb_loops): ... from here.
3514 (struct scop): Remove bbs_b bitmap.
3515 (SCOP_BBS_B, bb_in_scop_p, loop_in_scop_p): Removed.
3516 * testsuite/gcc.dg/graphite/scop-19.c: New
3518 2009-02-03 Tobias Grosser <grosser@fim.uni-passau.de>
3520 * graphite.c (scopdet_basic_block_info): Fix bug in scop
3523 2009-01-30 Tobias Grosser <grosser@fim.uni-passau.de>
3525 * graphite.c (new_loop_to_cloog_loop_str, hash_loop_to_cloog_loop,
3526 eq_loop_to_cloog_loop): Remove.
3527 (new_scop, free_scop): Remove SCOP_LOOP2CLOOG_LOOP.
3528 * graphite.h (struct scop): Remove loop2cloog_loop.
3529 (loop_domain_dim, loop_iteration_vector_dim): Remove.
3531 2009-01-30 Tobias Grosser <grosser@fim.uni-passau.de>
3533 * opts.c (decode_options): Only add graphite options to O2
3534 if we compile with graphite enabled.
3536 2009-01-26 Sebastian Pop <sebastian.pop@amd.com>
3538 * Merge from mainline (r143163:143684).
3540 2009-01-26 Sebastian Pop <sebastian.pop@amd.com>
3542 * graphite.c (debug_value): Removed.
3543 * graphite.h (debug_value): Removed.
3545 2009-01-23 Sebastian Pop <sebastian.pop@amd.com>
3547 * passes.c (init_optimization_passes): Do not call pass_copy_prop
3548 after graphite: pass_copy_prop does not maintain a proper loop closed
3549 SSA form. pass_copy_prop should be fixed.
3551 2009-01-23 Sebastian Pop <sebastian.pop@amd.com>
3553 * graphite.c (scop_adjust_phis_for_liveouts): Fix warning.
3555 2009-01-23 Sebastian Pop <sebastian.pop@amd.com>
3557 * graphite.c (graphite_verify): Add a call to verify_loop_closed_ssa.
3558 (gloog): Split the exit of the scop when the scop exit is a loop exit.
3559 (graphite_transform_loops): Only call cleanup_tree_cfg if gloog
3562 2009-01-20 Sebastian Pop <sebastian.pop@amd.com>
3564 * graphite.c (gloog): Return true when code gen succeeded.
3565 (graphite_transform_loops): Do not call cleanup_tree_cfg if
3566 the code of the function did not changed. After cleanup_tree_cfg
3567 call rewrite_into_loop_closed_ssa to maintain the loop closed ssa
3570 2009-01-19 Sebastian Pop <sebastian.pop@amd.com>
3572 * graphite.c (stmt_simple_for_scop_p): Also handle cases when
3573 gimple_call_lhs is NULL.
3575 2009-01-16 Sebastian Pop <sebastian.pop@amd.com>
3576 Tobias Grosser <tobi.grosser@amd.com>
3578 * graphite.c (graphite_trans_scop_block): Do not block single
3581 2009-01-15 Sebastian Pop <sebastian.pop@amd.com>
3582 Tobias Grosser <tobi.grosser@amd.com>
3584 * graphite.c (build_scop_canonical_schedules): Start schedules at
3587 2009-01-15 Sebastian Pop <sebastian.pop@amd.com>
3588 Tobias Grosser <tobi.grosser@amd.com>
3590 * graphite.c (compare_prefix_loops): New.
3591 (build_scop_canonical_schedules): Rewritten.
3592 (graphite_transform_loops): Move build_scop_canonical_schedules
3593 after build_scop_iteration_domain.
3595 2009-01-14 Sebastian Pop <sebastian.pop@amd.com>
3596 Tobias Grosser <tobi.grosser@amd.com>
3598 * graphite.c (add_conditions_to_domain): Add the loops to
3599 the dimension of the iteration domain. Do copy the domain
3600 only when it exists.
3601 (build_scop_conditions_1): Do not call add_conditions_to_domain.
3602 (add_conditions_to_constraints): New.
3603 (can_generate_code_stmt, can_generate_code): Removed.
3604 (gloog): Do not call can_generate_code.
3605 (graphite_transform_loops): Call add_conditions_to_constraints
3606 after building the iteration domain.
3608 2009-01-14 Sebastian Pop <sebastian.pop@amd.com>
3609 Tobias Grosser <tobi.grosser@amd.com>
3610 Jan Sjodin <jan.sjodin@amd.com>
3612 * graphite.c (scan_tree_for_params): On substractions negate
3613 all the coefficients of the term.
3614 (clast_to_gcc_expression_red): New. Handle reduction expressions
3615 of more than two operands.
3616 (clast_to_gcc_expression): Call clast_to_gcc_expression_red.
3617 (get_vdef_before_scop): Handle also the case of default definitions.
3619 2009-01-14 Sebastian Pop <sebastian.pop@amd.com>
3622 * graphite.c (get_vdef_before_scop, scop_adjust_vphi): New.
3623 (scop_adjust_phis_for_liveouts): Call scop_adjust_vphi.
3624 (gloog): Do not call cleanup_tree_cfg.
3625 (graphite_transform_loops): Call cleanup_tree_cfg after all
3626 scops have been code generated.
3628 2009-01-13 Sebastian Pop <sebastian.pop@amd.com>
3630 * passes.c (init_optimization_passes): Schedule after
3631 graphite transforms pass_copy_prop, pass_dce_loop and pass_lim.
3633 2009-01-13 Sebastian Pop <sebastian.pop@amd.com>
3635 * graphite.c (expand_scalar_variables_stmt): Do not pass loop_p.
3637 (expand_scalar_variables_ssa_name): Do not pass loop_p. Fix comment.
3638 Set the type of an expression to the type of its assign statement.
3639 (expand_scalar_variables_expr): Do not pass loop_p.
3640 Fix comment. Stop recursion on tcc_constant or tcc_declaration.
3641 (copy_bb_and_scalar_dependences): Do not pass loop_p.
3642 (translate_clast): Update call to copy_bb_and_scalar_dependences.
3644 2009-01-11 Sebastian Pop <sebastian.pop@amd.com>
3646 * graphite.c (expand_scalar_variables_ssa_name): Set the type of
3647 an expression to the gimple_expr_type of its assign statement.
3648 (expand_scalar_variables_expr): Stop recursion on tcc_constant
3651 2009-01-11 Sebastian Pop <sebastian.pop@amd.com>
3653 PR tree-optimization/38786
3654 * testsuite/gcc.dg/graphite/pr38786.c: New.
3655 * graphite.c (expand_scalar_variables_ssa_name): New, outlined from
3656 the SSA_NAME case of expand_scalar_variables_expr.
3657 (expand_scalar_variables_expr): Also gather the scalar computation
3658 used to index the memory access.
3659 (expand_scalar_variables_stmt): Pass to expand_scalar_variables_expr
3660 the gimple_stmt_iterator where it inserts new code.
3662 2009-01-10 Sebastian Pop <sebastian.pop@amd.com>
3664 * testsuite/gcc.dg/graphite/block-3.c: Fix compile error on 32bit.
3666 2009-01-10 Sebastian Pop <sebastian.pop@amd.com>
3668 * opts.c (decode_options): Enable flag_graphite_identity and
3669 flag_loop_block in -O2 and above.
3671 2009-01-08 Sebastian Pop <sebastian.pop@amd.com>
3673 * libjava/classpath/lib/gnu/java/awt/peer/gtk/GtkMouseInfoPeer.class:
3674 Fix merge problem: replace with the file from trunk.
3676 2009-01-08 Sebastian Pop <sebastian.pop@amd.com>
3678 * Merge from mainline (r141727:143163).
3680 2009-01-07 Sebastian Pop <sebastian.pop@amd.com>
3681 Jan Sjodin <jan.sjodin@amd.com>
3683 PR tree-optimization/38559
3684 * testsuite/gcc.dg/graphite/pr38559.c: New.
3686 * graphite.c (debug_value, copy_constraint,
3687 swap_constraint_variables, scale_constraint_variable, ): New.
3688 (get_lower_bound, get_upper_bound): Removed.
3689 (graphite_trans_bb_strip_mine): Clean up this code that works
3690 only for constant number of iterations. Fully copy upper and
3691 lower bound constraints, not only the constant part of them.
3692 * graphite.h (debug_value): Declared.
3694 2009-01-06 Jan Sjodin <jan.sjodin@amd.com>
3696 PR tree-optimization/38492
3697 PR tree-optimization/38498
3698 * tree-check.c (operator_is_linear, scev_is_linear_expression): New.
3699 * tree-chrec.h (scev_is_linear_expression): Declared.
3700 * graphite.c (graphite_cannot_represent_loop_niter): New.
3701 (scopdet_basic_block_info): Call graphite_cannot_represent_loop_niter.
3702 (graphite_loop_normal_form): Use gcc_assert.
3703 (scan_tree_for_params): Use CASE_CONVERT.
3704 (phi_node_is_iv, bb_contains_non_iv_scalar_phi_nodes): New.
3705 (build_scop_conditions_1): Call bb_contains_non_iv_scalar_phi_nodes.
3706 Use gcc_assert. Discard scops that contain unhandled cases.
3707 (build_scop_conditions): Return a boolean status for unhandled cases.
3708 (strip_mine_profitable_p): Print the loop number, not its depth.
3709 (is_interchange_valid): Pass the depth of the loop nest, don't
3710 recompute it wrongly.
3711 (graphite_trans_bb_block): Same.
3712 (graphite_trans_bb_block): Print tentative of loop blocking.
3713 (graphite_trans_scop_block): Do not print that the loop has been
3715 (graphite_transform_loops): Do not handle scops that contain condition
3718 * testsuite/gcc.dg/graphite/pr38500.c: Fixed warning as committed
3720 * testsuite/gcc.dg/graphite/block-0.c: Update test.
3721 * testsuite/gcc.dg/graphite/block-1.c: Same.
3722 * testsuite/gcc.dg/graphite/block-2.c: Remove xfail and test for
3724 * testsuite/gcc.dg/graphite/block-4.c: Remove test for strip mine.
3725 * testsuite/gcc.dg/graphite/block-3.c: New.
3726 * testsuite/gcc.dg/graphite/pr38498.c: New.
3728 2008-12-22 Harsha Jagasia <harsha.jagasia@amd.com>
3730 PR tree-optimization/38510
3731 * gcc.dg/graphite/pr38510.c: New.
3732 * graphite.c (recompute_all_dominators): Call mark_irreducible_loops.
3733 (translate_clast): Call recompute_all_dominators before
3735 (gloog): Call recompute_all_dominators before graphite_verify.
3737 2008-12-12 Sebastian Pop <sebastian.pop@amd.com>
3739 PR tree-optimization/38492
3740 * graphite.c (rename_map_elt, debug_rename_elt,
3741 debug_rename_map_1, debug_rename_map, new_rename_map_elt,
3742 rename_map_elt_info, eq_rename_map_elts,
3743 get_new_name_from_old_name, bb_in_sese_p): Moved around.
3744 (sese_find_uses_to_rename_use): Renamed sese_build_livein_liveouts_use.
3745 (sese_find_uses_to_rename_bb): Renamed sese_build_livein_liveouts_bb.
3746 (sese_build_livein_liveouts): New.
3747 (new_sese, free_sese): New.
3748 (new_scop): Call new_sese.
3749 (free_scop): Call free_sese.
3750 (rename_variables_from_edge, rename_phis_end_scop): Removed.
3751 (register_old_new_names): Renamed register_old_and_new_names.
3752 (register_scop_liveout_renames, add_loop_exit_phis,
3753 insert_loop_close_phis, struct igp,
3754 default_liveout_before_guard, add_guard_exit_phis,
3755 insert_guard_phis, copy_renames): New.
3756 (translate_clast): Call insert_loop_close_phis and insert_guard_phis.
3757 (sese_add_exit_phis_edge): Renamed scop_add_exit_phis_edge.
3758 (rewrite_into_sese_closed_ssa): Renamed scop_insert_phis_for_liveouts.
3759 (scop_adjust_phis_for_liveouts): New.
3760 (gloog): Call scop_adjust_phis_for_liveouts.
3762 * graphite.h (struct sese): Documented. Added fields liveout,
3764 (SESE_LIVEOUT, SESE_LIVEIN, SESE_LIVEIN_VER, SESE_NUM_VER): New.
3765 (new_sese, free_sese, sese_build_livein_liveouts): Declared.
3766 (struct scop): Added field liveout_renames.
3767 (SCOP_LIVEOUT_RENAMES): New.
3769 2008-12-11 Sebastian Pop <sebastian.pop@amd.com>
3771 PR tree-optimization/38409
3772 * gcc.dg/graphite/pr38409.c: New.
3773 * graphite.c (nb_reductions_in_loop): Use simple_iv.
3775 2008-12-11 Sebastian Pop <sebastian.pop@amd.com>
3777 * graphite.c (gcc_type_for_cloog_iv): By default return
3779 (graphite_create_new_loop): Don't fold_convert the already
3780 fold_convert-ed expression.
3782 2008-12-11 Harsha Jagasia <harsha.jagasia@amd.com>
3784 PR tree-optimization/38446
3785 * gcc.dg/graphite/pr38446.c: New.
3786 * graphite.c (register_bb_in_sese): New.
3787 (bb_in_sese_p): Check if bb belongs to sese region by explicitly
3788 looking at the bbs in the region.
3789 * graphite.h (sese): Add region_basic_blocks pointer set to
3790 structure and initialize at the time of defining new scop.
3792 2008-12-11 Tobias Grosser <grosser@fim.uni-passau.de>
3794 * graphite.c (new_graphite_bb): Initialize GBB_STATIC_SCHEDULE.
3795 (find_params_in_bb): Do not free data refs.
3796 (free_graphite_bb): Add FIXME on disabled free_data_refs.
3798 2008-12-11 Sebastian Pop <sebastian.pop@amd.com>
3800 * testsuite/gcc.dg/graphite/scop-16.c: Test only scop specific info.
3801 * testsuite/gcc.dg/graphite/scop-17.c: Same.
3802 * testsuite/gcc.dg/graphite/block-5.c: New.
3803 * testsuite/gcc.dg/graphite/block-6.c: New.
3804 * testsuite/gcc.dg/graphite/pr37485.c: Clean dump file after.
3805 * testsuite/gcc.dg/graphite/pr37684.c: Same.
3806 * testsuite/gcc.dg/graphite/block-2.c: Same.
3808 * graphite.c (struct ivtype_map_elt): New.
3809 (debug_ivtype_elt, debug_ivtype_map_1, debug_ivtype_map,
3810 new_ivtype_map_elt, ivtype_map_elt_info, eq_ivtype_map_elts,
3811 gcc_type_for_cloog_iv): New.
3812 (loop_iv_stack_patch_for_consts): Use the type of the induction
3813 variable from the original loop, except for the automatically
3814 generated loops, i.e., in the case of a strip-mined loop, in
3815 which case there is no original loop: in that case just use
3817 (new_graphite_bb): Initialize GBB_CLOOG_IV_TYPES.
3818 (free_graphite_bb): Free GBB_CLOOG_IV_TYPES.
3819 (clast_name_to_gcc): Accept params to be NULL.
3820 (clast_to_gcc_expression): Take an extra parameter for the type.
3821 Convert to that type all the expressions built by this function.
3822 (gcc_type_for_clast_expr, gcc_type_for_clast_eq): New.
3823 (graphite_translate_clast_equation): Compute the type of the
3824 clast_equation before translating its LHS and RHS.
3825 (clast_get_body_of_loop, gcc_type_for_iv_of_clast_loop): New.
3826 (graphite_create_new_loop): Compute the type of the induction
3827 variable before translating the lower and upper bounds and before
3828 creating the induction variable.
3829 (rename_variables_from_edge, rename_phis_end_scop): New.
3830 (copy_bb_and_scalar_dependences): Call rename_phis_end_scop.
3831 (sese_add_exit_phis_edge): Do not use integer_zero_node.
3832 (find_cloog_iv_in_expr, compute_cloog_iv_types_1,
3833 compute_cloog_iv_types): New.
3834 (gloog): Call compute_cloog_iv_types before starting the
3835 translation of the clast.
3837 * graphite.h (struct graphite_bb): New field cloog_iv_types.
3838 (GBB_CLOOG_IV_TYPES): New.
3839 (debug_ivtype_map): Declared.
3840 (oldiv_for_loop): New.
3842 2008-12-10 Tobias Grosser <grosser@fim.uni-passau.de>
3845 * graphite.c (new_scop): Initialize SCOP_ADD_PARAMS.
3846 (param_index): Assert if parameter is not know after parameter
3848 (find_params_in_bb): Detect params directly in GBB_CONDITIONS.
3849 (find_scop_parameters): Mark, that we have finished parameter
3851 (graphite_transform_loops): Move condition detection before parameter
3853 * graphite.h (struct scop): Add SCOP_ADD_PARAMS.
3854 * testsuite/gfortran.dg/graphite/pr38459.f90: New.
3856 2008-12-09 Tobias Grosser <grosser@fim.uni-passau.de>
3858 * graphite.c (graphite_transform_loops): Always call find_transform ()
3859 in ENABLE_CHECKING. So we test these code paths, even if we do not
3862 2008-12-09 Tobias Grosser <grosser@fim.uni-passau.de>
3864 * graphite.c (print_graphite_bb): Fix printing to file != dump_file.
3865 (print_scop): Ditto.
3867 2008-12-08 Tobias Grosser <grosser@fim.uni-passau.de>
3870 Fix testsuite/gfortran.dg/graphite/id-3.f90.
3871 * graphite.c (scopdet_basic_block_info): Fix bug that found some
3872 regions more than once.
3874 2008-12-03 Sebastian Pop <sebastian.pop@amd.com>
3876 Fix testsuite/gfortran.dg/graphite/id-4.f90.
3877 * graphite.c (scan_tree_for_params): Do not compute the multiplicand
3880 2008-12-03 Sebastian Pop <sebastian.pop@amd.com>
3882 Fix testsuite/gfortran.dg/graphite/id-1.f90.
3883 * graphite.c (gmp_cst_to_tree): Pass the type in parameter.
3884 (loop_iv_stack_patch_for_consts): Update use of gmp_cst_to_tree.
3885 (max_precision_type): New.
3886 (value_clast): Removed.
3887 (clast_to_gcc_expression): Be more careful to types of expressions.
3888 Use max_precision_type and update use of gmp_cst_to_tree.
3889 (graphite_translate_clast_equation): Use max_precision_type.
3890 (graphite_create_guard_cond_expr): Do not use integer_type_node,
3891 use the type of the condition.
3892 (graphite_create_new_loop): Do not use integer_type_node, use the
3893 max_precision_type of lb and ub.
3895 2008-12-03 Sebastian Pop <sebastian.pop@amd.com>
3897 * graphite.c (build_scops_1): Initialize open_scop.exit
3900 2008-12-02 Sebastian Pop <sebastian.pop@amd.com>
3902 * testsuite/gcc.dg/graphite/pr38084.c: New.
3903 * testsuite/gfortran.dg/graphite/id-1.f90: New.
3904 * testsuite/gfortran.dg/graphite/id-2.f90: New.
3905 * testsuite/gfortran.dg/graphite/id-3.f90: New.
3906 * testsuite/gfortran.dg/graphite/id-4.f90: New.
3907 * testsuite/gfortran.dg/graphite/pr37857.f90: New.
3909 2008-12-02 Sebastian Pop <sebastian.pop@amd.com>
3910 Jan Sjodin <jan.sjodin@amd.com>
3911 Harsha Jagasia <harsha.jagasia@amd.com>
3923 * testsuite/gcc.dg/graphite/pr38073.c: New.
3924 * testsuite/gcc.dg/graphite/pr37928.c: New.
3925 * testsuite/gcc.dg/graphite/pr37883.c: New.
3926 * testsuite/gcc.dg/graphite/pr38125.c: New.
3927 * testsuite/gfortran.dg/graphite/pr38083.f90: New.
3928 * testsuite/gfortran.dg/graphite/pr37852.f90: New.
3929 * testsuite/gfortran.dg/graphite/pr37980.f90: New.
3931 * testsuite/gcc.dg/graphite/scop-18.c: Remove reduction, test for
3932 the number of detected scops. Copy exact same test for loop
3934 * testsuite/gcc.dg/graphite/block-1.c: Fix the number of expected
3935 loops to be blocked as reductions are not handled.
3936 * testsuite/gcc.dg/graphite/block-4.c: ...here. New.
3938 * tree-phinodes.c (remove_phi_nodes): New, extracted from...
3939 * tree-cfg.c (remove_phi_nodes_and_edges_for_unreachable_block):
3941 * tree-flow.h (remove_phi_nodes, canonicalize_loop_ivs): Declared.
3942 * Makefile.in (graphite.o): Depend on value-prof.h.
3943 (graphite.o-warn): Removed -Wno-error.
3944 * tree-parloops.c (canonicalize_loop_ivs): Allow reduction_list
3945 to be a NULL pointer. Call update_stmt. Return the newly created
3946 cannonical induction variable.
3948 * graphite.h (debug_rename_map): Declared. Fix some comments.
3950 * graphite.c: Reimplement the code generation from graphite to gimple.
3951 Include value-prof.h.
3952 (loop_iv_stack_get_iv): Do not return NULL for constant substitutions.
3953 (get_old_iv_from_ssa_name): Removed.
3954 (graphite_stmt_p): New.
3955 (new_graphite_bb): Test for useful statements before building a
3956 graphite statement for the basic block.
3957 (free_graphite_bb): Do not free GBB_DATA_REFS: this is a bug
3958 in free_data_ref that calls BITMAP_FREE (DR_VOPS (dr)) without
3960 (recompute_all_dominators, graphite_verify,
3961 nb_reductions_in_loop, graphite_loop_normal_form): New.
3962 (scop_record_loop): Call graphite_loop_normal_form.
3963 (build_scop_loop_nests): Iterate over all the blocks of the
3964 function instead of relying on the incomplete information from
3965 SCOP_BBS. Return the success of the operation.
3966 (find_params_in_bb): Use the data from GBB_DATA_REFS.
3967 (add_bb_domains): Removed.
3968 (build_loop_iteration_domains): Don't call add_bb_domains.
3969 Add the iteration domain only to the basic blocks that have been
3970 translated to graphite.
3971 (build_scop_conditions_1): Add constraints only if the basic
3972 block have been translated to graphite.
3973 (build_scop_data_accesses): Completely disabled until data
3974 dependence is correctly implemented.
3975 (debug_rename_elt, debug_rename_map_1, debug_rename_map): New.
3976 (remove_all_edges_1, remove_all_edges): Removed.
3977 (get_new_name_from_old_name): New.
3978 (graphite_rename_variables_in_stmt): Renamed
3979 rename_variables_in_stmt. Call get_new_name_from_old_name.
3980 Use replace_exp and update_stmt.
3981 (is_old_iv): Renamed is_iv.
3982 (expand_scalar_variables_stmt): Extra parameter for renaming map.
3983 Use replace_exp and update_stmt.
3984 (expand_scalar_variables_expr): Same. Use the map to get the
3985 new names for the renaming of induction variables and for the
3986 renaming of variables after a basic block has been copied.
3987 (expand_scalar_variables): Same.
3988 (graphite_rename_variables): Renamed rename_variables.
3989 (move_phi_nodes): Removed.
3990 (get_false_edge_from_guard_bb): New.
3991 (build_iv_mapping): Do not insert the induction variable of a
3992 loop in the renaming iv map if the basic block does not belong
3994 (register_old_new_names, graphite_copy_stmts_from_block,
3995 copy_bb_and_scalar_dependences): New.
3996 (translate_clast): Heavily reimplemented: copy basic blocks,
3997 do not move them. Finally, in call cleanup_tree_cfg in gloog.
3998 At each translation step call graphite_verify ensuring the
3999 consistency of the SSA, loops and dominators information.
4000 (collect_virtual_phis, find_vdef_for_var_in_bb,
4001 find_vdef_for_var_1, find_vdef_for_var,
4002 patch_phis_for_virtual_defs): Removed huge hack.
4003 (mark_old_loops, remove_dead_loops, skip_phi_defs,
4004 collect_scop_exit_phi_args, patch_scop_exit_phi_args,
4005 gbb_can_be_ignored, scop_remove_ignoreable_gbbs, ): Removed.
4006 (remove_sese_region, ifsese, if_region_entry, if_region_exit,
4007 if_region_get_condition_block, if_region_set_false_region,
4008 create_if_region_on_edge, move_sese_in_condition, bb_in_sese_p,
4009 sese_find_uses_to_rename_use, sese_find_uses_to_rename_bb,
4010 sese_add_exit_phis_edge, sese_add_exit_phis_var,
4011 rewrite_into_sese_closed_ssa): New.
4012 (gloog): Remove dead code. Early return if code cannot be
4013 generated. Call cleanup_tree_cfg once the scop has been code
4015 (graphite_trans_scop_block, graphite_trans_loop_block): Do not
4016 block loops with less than two loops.
4017 (graphite_apply_transformations): Remove the call to
4018 scop_remove_ignoreable_gbbs.
4019 (limit_scops): When build_scop_loop_nests fails, continue on
4020 the next scop. Fix open_scop.entry.
4021 (graphite_transform_loops): Call recompute_all_dominators: force the
4022 recomputation of correct CDI_DOMINATORS and CDI_POST_DOMINATORS.
4023 Call initialize_original_copy_tables and free_original_copy_tables
4024 to be able to copy basic blocks during code generation.
4025 When build_scop_loop_nests fails, continue on next scop.
4026 (value_clast): New union.
4027 (clast_to_gcc_expression): Fix type cast warning.
4029 2008-11-09 Sebastian Pop <sebastian.pop@amd.com>
4031 * Merge from mainline (r140838:141727).
4033 2008-11-05 Tobias Grosser <grosser@fim.uni-passau.de>
4037 * graphite.c (scan_tree_for_params): Add POINTER_PLUS_EXPR.
4039 2008-11-05 Tobias Grosser <grosser@fim.uni-passau.de>
4043 * graphite.c (scopdet_basic_block_info): Fix loops with multiple
4044 exits and conditions.
4045 * testsuite/gcc.dg/graphite/pr37943.c: New.
4047 2008-10-23 Tobias Grosser <grosser@fim.uni-passau.de>
4050 * graphite.c (gloog): Replace EXIT_BLOCK_PTR with scop exit.
4052 2008-10-23 Tobias Grosser <grosser@fim.uni-passau.de>
4054 * doc/invoke.texi: Fix spaces.
4056 2008-10-22 Sebastian Pop <sebastian.pop@amd.com>
4058 PR tree-optimization/37891
4059 Reverted last commit.
4060 * graphite.c (create_single_entry_edge): Set
4061 EDGE_IRREDUCIBLE_LOOP and BB_IRREDUCIBLE_LOOP.
4063 2008-10-21 Sebastian Pop <sebastian.pop@amd.com>
4064 Mitul Thakkar <mitul.thakkar@amd.com>
4066 * graphite.c (create_single_entry_edge): Set
4067 EDGE_IRREDUCIBLE_LOOP and BB_IRREDUCIBLE_LOOP.
4069 2008-10-16 Tobias Grosser <grosser@fim.uni-passau.de>
4071 * doc/invoke.texi: Add -fgraphite-identity.
4072 * graphite.c (graphite_apply_transformations): Check for
4073 -fgraphite-identity.
4074 * toplev.c (process_options): Add flag_graphite_identity.
4075 * tree-ssa-loop.c: Add flag_graphite_identity.
4077 2008-10-14 Sebastian Pop <sebastian.pop@amd.com>
4079 Undo changes from 2008-10-02:
4080 * tree-ssa-loop-ivopts.c (rewrite_use_nonlinear_expr): Convert
4081 operand type when copying the operand to a variable of different type.
4082 * cfgloopmanip.c (create_empty_loop_on_edge): Write exit condition
4083 with the IV name after increment.
4085 2008-10-14 Sebastian Pop <sebastian.pop@amd.com>
4086 Harsha Jagasia <harsha.jagasia@amd.com>
4088 PR tree-optimization/37828
4089 * testsuite/gcc.dg/graphite/pr37828.c: New.
4090 * graphite.c (graphite_trans_loop_block): Do not loop block
4091 single nested loops.
4093 2008-10-09 Harsha Jagasia <harsha.jagasia@amd.com>
4094 Sebastian Pop <sebastian.pop@amd.com>
4096 * graphite.c (struct rename_map_elt, new_rename_map_elt,
4097 rename_map_elt_info, eq_rename_map_elts): New.
4098 (graphite_rename_ivs_stmt): Renamed graphite_rename_variables_in_stmt.
4099 (expand_scalar_variables_expr): Change parameters.
4100 (expand_scalar_variables_stmt): Same.
4101 (expand_scalar_variables): Same.
4102 (graphite_rename_ivs): Rename graphite_rename_variables.
4103 (build_iv_mapping): New.
4104 (translate_clast): Call build_iv_mapping.
4105 * graphite.h (gbb_p): New name.
4107 2008-10-03 Harsha Jagasia <harsha.jagasia@amd.com>
4109 PR tree-optimization/37684
4110 * gcc.dg/graphite/pr37684.c: New.
4111 * graphite.c (exclude_component_ref): New.
4112 (is_simple_operand): Call exclude_component_ref.
4114 2008-10-02 Jan Sjodin <jan.sjodin@amd.com>
4115 Harsha Jagasia <harsha.jagasia@amd.com>
4117 PR tree-optimization/37485
4118 * gcc.dg/graphite/block-2.c: New
4119 * graphite.c (gmp_cst_to_tree): Moved.
4120 (iv_stack_entry_is_constant): New.
4121 (iv_stack_entry_is_iv): New.
4122 (loop_iv_stack_push): Renamed to loop_iv_stack_push_iv.
4123 (loop_iv_stack_insert_constant): New.
4124 (loop_iv_stack_pop): Use new datatpype.
4125 (loop_iv_stack_get_iv): Same.
4126 (loop_iv_stack_get_iv_from_name): Same.
4127 (loop_iv_stack_debug): Renamed to debug_loop_iv_stack.
4128 (loop_iv_stack_patch_for_consts): New.
4129 (loop_iv_stack_remove_constants): New.
4130 (graphite_create_new_loop): Use loop_iv_stack_push_iv.
4131 (translate_clast): Call loop_iv_stack_patch_for_consts and
4132 loop_iv_stack_remove_constants.
4133 (gloog): Use new datatype. Redirect construction edge to end
4134 block to avoid accidental deletion.
4135 * graphite.h (enum iv_stack_entry_kind): New. Tag for data in
4137 (union iv_stack_entry_data): New. Data in iv stack entry.
4138 (struct iv_stack_entry): New. Datatype for iv stack entries.
4140 2008-10-02 Sebastian Pop <sebastian.pop@amd.com>
4142 * tree-ssa-loop-ivopts.c (rewrite_use_nonlinear_expr): Convert
4143 operand type when copying the operand to a variable of different type.
4145 2008-10-02 Sebastian Pop <sebastian.pop@amd.com>
4147 * cfgloopmanip.c (create_empty_loop_on_edge): Write exit condition
4148 with the IV name after increment.
4150 2008-10-02 Sebastian Pop <sebastian.pop@amd.com>
4152 * Merge from mainline (r140164:140838).
4154 2008-09-10 Konrad Trifunovic <konrad.trifunovic@inria.fr>
4156 * graphite-data-ref.c: New.
4157 * graphite.c (print_scop): Also dump the dependence graph.
4158 (bb_in_scop_p, loop_in_scop_p, nb_loops_around_gb): Moved...
4159 (new_scop): Initialize SCOP_DEP_GRAPH.
4160 (build_scop_dynamic_schedules): New.
4161 (build_access_matrix_with_af): Fixed column numbering.
4162 (graphite_transform_loops): Call build_scop_dynamic_schedules.
4163 * graphite.h: Add ifndef/define guards against multiple inclusion.
4164 (struct scop): Add dep_graph field.
4165 (SCOP_DEP_GRAPH): Defined.
4166 (ref_nb_loops): Fixed and moved to other position.
4167 (bb_in_scop_p, loop_in_scop_p, nb_loops_around_gb): ... here.
4168 (nb_loops_around_loop_in_scop): New.
4169 (graphite_dump_dependence_graph): Declared.
4170 (graphite_build_rdg_all_levels): Declared.
4171 (graphite_test_dependence): Declared.
4172 * Makefile.in (graphite-data-ref.o): New target.
4174 2008-09-09 Sebastian Pop <sebastian.pop@amd.com>
4176 * Merge from mainline (139870:140164).
4178 2008-09-01 Sebastian Pop <sebastian.pop@amd.com>
4180 * Merge from mainline (138275:139870).
4181 * testsuite/gcc.dg/graphite/scop-matmult.c: XFailed as one of
4182 the commits from trunk broke the niter detection.
4184 2008-09-01 Sebastian Pop <sebastian.pop@amd.com>
4186 * graphite.c: Add more documentation. Fix formatting.
4187 (debug_loop_vec, debug_oldivs, loop_iv_stack,
4188 loop_iv_stack_debug): Moved...
4189 (schedule_to_scattering): Move before use.
4190 (dot_all_scops): Include in "#if 0" the code for system
4193 * graphite.h: (debug_loop_vec, debug_oldivs, loop_iv_stack,
4194 loop_iv_stack_debug): ...here.
4196 2008-08-29 Jan Sjodin <jan.sjodin@amd.com>
4198 * tree-phinodes.c (make_phi_node): Extern.
4199 (add_phi_node_to_bb): New.
4200 (create_phi_node): Call add_phi_node_to_bb.
4201 * tree-ssa-loop-ivopts.c (get_phi_with_result): New.
4202 (remove_statement): Handle case where stored phi was updated
4203 and is no longer the same.
4204 * graphite.c (is_parameter): New.
4206 (expand_scalar_variables_expr): New.
4207 (expand_scalar_variables_stmt): New.
4208 (expand_scalar_variables): New.
4209 (move_phi_nodes): Create new phi instead of moving old one.
4210 (translate_clast): Call expand_scalar_variables.
4211 (find_vdef_for_var_in_bb): Also scan regular definitions.
4212 (skip_phi_defs): New.
4213 (collect_scop_exit_phi_args): New.
4214 (patch_scop_exit_phi_args): New.
4215 (gloog): Patch phis after scop.
4216 * tree-flow.h: (add_phi_node_to_bb): Declared.
4217 (make_phi_node): Declared.
4219 2008-08-26 Sebastian Pop <sebastian.pop@amd.com>
4221 * graphite.c (end_scop): Split the entry of the scop when it
4222 is the header of the loop in which the scop is ending.
4223 (build_scops_1, limit_scops): Update uses of end_scop.
4225 2008-08-26 Sebastian Pop <sebastian.pop@amd.com>
4227 * graphite.c (dot_all_scops_1): Do not fail on uninitialized
4228 SCOP_ENTRY or SCOP_EXIT.
4230 2008-08-25 Sebastian Pop <sebastian.pop@amd.com>
4232 * graphite.c (get_construction_edge): Removed.
4233 (gloog): Construction edge is the scop entry edge.
4235 2008-08-25 Sebastian Pop <sebastian.pop@amd.com>
4237 * graphite.c (can_generate_for_scop): Removed.
4238 (gloog): Do not call it.
4240 2008-08-25 Sebastian Pop <sebastian.pop@amd.com>
4242 * graphite.c (new_scop): Entry of a scop is an edge.
4243 Initialize SESE region.
4244 (free_scop): Free SESE region.
4245 (build_scops_1, scopdet_bb_info): Work on edges, not on bbs.
4246 (split_difficult_bb): New, split from end_scop.
4247 (end_scop): Exit of a scop is an edge.
4248 (build_scop_bbs): Never check CDI_POST_DOMINATORS: this info is
4249 not automatically updated and thus is always wrong.
4250 * graphite.h (struct sese): New.
4253 (struct scop): New field for a SESE region. Remove entry, exit.
4254 (SCOP_ENTRY, SCOP_EXIT): Update definitions to match same
4255 semantics as before. Moved comment around.
4257 2008-08-25 Tobias Grosser <grosser@fim.uni-passau.de>
4258 Sebastian Pop <sebastian.pop@amd.com>
4260 * graphite.c (graphite_transform_loops): Always enable gloog
4261 and find_transform when ENABLE_CHECKING.
4263 2008-08-25 Sebastian Pop <sebastian.pop@amd.com>
4265 * graphite.c (graphite_transform_loops): Move pretty printer
4266 of SCOPs before doing any transform. Remove call to print_scops
4267 and dot_all_scops_1.
4269 2008-08-25 Sebastian Pop <sebastian.pop@amd.com>
4271 * graphite.c (dump_gbb_conditions): Don't try to print NULL pointers.
4272 (print_graphite_bb): Same.
4274 2008-08-25 Sebastian Pop <sebastian.pop@amd.com>
4276 * graphite.c (dot_all_scops_1): Cleanup.
4277 (move_scops): Fix comment.
4279 2008-08-25 Sebastian Pop <sebastian.pop@amd.com>
4281 * graphite.c (build_scop_bbs): Revert commit 139355:
4283 2008-08-20 Sebastian Pop <sebastian.pop@amd.com>
4284 Dwarakanath Rajagopal <dwarak.rajagopal@amd.com>
4286 * graphite.c (build_scop_bbs): Factor up code.
4288 2008-08-25 Tobias Grosser <grosser@fim.uni-passau.de>
4290 * graphite.c (gloog): Update dominator info.
4292 2008-08-25 Tobias Grosser <grosser@fim.uni-passau.de>
4294 * graphite.c (remove_cond_exprs): Do not fail on empty bbs.
4296 2008-08-24 Sebastian Pop <sebastian.pop@amd.com>
4298 * graphite.c (new_graphite_bb): Remove GBB_INDEX_TO_NUM_MAP
4300 (free_graphite_bb): Remove GBB_INDEX_TO_NUM_MAP free.
4301 (translate_clast): Correct formatting.
4302 * graphite.h (struct num_map): Removed.
4303 (struct graphite_bb): Remove num_map field.
4304 (GBB_INDEX_TO_NUM_MAP): Removed.
4306 2008-08-24 Sebastian Pop <sebastian.pop@amd.com>
4308 * graphite.c (build_access_matrix_with_af): Fix comments.
4309 (build_scop_data_accesses): Same.
4311 2008-08-24 Sebastian Pop <sebastian.pop@amd.com>
4313 * graphite.c (build_scop_data_accesses): Don't construct
4314 access matrices. Add a FIXME and an assert condition that
4315 should pass when the access matrices will be needed.
4317 2008-08-24 Sebastian Pop <sebastian.pop@amd.com>
4319 * tree-data-ref.c (stmt_simple_memref_p): Don't call
4321 * graphite.c (build_graphite_bb): Renamed new_graphite_bb.
4322 Moved close by free_graphite_bb.
4323 (free_graphite_bb): Call free_data_refs. Reset bb->aux.
4324 (new_scop): Move close by free_scop.
4325 (graphite_transform_loops): Avoid linear scan to reset bb->aux.
4327 2008-08-22 Jan Sjodin <jan.sjodin@amd.com>
4329 * cfgloopmanip.c (create_empty_if_region_on_edge): New.
4330 * graphite.c (clast_to_gcc_expression): Call gmp_cst_to_tree
4331 instead of recursive call.
4332 (graphite_translate_clast_equation): New.
4333 (graphite_create_guard_cond_expr): New.
4334 (graphite_create_new_guard): New.
4335 (get_stack_index_from_iv): Removed.
4336 (graphite_rename_ivs_stmt): Use gbb_loop_index.
4337 (get_true_edge_from_guard_bb): New.
4338 (translate_clast): Handle stmt_guard in clast.
4339 (get_construction_edge): Allow construction edge detection for
4340 a scope entry with multiple predecessors if one predecessor is
4341 the immediate dominator of scope entry.
4342 (can_generate_code_stmt): Enable code generation for clast_guard.
4343 (gloog): Use correct context loop. Removed check for post dominators.
4344 * cfgloop.h (create_empty_if_region_on_edge): Declared.
4346 2008-08-21 Sebastian Pop <sebastian.pop@amd.com>
4348 * graphite.c (remove_dead_loops): Document better which
4351 2008-08-21 Sebastian Pop <sebastian.pop@amd.com>
4353 * Makefile.in: Rename POLYLIBLIBS and POLYLIBINC to PPLLIBS
4355 (graphite.o): Also depends on pointer-set.h.
4357 2008-08-21 Sebastian Pop <sebastian.pop@amd.com>
4359 * graphite.c (scop_record_loop): Fix compile warning.
4361 2008-08-21 Harsha Jagasia <harsha.jagasia@amd.com>
4362 Sebastian Pop <sebastian.pop@amd.com>
4364 * graphite.c (scop_record_loop): DECL_NAME can be NULL.
4366 2008-08-21 Sebastian Pop <sebastian.pop@amd.com>
4368 * graphite.c (build_graphite_bb): Initialize bb->aux to
4369 point to the graphite_bb_p.
4370 (graphite_bb_from_bb): Renamed gbb_from_bb; returns the
4372 (add_bb_domains): Does not use the scop parameter.
4373 (graphite_transform_loops): Clean bb->aux at the end.
4375 2008-08-20 Dwarakanath Rajagopal <dwarak.rajagopal@amd.com>
4376 Sebastian Pop <sebastian.pop@amd.com>
4378 * testsuite/lib/target-supports.exp
4379 (check_effective_target_fgraphite): New.
4381 * testsuite/gcc.dg/graphite/graphite.exp: Early exit when
4382 check_effective_target_fgraphite returns false.
4383 Set dg-do-what-default to compile.
4384 (scan-graphite-dump-times): Removed.
4385 * testsuite/gfortran.dg/graphite/graphite.exp: Same.
4387 * testsuite/gcc.dg/graphite/scop-0.c: Do not use "dg-do compile".
4388 Use scan-tree-dump-times instead of scan-graphite-dump-times.
4389 * testsuite/gcc.dg/graphite/scop-1.c: Same.
4390 * testsuite/gcc.dg/graphite/scop-2.c: Same.
4391 * testsuite/gcc.dg/graphite/scop-3.c: Same.
4392 * testsuite/gcc.dg/graphite/scop-4.c: Same.
4393 * testsuite/gcc.dg/graphite/scop-5.c: Same.
4394 * testsuite/gcc.dg/graphite/scop-6.c: Same.
4395 * testsuite/gcc.dg/graphite/scop-7.c: Same.
4396 * testsuite/gcc.dg/graphite/scop-8.c: Same.
4397 * testsuite/gcc.dg/graphite/scop-9.c: Same.
4398 * testsuite/gcc.dg/graphite/scop-10.c: Same.
4399 * testsuite/gcc.dg/graphite/scop-11.c: Same.
4400 * testsuite/gcc.dg/graphite/scop-12.c: Same.
4401 * testsuite/gcc.dg/graphite/scop-13.c: Same.
4402 * testsuite/gcc.dg/graphite/scop-matmult.c: Same.
4403 * testsuite/gcc.dg/graphite/scop-14.c: Same.
4404 * testsuite/gcc.dg/graphite/scop-15.c: Same.
4405 * testsuite/gcc.dg/graphite/block-0.c: Same.
4406 * testsuite/gcc.dg/graphite/scop-16.c: Same.
4407 * testsuite/gcc.dg/graphite/block-1.c: Same.
4408 * testsuite/gcc.dg/graphite/scop-17.c: Same.
4409 * testsuite/gcc.dg/graphite/scop-18.c: Same.
4410 * testsuite/gfortran.dg/graphite/block-1.f90: Same.
4411 * testsuite/gfortran.dg/graphite/scop-1.f: Same.
4412 * testsuite/gfortran.dg/graphite/block-2.f: Same.
4414 2008-08-20 Sebastian Pop <sebastian.pop@amd.com>
4416 * graphite.c: Fix some XXX comments.
4417 (build_scop_dynamic_schedules): Removed.
4419 2008-08-20 Sebastian Pop <sebastian.pop@amd.com>
4421 * graphite.h (scop_max_loop_depth): Moved...
4422 * graphite.c (scop_max_loop_depth): ...here.
4423 (remove_all_edges_1): New.
4424 (remove_all_edges): Factored code.
4425 (remove_cond_exprs): Check only the last statement for
4426 a GIMPLE_COND expression.
4428 2008-08-20 Sebastian Pop <sebastian.pop@amd.com>
4430 * graphite.c (scan_tree_for_params): Early return when the
4431 expression is a chrec_dont_know. Handle case NEGATE_EXPR.
4432 (find_scop_parameters): Factor out code.
4433 (graphite_trans_bb_strip_mine): Remove dead code.
4435 2008-08-20 Sebastian Pop <sebastian.pop@amd.com>
4437 * graphite.c (clast_to_gcc_expression, graphite_create_new_loop,
4438 graphite_trans_bb_move_loop): Factor asserts.
4439 (gloog): Perform sanity checks only for ENABLE_CHECKING.
4440 Do not call calculate_dominance_info and estimate_bb_frequencies.
4442 2008-08-20 Jan Sjodin <jan.sjodin@amd.com>
4444 * graphite.c (create_loops_mapping, free_loops_mapping,
4445 create_loops_mapping_num, debug_loop_mapping_1,
4446 debug_loop_mapping, graphite_loops_mapping_max_loop_num,
4447 get_loop_mapping_for_num, graphite_loops_mapping_add_child,
4448 graphite_loops_mapping_add_child_num,
4449 graphite_loops_mapping_insert_child,
4450 graphite_loops_mapping_parent, get_loop_mapped_depth_for_num,
4451 get_loop_mapped_depth, split_loop_mapped_depth_for_num,
4452 loop_mapped_depth_split_loop, swap_loop_mapped_depth_for_num,
4453 create_num_from_index, get_num_from_index,
4454 swap_loop_mapped_depth): Removed.
4455 (new_scop): Do not initialize SCOP_LOOPS_MAPPING.
4456 (free_scop): Do not call free_loops_mapping.
4457 (graphite_get_new_iv_stack_index_from_old_iv): Renamed
4458 get_stack_index_from_iv. Use GBB_LOOPS instead of calling
4459 get_loop_mapped_depth.
4460 (graphite_trans_bb_move_loop): Do not update the loop mapping.
4461 (graphite_trans_bb_strip_mine): Same.
4462 * graphite.h (graphite_loops_mapping, graphite_loop_node): Removed.
4463 (struct scop): Remove field loops_mapping.
4465 2008-08-20 Sebastian Pop <sebastian.pop@amd.com>
4466 Dwarakanath Rajagopal <dwarak.rajagopal@amd.com>
4468 * graphite.c (scop_record_loop): Factor out one level of the
4469 condition by early return.
4470 (build_scop_loop_nests): Format following FSF coding style.
4471 (build_scop_dynamic_schedules): Factor out code.
4472 (scopdet_bb_info): Reindent. Default case should not be reachable.
4474 2008-08-20 Sebastian Pop <sebastian.pop@amd.com>
4475 Dwarakanath Rajagopal <dwarak.rajagopal@amd.com>
4477 * graphite.c (loop_affine_expr): Check for DECL_P or struct
4478 assignments that are not handled as simple operands for now.
4480 2008-08-20 Sebastian Pop <sebastian.pop@amd.com>
4481 Dwarakanath Rajagopal <dwarak.rajagopal@amd.com>
4483 * graphite.c (build_scop_bbs): Factor up code.
4485 2008-08-20 Sebastian Pop <sebastian.pop@amd.com>
4486 Dwarakanath Rajagopal <dwarak.rajagopal@amd.com>
4488 * graphite.c (stmt_simple_for_scop_p): Factor code out
4490 (enum gbb_type): New. Group all the GBB_* types under it.
4491 (is_loop_exit): Moved...
4492 (end_scop): Enable BB spliting.
4493 * cfgloop.c (is_loop_exit): ...here. Reimplemented.
4494 * cfgloop.h (is_loop_exit): Declared.
4496 2008-08-20 Sebastian Pop <sebastian.pop@amd.com>
4498 * doc/invoke.texi: Remove strides from examples containing
4499 DO loops when the strides are equal to 1.
4501 2008-08-20 Harsha Jagasia <harsha.jagasia@amd.com>
4502 Dwarakanath Rajagopal <dwarak.rajagopal@amd.com>
4504 * graphite.c (graphite_trans_scop_block): Or the result with
4505 the result from graphite_trans_loop_block.
4506 * testsuite/gcc.dg/graphite/block-1.c: New.
4507 * testsuite/gfortran.dg/graphite/block-1.f90: New.
4508 * testsuite/gfortran.dg/graphite/block-2.f: New.
4510 2008-08-20 Sebastian Pop <sebastian.pop@amd.com>
4512 * graphite.c (graphite_transform_loops): Call cloog_initialize
4515 2008-08-20 Sebastian Pop <sebastian.pop@amd.com>
4517 * tree-data-ref.c) (stmt_simple_memref_p): New.
4518 * tree-data-ref.h (stmt_simple_memref_p): Declared.
4519 * graphite.c (stmt_simple_memref_for_scop_p): Removed.
4520 (is_simple_operand): Call stmt_simple_memref_p.
4522 * testsuite/gcc.dg/graphite/scop-matmult.c: Updated for not
4523 using pointer arithmetic, as this is optimized by PRE and
4524 makes the code too difficult to analyze.
4526 * testsuite/gcc.dg/graphite/scop-18.c: Same.
4528 2008-08-20 Sebastian Pop <sebastian.pop@amd.com>
4530 * gdbinit.in (pgg): New.
4532 2008-08-15 Tobias Grosser <grosser@fim.uni-passau.de>
4534 * graphite.c (graphite_trans_loop_block): Fix warning.
4536 2008-08-15 Tobias Grosser <grosser@fim.uni-passau.de>
4538 * graphite.c (graphite_trans_loop_block): Fix my merge error.
4540 2008-08-15 Tobias Grosser <grosser@fim.uni-passau.de>
4542 * graphite.c (graphite_trans_bb_block): Remove check for
4543 flag_loop_strip_mine, flag_loop_block, flag_loop_interchange.
4544 Check if loop blocking is profitable for every loop, before applying
4546 (graphite_apply_transformations): Call graphite_trans_bb_block only,
4547 if flag_loop_block is set.
4549 2008-08-14 Sebastian Pop <sebastian.pop@amd.com>
4551 * graphite.c: Add some more documentation for the loop
4554 2008-08-14 Sebastian Pop <sebastian.pop@amd.com>
4556 * Makefile.in (tree-data-ref.o): Remove dependence on graphite.h.
4557 * graphite.c: Format on less than 80 columns.
4560 2008-08-14 Sebastian Pop <sebastian.pop@amd.com>
4562 * cfgloopmanip.c (loopify): Use update_dominators_in_loop.
4564 2008-08-14 Sebastian Pop <sebastian.pop@amd.com>
4566 * doc/invoke.texi (floop-block, floop-strip-mine,
4567 floop-interchange): Update documentation with examples.
4569 2008-08-13 Sebastian Pop <sebastian.pop@amd.com>
4571 * cfgloopmanip.c (create_empty_loop_on_edge): Don't call
4573 * graphite.c (graphite_create_new_loop): Call add_referenced_var.
4575 2008-08-13 Sebastian Pop <sebastian.pop@amd.com>
4577 * cfgloopmanip.c (create_empty_loop_on_edge): Improve documentation.
4578 Factor gcc_asserts into a single one. Use force_gimple_operand_gsi.
4579 * tree-scalar-evolution.c: Revert useless changes.
4580 * tree-phinodes.c: Same.
4583 * tree-vectorizer.h: Same.
4584 * tree-flow.h: Same.
4586 * common.opt (fgraphite): Update documentation.
4588 2008-08-12 Harsha Jagasia <harsha.jagasia@amd.com>
4590 * doc/invoke.texi (-floop-block, -floop-strip-mine,
4591 -floop-interchange): Add more text for explaining what each of these
4593 * tree-into-ssa.c (gimple_vec): Moved to...
4594 * graphite.c: Include gimple.h.
4595 (gimple_vec): Moved to...
4596 (del_loop_to_cloog_loop): Removed.
4597 (loop_affine_expr): Do not call create_data_ref when the
4598 operand is a constant.
4599 (new_scop): Use free instead of del_loop_to_cloog_loop.
4600 * Makefile.in (graphite.o): Depend on GIMPLE_H.
4601 * gimple.h (gimple_vec): ... here.
4603 2008-08-11 Tobias Grosser <grosser@fim.uni-passau.de>
4605 * graphite.c (scopdet_bb_info): Only allow loops with known number of
4607 (build_loop_iteration_domains): Fail, if latch executions unknown.
4609 2008-08-11 Tobias Grosser <grosser@fim.uni-passau.de>
4611 * graphite.c (add_conditions_to_domain): New.
4612 (build_scop_conditions_1): Call add_conditions_to_domain.
4613 (set_cloog_options): Allow to disable optimizations.
4615 2008-08-11 Tobias Grosser <grosser@fim.uni-passau.de>
4617 * graphite.c (find_params_in_bb): Look for parameters in conditions.
4618 Do not use walk_dominator_tree.
4619 (find_scop_parameters): Do not use walk_dominator_tree.
4621 2008-08-11 Tobias Grosser <grosser@fim.uni-passau.de>
4623 * graphite.c (scan_tree_for_params) Add / Subtract inequality.
4624 (idx_record_params): Adapt.
4625 * graphite.h (scop_gimple_loop_depth): New.
4627 2008-08-11 Tobias Grosser <grosser@fim.uni-passau.de>
4629 * graphite.c (build_scop_dynamic_schedules): Remove value_init.
4630 (scan_tree_for_params): Remove value_init.
4631 (build_scop_context): Remove value_init.
4632 (build_loop_iteration_domains): Remove value_init.
4633 (schedule_to_scattering): Remove value_init.
4634 (graphite_trans_bb_strip_mine): Remove value_init.
4636 2008-08-11 Tobias Grosser <grosser@fim.uni-passau.de>
4638 * gcc/graphite.c (limit_scops): New.
4639 (graphite_transform_loops): Add limit SCoPs.
4640 * gcc/testsuite/gcc.dg/graphite/scop-0.c: Update number of SCoPs.
4641 * gcc/testsuite/gcc.dg/graphite/scop-1.c: Update number of SCoPs.
4642 * gcc/testsuite/gcc.dg/graphite/scop-10.c: Update number of SCoPs.
4643 * gcc/testsuite/gcc.dg/graphite/scop-11.c: Update number of SCoPs.
4644 * gcc/testsuite/gcc.dg/graphite/scop-12.c: Update number of SCoPs.
4645 * gcc/testsuite/gcc.dg/graphite/scop-13.c: Update number of SCoPs.
4646 * gcc/testsuite/gcc.dg/graphite/scop-14.c: Update number of SCoPs.
4647 * gcc/testsuite/gcc.dg/graphite/scop-15.c: Update number of SCoPs.
4648 * gcc/testsuite/gcc.dg/graphite/scop-16.c: Update number of SCoPs.
4649 Change loop numbers.
4650 * gcc/testsuite/gcc.dg/graphite/scop-17.c: Update number of SCoPs.
4651 Change loop numbers.
4652 * gcc/testsuite/gcc.dg/graphite/scop-18.c: Update number of SCoPs.
4653 * gcc/testsuite/gcc.dg/graphite/scop-2.c: Update number of SCoPs.
4654 * gcc/testsuite/gcc.dg/graphite/scop-3.c: Update number of SCoPs.
4655 * gcc/testsuite/gcc.dg/graphite/scop-4.c: Update number of SCoPs.
4656 * gcc/testsuite/gcc.dg/graphite/scop-5.c: Update number of SCoPs.
4657 * gcc/testsuite/gcc.dg/graphite/scop-6.c: Update number of SCoPs.
4658 * gcc/testsuite/gcc.dg/graphite/scop-7.c: Update number of SCoPs.
4659 * gcc/testsuite/gcc.dg/graphite/scop-8.c: Update number of SCoPs.
4660 * gcc/testsuite/gcc.dg/graphite/scop-9.c: Update number of SCoPs.
4661 * gcc/testsuite/gcc.dg/graphite/scop-matmult.c: Update number of SCoPs.
4663 2008-08-11 Tobias Grosser <grosser@fim.uni-passau.de>
4665 * graphite.c (graphite_transform_loops): Call always find_transform.
4667 2008-08-08 Tobias Grosser <grosser@fim.uni-passau.de>
4669 * graphite.c (free_loops_mapping): New.
4670 (stmt_simple_for_scop_p): Fix typo.
4671 (stmt_simple_for_scop_p): Fix tuples functions, that
4673 (free_graphite_bb): Fix some memleaks.
4674 (free_scop): Fix some memleaks.
4675 (scopdet_bb_info): Do not forget some tmp SCoPs.
4676 (find_params_in_bb): Fix some memleaks.
4677 (clast_to_gcc_expression): Fix warning.
4679 2008-08-07 Tobias Grosser <grosser@fim.uni-passau.de>
4681 * testsuite/gcc.dg/graphite/scop-16.c: Fix for 32bit.
4682 * testsuite/gcc.dg/graphite/scop-17.c: Fix for 32bit.
4684 2008-08-04 Sebastian Pop <sebastian.pop@amd.com>
4686 * tree-ssa-loop.c (tree-ssa-loop.o): Do not include toplev.h.
4687 Move code ifdef-ed HAVE_cloog...
4688 * graphite.c: Include toplev.h.
4690 * Makefile.in (OBJS-common): Always build graphite.o.
4691 (BACKEND): Remove @GRAPHITE@.
4692 (tree-ssa-loop.o): Do not depend on TOPLEV_H.
4693 (graphite.o): Depend on TOPLEV_H.
4695 2008-08-04 Sebastian Pop <sebastian.pop@amd.com>
4697 * Makefile.in (tree-ssa-loop.o): Depend on TOPLEV_H.
4698 Remove typo left from polylib to ppl conversion.
4699 * graphite.c (graphite_transforms): Use sorry instead of fatal.
4701 2008-08-03 Sebastian Pop <sebastian.pop@amd.com>
4703 * toplev.c (process_options): Move the graphite loop optimization
4705 * tree-ssa-loop.c (graphite_transforms): ... here.
4706 When not configured with CLooG, print to dump_file that
4707 Graphite transforms were not performed.
4708 * testsuite/gcc.dg/graphite/graphite.exp (scan-graphite-dump-times):
4710 * testsuite/gcc.dg/graphite/*.c: Updated all testcases to use
4711 scan-graphite-dump-times.
4713 2008-08-03 Sebastian Pop <sebastian.pop@amd.com>
4715 * graphite.c (dot_scop, dot_all_scops): Do not call system.
4716 Do not open /tmp/scop.dot and /tmp/allscops.dot.
4718 2008-08-02 Sebastian Pop <sebastian.pop@amd.com>
4719 Jan Sjodin <jan.sjodin@amd.com>
4721 * configure: Regenerated.
4722 * omp-low.c (expand_omp_sections): Remove now unused code.
4723 * config.in (HAVE_polylib): Removed.
4724 * configure.ac (HAVE_polylib, POLYLIBLIBS, POLYLIBINC): Removed.
4725 (PPLLIBS, PPLINC): Added.
4726 * graphite.c: Replace unsigned with int wherever possible.
4727 Don't access Cloog's data structures, but use accessor functions.
4728 Clast's stmt->type is now implemented as a vtable: change the
4729 switches of stmt->type into ifs.
4730 (polylib/polylibgmp.h): Don't include.
4731 (initialize_dependence_polyhedron,
4732 initialize_data_dependence_polyhedron, is_empty_polyhedron,
4733 statement_precedes_p, test_dependence, build_rdg_all_levels,
4734 dump_dependence_graph): Removed until this code is cleaned up
4736 * Makefile.in (POLYLIBLIBS): Renamed PPLLIBS.
4737 (POLYLIBINC): Renamed PPLINC.
4739 2008-08-01 Harsha Jagasia <harsha.jagasia@amd.com>
4740 Dwarakanath Rajagopal <dwarak.rajagopal@amd.com>
4741 Jan Sjodin <jan.sjodin@amd.com>
4743 Finish the merge and tuplification of graphite.
4745 2008-07-24 Sebastian Pop <sebastian.pop@amd.com>
4746 Jan Sjodin <jan.sjodin@amd.com>
4748 Partial merge from mainline (138072:138275).
4749 * graphite.c still has to be tuplified.
4751 2008-07-29 Jan Sjodin <jan.sjodin@amd.com>
4753 * graphite.c (graphite_loops_mapping_max_loop_num): New.
4754 (create_num_from_index): New.
4755 (get_num_from_index): Also pass in the graphite BB.
4756 (free_graphite_bb): Free GBB_INDEX_TO_NUM_MAP.
4757 (build_graphite_bb): Initialize GBB_INDEX_TO_NUM_MAP.
4758 (graphite_trans_bb_strip_mine): Call create_num_from_index.
4759 (is_interchange_valid): Return false when failing.
4760 * graphite.h (struct num_map): New.
4761 (struct graphite_bb): New field num_map.
4762 (GBB_LOOPS_MAPPING): Renamed GBB_INDEX_TO_NUM_MAP.
4764 2008-07-29 Tobias Grosser <grosser@fim.uni-passau.de>
4766 * graphite.c (dump_gbb_conditions): Print also conditions like
4767 "if (a)". Remove dublicated code and use print_generic_expr ().
4768 (stmt_simple_for_scop_p): Only allow conditions we can handle
4771 2008-07-25 Jan Sjodin <jan.sjodin@amd.com>
4773 * graphite.h (struct scop): Removed new_ivs field.
4774 (SCOP_NEWIVS): Deleted.
4775 * graphite.c (new_scop, free_scop, clast_name_to_gcc,
4776 clast_to_gcc_expression, graphite_create_new_loop):
4777 Removed use of new_ivs.
4779 2008-07-25 Jan Sjodin <jan.sjodin@amd.com>
4781 * graphite.c (debug_oldivs, debug_loop_vec, create_loops_mapping,
4782 create_loops_mapping_num, debug_loop_mapping_1): New.
4783 (debug_loop_mapping): Call debug_loop_mapping_1.
4784 (get_loop_mapping_for_num,
4785 graphite_loops_mapping_add_child,
4786 graphite_loops_mapping_add_child_num,
4787 graphite_loops_mapping_insert_child,
4788 graphite_loops_mapping_parent,
4789 split_loop_mapped_depth_for_num,
4790 loop_mapped_depth_split_loop): New.
4791 (increment_loop_mapped_depths): Removed.
4792 (swap_loop_mapped_depth_for_num): Reimplemented.
4793 (new_scop): Call create_loops_mapping.
4794 (scop_record_loop): Call graphite_loops_mapping_insert_child.
4795 (translate_clast): Pass the old loop father in parameter, and pass
4796 it to get_old_iv_from_ssa_name.
4797 (remove_edges_around_useless_blocks, can_generate_code_stmt,
4798 can_generate_code, can_generate_for_scop): New.
4799 (graphite_trans_bb_block): Returns false when it fails to transform.
4800 * graphite.h (graphite_loop_node, graphite_loops_mapping): New.
4802 2008-07-25 Sebastian Pop <sebastian.pop@amd.com>
4804 Reverted all the changes related to the streamization and
4806 These changes are now tracked in the streamization branch.
4808 2008-07-25 Sebastian Pop <sebastian.pop@amd.com>
4809 Jan Sjodin <jan.sjodin@amd.com>
4811 * graphite.c (gbb_compare): Correctly constify.
4812 (gbb_can_be_ignored): Indent.
4813 (graphite_trans_scop_swap_1and2): Add legality check.
4816 2008-07-25 Sebastian Pop <sebastian.pop@amd.com>
4818 Remove fallouts from "Reverted the Condate changes".
4819 * tree.h: Remove unused decl.
4820 * testsuite/gcc.dg/tree-checker: Same.
4821 * timevar.def: Remove counter.
4823 2008-07-24 Sebastian Pop <sebastian.pop@amd.com>
4825 * Merge from mainline (135673:138072).
4827 Reverted the MIRO changes (from 2008-04-05) that are now
4828 tracked in the miro branch.
4829 * tree-bounds.c: Removed.
4830 * tree-bounds.h: Removed.
4832 Reverted the Condate changes (from 2006-07-04, 2007-03-20) that
4833 are now tracked in the condate branch.
4834 * tree-check.c: Removed.
4835 * tree-match.c: Removed.
4836 * condate.y: Removed.
4838 2008-07-24 Dwarakanath Rajagopal <dwarak.rajagopal@amd.com>
4840 * common.opt: New user flag -floop-block, -floop-strip-mine
4841 and -floop-interchange.
4842 * toplev.c (process_options): Enable -fgraphite pass if any one of the
4843 graphite loop optimization flags is turned on.
4844 * graphite.c (graphite_apply_transformations): Add flag_loop_block,
4845 flag_loop_strip_mine and flag_loop_interchange checks before
4847 * doc/invoke.texi: Remove -fgraphite and add -floop-block,
4848 -floop-strip-mine and -floop-interchange.
4849 * testsuite/gcc.dg/graphite/block-0.c: Add -floop-block and remove
4851 * testsuite/gcc.dg/graphite/scop-16.c: Ditto.
4852 * testsuite/gcc.dg/graphite/scop-17.c: Ditto.
4853 * testsuite/gcc.dg/graphite/scop-18.c: Ditto.
4855 2008-07-23 Jan Sjodin <jan.sjodin@amd.com>
4856 Sebastian Pop <sebastian.pop@amd.com>
4858 * cfgloopmanip.c (update_dominators_in_loop): Make it static.
4859 (create_empty_loop_on_edge): More fixes.
4860 * tree-phinodes.c (resize_phi_node): Extern.
4861 (unlink_phi_node, move_phi_node): New split from remove_phi_node.
4862 * cfghooks.c (update_dominator_information): New split from
4864 * tree-vectorizer.c (rename_variables_in_bb): Extern.
4865 * tree-dfa.c (collect_dfa_stats): Start walking the CFG on the
4866 successor of the function entry block.
4868 * graphite.c: Include pointer-set.h.
4869 (debug_loop_mapping, increment_loop_mapped_depths,
4870 get_loop_mapped_depth_for_num, get_loop_mapped_depth,
4871 set_loop_mapped_depth_for_num, set_loop_mapped_depth,
4872 swap_loop_mapped_depth_for_num, get_num_from_index,
4873 swap_loop_mapped_depth, loop_iv_stack_debug,
4874 loop_iv_stack_push, loop_iv_stack_pop, loop_iv_stack_get_iv,
4875 loop_iv_stack_get_iv_from_name, loop_iv_stack_debug,
4876 get_old_iv_from_ssa_name): New.
4877 (new_scop): Initialize SCOP_LOOPS_MAPPING.
4878 (free_scop): Free SCOP_LOOPS_MAPPING.
4879 (scop_record_loop): Record old ivs.
4880 (create_var_name): Removed.
4881 (initialize_cloog_names): Allocate double space in case strip mine
4882 applies to all loops once.
4883 (clast_name_to_gcc): Look up in the map ivstack passed in parameter.
4884 (clast_to_gcc_expression): Same. Implement more clast to gimple
4886 (graphite_create_new_loop): Pass in ivstack.
4887 (remove_all_edges): Pass in the construction_edge.
4888 (graphite_remove_iv): Removed.
4889 (graphite_rename_ivs, graphite_rename_ivs_stmt,
4890 remove_cond_exprs): Rewritten.
4891 (move_phi_nodes): New.
4892 (disconnect_virtual_phi_nodes, disconnect_cond_expr): Removed.
4893 (translate_clast): Pass in ivstack. Rewrite some cases.
4894 (set_cloog_options, debug_clast_stmt): New.
4895 (find_transform): Use set_cloog_options.
4896 (outermost_loop_layer): Removed.
4897 (get_construction_edge, collect_virtual_phis, find_vdef_for_var_in_bb,
4898 find_vdef_for_var_1, find_vdef_for_var, patch_phis_for_virtual_defs,
4899 mark_old_loops, remove_dead_loops): New.
4901 (graphite_trans_bb_move_loop): Call swap_loop_mapped_depth.
4902 (const_column_index, get_first_matching_sign_row_index,
4903 get_lower_bound_row, get_upper_bound_row, get_lower_bound,
4904 get_upper_bound): New.
4905 (graphite_trans_bb_strip_mine): Also update the iv map.
4907 * graphite.h (graphite_loops_mapping, GBB_LOOPS_MAPPING): New.
4908 (struct name_tree): Add a loop field.
4909 (struct scop): Add a graphite_loops_mapping field.
4910 (SCOP_LOOPS_MAPPING): New.
4911 (debug_clast_stmt): Declare.
4912 * lambda.h (find_induction_var_from_exit_cond): Declare.
4913 (lambda-code.c): (find_induction_var_from_exit_cond): Extern.
4914 * cfgloop.h (update_dominators_in_loop): Removed declaration.
4915 (create_empty_loop_on_edge): Updated.
4916 * tree-flow.h (remove_bb, resize_phi_node, move_phi_node,
4917 rename_variables_in_bb): Declare.
4918 * tree-cfg.c (remove_bb): Extern.
4920 * testsuite/gcc.dg/graphite/block-0.c: New.
4922 2008-07-21 Dwarakanath Rajagopal <dwarak.rajagopal@amd.com>
4923 Sebastian Pop <sebastian.pop@amd.com>
4925 * graphite.c (strip_mine_profitable_p): New.
4926 (graphite_trans_bb_block): Disable strip mining if not profitable.
4928 * testsuite/gcc.dg/graphite/scop-18.c: New.
4929 * testsuite/gcc.dg/graphite/scop-17.c: Fixed.
4930 * testsuite/gcc.dg/graphite/scop-16.c: Fixed.
4932 2008-07-17 Harsha Jagasia <harsha.jagasia@amd.com>
4933 Jan Sjodin <jan.sjodin@amd.com>
4934 Sebastian Pop <sebastian.pop@amd.com>
4936 * graphite.c (is_interchange_valid): New.
4937 (graphite_trans_bb_block): Check loop nest of basic block for legality
4940 * graphite.h (gbb_inner_most_loop_index, outer_most_loop_1,
4941 outer_most_loop, gbb_outer_most_loop_index): New.
4943 * tree-loop-linear.c (perfect_loop_nest_depth): Remove static.
4944 * tree-flow.h (perfect_loop_nest_depth): Declare as extern.
4945 * testsuite/gcc.dg/graphite/scop-16.c: New.
4946 * testsuite/gcc.dg/graphite/scop-17.c: New.
4948 2008-07-11 Tobias Grosser <grosser@fim.uni-passau.de>
4950 * graphite.c (scop_remove_ignoreable_gbbs): Also update bitmap.
4951 (graphite_trans_scop_block): Ignore SCoPs without bbs.
4953 2008-07-11 Tobias Grosser <grosser@fim.uni-passau.de>
4955 * graphite.c (new_scop): Initialize SCOP_EXIT.
4956 (scopdet_info): Add.
4957 (scopdet_bb_info): Rename from is_bb_addable. Cleanup, bugfixes.
4958 (build_scops_1): Cleanup, bugfixes.
4959 (build_scops): Cleanup.
4961 * testsuite/gcc.dg/graphite/scop-matmult.c: Remove duplicated code.
4962 * testsuite/gcc.dg/graphite/scop-15.c: Add SCoP numbers.
4964 2008-07-10 Harsha Jagasia <harsha.jagasia@amd.com>
4966 * testsuite/gfortran.dg/graphite/scop-1.f: Update to reduced test case.
4968 * testsuite/gfortran.dg/graphite/graphite.exp: Use
4969 DEFAULT_GRAPHITE_FLAGS.
4971 * testsuite/gcc.dg/graphite/scop-15.c: Update to reduced test case.
4973 2008-07-10 Harsha Jagasia <harsha.jagasia@amd.com>
4975 * graphite.c (scan_tree_for_params): Do not assert any more if
4976 MULT_EXPR parameter is negative.
4978 * testsuite/gfortran.dg/graphite/scop-1.f: New.
4980 * testsuite/gfortran.dg/graphite/graphite.exp: New.
4982 * testsuite/gcc.dg/graphite/scop-15.c: New.
4984 2008-07-10 Harsha Jagasia <harsha.jagasia@amd.com>
4986 * graphite.c (is_bb_addable): Fix segfault in spec gzip and reformat.
4988 2008-07-10 Tobias Grosser <grosser@fim.uni-passau.de>
4990 * graphite.c (graphite_trans_bb_swap_loops): Rename from
4991 graphite_swap_loops.
4992 (graphite_trans_bb_move_loop): New.
4993 (graphite_trans_bb_strip_mine): Rename from graphite_strip_mine_loop.
4994 (graphite_trans_bb_block): New.
4995 (graphite_trans_loop_block): New.
4996 (graphite_trans_scop_swap_1and2): Rename from
4997 graphite_trans_swap_1and2.
4998 (graphite_trans_scop_strip): Rename from graphite_trans_strip.
4999 (graphite_trans_scop_block): New.
5000 (graphite_apply_transformations): Rename from
5001 graphite_transformations.
5003 * testsuite/gcc.dg/graphite/scop-matmult.c: New.
5005 2008-07-10 Tobias Grosser <grosser@fim.uni-passau.de>
5007 * graphite.c (gbb_compare): New.
5008 (graphite_sort_gbbs): New.
5009 (gbb_can_be_ignored): New.
5010 (scop_remove_ignoreable_gbbs): New.
5011 (graphite_transformations): Cleanup and add
5012 scop_remove_ignoreable_gbbs.
5013 * lambda.h (lambda_vector_compare): New.
5015 2008-07-09 Tobias Grosser <grosser@fim.uni-passau.de>
5017 * graphite.c (print_graphite_bb): Correct printing of static schedule.
5018 (graphite_swap_loops): int -> unsigned
5019 (graphite_strip_mine_loop): int -> unsigned, Fix SCHEDULE
5020 (graphite_transformations): New.
5021 (graphite_transform_loops): Move to graphite_transformations.
5022 * graphite.h (gbb_nb_loops): Return unsigned.
5024 2008-07-04 Tobias Grosser <grosser@fim.uni-passau.de>
5026 * graphite.c (scan_tree_for_params): Fix insertion of parameters into
5027 the domain matrix. This makes scop-0.c work again.
5029 2008-06-20 Richard Guenther <rguenther@suse.de>
5031 * graphite.h: Adjust copyright to GPLv3.
5032 * graphite.c: Likewise.
5033 (stmt_simple_memref_for_scop_p): Split out from ...
5034 (stmt_simple_for_scop_p): ... here. Fix handling of calls
5036 (get_bb_type): Optimize.
5038 (is_bb_addable): Fix memleak, replace is_pred call with
5040 (build_scops): Use current_loops.
5041 (param_index): Fix memleak.
5043 2008-06-20 Konrad Trifunovic <konrad.trifunovic@inria.fr>
5045 * graphite.c: Fix formatting.
5047 2008-06-19 Konrad Trifunovic <konrad.trifunovic@inria.fr>
5049 * graphite.c (new_scop): Memory allocation for SCOP_{NEWIVS, OLDIVS}.
5050 (free_scop): Memory deallocation for SCOP_NEWIVS, SCOP_OLDIVS.
5051 (create_var_name, save_var_name): Newly defined functions.
5052 (initialize_cloog_names): Part of the code factored out to
5054 (clast_to_gcc_expression): Now handles the case of clast_red_sum
5055 in clast_reduction statement.
5056 (graphite_create_new_loop): Now takes a new parameter
5058 (translate_clast): Now also takes the context_loop and bb_exit
5059 parameters. Rewritten the code so that it creates a gimple code
5060 inside the given context.
5061 (outermost_loop_layer, graphite_remove_iv, graphite_rename_ivs,
5062 remove_cond_expr, disconnect_cond_expr,
5063 disconnect_virtual_phi_nodes): Newly defined functions.
5064 * graphite.h (struct scop): added old_ivs vector.
5065 SCOP_OLDIVS: New macro.
5067 2008-06-19 Sebastian Pop <sebastian.pop@amd.com>
5069 * cfgloopmanip.c: Add missing function comments, fix formatting.
5071 2008-06-18 Konrad Trifunovic <konrad.trifunovic@inria.fr>
5073 * cfgloopmanip.c (update_dominators_in_loop): Defined.
5074 (create_empty_loop_on_edge): Defined.
5075 * tree-parloops.c (canonicalize_loop_ivs): Returns tree
5077 * cfgloop.h (create_empty_loop_on_edge): Declared as extern.
5078 (update_dominators_in_loop): Declared as extern
5079 * tree-flow.h (canonicalize_loop_ivs): Declared as extern.
5081 2008-06-16 Tobias Grosser <grosser@fim.uni-passau.de>
5083 * graphite.c (print_graphite_bb): Allow changing number of loops
5085 (initialize_cloog_names): Allow changing number of loops.
5086 (build_cloog_prog): Simplify.
5087 (find_transform): Enable cloog option --strides.
5088 (graphite_swap_loops): New.
5089 (graphite_strip_mine_loop): New.
5090 (graphite_trans_swap_1and2): New.
5091 (graphite_trans_strip): New.
5092 (graphite_transform_loops): Add graphite_trans_strip.
5093 * graphite.h (scop_max_loop_depth): New.
5095 2008-06-15 Tobias Grosser <grosser@fim.uni-passau.de>
5097 * graphite.c (build_scop_iteration_domain): Remove forgotten
5098 line. (Fixes compile)
5100 2008-06-15 Tobias Grosser <grosser@fim.uni-passau.de>
5102 * graphite.c (print_graphite_bb): Add output of GBB_LOOPS.
5103 (build_graphite_bb): Add GBB_LOOPS and GBB_DOMAIN and reorder.
5104 (build_bb_loops): New.
5105 (graphite_transform_loops): Add build_bb_loops.
5106 (schedule_to_scattering): Use gbb_nb_loops to support changing loop
5108 * graphite.h (graphite_bb): Add loops.
5109 (gbb_nb_loops): New.
5110 (gbb_loop_at_index): New.
5111 (gbb_loop_index): New.
5112 (nb_params_in_scop): Renamed to scop_nb_params. Updated all functions
5113 using nb_params_in_scop.
5115 2008-06-14 Tobias Grosser <grosser@fim.uni-passau.de>
5117 * graphite.c (print_graphite_bb): Adapt to minimized schedule.
5118 (build_scop_canonical_schedules): Build minimized schedule.
5119 (schedule_to_scattering): Adapt to minimized schedule.
5120 * graphite.h (graphite_bb): Add/Update descriptions.
5122 2008-06-14 Adrien Eliche <aeliche@isty.uvsq.fr>
5123 Tobias Grosser <grosser@fim.uni-passau.de>
5125 * graphite.c (print_graphite_bb): Add condition printing.
5127 (dump_gbb_conditions): New.
5128 (build_scop_conditions_1): New.
5129 (build_scop_conditions): New.
5130 * graphite.h (graphite_bb): Add conditions.
5132 2008-06-14 Tobias Grosser <grosser@fim.uni-passau.de>
5134 * graphite.c (print_graphite_bb):
5135 (free_graphite_bb): New.
5136 (free_scop): Free bbs.
5137 (get_bb_type): Free doms.
5138 (build_scop_context): Free context matrix.
5139 (build_loop_iteration_domains): Remove unused code.
5140 (build_cloog_prog): Free scattering function and blocklist.
5141 (find_transform): Free options.
5143 2008-06-13 Tobias Grosser <grosser@fim.uni-passau.de>
5145 * graphite.c (loop_body_to_cloog_stmts): Rename to add_bb_domains.
5146 Remove unnecessery cloog data structures. Make a copy of the domain
5147 (setup_cloog_loop): Rename to build_loop_iteration_domains. Remove
5148 unnecessary cloog data structures. Fix memory leaks. Remove insert
5149 into SCOP_LOOP2CLOOG_LOOP as the inserted CloogLoops will never be
5151 (build_scop_iteration_domain): Remove unnecessary cloog
5152 data structures. Fix memory leaks.
5153 (graphite_transform_loops): Disable build_scop_dynamic_schedules as it
5154 uses SCOP_LOOP2CLOOG_LOOP, that is at the moment not working.
5156 2008-06-12 Tobias Grosser <grosser@fim.uni-passau.de>
5158 * graphite.c (find_scop_params): Remove initialize_cloog_names.
5160 2008-06-12 Tobias Grosser <grosser@fim.uni-passau.de>
5162 * graphite.c (end_scop): Style fix.
5163 (schedule_to_scattering): Style and comment fix.
5165 2008-06-12 Tobias Grosser <grosser@fim.uni-passau.de>
5166 * graphite.c (print_graphite_bb): Fix definiton of
5167 schedule_to_scattering.
5168 (initialize_cloog_names): Change nb_scattdims to max loop
5170 (schedule_to_scattering): Take parameter for number of scattering
5172 (build_cloog_prog): Only build as much scattering dimensions as
5175 2008-06-12 Tobias Grosser <grosser@fim.uni-passau.de>
5177 * graphite.c (end_scop): Disable bb splitting. Fixes SIGSEGV
5178 in polyhedron/aermod.f90.
5180 2008-06-11 Tobias Grosser <grosser@fim.uni-passau.de>
5181 Dwarak Rajagopal <dwarak.rajagopal@amd.com>
5182 Harsha Jagasia <harsha.jagasia@amd.com>
5184 * graphite.c (is_bb_addable): Fix segfault.
5186 2008-06-10 Tobias Grosser <grosser@fim.uni-passau.de>
5188 * graphite.c (is_bb_addable): Fix memory leak, handling of loops
5189 with multiple exits and conditional handling in edge cases.
5190 (is_loop_exit): Fix memory leak. (Forgotten in last commit)
5192 * testsuite/gcc.dg/graphite/scop-14.c: New.
5194 2008-06-06 Tobias Grosser <grosser@fim.uni-passau.de>
5195 Adrien Eliche <aeliche@isty.uvsq.fr>
5197 * graphite.c (is_bb_addable): Add more comments and enhance
5198 readablity of the source code. Fix memory leak.
5199 (is_loop_exit): Fix memory leak.
5201 2008-06-05 Tobias Grosser <grosser@fim.uni-passau.de>
5203 * graphite.c (first_loop_in_scop): Deleted.
5204 (setup_cloog_loop): Only walk the loop chain for inner loops.
5205 (build_scop_iteration_domain): Execute setup_cloog_loop for
5206 all loops in the first layer.
5208 2008-06-05 Tobias Grosser <grosser@fim.uni-passau.de>
5210 * graphite.c (scan_tree_for_params): Change the way params are
5211 added to be indepenent of the number of loops.
5212 (setup_cloog_loop): Revert to short matrix format. Fix parameter
5214 (build_cloog_prog): Revert to short matrix format.
5216 2008-06-05 Sebastian Pop <sebastian.pop@amd.com>
5217 Dwarak Rajagopal <dwarak.rajagopal@amd.com>
5219 * tree-loop-fusion.c (fuse_loops): Fix uninitialized variable
5222 2008-06-05 Sebastian Pop <sebastian.pop@amd.com>
5224 * graphite.c (nb_data_refs_in_scop): New.
5225 (graphite_transform_loops): Print more stats: number of
5226 loops, basic blocks and data references per scop.
5228 2008-06-04 Sebastian Pop <sebastian.pop@amd.com>
5229 Jan Sjodin <jan.sjodin@amd.com>
5231 * graphite.c (loop_affine_expr, idx_record_params,
5232 find_scop_parameters, setup_cloog_loop): Use instantiate_scev
5233 instead of instantiate_parameters.
5235 2008-06-04 Tobias Grosser <grosser@fim.uni-passau.de>
5237 * graphite.c (schedule_to_scattering): Fix scattering dimensions,
5238 add support for parameters, add STATIC_SCHEDULE at the right places,
5241 2008-06-04 Tobias Grosser <grosser@fim.uni-passau.de>
5243 * graphite.c (build_scop_loop_nests): Only add the loops, that
5244 are contained completely in the SCoP.
5245 (build_cloog_prog): Disable scattering, until schedule_to_scattering
5246 and the domains are fixed.
5247 (build_scop_canonical_schedules): Add support for bbs not contained
5250 2008-06-04 Tobias Grosser <grosser@fim.uni-passau.de>
5252 * graphite.h (scop_contains_loop): Update comments to match
5253 the actual behavior.
5254 (scop_contains_loop): New.
5255 * graphite.c (schedule_to_scattering): Use scop_contains_loop.
5257 2008-06-04 Sebastian Pop <sebastian.pop@amd.com>
5259 * graphite.c (get_bb_type): On function body, i.e. loop_0,
5260 don't mark blocks as GBB_LOOP_SING_EXIT_HEADER, mark them
5263 2008-06-04 Sebastian Pop <sebastian.pop@amd.com>
5264 Tobias Grosser <grosser@fim.uni-passau.de>
5266 * graphite.c (graphite_transform_loops): Early return when
5267 there are no loops in the function.
5269 2008-05-31 Sebastian Pop <sebastian.pop@amd.com>
5270 Jan Sjodin <jan.sjodin@amd.com>
5272 * graphite.c (scan_tree_for_params, setup_cloog_loop): Compute the
5273 offset of the last loop.
5274 (setup_cloog_loop): Copy the entire outer constraint matrix.
5276 2008-05-31 Sebastian Pop <sebastian.pop@amd.com>
5277 Jan Sjodin <jan.sjodin@amd.com>
5279 * graphite.c (stmt_in_scop_p, function_parameter_p,
5280 invariant_in_scop_p): Removed.
5281 (scan_tree_for_params): Can be used with no constraint
5282 matrix for gathering parameters.
5283 (idx_record_params): Don't use idx_record_param, instead use
5284 scan_tree_for_params.
5285 (find_scop_parameters): Same.
5286 (setup_cloog_loop, build_scop_iteration_domain, build_cloog_prog):
5287 Fix the size of loop domains.
5288 (schedule_to_scattering): Exit when the outer loop is not in scop.
5289 (find_transform): Enable build_cloog_prog.
5291 2008-05-31 Sebastian Pop <sebastian.pop@amd.com>
5292 Jan Sjodin <jan.sjodin@amd.com>
5294 * graphite.c (schedule_to_scattering): Make scattering domains
5295 uniformly of the same size, as required by CLooG 0.14.0 and before.
5297 2008-05-31 Sebastian Pop <sebastian.pop@amd.com>
5298 Jan Sjodin <jan.sjodin@amd.com>
5300 * graphite.c (schedule_to_scattering): Rewrite, correct the
5301 translation of the scheduling function to scattering.
5302 (build_cloog_prog): Call schedule_to_scattering only once.
5303 * graphite.h (scop_loop_index): Do not fail for loops not
5304 in the scop: return -1.
5306 2008-05-30 Tobias Grosser <grosser@fim.uni-passau.de>
5308 * graphite.c (build_graphite_bb): Initialize GBB_DOMAIN.
5309 (loop_body_to_cloog_stmts): Export GBB_DOMAIN.
5310 (setup_cloog_loop): Export GBB_DOMAIN.
5311 (build_cloog_prog): New. Create new CLOOG_PROG, which should be
5312 able to rebuild the original control flow.
5313 * graphite.h (graphite_bb): Add domain field and access macro.
5316 2008-05-30 Sebastian Pop <sebastian.pop@amd.com>
5318 * graphite.c (debug_gbb): New.
5319 (print_scop, build_graphite_bb): Use SCOP_BBS.
5320 (build_scop_bbs): Reimplemented.
5321 (dfs_bb_in_scop_p): Removed.
5322 (build_scop_loop_nests): Reorder loops inserted in
5323 SCOP_LOOP_NEST: outer loops should come first.
5324 (build_scop_canonical_schedules): Reinitialize at zero
5325 the components of the SCOP_STATIC_SCHEDULE for the loops
5326 that have already been parsed.
5328 * graphite.h (debug_gbb): Declared.
5330 2008-05-30 Sebastian Pop <sebastian.pop@amd.com>
5331 Jan Sjodin <jan.sjodin@amd.com>
5333 * graphite.c (create_empty_loop): Renamed graphite_create_new_loop.
5334 (graphite_loop_to_gcc_loop): Removed.
5335 (remove_all_edges): New.
5336 (graphite_stmt_to_gcc_stmt): Renamed translate_clast.
5337 (gloog): Remove useless code.
5339 2008-05-29 Tobias Grosser <grosser@fim.uni-passau.de>
5341 * graphite.c (get_bb_type): Reworked. We distinguish between
5342 loops with one or multiple exits.
5343 (is_loop_exit): New.
5345 (is_bb_addable): Rework condition handling, now support for case
5346 case statements and loops with multiple exits.
5348 * testsuite/gcc.dg/graphite/scop-11.c: New.
5349 * testsuite/gcc.dg/graphite/scop-12.c: New.
5350 * testsuite/gcc.dg/graphite/scop-13.c: New.
5352 2008-05-29 Tobias Grosser <grosser@fim.uni-passau.de>
5354 * graphite.c (dot_all_scops_1): Fix some colors. Reuse colors, if
5355 we have too many colors.
5357 2008-05-22 Sandeep Maram <smaram_b04@iiita.ac.in>
5359 * doc/invoke.texi (-ftree-loop-fusion): Document.
5360 * tree-pass.h (pass_loop_fusion): Declared.
5361 * tree-loop-fusion.c: New.
5362 * timevar.def (TV_TREE_LOOP_FUSION): Declared.
5363 * tree-data-ref.c (find_data_references_in_loop): Make extern.
5364 * tree-data-ref.h (find_data_references_in_loop): Declared.
5365 * common.opt (ftree-loop-fusion): Declared.
5366 * Makefile.in (tree-loop-fusion.o): Added rule and to OBJS-common.
5368 2008-05-21 Sebastian Pop <sebastian.pop@amd.com>
5370 * graphite.c (build_access_matrix): Fix typo from the merge.
5372 2008-05-20 Sebastian Pop <sebastian.pop@amd.com>
5374 * Merge from mainline (130800:135673).
5376 2008-05-07 Sebastian Pop <sebastian.pop@amd.com>
5378 * graphite.c (end_scop): The exit of the scop is not part of the scop.
5379 Update dominators after splitting.
5381 2008-05-07 Sebastian Pop <sebastian.pop@amd.com>
5383 * graphite.c (is_bb_addable): Return the harmful statement.
5384 Factor up some code.
5385 (end_scop): New. Splits end of scope bbs on a harmful statement.
5386 (build_scops_1): Call end_scop.
5388 2008-05-07 Sebastian Pop <sebastian.pop@amd.com>
5390 * graphite.c: (succs_at_same_depth, end_scop, all_preds_visited_p,
5391 all_succs_visited_p, start_new_scop_for_each_succ, start_new_scop,
5392 add_dominators_to_open_scops, stop_last_open_scop, scop_end_loop,
5393 build_scops_1): Removed.
5394 (build_scops_2): Renamed build_scops_1.
5396 2008-05-06 Sebastian Pop <sebastian.pop@amd.com>
5398 * graphite.c: Fix formatting.
5400 2008-05-06 Tobias Grosser <grosser@fim.uni-passau.de>
5402 * graphite.c (get_bb_type): New.
5404 (build_scops_2): New.
5405 (is_bb_addable): New.
5406 (build_scops): Switch the scop detection.
5407 (build_scop_bbs): Add entry bb to scop.
5408 * graphite.h (struct scop): Update comment.
5410 2008-05-06 Tobias Grosser <grosser@fim.uni-passau.de>
5412 * graphite.c (dot_all_scops_1): Fix some incorrect colors and add
5415 2008-05-06 Tobias Grosser <grosser@fim.uni-passau.de>
5417 * testsuite/gcc.dg/graphite/scop-1.c: Update.
5418 * testsuite/gcc.dg/graphite/scop-2.c: Update.
5419 * testsuite/gcc.dg/graphite/scop-4.c: Update.
5420 * testsuite/gcc.dg/graphite/scop-5.c: Add.
5421 * testsuite/gcc.dg/graphite/scop-6.c: Add.
5423 2008-05-06 Sebastian Pop <sebastian.pop@amd.com>
5425 * testsuite/gcc.dg/graphite/scop-0.c: Add.
5426 * testsuite/gcc.dg/graphite/scop-7.c: Add.
5427 * testsuite/gcc.dg/graphite/scop-8.c: Add.
5428 * testsuite/gcc.dg/graphite/scop-9.c: Add.
5429 * testsuite/gcc.dg/graphite/scop-10.c: Add.
5431 2008-05-06 Tobias Grosser <grosser@fim.uni-passau.de>
5433 * graphite.c (scop_affine_expr): Renamed to loop_affine_expr.
5434 Check affine expressions depending on the outermost loop
5436 (stmt_simple_for_scop_p): Same.
5437 (harmfule_stmt_in_scop): Same.
5439 2008-04-28 Tobias Grosser <grosser@fim.uni-passau.de>
5441 * graphite.c (dot_all_scops): Remove incorrect difficult bb coloring,
5442 mark entry and exit, that are not part of the SCoP and update HTML
5445 2008-04-25 Sebastian Pop <sebastian.pop@amd.com>
5447 * graphite.c (basic_block_simple_for_scop_p): Renamed
5449 (save_scop, preds_at_same_depth, test_for_scop_bound): Removed.
5450 (add_dominators_to_open_scops, build_scops_1): Reimplemented.
5451 (all_preds_visited_p, all_succs_visited_p,
5452 start_new_scop_for_each_succ, start_new_scop, stop_last_open_scop,
5453 scop_end_loop): New.
5454 (build_scops): Do not use dfs_enumerate_from.
5456 * testsuite/gcc.dg/graphite/scop-{1,2,4}.c: Updated.
5458 2008-04-23 Sebastian Pop <sebastian.pop@amd.com>
5460 * graphite.c: Add comments to functions that are missing a
5462 (graphite_create_iv): Removed. Merged in graphite_loop_to_gcc_loop.
5464 2008-04-23 Sebastian Pop <sebastian.pop@amd.com>
5466 * graphite.c (nb_params_in_scop): Moved...
5467 (graphite_bb_from_bb, loop_body_to_cloog_stmts): New.
5468 (setup_cloog_loop): Call loop_body_to_cloog_stmts.
5469 (clast_to_gcc_expression): Reduce column size to less than 80.
5470 (graphite_create_iv): Return the new name of the IV.
5471 (find_transform): Set options->esp and options->cpp.
5472 (gloog): Comment out the invalidation of the old loop code.
5473 (initialize_dependence_polyhedron): Replace scop_nb_params with
5476 * graphite.h (nb_params_in_scop): ... here.
5477 (scop_nb_params): Removed.
5478 (loop_domain_dim): Return something even when the loop was not
5479 found in the hash table: avoid ICEing on all the graphite.exp
5482 2008-04-14 Konrad Trifunovic <konrad.trifunovic@inria.fr>
5484 * tree-chrec.c (for_each_scev_op): SCEV can have 3 operands.
5486 * graphite.c (build_scop_dynamic_schedules): Schedule is built
5487 according to nesting level.
5488 (find_scop_parameters): Call instantiate_parameters.
5489 (scan_tree_for_params): Extend it to handle general affine bounds.
5490 Inner loop bound can depend on outer loop induction variable.
5491 (setup_cloog_loop): tmp variable is allocated on stack. Call
5492 instantiate_parameters with respect to outermost_loop_in_scop.
5493 (loop_domain_dim, ref_nb_loops, loop_iteration_vector_dim): moved to
5495 (create_empty_loop): Function loopify should be given edge
5496 probability, instead of edge frequency. Dominance relation from
5497 switch_bb to loop_header.
5498 (clast_to_gcc_expression): Added handling of clast_reduction node.
5499 (gloog): New functionality for removing old loop.
5500 (test_dependence): Factored out from build_rdg_all_levels.
5501 (build_rdg_all_levels): Dependence testing factored out to
5502 test_dependence function.
5504 * graphite.h (struct graphite_bb): Extended with dynamic_schedule.
5505 (loop_domain_dim, ref_nb_loops, loop_iteration_vector_dim): Moved
5508 2008-04-07 Sebastian Pop <sebastian.pop@amd.com>
5510 * graphite.c (free_scop, param_index, initialize_cloog_names,
5511 nb_params_in_scop): Use name_tree map instead of just a tree
5512 for keeping track of the variable name associated to that tree.
5513 (create_empty_loop, gmp_cst_to_tree, clast_name_to_gcc,
5514 clast_to_gcc_expression, graphite_create_iv,
5515 graphite_loop_to_gcc_loop, graphite_cond_to_gcc_cond,
5516 graphite_stmt_to_gcc_stmt): New.
5517 (gloog): Call these.
5518 * graphite.h (struct name_tree): New.
5519 (struct scop): Use name_tree instead of tree for params.
5520 Store a vector of name_tree for new_ivs.
5522 (scop_nb_params): Use name_tree instead of tree.
5524 2008-04-05 Alexander Lamaison <awl03@doc.ic.ac.uk>
5525 Sebastian Pop <sebastian.pop@amd.com>
5527 * tree-bounds.c: New.
5528 * tree-bounds.h: New.
5529 * tree-pass.h: Declare pass_bounds_early and pass_bounds_late.
5530 * passes.c: Schedule pass_bounds_early, pass_bounds_late.
5531 * builtins.c (expand_builtin_alloca): Add flag_bounds as for
5535 * c-cppbuiltin.c: Same.
5539 * tree-outof-ssa.c: Same.
5541 * Makefile.in: Same.
5543 2008-03-15 Antoniu Pop <antoniu.pop@gmail.com>
5544 Sebastian Pop <sebastian.pop@amd.com>
5546 * tree-loop-distribution.c (remaining_stmts,
5547 upstream_mem_writes): Removed static variables.
5548 (copy_loop_before, create_bb_after_loop,
5549 mark_nodes_having_upstream_mem_writes, free_rdg_components,
5550 rdg_build_components, rdg_build_partitions,
5551 dump_rdg_partitions): Extern.
5552 (generate_loops_for_partition, generate_code_for_partition): Do not
5554 (already_processed_vertex_p, predecessor_has_mem_write,
5555 mark_nodes_having_upstream_mem_writes, has_upstream_mem_writes,
5556 rdg_flag_all_uses, rdg_flag_uses, rdg_flag_vertex_and_dependent,
5557 rdg_flag_loop_exits, rdg_flag_similar_memory_accesses,
5558 build_rdg_partition_for_component, rdg_build_partitions, ldist_gen):
5559 Pass remaining_stmts and upstream_mem_writes as parameters.
5560 (rdg_component): Moved...
5561 (build_rdg_partition_for_component): Do not aggregate components when
5562 flag_streamize_loops is set.
5563 (gen_sequential_loops): New.
5564 (ldist_gen): Call gen_sequential_loops.
5566 * tree-pass.h (pass_loop_streamization): Declared.
5568 * omp-low.c (expand_omp_sections): Call add_bb_to_loop on created
5569 basic blocks when loops structures exist.
5571 * builtin-types.def (BT_FN_VOID_PTR_PTR_INT): New.
5573 * tree-ssa-loop-ivopts.c (expr_invariant_in_region_p): New.
5575 * tree-parloops.c (take_address_of, eliminate_local_variables_1,
5576 eliminate_local_variables_stmt, eliminate_local_variables,
5577 separate_decls_in_loop_name, separate_decls_in_loop_stmt,
5578 separate_decls_in_loop, gen_parallel_loop): Make them work on a region
5579 of code delimited by two edges in the CFG.
5580 (separate_decls_in_loop_name): Renamed separate_decls_in_region_name.
5581 (separate_decls_in_loop_stmt): Renamed separate_decls_in_region_stmt.
5582 (separate_decls_in_loop): Renamed separate_decls_in_region. Isolate
5583 the case of parallelisation of reductions.
5584 (create_loop_fn): Extern.
5585 (create_omp_parallel_region): New.
5587 * tree-data-ref.c (dump_data_dependence_relation): Don't call
5588 dump_data_reference for printing dra and drb.
5589 (create_rdg_edge_for_ddr, create_rdg_edges_for_scalar): Initialise
5591 (build_rdg): Don't call free_dependence_relations for the moment, as
5592 we attach dependence relations on each edge of the RDG.
5595 * tree-data-ref.h (rdg_component): ...here.
5596 (struct rdg_edge): New field ddr_p relation.
5597 (RDGE_RELATION): New.
5598 (create_bb_after_loop, copy_loop_before,
5599 mark_nodes_having_upstream_mem_writes, rdg_build_components,
5600 rdg_build_partitions, dump_rdg_partitions,
5601 free_rdg_components): Declared.
5603 * omp-builtins.def (BUILT_IN_GOMP_STREAM_ALIGN_PUSH,
5604 BUILT_IN_GOMP_STREAM_ALIGN_POP): New.
5606 * tree-loop-streamization.c: New.
5608 * tree-flow.h (gather_blocks_in_sese_region, create_loop_fn,
5609 create_omp_parallel_region, expr_invariant_in_region_p): Declared.
5611 * Makefile.in (tree-loop-streamization.o): Added to OBJS-common.
5613 * tree-cfg.c (gather_blocks_in_sese_region): Extern.
5615 * passes.c: Schedule pass_loop_streamization.
5617 2008-03-08 Tobias Grosser <grosser@fmi.uni-passau.de>
5619 * graphite.c (dot_all_scops_1): Fix formatting for difficult bbs and
5622 2008-03-07 Tobias Grosser <grosser@fim.uni-passau.de>
5624 * graphite.c (dot_all_scops): Update formatting.
5625 Bbs can now be part of more than one SCoP.
5627 2008-03-04 Sebastian Pop <sebastian.pop@amd.com>
5629 * graphite.c (new_loop_to_cloog_loop_str, setup_cloog_loop): Fix
5631 (loop_domain_dim): Check for unregistered toplev SCOP loop.
5632 * graphite.h (loop_to_cloog_loop): New.
5634 2008-03-04 Konrad Trifunovic <konrad.trifunovic@inria.fr>
5636 * graphite.c (loop_domain_dim, ref_nb_loops,
5637 loop_iteration_vector_dim): New.
5638 (build_access_matrix_with_af, build_access_matrix,
5639 initialize_dependence_polyhedron): Fixed for new matrix layout.
5640 No longer assume that all iteration domains are of the same
5643 2008-03-02 Sebastian Pop <sebastian.pop@amd.com>
5645 * tree-scalar-evolution.c (instantiate_parameters_1): An SSA_NAME
5646 defined in a loop at depth 0 is invariant.
5647 * tree-chrec.c (evolution_function_is_invariant_rec_p): Ditto.
5648 * tree-ssa-loop-ivopts.c (expr_invariant_in_loop_p): Should never
5649 be called at loop depth 0.
5651 * graphite.c (basic_block_simple_for_scop_p): Take the scop as
5653 (dot_all_scops_1): Update use of basic_block_simple_for_scop_p.
5654 (down_open_scop): Removed.
5655 (loop_in_scop_p): Redefined.
5656 (scop_affine_expr): New argument: scop.
5657 (stmt_simple_for_scop_p): New argument: scop. RETURN_EXPR is not
5658 a harmful statement ending a scop.
5659 (basic_block_simple_for_scop_p): New argument: scop.
5660 (get_loop_start): Removed.
5661 (new_scop): Initialize SCOP_LOOPS.
5662 (free_scop): Free SCOP_LOOPS.
5663 (succs_at_same_depth, preds_at_same_depth): New.
5664 (end_scop): Test the validity of a scop.
5665 (add_dominators_to_open_scops): New.
5666 (test_for_scop_bound): Call add_dominators_to_open_scops.
5667 Add cases for opening and closing multiple scops.
5668 (build_scops, build_scop_bbs): Iterate over basic blocks in
5670 (build_graphite_bb): Pass scop directly.
5671 (dfs_bb_in_scop_p): New.
5672 (scop_record_loop): Use SCOP_LOOPS for not recording the same loop
5674 (nb_loops_around_gb): Use loop_in_scop_p.
5675 (schedule_to_scattering): Disabled for the moment the code computing
5676 the "textual order for outer loop".
5678 * graphite.h (struct scop): New field loops.
5680 (scop_loop_index): Test that the given loop belongs to SCOP_LOOPS.
5682 * testsuite/gcc.dg/graphite/scop-{1,...,7}.c: Updated.
5684 2008-02-27 Antoniu Pop <antoniu.pop@gmail.com>
5685 Sebastian Pop <sebastian.pop@amd.com>
5687 * builtin-types.def (BT_FN_PTR_SIZE_UINT, BT_FN_BOOL_PTR): New.
5688 * common.opt (fstreamize-loops): New.
5689 * omp-builtins.def (BUILT_IN_GOMP_STREAM_CREATE,
5690 BUILT_IN_GOMP_STREAM_PUSH, BUILT_IN_GOMP_STREAM_HEAD,
5691 BUILT_IN_GOMP_STREAM_POP, BUILT_IN_GOMP_STREAM_EOS_P,
5692 BUILT_IN_GOMP_STREAM_SET_EOS, BUILT_IN_GOMP_STREAM_DESTROY): New.
5694 2008-02-22 Konrad Trifunovic <konrad.trifunovic@inria.fr>
5696 * tree-data-ref.c (build_empty_rdg): New.
5697 (build_rdg): Use it.
5698 * tree-data-ref.h (build_empty_rdg): Declared.
5699 * graphite.c (free_scop): Free SCOP_LOOP2CLOOG_LOOP.
5700 (find_vertex_for_stmt): Removed.
5701 (build_rdg_all_levels): Use build_empty_rdg and rdg_vertex_for_stmt.
5703 2008-02-21 Sebastian Pop <sebastian.pop@amd.com>
5705 * tree-loop-distribution.c (generate_builtin): After cancelling the
5706 loop tree, also delete basic blocks.
5707 (rdg_flag_uses): Stop recursion when a vertex has already been
5710 2008-02-15 Konrad Trifunovic <konrad.trifunovic@inria.fr>
5712 * graphite.c (build_scop_alpha): Removed.
5713 (graphite_transform_loops): Add a dummy call to build_all_rdg_levels
5714 and dump_dependence_graph to avoid compiler warnings.
5716 2008-02-14 Konrad Trifunovic <konrad.trifunovic@inria.fr>
5718 * tree-data-ref.c (dr_may_alias_p, create_rdg_vertices): Extern.
5719 * tree-data-ref.h (dr_may_alias_p, create_rdg_vertices): Declared.
5720 * graphite.c (new_loop_to_cloog_loop_str, hash_loop_to_cloog_loop,
5721 eq_loop_to_cloog_loop, del_loop_to_cloog_loop): New.
5722 (new_scop, setup_cloog_loop): Initialize SCOP_LOOP2CLOOG_LOOP.
5723 (initialize_dependence_polyhedron, find_vertex_for_stmt,
5724 initialize_data_dependence_polyhedron, is_empty_polyhedron,
5725 statement_precedes_p, build_rdg_all_levels, build_scop_alpha,
5726 dump_dependence_graph): New.
5727 * graphite.h (struct graphite_bb): New field compressed_alpha_matrix.
5729 (struct scop): New field loop2cloog_loop.
5730 (SCOP_LOOP2CLOOG_LOOP, struct data_dependence_polyhedron,
5731 RDGE_DDP, ddp_p, struct loop_to_cloog_loop_str): New.
5733 2008-02-10 Konrad Trifunovic <konrad.trifunovic@inria.fr>
5735 * graphite.c (build_graphite_bb): Fix initialization
5736 of the graphite basic block.
5738 2008-02-05 Sebastian Pop <sebastian.pop@amd.com>
5740 * graphite.c (scan_tree_for_params): Rewrite for the new layout of
5741 loop domain matrix. Pass in the number of loops contained in the
5743 (nb_loops_around_gb): Moved before setup_cloog_loop that uses it.
5744 (setup_cloog_loop): Rewrite for the new layout of loop domain matrix:
5745 loops that are not surrounding the current loop are not represented
5746 in the domain constraint matrix.
5747 (build_scop_iteration_domain): Initial domain constraint matrix
5748 contains only the eq/ineq, cst, and scop parameters columns.
5750 2008-01-29 Tobias Grosser <grosser@fim.uni-passau.de>
5752 * graphite.c (schedule_to_scattering, nb_loops_around_gb): New.
5753 (print_graphite_bb): Print scattering.
5755 2008-01-29 Tobias Grosser <grosser@fim.uni-passau.de>
5757 * graphite.c (initialize_cloog_names): Initialize names of
5758 scattering variables.
5760 2009-01-29 Tobias Grosser <grosser@fim.uni-passau.de>
5762 * graphite.c (dot_all_scops_1): Disable debug output while
5765 2008-01-29 Tobias Grosser <grosser@fim.uni-passau.de>
5767 * graphite.c (find_transform): Change cloog output language to C.
5769 2008-01-27 Sebastian Pop <sebastian.pop@amd.com>
5771 * tree-loop-distribution.c (generate_memset_zero,
5772 generate_builtin, generate_code_for_partition,
5773 rdg_flag_all_uses): New.
5774 (rdg_flag_uses): Gather in the same partition the statements defining
5775 the VUSES of the current statement.
5776 (rdg_flag_similar_stores): Renamed rdg_flag_similar_memory_accesses.
5777 Gather in the same partition not only the stores to the same memory
5778 access, but also the reads.
5779 (ldist_generate_loops): Renamed ldist_gen.
5781 2008-01-24 Sebastian Pop <sebastian.pop@amd.com>
5782 Tobias Grosser <grosser@fmi.uni-passau.de>
5784 * graphite.c (setup_cloog_loop): Chain all cloog loops with the
5785 next pointer, don't use the inner pointer.
5787 2008-01-20 Tobias Grosser <grosser@fmi.uni-passau.de>
5789 * graphite.c (dot_all_scops, dot_all_scops_1): New.
5790 (find_transform): Call dot_all_1.
5791 * graphite.h (dot_all_scops): Declared.
5793 2007-12-14 Sebastian Pop <sebastian.pop@amd.com>
5795 * tree-loop-distribution.c: Fix apsi.f ICE.
5796 (create_bb_after_loop): New.
5797 (generate_loops_for_partition): Use it.
5798 * testsuite/gfortran.dg/ldist-1.f90: New.
5800 * tree-data-ref.c (dot_rdg): Use /tmp/rdg.dot for dotty format.
5801 * graphite.c (dot_scop): Use /tmp/scop.dot for dotty format.
5803 2007-12-13 Tobias Grosser <grosser@fmi.uni-passau.de>
5805 * graphite.c (find_transform): Dump cloog program sent to cloog.
5807 2007-12-13 Tobias Grosser <grosser@fmi.uni-passau.de>
5809 * graphite.c (initialize_cloog_names): Initialize cloog
5812 2007-12-13 Tobias Grosser <grosser@fmi.uni-passau.de>
5814 * graphite.c (build_scop_context): Fix typo, for the matrix
5815 format: insert '0 >= 0' instead of '-1 >= 0'.
5817 2007-12-13 Sebastian Pop <sebastian.pop@amd.com>
5819 * Fix merge problems.
5821 2007-12-13 Sebastian Pop <sebastian.pop@amd.com>
5823 * graphite.c (setup_cloog_loop): Fix typo.
5825 2007-12-12 Sebastian Pop <sebastian.pop@amd.com>
5827 * doc/invoke.texi (-ftree-loop-distribution): Documented.
5828 * tree-loop-distribution.c: Reimplemented.
5829 * tree-pass.h (pass_loop_distribution): New.
5830 * tree-scalar-evolution.c (number_of_iterations_for_all_loops): Use
5832 * graphds.h (struct graph): New field indexes.
5833 * timevar.def (TV_TREE_LOOP_DISTRIBUTION): New.
5835 * tree-vect-analyze.c: Remove declaration of static functions when not
5837 * tree-vectorizer.c: Same.
5838 (rename_variables_in_loop): Now extern.
5839 (slpeel_tree_duplicate_loop_to_edge_cfg): Renamed
5840 tree_duplicate_loop_to_edge_cfg. Reset PENDING_STMT for edges after
5841 calling redirect_edge_and_branch_force.
5843 * tree-vectorizer.h (tree_duplicate_loop_on_edge): Declared.
5845 * tree-data-ref.c: Don't include tree-chrec.h.
5846 (debug_data_dependence_relations): New.
5847 (dump_data_dependence_relation): Call dump_data_reference on data refs
5849 (same_access_functions): Moved...
5850 (find_vertex_for_stmt): Renamed rdg_vertex_for_stmt.
5851 (dump_rdg_vertex, debug_rdg_vertex, dump_rdg_component,
5852 debug_rdg_component, dump_rdg, debug_rdg, dot_rdg_1, dot_rdg,
5853 struct rdg_vertex_info, ): New.
5854 (create_rdg_edge_for_ddr): Compute the dependence level before looking
5856 (create_rdg_vertices): Initialize the htab of graph->indexes.
5857 Initialize RDG_MEM_WRITE_STMT and RDG_MEM_READS_STMT.
5858 (stmts_from_loop): Don't save LABEL_EXPR.
5859 (hash_stmt_vertex_info, eq_stmt_vertex_info,
5860 hash_stmt_vertex_del): New.
5861 (build_rdg): Initialize rdg->indexes.
5862 (free_rdg, stores_from_loop, ref_base_address,
5863 rdg_defs_used_in_other_loops_p, have_similar_memory_accesses,
5864 have_similar_memory_accesses_1, ref_base_address_1,
5865 remove_similar_memory_refs): New.
5867 * tree-data-ref.h: Include tree-chrec.h.
5868 (debug_data_dependence_relations): Declared.
5869 (same_access_functions): ...here. Now static inline.
5870 (ddr_is_anti_dependent, ddrs_have_anti_deps,
5871 ddr_dependence_level): New.
5872 (struct rdg_vertex): New fields has_mem_write, has_mem_reads.
5873 (RDGV_HAS_MEM_WRITE, RDGV_HAS_MEM_READS, RDG_STMT, RDG_MEM_WRITE_STMT,
5874 RDG_MEM_READS_STMT): New.
5875 (dump_rdg_vertex, debug_rdg_vertex, dump_rdg_component,
5876 debug_rdg_component, dump_rdg, debug_rdg, dot_rdg,
5877 rdg_vertex_for_stmt): Declared.
5878 (struct rdg_edge): New field level.
5879 (RDGE_LEVEL, free_rdg): New.
5880 (stores_from_loop, remove_similar_memory_refs,
5881 rdg_defs_used_in_other_loops_p,
5882 have_similar_memory_accesses): Declared.
5883 (rdg_has_similar_memory_accesses): New.
5885 * lambda.h (dependence_level): New.
5886 * common.opt (ftree-loop-distribution): New.
5887 * tree-flow.h (debug_loop_ir): Renamed debug_loops.
5888 (print_loop_ir): Renamed print_loops.
5889 (debug_loop, debug_loop_num, print_loops_bb, mark_virtual_ops_in_bb,
5890 tree_duplicate_loop_to_edge_cfg, rename_variables_in_loop): Declared.
5891 * Makefile.in (TREE_DATA_REF_H): Depends on tree-chrec.h.
5892 (tree-loop-distribution.o): Added.
5893 * tree-cfg.c (mark_virtual_ops_in_region): Use mark_virtual_ops_in_bb.
5894 (mark_virtual_ops_in_bb): New.
5895 (print_loops_bb, debug_loop_num, debug_loop): New.
5896 * passes.c: Scheduled pass_loop_distribution.
5898 2007-12-12 Konrad Trifunovic <konrad.trifunovic@inria.fr>
5900 * graphite.c (scan_tree_for_params): Correct the number of columns
5902 (nb_flat_iterator): New.
5903 (setup_cloog_loop): Initialize to 1 the first column for inequalities.
5904 (build_scop_iteration_domain): Correct the number of columns for
5907 2007-12-12 Sebastian Pop <sebastian.pop@amd.com>
5909 * Merge from mainline (129697:130800).
5911 2007-10-30 Sebastian Pop <sebastian.pop@amd.com>
5913 * graphite.c (build_graphite_bb): SCoP's basic blocks are post
5914 dominated by SCoP's exit.
5915 (graphite_transform_loops): Compute post dominators.
5917 2007-10-28 Sebastian Pop <sebastian.pop@amd.com>
5919 * Merge from mainline (127169:129697).
5921 2007-10-28 Sebastian Pop <sebastian.pop@amd.com>
5923 * graphite.c (affine_expr): Renamed scop_affine_expr. Use an extra
5924 parameter for the basic block that contains the expression. Use
5925 outermost_loop_in_scop for evolution_function_is_affine_multivariate_p.
5926 (stmt_simple_for_scop_p): Pass to scop_affine_expr the basic block of
5928 * graphite.h (gbb_loop): New.
5929 (GBB_LOOP): Removed.
5931 2007-08-03 Sebastian Pop <sebpop@gmail.com>
5933 * Makefile.in: Fix merge problem.
5935 2007-08-03 Sebastian Pop <sebpop@gmail.com>
5937 * Merge from mainline (125309:127169).
5938 * tree-loop-distribution.c: Disabled.
5940 2007-06-05 Sebastian Pop <sebpop@gmail.com>
5942 * Merge from mainline (r123693:125309).
5944 2007-05-30 Sebastian Pop <sebpop@gmail.com>
5946 * tree-loop-distribution.c (correct_modify_expr_p): Renamed
5948 (correct_modify_p, check_statements, number_of_lvalue_uses,
5949 number_of_scalar_dependences, create_edges): Use GIMPLE_MODIFY_STMT
5950 instead of MODIFY_EXPR.
5951 (update_edge_with_ddv): Don't pass index_of_edge. Initialize
5954 2007-05-24 Sebastian Pop <sebpop@gmail.com>
5956 * tree-loop-distribution.c (struct rdg): Replace arrays by
5957 VECs for edges and vertices.
5958 (RDG_NBV, RDG_NBE, RDG_VERTEX, RDG_EDGE): Removed.
5959 (RDGV_NB_PARTITIONS): New.
5960 (PRDG_NBV, PRDG_NBE): Removed.
5961 (build_scc_graph, correct_partitions_p, mark_partitions, build_prdg,
5962 dump_rdg, find_vertex_with_stmt, create_vertices, free_rdg,
5963 number_of_scalar_dependences, create_edges, build_rdg): Use VECs.
5965 2007-05-17 Georges-Andre Silber <silber@cri.ensmp.fr>
5966 Sebastian Pop <sebpop@gmail.com>
5968 * doc/invoke.texi (-ftree-loop-distribution): Document.
5969 * tree-loop-distribution.c: New file.
5970 * tree-pass.h (pass_loop_distribution): Declared.
5971 * timevar.def (TV_TREE_LOOP_DISTRIBUTION): New.
5972 * tree-data-ref.c (initialize_data_dependence_relation): Initialize
5974 * tree-data-ref.h (data_dependence_relation): Add reversed_p.
5975 (DDR_REVERSED_P): New.
5976 * common.opt (-ftree-loop-distribution): New.
5977 * tree-flow.h (distribute_loops): Declared.
5978 * Makefile.in (OBJS-common): Depend on tree-loop-distribution.o.
5979 * passes.c (init_optimization_passes): Schedule loop distribution.
5981 2007-05-12 Sebastian Pop <sebastian.pop@inria.fr>
5983 * graphite.c (print_graphite_bb): Don't call dump_data_references.
5984 (print_scop): Don't print when scop is NULL.
5985 (build_scop_context, find_transform): Don't output to stderr.
5987 2007-05-09 Sebastian Pop <sebastian.pop@inria.fr>
5989 * tree-data-ref.c: Don't include graphite.h.
5990 Comment out the code for printing data reference's scop.
5991 (build_access_matrix_with_af): Moved...
5992 * tree-data-ref.h (build_access_matrix_with_af): Removed declaration.
5993 * graphite.c (build_access_matrix_with_af): ... here. Now static.
5994 (print_graphite_bb): Print basic block's schedule.
5995 (print_scop): Don't print the schedule, call cloog's pretty printer.
5996 (bb_in_scop_p): A basic block is in a scop only if it is both
5997 dominated and postdominated by the scop's entry and exit basic blocks.
5998 (function_parameter_p): New.
5999 (invariant_in_scop_p): Use function_parameter_p.
6000 (new_scop, save_scop): New.
6001 (end_scop, test_for_scop_bound, build_scops): Use new_scop, and
6003 (scan_tree_for_params): Directly build the constraint as CloogMatrix.
6004 (loop_in_scop_p): New.
6005 (scop_record_loop): Use loop_in_scop_p.
6006 (build_scop_domain): Renamed build_scop_iteration_domain.
6007 (setup_cloog_loop, initialize_cloog_names, find_scop_parameters,
6008 nb_params_in_scop, build_scop_context, first_loop_in_scop,
6009 setup_cloog_loop, dot_scop_1, dot_scop): New.
6010 * graphite.h (GBB_LOOP, SCOP_PROG, dot_scop): New.
6011 (struct scop): Add a pointer to cloog's representation of a program.
6013 2007-04-14 Sebastian Pop <sebastian.pop@inria.fr>
6015 * doc/invoke.texi (-ftree-check-verbose): Renamed
6016 -ftree-checks-verbose.
6017 * common.opt (flag_tree_check_verbose): Renamed
6018 flag_tree_checks_verbose.
6019 * tree-check.c (tree_check_warning): Use flag_tree_checks_verbose.
6021 2007-04-14 Sebastian Pop <sebastian.pop@inria.fr>
6023 * configure: Regenerated.
6024 * config.in: Regenerated.
6025 * tree-ssa-loop.c (graphite_transforms): Execute
6026 graphite_transform_loops only when HAVE_cloog.
6027 * configure.ac (HAVE_polylib, HAVE_cloog, GRAPHITE): Defined.
6028 * graphite.c: Include polylibgmp.h and cloog.h.
6029 (graphite_transform_loops): Removed loops parameter.
6030 * tree-flow.h (graphite_transform_loops): Update declaration.
6031 * Makefile.in (POLYLIBLIBS, POLYLIBINC, CLOOGLIBS, CLOOGINC): New.
6032 (LIBS): Depend on CLOOGLIBS and on POLYLIBLIBS.
6033 (INCLUDES): Depend on POLYLIBINC and on CLOOGINC.
6034 (OBJS-common): Remove dependence on graphite.o.
6035 (BACKEND): Depend on @GRAPHITE@.
6037 2007-04-13 Sebastian Pop <sebastian.pop@inria.fr>
6039 * doc/invoke.texi (-ftree-check-verbose): Documented.
6040 * testsuite/gcc.dg/tree-checker/tree-checks-1.c: New.
6041 * testsuite/gcc.dg/tree-checker/tree-checks-2.c: New.
6042 * testsuite/gcc.dg/tree-checker/tree-checks-3.c: New.
6043 * testsuite/gcc.dg/tree-checker/tree-checks-4.c: New.
6044 * testsuite/gcc.dg/tree-checker/tree-checks.exp: New.
6045 * testsuite/gcc.dg/tree-checker/condates.crp: New.
6046 * common.opt (ftree-checks-verbose): New.
6047 * tree-check.c (tree_check_warning): Move extra stderr output
6048 under control of flag_tree_check_verbose.
6050 2007-04-12 Sebastian Pop <sebastian.pop@inria.fr>
6052 * tree-match.c: Fix comments formatting.
6053 * tree-match.h: Fix comments formatting.
6054 * tree-check.c: Fix comments formatting.
6055 (tree_check_init): Restructure.
6057 2007-04-12 Nic Volanschi <nic.volanschi@free.fr>
6059 * doc/invoke.texi (-ftree-check, -ftree-checks): Documented.
6061 2007-04-10 Sebastian Pop <sebastian.pop@inria.fr>
6063 * Merge from mainline (r120733:123693).
6065 2007-03-20 Nic Volanschi <nic.volanschi@free.fr>
6067 * condate.y: New file.
6068 * tree-match.h (struct patt_info_s): New field sign.
6069 (struct condate_s): New field msg.
6070 (normalize_condate, name_condate, add_condate): New.
6071 (conds[], condate_parse): Made extern.
6072 * tree-check.c (tree_check_warning): First arg changed to cond;
6073 warning reformatted.
6074 (tree_check_init): Reset the TREE_VISITED bit on every CFG node.
6076 (tree_check): Process trivial condates.
6077 (read_delimited_string): Removed.
6078 (print_cond): Print name and msg.
6079 (conds[]): Made extern.
6080 (parse_tree_check_file_once): Rewritten to use the parser in
6082 Processing of option --tree_check_string moved to tree_scan().
6083 * Makefile.in: Added condate.y
6085 2007-03-12 Sebastian Pop <sebastian.pop@inria.fr>
6087 * tree-pretty-print.c (dump_generic_bb_buff, lazy_dump_generic_node):
6088 Use VECs instead of varrays.
6089 * diagnostic.h (lazy_dump_generic_node): Update declaration.
6090 * Makefile.in (pretty-print.o): Depend on vec.h.
6091 * pretty-print.c: Include tree.h and vec.h.
6092 (pp_clear_state, pp_write_list_to_stream, pp_base_format,
6093 pp_base_format, pp_construct, pp_base_string, pp_lazy_mode,
6094 new_tree_chunk, pp_add_tree, pp_add_string, pp_add_char, pp_write_list,
6095 pp_free_list): Use VECs instead of varrays.
6096 * pretty-print.h: Do not include varray.h.
6097 (struct tree_chunk_s): Declaration moved before its use.
6098 (output_buffer): Rename varray field to chunks.
6099 * tree-match.c (tree_equal, chunk_1st_char, chunks_lookahead,
6100 tree_1st_char, match_chunks_pattinfo, match_tree_pattinfo,
6101 save_global_holes): Use VECs instead of varrays.
6102 * tree-match.h: Declare VECs of cfg_node, and hole_p.
6103 * tree-check.c (scan_cfg_stmts, push_node,
6104 print_matching_stmt): Removed.
6105 (tree_check_instance, push_global_holes_if_new, tree_check,
6106 execute_tree_check): Use VECs instead of varrays.
6107 (gate_tree_check): Don't execute the CFG check when basic_block_info
6110 2007-01-12 Sebastian Pop <sebastian.pop@inria.fr>
6112 * Merge from mainline (r115016:120733).
6114 2007-01-12 Sebastian Pop <sebastian.pop@inria.fr>
6116 * Merge from mainline (r117632:117661).
6118 2007-01-12 Sebastian Pop <sebastian.pop@inria.fr>
6120 * tree-dump.c (dump_option_value_in): Add TDF_DEBUG.
6121 * tree-pass.h (TDF_DEBUG, debug_p): New.
6122 * tree-scalar-evolution.c (set_scalar_evolution, get_scalar_evolution,
6123 get_scalar_evolution, add_to_evolution, set_nb_iterations_in_loop,
6124 get_loop_exit_condition, analyze_evolution_in_loop,
6125 analyze_initial_condition, analyze_scalar_evolution,
6126 instantiate_parameters, number_of_latch_executions): Use debug_p.
6127 * tree-chrec.c (chrec_apply): Use debug_p.
6128 * tree-data-ref.c: Include graphite.h.
6129 (dump_data_reference): Print also the access matrix.
6130 (analyze_array, analyze_indirect_ref, init_data_ref,
6131 analyze_offset_expr, address_analysis, object_analysis,
6132 create_data_ref, finalize_ddr_dependent,
6133 non_affine_dependence_relation, analyze_ziv_subscript,
6134 analyze_siv_subscript_cst_affine,
6135 compute_overlap_steps_for_affine_1_2, analyze_subscript_affine_affine,
6136 can_use_analyze_subscript_affine_affine, analyze_siv_subscript,
6137 analyze_miv_subscript, analyze_overlapping_iterations,
6138 build_classic_dist_vector, subscript_dependence_tester,
6139 compute_affine_dependence, analyze_all_data_dependences): Use debug_p.
6140 (build_access_matrix_with_af): No longer static.
6141 * tree-data-ref.h (scop_p): ... declaration here.
6142 (data_reference.scop): New field.
6143 (DR_SCOP, DR_ACCESS_MATRIX): New.
6144 (build_access_matrix_with_af, dr_num_subscripts): Declared.
6145 * graphite.c (print_graphite_bb): Call dump_data_references.
6146 (print_scop): Use scop_nb_loops and scop_dim_domain.
6147 (test_for_scop_bound): Use debug_p.
6148 (scan_tree_for_params): Use scop_nb_loops, scop_nb_loops and
6150 (scop_loop_index): Moved...
6151 (scop_record_loop): New.
6152 (build_scop_loop_nests): Use scop_record_loop.
6153 (build_scop_domain): Use scop_dim_domain.
6154 (build_access_matrix): Implemented.
6155 (build_scop_canonical_schedules): Use scop_nb_loops.
6156 (build_graphite_bb): Initialize GBB_SCOP.
6157 * graphite.h (scop_p): Moved...
6158 (graphite_bb.scop): New field.
6159 (graphite_bb.iteration_domain, GBB_DOMAIN, scop.nb_params,
6160 scop.nb_loops, scop.dim_domain, SCOP_NB_LOOPS, SCOP_NB_PARAMS,
6161 SCOP_DIM_DOMAIN, SCOP_STMTS): Removed.
6162 (scop_nb_params, scop_nb_loops, scop_dim_domain, gbb_dim_domain,
6163 scop_loop_index): New.
6164 * Makefile.in (tree-data-ref.o): Depends on graphite.h.
6166 2007-01-05 Sebastian Pop <sebastian.pop@inria.fr>
6168 * Merge from mainline (r117661:120450).
6170 2006-10-12 Sebastian Pop <sebastian.pop@inria.fr>
6172 * tree-scalar-evolution.c (instantiate_parameters_1): Don't stop
6173 at the first declaration outside the varying loop, instantiate as
6175 * tree-chrec.c (for_each_scev_op): New.
6176 * tree-chrec.h (for_each_scev_op): Declared.
6177 * tree-ssa-loop.c (pass_graphite_trans): Don't dump the function.
6178 * tree-data-ref.c (get_references_in_stmt,
6179 find_data_references_in_stmt): New, from trunk.
6180 (find_data_references_in_loop): Use get_references_in_stmt
6181 and find_data_references_in_loop, modified as in trunk.
6182 (build_access_matrix_with_af): New.
6183 * tree-data-ref.h (data_reference): Add a field access_matrix.
6184 (data_ref_loc): New, as in trunk.
6185 * graphite.c (print_graphite_bb, bb_in_scop_p, stmt_in_scop_p,
6186 invariant_in_scop_p, param_index, scan_tree_for_params,
6187 scop_loop_index, build_scop_loop_nests, build_scop_domain, irp_data,
6188 idx_record_param, idx_record_params, build_access_matrix,
6189 build_scop_data_accesses, build_scop_canonical_schedules,
6190 build_graphite_bb, build_scop_bbs, find_params_in_bb,
6191 build_scop_params): New.
6192 * graphite.h (graphite_bb): New.
6193 (scop): Add fields static_schedule, params, loop_nest,
6195 * lambda.h: Declare vecs of lambda_matrix.
6196 * tree-flow.h (print_loop_ir_bb): Declared.
6197 * tree-cfg.c (print_loop_ir_bb): New.
6198 (print_loop): Use print_loop_ir_bb.
6200 2006-10-12 Sebastian Pop <pop@cri.ensmp.fr>
6202 * Merge from mainline (r115016:117632).
6204 2006-10-11 Sebastian Pop <pop@cri.ensmp.fr>
6206 * graphite.c (debug_scops): Adjust definition for avoiding a bootstrap
6207 break due to a warning.
6209 2006-10-10 Sebastian Pop <pop@cri.ensmp.fr>
6211 * graphite.c (print_scops, debug_scops): New.
6212 (graphite_transform): Renamed graphite_find_transform.
6213 * graphite.h (debug_scops): Declared.
6215 2006-08-17 Sebastian Pop <pop@cri.ensmp.fr>
6217 * tree-match.c: Reformat following the GNU style.
6218 * tree-match.h: Reformat following the GNU style.
6219 * tree-pattern.h: Removed empty file.
6220 * Makefile.in: Remove references to tree-pattern.h.
6221 * tree-check.c: Reformat following the GNU style.
6222 (execute_tree_check): Move gate condition code to...
6223 (gate_tree_check): ...here. New function.
6224 (pass_check): Use the gate function.
6226 2006-07-04 Nic Volanschi <nic.volanschi@free.fr>
6228 * tree-pattern.h: New. Tree pattern matching and checking using
6230 * tree-check.c: New. Tree/CFG checking pass.
6231 * tree-match.c: New. Library for tree pattern matching.
6232 * opts.c, common.opt: Add options --ftree-check & --ftree-checks.
6233 * toplev.c, flags.h: Add globals for tree-check pass.
6234 * Makefile.in: Integrate the files in tree-check pass.
6235 * timevar.def, tree-optimize.c, tree-pass.h: Register tree-check pass.
6236 * pretty-print.c, pretty-print.h, tree-pretty-print.c, diagnostic.h:
6237 Introduce a "lazy" pretty-print mode.
6238 * tree.c, tree.h: Add tree_name.
6240 2006-07-04 Sebastian Pop <pop@cri.ensmp.fr>
6242 * doc/invoke.texi (-fgraphite): Correct typo.
6243 * tree-scalar-evolution.c (number_of_iterations_for_all_loops): Update
6244 use of print_loop_ir.
6245 * testsuite/gcc.dg/graphite/scop-1.c: New.
6246 * testsuite/gcc.dg/graphite/scop-2.c: New.
6247 * testsuite/gcc.dg/graphite/graphite.exp: New.
6248 * graphite.c: Include domwalk.h.
6249 (print_scop): Print only the entry and exit blocks.
6250 (debug_scop): No longer static.
6251 (affine_expr): Fix formating. Return also true when the expression is
6253 (stmt_simple_for_scop_p): Fix formating.
6254 (build_scops): Use domwalk.
6255 (get_loop_start, end_scop, test_for_scop_bound): New.
6256 (graphite_transform_loops): Avoid printing on stderr.
6257 * graphite.h (debug_scop): Declared.
6258 * tree-flow.h (debug_loop_ir, print_loop_ir): Update declarations.
6259 * Makefile.in (graphite.o): Depend on domwalk.h.
6260 * tree-cfg.c (print_loop, print_pred_bbs, print_succ_bbs): Remove
6261 declarations for static functions.
6262 (print_loop, print_loop_ir, debug_loop_ir): Use an extra parameter for
6263 controlling output verbosity.
6265 2006-06-26 Sebastian Pop <pop@cri.ensmp.fr>
6266 Plesco Alexandru <shurikx@gmail.com>
6268 * doc/invoke.texi (-fgraphite): Document.
6269 * tree-pass.h (pass_graphite_transforms): Declared.
6270 * timevar.def (TV_GRAPHITE_TRANSFORMS): New.
6271 * tree-ssa-loop.c (graphite_transforms, gate_graphite_transforms): New.
6272 (pass_graphite_transforms): Defined.
6273 * tree-data-ref.c (free_data_ref, data_reference): Extern.
6274 * tree-data-ref.h (free_data_ref, data_reference): Declared.
6275 * graphite.c, graphite.h: New.
6276 * common.opt (fgraphite): Declared.
6277 * tree-flow.h (graphite_transform_loops): Declared.
6278 * Makefile.in (OBJS-common): Add graphite.o.
6279 (graphite.o): New rule.
6280 * passes.c (pass_graphite_transforms): Scheduled.