1 2009-10-26 Sebastian Pop <sebastian.pop@amd.com>
3 * graphite-clast-to-gimple.c (gloog): Do not call
4 sese_reset_aux_in_loops.
5 * graphite-sese-to-poly.c (build_loop_iteration_domains): Pass an
6 extra argument for domains. Do not use loop->aux.
7 (build_scop_iteration_domain): Initialize and free domains, pass it
8 to build_loop_iteration_domains and extract the information from
9 domains. Do not use loop->aux.
10 * sese.c (sese_reset_aux_in_loops): Removed.
11 * sese.h (sese_reset_aux_in_loops): Removed.
13 2009-10-26 Sebastian Pop <sebastian.pop@amd.com>
15 * graphite-clast-to-gimple.c (find_pbb_via_hash): Moved up.
16 (dependency_in_loop_p): Same.
17 (translate_clast): Do not use loop->aux. Initialize
18 loop->can_be_parallel.
19 (mark_loops_parallel): Removed.
20 * graphite-clast-to-gimple.h (mark_loops_parallel): Removed.
21 * graphite.c (free_aux_in_new_loops): Removed.
22 (graphite_finalize): Do not call free_aux_in_new_loops.
23 (graphite_transform_loops): Do not call mark_loops_parallel.
25 2009-10-26 Li Feng <nemokingdom@gmail.com>
27 * graphite-clast-to-gimple.c (get_stmtfor_depth): Removed.
28 (translate_clast): Pass an extra parameter LEVEL.
29 Call get_scattering_level.
30 * graphite-clast-to-gimple.h (get_scattering_level): New.
32 2009-10-22 Sebastian Pop <sebastian.pop@amd.com>
34 * cfgloop.c (alloc_loop): Initialize loop->single_iv.
35 * cfgloop.h (struct loop): New field single_iv.
37 * graphite-clast-to-gimple.c (pbb_to_depth_to_oldiv): Do not use
38 loop->aux anymore: use loop->single_iv.
39 (graphite_loop_normal_form): Moved...
40 (build_graphite_loop_normal_form): Removed.
41 (gloog): Do not call build_graphite_loop_normal_form.
42 (free_aux_in_new_loops): Moved...
43 (mark_loops_parallel): Restructure.
44 * graphite-clast-to-gimple.h (free_aux_in_new_loops): Do not declare.
45 * graphite-sese-to-poly.c (graphite_loop_normal_form): ...here.
46 (scop_canonicalize_loops): New.
47 (build_poly_scop): Call scop_canonicalize_loops.
48 * graphite.c (free_aux_in_new_loops): ...here.
50 2009-10-22 Sebastian Pop <sebastian.pop@amd.com>
52 * g++.dg/graphite/graphite.exp: Add the same rules as in
53 gcc.dg/graphite/graphite.exp.
55 2009-10-22 Sebastian Pop <sebastian.pop@amd.com>
57 * g++.dg/graphite/id-1.C: New.
59 2009-10-22 Sebastian Pop <sebastian.pop@amd.com>
61 * graphite-sese-to-poly.c (create_zero_dim_array): Pass an extra
63 (rewrite_close_phi_out_of_ssa): Update use of create_zero_dim_array.
64 (rewrite_phi_out_of_ssa): Same.
65 (rewrite_cross_bb_scalar_deps): Same.
66 (translate_scalar_reduction_to_array): Same.
68 2009-10-22 Sebastian Pop <sebastian.pop@amd.com>
70 * graphite-sese-to-poly.c (build_scop_drs): Disable call to
73 2009-10-22 Sebastian Pop <sebastian.pop@amd.com>
75 * graphite-sese-to-poly.c (dump_alias_graphs): New.
76 (build_scop_drs): Call dump_alias_graphs.
78 2009-10-22 Sebastian Pop <sebastian.pop@amd.com>
80 * graphite-poly.c (new_scop): Initialize SCOP_ORIGINAL_SCHEDULE,
81 SCOP_TRANSFORMED_SCHEDULE, and SCOP_SAVED_SCHEDULE.
82 (free_scop): Call free_lst on SCOP_ORIGINAL_SCHEDULE,
83 SCOP_TRANSFORMED_SCHEDULE, and SCOP_SAVED_SCHEDULE.
84 * graphite-poly.h (free_lst): New.
85 (store_lst_schedule): Free SCOP_SAVED_SCHEDULE.
86 (restore_lst_schedule): Free SCOP_TRANSFORMED_SCHEDULE.
88 2009-10-22 Sebastian Pop <sebastian.pop@amd.com>
90 * graphite-poly.h (struct scop): Add a field saved_schedule.
91 (SCOP_SAVED_SCHEDULE): New.
92 (store_lst_schedule): New.
93 (restore_lst_schedule): New.
94 (store_scattering): Call store_lst_schedule.
95 (restore_scattering): Call restore_lst_schedule.
97 2009-10-20 Sebastian Pop <sebastian.pop@amd.com>
99 * graphite-sese-to-poly.c (free_data_refs_aux): Fix formatting.
100 (pdr_add_alias_set): Same.
101 (build_poly_dr): Same.
102 (build_alias_set_optimal_p): Same.
103 (build_base_obj_set_for_drs): Same. Do not store the result of
106 2009-10-20 Sebastian Pop <sebastian.pop@amd.com>
108 * graphite-sese-to-poly.c (build_alias_set_optimal_p): Initialize
109 all_components_are_cliques to 1.
111 2009-10-20 Li Feng <nemokingdom@gmail.com>
113 * graphite-sese-to-poly.c (free_data_refs_aux): Update to free
115 (pdr_add_alias_set): Update retrieving alias_set_num.
116 (build_poly_dr): Update retrieving dr_base_object_set.
117 (partition_drs_to_sets): Remove.
118 (build_alias_set_optimal_p): New.
119 (build_alias_set_for_drs): Rename.
120 (build_scop_drs): Update.
121 * graphite-sese-to-poly.h (struct base_alias_pair): New.
122 (ALIAS_SET_INDEX): Remove.
123 (BASE_OBJECT_SET_INDEX): Remove.
125 2009-10-20 Sebastian Pop <sebastian.pop@amd.com>
127 * sese.c (get_vdef_before_sese): Handle GIMPLE_ASSIGN and GIMPLE_CALL.
129 2009-10-20 Sebastian Pop <sebastian.pop@amd.com>
131 * graphite-sese-to-poly.c (pdr_add_data_dimensions): Do not infer
132 loop upper bounds for 1-element arrays at end of structures.
133 * tree-flow.h (array_at_struct_end_p): Declared.
134 * tree-ssa-loop-niter.c (array_at_struct_end_p): Not static anymore.
136 2009-10-20 Sebastian Pop <sebastian.pop@amd.com>
138 * g++.dg/graphite/pr41305.C: New.
140 2009-10-20 Alexander Monakov <amonakov@ispras.ru>
142 * graphite-sese-to-poly.c (build_loop_iteration_domains): Generalize
143 construction of parameter constraints from loop iteration analysis.
144 * gcc.dg/graphite/run-id-2.c: New test.
146 2009-10-17 Sebastian Pop <sebastian.pop@amd.com>
148 * graphite-interchange.c (memory_stride_in_loop): Delete p1, lma
151 2009-10-17 Sebastian Pop <sebastian.pop@amd.com>
153 * graphite-dependences.c (dependence_polyhedron_1): Remove
154 unused gdim dimensions from the DDR polyhedron.
156 2009-10-17 Sebastian Pop <sebastian.pop@amd.com>
158 * graphite-dependences.c (pddr_transformed_scattering): New.
159 (dot_original_deps_stmt_1): New.
160 (dot_transformed_deps_stmt_1): New.
161 (dot_deps_stmt_1): Call dot_original_deps_stmt_1 and
162 dot_transformed_deps_stmt_1.
163 (dot_original_deps): New.
164 (dot_transformed_deps): New.
165 (dot_deps_1): Call dot_original_deps and dot_transformed_deps.
167 2009-10-17 Sebastian Pop <sebastian.pop@amd.com>
169 * graphite-dependences.c (reduction_dr_1): Remove wrong
170 assert: reduction BBs can have multiple reduction writes
171 to memory. interchange-3.f90 is an example.
173 2009-10-17 Sebastian Pop <sebastian.pop@amd.com>
175 * gfortran.dg/graphite/interchange-3.f90: New.
177 2009-10-17 Sebastian Pop <sebastian.pop@amd.com>
179 * gcc.dg/graphite/interchange-1.c: Un-XFAILed.
181 2009-10-17 Sebastian Pop <sebastian.pop@amd.com>
183 * graphite-dependences.c (dependence_polyhedron_1): Add the
184 context to the dependence polyhedron.
186 2009-10-17 Sebastian Pop <sebastian.pop@amd.com>
188 * graphite-poly.c (pbb_remove_duplicate_pdrs): Initialize
189 PBB_PDR_DUPLICATES_REMOVED.
192 2009-10-17 Sebastian Pop <sebastian.pop@amd.com>
194 * graphite-sese-to-poly.c (find_scop_parameters): Initialize
196 (build_loop_iteration_domains): Extract bounds on parameters
197 based on the data size.
198 (build_scop_context): Do not initialize SCOP_CONTEXT;
201 2009-10-17 Sebastian Pop <sebastian.pop@amd.com>
203 * graphite-ppl.c (ppl_min_for_le_polyhedron): New.
204 * graphite-ppl.h (graphite-ppl.h): Declared.
206 2009-10-17 Sebastian Pop <sebastian.pop@amd.com>
208 * graphite-ppl.c (ppl_print_linear_expr): New.
209 (debug_ppl_linear_expr): New.
210 * graphite-ppl.h (ppl_print_linear_expr): Declared.
211 (debug_ppl_linear_expr): Declared.
213 2009-10-16 Sebastian Pop <sebastian.pop@amd.com>
215 * graphite-interchange.c: Fix comments.
216 * gcc.dg/graphite/block-1.c: Fix comments.
218 2009-10-16 Sebastian Pop <sebastian.pop@amd.com>
220 * gcc.dg/graphite/interchange-7.c: Un-XFAILed.
221 * gcc.dg/graphite/interchange-9.c: Un-XFAILed.
223 2009-10-16 Sebastian Pop <sebastian.pop@amd.com>
225 Reapply the patch from Alexander Monakov that disappeared during
226 the last merges from trunk.
228 2009-09-16 Alexander Monakov <amonakov@ispras.ru>
230 * graphite-sese-to-poly.c (pdr_add_data_dimensions): Add bounds only
231 for ARRAY_REFs. Use array_ref_{low,up}_bound to determine bounds.
233 2009-10-15 Sebastian Pop <sebastian.pop@amd.com>
235 * graphite-interchange.c (memory_stride_in_loop): The depth
236 argument corresponds to a dynamic time dimension, so use
237 psct_dynamic_dim to refer to the transformed scattering dimension.
239 2009-10-15 Sebastian Pop <sebastian.pop@amd.com>
241 * graphite-interchange.c (memory_stride_in_loop): Fix comments.
243 2009-10-15 Sebastian Pop <sebastian.pop@amd.com>
245 * graphite-blocking.c (lst_do_strip_mine): Avoid strip mining the
247 * graphite-interchange.c (lst_do_interchange): Avoid interchanging
249 * graphite-poly.c (scop_to_lst): Fix LST sequence in an outermost
251 (print_lst): Print the root of LST in a different format.
252 * graphite-poly.h (lst_depth): Adjust to include the root of the LST.
254 2009-10-15 Sebastian Pop <sebastian.pop@amd.com>
256 * graphite-poly.c (print_scop): Fix pretty printing of a SCoP.
258 2009-10-15 Sebastian Pop <sebastian.pop@amd.com>
260 * doc/passes.texi: Document the Graphite infrastructure.
262 2009-10-15 Sebastian Pop <sebastian.pop@amd.com>
264 * graphite-sese-to-poly.c (insert_copyin): Use gsi_insert_seq_on_edge.
265 (rewrite_commutative_reductions_out_of_ssa): Call gsi_commit_edge_inserts,
266 and check the SSA representation.
268 * gfortran.dg/graphite/id-18.f90: New, reduced from PR41193.
270 2009-10-15 Sebastian Pop <sebastian.pop@amd.com>
272 * gcc.dg/graphite/pr40157.c: Use -floop-block as reported in the PR.
274 2009-10-14 Sebastian Pop <sebastian.pop@amd.com>
276 * gcc.dg/graphite/interchange-11.c: New.
278 2009-10-14 Sebastian Pop <sebastian.pop@amd.com>
280 * gcc.dg/graphite/interchange-8.c: Enable loop interchange.
282 2009-10-14 Sebastian Pop <sebastian.pop@amd.com>
284 * gcc.dg/graphite/graphite.exp (DEFAULT_CFLAGS_GRAPHITE_BLOCK):
285 Add -fno-loop-strip-mine and -fno-loop-interchange.
286 (DEFAULT_FLAGS_GRAPHITE_INTERCHANGE): Add -fno-loop-block and
287 -fno-loop-strip-mine.
288 * gfortran.dg/graphite/graphite.exp: Same.
290 2009-10-14 Sebastian Pop <sebastian.pop@amd.com>
292 * gcc.dg/graphite/graphite.exp (DEFAULT_CFLAGS_GRAPHITE_BLOCK):
293 Renamed DEFAULT_FLAGS_GRAPHITE_BLOCK.
294 (DEFAULT_CFLAGS_GRAPHITE_IDENTITY): Renamed
295 DEFAULT_FLAGS_GRAPHITE_IDENTITY.
296 (DEFAULT_CFLAGS_GRAPHITE_INTERCHANGE): Renamed
297 DEFAULT_FLAGS_GRAPHITE_INTERCHANGE.
298 (DEFAULT_CFLAGS_GRAPHITE_SCOP): Renamed
299 DEFAULT_FLAGS_GRAPHITE_SCOP.
300 (DEFAULT_CFLAGS_RUN_ID): Renamed DEFAULT_FLAGS_RUN_ID.
301 (DEFAULT_CFLAGS_GRAPHITE): Renamed DEFAULT_FLAGS_GRAPHITE.
303 2009-10-14 Sebastian Pop <sebastian.pop@amd.com>
305 * graphite-poly.c (pbb_number_of_iterations_at_time): Cleanup comments.
307 2009-10-14 Konrad Trifunovic <konrad.trifunovic@gmail.com>
308 Sebastian Pop <sebastian.pop@amd.com>
310 * graphite-interchange.c (build_linearized_memory_access): Pass an
312 (memory_stride_in_loop): Include transform scattering in the
313 access functions to be able to querry the strides in the
315 (pbb_interchange_loop_depths): Interchange the psct_dynamic_dim,
316 not the psct_iterator_dim.
318 2009-10-14 Sebastian Pop <sebastian.pop@amd.com>
320 * graphite-blocking.c (pbb_do_strip_mine): Removed.
321 (lst_do_strip_mine_loop): New.
322 (lst_do_strip_mine): New.
323 (scop_do_strip_mine): Call lst_do_strip_mine.
324 * graphite-poly.h (lst_add_loop_under_loop): New.
325 (lst_find_first_pbb): New.
327 2009-10-14 Sebastian Pop <sebastian.pop@amd.com>
329 * graphite-poly.c (loop_to_lst): Fix LST creation.
331 2009-10-14 Tobias Grosser <grosser@fim.uni-passau.de>
333 * testsuite/gcc.dg/graphite/id-15.c: (8 * 8) replaced with
334 sizeof(unsigned long) to make it run on 32bit systems.
336 2009-10-14 Tobias Grosser <grosser@fim.uni-passau.de>
338 * testsuite/gcc.dg/graphite/run-id-1.c: Use smaller matrix to not
341 2009-10-14 Ramakrishna Upadrasta <Ramakrishna.Upadrasta@inria.fr>
343 * graphite-sese-to-poly.c (write_alias_graph_to_ascii_dimacs): Fix
345 (write_alias_graph_to_ascii_dot): New.
346 (write_alias_graph_to_ascii_ecc): Ditto.
347 (partition_drs_to_sets): Add testing of optimality of current method
348 which assigns alias numbers according to DFS Comopnent number. used
349 as heuristic for the upcoming ECC algorithm.
350 (build_scop_drs): Write to file also with the ecc and dot format.
352 2009-10-13 Sebastian Pop <sebastian.pop@amd.com>
354 * gfortran.dg/graphite/interchange-1.f: XFail.
356 2009-10-13 Sebastian Pop <sebastian.pop@amd.com>
358 * graphite.c (graphite_initialize): Do not handle functions with
359 more than 100 basic blocks.
361 2009-10-13 Sebastian Pop <sebastian.pop@amd.com>
363 * graphite-blocking.c (pbb_do_strip_mine): Use
364 PARAM_LOOP_BLOCK_TILE_SIZE.
366 2009-10-13 Sebastian Pop <sebastian.pop@amd.com>
368 * graphite-poly.c (dot_lst_1): New.
370 * graphite-poly.h (dot_lst): Declared.
372 2009-10-13 Sebastian Pop <sebastian.pop@amd.com>
374 * graphite-dependences.c (dot_deps_stmt_1): New.
375 (dot_deps_stmt): New.
376 * graphite-dependences.h (dot_deps_stmt): Declared.
378 2009-10-09 Sebastian Pop <sebastian.pop@amd.com>
380 * graphite-sese-to-poly.c (rewrite_cross_bb_scalar_dependence): Do
381 not replace cross BB scalar dependences ending on PHI nodes.
382 (rewrite_cross_bb_scalar_deps): Filter out GIMPLE_PHI nodes.
384 2009-10-09 Sebastian Pop <sebastian.pop@amd.com>
386 * graphite-poly.c (apply_poly_transforms): Implement the high
387 level driver for flag_loop_block.
388 * tree-ssa-loop.c (gate_graphite_transforms): Remove call to sorry for
391 * gcc.dg/graphite/graphite.exp (DEFAULT_CFLAGS_GRAPHITE_BLOCK): Add
393 * gfortran.dg/graphite/graphite.exp (DEFAULT_CFLAGS_GRAPHITE_BLOCK):
396 2009-10-09 Sebastian Pop <sebastian.pop@amd.com>
398 * graphite-poly.h (lst_find_pbb): New.
399 (find_lst_loop): New.
401 2009-10-09 Sebastian Pop <sebastian.pop@amd.com>
403 * graphite-poly.c (new_scop): Remove init of SCOP_DEP_GRAPH.
404 * graphite-poly.h (struct scop): Remove dep_graph field.
405 (SCOP_DEP_GRAPH): Removed.
407 2009-10-09 Sebastian Pop <sebastian.pop@amd.com>
409 * graphite-poly.h (copy_lst): Do full copy of LST.
411 2009-10-07 Sebastian Pop <sebastian.pop@amd.com>
413 * graphite-sese-to-poly.c (reduction_phi_p): Call remove_invariant_phi
414 when the loop stride is zero.
416 * gcc.dg/graphite/id-16.c: New.
418 2009-10-06 Sebastian Pop <sebastian.pop@amd.com>
420 * graphite-dependences.c (reduction_dr_1): New.
421 (reduction_dr_p): New.
422 (graphite_legal_transform_dr): Call reduction_dr_p.
423 (reduction_ddr): Renamed reduction_ddr_p.
424 * graphite-poly.h (same_pdr_p): New.
425 (number_of_write_pdrs): New.
426 * graphite-sese-to-poly.c (nb_data_writes_in_bb): New.
427 (split_reduction_stmt): Do not split reduction statements
428 when there are no writes to memory.
429 (translate_scalar_reduction_to_array_for_stmt): Insert the
430 memory reduction statement just after the scalar reduction statement.
432 * gcc.dg/graphite/interchange-10.c: Updated to differ from interchange-4.c.
434 * gcc.dg/graphite/interchange-3.c: Un-XFAIL-ed.
435 * gcc.dg/graphite/interchange-4.c: Un-XFAIL-ed.
437 2009-10-06 Sebastian Pop <sebastian.pop@amd.com>
439 * graphite-interchange.c (lst_apply_interchange): New.
440 (lst_interchange_profitable_p): New.
441 (lst_try_interchange_loops): New.
442 (lst_try_interchange): New.
443 (lst_do_interchange): New.
444 (pbb_do_interchange): Removed.
445 (scop_do_interchange): Call lst_do_interchange.
447 2009-10-06 Sebastian Pop <sebastian.pop@amd.com>
449 * graphite-poly.c (print_scop): Print SCOP_ORIGINAL_SCHEDULE and
450 SCOP_TRANSFORMED_SCHEDULE.
455 * graphite-poly.h (lst_p): New.
458 (LST_LOOP_FATHER): New.
461 (scop_to_lst): Declared.
462 (print_lst): Declared.
463 (debug_lst): Declared.
468 (lst_dewey_number): New.
469 (struct scop): Add original_schedule and transformed_schedule fields.
470 (SCOP_ORIGINAL_SCHEDULE): New.
471 (SCOP_TRANSFORMED_SCHEDULE): New.
472 * graphite-sese-to-poly.c (build_poly_scop): Call scop_to_lst.
474 2009-10-05 Sebastian Pop <sebastian.pop@amd.com>
476 * graphite-dependences.c (reduction_ddr): New.
477 (graphite_legal_transform_bb): Call reduction_ddr.
478 * graphite-poly.c (new_poly_bb): Pass a new bool parameter.
479 Initialize PBB_IS_REDUCTION.
480 * graphite-poly.h (struct poly_bb): New bool field is_reduction.
481 (PBB_IS_REDUCTION): New.
482 (new_poly_bb): Update declaration.
483 * graphite-scop-detection.h (build_scop_bbs): Removed.
484 (nb_reductions_in_loop): Removed.
485 * graphite-sese-to-poly.c (try_generate_gimple_bb): Pass a sbitmap
486 parameter for reductions.
487 (try_generate_gimple_bb): Update call to new_poly_bb.
488 (build_scop_bbs_1): Same.
489 (build_scop_bbs): Same.
490 (gsi_for_phi_node): New.
491 (scalar_close_phi_node_p): Remove gcc_assert.
492 (split_reduction_stmt): New.
493 (is_reduction_operation_p): New.
494 (phi_contains_arg): New.
495 (follow_ssa_with_commutative_ops): New.
496 (detect_commutative_reduction_arg): New.
497 (detect_commutative_reduction_assign): New.
498 (follow_inital_value_to_phi): New.
499 (edge_initial_value_for_loop_phi): New.
500 (initial_value_for_loop_phi): New.
501 (detect_commutative_reduction): New.
502 (translate_scalar_reduction_to_array_for_stmt): New.
503 (insert_copyout): New.
504 (insert_copyin): New.
505 (translate_scalar_reduction_to_array): New.
506 (rewrite_commutative_reductions_out_of_ssa_close_phi): New.
507 (rewrite_commutative_reductions_out_of_ssa_loop): New.
508 (rewrite_commutative_reductions_out_of_ssa): New.
509 (build_poly_scop): Call rewrite_commutative_reductions_out_of_ssa.
510 * sese.h (split_region_for_bb): New.
512 * gcc.dg/graphite/graphite.exp (DEFAULT_CFLAGS_GRAPHITE_BLOCK): Add -ffast-math.
513 * gcc.dg/graphite/interchange-1.c: Fix format.
514 * gcc.dg/graphite/interchange-10.c: New.
516 2009-10-05 Sebastian Pop <sebastian.pop@amd.com>
518 * graphite-sese-to-poly.c (insert_out_of_ssa_copy): Remove
521 2009-10-05 Sebastian Pop <sebastian.pop@amd.com>
523 * graphite-sese-to-poly.c (scev_analyzable_p): New.
524 (rewrite_cross_bb_scalar_dependence): New.
525 (rewrite_cross_bb_scalar_deps): New.
526 (rewrite_reductions_out_of_ssa): Use bb_in_sese_p.
527 Call rewrite_cross_bb_scalar_deps.
529 2009-10-05 Sebastian Pop <sebastian.pop@amd.com>
531 * graphite-sese-to-poly.c (gsi_for_ssa_name_def): Removed.
532 (insert_out_of_ssa_copy): Directly use gsi_after_labels and
535 2009-10-05 Sebastian Pop <sebastian.pop@amd.com>
537 * graphite-clast-to-gimple.c (build_cloog_prog): Use pbb_index.
538 * graphite-interchange.c (pbb_do_interchange): Same.
539 * graphite-poly.c (print_scattering_function): Same.
541 * graphite-poly.h (pbb_loop): New.
542 * graphite-sese-to-poly.c (create_linear_expr_from_tree): Use pbb_loop.
544 2009-09-27 Sebastian Pop <sebastian.pop@amd.com>
546 * graphite-scop-detection.c (limit_scops): Do not build poly_bbs.
548 2009-09-27 Sebastian Pop <sebastian.pop@amd.com>
550 * graphite-sese-to-poly.c (partition_drs_to_sets): Drs is not modified,
551 so don't pass a pointer to it.
552 (build_alias_set_for_drs): Same.
553 (build_base_obj_set_for_drs): Same.
554 (build_scop_drs): Same.
556 2009-09-26 Li Feng <nemokingdom@gmail.com>
558 * graphite-sese-to-poly.c (build_scop_drs): Disable writing to file
559 the alias graph of data references.
561 2009-09-25 Li Feng <nemokingdom@gmail.com>
563 * graphite-sese-to-poly.c (write_alias_graph_to_ascii_dimacs): New.
564 (build_scop_drs): When debugging, write the alias graph to file,
565 otherwise, should be disabled.
567 2009-09-17 Sebastian Pop <sebastian.pop@amd.com>
569 * graphite-scop-detection.c (stmt_simple_memref_p): Removed.
570 (is_simple_operand): Remove call to stmt_simple_memref_p.
571 (stmt_simple_for_scop_p): Update call to is_simple_operand.
573 2009-09-17 David Edelsohn <edelsohn@gnu.org>
575 * testsuite/gcc.dg/graphite/interchange-mvt.c: New File.
576 * testsuite/gcc.dg/graphite/scop-dsyrk.c: New File.
577 * testsuite/gcc.dg/graphite/scop-dsyr2k.c: New File.
578 * testsuite/gcc.dg/graphite/scop-mvt.c: New File.
579 * testsuite/gcc.dg/graphite/scop-sor.c: New File.
581 2009-09-17 Li Feng <nemokingdom@gmail.com>
584 * graphite-dependences.c (poly_drs_may_alias_p): Adjust definition.
585 (pddr_original_scattering): Make sure 2 pdr2 in the same base object set.
586 (graphite_carried_dependence_level_k): Ditto.
587 * graphite-poly.c (new_poly_dr): Add init of PDR_BASE_OBJECT_SET.
588 * graphite-poly.h (struct poly_dr): Add member dr_base_object_set.
589 (new_poly_dr): Adjust declaration.
590 * graphite-sese-to-poly.c (free_data_refs_aux): New.
591 (free_gimple_bb): Added free_data_refs_aux.
592 (build_poly_dr): Add dr_base_object_set.
593 (partition_drs_to_sets): New.
594 (dr_same_base_object_p): New.
595 (build_alias_set_for_drs): New.
596 (build_base_object_set_for_drs): New.
597 (build_scop_drs): Add build_base_obj_set_for_drs.
598 * graphite-sese-to-poly.h: Added #define for alias set number index and
599 base object set index.
600 * libgomp/testsuite/libgomp.graphite/force-parallel-6.c: Refine tests.
601 * libgomp/testsuite/libgomp.graphite/pr4118.c: New.
603 2009-09-16 Alexander Monakov <amonakov@ispras.ru>
605 * graphite-sese-to-poly.c (pdr_add_data_dimensions): Add bounds only
606 for ARRAY_REFs. Use array_ref_{low,up}_bound to determine bounds.
608 2009-09-14 Sebastian Pop <sebastian.pop@amd.com>
610 * graphite-sese-to-poly.c (struct irp_data): Removed.
611 (idx_record_params): Removed.
612 (find_params_in_bb): Scan for parameters the access functions; don't
613 parse the tree representation.
615 2009-09-14 Sebastian Pop <sebastian.pop@amd.com>
617 * tree-ssa-loop.c (gate_graphite_transforms): Disable Graphite
618 passes at -O1 and below.
620 2009-09-14 Sebastian Pop <sebastian.pop@amd.com>
622 * graphite-blocking.c: Fix order of includes: tree-chrec.h, then
623 tree-scalar-evolution.h, and then tree-data-ref.h.
624 * graphite-clast-to-gimple.c: Same.
625 * graphite-dependences.c: Same.
626 * graphite-interchange.c: Same.
627 * graphite-poly.c: Same.
628 * graphite-scop-detection.c: Same.
629 * graphite-sese-to-poly.c: Same.
631 * lambda-code.c: Same.
632 * matrix-reorg.c: Same.
633 * tree-data-ref.c: Same.
634 * tree-if-conv.c: Same.
635 * tree-loop-distribu: Same.: Same.
636 * tree-loop-linear.c: Same.
637 * tree-parloops.c: Same.
638 * tree-predcom.c: Same.
639 * tree-vect-patterns.c: Same.
641 2009-09-02 Sebastian Pop <sebastian.pop@amd.com>
643 Partially revert the previous patch, except the following.
644 * tree-scalar-evolution.c (instantiate_scev_not): Adapted to pass
645 as parameters the operands of the not expression.
647 2009-09-01 Sebastian Pop <sebastian.pop@amd.com>
649 * tree-scalar-evolution.c (instantiate_scev_assign): New.
650 Do not call analyze_scalar_evolution on assignments.
651 (instantiate_scev_phi): Call analyze_scalar_evolution.
652 (instantiate_scev_name): Call instantiate_scev_assign and
653 instantiate_scev_phi.
654 (instantiate_scev_not): Adapted to pass as parameters the operands
655 of the not expression.
657 2009-09-01 Sebastian Pop <sebastian.pop@amd.com>
659 * tree-scalar-evolution.c (instantiate_scev_binary): Adapted
660 to pass as parameters the operands of the binary expression.
662 2009-09-01 Sebastian Pop <sebastian.pop@amd.com>
664 * tree-scalar-evolution.c (instantiate_scev_bitnot): Renamed
665 instantiate_scev_not. Handle NEGATE_EXPR.
666 (instantiate_scev_r): Handle NEGATE_EXPR.
668 2009-09-01 Sebastian Pop <sebastian.pop@amd.com>
670 * tree-scalar-evolution.c (instantiate_scev_1): Renamed
672 (instantiate_scev_r): Move code in instantiate_scev_2
673 and instantiate_scev_1.
675 2009-09-01 Sebastian Pop <sebastian.pop@amd.com>
677 * tree-scalar-evolution.c (instantiate_scev_3): New.
678 (instantiate_scev_1): Move code in instantiate_scev_3.
680 2009-09-01 Sebastian Pop <sebastian.pop@amd.com>
682 * tree-scalar-evolution.c (instantiate_scev_poly): New.
683 (instantiate_scev_1): Move code in instantiate_scev_poly.
685 2009-09-01 Sebastian Pop <sebastian.pop@amd.com>
687 * tree-scalar-evolution.c (instantiate_scev_bitnot): New.
688 (instantiate_scev_1): Move code in instantiate_scev_bitnot.
690 2009-09-01 Sebastian Pop <sebastian.pop@amd.com>
692 * tree-scalar-evolution.c (instantiate_scev_convert): New.
693 (instantiate_scev_1): Move code in instantiate_scev_convert.
695 2009-09-01 Sebastian Pop <sebastian.pop@amd.com>
697 * tree-scalar-evolution.c (instantiate_scev_binary): New.
698 (instantiate_scev_1): Move code in instantiate_scev_binary.
700 2009-09-01 Sebastian Pop <sebastian.pop@amd.com>
702 * tree-scalar-evolution.c (instantiate_scev_name): New.
703 (instantiate_scev_1): Move code in instantiate_scev_name.
705 2009-08-28 Sebastian Pop <sebastian.pop@amd.com>
707 * Merge from mainline (150992:151171).
709 2009-08-25 Sebastian Pop <sebastian.pop@amd.com>
711 * graphite-dependences.c (graphite_legal_transform_bb): Call
712 pbb_remove_duplicate_pdrs.
713 * graphite-poly.c (can_collapse_pdr): Removed.
714 (pdr_find_duplicate): Removed.
715 (can_collapse_pdrs): New.
716 (pbb_remove_duplicate_pdrs): New.
717 (new_poly_dr): Do not look for duplicates.
718 * graphite-poly.h (struct poly_bb): New field pdr_duplicates_removed.
719 (PBB_PDR_DUPLICATES_REMOVED): New.
720 (pbb_remove_duplicate_pdrs): Declared.
722 2009-08-25 Sebastian Pop <sebastian.pop@amd.com>
724 * graphite-interchange.c (pbb_interchange_profitable_p): Adjust
725 the strides by multiplying by PDR_NB_REFS.
726 * graphite-poly.c (can_collapse_pdr): New.
727 (pdr_find_duplicate): New.
728 (new_poly_dr): Call pdr_find_duplicate. Collapse duplicate PDRs.
729 Initialize PDR_NB_REFS.
730 * graphite-poly.h (struct poly_dr): Add field nb_refs.
732 (new_poly_dr): Number of subscripts is a graphite_dim_t.
734 2009-08-25 Sebastian Pop <sebastian.pop@amd.com>
736 Revert one of the previous commits:
737 * graphite-dependences.c (graphite_legal_transform_bb): Avoid
738 the computation of symmetric data dependence relations.
739 (dependency_between_pbbs_p): Same.
741 2009-08-25 Sebastian Pop <sebastian.pop@amd.com>
744 * graphite-poly.c (apply_poly_transforms): Remove legality test before
747 2009-08-25 Sebastian Pop <sebastian.pop@amd.com>
749 * graphite-dependences.c (pddr_original_scattering): Return NULL
750 for read-read dependence relations.
751 * graphite-poly.h (enum poly_dr_type): Fix comment.
754 (pdr_may_write_p): New.
756 2009-08-25 Sebastian Pop <sebastian.pop@amd.com>
758 * graphite-poly.h (enum POLY_DR_TYPE): Renamed poly_dr_type.
759 (struct poly_dr): Same.
761 * graphite-poly.c (new_poly_dr): Same.
763 2009-08-25 Konrad Trifunovic <konrad.trifunovic@gmail.com>
764 Sebastian Pop <sebastian.pop@amd.com>
766 * graphite-blocking.c (pbb_strip_mine_loop_depth): Renamed
767 pbb_strip_mine_time_depth. Changed the implementation so that
768 transformation is expressed as a transformation on
769 time (scatttering) dimensions. Also, ensures that the 2d+1
770 scheduling format is preserved.
771 (pbb_strip_mine_profitable_p): Profitability is based on the
772 iteration number of a given time (scattering) dimension,
773 and not on a original loop depth dimension.
774 (pbb_strip_mine): Call pbb_number_of_iterations_at_time.
775 (pbb_do_strip_mine): Call psct_dynamic_dim.
776 * graphite-poly.c (pbb_number_of_iterations_at_time): New.
777 * graphite-poly.h (pbb_number_of_iterations_at_time): Declared.
778 (pbb_nb_dynamic_scattering_transform): New.
779 (psct_dynamic_dim): New.
781 2009-08-25 Konrad Trifunovic <konrad.trifunovic@gmail.com>
783 * graphite-ppl.c (ppl_max_for_le): Renamed ppl_max_for_le_pointset.
784 * graphite-ppl.h (ppl_max_for_le): Renamed ppl_max_for_le_pointset.
785 * graphite-poly.c (pbb_number_of_iterations): Rename ppl_max_for_le.
786 * graphite-interchange.c (build_linearized_memory_access): Same.
787 (memory_stride_in_loop): Same.
789 2009-08-25 Sebastian Pop <sebastian.pop@amd.com>
791 * graphite-dependences.c (pddr_original_scattering): New.
792 (graphite_legal_transform_dr): Call pddr_original_scattering.
795 * graphite-dependences.h (dot_deps): Declared.
796 * graphite-poly.c (new_poly_dr): Initialize PDR_ID.
797 (print_pdr): Print PDR_ID.
798 * graphite-poly.h (struct poly_dr): Add field id.
801 * graphite-scop-detection.c (dot_all_scops_1): Cleanup comment.
803 2009-08-22 Sebastian Pop <sebastian.pop@amd.com>
805 * graphite-dependences.c (graphite_carried_dependence_level_k): Do
806 not delete the original dependence relation.
808 2009-08-21 Sebastian Pop <sebastian.pop@amd.com>
810 * graphite-dependences.c (graphite_legal_transform_bb): Avoid
811 the computation of symmetric data dependence relations.
812 (dependency_between_pbbs_p): Same.
814 2009-08-21 Sebastian Pop <sebastian.pop@amd.com>
816 * graphite-dependences.c (new_poly_dr_pair): Renamed new_poly_ddr.
817 (eq_poly_dr_pair_p): Renamed eq_poly_ddr_p.
818 (hash_poly_dr_pair_p): Renamed hash_poly_ddr_p.
819 (free_poly_ddr): New.
820 (pddr_is_empty): New.
821 (dependence_polyhedron_1): Now returns a poly_ddr_p.
822 (dependence_polyhedron): Same. Remove useless gcc_assert.
824 (graphite_legal_transform_dr): Call pddr_is_empty and free_poly_ddr.
825 (graphite_carried_dependence_level_k): Call pddr_is_empty.
826 * graphite-dependences.h (enum poly_dependence_kind): New.
827 (poly_dr_pair): Renamed poly_ddr. Added a field kind.
828 (PDRP_SOURCE): Renamed PDDR_SOURCE.
829 (PDRP_SINK): Renamed PDDR_SINK.
830 (PDRP_DDP): Renamed PDDR_DDP.
832 (free_poly_ddr): Declared.
833 * graphite-poly.c (new_scop): Use the new hash function names.
834 * graphite-poly.h (struct scop): Renamed field original_pdr_pairs
836 (SCOP_ORIGINAL_PDR_PAIRS): Renamed SCOP_ORIGINAL_PDDRS.
838 2009-08-21 Sebastian Pop <sebastian.pop@amd.com>
840 * Merge from mainline (150764:150992).
842 2009-08-18 Sebastian Pop <sebastian.pop@amd.com>
844 * cfgloopmanip.c (create_empty_loop_on_edge): Generate upper
845 bounds with LT_EXPR to make niter analysis more precise on code
846 generated by Graphite.
848 2009-08-18 Sebastian Pop <sebastian.pop@amd.com>
850 * graphite-dependences.c (graphite_legal_transform_dr): Fix formatting.
851 (graphite_legal_transform_bb): Same.
852 (poly_drs_may_alias_p): Same.
854 2009-08-15 Sebastian Pop <sebastian.pop@amd.com>
857 * graphite-ppl.c (ppl_max_for_le): Correct the use of
858 ppl_Pointset_Powerset_C_Polyhedron_maximize.
860 2009-08-13 Sebastian Pop <sebastian.pop@amd.com>
862 * graphite-poly.c (print_pbb): Print PBB index.
864 2009-08-13 Sebastian Pop <sebastian.pop@amd.com>
866 * Merge from mainline (r150672:150764).
868 2009-08-13 Sebastian Pop <sebastian.pop@amd.com>
870 * graphite-interchange.c (ppl_max_for_le): Moved...
871 * graphite-poly.c (pbb_number_of_iterations): Call ppl_max_for_le.
872 * graphite-ppl.c (ppl_max_for_le): ... here.
873 * graphite-ppl.h (ppl_max_for_le): Declared.
875 2009-08-12 Sebastian Pop <sebastian.pop@amd.com>
877 * Merge from mainline (r150372:150672).
879 2009-08-11 Sebastian Pop <sebastian.pop@amd.com>
882 * sese.c (convert_for_phi_arg): New.
883 (add_guard_exit_phis): Use convert_for_phi_arg.
885 * testsuite/gfortran.dg/graphite/id-17.f: New.
887 2009-08-11 Sebastian Pop <sebastian.pop@amd.com>
889 * graphite-sese-to-poly.c (pdr_add_data_dimensions): Dont add
890 unknown subscript upper bounds.
892 * testsuite/gcc.dg/graphite/interchange-6.c: Un-XFAIL.
894 2009-08-11 Sebastian Pop <sebastian.pop@amd.com>
895 Pranav Garg <pranav.garg2107@gmail.com>
897 * graphite-interchange.c (gather_access_strides): Removed.
898 (ppl_max_for_le): New.
899 (build_linearized_memory_access): New.
900 (memory_stride_in_loop): New.
901 (pbb_interchange_profitable_p): Reimplemented.
902 * graphite-ppl.h (ppl_new_id_map): New.
903 (ppl_interchange): New.
905 * testsuite/gcc.dg/graphite/interchange-6.c: XFAILed.
907 2009-08-11 Sebastian Pop <sebastian.pop@amd.com>
909 * graphite-interchange.c (compute_subscript): Removed.
910 (compute_array_size_cstr): Removed.
911 (compute_array_size_poly): Removed.
912 (compute_array_size): Removed.
913 (gather_access_strides_poly): Removed.
914 (gather_access_strides): Empty.
916 2009-08-11 Sebastian Pop <sebastian.pop@amd.com>
918 * graphite-dependences.c (dependence_polyhedron_1): Replace
919 pdr_nb_subscripts with PDR_NB_SUBSCRIPTS.
920 (graphite_legal_transform_dr): Same.
921 (graphite_carried_dependence_level_k): Same.
922 * graphite-poly.c (new_poly_dr): Add a parameter nb_subscripts.
923 Initialize PDR_NB_SUBSCRIPTS.
924 (print_pdr_access_layout): Replace pdr_nb_subscripts with
926 * graphite-poly.h (struct poly_dr): Add nb_subscripts field.
927 (PDR_NB_SUBSCRIPTS): New.
928 (pdr_nb_subscripts): Removed.
929 (pdr_dim): Simplified.
930 * graphite-sese-to-poly.c (build_poly_dr): Replace pdr_nb_subscripts
931 with PDR_NB_SUBSCRIPTS.
933 2009-08-11 Sebastian Pop <sebastian.pop@amd.com>
935 * graphite-interchange.c (compute_array_size): Remove use of
937 * graphite-poly.c (new_poly_dr): Remove argument data_container.
938 Do not initialize PDR_DATA_CONTAINER.
939 (print_pdr): Do not print PDR_DATA_CONTAINER.
940 * graphite-poly.h (struct poly_dr): Remove data_container field.
941 (PDR_DATA_CONTAINER): Removed.
942 * graphite-sese-to-poly.c (pdr_add_data_dimensions): Remove use of
944 (build_poly_dr): Same.
946 2009-08-11 Sebastian Pop <sebastian.pop@amd.com>
948 * testsuite/gcc.dg/graphite/interchange-9.c: New.
950 2009-08-05 Konrad Trifunovic <konrad.trifunovic@gmail.com>
951 Sebastian Pop <sebastian.pop@amd.com>
953 * graphite-dependences.c (graphite_legal_transform_dr): Work on a
954 copy of the dependence polyhedron. Free the temporary objects.
955 (graphite_carried_dependence_level_k): Free unused objects before
958 * testsuite/gcc.dg/graphite/interchange-1.c: XFAILed.
959 * testsuite/gcc.dg/graphite/interchange-2.c: XFAILed.
960 * testsuite/gcc.dg/graphite/interchange-3.c: XFAILed.
961 * testsuite/gcc.dg/graphite/interchange-4.c: XFAILed.
962 * testsuite/gcc.dg/graphite/interchange-7.c: XFAILed.
964 2009-08-05 Sebastian Pop <sebastian.pop@amd.com>
966 * graphite-blocking.c (scop_do_strip_mine): Call store_scattering.
967 Early return without analyzing the data dependences if no
968 transform has been done. Call restore_scattering if the transform
970 (graphite-interchange.c): Same.
971 * graphite-poly.c (print_scattering_function): Test for PBB_TRANSFORMED.
972 (graphite_read_transforms): Initialize PBB_TRANSFORMED.
973 (apply_poly_transforms): Do not gcc_assert that
974 the transform is legal.
975 (new_poly_bb): Initialize PBB_TRANSFORMED, PBB_SAVED, and PBB_ORIGINAL.
976 Do not initialize PBB_NB_SCATTERING_TRANSFORM, PBB_NB_LOCAL_VARIABLES,
977 PBB_TRANSFORMED_SCATTERING, and PBB_ORIGINAL_SCATTERING.
978 (free_poly_dr): Free PBB_TRANSFORMED, PBB_SAVED, and PBB_ORIGINAL.
979 * graphite-poly.h (struct poly_scattering): New.
980 (struct poly_bb): Add original, transformed, and saved fields.
981 Remove transformed_scattering, original_scattering, nb_local_variables,
982 and nb_scattering_transform fields.
983 (PBB_ORIGINAL, PBB_TRANSFORMED, PBB_SAVED): New.
984 (poly_scattering_new): New.
985 (poly_scattering_free): New.
986 (poly_scattering_copy): New.
987 (store_scattering_pbb): New.
988 (store_scattering): New.
989 (restore_scattering_pbb): New.
990 (restore_scattering): New.
991 * graphite-sese-to-poly.c (build_pbb_scattering_polyhedrons):
992 Initialize PBB_TRANSFORMED and PBB_ORIGINAL.
994 2009-08-05 Sebastian Pop <sebastian.pop@amd.com>
996 * graphite-poly.c (print_pbb): Add parentheses in the pretty print.
999 2009-08-05 Sebastian Pop <sebastian.pop@amd.com>
1001 * Makefile.in (graphite.o): Depends on PREDICT_H.
1002 * graphite.c: Include predict.h.
1003 (graphite_finalize): Call tree_estimate_probability.
1004 * predict.c (predict_loops): Do not call scev_initialize and
1006 (tree_estimate_probability_bb): New.
1007 (tree_estimate_probability): Do not initialize loops: move that
1008 code to the driver. Call tree_estimate_probability_bb.
1009 (tree_estimate_probability_driver): New.
1010 (pass_profile): Use tree_estimate_probability_driver.
1011 * predict.h (tree_estimate_probability): Declared.
1013 2009-08-05 Sebastian Pop <sebastian.pop@amd.com>
1015 * graphite-clast-to-gimple.c (gloog): Add time to TV_GRAPHITE_CODE_GEN.
1016 * graphite-dependences.c (graphite_legal_transform): Add time to
1017 TV_GRAPHITE_DATA_DEPS.
1018 (dependency_between_pbbs_p): Same.
1019 * timevar.def (TV_GRAPHITE_DATA_DEPS, TV_GRAPHITE_CODE_GEN): New.
1021 2009-08-03 Sebastian Pop <sebastian.pop@amd.com>
1023 * Merge from mainline (r149952:150372).
1025 2009-07-28 Sebastian Pop <sebastian.pop@amd.com>
1027 * ChangeLog.graphite: Fix indenting, white spaces and 80 columns.
1028 * graphite-blocking.c: Same.
1029 * graphite-clast-to-gimple.c: Same.
1030 * graphite-dependences.c: Same.
1031 * graphite-poly.c: Same.
1032 * graphite-poly.h: Same.
1033 * graphite-ppl.c: Same.
1034 * graphite-scop-detection.c: Same.
1035 * graphite-sese-to-poly.c: Same.
1038 2009-07-28 Sebastian Pop <sebastian.pop@amd.com>
1040 * graphite-sese-to-poly.c (loop_entry_phi_arg): New.
1041 (remove_simple_copy_phi): New.
1042 (remove_invariant_phi): New.
1043 (simple_copy_phi_p): New.
1044 (reduction_phi_p): New.
1045 (gsi_for_ssa_name_def): New.
1046 (insert_out_of_ssa_copy): New.
1047 (insert_out_of_ssa_copy_on_edge): New.
1048 (create_zero_dim_array): New.
1049 (scalar_close_phi_node_p): New.
1050 (rewrite_close_phi_out_of_ssa): New.
1051 (rewrite_phi_out_of_ssa): New.
1052 (rewrite_reductions_out_of_ssa): New.
1053 (build_poly_scop): Call rewrite_reductions_out_of_ssa.
1055 * testsuite/gcc.dg/graphite/id-11.c: New.
1056 * testsuite/gcc.dg/graphite/id-15.c: New.
1057 * testsuite/gcc.dg/graphite/interchange-1.c: Un-XFAIL.
1058 * testsuite/gcc.dg/graphite/interchange-2.c: Un-XFAIL.
1059 * testsuite/gcc.dg/graphite/interchange-3.c: Un-XFAIL.
1060 * testsuite/gcc.dg/graphite/interchange-4.c: Un-XFAIL.
1061 * testsuite/gcc.dg/graphite/interchange-7.c: Un-XFAIL.
1062 * testsuite/gcc.dg/graphite/scop-matmult.c: Un-XFAIL.
1063 * testsuite/gfortran.dg/graphite/id-13.f: New.
1064 * testsuite/gfortran.dg/graphite/id-5.f: New.
1066 2009-07-28 Sebastian Pop <sebastian.pop@amd.com>
1068 * graphite-clast-to-gimple.c (graphite_loop_normal_form): Do not
1069 check that nb_reductions_in_loop is zero.
1070 * graphite-scop-detection.c (harmful_stmt_in_bb): Don't filter out
1071 reduction phi nodes.
1072 (nb_reductions_in_loop): Removed.
1073 (graphite_can_represent_loop): Do not call nb_reductions_in_loop.
1074 * graphite-sese-to-poly.c (phi_node_is_iv): Removed.
1075 (bb_contains_non_iv_scalar_phi_nodes): Removed.
1076 (scop_contains_non_iv_scalar_phi_nodes): Removed.
1077 (build_poly_scop): Do not call scop_contains_non_iv_scalar_phi_nodes.
1079 2009-07-28 Sebastian Pop <sebastian.pop@amd.com>
1081 * graphite-clast-to-gimple.c (build_cloog_prog): Do not code generate
1082 statements that have an empty iteration domain.
1083 * testsuite/gfortran.dg/graphite/id-16.f: New.
1085 2009-07-28 Sebastian Pop <sebastian.pop@amd.com>
1087 * tree-scalar-evolution.c (instantiate_scev_1): Return
1088 chrec_dont_know when the result is not above instantiate_below.
1089 * graphite-scop-detection.c (scopdet_basic_block_info): Fix formatting.
1090 * graphite-sese-to-poly.c (create_linear_expr_from_tree): Assert that
1091 the tree has a known scalar evolution.
1092 * testsuite/gfortran.dg/graphite/id-14.f: New.
1093 * testsuite/gfortran.dg/graphite/id-15.f: New.
1095 2009-07-28 Sebastian Pop <sebastian.pop@amd.com>
1097 * sese.c (rename_variables_in_stmt): Pass in an extra parameter
1099 (rename_variables): Keep inserting renames after the ones already
1102 2009-07-28 Sebastian Pop <sebastian.pop@amd.com>
1104 * graphite-sese-to-poly.c (compare_bb_depths): New.
1105 (graphite_sort_dominated_info): New.
1106 (build_scop_bbs_1): Call graphite_sort_dominated_info.
1107 (build_scop_scattering): Fix comment.
1109 2009-07-28 Sebastian Pop <sebastian.pop@amd.com>
1111 * graphite.c (graphite_finalize): Call print_loops instead of
1112 dump_function_to_file.
1113 * testsuite/gcc.dg/graphite/graphite.exp: Fix formatting.
1114 * testsuite/gcc.dg/graphite/pr35356-1.c: New. Look for the number of
1115 loops generated in the graphite output file.
1116 * testsuite/gcc.dg/graphite/pr35356-2.c: New.
1117 * testsuite/gcc.dg/graphite/pr35356-3.c: New. XFAILed for now.
1118 * testsuite/gfortran.dg/graphite/id-12.f: New.
1120 2009-07-24 Li Feng <nemokingdom@gmail.com>
1122 * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-8.c:
1125 2009-07-24 Li Feng <nemokingdom@gmail.com>
1126 Tobias Grosser <grosser@fim.uni-passau.de>
1128 * graphite-sese-to-poly.c (pdr_add_alias_set): Use data reference's
1129 alias set number build alias in ACCESSES polyhedron.
1130 (build_alias_set_for_drs): New.
1131 (build_pbb_drs): Added build_alias_set_for_drs.
1132 * graphite-dependences.c (poly_drs_may_alias_p): New.
1133 (graphite_carried_dependence_level_k): Check alias information
1134 before building polyhedron.
1136 2009-07-24 Tobias Grosser <grosser@fim.uni-passau.de>
1138 * Makefile.in (lambda-code.o): Fix formatting.
1140 2009-07-24 Tobias Grosser <grosser@fim.uni-passau.de>
1142 * Merge from mainline (r149350-149952)
1144 2009-07-18 Tobias Grosser <grosser@fim.uni-passau.de>
1146 * graphite-poly.c (apply_poly_transforms): Move strip_mine
1147 before interchange to prepare for loop blocking.
1149 2009-07-18 Tobias Grosser <grosser@fim.uni-passau.de>
1151 * graphite-poly.c (apply_poly_transforms): Add checks after every
1153 * graphite-sese-to-poly.c (build_poly_scop): Remove check, as already
1154 done in apply_poly_transforms.
1156 2009-07-17 Konrad Trifunovic <konrad.trifunovic@gmail.com>
1158 * graphite-dependences.c (build_lexicographically_gt_constraint):
1159 Replace RES parameter with *RES.
1160 (dependence_polyhedron_1): Pass an address of the parameter RES
1161 instead of value of RES.
1163 2009-07-16 Sebastian Pop <sebastian.pop@amd.com>
1165 * graphite.c (graphite_finalize): Fix comment.
1166 (graphite_transform_loops): Reset scev info after code generation
1169 2009-07-16 Sebastian Pop <sebastian.pop@amd.com>
1171 * graphite.c (graphite_finalize): Call scev_reset.
1173 2009-07-16 Sebastian Pop <sebastian.pop@amd.com>
1175 * graphite-clast-to-gimple.c (compute_cloog_iv_types): Do not create
1176 GBB_CLOOG_IV_TYPES hash table twice.
1177 * graphite-sese-to-poly.c (free_gimple_bb): Call free_data_refs.
1178 (add_condition_to_domain): Clear GMP values.
1180 2009-07-16 Sebastian Pop <sebastian.pop@amd.com>
1182 * graphite-dependences.c: Fix formatting.
1183 * graphite-poly.c (free_poly_dr): Also free PDR_DATA_CONTAINER.
1184 (pbb_number_of_iterations): Free ppl_Linear_Expression.
1185 * graphite-sese-to-poly.c: Fix formatting.
1186 * graphite.c (graphite_transform_loops): Create the hash table
1187 after the early return.
1189 2009-07-16 Sebastian Pop <sebastian.pop@amd.com>
1191 * testsuite/gcc.dg/graphite/id-14.c: New.
1192 * testsuite/gcc.dg/graphite/pr40157.c: New.
1193 * testsuite/gfortran.dg/graphite/id-11.f: New.
1195 2009-07-16 Sebastian Pop <sebastian.pop@amd.com>
1197 * graphite-sese-to-poly.c (nb_pbbs_in_loops): New.
1198 (build_poly_scop): Return false when there are no pbbs within
1199 loops to avoid to pass to cloog scops with no loops.
1201 2009-07-16 Sebastian Pop <sebastian.pop@amd.com>
1203 * graphite-sese-to-poly.c (build_pbb_scattering_polyhedrons): Avoid
1204 useless test "i % 2".
1205 (build_pbb_scattering_polyhedrons): Fix formatting.
1206 (build_poly_dr): Same.
1207 * graphite.c (graphite_transform_loops): Restructure.
1209 2009-07-14 Razya Ladelsky <razya@il.ibm.com>
1211 * tree-ssa-loop-manip.c (rewrite_phi_with_iv): Remove
1212 reduction_list parameter.
1213 (rewrite_all_phi_nodes_with_iv): Same.
1214 (canonicalize_loop_ivs): Same.
1215 * tree-parloops.c (struct brli): Removed.
1216 (build_reduction_list_info): Removed.
1217 (build_new_reduction): New.
1218 (analyze_reduction_list): Removed.
1219 (gather_scalar_reductions): Find reductions instead of phi
1220 nodes that can't be canonicalized.
1221 (try_create_reduction_list): Remove reduction_list parameter.
1222 (gen_parallel_loop): Same.
1223 (parallelize_loops): Remove analyze_reductions variable,
1224 initialization and free.
1225 Change reduction_list htab initialization to reduction_info
1226 elements instead of ssa names.
1227 Call try_create_reduction_list and gen_parallel_loop without
1228 analyzed_reduction argument.
1229 * graphite-clast-to-gimple (graphite_loop_normal_form): Call
1230 canonicalize_loop_ivs with one less argument.
1231 * tree-flow.h (canonicalize_loop_ivs): Remove one argument.
1233 2009-07-14 Konrad Trifunovic <konrad.trifunovic@gmail.com>
1235 * graphite-dependences.c (new_poly_dr_pair): New.
1236 (dependence_polyhedron): Renamed into dependence_polyhedron_1.
1237 (new_poly_dr_pair): New.
1238 (eq_poly_dr_pair_p): New.
1239 (hash_poly_dr_pair_p): New.
1240 * graphite-dependences.h (struct poly_dr_pair): New.
1241 (eq_poly_dr_pair_p): Declared.
1242 (hash_poly_dr_pair_p): Declared.
1243 * graphite-poly.c (new_scop): Initialize SCOP_ORIGINAL_PDR_PAIRS.
1244 (free_scop): Free SCOP_ORIGINAL_PDR_PAIRS.
1245 * graphite-poly.h (struct scop): Add original_pdr_pairs field.
1246 * Makefile.in (graphite-poly.o): Add dependence on
1247 graphite-dependences.h.
1249 2009-07-14 Sebastian Pop <sebastian.pop@amd.com>
1251 * graphite-scop-detection.c (graphite_can_represent_scev): Do not let
1252 polynomials of degree > 1 pass to Graphite.
1253 * tree-chrec.c (scev_is_linear_expression): Call
1254 evolution_function_is_affine_multivariate_p.
1255 * testsuite/gfortran.dg/graphite/id-10.f90: New.
1257 2009-07-14 Sebastian Pop <sebastian.pop@amd.com>
1259 * tree-scalar-evolution.c (compute_overall_effect_of_inner_loop):
1260 Instantiate scevs varying in outer loops.
1261 * testsuite/gfortran.dg/graphite/id-9.f: Correct testcase.
1263 2009-07-14 Sebastian Pop <sebastian.pop@amd.com>
1265 * graphite-sese-to-poly.c (build_loop_iteration_domains): Do not insert
1266 redundant constraint.
1268 2009-07-14 Sebastian Pop <sebastian.pop@amd.com>
1270 * testsuite/gcc.dg/graphite/graphite.exp: Fix comments.
1271 * testsuite/gfortran.dg/graphite/graphite.exp: Trigger actions
1272 based on the file names as in the C testsuite.
1273 * testsuite/gfortran.dg/graphite/block-1.f90: Fix patterns.
1274 * testsuite/gfortran.dg/graphite/block-2.f: Same.
1275 * testsuite/gfortran.dg/graphite/block-3.f90: Same.
1276 * testsuite/gfortran.dg/graphite/block-4.f90: Same.
1277 * testsuite/gfortran.dg/graphite/id-1.f90: Same.
1278 * testsuite/gfortran.dg/graphite/id-2.f90: Same.
1279 * testsuite/gfortran.dg/graphite/id-3.f90: Same.
1280 * testsuite/gfortran.dg/graphite/id-4.f90: Same.
1281 * testsuite/gfortran.dg/graphite/id-6.f: Same.
1282 * testsuite/gfortran.dg/graphite/id-9.f: Same.
1283 * testsuite/gfortran.dg/graphite/interchange-1.f: Same.
1284 * testsuite/gfortran.dg/graphite/interchange-2.f: Same.
1285 * testsuite/gfortran.dg/graphite/scop-1.f: Same.
1287 2009-07-14 Sebastian Pop <sebastian.pop@amd.com>
1289 * sese.c (expand_scalar_variables_call): New.
1290 (expand_scalar_variables_ssa_name): Handle calls in expander.
1292 2009-07-13 Sebastian Pop <sebastian.pop@amd.com>
1294 * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-6.c:
1295 Expect to see the pattern twice.
1296 * testsuite/gcc.dg/graphite/interchange-0.c: Un-XFAIL.
1297 * testsuite/gcc.dg/graphite/interchange-5.c: Same.
1298 * testsuite/gcc.dg/graphite/interchange-6.c: Same.
1300 2009-07-13 Sebastian Pop <sebastian.pop@amd.com>
1302 * testsuite/gcc.dg/graphite/id-10.c: New.
1303 * testsuite/gcc.dg/graphite/id-12.c: New.
1304 * testsuite/gfortran.dg/graphite/id-7.f: New.
1305 * testsuite/gfortran.dg/graphite/id-8.f: New.
1307 2009-07-13 Sebastian Pop <sebastian.pop@amd.com>
1309 * graphite-sese-to-poly.c (pdr_add_data_dimensions): Fix division by
1312 2009-07-13 Sebastian Pop <sebastian.pop@amd.com>
1314 * sese.c (rename_variables_in_stmt): Call fold_convert during renaming.
1316 2009-07-13 Sebastian Pop <sebastian.pop@amd.com>
1318 * sese.c (expand_scalar_variables_stmt): Avoid unnecessary expansion.
1320 2009-07-10 Sebastian Pop <sebastian.pop@amd.com>
1322 * graphite-sese-to-poly.c (pdr_add_memory_accesses): Fix order of
1323 building PDR subscripts.
1325 2009-07-10 Sebastian Pop <sebastian.pop@amd.com>
1327 * graphite-sese-to-poly.c (pdr_add_data_dimensions): Fix the
1328 computation of array sizes.
1330 2009-07-10 Sebastian Pop <sebastian.pop@amd.com>
1332 * graphite-sese-to-poly.c (add_param_constraints): Disabled.
1334 2009-07-10 Tobias Grosser <grosser@fim.uni-passau.de>
1336 * graphite-dependences.c (map_into_dep_poly, map_dr_into_dep_poly,
1337 build_pairwise_constraint, dr_equality_constraints,
1338 build_pairwise_scheduling_equality,
1339 build_pairwise_scheduling_inequality, lexicographically_gt_p,
1340 build_lexicographically_gt_constraint, dependence_polyhedron,
1341 graphite_legal_transform_dr, graphite_carried_dependence_level_k):
1342 Move from NNC_Polyhedron to C_Polyhedron.
1343 * graphite-interchange.c (compute_array_size_poly,
1344 gather_access_strides): Dito.
1345 * graphite-poly.c (apply_poly_transforms, new_poly_dr, free_poly_bb,
1346 free_scop, pbb_number_of_iterations): Dito.
1347 * graphite-poly.h (struct poly_dr, pdr_nb_subscripts, struct poly_bb,
1348 pbb_dim_iter_domain, struct scop): Dito.
1349 * graphite-ppl.c (new_Constraint_System_from_Cloog_Matrix,
1350 new_Cloog_Domain_from_ppl_Polyhedron,
1351 new_Cloog_Domain_from_ppl_Pointset_Powerset, ppl_set_coef_gmp,
1352 ppl_insert_dimensions_pointset, ppl_insert_dimensions_pointset,
1353 ppl_strip_loop, ppl_strip_loop, ppl_print_polyhedron_matrix,
1354 ppl_print_powerset_matrix, debug_ppl_polyhedron_matrix,
1355 debug_ppl_powerset_matrix, ppl_read_polyhedron_matrix): Dito.
1356 * graphite-ppl.h (ppl_Pointset_Powerset_C_Polyhedron_t,
1357 new_C_Polyhedron_from_Cloog_Matrix, ppl_print_powerset_matrix,
1358 debug_ppl_powerset_matrix, ppl_insert_dimensions_pointset): Dito.
1359 * graphite-sese-to-poly.c (build_pbb_scattering_polyhedrons,
1360 build_loop_iteration_domains, ppl_constraint_type_from_tree_code,
1361 add_condition_to_domain, add_condition_to_pbb, build_scop_context,
1362 build_scop_iteration_domain, build_poly_dr): Dito
1364 2009-07-09 Sebastian Pop <sebastian.pop@amd.com>
1366 * testsuite/gcc.dg/graphite/graphite.exp: Added a rule to execute
1368 * testsuite/gcc.dg/graphite/run-id-1.c: New.
1370 2009-07-09 Sebastian Pop <sebastian.pop@amd.com>
1372 * graphite-sese-to-poly.c (build_loop_iteration_domains): Add the
1373 positivity constraint on the symbolic number of iterations.
1375 2009-07-09 Sebastian Pop <sebastian.pop@amd.com>
1377 * graphite-sese-to-poly.c (build_loop_iteration_domains): Rewrite.
1379 2009-07-09 Sebastian Pop <sebastian.pop@amd.com>
1380 Tobias Grosser <grosser@fim.uni-passau.de>
1382 * graphite-clast-to-gimple.c (build_scop_context): Removed.
1383 (build_cloog_prog): Directly use SCOP_CONTEXT.
1384 * graphite-poly.c (new_scop): Initialize SCOP_CONTEXT.
1385 (free_scop): Free SCOP_CONTEXT.
1386 (print_scop_context): New.
1387 (print_scop): Call print_scop_context.
1388 (debug_scop_context): New.
1389 * graphite-poly.h (print_scop_context, debug_scop_context): Declared.
1390 (struct scop): Added field context.
1391 (SCOP_CONTEXT): New.
1392 * graphite-sese-to-poly.c (add_param_constraints): New.
1393 (build_scop_context): New.
1394 (build_poly_scop): Call build_scop_context.
1396 2009-07-09 Sebastian Pop <sebastian.pop@amd.com>
1398 * graphite-clast-to-gimple.c (gmp_cst_to_tree): Moved...
1399 * graphite-ppl.c (ppl_set_inhomogeneous_gmp, ppl_set_coef_gmp): New.
1400 (ppl_set_inhomogeneous, ppl_set_coef): Moved...
1401 * graphite-ppl.h: Include double-int.h and tree.h.
1402 (ppl_set_inhomogeneous_gmp, ppl_set_coef_gmp): Declared.
1403 (ppl_set_inhomogeneous, ppl_set_coef): ...here.
1404 (gmp_cst_to_tree): ...here. Reimplemented using mpz_get_double_int.
1405 (tree_int_to_gmp, ppl_set_inhomogeneous_tree, ppl_set_coef_tree): New.
1407 2009-07-09 Sebastian Pop <sebastian.pop@amd.com>
1409 * graphite-clast-to-gimple.c (clast_to_gcc_expression_red): Generate
1410 POINTER_PLUS_EXPR for pointer types.
1411 (clast_to_gcc_expression): Same.
1413 2009-07-09 Sebastian Pop <sebastian.pop@amd.com>
1415 * graphite-poly.c (print_scattering_function): Early return when
1416 PBB_TRANSFORMED_SCATTERING is not initialized.
1417 (print_pbb_domain): Early return when PBB_DOMAIN is not initialized.
1419 2009-07-08 Sebastian Pop <sebastian.pop@amd.com>
1421 * tree-parloops.c (analyze_reduction_list): Remove unused variable
1424 2009-07-08 Razya Ladelsky <razya@il.ibm.com>
1426 * tree-parloops.c (analyze_reduction_list): Change return
1428 (try_create_reduction_list): Move the call to
1429 analyze_reduction_list to the beginining.
1430 Call reduction_phi with analyzed_reductions as argument
1431 instead of reduction_list.
1433 2009-07-08 Tobias Grosser <grosser@fim.uni-passau.de>
1435 * Merge from mainline (r148296:149346)
1437 2009-07-07 Sebastian Pop <sebastian.pop@amd.com>
1439 * graphite-scop-detection.c (graphite_can_represent_init): New.
1440 (graphite_can_represent_scev): Call graphite_can_represent_init:
1441 check that the initial value does not contain multiplications of
1443 (stmt_has_simple_data_refs_p): New.
1444 (stmt_simple_for_scop_p): Call stmt_simple_for_scop_p.
1445 (is_simple_operand): Fix formatting.
1446 * graphite-sese-to-poly.c (try_generate_gimple_bb): Fix formatting.
1448 2009-07-07 Sebastian Pop <sebastian.pop@amd.com>
1450 * testsuite/gcc.dg/graphite/id-13.c: New.
1451 * graphite-sese-to-poly.c (graphite_stmt_p): Do not call
1452 analyze_scalar_evolution, use scalar_evolution_in_region.
1453 (scan_tree_for_params_right_scev): Add extra assert.
1454 (parameter_index_in_region_1): Split from parameter_index_in_region.
1455 (idx_record_params): Use scalar_evolution_in_region.
1456 (find_params_in_bb): Same.
1457 (find_scop_parameters): Same.
1458 (build_loop_iteration_domains): Same.
1459 (create_linear_expr_from_tree): Same.
1460 * sese.c (scalar_evolution_in_region): New.
1461 * sese.h (scalar_evolution_in_region): Declared.
1462 (defined_in_sese_p): New.
1463 * tree-scalar-evolution.c (compute_overall_effect_of_inner_loop): Not
1465 * tree-scalar-evolution.h (compute_overall_effect_of_inner_loop):
1468 2009-07-07 Sebastian Pop <sebastian.pop@amd.com>
1470 * Makefile.in: Replace dependences on tree-chrec.h with SCEV_H.
1471 TREE_DATA_REF_H also implies SCEV_H.
1473 2009-07-07 Sebastian Pop <sebastian.pop@amd.com>
1475 * graphite-poly.c (print_scop_params): New.
1476 (print_scop): Call print_scop_params.
1477 (debug_scop_params): New.
1478 * graphite-poly.h (print_scop_params, debug_scop_params): Declared.
1480 2009-07-07 Li Feng <nemokingdom@gmail.com>
1482 * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-4.c: New.
1483 * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-5.c: New.
1484 * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-6.c: New.
1485 * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-7.c: New.
1486 * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-8.c: New.
1487 * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-9.c: New.
1489 2009-07-07 Li Feng <nemokingdom@gmail.com>
1491 * graphite-clast-to-gimple.c (mark_loops_parallel): Dump information
1492 for dependency checking part.
1493 * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-1.c: Add
1494 tests for dependency checking.
1495 * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-2.c: Ditto.
1496 * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-3.c: Ditto.
1497 * testsuite/gcc.dg/graphite/graphite_autopar/graphite_autopar.exp: Add
1498 flag -fdump-tree-graphite-all for autopar testsuites.
1500 2009-07-06 Sebastian Pop <sebastian.pop@amd.com>
1502 * Makefile.in (tree-ssa-loop-manip.o): Depends on langhooks.h.
1503 * tree-parloops.c (rewrite_phi_with_iv, rewrite_all_phi_nodes_with_iv,
1504 canonicalize_loop_ivs): Moved...
1505 * tree-ssa-loop-manip.c: ... here. Include langhooks.h.
1507 2009-07-06 Sebastian Pop <sebastian.pop@amd.com>
1509 * tree-parloops.c (try_create_reduction_list): Pass an extra
1510 argument analyzed_reductions. Call analyze_reduction_list.
1511 (gen_parallel_loop): Do not call analyze_reduction_list.
1512 (parallelize_loops): Init and finalize analyzed_reductions.
1514 2009-07-06 Li Feng <nemokingdom@gmail.com>
1516 * testsuite/gcc.dg/graphite/graphite_autopar/graphite_autopar.exp:
1517 Added flag -fno-loop-strip-mine for autopar testcase.
1519 2009-07-04 Li Feng <nemokingdom@gmail.com>
1521 * graphite-dependences.c (graphite_carried_dependence_level_k): Use
1522 transformed scattering dimension instead of unmatch orignal when
1523 calling dependence_polyhedron.
1525 2009-06-30 Sebastian Pop <sebastian.pop@amd.com>
1527 * opts.c (decode_options): Enable flag_loop_strip_mine at -O2.
1529 2009-06-30 Sebastian Pop <sebastian.pop@amd.com>
1531 * graphite-poly.c (pbb_number_of_iterations): Check for returned
1532 value 1 from ppl_Pointset_Powerset_NNC_Polyhedron_maximize.
1534 2009-06-30 Sebastian Pop <sebastian.pop@amd.com>
1536 * graphite-blocking.c (pbb_strip_mine_profitable_p): New.
1537 (pbb_do_strip_mine): Call pbb_strip_mine_profitable_p.
1538 * graphite-poly.c (pbb_number_of_iterations): New.
1539 * graphite-poly.h (pbb_number_of_iterations): Declared.
1540 (pbb_iterator_dim, pbb_parameter_dim): New.
1542 2009-06-29 Sebastian Pop <sebastian.pop@amd.com>
1544 * graphite-clast-to-gimple.c (graphite_create_new_loop): Revert the
1545 last commit on type of lower and upper bound of loops.
1547 2009-06-29 Li Feng <nemokingdom@gmail.com>
1549 * Makefile.in (graphite-clast-to-gimple.o): Added dependence on
1550 graphite-dependences.h.
1551 * graphite-clast-to-gimple.c (new_bb_pbb_def): New.
1552 (mark_bb_with_pbb): New.
1553 (get_stmtfor_depth): New.
1554 (find_pbb_via_hash): New.
1555 (dependency_in_loop_p): New.
1556 (mark_loops_parallel): New.
1557 (free_aux_in_new_loops): New.
1558 (translate_clast): Add parameter BB_PBB_MAPPING. Mark newly created
1559 bb with it's relevant pbb. Mark newly created loops. Remove mark
1560 innermost loop parallel without checking.
1561 (gloog): Add parameter BB_PBB_MAPPING.
1562 * graphite-clast-to-gimple.h (struct bb_pbb_def): New.
1563 (gloog): Change declaration.
1564 (mark_loop_parallel): Make extern.
1565 (free_aux_in_new_loops): Declare.
1566 (bb_pbb_map_hash): New.
1567 (eq_bb_pbb_map): New.
1568 * graphite.c (graphite_transform_loops): Added BB_PBB_MAPPING. Trigger
1569 auto parallelization when flag_graphite_force_parallel is set.
1570 (graphite_finalize): Added free_aux_in_new_loops.
1571 * tree-parloops.c (parallelize_loops): Only generate parallel code for
1572 the innermost loop that marked parallel. Use
1573 flag_graphite_force_parallel instead of loop->can_be_parallel.
1574 (loop_parallel_p): Move inner most checking out of function.
1576 2009-06-26 Sebastian Pop <sebastian.pop@amd.com>
1578 * graphite-clast-to-gimple.c (graphite_create_new_loop): Make the
1579 type of lower and upper bound of loops signed long int.
1581 2009-06-26 Sebastian Pop <sebastian.pop@amd.com>
1583 * cfgloopmanip.c (create_empty_loop_on_edge): Gimplify the loop exit
1584 expression outside the loop.
1586 2009-06-26 Sebastian Pop <sebastian.pop@amd.com>
1588 * gcc.dg/graphite/interchange-8.c: New.
1590 2009-06-26 Sebastian Pop <sebastian.pop@amd.com>
1592 * gcc.dg/graphite/interchange-0.c: XFailed.
1593 * gcc.dg/graphite/interchange-5.c: XFailed.
1594 * gcc.dg/graphite/interchange-6.c: XFailed.
1596 2009-06-26 Sebastian Pop <sebastian.pop@amd.com>
1598 * graphite-interchange.c (compute_array_size_poly): The end of the
1599 recursion should return 1.
1601 2009-06-26 Sebastian Pop <sebastian.pop@amd.com>
1603 * graphite-interchange.c (compute_array_size_cstr): Allow the
1604 subscript multiplier to be -1.
1605 (compute_array_size): Use PDR_DATA_CONTAINER and not PDR_ACCESSES.
1606 * graphite-poly.c (new_poly_dr): Takes an extra argument for the
1607 data_container. Initializes PDR_DATA_CONTAINER.
1608 (print_pdr_access_layout): New.
1609 (print_pdr): Call print_pdr_access_layout. Print PDR_DATA_CONTAINER.
1610 * graphite-poly.h (struct poly_dr): Adjust comment. Add a new field
1612 (PDR_DATA_CONTAINER): New.
1613 (new_poly_dr): Update declaration.
1614 * graphite-sese-to-poly.c (pdr_add_data_dimensions): New.
1615 (build_poly_dr): Call pdr_add_data_dimensions.
1617 2009-06-26 Sebastian Pop <sebastian.pop@amd.com>
1619 * graphite-poly.h (struct poly_dr): Fix comment.
1620 * graphite-sese-to-poly.c (pdr_add_alias_set): New.
1621 (pdr_add_memory_accesses): New.
1622 (build_poly_dr): Call pdr_add_memory_accesses and pdr_add_alias_set.
1624 2009-06-26 Sebastian Pop <sebastian.pop@amd.com>
1626 * graphite-poly.c (print_pdrs, debug_pdrs): New.
1627 (print_pbb): Add call to print_pdrs.
1628 * graphite-poly.h (print_pdrs, debug_pdrs): Declared.
1630 2009-06-24 Konrad Trifunovic <konrad.trifunovic@gmail.com>
1631 Li Feng <nemokingdom@gmail.com>
1633 * graphite-dependences.c (graphite_carried_dependence_level_k): New.
1634 (dependency_between_pbbs_p): New.
1635 (lexicographically_gt_p): Assure !empty_p before polyhedron
1636 intersection assign.
1637 (build_lexicographically_gt_constraint): Correct lexicographically
1639 * graphite-dependences.h: New.
1640 * Makefile.in (graphite-dependences.o): Add graphite-dependences.h.
1642 2009-06-24 Sebastian Pop <sebastian.pop@amd.com>
1644 * graphite-clast-to-gimple.c (print_clast_stmt): New.
1645 (gloog): Print to dump_file the generated clast.
1646 * graphite-clast-to-gimple.h (print_clast_stmt): Declared.
1647 * graphite-interchange.c (pbb_do_interchange): Fix dump formatting.
1649 2009-06-24 Sebastian Pop <sebastian.pop@amd.com>
1651 * graphite-poly.c (extend_scattering): Increment
1652 PBB_NB_LOCAL_VARIABLES by the number of added dimensions.
1654 2009-06-24 Sebastian Pop <sebastian.pop@amd.com>
1656 * graphite-interchange.c (compute_array_size_poly): Added exit of
1657 recursion condition. Continue iterating even after the first equality.
1658 (compute_array_size): Same.
1660 2009-06-24 Li Feng <nemokingdom@gmail.com>
1662 * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-1.c: Update
1663 -fdump-tree-final_cleanup to -fdump-tree-optimized.
1664 * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-2.c: Ditto.
1665 * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-3.c: Ditto.
1666 * testsuite/gcc.dg/graphite/graphite_autopar/graphite_autopar.exp: Ditto.
1668 2009-06-23 Sebastian Pop <sebastian.pop@amd.com>
1670 * sese.c (expand_scalar_variables_stmt): Expand scalar variables
1671 only when the use verifies is_gimple_reg.
1673 2009-06-23 Sebastian Pop <sebastian.pop@amd.com>
1675 * graphite-clast-to-gimple.c (build_cloog_prog): Fix memory corruption.
1676 Allocate scaldims after call to unify_scattering_dimensions.
1678 2009-06-23 Sebastian Pop <sebastian.pop@amd.com>
1680 * graphite-clast-to-gimple.c (translate_clast): Fix memory leak.
1682 2009-06-23 Sebastian Pop <sebastian.pop@amd.com>
1683 Albert Cohen <albert.cohen@inria.fr>
1685 * graphite-blocking.c (pbb_strip_mine_loop_depth): Do not use local
1686 variables for the strip mining.
1688 2009-06-23 Sebastian Pop <sebastian.pop@amd.com>
1689 Pranav Garg <pranav.garg2107@gmail.com>
1691 * Makefile.in (OBJS-common): Added graphite-blocking.o.
1692 (graphite-sese-to-poly.o): Moved down to be in lexicographical order.
1693 (graphite-blocking.o): New rule.
1694 (graphite-poly.o, graphite-ppl.o): Moved to be in lexicographical order.
1695 * graphite-blocking.c: New.
1696 * graphite-poly.c (apply_poly_transforms): Call scop_do_strip_mine for
1697 flag_loop_strip_mine.
1698 (psct_scattering_dim_for_loop_depth): New.
1699 * graphite-poly.h (scop_do_strip_mine): Declared.
1700 (psct_add_local_variable): Increment PBB_NB_LOCAL_VARIABLES.
1701 * tree-ssa-loop.c (gate_graphite_transforms): Do not fail when using
1702 flag_loop_strip_mine.
1704 2009-06-23 Sebastian Pop <sebastian.pop@amd.com>
1706 * graphite-poly.c (extend_scattering): Avoid initializing and freeing
1707 a GMP value and a PPL coefficient at each iteration of a loop.
1709 2009-06-23 Sebastian Pop <sebastian.pop@amd.com>
1711 * graphite-dependences.c (dependence_polyhedron): Do not use
1712 pbb_nb_scattering_dims anymore. Use pbb_nb_scattering_orig and
1713 pbb_nb_scattering_transform.
1714 (graphite_legal_transform_dr): Same.
1715 * graphite-poly.c (extend_scattering): Same.
1716 (unify_scattering_dimensions): Same.
1717 (print_scattering_function): Same.
1718 (new_poly_bb): Initialize PBB_NB_SCATTERING_TRANSFORM and
1719 PBB_NB_LOCAL_VARIABLES.
1720 * graphite-poly.h (pbb_nb_scattering): Removed declaration.
1721 (struct poly_bb): Added nb_local_variables and nb_scattering_transform.
1722 (PBB_NB_LOCAL_VARIABLES, PBB_NB_SCATTERING_TRANSFORM): New.
1723 (pbb_nb_scattering_orig, pbb_nb_scattering_transform): New.
1724 (pbb_nb_scattering_dims, pbb_nb_scattering): Removed.
1725 (pbb_nb_scattering_transform): New.
1726 (pbb_nb_local_vars): Return PBB_NB_LOCAL_VARIABLES.
1727 (psco_scattering_dim): Add assert on parameters.
1728 (psct_scattering_dim): Same.
1729 (psct_scattering_dim_for_loop_depth): Declared.
1730 (psct_local_var_dim): New.
1731 (psco_iterator_dim, psco_parameter_dim): Add assert on parameters.
1732 (psct_iterator_dim, psct_parameter_dim): Same. To maintain the
1733 correct layout, call pbb_nb_local_vars.
1734 (psct_add_local_variable, psct_add_scattering_dimension): New.
1735 * graphite-sese-to-poly.c (build_pbb_scattering_polyhedrons):
1736 Initialize PBB_NB_SCATTERING_TRANSFORM.
1738 2009-06-23 Sebastian Pop <sebastian.pop@amd.com>
1740 * graphite-ppl.c (set_inhomogeneous): Renamed ppl_set_inhomogeneous.
1741 (set_coef): Renamed ppl_set_coef.
1742 * graphite-ppl.h (ppl_set_inhomogeneous, ppl_set_coef): Declared.
1744 2009-06-23 Sebastian Pop <sebastian.pop@amd.com>
1746 * graphite-dependences.c (build_pairwise_scheduling_inequality): Don't
1747 test a boolean against 1.
1748 * graphite-interchange.c (pbb_interchange_loop_depths): Do not build
1749 a new polyhedron for the PBB_TRANSFORMED_SCATTERING.
1750 (pbb_do_interchange): Returns true when a transform has been performed.
1751 (scop_do_interchange): Same.
1752 * graphite-poly.c (apply_poly_transforms): Use the return value of
1753 scop_do_interchange.
1754 * graphite-poly.h (scop_do_interchange): Update declaration.
1756 2009-06-23 Tobias Grosser <grosser@fim.uni-passau.de>
1758 * graphite-clast-to-gimple.c (gloog): Reset loop->aux right
1760 * sese.c (sese_reset_aux_in_loops): New.
1761 * sese.h (sese_reset_aux_in_loops): New.
1763 2009-06-19 Sebastian Pop <sebastian.pop@amd.com>
1765 * graphite-sese-to-poly.c (scan_tree_for_params_int): Pass in the
1766 multiplier and multiply the constant by the multiplier.
1767 (scan_tree_for_params): Bound the multiplier to its MULT_EXPR.
1768 (build_poly_dr): Do not use the multiplier to define the subscript.
1770 2009-06-19 Sebastian Pop <sebastian.pop@amd.com>
1772 * graphite-poly.c (new_poly_dr): Pass an extra argument for the
1773 compiler's data reference. Initialize PDR_CDR.
1774 (print_pdr): Call dump_data_reference.
1775 * graphite-poly.h (struct poly_dr): Rename black_box into pbb.
1776 Add compiler_dr field.
1777 (PDR_BB): Renamed PDR_PBB.
1779 * graphite-sese-to-poly.c (build_poly_dr): Pass to new_poly_dr
1780 GCC's data reference representation.
1781 * tree-data-ref.c (debug_data_references, debug_data_reference): New.
1782 * tree-data-ref.h (debug_data_references, debug_data_reference): Decl.
1784 2009-06-19 Sebastian Pop <sebastian.pop@amd.com>
1786 * graphite-poly.c (print_scattering_function): Also print the layout.
1787 * graphite-poly.h (pbb_nb_local_vars): New.
1789 2009-06-19 Sebastian Pop <sebastian.pop@amd.com>
1791 * graphite-poly.c (print_pbb_domain): Also print the layout names.
1793 2009-06-19 Sebastian Pop <sebastian.pop@amd.com>
1795 * graphite-poly.c (print_pdr, debug_pdr): New.
1796 * graphite-poly.h (print_pdr, debug_pdr): Declared.
1797 (PDR_BASE): Removed.
1799 2009-06-18 Sebastian Pop <sebastian.pop@amd.com>
1801 * gcc/testsuite/gcc.dg/graphite/interchange-{1..7}.c: New avatars of
1804 2009-06-18 Sebastian Pop <sebastian.pop@amd.com>
1806 * graphite-interchange.c (compute_subscript): Allow also -1 in the
1807 subscript identification column.
1808 (pbb_do_interchange): Print to dump_file that some loops "will be
1809 interchanged". Rely on that chain of characters in the testcases.
1810 * gcc.dg/graphite/interchange-0.c: New.
1811 * gcc.dg/graphite/graphite.exp: Iterate over the testsuite
1812 interchange-*.c files and compile them with -floop-interchange.
1814 2009-06-18 Pranav Garg <pranav.garg2107@gmail.com>
1816 * graphite-interchange.c (interchange_profitable_p): Renamed
1817 pbb_interchange_profitable_p.
1819 2009-06-18 Sebastian Pop <sebastian.pop@amd.com>
1820 Harsha Jagasia <harsha.jagasia@amd.com>
1821 Pranav Garg <pranav.garg2107@gmail.com>
1823 * graphite-interchange.c (interchange_profitable_p): Make static.
1824 (pbb_interchange_loop_depths, pbb_do_interchange,
1825 scop_do_interchange): New.
1826 * graphite-poly.c (apply_poly_transforms): Call scop_do_interchange
1827 for flag_loop_interchange.
1828 * graphite-poly.h (scop_do_interchange): Declared.
1829 * tree-ssa-loop.c (gate_graphite_transforms): Do not fail when
1830 flag_loop_interchange is used.
1832 2009-06-18 Sebastian Pop <sebastian.pop@amd.com>
1834 * graphite-dependences.c (dependence_polyhedron): Update use of
1835 pbb_nb_scattering_dims.
1836 * graphite-poly.h (pbb_nb_scattering_dims): Do not pass SCOP.
1837 (pbb_nb_scattering): Update use of pbb_nb_scattering_dims.
1838 (psco_scattering_dim, psct_scattering_dim, psco_iterator_dim,
1839 psct_iterator_dim, psco_parameter_dim, psct_parameter_dim): New.
1841 2009-06-16 Sebastian Pop <sebastian.pop@amd.com>
1843 * graphite.c: Cleanup foo.
1845 2009-06-16 Sebastian Pop <sebastian.pop@amd.com>
1847 * Merge from mainline (r143684:148293).
1848 * Disabled libpcp until it gets fixed.
1850 2009-06-05 Sebastian Pop <sebastian.pop@amd.com>
1851 Harsha Jagasia <harsha.jagasia@amd.com>
1853 * graphite-interchange.c: New.
1854 * Makefile.in (graphite-interchange.o): New.
1855 * graphite-poly.h (interchange_profitable_p): Declared.
1856 * graphite-ppl.h (value_max): New.
1858 2009-06-04 Sebastian Pop <sebastian.pop@amd.com>
1860 * graphite-dependences.c (dependence_polyhedron): Use pdr_dim.
1861 * graphite-poly.h: Fix some comments.
1865 2009-06-04 Sebastian Pop <sebastian.pop@amd.com>
1868 (pdr_accessp_nb_subscripts): Renamed pdr_nb_subscripts.
1869 (pdr_accessp_nb_iterators): Renamed pdr_dim_iter_domain.
1870 (pdr_accessp_nb_params): Renamed pdr_nb_params.
1871 (pdr_accessp_alias_set_dim): Renamed pdr_alias_set_dim.
1872 (pdr_accessp_subscript_dim): Renamed pdr_subscript_dim.
1873 (pdr_accessp_iterator_dim): Renamed pdr_iterator_dim.
1874 (pdr_accessp_param_dim): Renamed pdr_parameter_dim.
1875 (pbb_nb_loops): Renamed pbb_dim_iter_domain.
1876 * graphite-clast-to-gimple.c: Same.
1877 * graphite-dependences.c: Same.
1878 * graphite-poly.c: Same.
1879 * graphite-sese-to-poly.c: Same.
1881 2009-06-03 Sebastian Pop <sebastian.pop@amd.com>
1883 * graphite-clast-to-gimple.c (build_iv_mapping): Insert full
1884 expressions for an IV rename, as returned by clast_to_gcc_expression.
1885 (copy_renames): Rename new_name to expr.
1886 * sese.c (debug_rename_elt): Same.
1889 (sese_adjust_liveout_phis): Call force_gimple_operand before using
1890 the information from the rename map.
1891 (rename_variables_in_stmt): Same.
1892 (add_loop_exit_phis): Rename new_name to expr.
1893 (insert_loop_close_phis): Same.
1894 (add_guard_exit_phis): Same. Call force_gimple_operand.
1895 * sese.h (struct rename_map_elt): Rename new_name to expr.
1896 (new_rename_map_elt): Same.
1898 2009-06-03 Sebastian Pop <sebastian.pop@amd.com>
1900 * graphite-clast-to-gimple.c (build_iv_mapping): Use set_rename.
1901 * sese.c (set_rename): Make it extern.
1902 * sese.h (set_rename): Declared.
1904 2009-06-03 Sebastian Pop <sebastian.pop@amd.com>
1906 * graphite-poly.c (extend_scattering): Free values.
1907 * graphite-ppl.c (new_Cloog_Domain_from_ppl_Pointset_Powerset):
1909 (ppl_print_powerset_matrix): Same.
1910 * graphite-scop-detection.c (free_scops_1): New.
1911 (limit_scops): Call free_scops_1.
1912 * graphite-sese-to-poly.c (build_scop_bbs_1): Free dom.
1913 (build_poly_dr): Free PPL coefficients.
1914 * tree-parloops.c (rewrite_all_phi_nodes_with_iv): Free bbs.
1916 2009-06-02 Sebastian Pop <sebastian.pop@amd.com>
1918 * graphite-dependences.c: New.
1919 * graphite-data-ref.c: Removed.
1920 * graphite-data-ref.h: Removed.
1921 * Makefile.in (graphite-data-ref.o): Removed.
1922 (graphite-dependences.o): Added.
1923 * graphite-clast-to-gimple.c: Remove dependence on graphite-data-ref.h.
1924 * graphite-poly.c: Same.
1925 Move the data dependence testing to graphite-dependences.c.
1927 2009-05-19 Tobias Grosser <grosser@fim.uni-passau.de>
1929 * graphite-scop-detection.c (graphite_can_represent_loop): Renamed
1930 from graphite_cannot_represent_loop. Code refactored.
1931 (scopdet_basic_block_info): Call graphite_can_represent_loop.
1933 2009-05-17 Li Feng <nemokingdom@gmail.com>
1935 * testsuite/gcc.dg/graphite/graphite_autopar/graphite_autopar.exp:
1936 Cover all the testcases (not only the filtered ones).
1938 2009-05-17 Tobias Grosser <grosser@fim.uni-passau.de>
1940 * graphite-scop-detection.c (stmt_simple_for_scop_p): Remove
1941 unnecessary check. Update comments. Move check for REAL_TYPE here.
1942 (harmful_stmt_in_bb): Remove checks for conditions. This is already
1943 done in (stmt_simple_for_scop_p).
1945 2009-05-14 Tobias Grosser <grosser@fim.uni-passau.de>
1947 * graphite.c (print_global_statistics): New.
1948 (print_graphite_scop_statistic): New.
1949 (print_graphite_statistics): New.
1950 (graphite_initialize, graphite_transform_loops): Print statistics.
1951 * graphite-scop-detection (build_scops): Print statistics.
1952 (print_graphite_scop_statistics): New.
1953 (print_graphite_statistics): New.
1955 2009-05-13 Sebastian Pop <sebastian.pop@amd.com>
1957 * graphite-clast-to-gimple.c (struct clast_name_index): Removed.
1958 (debug_clast_name_index): Removed.
1959 (debug_clast_name_indexes_1): Removed.
1960 (debug_clast_name_indexes): Removed.
1961 (clast_name_index_elt_info): Removed.
1962 (eq_clast_name_indexes): Removed.
1963 (clast_name_to_index): Removed.
1964 (new_clast_name_index): Removed.
1965 (save_clast_name_index): Removed.
1966 (save_var_name): Moved...
1967 (init_sese_params_index): Removed.
1968 (clast_name_to_gcc): Remove use of name_tree.
1969 (initialize_cloog_names): Same.
1970 (gloog): Do not call init_sese_params_index.
1971 * graphite-sese-to-poly.c (save_var_name): ...here.
1972 (parameter_index_in_region): New.
1973 * sese.c (new_sese): Initialize SESE_PARAMS_NAMES.
1974 (parameter_index_in_region): Removed.
1975 (is_parameter): Remove use of name_tree.
1976 * sese.h (struct name_tree): Removed.
1977 (struct sese): Remove use of name_tree. New field params_names.
1978 (SESE_PARAMS_NAMES): New.
1979 (SESE_PARAMS): Remove duplicate.
1980 (parameter_index_in_region): Removed.
1981 (sese_nb_params): Remove use of name_tree.
1982 (struct clast_name_index): New.
1983 (new_clast_name_index): New.
1984 (clast_name_to_index): New.
1985 (save_clast_name_index): New.
1986 (debug_clast_name_index): New.
1987 (debug_clast_name_indexes_1): New.
1988 (debug_clast_name_indexes): New.
1989 (clast_name_index_elt_info): New.
1990 (eq_clast_name_indexes): New.
1992 2009-05-13 Sebastian Pop <sebastian.pop@amd.com>
1994 * graphite-clast-to-gimple.c (compute_cloog_iv_types_1): Call
1995 pbb_to_depth_to_oldiv. Remove call to oldiv_for_loop.
1996 (graphite_loop_normal_form): Do not pass region. Do not
1997 initialize SESE_OLDIVS.
1998 (build_graphite_loop_normal_form): Update call to
1999 graphite_loop_normal_form.
2000 * sese.c (debug_oldivs): Removed.
2001 (new_sese): Do not initialize SESE_OLDIVS.
2002 (free_sese): Do not free SESE_OLDIVS.
2003 (oldiv_for_loop): Removed.
2004 * sese.h (struct sese): Remove old_ivs.
2005 (SESE_OLDIVS): Removed.
2006 (oldiv_for_loop): Removed.
2008 2009-05-13 Sebastian Pop <sebastian.pop@amd.com>
2010 * graphite-clast-to-gimple.c (clast_name_to_gcc): Pass newivs,
2011 remove ivstack. Remove call to loop_iv_stack_get_iv_from_name,
2012 replaced by a call to newivs_to_depth_to_newiv.
2013 (clast_to_gcc_expression): Pass newivs, remove ivstack.
2014 (clast_to_gcc_expression_red): Same.
2015 (gcc_type_for_clast_expr): Same.
2016 (gcc_type_for_clast_eq): Same.
2017 (graphite_translate_clast_equation): Same.
2018 (graphite_create_guard_cond_expr): Same.
2019 (graphite_create_new_guard): Same.
2020 (graphite_create_new_loop): Same.
2021 (build_iv_mapping): Same.
2022 (translate_clast): Same.
2024 (loop_iv_stack_patch_for_consts): Removed. *
2025 sese.c (iv_stack_entry_is_constant): Removed.
2026 (iv_stack_entry_is_iv): Removed.
2027 (loop_iv_stack_push_iv): Removed.
2028 (loop_iv_stack_insert_constant): Removed.
2029 (loop_iv_stack_pop): Removed.
2030 (loop_iv_stack_get_iv): Removed.
2031 (loop_iv_stack_get_iv_from_name): Removed.
2032 (debug_loop_iv_stack): Removed.
2033 (free_loop_iv_stack): Removed.
2034 (loop_iv_stack_remove_constants): Removed. *
2035 sese.h (iv_stack_entry_kind): Removed.
2036 (iv_stack_entry_data_union): Removed.
2037 (iv_stack_entry_struct): Removed.
2038 (iv_stack_entry_p): Removed.
2039 (debug_oldivs, debug_loop_iv_stack, loop_iv_stack_insert_constant,
2040 loop_iv_stack_get_iv_from_name, loop_iv_stack_push_iv,
2041 loop_iv_stack_get_iv, loop_iv_stack_remove_constants,
2042 loop_iv_stack_pop, free_loop_iv_stack): Removed.
2043 (gbb_loop_at_index): Fix indenting.
2044 (gbb_loop_index): Removed.
2046 2009-05-13 Sebastian Pop <sebastian.pop@amd.com>
2048 * graphite-clast-to-gimple.c (clast_name_to_gcc): Do not use strcmp.
2049 Call clast_name_to_index.
2051 2009-05-13 Sebastian Pop <sebastian.pop@amd.com>
2053 * graphite-clast-to-gimple.c (clast_name_to_gcc): Pass region,
2054 do not pass params. Get params from SESE_PARAMS.
2055 (clast_to_gcc_expression): Same.
2056 (clast_to_gcc_expression_red): Same.
2057 (gcc_type_for_clast_eq): Same.
2058 (graphite_translate_clast_equation): Same.
2059 (graphite_create_new_loop): Same.
2060 * sese.c (rename_variables_in_stmt): Fix comment.
2062 2009-05-13 Sebastian Pop <sebastian.pop@amd.com>
2064 * graphite-clast-to-gimple.c (graphite_create_new_loop): Pass
2066 Call save_clast_name_index.
2067 (translate_clast): Pass newivs_index.
2068 (gloog): Create and free newivs_index.
2070 2009-05-13 Sebastian Pop <sebastian.pop@amd.com>
2072 * graphite-clast-to-gimple.c (clast_name_index): New structure.
2073 (clast_name_index_p): New type.
2074 (debug_clast_name_index): New.
2075 (debug_clast_name_indexes_1): New.
2076 (debug_clast_name_indexes): New.
2077 (clast_name_index_elt_info): New.
2078 (eq_clast_name_indexes): New.
2079 (clast_name_to_index): New.
2080 (new_clast_name_index): New.
2081 (save_clast_name_index): New.
2082 (init_sese_params_index): New.
2083 (gloog): Call init_sese_params_index.
2084 * graphite-clast-to-gimple.h (debug_clast_name_indexes): Declared.
2085 * sese.c (new_sese): Initialize SESE_PARAMS_INDEX.
2086 (free_sese): Free SESE_PARAMS_INDEX.
2087 * sese.h (struct sese): Add params_index.
2088 (SESE_PARAMS_INDEX): New.
2090 2009-05-13 Sebastian Pop <sebastian.pop@amd.com>
2092 * graphite-clast-to-gimple.c (newivs_to_depth_to_newiv): New.
2093 (graphite_create_new_loop): Pass the newivs vector. Push the
2094 newly created IV to newivs.
2095 (translate_clast): Pass the newivs vector.
2096 (gloog): Create and destroy the newivs vector.
2098 2009-05-13 Sebastian Pop <sebastian.pop@amd.com>
2100 * graphite-clast-to-gimple.c (pbb_to_depth_to_oldiv): New.
2101 (graphite_loop_normal_form): Initialize loop->aux with the unique
2102 IV that has been created.
2104 2009-05-13 Tobias Grosser <grosser@fim.uni-passau.de>
2106 * tree-chrec.c (evolution_function_right_is_integer_cst): Allow
2107 scev with parameters in the base part. They where forbidden
2110 2009-05-11 Li Feng <nemokingdom@gmail.com>
2112 * testsuite/gcc.dg/graphite/graphite.exp: Set different default
2113 compile options by file names.
2114 * testsuite/gcc.dg/graphite/block{0-6}.c: Remove dg-option line.
2115 * testsuite/gcc.dg/graphite/id-{1-9}.c: Ditto.
2116 * testsuite/gcc.dg/graphite/scop-{0-20}.c: Ditto.
2117 * testsuite/gcc.dg/graphite/scop-matmult.c: Ditto.
2119 2009-05-08 Li Feng <nemokingdom@gmail.com>
2121 * testsuite/gcc.dg/graphite/graphite_autopar/graphite_autopar.exp: New.
2122 * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-1.c: New.
2123 * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-2.c: New.
2124 * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-3.c: New.
2126 2009-05-07 Tobias Grosser <grosser@fim.uni-passau.de>
2128 * graphite-scop-detection (build_scops_1): Fix little bug introduced
2131 2009-05-07 Tobias Grosser <grosser@fim.uni-passau.de>
2133 * graphite-scop-detection.c (graphite_can_represent_scev): Only
2134 allow integer constant strides.
2135 (graphite_can_represent_expr): Depend on outermost_loop.
2136 (stmt_simple_memref_p, graphite_cannot_represent_loop,
2137 harmful_stmt_in_bb, is_simple_operand, stmt_simple_for_scop_p,
2138 build_scops_1): Same.
2139 (scopdet_basic_block_info): Same and insert layered SCoP
2141 (try_generate_gimple_bb): Cleanup.
2142 (build_scops): Enable data references.
2144 * testsuite/gcc.dg/graphite/id-5.c: New.
2145 * testsuite/gcc.dg/graphite/id-9.c: New.
2146 * tree-chrec.c (evolution_function_right_is_integer_cst): New.
2147 * tree-chrec.h (evolution_function_right_is_integer_cst): New.
2149 2009-05-06 Tobias Grosser <grosser@fim.uni-passau.de>
2151 * sese.c (expand_scalar_variables_ssa_name): Only build expressions,
2152 that we have not yet built for this SCoP.
2154 2009-05-06 Tobias Grosser <grosser@fim.uni-passau.de>
2156 * sese.c (expand_scalar_variables_expr): Fix expand_scalar_variables
2157 for complex numbers.
2159 2009-05-06 Tobias Grosser <grosser@fim.uni-passau.de>
2161 * graphite-ppl.c: Fix build if cloog is not available.
2163 2009-05-04 Li Feng <nemokingdom@gmail.com>
2165 * tree-parloops.c (loop_parallel_p): Remove construction of
2166 NITER and REDUCTION_LIST.
2167 (try_get_loop_niter): New.
2168 (try_create_reduction_list): New.
2169 (parallelize_loops): Bypass the failed checkings in autopar
2170 when can_be_parallel in loop structure is set to true.
2172 2009-05-01 Tobias Grosser <grosser@fim.uni-passau.de>
2174 * testsuite/gcc.dg/graphite/id-6.c: Update testcase.
2175 * testsuite/gcc.dg/graphite/scop-3.c: Dito.
2177 2009-05-01 Tobias Grosser <grosser@fim.uni-passau.de>
2179 * graphite-scop-detection.c (stmt_simple_for_scop_p):
2180 Enable EQ_EXPR and NE_EXPR again.
2182 2009-04-30 Tobias Grosser <grosser@fim.uni-passau.de>
2184 * graphite-scop-detection.c (graphite_can_represent_scev):
2185 Add check if scev is affine multivariate.
2186 (harmful_stmt_in_bb): Check if we can represent the conditions.
2187 (scopdet_basic_block_info (basic_block bb, VEC): Pass the loop to
2189 * testsuite/gcc.dg/graphite/id-7.c: New.
2191 2009-04-30 Tobias Grosser <grosser@fim.uni-passau.de>
2193 * graphite-sese-to-poly.c (bb_contains_non_iv_scalar_phi_nodes):
2194 Check all bbs in region, not only the bbs that are represented in
2196 (build_poly_scop): Add newline.
2197 * testsuite/gcc.dg/graphite/id-8.c: New.
2199 2009-04-30 Li Feng <nemokingdom@gmail.com>
2201 * cfgloop.c (alloc_loop): Initialize can_be_parallel to false
2202 when loop initialize.
2203 * cfgloop.h (struct loop): Introduce flag can_be_parallel.
2204 * common.opt: Declare flag_graphite_force_parallel.
2205 * graphite-clast-to-gimple.c (translate_clast): Mark the innermost
2207 * graphite-poly.c (apply_poly_transforms): Introduce
2208 flag_graphite_force_parallel.
2209 * tree-ssa-loop.c (gate_graphite_transforms): ditto.
2210 * toplev.c (process_options): ditto and replace a not correctly
2213 2009-04-30 Li Feng <nemokingdom@gmail.com>
2215 * graphite-clast-to-gimple.c (loop_iv_stack_patch_for_consts):
2216 Change the call of gbb_loop_at_index and/or gbb_loop_index due
2217 to the redefinition.
2218 (compute_cloog_iv_types_1): ditto.
2219 (build_iv_mapping): ditto.
2220 * graphite-sese-to-poly.c (new_gimple_bb): Remove GBB_LOOPS related
2222 (free_gimple_bb): Removed GBB_LOOPS related free part.
2223 (build_bb_loops): Removed.
2224 * sese.h (struct gimple_bb): Removed loops.
2225 (GBB_LOOPS): Removed.
2226 (gbb_loop_at_index): Instead of using GBB_LOOPS, we use sese instead.
2227 (gbb_loop_index): ditto.
2229 2009-04-24 Tobias Grosser <grosser@fim.uni-passau.de>
2231 * graphite-scop-detection.c (graphite_can_represent_scev): Do not
2232 allow non constant strides.
2233 * testsuite/gcc.dg/graphite/scop-20.c: New.
2235 2009-04-24 Sebastian Pop <sebastian.pop@amd.com>
2237 * graphite-scop-detection.c (dot_all_scops): Fix system call
2238 return value warning.
2241 2009-04-24 Sebastian Pop <sebastian.pop@amd.com>
2243 * testsuite/gcc.dg/graphite/id-6.c: Fix pattern.
2244 * testsuite/gcc.dg/graphite/scop-3.c: Same.
2246 2009-04-24 Sebastian Pop <sebastian.pop@amd.com>
2248 * graphite-poly.c (map_into_dep_poly, map_dr_into_dep_poly,
2249 build_pairwise_constraint, dr_equality_constraints,
2250 build_pairwise_scheduling_equality,
2251 build_pairwise_scheduling_inequality, lexicographically_gt_p,
2252 build_lexicographically_gt_constraint, dependence_polyhedron,
2253 graphite_legal_transform_dr, graphite_legal_transform_bb,
2254 graphite_legal_transform): New.
2255 * graphite-poly.h (graphite_legal_transform): Declared.
2256 * graphite-sese-to-poly.c (build_poly_scop): Call to
2257 graphite_legal_transform is disabled for the moment.
2259 2009-04-24 Sebastian Pop <sebastian.pop@amd.com>
2261 * graphite-poly.h (pbb_nb_scattering_dims): New.
2262 (pbb_nb_scattering): Use it.
2264 2009-04-24 Sebastian Pop <sebastian.pop@amd.com>
2266 * graphite-ppl.c (ppl_insert_dimensions_pointset): Add
2267 Pointset_Powerset version of ppl_insert_dimensions.
2268 * graphite-ppl.h (ppl_insert_dimensions_pointset): Declared.
2270 2009-04-24 Sebastian Pop <sebastian.pop@amd.com>
2272 * graphite-ppl.c (ppl_insert_dimensions): Fix formatting.
2274 2009-04-24 Sebastian Pop <sebastian.pop@amd.com>
2276 * graphite-poly.h: Fix comment.
2278 2009-04-24 Sebastian Pop <sebastian.pop@amd.com>
2280 * graphite-sese-to-poly.c (build_poly_dr): Fix data ref multiplier.
2282 2009-04-24 Tobias Grosser <grosser@fim.uni-passau.de>
2284 * sese.c (expand_scalar_variables_stmt): Only iterate over the old
2287 2009-04-24 Tobias Grosser <grosser@fim.uni-passau.de>
2289 * graphite-sese-to-poly.c (var_used_in_not_loop_header_phi_node): New.
2290 (graphite_stmt_p): Represent bbs necessary to build the phi nodes of
2293 2009-04-20 Sebastian Pop <sebastian.pop@amd.com>
2295 * graphite-scop-detection.c (stmt_simple_for_scop_p): Do not
2296 handle EQ_EXPR and NE_EXPR.
2298 2009-04-17 Tobias Grosser <grosser@fim.uni-passau.de>
2300 * graphite-poly.h (poly_dr): Fix comment.
2302 2009-04-09 Sebastian Pop <sebastian.pop@amd.com>
2303 Tobias Grosser <grosser@fim.uni-passau.de>
2305 * graphite-poly.c (new_poly_bb): Do not initialize PBB_DOMAIN
2306 with a zero dimension polyhedron.
2307 (find_scop_parameters): Move the call to scop_set_nb_params here.
2308 (build_loop_iteration_domains): Store in loop->aux the iteration
2310 (build_scop_iteration_domain): Fix PBB_DOMAIN for bbs not surrounded
2311 by any loop in scop.
2312 (build_poly_scop): Do not call scop_set_nb_params.
2314 2009-04-09 Sebastian Pop <sebastian.pop@amd.com>
2315 Tobias Grosser <grosser@fim.uni-passau.de>
2317 * graphite-sese-to-poly.c (add_condition_to_pbb): Pass code to
2318 add_condition_to_domain not GT_EXPR.
2320 2009-04-09 Tobias Grosser <grosser@fim.uni-passau.de>
2322 * graphite-ppl.c (debug_ppl_powerset_matrix): New.
2323 * graphite-ppl.h (debug_ppl_powerset_matrix): New.
2324 * graphite-sese-to-poly.c (add_condition_to_pbb): Use
2325 upper_bound_assign to calculate unions.
2326 * testsuite/gcc.dg/graphite/id-6.c: New.
2328 2009-04-09 Tobias Grosser <grosser@fim.uni-passau.de>
2330 * graphite-scop-detection.c (canonicalize_loop_closed_ssa): Do not
2331 handle abnormal edges.
2333 2009-04-09 Tobias Grosser <grosser@fim.uni-passau.de>
2335 * graphite-poly.c (new_poly_dr, free_poly_dr): New.
2336 (free_poly_bb): Also free poly_drs.
2337 * graphite-poly.h (new_poly_dr, free_poly_dr): New.
2338 (poly_dr): Polyhedron to Pointset_Powerset.
2339 (pdr_accessp_nb_subscripts): Same.
2340 * graphite-sese-to-poly.c (build_poly_dr): Same. And actually build
2343 2009-04-08 Sebastian Pop <sebastian.pop@amd.com>
2345 * graphite-clast-to-gimple.c (initialize_cloog_names): Change cloog
2346 names into more meaningful names.
2348 2009-04-08 Sebastian Pop <sebastian.pop@amd.com>
2350 * testsuite/gfortran.dg/graphite/interchange-1.c: New.
2351 * testsuite/gfortran.dg/graphite/interchange-2.c: New.
2353 2009-04-08 Sebastian Pop <sebastian.pop@amd.com>
2355 * graphite-clast-to-gimple.c (graphite_loop_normal_form): Do not build
2357 * tree-parloops.c (rewrite_phi_with_iv): New.
2358 (rewrite_all_phi_nodes_with_iv): New.
2359 (canonicalize_loop_ivs): Call them.
2361 2009-04-08 Sebastian Pop <sebastian.pop@amd.com>
2363 * graphite-sese-to-poly.c (try_generate_gimple_bb): Use
2364 graphite_find_data_references_in_stmt.
2365 * tree-data-ref.c (graphite_find_data_references_in_stmt): New.
2366 * tree-data-ref.h (graphite_find_data_references_in_stmt): Declared.
2368 2009-04-08 Sebastian Pop <sebastian.pop@amd.com>
2370 * sese.c (add_loop_exit_phis): Don't fail on non SSA_NAME renames.
2372 2009-04-08 Sebastian Pop <sebastian.pop@amd.com>
2374 * graphite-sese-to-poly.c (build_scop_bbs_1): Use bb_in_sese_p
2375 instead of bb_in_region.
2376 (flag_bb_in_region): Same. Renamed flag_bb_in_sese.
2377 (build_sese_conditions): Use flag_bb_in_sese.
2378 * sese.c (register_bb_in_sese): Removed.
2379 (new_sese): Remove initialization of SESE_REGION_BBS.
2380 (free_sese): Do not free SESE_REGION_BBS.
2381 * sese.h (struct sese): Remove field region_basic_blocks.
2382 (SESE_REGION_BBS): Removed.
2383 (bb_in_sese_p): Implement in function of bb_in_region.
2385 2009-04-08 Sebastian Pop <sebastian.pop@amd.com>
2387 * graphite-scop-detection.c (limit_scops): Deal only with single exit
2390 2009-04-08 Tobias Grosser <grosser@fim.uni-passau.de>
2392 * graphite-scop-detection.c (stmt_simple_for_scop_p): Allow NE_EXPR
2394 * graphite-sese-to-poly.c (create_linear_expr_from_tree): New.
2395 (add_condition_to_domain): New.
2396 (add_condition_to_pbb): New.
2397 (add_conditions_to_domain): Cleanup and handle of NE_EXPR and EQ_EXPR.
2398 * testsuite/gcc.dg/graphite/scop-3.c: Update number of detected SCoPs.
2400 2009-04-08 Tobias Grosser <grosser@fim.uni-passau.de>
2402 * graphite-clast-to-gimple.c (build_cloog_prog): ppl_Polyhedron ->
2403 ppl_Pointset_Powerset.
2404 * graphite-poly.c (new_poly_bb, free_poly_bb): Same.
2405 * graphite-poly.h (poly_bb): poly_bb.domain Same.
2406 (pbb_nb_loops): Same.
2407 * graphite-sese-to-poly.c (build_loop_iteration_domains,
2408 add_conditions_to_domain): Same.
2409 * graphite-ppl.c (new_Cloog_Domain_from_ppl_Pointset_Powerset): New.
2410 (ppl_print_polyhedron_matrix): ppl_Polyhedron_t ->
2411 ppl_const_Polyhedron_t.
2412 (ppl_print_powerset_matrix): New.
2413 * graphite-ppl.h (new_Cloog_Domain_from_ppl_Pointset_Powerset,
2414 ppl_print_powerset_matrix): New.
2415 (ppl_print_polyhedron_matrix): Updated.
2417 2009-04-07 Sebastian Pop <sebastian.pop@amd.com>
2419 * tree-scalar-evolution.c (analyze_scalar_evolution_1): Fix comment.
2421 2009-04-07 Sebastian Pop <sebastian.pop@amd.com>
2423 * graphite-poly.c (extend_scattering): Fix indenting. Free cstr.
2424 (print_iteration_domains, debug_iteration_domain,
2425 debug_iteration_domains): New.
2426 * graphite-poly.h (print_iteration_domains, debug_iteration_domain,
2427 debug_iteration_domains): Declared.
2428 * graphite-sese-to-poly.c (build_pbb_scattering_polyhedrons): Fix
2431 2009-04-03 Tobias Grosser <grosser@fim.uni-passau.de>
2432 Sebastian Pop <sebastian.pop@amd.com>
2434 * graphite-poly.h (print_iteration_domain): New.
2435 * graphite-sese-to-poly.c (add_conditions_to_domain): Fixed bug.
2436 (build_sese_conditions_1, build_sese_conditions_after,
2437 build_sese_conditions_before): New.
2438 (build_sese_conditions): Rewritten.
2440 2009-04-03 Sebastian Pop <sebastian.pop@amd.com>
2441 Tobias Grosser <grosser@fim.uni-passau.de>
2443 Cleanup of code generation liveouts.
2444 * graphite-clast-to-gimple.c (translate_clast): Use a single
2445 rename_map instead of one per translated statement.
2446 Do not use SESE_LIVEOUT_RENAMES.
2447 (graphite_loop_normal_form): Do not use SESE_REDUCTION_LIST.
2448 (gloog): Do not use SESE_LIVEOUT_RENAMES.
2449 * graphite-scop-detection.c (harmful_stmt_in_bb): Return the close
2450 phi node of a reduction: when a loop contains a reduction used outside
2451 the loop, there should be a scalar close phi node on the exit block.
2452 * sese.c (new_sese): Do not initialize SESE_LIVEOUT,
2453 SESE_LIVEOUT_RENAMES, and SESE_REDUCTION_LIST.
2454 (free_sese): Do not free them.
2455 (sese_build_liveouts_use): Do not use them.
2456 (sese_build_liveouts_bb): Same.
2457 (sese_build_liveouts): Same.
2458 (sese_insert_phis_for_liveouts): Same.
2459 (sese_adjust_phis_for_liveouts): Same. Renamed sese_adjust_liveout_phis.
2460 (defined_in_loop_p): New.
2461 (alive_after_loop): New.
2462 (close_phi_not_yet_inserted_p): New.
2463 (struct alep, alep_p): New.
2464 (add_loop_exit_phis): Remove from the rename_map all the names defined
2465 in the code generated loop.
2466 (insert_loop_close_phis): Traverse the rename_map passed to it.
2467 Don't use SESE_LIVEOUT_RENAMES.
2468 (default_liveout_before_guard): Renamed default_before_guard.
2469 (insert_guard_phis): Do not use SESE_LIVEOUT_RENAMES.
2470 (graphite_copy_stmts_from_block): Do not directly call set_rename.
2471 (register_sese_liveout_renames): Removed.
2472 (copy_bb_and_scalar_dependences): Do not call it.
2473 * sese.h (struct sese): Removed fields: liveout, liveout_renames, and
2475 (SESE_LIVEOUT): Removed.
2476 (SESE_LIVEOUT_RENAMES): Removed.
2477 (SESE_REDUCTION_LIST): Removed.
2478 (sese_build_liveouts): Removed.
2479 (sese_adjust_phis_for_liveouts): Renamed sese_adjust_liveout_phis.
2480 (insert_loop_close_phis): Pass a htab_t instead of a sese.
2481 (insert_guard_phis): Same.
2482 (rename_map_elt): Declare a VEC of them.
2483 * tree-parloops.c (canonicalize_loop_ivs): reduction_list contains
2484 trees not pointers to trees.
2486 Rewrite in canonical close SSA form:
2487 * graphite-scop-detection.c (contains_only_close_phi_nodes): New.
2488 (limit_scops): Close the scop after the block containing the close phi
2490 (canonicalize_loop_closed_ssa): New.
2491 (canonicalize_loop_closed_ssa_form): New.
2492 (build_scops): Call canonicalize_loop_closed_ssa_form.
2494 * graphite-sese-to-poly.c: Fix typos.
2496 2009-04-03 Sebastian Pop <sebastian.pop@amd.com>
2498 * graphite-poly.c (print_scattering_function, print_pbb_domain):
2500 (dump_gbb_conditions, dump_gbb_cases, print_iteration_domain): New.
2501 (print_pbb): Add conditions.
2503 2009-04-01 Tobias Grosser <grosser@fim.uni-passau.de>
2504 Sebastian Pop <sebastian.pop@amd.com>
2506 * graphite-scop-detection.c (bb_in_sd_region): Use bb_in_region.
2507 * graphite-sese-to-poly.c (all_non_dominated_preds_marked_p): New.
2508 (build_scop_bbs_1): New.
2509 (build_scop_bbs): Rewrite.
2510 * sese.h (bb_in_region): New.
2512 2009-03-29 Tobias Grosser <grosser@fim.uni-passau.de>
2514 * graphite-poly.c (new_poly_bb, free_poly_bb): Initialize/free
2516 (print_scop): Style.
2517 * graphite-poly.h (poly_bb): Add drs vector.
2518 (PBB_DRS): Add accessor.
2519 * graphite-sese-to-poly.c (build_poly_dr): New.
2520 (build_pbb_drs, build_scop_drs): New.
2521 (build_poly_scop): call build_scop_drs (Disabled at the moment).
2523 2009-03-29 Tobias Grosser <grosser@fim.uni-passau.de>
2525 * tree-ssa-loop.c: Include forgotten toplev.h
2527 2009-03-29 Tobias Grosser <grosser@fim.uni-passau.de>
2529 * graphite-poly.c: (apply_poly_transforms): sorry -> gcc_unreachable.
2530 * testsuite/gcc.dg/graphite/pr37883.c: Remove -floop-*
2531 * testsuite/gcc.dg/graphite/pr37928.c: Same
2532 * testsuite/gcc.dg/graphite/pr38409.c: Same
2533 * testsuite/gcc.dg/graphite/pr38498.c: Same
2534 * testsuite/gcc.dg/graphite/pr38559.c: Same
2535 * testsuite/gcc.dg/graphite/pr39335.c: Same
2536 * testsuite/gcc.dg/graphite/pr39335_1.c: Same
2537 * testsuite/gfortran.dg/graphite/block-2.f: Same
2538 * tree-ssa-loop.c (gate_graphite_transforms): Always fail if called
2541 2009-03-28 Tobias Grosser <grosser@fim.uni-passau.de>
2543 * graphite-sese-to-poly.c (ref_nb_loops, build_access_matrix_with_af,
2544 build_access_matrix, build_scop_data_accesses): Remove access function
2545 building. (We get a new version soon).
2546 (build_bb_loops, scan_tree_for_params_right_scev): Update.
2547 * sese.h (nb_loops_around_loop_in_sese): Remove.
2548 (sese_loop_depth): Do not use SESE_LOOP_NEST any more.
2550 2009-03-27 Tobias Grosser <grosser@fim.uni-passau.de>
2551 Sebastian Pop <sebastian.pop@amd.com>
2553 * graphite-scop-detection.c (struct scopdet_info): Rename last
2555 (scopdet_basic_block_info, build_scops_1): Don't use
2556 CDI_POST_DOMINATORS. CDI_POST_DOMINATORS should never be used.
2558 2009-03-26 Tobias Grosser <grosser@fim.uni-passau.de>
2559 Sebastian Pop <sebastian.pop@amd.com>
2561 * graphite-clast-to-gimple.c (gloog): Call sese_build_liveouts.
2562 * sese.c (sese_build_liveouts_use): Renamed from
2563 sese_build_livein_liveouts_use. Remove liveins.
2564 (sese_build_liveouts_bb): Renamed from sese_build_livein_liveouts_bb.
2565 Call sese_build_liveouts_use.
2566 (sese_build_liveouts): Renamed from sese_build_livein_liveouts.
2567 Call sese_build_liveouts_bb.
2568 (new_sese, free_sese): Remove liveins.
2569 (sese_add_exit_phis_var): Deleted.
2570 (sese_insert_phis_for_liveouts): Call sese_add_exit_phis_edge
2572 (graphite_copy_stmts_from_block): Remove SESE_NUM_VER.
2574 * sese.h (sese): Remove num_ver and livein.
2575 (SESE_LIVEIN, SESE_LIVEIN_VER, SESE_NUM_VER): Removed.
2577 2009-03-25 Tobias Grosser <grosser@fim.uni-passau.de>
2579 * graphite-sese-to-poly.c (build_scop_scattering): Fix compile.
2581 2009-03-25 Tobias Grosser <grosser@fim.uni-passau.de>
2583 * graphite-sese-to-poly.c (compare_prefix_loops): Removed.
2584 (build_scop_scattering): Do not use compare_prefix_loops any more.
2585 (nb_common_loops): New.
2587 2009-03-24 Sebastian Pop <sebastian.pop@amd.com>
2589 * sese.c (get_new_name_from_old_name): Renamed get_rename.
2590 (register_old_and_new_names): Renamed set_rename.
2592 2009-03-24 Sebastian Pop <sebastian.pop@amd.com>
2594 * graphite-scop-detection.h (nb_reductions_in_loop): Revert removal
2595 of the decl from the previous commit.
2597 2009-03-24 Sebastian Pop <sebastian.pop@amd.com>
2599 * graphite-scop-detection.c (dot_scop): New.
2600 * graphite-scop-detection.h (dot_scop): Declared.
2602 2009-03-24 Sebastian Pop <sebastian.pop@amd.com>
2604 * graphite-sese-to-poly.c (compare_prefix_loops): Fix compare.
2606 2009-03-24 Sebastian Pop <sebastian.pop@amd.com>
2608 * cfgloopmanip.c (create_empty_loop_on_edge): Generate the loop exit
2609 condition at the end of the loop.
2610 * graphite.c (graphite_initialize, graphite_finalize): Print to
2611 dump_file the compiled function.
2612 * graphite-clast-to-gimple.c (graphite_create_new_loop): Update use
2613 of create_empty_loop_on_edge.
2614 (translate_clast): Update the code generation of loops for the new
2616 * cfgloop.h (create_empty_loop_on_edge): Update declaration.
2618 2009-03-24 Sebastian Pop <sebastian.pop@amd.com>
2620 Reverted the patch from 2009-03-19.
2622 2009-03-19 Tobias Grosser <grosser@fim.uni-passau.de>
2624 * graphite-poly.c (new_poly_bb, free_poly_bb): Initialize/free
2626 (print_scop): Style.
2627 * graphite-poly.h (poly_bb): Add drs vector.
2628 (PBB_DRS): Add accessor.
2629 * graphite-sese-to-poly.c (ref_nb_loops): Remove.
2630 (build_access_matrix_with_af, build_access_matrix,
2631 build_scop_data_accesses): Delete.
2632 (build_poly_dr): New.
2633 (build_pbb_drs, build_scop_drs): New.
2634 (build_poly_scop): call build_scop_drs.
2636 2009-03-13 Sebastian Pop <sebastian.pop@amd.com>
2638 * graphite-scop-detection.c (dot_all_scops_1): Close the table
2639 once per basic block.
2641 2009-03-13 Tobias Grosser <grosser@fim.uni-passau.de>
2643 * graphite-scop-detection.c (graphite_can_represent_scev): New.
2644 (graphite_can_represent_expr): Renamed from loop_affine_expr
2646 (stmt_simple_for_scop_p): Call graphite_can_represent_expr.
2647 (graphite_cannot_represent_loop): Add scop_entry to parameters.
2648 (scopdet_basic_block_info): Actually define entry_block.
2649 (stmt_simple_memref_p): Moved here from ...
2651 * tree-data-ref.c (stmt_simple_memref_p): here.
2652 * tree-data-ref.h (stmt_simple_memref_p): Removed.
2654 2009-03-13 Tobias Grosser <grosser@fim.uni-passau.de>
2656 * testsuite/gcc.dg/graphite/id-4.c: New.
2658 2009-03-12 Sebastian Pop <sebastian.pop@amd.com>
2660 * sese.c (expand_scalar_variables_expr): Handle tcc_comparison.
2661 (register_old_and_new_names): Update the content of the map.
2662 When there was already a rename_map_elt in the map at that
2664 (copy_bb_and_scalar_dependences): Do rename_variables after
2665 expand_scalar_variables.
2666 * graphite-clast-to-gimple.c (build_iv_mapping): Update the content
2667 of the map. When there was already a rename_map_elt in the
2668 map at that location, free it.
2669 (translate_clast): Pass the rename_map. Do not initialize and free
2670 a rename_map per stmt_user.
2671 (gloog): Initialize and free one rename_map and pass it to
2674 2009-03-12 Sebastian Pop <sebastian.pop@amd.com>
2676 * sese.c (expand_scalar_variables_stmt,
2677 expand_scalar_variables_ssa_name): Add a gimple_stmt_iterator
2679 (expand_scalar_variables_expr): Handle REALPART_EXPR and IMAGPART_EXPR.
2680 (expand_scalar_variables): Pass to expand_scalar_variables_stmt
2681 the gimple_stmt_iterator of the statement to be expanded.
2682 * graphite-scop-detection.c (is_simple_operand): Do handle
2685 2009-03-11 Tobias Grosser <grosser@fim.uni-passau.de>
2687 * graphite-scop-detection.c (is_simple_operand): Do not handle
2689 * testsuite/gcc.dg/graphite/id-2.c: New.
2691 * graphite-sese-to-poly.c (build_bb_loops,
2692 add_value_to_dim, scan_tree_for_params_right_scev,
2693 scan_tree_for_params_int, scan_tree_for_params, idx_record_params,
2694 find_params_in_bb, build_loop_iteration_domains,
2695 add_conditions_to_domain): Remove subtract.
2697 2009-03-11 Tobias Grosser <grosser@fim.uni-passau.de>
2699 * graphite-clast-to-gimple.c (loop_iv_stack_patch_for_consts,
2700 build_iv_mapping, compute_cloog_iv_types_1, build_cloog_prog):
2701 pbb_loop_at_index -> gbb_loop_at_index.
2702 * graphite-poly.c (new_poly_bb, new_scop): New accessors.
2703 (debug_loop_vec): Delete.
2704 * graphite-poly.h (poly_bb, scop): Change black_box and region to void
2705 pointer. Move LOOPS to gimple_bb_p and insert nb_params.
2706 (PBB_LOOPS): Removed.
2707 (PBB_BLACK_BOX): Insert cast.
2708 (pbb_set_black_box): New setter.
2709 (pbb_loop_at_index, pbb_loop_index): Removed.
2710 (scop_set_region, scop_set_nb_params): New.
2711 * graphite-sese-to-poly.c (new_gimple_bb, free_gimple_bb,
2712 build_scop_scattering, build_bb_loops): Add GBB_LOOPS.
2713 (build_poly_scop): Use scop_set_nb_params.
2714 * sese.h (gimple_bb): Add LOOPS.
2715 (GBB_LOOPS, gbb_loop_index, gbb_loop_at_index): New.
2717 2009-03-11 Tobias Grosser <grosser@fim.uni-passau.de>
2719 Revert previous commit.
2721 2009-03-11 Sebastian Pop <sebastian.pop@amd.com>
2723 * sese.c (expand_scalar_variables_expr): Handle tcc_comparison.
2724 (register_old_and_new_names): Update the content of the map.
2725 When there was already a rename_map_elt in the map at that
2727 (copy_bb_and_scalar_dependences): Do rename_variables after
2728 expand_scalar_variables.
2729 * graphite-clast-to-gimple.c (build_iv_mapping): Update the content
2730 of the map. When there was already a rename_map_elt in the
2731 map at that location, free it.
2732 (translate_clast): Pass the rename_map. Do not initialize and free
2733 a rename_map per stmt_user.
2734 (gloog): Initialize and free one rename_map and pass it to
2737 2009-03-11 Tobias Grosser <grosser@fim.uni-passau.de>
2739 Remove forgotten line in revert.
2741 2009-03-11 Sebastian Pop <sebastian.pop@amd.com>
2743 Revert previous commit.
2745 2009-03-10 Sebastian Pop <sebastian.pop@amd.com>
2747 * sese.c (register_old_and_new_names): Update the content
2748 of the map. When there was already a rename_map_elt in the
2749 map at that location, free it.
2750 (copy_bb_and_scalar_dependences): Do rename_variables after
2751 expand_scalar_variables.
2752 * graphite-clast-to-gimple.c (build_iv_mapping): Update the content
2753 of the map. When there was already a rename_map_elt in the
2754 map at that location, free it.
2755 (translate_clast): Pass the rename_map. Do not initialize and free
2756 a rename_map per stmt_user.
2757 (gloog): Initialize and free one rename_map and pass it to
2760 2009-03-10 Sebastian Pop <sebastian.pop@amd.com>
2762 * graphite-clast-to-gimple.c (translate_clast): context_loop
2765 2009-03-10 Tobias Grosser <grosser@fim.uni-passau.de>
2766 Sebastian Pop <sebastian.pop@amd.com>
2768 * graphite-ppl.c (ppl_insert_dimensions): Fix stupid mistake
2769 of the use of ppl_Polyhedron_map_space_dimensions.
2771 2009-03-10 Tobias Grosser <grosser@fim.uni-passau.de>
2772 Sebastian Pop <sebastian.pop@amd.com>
2774 * graphite-poly.c (unify_scattering_dimensions): Fix types.
2775 * graphite-poly.h (poly_dr_p, poly_dr, POLY_DR_TYPE, PDR_BB,
2776 PDR_TYPE, PDR_ACCESSES, pdr_accessp_nb_subscripts,
2777 pdr_accessp_nb_iterators, pdr_accessp_nb_params,
2778 pdr_accessp_alias_set_dim, pdr_accessp_subscript_dim,
2779 pdr_accessp_iterator_dim, pdr_accessp_param_dim,
2780 pbb_nb_params): New.
2781 (pbb_nb_loops, pbb_nb_scattering, scop_nb_params,
2782 nb_loops_around_pbb): Adapt return types.
2784 2009-03-09 Tobias Grosser <grosser@fim.uni-passau.de>
2786 * Makefile.in (graphite.o, graphite-sese-to-poly.o,
2787 graphite-clast-to-gimple.o, graphite-data-ref.o,
2788 graphite-scop-detection.o, graphite-poly.o): Add
2791 2009-03-05 Tobias Grosser <grosser@fim.uni-passau.de>
2793 * Makefile.in (graphite.o, graphite-sese-to-poly.o,
2794 graphite-clast-to-gimple.o, graphite-data-ref.o,
2795 graphite-scop-detection.o, graphite-poly.o): Add graphite-poly.h.
2797 2009-03-04 Tobias Grosser <grosser@fim.uni-passau.de>
2799 * testsuite/gcc.dg/graphite/pr37485.c: Remove -floop-block
2800 * testsuite/gcc.dg/graphite/pr37828.c: Same.
2801 * testsuite/gcc.dg/graphite/pr37684.c: Same.
2802 * testsuite/gcc.dg/graphite/block-0.c: Same.
2803 * testsuite/gcc.dg/graphite/block-1.c: Same.
2804 * testsuite/gcc.dg/graphite/block-2.c: Same.
2805 * testsuite/gcc.dg/graphite/block-3.c: Same.
2806 * testsuite/gcc.dg/graphite/block-4.c: Same.
2807 * testsuite/gcc.dg/graphite/block-5.c: Same.
2808 * testsuite/gcc.dg/graphite/block-6.c: Same.
2809 * testsuite/gfortran.dg/graphite/pr38083.f90: Same.
2810 * testsuite/gfortran.dg/graphite/block-1.f90: Same.
2811 * testsuite/gfortran.dg/graphite/block-3.f90: Same.
2812 * testsuite/gfortran.dg/graphite/pr37852.f90: Same.
2813 * testsuite/gfortran.dg/graphite/block-4.f90: Same.
2814 * testsuite/gfortran.dg/graphite/pr37980.f90: Same.
2815 * testsuite/gfortran.dg/graphite/pr38953.f90: Same.
2816 * testsuite/gfortran.dg/graphite/pr37857.f90: Same.
2817 * opts.c: Remove -floop-block from -O2.
2818 * graphite-poly.c: Fail if -floop-block -floop-interchange or
2819 -floop-strip-mine are used.
2821 2009-03-04 Tobias Grosser <grosser@fim.uni-passau.de>
2822 Sebastian Pop <sebastian.pop@amd.com>
2824 * graphite-clast-to-gimple.c (build_cloog_prog): Unify scattering
2826 * graphite-poly.c (pbb_compare, graphite_sort_pbbs,
2827 graphite_trans_bb_move_loop, graphite_trans_bb_strip_mine,
2828 strip_mine_profitable_p, is_interchange_valid,
2829 graphite_trans_bb_block, graphite_trans_loop_block,
2830 graphite_trans_scop_block): Temporary removed.
2831 (extend_scattering, unify_scattering_dimensions): New.
2832 (print_scattering_function, graphite_read_transforms):
2833 PBB_SCATTERING -> PBB_TRANSFORMED_SCATTERING.
2834 (graphite_generate_scattering_fns): Removed.
2835 (apply_poly_transforms): Cleanup.
2836 (free_poly_bb): Add PBB_SCATTERING -> PBB_TRANSFORMED_SCATTERING.
2837 (schedule_to_scattering): Moved.
2838 (PBB_STATIC_SCHEDULE, PBB_SCATTERING): Removed.
2839 (PBB_ORIGINAL_SCATTERING, PBB_TRANSFORMED_SCATTERING): New.
2840 (pbb_nb_scattering): New.
2841 (SCOP_ENTRY, SCOP_EXIT, SCOP_REGION_BBS, SCOP_DEP_GRAPH, SCOP_PARAMS,
2842 SCOP_LOOP_NEST, SCOP_PARAMS, SCOP_OLDIVS, SCOP_LIVEOUT_RENAMES):
2844 * graphite-ppl.c (ppl_insert_dimensions): Extended and renamed from
2846 (ppl_strip_loop): PBB_SCATTERING -> PBB_TRANSFORMED_SCATTERING.
2847 * graphite-scop-detection.c (dot_all_scops_1): PBB_SCATTERING
2848 -> PBB_TRANSFORMED_SCATTERING.
2849 * graphite-sese-to-poly.c (build_scop_bbs): Remove region.
2850 (build_pbb_scattering_polyhedron): Moved from schedule_to_scattering.
2851 (build_scop_scattering): Renamed from build_scop_canonical_schedules.
2852 (check_poly_representation): Do not return bool.
2853 (graphite_transform_loops): Reformat.
2854 * sese.h (SESE_ENTRY_BB, SESE_EXIT_BB): New.
2856 2009-03-04 Sebastian Pop <sebastian.pop@amd.com>
2858 * graphite-poly.c (print_pbb_domain, print_pbb, print_scop,
2859 debug_pbb_domain, debug_pbb, debug_scop): New.
2860 * graphite-poly.h (print_pbb_domain, print_pbb, print_scop,
2861 debug_pbb_domain, debug_pbb, debug_scop): Declared.
2863 2009-03-02 Sebastian Pop <sebastian.pop@amd.com>
2866 * tree-parloops.c (canonicalize_loop_ivs): Call fold_convert
2867 when the type precision of the induction variable should be
2868 larger than the type precision of nit.
2869 (gen_parallel_loop): Update use of canonicalize_loop_ivs.
2870 * graphite-clast-to-gimple.c (graphite_loop_normal_form): Same.
2871 * tree-flow.h (canonicalize_loop_ivs): Update declaration.
2873 * testsuite/gcc.dg/graphite/pr39335_1.c: New.
2874 * testsuite/gcc.dg/graphite/pr39335.c: New.
2876 2009-03-02 Sebastian Pop <sebastian.pop@amd.com>
2878 * tree-parloops.c (canonicalize_loop_ivs): reduction_list contains
2879 SSA_NAMES not struct reduction_info.
2881 2009-03-02 Sebastian Pop <sebastian.pop@amd.com>
2883 * sese.c (expand_scalar_variables_expr): Handle ADDR_EXPR.
2885 2009-02-27 Sebastian Pop <sebastian.pop@amd.com>
2886 Tobias Grosser <grosser@fim.uni-passau.de>
2888 * sese.c (new_sese): Initialize SESE_REDUCTION_LIST.
2889 (free_sese): Free SESE_REDUCTION_LIST.
2890 * sese.h (struct sese): Add field reduction_list.
2891 (SESE_REDUCTION_LIST): New.
2892 * graphite-clast-to-gimple.c (graphite_loop_normal_form): Call
2893 canonicalize_loop_ivs on SESE_REDUCTION_LIST.
2895 2009-02-27 Sebastian Pop <sebastian.pop@amd.com>
2896 Tobias Grosser <grosser@fim.uni-passau.de>
2898 * tree-flow.h (gather_scalar_reductions): Use struct loop * instead
2901 2009-02-27 Sebastian Pop <sebastian.pop@amd.com>
2902 Tobias Grosser <grosser@fim.uni-passau.de>
2904 * tree-parloops.c (struct brli, build_reduction_list_info,
2905 analyze_reduction_list, gather_scalar_reductions): New.
2906 (loop_parallel_p): Build a reduction list containing only
2907 PHI_RESULT SSA_NAMEs: call gather_scalar_reductions.
2908 (gen_parallel_loop): Call the analysis analyze_reduction_list.
2909 (parallelize_loops): Now reduction_list is a htab_t of SSA_NAMEs.
2910 * tree-flow.h (gather_scalar_reductions): Declared.
2912 2009-02-26 Sebastian Pop <sebastian.pop@amd.com>
2915 * graphite-clast-to-gimple.c (graphite_loop_normal_form): Do not call
2916 number_of_iterations_exit from a gcc_assert.
2918 2009-02-25 Sebastian Pop <sebastian.pop@amd.com>
2919 Jan Sjodin <jan.sjodin@amd.com>
2921 * output.h (graphite_out_file, graphite_in_file): Declared.
2922 * toplev.c (graphite_out_file, graphite_in_file): New.
2923 (init_asm_output): Initialize graphite_in_file and graphite_out_file.
2924 * graphite-clast-to-gimple.c (build_cloog_prog): Read PBB_SCATTERING.
2925 Don't call schedule_to_scattering.
2926 * common.opt (fgraphite-write, fgraphite-read): New.
2927 * graphite-poly.c: Include output.h.
2928 (print_scattering_function, print_scattering_functions,
2929 debug_scattering_function, debug_scattering_functions,
2930 graphite_write_transforms, graphite_read_transforms,
2931 graphite_generate_scattering_fns): New.
2932 (apply_poly_transforms): Do not apply transform if flag_graphite_read.
2933 Call graphite_generate_scattering_fns, graphite_write_transforms,
2934 graphite_read_transforms.
2935 (new_poly_bb): Initialize PBB_SCATTERING.
2936 (free_poly_bb): Free PBB_SCATTERING.
2937 (schedule_to_scattering): Does not return, initialize PBB_SCATTERING.
2938 * graphite-poly.h (struct poly_bb): Add field scattering.
2939 (PBB_SCATTERING): New.
2940 (print_scattering_function, print_scattering_functions,
2941 debug_scattering_function, debug_scattering_functions): Declared.
2942 * graphite-ppl.c (cloog_matrix_to_ppl_constraint): Matrices contain
2943 GMP values, not integers!
2944 (ppl_print_polyhedron_matrix, debug_ppl_polyhedron_matrix,
2945 ppl_read_polyhedron_matrix): New.
2946 * graphite-ppl.h (ppl_print_polyhedron_matrix,
2947 debug_ppl_polyhedron_matrix,
2948 ppl_read_polyhedron_matrix): Declared.
2949 * Makefile.in (graphite-poly.o): Depends on output.h.
2951 2009-02-23 Sebastian Pop <sebastian.pop@amd.com>
2952 Tobias Grosser <grosser@fim.uni-passau.de>
2955 * graphite-scop-detection.c (stmt_simple_for_scop_p): Analyze
2956 scalar evolutions in the scop_entry->loop_father.
2958 2009-02-23 Sebastian Pop <sebastian.pop@amd.com>
2959 Tobias Grosser <grosser@fim.uni-passau.de>
2961 * graphite.h (ref_nb_loops): Remove declaration.
2962 (struct gimple_bb, gimple_bb_p, GBB_BB, GBB_DATA_REFS, GBB_CONDITIONS,
2963 GBB_CONDITION_CASES, GBB_CLOOG_IV_TYPES, gbb_loop, print_gimple_bb,
2964 debug_gbb): Moved to sese.h.
2967 2009-02-23 Sebastian Pop <sebastian.pop@amd.com>
2968 Tobias Grosser <grosser@fim.uni-passau.de>
2970 * graphite-data-ref.[ch]: Disable.
2972 2009-02-23 Sebastian Pop <sebastian.pop@amd.com>
2973 Tobias Grosser <grosser@fim.uni-passau.de>
2975 * graphite-scop-detection.c (stmt_simple_for_scop_p): Analyze
2976 scalar evolutions in the scop_entry->loop_father.
2978 2009-02-23 Sebastian Pop <sebastian.pop@amd.com>
2980 * graphite-scop-detection.c (nb_reductions_in_loop): Moved here...
2981 (graphite_cannot_represent_loop_niter): Renamed
2982 graphite_cannot_represent_loop. Call nb_reductions_in_loop.
2983 (limit_scops): build_sese_loop_nests does not return a bool.
2984 * graphite-scop-detection.h (nb_reductions_in_loop): Declared.
2985 * sese.c (nb_reductions_in_loop): ... from here.
2986 (graphite_loop_normal_form): ... from here.
2987 (sese_record_loop): Does not fail, so does not return a bool.
2988 (build_sese_loop_nests): Same.
2989 * sese.h (build_sese_loop_nests): Update declaration.
2990 * graphite-clast-to-gimple.c (graphite_loop_normal_form): Moved here...
2991 (build_graphite_loop_normal_form): New.
2992 (gloog): Call build_graphite_loop_normal_form.
2993 * graphite-sese-to-poly.c (build_poly_scop): Don't fail on
2994 build_sese_loop_nests.
2996 * testsuite/gcc.dg/graphite/id-1.c: New.
2998 2009-02-23 Sebastian Pop <sebastian.pop@amd.com>
2999 Tobias Grosser <grosser@fim.uni-passau.de>
3001 * graphite-sese-to-poly.c (scan_tree_for_params): Remove REAL_CST.
3002 The SCoP detection fix is sufficient.
3004 2009-02-21 Sebastian Pop <sebastian.pop@amd.com>
3006 PR tree-optimization/39260
3007 * graphite-scop-detection.c (harmful_stmt_in_bb): Stop a SCoP when
3008 the basic block contains a condition with a real type.
3009 * graphite-sese-to-poly.c (scan_tree_for_params): Handle REAL_CST.
3011 * gcc.dg/graphite/pr39260.c: New.
3013 2009-02-21 Sebastian Pop <sebastian.pop@amd.com>
3015 * graphite-poly.c: Inlcude params.h.
3016 (graphite_trans_loop_block): Use PARAM_LOOP_BLOCK_TILE_SIZE for
3018 * Makefile.in (graphite-poly.o): Depend on PARAMS_H.
3019 * params.def (PARAM_LOOP_BLOCK_TILE_SIZE): Define.
3021 2009-02-20 Sebastian Pop <sebastian.pop@amd.com>
3022 Tobias Grosser <grosser@fim.uni-passau.de>
3024 * graphite-scop-detection.c (dot_all_scops_1,
3025 dot_all_scops): Moved here.
3026 * graphite-scop-detection.h (dot_all_scops): Declared here.
3027 * graphite.c (graphite_initialize, graphite_finalize): New.
3028 (graphite_transform_loops): Cleaned up.
3029 * sese.c (debug_oldivs): Moved here.
3030 * graphite-poly.c (graphite_apply_transformations): Renamed
3031 apply_poly_transforms.
3032 (debug_loop_vec): Moved here.
3033 * graphite-sese-to-poly.c (build_bb_loops, build_sese_conditions_1,
3034 scop_contains_non_iv_scalar_phi_nodes, build_sese_conditions,
3035 find_scop_parameters, build_scop_iteration_domain,
3036 add_conditions_to_constraints, build_scop_canonical_schedules,
3037 build_scop_data_accesses): Now static.
3038 (build_poly_scop, check_poly_representation): New.
3040 2009-02-20 Sebastian Pop <sebastian.pop@amd.com>
3042 * graphite.c (graphite_stmt_p, new_gimple_bb, free_gimple_bb,
3043 remove_gbbs_in_scop, free_scops, try_generate_gimple_bb,
3044 build_scop_bbs, ref_nb_loops, compare_prefix_loops,
3045 build_scop_canonical_schedules, build_bb_loops, add_value_to_dim,
3046 scan_tree_for_params_right_scev, scan_tree_for_params_int,
3047 scan_tree_for_params, struct irp_data, dx_record_params,
3048 find_params_in_bb, find_scop_parameters, gbb_from_bb,
3049 build_loop_iteration_domains, add_conditions_to_domain,
3050 phi_node_is_iv, bb_contains_non_iv_scalar_phi_nodes,
3051 scop_contains_non_iv_scalar_phi_nodes, build_sese_conditions_1,
3052 build_sese_conditions, add_conditions_to_constraints,
3053 build_scop_iteration_domain, build_access_matrix_with_af,
3054 build_access_matrix,
3055 build_scop_data_accesses): Moved to graphite-sese-to-poly.c.
3057 * graphite-sese-to-poly.c: New.
3058 * graphite-sese-to-poly.h: New.
3060 * Makefile.in: Add new rule for graphite-sese-to-poly.o.
3062 2009-02-20 Sebastian Pop <sebastian.pop@amd.com>
3064 * graphite.c: Split graphite code generation to a new file.
3065 (graphite_verify, gmp_cst_to_tree, clast_name_to_gcc,
3066 max_precision_type, clast_to_gcc_expression_red,
3067 clast_to_gcc_expression, gcc_type_for_clast_expr,
3068 gcc_type_for_clast_eq, loop_iv_stack_patch_for_consts,
3069 graphite_translate_clast_equation, graphite_create_guard_cond_expr,
3070 graphite_create_new_guard, clast_get_body_of_loop,
3071 gcc_type_for_cloog_iv, gcc_type_for_iv_of_clast_loop,
3072 graphite_create_new_loop, build_iv_mapping, copy_renames,
3073 translate_clast, find_cloog_iv_in_expr, compute_cloog_iv_types_1,
3074 compute_cloog_iv_types, free_scattering, save_var_name,
3075 initialize_cloog_names, build_scop_context, build_cloog_prog,
3076 set_cloog_options, debug_clast_stmt, scop_to_clast,
3077 print_generated_program, debug_generated_program,
3078 gloog): Moved to graphite-clast-to-gimple.c.
3080 (struct cloog_prog_clast): Moved to graphite-clast-to-gimple.h.
3082 (iv_stack_entry_is_constant, iv_stack_entry_is_iv,
3083 loop_iv_stack_push_iv, loop_iv_stack_insert_constant,
3084 loop_iv_stack_pop, loop_iv_stack_get_iv,
3085 loop_iv_stack_get_iv_from_name, debug_loop_iv_stack,
3086 free_loop_iv_stack, loop_iv_stack_remove_constants,
3087 debug_rename_elt, debug_rename_map_1, debug_rename_map,
3088 rename_map_elt_info, eq_rename_map_elts, debug_ivtype_elt,
3089 debug_ivtype_map_1, debug_ivtype_map, ivtype_map_elt_info,
3090 eq_ivtype_map_elts, sese_add_exit_phis_edge,
3091 sese_add_exit_phis_var, sese_insert_phis_for_liveouts,
3092 get_vdef_before_sese, sese_adjust_vphi,
3093 get_new_name_from_old_name, sese_adjust_phis_for_liveouts,
3094 oldiv_for_loop, rename_variables_in_stmt, is_parameter,
3095 is_iv, expand_scalar_variables_ssa_name,
3096 expand_scalar_variables_expr, expand_scalar_variables_stmt,
3097 expand_scalar_variables, rename_variables, remove_condition,
3098 get_true_edge_from_guard_bb, get_false_edge_from_guard_bb,
3099 add_loop_exit_phis, insert_loop_close_phis, struct igp,
3100 default_liveout_before_guard, add_guard_exit_phis,
3101 insert_guard_phis, register_old_and_new_names,
3102 graphite_copy_stmts_from_block, register_sese_liveout_renames,
3103 copy_bb_and_scalar_dependences, outermost_loop_in_sese,
3104 if_region_set_false_region, create_if_region_on_edge,
3105 move_sese_in_condition): Moved to sese.c.
3107 (nb_loops_around_loop_in_sese, struct ifsese, if_region_entry,
3108 if_region_exit, if_region_get_condition_block,
3109 struct rename_map_elt, new_rename_map_elt, enum iv_stack_entry_kind,
3110 union iv_stack_entry_data_union, struct iv_stack_entry_struct,
3111 iv_stack_entry_p, loop_iv_stack, struct ivtype_map_elt,
3112 ivtype_map_elt, new_ivtype_map_elt,
3113 recompute_all_dominators): Moved to sese.h.
3115 * graphite-clast-to-gimple.c: New.
3116 * graphite-clast-to-gimple.h: New.
3117 * Makefile.in: Add new rule for graphite-clast-to-gimple.o.
3118 * sese.c: Modified as said above.
3121 2009-02-20 Sebastian Pop <sebastian.pop@amd.com>
3123 * graphite.c: Split scop detection to a new file.
3124 (enum gbb_type, gbb_type, get_bb_type, struct sd_region_p, sd_region,
3125 move_sd_regions, loop_affine_expr, exclude_component_ref,
3126 is_simple_operand, stmt_simple_for_scop_p, harmful_stmt_in_bb,
3127 graphite_cannot_represent_loop_niter, struct scopdet_info,
3128 scopdet_basic_block_info, build_scops_1, bb_in_sd_region,
3129 find_single_entry_edge, find_single_exit_edge,
3130 create_single_entry_edge, sd_region_without_exit,
3131 create_single_exit_edge, unmark_exit_edges, mark_exit_edges,
3132 create_sese_edges, build_graphite_scops, limit_scops, build_scops):
3133 Moved to graphite-scop-detection.c.
3135 * graphite-scop-detection.c: New.
3136 * graphite-scop-detection.h: New.
3137 * Makefile.in: Add new rule for graphite-scop-detection.o.
3139 * sese.c: Include tree-chrec.h, tree-data-ref.h, and
3140 tree-scalar-evolution.h.
3141 (nb_reductions_in_loop, graphite_loop_normal_form, sese_record_loop,
3142 build_sese_loop_nests): Moved here from graphite.c.
3143 (param_index): Renamed parameter_index_in_region.
3145 2009-02-18 Tobias Grosser <grosser@fim.uni-passau.de>
3146 Sebastian Pop <sebastian.pop@amd.com>
3148 * gcc.dg/graphite/block-0.c: Expected to fail now.
3149 * gcc.dg/graphite/block-1.c: Same.
3150 * gcc.dg/graphite/block-5.c: Same.
3151 * gcc.dg/graphite/block-6.c: Same.
3153 2009-02-18 Tobias Grosser <grosser@fim.uni-passau.de>
3154 Sebastian Pop <sebastian.pop@amd.com>
3156 * graphite.h: Separate from graphite_bb_p the polyhedral
3157 representation in poly_bb_p and the GCC specifics in gimple_bb_p.
3158 (struct data_dependence_polyhedron, RDGE_DDP, ddp_p): Moved to
3159 graphite-data-ref.h.
3160 (struct poly_bb, PBB_SCOP, PBB_STATIC_SCHEDULE, PBB_DOMAIN,
3161 PBB_BLACK_BOX, PBB_LOOPS, pbb_nb_loops, pbb_loop_at_index,
3162 pbb_loop_index, struct scop, SCOP_BBS, SCOP_REGION, SCOP_ENTRY,
3163 SCOP_EXIT, SCOP_REGION_BBS, SCOP_DEP_GRAPH, SCOP_PARAMS,
3164 SCOP_LOOP_NEST, SCOP_PARAMS, SCOP_OLDIVS, SCOP_LIVEOUT_RENAMES,
3165 scop_nb_params): Moved to graphite-poly.h.
3166 * graphite-data-ref.c: Same.
3167 * graphite-data-ref.h: New.
3169 (pbb_compare, graphite_sort_pbbs, graphite_trans_bb_move_loop,
3170 graphite_trans_bb_strip_mine, strip_mine_profitable_p,
3171 is_interchange_valid, graphite_trans_bb_block,
3172 graphite_trans_loop_block, scop_max_loop_depth,
3173 graphite_trans_scop_block, graphite_apply_transformations,
3174 new_poly_bb, free_poly_bb, new_scop, free_scop): Moved to
3176 * graphite-poly.h: New.
3177 * graphite-poly.c: New.
3178 * Makefile.in (OBJS-common): Add graphite-poly.o.
3179 (graphite-poly.o): New rule.
3180 * tree-data-ref.h (struct data_reference): Remove unused scop field.
3183 2009-02-18 Sebastian Pop <sebastian.pop@amd.com>
3184 Tobias Grosser <grosser@fim.uni-passau.de>
3186 * graphite.c: Replace gb -> gbb.
3188 * graphite-data-ref.c: Same.
3190 2009-02-18 Sebastian Pop <sebastian.pop@amd.com>
3191 Tobias Grosser <grosser@fim.uni-passau.de>
3193 * Makefile.in (OBJS-commmon): Add sese.o.
3195 (graphite.o): Add sese.h.
3196 * graphite.c (bb_in_ss_p, loop_in_sese_p,
3197 sese_build_livein_liveouts_use, sese_build_livein_liveouts_bb,
3198 sese_build_livein_liveouts, register_bb_in_sese, new_sese, free_sese):
3200 (block_before_scop): Add missing return.
3201 (new_scop, free_scop): Remove SESE data structures.
3202 (scop_record_loop, scan_tree_for_params, find_params_in_bb,
3203 find_scop_parameters, build_loop_iteration_domains,
3204 add_conditions_to_domain, register_scop_liveout_renames,
3205 copy_bb_and_scalar_dependences): Scop -> SESE.
3207 (add_conditions_to_domain): SCoP -> SESE and remove check
3208 (scop_contains_non_iv_scalar_phi_nodes): New.
3209 (build_scop_conditions_1, build_scop_conditions): Remove check for
3210 non iv scalar phi nodes.
3211 (print_scop_statistics): New.
3212 (graphite_transform_loops): Cleanup.
3214 * graphite.h: Move to sese & cleanup.
3218 2009-02-16 Sebastian Pop <sebastian.pop@amd.com>
3219 Tobias Grosser <grosser@fim.uni-passau.de>
3221 * graphite.c (build_scop_conditions_1): Conditions are only
3222 at the end of a basic block.
3224 2009-02-16 Sebastian Pop <sebastian.pop@amd.com>
3225 Tobias Grosser <grosser@fim.uni-passau>
3227 * graphite.h (struct graphite_bb): Remove compressed_alpha_matrix
3229 (GBB_ALPHA): Removed.
3231 2009-02-16 Sebastian Pop <sebastian.pop@amd.com>
3232 Tobias Grosser <grosser@fim.uni-passau.de>
3234 * graphite-data-ref.c (graphite_test_dependence): Don't use
3235 GBB_DYNAMIC_SCHEDULE.
3236 * graphite.c (new_graphite_bb): Same.
3237 (free_graphite_bb): Same.
3238 (build_scop_dynamic_schedules): Removed.
3239 (graphite_transform_loops): Don't call it.
3240 * graphite.h (struct graphite_bb): Remove dynamic_schedule field.
3241 (GBB_DYNAMIC_SCHEDULE): Removed.
3243 2009-02-16 Sebastian Pop <sebastian.pop@amd.com>
3244 Tobias Grosser <grosser@fim.uni-passau.de>
3246 * graphite.c (schedule_to_scattering): Don't use CloogMatrix.
3247 (print_graphite_bb): Same.
3248 (build_cloog_prog): Same.
3250 2009-02-16 Sebastian Pop <sebastian.pop@amd.com>
3251 Tobias Grosser <grosser@fim.uni-passau.de>
3253 * graphite.c (build_cloog_prog): Don't use CloogMatrix.
3255 2009-02-16 Sebastian Pop <sebastian.pop@amd.com>
3256 Tobias Grosser <grosser@fim.uni-passau.de>
3258 * graphite.c (build_scop_context): Don't use CloogMatrix.
3259 * graphite-ppl.c (new_Cloog_Domain_from_ppl_Polyhedron): New.
3260 * graphite-ppl.h (new_Cloog_Domain_from_ppl_Polyhedron): Declared.
3262 2009-02-16 Sebastian Pop <sebastian.pop@amd.com>
3263 Tobias Grosser <grosser@fim.uni-passau.de>
3265 * graphite.h (struct scop): Move params, old_ivs, loops, loop_nest,
3266 liveout_renames, add_params fields...
3267 (struct sese): ... here.
3268 (SESE_PARAMS, SESE_LOOPS, SESE_LOOP_NEST, SESE_ADD_PARAMS,
3269 SESE_PARAMS, SESE_OLDIVS, SESE_LIVEOUT_RENAMES): New.
3271 2009-02-16 Sebastian Pop <sebastian.pop@amd.com>
3272 Tobias Grosser <grosser@fim.uni-passau.de>
3274 * graphite.c (print_scop): Do not print the CLooG program.
3275 (new_scop, free_scop, initialize_cloog_names, build_scop_context,
3276 build_cloog_prog, gloog): Don't use SCOP_PROG.
3277 (find_transform): Renamed scop_to_clast.
3278 (print_generated_program, debug_generated_program): New.
3279 (graphite_transform_loops): Adapt to new interface.
3280 * graphite.h (struct scop): Remove program field.
3281 (SCOP_PROG): Removed.
3282 (print_generated_program, debug_generated_program): Declared.
3284 2009-02-16 Sebastian Pop <sebastian.pop@amd.com>
3286 * graphite-data-ref.c (schedule_precedes_p, schedule_same_p): New.
3287 (statement_precedes_p): Use schedule_same_p and schedule_precedes_p.
3288 * graphite.c (gbb_compare, schedule_to_scattering, print_graphite_bb,
3289 free_graphite_bb, build_scop_canonical_schedules,
3290 graphite_trans_bb_strip_mine, graphite_trans_scop_block): Static
3291 schedules are now represented using a ppl_Linear_Expression_t.
3292 * graphite.h (struct graphite_bb): Same.
3293 * graphite-ppl.c (ppl_lexico_compare_linear_expressions): New.
3294 * graphite-ppl.h (ppl_lexico_compare_linear_expressions): Declared.
3296 2009-02-15 Sebastian Pop <sebastian.pop@amd.com>
3298 * graphite.c: Free local memory.
3299 * graphite-ppl.c: Same.
3301 2009-02-15 Sebastian Pop <sebastian.pop@amd.com>
3303 * graphite.c (const_column_index, get_first_matching_sign_row_index,
3304 get_lower_bound_row, get_upper_bound_row, copy_constraint,
3305 swap_constraint_variables, scale_constraint_variable): Removed.
3306 (graphite_trans_bb_strip_mine): Remove pong.
3307 * graphite-ppl.c: Include missing header files.
3308 (set_inhomogeneous, set_coef, shift_poly, ppl_strip_loop): New.
3309 * graphite-ppl.h (ppl_strip_loop): Declared.
3310 * Makefile.in (graphite-ppl.o): Adjust dependences.
3312 2009-02-14 Sebastian Pop <sebastian.pop@amd.com>
3314 * graphite.c (build_loop_iteration_domains): Remove ping pong.
3315 (build_scop_iteration_domain): Same.
3317 2009-02-13 Sebastian Pop <sebastian.pop@amd.com>
3319 * graphite.c (scan_tree_for_params, add_conditions_to_domain): Remove
3321 (add_value_to_dim, scan_tree_for_params_right_scev,
3322 scan_tree_for_params_int): New.
3323 * graphite-ppl.c (oppose_constraint): New.
3324 (insert_constraint_into_matrix): Implement missing cases.
3325 * graphite-ppl.h (insert_constraint_into_matrix): Declared.
3327 2009-02-13 Sebastian Pop <sebastian.pop@amd.com>
3329 * graphite.c (graphite_trans_bb_move_loop): Remove ping pong,
3330 use ppl_move_dimension.
3332 2009-02-12 Sebastian Pop <sebastian.pop@amd.com>
3334 * graphite-data-ref.c: Domains are now ppl_Polyhedra_t.
3337 * graphite-ppl.c: Same.
3338 * graphite-ppl.h: Same.
3340 2009-02-12 Sebastian Pop <sebastian.pop@amd.com>
3342 Revert last 3 commits.
3344 2009-02-10 Sebastian Pop <sebastian.pop@amd.com>
3346 * graphite.c (scan_tree_for_params, add_conditions_to_domain): Remove
3348 (add_value_to_dim, scan_tree_for_params_right_scev,
3349 scan_tree_for_params_int): New.
3350 * graphite-ppl.c (oppose_constraint): New.
3351 (insert_constraint_into_matrix): Implement missing cases.
3352 * graphite-ppl.h (insert_constraint_into_matrix): Declared.
3354 2009-02-10 Sebastian Pop <sebastian.pop@amd.com>
3356 * graphite.c (graphite_trans_bb_move_loop): Remove unused variables.
3358 2009-02-10 Sebastian Pop <sebastian.pop@amd.com>
3359 Tobias Grosser <grosser@fim.uni-passau.de>
3361 * graphite.c (graphite_trans_bb_move_loop): Remove ping pong,
3362 use ppl_move_dimension.
3363 * graphite-ppl.c (ppl_move_dimension): New.
3364 * graphite-ppl.h (ppl_move_dimension): Declared.
3366 2009-02-10 Sebastian Pop <sebastian.pop@amd.com>
3368 * graphite.c: Do not include cloog/cloog.h.
3369 (print_graphite_bb): Remove ping pong, call PPL print function.
3371 2009-02-10 Tobias Grosser <grosser@fim.uni-passau.de>
3373 * Makefile.in (OBJS-common): Add graphite-ppl.o.
3374 (graphite.o): Add dependence on graphite-ppl.h.
3375 (graphite-ppl.o): New.
3376 (graphite-data-ref.c): Ping pong between PPL data structures
3378 * graphite-ppl.c: New.
3379 * graphite-ppl.h: New.
3380 * graphite.c: Include graphite-ppl.h.
3381 (print_graphite_bb, add_conditions_to_domain, build_cloog_prog,
3382 graphite_trans_bb_move_loop, graphite_trans_bb_strip_mine):
3383 Ping pong between PPL data structures and matrices.
3384 (new_graphite_bb): Create a PPL constraint system.
3385 Call ppl_delete_Constraint_System instead of cloog_matrix_free.
3386 (build_loop_iteration_domains): Use PPL functions.
3387 * graphite.h: Include graphite-ppl.h. Fix comments.
3388 (graphite_bb): Use a ppl_Constraint_System_t instead of
3389 CloogMatrix for representing the domain.
3390 (scop): Remove static_schedule.
3391 (gbb_nb_loops): Ping pong between PPL data structures and matrices.
3393 2009-02-06 Sebastian Pop <sebastian.pop@amd.com>
3395 * graphite.c: Fix some comments.
3397 2009-02-05 Sebastian Pop <sebastian.pop@amd.com>
3400 * graphite.c (if_region_set_false_region): After moving a region
3401 in the false branch of a condition, remove the empty dummy
3403 (gloog): Remove wrong fix for PR38953.
3405 2009-02-03 Tobias Grosser <grosser@fim.uni-passau.de>
3407 * graphite.c (bb_in_sese_p, sese_build_livein_liveouts_use,
3408 sese_build_livein_liveouts_bb, sese_build_livein_liveouts,
3409 register_bb_in_sese, new_sese, free_sese): Moved.
3410 (dot_scop_1, build_scop_loop_nests, build_loop_iteration_domains,
3411 outermost_loop_in_scop, build_scop_iteration_domain,
3412 expand_scalar_variables_ssa_name, get_vdef_before_scop,
3413 limit_scops): Use bb_in_sese_p instead of bb_in_scop_p.
3414 Use loop_in_sese_p instead of loop_in_scop_p.
3415 (new_graphite_bb, new_scop, gloog): Do not initialize SCOP_BBS_B.
3416 (free_scop): Do not free SCOP_BBS_B.
3417 (nb_loops_around_loop_in_scop, nb_loops_around_gb,
3418 ref_nb_loops): Moved here...
3419 * graphite.h (ref_nb_loops): ... from here.
3420 (struct scop): Remove bbs_b bitmap.
3421 (SCOP_BBS_B, bb_in_scop_p, loop_in_scop_p): Removed.
3422 * testsuite/gcc.dg/graphite/scop-19.c: New
3424 2009-02-03 Tobias Grosser <grosser@fim.uni-passau.de>
3426 * graphite.c (scopdet_basic_block_info): Fix bug in scop
3429 2009-01-30 Tobias Grosser <grosser@fim.uni-passau.de>
3431 * graphite.c (new_loop_to_cloog_loop_str, hash_loop_to_cloog_loop,
3432 eq_loop_to_cloog_loop): Remove.
3433 (new_scop, free_scop): Remove SCOP_LOOP2CLOOG_LOOP.
3434 * graphite.h (struct scop): Remove loop2cloog_loop.
3435 (loop_domain_dim, loop_iteration_vector_dim): Remove.
3437 2009-01-30 Tobias Grosser <grosser@fim.uni-passau.de>
3439 * opts.c (decode_options): Only add graphite options to O2
3440 if we compile with graphite enabled.
3442 2009-01-26 Sebastian Pop <sebastian.pop@amd.com>
3444 * Merge from mainline (r143163:143684).
3446 2009-01-26 Sebastian Pop <sebastian.pop@amd.com>
3448 * graphite.c (debug_value): Removed.
3449 * graphite.h (debug_value): Removed.
3451 2009-01-23 Sebastian Pop <sebastian.pop@amd.com>
3453 * passes.c (init_optimization_passes): Do not call pass_copy_prop
3454 after graphite: pass_copy_prop does not maintain a proper loop closed
3455 SSA form. pass_copy_prop should be fixed.
3457 2009-01-23 Sebastian Pop <sebastian.pop@amd.com>
3459 * graphite.c (scop_adjust_phis_for_liveouts): Fix warning.
3461 2009-01-23 Sebastian Pop <sebastian.pop@amd.com>
3463 * graphite.c (graphite_verify): Add a call to verify_loop_closed_ssa.
3464 (gloog): Split the exit of the scop when the scop exit is a loop exit.
3465 (graphite_transform_loops): Only call cleanup_tree_cfg if gloog
3468 2009-01-20 Sebastian Pop <sebastian.pop@amd.com>
3470 * graphite.c (gloog): Return true when code gen succeeded.
3471 (graphite_transform_loops): Do not call cleanup_tree_cfg if
3472 the code of the function did not changed. After cleanup_tree_cfg
3473 call rewrite_into_loop_closed_ssa to maintain the loop closed ssa
3476 2009-01-19 Sebastian Pop <sebastian.pop@amd.com>
3478 * graphite.c (stmt_simple_for_scop_p): Also handle cases when
3479 gimple_call_lhs is NULL.
3481 2009-01-16 Sebastian Pop <sebastian.pop@amd.com>
3482 Tobias Grosser <tobi.grosser@amd.com>
3484 * graphite.c (graphite_trans_scop_block): Do not block single
3487 2009-01-15 Sebastian Pop <sebastian.pop@amd.com>
3488 Tobias Grosser <tobi.grosser@amd.com>
3490 * graphite.c (build_scop_canonical_schedules): Start schedules at
3493 2009-01-15 Sebastian Pop <sebastian.pop@amd.com>
3494 Tobias Grosser <tobi.grosser@amd.com>
3496 * graphite.c (compare_prefix_loops): New.
3497 (build_scop_canonical_schedules): Rewritten.
3498 (graphite_transform_loops): Move build_scop_canonical_schedules
3499 after build_scop_iteration_domain.
3501 2009-01-14 Sebastian Pop <sebastian.pop@amd.com>
3502 Tobias Grosser <tobi.grosser@amd.com>
3504 * graphite.c (add_conditions_to_domain): Add the loops to
3505 the dimension of the iteration domain. Do copy the domain
3506 only when it exists.
3507 (build_scop_conditions_1): Do not call add_conditions_to_domain.
3508 (add_conditions_to_constraints): New.
3509 (can_generate_code_stmt, can_generate_code): Removed.
3510 (gloog): Do not call can_generate_code.
3511 (graphite_transform_loops): Call add_conditions_to_constraints
3512 after building the iteration domain.
3514 2009-01-14 Sebastian Pop <sebastian.pop@amd.com>
3515 Tobias Grosser <tobi.grosser@amd.com>
3516 Jan Sjodin <jan.sjodin@amd.com>
3518 * graphite.c (scan_tree_for_params): On substractions negate
3519 all the coefficients of the term.
3520 (clast_to_gcc_expression_red): New. Handle reduction expressions
3521 of more than two operands.
3522 (clast_to_gcc_expression): Call clast_to_gcc_expression_red.
3523 (get_vdef_before_scop): Handle also the case of default definitions.
3525 2009-01-14 Sebastian Pop <sebastian.pop@amd.com>
3528 * graphite.c (get_vdef_before_scop, scop_adjust_vphi): New.
3529 (scop_adjust_phis_for_liveouts): Call scop_adjust_vphi.
3530 (gloog): Do not call cleanup_tree_cfg.
3531 (graphite_transform_loops): Call cleanup_tree_cfg after all
3532 scops have been code generated.
3534 2009-01-13 Sebastian Pop <sebastian.pop@amd.com>
3536 * passes.c (init_optimization_passes): Schedule after
3537 graphite transforms pass_copy_prop, pass_dce_loop and pass_lim.
3539 2009-01-13 Sebastian Pop <sebastian.pop@amd.com>
3541 * graphite.c (expand_scalar_variables_stmt): Do not pass loop_p.
3543 (expand_scalar_variables_ssa_name): Do not pass loop_p. Fix comment.
3544 Set the type of an expression to the type of its assign statement.
3545 (expand_scalar_variables_expr): Do not pass loop_p.
3546 Fix comment. Stop recursion on tcc_constant or tcc_declaration.
3547 (copy_bb_and_scalar_dependences): Do not pass loop_p.
3548 (translate_clast): Update call to copy_bb_and_scalar_dependences.
3550 2009-01-11 Sebastian Pop <sebastian.pop@amd.com>
3552 * graphite.c (expand_scalar_variables_ssa_name): Set the type of
3553 an expression to the gimple_expr_type of its assign statement.
3554 (expand_scalar_variables_expr): Stop recursion on tcc_constant
3557 2009-01-11 Sebastian Pop <sebastian.pop@amd.com>
3559 PR tree-optimization/38786
3560 * testsuite/gcc.dg/graphite/pr38786.c: New.
3561 * graphite.c (expand_scalar_variables_ssa_name): New, outlined from
3562 the SSA_NAME case of expand_scalar_variables_expr.
3563 (expand_scalar_variables_expr): Also gather the scalar computation
3564 used to index the memory access.
3565 (expand_scalar_variables_stmt): Pass to expand_scalar_variables_expr
3566 the gimple_stmt_iterator where it inserts new code.
3568 2009-01-10 Sebastian Pop <sebastian.pop@amd.com>
3570 * testsuite/gcc.dg/graphite/block-3.c: Fix compile error on 32bit.
3572 2009-01-10 Sebastian Pop <sebastian.pop@amd.com>
3574 * opts.c (decode_options): Enable flag_graphite_identity and
3575 flag_loop_block in -O2 and above.
3577 2009-01-08 Sebastian Pop <sebastian.pop@amd.com>
3579 * libjava/classpath/lib/gnu/java/awt/peer/gtk/GtkMouseInfoPeer.class:
3580 Fix merge problem: replace with the file from trunk.
3582 2009-01-08 Sebastian Pop <sebastian.pop@amd.com>
3584 * Merge from mainline (r141727:143163).
3586 2009-01-07 Sebastian Pop <sebastian.pop@amd.com>
3587 Jan Sjodin <jan.sjodin@amd.com>
3589 PR tree-optimization/38559
3590 * testsuite/gcc.dg/graphite/pr38559.c: New.
3592 * graphite.c (debug_value, copy_constraint,
3593 swap_constraint_variables, scale_constraint_variable, ): New.
3594 (get_lower_bound, get_upper_bound): Removed.
3595 (graphite_trans_bb_strip_mine): Clean up this code that works
3596 only for constant number of iterations. Fully copy upper and
3597 lower bound constraints, not only the constant part of them.
3598 * graphite.h (debug_value): Declared.
3600 2009-01-06 Jan Sjodin <jan.sjodin@amd.com>
3602 PR tree-optimization/38492
3603 PR tree-optimization/38498
3604 * tree-check.c (operator_is_linear, scev_is_linear_expression): New.
3605 * tree-chrec.h (scev_is_linear_expression): Declared.
3606 * graphite.c (graphite_cannot_represent_loop_niter): New.
3607 (scopdet_basic_block_info): Call graphite_cannot_represent_loop_niter.
3608 (graphite_loop_normal_form): Use gcc_assert.
3609 (scan_tree_for_params): Use CASE_CONVERT.
3610 (phi_node_is_iv, bb_contains_non_iv_scalar_phi_nodes): New.
3611 (build_scop_conditions_1): Call bb_contains_non_iv_scalar_phi_nodes.
3612 Use gcc_assert. Discard scops that contain unhandled cases.
3613 (build_scop_conditions): Return a boolean status for unhandled cases.
3614 (strip_mine_profitable_p): Print the loop number, not its depth.
3615 (is_interchange_valid): Pass the depth of the loop nest, don't
3616 recompute it wrongly.
3617 (graphite_trans_bb_block): Same.
3618 (graphite_trans_bb_block): Print tentative of loop blocking.
3619 (graphite_trans_scop_block): Do not print that the loop has been
3621 (graphite_transform_loops): Do not handle scops that contain condition
3624 * testsuite/gcc.dg/graphite/pr38500.c: Fixed warning as committed
3626 * testsuite/gcc.dg/graphite/block-0.c: Update test.
3627 * testsuite/gcc.dg/graphite/block-1.c: Same.
3628 * testsuite/gcc.dg/graphite/block-2.c: Remove xfail and test for
3630 * testsuite/gcc.dg/graphite/block-4.c: Remove test for strip mine.
3631 * testsuite/gcc.dg/graphite/block-3.c: New.
3632 * testsuite/gcc.dg/graphite/pr38498.c: New.
3634 2008-12-22 Harsha Jagasia <harsha.jagasia@amd.com>
3636 PR tree-optimization/38510
3637 * gcc.dg/graphite/pr38510.c: New.
3638 * graphite.c (recompute_all_dominators): Call mark_irreducible_loops.
3639 (translate_clast): Call recompute_all_dominators before
3641 (gloog): Call recompute_all_dominators before graphite_verify.
3643 2008-12-12 Sebastian Pop <sebastian.pop@amd.com>
3645 PR tree-optimization/38492
3646 * graphite.c (rename_map_elt, debug_rename_elt,
3647 debug_rename_map_1, debug_rename_map, new_rename_map_elt,
3648 rename_map_elt_info, eq_rename_map_elts,
3649 get_new_name_from_old_name, bb_in_sese_p): Moved around.
3650 (sese_find_uses_to_rename_use): Renamed sese_build_livein_liveouts_use.
3651 (sese_find_uses_to_rename_bb): Renamed sese_build_livein_liveouts_bb.
3652 (sese_build_livein_liveouts): New.
3653 (new_sese, free_sese): New.
3654 (new_scop): Call new_sese.
3655 (free_scop): Call free_sese.
3656 (rename_variables_from_edge, rename_phis_end_scop): Removed.
3657 (register_old_new_names): Renamed register_old_and_new_names.
3658 (register_scop_liveout_renames, add_loop_exit_phis,
3659 insert_loop_close_phis, struct igp,
3660 default_liveout_before_guard, add_guard_exit_phis,
3661 insert_guard_phis, copy_renames): New.
3662 (translate_clast): Call insert_loop_close_phis and insert_guard_phis.
3663 (sese_add_exit_phis_edge): Renamed scop_add_exit_phis_edge.
3664 (rewrite_into_sese_closed_ssa): Renamed scop_insert_phis_for_liveouts.
3665 (scop_adjust_phis_for_liveouts): New.
3666 (gloog): Call scop_adjust_phis_for_liveouts.
3668 * graphite.h (struct sese): Documented. Added fields liveout,
3670 (SESE_LIVEOUT, SESE_LIVEIN, SESE_LIVEIN_VER, SESE_NUM_VER): New.
3671 (new_sese, free_sese, sese_build_livein_liveouts): Declared.
3672 (struct scop): Added field liveout_renames.
3673 (SCOP_LIVEOUT_RENAMES): New.
3675 2008-12-11 Sebastian Pop <sebastian.pop@amd.com>
3677 PR tree-optimization/38409
3678 * gcc.dg/graphite/pr38409.c: New.
3679 * graphite.c (nb_reductions_in_loop): Use simple_iv.
3681 2008-12-11 Sebastian Pop <sebastian.pop@amd.com>
3683 * graphite.c (gcc_type_for_cloog_iv): By default return
3685 (graphite_create_new_loop): Don't fold_convert the already
3686 fold_convert-ed expression.
3688 2008-12-11 Harsha Jagasia <harsha.jagasia@amd.com>
3690 PR tree-optimization/38446
3691 * gcc.dg/graphite/pr38446.c: New.
3692 * graphite.c (register_bb_in_sese): New.
3693 (bb_in_sese_p): Check if bb belongs to sese region by explicitly
3694 looking at the bbs in the region.
3695 * graphite.h (sese): Add region_basic_blocks pointer set to
3696 structure and initialize at the time of defining new scop.
3698 2008-12-11 Tobias Grosser <grosser@fim.uni-passau.de>
3700 * graphite.c (new_graphite_bb): Initialize GBB_STATIC_SCHEDULE.
3701 (find_params_in_bb): Do not free data refs.
3702 (free_graphite_bb): Add FIXME on disabled free_data_refs.
3704 2008-12-11 Sebastian Pop <sebastian.pop@amd.com>
3706 * testsuite/gcc.dg/graphite/scop-16.c: Test only scop specific info.
3707 * testsuite/gcc.dg/graphite/scop-17.c: Same.
3708 * testsuite/gcc.dg/graphite/block-5.c: New.
3709 * testsuite/gcc.dg/graphite/block-6.c: New.
3710 * testsuite/gcc.dg/graphite/pr37485.c: Clean dump file after.
3711 * testsuite/gcc.dg/graphite/pr37684.c: Same.
3712 * testsuite/gcc.dg/graphite/block-2.c: Same.
3714 * graphite.c (struct ivtype_map_elt): New.
3715 (debug_ivtype_elt, debug_ivtype_map_1, debug_ivtype_map,
3716 new_ivtype_map_elt, ivtype_map_elt_info, eq_ivtype_map_elts,
3717 gcc_type_for_cloog_iv): New.
3718 (loop_iv_stack_patch_for_consts): Use the type of the induction
3719 variable from the original loop, except for the automatically
3720 generated loops, i.e., in the case of a strip-mined loop, in
3721 which case there is no original loop: in that case just use
3723 (new_graphite_bb): Initialize GBB_CLOOG_IV_TYPES.
3724 (free_graphite_bb): Free GBB_CLOOG_IV_TYPES.
3725 (clast_name_to_gcc): Accept params to be NULL.
3726 (clast_to_gcc_expression): Take an extra parameter for the type.
3727 Convert to that type all the expressions built by this function.
3728 (gcc_type_for_clast_expr, gcc_type_for_clast_eq): New.
3729 (graphite_translate_clast_equation): Compute the type of the
3730 clast_equation before translating its LHS and RHS.
3731 (clast_get_body_of_loop, gcc_type_for_iv_of_clast_loop): New.
3732 (graphite_create_new_loop): Compute the type of the induction
3733 variable before translating the lower and upper bounds and before
3734 creating the induction variable.
3735 (rename_variables_from_edge, rename_phis_end_scop): New.
3736 (copy_bb_and_scalar_dependences): Call rename_phis_end_scop.
3737 (sese_add_exit_phis_edge): Do not use integer_zero_node.
3738 (find_cloog_iv_in_expr, compute_cloog_iv_types_1,
3739 compute_cloog_iv_types): New.
3740 (gloog): Call compute_cloog_iv_types before starting the
3741 translation of the clast.
3743 * graphite.h (struct graphite_bb): New field cloog_iv_types.
3744 (GBB_CLOOG_IV_TYPES): New.
3745 (debug_ivtype_map): Declared.
3746 (oldiv_for_loop): New.
3748 2008-12-10 Tobias Grosser <grosser@fim.uni-passau.de>
3751 * graphite.c (new_scop): Initialize SCOP_ADD_PARAMS.
3752 (param_index): Assert if parameter is not know after parameter
3754 (find_params_in_bb): Detect params directly in GBB_CONDITIONS.
3755 (find_scop_parameters): Mark, that we have finished parameter
3757 (graphite_transform_loops): Move condition detection before parameter
3759 * graphite.h (struct scop): Add SCOP_ADD_PARAMS.
3760 * testsuite/gfortran.dg/graphite/pr38459.f90: New.
3762 2008-12-09 Tobias Grosser <grosser@fim.uni-passau.de>
3764 * graphite.c (graphite_transform_loops): Always call find_transform ()
3765 in ENABLE_CHECKING. So we test these code paths, even if we do not
3768 2008-12-09 Tobias Grosser <grosser@fim.uni-passau.de>
3770 * graphite.c (print_graphite_bb): Fix printing to file != dump_file.
3771 (print_scop): Ditto.
3773 2008-12-08 Tobias Grosser <grosser@fim.uni-passau.de>
3776 Fix testsuite/gfortran.dg/graphite/id-3.f90.
3777 * graphite.c (scopdet_basic_block_info): Fix bug that found some
3778 regions more than once.
3780 2008-12-03 Sebastian Pop <sebastian.pop@amd.com>
3782 Fix testsuite/gfortran.dg/graphite/id-4.f90.
3783 * graphite.c (scan_tree_for_params): Do not compute the multiplicand
3786 2008-12-03 Sebastian Pop <sebastian.pop@amd.com>
3788 Fix testsuite/gfortran.dg/graphite/id-1.f90.
3789 * graphite.c (gmp_cst_to_tree): Pass the type in parameter.
3790 (loop_iv_stack_patch_for_consts): Update use of gmp_cst_to_tree.
3791 (max_precision_type): New.
3792 (value_clast): Removed.
3793 (clast_to_gcc_expression): Be more careful to types of expressions.
3794 Use max_precision_type and update use of gmp_cst_to_tree.
3795 (graphite_translate_clast_equation): Use max_precision_type.
3796 (graphite_create_guard_cond_expr): Do not use integer_type_node,
3797 use the type of the condition.
3798 (graphite_create_new_loop): Do not use integer_type_node, use the
3799 max_precision_type of lb and ub.
3801 2008-12-03 Sebastian Pop <sebastian.pop@amd.com>
3803 * graphite.c (build_scops_1): Initialize open_scop.exit
3806 2008-12-02 Sebastian Pop <sebastian.pop@amd.com>
3808 * testsuite/gcc.dg/graphite/pr38084.c: New.
3809 * testsuite/gfortran.dg/graphite/id-1.f90: New.
3810 * testsuite/gfortran.dg/graphite/id-2.f90: New.
3811 * testsuite/gfortran.dg/graphite/id-3.f90: New.
3812 * testsuite/gfortran.dg/graphite/id-4.f90: New.
3813 * testsuite/gfortran.dg/graphite/pr37857.f90: New.
3815 2008-12-02 Sebastian Pop <sebastian.pop@amd.com>
3816 Jan Sjodin <jan.sjodin@amd.com>
3817 Harsha Jagasia <harsha.jagasia@amd.com>
3829 * testsuite/gcc.dg/graphite/pr38073.c: New.
3830 * testsuite/gcc.dg/graphite/pr37928.c: New.
3831 * testsuite/gcc.dg/graphite/pr37883.c: New.
3832 * testsuite/gcc.dg/graphite/pr38125.c: New.
3833 * testsuite/gfortran.dg/graphite/pr38083.f90: New.
3834 * testsuite/gfortran.dg/graphite/pr37852.f90: New.
3835 * testsuite/gfortran.dg/graphite/pr37980.f90: New.
3837 * testsuite/gcc.dg/graphite/scop-18.c: Remove reduction, test for
3838 the number of detected scops. Copy exact same test for loop
3840 * testsuite/gcc.dg/graphite/block-1.c: Fix the number of expected
3841 loops to be blocked as reductions are not handled.
3842 * testsuite/gcc.dg/graphite/block-4.c: ...here. New.
3844 * tree-phinodes.c (remove_phi_nodes): New, extracted from...
3845 * tree-cfg.c (remove_phi_nodes_and_edges_for_unreachable_block):
3847 * tree-flow.h (remove_phi_nodes, canonicalize_loop_ivs): Declared.
3848 * Makefile.in (graphite.o): Depend on value-prof.h.
3849 (graphite.o-warn): Removed -Wno-error.
3850 * tree-parloops.c (canonicalize_loop_ivs): Allow reduction_list
3851 to be a NULL pointer. Call update_stmt. Return the newly created
3852 cannonical induction variable.
3854 * graphite.h (debug_rename_map): Declared. Fix some comments.
3856 * graphite.c: Reimplement the code generation from graphite to gimple.
3857 Include value-prof.h.
3858 (loop_iv_stack_get_iv): Do not return NULL for constant substitutions.
3859 (get_old_iv_from_ssa_name): Removed.
3860 (graphite_stmt_p): New.
3861 (new_graphite_bb): Test for useful statements before building a
3862 graphite statement for the basic block.
3863 (free_graphite_bb): Do not free GBB_DATA_REFS: this is a bug
3864 in free_data_ref that calls BITMAP_FREE (DR_VOPS (dr)) without
3866 (recompute_all_dominators, graphite_verify,
3867 nb_reductions_in_loop, graphite_loop_normal_form): New.
3868 (scop_record_loop): Call graphite_loop_normal_form.
3869 (build_scop_loop_nests): Iterate over all the blocks of the
3870 function instead of relying on the incomplete information from
3871 SCOP_BBS. Return the success of the operation.
3872 (find_params_in_bb): Use the data from GBB_DATA_REFS.
3873 (add_bb_domains): Removed.
3874 (build_loop_iteration_domains): Don't call add_bb_domains.
3875 Add the iteration domain only to the basic blocks that have been
3876 translated to graphite.
3877 (build_scop_conditions_1): Add constraints only if the basic
3878 block have been translated to graphite.
3879 (build_scop_data_accesses): Completely disabled until data
3880 dependence is correctly implemented.
3881 (debug_rename_elt, debug_rename_map_1, debug_rename_map): New.
3882 (remove_all_edges_1, remove_all_edges): Removed.
3883 (get_new_name_from_old_name): New.
3884 (graphite_rename_variables_in_stmt): Renamed
3885 rename_variables_in_stmt. Call get_new_name_from_old_name.
3886 Use replace_exp and update_stmt.
3887 (is_old_iv): Renamed is_iv.
3888 (expand_scalar_variables_stmt): Extra parameter for renaming map.
3889 Use replace_exp and update_stmt.
3890 (expand_scalar_variables_expr): Same. Use the map to get the
3891 new names for the renaming of induction variables and for the
3892 renaming of variables after a basic block has been copied.
3893 (expand_scalar_variables): Same.
3894 (graphite_rename_variables): Renamed rename_variables.
3895 (move_phi_nodes): Removed.
3896 (get_false_edge_from_guard_bb): New.
3897 (build_iv_mapping): Do not insert the induction variable of a
3898 loop in the renaming iv map if the basic block does not belong
3900 (register_old_new_names, graphite_copy_stmts_from_block,
3901 copy_bb_and_scalar_dependences): New.
3902 (translate_clast): Heavily reimplemented: copy basic blocks,
3903 do not move them. Finally, in call cleanup_tree_cfg in gloog.
3904 At each translation step call graphite_verify ensuring the
3905 consistency of the SSA, loops and dominators information.
3906 (collect_virtual_phis, find_vdef_for_var_in_bb,
3907 find_vdef_for_var_1, find_vdef_for_var,
3908 patch_phis_for_virtual_defs): Removed huge hack.
3909 (mark_old_loops, remove_dead_loops, skip_phi_defs,
3910 collect_scop_exit_phi_args, patch_scop_exit_phi_args,
3911 gbb_can_be_ignored, scop_remove_ignoreable_gbbs, ): Removed.
3912 (remove_sese_region, ifsese, if_region_entry, if_region_exit,
3913 if_region_get_condition_block, if_region_set_false_region,
3914 create_if_region_on_edge, move_sese_in_condition, bb_in_sese_p,
3915 sese_find_uses_to_rename_use, sese_find_uses_to_rename_bb,
3916 sese_add_exit_phis_edge, sese_add_exit_phis_var,
3917 rewrite_into_sese_closed_ssa): New.
3918 (gloog): Remove dead code. Early return if code cannot be
3919 generated. Call cleanup_tree_cfg once the scop has been code
3921 (graphite_trans_scop_block, graphite_trans_loop_block): Do not
3922 block loops with less than two loops.
3923 (graphite_apply_transformations): Remove the call to
3924 scop_remove_ignoreable_gbbs.
3925 (limit_scops): When build_scop_loop_nests fails, continue on
3926 the next scop. Fix open_scop.entry.
3927 (graphite_transform_loops): Call recompute_all_dominators: force the
3928 recomputation of correct CDI_DOMINATORS and CDI_POST_DOMINATORS.
3929 Call initialize_original_copy_tables and free_original_copy_tables
3930 to be able to copy basic blocks during code generation.
3931 When build_scop_loop_nests fails, continue on next scop.
3932 (value_clast): New union.
3933 (clast_to_gcc_expression): Fix type cast warning.
3935 2008-11-09 Sebastian Pop <sebastian.pop@amd.com>
3937 * Merge from mainline (r140838:141727).
3939 2008-11-05 Tobias Grosser <grosser@fim.uni-passau.de>
3943 * graphite.c (scan_tree_for_params): Add POINTER_PLUS_EXPR.
3945 2008-11-05 Tobias Grosser <grosser@fim.uni-passau.de>
3949 * graphite.c (scopdet_basic_block_info): Fix loops with multiple
3950 exits and conditions.
3951 * testsuite/gcc.dg/graphite/pr37943.c: New.
3953 2008-10-23 Tobias Grosser <grosser@fim.uni-passau.de>
3956 * graphite.c (gloog): Replace EXIT_BLOCK_PTR with scop exit.
3958 2008-10-23 Tobias Grosser <grosser@fim.uni-passau.de>
3960 * doc/invoke.texi: Fix spaces.
3962 2008-10-22 Sebastian Pop <sebastian.pop@amd.com>
3964 PR tree-optimization/37891
3965 Reverted last commit.
3966 * graphite.c (create_single_entry_edge): Set
3967 EDGE_IRREDUCIBLE_LOOP and BB_IRREDUCIBLE_LOOP.
3969 2008-10-21 Sebastian Pop <sebastian.pop@amd.com>
3970 Mitul Thakkar <mitul.thakkar@amd.com>
3972 * graphite.c (create_single_entry_edge): Set
3973 EDGE_IRREDUCIBLE_LOOP and BB_IRREDUCIBLE_LOOP.
3975 2008-10-16 Tobias Grosser <grosser@fim.uni-passau.de>
3977 * doc/invoke.texi: Add -fgraphite-identity.
3978 * graphite.c (graphite_apply_transformations): Check for
3979 -fgraphite-identity.
3980 * toplev.c (process_options): Add flag_graphite_identity.
3981 * tree-ssa-loop.c: Add flag_graphite_identity.
3983 2008-10-14 Sebastian Pop <sebastian.pop@amd.com>
3985 Undo changes from 2008-10-02:
3986 * tree-ssa-loop-ivopts.c (rewrite_use_nonlinear_expr): Convert
3987 operand type when copying the operand to a variable of different type.
3988 * cfgloopmanip.c (create_empty_loop_on_edge): Write exit condition
3989 with the IV name after increment.
3991 2008-10-14 Sebastian Pop <sebastian.pop@amd.com>
3992 Harsha Jagasia <harsha.jagasia@amd.com>
3994 PR tree-optimization/37828
3995 * testsuite/gcc.dg/graphite/pr37828.c: New.
3996 * graphite.c (graphite_trans_loop_block): Do not loop block
3997 single nested loops.
3999 2008-10-09 Harsha Jagasia <harsha.jagasia@amd.com>
4000 Sebastian Pop <sebastian.pop@amd.com>
4002 * graphite.c (struct rename_map_elt, new_rename_map_elt,
4003 rename_map_elt_info, eq_rename_map_elts): New.
4004 (graphite_rename_ivs_stmt): Renamed graphite_rename_variables_in_stmt.
4005 (expand_scalar_variables_expr): Change parameters.
4006 (expand_scalar_variables_stmt): Same.
4007 (expand_scalar_variables): Same.
4008 (graphite_rename_ivs): Rename graphite_rename_variables.
4009 (build_iv_mapping): New.
4010 (translate_clast): Call build_iv_mapping.
4011 * graphite.h (gbb_p): New name.
4013 2008-10-03 Harsha Jagasia <harsha.jagasia@amd.com>
4015 PR tree-optimization/37684
4016 * gcc.dg/graphite/pr37684.c: New.
4017 * graphite.c (exclude_component_ref): New.
4018 (is_simple_operand): Call exclude_component_ref.
4020 2008-10-02 Jan Sjodin <jan.sjodin@amd.com>
4021 Harsha Jagasia <harsha.jagasia@amd.com>
4023 PR tree-optimization/37485
4024 * gcc.dg/graphite/block-2.c: New
4025 * graphite.c (gmp_cst_to_tree): Moved.
4026 (iv_stack_entry_is_constant): New.
4027 (iv_stack_entry_is_iv): New.
4028 (loop_iv_stack_push): Renamed to loop_iv_stack_push_iv.
4029 (loop_iv_stack_insert_constant): New.
4030 (loop_iv_stack_pop): Use new datatpype.
4031 (loop_iv_stack_get_iv): Same.
4032 (loop_iv_stack_get_iv_from_name): Same.
4033 (loop_iv_stack_debug): Renamed to debug_loop_iv_stack.
4034 (loop_iv_stack_patch_for_consts): New.
4035 (loop_iv_stack_remove_constants): New.
4036 (graphite_create_new_loop): Use loop_iv_stack_push_iv.
4037 (translate_clast): Call loop_iv_stack_patch_for_consts and
4038 loop_iv_stack_remove_constants.
4039 (gloog): Use new datatype. Redirect construction edge to end
4040 block to avoid accidental deletion.
4041 * graphite.h (enum iv_stack_entry_kind): New. Tag for data in
4043 (union iv_stack_entry_data): New. Data in iv stack entry.
4044 (struct iv_stack_entry): New. Datatype for iv stack entries.
4046 2008-10-02 Sebastian Pop <sebastian.pop@amd.com>
4048 * tree-ssa-loop-ivopts.c (rewrite_use_nonlinear_expr): Convert
4049 operand type when copying the operand to a variable of different type.
4051 2008-10-02 Sebastian Pop <sebastian.pop@amd.com>
4053 * cfgloopmanip.c (create_empty_loop_on_edge): Write exit condition
4054 with the IV name after increment.
4056 2008-10-02 Sebastian Pop <sebastian.pop@amd.com>
4058 * Merge from mainline (r140164:140838).
4060 2008-09-10 Konrad Trifunovic <konrad.trifunovic@inria.fr>
4062 * graphite-data-ref.c: New.
4063 * graphite.c (print_scop): Also dump the dependence graph.
4064 (bb_in_scop_p, loop_in_scop_p, nb_loops_around_gb): Moved...
4065 (new_scop): Initialize SCOP_DEP_GRAPH.
4066 (build_scop_dynamic_schedules): New.
4067 (build_access_matrix_with_af): Fixed column numbering.
4068 (graphite_transform_loops): Call build_scop_dynamic_schedules.
4069 * graphite.h: Add ifndef/define guards against multiple inclusion.
4070 (struct scop): Add dep_graph field.
4071 (SCOP_DEP_GRAPH): Defined.
4072 (ref_nb_loops): Fixed and moved to other position.
4073 (bb_in_scop_p, loop_in_scop_p, nb_loops_around_gb): ... here.
4074 (nb_loops_around_loop_in_scop): New.
4075 (graphite_dump_dependence_graph): Declared.
4076 (graphite_build_rdg_all_levels): Declared.
4077 (graphite_test_dependence): Declared.
4078 * Makefile.in (graphite-data-ref.o): New target.
4080 2008-09-09 Sebastian Pop <sebastian.pop@amd.com>
4082 * Merge from mainline (139870:140164).
4084 2008-09-01 Sebastian Pop <sebastian.pop@amd.com>
4086 * Merge from mainline (138275:139870).
4087 * testsuite/gcc.dg/graphite/scop-matmult.c: XFailed as one of
4088 the commits from trunk broke the niter detection.
4090 2008-09-01 Sebastian Pop <sebastian.pop@amd.com>
4092 * graphite.c: Add more documentation. Fix formatting.
4093 (debug_loop_vec, debug_oldivs, loop_iv_stack,
4094 loop_iv_stack_debug): Moved...
4095 (schedule_to_scattering): Move before use.
4096 (dot_all_scops): Include in "#if 0" the code for system
4099 * graphite.h: (debug_loop_vec, debug_oldivs, loop_iv_stack,
4100 loop_iv_stack_debug): ...here.
4102 2008-08-29 Jan Sjodin <jan.sjodin@amd.com>
4104 * tree-phinodes.c (make_phi_node): Extern.
4105 (add_phi_node_to_bb): New.
4106 (create_phi_node): Call add_phi_node_to_bb.
4107 * tree-ssa-loop-ivopts.c (get_phi_with_result): New.
4108 (remove_statement): Handle case where stored phi was updated
4109 and is no longer the same.
4110 * graphite.c (is_parameter): New.
4112 (expand_scalar_variables_expr): New.
4113 (expand_scalar_variables_stmt): New.
4114 (expand_scalar_variables): New.
4115 (move_phi_nodes): Create new phi instead of moving old one.
4116 (translate_clast): Call expand_scalar_variables.
4117 (find_vdef_for_var_in_bb): Also scan regular definitions.
4118 (skip_phi_defs): New.
4119 (collect_scop_exit_phi_args): New.
4120 (patch_scop_exit_phi_args): New.
4121 (gloog): Patch phis after scop.
4122 * tree-flow.h: (add_phi_node_to_bb): Declared.
4123 (make_phi_node): Declared.
4125 2008-08-26 Sebastian Pop <sebastian.pop@amd.com>
4127 * graphite.c (end_scop): Split the entry of the scop when it
4128 is the header of the loop in which the scop is ending.
4129 (build_scops_1, limit_scops): Update uses of end_scop.
4131 2008-08-26 Sebastian Pop <sebastian.pop@amd.com>
4133 * graphite.c (dot_all_scops_1): Do not fail on uninitialized
4134 SCOP_ENTRY or SCOP_EXIT.
4136 2008-08-25 Sebastian Pop <sebastian.pop@amd.com>
4138 * graphite.c (get_construction_edge): Removed.
4139 (gloog): Construction edge is the scop entry edge.
4141 2008-08-25 Sebastian Pop <sebastian.pop@amd.com>
4143 * graphite.c (can_generate_for_scop): Removed.
4144 (gloog): Do not call it.
4146 2008-08-25 Sebastian Pop <sebastian.pop@amd.com>
4148 * graphite.c (new_scop): Entry of a scop is an edge.
4149 Initialize SESE region.
4150 (free_scop): Free SESE region.
4151 (build_scops_1, scopdet_bb_info): Work on edges, not on bbs.
4152 (split_difficult_bb): New, split from end_scop.
4153 (end_scop): Exit of a scop is an edge.
4154 (build_scop_bbs): Never check CDI_POST_DOMINATORS: this info is
4155 not automatically updated and thus is always wrong.
4156 * graphite.h (struct sese): New.
4159 (struct scop): New field for a SESE region. Remove entry, exit.
4160 (SCOP_ENTRY, SCOP_EXIT): Update definitions to match same
4161 semantics as before. Moved comment around.
4163 2008-08-25 Tobias Grosser <grosser@fim.uni-passau.de>
4164 Sebastian Pop <sebastian.pop@amd.com>
4166 * graphite.c (graphite_transform_loops): Always enable gloog
4167 and find_transform when ENABLE_CHECKING.
4169 2008-08-25 Sebastian Pop <sebastian.pop@amd.com>
4171 * graphite.c (graphite_transform_loops): Move pretty printer
4172 of SCOPs before doing any transform. Remove call to print_scops
4173 and dot_all_scops_1.
4175 2008-08-25 Sebastian Pop <sebastian.pop@amd.com>
4177 * graphite.c (dump_gbb_conditions): Don't try to print NULL pointers.
4178 (print_graphite_bb): Same.
4180 2008-08-25 Sebastian Pop <sebastian.pop@amd.com>
4182 * graphite.c (dot_all_scops_1): Cleanup.
4183 (move_scops): Fix comment.
4185 2008-08-25 Sebastian Pop <sebastian.pop@amd.com>
4187 * graphite.c (build_scop_bbs): Revert commit 139355:
4189 2008-08-20 Sebastian Pop <sebastian.pop@amd.com>
4190 Dwarakanath Rajagopal <dwarak.rajagopal@amd.com>
4192 * graphite.c (build_scop_bbs): Factor up code.
4194 2008-08-25 Tobias Grosser <grosser@fim.uni-passau.de>
4196 * graphite.c (gloog): Update dominator info.
4198 2008-08-25 Tobias Grosser <grosser@fim.uni-passau.de>
4200 * graphite.c (remove_cond_exprs): Do not fail on empty bbs.
4202 2008-08-24 Sebastian Pop <sebastian.pop@amd.com>
4204 * graphite.c (new_graphite_bb): Remove GBB_INDEX_TO_NUM_MAP
4206 (free_graphite_bb): Remove GBB_INDEX_TO_NUM_MAP free.
4207 (translate_clast): Correct formatting.
4208 * graphite.h (struct num_map): Removed.
4209 (struct graphite_bb): Remove num_map field.
4210 (GBB_INDEX_TO_NUM_MAP): Removed.
4212 2008-08-24 Sebastian Pop <sebastian.pop@amd.com>
4214 * graphite.c (build_access_matrix_with_af): Fix comments.
4215 (build_scop_data_accesses): Same.
4217 2008-08-24 Sebastian Pop <sebastian.pop@amd.com>
4219 * graphite.c (build_scop_data_accesses): Don't construct
4220 access matrices. Add a FIXME and an assert condition that
4221 should pass when the access matrices will be needed.
4223 2008-08-24 Sebastian Pop <sebastian.pop@amd.com>
4225 * tree-data-ref.c (stmt_simple_memref_p): Don't call
4227 * graphite.c (build_graphite_bb): Renamed new_graphite_bb.
4228 Moved close by free_graphite_bb.
4229 (free_graphite_bb): Call free_data_refs. Reset bb->aux.
4230 (new_scop): Move close by free_scop.
4231 (graphite_transform_loops): Avoid linear scan to reset bb->aux.
4233 2008-08-22 Jan Sjodin <jan.sjodin@amd.com>
4235 * cfgloopmanip.c (create_empty_if_region_on_edge): New.
4236 * graphite.c (clast_to_gcc_expression): Call gmp_cst_to_tree
4237 instead of recursive call.
4238 (graphite_translate_clast_equation): New.
4239 (graphite_create_guard_cond_expr): New.
4240 (graphite_create_new_guard): New.
4241 (get_stack_index_from_iv): Removed.
4242 (graphite_rename_ivs_stmt): Use gbb_loop_index.
4243 (get_true_edge_from_guard_bb): New.
4244 (translate_clast): Handle stmt_guard in clast.
4245 (get_construction_edge): Allow construction edge detection for
4246 a scope entry with multiple predecessors if one predecessor is
4247 the immediate dominator of scope entry.
4248 (can_generate_code_stmt): Enable code generation for clast_guard.
4249 (gloog): Use correct context loop. Removed check for post dominators.
4250 * cfgloop.h (create_empty_if_region_on_edge): Declared.
4252 2008-08-21 Sebastian Pop <sebastian.pop@amd.com>
4254 * graphite.c (remove_dead_loops): Document better which
4257 2008-08-21 Sebastian Pop <sebastian.pop@amd.com>
4259 * Makefile.in: Rename POLYLIBLIBS and POLYLIBINC to PPLLIBS
4261 (graphite.o): Also depends on pointer-set.h.
4263 2008-08-21 Sebastian Pop <sebastian.pop@amd.com>
4265 * graphite.c (scop_record_loop): Fix compile warning.
4267 2008-08-21 Harsha Jagasia <harsha.jagasia@amd.com>
4268 Sebastian Pop <sebastian.pop@amd.com>
4270 * graphite.c (scop_record_loop): DECL_NAME can be NULL.
4272 2008-08-21 Sebastian Pop <sebastian.pop@amd.com>
4274 * graphite.c (build_graphite_bb): Initialize bb->aux to
4275 point to the graphite_bb_p.
4276 (graphite_bb_from_bb): Renamed gbb_from_bb; returns the
4278 (add_bb_domains): Does not use the scop parameter.
4279 (graphite_transform_loops): Clean bb->aux at the end.
4281 2008-08-20 Dwarakanath Rajagopal <dwarak.rajagopal@amd.com>
4282 Sebastian Pop <sebastian.pop@amd.com>
4284 * testsuite/lib/target-supports.exp
4285 (check_effective_target_fgraphite): New.
4287 * testsuite/gcc.dg/graphite/graphite.exp: Early exit when
4288 check_effective_target_fgraphite returns false.
4289 Set dg-do-what-default to compile.
4290 (scan-graphite-dump-times): Removed.
4291 * testsuite/gfortran.dg/graphite/graphite.exp: Same.
4293 * testsuite/gcc.dg/graphite/scop-0.c: Do not use "dg-do compile".
4294 Use scan-tree-dump-times instead of scan-graphite-dump-times.
4295 * testsuite/gcc.dg/graphite/scop-1.c: Same.
4296 * testsuite/gcc.dg/graphite/scop-2.c: Same.
4297 * testsuite/gcc.dg/graphite/scop-3.c: Same.
4298 * testsuite/gcc.dg/graphite/scop-4.c: Same.
4299 * testsuite/gcc.dg/graphite/scop-5.c: Same.
4300 * testsuite/gcc.dg/graphite/scop-6.c: Same.
4301 * testsuite/gcc.dg/graphite/scop-7.c: Same.
4302 * testsuite/gcc.dg/graphite/scop-8.c: Same.
4303 * testsuite/gcc.dg/graphite/scop-9.c: Same.
4304 * testsuite/gcc.dg/graphite/scop-10.c: Same.
4305 * testsuite/gcc.dg/graphite/scop-11.c: Same.
4306 * testsuite/gcc.dg/graphite/scop-12.c: Same.
4307 * testsuite/gcc.dg/graphite/scop-13.c: Same.
4308 * testsuite/gcc.dg/graphite/scop-matmult.c: Same.
4309 * testsuite/gcc.dg/graphite/scop-14.c: Same.
4310 * testsuite/gcc.dg/graphite/scop-15.c: Same.
4311 * testsuite/gcc.dg/graphite/block-0.c: Same.
4312 * testsuite/gcc.dg/graphite/scop-16.c: Same.
4313 * testsuite/gcc.dg/graphite/block-1.c: Same.
4314 * testsuite/gcc.dg/graphite/scop-17.c: Same.
4315 * testsuite/gcc.dg/graphite/scop-18.c: Same.
4316 * testsuite/gfortran.dg/graphite/block-1.f90: Same.
4317 * testsuite/gfortran.dg/graphite/scop-1.f: Same.
4318 * testsuite/gfortran.dg/graphite/block-2.f: Same.
4320 2008-08-20 Sebastian Pop <sebastian.pop@amd.com>
4322 * graphite.c: Fix some XXX comments.
4323 (build_scop_dynamic_schedules): Removed.
4325 2008-08-20 Sebastian Pop <sebastian.pop@amd.com>
4327 * graphite.h (scop_max_loop_depth): Moved...
4328 * graphite.c (scop_max_loop_depth): ...here.
4329 (remove_all_edges_1): New.
4330 (remove_all_edges): Factored code.
4331 (remove_cond_exprs): Check only the last statement for
4332 a GIMPLE_COND expression.
4334 2008-08-20 Sebastian Pop <sebastian.pop@amd.com>
4336 * graphite.c (scan_tree_for_params): Early return when the
4337 expression is a chrec_dont_know. Handle case NEGATE_EXPR.
4338 (find_scop_parameters): Factor out code.
4339 (graphite_trans_bb_strip_mine): Remove dead code.
4341 2008-08-20 Sebastian Pop <sebastian.pop@amd.com>
4343 * graphite.c (clast_to_gcc_expression, graphite_create_new_loop,
4344 graphite_trans_bb_move_loop): Factor asserts.
4345 (gloog): Perform sanity checks only for ENABLE_CHECKING.
4346 Do not call calculate_dominance_info and estimate_bb_frequencies.
4348 2008-08-20 Jan Sjodin <jan.sjodin@amd.com>
4350 * graphite.c (create_loops_mapping, free_loops_mapping,
4351 create_loops_mapping_num, debug_loop_mapping_1,
4352 debug_loop_mapping, graphite_loops_mapping_max_loop_num,
4353 get_loop_mapping_for_num, graphite_loops_mapping_add_child,
4354 graphite_loops_mapping_add_child_num,
4355 graphite_loops_mapping_insert_child,
4356 graphite_loops_mapping_parent, get_loop_mapped_depth_for_num,
4357 get_loop_mapped_depth, split_loop_mapped_depth_for_num,
4358 loop_mapped_depth_split_loop, swap_loop_mapped_depth_for_num,
4359 create_num_from_index, get_num_from_index,
4360 swap_loop_mapped_depth): Removed.
4361 (new_scop): Do not initialize SCOP_LOOPS_MAPPING.
4362 (free_scop): Do not call free_loops_mapping.
4363 (graphite_get_new_iv_stack_index_from_old_iv): Renamed
4364 get_stack_index_from_iv. Use GBB_LOOPS instead of calling
4365 get_loop_mapped_depth.
4366 (graphite_trans_bb_move_loop): Do not update the loop mapping.
4367 (graphite_trans_bb_strip_mine): Same.
4368 * graphite.h (graphite_loops_mapping, graphite_loop_node): Removed.
4369 (struct scop): Remove field loops_mapping.
4371 2008-08-20 Sebastian Pop <sebastian.pop@amd.com>
4372 Dwarakanath Rajagopal <dwarak.rajagopal@amd.com>
4374 * graphite.c (scop_record_loop): Factor out one level of the
4375 condition by early return.
4376 (build_scop_loop_nests): Format following FSF coding style.
4377 (build_scop_dynamic_schedules): Factor out code.
4378 (scopdet_bb_info): Reindent. Default case should not be reachable.
4380 2008-08-20 Sebastian Pop <sebastian.pop@amd.com>
4381 Dwarakanath Rajagopal <dwarak.rajagopal@amd.com>
4383 * graphite.c (loop_affine_expr): Check for DECL_P or struct
4384 assignments that are not handled as simple operands for now.
4386 2008-08-20 Sebastian Pop <sebastian.pop@amd.com>
4387 Dwarakanath Rajagopal <dwarak.rajagopal@amd.com>
4389 * graphite.c (build_scop_bbs): Factor up code.
4391 2008-08-20 Sebastian Pop <sebastian.pop@amd.com>
4392 Dwarakanath Rajagopal <dwarak.rajagopal@amd.com>
4394 * graphite.c (stmt_simple_for_scop_p): Factor code out
4396 (enum gbb_type): New. Group all the GBB_* types under it.
4397 (is_loop_exit): Moved...
4398 (end_scop): Enable BB spliting.
4399 * cfgloop.c (is_loop_exit): ...here. Reimplemented.
4400 * cfgloop.h (is_loop_exit): Declared.
4402 2008-08-20 Sebastian Pop <sebastian.pop@amd.com>
4404 * doc/invoke.texi: Remove strides from examples containing
4405 DO loops when the strides are equal to 1.
4407 2008-08-20 Harsha Jagasia <harsha.jagasia@amd.com>
4408 Dwarakanath Rajagopal <dwarak.rajagopal@amd.com>
4410 * graphite.c (graphite_trans_scop_block): Or the result with
4411 the result from graphite_trans_loop_block.
4412 * testsuite/gcc.dg/graphite/block-1.c: New.
4413 * testsuite/gfortran.dg/graphite/block-1.f90: New.
4414 * testsuite/gfortran.dg/graphite/block-2.f: New.
4416 2008-08-20 Sebastian Pop <sebastian.pop@amd.com>
4418 * graphite.c (graphite_transform_loops): Call cloog_initialize
4421 2008-08-20 Sebastian Pop <sebastian.pop@amd.com>
4423 * tree-data-ref.c) (stmt_simple_memref_p): New.
4424 * tree-data-ref.h (stmt_simple_memref_p): Declared.
4425 * graphite.c (stmt_simple_memref_for_scop_p): Removed.
4426 (is_simple_operand): Call stmt_simple_memref_p.
4428 * testsuite/gcc.dg/graphite/scop-matmult.c: Updated for not
4429 using pointer arithmetic, as this is optimized by PRE and
4430 makes the code too difficult to analyze.
4432 * testsuite/gcc.dg/graphite/scop-18.c: Same.
4434 2008-08-20 Sebastian Pop <sebastian.pop@amd.com>
4436 * gdbinit.in (pgg): New.
4438 2008-08-15 Tobias Grosser <grosser@fim.uni-passau.de>
4440 * graphite.c (graphite_trans_loop_block): Fix warning.
4442 2008-08-15 Tobias Grosser <grosser@fim.uni-passau.de>
4444 * graphite.c (graphite_trans_loop_block): Fix my merge error.
4446 2008-08-15 Tobias Grosser <grosser@fim.uni-passau.de>
4448 * graphite.c (graphite_trans_bb_block): Remove check for
4449 flag_loop_strip_mine, flag_loop_block, flag_loop_interchange.
4450 Check if loop blocking is profitable for every loop, before applying
4452 (graphite_apply_transformations): Call graphite_trans_bb_block only,
4453 if flag_loop_block is set.
4455 2008-08-14 Sebastian Pop <sebastian.pop@amd.com>
4457 * graphite.c: Add some more documentation for the loop
4460 2008-08-14 Sebastian Pop <sebastian.pop@amd.com>
4462 * Makefile.in (tree-data-ref.o): Remove dependence on graphite.h.
4463 * graphite.c: Format on less than 80 columns.
4466 2008-08-14 Sebastian Pop <sebastian.pop@amd.com>
4468 * cfgloopmanip.c (loopify): Use update_dominators_in_loop.
4470 2008-08-14 Sebastian Pop <sebastian.pop@amd.com>
4472 * doc/invoke.texi (floop-block, floop-strip-mine,
4473 floop-interchange): Update documentation with examples.
4475 2008-08-13 Sebastian Pop <sebastian.pop@amd.com>
4477 * cfgloopmanip.c (create_empty_loop_on_edge): Don't call
4479 * graphite.c (graphite_create_new_loop): Call add_referenced_var.
4481 2008-08-13 Sebastian Pop <sebastian.pop@amd.com>
4483 * cfgloopmanip.c (create_empty_loop_on_edge): Improve documentation.
4484 Factor gcc_asserts into a single one. Use force_gimple_operand_gsi.
4485 * tree-scalar-evolution.c: Revert useless changes.
4486 * tree-phinodes.c: Same.
4489 * tree-vectorizer.h: Same.
4490 * tree-flow.h: Same.
4492 * common.opt (fgraphite): Update documentation.
4494 2008-08-12 Harsha Jagasia <harsha.jagasia@amd.com>
4496 * doc/invoke.texi (-floop-block, -floop-strip-mine,
4497 -floop-interchange): Add more text for explaining what each of these
4499 * tree-into-ssa.c (gimple_vec): Moved to...
4500 * graphite.c: Include gimple.h.
4501 (gimple_vec): Moved to...
4502 (del_loop_to_cloog_loop): Removed.
4503 (loop_affine_expr): Do not call create_data_ref when the
4504 operand is a constant.
4505 (new_scop): Use free instead of del_loop_to_cloog_loop.
4506 * Makefile.in (graphite.o): Depend on GIMPLE_H.
4507 * gimple.h (gimple_vec): ... here.
4509 2008-08-11 Tobias Grosser <grosser@fim.uni-passau.de>
4511 * graphite.c (scopdet_bb_info): Only allow loops with known number of
4513 (build_loop_iteration_domains): Fail, if latch executions unknown.
4515 2008-08-11 Tobias Grosser <grosser@fim.uni-passau.de>
4517 * graphite.c (add_conditions_to_domain): New.
4518 (build_scop_conditions_1): Call add_conditions_to_domain.
4519 (set_cloog_options): Allow to disable optimizations.
4521 2008-08-11 Tobias Grosser <grosser@fim.uni-passau.de>
4523 * graphite.c (find_params_in_bb): Look for parameters in conditions.
4524 Do not use walk_dominator_tree.
4525 (find_scop_parameters): Do not use walk_dominator_tree.
4527 2008-08-11 Tobias Grosser <grosser@fim.uni-passau.de>
4529 * graphite.c (scan_tree_for_params) Add / Subtract inequality.
4530 (idx_record_params): Adapt.
4531 * graphite.h (scop_gimple_loop_depth): New.
4533 2008-08-11 Tobias Grosser <grosser@fim.uni-passau.de>
4535 * graphite.c (build_scop_dynamic_schedules): Remove value_init.
4536 (scan_tree_for_params): Remove value_init.
4537 (build_scop_context): Remove value_init.
4538 (build_loop_iteration_domains): Remove value_init.
4539 (schedule_to_scattering): Remove value_init.
4540 (graphite_trans_bb_strip_mine): Remove value_init.
4542 2008-08-11 Tobias Grosser <grosser@fim.uni-passau.de>
4544 * gcc/graphite.c (limit_scops): New.
4545 (graphite_transform_loops): Add limit SCoPs.
4546 * gcc/testsuite/gcc.dg/graphite/scop-0.c: Update number of SCoPs.
4547 * gcc/testsuite/gcc.dg/graphite/scop-1.c: Update number of SCoPs.
4548 * gcc/testsuite/gcc.dg/graphite/scop-10.c: Update number of SCoPs.
4549 * gcc/testsuite/gcc.dg/graphite/scop-11.c: Update number of SCoPs.
4550 * gcc/testsuite/gcc.dg/graphite/scop-12.c: Update number of SCoPs.
4551 * gcc/testsuite/gcc.dg/graphite/scop-13.c: Update number of SCoPs.
4552 * gcc/testsuite/gcc.dg/graphite/scop-14.c: Update number of SCoPs.
4553 * gcc/testsuite/gcc.dg/graphite/scop-15.c: Update number of SCoPs.
4554 * gcc/testsuite/gcc.dg/graphite/scop-16.c: Update number of SCoPs.
4555 Change loop numbers.
4556 * gcc/testsuite/gcc.dg/graphite/scop-17.c: Update number of SCoPs.
4557 Change loop numbers.
4558 * gcc/testsuite/gcc.dg/graphite/scop-18.c: Update number of SCoPs.
4559 * gcc/testsuite/gcc.dg/graphite/scop-2.c: Update number of SCoPs.
4560 * gcc/testsuite/gcc.dg/graphite/scop-3.c: Update number of SCoPs.
4561 * gcc/testsuite/gcc.dg/graphite/scop-4.c: Update number of SCoPs.
4562 * gcc/testsuite/gcc.dg/graphite/scop-5.c: Update number of SCoPs.
4563 * gcc/testsuite/gcc.dg/graphite/scop-6.c: Update number of SCoPs.
4564 * gcc/testsuite/gcc.dg/graphite/scop-7.c: Update number of SCoPs.
4565 * gcc/testsuite/gcc.dg/graphite/scop-8.c: Update number of SCoPs.
4566 * gcc/testsuite/gcc.dg/graphite/scop-9.c: Update number of SCoPs.
4567 * gcc/testsuite/gcc.dg/graphite/scop-matmult.c: Update number of SCoPs.
4569 2008-08-11 Tobias Grosser <grosser@fim.uni-passau.de>
4571 * graphite.c (graphite_transform_loops): Call always find_transform.
4573 2008-08-08 Tobias Grosser <grosser@fim.uni-passau.de>
4575 * graphite.c (free_loops_mapping): New.
4576 (stmt_simple_for_scop_p): Fix typo.
4577 (stmt_simple_for_scop_p): Fix tuples functions, that
4579 (free_graphite_bb): Fix some memleaks.
4580 (free_scop): Fix some memleaks.
4581 (scopdet_bb_info): Do not forget some tmp SCoPs.
4582 (find_params_in_bb): Fix some memleaks.
4583 (clast_to_gcc_expression): Fix warning.
4585 2008-08-07 Tobias Grosser <grosser@fim.uni-passau.de>
4587 * testsuite/gcc.dg/graphite/scop-16.c: Fix for 32bit.
4588 * testsuite/gcc.dg/graphite/scop-17.c: Fix for 32bit.
4590 2008-08-04 Sebastian Pop <sebastian.pop@amd.com>
4592 * tree-ssa-loop.c (tree-ssa-loop.o): Do not include toplev.h.
4593 Move code ifdef-ed HAVE_cloog...
4594 * graphite.c: Include toplev.h.
4596 * Makefile.in (OBJS-common): Always build graphite.o.
4597 (BACKEND): Remove @GRAPHITE@.
4598 (tree-ssa-loop.o): Do not depend on TOPLEV_H.
4599 (graphite.o): Depend on TOPLEV_H.
4601 2008-08-04 Sebastian Pop <sebastian.pop@amd.com>
4603 * Makefile.in (tree-ssa-loop.o): Depend on TOPLEV_H.
4604 Remove typo left from polylib to ppl conversion.
4605 * graphite.c (graphite_transforms): Use sorry instead of fatal.
4607 2008-08-03 Sebastian Pop <sebastian.pop@amd.com>
4609 * toplev.c (process_options): Move the graphite loop optimization
4611 * tree-ssa-loop.c (graphite_transforms): ... here.
4612 When not configured with CLooG, print to dump_file that
4613 Graphite transforms were not performed.
4614 * testsuite/gcc.dg/graphite/graphite.exp (scan-graphite-dump-times):
4616 * testsuite/gcc.dg/graphite/*.c: Updated all testcases to use
4617 scan-graphite-dump-times.
4619 2008-08-03 Sebastian Pop <sebastian.pop@amd.com>
4621 * graphite.c (dot_scop, dot_all_scops): Do not call system.
4622 Do not open /tmp/scop.dot and /tmp/allscops.dot.
4624 2008-08-02 Sebastian Pop <sebastian.pop@amd.com>
4625 Jan Sjodin <jan.sjodin@amd.com>
4627 * configure: Regenerated.
4628 * omp-low.c (expand_omp_sections): Remove now unused code.
4629 * config.in (HAVE_polylib): Removed.
4630 * configure.ac (HAVE_polylib, POLYLIBLIBS, POLYLIBINC): Removed.
4631 (PPLLIBS, PPLINC): Added.
4632 * graphite.c: Replace unsigned with int wherever possible.
4633 Don't access Cloog's data structures, but use accessor functions.
4634 Clast's stmt->type is now implemented as a vtable: change the
4635 switches of stmt->type into ifs.
4636 (polylib/polylibgmp.h): Don't include.
4637 (initialize_dependence_polyhedron,
4638 initialize_data_dependence_polyhedron, is_empty_polyhedron,
4639 statement_precedes_p, test_dependence, build_rdg_all_levels,
4640 dump_dependence_graph): Removed until this code is cleaned up
4642 * Makefile.in (POLYLIBLIBS): Renamed PPLLIBS.
4643 (POLYLIBINC): Renamed PPLINC.
4645 2008-08-01 Harsha Jagasia <harsha.jagasia@amd.com>
4646 Dwarakanath Rajagopal <dwarak.rajagopal@amd.com>
4647 Jan Sjodin <jan.sjodin@amd.com>
4649 Finish the merge and tuplification of graphite.
4651 2008-07-24 Sebastian Pop <sebastian.pop@amd.com>
4652 Jan Sjodin <jan.sjodin@amd.com>
4654 Partial merge from mainline (138072:138275).
4655 * graphite.c still has to be tuplified.
4657 2008-07-29 Jan Sjodin <jan.sjodin@amd.com>
4659 * graphite.c (graphite_loops_mapping_max_loop_num): New.
4660 (create_num_from_index): New.
4661 (get_num_from_index): Also pass in the graphite BB.
4662 (free_graphite_bb): Free GBB_INDEX_TO_NUM_MAP.
4663 (build_graphite_bb): Initialize GBB_INDEX_TO_NUM_MAP.
4664 (graphite_trans_bb_strip_mine): Call create_num_from_index.
4665 (is_interchange_valid): Return false when failing.
4666 * graphite.h (struct num_map): New.
4667 (struct graphite_bb): New field num_map.
4668 (GBB_LOOPS_MAPPING): Renamed GBB_INDEX_TO_NUM_MAP.
4670 2008-07-29 Tobias Grosser <grosser@fim.uni-passau.de>
4672 * graphite.c (dump_gbb_conditions): Print also conditions like
4673 "if (a)". Remove dublicated code and use print_generic_expr ().
4674 (stmt_simple_for_scop_p): Only allow conditions we can handle
4677 2008-07-25 Jan Sjodin <jan.sjodin@amd.com>
4679 * graphite.h (struct scop): Removed new_ivs field.
4680 (SCOP_NEWIVS): Deleted.
4681 * graphite.c (new_scop, free_scop, clast_name_to_gcc,
4682 clast_to_gcc_expression, graphite_create_new_loop):
4683 Removed use of new_ivs.
4685 2008-07-25 Jan Sjodin <jan.sjodin@amd.com>
4687 * graphite.c (debug_oldivs, debug_loop_vec, create_loops_mapping,
4688 create_loops_mapping_num, debug_loop_mapping_1): New.
4689 (debug_loop_mapping): Call debug_loop_mapping_1.
4690 (get_loop_mapping_for_num,
4691 graphite_loops_mapping_add_child,
4692 graphite_loops_mapping_add_child_num,
4693 graphite_loops_mapping_insert_child,
4694 graphite_loops_mapping_parent,
4695 split_loop_mapped_depth_for_num,
4696 loop_mapped_depth_split_loop): New.
4697 (increment_loop_mapped_depths): Removed.
4698 (swap_loop_mapped_depth_for_num): Reimplemented.
4699 (new_scop): Call create_loops_mapping.
4700 (scop_record_loop): Call graphite_loops_mapping_insert_child.
4701 (translate_clast): Pass the old loop father in parameter, and pass
4702 it to get_old_iv_from_ssa_name.
4703 (remove_edges_around_useless_blocks, can_generate_code_stmt,
4704 can_generate_code, can_generate_for_scop): New.
4705 (graphite_trans_bb_block): Returns false when it fails to transform.
4706 * graphite.h (graphite_loop_node, graphite_loops_mapping): New.
4708 2008-07-25 Sebastian Pop <sebastian.pop@amd.com>
4710 Reverted all the changes related to the streamization and
4712 These changes are now tracked in the streamization branch.
4714 2008-07-25 Sebastian Pop <sebastian.pop@amd.com>
4715 Jan Sjodin <jan.sjodin@amd.com>
4717 * graphite.c (gbb_compare): Correctly constify.
4718 (gbb_can_be_ignored): Indent.
4719 (graphite_trans_scop_swap_1and2): Add legality check.
4722 2008-07-25 Sebastian Pop <sebastian.pop@amd.com>
4724 Remove fallouts from "Reverted the Condate changes".
4725 * tree.h: Remove unused decl.
4726 * testsuite/gcc.dg/tree-checker: Same.
4727 * timevar.def: Remove counter.
4729 2008-07-24 Sebastian Pop <sebastian.pop@amd.com>
4731 * Merge from mainline (135673:138072).
4733 Reverted the MIRO changes (from 2008-04-05) that are now
4734 tracked in the miro branch.
4735 * tree-bounds.c: Removed.
4736 * tree-bounds.h: Removed.
4738 Reverted the Condate changes (from 2006-07-04, 2007-03-20) that
4739 are now tracked in the condate branch.
4740 * tree-check.c: Removed.
4741 * tree-match.c: Removed.
4742 * condate.y: Removed.
4744 2008-07-24 Dwarakanath Rajagopal <dwarak.rajagopal@amd.com>
4746 * common.opt: New user flag -floop-block, -floop-strip-mine
4747 and -floop-interchange.
4748 * toplev.c (process_options): Enable -fgraphite pass if any one of the
4749 graphite loop optimization flags is turned on.
4750 * graphite.c (graphite_apply_transformations): Add flag_loop_block,
4751 flag_loop_strip_mine and flag_loop_interchange checks before
4753 * doc/invoke.texi: Remove -fgraphite and add -floop-block,
4754 -floop-strip-mine and -floop-interchange.
4755 * testsuite/gcc.dg/graphite/block-0.c: Add -floop-block and remove
4757 * testsuite/gcc.dg/graphite/scop-16.c: Ditto.
4758 * testsuite/gcc.dg/graphite/scop-17.c: Ditto.
4759 * testsuite/gcc.dg/graphite/scop-18.c: Ditto.
4761 2008-07-23 Jan Sjodin <jan.sjodin@amd.com>
4762 Sebastian Pop <sebastian.pop@amd.com>
4764 * cfgloopmanip.c (update_dominators_in_loop): Make it static.
4765 (create_empty_loop_on_edge): More fixes.
4766 * tree-phinodes.c (resize_phi_node): Extern.
4767 (unlink_phi_node, move_phi_node): New split from remove_phi_node.
4768 * cfghooks.c (update_dominator_information): New split from
4770 * tree-vectorizer.c (rename_variables_in_bb): Extern.
4771 * tree-dfa.c (collect_dfa_stats): Start walking the CFG on the
4772 successor of the function entry block.
4774 * graphite.c: Include pointer-set.h.
4775 (debug_loop_mapping, increment_loop_mapped_depths,
4776 get_loop_mapped_depth_for_num, get_loop_mapped_depth,
4777 set_loop_mapped_depth_for_num, set_loop_mapped_depth,
4778 swap_loop_mapped_depth_for_num, get_num_from_index,
4779 swap_loop_mapped_depth, loop_iv_stack_debug,
4780 loop_iv_stack_push, loop_iv_stack_pop, loop_iv_stack_get_iv,
4781 loop_iv_stack_get_iv_from_name, loop_iv_stack_debug,
4782 get_old_iv_from_ssa_name): New.
4783 (new_scop): Initialize SCOP_LOOPS_MAPPING.
4784 (free_scop): Free SCOP_LOOPS_MAPPING.
4785 (scop_record_loop): Record old ivs.
4786 (create_var_name): Removed.
4787 (initialize_cloog_names): Allocate double space in case strip mine
4788 applies to all loops once.
4789 (clast_name_to_gcc): Look up in the map ivstack passed in parameter.
4790 (clast_to_gcc_expression): Same. Implement more clast to gimple
4792 (graphite_create_new_loop): Pass in ivstack.
4793 (remove_all_edges): Pass in the construction_edge.
4794 (graphite_remove_iv): Removed.
4795 (graphite_rename_ivs, graphite_rename_ivs_stmt,
4796 remove_cond_exprs): Rewritten.
4797 (move_phi_nodes): New.
4798 (disconnect_virtual_phi_nodes, disconnect_cond_expr): Removed.
4799 (translate_clast): Pass in ivstack. Rewrite some cases.
4800 (set_cloog_options, debug_clast_stmt): New.
4801 (find_transform): Use set_cloog_options.
4802 (outermost_loop_layer): Removed.
4803 (get_construction_edge, collect_virtual_phis, find_vdef_for_var_in_bb,
4804 find_vdef_for_var_1, find_vdef_for_var, patch_phis_for_virtual_defs,
4805 mark_old_loops, remove_dead_loops): New.
4807 (graphite_trans_bb_move_loop): Call swap_loop_mapped_depth.
4808 (const_column_index, get_first_matching_sign_row_index,
4809 get_lower_bound_row, get_upper_bound_row, get_lower_bound,
4810 get_upper_bound): New.
4811 (graphite_trans_bb_strip_mine): Also update the iv map.
4813 * graphite.h (graphite_loops_mapping, GBB_LOOPS_MAPPING): New.
4814 (struct name_tree): Add a loop field.
4815 (struct scop): Add a graphite_loops_mapping field.
4816 (SCOP_LOOPS_MAPPING): New.
4817 (debug_clast_stmt): Declare.
4818 * lambda.h (find_induction_var_from_exit_cond): Declare.
4819 (lambda-code.c): (find_induction_var_from_exit_cond): Extern.
4820 * cfgloop.h (update_dominators_in_loop): Removed declaration.
4821 (create_empty_loop_on_edge): Updated.
4822 * tree-flow.h (remove_bb, resize_phi_node, move_phi_node,
4823 rename_variables_in_bb): Declare.
4824 * tree-cfg.c (remove_bb): Extern.
4826 * testsuite/gcc.dg/graphite/block-0.c: New.
4828 2008-07-21 Dwarakanath Rajagopal <dwarak.rajagopal@amd.com>
4829 Sebastian Pop <sebastian.pop@amd.com>
4831 * graphite.c (strip_mine_profitable_p): New.
4832 (graphite_trans_bb_block): Disable strip mining if not profitable.
4834 * testsuite/gcc.dg/graphite/scop-18.c: New.
4835 * testsuite/gcc.dg/graphite/scop-17.c: Fixed.
4836 * testsuite/gcc.dg/graphite/scop-16.c: Fixed.
4838 2008-07-17 Harsha Jagasia <harsha.jagasia@amd.com>
4839 Jan Sjodin <jan.sjodin@amd.com>
4840 Sebastian Pop <sebastian.pop@amd.com>
4842 * graphite.c (is_interchange_valid): New.
4843 (graphite_trans_bb_block): Check loop nest of basic block for legality
4846 * graphite.h (gbb_inner_most_loop_index, outer_most_loop_1,
4847 outer_most_loop, gbb_outer_most_loop_index): New.
4849 * tree-loop-linear.c (perfect_loop_nest_depth): Remove static.
4850 * tree-flow.h (perfect_loop_nest_depth): Declare as extern.
4851 * testsuite/gcc.dg/graphite/scop-16.c: New.
4852 * testsuite/gcc.dg/graphite/scop-17.c: New.
4854 2008-07-11 Tobias Grosser <grosser@fim.uni-passau.de>
4856 * graphite.c (scop_remove_ignoreable_gbbs): Also update bitmap.
4857 (graphite_trans_scop_block): Ignore SCoPs without bbs.
4859 2008-07-11 Tobias Grosser <grosser@fim.uni-passau.de>
4861 * graphite.c (new_scop): Initialize SCOP_EXIT.
4862 (scopdet_info): Add.
4863 (scopdet_bb_info): Rename from is_bb_addable. Cleanup, bugfixes.
4864 (build_scops_1): Cleanup, bugfixes.
4865 (build_scops): Cleanup.
4867 * testsuite/gcc.dg/graphite/scop-matmult.c: Remove duplicated code.
4868 * testsuite/gcc.dg/graphite/scop-15.c: Add SCoP numbers.
4870 2008-07-10 Harsha Jagasia <harsha.jagasia@amd.com>
4872 * testsuite/gfortran.dg/graphite/scop-1.f: Update to reduced test case.
4874 * testsuite/gfortran.dg/graphite/graphite.exp: Use
4875 DEFAULT_GRAPHITE_FLAGS.
4877 * testsuite/gcc.dg/graphite/scop-15.c: Update to reduced test case.
4879 2008-07-10 Harsha Jagasia <harsha.jagasia@amd.com>
4881 * graphite.c (scan_tree_for_params): Do not assert any more if
4882 MULT_EXPR parameter is negative.
4884 * testsuite/gfortran.dg/graphite/scop-1.f: New.
4886 * testsuite/gfortran.dg/graphite/graphite.exp: New.
4888 * testsuite/gcc.dg/graphite/scop-15.c: New.
4890 2008-07-10 Harsha Jagasia <harsha.jagasia@amd.com>
4892 * graphite.c (is_bb_addable): Fix segfault in spec gzip and reformat.
4894 2008-07-10 Tobias Grosser <grosser@fim.uni-passau.de>
4896 * graphite.c (graphite_trans_bb_swap_loops): Rename from
4897 graphite_swap_loops.
4898 (graphite_trans_bb_move_loop): New.
4899 (graphite_trans_bb_strip_mine): Rename from graphite_strip_mine_loop.
4900 (graphite_trans_bb_block): New.
4901 (graphite_trans_loop_block): New.
4902 (graphite_trans_scop_swap_1and2): Rename from
4903 graphite_trans_swap_1and2.
4904 (graphite_trans_scop_strip): Rename from graphite_trans_strip.
4905 (graphite_trans_scop_block): New.
4906 (graphite_apply_transformations): Rename from
4907 graphite_transformations.
4909 * testsuite/gcc.dg/graphite/scop-matmult.c: New.
4911 2008-07-10 Tobias Grosser <grosser@fim.uni-passau.de>
4913 * graphite.c (gbb_compare): New.
4914 (graphite_sort_gbbs): New.
4915 (gbb_can_be_ignored): New.
4916 (scop_remove_ignoreable_gbbs): New.
4917 (graphite_transformations): Cleanup and add
4918 scop_remove_ignoreable_gbbs.
4919 * lambda.h (lambda_vector_compare): New.
4921 2008-07-09 Tobias Grosser <grosser@fim.uni-passau.de>
4923 * graphite.c (print_graphite_bb): Correct printing of static schedule.
4924 (graphite_swap_loops): int -> unsigned
4925 (graphite_strip_mine_loop): int -> unsigned, Fix SCHEDULE
4926 (graphite_transformations): New.
4927 (graphite_transform_loops): Move to graphite_transformations.
4928 * graphite.h (gbb_nb_loops): Return unsigned.
4930 2008-07-04 Tobias Grosser <grosser@fim.uni-passau.de>
4932 * graphite.c (scan_tree_for_params): Fix insertion of parameters into
4933 the domain matrix. This makes scop-0.c work again.
4935 2008-06-20 Richard Guenther <rguenther@suse.de>
4937 * graphite.h: Adjust copyright to GPLv3.
4938 * graphite.c: Likewise.
4939 (stmt_simple_memref_for_scop_p): Split out from ...
4940 (stmt_simple_for_scop_p): ... here. Fix handling of calls
4942 (get_bb_type): Optimize.
4944 (is_bb_addable): Fix memleak, replace is_pred call with
4946 (build_scops): Use current_loops.
4947 (param_index): Fix memleak.
4949 2008-06-20 Konrad Trifunovic <konrad.trifunovic@inria.fr>
4951 * graphite.c: Fix formatting.
4953 2008-06-19 Konrad Trifunovic <konrad.trifunovic@inria.fr>
4955 * graphite.c (new_scop): Memory allocation for SCOP_{NEWIVS, OLDIVS}.
4956 (free_scop): Memory deallocation for SCOP_NEWIVS, SCOP_OLDIVS.
4957 (create_var_name, save_var_name): Newly defined functions.
4958 (initialize_cloog_names): Part of the code factored out to
4960 (clast_to_gcc_expression): Now handles the case of clast_red_sum
4961 in clast_reduction statement.
4962 (graphite_create_new_loop): Now takes a new parameter
4964 (translate_clast): Now also takes the context_loop and bb_exit
4965 parameters. Rewritten the code so that it creates a gimple code
4966 inside the given context.
4967 (outermost_loop_layer, graphite_remove_iv, graphite_rename_ivs,
4968 remove_cond_expr, disconnect_cond_expr,
4969 disconnect_virtual_phi_nodes): Newly defined functions.
4970 * graphite.h (struct scop): added old_ivs vector.
4971 SCOP_OLDIVS: New macro.
4973 2008-06-19 Sebastian Pop <sebastian.pop@amd.com>
4975 * cfgloopmanip.c: Add missing function comments, fix formatting.
4977 2008-06-18 Konrad Trifunovic <konrad.trifunovic@inria.fr>
4979 * cfgloopmanip.c (update_dominators_in_loop): Defined.
4980 (create_empty_loop_on_edge): Defined.
4981 * tree-parloops.c (canonicalize_loop_ivs): Returns tree
4983 * cfgloop.h (create_empty_loop_on_edge): Declared as extern.
4984 (update_dominators_in_loop): Declared as extern
4985 * tree-flow.h (canonicalize_loop_ivs): Declared as extern.
4987 2008-06-16 Tobias Grosser <grosser@fim.uni-passau.de>
4989 * graphite.c (print_graphite_bb): Allow changing number of loops
4991 (initialize_cloog_names): Allow changing number of loops.
4992 (build_cloog_prog): Simplify.
4993 (find_transform): Enable cloog option --strides.
4994 (graphite_swap_loops): New.
4995 (graphite_strip_mine_loop): New.
4996 (graphite_trans_swap_1and2): New.
4997 (graphite_trans_strip): New.
4998 (graphite_transform_loops): Add graphite_trans_strip.
4999 * graphite.h (scop_max_loop_depth): New.
5001 2008-06-15 Tobias Grosser <grosser@fim.uni-passau.de>
5003 * graphite.c (build_scop_iteration_domain): Remove forgotten
5004 line. (Fixes compile)
5006 2008-06-15 Tobias Grosser <grosser@fim.uni-passau.de>
5008 * graphite.c (print_graphite_bb): Add output of GBB_LOOPS.
5009 (build_graphite_bb): Add GBB_LOOPS and GBB_DOMAIN and reorder.
5010 (build_bb_loops): New.
5011 (graphite_transform_loops): Add build_bb_loops.
5012 (schedule_to_scattering): Use gbb_nb_loops to support changing loop
5014 * graphite.h (graphite_bb): Add loops.
5015 (gbb_nb_loops): New.
5016 (gbb_loop_at_index): New.
5017 (gbb_loop_index): New.
5018 (nb_params_in_scop): Renamed to scop_nb_params. Updated all functions
5019 using nb_params_in_scop.
5021 2008-06-14 Tobias Grosser <grosser@fim.uni-passau.de>
5023 * graphite.c (print_graphite_bb): Adapt to minimized schedule.
5024 (build_scop_canonical_schedules): Build minimized schedule.
5025 (schedule_to_scattering): Adapt to minimized schedule.
5026 * graphite.h (graphite_bb): Add/Update descriptions.
5028 2008-06-14 Adrien Eliche <aeliche@isty.uvsq.fr>
5029 Tobias Grosser <grosser@fim.uni-passau.de>
5031 * graphite.c (print_graphite_bb): Add condition printing.
5033 (dump_gbb_conditions): New.
5034 (build_scop_conditions_1): New.
5035 (build_scop_conditions): New.
5036 * graphite.h (graphite_bb): Add conditions.
5038 2008-06-14 Tobias Grosser <grosser@fim.uni-passau.de>
5040 * graphite.c (print_graphite_bb):
5041 (free_graphite_bb): New.
5042 (free_scop): Free bbs.
5043 (get_bb_type): Free doms.
5044 (build_scop_context): Free context matrix.
5045 (build_loop_iteration_domains): Remove unused code.
5046 (build_cloog_prog): Free scattering function and blocklist.
5047 (find_transform): Free options.
5049 2008-06-13 Tobias Grosser <grosser@fim.uni-passau.de>
5051 * graphite.c (loop_body_to_cloog_stmts): Rename to add_bb_domains.
5052 Remove unnecessery cloog data structures. Make a copy of the domain
5053 (setup_cloog_loop): Rename to build_loop_iteration_domains. Remove
5054 unnecessary cloog data structures. Fix memory leaks. Remove insert
5055 into SCOP_LOOP2CLOOG_LOOP as the inserted CloogLoops will never be
5057 (build_scop_iteration_domain): Remove unnecessary cloog
5058 data structures. Fix memory leaks.
5059 (graphite_transform_loops): Disable build_scop_dynamic_schedules as it
5060 uses SCOP_LOOP2CLOOG_LOOP, that is at the moment not working.
5062 2008-06-12 Tobias Grosser <grosser@fim.uni-passau.de>
5064 * graphite.c (find_scop_params): Remove initialize_cloog_names.
5066 2008-06-12 Tobias Grosser <grosser@fim.uni-passau.de>
5068 * graphite.c (end_scop): Style fix.
5069 (schedule_to_scattering): Style and comment fix.
5071 2008-06-12 Tobias Grosser <grosser@fim.uni-passau.de>
5072 * graphite.c (print_graphite_bb): Fix definiton of
5073 schedule_to_scattering.
5074 (initialize_cloog_names): Change nb_scattdims to max loop
5076 (schedule_to_scattering): Take parameter for number of scattering
5078 (build_cloog_prog): Only build as much scattering dimensions as
5081 2008-06-12 Tobias Grosser <grosser@fim.uni-passau.de>
5083 * graphite.c (end_scop): Disable bb splitting. Fixes SIGSEGV
5084 in polyhedron/aermod.f90.
5086 2008-06-11 Tobias Grosser <grosser@fim.uni-passau.de>
5087 Dwarak Rajagopal <dwarak.rajagopal@amd.com>
5088 Harsha Jagasia <harsha.jagasia@amd.com>
5090 * graphite.c (is_bb_addable): Fix segfault.
5092 2008-06-10 Tobias Grosser <grosser@fim.uni-passau.de>
5094 * graphite.c (is_bb_addable): Fix memory leak, handling of loops
5095 with multiple exits and conditional handling in edge cases.
5096 (is_loop_exit): Fix memory leak. (Forgotten in last commit)
5098 * testsuite/gcc.dg/graphite/scop-14.c: New.
5100 2008-06-06 Tobias Grosser <grosser@fim.uni-passau.de>
5101 Adrien Eliche <aeliche@isty.uvsq.fr>
5103 * graphite.c (is_bb_addable): Add more comments and enhance
5104 readablity of the source code. Fix memory leak.
5105 (is_loop_exit): Fix memory leak.
5107 2008-06-05 Tobias Grosser <grosser@fim.uni-passau.de>
5109 * graphite.c (first_loop_in_scop): Deleted.
5110 (setup_cloog_loop): Only walk the loop chain for inner loops.
5111 (build_scop_iteration_domain): Execute setup_cloog_loop for
5112 all loops in the first layer.
5114 2008-06-05 Tobias Grosser <grosser@fim.uni-passau.de>
5116 * graphite.c (scan_tree_for_params): Change the way params are
5117 added to be indepenent of the number of loops.
5118 (setup_cloog_loop): Revert to short matrix format. Fix parameter
5120 (build_cloog_prog): Revert to short matrix format.
5122 2008-06-05 Sebastian Pop <sebastian.pop@amd.com>
5123 Dwarak Rajagopal <dwarak.rajagopal@amd.com>
5125 * tree-loop-fusion.c (fuse_loops): Fix uninitialized variable
5128 2008-06-05 Sebastian Pop <sebastian.pop@amd.com>
5130 * graphite.c (nb_data_refs_in_scop): New.
5131 (graphite_transform_loops): Print more stats: number of
5132 loops, basic blocks and data references per scop.
5134 2008-06-04 Sebastian Pop <sebastian.pop@amd.com>
5135 Jan Sjodin <jan.sjodin@amd.com>
5137 * graphite.c (loop_affine_expr, idx_record_params,
5138 find_scop_parameters, setup_cloog_loop): Use instantiate_scev
5139 instead of instantiate_parameters.
5141 2008-06-04 Tobias Grosser <grosser@fim.uni-passau.de>
5143 * graphite.c (schedule_to_scattering): Fix scattering dimensions,
5144 add support for parameters, add STATIC_SCHEDULE at the right places,
5147 2008-06-04 Tobias Grosser <grosser@fim.uni-passau.de>
5149 * graphite.c (build_scop_loop_nests): Only add the loops, that
5150 are contained completely in the SCoP.
5151 (build_cloog_prog): Disable scattering, until schedule_to_scattering
5152 and the domains are fixed.
5153 (build_scop_canonical_schedules): Add support for bbs not contained
5156 2008-06-04 Tobias Grosser <grosser@fim.uni-passau.de>
5158 * graphite.h (scop_contains_loop): Update comments to match
5159 the actual behavior.
5160 (scop_contains_loop): New.
5161 * graphite.c (schedule_to_scattering): Use scop_contains_loop.
5163 2008-06-04 Sebastian Pop <sebastian.pop@amd.com>
5165 * graphite.c (get_bb_type): On function body, i.e. loop_0,
5166 don't mark blocks as GBB_LOOP_SING_EXIT_HEADER, mark them
5169 2008-06-04 Sebastian Pop <sebastian.pop@amd.com>
5170 Tobias Grosser <grosser@fim.uni-passau.de>
5172 * graphite.c (graphite_transform_loops): Early return when
5173 there are no loops in the function.
5175 2008-05-31 Sebastian Pop <sebastian.pop@amd.com>
5176 Jan Sjodin <jan.sjodin@amd.com>
5178 * graphite.c (scan_tree_for_params, setup_cloog_loop): Compute the
5179 offset of the last loop.
5180 (setup_cloog_loop): Copy the entire outer constraint matrix.
5182 2008-05-31 Sebastian Pop <sebastian.pop@amd.com>
5183 Jan Sjodin <jan.sjodin@amd.com>
5185 * graphite.c (stmt_in_scop_p, function_parameter_p,
5186 invariant_in_scop_p): Removed.
5187 (scan_tree_for_params): Can be used with no constraint
5188 matrix for gathering parameters.
5189 (idx_record_params): Don't use idx_record_param, instead use
5190 scan_tree_for_params.
5191 (find_scop_parameters): Same.
5192 (setup_cloog_loop, build_scop_iteration_domain, build_cloog_prog):
5193 Fix the size of loop domains.
5194 (schedule_to_scattering): Exit when the outer loop is not in scop.
5195 (find_transform): Enable build_cloog_prog.
5197 2008-05-31 Sebastian Pop <sebastian.pop@amd.com>
5198 Jan Sjodin <jan.sjodin@amd.com>
5200 * graphite.c (schedule_to_scattering): Make scattering domains
5201 uniformly of the same size, as required by CLooG 0.14.0 and before.
5203 2008-05-31 Sebastian Pop <sebastian.pop@amd.com>
5204 Jan Sjodin <jan.sjodin@amd.com>
5206 * graphite.c (schedule_to_scattering): Rewrite, correct the
5207 translation of the scheduling function to scattering.
5208 (build_cloog_prog): Call schedule_to_scattering only once.
5209 * graphite.h (scop_loop_index): Do not fail for loops not
5210 in the scop: return -1.
5212 2008-05-30 Tobias Grosser <grosser@fim.uni-passau.de>
5214 * graphite.c (build_graphite_bb): Initialize GBB_DOMAIN.
5215 (loop_body_to_cloog_stmts): Export GBB_DOMAIN.
5216 (setup_cloog_loop): Export GBB_DOMAIN.
5217 (build_cloog_prog): New. Create new CLOOG_PROG, which should be
5218 able to rebuild the original control flow.
5219 * graphite.h (graphite_bb): Add domain field and access macro.
5222 2008-05-30 Sebastian Pop <sebastian.pop@amd.com>
5224 * graphite.c (debug_gbb): New.
5225 (print_scop, build_graphite_bb): Use SCOP_BBS.
5226 (build_scop_bbs): Reimplemented.
5227 (dfs_bb_in_scop_p): Removed.
5228 (build_scop_loop_nests): Reorder loops inserted in
5229 SCOP_LOOP_NEST: outer loops should come first.
5230 (build_scop_canonical_schedules): Reinitialize at zero
5231 the components of the SCOP_STATIC_SCHEDULE for the loops
5232 that have already been parsed.
5234 * graphite.h (debug_gbb): Declared.
5236 2008-05-30 Sebastian Pop <sebastian.pop@amd.com>
5237 Jan Sjodin <jan.sjodin@amd.com>
5239 * graphite.c (create_empty_loop): Renamed graphite_create_new_loop.
5240 (graphite_loop_to_gcc_loop): Removed.
5241 (remove_all_edges): New.
5242 (graphite_stmt_to_gcc_stmt): Renamed translate_clast.
5243 (gloog): Remove useless code.
5245 2008-05-29 Tobias Grosser <grosser@fim.uni-passau.de>
5247 * graphite.c (get_bb_type): Reworked. We distinguish between
5248 loops with one or multiple exits.
5249 (is_loop_exit): New.
5251 (is_bb_addable): Rework condition handling, now support for case
5252 case statements and loops with multiple exits.
5254 * testsuite/gcc.dg/graphite/scop-11.c: New.
5255 * testsuite/gcc.dg/graphite/scop-12.c: New.
5256 * testsuite/gcc.dg/graphite/scop-13.c: New.
5258 2008-05-29 Tobias Grosser <grosser@fim.uni-passau.de>
5260 * graphite.c (dot_all_scops_1): Fix some colors. Reuse colors, if
5261 we have too many colors.
5263 2008-05-22 Sandeep Maram <smaram_b04@iiita.ac.in>
5265 * doc/invoke.texi (-ftree-loop-fusion): Document.
5266 * tree-pass.h (pass_loop_fusion): Declared.
5267 * tree-loop-fusion.c: New.
5268 * timevar.def (TV_TREE_LOOP_FUSION): Declared.
5269 * tree-data-ref.c (find_data_references_in_loop): Make extern.
5270 * tree-data-ref.h (find_data_references_in_loop): Declared.
5271 * common.opt (ftree-loop-fusion): Declared.
5272 * Makefile.in (tree-loop-fusion.o): Added rule and to OBJS-common.
5274 2008-05-21 Sebastian Pop <sebastian.pop@amd.com>
5276 * graphite.c (build_access_matrix): Fix typo from the merge.
5278 2008-05-20 Sebastian Pop <sebastian.pop@amd.com>
5280 * Merge from mainline (130800:135673).
5282 2008-05-07 Sebastian Pop <sebastian.pop@amd.com>
5284 * graphite.c (end_scop): The exit of the scop is not part of the scop.
5285 Update dominators after splitting.
5287 2008-05-07 Sebastian Pop <sebastian.pop@amd.com>
5289 * graphite.c (is_bb_addable): Return the harmful statement.
5290 Factor up some code.
5291 (end_scop): New. Splits end of scope bbs on a harmful statement.
5292 (build_scops_1): Call end_scop.
5294 2008-05-07 Sebastian Pop <sebastian.pop@amd.com>
5296 * graphite.c: (succs_at_same_depth, end_scop, all_preds_visited_p,
5297 all_succs_visited_p, start_new_scop_for_each_succ, start_new_scop,
5298 add_dominators_to_open_scops, stop_last_open_scop, scop_end_loop,
5299 build_scops_1): Removed.
5300 (build_scops_2): Renamed build_scops_1.
5302 2008-05-06 Sebastian Pop <sebastian.pop@amd.com>
5304 * graphite.c: Fix formatting.
5306 2008-05-06 Tobias Grosser <grosser@fim.uni-passau.de>
5308 * graphite.c (get_bb_type): New.
5310 (build_scops_2): New.
5311 (is_bb_addable): New.
5312 (build_scops): Switch the scop detection.
5313 (build_scop_bbs): Add entry bb to scop.
5314 * graphite.h (struct scop): Update comment.
5316 2008-05-06 Tobias Grosser <grosser@fim.uni-passau.de>
5318 * graphite.c (dot_all_scops_1): Fix some incorrect colors and add
5321 2008-05-06 Tobias Grosser <grosser@fim.uni-passau.de>
5323 * testsuite/gcc.dg/graphite/scop-1.c: Update.
5324 * testsuite/gcc.dg/graphite/scop-2.c: Update.
5325 * testsuite/gcc.dg/graphite/scop-4.c: Update.
5326 * testsuite/gcc.dg/graphite/scop-5.c: Add.
5327 * testsuite/gcc.dg/graphite/scop-6.c: Add.
5329 2008-05-06 Sebastian Pop <sebastian.pop@amd.com>
5331 * testsuite/gcc.dg/graphite/scop-0.c: Add.
5332 * testsuite/gcc.dg/graphite/scop-7.c: Add.
5333 * testsuite/gcc.dg/graphite/scop-8.c: Add.
5334 * testsuite/gcc.dg/graphite/scop-9.c: Add.
5335 * testsuite/gcc.dg/graphite/scop-10.c: Add.
5337 2008-05-06 Tobias Grosser <grosser@fim.uni-passau.de>
5339 * graphite.c (scop_affine_expr): Renamed to loop_affine_expr.
5340 Check affine expressions depending on the outermost loop
5342 (stmt_simple_for_scop_p): Same.
5343 (harmfule_stmt_in_scop): Same.
5345 2008-04-28 Tobias Grosser <grosser@fim.uni-passau.de>
5347 * graphite.c (dot_all_scops): Remove incorrect difficult bb coloring,
5348 mark entry and exit, that are not part of the SCoP and update HTML
5351 2008-04-25 Sebastian Pop <sebastian.pop@amd.com>
5353 * graphite.c (basic_block_simple_for_scop_p): Renamed
5355 (save_scop, preds_at_same_depth, test_for_scop_bound): Removed.
5356 (add_dominators_to_open_scops, build_scops_1): Reimplemented.
5357 (all_preds_visited_p, all_succs_visited_p,
5358 start_new_scop_for_each_succ, start_new_scop, stop_last_open_scop,
5359 scop_end_loop): New.
5360 (build_scops): Do not use dfs_enumerate_from.
5362 * testsuite/gcc.dg/graphite/scop-{1,2,4}.c: Updated.
5364 2008-04-23 Sebastian Pop <sebastian.pop@amd.com>
5366 * graphite.c: Add comments to functions that are missing a
5368 (graphite_create_iv): Removed. Merged in graphite_loop_to_gcc_loop.
5370 2008-04-23 Sebastian Pop <sebastian.pop@amd.com>
5372 * graphite.c (nb_params_in_scop): Moved...
5373 (graphite_bb_from_bb, loop_body_to_cloog_stmts): New.
5374 (setup_cloog_loop): Call loop_body_to_cloog_stmts.
5375 (clast_to_gcc_expression): Reduce column size to less than 80.
5376 (graphite_create_iv): Return the new name of the IV.
5377 (find_transform): Set options->esp and options->cpp.
5378 (gloog): Comment out the invalidation of the old loop code.
5379 (initialize_dependence_polyhedron): Replace scop_nb_params with
5382 * graphite.h (nb_params_in_scop): ... here.
5383 (scop_nb_params): Removed.
5384 (loop_domain_dim): Return something even when the loop was not
5385 found in the hash table: avoid ICEing on all the graphite.exp
5388 2008-04-14 Konrad Trifunovic <konrad.trifunovic@inria.fr>
5390 * tree-chrec.c (for_each_scev_op): SCEV can have 3 operands.
5392 * graphite.c (build_scop_dynamic_schedules): Schedule is built
5393 according to nesting level.
5394 (find_scop_parameters): Call instantiate_parameters.
5395 (scan_tree_for_params): Extend it to handle general affine bounds.
5396 Inner loop bound can depend on outer loop induction variable.
5397 (setup_cloog_loop): tmp variable is allocated on stack. Call
5398 instantiate_parameters with respect to outermost_loop_in_scop.
5399 (loop_domain_dim, ref_nb_loops, loop_iteration_vector_dim): moved to
5401 (create_empty_loop): Function loopify should be given edge
5402 probability, instead of edge frequency. Dominance relation from
5403 switch_bb to loop_header.
5404 (clast_to_gcc_expression): Added handling of clast_reduction node.
5405 (gloog): New functionality for removing old loop.
5406 (test_dependence): Factored out from build_rdg_all_levels.
5407 (build_rdg_all_levels): Dependence testing factored out to
5408 test_dependence function.
5410 * graphite.h (struct graphite_bb): Extended with dynamic_schedule.
5411 (loop_domain_dim, ref_nb_loops, loop_iteration_vector_dim): Moved
5414 2008-04-07 Sebastian Pop <sebastian.pop@amd.com>
5416 * graphite.c (free_scop, param_index, initialize_cloog_names,
5417 nb_params_in_scop): Use name_tree map instead of just a tree
5418 for keeping track of the variable name associated to that tree.
5419 (create_empty_loop, gmp_cst_to_tree, clast_name_to_gcc,
5420 clast_to_gcc_expression, graphite_create_iv,
5421 graphite_loop_to_gcc_loop, graphite_cond_to_gcc_cond,
5422 graphite_stmt_to_gcc_stmt): New.
5423 (gloog): Call these.
5424 * graphite.h (struct name_tree): New.
5425 (struct scop): Use name_tree instead of tree for params.
5426 Store a vector of name_tree for new_ivs.
5428 (scop_nb_params): Use name_tree instead of tree.
5430 2008-04-05 Alexander Lamaison <awl03@doc.ic.ac.uk>
5431 Sebastian Pop <sebastian.pop@amd.com>
5433 * tree-bounds.c: New.
5434 * tree-bounds.h: New.
5435 * tree-pass.h: Declare pass_bounds_early and pass_bounds_late.
5436 * passes.c: Schedule pass_bounds_early, pass_bounds_late.
5437 * builtins.c (expand_builtin_alloca): Add flag_bounds as for
5441 * c-cppbuiltin.c: Same.
5445 * tree-outof-ssa.c: Same.
5447 * Makefile.in: Same.
5449 2008-03-15 Antoniu Pop <antoniu.pop@gmail.com>
5450 Sebastian Pop <sebastian.pop@amd.com>
5452 * tree-loop-distribution.c (remaining_stmts,
5453 upstream_mem_writes): Removed static variables.
5454 (copy_loop_before, create_bb_after_loop,
5455 mark_nodes_having_upstream_mem_writes, free_rdg_components,
5456 rdg_build_components, rdg_build_partitions,
5457 dump_rdg_partitions): Extern.
5458 (generate_loops_for_partition, generate_code_for_partition): Do not
5460 (already_processed_vertex_p, predecessor_has_mem_write,
5461 mark_nodes_having_upstream_mem_writes, has_upstream_mem_writes,
5462 rdg_flag_all_uses, rdg_flag_uses, rdg_flag_vertex_and_dependent,
5463 rdg_flag_loop_exits, rdg_flag_similar_memory_accesses,
5464 build_rdg_partition_for_component, rdg_build_partitions, ldist_gen):
5465 Pass remaining_stmts and upstream_mem_writes as parameters.
5466 (rdg_component): Moved...
5467 (build_rdg_partition_for_component): Do not aggregate components when
5468 flag_streamize_loops is set.
5469 (gen_sequential_loops): New.
5470 (ldist_gen): Call gen_sequential_loops.
5472 * tree-pass.h (pass_loop_streamization): Declared.
5474 * omp-low.c (expand_omp_sections): Call add_bb_to_loop on created
5475 basic blocks when loops structures exist.
5477 * builtin-types.def (BT_FN_VOID_PTR_PTR_INT): New.
5479 * tree-ssa-loop-ivopts.c (expr_invariant_in_region_p): New.
5481 * tree-parloops.c (take_address_of, eliminate_local_variables_1,
5482 eliminate_local_variables_stmt, eliminate_local_variables,
5483 separate_decls_in_loop_name, separate_decls_in_loop_stmt,
5484 separate_decls_in_loop, gen_parallel_loop): Make them work on a region
5485 of code delimited by two edges in the CFG.
5486 (separate_decls_in_loop_name): Renamed separate_decls_in_region_name.
5487 (separate_decls_in_loop_stmt): Renamed separate_decls_in_region_stmt.
5488 (separate_decls_in_loop): Renamed separate_decls_in_region. Isolate
5489 the case of parallelisation of reductions.
5490 (create_loop_fn): Extern.
5491 (create_omp_parallel_region): New.
5493 * tree-data-ref.c (dump_data_dependence_relation): Don't call
5494 dump_data_reference for printing dra and drb.
5495 (create_rdg_edge_for_ddr, create_rdg_edges_for_scalar): Initialise
5497 (build_rdg): Don't call free_dependence_relations for the moment, as
5498 we attach dependence relations on each edge of the RDG.
5501 * tree-data-ref.h (rdg_component): ...here.
5502 (struct rdg_edge): New field ddr_p relation.
5503 (RDGE_RELATION): New.
5504 (create_bb_after_loop, copy_loop_before,
5505 mark_nodes_having_upstream_mem_writes, rdg_build_components,
5506 rdg_build_partitions, dump_rdg_partitions,
5507 free_rdg_components): Declared.
5509 * omp-builtins.def (BUILT_IN_GOMP_STREAM_ALIGN_PUSH,
5510 BUILT_IN_GOMP_STREAM_ALIGN_POP): New.
5512 * tree-loop-streamization.c: New.
5514 * tree-flow.h (gather_blocks_in_sese_region, create_loop_fn,
5515 create_omp_parallel_region, expr_invariant_in_region_p): Declared.
5517 * Makefile.in (tree-loop-streamization.o): Added to OBJS-common.
5519 * tree-cfg.c (gather_blocks_in_sese_region): Extern.
5521 * passes.c: Schedule pass_loop_streamization.
5523 2008-03-08 Tobias Grosser <grosser@fmi.uni-passau.de>
5525 * graphite.c (dot_all_scops_1): Fix formatting for difficult bbs and
5528 2008-03-07 Tobias Grosser <grosser@fim.uni-passau.de>
5530 * graphite.c (dot_all_scops): Update formatting.
5531 Bbs can now be part of more than one SCoP.
5533 2008-03-04 Sebastian Pop <sebastian.pop@amd.com>
5535 * graphite.c (new_loop_to_cloog_loop_str, setup_cloog_loop): Fix
5537 (loop_domain_dim): Check for unregistered toplev SCOP loop.
5538 * graphite.h (loop_to_cloog_loop): New.
5540 2008-03-04 Konrad Trifunovic <konrad.trifunovic@inria.fr>
5542 * graphite.c (loop_domain_dim, ref_nb_loops,
5543 loop_iteration_vector_dim): New.
5544 (build_access_matrix_with_af, build_access_matrix,
5545 initialize_dependence_polyhedron): Fixed for new matrix layout.
5546 No longer assume that all iteration domains are of the same
5549 2008-03-02 Sebastian Pop <sebastian.pop@amd.com>
5551 * tree-scalar-evolution.c (instantiate_parameters_1): An SSA_NAME
5552 defined in a loop at depth 0 is invariant.
5553 * tree-chrec.c (evolution_function_is_invariant_rec_p): Ditto.
5554 * tree-ssa-loop-ivopts.c (expr_invariant_in_loop_p): Should never
5555 be called at loop depth 0.
5557 * graphite.c (basic_block_simple_for_scop_p): Take the scop as
5559 (dot_all_scops_1): Update use of basic_block_simple_for_scop_p.
5560 (down_open_scop): Removed.
5561 (loop_in_scop_p): Redefined.
5562 (scop_affine_expr): New argument: scop.
5563 (stmt_simple_for_scop_p): New argument: scop. RETURN_EXPR is not
5564 a harmful statement ending a scop.
5565 (basic_block_simple_for_scop_p): New argument: scop.
5566 (get_loop_start): Removed.
5567 (new_scop): Initialize SCOP_LOOPS.
5568 (free_scop): Free SCOP_LOOPS.
5569 (succs_at_same_depth, preds_at_same_depth): New.
5570 (end_scop): Test the validity of a scop.
5571 (add_dominators_to_open_scops): New.
5572 (test_for_scop_bound): Call add_dominators_to_open_scops.
5573 Add cases for opening and closing multiple scops.
5574 (build_scops, build_scop_bbs): Iterate over basic blocks in
5576 (build_graphite_bb): Pass scop directly.
5577 (dfs_bb_in_scop_p): New.
5578 (scop_record_loop): Use SCOP_LOOPS for not recording the same loop
5580 (nb_loops_around_gb): Use loop_in_scop_p.
5581 (schedule_to_scattering): Disabled for the moment the code computing
5582 the "textual order for outer loop".
5584 * graphite.h (struct scop): New field loops.
5586 (scop_loop_index): Test that the given loop belongs to SCOP_LOOPS.
5588 * testsuite/gcc.dg/graphite/scop-{1,...,7}.c: Updated.
5590 2008-02-27 Antoniu Pop <antoniu.pop@gmail.com>
5591 Sebastian Pop <sebastian.pop@amd.com>
5593 * builtin-types.def (BT_FN_PTR_SIZE_UINT, BT_FN_BOOL_PTR): New.
5594 * common.opt (fstreamize-loops): New.
5595 * omp-builtins.def (BUILT_IN_GOMP_STREAM_CREATE,
5596 BUILT_IN_GOMP_STREAM_PUSH, BUILT_IN_GOMP_STREAM_HEAD,
5597 BUILT_IN_GOMP_STREAM_POP, BUILT_IN_GOMP_STREAM_EOS_P,
5598 BUILT_IN_GOMP_STREAM_SET_EOS, BUILT_IN_GOMP_STREAM_DESTROY): New.
5600 2008-02-22 Konrad Trifunovic <konrad.trifunovic@inria.fr>
5602 * tree-data-ref.c (build_empty_rdg): New.
5603 (build_rdg): Use it.
5604 * tree-data-ref.h (build_empty_rdg): Declared.
5605 * graphite.c (free_scop): Free SCOP_LOOP2CLOOG_LOOP.
5606 (find_vertex_for_stmt): Removed.
5607 (build_rdg_all_levels): Use build_empty_rdg and rdg_vertex_for_stmt.
5609 2008-02-21 Sebastian Pop <sebastian.pop@amd.com>
5611 * tree-loop-distribution.c (generate_builtin): After cancelling the
5612 loop tree, also delete basic blocks.
5613 (rdg_flag_uses): Stop recursion when a vertex has already been
5616 2008-02-15 Konrad Trifunovic <konrad.trifunovic@inria.fr>
5618 * graphite.c (build_scop_alpha): Removed.
5619 (graphite_transform_loops): Add a dummy call to build_all_rdg_levels
5620 and dump_dependence_graph to avoid compiler warnings.
5622 2008-02-14 Konrad Trifunovic <konrad.trifunovic@inria.fr>
5624 * tree-data-ref.c (dr_may_alias_p, create_rdg_vertices): Extern.
5625 * tree-data-ref.h (dr_may_alias_p, create_rdg_vertices): Declared.
5626 * graphite.c (new_loop_to_cloog_loop_str, hash_loop_to_cloog_loop,
5627 eq_loop_to_cloog_loop, del_loop_to_cloog_loop): New.
5628 (new_scop, setup_cloog_loop): Initialize SCOP_LOOP2CLOOG_LOOP.
5629 (initialize_dependence_polyhedron, find_vertex_for_stmt,
5630 initialize_data_dependence_polyhedron, is_empty_polyhedron,
5631 statement_precedes_p, build_rdg_all_levels, build_scop_alpha,
5632 dump_dependence_graph): New.
5633 * graphite.h (struct graphite_bb): New field compressed_alpha_matrix.
5635 (struct scop): New field loop2cloog_loop.
5636 (SCOP_LOOP2CLOOG_LOOP, struct data_dependence_polyhedron,
5637 RDGE_DDP, ddp_p, struct loop_to_cloog_loop_str): New.
5639 2008-02-10 Konrad Trifunovic <konrad.trifunovic@inria.fr>
5641 * graphite.c (build_graphite_bb): Fix initialization
5642 of the graphite basic block.
5644 2008-02-05 Sebastian Pop <sebastian.pop@amd.com>
5646 * graphite.c (scan_tree_for_params): Rewrite for the new layout of
5647 loop domain matrix. Pass in the number of loops contained in the
5649 (nb_loops_around_gb): Moved before setup_cloog_loop that uses it.
5650 (setup_cloog_loop): Rewrite for the new layout of loop domain matrix:
5651 loops that are not surrounding the current loop are not represented
5652 in the domain constraint matrix.
5653 (build_scop_iteration_domain): Initial domain constraint matrix
5654 contains only the eq/ineq, cst, and scop parameters columns.
5656 2008-01-29 Tobias Grosser <grosser@fim.uni-passau.de>
5658 * graphite.c (schedule_to_scattering, nb_loops_around_gb): New.
5659 (print_graphite_bb): Print scattering.
5661 2008-01-29 Tobias Grosser <grosser@fim.uni-passau.de>
5663 * graphite.c (initialize_cloog_names): Initialize names of
5664 scattering variables.
5666 2009-01-29 Tobias Grosser <grosser@fim.uni-passau.de>
5668 * graphite.c (dot_all_scops_1): Disable debug output while
5671 2008-01-29 Tobias Grosser <grosser@fim.uni-passau.de>
5673 * graphite.c (find_transform): Change cloog output language to C.
5675 2008-01-27 Sebastian Pop <sebastian.pop@amd.com>
5677 * tree-loop-distribution.c (generate_memset_zero,
5678 generate_builtin, generate_code_for_partition,
5679 rdg_flag_all_uses): New.
5680 (rdg_flag_uses): Gather in the same partition the statements defining
5681 the VUSES of the current statement.
5682 (rdg_flag_similar_stores): Renamed rdg_flag_similar_memory_accesses.
5683 Gather in the same partition not only the stores to the same memory
5684 access, but also the reads.
5685 (ldist_generate_loops): Renamed ldist_gen.
5687 2008-01-24 Sebastian Pop <sebastian.pop@amd.com>
5688 Tobias Grosser <grosser@fmi.uni-passau.de>
5690 * graphite.c (setup_cloog_loop): Chain all cloog loops with the
5691 next pointer, don't use the inner pointer.
5693 2008-01-20 Tobias Grosser <grosser@fmi.uni-passau.de>
5695 * graphite.c (dot_all_scops, dot_all_scops_1): New.
5696 (find_transform): Call dot_all_1.
5697 * graphite.h (dot_all_scops): Declared.
5699 2007-12-14 Sebastian Pop <sebastian.pop@amd.com>
5701 * tree-loop-distribution.c: Fix apsi.f ICE.
5702 (create_bb_after_loop): New.
5703 (generate_loops_for_partition): Use it.
5704 * testsuite/gfortran.dg/ldist-1.f90: New.
5706 * tree-data-ref.c (dot_rdg): Use /tmp/rdg.dot for dotty format.
5707 * graphite.c (dot_scop): Use /tmp/scop.dot for dotty format.
5709 2007-12-13 Tobias Grosser <grosser@fmi.uni-passau.de>
5711 * graphite.c (find_transform): Dump cloog program sent to cloog.
5713 2007-12-13 Tobias Grosser <grosser@fmi.uni-passau.de>
5715 * graphite.c (initialize_cloog_names): Initialize cloog
5718 2007-12-13 Tobias Grosser <grosser@fmi.uni-passau.de>
5720 * graphite.c (build_scop_context): Fix typo, for the matrix
5721 format: insert '0 >= 0' instead of '-1 >= 0'.
5723 2007-12-13 Sebastian Pop <sebastian.pop@amd.com>
5725 * Fix merge problems.
5727 2007-12-13 Sebastian Pop <sebastian.pop@amd.com>
5729 * graphite.c (setup_cloog_loop): Fix typo.
5731 2007-12-12 Sebastian Pop <sebastian.pop@amd.com>
5733 * doc/invoke.texi (-ftree-loop-distribution): Documented.
5734 * tree-loop-distribution.c: Reimplemented.
5735 * tree-pass.h (pass_loop_distribution): New.
5736 * tree-scalar-evolution.c (number_of_iterations_for_all_loops): Use
5738 * graphds.h (struct graph): New field indexes.
5739 * timevar.def (TV_TREE_LOOP_DISTRIBUTION): New.
5741 * tree-vect-analyze.c: Remove declaration of static functions when not
5743 * tree-vectorizer.c: Same.
5744 (rename_variables_in_loop): Now extern.
5745 (slpeel_tree_duplicate_loop_to_edge_cfg): Renamed
5746 tree_duplicate_loop_to_edge_cfg. Reset PENDING_STMT for edges after
5747 calling redirect_edge_and_branch_force.
5749 * tree-vectorizer.h (tree_duplicate_loop_on_edge): Declared.
5751 * tree-data-ref.c: Don't include tree-chrec.h.
5752 (debug_data_dependence_relations): New.
5753 (dump_data_dependence_relation): Call dump_data_reference on data refs
5755 (same_access_functions): Moved...
5756 (find_vertex_for_stmt): Renamed rdg_vertex_for_stmt.
5757 (dump_rdg_vertex, debug_rdg_vertex, dump_rdg_component,
5758 debug_rdg_component, dump_rdg, debug_rdg, dot_rdg_1, dot_rdg,
5759 struct rdg_vertex_info, ): New.
5760 (create_rdg_edge_for_ddr): Compute the dependence level before looking
5762 (create_rdg_vertices): Initialize the htab of graph->indexes.
5763 Initialize RDG_MEM_WRITE_STMT and RDG_MEM_READS_STMT.
5764 (stmts_from_loop): Don't save LABEL_EXPR.
5765 (hash_stmt_vertex_info, eq_stmt_vertex_info,
5766 hash_stmt_vertex_del): New.
5767 (build_rdg): Initialize rdg->indexes.
5768 (free_rdg, stores_from_loop, ref_base_address,
5769 rdg_defs_used_in_other_loops_p, have_similar_memory_accesses,
5770 have_similar_memory_accesses_1, ref_base_address_1,
5771 remove_similar_memory_refs): New.
5773 * tree-data-ref.h: Include tree-chrec.h.
5774 (debug_data_dependence_relations): Declared.
5775 (same_access_functions): ...here. Now static inline.
5776 (ddr_is_anti_dependent, ddrs_have_anti_deps,
5777 ddr_dependence_level): New.
5778 (struct rdg_vertex): New fields has_mem_write, has_mem_reads.
5779 (RDGV_HAS_MEM_WRITE, RDGV_HAS_MEM_READS, RDG_STMT, RDG_MEM_WRITE_STMT,
5780 RDG_MEM_READS_STMT): New.
5781 (dump_rdg_vertex, debug_rdg_vertex, dump_rdg_component,
5782 debug_rdg_component, dump_rdg, debug_rdg, dot_rdg,
5783 rdg_vertex_for_stmt): Declared.
5784 (struct rdg_edge): New field level.
5785 (RDGE_LEVEL, free_rdg): New.
5786 (stores_from_loop, remove_similar_memory_refs,
5787 rdg_defs_used_in_other_loops_p,
5788 have_similar_memory_accesses): Declared.
5789 (rdg_has_similar_memory_accesses): New.
5791 * lambda.h (dependence_level): New.
5792 * common.opt (ftree-loop-distribution): New.
5793 * tree-flow.h (debug_loop_ir): Renamed debug_loops.
5794 (print_loop_ir): Renamed print_loops.
5795 (debug_loop, debug_loop_num, print_loops_bb, mark_virtual_ops_in_bb,
5796 tree_duplicate_loop_to_edge_cfg, rename_variables_in_loop): Declared.
5797 * Makefile.in (TREE_DATA_REF_H): Depends on tree-chrec.h.
5798 (tree-loop-distribution.o): Added.
5799 * tree-cfg.c (mark_virtual_ops_in_region): Use mark_virtual_ops_in_bb.
5800 (mark_virtual_ops_in_bb): New.
5801 (print_loops_bb, debug_loop_num, debug_loop): New.
5802 * passes.c: Scheduled pass_loop_distribution.
5804 2007-12-12 Konrad Trifunovic <konrad.trifunovic@inria.fr>
5806 * graphite.c (scan_tree_for_params): Correct the number of columns
5808 (nb_flat_iterator): New.
5809 (setup_cloog_loop): Initialize to 1 the first column for inequalities.
5810 (build_scop_iteration_domain): Correct the number of columns for
5813 2007-12-12 Sebastian Pop <sebastian.pop@amd.com>
5815 * Merge from mainline (129697:130800).
5817 2007-10-30 Sebastian Pop <sebastian.pop@amd.com>
5819 * graphite.c (build_graphite_bb): SCoP's basic blocks are post
5820 dominated by SCoP's exit.
5821 (graphite_transform_loops): Compute post dominators.
5823 2007-10-28 Sebastian Pop <sebastian.pop@amd.com>
5825 * Merge from mainline (127169:129697).
5827 2007-10-28 Sebastian Pop <sebastian.pop@amd.com>
5829 * graphite.c (affine_expr): Renamed scop_affine_expr. Use an extra
5830 parameter for the basic block that contains the expression. Use
5831 outermost_loop_in_scop for evolution_function_is_affine_multivariate_p.
5832 (stmt_simple_for_scop_p): Pass to scop_affine_expr the basic block of
5834 * graphite.h (gbb_loop): New.
5835 (GBB_LOOP): Removed.
5837 2007-08-03 Sebastian Pop <sebpop@gmail.com>
5839 * Makefile.in: Fix merge problem.
5841 2007-08-03 Sebastian Pop <sebpop@gmail.com>
5843 * Merge from mainline (125309:127169).
5844 * tree-loop-distribution.c: Disabled.
5846 2007-06-05 Sebastian Pop <sebpop@gmail.com>
5848 * Merge from mainline (r123693:125309).
5850 2007-05-30 Sebastian Pop <sebpop@gmail.com>
5852 * tree-loop-distribution.c (correct_modify_expr_p): Renamed
5854 (correct_modify_p, check_statements, number_of_lvalue_uses,
5855 number_of_scalar_dependences, create_edges): Use GIMPLE_MODIFY_STMT
5856 instead of MODIFY_EXPR.
5857 (update_edge_with_ddv): Don't pass index_of_edge. Initialize
5860 2007-05-24 Sebastian Pop <sebpop@gmail.com>
5862 * tree-loop-distribution.c (struct rdg): Replace arrays by
5863 VECs for edges and vertices.
5864 (RDG_NBV, RDG_NBE, RDG_VERTEX, RDG_EDGE): Removed.
5865 (RDGV_NB_PARTITIONS): New.
5866 (PRDG_NBV, PRDG_NBE): Removed.
5867 (build_scc_graph, correct_partitions_p, mark_partitions, build_prdg,
5868 dump_rdg, find_vertex_with_stmt, create_vertices, free_rdg,
5869 number_of_scalar_dependences, create_edges, build_rdg): Use VECs.
5871 2007-05-17 Georges-Andre Silber <silber@cri.ensmp.fr>
5872 Sebastian Pop <sebpop@gmail.com>
5874 * doc/invoke.texi (-ftree-loop-distribution): Document.
5875 * tree-loop-distribution.c: New file.
5876 * tree-pass.h (pass_loop_distribution): Declared.
5877 * timevar.def (TV_TREE_LOOP_DISTRIBUTION): New.
5878 * tree-data-ref.c (initialize_data_dependence_relation): Initialize
5880 * tree-data-ref.h (data_dependence_relation): Add reversed_p.
5881 (DDR_REVERSED_P): New.
5882 * common.opt (-ftree-loop-distribution): New.
5883 * tree-flow.h (distribute_loops): Declared.
5884 * Makefile.in (OBJS-common): Depend on tree-loop-distribution.o.
5885 * passes.c (init_optimization_passes): Schedule loop distribution.
5887 2007-05-12 Sebastian Pop <sebastian.pop@inria.fr>
5889 * graphite.c (print_graphite_bb): Don't call dump_data_references.
5890 (print_scop): Don't print when scop is NULL.
5891 (build_scop_context, find_transform): Don't output to stderr.
5893 2007-05-09 Sebastian Pop <sebastian.pop@inria.fr>
5895 * tree-data-ref.c: Don't include graphite.h.
5896 Comment out the code for printing data reference's scop.
5897 (build_access_matrix_with_af): Moved...
5898 * tree-data-ref.h (build_access_matrix_with_af): Removed declaration.
5899 * graphite.c (build_access_matrix_with_af): ... here. Now static.
5900 (print_graphite_bb): Print basic block's schedule.
5901 (print_scop): Don't print the schedule, call cloog's pretty printer.
5902 (bb_in_scop_p): A basic block is in a scop only if it is both
5903 dominated and postdominated by the scop's entry and exit basic blocks.
5904 (function_parameter_p): New.
5905 (invariant_in_scop_p): Use function_parameter_p.
5906 (new_scop, save_scop): New.
5907 (end_scop, test_for_scop_bound, build_scops): Use new_scop, and
5909 (scan_tree_for_params): Directly build the constraint as CloogMatrix.
5910 (loop_in_scop_p): New.
5911 (scop_record_loop): Use loop_in_scop_p.
5912 (build_scop_domain): Renamed build_scop_iteration_domain.
5913 (setup_cloog_loop, initialize_cloog_names, find_scop_parameters,
5914 nb_params_in_scop, build_scop_context, first_loop_in_scop,
5915 setup_cloog_loop, dot_scop_1, dot_scop): New.
5916 * graphite.h (GBB_LOOP, SCOP_PROG, dot_scop): New.
5917 (struct scop): Add a pointer to cloog's representation of a program.
5919 2007-04-14 Sebastian Pop <sebastian.pop@inria.fr>
5921 * doc/invoke.texi (-ftree-check-verbose): Renamed
5922 -ftree-checks-verbose.
5923 * common.opt (flag_tree_check_verbose): Renamed
5924 flag_tree_checks_verbose.
5925 * tree-check.c (tree_check_warning): Use flag_tree_checks_verbose.
5927 2007-04-14 Sebastian Pop <sebastian.pop@inria.fr>
5929 * configure: Regenerated.
5930 * config.in: Regenerated.
5931 * tree-ssa-loop.c (graphite_transforms): Execute
5932 graphite_transform_loops only when HAVE_cloog.
5933 * configure.ac (HAVE_polylib, HAVE_cloog, GRAPHITE): Defined.
5934 * graphite.c: Include polylibgmp.h and cloog.h.
5935 (graphite_transform_loops): Removed loops parameter.
5936 * tree-flow.h (graphite_transform_loops): Update declaration.
5937 * Makefile.in (POLYLIBLIBS, POLYLIBINC, CLOOGLIBS, CLOOGINC): New.
5938 (LIBS): Depend on CLOOGLIBS and on POLYLIBLIBS.
5939 (INCLUDES): Depend on POLYLIBINC and on CLOOGINC.
5940 (OBJS-common): Remove dependence on graphite.o.
5941 (BACKEND): Depend on @GRAPHITE@.
5943 2007-04-13 Sebastian Pop <sebastian.pop@inria.fr>
5945 * doc/invoke.texi (-ftree-check-verbose): Documented.
5946 * testsuite/gcc.dg/tree-checker/tree-checks-1.c: New.
5947 * testsuite/gcc.dg/tree-checker/tree-checks-2.c: New.
5948 * testsuite/gcc.dg/tree-checker/tree-checks-3.c: New.
5949 * testsuite/gcc.dg/tree-checker/tree-checks-4.c: New.
5950 * testsuite/gcc.dg/tree-checker/tree-checks.exp: New.
5951 * testsuite/gcc.dg/tree-checker/condates.crp: New.
5952 * common.opt (ftree-checks-verbose): New.
5953 * tree-check.c (tree_check_warning): Move extra stderr output
5954 under control of flag_tree_check_verbose.
5956 2007-04-12 Sebastian Pop <sebastian.pop@inria.fr>
5958 * tree-match.c: Fix comments formatting.
5959 * tree-match.h: Fix comments formatting.
5960 * tree-check.c: Fix comments formatting.
5961 (tree_check_init): Restructure.
5963 2007-04-12 Nic Volanschi <nic.volanschi@free.fr>
5965 * doc/invoke.texi (-ftree-check, -ftree-checks): Documented.
5967 2007-04-10 Sebastian Pop <sebastian.pop@inria.fr>
5969 * Merge from mainline (r120733:123693).
5971 2007-03-20 Nic Volanschi <nic.volanschi@free.fr>
5973 * condate.y: New file.
5974 * tree-match.h (struct patt_info_s): New field sign.
5975 (struct condate_s): New field msg.
5976 (normalize_condate, name_condate, add_condate): New.
5977 (conds[], condate_parse): Made extern.
5978 * tree-check.c (tree_check_warning): First arg changed to cond;
5979 warning reformatted.
5980 (tree_check_init): Reset the TREE_VISITED bit on every CFG node.
5982 (tree_check): Process trivial condates.
5983 (read_delimited_string): Removed.
5984 (print_cond): Print name and msg.
5985 (conds[]): Made extern.
5986 (parse_tree_check_file_once): Rewritten to use the parser in
5988 Processing of option --tree_check_string moved to tree_scan().
5989 * Makefile.in: Added condate.y
5991 2007-03-12 Sebastian Pop <sebastian.pop@inria.fr>
5993 * tree-pretty-print.c (dump_generic_bb_buff, lazy_dump_generic_node):
5994 Use VECs instead of varrays.
5995 * diagnostic.h (lazy_dump_generic_node): Update declaration.
5996 * Makefile.in (pretty-print.o): Depend on vec.h.
5997 * pretty-print.c: Include tree.h and vec.h.
5998 (pp_clear_state, pp_write_list_to_stream, pp_base_format,
5999 pp_base_format, pp_construct, pp_base_string, pp_lazy_mode,
6000 new_tree_chunk, pp_add_tree, pp_add_string, pp_add_char, pp_write_list,
6001 pp_free_list): Use VECs instead of varrays.
6002 * pretty-print.h: Do not include varray.h.
6003 (struct tree_chunk_s): Declaration moved before its use.
6004 (output_buffer): Rename varray field to chunks.
6005 * tree-match.c (tree_equal, chunk_1st_char, chunks_lookahead,
6006 tree_1st_char, match_chunks_pattinfo, match_tree_pattinfo,
6007 save_global_holes): Use VECs instead of varrays.
6008 * tree-match.h: Declare VECs of cfg_node, and hole_p.
6009 * tree-check.c (scan_cfg_stmts, push_node,
6010 print_matching_stmt): Removed.
6011 (tree_check_instance, push_global_holes_if_new, tree_check,
6012 execute_tree_check): Use VECs instead of varrays.
6013 (gate_tree_check): Don't execute the CFG check when basic_block_info
6016 2007-01-12 Sebastian Pop <sebastian.pop@inria.fr>
6018 * Merge from mainline (r115016:120733).
6020 2007-01-12 Sebastian Pop <sebastian.pop@inria.fr>
6022 * Merge from mainline (r117632:117661).
6024 2007-01-12 Sebastian Pop <sebastian.pop@inria.fr>
6026 * tree-dump.c (dump_option_value_in): Add TDF_DEBUG.
6027 * tree-pass.h (TDF_DEBUG, debug_p): New.
6028 * tree-scalar-evolution.c (set_scalar_evolution, get_scalar_evolution,
6029 get_scalar_evolution, add_to_evolution, set_nb_iterations_in_loop,
6030 get_loop_exit_condition, analyze_evolution_in_loop,
6031 analyze_initial_condition, analyze_scalar_evolution,
6032 instantiate_parameters, number_of_latch_executions): Use debug_p.
6033 * tree-chrec.c (chrec_apply): Use debug_p.
6034 * tree-data-ref.c: Include graphite.h.
6035 (dump_data_reference): Print also the access matrix.
6036 (analyze_array, analyze_indirect_ref, init_data_ref,
6037 analyze_offset_expr, address_analysis, object_analysis,
6038 create_data_ref, finalize_ddr_dependent,
6039 non_affine_dependence_relation, analyze_ziv_subscript,
6040 analyze_siv_subscript_cst_affine,
6041 compute_overlap_steps_for_affine_1_2, analyze_subscript_affine_affine,
6042 can_use_analyze_subscript_affine_affine, analyze_siv_subscript,
6043 analyze_miv_subscript, analyze_overlapping_iterations,
6044 build_classic_dist_vector, subscript_dependence_tester,
6045 compute_affine_dependence, analyze_all_data_dependences): Use debug_p.
6046 (build_access_matrix_with_af): No longer static.
6047 * tree-data-ref.h (scop_p): ... declaration here.
6048 (data_reference.scop): New field.
6049 (DR_SCOP, DR_ACCESS_MATRIX): New.
6050 (build_access_matrix_with_af, dr_num_subscripts): Declared.
6051 * graphite.c (print_graphite_bb): Call dump_data_references.
6052 (print_scop): Use scop_nb_loops and scop_dim_domain.
6053 (test_for_scop_bound): Use debug_p.
6054 (scan_tree_for_params): Use scop_nb_loops, scop_nb_loops and
6056 (scop_loop_index): Moved...
6057 (scop_record_loop): New.
6058 (build_scop_loop_nests): Use scop_record_loop.
6059 (build_scop_domain): Use scop_dim_domain.
6060 (build_access_matrix): Implemented.
6061 (build_scop_canonical_schedules): Use scop_nb_loops.
6062 (build_graphite_bb): Initialize GBB_SCOP.
6063 * graphite.h (scop_p): Moved...
6064 (graphite_bb.scop): New field.
6065 (graphite_bb.iteration_domain, GBB_DOMAIN, scop.nb_params,
6066 scop.nb_loops, scop.dim_domain, SCOP_NB_LOOPS, SCOP_NB_PARAMS,
6067 SCOP_DIM_DOMAIN, SCOP_STMTS): Removed.
6068 (scop_nb_params, scop_nb_loops, scop_dim_domain, gbb_dim_domain,
6069 scop_loop_index): New.
6070 * Makefile.in (tree-data-ref.o): Depends on graphite.h.
6072 2007-01-05 Sebastian Pop <sebastian.pop@inria.fr>
6074 * Merge from mainline (r117661:120450).
6076 2006-10-12 Sebastian Pop <sebastian.pop@inria.fr>
6078 * tree-scalar-evolution.c (instantiate_parameters_1): Don't stop
6079 at the first declaration outside the varying loop, instantiate as
6081 * tree-chrec.c (for_each_scev_op): New.
6082 * tree-chrec.h (for_each_scev_op): Declared.
6083 * tree-ssa-loop.c (pass_graphite_trans): Don't dump the function.
6084 * tree-data-ref.c (get_references_in_stmt,
6085 find_data_references_in_stmt): New, from trunk.
6086 (find_data_references_in_loop): Use get_references_in_stmt
6087 and find_data_references_in_loop, modified as in trunk.
6088 (build_access_matrix_with_af): New.
6089 * tree-data-ref.h (data_reference): Add a field access_matrix.
6090 (data_ref_loc): New, as in trunk.
6091 * graphite.c (print_graphite_bb, bb_in_scop_p, stmt_in_scop_p,
6092 invariant_in_scop_p, param_index, scan_tree_for_params,
6093 scop_loop_index, build_scop_loop_nests, build_scop_domain, irp_data,
6094 idx_record_param, idx_record_params, build_access_matrix,
6095 build_scop_data_accesses, build_scop_canonical_schedules,
6096 build_graphite_bb, build_scop_bbs, find_params_in_bb,
6097 build_scop_params): New.
6098 * graphite.h (graphite_bb): New.
6099 (scop): Add fields static_schedule, params, loop_nest,
6101 * lambda.h: Declare vecs of lambda_matrix.
6102 * tree-flow.h (print_loop_ir_bb): Declared.
6103 * tree-cfg.c (print_loop_ir_bb): New.
6104 (print_loop): Use print_loop_ir_bb.
6106 2006-10-12 Sebastian Pop <pop@cri.ensmp.fr>
6108 * Merge from mainline (r115016:117632).
6110 2006-10-11 Sebastian Pop <pop@cri.ensmp.fr>
6112 * graphite.c (debug_scops): Adjust definition for avoiding a bootstrap
6113 break due to a warning.
6115 2006-10-10 Sebastian Pop <pop@cri.ensmp.fr>
6117 * graphite.c (print_scops, debug_scops): New.
6118 (graphite_transform): Renamed graphite_find_transform.
6119 * graphite.h (debug_scops): Declared.
6121 2006-08-17 Sebastian Pop <pop@cri.ensmp.fr>
6123 * tree-match.c: Reformat following the GNU style.
6124 * tree-match.h: Reformat following the GNU style.
6125 * tree-pattern.h: Removed empty file.
6126 * Makefile.in: Remove references to tree-pattern.h.
6127 * tree-check.c: Reformat following the GNU style.
6128 (execute_tree_check): Move gate condition code to...
6129 (gate_tree_check): ...here. New function.
6130 (pass_check): Use the gate function.
6132 2006-07-04 Nic Volanschi <nic.volanschi@free.fr>
6134 * tree-pattern.h: New. Tree pattern matching and checking using
6136 * tree-check.c: New. Tree/CFG checking pass.
6137 * tree-match.c: New. Library for tree pattern matching.
6138 * opts.c, common.opt: Add options --ftree-check & --ftree-checks.
6139 * toplev.c, flags.h: Add globals for tree-check pass.
6140 * Makefile.in: Integrate the files in tree-check pass.
6141 * timevar.def, tree-optimize.c, tree-pass.h: Register tree-check pass.
6142 * pretty-print.c, pretty-print.h, tree-pretty-print.c, diagnostic.h:
6143 Introduce a "lazy" pretty-print mode.
6144 * tree.c, tree.h: Add tree_name.
6146 2006-07-04 Sebastian Pop <pop@cri.ensmp.fr>
6148 * doc/invoke.texi (-fgraphite): Correct typo.
6149 * tree-scalar-evolution.c (number_of_iterations_for_all_loops): Update
6150 use of print_loop_ir.
6151 * testsuite/gcc.dg/graphite/scop-1.c: New.
6152 * testsuite/gcc.dg/graphite/scop-2.c: New.
6153 * testsuite/gcc.dg/graphite/graphite.exp: New.
6154 * graphite.c: Include domwalk.h.
6155 (print_scop): Print only the entry and exit blocks.
6156 (debug_scop): No longer static.
6157 (affine_expr): Fix formating. Return also true when the expression is
6159 (stmt_simple_for_scop_p): Fix formating.
6160 (build_scops): Use domwalk.
6161 (get_loop_start, end_scop, test_for_scop_bound): New.
6162 (graphite_transform_loops): Avoid printing on stderr.
6163 * graphite.h (debug_scop): Declared.
6164 * tree-flow.h (debug_loop_ir, print_loop_ir): Update declarations.
6165 * Makefile.in (graphite.o): Depend on domwalk.h.
6166 * tree-cfg.c (print_loop, print_pred_bbs, print_succ_bbs): Remove
6167 declarations for static functions.
6168 (print_loop, print_loop_ir, debug_loop_ir): Use an extra parameter for
6169 controlling output verbosity.
6171 2006-06-26 Sebastian Pop <pop@cri.ensmp.fr>
6172 Plesco Alexandru <shurikx@gmail.com>
6174 * doc/invoke.texi (-fgraphite): Document.
6175 * tree-pass.h (pass_graphite_transforms): Declared.
6176 * timevar.def (TV_GRAPHITE_TRANSFORMS): New.
6177 * tree-ssa-loop.c (graphite_transforms, gate_graphite_transforms): New.
6178 (pass_graphite_transforms): Defined.
6179 * tree-data-ref.c (free_data_ref, data_reference): Extern.
6180 * tree-data-ref.h (free_data_ref, data_reference): Declared.
6181 * graphite.c, graphite.h: New.
6182 * common.opt (fgraphite): Declared.
6183 * tree-flow.h (graphite_transform_loops): Declared.
6184 * Makefile.in (OBJS-common): Add graphite.o.
6185 (graphite.o): New rule.
6186 * passes.c (pass_graphite_transforms): Scheduled.