1 2009-10-28 Konrad Trifunovic <konrad.trifunovic@gmail.com>
3 * graphite-poly.c (print_permutation): New.
4 (debug_permutation): New.
5 (new_poly_bb): Initialize PBB_PERMUTATION.
6 (free_poly_bb): Free PBB_PERMUTATION.
7 * graphite-poly.h (pbb_permutation_elt_p): Declared.
8 (struct pbb_permutation_elt): New.
9 (PBB_PERMUTATION_ELT_STRIDE): New.
10 (PBB_PERMUTATION_ELT_STRIDED_P): New.
11 (PBB_PERMUTATION_ELT_TIME_DIMENSION): New.
12 (new_pbb_permutation_elt): New.
13 (pbb_permutation_elt_free): New.
14 (struct poly_bb): Add field permutation.
15 (PBB_PERMUTATION): New.
16 (print_permutation): Declared.
17 (debug_permutation): Declared.
19 2009-10-26 Sebastian Pop <sebastian.pop@amd.com>
21 * graphite-clast-to-gimple.c (gloog): Do not call
22 sese_reset_aux_in_loops.
23 * graphite-sese-to-poly.c (build_loop_iteration_domains): Pass an
24 extra argument for domains. Do not use loop->aux.
25 (build_scop_iteration_domain): Initialize and free domains, pass it
26 to build_loop_iteration_domains and extract the information from
27 domains. Do not use loop->aux.
28 * sese.c (sese_reset_aux_in_loops): Removed.
29 * sese.h (sese_reset_aux_in_loops): Removed.
31 2009-10-26 Sebastian Pop <sebastian.pop@amd.com>
33 * graphite-clast-to-gimple.c (find_pbb_via_hash): Moved up.
34 (dependency_in_loop_p): Same.
35 (translate_clast): Do not use loop->aux. Initialize
36 loop->can_be_parallel.
37 (mark_loops_parallel): Removed.
38 * graphite-clast-to-gimple.h (mark_loops_parallel): Removed.
39 * graphite.c (free_aux_in_new_loops): Removed.
40 (graphite_finalize): Do not call free_aux_in_new_loops.
41 (graphite_transform_loops): Do not call mark_loops_parallel.
43 2009-10-26 Li Feng <nemokingdom@gmail.com>
45 * graphite-clast-to-gimple.c (get_stmtfor_depth): Removed.
46 (translate_clast): Pass an extra parameter LEVEL.
47 Call get_scattering_level.
48 * graphite-clast-to-gimple.h (get_scattering_level): New.
50 2009-10-22 Sebastian Pop <sebastian.pop@amd.com>
52 * cfgloop.c (alloc_loop): Initialize loop->single_iv.
53 * cfgloop.h (struct loop): New field single_iv.
55 * graphite-clast-to-gimple.c (pbb_to_depth_to_oldiv): Do not use
56 loop->aux anymore: use loop->single_iv.
57 (graphite_loop_normal_form): Moved...
58 (build_graphite_loop_normal_form): Removed.
59 (gloog): Do not call build_graphite_loop_normal_form.
60 (free_aux_in_new_loops): Moved...
61 (mark_loops_parallel): Restructure.
62 * graphite-clast-to-gimple.h (free_aux_in_new_loops): Do not declare.
63 * graphite-sese-to-poly.c (graphite_loop_normal_form): ...here.
64 (scop_canonicalize_loops): New.
65 (build_poly_scop): Call scop_canonicalize_loops.
66 * graphite.c (free_aux_in_new_loops): ...here.
68 2009-10-22 Sebastian Pop <sebastian.pop@amd.com>
70 * g++.dg/graphite/graphite.exp: Add the same rules as in
71 gcc.dg/graphite/graphite.exp.
73 2009-10-22 Sebastian Pop <sebastian.pop@amd.com>
75 * g++.dg/graphite/id-1.C: New.
77 2009-10-22 Sebastian Pop <sebastian.pop@amd.com>
79 * graphite-sese-to-poly.c (create_zero_dim_array): Pass an extra
81 (rewrite_close_phi_out_of_ssa): Update use of create_zero_dim_array.
82 (rewrite_phi_out_of_ssa): Same.
83 (rewrite_cross_bb_scalar_deps): Same.
84 (translate_scalar_reduction_to_array): Same.
86 2009-10-22 Sebastian Pop <sebastian.pop@amd.com>
88 * graphite-sese-to-poly.c (build_scop_drs): Disable call to
91 2009-10-22 Sebastian Pop <sebastian.pop@amd.com>
93 * graphite-sese-to-poly.c (dump_alias_graphs): New.
94 (build_scop_drs): Call dump_alias_graphs.
96 2009-10-22 Sebastian Pop <sebastian.pop@amd.com>
98 * graphite-poly.c (new_scop): Initialize SCOP_ORIGINAL_SCHEDULE,
99 SCOP_TRANSFORMED_SCHEDULE, and SCOP_SAVED_SCHEDULE.
100 (free_scop): Call free_lst on SCOP_ORIGINAL_SCHEDULE,
101 SCOP_TRANSFORMED_SCHEDULE, and SCOP_SAVED_SCHEDULE.
102 * graphite-poly.h (free_lst): New.
103 (store_lst_schedule): Free SCOP_SAVED_SCHEDULE.
104 (restore_lst_schedule): Free SCOP_TRANSFORMED_SCHEDULE.
106 2009-10-22 Sebastian Pop <sebastian.pop@amd.com>
108 * graphite-poly.h (struct scop): Add a field saved_schedule.
109 (SCOP_SAVED_SCHEDULE): New.
110 (store_lst_schedule): New.
111 (restore_lst_schedule): New.
112 (store_scattering): Call store_lst_schedule.
113 (restore_scattering): Call restore_lst_schedule.
115 2009-10-20 Sebastian Pop <sebastian.pop@amd.com>
117 * graphite-sese-to-poly.c (free_data_refs_aux): Fix formatting.
118 (pdr_add_alias_set): Same.
119 (build_poly_dr): Same.
120 (build_alias_set_optimal_p): Same.
121 (build_base_obj_set_for_drs): Same. Do not store the result of
124 2009-10-20 Sebastian Pop <sebastian.pop@amd.com>
126 * graphite-sese-to-poly.c (build_alias_set_optimal_p): Initialize
127 all_components_are_cliques to 1.
129 2009-10-20 Li Feng <nemokingdom@gmail.com>
131 * graphite-sese-to-poly.c (free_data_refs_aux): Update to free
133 (pdr_add_alias_set): Update retrieving alias_set_num.
134 (build_poly_dr): Update retrieving dr_base_object_set.
135 (partition_drs_to_sets): Remove.
136 (build_alias_set_optimal_p): New.
137 (build_alias_set_for_drs): Rename.
138 (build_scop_drs): Update.
139 * graphite-sese-to-poly.h (struct base_alias_pair): New.
140 (ALIAS_SET_INDEX): Remove.
141 (BASE_OBJECT_SET_INDEX): Remove.
143 2009-10-20 Sebastian Pop <sebastian.pop@amd.com>
145 * sese.c (get_vdef_before_sese): Handle GIMPLE_ASSIGN and GIMPLE_CALL.
147 2009-10-20 Sebastian Pop <sebastian.pop@amd.com>
149 * graphite-sese-to-poly.c (pdr_add_data_dimensions): Do not infer
150 loop upper bounds for 1-element arrays at end of structures.
151 * tree-flow.h (array_at_struct_end_p): Declared.
152 * tree-ssa-loop-niter.c (array_at_struct_end_p): Not static anymore.
154 2009-10-20 Sebastian Pop <sebastian.pop@amd.com>
156 * g++.dg/graphite/pr41305.C: New.
158 2009-10-20 Alexander Monakov <amonakov@ispras.ru>
160 * graphite-sese-to-poly.c (build_loop_iteration_domains): Generalize
161 construction of parameter constraints from loop iteration analysis.
162 * gcc.dg/graphite/run-id-2.c: New test.
164 2009-10-17 Sebastian Pop <sebastian.pop@amd.com>
166 * graphite-interchange.c (memory_stride_in_loop): Delete p1, lma
169 2009-10-17 Sebastian Pop <sebastian.pop@amd.com>
171 * graphite-dependences.c (dependence_polyhedron_1): Remove
172 unused gdim dimensions from the DDR polyhedron.
174 2009-10-17 Sebastian Pop <sebastian.pop@amd.com>
176 * graphite-dependences.c (pddr_transformed_scattering): New.
177 (dot_original_deps_stmt_1): New.
178 (dot_transformed_deps_stmt_1): New.
179 (dot_deps_stmt_1): Call dot_original_deps_stmt_1 and
180 dot_transformed_deps_stmt_1.
181 (dot_original_deps): New.
182 (dot_transformed_deps): New.
183 (dot_deps_1): Call dot_original_deps and dot_transformed_deps.
185 2009-10-17 Sebastian Pop <sebastian.pop@amd.com>
187 * graphite-dependences.c (reduction_dr_1): Remove wrong
188 assert: reduction BBs can have multiple reduction writes
189 to memory. interchange-3.f90 is an example.
191 2009-10-17 Sebastian Pop <sebastian.pop@amd.com>
193 * gfortran.dg/graphite/interchange-3.f90: New.
195 2009-10-17 Sebastian Pop <sebastian.pop@amd.com>
197 * gcc.dg/graphite/interchange-1.c: Un-XFAILed.
199 2009-10-17 Sebastian Pop <sebastian.pop@amd.com>
201 * graphite-dependences.c (dependence_polyhedron_1): Add the
202 context to the dependence polyhedron.
204 2009-10-17 Sebastian Pop <sebastian.pop@amd.com>
206 * graphite-poly.c (pbb_remove_duplicate_pdrs): Initialize
207 PBB_PDR_DUPLICATES_REMOVED.
210 2009-10-17 Sebastian Pop <sebastian.pop@amd.com>
212 * graphite-sese-to-poly.c (find_scop_parameters): Initialize
214 (build_loop_iteration_domains): Extract bounds on parameters
215 based on the data size.
216 (build_scop_context): Do not initialize SCOP_CONTEXT;
219 2009-10-17 Sebastian Pop <sebastian.pop@amd.com>
221 * graphite-ppl.c (ppl_min_for_le_polyhedron): New.
222 * graphite-ppl.h (graphite-ppl.h): Declared.
224 2009-10-17 Sebastian Pop <sebastian.pop@amd.com>
226 * graphite-ppl.c (ppl_print_linear_expr): New.
227 (debug_ppl_linear_expr): New.
228 * graphite-ppl.h (ppl_print_linear_expr): Declared.
229 (debug_ppl_linear_expr): Declared.
231 2009-10-16 Sebastian Pop <sebastian.pop@amd.com>
233 * graphite-interchange.c: Fix comments.
234 * gcc.dg/graphite/block-1.c: Fix comments.
236 2009-10-16 Sebastian Pop <sebastian.pop@amd.com>
238 * gcc.dg/graphite/interchange-7.c: Un-XFAILed.
239 * gcc.dg/graphite/interchange-9.c: Un-XFAILed.
241 2009-10-16 Sebastian Pop <sebastian.pop@amd.com>
243 Reapply the patch from Alexander Monakov that disappeared during
244 the last merges from trunk.
246 2009-09-16 Alexander Monakov <amonakov@ispras.ru>
248 * graphite-sese-to-poly.c (pdr_add_data_dimensions): Add bounds only
249 for ARRAY_REFs. Use array_ref_{low,up}_bound to determine bounds.
251 2009-10-15 Sebastian Pop <sebastian.pop@amd.com>
253 * graphite-interchange.c (memory_stride_in_loop): The depth
254 argument corresponds to a dynamic time dimension, so use
255 psct_dynamic_dim to refer to the transformed scattering dimension.
257 2009-10-15 Sebastian Pop <sebastian.pop@amd.com>
259 * graphite-interchange.c (memory_stride_in_loop): Fix comments.
261 2009-10-15 Sebastian Pop <sebastian.pop@amd.com>
263 * graphite-blocking.c (lst_do_strip_mine): Avoid strip mining the
265 * graphite-interchange.c (lst_do_interchange): Avoid interchanging
267 * graphite-poly.c (scop_to_lst): Fix LST sequence in an outermost
269 (print_lst): Print the root of LST in a different format.
270 * graphite-poly.h (lst_depth): Adjust to include the root of the LST.
272 2009-10-15 Sebastian Pop <sebastian.pop@amd.com>
274 * graphite-poly.c (print_scop): Fix pretty printing of a SCoP.
276 2009-10-15 Sebastian Pop <sebastian.pop@amd.com>
278 * doc/passes.texi: Document the Graphite infrastructure.
280 2009-10-15 Sebastian Pop <sebastian.pop@amd.com>
282 * graphite-sese-to-poly.c (insert_copyin): Use gsi_insert_seq_on_edge.
283 (rewrite_commutative_reductions_out_of_ssa): Call gsi_commit_edge_inserts,
284 and check the SSA representation.
286 * gfortran.dg/graphite/id-18.f90: New, reduced from PR41193.
288 2009-10-15 Sebastian Pop <sebastian.pop@amd.com>
290 * gcc.dg/graphite/pr40157.c: Use -floop-block as reported in the PR.
292 2009-10-14 Sebastian Pop <sebastian.pop@amd.com>
294 * gcc.dg/graphite/interchange-11.c: New.
296 2009-10-14 Sebastian Pop <sebastian.pop@amd.com>
298 * gcc.dg/graphite/interchange-8.c: Enable loop interchange.
300 2009-10-14 Sebastian Pop <sebastian.pop@amd.com>
302 * gcc.dg/graphite/graphite.exp (DEFAULT_CFLAGS_GRAPHITE_BLOCK):
303 Add -fno-loop-strip-mine and -fno-loop-interchange.
304 (DEFAULT_FLAGS_GRAPHITE_INTERCHANGE): Add -fno-loop-block and
305 -fno-loop-strip-mine.
306 * gfortran.dg/graphite/graphite.exp: Same.
308 2009-10-14 Sebastian Pop <sebastian.pop@amd.com>
310 * gcc.dg/graphite/graphite.exp (DEFAULT_CFLAGS_GRAPHITE_BLOCK):
311 Renamed DEFAULT_FLAGS_GRAPHITE_BLOCK.
312 (DEFAULT_CFLAGS_GRAPHITE_IDENTITY): Renamed
313 DEFAULT_FLAGS_GRAPHITE_IDENTITY.
314 (DEFAULT_CFLAGS_GRAPHITE_INTERCHANGE): Renamed
315 DEFAULT_FLAGS_GRAPHITE_INTERCHANGE.
316 (DEFAULT_CFLAGS_GRAPHITE_SCOP): Renamed
317 DEFAULT_FLAGS_GRAPHITE_SCOP.
318 (DEFAULT_CFLAGS_RUN_ID): Renamed DEFAULT_FLAGS_RUN_ID.
319 (DEFAULT_CFLAGS_GRAPHITE): Renamed DEFAULT_FLAGS_GRAPHITE.
321 2009-10-14 Sebastian Pop <sebastian.pop@amd.com>
323 * graphite-poly.c (pbb_number_of_iterations_at_time): Cleanup comments.
325 2009-10-14 Konrad Trifunovic <konrad.trifunovic@gmail.com>
326 Sebastian Pop <sebastian.pop@amd.com>
328 * graphite-interchange.c (build_linearized_memory_access): Pass an
330 (memory_stride_in_loop): Include transform scattering in the
331 access functions to be able to querry the strides in the
333 (pbb_interchange_loop_depths): Interchange the psct_dynamic_dim,
334 not the psct_iterator_dim.
336 2009-10-14 Sebastian Pop <sebastian.pop@amd.com>
338 * graphite-blocking.c (pbb_do_strip_mine): Removed.
339 (lst_do_strip_mine_loop): New.
340 (lst_do_strip_mine): New.
341 (scop_do_strip_mine): Call lst_do_strip_mine.
342 * graphite-poly.h (lst_add_loop_under_loop): New.
343 (lst_find_first_pbb): New.
345 2009-10-14 Sebastian Pop <sebastian.pop@amd.com>
347 * graphite-poly.c (loop_to_lst): Fix LST creation.
349 2009-10-14 Tobias Grosser <grosser@fim.uni-passau.de>
351 * testsuite/gcc.dg/graphite/id-15.c: (8 * 8) replaced with
352 sizeof(unsigned long) to make it run on 32bit systems.
354 2009-10-14 Tobias Grosser <grosser@fim.uni-passau.de>
356 * testsuite/gcc.dg/graphite/run-id-1.c: Use smaller matrix to not
359 2009-10-14 Ramakrishna Upadrasta <Ramakrishna.Upadrasta@inria.fr>
361 * graphite-sese-to-poly.c (write_alias_graph_to_ascii_dimacs): Fix
363 (write_alias_graph_to_ascii_dot): New.
364 (write_alias_graph_to_ascii_ecc): Ditto.
365 (partition_drs_to_sets): Add testing of optimality of current method
366 which assigns alias numbers according to DFS Comopnent number. used
367 as heuristic for the upcoming ECC algorithm.
368 (build_scop_drs): Write to file also with the ecc and dot format.
370 2009-10-13 Sebastian Pop <sebastian.pop@amd.com>
372 * gfortran.dg/graphite/interchange-1.f: XFail.
374 2009-10-13 Sebastian Pop <sebastian.pop@amd.com>
376 * graphite.c (graphite_initialize): Do not handle functions with
377 more than 100 basic blocks.
379 2009-10-13 Sebastian Pop <sebastian.pop@amd.com>
381 * graphite-blocking.c (pbb_do_strip_mine): Use
382 PARAM_LOOP_BLOCK_TILE_SIZE.
384 2009-10-13 Sebastian Pop <sebastian.pop@amd.com>
386 * graphite-poly.c (dot_lst_1): New.
388 * graphite-poly.h (dot_lst): Declared.
390 2009-10-13 Sebastian Pop <sebastian.pop@amd.com>
392 * graphite-dependences.c (dot_deps_stmt_1): New.
393 (dot_deps_stmt): New.
394 * graphite-dependences.h (dot_deps_stmt): Declared.
396 2009-10-09 Sebastian Pop <sebastian.pop@amd.com>
398 * graphite-sese-to-poly.c (rewrite_cross_bb_scalar_dependence): Do
399 not replace cross BB scalar dependences ending on PHI nodes.
400 (rewrite_cross_bb_scalar_deps): Filter out GIMPLE_PHI nodes.
402 2009-10-09 Sebastian Pop <sebastian.pop@amd.com>
404 * graphite-poly.c (apply_poly_transforms): Implement the high
405 level driver for flag_loop_block.
406 * tree-ssa-loop.c (gate_graphite_transforms): Remove call to sorry for
409 * gcc.dg/graphite/graphite.exp (DEFAULT_CFLAGS_GRAPHITE_BLOCK): Add
411 * gfortran.dg/graphite/graphite.exp (DEFAULT_CFLAGS_GRAPHITE_BLOCK):
414 2009-10-09 Sebastian Pop <sebastian.pop@amd.com>
416 * graphite-poly.h (lst_find_pbb): New.
417 (find_lst_loop): New.
419 2009-10-09 Sebastian Pop <sebastian.pop@amd.com>
421 * graphite-poly.c (new_scop): Remove init of SCOP_DEP_GRAPH.
422 * graphite-poly.h (struct scop): Remove dep_graph field.
423 (SCOP_DEP_GRAPH): Removed.
425 2009-10-09 Sebastian Pop <sebastian.pop@amd.com>
427 * graphite-poly.h (copy_lst): Do full copy of LST.
429 2009-10-07 Sebastian Pop <sebastian.pop@amd.com>
431 * graphite-sese-to-poly.c (reduction_phi_p): Call remove_invariant_phi
432 when the loop stride is zero.
434 * gcc.dg/graphite/id-16.c: New.
436 2009-10-06 Sebastian Pop <sebastian.pop@amd.com>
438 * graphite-dependences.c (reduction_dr_1): New.
439 (reduction_dr_p): New.
440 (graphite_legal_transform_dr): Call reduction_dr_p.
441 (reduction_ddr): Renamed reduction_ddr_p.
442 * graphite-poly.h (same_pdr_p): New.
443 (number_of_write_pdrs): New.
444 * graphite-sese-to-poly.c (nb_data_writes_in_bb): New.
445 (split_reduction_stmt): Do not split reduction statements
446 when there are no writes to memory.
447 (translate_scalar_reduction_to_array_for_stmt): Insert the
448 memory reduction statement just after the scalar reduction statement.
450 * gcc.dg/graphite/interchange-10.c: Updated to differ from interchange-4.c.
452 * gcc.dg/graphite/interchange-3.c: Un-XFAIL-ed.
453 * gcc.dg/graphite/interchange-4.c: Un-XFAIL-ed.
455 2009-10-06 Sebastian Pop <sebastian.pop@amd.com>
457 * graphite-interchange.c (lst_apply_interchange): New.
458 (lst_interchange_profitable_p): New.
459 (lst_try_interchange_loops): New.
460 (lst_try_interchange): New.
461 (lst_do_interchange): New.
462 (pbb_do_interchange): Removed.
463 (scop_do_interchange): Call lst_do_interchange.
465 2009-10-06 Sebastian Pop <sebastian.pop@amd.com>
467 * graphite-poly.c (print_scop): Print SCOP_ORIGINAL_SCHEDULE and
468 SCOP_TRANSFORMED_SCHEDULE.
473 * graphite-poly.h (lst_p): New.
476 (LST_LOOP_FATHER): New.
479 (scop_to_lst): Declared.
480 (print_lst): Declared.
481 (debug_lst): Declared.
486 (lst_dewey_number): New.
487 (struct scop): Add original_schedule and transformed_schedule fields.
488 (SCOP_ORIGINAL_SCHEDULE): New.
489 (SCOP_TRANSFORMED_SCHEDULE): New.
490 * graphite-sese-to-poly.c (build_poly_scop): Call scop_to_lst.
492 2009-10-05 Sebastian Pop <sebastian.pop@amd.com>
494 * graphite-dependences.c (reduction_ddr): New.
495 (graphite_legal_transform_bb): Call reduction_ddr.
496 * graphite-poly.c (new_poly_bb): Pass a new bool parameter.
497 Initialize PBB_IS_REDUCTION.
498 * graphite-poly.h (struct poly_bb): New bool field is_reduction.
499 (PBB_IS_REDUCTION): New.
500 (new_poly_bb): Update declaration.
501 * graphite-scop-detection.h (build_scop_bbs): Removed.
502 (nb_reductions_in_loop): Removed.
503 * graphite-sese-to-poly.c (try_generate_gimple_bb): Pass a sbitmap
504 parameter for reductions.
505 (try_generate_gimple_bb): Update call to new_poly_bb.
506 (build_scop_bbs_1): Same.
507 (build_scop_bbs): Same.
508 (gsi_for_phi_node): New.
509 (scalar_close_phi_node_p): Remove gcc_assert.
510 (split_reduction_stmt): New.
511 (is_reduction_operation_p): New.
512 (phi_contains_arg): New.
513 (follow_ssa_with_commutative_ops): New.
514 (detect_commutative_reduction_arg): New.
515 (detect_commutative_reduction_assign): New.
516 (follow_inital_value_to_phi): New.
517 (edge_initial_value_for_loop_phi): New.
518 (initial_value_for_loop_phi): New.
519 (detect_commutative_reduction): New.
520 (translate_scalar_reduction_to_array_for_stmt): New.
521 (insert_copyout): New.
522 (insert_copyin): New.
523 (translate_scalar_reduction_to_array): New.
524 (rewrite_commutative_reductions_out_of_ssa_close_phi): New.
525 (rewrite_commutative_reductions_out_of_ssa_loop): New.
526 (rewrite_commutative_reductions_out_of_ssa): New.
527 (build_poly_scop): Call rewrite_commutative_reductions_out_of_ssa.
528 * sese.h (split_region_for_bb): New.
530 * gcc.dg/graphite/graphite.exp (DEFAULT_CFLAGS_GRAPHITE_BLOCK): Add -ffast-math.
531 * gcc.dg/graphite/interchange-1.c: Fix format.
532 * gcc.dg/graphite/interchange-10.c: New.
534 2009-10-05 Sebastian Pop <sebastian.pop@amd.com>
536 * graphite-sese-to-poly.c (insert_out_of_ssa_copy): Remove
539 2009-10-05 Sebastian Pop <sebastian.pop@amd.com>
541 * graphite-sese-to-poly.c (scev_analyzable_p): New.
542 (rewrite_cross_bb_scalar_dependence): New.
543 (rewrite_cross_bb_scalar_deps): New.
544 (rewrite_reductions_out_of_ssa): Use bb_in_sese_p.
545 Call rewrite_cross_bb_scalar_deps.
547 2009-10-05 Sebastian Pop <sebastian.pop@amd.com>
549 * graphite-sese-to-poly.c (gsi_for_ssa_name_def): Removed.
550 (insert_out_of_ssa_copy): Directly use gsi_after_labels and
553 2009-10-05 Sebastian Pop <sebastian.pop@amd.com>
555 * graphite-clast-to-gimple.c (build_cloog_prog): Use pbb_index.
556 * graphite-interchange.c (pbb_do_interchange): Same.
557 * graphite-poly.c (print_scattering_function): Same.
559 * graphite-poly.h (pbb_loop): New.
560 * graphite-sese-to-poly.c (create_linear_expr_from_tree): Use pbb_loop.
562 2009-09-27 Sebastian Pop <sebastian.pop@amd.com>
564 * graphite-scop-detection.c (limit_scops): Do not build poly_bbs.
566 2009-09-27 Sebastian Pop <sebastian.pop@amd.com>
568 * graphite-sese-to-poly.c (partition_drs_to_sets): Drs is not modified,
569 so don't pass a pointer to it.
570 (build_alias_set_for_drs): Same.
571 (build_base_obj_set_for_drs): Same.
572 (build_scop_drs): Same.
574 2009-09-26 Li Feng <nemokingdom@gmail.com>
576 * graphite-sese-to-poly.c (build_scop_drs): Disable writing to file
577 the alias graph of data references.
579 2009-09-25 Li Feng <nemokingdom@gmail.com>
581 * graphite-sese-to-poly.c (write_alias_graph_to_ascii_dimacs): New.
582 (build_scop_drs): When debugging, write the alias graph to file,
583 otherwise, should be disabled.
585 2009-09-17 Sebastian Pop <sebastian.pop@amd.com>
587 * graphite-scop-detection.c (stmt_simple_memref_p): Removed.
588 (is_simple_operand): Remove call to stmt_simple_memref_p.
589 (stmt_simple_for_scop_p): Update call to is_simple_operand.
591 2009-09-17 David Edelsohn <edelsohn@gnu.org>
593 * testsuite/gcc.dg/graphite/interchange-mvt.c: New File.
594 * testsuite/gcc.dg/graphite/scop-dsyrk.c: New File.
595 * testsuite/gcc.dg/graphite/scop-dsyr2k.c: New File.
596 * testsuite/gcc.dg/graphite/scop-mvt.c: New File.
597 * testsuite/gcc.dg/graphite/scop-sor.c: New File.
599 2009-09-17 Li Feng <nemokingdom@gmail.com>
602 * graphite-dependences.c (poly_drs_may_alias_p): Adjust definition.
603 (pddr_original_scattering): Make sure 2 pdr2 in the same base object set.
604 (graphite_carried_dependence_level_k): Ditto.
605 * graphite-poly.c (new_poly_dr): Add init of PDR_BASE_OBJECT_SET.
606 * graphite-poly.h (struct poly_dr): Add member dr_base_object_set.
607 (new_poly_dr): Adjust declaration.
608 * graphite-sese-to-poly.c (free_data_refs_aux): New.
609 (free_gimple_bb): Added free_data_refs_aux.
610 (build_poly_dr): Add dr_base_object_set.
611 (partition_drs_to_sets): New.
612 (dr_same_base_object_p): New.
613 (build_alias_set_for_drs): New.
614 (build_base_object_set_for_drs): New.
615 (build_scop_drs): Add build_base_obj_set_for_drs.
616 * graphite-sese-to-poly.h: Added #define for alias set number index and
617 base object set index.
618 * libgomp/testsuite/libgomp.graphite/force-parallel-6.c: Refine tests.
619 * libgomp/testsuite/libgomp.graphite/pr4118.c: New.
621 2009-09-16 Alexander Monakov <amonakov@ispras.ru>
623 * graphite-sese-to-poly.c (pdr_add_data_dimensions): Add bounds only
624 for ARRAY_REFs. Use array_ref_{low,up}_bound to determine bounds.
626 2009-09-14 Sebastian Pop <sebastian.pop@amd.com>
628 * graphite-sese-to-poly.c (struct irp_data): Removed.
629 (idx_record_params): Removed.
630 (find_params_in_bb): Scan for parameters the access functions; don't
631 parse the tree representation.
633 2009-09-14 Sebastian Pop <sebastian.pop@amd.com>
635 * tree-ssa-loop.c (gate_graphite_transforms): Disable Graphite
636 passes at -O1 and below.
638 2009-09-14 Sebastian Pop <sebastian.pop@amd.com>
640 * graphite-blocking.c: Fix order of includes: tree-chrec.h, then
641 tree-scalar-evolution.h, and then tree-data-ref.h.
642 * graphite-clast-to-gimple.c: Same.
643 * graphite-dependences.c: Same.
644 * graphite-interchange.c: Same.
645 * graphite-poly.c: Same.
646 * graphite-scop-detection.c: Same.
647 * graphite-sese-to-poly.c: Same.
649 * lambda-code.c: Same.
650 * matrix-reorg.c: Same.
651 * tree-data-ref.c: Same.
652 * tree-if-conv.c: Same.
653 * tree-loop-distribu: Same.: Same.
654 * tree-loop-linear.c: Same.
655 * tree-parloops.c: Same.
656 * tree-predcom.c: Same.
657 * tree-vect-patterns.c: Same.
659 2009-09-02 Sebastian Pop <sebastian.pop@amd.com>
661 Partially revert the previous patch, except the following.
662 * tree-scalar-evolution.c (instantiate_scev_not): Adapted to pass
663 as parameters the operands of the not expression.
665 2009-09-01 Sebastian Pop <sebastian.pop@amd.com>
667 * tree-scalar-evolution.c (instantiate_scev_assign): New.
668 Do not call analyze_scalar_evolution on assignments.
669 (instantiate_scev_phi): Call analyze_scalar_evolution.
670 (instantiate_scev_name): Call instantiate_scev_assign and
671 instantiate_scev_phi.
672 (instantiate_scev_not): Adapted to pass as parameters the operands
673 of the not expression.
675 2009-09-01 Sebastian Pop <sebastian.pop@amd.com>
677 * tree-scalar-evolution.c (instantiate_scev_binary): Adapted
678 to pass as parameters the operands of the binary expression.
680 2009-09-01 Sebastian Pop <sebastian.pop@amd.com>
682 * tree-scalar-evolution.c (instantiate_scev_bitnot): Renamed
683 instantiate_scev_not. Handle NEGATE_EXPR.
684 (instantiate_scev_r): Handle NEGATE_EXPR.
686 2009-09-01 Sebastian Pop <sebastian.pop@amd.com>
688 * tree-scalar-evolution.c (instantiate_scev_1): Renamed
690 (instantiate_scev_r): Move code in instantiate_scev_2
691 and instantiate_scev_1.
693 2009-09-01 Sebastian Pop <sebastian.pop@amd.com>
695 * tree-scalar-evolution.c (instantiate_scev_3): New.
696 (instantiate_scev_1): Move code in instantiate_scev_3.
698 2009-09-01 Sebastian Pop <sebastian.pop@amd.com>
700 * tree-scalar-evolution.c (instantiate_scev_poly): New.
701 (instantiate_scev_1): Move code in instantiate_scev_poly.
703 2009-09-01 Sebastian Pop <sebastian.pop@amd.com>
705 * tree-scalar-evolution.c (instantiate_scev_bitnot): New.
706 (instantiate_scev_1): Move code in instantiate_scev_bitnot.
708 2009-09-01 Sebastian Pop <sebastian.pop@amd.com>
710 * tree-scalar-evolution.c (instantiate_scev_convert): New.
711 (instantiate_scev_1): Move code in instantiate_scev_convert.
713 2009-09-01 Sebastian Pop <sebastian.pop@amd.com>
715 * tree-scalar-evolution.c (instantiate_scev_binary): New.
716 (instantiate_scev_1): Move code in instantiate_scev_binary.
718 2009-09-01 Sebastian Pop <sebastian.pop@amd.com>
720 * tree-scalar-evolution.c (instantiate_scev_name): New.
721 (instantiate_scev_1): Move code in instantiate_scev_name.
723 2009-08-28 Sebastian Pop <sebastian.pop@amd.com>
725 * Merge from mainline (150992:151171).
727 2009-08-25 Sebastian Pop <sebastian.pop@amd.com>
729 * graphite-dependences.c (graphite_legal_transform_bb): Call
730 pbb_remove_duplicate_pdrs.
731 * graphite-poly.c (can_collapse_pdr): Removed.
732 (pdr_find_duplicate): Removed.
733 (can_collapse_pdrs): New.
734 (pbb_remove_duplicate_pdrs): New.
735 (new_poly_dr): Do not look for duplicates.
736 * graphite-poly.h (struct poly_bb): New field pdr_duplicates_removed.
737 (PBB_PDR_DUPLICATES_REMOVED): New.
738 (pbb_remove_duplicate_pdrs): Declared.
740 2009-08-25 Sebastian Pop <sebastian.pop@amd.com>
742 * graphite-interchange.c (pbb_interchange_profitable_p): Adjust
743 the strides by multiplying by PDR_NB_REFS.
744 * graphite-poly.c (can_collapse_pdr): New.
745 (pdr_find_duplicate): New.
746 (new_poly_dr): Call pdr_find_duplicate. Collapse duplicate PDRs.
747 Initialize PDR_NB_REFS.
748 * graphite-poly.h (struct poly_dr): Add field nb_refs.
750 (new_poly_dr): Number of subscripts is a graphite_dim_t.
752 2009-08-25 Sebastian Pop <sebastian.pop@amd.com>
754 Revert one of the previous commits:
755 * graphite-dependences.c (graphite_legal_transform_bb): Avoid
756 the computation of symmetric data dependence relations.
757 (dependency_between_pbbs_p): Same.
759 2009-08-25 Sebastian Pop <sebastian.pop@amd.com>
762 * graphite-poly.c (apply_poly_transforms): Remove legality test before
765 2009-08-25 Sebastian Pop <sebastian.pop@amd.com>
767 * graphite-dependences.c (pddr_original_scattering): Return NULL
768 for read-read dependence relations.
769 * graphite-poly.h (enum poly_dr_type): Fix comment.
772 (pdr_may_write_p): New.
774 2009-08-25 Sebastian Pop <sebastian.pop@amd.com>
776 * graphite-poly.h (enum POLY_DR_TYPE): Renamed poly_dr_type.
777 (struct poly_dr): Same.
779 * graphite-poly.c (new_poly_dr): Same.
781 2009-08-25 Konrad Trifunovic <konrad.trifunovic@gmail.com>
782 Sebastian Pop <sebastian.pop@amd.com>
784 * graphite-blocking.c (pbb_strip_mine_loop_depth): Renamed
785 pbb_strip_mine_time_depth. Changed the implementation so that
786 transformation is expressed as a transformation on
787 time (scatttering) dimensions. Also, ensures that the 2d+1
788 scheduling format is preserved.
789 (pbb_strip_mine_profitable_p): Profitability is based on the
790 iteration number of a given time (scattering) dimension,
791 and not on a original loop depth dimension.
792 (pbb_strip_mine): Call pbb_number_of_iterations_at_time.
793 (pbb_do_strip_mine): Call psct_dynamic_dim.
794 * graphite-poly.c (pbb_number_of_iterations_at_time): New.
795 * graphite-poly.h (pbb_number_of_iterations_at_time): Declared.
796 (pbb_nb_dynamic_scattering_transform): New.
797 (psct_dynamic_dim): New.
799 2009-08-25 Konrad Trifunovic <konrad.trifunovic@gmail.com>
801 * graphite-ppl.c (ppl_max_for_le): Renamed ppl_max_for_le_pointset.
802 * graphite-ppl.h (ppl_max_for_le): Renamed ppl_max_for_le_pointset.
803 * graphite-poly.c (pbb_number_of_iterations): Rename ppl_max_for_le.
804 * graphite-interchange.c (build_linearized_memory_access): Same.
805 (memory_stride_in_loop): Same.
807 2009-08-25 Sebastian Pop <sebastian.pop@amd.com>
809 * graphite-dependences.c (pddr_original_scattering): New.
810 (graphite_legal_transform_dr): Call pddr_original_scattering.
813 * graphite-dependences.h (dot_deps): Declared.
814 * graphite-poly.c (new_poly_dr): Initialize PDR_ID.
815 (print_pdr): Print PDR_ID.
816 * graphite-poly.h (struct poly_dr): Add field id.
819 * graphite-scop-detection.c (dot_all_scops_1): Cleanup comment.
821 2009-08-22 Sebastian Pop <sebastian.pop@amd.com>
823 * graphite-dependences.c (graphite_carried_dependence_level_k): Do
824 not delete the original dependence relation.
826 2009-08-21 Sebastian Pop <sebastian.pop@amd.com>
828 * graphite-dependences.c (graphite_legal_transform_bb): Avoid
829 the computation of symmetric data dependence relations.
830 (dependency_between_pbbs_p): Same.
832 2009-08-21 Sebastian Pop <sebastian.pop@amd.com>
834 * graphite-dependences.c (new_poly_dr_pair): Renamed new_poly_ddr.
835 (eq_poly_dr_pair_p): Renamed eq_poly_ddr_p.
836 (hash_poly_dr_pair_p): Renamed hash_poly_ddr_p.
837 (free_poly_ddr): New.
838 (pddr_is_empty): New.
839 (dependence_polyhedron_1): Now returns a poly_ddr_p.
840 (dependence_polyhedron): Same. Remove useless gcc_assert.
842 (graphite_legal_transform_dr): Call pddr_is_empty and free_poly_ddr.
843 (graphite_carried_dependence_level_k): Call pddr_is_empty.
844 * graphite-dependences.h (enum poly_dependence_kind): New.
845 (poly_dr_pair): Renamed poly_ddr. Added a field kind.
846 (PDRP_SOURCE): Renamed PDDR_SOURCE.
847 (PDRP_SINK): Renamed PDDR_SINK.
848 (PDRP_DDP): Renamed PDDR_DDP.
850 (free_poly_ddr): Declared.
851 * graphite-poly.c (new_scop): Use the new hash function names.
852 * graphite-poly.h (struct scop): Renamed field original_pdr_pairs
854 (SCOP_ORIGINAL_PDR_PAIRS): Renamed SCOP_ORIGINAL_PDDRS.
856 2009-08-21 Sebastian Pop <sebastian.pop@amd.com>
858 * Merge from mainline (150764:150992).
860 2009-08-18 Sebastian Pop <sebastian.pop@amd.com>
862 * cfgloopmanip.c (create_empty_loop_on_edge): Generate upper
863 bounds with LT_EXPR to make niter analysis more precise on code
864 generated by Graphite.
866 2009-08-18 Sebastian Pop <sebastian.pop@amd.com>
868 * graphite-dependences.c (graphite_legal_transform_dr): Fix formatting.
869 (graphite_legal_transform_bb): Same.
870 (poly_drs_may_alias_p): Same.
872 2009-08-15 Sebastian Pop <sebastian.pop@amd.com>
875 * graphite-ppl.c (ppl_max_for_le): Correct the use of
876 ppl_Pointset_Powerset_C_Polyhedron_maximize.
878 2009-08-13 Sebastian Pop <sebastian.pop@amd.com>
880 * graphite-poly.c (print_pbb): Print PBB index.
882 2009-08-13 Sebastian Pop <sebastian.pop@amd.com>
884 * Merge from mainline (r150672:150764).
886 2009-08-13 Sebastian Pop <sebastian.pop@amd.com>
888 * graphite-interchange.c (ppl_max_for_le): Moved...
889 * graphite-poly.c (pbb_number_of_iterations): Call ppl_max_for_le.
890 * graphite-ppl.c (ppl_max_for_le): ... here.
891 * graphite-ppl.h (ppl_max_for_le): Declared.
893 2009-08-12 Sebastian Pop <sebastian.pop@amd.com>
895 * Merge from mainline (r150372:150672).
897 2009-08-11 Sebastian Pop <sebastian.pop@amd.com>
900 * sese.c (convert_for_phi_arg): New.
901 (add_guard_exit_phis): Use convert_for_phi_arg.
903 * testsuite/gfortran.dg/graphite/id-17.f: New.
905 2009-08-11 Sebastian Pop <sebastian.pop@amd.com>
907 * graphite-sese-to-poly.c (pdr_add_data_dimensions): Dont add
908 unknown subscript upper bounds.
910 * testsuite/gcc.dg/graphite/interchange-6.c: Un-XFAIL.
912 2009-08-11 Sebastian Pop <sebastian.pop@amd.com>
913 Pranav Garg <pranav.garg2107@gmail.com>
915 * graphite-interchange.c (gather_access_strides): Removed.
916 (ppl_max_for_le): New.
917 (build_linearized_memory_access): New.
918 (memory_stride_in_loop): New.
919 (pbb_interchange_profitable_p): Reimplemented.
920 * graphite-ppl.h (ppl_new_id_map): New.
921 (ppl_interchange): New.
923 * testsuite/gcc.dg/graphite/interchange-6.c: XFAILed.
925 2009-08-11 Sebastian Pop <sebastian.pop@amd.com>
927 * graphite-interchange.c (compute_subscript): Removed.
928 (compute_array_size_cstr): Removed.
929 (compute_array_size_poly): Removed.
930 (compute_array_size): Removed.
931 (gather_access_strides_poly): Removed.
932 (gather_access_strides): Empty.
934 2009-08-11 Sebastian Pop <sebastian.pop@amd.com>
936 * graphite-dependences.c (dependence_polyhedron_1): Replace
937 pdr_nb_subscripts with PDR_NB_SUBSCRIPTS.
938 (graphite_legal_transform_dr): Same.
939 (graphite_carried_dependence_level_k): Same.
940 * graphite-poly.c (new_poly_dr): Add a parameter nb_subscripts.
941 Initialize PDR_NB_SUBSCRIPTS.
942 (print_pdr_access_layout): Replace pdr_nb_subscripts with
944 * graphite-poly.h (struct poly_dr): Add nb_subscripts field.
945 (PDR_NB_SUBSCRIPTS): New.
946 (pdr_nb_subscripts): Removed.
947 (pdr_dim): Simplified.
948 * graphite-sese-to-poly.c (build_poly_dr): Replace pdr_nb_subscripts
949 with PDR_NB_SUBSCRIPTS.
951 2009-08-11 Sebastian Pop <sebastian.pop@amd.com>
953 * graphite-interchange.c (compute_array_size): Remove use of
955 * graphite-poly.c (new_poly_dr): Remove argument data_container.
956 Do not initialize PDR_DATA_CONTAINER.
957 (print_pdr): Do not print PDR_DATA_CONTAINER.
958 * graphite-poly.h (struct poly_dr): Remove data_container field.
959 (PDR_DATA_CONTAINER): Removed.
960 * graphite-sese-to-poly.c (pdr_add_data_dimensions): Remove use of
962 (build_poly_dr): Same.
964 2009-08-11 Sebastian Pop <sebastian.pop@amd.com>
966 * testsuite/gcc.dg/graphite/interchange-9.c: New.
968 2009-08-05 Konrad Trifunovic <konrad.trifunovic@gmail.com>
969 Sebastian Pop <sebastian.pop@amd.com>
971 * graphite-dependences.c (graphite_legal_transform_dr): Work on a
972 copy of the dependence polyhedron. Free the temporary objects.
973 (graphite_carried_dependence_level_k): Free unused objects before
976 * testsuite/gcc.dg/graphite/interchange-1.c: XFAILed.
977 * testsuite/gcc.dg/graphite/interchange-2.c: XFAILed.
978 * testsuite/gcc.dg/graphite/interchange-3.c: XFAILed.
979 * testsuite/gcc.dg/graphite/interchange-4.c: XFAILed.
980 * testsuite/gcc.dg/graphite/interchange-7.c: XFAILed.
982 2009-08-05 Sebastian Pop <sebastian.pop@amd.com>
984 * graphite-blocking.c (scop_do_strip_mine): Call store_scattering.
985 Early return without analyzing the data dependences if no
986 transform has been done. Call restore_scattering if the transform
988 (graphite-interchange.c): Same.
989 * graphite-poly.c (print_scattering_function): Test for PBB_TRANSFORMED.
990 (graphite_read_transforms): Initialize PBB_TRANSFORMED.
991 (apply_poly_transforms): Do not gcc_assert that
992 the transform is legal.
993 (new_poly_bb): Initialize PBB_TRANSFORMED, PBB_SAVED, and PBB_ORIGINAL.
994 Do not initialize PBB_NB_SCATTERING_TRANSFORM, PBB_NB_LOCAL_VARIABLES,
995 PBB_TRANSFORMED_SCATTERING, and PBB_ORIGINAL_SCATTERING.
996 (free_poly_dr): Free PBB_TRANSFORMED, PBB_SAVED, and PBB_ORIGINAL.
997 * graphite-poly.h (struct poly_scattering): New.
998 (struct poly_bb): Add original, transformed, and saved fields.
999 Remove transformed_scattering, original_scattering, nb_local_variables,
1000 and nb_scattering_transform fields.
1001 (PBB_ORIGINAL, PBB_TRANSFORMED, PBB_SAVED): New.
1002 (poly_scattering_new): New.
1003 (poly_scattering_free): New.
1004 (poly_scattering_copy): New.
1005 (store_scattering_pbb): New.
1006 (store_scattering): New.
1007 (restore_scattering_pbb): New.
1008 (restore_scattering): New.
1009 * graphite-sese-to-poly.c (build_pbb_scattering_polyhedrons):
1010 Initialize PBB_TRANSFORMED and PBB_ORIGINAL.
1012 2009-08-05 Sebastian Pop <sebastian.pop@amd.com>
1014 * graphite-poly.c (print_pbb): Add parentheses in the pretty print.
1017 2009-08-05 Sebastian Pop <sebastian.pop@amd.com>
1019 * Makefile.in (graphite.o): Depends on PREDICT_H.
1020 * graphite.c: Include predict.h.
1021 (graphite_finalize): Call tree_estimate_probability.
1022 * predict.c (predict_loops): Do not call scev_initialize and
1024 (tree_estimate_probability_bb): New.
1025 (tree_estimate_probability): Do not initialize loops: move that
1026 code to the driver. Call tree_estimate_probability_bb.
1027 (tree_estimate_probability_driver): New.
1028 (pass_profile): Use tree_estimate_probability_driver.
1029 * predict.h (tree_estimate_probability): Declared.
1031 2009-08-05 Sebastian Pop <sebastian.pop@amd.com>
1033 * graphite-clast-to-gimple.c (gloog): Add time to TV_GRAPHITE_CODE_GEN.
1034 * graphite-dependences.c (graphite_legal_transform): Add time to
1035 TV_GRAPHITE_DATA_DEPS.
1036 (dependency_between_pbbs_p): Same.
1037 * timevar.def (TV_GRAPHITE_DATA_DEPS, TV_GRAPHITE_CODE_GEN): New.
1039 2009-08-03 Sebastian Pop <sebastian.pop@amd.com>
1041 * Merge from mainline (r149952:150372).
1043 2009-07-28 Sebastian Pop <sebastian.pop@amd.com>
1045 * ChangeLog.graphite: Fix indenting, white spaces and 80 columns.
1046 * graphite-blocking.c: Same.
1047 * graphite-clast-to-gimple.c: Same.
1048 * graphite-dependences.c: Same.
1049 * graphite-poly.c: Same.
1050 * graphite-poly.h: Same.
1051 * graphite-ppl.c: Same.
1052 * graphite-scop-detection.c: Same.
1053 * graphite-sese-to-poly.c: Same.
1056 2009-07-28 Sebastian Pop <sebastian.pop@amd.com>
1058 * graphite-sese-to-poly.c (loop_entry_phi_arg): New.
1059 (remove_simple_copy_phi): New.
1060 (remove_invariant_phi): New.
1061 (simple_copy_phi_p): New.
1062 (reduction_phi_p): New.
1063 (gsi_for_ssa_name_def): New.
1064 (insert_out_of_ssa_copy): New.
1065 (insert_out_of_ssa_copy_on_edge): New.
1066 (create_zero_dim_array): New.
1067 (scalar_close_phi_node_p): New.
1068 (rewrite_close_phi_out_of_ssa): New.
1069 (rewrite_phi_out_of_ssa): New.
1070 (rewrite_reductions_out_of_ssa): New.
1071 (build_poly_scop): Call rewrite_reductions_out_of_ssa.
1073 * testsuite/gcc.dg/graphite/id-11.c: New.
1074 * testsuite/gcc.dg/graphite/id-15.c: New.
1075 * testsuite/gcc.dg/graphite/interchange-1.c: Un-XFAIL.
1076 * testsuite/gcc.dg/graphite/interchange-2.c: Un-XFAIL.
1077 * testsuite/gcc.dg/graphite/interchange-3.c: Un-XFAIL.
1078 * testsuite/gcc.dg/graphite/interchange-4.c: Un-XFAIL.
1079 * testsuite/gcc.dg/graphite/interchange-7.c: Un-XFAIL.
1080 * testsuite/gcc.dg/graphite/scop-matmult.c: Un-XFAIL.
1081 * testsuite/gfortran.dg/graphite/id-13.f: New.
1082 * testsuite/gfortran.dg/graphite/id-5.f: New.
1084 2009-07-28 Sebastian Pop <sebastian.pop@amd.com>
1086 * graphite-clast-to-gimple.c (graphite_loop_normal_form): Do not
1087 check that nb_reductions_in_loop is zero.
1088 * graphite-scop-detection.c (harmful_stmt_in_bb): Don't filter out
1089 reduction phi nodes.
1090 (nb_reductions_in_loop): Removed.
1091 (graphite_can_represent_loop): Do not call nb_reductions_in_loop.
1092 * graphite-sese-to-poly.c (phi_node_is_iv): Removed.
1093 (bb_contains_non_iv_scalar_phi_nodes): Removed.
1094 (scop_contains_non_iv_scalar_phi_nodes): Removed.
1095 (build_poly_scop): Do not call scop_contains_non_iv_scalar_phi_nodes.
1097 2009-07-28 Sebastian Pop <sebastian.pop@amd.com>
1099 * graphite-clast-to-gimple.c (build_cloog_prog): Do not code generate
1100 statements that have an empty iteration domain.
1101 * testsuite/gfortran.dg/graphite/id-16.f: New.
1103 2009-07-28 Sebastian Pop <sebastian.pop@amd.com>
1105 * tree-scalar-evolution.c (instantiate_scev_1): Return
1106 chrec_dont_know when the result is not above instantiate_below.
1107 * graphite-scop-detection.c (scopdet_basic_block_info): Fix formatting.
1108 * graphite-sese-to-poly.c (create_linear_expr_from_tree): Assert that
1109 the tree has a known scalar evolution.
1110 * testsuite/gfortran.dg/graphite/id-14.f: New.
1111 * testsuite/gfortran.dg/graphite/id-15.f: New.
1113 2009-07-28 Sebastian Pop <sebastian.pop@amd.com>
1115 * sese.c (rename_variables_in_stmt): Pass in an extra parameter
1117 (rename_variables): Keep inserting renames after the ones already
1120 2009-07-28 Sebastian Pop <sebastian.pop@amd.com>
1122 * graphite-sese-to-poly.c (compare_bb_depths): New.
1123 (graphite_sort_dominated_info): New.
1124 (build_scop_bbs_1): Call graphite_sort_dominated_info.
1125 (build_scop_scattering): Fix comment.
1127 2009-07-28 Sebastian Pop <sebastian.pop@amd.com>
1129 * graphite.c (graphite_finalize): Call print_loops instead of
1130 dump_function_to_file.
1131 * testsuite/gcc.dg/graphite/graphite.exp: Fix formatting.
1132 * testsuite/gcc.dg/graphite/pr35356-1.c: New. Look for the number of
1133 loops generated in the graphite output file.
1134 * testsuite/gcc.dg/graphite/pr35356-2.c: New.
1135 * testsuite/gcc.dg/graphite/pr35356-3.c: New. XFAILed for now.
1136 * testsuite/gfortran.dg/graphite/id-12.f: New.
1138 2009-07-24 Li Feng <nemokingdom@gmail.com>
1140 * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-8.c:
1143 2009-07-24 Li Feng <nemokingdom@gmail.com>
1144 Tobias Grosser <grosser@fim.uni-passau.de>
1146 * graphite-sese-to-poly.c (pdr_add_alias_set): Use data reference's
1147 alias set number build alias in ACCESSES polyhedron.
1148 (build_alias_set_for_drs): New.
1149 (build_pbb_drs): Added build_alias_set_for_drs.
1150 * graphite-dependences.c (poly_drs_may_alias_p): New.
1151 (graphite_carried_dependence_level_k): Check alias information
1152 before building polyhedron.
1154 2009-07-24 Tobias Grosser <grosser@fim.uni-passau.de>
1156 * Makefile.in (lambda-code.o): Fix formatting.
1158 2009-07-24 Tobias Grosser <grosser@fim.uni-passau.de>
1160 * Merge from mainline (r149350-149952)
1162 2009-07-18 Tobias Grosser <grosser@fim.uni-passau.de>
1164 * graphite-poly.c (apply_poly_transforms): Move strip_mine
1165 before interchange to prepare for loop blocking.
1167 2009-07-18 Tobias Grosser <grosser@fim.uni-passau.de>
1169 * graphite-poly.c (apply_poly_transforms): Add checks after every
1171 * graphite-sese-to-poly.c (build_poly_scop): Remove check, as already
1172 done in apply_poly_transforms.
1174 2009-07-17 Konrad Trifunovic <konrad.trifunovic@gmail.com>
1176 * graphite-dependences.c (build_lexicographically_gt_constraint):
1177 Replace RES parameter with *RES.
1178 (dependence_polyhedron_1): Pass an address of the parameter RES
1179 instead of value of RES.
1181 2009-07-16 Sebastian Pop <sebastian.pop@amd.com>
1183 * graphite.c (graphite_finalize): Fix comment.
1184 (graphite_transform_loops): Reset scev info after code generation
1187 2009-07-16 Sebastian Pop <sebastian.pop@amd.com>
1189 * graphite.c (graphite_finalize): Call scev_reset.
1191 2009-07-16 Sebastian Pop <sebastian.pop@amd.com>
1193 * graphite-clast-to-gimple.c (compute_cloog_iv_types): Do not create
1194 GBB_CLOOG_IV_TYPES hash table twice.
1195 * graphite-sese-to-poly.c (free_gimple_bb): Call free_data_refs.
1196 (add_condition_to_domain): Clear GMP values.
1198 2009-07-16 Sebastian Pop <sebastian.pop@amd.com>
1200 * graphite-dependences.c: Fix formatting.
1201 * graphite-poly.c (free_poly_dr): Also free PDR_DATA_CONTAINER.
1202 (pbb_number_of_iterations): Free ppl_Linear_Expression.
1203 * graphite-sese-to-poly.c: Fix formatting.
1204 * graphite.c (graphite_transform_loops): Create the hash table
1205 after the early return.
1207 2009-07-16 Sebastian Pop <sebastian.pop@amd.com>
1209 * testsuite/gcc.dg/graphite/id-14.c: New.
1210 * testsuite/gcc.dg/graphite/pr40157.c: New.
1211 * testsuite/gfortran.dg/graphite/id-11.f: New.
1213 2009-07-16 Sebastian Pop <sebastian.pop@amd.com>
1215 * graphite-sese-to-poly.c (nb_pbbs_in_loops): New.
1216 (build_poly_scop): Return false when there are no pbbs within
1217 loops to avoid to pass to cloog scops with no loops.
1219 2009-07-16 Sebastian Pop <sebastian.pop@amd.com>
1221 * graphite-sese-to-poly.c (build_pbb_scattering_polyhedrons): Avoid
1222 useless test "i % 2".
1223 (build_pbb_scattering_polyhedrons): Fix formatting.
1224 (build_poly_dr): Same.
1225 * graphite.c (graphite_transform_loops): Restructure.
1227 2009-07-14 Razya Ladelsky <razya@il.ibm.com>
1229 * tree-ssa-loop-manip.c (rewrite_phi_with_iv): Remove
1230 reduction_list parameter.
1231 (rewrite_all_phi_nodes_with_iv): Same.
1232 (canonicalize_loop_ivs): Same.
1233 * tree-parloops.c (struct brli): Removed.
1234 (build_reduction_list_info): Removed.
1235 (build_new_reduction): New.
1236 (analyze_reduction_list): Removed.
1237 (gather_scalar_reductions): Find reductions instead of phi
1238 nodes that can't be canonicalized.
1239 (try_create_reduction_list): Remove reduction_list parameter.
1240 (gen_parallel_loop): Same.
1241 (parallelize_loops): Remove analyze_reductions variable,
1242 initialization and free.
1243 Change reduction_list htab initialization to reduction_info
1244 elements instead of ssa names.
1245 Call try_create_reduction_list and gen_parallel_loop without
1246 analyzed_reduction argument.
1247 * graphite-clast-to-gimple (graphite_loop_normal_form): Call
1248 canonicalize_loop_ivs with one less argument.
1249 * tree-flow.h (canonicalize_loop_ivs): Remove one argument.
1251 2009-07-14 Konrad Trifunovic <konrad.trifunovic@gmail.com>
1253 * graphite-dependences.c (new_poly_dr_pair): New.
1254 (dependence_polyhedron): Renamed into dependence_polyhedron_1.
1255 (new_poly_dr_pair): New.
1256 (eq_poly_dr_pair_p): New.
1257 (hash_poly_dr_pair_p): New.
1258 * graphite-dependences.h (struct poly_dr_pair): New.
1259 (eq_poly_dr_pair_p): Declared.
1260 (hash_poly_dr_pair_p): Declared.
1261 * graphite-poly.c (new_scop): Initialize SCOP_ORIGINAL_PDR_PAIRS.
1262 (free_scop): Free SCOP_ORIGINAL_PDR_PAIRS.
1263 * graphite-poly.h (struct scop): Add original_pdr_pairs field.
1264 * Makefile.in (graphite-poly.o): Add dependence on
1265 graphite-dependences.h.
1267 2009-07-14 Sebastian Pop <sebastian.pop@amd.com>
1269 * graphite-scop-detection.c (graphite_can_represent_scev): Do not let
1270 polynomials of degree > 1 pass to Graphite.
1271 * tree-chrec.c (scev_is_linear_expression): Call
1272 evolution_function_is_affine_multivariate_p.
1273 * testsuite/gfortran.dg/graphite/id-10.f90: New.
1275 2009-07-14 Sebastian Pop <sebastian.pop@amd.com>
1277 * tree-scalar-evolution.c (compute_overall_effect_of_inner_loop):
1278 Instantiate scevs varying in outer loops.
1279 * testsuite/gfortran.dg/graphite/id-9.f: Correct testcase.
1281 2009-07-14 Sebastian Pop <sebastian.pop@amd.com>
1283 * graphite-sese-to-poly.c (build_loop_iteration_domains): Do not insert
1284 redundant constraint.
1286 2009-07-14 Sebastian Pop <sebastian.pop@amd.com>
1288 * testsuite/gcc.dg/graphite/graphite.exp: Fix comments.
1289 * testsuite/gfortran.dg/graphite/graphite.exp: Trigger actions
1290 based on the file names as in the C testsuite.
1291 * testsuite/gfortran.dg/graphite/block-1.f90: Fix patterns.
1292 * testsuite/gfortran.dg/graphite/block-2.f: Same.
1293 * testsuite/gfortran.dg/graphite/block-3.f90: Same.
1294 * testsuite/gfortran.dg/graphite/block-4.f90: Same.
1295 * testsuite/gfortran.dg/graphite/id-1.f90: Same.
1296 * testsuite/gfortran.dg/graphite/id-2.f90: Same.
1297 * testsuite/gfortran.dg/graphite/id-3.f90: Same.
1298 * testsuite/gfortran.dg/graphite/id-4.f90: Same.
1299 * testsuite/gfortran.dg/graphite/id-6.f: Same.
1300 * testsuite/gfortran.dg/graphite/id-9.f: Same.
1301 * testsuite/gfortran.dg/graphite/interchange-1.f: Same.
1302 * testsuite/gfortran.dg/graphite/interchange-2.f: Same.
1303 * testsuite/gfortran.dg/graphite/scop-1.f: Same.
1305 2009-07-14 Sebastian Pop <sebastian.pop@amd.com>
1307 * sese.c (expand_scalar_variables_call): New.
1308 (expand_scalar_variables_ssa_name): Handle calls in expander.
1310 2009-07-13 Sebastian Pop <sebastian.pop@amd.com>
1312 * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-6.c:
1313 Expect to see the pattern twice.
1314 * testsuite/gcc.dg/graphite/interchange-0.c: Un-XFAIL.
1315 * testsuite/gcc.dg/graphite/interchange-5.c: Same.
1316 * testsuite/gcc.dg/graphite/interchange-6.c: Same.
1318 2009-07-13 Sebastian Pop <sebastian.pop@amd.com>
1320 * testsuite/gcc.dg/graphite/id-10.c: New.
1321 * testsuite/gcc.dg/graphite/id-12.c: New.
1322 * testsuite/gfortran.dg/graphite/id-7.f: New.
1323 * testsuite/gfortran.dg/graphite/id-8.f: New.
1325 2009-07-13 Sebastian Pop <sebastian.pop@amd.com>
1327 * graphite-sese-to-poly.c (pdr_add_data_dimensions): Fix division by
1330 2009-07-13 Sebastian Pop <sebastian.pop@amd.com>
1332 * sese.c (rename_variables_in_stmt): Call fold_convert during renaming.
1334 2009-07-13 Sebastian Pop <sebastian.pop@amd.com>
1336 * sese.c (expand_scalar_variables_stmt): Avoid unnecessary expansion.
1338 2009-07-10 Sebastian Pop <sebastian.pop@amd.com>
1340 * graphite-sese-to-poly.c (pdr_add_memory_accesses): Fix order of
1341 building PDR subscripts.
1343 2009-07-10 Sebastian Pop <sebastian.pop@amd.com>
1345 * graphite-sese-to-poly.c (pdr_add_data_dimensions): Fix the
1346 computation of array sizes.
1348 2009-07-10 Sebastian Pop <sebastian.pop@amd.com>
1350 * graphite-sese-to-poly.c (add_param_constraints): Disabled.
1352 2009-07-10 Tobias Grosser <grosser@fim.uni-passau.de>
1354 * graphite-dependences.c (map_into_dep_poly, map_dr_into_dep_poly,
1355 build_pairwise_constraint, dr_equality_constraints,
1356 build_pairwise_scheduling_equality,
1357 build_pairwise_scheduling_inequality, lexicographically_gt_p,
1358 build_lexicographically_gt_constraint, dependence_polyhedron,
1359 graphite_legal_transform_dr, graphite_carried_dependence_level_k):
1360 Move from NNC_Polyhedron to C_Polyhedron.
1361 * graphite-interchange.c (compute_array_size_poly,
1362 gather_access_strides): Dito.
1363 * graphite-poly.c (apply_poly_transforms, new_poly_dr, free_poly_bb,
1364 free_scop, pbb_number_of_iterations): Dito.
1365 * graphite-poly.h (struct poly_dr, pdr_nb_subscripts, struct poly_bb,
1366 pbb_dim_iter_domain, struct scop): Dito.
1367 * graphite-ppl.c (new_Constraint_System_from_Cloog_Matrix,
1368 new_Cloog_Domain_from_ppl_Polyhedron,
1369 new_Cloog_Domain_from_ppl_Pointset_Powerset, ppl_set_coef_gmp,
1370 ppl_insert_dimensions_pointset, ppl_insert_dimensions_pointset,
1371 ppl_strip_loop, ppl_strip_loop, ppl_print_polyhedron_matrix,
1372 ppl_print_powerset_matrix, debug_ppl_polyhedron_matrix,
1373 debug_ppl_powerset_matrix, ppl_read_polyhedron_matrix): Dito.
1374 * graphite-ppl.h (ppl_Pointset_Powerset_C_Polyhedron_t,
1375 new_C_Polyhedron_from_Cloog_Matrix, ppl_print_powerset_matrix,
1376 debug_ppl_powerset_matrix, ppl_insert_dimensions_pointset): Dito.
1377 * graphite-sese-to-poly.c (build_pbb_scattering_polyhedrons,
1378 build_loop_iteration_domains, ppl_constraint_type_from_tree_code,
1379 add_condition_to_domain, add_condition_to_pbb, build_scop_context,
1380 build_scop_iteration_domain, build_poly_dr): Dito
1382 2009-07-09 Sebastian Pop <sebastian.pop@amd.com>
1384 * testsuite/gcc.dg/graphite/graphite.exp: Added a rule to execute
1386 * testsuite/gcc.dg/graphite/run-id-1.c: New.
1388 2009-07-09 Sebastian Pop <sebastian.pop@amd.com>
1390 * graphite-sese-to-poly.c (build_loop_iteration_domains): Add the
1391 positivity constraint on the symbolic number of iterations.
1393 2009-07-09 Sebastian Pop <sebastian.pop@amd.com>
1395 * graphite-sese-to-poly.c (build_loop_iteration_domains): Rewrite.
1397 2009-07-09 Sebastian Pop <sebastian.pop@amd.com>
1398 Tobias Grosser <grosser@fim.uni-passau.de>
1400 * graphite-clast-to-gimple.c (build_scop_context): Removed.
1401 (build_cloog_prog): Directly use SCOP_CONTEXT.
1402 * graphite-poly.c (new_scop): Initialize SCOP_CONTEXT.
1403 (free_scop): Free SCOP_CONTEXT.
1404 (print_scop_context): New.
1405 (print_scop): Call print_scop_context.
1406 (debug_scop_context): New.
1407 * graphite-poly.h (print_scop_context, debug_scop_context): Declared.
1408 (struct scop): Added field context.
1409 (SCOP_CONTEXT): New.
1410 * graphite-sese-to-poly.c (add_param_constraints): New.
1411 (build_scop_context): New.
1412 (build_poly_scop): Call build_scop_context.
1414 2009-07-09 Sebastian Pop <sebastian.pop@amd.com>
1416 * graphite-clast-to-gimple.c (gmp_cst_to_tree): Moved...
1417 * graphite-ppl.c (ppl_set_inhomogeneous_gmp, ppl_set_coef_gmp): New.
1418 (ppl_set_inhomogeneous, ppl_set_coef): Moved...
1419 * graphite-ppl.h: Include double-int.h and tree.h.
1420 (ppl_set_inhomogeneous_gmp, ppl_set_coef_gmp): Declared.
1421 (ppl_set_inhomogeneous, ppl_set_coef): ...here.
1422 (gmp_cst_to_tree): ...here. Reimplemented using mpz_get_double_int.
1423 (tree_int_to_gmp, ppl_set_inhomogeneous_tree, ppl_set_coef_tree): New.
1425 2009-07-09 Sebastian Pop <sebastian.pop@amd.com>
1427 * graphite-clast-to-gimple.c (clast_to_gcc_expression_red): Generate
1428 POINTER_PLUS_EXPR for pointer types.
1429 (clast_to_gcc_expression): Same.
1431 2009-07-09 Sebastian Pop <sebastian.pop@amd.com>
1433 * graphite-poly.c (print_scattering_function): Early return when
1434 PBB_TRANSFORMED_SCATTERING is not initialized.
1435 (print_pbb_domain): Early return when PBB_DOMAIN is not initialized.
1437 2009-07-08 Sebastian Pop <sebastian.pop@amd.com>
1439 * tree-parloops.c (analyze_reduction_list): Remove unused variable
1442 2009-07-08 Razya Ladelsky <razya@il.ibm.com>
1444 * tree-parloops.c (analyze_reduction_list): Change return
1446 (try_create_reduction_list): Move the call to
1447 analyze_reduction_list to the beginining.
1448 Call reduction_phi with analyzed_reductions as argument
1449 instead of reduction_list.
1451 2009-07-08 Tobias Grosser <grosser@fim.uni-passau.de>
1453 * Merge from mainline (r148296:149346)
1455 2009-07-07 Sebastian Pop <sebastian.pop@amd.com>
1457 * graphite-scop-detection.c (graphite_can_represent_init): New.
1458 (graphite_can_represent_scev): Call graphite_can_represent_init:
1459 check that the initial value does not contain multiplications of
1461 (stmt_has_simple_data_refs_p): New.
1462 (stmt_simple_for_scop_p): Call stmt_simple_for_scop_p.
1463 (is_simple_operand): Fix formatting.
1464 * graphite-sese-to-poly.c (try_generate_gimple_bb): Fix formatting.
1466 2009-07-07 Sebastian Pop <sebastian.pop@amd.com>
1468 * testsuite/gcc.dg/graphite/id-13.c: New.
1469 * graphite-sese-to-poly.c (graphite_stmt_p): Do not call
1470 analyze_scalar_evolution, use scalar_evolution_in_region.
1471 (scan_tree_for_params_right_scev): Add extra assert.
1472 (parameter_index_in_region_1): Split from parameter_index_in_region.
1473 (idx_record_params): Use scalar_evolution_in_region.
1474 (find_params_in_bb): Same.
1475 (find_scop_parameters): Same.
1476 (build_loop_iteration_domains): Same.
1477 (create_linear_expr_from_tree): Same.
1478 * sese.c (scalar_evolution_in_region): New.
1479 * sese.h (scalar_evolution_in_region): Declared.
1480 (defined_in_sese_p): New.
1481 * tree-scalar-evolution.c (compute_overall_effect_of_inner_loop): Not
1483 * tree-scalar-evolution.h (compute_overall_effect_of_inner_loop):
1486 2009-07-07 Sebastian Pop <sebastian.pop@amd.com>
1488 * Makefile.in: Replace dependences on tree-chrec.h with SCEV_H.
1489 TREE_DATA_REF_H also implies SCEV_H.
1491 2009-07-07 Sebastian Pop <sebastian.pop@amd.com>
1493 * graphite-poly.c (print_scop_params): New.
1494 (print_scop): Call print_scop_params.
1495 (debug_scop_params): New.
1496 * graphite-poly.h (print_scop_params, debug_scop_params): Declared.
1498 2009-07-07 Li Feng <nemokingdom@gmail.com>
1500 * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-4.c: New.
1501 * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-5.c: New.
1502 * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-6.c: New.
1503 * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-7.c: New.
1504 * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-8.c: New.
1505 * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-9.c: New.
1507 2009-07-07 Li Feng <nemokingdom@gmail.com>
1509 * graphite-clast-to-gimple.c (mark_loops_parallel): Dump information
1510 for dependency checking part.
1511 * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-1.c: Add
1512 tests for dependency checking.
1513 * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-2.c: Ditto.
1514 * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-3.c: Ditto.
1515 * testsuite/gcc.dg/graphite/graphite_autopar/graphite_autopar.exp: Add
1516 flag -fdump-tree-graphite-all for autopar testsuites.
1518 2009-07-06 Sebastian Pop <sebastian.pop@amd.com>
1520 * Makefile.in (tree-ssa-loop-manip.o): Depends on langhooks.h.
1521 * tree-parloops.c (rewrite_phi_with_iv, rewrite_all_phi_nodes_with_iv,
1522 canonicalize_loop_ivs): Moved...
1523 * tree-ssa-loop-manip.c: ... here. Include langhooks.h.
1525 2009-07-06 Sebastian Pop <sebastian.pop@amd.com>
1527 * tree-parloops.c (try_create_reduction_list): Pass an extra
1528 argument analyzed_reductions. Call analyze_reduction_list.
1529 (gen_parallel_loop): Do not call analyze_reduction_list.
1530 (parallelize_loops): Init and finalize analyzed_reductions.
1532 2009-07-06 Li Feng <nemokingdom@gmail.com>
1534 * testsuite/gcc.dg/graphite/graphite_autopar/graphite_autopar.exp:
1535 Added flag -fno-loop-strip-mine for autopar testcase.
1537 2009-07-04 Li Feng <nemokingdom@gmail.com>
1539 * graphite-dependences.c (graphite_carried_dependence_level_k): Use
1540 transformed scattering dimension instead of unmatch orignal when
1541 calling dependence_polyhedron.
1543 2009-06-30 Sebastian Pop <sebastian.pop@amd.com>
1545 * opts.c (decode_options): Enable flag_loop_strip_mine at -O2.
1547 2009-06-30 Sebastian Pop <sebastian.pop@amd.com>
1549 * graphite-poly.c (pbb_number_of_iterations): Check for returned
1550 value 1 from ppl_Pointset_Powerset_NNC_Polyhedron_maximize.
1552 2009-06-30 Sebastian Pop <sebastian.pop@amd.com>
1554 * graphite-blocking.c (pbb_strip_mine_profitable_p): New.
1555 (pbb_do_strip_mine): Call pbb_strip_mine_profitable_p.
1556 * graphite-poly.c (pbb_number_of_iterations): New.
1557 * graphite-poly.h (pbb_number_of_iterations): Declared.
1558 (pbb_iterator_dim, pbb_parameter_dim): New.
1560 2009-06-29 Sebastian Pop <sebastian.pop@amd.com>
1562 * graphite-clast-to-gimple.c (graphite_create_new_loop): Revert the
1563 last commit on type of lower and upper bound of loops.
1565 2009-06-29 Li Feng <nemokingdom@gmail.com>
1567 * Makefile.in (graphite-clast-to-gimple.o): Added dependence on
1568 graphite-dependences.h.
1569 * graphite-clast-to-gimple.c (new_bb_pbb_def): New.
1570 (mark_bb_with_pbb): New.
1571 (get_stmtfor_depth): New.
1572 (find_pbb_via_hash): New.
1573 (dependency_in_loop_p): New.
1574 (mark_loops_parallel): New.
1575 (free_aux_in_new_loops): New.
1576 (translate_clast): Add parameter BB_PBB_MAPPING. Mark newly created
1577 bb with it's relevant pbb. Mark newly created loops. Remove mark
1578 innermost loop parallel without checking.
1579 (gloog): Add parameter BB_PBB_MAPPING.
1580 * graphite-clast-to-gimple.h (struct bb_pbb_def): New.
1581 (gloog): Change declaration.
1582 (mark_loop_parallel): Make extern.
1583 (free_aux_in_new_loops): Declare.
1584 (bb_pbb_map_hash): New.
1585 (eq_bb_pbb_map): New.
1586 * graphite.c (graphite_transform_loops): Added BB_PBB_MAPPING. Trigger
1587 auto parallelization when flag_graphite_force_parallel is set.
1588 (graphite_finalize): Added free_aux_in_new_loops.
1589 * tree-parloops.c (parallelize_loops): Only generate parallel code for
1590 the innermost loop that marked parallel. Use
1591 flag_graphite_force_parallel instead of loop->can_be_parallel.
1592 (loop_parallel_p): Move inner most checking out of function.
1594 2009-06-26 Sebastian Pop <sebastian.pop@amd.com>
1596 * graphite-clast-to-gimple.c (graphite_create_new_loop): Make the
1597 type of lower and upper bound of loops signed long int.
1599 2009-06-26 Sebastian Pop <sebastian.pop@amd.com>
1601 * cfgloopmanip.c (create_empty_loop_on_edge): Gimplify the loop exit
1602 expression outside the loop.
1604 2009-06-26 Sebastian Pop <sebastian.pop@amd.com>
1606 * gcc.dg/graphite/interchange-8.c: New.
1608 2009-06-26 Sebastian Pop <sebastian.pop@amd.com>
1610 * gcc.dg/graphite/interchange-0.c: XFailed.
1611 * gcc.dg/graphite/interchange-5.c: XFailed.
1612 * gcc.dg/graphite/interchange-6.c: XFailed.
1614 2009-06-26 Sebastian Pop <sebastian.pop@amd.com>
1616 * graphite-interchange.c (compute_array_size_poly): The end of the
1617 recursion should return 1.
1619 2009-06-26 Sebastian Pop <sebastian.pop@amd.com>
1621 * graphite-interchange.c (compute_array_size_cstr): Allow the
1622 subscript multiplier to be -1.
1623 (compute_array_size): Use PDR_DATA_CONTAINER and not PDR_ACCESSES.
1624 * graphite-poly.c (new_poly_dr): Takes an extra argument for the
1625 data_container. Initializes PDR_DATA_CONTAINER.
1626 (print_pdr_access_layout): New.
1627 (print_pdr): Call print_pdr_access_layout. Print PDR_DATA_CONTAINER.
1628 * graphite-poly.h (struct poly_dr): Adjust comment. Add a new field
1630 (PDR_DATA_CONTAINER): New.
1631 (new_poly_dr): Update declaration.
1632 * graphite-sese-to-poly.c (pdr_add_data_dimensions): New.
1633 (build_poly_dr): Call pdr_add_data_dimensions.
1635 2009-06-26 Sebastian Pop <sebastian.pop@amd.com>
1637 * graphite-poly.h (struct poly_dr): Fix comment.
1638 * graphite-sese-to-poly.c (pdr_add_alias_set): New.
1639 (pdr_add_memory_accesses): New.
1640 (build_poly_dr): Call pdr_add_memory_accesses and pdr_add_alias_set.
1642 2009-06-26 Sebastian Pop <sebastian.pop@amd.com>
1644 * graphite-poly.c (print_pdrs, debug_pdrs): New.
1645 (print_pbb): Add call to print_pdrs.
1646 * graphite-poly.h (print_pdrs, debug_pdrs): Declared.
1648 2009-06-24 Konrad Trifunovic <konrad.trifunovic@gmail.com>
1649 Li Feng <nemokingdom@gmail.com>
1651 * graphite-dependences.c (graphite_carried_dependence_level_k): New.
1652 (dependency_between_pbbs_p): New.
1653 (lexicographically_gt_p): Assure !empty_p before polyhedron
1654 intersection assign.
1655 (build_lexicographically_gt_constraint): Correct lexicographically
1657 * graphite-dependences.h: New.
1658 * Makefile.in (graphite-dependences.o): Add graphite-dependences.h.
1660 2009-06-24 Sebastian Pop <sebastian.pop@amd.com>
1662 * graphite-clast-to-gimple.c (print_clast_stmt): New.
1663 (gloog): Print to dump_file the generated clast.
1664 * graphite-clast-to-gimple.h (print_clast_stmt): Declared.
1665 * graphite-interchange.c (pbb_do_interchange): Fix dump formatting.
1667 2009-06-24 Sebastian Pop <sebastian.pop@amd.com>
1669 * graphite-poly.c (extend_scattering): Increment
1670 PBB_NB_LOCAL_VARIABLES by the number of added dimensions.
1672 2009-06-24 Sebastian Pop <sebastian.pop@amd.com>
1674 * graphite-interchange.c (compute_array_size_poly): Added exit of
1675 recursion condition. Continue iterating even after the first equality.
1676 (compute_array_size): Same.
1678 2009-06-24 Li Feng <nemokingdom@gmail.com>
1680 * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-1.c: Update
1681 -fdump-tree-final_cleanup to -fdump-tree-optimized.
1682 * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-2.c: Ditto.
1683 * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-3.c: Ditto.
1684 * testsuite/gcc.dg/graphite/graphite_autopar/graphite_autopar.exp: Ditto.
1686 2009-06-23 Sebastian Pop <sebastian.pop@amd.com>
1688 * sese.c (expand_scalar_variables_stmt): Expand scalar variables
1689 only when the use verifies is_gimple_reg.
1691 2009-06-23 Sebastian Pop <sebastian.pop@amd.com>
1693 * graphite-clast-to-gimple.c (build_cloog_prog): Fix memory corruption.
1694 Allocate scaldims after call to unify_scattering_dimensions.
1696 2009-06-23 Sebastian Pop <sebastian.pop@amd.com>
1698 * graphite-clast-to-gimple.c (translate_clast): Fix memory leak.
1700 2009-06-23 Sebastian Pop <sebastian.pop@amd.com>
1701 Albert Cohen <albert.cohen@inria.fr>
1703 * graphite-blocking.c (pbb_strip_mine_loop_depth): Do not use local
1704 variables for the strip mining.
1706 2009-06-23 Sebastian Pop <sebastian.pop@amd.com>
1707 Pranav Garg <pranav.garg2107@gmail.com>
1709 * Makefile.in (OBJS-common): Added graphite-blocking.o.
1710 (graphite-sese-to-poly.o): Moved down to be in lexicographical order.
1711 (graphite-blocking.o): New rule.
1712 (graphite-poly.o, graphite-ppl.o): Moved to be in lexicographical order.
1713 * graphite-blocking.c: New.
1714 * graphite-poly.c (apply_poly_transforms): Call scop_do_strip_mine for
1715 flag_loop_strip_mine.
1716 (psct_scattering_dim_for_loop_depth): New.
1717 * graphite-poly.h (scop_do_strip_mine): Declared.
1718 (psct_add_local_variable): Increment PBB_NB_LOCAL_VARIABLES.
1719 * tree-ssa-loop.c (gate_graphite_transforms): Do not fail when using
1720 flag_loop_strip_mine.
1722 2009-06-23 Sebastian Pop <sebastian.pop@amd.com>
1724 * graphite-poly.c (extend_scattering): Avoid initializing and freeing
1725 a GMP value and a PPL coefficient at each iteration of a loop.
1727 2009-06-23 Sebastian Pop <sebastian.pop@amd.com>
1729 * graphite-dependences.c (dependence_polyhedron): Do not use
1730 pbb_nb_scattering_dims anymore. Use pbb_nb_scattering_orig and
1731 pbb_nb_scattering_transform.
1732 (graphite_legal_transform_dr): Same.
1733 * graphite-poly.c (extend_scattering): Same.
1734 (unify_scattering_dimensions): Same.
1735 (print_scattering_function): Same.
1736 (new_poly_bb): Initialize PBB_NB_SCATTERING_TRANSFORM and
1737 PBB_NB_LOCAL_VARIABLES.
1738 * graphite-poly.h (pbb_nb_scattering): Removed declaration.
1739 (struct poly_bb): Added nb_local_variables and nb_scattering_transform.
1740 (PBB_NB_LOCAL_VARIABLES, PBB_NB_SCATTERING_TRANSFORM): New.
1741 (pbb_nb_scattering_orig, pbb_nb_scattering_transform): New.
1742 (pbb_nb_scattering_dims, pbb_nb_scattering): Removed.
1743 (pbb_nb_scattering_transform): New.
1744 (pbb_nb_local_vars): Return PBB_NB_LOCAL_VARIABLES.
1745 (psco_scattering_dim): Add assert on parameters.
1746 (psct_scattering_dim): Same.
1747 (psct_scattering_dim_for_loop_depth): Declared.
1748 (psct_local_var_dim): New.
1749 (psco_iterator_dim, psco_parameter_dim): Add assert on parameters.
1750 (psct_iterator_dim, psct_parameter_dim): Same. To maintain the
1751 correct layout, call pbb_nb_local_vars.
1752 (psct_add_local_variable, psct_add_scattering_dimension): New.
1753 * graphite-sese-to-poly.c (build_pbb_scattering_polyhedrons):
1754 Initialize PBB_NB_SCATTERING_TRANSFORM.
1756 2009-06-23 Sebastian Pop <sebastian.pop@amd.com>
1758 * graphite-ppl.c (set_inhomogeneous): Renamed ppl_set_inhomogeneous.
1759 (set_coef): Renamed ppl_set_coef.
1760 * graphite-ppl.h (ppl_set_inhomogeneous, ppl_set_coef): Declared.
1762 2009-06-23 Sebastian Pop <sebastian.pop@amd.com>
1764 * graphite-dependences.c (build_pairwise_scheduling_inequality): Don't
1765 test a boolean against 1.
1766 * graphite-interchange.c (pbb_interchange_loop_depths): Do not build
1767 a new polyhedron for the PBB_TRANSFORMED_SCATTERING.
1768 (pbb_do_interchange): Returns true when a transform has been performed.
1769 (scop_do_interchange): Same.
1770 * graphite-poly.c (apply_poly_transforms): Use the return value of
1771 scop_do_interchange.
1772 * graphite-poly.h (scop_do_interchange): Update declaration.
1774 2009-06-23 Tobias Grosser <grosser@fim.uni-passau.de>
1776 * graphite-clast-to-gimple.c (gloog): Reset loop->aux right
1778 * sese.c (sese_reset_aux_in_loops): New.
1779 * sese.h (sese_reset_aux_in_loops): New.
1781 2009-06-19 Sebastian Pop <sebastian.pop@amd.com>
1783 * graphite-sese-to-poly.c (scan_tree_for_params_int): Pass in the
1784 multiplier and multiply the constant by the multiplier.
1785 (scan_tree_for_params): Bound the multiplier to its MULT_EXPR.
1786 (build_poly_dr): Do not use the multiplier to define the subscript.
1788 2009-06-19 Sebastian Pop <sebastian.pop@amd.com>
1790 * graphite-poly.c (new_poly_dr): Pass an extra argument for the
1791 compiler's data reference. Initialize PDR_CDR.
1792 (print_pdr): Call dump_data_reference.
1793 * graphite-poly.h (struct poly_dr): Rename black_box into pbb.
1794 Add compiler_dr field.
1795 (PDR_BB): Renamed PDR_PBB.
1797 * graphite-sese-to-poly.c (build_poly_dr): Pass to new_poly_dr
1798 GCC's data reference representation.
1799 * tree-data-ref.c (debug_data_references, debug_data_reference): New.
1800 * tree-data-ref.h (debug_data_references, debug_data_reference): Decl.
1802 2009-06-19 Sebastian Pop <sebastian.pop@amd.com>
1804 * graphite-poly.c (print_scattering_function): Also print the layout.
1805 * graphite-poly.h (pbb_nb_local_vars): New.
1807 2009-06-19 Sebastian Pop <sebastian.pop@amd.com>
1809 * graphite-poly.c (print_pbb_domain): Also print the layout names.
1811 2009-06-19 Sebastian Pop <sebastian.pop@amd.com>
1813 * graphite-poly.c (print_pdr, debug_pdr): New.
1814 * graphite-poly.h (print_pdr, debug_pdr): Declared.
1815 (PDR_BASE): Removed.
1817 2009-06-18 Sebastian Pop <sebastian.pop@amd.com>
1819 * gcc/testsuite/gcc.dg/graphite/interchange-{1..7}.c: New avatars of
1822 2009-06-18 Sebastian Pop <sebastian.pop@amd.com>
1824 * graphite-interchange.c (compute_subscript): Allow also -1 in the
1825 subscript identification column.
1826 (pbb_do_interchange): Print to dump_file that some loops "will be
1827 interchanged". Rely on that chain of characters in the testcases.
1828 * gcc.dg/graphite/interchange-0.c: New.
1829 * gcc.dg/graphite/graphite.exp: Iterate over the testsuite
1830 interchange-*.c files and compile them with -floop-interchange.
1832 2009-06-18 Pranav Garg <pranav.garg2107@gmail.com>
1834 * graphite-interchange.c (interchange_profitable_p): Renamed
1835 pbb_interchange_profitable_p.
1837 2009-06-18 Sebastian Pop <sebastian.pop@amd.com>
1838 Harsha Jagasia <harsha.jagasia@amd.com>
1839 Pranav Garg <pranav.garg2107@gmail.com>
1841 * graphite-interchange.c (interchange_profitable_p): Make static.
1842 (pbb_interchange_loop_depths, pbb_do_interchange,
1843 scop_do_interchange): New.
1844 * graphite-poly.c (apply_poly_transforms): Call scop_do_interchange
1845 for flag_loop_interchange.
1846 * graphite-poly.h (scop_do_interchange): Declared.
1847 * tree-ssa-loop.c (gate_graphite_transforms): Do not fail when
1848 flag_loop_interchange is used.
1850 2009-06-18 Sebastian Pop <sebastian.pop@amd.com>
1852 * graphite-dependences.c (dependence_polyhedron): Update use of
1853 pbb_nb_scattering_dims.
1854 * graphite-poly.h (pbb_nb_scattering_dims): Do not pass SCOP.
1855 (pbb_nb_scattering): Update use of pbb_nb_scattering_dims.
1856 (psco_scattering_dim, psct_scattering_dim, psco_iterator_dim,
1857 psct_iterator_dim, psco_parameter_dim, psct_parameter_dim): New.
1859 2009-06-16 Sebastian Pop <sebastian.pop@amd.com>
1861 * graphite.c: Cleanup foo.
1863 2009-06-16 Sebastian Pop <sebastian.pop@amd.com>
1865 * Merge from mainline (r143684:148293).
1866 * Disabled libpcp until it gets fixed.
1868 2009-06-05 Sebastian Pop <sebastian.pop@amd.com>
1869 Harsha Jagasia <harsha.jagasia@amd.com>
1871 * graphite-interchange.c: New.
1872 * Makefile.in (graphite-interchange.o): New.
1873 * graphite-poly.h (interchange_profitable_p): Declared.
1874 * graphite-ppl.h (value_max): New.
1876 2009-06-04 Sebastian Pop <sebastian.pop@amd.com>
1878 * graphite-dependences.c (dependence_polyhedron): Use pdr_dim.
1879 * graphite-poly.h: Fix some comments.
1883 2009-06-04 Sebastian Pop <sebastian.pop@amd.com>
1886 (pdr_accessp_nb_subscripts): Renamed pdr_nb_subscripts.
1887 (pdr_accessp_nb_iterators): Renamed pdr_dim_iter_domain.
1888 (pdr_accessp_nb_params): Renamed pdr_nb_params.
1889 (pdr_accessp_alias_set_dim): Renamed pdr_alias_set_dim.
1890 (pdr_accessp_subscript_dim): Renamed pdr_subscript_dim.
1891 (pdr_accessp_iterator_dim): Renamed pdr_iterator_dim.
1892 (pdr_accessp_param_dim): Renamed pdr_parameter_dim.
1893 (pbb_nb_loops): Renamed pbb_dim_iter_domain.
1894 * graphite-clast-to-gimple.c: Same.
1895 * graphite-dependences.c: Same.
1896 * graphite-poly.c: Same.
1897 * graphite-sese-to-poly.c: Same.
1899 2009-06-03 Sebastian Pop <sebastian.pop@amd.com>
1901 * graphite-clast-to-gimple.c (build_iv_mapping): Insert full
1902 expressions for an IV rename, as returned by clast_to_gcc_expression.
1903 (copy_renames): Rename new_name to expr.
1904 * sese.c (debug_rename_elt): Same.
1907 (sese_adjust_liveout_phis): Call force_gimple_operand before using
1908 the information from the rename map.
1909 (rename_variables_in_stmt): Same.
1910 (add_loop_exit_phis): Rename new_name to expr.
1911 (insert_loop_close_phis): Same.
1912 (add_guard_exit_phis): Same. Call force_gimple_operand.
1913 * sese.h (struct rename_map_elt): Rename new_name to expr.
1914 (new_rename_map_elt): Same.
1916 2009-06-03 Sebastian Pop <sebastian.pop@amd.com>
1918 * graphite-clast-to-gimple.c (build_iv_mapping): Use set_rename.
1919 * sese.c (set_rename): Make it extern.
1920 * sese.h (set_rename): Declared.
1922 2009-06-03 Sebastian Pop <sebastian.pop@amd.com>
1924 * graphite-poly.c (extend_scattering): Free values.
1925 * graphite-ppl.c (new_Cloog_Domain_from_ppl_Pointset_Powerset):
1927 (ppl_print_powerset_matrix): Same.
1928 * graphite-scop-detection.c (free_scops_1): New.
1929 (limit_scops): Call free_scops_1.
1930 * graphite-sese-to-poly.c (build_scop_bbs_1): Free dom.
1931 (build_poly_dr): Free PPL coefficients.
1932 * tree-parloops.c (rewrite_all_phi_nodes_with_iv): Free bbs.
1934 2009-06-02 Sebastian Pop <sebastian.pop@amd.com>
1936 * graphite-dependences.c: New.
1937 * graphite-data-ref.c: Removed.
1938 * graphite-data-ref.h: Removed.
1939 * Makefile.in (graphite-data-ref.o): Removed.
1940 (graphite-dependences.o): Added.
1941 * graphite-clast-to-gimple.c: Remove dependence on graphite-data-ref.h.
1942 * graphite-poly.c: Same.
1943 Move the data dependence testing to graphite-dependences.c.
1945 2009-05-19 Tobias Grosser <grosser@fim.uni-passau.de>
1947 * graphite-scop-detection.c (graphite_can_represent_loop): Renamed
1948 from graphite_cannot_represent_loop. Code refactored.
1949 (scopdet_basic_block_info): Call graphite_can_represent_loop.
1951 2009-05-17 Li Feng <nemokingdom@gmail.com>
1953 * testsuite/gcc.dg/graphite/graphite_autopar/graphite_autopar.exp:
1954 Cover all the testcases (not only the filtered ones).
1956 2009-05-17 Tobias Grosser <grosser@fim.uni-passau.de>
1958 * graphite-scop-detection.c (stmt_simple_for_scop_p): Remove
1959 unnecessary check. Update comments. Move check for REAL_TYPE here.
1960 (harmful_stmt_in_bb): Remove checks for conditions. This is already
1961 done in (stmt_simple_for_scop_p).
1963 2009-05-14 Tobias Grosser <grosser@fim.uni-passau.de>
1965 * graphite.c (print_global_statistics): New.
1966 (print_graphite_scop_statistic): New.
1967 (print_graphite_statistics): New.
1968 (graphite_initialize, graphite_transform_loops): Print statistics.
1969 * graphite-scop-detection (build_scops): Print statistics.
1970 (print_graphite_scop_statistics): New.
1971 (print_graphite_statistics): New.
1973 2009-05-13 Sebastian Pop <sebastian.pop@amd.com>
1975 * graphite-clast-to-gimple.c (struct clast_name_index): Removed.
1976 (debug_clast_name_index): Removed.
1977 (debug_clast_name_indexes_1): Removed.
1978 (debug_clast_name_indexes): Removed.
1979 (clast_name_index_elt_info): Removed.
1980 (eq_clast_name_indexes): Removed.
1981 (clast_name_to_index): Removed.
1982 (new_clast_name_index): Removed.
1983 (save_clast_name_index): Removed.
1984 (save_var_name): Moved...
1985 (init_sese_params_index): Removed.
1986 (clast_name_to_gcc): Remove use of name_tree.
1987 (initialize_cloog_names): Same.
1988 (gloog): Do not call init_sese_params_index.
1989 * graphite-sese-to-poly.c (save_var_name): ...here.
1990 (parameter_index_in_region): New.
1991 * sese.c (new_sese): Initialize SESE_PARAMS_NAMES.
1992 (parameter_index_in_region): Removed.
1993 (is_parameter): Remove use of name_tree.
1994 * sese.h (struct name_tree): Removed.
1995 (struct sese): Remove use of name_tree. New field params_names.
1996 (SESE_PARAMS_NAMES): New.
1997 (SESE_PARAMS): Remove duplicate.
1998 (parameter_index_in_region): Removed.
1999 (sese_nb_params): Remove use of name_tree.
2000 (struct clast_name_index): New.
2001 (new_clast_name_index): New.
2002 (clast_name_to_index): New.
2003 (save_clast_name_index): New.
2004 (debug_clast_name_index): New.
2005 (debug_clast_name_indexes_1): New.
2006 (debug_clast_name_indexes): New.
2007 (clast_name_index_elt_info): New.
2008 (eq_clast_name_indexes): New.
2010 2009-05-13 Sebastian Pop <sebastian.pop@amd.com>
2012 * graphite-clast-to-gimple.c (compute_cloog_iv_types_1): Call
2013 pbb_to_depth_to_oldiv. Remove call to oldiv_for_loop.
2014 (graphite_loop_normal_form): Do not pass region. Do not
2015 initialize SESE_OLDIVS.
2016 (build_graphite_loop_normal_form): Update call to
2017 graphite_loop_normal_form.
2018 * sese.c (debug_oldivs): Removed.
2019 (new_sese): Do not initialize SESE_OLDIVS.
2020 (free_sese): Do not free SESE_OLDIVS.
2021 (oldiv_for_loop): Removed.
2022 * sese.h (struct sese): Remove old_ivs.
2023 (SESE_OLDIVS): Removed.
2024 (oldiv_for_loop): Removed.
2026 2009-05-13 Sebastian Pop <sebastian.pop@amd.com>
2028 * graphite-clast-to-gimple.c (clast_name_to_gcc): Pass newivs,
2029 remove ivstack. Remove call to loop_iv_stack_get_iv_from_name,
2030 replaced by a call to newivs_to_depth_to_newiv.
2031 (clast_to_gcc_expression): Pass newivs, remove ivstack.
2032 (clast_to_gcc_expression_red): Same.
2033 (gcc_type_for_clast_expr): Same.
2034 (gcc_type_for_clast_eq): Same.
2035 (graphite_translate_clast_equation): Same.
2036 (graphite_create_guard_cond_expr): Same.
2037 (graphite_create_new_guard): Same.
2038 (graphite_create_new_loop): Same.
2039 (build_iv_mapping): Same.
2040 (translate_clast): Same.
2042 (loop_iv_stack_patch_for_consts): Removed. *
2043 sese.c (iv_stack_entry_is_constant): Removed.
2044 (iv_stack_entry_is_iv): Removed.
2045 (loop_iv_stack_push_iv): Removed.
2046 (loop_iv_stack_insert_constant): Removed.
2047 (loop_iv_stack_pop): Removed.
2048 (loop_iv_stack_get_iv): Removed.
2049 (loop_iv_stack_get_iv_from_name): Removed.
2050 (debug_loop_iv_stack): Removed.
2051 (free_loop_iv_stack): Removed.
2052 (loop_iv_stack_remove_constants): Removed. *
2053 sese.h (iv_stack_entry_kind): Removed.
2054 (iv_stack_entry_data_union): Removed.
2055 (iv_stack_entry_struct): Removed.
2056 (iv_stack_entry_p): Removed.
2057 (debug_oldivs, debug_loop_iv_stack, loop_iv_stack_insert_constant,
2058 loop_iv_stack_get_iv_from_name, loop_iv_stack_push_iv,
2059 loop_iv_stack_get_iv, loop_iv_stack_remove_constants,
2060 loop_iv_stack_pop, free_loop_iv_stack): Removed.
2061 (gbb_loop_at_index): Fix indenting.
2062 (gbb_loop_index): Removed.
2064 2009-05-13 Sebastian Pop <sebastian.pop@amd.com>
2066 * graphite-clast-to-gimple.c (clast_name_to_gcc): Do not use strcmp.
2067 Call clast_name_to_index.
2069 2009-05-13 Sebastian Pop <sebastian.pop@amd.com>
2071 * graphite-clast-to-gimple.c (clast_name_to_gcc): Pass region,
2072 do not pass params. Get params from SESE_PARAMS.
2073 (clast_to_gcc_expression): Same.
2074 (clast_to_gcc_expression_red): Same.
2075 (gcc_type_for_clast_eq): Same.
2076 (graphite_translate_clast_equation): Same.
2077 (graphite_create_new_loop): Same.
2078 * sese.c (rename_variables_in_stmt): Fix comment.
2080 2009-05-13 Sebastian Pop <sebastian.pop@amd.com>
2082 * graphite-clast-to-gimple.c (graphite_create_new_loop): Pass
2084 Call save_clast_name_index.
2085 (translate_clast): Pass newivs_index.
2086 (gloog): Create and free newivs_index.
2088 2009-05-13 Sebastian Pop <sebastian.pop@amd.com>
2090 * graphite-clast-to-gimple.c (clast_name_index): New structure.
2091 (clast_name_index_p): New type.
2092 (debug_clast_name_index): New.
2093 (debug_clast_name_indexes_1): New.
2094 (debug_clast_name_indexes): New.
2095 (clast_name_index_elt_info): New.
2096 (eq_clast_name_indexes): New.
2097 (clast_name_to_index): New.
2098 (new_clast_name_index): New.
2099 (save_clast_name_index): New.
2100 (init_sese_params_index): New.
2101 (gloog): Call init_sese_params_index.
2102 * graphite-clast-to-gimple.h (debug_clast_name_indexes): Declared.
2103 * sese.c (new_sese): Initialize SESE_PARAMS_INDEX.
2104 (free_sese): Free SESE_PARAMS_INDEX.
2105 * sese.h (struct sese): Add params_index.
2106 (SESE_PARAMS_INDEX): New.
2108 2009-05-13 Sebastian Pop <sebastian.pop@amd.com>
2110 * graphite-clast-to-gimple.c (newivs_to_depth_to_newiv): New.
2111 (graphite_create_new_loop): Pass the newivs vector. Push the
2112 newly created IV to newivs.
2113 (translate_clast): Pass the newivs vector.
2114 (gloog): Create and destroy the newivs vector.
2116 2009-05-13 Sebastian Pop <sebastian.pop@amd.com>
2118 * graphite-clast-to-gimple.c (pbb_to_depth_to_oldiv): New.
2119 (graphite_loop_normal_form): Initialize loop->aux with the unique
2120 IV that has been created.
2122 2009-05-13 Tobias Grosser <grosser@fim.uni-passau.de>
2124 * tree-chrec.c (evolution_function_right_is_integer_cst): Allow
2125 scev with parameters in the base part. They where forbidden
2128 2009-05-11 Li Feng <nemokingdom@gmail.com>
2130 * testsuite/gcc.dg/graphite/graphite.exp: Set different default
2131 compile options by file names.
2132 * testsuite/gcc.dg/graphite/block{0-6}.c: Remove dg-option line.
2133 * testsuite/gcc.dg/graphite/id-{1-9}.c: Ditto.
2134 * testsuite/gcc.dg/graphite/scop-{0-20}.c: Ditto.
2135 * testsuite/gcc.dg/graphite/scop-matmult.c: Ditto.
2137 2009-05-08 Li Feng <nemokingdom@gmail.com>
2139 * testsuite/gcc.dg/graphite/graphite_autopar/graphite_autopar.exp: New.
2140 * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-1.c: New.
2141 * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-2.c: New.
2142 * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-3.c: New.
2144 2009-05-07 Tobias Grosser <grosser@fim.uni-passau.de>
2146 * graphite-scop-detection (build_scops_1): Fix little bug introduced
2149 2009-05-07 Tobias Grosser <grosser@fim.uni-passau.de>
2151 * graphite-scop-detection.c (graphite_can_represent_scev): Only
2152 allow integer constant strides.
2153 (graphite_can_represent_expr): Depend on outermost_loop.
2154 (stmt_simple_memref_p, graphite_cannot_represent_loop,
2155 harmful_stmt_in_bb, is_simple_operand, stmt_simple_for_scop_p,
2156 build_scops_1): Same.
2157 (scopdet_basic_block_info): Same and insert layered SCoP
2159 (try_generate_gimple_bb): Cleanup.
2160 (build_scops): Enable data references.
2162 * testsuite/gcc.dg/graphite/id-5.c: New.
2163 * testsuite/gcc.dg/graphite/id-9.c: New.
2164 * tree-chrec.c (evolution_function_right_is_integer_cst): New.
2165 * tree-chrec.h (evolution_function_right_is_integer_cst): New.
2167 2009-05-06 Tobias Grosser <grosser@fim.uni-passau.de>
2169 * sese.c (expand_scalar_variables_ssa_name): Only build expressions,
2170 that we have not yet built for this SCoP.
2172 2009-05-06 Tobias Grosser <grosser@fim.uni-passau.de>
2174 * sese.c (expand_scalar_variables_expr): Fix expand_scalar_variables
2175 for complex numbers.
2177 2009-05-06 Tobias Grosser <grosser@fim.uni-passau.de>
2179 * graphite-ppl.c: Fix build if cloog is not available.
2181 2009-05-04 Li Feng <nemokingdom@gmail.com>
2183 * tree-parloops.c (loop_parallel_p): Remove construction of
2184 NITER and REDUCTION_LIST.
2185 (try_get_loop_niter): New.
2186 (try_create_reduction_list): New.
2187 (parallelize_loops): Bypass the failed checkings in autopar
2188 when can_be_parallel in loop structure is set to true.
2190 2009-05-01 Tobias Grosser <grosser@fim.uni-passau.de>
2192 * testsuite/gcc.dg/graphite/id-6.c: Update testcase.
2193 * testsuite/gcc.dg/graphite/scop-3.c: Dito.
2195 2009-05-01 Tobias Grosser <grosser@fim.uni-passau.de>
2197 * graphite-scop-detection.c (stmt_simple_for_scop_p):
2198 Enable EQ_EXPR and NE_EXPR again.
2200 2009-04-30 Tobias Grosser <grosser@fim.uni-passau.de>
2202 * graphite-scop-detection.c (graphite_can_represent_scev):
2203 Add check if scev is affine multivariate.
2204 (harmful_stmt_in_bb): Check if we can represent the conditions.
2205 (scopdet_basic_block_info (basic_block bb, VEC): Pass the loop to
2207 * testsuite/gcc.dg/graphite/id-7.c: New.
2209 2009-04-30 Tobias Grosser <grosser@fim.uni-passau.de>
2211 * graphite-sese-to-poly.c (bb_contains_non_iv_scalar_phi_nodes):
2212 Check all bbs in region, not only the bbs that are represented in
2214 (build_poly_scop): Add newline.
2215 * testsuite/gcc.dg/graphite/id-8.c: New.
2217 2009-04-30 Li Feng <nemokingdom@gmail.com>
2219 * cfgloop.c (alloc_loop): Initialize can_be_parallel to false
2220 when loop initialize.
2221 * cfgloop.h (struct loop): Introduce flag can_be_parallel.
2222 * common.opt: Declare flag_graphite_force_parallel.
2223 * graphite-clast-to-gimple.c (translate_clast): Mark the innermost
2225 * graphite-poly.c (apply_poly_transforms): Introduce
2226 flag_graphite_force_parallel.
2227 * tree-ssa-loop.c (gate_graphite_transforms): ditto.
2228 * toplev.c (process_options): ditto and replace a not correctly
2231 2009-04-30 Li Feng <nemokingdom@gmail.com>
2233 * graphite-clast-to-gimple.c (loop_iv_stack_patch_for_consts):
2234 Change the call of gbb_loop_at_index and/or gbb_loop_index due
2235 to the redefinition.
2236 (compute_cloog_iv_types_1): ditto.
2237 (build_iv_mapping): ditto.
2238 * graphite-sese-to-poly.c (new_gimple_bb): Remove GBB_LOOPS related
2240 (free_gimple_bb): Removed GBB_LOOPS related free part.
2241 (build_bb_loops): Removed.
2242 * sese.h (struct gimple_bb): Removed loops.
2243 (GBB_LOOPS): Removed.
2244 (gbb_loop_at_index): Instead of using GBB_LOOPS, we use sese instead.
2245 (gbb_loop_index): ditto.
2247 2009-04-24 Tobias Grosser <grosser@fim.uni-passau.de>
2249 * graphite-scop-detection.c (graphite_can_represent_scev): Do not
2250 allow non constant strides.
2251 * testsuite/gcc.dg/graphite/scop-20.c: New.
2253 2009-04-24 Sebastian Pop <sebastian.pop@amd.com>
2255 * graphite-scop-detection.c (dot_all_scops): Fix system call
2256 return value warning.
2259 2009-04-24 Sebastian Pop <sebastian.pop@amd.com>
2261 * testsuite/gcc.dg/graphite/id-6.c: Fix pattern.
2262 * testsuite/gcc.dg/graphite/scop-3.c: Same.
2264 2009-04-24 Sebastian Pop <sebastian.pop@amd.com>
2266 * graphite-poly.c (map_into_dep_poly, map_dr_into_dep_poly,
2267 build_pairwise_constraint, dr_equality_constraints,
2268 build_pairwise_scheduling_equality,
2269 build_pairwise_scheduling_inequality, lexicographically_gt_p,
2270 build_lexicographically_gt_constraint, dependence_polyhedron,
2271 graphite_legal_transform_dr, graphite_legal_transform_bb,
2272 graphite_legal_transform): New.
2273 * graphite-poly.h (graphite_legal_transform): Declared.
2274 * graphite-sese-to-poly.c (build_poly_scop): Call to
2275 graphite_legal_transform is disabled for the moment.
2277 2009-04-24 Sebastian Pop <sebastian.pop@amd.com>
2279 * graphite-poly.h (pbb_nb_scattering_dims): New.
2280 (pbb_nb_scattering): Use it.
2282 2009-04-24 Sebastian Pop <sebastian.pop@amd.com>
2284 * graphite-ppl.c (ppl_insert_dimensions_pointset): Add
2285 Pointset_Powerset version of ppl_insert_dimensions.
2286 * graphite-ppl.h (ppl_insert_dimensions_pointset): Declared.
2288 2009-04-24 Sebastian Pop <sebastian.pop@amd.com>
2290 * graphite-ppl.c (ppl_insert_dimensions): Fix formatting.
2292 2009-04-24 Sebastian Pop <sebastian.pop@amd.com>
2294 * graphite-poly.h: Fix comment.
2296 2009-04-24 Sebastian Pop <sebastian.pop@amd.com>
2298 * graphite-sese-to-poly.c (build_poly_dr): Fix data ref multiplier.
2300 2009-04-24 Tobias Grosser <grosser@fim.uni-passau.de>
2302 * sese.c (expand_scalar_variables_stmt): Only iterate over the old
2305 2009-04-24 Tobias Grosser <grosser@fim.uni-passau.de>
2307 * graphite-sese-to-poly.c (var_used_in_not_loop_header_phi_node): New.
2308 (graphite_stmt_p): Represent bbs necessary to build the phi nodes of
2311 2009-04-20 Sebastian Pop <sebastian.pop@amd.com>
2313 * graphite-scop-detection.c (stmt_simple_for_scop_p): Do not
2314 handle EQ_EXPR and NE_EXPR.
2316 2009-04-17 Tobias Grosser <grosser@fim.uni-passau.de>
2318 * graphite-poly.h (poly_dr): Fix comment.
2320 2009-04-09 Sebastian Pop <sebastian.pop@amd.com>
2321 Tobias Grosser <grosser@fim.uni-passau.de>
2323 * graphite-poly.c (new_poly_bb): Do not initialize PBB_DOMAIN
2324 with a zero dimension polyhedron.
2325 (find_scop_parameters): Move the call to scop_set_nb_params here.
2326 (build_loop_iteration_domains): Store in loop->aux the iteration
2328 (build_scop_iteration_domain): Fix PBB_DOMAIN for bbs not surrounded
2329 by any loop in scop.
2330 (build_poly_scop): Do not call scop_set_nb_params.
2332 2009-04-09 Sebastian Pop <sebastian.pop@amd.com>
2333 Tobias Grosser <grosser@fim.uni-passau.de>
2335 * graphite-sese-to-poly.c (add_condition_to_pbb): Pass code to
2336 add_condition_to_domain not GT_EXPR.
2338 2009-04-09 Tobias Grosser <grosser@fim.uni-passau.de>
2340 * graphite-ppl.c (debug_ppl_powerset_matrix): New.
2341 * graphite-ppl.h (debug_ppl_powerset_matrix): New.
2342 * graphite-sese-to-poly.c (add_condition_to_pbb): Use
2343 upper_bound_assign to calculate unions.
2344 * testsuite/gcc.dg/graphite/id-6.c: New.
2346 2009-04-09 Tobias Grosser <grosser@fim.uni-passau.de>
2348 * graphite-scop-detection.c (canonicalize_loop_closed_ssa): Do not
2349 handle abnormal edges.
2351 2009-04-09 Tobias Grosser <grosser@fim.uni-passau.de>
2353 * graphite-poly.c (new_poly_dr, free_poly_dr): New.
2354 (free_poly_bb): Also free poly_drs.
2355 * graphite-poly.h (new_poly_dr, free_poly_dr): New.
2356 (poly_dr): Polyhedron to Pointset_Powerset.
2357 (pdr_accessp_nb_subscripts): Same.
2358 * graphite-sese-to-poly.c (build_poly_dr): Same. And actually build
2361 2009-04-08 Sebastian Pop <sebastian.pop@amd.com>
2363 * graphite-clast-to-gimple.c (initialize_cloog_names): Change cloog
2364 names into more meaningful names.
2366 2009-04-08 Sebastian Pop <sebastian.pop@amd.com>
2368 * testsuite/gfortran.dg/graphite/interchange-1.c: New.
2369 * testsuite/gfortran.dg/graphite/interchange-2.c: New.
2371 2009-04-08 Sebastian Pop <sebastian.pop@amd.com>
2373 * graphite-clast-to-gimple.c (graphite_loop_normal_form): Do not build
2375 * tree-parloops.c (rewrite_phi_with_iv): New.
2376 (rewrite_all_phi_nodes_with_iv): New.
2377 (canonicalize_loop_ivs): Call them.
2379 2009-04-08 Sebastian Pop <sebastian.pop@amd.com>
2381 * graphite-sese-to-poly.c (try_generate_gimple_bb): Use
2382 graphite_find_data_references_in_stmt.
2383 * tree-data-ref.c (graphite_find_data_references_in_stmt): New.
2384 * tree-data-ref.h (graphite_find_data_references_in_stmt): Declared.
2386 2009-04-08 Sebastian Pop <sebastian.pop@amd.com>
2388 * sese.c (add_loop_exit_phis): Don't fail on non SSA_NAME renames.
2390 2009-04-08 Sebastian Pop <sebastian.pop@amd.com>
2392 * graphite-sese-to-poly.c (build_scop_bbs_1): Use bb_in_sese_p
2393 instead of bb_in_region.
2394 (flag_bb_in_region): Same. Renamed flag_bb_in_sese.
2395 (build_sese_conditions): Use flag_bb_in_sese.
2396 * sese.c (register_bb_in_sese): Removed.
2397 (new_sese): Remove initialization of SESE_REGION_BBS.
2398 (free_sese): Do not free SESE_REGION_BBS.
2399 * sese.h (struct sese): Remove field region_basic_blocks.
2400 (SESE_REGION_BBS): Removed.
2401 (bb_in_sese_p): Implement in function of bb_in_region.
2403 2009-04-08 Sebastian Pop <sebastian.pop@amd.com>
2405 * graphite-scop-detection.c (limit_scops): Deal only with single exit
2408 2009-04-08 Tobias Grosser <grosser@fim.uni-passau.de>
2410 * graphite-scop-detection.c (stmt_simple_for_scop_p): Allow NE_EXPR
2412 * graphite-sese-to-poly.c (create_linear_expr_from_tree): New.
2413 (add_condition_to_domain): New.
2414 (add_condition_to_pbb): New.
2415 (add_conditions_to_domain): Cleanup and handle of NE_EXPR and EQ_EXPR.
2416 * testsuite/gcc.dg/graphite/scop-3.c: Update number of detected SCoPs.
2418 2009-04-08 Tobias Grosser <grosser@fim.uni-passau.de>
2420 * graphite-clast-to-gimple.c (build_cloog_prog): ppl_Polyhedron ->
2421 ppl_Pointset_Powerset.
2422 * graphite-poly.c (new_poly_bb, free_poly_bb): Same.
2423 * graphite-poly.h (poly_bb): poly_bb.domain Same.
2424 (pbb_nb_loops): Same.
2425 * graphite-sese-to-poly.c (build_loop_iteration_domains,
2426 add_conditions_to_domain): Same.
2427 * graphite-ppl.c (new_Cloog_Domain_from_ppl_Pointset_Powerset): New.
2428 (ppl_print_polyhedron_matrix): ppl_Polyhedron_t ->
2429 ppl_const_Polyhedron_t.
2430 (ppl_print_powerset_matrix): New.
2431 * graphite-ppl.h (new_Cloog_Domain_from_ppl_Pointset_Powerset,
2432 ppl_print_powerset_matrix): New.
2433 (ppl_print_polyhedron_matrix): Updated.
2435 2009-04-07 Sebastian Pop <sebastian.pop@amd.com>
2437 * tree-scalar-evolution.c (analyze_scalar_evolution_1): Fix comment.
2439 2009-04-07 Sebastian Pop <sebastian.pop@amd.com>
2441 * graphite-poly.c (extend_scattering): Fix indenting. Free cstr.
2442 (print_iteration_domains, debug_iteration_domain,
2443 debug_iteration_domains): New.
2444 * graphite-poly.h (print_iteration_domains, debug_iteration_domain,
2445 debug_iteration_domains): Declared.
2446 * graphite-sese-to-poly.c (build_pbb_scattering_polyhedrons): Fix
2449 2009-04-03 Tobias Grosser <grosser@fim.uni-passau.de>
2450 Sebastian Pop <sebastian.pop@amd.com>
2452 * graphite-poly.h (print_iteration_domain): New.
2453 * graphite-sese-to-poly.c (add_conditions_to_domain): Fixed bug.
2454 (build_sese_conditions_1, build_sese_conditions_after,
2455 build_sese_conditions_before): New.
2456 (build_sese_conditions): Rewritten.
2458 2009-04-03 Sebastian Pop <sebastian.pop@amd.com>
2459 Tobias Grosser <grosser@fim.uni-passau.de>
2461 Cleanup of code generation liveouts.
2462 * graphite-clast-to-gimple.c (translate_clast): Use a single
2463 rename_map instead of one per translated statement.
2464 Do not use SESE_LIVEOUT_RENAMES.
2465 (graphite_loop_normal_form): Do not use SESE_REDUCTION_LIST.
2466 (gloog): Do not use SESE_LIVEOUT_RENAMES.
2467 * graphite-scop-detection.c (harmful_stmt_in_bb): Return the close
2468 phi node of a reduction: when a loop contains a reduction used outside
2469 the loop, there should be a scalar close phi node on the exit block.
2470 * sese.c (new_sese): Do not initialize SESE_LIVEOUT,
2471 SESE_LIVEOUT_RENAMES, and SESE_REDUCTION_LIST.
2472 (free_sese): Do not free them.
2473 (sese_build_liveouts_use): Do not use them.
2474 (sese_build_liveouts_bb): Same.
2475 (sese_build_liveouts): Same.
2476 (sese_insert_phis_for_liveouts): Same.
2477 (sese_adjust_phis_for_liveouts): Same. Renamed sese_adjust_liveout_phis.
2478 (defined_in_loop_p): New.
2479 (alive_after_loop): New.
2480 (close_phi_not_yet_inserted_p): New.
2481 (struct alep, alep_p): New.
2482 (add_loop_exit_phis): Remove from the rename_map all the names defined
2483 in the code generated loop.
2484 (insert_loop_close_phis): Traverse the rename_map passed to it.
2485 Don't use SESE_LIVEOUT_RENAMES.
2486 (default_liveout_before_guard): Renamed default_before_guard.
2487 (insert_guard_phis): Do not use SESE_LIVEOUT_RENAMES.
2488 (graphite_copy_stmts_from_block): Do not directly call set_rename.
2489 (register_sese_liveout_renames): Removed.
2490 (copy_bb_and_scalar_dependences): Do not call it.
2491 * sese.h (struct sese): Removed fields: liveout, liveout_renames, and
2493 (SESE_LIVEOUT): Removed.
2494 (SESE_LIVEOUT_RENAMES): Removed.
2495 (SESE_REDUCTION_LIST): Removed.
2496 (sese_build_liveouts): Removed.
2497 (sese_adjust_phis_for_liveouts): Renamed sese_adjust_liveout_phis.
2498 (insert_loop_close_phis): Pass a htab_t instead of a sese.
2499 (insert_guard_phis): Same.
2500 (rename_map_elt): Declare a VEC of them.
2501 * tree-parloops.c (canonicalize_loop_ivs): reduction_list contains
2502 trees not pointers to trees.
2504 Rewrite in canonical close SSA form:
2505 * graphite-scop-detection.c (contains_only_close_phi_nodes): New.
2506 (limit_scops): Close the scop after the block containing the close phi
2508 (canonicalize_loop_closed_ssa): New.
2509 (canonicalize_loop_closed_ssa_form): New.
2510 (build_scops): Call canonicalize_loop_closed_ssa_form.
2512 * graphite-sese-to-poly.c: Fix typos.
2514 2009-04-03 Sebastian Pop <sebastian.pop@amd.com>
2516 * graphite-poly.c (print_scattering_function, print_pbb_domain):
2518 (dump_gbb_conditions, dump_gbb_cases, print_iteration_domain): New.
2519 (print_pbb): Add conditions.
2521 2009-04-01 Tobias Grosser <grosser@fim.uni-passau.de>
2522 Sebastian Pop <sebastian.pop@amd.com>
2524 * graphite-scop-detection.c (bb_in_sd_region): Use bb_in_region.
2525 * graphite-sese-to-poly.c (all_non_dominated_preds_marked_p): New.
2526 (build_scop_bbs_1): New.
2527 (build_scop_bbs): Rewrite.
2528 * sese.h (bb_in_region): New.
2530 2009-03-29 Tobias Grosser <grosser@fim.uni-passau.de>
2532 * graphite-poly.c (new_poly_bb, free_poly_bb): Initialize/free
2534 (print_scop): Style.
2535 * graphite-poly.h (poly_bb): Add drs vector.
2536 (PBB_DRS): Add accessor.
2537 * graphite-sese-to-poly.c (build_poly_dr): New.
2538 (build_pbb_drs, build_scop_drs): New.
2539 (build_poly_scop): call build_scop_drs (Disabled at the moment).
2541 2009-03-29 Tobias Grosser <grosser@fim.uni-passau.de>
2543 * tree-ssa-loop.c: Include forgotten toplev.h
2545 2009-03-29 Tobias Grosser <grosser@fim.uni-passau.de>
2547 * graphite-poly.c: (apply_poly_transforms): sorry -> gcc_unreachable.
2548 * testsuite/gcc.dg/graphite/pr37883.c: Remove -floop-*
2549 * testsuite/gcc.dg/graphite/pr37928.c: Same
2550 * testsuite/gcc.dg/graphite/pr38409.c: Same
2551 * testsuite/gcc.dg/graphite/pr38498.c: Same
2552 * testsuite/gcc.dg/graphite/pr38559.c: Same
2553 * testsuite/gcc.dg/graphite/pr39335.c: Same
2554 * testsuite/gcc.dg/graphite/pr39335_1.c: Same
2555 * testsuite/gfortran.dg/graphite/block-2.f: Same
2556 * tree-ssa-loop.c (gate_graphite_transforms): Always fail if called
2559 2009-03-28 Tobias Grosser <grosser@fim.uni-passau.de>
2561 * graphite-sese-to-poly.c (ref_nb_loops, build_access_matrix_with_af,
2562 build_access_matrix, build_scop_data_accesses): Remove access function
2563 building. (We get a new version soon).
2564 (build_bb_loops, scan_tree_for_params_right_scev): Update.
2565 * sese.h (nb_loops_around_loop_in_sese): Remove.
2566 (sese_loop_depth): Do not use SESE_LOOP_NEST any more.
2568 2009-03-27 Tobias Grosser <grosser@fim.uni-passau.de>
2569 Sebastian Pop <sebastian.pop@amd.com>
2571 * graphite-scop-detection.c (struct scopdet_info): Rename last
2573 (scopdet_basic_block_info, build_scops_1): Don't use
2574 CDI_POST_DOMINATORS. CDI_POST_DOMINATORS should never be used.
2576 2009-03-26 Tobias Grosser <grosser@fim.uni-passau.de>
2577 Sebastian Pop <sebastian.pop@amd.com>
2579 * graphite-clast-to-gimple.c (gloog): Call sese_build_liveouts.
2580 * sese.c (sese_build_liveouts_use): Renamed from
2581 sese_build_livein_liveouts_use. Remove liveins.
2582 (sese_build_liveouts_bb): Renamed from sese_build_livein_liveouts_bb.
2583 Call sese_build_liveouts_use.
2584 (sese_build_liveouts): Renamed from sese_build_livein_liveouts.
2585 Call sese_build_liveouts_bb.
2586 (new_sese, free_sese): Remove liveins.
2587 (sese_add_exit_phis_var): Deleted.
2588 (sese_insert_phis_for_liveouts): Call sese_add_exit_phis_edge
2590 (graphite_copy_stmts_from_block): Remove SESE_NUM_VER.
2592 * sese.h (sese): Remove num_ver and livein.
2593 (SESE_LIVEIN, SESE_LIVEIN_VER, SESE_NUM_VER): Removed.
2595 2009-03-25 Tobias Grosser <grosser@fim.uni-passau.de>
2597 * graphite-sese-to-poly.c (build_scop_scattering): Fix compile.
2599 2009-03-25 Tobias Grosser <grosser@fim.uni-passau.de>
2601 * graphite-sese-to-poly.c (compare_prefix_loops): Removed.
2602 (build_scop_scattering): Do not use compare_prefix_loops any more.
2603 (nb_common_loops): New.
2605 2009-03-24 Sebastian Pop <sebastian.pop@amd.com>
2607 * sese.c (get_new_name_from_old_name): Renamed get_rename.
2608 (register_old_and_new_names): Renamed set_rename.
2610 2009-03-24 Sebastian Pop <sebastian.pop@amd.com>
2612 * graphite-scop-detection.h (nb_reductions_in_loop): Revert removal
2613 of the decl from the previous commit.
2615 2009-03-24 Sebastian Pop <sebastian.pop@amd.com>
2617 * graphite-scop-detection.c (dot_scop): New.
2618 * graphite-scop-detection.h (dot_scop): Declared.
2620 2009-03-24 Sebastian Pop <sebastian.pop@amd.com>
2622 * graphite-sese-to-poly.c (compare_prefix_loops): Fix compare.
2624 2009-03-24 Sebastian Pop <sebastian.pop@amd.com>
2626 * cfgloopmanip.c (create_empty_loop_on_edge): Generate the loop exit
2627 condition at the end of the loop.
2628 * graphite.c (graphite_initialize, graphite_finalize): Print to
2629 dump_file the compiled function.
2630 * graphite-clast-to-gimple.c (graphite_create_new_loop): Update use
2631 of create_empty_loop_on_edge.
2632 (translate_clast): Update the code generation of loops for the new
2634 * cfgloop.h (create_empty_loop_on_edge): Update declaration.
2636 2009-03-24 Sebastian Pop <sebastian.pop@amd.com>
2638 Reverted the patch from 2009-03-19.
2640 2009-03-19 Tobias Grosser <grosser@fim.uni-passau.de>
2642 * graphite-poly.c (new_poly_bb, free_poly_bb): Initialize/free
2644 (print_scop): Style.
2645 * graphite-poly.h (poly_bb): Add drs vector.
2646 (PBB_DRS): Add accessor.
2647 * graphite-sese-to-poly.c (ref_nb_loops): Remove.
2648 (build_access_matrix_with_af, build_access_matrix,
2649 build_scop_data_accesses): Delete.
2650 (build_poly_dr): New.
2651 (build_pbb_drs, build_scop_drs): New.
2652 (build_poly_scop): call build_scop_drs.
2654 2009-03-13 Sebastian Pop <sebastian.pop@amd.com>
2656 * graphite-scop-detection.c (dot_all_scops_1): Close the table
2657 once per basic block.
2659 2009-03-13 Tobias Grosser <grosser@fim.uni-passau.de>
2661 * graphite-scop-detection.c (graphite_can_represent_scev): New.
2662 (graphite_can_represent_expr): Renamed from loop_affine_expr
2664 (stmt_simple_for_scop_p): Call graphite_can_represent_expr.
2665 (graphite_cannot_represent_loop): Add scop_entry to parameters.
2666 (scopdet_basic_block_info): Actually define entry_block.
2667 (stmt_simple_memref_p): Moved here from ...
2669 * tree-data-ref.c (stmt_simple_memref_p): here.
2670 * tree-data-ref.h (stmt_simple_memref_p): Removed.
2672 2009-03-13 Tobias Grosser <grosser@fim.uni-passau.de>
2674 * testsuite/gcc.dg/graphite/id-4.c: New.
2676 2009-03-12 Sebastian Pop <sebastian.pop@amd.com>
2678 * sese.c (expand_scalar_variables_expr): Handle tcc_comparison.
2679 (register_old_and_new_names): Update the content of the map.
2680 When there was already a rename_map_elt in the map at that
2682 (copy_bb_and_scalar_dependences): Do rename_variables after
2683 expand_scalar_variables.
2684 * graphite-clast-to-gimple.c (build_iv_mapping): Update the content
2685 of the map. When there was already a rename_map_elt in the
2686 map at that location, free it.
2687 (translate_clast): Pass the rename_map. Do not initialize and free
2688 a rename_map per stmt_user.
2689 (gloog): Initialize and free one rename_map and pass it to
2692 2009-03-12 Sebastian Pop <sebastian.pop@amd.com>
2694 * sese.c (expand_scalar_variables_stmt,
2695 expand_scalar_variables_ssa_name): Add a gimple_stmt_iterator
2697 (expand_scalar_variables_expr): Handle REALPART_EXPR and IMAGPART_EXPR.
2698 (expand_scalar_variables): Pass to expand_scalar_variables_stmt
2699 the gimple_stmt_iterator of the statement to be expanded.
2700 * graphite-scop-detection.c (is_simple_operand): Do handle
2703 2009-03-11 Tobias Grosser <grosser@fim.uni-passau.de>
2705 * graphite-scop-detection.c (is_simple_operand): Do not handle
2707 * testsuite/gcc.dg/graphite/id-2.c: New.
2709 * graphite-sese-to-poly.c (build_bb_loops,
2710 add_value_to_dim, scan_tree_for_params_right_scev,
2711 scan_tree_for_params_int, scan_tree_for_params, idx_record_params,
2712 find_params_in_bb, build_loop_iteration_domains,
2713 add_conditions_to_domain): Remove subtract.
2715 2009-03-11 Tobias Grosser <grosser@fim.uni-passau.de>
2717 * graphite-clast-to-gimple.c (loop_iv_stack_patch_for_consts,
2718 build_iv_mapping, compute_cloog_iv_types_1, build_cloog_prog):
2719 pbb_loop_at_index -> gbb_loop_at_index.
2720 * graphite-poly.c (new_poly_bb, new_scop): New accessors.
2721 (debug_loop_vec): Delete.
2722 * graphite-poly.h (poly_bb, scop): Change black_box and region to void
2723 pointer. Move LOOPS to gimple_bb_p and insert nb_params.
2724 (PBB_LOOPS): Removed.
2725 (PBB_BLACK_BOX): Insert cast.
2726 (pbb_set_black_box): New setter.
2727 (pbb_loop_at_index, pbb_loop_index): Removed.
2728 (scop_set_region, scop_set_nb_params): New.
2729 * graphite-sese-to-poly.c (new_gimple_bb, free_gimple_bb,
2730 build_scop_scattering, build_bb_loops): Add GBB_LOOPS.
2731 (build_poly_scop): Use scop_set_nb_params.
2732 * sese.h (gimple_bb): Add LOOPS.
2733 (GBB_LOOPS, gbb_loop_index, gbb_loop_at_index): New.
2735 2009-03-11 Tobias Grosser <grosser@fim.uni-passau.de>
2737 Revert previous commit.
2739 2009-03-11 Sebastian Pop <sebastian.pop@amd.com>
2741 * sese.c (expand_scalar_variables_expr): Handle tcc_comparison.
2742 (register_old_and_new_names): Update the content of the map.
2743 When there was already a rename_map_elt in the map at that
2745 (copy_bb_and_scalar_dependences): Do rename_variables after
2746 expand_scalar_variables.
2747 * graphite-clast-to-gimple.c (build_iv_mapping): 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 (translate_clast): Pass the rename_map. Do not initialize and free
2751 a rename_map per stmt_user.
2752 (gloog): Initialize and free one rename_map and pass it to
2755 2009-03-11 Tobias Grosser <grosser@fim.uni-passau.de>
2757 Remove forgotten line in revert.
2759 2009-03-11 Sebastian Pop <sebastian.pop@amd.com>
2761 Revert previous commit.
2763 2009-03-10 Sebastian Pop <sebastian.pop@amd.com>
2765 * sese.c (register_old_and_new_names): Update the content
2766 of the map. When there was already a rename_map_elt in the
2767 map at that location, free it.
2768 (copy_bb_and_scalar_dependences): Do rename_variables after
2769 expand_scalar_variables.
2770 * graphite-clast-to-gimple.c (build_iv_mapping): Update the content
2771 of the map. When there was already a rename_map_elt in the
2772 map at that location, free it.
2773 (translate_clast): Pass the rename_map. Do not initialize and free
2774 a rename_map per stmt_user.
2775 (gloog): Initialize and free one rename_map and pass it to
2778 2009-03-10 Sebastian Pop <sebastian.pop@amd.com>
2780 * graphite-clast-to-gimple.c (translate_clast): context_loop
2783 2009-03-10 Tobias Grosser <grosser@fim.uni-passau.de>
2784 Sebastian Pop <sebastian.pop@amd.com>
2786 * graphite-ppl.c (ppl_insert_dimensions): Fix stupid mistake
2787 of the use of ppl_Polyhedron_map_space_dimensions.
2789 2009-03-10 Tobias Grosser <grosser@fim.uni-passau.de>
2790 Sebastian Pop <sebastian.pop@amd.com>
2792 * graphite-poly.c (unify_scattering_dimensions): Fix types.
2793 * graphite-poly.h (poly_dr_p, poly_dr, POLY_DR_TYPE, PDR_BB,
2794 PDR_TYPE, PDR_ACCESSES, pdr_accessp_nb_subscripts,
2795 pdr_accessp_nb_iterators, pdr_accessp_nb_params,
2796 pdr_accessp_alias_set_dim, pdr_accessp_subscript_dim,
2797 pdr_accessp_iterator_dim, pdr_accessp_param_dim,
2798 pbb_nb_params): New.
2799 (pbb_nb_loops, pbb_nb_scattering, scop_nb_params,
2800 nb_loops_around_pbb): Adapt return types.
2802 2009-03-09 Tobias Grosser <grosser@fim.uni-passau.de>
2804 * Makefile.in (graphite.o, graphite-sese-to-poly.o,
2805 graphite-clast-to-gimple.o, graphite-data-ref.o,
2806 graphite-scop-detection.o, graphite-poly.o): Add
2809 2009-03-05 Tobias Grosser <grosser@fim.uni-passau.de>
2811 * Makefile.in (graphite.o, graphite-sese-to-poly.o,
2812 graphite-clast-to-gimple.o, graphite-data-ref.o,
2813 graphite-scop-detection.o, graphite-poly.o): Add graphite-poly.h.
2815 2009-03-04 Tobias Grosser <grosser@fim.uni-passau.de>
2817 * testsuite/gcc.dg/graphite/pr37485.c: Remove -floop-block
2818 * testsuite/gcc.dg/graphite/pr37828.c: Same.
2819 * testsuite/gcc.dg/graphite/pr37684.c: Same.
2820 * testsuite/gcc.dg/graphite/block-0.c: Same.
2821 * testsuite/gcc.dg/graphite/block-1.c: Same.
2822 * testsuite/gcc.dg/graphite/block-2.c: Same.
2823 * testsuite/gcc.dg/graphite/block-3.c: Same.
2824 * testsuite/gcc.dg/graphite/block-4.c: Same.
2825 * testsuite/gcc.dg/graphite/block-5.c: Same.
2826 * testsuite/gcc.dg/graphite/block-6.c: Same.
2827 * testsuite/gfortran.dg/graphite/pr38083.f90: Same.
2828 * testsuite/gfortran.dg/graphite/block-1.f90: Same.
2829 * testsuite/gfortran.dg/graphite/block-3.f90: Same.
2830 * testsuite/gfortran.dg/graphite/pr37852.f90: Same.
2831 * testsuite/gfortran.dg/graphite/block-4.f90: Same.
2832 * testsuite/gfortran.dg/graphite/pr37980.f90: Same.
2833 * testsuite/gfortran.dg/graphite/pr38953.f90: Same.
2834 * testsuite/gfortran.dg/graphite/pr37857.f90: Same.
2835 * opts.c: Remove -floop-block from -O2.
2836 * graphite-poly.c: Fail if -floop-block -floop-interchange or
2837 -floop-strip-mine are used.
2839 2009-03-04 Tobias Grosser <grosser@fim.uni-passau.de>
2840 Sebastian Pop <sebastian.pop@amd.com>
2842 * graphite-clast-to-gimple.c (build_cloog_prog): Unify scattering
2844 * graphite-poly.c (pbb_compare, graphite_sort_pbbs,
2845 graphite_trans_bb_move_loop, graphite_trans_bb_strip_mine,
2846 strip_mine_profitable_p, is_interchange_valid,
2847 graphite_trans_bb_block, graphite_trans_loop_block,
2848 graphite_trans_scop_block): Temporary removed.
2849 (extend_scattering, unify_scattering_dimensions): New.
2850 (print_scattering_function, graphite_read_transforms):
2851 PBB_SCATTERING -> PBB_TRANSFORMED_SCATTERING.
2852 (graphite_generate_scattering_fns): Removed.
2853 (apply_poly_transforms): Cleanup.
2854 (free_poly_bb): Add PBB_SCATTERING -> PBB_TRANSFORMED_SCATTERING.
2855 (schedule_to_scattering): Moved.
2856 (PBB_STATIC_SCHEDULE, PBB_SCATTERING): Removed.
2857 (PBB_ORIGINAL_SCATTERING, PBB_TRANSFORMED_SCATTERING): New.
2858 (pbb_nb_scattering): New.
2859 (SCOP_ENTRY, SCOP_EXIT, SCOP_REGION_BBS, SCOP_DEP_GRAPH, SCOP_PARAMS,
2860 SCOP_LOOP_NEST, SCOP_PARAMS, SCOP_OLDIVS, SCOP_LIVEOUT_RENAMES):
2862 * graphite-ppl.c (ppl_insert_dimensions): Extended and renamed from
2864 (ppl_strip_loop): PBB_SCATTERING -> PBB_TRANSFORMED_SCATTERING.
2865 * graphite-scop-detection.c (dot_all_scops_1): PBB_SCATTERING
2866 -> PBB_TRANSFORMED_SCATTERING.
2867 * graphite-sese-to-poly.c (build_scop_bbs): Remove region.
2868 (build_pbb_scattering_polyhedron): Moved from schedule_to_scattering.
2869 (build_scop_scattering): Renamed from build_scop_canonical_schedules.
2870 (check_poly_representation): Do not return bool.
2871 (graphite_transform_loops): Reformat.
2872 * sese.h (SESE_ENTRY_BB, SESE_EXIT_BB): New.
2874 2009-03-04 Sebastian Pop <sebastian.pop@amd.com>
2876 * graphite-poly.c (print_pbb_domain, print_pbb, print_scop,
2877 debug_pbb_domain, debug_pbb, debug_scop): New.
2878 * graphite-poly.h (print_pbb_domain, print_pbb, print_scop,
2879 debug_pbb_domain, debug_pbb, debug_scop): Declared.
2881 2009-03-02 Sebastian Pop <sebastian.pop@amd.com>
2884 * tree-parloops.c (canonicalize_loop_ivs): Call fold_convert
2885 when the type precision of the induction variable should be
2886 larger than the type precision of nit.
2887 (gen_parallel_loop): Update use of canonicalize_loop_ivs.
2888 * graphite-clast-to-gimple.c (graphite_loop_normal_form): Same.
2889 * tree-flow.h (canonicalize_loop_ivs): Update declaration.
2891 * testsuite/gcc.dg/graphite/pr39335_1.c: New.
2892 * testsuite/gcc.dg/graphite/pr39335.c: New.
2894 2009-03-02 Sebastian Pop <sebastian.pop@amd.com>
2896 * tree-parloops.c (canonicalize_loop_ivs): reduction_list contains
2897 SSA_NAMES not struct reduction_info.
2899 2009-03-02 Sebastian Pop <sebastian.pop@amd.com>
2901 * sese.c (expand_scalar_variables_expr): Handle ADDR_EXPR.
2903 2009-02-27 Sebastian Pop <sebastian.pop@amd.com>
2904 Tobias Grosser <grosser@fim.uni-passau.de>
2906 * sese.c (new_sese): Initialize SESE_REDUCTION_LIST.
2907 (free_sese): Free SESE_REDUCTION_LIST.
2908 * sese.h (struct sese): Add field reduction_list.
2909 (SESE_REDUCTION_LIST): New.
2910 * graphite-clast-to-gimple.c (graphite_loop_normal_form): Call
2911 canonicalize_loop_ivs on SESE_REDUCTION_LIST.
2913 2009-02-27 Sebastian Pop <sebastian.pop@amd.com>
2914 Tobias Grosser <grosser@fim.uni-passau.de>
2916 * tree-flow.h (gather_scalar_reductions): Use struct loop * instead
2919 2009-02-27 Sebastian Pop <sebastian.pop@amd.com>
2920 Tobias Grosser <grosser@fim.uni-passau.de>
2922 * tree-parloops.c (struct brli, build_reduction_list_info,
2923 analyze_reduction_list, gather_scalar_reductions): New.
2924 (loop_parallel_p): Build a reduction list containing only
2925 PHI_RESULT SSA_NAMEs: call gather_scalar_reductions.
2926 (gen_parallel_loop): Call the analysis analyze_reduction_list.
2927 (parallelize_loops): Now reduction_list is a htab_t of SSA_NAMEs.
2928 * tree-flow.h (gather_scalar_reductions): Declared.
2930 2009-02-26 Sebastian Pop <sebastian.pop@amd.com>
2933 * graphite-clast-to-gimple.c (graphite_loop_normal_form): Do not call
2934 number_of_iterations_exit from a gcc_assert.
2936 2009-02-25 Sebastian Pop <sebastian.pop@amd.com>
2937 Jan Sjodin <jan.sjodin@amd.com>
2939 * output.h (graphite_out_file, graphite_in_file): Declared.
2940 * toplev.c (graphite_out_file, graphite_in_file): New.
2941 (init_asm_output): Initialize graphite_in_file and graphite_out_file.
2942 * graphite-clast-to-gimple.c (build_cloog_prog): Read PBB_SCATTERING.
2943 Don't call schedule_to_scattering.
2944 * common.opt (fgraphite-write, fgraphite-read): New.
2945 * graphite-poly.c: Include output.h.
2946 (print_scattering_function, print_scattering_functions,
2947 debug_scattering_function, debug_scattering_functions,
2948 graphite_write_transforms, graphite_read_transforms,
2949 graphite_generate_scattering_fns): New.
2950 (apply_poly_transforms): Do not apply transform if flag_graphite_read.
2951 Call graphite_generate_scattering_fns, graphite_write_transforms,
2952 graphite_read_transforms.
2953 (new_poly_bb): Initialize PBB_SCATTERING.
2954 (free_poly_bb): Free PBB_SCATTERING.
2955 (schedule_to_scattering): Does not return, initialize PBB_SCATTERING.
2956 * graphite-poly.h (struct poly_bb): Add field scattering.
2957 (PBB_SCATTERING): New.
2958 (print_scattering_function, print_scattering_functions,
2959 debug_scattering_function, debug_scattering_functions): Declared.
2960 * graphite-ppl.c (cloog_matrix_to_ppl_constraint): Matrices contain
2961 GMP values, not integers!
2962 (ppl_print_polyhedron_matrix, debug_ppl_polyhedron_matrix,
2963 ppl_read_polyhedron_matrix): New.
2964 * graphite-ppl.h (ppl_print_polyhedron_matrix,
2965 debug_ppl_polyhedron_matrix,
2966 ppl_read_polyhedron_matrix): Declared.
2967 * Makefile.in (graphite-poly.o): Depends on output.h.
2969 2009-02-23 Sebastian Pop <sebastian.pop@amd.com>
2970 Tobias Grosser <grosser@fim.uni-passau.de>
2973 * graphite-scop-detection.c (stmt_simple_for_scop_p): Analyze
2974 scalar evolutions in the scop_entry->loop_father.
2976 2009-02-23 Sebastian Pop <sebastian.pop@amd.com>
2977 Tobias Grosser <grosser@fim.uni-passau.de>
2979 * graphite.h (ref_nb_loops): Remove declaration.
2980 (struct gimple_bb, gimple_bb_p, GBB_BB, GBB_DATA_REFS, GBB_CONDITIONS,
2981 GBB_CONDITION_CASES, GBB_CLOOG_IV_TYPES, gbb_loop, print_gimple_bb,
2982 debug_gbb): Moved to sese.h.
2985 2009-02-23 Sebastian Pop <sebastian.pop@amd.com>
2986 Tobias Grosser <grosser@fim.uni-passau.de>
2988 * graphite-data-ref.[ch]: Disable.
2990 2009-02-23 Sebastian Pop <sebastian.pop@amd.com>
2991 Tobias Grosser <grosser@fim.uni-passau.de>
2993 * graphite-scop-detection.c (stmt_simple_for_scop_p): Analyze
2994 scalar evolutions in the scop_entry->loop_father.
2996 2009-02-23 Sebastian Pop <sebastian.pop@amd.com>
2998 * graphite-scop-detection.c (nb_reductions_in_loop): Moved here...
2999 (graphite_cannot_represent_loop_niter): Renamed
3000 graphite_cannot_represent_loop. Call nb_reductions_in_loop.
3001 (limit_scops): build_sese_loop_nests does not return a bool.
3002 * graphite-scop-detection.h (nb_reductions_in_loop): Declared.
3003 * sese.c (nb_reductions_in_loop): ... from here.
3004 (graphite_loop_normal_form): ... from here.
3005 (sese_record_loop): Does not fail, so does not return a bool.
3006 (build_sese_loop_nests): Same.
3007 * sese.h (build_sese_loop_nests): Update declaration.
3008 * graphite-clast-to-gimple.c (graphite_loop_normal_form): Moved here...
3009 (build_graphite_loop_normal_form): New.
3010 (gloog): Call build_graphite_loop_normal_form.
3011 * graphite-sese-to-poly.c (build_poly_scop): Don't fail on
3012 build_sese_loop_nests.
3014 * testsuite/gcc.dg/graphite/id-1.c: New.
3016 2009-02-23 Sebastian Pop <sebastian.pop@amd.com>
3017 Tobias Grosser <grosser@fim.uni-passau.de>
3019 * graphite-sese-to-poly.c (scan_tree_for_params): Remove REAL_CST.
3020 The SCoP detection fix is sufficient.
3022 2009-02-21 Sebastian Pop <sebastian.pop@amd.com>
3024 PR tree-optimization/39260
3025 * graphite-scop-detection.c (harmful_stmt_in_bb): Stop a SCoP when
3026 the basic block contains a condition with a real type.
3027 * graphite-sese-to-poly.c (scan_tree_for_params): Handle REAL_CST.
3029 * gcc.dg/graphite/pr39260.c: New.
3031 2009-02-21 Sebastian Pop <sebastian.pop@amd.com>
3033 * graphite-poly.c: Inlcude params.h.
3034 (graphite_trans_loop_block): Use PARAM_LOOP_BLOCK_TILE_SIZE for
3036 * Makefile.in (graphite-poly.o): Depend on PARAMS_H.
3037 * params.def (PARAM_LOOP_BLOCK_TILE_SIZE): Define.
3039 2009-02-20 Sebastian Pop <sebastian.pop@amd.com>
3040 Tobias Grosser <grosser@fim.uni-passau.de>
3042 * graphite-scop-detection.c (dot_all_scops_1,
3043 dot_all_scops): Moved here.
3044 * graphite-scop-detection.h (dot_all_scops): Declared here.
3045 * graphite.c (graphite_initialize, graphite_finalize): New.
3046 (graphite_transform_loops): Cleaned up.
3047 * sese.c (debug_oldivs): Moved here.
3048 * graphite-poly.c (graphite_apply_transformations): Renamed
3049 apply_poly_transforms.
3050 (debug_loop_vec): Moved here.
3051 * graphite-sese-to-poly.c (build_bb_loops, build_sese_conditions_1,
3052 scop_contains_non_iv_scalar_phi_nodes, build_sese_conditions,
3053 find_scop_parameters, build_scop_iteration_domain,
3054 add_conditions_to_constraints, build_scop_canonical_schedules,
3055 build_scop_data_accesses): Now static.
3056 (build_poly_scop, check_poly_representation): New.
3058 2009-02-20 Sebastian Pop <sebastian.pop@amd.com>
3060 * graphite.c (graphite_stmt_p, new_gimple_bb, free_gimple_bb,
3061 remove_gbbs_in_scop, free_scops, try_generate_gimple_bb,
3062 build_scop_bbs, ref_nb_loops, compare_prefix_loops,
3063 build_scop_canonical_schedules, build_bb_loops, add_value_to_dim,
3064 scan_tree_for_params_right_scev, scan_tree_for_params_int,
3065 scan_tree_for_params, struct irp_data, dx_record_params,
3066 find_params_in_bb, find_scop_parameters, gbb_from_bb,
3067 build_loop_iteration_domains, add_conditions_to_domain,
3068 phi_node_is_iv, bb_contains_non_iv_scalar_phi_nodes,
3069 scop_contains_non_iv_scalar_phi_nodes, build_sese_conditions_1,
3070 build_sese_conditions, add_conditions_to_constraints,
3071 build_scop_iteration_domain, build_access_matrix_with_af,
3072 build_access_matrix,
3073 build_scop_data_accesses): Moved to graphite-sese-to-poly.c.
3075 * graphite-sese-to-poly.c: New.
3076 * graphite-sese-to-poly.h: New.
3078 * Makefile.in: Add new rule for graphite-sese-to-poly.o.
3080 2009-02-20 Sebastian Pop <sebastian.pop@amd.com>
3082 * graphite.c: Split graphite code generation to a new file.
3083 (graphite_verify, gmp_cst_to_tree, clast_name_to_gcc,
3084 max_precision_type, clast_to_gcc_expression_red,
3085 clast_to_gcc_expression, gcc_type_for_clast_expr,
3086 gcc_type_for_clast_eq, loop_iv_stack_patch_for_consts,
3087 graphite_translate_clast_equation, graphite_create_guard_cond_expr,
3088 graphite_create_new_guard, clast_get_body_of_loop,
3089 gcc_type_for_cloog_iv, gcc_type_for_iv_of_clast_loop,
3090 graphite_create_new_loop, build_iv_mapping, copy_renames,
3091 translate_clast, find_cloog_iv_in_expr, compute_cloog_iv_types_1,
3092 compute_cloog_iv_types, free_scattering, save_var_name,
3093 initialize_cloog_names, build_scop_context, build_cloog_prog,
3094 set_cloog_options, debug_clast_stmt, scop_to_clast,
3095 print_generated_program, debug_generated_program,
3096 gloog): Moved to graphite-clast-to-gimple.c.
3098 (struct cloog_prog_clast): Moved to graphite-clast-to-gimple.h.
3100 (iv_stack_entry_is_constant, iv_stack_entry_is_iv,
3101 loop_iv_stack_push_iv, loop_iv_stack_insert_constant,
3102 loop_iv_stack_pop, loop_iv_stack_get_iv,
3103 loop_iv_stack_get_iv_from_name, debug_loop_iv_stack,
3104 free_loop_iv_stack, loop_iv_stack_remove_constants,
3105 debug_rename_elt, debug_rename_map_1, debug_rename_map,
3106 rename_map_elt_info, eq_rename_map_elts, debug_ivtype_elt,
3107 debug_ivtype_map_1, debug_ivtype_map, ivtype_map_elt_info,
3108 eq_ivtype_map_elts, sese_add_exit_phis_edge,
3109 sese_add_exit_phis_var, sese_insert_phis_for_liveouts,
3110 get_vdef_before_sese, sese_adjust_vphi,
3111 get_new_name_from_old_name, sese_adjust_phis_for_liveouts,
3112 oldiv_for_loop, rename_variables_in_stmt, is_parameter,
3113 is_iv, expand_scalar_variables_ssa_name,
3114 expand_scalar_variables_expr, expand_scalar_variables_stmt,
3115 expand_scalar_variables, rename_variables, remove_condition,
3116 get_true_edge_from_guard_bb, get_false_edge_from_guard_bb,
3117 add_loop_exit_phis, insert_loop_close_phis, struct igp,
3118 default_liveout_before_guard, add_guard_exit_phis,
3119 insert_guard_phis, register_old_and_new_names,
3120 graphite_copy_stmts_from_block, register_sese_liveout_renames,
3121 copy_bb_and_scalar_dependences, outermost_loop_in_sese,
3122 if_region_set_false_region, create_if_region_on_edge,
3123 move_sese_in_condition): Moved to sese.c.
3125 (nb_loops_around_loop_in_sese, struct ifsese, if_region_entry,
3126 if_region_exit, if_region_get_condition_block,
3127 struct rename_map_elt, new_rename_map_elt, enum iv_stack_entry_kind,
3128 union iv_stack_entry_data_union, struct iv_stack_entry_struct,
3129 iv_stack_entry_p, loop_iv_stack, struct ivtype_map_elt,
3130 ivtype_map_elt, new_ivtype_map_elt,
3131 recompute_all_dominators): Moved to sese.h.
3133 * graphite-clast-to-gimple.c: New.
3134 * graphite-clast-to-gimple.h: New.
3135 * Makefile.in: Add new rule for graphite-clast-to-gimple.o.
3136 * sese.c: Modified as said above.
3139 2009-02-20 Sebastian Pop <sebastian.pop@amd.com>
3141 * graphite.c: Split scop detection to a new file.
3142 (enum gbb_type, gbb_type, get_bb_type, struct sd_region_p, sd_region,
3143 move_sd_regions, loop_affine_expr, exclude_component_ref,
3144 is_simple_operand, stmt_simple_for_scop_p, harmful_stmt_in_bb,
3145 graphite_cannot_represent_loop_niter, struct scopdet_info,
3146 scopdet_basic_block_info, build_scops_1, bb_in_sd_region,
3147 find_single_entry_edge, find_single_exit_edge,
3148 create_single_entry_edge, sd_region_without_exit,
3149 create_single_exit_edge, unmark_exit_edges, mark_exit_edges,
3150 create_sese_edges, build_graphite_scops, limit_scops, build_scops):
3151 Moved to graphite-scop-detection.c.
3153 * graphite-scop-detection.c: New.
3154 * graphite-scop-detection.h: New.
3155 * Makefile.in: Add new rule for graphite-scop-detection.o.
3157 * sese.c: Include tree-chrec.h, tree-data-ref.h, and
3158 tree-scalar-evolution.h.
3159 (nb_reductions_in_loop, graphite_loop_normal_form, sese_record_loop,
3160 build_sese_loop_nests): Moved here from graphite.c.
3161 (param_index): Renamed parameter_index_in_region.
3163 2009-02-18 Tobias Grosser <grosser@fim.uni-passau.de>
3164 Sebastian Pop <sebastian.pop@amd.com>
3166 * gcc.dg/graphite/block-0.c: Expected to fail now.
3167 * gcc.dg/graphite/block-1.c: Same.
3168 * gcc.dg/graphite/block-5.c: Same.
3169 * gcc.dg/graphite/block-6.c: Same.
3171 2009-02-18 Tobias Grosser <grosser@fim.uni-passau.de>
3172 Sebastian Pop <sebastian.pop@amd.com>
3174 * graphite.h: Separate from graphite_bb_p the polyhedral
3175 representation in poly_bb_p and the GCC specifics in gimple_bb_p.
3176 (struct data_dependence_polyhedron, RDGE_DDP, ddp_p): Moved to
3177 graphite-data-ref.h.
3178 (struct poly_bb, PBB_SCOP, PBB_STATIC_SCHEDULE, PBB_DOMAIN,
3179 PBB_BLACK_BOX, PBB_LOOPS, pbb_nb_loops, pbb_loop_at_index,
3180 pbb_loop_index, struct scop, SCOP_BBS, SCOP_REGION, SCOP_ENTRY,
3181 SCOP_EXIT, SCOP_REGION_BBS, SCOP_DEP_GRAPH, SCOP_PARAMS,
3182 SCOP_LOOP_NEST, SCOP_PARAMS, SCOP_OLDIVS, SCOP_LIVEOUT_RENAMES,
3183 scop_nb_params): Moved to graphite-poly.h.
3184 * graphite-data-ref.c: Same.
3185 * graphite-data-ref.h: New.
3187 (pbb_compare, graphite_sort_pbbs, graphite_trans_bb_move_loop,
3188 graphite_trans_bb_strip_mine, strip_mine_profitable_p,
3189 is_interchange_valid, graphite_trans_bb_block,
3190 graphite_trans_loop_block, scop_max_loop_depth,
3191 graphite_trans_scop_block, graphite_apply_transformations,
3192 new_poly_bb, free_poly_bb, new_scop, free_scop): Moved to
3194 * graphite-poly.h: New.
3195 * graphite-poly.c: New.
3196 * Makefile.in (OBJS-common): Add graphite-poly.o.
3197 (graphite-poly.o): New rule.
3198 * tree-data-ref.h (struct data_reference): Remove unused scop field.
3201 2009-02-18 Sebastian Pop <sebastian.pop@amd.com>
3202 Tobias Grosser <grosser@fim.uni-passau.de>
3204 * graphite.c: Replace gb -> gbb.
3206 * graphite-data-ref.c: Same.
3208 2009-02-18 Sebastian Pop <sebastian.pop@amd.com>
3209 Tobias Grosser <grosser@fim.uni-passau.de>
3211 * Makefile.in (OBJS-commmon): Add sese.o.
3213 (graphite.o): Add sese.h.
3214 * graphite.c (bb_in_ss_p, loop_in_sese_p,
3215 sese_build_livein_liveouts_use, sese_build_livein_liveouts_bb,
3216 sese_build_livein_liveouts, register_bb_in_sese, new_sese, free_sese):
3218 (block_before_scop): Add missing return.
3219 (new_scop, free_scop): Remove SESE data structures.
3220 (scop_record_loop, scan_tree_for_params, find_params_in_bb,
3221 find_scop_parameters, build_loop_iteration_domains,
3222 add_conditions_to_domain, register_scop_liveout_renames,
3223 copy_bb_and_scalar_dependences): Scop -> SESE.
3225 (add_conditions_to_domain): SCoP -> SESE and remove check
3226 (scop_contains_non_iv_scalar_phi_nodes): New.
3227 (build_scop_conditions_1, build_scop_conditions): Remove check for
3228 non iv scalar phi nodes.
3229 (print_scop_statistics): New.
3230 (graphite_transform_loops): Cleanup.
3232 * graphite.h: Move to sese & cleanup.
3236 2009-02-16 Sebastian Pop <sebastian.pop@amd.com>
3237 Tobias Grosser <grosser@fim.uni-passau.de>
3239 * graphite.c (build_scop_conditions_1): Conditions are only
3240 at the end of a basic block.
3242 2009-02-16 Sebastian Pop <sebastian.pop@amd.com>
3243 Tobias Grosser <grosser@fim.uni-passau>
3245 * graphite.h (struct graphite_bb): Remove compressed_alpha_matrix
3247 (GBB_ALPHA): Removed.
3249 2009-02-16 Sebastian Pop <sebastian.pop@amd.com>
3250 Tobias Grosser <grosser@fim.uni-passau.de>
3252 * graphite-data-ref.c (graphite_test_dependence): Don't use
3253 GBB_DYNAMIC_SCHEDULE.
3254 * graphite.c (new_graphite_bb): Same.
3255 (free_graphite_bb): Same.
3256 (build_scop_dynamic_schedules): Removed.
3257 (graphite_transform_loops): Don't call it.
3258 * graphite.h (struct graphite_bb): Remove dynamic_schedule field.
3259 (GBB_DYNAMIC_SCHEDULE): Removed.
3261 2009-02-16 Sebastian Pop <sebastian.pop@amd.com>
3262 Tobias Grosser <grosser@fim.uni-passau.de>
3264 * graphite.c (schedule_to_scattering): Don't use CloogMatrix.
3265 (print_graphite_bb): Same.
3266 (build_cloog_prog): Same.
3268 2009-02-16 Sebastian Pop <sebastian.pop@amd.com>
3269 Tobias Grosser <grosser@fim.uni-passau.de>
3271 * graphite.c (build_cloog_prog): Don't use CloogMatrix.
3273 2009-02-16 Sebastian Pop <sebastian.pop@amd.com>
3274 Tobias Grosser <grosser@fim.uni-passau.de>
3276 * graphite.c (build_scop_context): Don't use CloogMatrix.
3277 * graphite-ppl.c (new_Cloog_Domain_from_ppl_Polyhedron): New.
3278 * graphite-ppl.h (new_Cloog_Domain_from_ppl_Polyhedron): Declared.
3280 2009-02-16 Sebastian Pop <sebastian.pop@amd.com>
3281 Tobias Grosser <grosser@fim.uni-passau.de>
3283 * graphite.h (struct scop): Move params, old_ivs, loops, loop_nest,
3284 liveout_renames, add_params fields...
3285 (struct sese): ... here.
3286 (SESE_PARAMS, SESE_LOOPS, SESE_LOOP_NEST, SESE_ADD_PARAMS,
3287 SESE_PARAMS, SESE_OLDIVS, SESE_LIVEOUT_RENAMES): New.
3289 2009-02-16 Sebastian Pop <sebastian.pop@amd.com>
3290 Tobias Grosser <grosser@fim.uni-passau.de>
3292 * graphite.c (print_scop): Do not print the CLooG program.
3293 (new_scop, free_scop, initialize_cloog_names, build_scop_context,
3294 build_cloog_prog, gloog): Don't use SCOP_PROG.
3295 (find_transform): Renamed scop_to_clast.
3296 (print_generated_program, debug_generated_program): New.
3297 (graphite_transform_loops): Adapt to new interface.
3298 * graphite.h (struct scop): Remove program field.
3299 (SCOP_PROG): Removed.
3300 (print_generated_program, debug_generated_program): Declared.
3302 2009-02-16 Sebastian Pop <sebastian.pop@amd.com>
3304 * graphite-data-ref.c (schedule_precedes_p, schedule_same_p): New.
3305 (statement_precedes_p): Use schedule_same_p and schedule_precedes_p.
3306 * graphite.c (gbb_compare, schedule_to_scattering, print_graphite_bb,
3307 free_graphite_bb, build_scop_canonical_schedules,
3308 graphite_trans_bb_strip_mine, graphite_trans_scop_block): Static
3309 schedules are now represented using a ppl_Linear_Expression_t.
3310 * graphite.h (struct graphite_bb): Same.
3311 * graphite-ppl.c (ppl_lexico_compare_linear_expressions): New.
3312 * graphite-ppl.h (ppl_lexico_compare_linear_expressions): Declared.
3314 2009-02-15 Sebastian Pop <sebastian.pop@amd.com>
3316 * graphite.c: Free local memory.
3317 * graphite-ppl.c: Same.
3319 2009-02-15 Sebastian Pop <sebastian.pop@amd.com>
3321 * graphite.c (const_column_index, get_first_matching_sign_row_index,
3322 get_lower_bound_row, get_upper_bound_row, copy_constraint,
3323 swap_constraint_variables, scale_constraint_variable): Removed.
3324 (graphite_trans_bb_strip_mine): Remove pong.
3325 * graphite-ppl.c: Include missing header files.
3326 (set_inhomogeneous, set_coef, shift_poly, ppl_strip_loop): New.
3327 * graphite-ppl.h (ppl_strip_loop): Declared.
3328 * Makefile.in (graphite-ppl.o): Adjust dependences.
3330 2009-02-14 Sebastian Pop <sebastian.pop@amd.com>
3332 * graphite.c (build_loop_iteration_domains): Remove ping pong.
3333 (build_scop_iteration_domain): Same.
3335 2009-02-13 Sebastian Pop <sebastian.pop@amd.com>
3337 * graphite.c (scan_tree_for_params, add_conditions_to_domain): Remove
3339 (add_value_to_dim, scan_tree_for_params_right_scev,
3340 scan_tree_for_params_int): New.
3341 * graphite-ppl.c (oppose_constraint): New.
3342 (insert_constraint_into_matrix): Implement missing cases.
3343 * graphite-ppl.h (insert_constraint_into_matrix): Declared.
3345 2009-02-13 Sebastian Pop <sebastian.pop@amd.com>
3347 * graphite.c (graphite_trans_bb_move_loop): Remove ping pong,
3348 use ppl_move_dimension.
3350 2009-02-12 Sebastian Pop <sebastian.pop@amd.com>
3352 * graphite-data-ref.c: Domains are now ppl_Polyhedra_t.
3355 * graphite-ppl.c: Same.
3356 * graphite-ppl.h: Same.
3358 2009-02-12 Sebastian Pop <sebastian.pop@amd.com>
3360 Revert last 3 commits.
3362 2009-02-10 Sebastian Pop <sebastian.pop@amd.com>
3364 * graphite.c (scan_tree_for_params, add_conditions_to_domain): Remove
3366 (add_value_to_dim, scan_tree_for_params_right_scev,
3367 scan_tree_for_params_int): New.
3368 * graphite-ppl.c (oppose_constraint): New.
3369 (insert_constraint_into_matrix): Implement missing cases.
3370 * graphite-ppl.h (insert_constraint_into_matrix): Declared.
3372 2009-02-10 Sebastian Pop <sebastian.pop@amd.com>
3374 * graphite.c (graphite_trans_bb_move_loop): Remove unused variables.
3376 2009-02-10 Sebastian Pop <sebastian.pop@amd.com>
3377 Tobias Grosser <grosser@fim.uni-passau.de>
3379 * graphite.c (graphite_trans_bb_move_loop): Remove ping pong,
3380 use ppl_move_dimension.
3381 * graphite-ppl.c (ppl_move_dimension): New.
3382 * graphite-ppl.h (ppl_move_dimension): Declared.
3384 2009-02-10 Sebastian Pop <sebastian.pop@amd.com>
3386 * graphite.c: Do not include cloog/cloog.h.
3387 (print_graphite_bb): Remove ping pong, call PPL print function.
3389 2009-02-10 Tobias Grosser <grosser@fim.uni-passau.de>
3391 * Makefile.in (OBJS-common): Add graphite-ppl.o.
3392 (graphite.o): Add dependence on graphite-ppl.h.
3393 (graphite-ppl.o): New.
3394 (graphite-data-ref.c): Ping pong between PPL data structures
3396 * graphite-ppl.c: New.
3397 * graphite-ppl.h: New.
3398 * graphite.c: Include graphite-ppl.h.
3399 (print_graphite_bb, add_conditions_to_domain, build_cloog_prog,
3400 graphite_trans_bb_move_loop, graphite_trans_bb_strip_mine):
3401 Ping pong between PPL data structures and matrices.
3402 (new_graphite_bb): Create a PPL constraint system.
3403 Call ppl_delete_Constraint_System instead of cloog_matrix_free.
3404 (build_loop_iteration_domains): Use PPL functions.
3405 * graphite.h: Include graphite-ppl.h. Fix comments.
3406 (graphite_bb): Use a ppl_Constraint_System_t instead of
3407 CloogMatrix for representing the domain.
3408 (scop): Remove static_schedule.
3409 (gbb_nb_loops): Ping pong between PPL data structures and matrices.
3411 2009-02-06 Sebastian Pop <sebastian.pop@amd.com>
3413 * graphite.c: Fix some comments.
3415 2009-02-05 Sebastian Pop <sebastian.pop@amd.com>
3418 * graphite.c (if_region_set_false_region): After moving a region
3419 in the false branch of a condition, remove the empty dummy
3421 (gloog): Remove wrong fix for PR38953.
3423 2009-02-03 Tobias Grosser <grosser@fim.uni-passau.de>
3425 * graphite.c (bb_in_sese_p, sese_build_livein_liveouts_use,
3426 sese_build_livein_liveouts_bb, sese_build_livein_liveouts,
3427 register_bb_in_sese, new_sese, free_sese): Moved.
3428 (dot_scop_1, build_scop_loop_nests, build_loop_iteration_domains,
3429 outermost_loop_in_scop, build_scop_iteration_domain,
3430 expand_scalar_variables_ssa_name, get_vdef_before_scop,
3431 limit_scops): Use bb_in_sese_p instead of bb_in_scop_p.
3432 Use loop_in_sese_p instead of loop_in_scop_p.
3433 (new_graphite_bb, new_scop, gloog): Do not initialize SCOP_BBS_B.
3434 (free_scop): Do not free SCOP_BBS_B.
3435 (nb_loops_around_loop_in_scop, nb_loops_around_gb,
3436 ref_nb_loops): Moved here...
3437 * graphite.h (ref_nb_loops): ... from here.
3438 (struct scop): Remove bbs_b bitmap.
3439 (SCOP_BBS_B, bb_in_scop_p, loop_in_scop_p): Removed.
3440 * testsuite/gcc.dg/graphite/scop-19.c: New
3442 2009-02-03 Tobias Grosser <grosser@fim.uni-passau.de>
3444 * graphite.c (scopdet_basic_block_info): Fix bug in scop
3447 2009-01-30 Tobias Grosser <grosser@fim.uni-passau.de>
3449 * graphite.c (new_loop_to_cloog_loop_str, hash_loop_to_cloog_loop,
3450 eq_loop_to_cloog_loop): Remove.
3451 (new_scop, free_scop): Remove SCOP_LOOP2CLOOG_LOOP.
3452 * graphite.h (struct scop): Remove loop2cloog_loop.
3453 (loop_domain_dim, loop_iteration_vector_dim): Remove.
3455 2009-01-30 Tobias Grosser <grosser@fim.uni-passau.de>
3457 * opts.c (decode_options): Only add graphite options to O2
3458 if we compile with graphite enabled.
3460 2009-01-26 Sebastian Pop <sebastian.pop@amd.com>
3462 * Merge from mainline (r143163:143684).
3464 2009-01-26 Sebastian Pop <sebastian.pop@amd.com>
3466 * graphite.c (debug_value): Removed.
3467 * graphite.h (debug_value): Removed.
3469 2009-01-23 Sebastian Pop <sebastian.pop@amd.com>
3471 * passes.c (init_optimization_passes): Do not call pass_copy_prop
3472 after graphite: pass_copy_prop does not maintain a proper loop closed
3473 SSA form. pass_copy_prop should be fixed.
3475 2009-01-23 Sebastian Pop <sebastian.pop@amd.com>
3477 * graphite.c (scop_adjust_phis_for_liveouts): Fix warning.
3479 2009-01-23 Sebastian Pop <sebastian.pop@amd.com>
3481 * graphite.c (graphite_verify): Add a call to verify_loop_closed_ssa.
3482 (gloog): Split the exit of the scop when the scop exit is a loop exit.
3483 (graphite_transform_loops): Only call cleanup_tree_cfg if gloog
3486 2009-01-20 Sebastian Pop <sebastian.pop@amd.com>
3488 * graphite.c (gloog): Return true when code gen succeeded.
3489 (graphite_transform_loops): Do not call cleanup_tree_cfg if
3490 the code of the function did not changed. After cleanup_tree_cfg
3491 call rewrite_into_loop_closed_ssa to maintain the loop closed ssa
3494 2009-01-19 Sebastian Pop <sebastian.pop@amd.com>
3496 * graphite.c (stmt_simple_for_scop_p): Also handle cases when
3497 gimple_call_lhs is NULL.
3499 2009-01-16 Sebastian Pop <sebastian.pop@amd.com>
3500 Tobias Grosser <tobi.grosser@amd.com>
3502 * graphite.c (graphite_trans_scop_block): Do not block single
3505 2009-01-15 Sebastian Pop <sebastian.pop@amd.com>
3506 Tobias Grosser <tobi.grosser@amd.com>
3508 * graphite.c (build_scop_canonical_schedules): Start schedules at
3511 2009-01-15 Sebastian Pop <sebastian.pop@amd.com>
3512 Tobias Grosser <tobi.grosser@amd.com>
3514 * graphite.c (compare_prefix_loops): New.
3515 (build_scop_canonical_schedules): Rewritten.
3516 (graphite_transform_loops): Move build_scop_canonical_schedules
3517 after build_scop_iteration_domain.
3519 2009-01-14 Sebastian Pop <sebastian.pop@amd.com>
3520 Tobias Grosser <tobi.grosser@amd.com>
3522 * graphite.c (add_conditions_to_domain): Add the loops to
3523 the dimension of the iteration domain. Do copy the domain
3524 only when it exists.
3525 (build_scop_conditions_1): Do not call add_conditions_to_domain.
3526 (add_conditions_to_constraints): New.
3527 (can_generate_code_stmt, can_generate_code): Removed.
3528 (gloog): Do not call can_generate_code.
3529 (graphite_transform_loops): Call add_conditions_to_constraints
3530 after building the iteration domain.
3532 2009-01-14 Sebastian Pop <sebastian.pop@amd.com>
3533 Tobias Grosser <tobi.grosser@amd.com>
3534 Jan Sjodin <jan.sjodin@amd.com>
3536 * graphite.c (scan_tree_for_params): On substractions negate
3537 all the coefficients of the term.
3538 (clast_to_gcc_expression_red): New. Handle reduction expressions
3539 of more than two operands.
3540 (clast_to_gcc_expression): Call clast_to_gcc_expression_red.
3541 (get_vdef_before_scop): Handle also the case of default definitions.
3543 2009-01-14 Sebastian Pop <sebastian.pop@amd.com>
3546 * graphite.c (get_vdef_before_scop, scop_adjust_vphi): New.
3547 (scop_adjust_phis_for_liveouts): Call scop_adjust_vphi.
3548 (gloog): Do not call cleanup_tree_cfg.
3549 (graphite_transform_loops): Call cleanup_tree_cfg after all
3550 scops have been code generated.
3552 2009-01-13 Sebastian Pop <sebastian.pop@amd.com>
3554 * passes.c (init_optimization_passes): Schedule after
3555 graphite transforms pass_copy_prop, pass_dce_loop and pass_lim.
3557 2009-01-13 Sebastian Pop <sebastian.pop@amd.com>
3559 * graphite.c (expand_scalar_variables_stmt): Do not pass loop_p.
3561 (expand_scalar_variables_ssa_name): Do not pass loop_p. Fix comment.
3562 Set the type of an expression to the type of its assign statement.
3563 (expand_scalar_variables_expr): Do not pass loop_p.
3564 Fix comment. Stop recursion on tcc_constant or tcc_declaration.
3565 (copy_bb_and_scalar_dependences): Do not pass loop_p.
3566 (translate_clast): Update call to copy_bb_and_scalar_dependences.
3568 2009-01-11 Sebastian Pop <sebastian.pop@amd.com>
3570 * graphite.c (expand_scalar_variables_ssa_name): Set the type of
3571 an expression to the gimple_expr_type of its assign statement.
3572 (expand_scalar_variables_expr): Stop recursion on tcc_constant
3575 2009-01-11 Sebastian Pop <sebastian.pop@amd.com>
3577 PR tree-optimization/38786
3578 * testsuite/gcc.dg/graphite/pr38786.c: New.
3579 * graphite.c (expand_scalar_variables_ssa_name): New, outlined from
3580 the SSA_NAME case of expand_scalar_variables_expr.
3581 (expand_scalar_variables_expr): Also gather the scalar computation
3582 used to index the memory access.
3583 (expand_scalar_variables_stmt): Pass to expand_scalar_variables_expr
3584 the gimple_stmt_iterator where it inserts new code.
3586 2009-01-10 Sebastian Pop <sebastian.pop@amd.com>
3588 * testsuite/gcc.dg/graphite/block-3.c: Fix compile error on 32bit.
3590 2009-01-10 Sebastian Pop <sebastian.pop@amd.com>
3592 * opts.c (decode_options): Enable flag_graphite_identity and
3593 flag_loop_block in -O2 and above.
3595 2009-01-08 Sebastian Pop <sebastian.pop@amd.com>
3597 * libjava/classpath/lib/gnu/java/awt/peer/gtk/GtkMouseInfoPeer.class:
3598 Fix merge problem: replace with the file from trunk.
3600 2009-01-08 Sebastian Pop <sebastian.pop@amd.com>
3602 * Merge from mainline (r141727:143163).
3604 2009-01-07 Sebastian Pop <sebastian.pop@amd.com>
3605 Jan Sjodin <jan.sjodin@amd.com>
3607 PR tree-optimization/38559
3608 * testsuite/gcc.dg/graphite/pr38559.c: New.
3610 * graphite.c (debug_value, copy_constraint,
3611 swap_constraint_variables, scale_constraint_variable, ): New.
3612 (get_lower_bound, get_upper_bound): Removed.
3613 (graphite_trans_bb_strip_mine): Clean up this code that works
3614 only for constant number of iterations. Fully copy upper and
3615 lower bound constraints, not only the constant part of them.
3616 * graphite.h (debug_value): Declared.
3618 2009-01-06 Jan Sjodin <jan.sjodin@amd.com>
3620 PR tree-optimization/38492
3621 PR tree-optimization/38498
3622 * tree-check.c (operator_is_linear, scev_is_linear_expression): New.
3623 * tree-chrec.h (scev_is_linear_expression): Declared.
3624 * graphite.c (graphite_cannot_represent_loop_niter): New.
3625 (scopdet_basic_block_info): Call graphite_cannot_represent_loop_niter.
3626 (graphite_loop_normal_form): Use gcc_assert.
3627 (scan_tree_for_params): Use CASE_CONVERT.
3628 (phi_node_is_iv, bb_contains_non_iv_scalar_phi_nodes): New.
3629 (build_scop_conditions_1): Call bb_contains_non_iv_scalar_phi_nodes.
3630 Use gcc_assert. Discard scops that contain unhandled cases.
3631 (build_scop_conditions): Return a boolean status for unhandled cases.
3632 (strip_mine_profitable_p): Print the loop number, not its depth.
3633 (is_interchange_valid): Pass the depth of the loop nest, don't
3634 recompute it wrongly.
3635 (graphite_trans_bb_block): Same.
3636 (graphite_trans_bb_block): Print tentative of loop blocking.
3637 (graphite_trans_scop_block): Do not print that the loop has been
3639 (graphite_transform_loops): Do not handle scops that contain condition
3642 * testsuite/gcc.dg/graphite/pr38500.c: Fixed warning as committed
3644 * testsuite/gcc.dg/graphite/block-0.c: Update test.
3645 * testsuite/gcc.dg/graphite/block-1.c: Same.
3646 * testsuite/gcc.dg/graphite/block-2.c: Remove xfail and test for
3648 * testsuite/gcc.dg/graphite/block-4.c: Remove test for strip mine.
3649 * testsuite/gcc.dg/graphite/block-3.c: New.
3650 * testsuite/gcc.dg/graphite/pr38498.c: New.
3652 2008-12-22 Harsha Jagasia <harsha.jagasia@amd.com>
3654 PR tree-optimization/38510
3655 * gcc.dg/graphite/pr38510.c: New.
3656 * graphite.c (recompute_all_dominators): Call mark_irreducible_loops.
3657 (translate_clast): Call recompute_all_dominators before
3659 (gloog): Call recompute_all_dominators before graphite_verify.
3661 2008-12-12 Sebastian Pop <sebastian.pop@amd.com>
3663 PR tree-optimization/38492
3664 * graphite.c (rename_map_elt, debug_rename_elt,
3665 debug_rename_map_1, debug_rename_map, new_rename_map_elt,
3666 rename_map_elt_info, eq_rename_map_elts,
3667 get_new_name_from_old_name, bb_in_sese_p): Moved around.
3668 (sese_find_uses_to_rename_use): Renamed sese_build_livein_liveouts_use.
3669 (sese_find_uses_to_rename_bb): Renamed sese_build_livein_liveouts_bb.
3670 (sese_build_livein_liveouts): New.
3671 (new_sese, free_sese): New.
3672 (new_scop): Call new_sese.
3673 (free_scop): Call free_sese.
3674 (rename_variables_from_edge, rename_phis_end_scop): Removed.
3675 (register_old_new_names): Renamed register_old_and_new_names.
3676 (register_scop_liveout_renames, add_loop_exit_phis,
3677 insert_loop_close_phis, struct igp,
3678 default_liveout_before_guard, add_guard_exit_phis,
3679 insert_guard_phis, copy_renames): New.
3680 (translate_clast): Call insert_loop_close_phis and insert_guard_phis.
3681 (sese_add_exit_phis_edge): Renamed scop_add_exit_phis_edge.
3682 (rewrite_into_sese_closed_ssa): Renamed scop_insert_phis_for_liveouts.
3683 (scop_adjust_phis_for_liveouts): New.
3684 (gloog): Call scop_adjust_phis_for_liveouts.
3686 * graphite.h (struct sese): Documented. Added fields liveout,
3688 (SESE_LIVEOUT, SESE_LIVEIN, SESE_LIVEIN_VER, SESE_NUM_VER): New.
3689 (new_sese, free_sese, sese_build_livein_liveouts): Declared.
3690 (struct scop): Added field liveout_renames.
3691 (SCOP_LIVEOUT_RENAMES): New.
3693 2008-12-11 Sebastian Pop <sebastian.pop@amd.com>
3695 PR tree-optimization/38409
3696 * gcc.dg/graphite/pr38409.c: New.
3697 * graphite.c (nb_reductions_in_loop): Use simple_iv.
3699 2008-12-11 Sebastian Pop <sebastian.pop@amd.com>
3701 * graphite.c (gcc_type_for_cloog_iv): By default return
3703 (graphite_create_new_loop): Don't fold_convert the already
3704 fold_convert-ed expression.
3706 2008-12-11 Harsha Jagasia <harsha.jagasia@amd.com>
3708 PR tree-optimization/38446
3709 * gcc.dg/graphite/pr38446.c: New.
3710 * graphite.c (register_bb_in_sese): New.
3711 (bb_in_sese_p): Check if bb belongs to sese region by explicitly
3712 looking at the bbs in the region.
3713 * graphite.h (sese): Add region_basic_blocks pointer set to
3714 structure and initialize at the time of defining new scop.
3716 2008-12-11 Tobias Grosser <grosser@fim.uni-passau.de>
3718 * graphite.c (new_graphite_bb): Initialize GBB_STATIC_SCHEDULE.
3719 (find_params_in_bb): Do not free data refs.
3720 (free_graphite_bb): Add FIXME on disabled free_data_refs.
3722 2008-12-11 Sebastian Pop <sebastian.pop@amd.com>
3724 * testsuite/gcc.dg/graphite/scop-16.c: Test only scop specific info.
3725 * testsuite/gcc.dg/graphite/scop-17.c: Same.
3726 * testsuite/gcc.dg/graphite/block-5.c: New.
3727 * testsuite/gcc.dg/graphite/block-6.c: New.
3728 * testsuite/gcc.dg/graphite/pr37485.c: Clean dump file after.
3729 * testsuite/gcc.dg/graphite/pr37684.c: Same.
3730 * testsuite/gcc.dg/graphite/block-2.c: Same.
3732 * graphite.c (struct ivtype_map_elt): New.
3733 (debug_ivtype_elt, debug_ivtype_map_1, debug_ivtype_map,
3734 new_ivtype_map_elt, ivtype_map_elt_info, eq_ivtype_map_elts,
3735 gcc_type_for_cloog_iv): New.
3736 (loop_iv_stack_patch_for_consts): Use the type of the induction
3737 variable from the original loop, except for the automatically
3738 generated loops, i.e., in the case of a strip-mined loop, in
3739 which case there is no original loop: in that case just use
3741 (new_graphite_bb): Initialize GBB_CLOOG_IV_TYPES.
3742 (free_graphite_bb): Free GBB_CLOOG_IV_TYPES.
3743 (clast_name_to_gcc): Accept params to be NULL.
3744 (clast_to_gcc_expression): Take an extra parameter for the type.
3745 Convert to that type all the expressions built by this function.
3746 (gcc_type_for_clast_expr, gcc_type_for_clast_eq): New.
3747 (graphite_translate_clast_equation): Compute the type of the
3748 clast_equation before translating its LHS and RHS.
3749 (clast_get_body_of_loop, gcc_type_for_iv_of_clast_loop): New.
3750 (graphite_create_new_loop): Compute the type of the induction
3751 variable before translating the lower and upper bounds and before
3752 creating the induction variable.
3753 (rename_variables_from_edge, rename_phis_end_scop): New.
3754 (copy_bb_and_scalar_dependences): Call rename_phis_end_scop.
3755 (sese_add_exit_phis_edge): Do not use integer_zero_node.
3756 (find_cloog_iv_in_expr, compute_cloog_iv_types_1,
3757 compute_cloog_iv_types): New.
3758 (gloog): Call compute_cloog_iv_types before starting the
3759 translation of the clast.
3761 * graphite.h (struct graphite_bb): New field cloog_iv_types.
3762 (GBB_CLOOG_IV_TYPES): New.
3763 (debug_ivtype_map): Declared.
3764 (oldiv_for_loop): New.
3766 2008-12-10 Tobias Grosser <grosser@fim.uni-passau.de>
3769 * graphite.c (new_scop): Initialize SCOP_ADD_PARAMS.
3770 (param_index): Assert if parameter is not know after parameter
3772 (find_params_in_bb): Detect params directly in GBB_CONDITIONS.
3773 (find_scop_parameters): Mark, that we have finished parameter
3775 (graphite_transform_loops): Move condition detection before parameter
3777 * graphite.h (struct scop): Add SCOP_ADD_PARAMS.
3778 * testsuite/gfortran.dg/graphite/pr38459.f90: New.
3780 2008-12-09 Tobias Grosser <grosser@fim.uni-passau.de>
3782 * graphite.c (graphite_transform_loops): Always call find_transform ()
3783 in ENABLE_CHECKING. So we test these code paths, even if we do not
3786 2008-12-09 Tobias Grosser <grosser@fim.uni-passau.de>
3788 * graphite.c (print_graphite_bb): Fix printing to file != dump_file.
3789 (print_scop): Ditto.
3791 2008-12-08 Tobias Grosser <grosser@fim.uni-passau.de>
3794 Fix testsuite/gfortran.dg/graphite/id-3.f90.
3795 * graphite.c (scopdet_basic_block_info): Fix bug that found some
3796 regions more than once.
3798 2008-12-03 Sebastian Pop <sebastian.pop@amd.com>
3800 Fix testsuite/gfortran.dg/graphite/id-4.f90.
3801 * graphite.c (scan_tree_for_params): Do not compute the multiplicand
3804 2008-12-03 Sebastian Pop <sebastian.pop@amd.com>
3806 Fix testsuite/gfortran.dg/graphite/id-1.f90.
3807 * graphite.c (gmp_cst_to_tree): Pass the type in parameter.
3808 (loop_iv_stack_patch_for_consts): Update use of gmp_cst_to_tree.
3809 (max_precision_type): New.
3810 (value_clast): Removed.
3811 (clast_to_gcc_expression): Be more careful to types of expressions.
3812 Use max_precision_type and update use of gmp_cst_to_tree.
3813 (graphite_translate_clast_equation): Use max_precision_type.
3814 (graphite_create_guard_cond_expr): Do not use integer_type_node,
3815 use the type of the condition.
3816 (graphite_create_new_loop): Do not use integer_type_node, use the
3817 max_precision_type of lb and ub.
3819 2008-12-03 Sebastian Pop <sebastian.pop@amd.com>
3821 * graphite.c (build_scops_1): Initialize open_scop.exit
3824 2008-12-02 Sebastian Pop <sebastian.pop@amd.com>
3826 * testsuite/gcc.dg/graphite/pr38084.c: New.
3827 * testsuite/gfortran.dg/graphite/id-1.f90: New.
3828 * testsuite/gfortran.dg/graphite/id-2.f90: New.
3829 * testsuite/gfortran.dg/graphite/id-3.f90: New.
3830 * testsuite/gfortran.dg/graphite/id-4.f90: New.
3831 * testsuite/gfortran.dg/graphite/pr37857.f90: New.
3833 2008-12-02 Sebastian Pop <sebastian.pop@amd.com>
3834 Jan Sjodin <jan.sjodin@amd.com>
3835 Harsha Jagasia <harsha.jagasia@amd.com>
3847 * testsuite/gcc.dg/graphite/pr38073.c: New.
3848 * testsuite/gcc.dg/graphite/pr37928.c: New.
3849 * testsuite/gcc.dg/graphite/pr37883.c: New.
3850 * testsuite/gcc.dg/graphite/pr38125.c: New.
3851 * testsuite/gfortran.dg/graphite/pr38083.f90: New.
3852 * testsuite/gfortran.dg/graphite/pr37852.f90: New.
3853 * testsuite/gfortran.dg/graphite/pr37980.f90: New.
3855 * testsuite/gcc.dg/graphite/scop-18.c: Remove reduction, test for
3856 the number of detected scops. Copy exact same test for loop
3858 * testsuite/gcc.dg/graphite/block-1.c: Fix the number of expected
3859 loops to be blocked as reductions are not handled.
3860 * testsuite/gcc.dg/graphite/block-4.c: ...here. New.
3862 * tree-phinodes.c (remove_phi_nodes): New, extracted from...
3863 * tree-cfg.c (remove_phi_nodes_and_edges_for_unreachable_block):
3865 * tree-flow.h (remove_phi_nodes, canonicalize_loop_ivs): Declared.
3866 * Makefile.in (graphite.o): Depend on value-prof.h.
3867 (graphite.o-warn): Removed -Wno-error.
3868 * tree-parloops.c (canonicalize_loop_ivs): Allow reduction_list
3869 to be a NULL pointer. Call update_stmt. Return the newly created
3870 cannonical induction variable.
3872 * graphite.h (debug_rename_map): Declared. Fix some comments.
3874 * graphite.c: Reimplement the code generation from graphite to gimple.
3875 Include value-prof.h.
3876 (loop_iv_stack_get_iv): Do not return NULL for constant substitutions.
3877 (get_old_iv_from_ssa_name): Removed.
3878 (graphite_stmt_p): New.
3879 (new_graphite_bb): Test for useful statements before building a
3880 graphite statement for the basic block.
3881 (free_graphite_bb): Do not free GBB_DATA_REFS: this is a bug
3882 in free_data_ref that calls BITMAP_FREE (DR_VOPS (dr)) without
3884 (recompute_all_dominators, graphite_verify,
3885 nb_reductions_in_loop, graphite_loop_normal_form): New.
3886 (scop_record_loop): Call graphite_loop_normal_form.
3887 (build_scop_loop_nests): Iterate over all the blocks of the
3888 function instead of relying on the incomplete information from
3889 SCOP_BBS. Return the success of the operation.
3890 (find_params_in_bb): Use the data from GBB_DATA_REFS.
3891 (add_bb_domains): Removed.
3892 (build_loop_iteration_domains): Don't call add_bb_domains.
3893 Add the iteration domain only to the basic blocks that have been
3894 translated to graphite.
3895 (build_scop_conditions_1): Add constraints only if the basic
3896 block have been translated to graphite.
3897 (build_scop_data_accesses): Completely disabled until data
3898 dependence is correctly implemented.
3899 (debug_rename_elt, debug_rename_map_1, debug_rename_map): New.
3900 (remove_all_edges_1, remove_all_edges): Removed.
3901 (get_new_name_from_old_name): New.
3902 (graphite_rename_variables_in_stmt): Renamed
3903 rename_variables_in_stmt. Call get_new_name_from_old_name.
3904 Use replace_exp and update_stmt.
3905 (is_old_iv): Renamed is_iv.
3906 (expand_scalar_variables_stmt): Extra parameter for renaming map.
3907 Use replace_exp and update_stmt.
3908 (expand_scalar_variables_expr): Same. Use the map to get the
3909 new names for the renaming of induction variables and for the
3910 renaming of variables after a basic block has been copied.
3911 (expand_scalar_variables): Same.
3912 (graphite_rename_variables): Renamed rename_variables.
3913 (move_phi_nodes): Removed.
3914 (get_false_edge_from_guard_bb): New.
3915 (build_iv_mapping): Do not insert the induction variable of a
3916 loop in the renaming iv map if the basic block does not belong
3918 (register_old_new_names, graphite_copy_stmts_from_block,
3919 copy_bb_and_scalar_dependences): New.
3920 (translate_clast): Heavily reimplemented: copy basic blocks,
3921 do not move them. Finally, in call cleanup_tree_cfg in gloog.
3922 At each translation step call graphite_verify ensuring the
3923 consistency of the SSA, loops and dominators information.
3924 (collect_virtual_phis, find_vdef_for_var_in_bb,
3925 find_vdef_for_var_1, find_vdef_for_var,
3926 patch_phis_for_virtual_defs): Removed huge hack.
3927 (mark_old_loops, remove_dead_loops, skip_phi_defs,
3928 collect_scop_exit_phi_args, patch_scop_exit_phi_args,
3929 gbb_can_be_ignored, scop_remove_ignoreable_gbbs, ): Removed.