1 2009-10-17 Sebastian Pop <sebastian.pop@amd.com>
3 * graphite-dependences.c (pddr_transformed_scattering): New.
4 (dot_original_deps_stmt_1): New.
5 (dot_transformed_deps_stmt_1): New.
6 (dot_deps_stmt_1): Call dot_original_deps_stmt_1 and
7 dot_transformed_deps_stmt_1.
8 (dot_original_deps): New.
9 (dot_transformed_deps): New.
10 (dot_deps_1): Call dot_original_deps and dot_transformed_deps.
12 2009-10-17 Sebastian Pop <sebastian.pop@amd.com>
14 * graphite-dependences.c (reduction_dr_1): Remove wrong
15 assert: reduction BBs can have multiple reduction writes
16 to memory. interchange-3.f90 is an example.
18 2009-10-17 Sebastian Pop <sebastian.pop@amd.com>
20 * gfortran.dg/graphite/interchange-3.f90: New.
22 2009-10-17 Sebastian Pop <sebastian.pop@amd.com>
24 * gcc.dg/graphite/interchange-1.c: Un-XFAILed.
26 2009-10-17 Sebastian Pop <sebastian.pop@amd.com>
28 * graphite-dependences.c (dependence_polyhedron_1): Add the
29 context to the dependence polyhedron.
31 2009-10-17 Sebastian Pop <sebastian.pop@amd.com>
33 * graphite-poly.c (pbb_remove_duplicate_pdrs): Initialize
34 PBB_PDR_DUPLICATES_REMOVED.
37 2009-10-17 Sebastian Pop <sebastian.pop@amd.com>
39 * graphite-sese-to-poly.c (find_scop_parameters): Initialize
41 (build_loop_iteration_domains): Extract bounds on parameters
42 based on the data size.
43 (build_scop_context): Do not initialize SCOP_CONTEXT;
46 2009-10-17 Sebastian Pop <sebastian.pop@amd.com>
48 * graphite-ppl.c (ppl_min_for_le_polyhedron): New.
49 * graphite-ppl.h (graphite-ppl.h): Declared.
51 2009-10-17 Sebastian Pop <sebastian.pop@amd.com>
53 * graphite-ppl.c (ppl_print_linear_expr): New.
54 (debug_ppl_linear_expr): New.
55 * graphite-ppl.h (ppl_print_linear_expr): Declared.
56 (debug_ppl_linear_expr): Declared.
58 2009-10-16 Sebastian Pop <sebastian.pop@amd.com>
60 * graphite-interchange.c: Fix comments.
61 * gcc.dg/graphite/block-1.c: Fix comments.
63 2009-10-16 Sebastian Pop <sebastian.pop@amd.com>
65 * gcc.dg/graphite/interchange-7.c: Un-XFAILed.
66 * gcc.dg/graphite/interchange-9.c: Un-XFAILed.
68 2009-10-16 Sebastian Pop <sebastian.pop@amd.com>
70 Reapply the patch from Alexander Monakov that disappeared during
71 the last merges from trunk.
73 2009-09-16 Alexander Monakov <amonakov@ispras.ru>
75 * graphite-sese-to-poly.c (pdr_add_data_dimensions): Add bounds only
76 for ARRAY_REFs. Use array_ref_{low,up}_bound to determine bounds.
78 2009-10-15 Sebastian Pop <sebastian.pop@amd.com>
80 * graphite-interchange.c (memory_stride_in_loop): The depth
81 argument corresponds to a dynamic time dimension, so use
82 psct_dynamic_dim to refer to the transformed scattering dimension.
84 2009-10-15 Sebastian Pop <sebastian.pop@amd.com>
86 * graphite-interchange.c (memory_stride_in_loop): Fix comments.
88 2009-10-15 Sebastian Pop <sebastian.pop@amd.com>
90 * graphite-blocking.c (lst_do_strip_mine): Avoid strip mining the
92 * graphite-interchange.c (lst_do_interchange): Avoid interchanging
94 * graphite-poly.c (scop_to_lst): Fix LST sequence in an outermost
96 (print_lst): Print the root of LST in a different format.
97 * graphite-poly.h (lst_depth): Adjust to include the root of the LST.
99 2009-10-15 Sebastian Pop <sebastian.pop@amd.com>
101 * graphite-poly.c (print_scop): Fix pretty printing of a SCoP.
103 2009-10-15 Sebastian Pop <sebastian.pop@amd.com>
105 * doc/passes.texi: Document the Graphite infrastructure.
107 2009-10-15 Sebastian Pop <sebastian.pop@amd.com>
109 * graphite-sese-to-poly.c (insert_copyin): Use gsi_insert_seq_on_edge.
110 (rewrite_commutative_reductions_out_of_ssa): Call gsi_commit_edge_inserts,
111 and check the SSA representation.
113 * gfortran.dg/graphite/id-18.f90: New, reduced from PR41193.
115 2009-10-15 Sebastian Pop <sebastian.pop@amd.com>
117 * gcc.dg/graphite/pr40157.c: Use -floop-block as reported in the PR.
119 2009-10-14 Sebastian Pop <sebastian.pop@amd.com>
121 * gcc.dg/graphite/interchange-11.c: New.
123 2009-10-14 Sebastian Pop <sebastian.pop@amd.com>
125 * gcc.dg/graphite/interchange-8.c: Enable loop interchange.
127 2009-10-14 Sebastian Pop <sebastian.pop@amd.com>
129 * gcc.dg/graphite/graphite.exp (DEFAULT_CFLAGS_GRAPHITE_BLOCK):
130 Add -fno-loop-strip-mine and -fno-loop-interchange.
131 (DEFAULT_FLAGS_GRAPHITE_INTERCHANGE): Add -fno-loop-block and
132 -fno-loop-strip-mine.
133 * gfortran.dg/graphite/graphite.exp: Same.
135 2009-10-14 Sebastian Pop <sebastian.pop@amd.com>
137 * gcc.dg/graphite/graphite.exp (DEFAULT_CFLAGS_GRAPHITE_BLOCK):
138 Renamed DEFAULT_FLAGS_GRAPHITE_BLOCK.
139 (DEFAULT_CFLAGS_GRAPHITE_IDENTITY): Renamed
140 DEFAULT_FLAGS_GRAPHITE_IDENTITY.
141 (DEFAULT_CFLAGS_GRAPHITE_INTERCHANGE): Renamed
142 DEFAULT_FLAGS_GRAPHITE_INTERCHANGE.
143 (DEFAULT_CFLAGS_GRAPHITE_SCOP): Renamed
144 DEFAULT_FLAGS_GRAPHITE_SCOP.
145 (DEFAULT_CFLAGS_RUN_ID): Renamed DEFAULT_FLAGS_RUN_ID.
146 (DEFAULT_CFLAGS_GRAPHITE): Renamed DEFAULT_FLAGS_GRAPHITE.
148 2009-10-14 Sebastian Pop <sebastian.pop@amd.com>
150 * graphite-poly.c (pbb_number_of_iterations_at_time): Cleanup comments.
152 2009-10-14 Konrad Trifunovic <konrad.trifunovic@gmail.com>
153 Sebastian Pop <sebastian.pop@amd.com>
155 * graphite-interchange.c (build_linearized_memory_access): Pass an
157 (memory_stride_in_loop): Include transform scattering in the
158 access functions to be able to querry the strides in the
160 (pbb_interchange_loop_depths): Interchange the psct_dynamic_dim,
161 not the psct_iterator_dim.
163 2009-10-14 Sebastian Pop <sebastian.pop@amd.com>
165 * graphite-blocking.c (pbb_do_strip_mine): Removed.
166 (lst_do_strip_mine_loop): New.
167 (lst_do_strip_mine): New.
168 (scop_do_strip_mine): Call lst_do_strip_mine.
169 * graphite-poly.h (lst_add_loop_under_loop): New.
170 (lst_find_first_pbb): New.
172 2009-10-14 Sebastian Pop <sebastian.pop@amd.com>
174 * graphite-poly.c (loop_to_lst): Fix LST creation.
176 2009-10-14 Tobias Grosser <grosser@fim.uni-passau.de>
178 * testsuite/gcc.dg/graphite/id-15.c: (8 * 8) replaced with
179 sizeof(unsigned long) to make it run on 32bit systems.
181 2009-10-14 Tobias Grosser <grosser@fim.uni-passau.de>
183 * testsuite/gcc.dg/graphite/run-id-1.c: Use smaller matrix to not
186 2009-10-14 Ramakrishna Upadrasta <Ramakrishna.Upadrasta@inria.fr>
188 * graphite-sese-to-poly.c (write_alias_graph_to_ascii_dimacs): Fix
190 (write_alias_graph_to_ascii_dot): New.
191 (write_alias_graph_to_ascii_ecc): Ditto.
192 (partition_drs_to_sets): Add testing of optimality of current method
193 which assigns alias numbers according to DFS Comopnent number. used
194 as heuristic for the upcoming ECC algorithm.
195 (build_scop_drs): Write to file also with the ecc and dot format.
197 2009-10-13 Sebastian Pop <sebastian.pop@amd.com>
199 * gfortran.dg/graphite/interchange-1.f: XFail.
201 2009-10-13 Sebastian Pop <sebastian.pop@amd.com>
203 * graphite.c (graphite_initialize): Do not handle functions with
204 more than 100 basic blocks.
206 2009-10-13 Sebastian Pop <sebastian.pop@amd.com>
208 * graphite-blocking.c (pbb_do_strip_mine): Use
209 PARAM_LOOP_BLOCK_TILE_SIZE.
211 2009-10-13 Sebastian Pop <sebastian.pop@amd.com>
213 * graphite-poly.c (dot_lst_1): New.
215 * graphite-poly.h (dot_lst): Declared.
217 2009-10-13 Sebastian Pop <sebastian.pop@amd.com>
219 * graphite-dependences.c (dot_deps_stmt_1): New.
220 (dot_deps_stmt): New.
221 * graphite-dependences.h (dot_deps_stmt): Declared.
223 2009-10-09 Sebastian Pop <sebastian.pop@amd.com>
225 * graphite-sese-to-poly.c (rewrite_cross_bb_scalar_dependence): Do
226 not replace cross BB scalar dependences ending on PHI nodes.
227 (rewrite_cross_bb_scalar_deps): Filter out GIMPLE_PHI nodes.
229 2009-10-09 Sebastian Pop <sebastian.pop@amd.com>
231 * graphite-poly.c (apply_poly_transforms): Implement the high
232 level driver for flag_loop_block.
233 * tree-ssa-loop.c (gate_graphite_transforms): Remove call to sorry for
236 * gcc.dg/graphite/graphite.exp (DEFAULT_CFLAGS_GRAPHITE_BLOCK): Add
238 * gfortran.dg/graphite/graphite.exp (DEFAULT_CFLAGS_GRAPHITE_BLOCK):
241 2009-10-09 Sebastian Pop <sebastian.pop@amd.com>
243 * graphite-poly.h (lst_find_pbb): New.
244 (find_lst_loop): New.
246 2009-10-09 Sebastian Pop <sebastian.pop@amd.com>
248 * graphite-poly.c (new_scop): Remove init of SCOP_DEP_GRAPH.
249 * graphite-poly.h (struct scop): Remove dep_graph field.
250 (SCOP_DEP_GRAPH): Removed.
252 2009-10-09 Sebastian Pop <sebastian.pop@amd.com>
254 * graphite-poly.h (copy_lst): Do full copy of LST.
256 2009-10-07 Sebastian Pop <sebastian.pop@amd.com>
258 * graphite-sese-to-poly.c (reduction_phi_p): Call remove_invariant_phi
259 when the loop stride is zero.
261 * gcc.dg/graphite/id-16.c: New.
263 2009-10-06 Sebastian Pop <sebastian.pop@amd.com>
265 * graphite-dependences.c (reduction_dr_1): New.
266 (reduction_dr_p): New.
267 (graphite_legal_transform_dr): Call reduction_dr_p.
268 (reduction_ddr): Renamed reduction_ddr_p.
269 * graphite-poly.h (same_pdr_p): New.
270 (number_of_write_pdrs): New.
271 * graphite-sese-to-poly.c (nb_data_writes_in_bb): New.
272 (split_reduction_stmt): Do not split reduction statements
273 when there are no writes to memory.
274 (translate_scalar_reduction_to_array_for_stmt): Insert the
275 memory reduction statement just after the scalar reduction statement.
277 * gcc.dg/graphite/interchange-10.c: Updated to differ from interchange-4.c.
279 * gcc.dg/graphite/interchange-3.c: Un-XFAIL-ed.
280 * gcc.dg/graphite/interchange-4.c: Un-XFAIL-ed.
282 2009-10-06 Sebastian Pop <sebastian.pop@amd.com>
284 * graphite-interchange.c (lst_apply_interchange): New.
285 (lst_interchange_profitable_p): New.
286 (lst_try_interchange_loops): New.
287 (lst_try_interchange): New.
288 (lst_do_interchange): New.
289 (pbb_do_interchange): Removed.
290 (scop_do_interchange): Call lst_do_interchange.
292 2009-10-06 Sebastian Pop <sebastian.pop@amd.com>
294 * graphite-poly.c (print_scop): Print SCOP_ORIGINAL_SCHEDULE and
295 SCOP_TRANSFORMED_SCHEDULE.
300 * graphite-poly.h (lst_p): New.
303 (LST_LOOP_FATHER): New.
306 (scop_to_lst): Declared.
307 (print_lst): Declared.
308 (debug_lst): Declared.
313 (lst_dewey_number): New.
314 (struct scop): Add original_schedule and transformed_schedule fields.
315 (SCOP_ORIGINAL_SCHEDULE): New.
316 (SCOP_TRANSFORMED_SCHEDULE): New.
317 * graphite-sese-to-poly.c (build_poly_scop): Call scop_to_lst.
319 2009-10-05 Sebastian Pop <sebastian.pop@amd.com>
321 * graphite-dependences.c (reduction_ddr): New.
322 (graphite_legal_transform_bb): Call reduction_ddr.
323 * graphite-poly.c (new_poly_bb): Pass a new bool parameter.
324 Initialize PBB_IS_REDUCTION.
325 * graphite-poly.h (struct poly_bb): New bool field is_reduction.
326 (PBB_IS_REDUCTION): New.
327 (new_poly_bb): Update declaration.
328 * graphite-scop-detection.h (build_scop_bbs): Removed.
329 (nb_reductions_in_loop): Removed.
330 * graphite-sese-to-poly.c (try_generate_gimple_bb): Pass a sbitmap
331 parameter for reductions.
332 (try_generate_gimple_bb): Update call to new_poly_bb.
333 (build_scop_bbs_1): Same.
334 (build_scop_bbs): Same.
335 (gsi_for_phi_node): New.
336 (scalar_close_phi_node_p): Remove gcc_assert.
337 (split_reduction_stmt): New.
338 (is_reduction_operation_p): New.
339 (phi_contains_arg): New.
340 (follow_ssa_with_commutative_ops): New.
341 (detect_commutative_reduction_arg): New.
342 (detect_commutative_reduction_assign): New.
343 (follow_inital_value_to_phi): New.
344 (edge_initial_value_for_loop_phi): New.
345 (initial_value_for_loop_phi): New.
346 (detect_commutative_reduction): New.
347 (translate_scalar_reduction_to_array_for_stmt): New.
348 (insert_copyout): New.
349 (insert_copyin): New.
350 (translate_scalar_reduction_to_array): New.
351 (rewrite_commutative_reductions_out_of_ssa_close_phi): New.
352 (rewrite_commutative_reductions_out_of_ssa_loop): New.
353 (rewrite_commutative_reductions_out_of_ssa): New.
354 (build_poly_scop): Call rewrite_commutative_reductions_out_of_ssa.
355 * sese.h (split_region_for_bb): New.
357 * gcc.dg/graphite/graphite.exp (DEFAULT_CFLAGS_GRAPHITE_BLOCK): Add -ffast-math.
358 * gcc.dg/graphite/interchange-1.c: Fix format.
359 * gcc.dg/graphite/interchange-10.c: New.
361 2009-10-05 Sebastian Pop <sebastian.pop@amd.com>
363 * graphite-sese-to-poly.c (insert_out_of_ssa_copy): Remove
366 2009-10-05 Sebastian Pop <sebastian.pop@amd.com>
368 * graphite-sese-to-poly.c (scev_analyzable_p): New.
369 (rewrite_cross_bb_scalar_dependence): New.
370 (rewrite_cross_bb_scalar_deps): New.
371 (rewrite_reductions_out_of_ssa): Use bb_in_sese_p.
372 Call rewrite_cross_bb_scalar_deps.
374 2009-10-05 Sebastian Pop <sebastian.pop@amd.com>
376 * graphite-sese-to-poly.c (gsi_for_ssa_name_def): Removed.
377 (insert_out_of_ssa_copy): Directly use gsi_after_labels and
380 2009-10-05 Sebastian Pop <sebastian.pop@amd.com>
382 * graphite-clast-to-gimple.c (build_cloog_prog): Use pbb_index.
383 * graphite-interchange.c (pbb_do_interchange): Same.
384 * graphite-poly.c (print_scattering_function): Same.
386 * graphite-poly.h (pbb_loop): New.
387 * graphite-sese-to-poly.c (create_linear_expr_from_tree): Use pbb_loop.
389 2009-09-27 Sebastian Pop <sebastian.pop@amd.com>
391 * graphite-scop-detection.c (limit_scops): Do not build poly_bbs.
393 2009-09-27 Sebastian Pop <sebastian.pop@amd.com>
395 * graphite-sese-to-poly.c (partition_drs_to_sets): Drs is not modified,
396 so don't pass a pointer to it.
397 (build_alias_set_for_drs): Same.
398 (build_base_obj_set_for_drs): Same.
399 (build_scop_drs): Same.
401 2009-09-26 Li Feng <nemokingdom@gmail.com>
403 * graphite-sese-to-poly.c (build_scop_drs): Disable writing to file
404 the alias graph of data references.
406 2009-09-25 Li Feng <nemokingdom@gmail.com>
408 * graphite-sese-to-poly.c (write_alias_graph_to_ascii_dimacs): New.
409 (build_scop_drs): When debugging, write the alias graph to file,
410 otherwise, should be disabled.
412 2009-09-17 Sebastian Pop <sebastian.pop@amd.com>
414 * graphite-scop-detection.c (stmt_simple_memref_p): Removed.
415 (is_simple_operand): Remove call to stmt_simple_memref_p.
416 (stmt_simple_for_scop_p): Update call to is_simple_operand.
418 2009-09-17 David Edelsohn <edelsohn@gnu.org>
420 * testsuite/gcc.dg/graphite/interchange-mvt.c: New File.
421 * testsuite/gcc.dg/graphite/scop-dsyrk.c: New File.
422 * testsuite/gcc.dg/graphite/scop-dsyr2k.c: New File.
423 * testsuite/gcc.dg/graphite/scop-mvt.c: New File.
424 * testsuite/gcc.dg/graphite/scop-sor.c: New File.
426 2009-09-17 Li Feng <nemokingdom@gmail.com>
429 * graphite-dependences.c (poly_drs_may_alias_p): Adjust definition.
430 (pddr_original_scattering): Make sure 2 pdr2 in the same base object set.
431 (graphite_carried_dependence_level_k): Ditto.
432 * graphite-poly.c (new_poly_dr): Add init of PDR_BASE_OBJECT_SET.
433 * graphite-poly.h (struct poly_dr): Add member dr_base_object_set.
434 (new_poly_dr): Adjust declaration.
435 * graphite-sese-to-poly.c (free_data_refs_aux): New.
436 (free_gimple_bb): Added free_data_refs_aux.
437 (build_poly_dr): Add dr_base_object_set.
438 (partition_drs_to_sets): New.
439 (dr_same_base_object_p): New.
440 (build_alias_set_for_drs): New.
441 (build_base_object_set_for_drs): New.
442 (build_scop_drs): Add build_base_obj_set_for_drs.
443 * graphite-sese-to-poly.h: Added #define for alias set number index and
444 base object set index.
445 * libgomp/testsuite/libgomp.graphite/force-parallel-6.c: Refine tests.
446 * libgomp/testsuite/libgomp.graphite/pr4118.c: New.
448 2009-09-16 Alexander Monakov <amonakov@ispras.ru>
450 * graphite-sese-to-poly.c (pdr_add_data_dimensions): Add bounds only
451 for ARRAY_REFs. Use array_ref_{low,up}_bound to determine bounds.
453 2009-09-14 Sebastian Pop <sebastian.pop@amd.com>
455 * graphite-sese-to-poly.c (struct irp_data): Removed.
456 (idx_record_params): Removed.
457 (find_params_in_bb): Scan for parameters the access functions; don't
458 parse the tree representation.
460 2009-09-14 Sebastian Pop <sebastian.pop@amd.com>
462 * tree-ssa-loop.c (gate_graphite_transforms): Disable Graphite
463 passes at -O1 and below.
465 2009-09-14 Sebastian Pop <sebastian.pop@amd.com>
467 * graphite-blocking.c: Fix order of includes: tree-chrec.h, then
468 tree-scalar-evolution.h, and then tree-data-ref.h.
469 * graphite-clast-to-gimple.c: Same.
470 * graphite-dependences.c: Same.
471 * graphite-interchange.c: Same.
472 * graphite-poly.c: Same.
473 * graphite-scop-detection.c: Same.
474 * graphite-sese-to-poly.c: Same.
476 * lambda-code.c: Same.
477 * matrix-reorg.c: Same.
478 * tree-data-ref.c: Same.
479 * tree-if-conv.c: Same.
480 * tree-loop-distribu: Same.: Same.
481 * tree-loop-linear.c: Same.
482 * tree-parloops.c: Same.
483 * tree-predcom.c: Same.
484 * tree-vect-patterns.c: Same.
486 2009-09-02 Sebastian Pop <sebastian.pop@amd.com>
488 Partially revert the previous patch, except the following.
489 * tree-scalar-evolution.c (instantiate_scev_not): Adapted to pass
490 as parameters the operands of the not expression.
492 2009-09-01 Sebastian Pop <sebastian.pop@amd.com>
494 * tree-scalar-evolution.c (instantiate_scev_assign): New.
495 Do not call analyze_scalar_evolution on assignments.
496 (instantiate_scev_phi): Call analyze_scalar_evolution.
497 (instantiate_scev_name): Call instantiate_scev_assign and
498 instantiate_scev_phi.
499 (instantiate_scev_not): Adapted to pass as parameters the operands
500 of the not expression.
502 2009-09-01 Sebastian Pop <sebastian.pop@amd.com>
504 * tree-scalar-evolution.c (instantiate_scev_binary): Adapted
505 to pass as parameters the operands of the binary expression.
507 2009-09-01 Sebastian Pop <sebastian.pop@amd.com>
509 * tree-scalar-evolution.c (instantiate_scev_bitnot): Renamed
510 instantiate_scev_not. Handle NEGATE_EXPR.
511 (instantiate_scev_r): Handle NEGATE_EXPR.
513 2009-09-01 Sebastian Pop <sebastian.pop@amd.com>
515 * tree-scalar-evolution.c (instantiate_scev_1): Renamed
517 (instantiate_scev_r): Move code in instantiate_scev_2
518 and instantiate_scev_1.
520 2009-09-01 Sebastian Pop <sebastian.pop@amd.com>
522 * tree-scalar-evolution.c (instantiate_scev_3): New.
523 (instantiate_scev_1): Move code in instantiate_scev_3.
525 2009-09-01 Sebastian Pop <sebastian.pop@amd.com>
527 * tree-scalar-evolution.c (instantiate_scev_poly): New.
528 (instantiate_scev_1): Move code in instantiate_scev_poly.
530 2009-09-01 Sebastian Pop <sebastian.pop@amd.com>
532 * tree-scalar-evolution.c (instantiate_scev_bitnot): New.
533 (instantiate_scev_1): Move code in instantiate_scev_bitnot.
535 2009-09-01 Sebastian Pop <sebastian.pop@amd.com>
537 * tree-scalar-evolution.c (instantiate_scev_convert): New.
538 (instantiate_scev_1): Move code in instantiate_scev_convert.
540 2009-09-01 Sebastian Pop <sebastian.pop@amd.com>
542 * tree-scalar-evolution.c (instantiate_scev_binary): New.
543 (instantiate_scev_1): Move code in instantiate_scev_binary.
545 2009-09-01 Sebastian Pop <sebastian.pop@amd.com>
547 * tree-scalar-evolution.c (instantiate_scev_name): New.
548 (instantiate_scev_1): Move code in instantiate_scev_name.
550 2009-08-28 Sebastian Pop <sebastian.pop@amd.com>
552 * Merge from mainline (150992:151171).
554 2009-08-25 Sebastian Pop <sebastian.pop@amd.com>
556 * graphite-dependences.c (graphite_legal_transform_bb): Call
557 pbb_remove_duplicate_pdrs.
558 * graphite-poly.c (can_collapse_pdr): Removed.
559 (pdr_find_duplicate): Removed.
560 (can_collapse_pdrs): New.
561 (pbb_remove_duplicate_pdrs): New.
562 (new_poly_dr): Do not look for duplicates.
563 * graphite-poly.h (struct poly_bb): New field pdr_duplicates_removed.
564 (PBB_PDR_DUPLICATES_REMOVED): New.
565 (pbb_remove_duplicate_pdrs): Declared.
567 2009-08-25 Sebastian Pop <sebastian.pop@amd.com>
569 * graphite-interchange.c (pbb_interchange_profitable_p): Adjust
570 the strides by multiplying by PDR_NB_REFS.
571 * graphite-poly.c (can_collapse_pdr): New.
572 (pdr_find_duplicate): New.
573 (new_poly_dr): Call pdr_find_duplicate. Collapse duplicate PDRs.
574 Initialize PDR_NB_REFS.
575 * graphite-poly.h (struct poly_dr): Add field nb_refs.
577 (new_poly_dr): Number of subscripts is a graphite_dim_t.
579 2009-08-25 Sebastian Pop <sebastian.pop@amd.com>
581 Revert one of the previous commits:
582 * graphite-dependences.c (graphite_legal_transform_bb): Avoid
583 the computation of symmetric data dependence relations.
584 (dependency_between_pbbs_p): Same.
586 2009-08-25 Sebastian Pop <sebastian.pop@amd.com>
589 * graphite-poly.c (apply_poly_transforms): Remove legality test before
592 2009-08-25 Sebastian Pop <sebastian.pop@amd.com>
594 * graphite-dependences.c (pddr_original_scattering): Return NULL
595 for read-read dependence relations.
596 * graphite-poly.h (enum poly_dr_type): Fix comment.
599 (pdr_may_write_p): New.
601 2009-08-25 Sebastian Pop <sebastian.pop@amd.com>
603 * graphite-poly.h (enum POLY_DR_TYPE): Renamed poly_dr_type.
604 (struct poly_dr): Same.
606 * graphite-poly.c (new_poly_dr): Same.
608 2009-08-25 Konrad Trifunovic <konrad.trifunovic@gmail.com>
609 Sebastian Pop <sebastian.pop@amd.com>
611 * graphite-blocking.c (pbb_strip_mine_loop_depth): Renamed
612 pbb_strip_mine_time_depth. Changed the implementation so that
613 transformation is expressed as a transformation on
614 time (scatttering) dimensions. Also, ensures that the 2d+1
615 scheduling format is preserved.
616 (pbb_strip_mine_profitable_p): Profitability is based on the
617 iteration number of a given time (scattering) dimension,
618 and not on a original loop depth dimension.
619 (pbb_strip_mine): Call pbb_number_of_iterations_at_time.
620 (pbb_do_strip_mine): Call psct_dynamic_dim.
621 * graphite-poly.c (pbb_number_of_iterations_at_time): New.
622 * graphite-poly.h (pbb_number_of_iterations_at_time): Declared.
623 (pbb_nb_dynamic_scattering_transform): New.
624 (psct_dynamic_dim): New.
626 2009-08-25 Konrad Trifunovic <konrad.trifunovic@gmail.com>
628 * graphite-ppl.c (ppl_max_for_le): Renamed ppl_max_for_le_pointset.
629 * graphite-ppl.h (ppl_max_for_le): Renamed ppl_max_for_le_pointset.
630 * graphite-poly.c (pbb_number_of_iterations): Rename ppl_max_for_le.
631 * graphite-interchange.c (build_linearized_memory_access): Same.
632 (memory_stride_in_loop): Same.
634 2009-08-25 Sebastian Pop <sebastian.pop@amd.com>
636 * graphite-dependences.c (pddr_original_scattering): New.
637 (graphite_legal_transform_dr): Call pddr_original_scattering.
640 * graphite-dependences.h (dot_deps): Declared.
641 * graphite-poly.c (new_poly_dr): Initialize PDR_ID.
642 (print_pdr): Print PDR_ID.
643 * graphite-poly.h (struct poly_dr): Add field id.
646 * graphite-scop-detection.c (dot_all_scops_1): Cleanup comment.
648 2009-08-22 Sebastian Pop <sebastian.pop@amd.com>
650 * graphite-dependences.c (graphite_carried_dependence_level_k): Do
651 not delete the original dependence relation.
653 2009-08-21 Sebastian Pop <sebastian.pop@amd.com>
655 * graphite-dependences.c (graphite_legal_transform_bb): Avoid
656 the computation of symmetric data dependence relations.
657 (dependency_between_pbbs_p): Same.
659 2009-08-21 Sebastian Pop <sebastian.pop@amd.com>
661 * graphite-dependences.c (new_poly_dr_pair): Renamed new_poly_ddr.
662 (eq_poly_dr_pair_p): Renamed eq_poly_ddr_p.
663 (hash_poly_dr_pair_p): Renamed hash_poly_ddr_p.
664 (free_poly_ddr): New.
665 (pddr_is_empty): New.
666 (dependence_polyhedron_1): Now returns a poly_ddr_p.
667 (dependence_polyhedron): Same. Remove useless gcc_assert.
669 (graphite_legal_transform_dr): Call pddr_is_empty and free_poly_ddr.
670 (graphite_carried_dependence_level_k): Call pddr_is_empty.
671 * graphite-dependences.h (enum poly_dependence_kind): New.
672 (poly_dr_pair): Renamed poly_ddr. Added a field kind.
673 (PDRP_SOURCE): Renamed PDDR_SOURCE.
674 (PDRP_SINK): Renamed PDDR_SINK.
675 (PDRP_DDP): Renamed PDDR_DDP.
677 (free_poly_ddr): Declared.
678 * graphite-poly.c (new_scop): Use the new hash function names.
679 * graphite-poly.h (struct scop): Renamed field original_pdr_pairs
681 (SCOP_ORIGINAL_PDR_PAIRS): Renamed SCOP_ORIGINAL_PDDRS.
683 2009-08-21 Sebastian Pop <sebastian.pop@amd.com>
685 * Merge from mainline (150764:150992).
687 2009-08-18 Sebastian Pop <sebastian.pop@amd.com>
689 * cfgloopmanip.c (create_empty_loop_on_edge): Generate upper
690 bounds with LT_EXPR to make niter analysis more precise on code
691 generated by Graphite.
693 2009-08-18 Sebastian Pop <sebastian.pop@amd.com>
695 * graphite-dependences.c (graphite_legal_transform_dr): Fix formatting.
696 (graphite_legal_transform_bb): Same.
697 (poly_drs_may_alias_p): Same.
699 2009-08-15 Sebastian Pop <sebastian.pop@amd.com>
702 * graphite-ppl.c (ppl_max_for_le): Correct the use of
703 ppl_Pointset_Powerset_C_Polyhedron_maximize.
705 2009-08-13 Sebastian Pop <sebastian.pop@amd.com>
707 * graphite-poly.c (print_pbb): Print PBB index.
709 2009-08-13 Sebastian Pop <sebastian.pop@amd.com>
711 * Merge from mainline (r150672:150764).
713 2009-08-13 Sebastian Pop <sebastian.pop@amd.com>
715 * graphite-interchange.c (ppl_max_for_le): Moved...
716 * graphite-poly.c (pbb_number_of_iterations): Call ppl_max_for_le.
717 * graphite-ppl.c (ppl_max_for_le): ... here.
718 * graphite-ppl.h (ppl_max_for_le): Declared.
720 2009-08-12 Sebastian Pop <sebastian.pop@amd.com>
722 * Merge from mainline (r150372:150672).
724 2009-08-11 Sebastian Pop <sebastian.pop@amd.com>
727 * sese.c (convert_for_phi_arg): New.
728 (add_guard_exit_phis): Use convert_for_phi_arg.
730 * testsuite/gfortran.dg/graphite/id-17.f: New.
732 2009-08-11 Sebastian Pop <sebastian.pop@amd.com>
734 * graphite-sese-to-poly.c (pdr_add_data_dimensions): Dont add
735 unknown subscript upper bounds.
737 * testsuite/gcc.dg/graphite/interchange-6.c: Un-XFAIL.
739 2009-08-11 Sebastian Pop <sebastian.pop@amd.com>
740 Pranav Garg <pranav.garg2107@gmail.com>
742 * graphite-interchange.c (gather_access_strides): Removed.
743 (ppl_max_for_le): New.
744 (build_linearized_memory_access): New.
745 (memory_stride_in_loop): New.
746 (pbb_interchange_profitable_p): Reimplemented.
747 * graphite-ppl.h (ppl_new_id_map): New.
748 (ppl_interchange): New.
750 * testsuite/gcc.dg/graphite/interchange-6.c: XFAILed.
752 2009-08-11 Sebastian Pop <sebastian.pop@amd.com>
754 * graphite-interchange.c (compute_subscript): Removed.
755 (compute_array_size_cstr): Removed.
756 (compute_array_size_poly): Removed.
757 (compute_array_size): Removed.
758 (gather_access_strides_poly): Removed.
759 (gather_access_strides): Empty.
761 2009-08-11 Sebastian Pop <sebastian.pop@amd.com>
763 * graphite-dependences.c (dependence_polyhedron_1): Replace
764 pdr_nb_subscripts with PDR_NB_SUBSCRIPTS.
765 (graphite_legal_transform_dr): Same.
766 (graphite_carried_dependence_level_k): Same.
767 * graphite-poly.c (new_poly_dr): Add a parameter nb_subscripts.
768 Initialize PDR_NB_SUBSCRIPTS.
769 (print_pdr_access_layout): Replace pdr_nb_subscripts with
771 * graphite-poly.h (struct poly_dr): Add nb_subscripts field.
772 (PDR_NB_SUBSCRIPTS): New.
773 (pdr_nb_subscripts): Removed.
774 (pdr_dim): Simplified.
775 * graphite-sese-to-poly.c (build_poly_dr): Replace pdr_nb_subscripts
776 with PDR_NB_SUBSCRIPTS.
778 2009-08-11 Sebastian Pop <sebastian.pop@amd.com>
780 * graphite-interchange.c (compute_array_size): Remove use of
782 * graphite-poly.c (new_poly_dr): Remove argument data_container.
783 Do not initialize PDR_DATA_CONTAINER.
784 (print_pdr): Do not print PDR_DATA_CONTAINER.
785 * graphite-poly.h (struct poly_dr): Remove data_container field.
786 (PDR_DATA_CONTAINER): Removed.
787 * graphite-sese-to-poly.c (pdr_add_data_dimensions): Remove use of
789 (build_poly_dr): Same.
791 2009-08-11 Sebastian Pop <sebastian.pop@amd.com>
793 * testsuite/gcc.dg/graphite/interchange-9.c: New.
795 2009-08-05 Konrad Trifunovic <konrad.trifunovic@gmail.com>
796 Sebastian Pop <sebastian.pop@amd.com>
798 * graphite-dependences.c (graphite_legal_transform_dr): Work on a
799 copy of the dependence polyhedron. Free the temporary objects.
800 (graphite_carried_dependence_level_k): Free unused objects before
803 * testsuite/gcc.dg/graphite/interchange-1.c: XFAILed.
804 * testsuite/gcc.dg/graphite/interchange-2.c: XFAILed.
805 * testsuite/gcc.dg/graphite/interchange-3.c: XFAILed.
806 * testsuite/gcc.dg/graphite/interchange-4.c: XFAILed.
807 * testsuite/gcc.dg/graphite/interchange-7.c: XFAILed.
809 2009-08-05 Sebastian Pop <sebastian.pop@amd.com>
811 * graphite-blocking.c (scop_do_strip_mine): Call store_scattering.
812 Early return without analyzing the data dependences if no
813 transform has been done. Call restore_scattering if the transform
815 (graphite-interchange.c): Same.
816 * graphite-poly.c (print_scattering_function): Test for PBB_TRANSFORMED.
817 (graphite_read_transforms): Initialize PBB_TRANSFORMED.
818 (apply_poly_transforms): Do not gcc_assert that
819 the transform is legal.
820 (new_poly_bb): Initialize PBB_TRANSFORMED, PBB_SAVED, and PBB_ORIGINAL.
821 Do not initialize PBB_NB_SCATTERING_TRANSFORM, PBB_NB_LOCAL_VARIABLES,
822 PBB_TRANSFORMED_SCATTERING, and PBB_ORIGINAL_SCATTERING.
823 (free_poly_dr): Free PBB_TRANSFORMED, PBB_SAVED, and PBB_ORIGINAL.
824 * graphite-poly.h (struct poly_scattering): New.
825 (struct poly_bb): Add original, transformed, and saved fields.
826 Remove transformed_scattering, original_scattering, nb_local_variables,
827 and nb_scattering_transform fields.
828 (PBB_ORIGINAL, PBB_TRANSFORMED, PBB_SAVED): New.
829 (poly_scattering_new): New.
830 (poly_scattering_free): New.
831 (poly_scattering_copy): New.
832 (store_scattering_pbb): New.
833 (store_scattering): New.
834 (restore_scattering_pbb): New.
835 (restore_scattering): New.
836 * graphite-sese-to-poly.c (build_pbb_scattering_polyhedrons):
837 Initialize PBB_TRANSFORMED and PBB_ORIGINAL.
839 2009-08-05 Sebastian Pop <sebastian.pop@amd.com>
841 * graphite-poly.c (print_pbb): Add parentheses in the pretty print.
844 2009-08-05 Sebastian Pop <sebastian.pop@amd.com>
846 * Makefile.in (graphite.o): Depends on PREDICT_H.
847 * graphite.c: Include predict.h.
848 (graphite_finalize): Call tree_estimate_probability.
849 * predict.c (predict_loops): Do not call scev_initialize and
851 (tree_estimate_probability_bb): New.
852 (tree_estimate_probability): Do not initialize loops: move that
853 code to the driver. Call tree_estimate_probability_bb.
854 (tree_estimate_probability_driver): New.
855 (pass_profile): Use tree_estimate_probability_driver.
856 * predict.h (tree_estimate_probability): Declared.
858 2009-08-05 Sebastian Pop <sebastian.pop@amd.com>
860 * graphite-clast-to-gimple.c (gloog): Add time to TV_GRAPHITE_CODE_GEN.
861 * graphite-dependences.c (graphite_legal_transform): Add time to
862 TV_GRAPHITE_DATA_DEPS.
863 (dependency_between_pbbs_p): Same.
864 * timevar.def (TV_GRAPHITE_DATA_DEPS, TV_GRAPHITE_CODE_GEN): New.
866 2009-08-03 Sebastian Pop <sebastian.pop@amd.com>
868 * Merge from mainline (r149952:150372).
870 2009-07-28 Sebastian Pop <sebastian.pop@amd.com>
872 * ChangeLog.graphite: Fix indenting, white spaces and 80 columns.
873 * graphite-blocking.c: Same.
874 * graphite-clast-to-gimple.c: Same.
875 * graphite-dependences.c: Same.
876 * graphite-poly.c: Same.
877 * graphite-poly.h: Same.
878 * graphite-ppl.c: Same.
879 * graphite-scop-detection.c: Same.
880 * graphite-sese-to-poly.c: Same.
883 2009-07-28 Sebastian Pop <sebastian.pop@amd.com>
885 * graphite-sese-to-poly.c (loop_entry_phi_arg): New.
886 (remove_simple_copy_phi): New.
887 (remove_invariant_phi): New.
888 (simple_copy_phi_p): New.
889 (reduction_phi_p): New.
890 (gsi_for_ssa_name_def): New.
891 (insert_out_of_ssa_copy): New.
892 (insert_out_of_ssa_copy_on_edge): New.
893 (create_zero_dim_array): New.
894 (scalar_close_phi_node_p): New.
895 (rewrite_close_phi_out_of_ssa): New.
896 (rewrite_phi_out_of_ssa): New.
897 (rewrite_reductions_out_of_ssa): New.
898 (build_poly_scop): Call rewrite_reductions_out_of_ssa.
900 * testsuite/gcc.dg/graphite/id-11.c: New.
901 * testsuite/gcc.dg/graphite/id-15.c: New.
902 * testsuite/gcc.dg/graphite/interchange-1.c: Un-XFAIL.
903 * testsuite/gcc.dg/graphite/interchange-2.c: Un-XFAIL.
904 * testsuite/gcc.dg/graphite/interchange-3.c: Un-XFAIL.
905 * testsuite/gcc.dg/graphite/interchange-4.c: Un-XFAIL.
906 * testsuite/gcc.dg/graphite/interchange-7.c: Un-XFAIL.
907 * testsuite/gcc.dg/graphite/scop-matmult.c: Un-XFAIL.
908 * testsuite/gfortran.dg/graphite/id-13.f: New.
909 * testsuite/gfortran.dg/graphite/id-5.f: New.
911 2009-07-28 Sebastian Pop <sebastian.pop@amd.com>
913 * graphite-clast-to-gimple.c (graphite_loop_normal_form): Do not
914 check that nb_reductions_in_loop is zero.
915 * graphite-scop-detection.c (harmful_stmt_in_bb): Don't filter out
917 (nb_reductions_in_loop): Removed.
918 (graphite_can_represent_loop): Do not call nb_reductions_in_loop.
919 * graphite-sese-to-poly.c (phi_node_is_iv): Removed.
920 (bb_contains_non_iv_scalar_phi_nodes): Removed.
921 (scop_contains_non_iv_scalar_phi_nodes): Removed.
922 (build_poly_scop): Do not call scop_contains_non_iv_scalar_phi_nodes.
924 2009-07-28 Sebastian Pop <sebastian.pop@amd.com>
926 * graphite-clast-to-gimple.c (build_cloog_prog): Do not code generate
927 statements that have an empty iteration domain.
928 * testsuite/gfortran.dg/graphite/id-16.f: New.
930 2009-07-28 Sebastian Pop <sebastian.pop@amd.com>
932 * tree-scalar-evolution.c (instantiate_scev_1): Return
933 chrec_dont_know when the result is not above instantiate_below.
934 * graphite-scop-detection.c (scopdet_basic_block_info): Fix formatting.
935 * graphite-sese-to-poly.c (create_linear_expr_from_tree): Assert that
936 the tree has a known scalar evolution.
937 * testsuite/gfortran.dg/graphite/id-14.f: New.
938 * testsuite/gfortran.dg/graphite/id-15.f: New.
940 2009-07-28 Sebastian Pop <sebastian.pop@amd.com>
942 * sese.c (rename_variables_in_stmt): Pass in an extra parameter
944 (rename_variables): Keep inserting renames after the ones already
947 2009-07-28 Sebastian Pop <sebastian.pop@amd.com>
949 * graphite-sese-to-poly.c (compare_bb_depths): New.
950 (graphite_sort_dominated_info): New.
951 (build_scop_bbs_1): Call graphite_sort_dominated_info.
952 (build_scop_scattering): Fix comment.
954 2009-07-28 Sebastian Pop <sebastian.pop@amd.com>
956 * graphite.c (graphite_finalize): Call print_loops instead of
957 dump_function_to_file.
958 * testsuite/gcc.dg/graphite/graphite.exp: Fix formatting.
959 * testsuite/gcc.dg/graphite/pr35356-1.c: New. Look for the number of
960 loops generated in the graphite output file.
961 * testsuite/gcc.dg/graphite/pr35356-2.c: New.
962 * testsuite/gcc.dg/graphite/pr35356-3.c: New. XFAILed for now.
963 * testsuite/gfortran.dg/graphite/id-12.f: New.
965 2009-07-24 Li Feng <nemokingdom@gmail.com>
967 * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-8.c:
970 2009-07-24 Li Feng <nemokingdom@gmail.com>
971 Tobias Grosser <grosser@fim.uni-passau.de>
973 * graphite-sese-to-poly.c (pdr_add_alias_set): Use data reference's
974 alias set number build alias in ACCESSES polyhedron.
975 (build_alias_set_for_drs): New.
976 (build_pbb_drs): Added build_alias_set_for_drs.
977 * graphite-dependences.c (poly_drs_may_alias_p): New.
978 (graphite_carried_dependence_level_k): Check alias information
979 before building polyhedron.
981 2009-07-24 Tobias Grosser <grosser@fim.uni-passau.de>
983 * Makefile.in (lambda-code.o): Fix formatting.
985 2009-07-24 Tobias Grosser <grosser@fim.uni-passau.de>
987 * Merge from mainline (r149350-149952)
989 2009-07-18 Tobias Grosser <grosser@fim.uni-passau.de>
991 * graphite-poly.c (apply_poly_transforms): Move strip_mine
992 before interchange to prepare for loop blocking.
994 2009-07-18 Tobias Grosser <grosser@fim.uni-passau.de>
996 * graphite-poly.c (apply_poly_transforms): Add checks after every
998 * graphite-sese-to-poly.c (build_poly_scop): Remove check, as already
999 done in apply_poly_transforms.
1001 2009-07-17 Konrad Trifunovic <konrad.trifunovic@gmail.com>
1003 * graphite-dependences.c (build_lexicographically_gt_constraint):
1004 Replace RES parameter with *RES.
1005 (dependence_polyhedron_1): Pass an address of the parameter RES
1006 instead of value of RES.
1008 2009-07-16 Sebastian Pop <sebastian.pop@amd.com>
1010 * graphite.c (graphite_finalize): Fix comment.
1011 (graphite_transform_loops): Reset scev info after code generation
1014 2009-07-16 Sebastian Pop <sebastian.pop@amd.com>
1016 * graphite.c (graphite_finalize): Call scev_reset.
1018 2009-07-16 Sebastian Pop <sebastian.pop@amd.com>
1020 * graphite-clast-to-gimple.c (compute_cloog_iv_types): Do not create
1021 GBB_CLOOG_IV_TYPES hash table twice.
1022 * graphite-sese-to-poly.c (free_gimple_bb): Call free_data_refs.
1023 (add_condition_to_domain): Clear GMP values.
1025 2009-07-16 Sebastian Pop <sebastian.pop@amd.com>
1027 * graphite-dependences.c: Fix formatting.
1028 * graphite-poly.c (free_poly_dr): Also free PDR_DATA_CONTAINER.
1029 (pbb_number_of_iterations): Free ppl_Linear_Expression.
1030 * graphite-sese-to-poly.c: Fix formatting.
1031 * graphite.c (graphite_transform_loops): Create the hash table
1032 after the early return.
1034 2009-07-16 Sebastian Pop <sebastian.pop@amd.com>
1036 * testsuite/gcc.dg/graphite/id-14.c: New.
1037 * testsuite/gcc.dg/graphite/pr40157.c: New.
1038 * testsuite/gfortran.dg/graphite/id-11.f: New.
1040 2009-07-16 Sebastian Pop <sebastian.pop@amd.com>
1042 * graphite-sese-to-poly.c (nb_pbbs_in_loops): New.
1043 (build_poly_scop): Return false when there are no pbbs within
1044 loops to avoid to pass to cloog scops with no loops.
1046 2009-07-16 Sebastian Pop <sebastian.pop@amd.com>
1048 * graphite-sese-to-poly.c (build_pbb_scattering_polyhedrons): Avoid
1049 useless test "i % 2".
1050 (build_pbb_scattering_polyhedrons): Fix formatting.
1051 (build_poly_dr): Same.
1052 * graphite.c (graphite_transform_loops): Restructure.
1054 2009-07-14 Razya Ladelsky <razya@il.ibm.com>
1056 * tree-ssa-loop-manip.c (rewrite_phi_with_iv): Remove
1057 reduction_list parameter.
1058 (rewrite_all_phi_nodes_with_iv): Same.
1059 (canonicalize_loop_ivs): Same.
1060 * tree-parloops.c (struct brli): Removed.
1061 (build_reduction_list_info): Removed.
1062 (build_new_reduction): New.
1063 (analyze_reduction_list): Removed.
1064 (gather_scalar_reductions): Find reductions instead of phi
1065 nodes that can't be canonicalized.
1066 (try_create_reduction_list): Remove reduction_list parameter.
1067 (gen_parallel_loop): Same.
1068 (parallelize_loops): Remove analyze_reductions variable,
1069 initialization and free.
1070 Change reduction_list htab initialization to reduction_info
1071 elements instead of ssa names.
1072 Call try_create_reduction_list and gen_parallel_loop without
1073 analyzed_reduction argument.
1074 * graphite-clast-to-gimple (graphite_loop_normal_form): Call
1075 canonicalize_loop_ivs with one less argument.
1076 * tree-flow.h (canonicalize_loop_ivs): Remove one argument.
1078 2009-07-14 Konrad Trifunovic <konrad.trifunovic@gmail.com>
1080 * graphite-dependences.c (new_poly_dr_pair): New.
1081 (dependence_polyhedron): Renamed into dependence_polyhedron_1.
1082 (new_poly_dr_pair): New.
1083 (eq_poly_dr_pair_p): New.
1084 (hash_poly_dr_pair_p): New.
1085 * graphite-dependences.h (struct poly_dr_pair): New.
1086 (eq_poly_dr_pair_p): Declared.
1087 (hash_poly_dr_pair_p): Declared.
1088 * graphite-poly.c (new_scop): Initialize SCOP_ORIGINAL_PDR_PAIRS.
1089 (free_scop): Free SCOP_ORIGINAL_PDR_PAIRS.
1090 * graphite-poly.h (struct scop): Add original_pdr_pairs field.
1091 * Makefile.in (graphite-poly.o): Add dependence on
1092 graphite-dependences.h.
1094 2009-07-14 Sebastian Pop <sebastian.pop@amd.com>
1096 * graphite-scop-detection.c (graphite_can_represent_scev): Do not let
1097 polynomials of degree > 1 pass to Graphite.
1098 * tree-chrec.c (scev_is_linear_expression): Call
1099 evolution_function_is_affine_multivariate_p.
1100 * testsuite/gfortran.dg/graphite/id-10.f90: New.
1102 2009-07-14 Sebastian Pop <sebastian.pop@amd.com>
1104 * tree-scalar-evolution.c (compute_overall_effect_of_inner_loop):
1105 Instantiate scevs varying in outer loops.
1106 * testsuite/gfortran.dg/graphite/id-9.f: Correct testcase.
1108 2009-07-14 Sebastian Pop <sebastian.pop@amd.com>
1110 * graphite-sese-to-poly.c (build_loop_iteration_domains): Do not insert
1111 redundant constraint.
1113 2009-07-14 Sebastian Pop <sebastian.pop@amd.com>
1115 * testsuite/gcc.dg/graphite/graphite.exp: Fix comments.
1116 * testsuite/gfortran.dg/graphite/graphite.exp: Trigger actions
1117 based on the file names as in the C testsuite.
1118 * testsuite/gfortran.dg/graphite/block-1.f90: Fix patterns.
1119 * testsuite/gfortran.dg/graphite/block-2.f: Same.
1120 * testsuite/gfortran.dg/graphite/block-3.f90: Same.
1121 * testsuite/gfortran.dg/graphite/block-4.f90: Same.
1122 * testsuite/gfortran.dg/graphite/id-1.f90: Same.
1123 * testsuite/gfortran.dg/graphite/id-2.f90: Same.
1124 * testsuite/gfortran.dg/graphite/id-3.f90: Same.
1125 * testsuite/gfortran.dg/graphite/id-4.f90: Same.
1126 * testsuite/gfortran.dg/graphite/id-6.f: Same.
1127 * testsuite/gfortran.dg/graphite/id-9.f: Same.
1128 * testsuite/gfortran.dg/graphite/interchange-1.f: Same.
1129 * testsuite/gfortran.dg/graphite/interchange-2.f: Same.
1130 * testsuite/gfortran.dg/graphite/scop-1.f: Same.
1132 2009-07-14 Sebastian Pop <sebastian.pop@amd.com>
1134 * sese.c (expand_scalar_variables_call): New.
1135 (expand_scalar_variables_ssa_name): Handle calls in expander.
1137 2009-07-13 Sebastian Pop <sebastian.pop@amd.com>
1139 * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-6.c:
1140 Expect to see the pattern twice.
1141 * testsuite/gcc.dg/graphite/interchange-0.c: Un-XFAIL.
1142 * testsuite/gcc.dg/graphite/interchange-5.c: Same.
1143 * testsuite/gcc.dg/graphite/interchange-6.c: Same.
1145 2009-07-13 Sebastian Pop <sebastian.pop@amd.com>
1147 * testsuite/gcc.dg/graphite/id-10.c: New.
1148 * testsuite/gcc.dg/graphite/id-12.c: New.
1149 * testsuite/gfortran.dg/graphite/id-7.f: New.
1150 * testsuite/gfortran.dg/graphite/id-8.f: New.
1152 2009-07-13 Sebastian Pop <sebastian.pop@amd.com>
1154 * graphite-sese-to-poly.c (pdr_add_data_dimensions): Fix division by
1157 2009-07-13 Sebastian Pop <sebastian.pop@amd.com>
1159 * sese.c (rename_variables_in_stmt): Call fold_convert during renaming.
1161 2009-07-13 Sebastian Pop <sebastian.pop@amd.com>
1163 * sese.c (expand_scalar_variables_stmt): Avoid unnecessary expansion.
1165 2009-07-10 Sebastian Pop <sebastian.pop@amd.com>
1167 * graphite-sese-to-poly.c (pdr_add_memory_accesses): Fix order of
1168 building PDR subscripts.
1170 2009-07-10 Sebastian Pop <sebastian.pop@amd.com>
1172 * graphite-sese-to-poly.c (pdr_add_data_dimensions): Fix the
1173 computation of array sizes.
1175 2009-07-10 Sebastian Pop <sebastian.pop@amd.com>
1177 * graphite-sese-to-poly.c (add_param_constraints): Disabled.
1179 2009-07-10 Tobias Grosser <grosser@fim.uni-passau.de>
1181 * graphite-dependences.c (map_into_dep_poly, map_dr_into_dep_poly,
1182 build_pairwise_constraint, dr_equality_constraints,
1183 build_pairwise_scheduling_equality,
1184 build_pairwise_scheduling_inequality, lexicographically_gt_p,
1185 build_lexicographically_gt_constraint, dependence_polyhedron,
1186 graphite_legal_transform_dr, graphite_carried_dependence_level_k):
1187 Move from NNC_Polyhedron to C_Polyhedron.
1188 * graphite-interchange.c (compute_array_size_poly,
1189 gather_access_strides): Dito.
1190 * graphite-poly.c (apply_poly_transforms, new_poly_dr, free_poly_bb,
1191 free_scop, pbb_number_of_iterations): Dito.
1192 * graphite-poly.h (struct poly_dr, pdr_nb_subscripts, struct poly_bb,
1193 pbb_dim_iter_domain, struct scop): Dito.
1194 * graphite-ppl.c (new_Constraint_System_from_Cloog_Matrix,
1195 new_Cloog_Domain_from_ppl_Polyhedron,
1196 new_Cloog_Domain_from_ppl_Pointset_Powerset, ppl_set_coef_gmp,
1197 ppl_insert_dimensions_pointset, ppl_insert_dimensions_pointset,
1198 ppl_strip_loop, ppl_strip_loop, ppl_print_polyhedron_matrix,
1199 ppl_print_powerset_matrix, debug_ppl_polyhedron_matrix,
1200 debug_ppl_powerset_matrix, ppl_read_polyhedron_matrix): Dito.
1201 * graphite-ppl.h (ppl_Pointset_Powerset_C_Polyhedron_t,
1202 new_C_Polyhedron_from_Cloog_Matrix, ppl_print_powerset_matrix,
1203 debug_ppl_powerset_matrix, ppl_insert_dimensions_pointset): Dito.
1204 * graphite-sese-to-poly.c (build_pbb_scattering_polyhedrons,
1205 build_loop_iteration_domains, ppl_constraint_type_from_tree_code,
1206 add_condition_to_domain, add_condition_to_pbb, build_scop_context,
1207 build_scop_iteration_domain, build_poly_dr): Dito
1209 2009-07-09 Sebastian Pop <sebastian.pop@amd.com>
1211 * testsuite/gcc.dg/graphite/graphite.exp: Added a rule to execute
1213 * testsuite/gcc.dg/graphite/run-id-1.c: New.
1215 2009-07-09 Sebastian Pop <sebastian.pop@amd.com>
1217 * graphite-sese-to-poly.c (build_loop_iteration_domains): Add the
1218 positivity constraint on the symbolic number of iterations.
1220 2009-07-09 Sebastian Pop <sebastian.pop@amd.com>
1222 * graphite-sese-to-poly.c (build_loop_iteration_domains): Rewrite.
1224 2009-07-09 Sebastian Pop <sebastian.pop@amd.com>
1225 Tobias Grosser <grosser@fim.uni-passau.de>
1227 * graphite-clast-to-gimple.c (build_scop_context): Removed.
1228 (build_cloog_prog): Directly use SCOP_CONTEXT.
1229 * graphite-poly.c (new_scop): Initialize SCOP_CONTEXT.
1230 (free_scop): Free SCOP_CONTEXT.
1231 (print_scop_context): New.
1232 (print_scop): Call print_scop_context.
1233 (debug_scop_context): New.
1234 * graphite-poly.h (print_scop_context, debug_scop_context): Declared.
1235 (struct scop): Added field context.
1236 (SCOP_CONTEXT): New.
1237 * graphite-sese-to-poly.c (add_param_constraints): New.
1238 (build_scop_context): New.
1239 (build_poly_scop): Call build_scop_context.
1241 2009-07-09 Sebastian Pop <sebastian.pop@amd.com>
1243 * graphite-clast-to-gimple.c (gmp_cst_to_tree): Moved...
1244 * graphite-ppl.c (ppl_set_inhomogeneous_gmp, ppl_set_coef_gmp): New.
1245 (ppl_set_inhomogeneous, ppl_set_coef): Moved...
1246 * graphite-ppl.h: Include double-int.h and tree.h.
1247 (ppl_set_inhomogeneous_gmp, ppl_set_coef_gmp): Declared.
1248 (ppl_set_inhomogeneous, ppl_set_coef): ...here.
1249 (gmp_cst_to_tree): ...here. Reimplemented using mpz_get_double_int.
1250 (tree_int_to_gmp, ppl_set_inhomogeneous_tree, ppl_set_coef_tree): New.
1252 2009-07-09 Sebastian Pop <sebastian.pop@amd.com>
1254 * graphite-clast-to-gimple.c (clast_to_gcc_expression_red): Generate
1255 POINTER_PLUS_EXPR for pointer types.
1256 (clast_to_gcc_expression): Same.
1258 2009-07-09 Sebastian Pop <sebastian.pop@amd.com>
1260 * graphite-poly.c (print_scattering_function): Early return when
1261 PBB_TRANSFORMED_SCATTERING is not initialized.
1262 (print_pbb_domain): Early return when PBB_DOMAIN is not initialized.
1264 2009-07-08 Sebastian Pop <sebastian.pop@amd.com>
1266 * tree-parloops.c (analyze_reduction_list): Remove unused variable
1269 2009-07-08 Razya Ladelsky <razya@il.ibm.com>
1271 * tree-parloops.c (analyze_reduction_list): Change return
1273 (try_create_reduction_list): Move the call to
1274 analyze_reduction_list to the beginining.
1275 Call reduction_phi with analyzed_reductions as argument
1276 instead of reduction_list.
1278 2009-07-08 Tobias Grosser <grosser@fim.uni-passau.de>
1280 * Merge from mainline (r148296:149346)
1282 2009-07-07 Sebastian Pop <sebastian.pop@amd.com>
1284 * graphite-scop-detection.c (graphite_can_represent_init): New.
1285 (graphite_can_represent_scev): Call graphite_can_represent_init:
1286 check that the initial value does not contain multiplications of
1288 (stmt_has_simple_data_refs_p): New.
1289 (stmt_simple_for_scop_p): Call stmt_simple_for_scop_p.
1290 (is_simple_operand): Fix formatting.
1291 * graphite-sese-to-poly.c (try_generate_gimple_bb): Fix formatting.
1293 2009-07-07 Sebastian Pop <sebastian.pop@amd.com>
1295 * testsuite/gcc.dg/graphite/id-13.c: New.
1296 * graphite-sese-to-poly.c (graphite_stmt_p): Do not call
1297 analyze_scalar_evolution, use scalar_evolution_in_region.
1298 (scan_tree_for_params_right_scev): Add extra assert.
1299 (parameter_index_in_region_1): Split from parameter_index_in_region.
1300 (idx_record_params): Use scalar_evolution_in_region.
1301 (find_params_in_bb): Same.
1302 (find_scop_parameters): Same.
1303 (build_loop_iteration_domains): Same.
1304 (create_linear_expr_from_tree): Same.
1305 * sese.c (scalar_evolution_in_region): New.
1306 * sese.h (scalar_evolution_in_region): Declared.
1307 (defined_in_sese_p): New.
1308 * tree-scalar-evolution.c (compute_overall_effect_of_inner_loop): Not
1310 * tree-scalar-evolution.h (compute_overall_effect_of_inner_loop):
1313 2009-07-07 Sebastian Pop <sebastian.pop@amd.com>
1315 * Makefile.in: Replace dependences on tree-chrec.h with SCEV_H.
1316 TREE_DATA_REF_H also implies SCEV_H.
1318 2009-07-07 Sebastian Pop <sebastian.pop@amd.com>
1320 * graphite-poly.c (print_scop_params): New.
1321 (print_scop): Call print_scop_params.
1322 (debug_scop_params): New.
1323 * graphite-poly.h (print_scop_params, debug_scop_params): Declared.
1325 2009-07-07 Li Feng <nemokingdom@gmail.com>
1327 * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-4.c: New.
1328 * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-5.c: New.
1329 * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-6.c: New.
1330 * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-7.c: New.
1331 * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-8.c: New.
1332 * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-9.c: New.
1334 2009-07-07 Li Feng <nemokingdom@gmail.com>
1336 * graphite-clast-to-gimple.c (mark_loops_parallel): Dump information
1337 for dependency checking part.
1338 * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-1.c: Add
1339 tests for dependency checking.
1340 * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-2.c: Ditto.
1341 * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-3.c: Ditto.
1342 * testsuite/gcc.dg/graphite/graphite_autopar/graphite_autopar.exp: Add
1343 flag -fdump-tree-graphite-all for autopar testsuites.
1345 2009-07-06 Sebastian Pop <sebastian.pop@amd.com>
1347 * Makefile.in (tree-ssa-loop-manip.o): Depends on langhooks.h.
1348 * tree-parloops.c (rewrite_phi_with_iv, rewrite_all_phi_nodes_with_iv,
1349 canonicalize_loop_ivs): Moved...
1350 * tree-ssa-loop-manip.c: ... here. Include langhooks.h.
1352 2009-07-06 Sebastian Pop <sebastian.pop@amd.com>
1354 * tree-parloops.c (try_create_reduction_list): Pass an extra
1355 argument analyzed_reductions. Call analyze_reduction_list.
1356 (gen_parallel_loop): Do not call analyze_reduction_list.
1357 (parallelize_loops): Init and finalize analyzed_reductions.
1359 2009-07-06 Li Feng <nemokingdom@gmail.com>
1361 * testsuite/gcc.dg/graphite/graphite_autopar/graphite_autopar.exp:
1362 Added flag -fno-loop-strip-mine for autopar testcase.
1364 2009-07-04 Li Feng <nemokingdom@gmail.com>
1366 * graphite-dependences.c (graphite_carried_dependence_level_k): Use
1367 transformed scattering dimension instead of unmatch orignal when
1368 calling dependence_polyhedron.
1370 2009-06-30 Sebastian Pop <sebastian.pop@amd.com>
1372 * opts.c (decode_options): Enable flag_loop_strip_mine at -O2.
1374 2009-06-30 Sebastian Pop <sebastian.pop@amd.com>
1376 * graphite-poly.c (pbb_number_of_iterations): Check for returned
1377 value 1 from ppl_Pointset_Powerset_NNC_Polyhedron_maximize.
1379 2009-06-30 Sebastian Pop <sebastian.pop@amd.com>
1381 * graphite-blocking.c (pbb_strip_mine_profitable_p): New.
1382 (pbb_do_strip_mine): Call pbb_strip_mine_profitable_p.
1383 * graphite-poly.c (pbb_number_of_iterations): New.
1384 * graphite-poly.h (pbb_number_of_iterations): Declared.
1385 (pbb_iterator_dim, pbb_parameter_dim): New.
1387 2009-06-29 Sebastian Pop <sebastian.pop@amd.com>
1389 * graphite-clast-to-gimple.c (graphite_create_new_loop): Revert the
1390 last commit on type of lower and upper bound of loops.
1392 2009-06-29 Li Feng <nemokingdom@gmail.com>
1394 * Makefile.in (graphite-clast-to-gimple.o): Added dependence on
1395 graphite-dependences.h.
1396 * graphite-clast-to-gimple.c (new_bb_pbb_def): New.
1397 (mark_bb_with_pbb): New.
1398 (get_stmtfor_depth): New.
1399 (find_pbb_via_hash): New.
1400 (dependency_in_loop_p): New.
1401 (mark_loops_parallel): New.
1402 (free_aux_in_new_loops): New.
1403 (translate_clast): Add parameter BB_PBB_MAPPING. Mark newly created
1404 bb with it's relevant pbb. Mark newly created loops. Remove mark
1405 innermost loop parallel without checking.
1406 (gloog): Add parameter BB_PBB_MAPPING.
1407 * graphite-clast-to-gimple.h (struct bb_pbb_def): New.
1408 (gloog): Change declaration.
1409 (mark_loop_parallel): Make extern.
1410 (free_aux_in_new_loops): Declare.
1411 (bb_pbb_map_hash): New.
1412 (eq_bb_pbb_map): New.
1413 * graphite.c (graphite_transform_loops): Added BB_PBB_MAPPING. Trigger
1414 auto parallelization when flag_graphite_force_parallel is set.
1415 (graphite_finalize): Added free_aux_in_new_loops.
1416 * tree-parloops.c (parallelize_loops): Only generate parallel code for
1417 the innermost loop that marked parallel. Use
1418 flag_graphite_force_parallel instead of loop->can_be_parallel.
1419 (loop_parallel_p): Move inner most checking out of function.
1421 2009-06-26 Sebastian Pop <sebastian.pop@amd.com>
1423 * graphite-clast-to-gimple.c (graphite_create_new_loop): Make the
1424 type of lower and upper bound of loops signed long int.
1426 2009-06-26 Sebastian Pop <sebastian.pop@amd.com>
1428 * cfgloopmanip.c (create_empty_loop_on_edge): Gimplify the loop exit
1429 expression outside the loop.
1431 2009-06-26 Sebastian Pop <sebastian.pop@amd.com>
1433 * gcc.dg/graphite/interchange-8.c: New.
1435 2009-06-26 Sebastian Pop <sebastian.pop@amd.com>
1437 * gcc.dg/graphite/interchange-0.c: XFailed.
1438 * gcc.dg/graphite/interchange-5.c: XFailed.
1439 * gcc.dg/graphite/interchange-6.c: XFailed.
1441 2009-06-26 Sebastian Pop <sebastian.pop@amd.com>
1443 * graphite-interchange.c (compute_array_size_poly): The end of the
1444 recursion should return 1.
1446 2009-06-26 Sebastian Pop <sebastian.pop@amd.com>
1448 * graphite-interchange.c (compute_array_size_cstr): Allow the
1449 subscript multiplier to be -1.
1450 (compute_array_size): Use PDR_DATA_CONTAINER and not PDR_ACCESSES.
1451 * graphite-poly.c (new_poly_dr): Takes an extra argument for the
1452 data_container. Initializes PDR_DATA_CONTAINER.
1453 (print_pdr_access_layout): New.
1454 (print_pdr): Call print_pdr_access_layout. Print PDR_DATA_CONTAINER.
1455 * graphite-poly.h (struct poly_dr): Adjust comment. Add a new field
1457 (PDR_DATA_CONTAINER): New.
1458 (new_poly_dr): Update declaration.
1459 * graphite-sese-to-poly.c (pdr_add_data_dimensions): New.
1460 (build_poly_dr): Call pdr_add_data_dimensions.
1462 2009-06-26 Sebastian Pop <sebastian.pop@amd.com>
1464 * graphite-poly.h (struct poly_dr): Fix comment.
1465 * graphite-sese-to-poly.c (pdr_add_alias_set): New.
1466 (pdr_add_memory_accesses): New.
1467 (build_poly_dr): Call pdr_add_memory_accesses and pdr_add_alias_set.
1469 2009-06-26 Sebastian Pop <sebastian.pop@amd.com>
1471 * graphite-poly.c (print_pdrs, debug_pdrs): New.
1472 (print_pbb): Add call to print_pdrs.
1473 * graphite-poly.h (print_pdrs, debug_pdrs): Declared.
1475 2009-06-24 Konrad Trifunovic <konrad.trifunovic@gmail.com>
1476 Li Feng <nemokingdom@gmail.com>
1478 * graphite-dependences.c (graphite_carried_dependence_level_k): New.
1479 (dependency_between_pbbs_p): New.
1480 (lexicographically_gt_p): Assure !empty_p before polyhedron
1481 intersection assign.
1482 (build_lexicographically_gt_constraint): Correct lexicographically
1484 * graphite-dependences.h: New.
1485 * Makefile.in (graphite-dependences.o): Add graphite-dependences.h.
1487 2009-06-24 Sebastian Pop <sebastian.pop@amd.com>
1489 * graphite-clast-to-gimple.c (print_clast_stmt): New.
1490 (gloog): Print to dump_file the generated clast.
1491 * graphite-clast-to-gimple.h (print_clast_stmt): Declared.
1492 * graphite-interchange.c (pbb_do_interchange): Fix dump formatting.
1494 2009-06-24 Sebastian Pop <sebastian.pop@amd.com>
1496 * graphite-poly.c (extend_scattering): Increment
1497 PBB_NB_LOCAL_VARIABLES by the number of added dimensions.
1499 2009-06-24 Sebastian Pop <sebastian.pop@amd.com>
1501 * graphite-interchange.c (compute_array_size_poly): Added exit of
1502 recursion condition. Continue iterating even after the first equality.
1503 (compute_array_size): Same.
1505 2009-06-24 Li Feng <nemokingdom@gmail.com>
1507 * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-1.c: Update
1508 -fdump-tree-final_cleanup to -fdump-tree-optimized.
1509 * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-2.c: Ditto.
1510 * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-3.c: Ditto.
1511 * testsuite/gcc.dg/graphite/graphite_autopar/graphite_autopar.exp: Ditto.
1513 2009-06-23 Sebastian Pop <sebastian.pop@amd.com>
1515 * sese.c (expand_scalar_variables_stmt): Expand scalar variables
1516 only when the use verifies is_gimple_reg.
1518 2009-06-23 Sebastian Pop <sebastian.pop@amd.com>
1520 * graphite-clast-to-gimple.c (build_cloog_prog): Fix memory corruption.
1521 Allocate scaldims after call to unify_scattering_dimensions.
1523 2009-06-23 Sebastian Pop <sebastian.pop@amd.com>
1525 * graphite-clast-to-gimple.c (translate_clast): Fix memory leak.
1527 2009-06-23 Sebastian Pop <sebastian.pop@amd.com>
1528 Albert Cohen <albert.cohen@inria.fr>
1530 * graphite-blocking.c (pbb_strip_mine_loop_depth): Do not use local
1531 variables for the strip mining.
1533 2009-06-23 Sebastian Pop <sebastian.pop@amd.com>
1534 Pranav Garg <pranav.garg2107@gmail.com>
1536 * Makefile.in (OBJS-common): Added graphite-blocking.o.
1537 (graphite-sese-to-poly.o): Moved down to be in lexicographical order.
1538 (graphite-blocking.o): New rule.
1539 (graphite-poly.o, graphite-ppl.o): Moved to be in lexicographical order.
1540 * graphite-blocking.c: New.
1541 * graphite-poly.c (apply_poly_transforms): Call scop_do_strip_mine for
1542 flag_loop_strip_mine.
1543 (psct_scattering_dim_for_loop_depth): New.
1544 * graphite-poly.h (scop_do_strip_mine): Declared.
1545 (psct_add_local_variable): Increment PBB_NB_LOCAL_VARIABLES.
1546 * tree-ssa-loop.c (gate_graphite_transforms): Do not fail when using
1547 flag_loop_strip_mine.
1549 2009-06-23 Sebastian Pop <sebastian.pop@amd.com>
1551 * graphite-poly.c (extend_scattering): Avoid initializing and freeing
1552 a GMP value and a PPL coefficient at each iteration of a loop.
1554 2009-06-23 Sebastian Pop <sebastian.pop@amd.com>
1556 * graphite-dependences.c (dependence_polyhedron): Do not use
1557 pbb_nb_scattering_dims anymore. Use pbb_nb_scattering_orig and
1558 pbb_nb_scattering_transform.
1559 (graphite_legal_transform_dr): Same.
1560 * graphite-poly.c (extend_scattering): Same.
1561 (unify_scattering_dimensions): Same.
1562 (print_scattering_function): Same.
1563 (new_poly_bb): Initialize PBB_NB_SCATTERING_TRANSFORM and
1564 PBB_NB_LOCAL_VARIABLES.
1565 * graphite-poly.h (pbb_nb_scattering): Removed declaration.
1566 (struct poly_bb): Added nb_local_variables and nb_scattering_transform.
1567 (PBB_NB_LOCAL_VARIABLES, PBB_NB_SCATTERING_TRANSFORM): New.
1568 (pbb_nb_scattering_orig, pbb_nb_scattering_transform): New.
1569 (pbb_nb_scattering_dims, pbb_nb_scattering): Removed.
1570 (pbb_nb_scattering_transform): New.
1571 (pbb_nb_local_vars): Return PBB_NB_LOCAL_VARIABLES.
1572 (psco_scattering_dim): Add assert on parameters.
1573 (psct_scattering_dim): Same.
1574 (psct_scattering_dim_for_loop_depth): Declared.
1575 (psct_local_var_dim): New.
1576 (psco_iterator_dim, psco_parameter_dim): Add assert on parameters.
1577 (psct_iterator_dim, psct_parameter_dim): Same. To maintain the
1578 correct layout, call pbb_nb_local_vars.
1579 (psct_add_local_variable, psct_add_scattering_dimension): New.
1580 * graphite-sese-to-poly.c (build_pbb_scattering_polyhedrons):
1581 Initialize PBB_NB_SCATTERING_TRANSFORM.
1583 2009-06-23 Sebastian Pop <sebastian.pop@amd.com>
1585 * graphite-ppl.c (set_inhomogeneous): Renamed ppl_set_inhomogeneous.
1586 (set_coef): Renamed ppl_set_coef.
1587 * graphite-ppl.h (ppl_set_inhomogeneous, ppl_set_coef): Declared.
1589 2009-06-23 Sebastian Pop <sebastian.pop@amd.com>
1591 * graphite-dependences.c (build_pairwise_scheduling_inequality): Don't
1592 test a boolean against 1.
1593 * graphite-interchange.c (pbb_interchange_loop_depths): Do not build
1594 a new polyhedron for the PBB_TRANSFORMED_SCATTERING.
1595 (pbb_do_interchange): Returns true when a transform has been performed.
1596 (scop_do_interchange): Same.
1597 * graphite-poly.c (apply_poly_transforms): Use the return value of
1598 scop_do_interchange.
1599 * graphite-poly.h (scop_do_interchange): Update declaration.
1601 2009-06-23 Tobias Grosser <grosser@fim.uni-passau.de>
1603 * graphite-clast-to-gimple.c (gloog): Reset loop->aux right
1605 * sese.c (sese_reset_aux_in_loops): New.
1606 * sese.h (sese_reset_aux_in_loops): New.
1608 2009-06-19 Sebastian Pop <sebastian.pop@amd.com>
1610 * graphite-sese-to-poly.c (scan_tree_for_params_int): Pass in the
1611 multiplier and multiply the constant by the multiplier.
1612 (scan_tree_for_params): Bound the multiplier to its MULT_EXPR.
1613 (build_poly_dr): Do not use the multiplier to define the subscript.
1615 2009-06-19 Sebastian Pop <sebastian.pop@amd.com>
1617 * graphite-poly.c (new_poly_dr): Pass an extra argument for the
1618 compiler's data reference. Initialize PDR_CDR.
1619 (print_pdr): Call dump_data_reference.
1620 * graphite-poly.h (struct poly_dr): Rename black_box into pbb.
1621 Add compiler_dr field.
1622 (PDR_BB): Renamed PDR_PBB.
1624 * graphite-sese-to-poly.c (build_poly_dr): Pass to new_poly_dr
1625 GCC's data reference representation.
1626 * tree-data-ref.c (debug_data_references, debug_data_reference): New.
1627 * tree-data-ref.h (debug_data_references, debug_data_reference): Decl.
1629 2009-06-19 Sebastian Pop <sebastian.pop@amd.com>
1631 * graphite-poly.c (print_scattering_function): Also print the layout.
1632 * graphite-poly.h (pbb_nb_local_vars): New.
1634 2009-06-19 Sebastian Pop <sebastian.pop@amd.com>
1636 * graphite-poly.c (print_pbb_domain): Also print the layout names.
1638 2009-06-19 Sebastian Pop <sebastian.pop@amd.com>
1640 * graphite-poly.c (print_pdr, debug_pdr): New.
1641 * graphite-poly.h (print_pdr, debug_pdr): Declared.
1642 (PDR_BASE): Removed.
1644 2009-06-18 Sebastian Pop <sebastian.pop@amd.com>
1646 * gcc/testsuite/gcc.dg/graphite/interchange-{1..7}.c: New avatars of
1649 2009-06-18 Sebastian Pop <sebastian.pop@amd.com>
1651 * graphite-interchange.c (compute_subscript): Allow also -1 in the
1652 subscript identification column.
1653 (pbb_do_interchange): Print to dump_file that some loops "will be
1654 interchanged". Rely on that chain of characters in the testcases.
1655 * gcc.dg/graphite/interchange-0.c: New.
1656 * gcc.dg/graphite/graphite.exp: Iterate over the testsuite
1657 interchange-*.c files and compile them with -floop-interchange.
1659 2009-06-18 Pranav Garg <pranav.garg2107@gmail.com>
1661 * graphite-interchange.c (interchange_profitable_p): Renamed
1662 pbb_interchange_profitable_p.
1664 2009-06-18 Sebastian Pop <sebastian.pop@amd.com>
1665 Harsha Jagasia <harsha.jagasia@amd.com>
1666 Pranav Garg <pranav.garg2107@gmail.com>
1668 * graphite-interchange.c (interchange_profitable_p): Make static.
1669 (pbb_interchange_loop_depths, pbb_do_interchange,
1670 scop_do_interchange): New.
1671 * graphite-poly.c (apply_poly_transforms): Call scop_do_interchange
1672 for flag_loop_interchange.
1673 * graphite-poly.h (scop_do_interchange): Declared.
1674 * tree-ssa-loop.c (gate_graphite_transforms): Do not fail when
1675 flag_loop_interchange is used.
1677 2009-06-18 Sebastian Pop <sebastian.pop@amd.com>
1679 * graphite-dependences.c (dependence_polyhedron): Update use of
1680 pbb_nb_scattering_dims.
1681 * graphite-poly.h (pbb_nb_scattering_dims): Do not pass SCOP.
1682 (pbb_nb_scattering): Update use of pbb_nb_scattering_dims.
1683 (psco_scattering_dim, psct_scattering_dim, psco_iterator_dim,
1684 psct_iterator_dim, psco_parameter_dim, psct_parameter_dim): New.
1686 2009-06-16 Sebastian Pop <sebastian.pop@amd.com>
1688 * graphite.c: Cleanup foo.
1690 2009-06-16 Sebastian Pop <sebastian.pop@amd.com>
1692 * Merge from mainline (r143684:148293).
1693 * Disabled libpcp until it gets fixed.
1695 2009-06-05 Sebastian Pop <sebastian.pop@amd.com>
1696 Harsha Jagasia <harsha.jagasia@amd.com>
1698 * graphite-interchange.c: New.
1699 * Makefile.in (graphite-interchange.o): New.
1700 * graphite-poly.h (interchange_profitable_p): Declared.
1701 * graphite-ppl.h (value_max): New.
1703 2009-06-04 Sebastian Pop <sebastian.pop@amd.com>
1705 * graphite-dependences.c (dependence_polyhedron): Use pdr_dim.
1706 * graphite-poly.h: Fix some comments.
1710 2009-06-04 Sebastian Pop <sebastian.pop@amd.com>
1713 (pdr_accessp_nb_subscripts): Renamed pdr_nb_subscripts.
1714 (pdr_accessp_nb_iterators): Renamed pdr_dim_iter_domain.
1715 (pdr_accessp_nb_params): Renamed pdr_nb_params.
1716 (pdr_accessp_alias_set_dim): Renamed pdr_alias_set_dim.
1717 (pdr_accessp_subscript_dim): Renamed pdr_subscript_dim.
1718 (pdr_accessp_iterator_dim): Renamed pdr_iterator_dim.
1719 (pdr_accessp_param_dim): Renamed pdr_parameter_dim.
1720 (pbb_nb_loops): Renamed pbb_dim_iter_domain.
1721 * graphite-clast-to-gimple.c: Same.
1722 * graphite-dependences.c: Same.
1723 * graphite-poly.c: Same.
1724 * graphite-sese-to-poly.c: Same.
1726 2009-06-03 Sebastian Pop <sebastian.pop@amd.com>
1728 * graphite-clast-to-gimple.c (build_iv_mapping): Insert full
1729 expressions for an IV rename, as returned by clast_to_gcc_expression.
1730 (copy_renames): Rename new_name to expr.
1731 * sese.c (debug_rename_elt): Same.
1734 (sese_adjust_liveout_phis): Call force_gimple_operand before using
1735 the information from the rename map.
1736 (rename_variables_in_stmt): Same.
1737 (add_loop_exit_phis): Rename new_name to expr.
1738 (insert_loop_close_phis): Same.
1739 (add_guard_exit_phis): Same. Call force_gimple_operand.
1740 * sese.h (struct rename_map_elt): Rename new_name to expr.
1741 (new_rename_map_elt): Same.
1743 2009-06-03 Sebastian Pop <sebastian.pop@amd.com>
1745 * graphite-clast-to-gimple.c (build_iv_mapping): Use set_rename.
1746 * sese.c (set_rename): Make it extern.
1747 * sese.h (set_rename): Declared.
1749 2009-06-03 Sebastian Pop <sebastian.pop@amd.com>
1751 * graphite-poly.c (extend_scattering): Free values.
1752 * graphite-ppl.c (new_Cloog_Domain_from_ppl_Pointset_Powerset):
1754 (ppl_print_powerset_matrix): Same.
1755 * graphite-scop-detection.c (free_scops_1): New.
1756 (limit_scops): Call free_scops_1.
1757 * graphite-sese-to-poly.c (build_scop_bbs_1): Free dom.
1758 (build_poly_dr): Free PPL coefficients.
1759 * tree-parloops.c (rewrite_all_phi_nodes_with_iv): Free bbs.
1761 2009-06-02 Sebastian Pop <sebastian.pop@amd.com>
1763 * graphite-dependences.c: New.
1764 * graphite-data-ref.c: Removed.
1765 * graphite-data-ref.h: Removed.
1766 * Makefile.in (graphite-data-ref.o): Removed.
1767 (graphite-dependences.o): Added.
1768 * graphite-clast-to-gimple.c: Remove dependence on graphite-data-ref.h.
1769 * graphite-poly.c: Same.
1770 Move the data dependence testing to graphite-dependences.c.
1772 2009-05-19 Tobias Grosser <grosser@fim.uni-passau.de>
1774 * graphite-scop-detection.c (graphite_can_represent_loop): Renamed
1775 from graphite_cannot_represent_loop. Code refactored.
1776 (scopdet_basic_block_info): Call graphite_can_represent_loop.
1778 2009-05-17 Li Feng <nemokingdom@gmail.com>
1780 * testsuite/gcc.dg/graphite/graphite_autopar/graphite_autopar.exp:
1781 Cover all the testcases (not only the filtered ones).
1783 2009-05-17 Tobias Grosser <grosser@fim.uni-passau.de>
1785 * graphite-scop-detection.c (stmt_simple_for_scop_p): Remove
1786 unnecessary check. Update comments. Move check for REAL_TYPE here.
1787 (harmful_stmt_in_bb): Remove checks for conditions. This is already
1788 done in (stmt_simple_for_scop_p).
1790 2009-05-14 Tobias Grosser <grosser@fim.uni-passau.de>
1792 * graphite.c (print_global_statistics): New.
1793 (print_graphite_scop_statistic): New.
1794 (print_graphite_statistics): New.
1795 (graphite_initialize, graphite_transform_loops): Print statistics.
1796 * graphite-scop-detection (build_scops): Print statistics.
1797 (print_graphite_scop_statistics): New.
1798 (print_graphite_statistics): New.
1800 2009-05-13 Sebastian Pop <sebastian.pop@amd.com>
1802 * graphite-clast-to-gimple.c (struct clast_name_index): Removed.
1803 (debug_clast_name_index): Removed.
1804 (debug_clast_name_indexes_1): Removed.
1805 (debug_clast_name_indexes): Removed.
1806 (clast_name_index_elt_info): Removed.
1807 (eq_clast_name_indexes): Removed.
1808 (clast_name_to_index): Removed.
1809 (new_clast_name_index): Removed.
1810 (save_clast_name_index): Removed.
1811 (save_var_name): Moved...
1812 (init_sese_params_index): Removed.
1813 (clast_name_to_gcc): Remove use of name_tree.
1814 (initialize_cloog_names): Same.
1815 (gloog): Do not call init_sese_params_index.
1816 * graphite-sese-to-poly.c (save_var_name): ...here.
1817 (parameter_index_in_region): New.
1818 * sese.c (new_sese): Initialize SESE_PARAMS_NAMES.
1819 (parameter_index_in_region): Removed.
1820 (is_parameter): Remove use of name_tree.
1821 * sese.h (struct name_tree): Removed.
1822 (struct sese): Remove use of name_tree. New field params_names.
1823 (SESE_PARAMS_NAMES): New.
1824 (SESE_PARAMS): Remove duplicate.
1825 (parameter_index_in_region): Removed.
1826 (sese_nb_params): Remove use of name_tree.
1827 (struct clast_name_index): New.
1828 (new_clast_name_index): New.
1829 (clast_name_to_index): New.
1830 (save_clast_name_index): New.
1831 (debug_clast_name_index): New.
1832 (debug_clast_name_indexes_1): New.
1833 (debug_clast_name_indexes): New.
1834 (clast_name_index_elt_info): New.
1835 (eq_clast_name_indexes): New.
1837 2009-05-13 Sebastian Pop <sebastian.pop@amd.com>
1839 * graphite-clast-to-gimple.c (compute_cloog_iv_types_1): Call
1840 pbb_to_depth_to_oldiv. Remove call to oldiv_for_loop.
1841 (graphite_loop_normal_form): Do not pass region. Do not
1842 initialize SESE_OLDIVS.
1843 (build_graphite_loop_normal_form): Update call to
1844 graphite_loop_normal_form.
1845 * sese.c (debug_oldivs): Removed.
1846 (new_sese): Do not initialize SESE_OLDIVS.
1847 (free_sese): Do not free SESE_OLDIVS.
1848 (oldiv_for_loop): Removed.
1849 * sese.h (struct sese): Remove old_ivs.
1850 (SESE_OLDIVS): Removed.
1851 (oldiv_for_loop): Removed.
1853 2009-05-13 Sebastian Pop <sebastian.pop@amd.com>
1855 * graphite-clast-to-gimple.c (clast_name_to_gcc): Pass newivs,
1856 remove ivstack. Remove call to loop_iv_stack_get_iv_from_name,
1857 replaced by a call to newivs_to_depth_to_newiv.
1858 (clast_to_gcc_expression): Pass newivs, remove ivstack.
1859 (clast_to_gcc_expression_red): Same.
1860 (gcc_type_for_clast_expr): Same.
1861 (gcc_type_for_clast_eq): Same.
1862 (graphite_translate_clast_equation): Same.
1863 (graphite_create_guard_cond_expr): Same.
1864 (graphite_create_new_guard): Same.
1865 (graphite_create_new_loop): Same.
1866 (build_iv_mapping): Same.
1867 (translate_clast): Same.
1869 (loop_iv_stack_patch_for_consts): Removed. *
1870 sese.c (iv_stack_entry_is_constant): Removed.
1871 (iv_stack_entry_is_iv): Removed.
1872 (loop_iv_stack_push_iv): Removed.
1873 (loop_iv_stack_insert_constant): Removed.
1874 (loop_iv_stack_pop): Removed.
1875 (loop_iv_stack_get_iv): Removed.
1876 (loop_iv_stack_get_iv_from_name): Removed.
1877 (debug_loop_iv_stack): Removed.
1878 (free_loop_iv_stack): Removed.
1879 (loop_iv_stack_remove_constants): Removed. *
1880 sese.h (iv_stack_entry_kind): Removed.
1881 (iv_stack_entry_data_union): Removed.
1882 (iv_stack_entry_struct): Removed.
1883 (iv_stack_entry_p): Removed.
1884 (debug_oldivs, debug_loop_iv_stack, loop_iv_stack_insert_constant,
1885 loop_iv_stack_get_iv_from_name, loop_iv_stack_push_iv,
1886 loop_iv_stack_get_iv, loop_iv_stack_remove_constants,
1887 loop_iv_stack_pop, free_loop_iv_stack): Removed.
1888 (gbb_loop_at_index): Fix indenting.
1889 (gbb_loop_index): Removed.
1891 2009-05-13 Sebastian Pop <sebastian.pop@amd.com>
1893 * graphite-clast-to-gimple.c (clast_name_to_gcc): Do not use strcmp.
1894 Call clast_name_to_index.
1896 2009-05-13 Sebastian Pop <sebastian.pop@amd.com>
1898 * graphite-clast-to-gimple.c (clast_name_to_gcc): Pass region,
1899 do not pass params. Get params from SESE_PARAMS.
1900 (clast_to_gcc_expression): Same.
1901 (clast_to_gcc_expression_red): Same.
1902 (gcc_type_for_clast_eq): Same.
1903 (graphite_translate_clast_equation): Same.
1904 (graphite_create_new_loop): Same.
1905 * sese.c (rename_variables_in_stmt): Fix comment.
1907 2009-05-13 Sebastian Pop <sebastian.pop@amd.com>
1909 * graphite-clast-to-gimple.c (graphite_create_new_loop): Pass
1911 Call save_clast_name_index.
1912 (translate_clast): Pass newivs_index.
1913 (gloog): Create and free newivs_index.
1915 2009-05-13 Sebastian Pop <sebastian.pop@amd.com>
1917 * graphite-clast-to-gimple.c (clast_name_index): New structure.
1918 (clast_name_index_p): New type.
1919 (debug_clast_name_index): New.
1920 (debug_clast_name_indexes_1): New.
1921 (debug_clast_name_indexes): New.
1922 (clast_name_index_elt_info): New.
1923 (eq_clast_name_indexes): New.
1924 (clast_name_to_index): New.
1925 (new_clast_name_index): New.
1926 (save_clast_name_index): New.
1927 (init_sese_params_index): New.
1928 (gloog): Call init_sese_params_index.
1929 * graphite-clast-to-gimple.h (debug_clast_name_indexes): Declared.
1930 * sese.c (new_sese): Initialize SESE_PARAMS_INDEX.
1931 (free_sese): Free SESE_PARAMS_INDEX.
1932 * sese.h (struct sese): Add params_index.
1933 (SESE_PARAMS_INDEX): New.
1935 2009-05-13 Sebastian Pop <sebastian.pop@amd.com>
1937 * graphite-clast-to-gimple.c (newivs_to_depth_to_newiv): New.
1938 (graphite_create_new_loop): Pass the newivs vector. Push the
1939 newly created IV to newivs.
1940 (translate_clast): Pass the newivs vector.
1941 (gloog): Create and destroy the newivs vector.
1943 2009-05-13 Sebastian Pop <sebastian.pop@amd.com>
1945 * graphite-clast-to-gimple.c (pbb_to_depth_to_oldiv): New.
1946 (graphite_loop_normal_form): Initialize loop->aux with the unique
1947 IV that has been created.
1949 2009-05-13 Tobias Grosser <grosser@fim.uni-passau.de>
1951 * tree-chrec.c (evolution_function_right_is_integer_cst): Allow
1952 scev with parameters in the base part. They where forbidden
1955 2009-05-11 Li Feng <nemokingdom@gmail.com>
1957 * testsuite/gcc.dg/graphite/graphite.exp: Set different default
1958 compile options by file names.
1959 * testsuite/gcc.dg/graphite/block{0-6}.c: Remove dg-option line.
1960 * testsuite/gcc.dg/graphite/id-{1-9}.c: Ditto.
1961 * testsuite/gcc.dg/graphite/scop-{0-20}.c: Ditto.
1962 * testsuite/gcc.dg/graphite/scop-matmult.c: Ditto.
1964 2009-05-08 Li Feng <nemokingdom@gmail.com>
1966 * testsuite/gcc.dg/graphite/graphite_autopar/graphite_autopar.exp: New.
1967 * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-1.c: New.
1968 * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-2.c: New.
1969 * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-3.c: New.
1971 2009-05-07 Tobias Grosser <grosser@fim.uni-passau.de>
1973 * graphite-scop-detection (build_scops_1): Fix little bug introduced
1976 2009-05-07 Tobias Grosser <grosser@fim.uni-passau.de>
1978 * graphite-scop-detection.c (graphite_can_represent_scev): Only
1979 allow integer constant strides.
1980 (graphite_can_represent_expr): Depend on outermost_loop.
1981 (stmt_simple_memref_p, graphite_cannot_represent_loop,
1982 harmful_stmt_in_bb, is_simple_operand, stmt_simple_for_scop_p,
1983 build_scops_1): Same.
1984 (scopdet_basic_block_info): Same and insert layered SCoP
1986 (try_generate_gimple_bb): Cleanup.
1987 (build_scops): Enable data references.
1989 * testsuite/gcc.dg/graphite/id-5.c: New.
1990 * testsuite/gcc.dg/graphite/id-9.c: New.
1991 * tree-chrec.c (evolution_function_right_is_integer_cst): New.
1992 * tree-chrec.h (evolution_function_right_is_integer_cst): New.
1994 2009-05-06 Tobias Grosser <grosser@fim.uni-passau.de>
1996 * sese.c (expand_scalar_variables_ssa_name): Only build expressions,
1997 that we have not yet built for this SCoP.
1999 2009-05-06 Tobias Grosser <grosser@fim.uni-passau.de>
2001 * sese.c (expand_scalar_variables_expr): Fix expand_scalar_variables
2002 for complex numbers.
2004 2009-05-06 Tobias Grosser <grosser@fim.uni-passau.de>
2006 * graphite-ppl.c: Fix build if cloog is not available.
2008 2009-05-04 Li Feng <nemokingdom@gmail.com>
2010 * tree-parloops.c (loop_parallel_p): Remove construction of
2011 NITER and REDUCTION_LIST.
2012 (try_get_loop_niter): New.
2013 (try_create_reduction_list): New.
2014 (parallelize_loops): Bypass the failed checkings in autopar
2015 when can_be_parallel in loop structure is set to true.
2017 2009-05-01 Tobias Grosser <grosser@fim.uni-passau.de>
2019 * testsuite/gcc.dg/graphite/id-6.c: Update testcase.
2020 * testsuite/gcc.dg/graphite/scop-3.c: Dito.
2022 2009-05-01 Tobias Grosser <grosser@fim.uni-passau.de>
2024 * graphite-scop-detection.c (stmt_simple_for_scop_p):
2025 Enable EQ_EXPR and NE_EXPR again.
2027 2009-04-30 Tobias Grosser <grosser@fim.uni-passau.de>
2029 * graphite-scop-detection.c (graphite_can_represent_scev):
2030 Add check if scev is affine multivariate.
2031 (harmful_stmt_in_bb): Check if we can represent the conditions.
2032 (scopdet_basic_block_info (basic_block bb, VEC): Pass the loop to
2034 * testsuite/gcc.dg/graphite/id-7.c: New.
2036 2009-04-30 Tobias Grosser <grosser@fim.uni-passau.de>
2038 * graphite-sese-to-poly.c (bb_contains_non_iv_scalar_phi_nodes):
2039 Check all bbs in region, not only the bbs that are represented in
2041 (build_poly_scop): Add newline.
2042 * testsuite/gcc.dg/graphite/id-8.c: New.
2044 2009-04-30 Li Feng <nemokingdom@gmail.com>
2046 * cfgloop.c (alloc_loop): Initialize can_be_parallel to false
2047 when loop initialize.
2048 * cfgloop.h (struct loop): Introduce flag can_be_parallel.
2049 * common.opt: Declare flag_graphite_force_parallel.
2050 * graphite-clast-to-gimple.c (translate_clast): Mark the innermost
2052 * graphite-poly.c (apply_poly_transforms): Introduce
2053 flag_graphite_force_parallel.
2054 * tree-ssa-loop.c (gate_graphite_transforms): ditto.
2055 * toplev.c (process_options): ditto and replace a not correctly
2058 2009-04-30 Li Feng <nemokingdom@gmail.com>
2060 * graphite-clast-to-gimple.c (loop_iv_stack_patch_for_consts):
2061 Change the call of gbb_loop_at_index and/or gbb_loop_index due
2062 to the redefinition.
2063 (compute_cloog_iv_types_1): ditto.
2064 (build_iv_mapping): ditto.
2065 * graphite-sese-to-poly.c (new_gimple_bb): Remove GBB_LOOPS related
2067 (free_gimple_bb): Removed GBB_LOOPS related free part.
2068 (build_bb_loops): Removed.
2069 * sese.h (struct gimple_bb): Removed loops.
2070 (GBB_LOOPS): Removed.
2071 (gbb_loop_at_index): Instead of using GBB_LOOPS, we use sese instead.
2072 (gbb_loop_index): ditto.
2074 2009-04-24 Tobias Grosser <grosser@fim.uni-passau.de>
2076 * graphite-scop-detection.c (graphite_can_represent_scev): Do not
2077 allow non constant strides.
2078 * testsuite/gcc.dg/graphite/scop-20.c: New.
2080 2009-04-24 Sebastian Pop <sebastian.pop@amd.com>
2082 * graphite-scop-detection.c (dot_all_scops): Fix system call
2083 return value warning.
2086 2009-04-24 Sebastian Pop <sebastian.pop@amd.com>
2088 * testsuite/gcc.dg/graphite/id-6.c: Fix pattern.
2089 * testsuite/gcc.dg/graphite/scop-3.c: Same.
2091 2009-04-24 Sebastian Pop <sebastian.pop@amd.com>
2093 * graphite-poly.c (map_into_dep_poly, map_dr_into_dep_poly,
2094 build_pairwise_constraint, dr_equality_constraints,
2095 build_pairwise_scheduling_equality,
2096 build_pairwise_scheduling_inequality, lexicographically_gt_p,
2097 build_lexicographically_gt_constraint, dependence_polyhedron,
2098 graphite_legal_transform_dr, graphite_legal_transform_bb,
2099 graphite_legal_transform): New.
2100 * graphite-poly.h (graphite_legal_transform): Declared.
2101 * graphite-sese-to-poly.c (build_poly_scop): Call to
2102 graphite_legal_transform is disabled for the moment.
2104 2009-04-24 Sebastian Pop <sebastian.pop@amd.com>
2106 * graphite-poly.h (pbb_nb_scattering_dims): New.
2107 (pbb_nb_scattering): Use it.
2109 2009-04-24 Sebastian Pop <sebastian.pop@amd.com>
2111 * graphite-ppl.c (ppl_insert_dimensions_pointset): Add
2112 Pointset_Powerset version of ppl_insert_dimensions.
2113 * graphite-ppl.h (ppl_insert_dimensions_pointset): Declared.
2115 2009-04-24 Sebastian Pop <sebastian.pop@amd.com>
2117 * graphite-ppl.c (ppl_insert_dimensions): Fix formatting.
2119 2009-04-24 Sebastian Pop <sebastian.pop@amd.com>
2121 * graphite-poly.h: Fix comment.
2123 2009-04-24 Sebastian Pop <sebastian.pop@amd.com>
2125 * graphite-sese-to-poly.c (build_poly_dr): Fix data ref multiplier.
2127 2009-04-24 Tobias Grosser <grosser@fim.uni-passau.de>
2129 * sese.c (expand_scalar_variables_stmt): Only iterate over the old
2132 2009-04-24 Tobias Grosser <grosser@fim.uni-passau.de>
2134 * graphite-sese-to-poly.c (var_used_in_not_loop_header_phi_node): New.
2135 (graphite_stmt_p): Represent bbs necessary to build the phi nodes of
2138 2009-04-20 Sebastian Pop <sebastian.pop@amd.com>
2140 * graphite-scop-detection.c (stmt_simple_for_scop_p): Do not
2141 handle EQ_EXPR and NE_EXPR.
2143 2009-04-17 Tobias Grosser <grosser@fim.uni-passau.de>
2145 * graphite-poly.h (poly_dr): Fix comment.
2147 2009-04-09 Sebastian Pop <sebastian.pop@amd.com>
2148 Tobias Grosser <grosser@fim.uni-passau.de>
2150 * graphite-poly.c (new_poly_bb): Do not initialize PBB_DOMAIN
2151 with a zero dimension polyhedron.
2152 (find_scop_parameters): Move the call to scop_set_nb_params here.
2153 (build_loop_iteration_domains): Store in loop->aux the iteration
2155 (build_scop_iteration_domain): Fix PBB_DOMAIN for bbs not surrounded
2156 by any loop in scop.
2157 (build_poly_scop): Do not call scop_set_nb_params.
2159 2009-04-09 Sebastian Pop <sebastian.pop@amd.com>
2160 Tobias Grosser <grosser@fim.uni-passau.de>
2162 * graphite-sese-to-poly.c (add_condition_to_pbb): Pass code to
2163 add_condition_to_domain not GT_EXPR.
2165 2009-04-09 Tobias Grosser <grosser@fim.uni-passau.de>
2167 * graphite-ppl.c (debug_ppl_powerset_matrix): New.
2168 * graphite-ppl.h (debug_ppl_powerset_matrix): New.
2169 * graphite-sese-to-poly.c (add_condition_to_pbb): Use
2170 upper_bound_assign to calculate unions.
2171 * testsuite/gcc.dg/graphite/id-6.c: New.
2173 2009-04-09 Tobias Grosser <grosser@fim.uni-passau.de>
2175 * graphite-scop-detection.c (canonicalize_loop_closed_ssa): Do not
2176 handle abnormal edges.
2178 2009-04-09 Tobias Grosser <grosser@fim.uni-passau.de>
2180 * graphite-poly.c (new_poly_dr, free_poly_dr): New.
2181 (free_poly_bb): Also free poly_drs.
2182 * graphite-poly.h (new_poly_dr, free_poly_dr): New.
2183 (poly_dr): Polyhedron to Pointset_Powerset.
2184 (pdr_accessp_nb_subscripts): Same.
2185 * graphite-sese-to-poly.c (build_poly_dr): Same. And actually build
2188 2009-04-08 Sebastian Pop <sebastian.pop@amd.com>
2190 * graphite-clast-to-gimple.c (initialize_cloog_names): Change cloog
2191 names into more meaningful names.
2193 2009-04-08 Sebastian Pop <sebastian.pop@amd.com>
2195 * testsuite/gfortran.dg/graphite/interchange-1.c: New.
2196 * testsuite/gfortran.dg/graphite/interchange-2.c: New.
2198 2009-04-08 Sebastian Pop <sebastian.pop@amd.com>
2200 * graphite-clast-to-gimple.c (graphite_loop_normal_form): Do not build
2202 * tree-parloops.c (rewrite_phi_with_iv): New.
2203 (rewrite_all_phi_nodes_with_iv): New.
2204 (canonicalize_loop_ivs): Call them.
2206 2009-04-08 Sebastian Pop <sebastian.pop@amd.com>
2208 * graphite-sese-to-poly.c (try_generate_gimple_bb): Use
2209 graphite_find_data_references_in_stmt.
2210 * tree-data-ref.c (graphite_find_data_references_in_stmt): New.
2211 * tree-data-ref.h (graphite_find_data_references_in_stmt): Declared.
2213 2009-04-08 Sebastian Pop <sebastian.pop@amd.com>
2215 * sese.c (add_loop_exit_phis): Don't fail on non SSA_NAME renames.
2217 2009-04-08 Sebastian Pop <sebastian.pop@amd.com>
2219 * graphite-sese-to-poly.c (build_scop_bbs_1): Use bb_in_sese_p
2220 instead of bb_in_region.
2221 (flag_bb_in_region): Same. Renamed flag_bb_in_sese.
2222 (build_sese_conditions): Use flag_bb_in_sese.
2223 * sese.c (register_bb_in_sese): Removed.
2224 (new_sese): Remove initialization of SESE_REGION_BBS.
2225 (free_sese): Do not free SESE_REGION_BBS.
2226 * sese.h (struct sese): Remove field region_basic_blocks.
2227 (SESE_REGION_BBS): Removed.
2228 (bb_in_sese_p): Implement in function of bb_in_region.
2230 2009-04-08 Sebastian Pop <sebastian.pop@amd.com>
2232 * graphite-scop-detection.c (limit_scops): Deal only with single exit
2235 2009-04-08 Tobias Grosser <grosser@fim.uni-passau.de>
2237 * graphite-scop-detection.c (stmt_simple_for_scop_p): Allow NE_EXPR
2239 * graphite-sese-to-poly.c (create_linear_expr_from_tree): New.
2240 (add_condition_to_domain): New.
2241 (add_condition_to_pbb): New.
2242 (add_conditions_to_domain): Cleanup and handle of NE_EXPR and EQ_EXPR.
2243 * testsuite/gcc.dg/graphite/scop-3.c: Update number of detected SCoPs.
2245 2009-04-08 Tobias Grosser <grosser@fim.uni-passau.de>
2247 * graphite-clast-to-gimple.c (build_cloog_prog): ppl_Polyhedron ->
2248 ppl_Pointset_Powerset.
2249 * graphite-poly.c (new_poly_bb, free_poly_bb): Same.
2250 * graphite-poly.h (poly_bb): poly_bb.domain Same.
2251 (pbb_nb_loops): Same.
2252 * graphite-sese-to-poly.c (build_loop_iteration_domains,
2253 add_conditions_to_domain): Same.
2254 * graphite-ppl.c (new_Cloog_Domain_from_ppl_Pointset_Powerset): New.
2255 (ppl_print_polyhedron_matrix): ppl_Polyhedron_t ->
2256 ppl_const_Polyhedron_t.
2257 (ppl_print_powerset_matrix): New.
2258 * graphite-ppl.h (new_Cloog_Domain_from_ppl_Pointset_Powerset,
2259 ppl_print_powerset_matrix): New.
2260 (ppl_print_polyhedron_matrix): Updated.
2262 2009-04-07 Sebastian Pop <sebastian.pop@amd.com>
2264 * tree-scalar-evolution.c (analyze_scalar_evolution_1): Fix comment.
2266 2009-04-07 Sebastian Pop <sebastian.pop@amd.com>
2268 * graphite-poly.c (extend_scattering): Fix indenting. Free cstr.
2269 (print_iteration_domains, debug_iteration_domain,
2270 debug_iteration_domains): New.
2271 * graphite-poly.h (print_iteration_domains, debug_iteration_domain,
2272 debug_iteration_domains): Declared.
2273 * graphite-sese-to-poly.c (build_pbb_scattering_polyhedrons): Fix
2276 2009-04-03 Tobias Grosser <grosser@fim.uni-passau.de>
2277 Sebastian Pop <sebastian.pop@amd.com>
2279 * graphite-poly.h (print_iteration_domain): New.
2280 * graphite-sese-to-poly.c (add_conditions_to_domain): Fixed bug.
2281 (build_sese_conditions_1, build_sese_conditions_after,
2282 build_sese_conditions_before): New.
2283 (build_sese_conditions): Rewritten.
2285 2009-04-03 Sebastian Pop <sebastian.pop@amd.com>
2286 Tobias Grosser <grosser@fim.uni-passau.de>
2288 Cleanup of code generation liveouts.
2289 * graphite-clast-to-gimple.c (translate_clast): Use a single
2290 rename_map instead of one per translated statement.
2291 Do not use SESE_LIVEOUT_RENAMES.
2292 (graphite_loop_normal_form): Do not use SESE_REDUCTION_LIST.
2293 (gloog): Do not use SESE_LIVEOUT_RENAMES.
2294 * graphite-scop-detection.c (harmful_stmt_in_bb): Return the close
2295 phi node of a reduction: when a loop contains a reduction used outside
2296 the loop, there should be a scalar close phi node on the exit block.
2297 * sese.c (new_sese): Do not initialize SESE_LIVEOUT,
2298 SESE_LIVEOUT_RENAMES, and SESE_REDUCTION_LIST.
2299 (free_sese): Do not free them.
2300 (sese_build_liveouts_use): Do not use them.
2301 (sese_build_liveouts_bb): Same.
2302 (sese_build_liveouts): Same.
2303 (sese_insert_phis_for_liveouts): Same.
2304 (sese_adjust_phis_for_liveouts): Same. Renamed sese_adjust_liveout_phis.
2305 (defined_in_loop_p): New.
2306 (alive_after_loop): New.
2307 (close_phi_not_yet_inserted_p): New.
2308 (struct alep, alep_p): New.
2309 (add_loop_exit_phis): Remove from the rename_map all the names defined
2310 in the code generated loop.
2311 (insert_loop_close_phis): Traverse the rename_map passed to it.
2312 Don't use SESE_LIVEOUT_RENAMES.
2313 (default_liveout_before_guard): Renamed default_before_guard.
2314 (insert_guard_phis): Do not use SESE_LIVEOUT_RENAMES.
2315 (graphite_copy_stmts_from_block): Do not directly call set_rename.
2316 (register_sese_liveout_renames): Removed.
2317 (copy_bb_and_scalar_dependences): Do not call it.
2318 * sese.h (struct sese): Removed fields: liveout, liveout_renames, and
2320 (SESE_LIVEOUT): Removed.
2321 (SESE_LIVEOUT_RENAMES): Removed.
2322 (SESE_REDUCTION_LIST): Removed.
2323 (sese_build_liveouts): Removed.
2324 (sese_adjust_phis_for_liveouts): Renamed sese_adjust_liveout_phis.
2325 (insert_loop_close_phis): Pass a htab_t instead of a sese.
2326 (insert_guard_phis): Same.
2327 (rename_map_elt): Declare a VEC of them.
2328 * tree-parloops.c (canonicalize_loop_ivs): reduction_list contains
2329 trees not pointers to trees.
2331 Rewrite in canonical close SSA form:
2332 * graphite-scop-detection.c (contains_only_close_phi_nodes): New.
2333 (limit_scops): Close the scop after the block containing the close phi
2335 (canonicalize_loop_closed_ssa): New.
2336 (canonicalize_loop_closed_ssa_form): New.
2337 (build_scops): Call canonicalize_loop_closed_ssa_form.
2339 * graphite-sese-to-poly.c: Fix typos.
2341 2009-04-03 Sebastian Pop <sebastian.pop@amd.com>
2343 * graphite-poly.c (print_scattering_function, print_pbb_domain):
2345 (dump_gbb_conditions, dump_gbb_cases, print_iteration_domain): New.
2346 (print_pbb): Add conditions.
2348 2009-04-01 Tobias Grosser <grosser@fim.uni-passau.de>
2349 Sebastian Pop <sebastian.pop@amd.com>
2351 * graphite-scop-detection.c (bb_in_sd_region): Use bb_in_region.
2352 * graphite-sese-to-poly.c (all_non_dominated_preds_marked_p): New.
2353 (build_scop_bbs_1): New.
2354 (build_scop_bbs): Rewrite.
2355 * sese.h (bb_in_region): New.
2357 2009-03-29 Tobias Grosser <grosser@fim.uni-passau.de>
2359 * graphite-poly.c (new_poly_bb, free_poly_bb): Initialize/free
2361 (print_scop): Style.
2362 * graphite-poly.h (poly_bb): Add drs vector.
2363 (PBB_DRS): Add accessor.
2364 * graphite-sese-to-poly.c (build_poly_dr): New.
2365 (build_pbb_drs, build_scop_drs): New.
2366 (build_poly_scop): call build_scop_drs (Disabled at the moment).
2368 2009-03-29 Tobias Grosser <grosser@fim.uni-passau.de>
2370 * tree-ssa-loop.c: Include forgotten toplev.h
2372 2009-03-29 Tobias Grosser <grosser@fim.uni-passau.de>
2374 * graphite-poly.c: (apply_poly_transforms): sorry -> gcc_unreachable.
2375 * testsuite/gcc.dg/graphite/pr37883.c: Remove -floop-*
2376 * testsuite/gcc.dg/graphite/pr37928.c: Same
2377 * testsuite/gcc.dg/graphite/pr38409.c: Same
2378 * testsuite/gcc.dg/graphite/pr38498.c: Same
2379 * testsuite/gcc.dg/graphite/pr38559.c: Same
2380 * testsuite/gcc.dg/graphite/pr39335.c: Same
2381 * testsuite/gcc.dg/graphite/pr39335_1.c: Same
2382 * testsuite/gfortran.dg/graphite/block-2.f: Same
2383 * tree-ssa-loop.c (gate_graphite_transforms): Always fail if called
2386 2009-03-28 Tobias Grosser <grosser@fim.uni-passau.de>
2388 * graphite-sese-to-poly.c (ref_nb_loops, build_access_matrix_with_af,
2389 build_access_matrix, build_scop_data_accesses): Remove access function
2390 building. (We get a new version soon).
2391 (build_bb_loops, scan_tree_for_params_right_scev): Update.
2392 * sese.h (nb_loops_around_loop_in_sese): Remove.
2393 (sese_loop_depth): Do not use SESE_LOOP_NEST any more.
2395 2009-03-27 Tobias Grosser <grosser@fim.uni-passau.de>
2396 Sebastian Pop <sebastian.pop@amd.com>
2398 * graphite-scop-detection.c (struct scopdet_info): Rename last
2400 (scopdet_basic_block_info, build_scops_1): Don't use
2401 CDI_POST_DOMINATORS. CDI_POST_DOMINATORS should never be used.
2403 2009-03-26 Tobias Grosser <grosser@fim.uni-passau.de>
2404 Sebastian Pop <sebastian.pop@amd.com>
2406 * graphite-clast-to-gimple.c (gloog): Call sese_build_liveouts.
2407 * sese.c (sese_build_liveouts_use): Renamed from
2408 sese_build_livein_liveouts_use. Remove liveins.
2409 (sese_build_liveouts_bb): Renamed from sese_build_livein_liveouts_bb.
2410 Call sese_build_liveouts_use.
2411 (sese_build_liveouts): Renamed from sese_build_livein_liveouts.
2412 Call sese_build_liveouts_bb.
2413 (new_sese, free_sese): Remove liveins.
2414 (sese_add_exit_phis_var): Deleted.
2415 (sese_insert_phis_for_liveouts): Call sese_add_exit_phis_edge
2417 (graphite_copy_stmts_from_block): Remove SESE_NUM_VER.
2419 * sese.h (sese): Remove num_ver and livein.
2420 (SESE_LIVEIN, SESE_LIVEIN_VER, SESE_NUM_VER): Removed.
2422 2009-03-25 Tobias Grosser <grosser@fim.uni-passau.de>
2424 * graphite-sese-to-poly.c (build_scop_scattering): Fix compile.
2426 2009-03-25 Tobias Grosser <grosser@fim.uni-passau.de>
2428 * graphite-sese-to-poly.c (compare_prefix_loops): Removed.
2429 (build_scop_scattering): Do not use compare_prefix_loops any more.
2430 (nb_common_loops): New.
2432 2009-03-24 Sebastian Pop <sebastian.pop@amd.com>
2434 * sese.c (get_new_name_from_old_name): Renamed get_rename.
2435 (register_old_and_new_names): Renamed set_rename.
2437 2009-03-24 Sebastian Pop <sebastian.pop@amd.com>
2439 * graphite-scop-detection.h (nb_reductions_in_loop): Revert removal
2440 of the decl from the previous commit.
2442 2009-03-24 Sebastian Pop <sebastian.pop@amd.com>
2444 * graphite-scop-detection.c (dot_scop): New.
2445 * graphite-scop-detection.h (dot_scop): Declared.
2447 2009-03-24 Sebastian Pop <sebastian.pop@amd.com>
2449 * graphite-sese-to-poly.c (compare_prefix_loops): Fix compare.
2451 2009-03-24 Sebastian Pop <sebastian.pop@amd.com>
2453 * cfgloopmanip.c (create_empty_loop_on_edge): Generate the loop exit
2454 condition at the end of the loop.
2455 * graphite.c (graphite_initialize, graphite_finalize): Print to
2456 dump_file the compiled function.
2457 * graphite-clast-to-gimple.c (graphite_create_new_loop): Update use
2458 of create_empty_loop_on_edge.
2459 (translate_clast): Update the code generation of loops for the new
2461 * cfgloop.h (create_empty_loop_on_edge): Update declaration.
2463 2009-03-24 Sebastian Pop <sebastian.pop@amd.com>
2465 Reverted the patch from 2009-03-19.
2467 2009-03-19 Tobias Grosser <grosser@fim.uni-passau.de>
2469 * graphite-poly.c (new_poly_bb, free_poly_bb): Initialize/free
2471 (print_scop): Style.
2472 * graphite-poly.h (poly_bb): Add drs vector.
2473 (PBB_DRS): Add accessor.
2474 * graphite-sese-to-poly.c (ref_nb_loops): Remove.
2475 (build_access_matrix_with_af, build_access_matrix,
2476 build_scop_data_accesses): Delete.
2477 (build_poly_dr): New.
2478 (build_pbb_drs, build_scop_drs): New.
2479 (build_poly_scop): call build_scop_drs.
2481 2009-03-13 Sebastian Pop <sebastian.pop@amd.com>
2483 * graphite-scop-detection.c (dot_all_scops_1): Close the table
2484 once per basic block.
2486 2009-03-13 Tobias Grosser <grosser@fim.uni-passau.de>
2488 * graphite-scop-detection.c (graphite_can_represent_scev): New.
2489 (graphite_can_represent_expr): Renamed from loop_affine_expr
2491 (stmt_simple_for_scop_p): Call graphite_can_represent_expr.
2492 (graphite_cannot_represent_loop): Add scop_entry to parameters.
2493 (scopdet_basic_block_info): Actually define entry_block.
2494 (stmt_simple_memref_p): Moved here from ...
2496 * tree-data-ref.c (stmt_simple_memref_p): here.
2497 * tree-data-ref.h (stmt_simple_memref_p): Removed.
2499 2009-03-13 Tobias Grosser <grosser@fim.uni-passau.de>
2501 * testsuite/gcc.dg/graphite/id-4.c: New.
2503 2009-03-12 Sebastian Pop <sebastian.pop@amd.com>
2505 * sese.c (expand_scalar_variables_expr): Handle tcc_comparison.
2506 (register_old_and_new_names): Update the content of the map.
2507 When there was already a rename_map_elt in the map at that
2509 (copy_bb_and_scalar_dependences): Do rename_variables after
2510 expand_scalar_variables.
2511 * graphite-clast-to-gimple.c (build_iv_mapping): Update the content
2512 of the map. When there was already a rename_map_elt in the
2513 map at that location, free it.
2514 (translate_clast): Pass the rename_map. Do not initialize and free
2515 a rename_map per stmt_user.
2516 (gloog): Initialize and free one rename_map and pass it to
2519 2009-03-12 Sebastian Pop <sebastian.pop@amd.com>
2521 * sese.c (expand_scalar_variables_stmt,
2522 expand_scalar_variables_ssa_name): Add a gimple_stmt_iterator
2524 (expand_scalar_variables_expr): Handle REALPART_EXPR and IMAGPART_EXPR.
2525 (expand_scalar_variables): Pass to expand_scalar_variables_stmt
2526 the gimple_stmt_iterator of the statement to be expanded.
2527 * graphite-scop-detection.c (is_simple_operand): Do handle
2530 2009-03-11 Tobias Grosser <grosser@fim.uni-passau.de>
2532 * graphite-scop-detection.c (is_simple_operand): Do not handle
2534 * testsuite/gcc.dg/graphite/id-2.c: New.
2536 * graphite-sese-to-poly.c (build_bb_loops,
2537 add_value_to_dim, scan_tree_for_params_right_scev,
2538 scan_tree_for_params_int, scan_tree_for_params, idx_record_params,
2539 find_params_in_bb, build_loop_iteration_domains,
2540 add_conditions_to_domain): Remove subtract.
2542 2009-03-11 Tobias Grosser <grosser@fim.uni-passau.de>
2544 * graphite-clast-to-gimple.c (loop_iv_stack_patch_for_consts,
2545 build_iv_mapping, compute_cloog_iv_types_1, build_cloog_prog):
2546 pbb_loop_at_index -> gbb_loop_at_index.
2547 * graphite-poly.c (new_poly_bb, new_scop): New accessors.
2548 (debug_loop_vec): Delete.
2549 * graphite-poly.h (poly_bb, scop): Change black_box and region to void
2550 pointer. Move LOOPS to gimple_bb_p and insert nb_params.
2551 (PBB_LOOPS): Removed.
2552 (PBB_BLACK_BOX): Insert cast.
2553 (pbb_set_black_box): New setter.
2554 (pbb_loop_at_index, pbb_loop_index): Removed.
2555 (scop_set_region, scop_set_nb_params): New.
2556 * graphite-sese-to-poly.c (new_gimple_bb, free_gimple_bb,
2557 build_scop_scattering, build_bb_loops): Add GBB_LOOPS.
2558 (build_poly_scop): Use scop_set_nb_params.
2559 * sese.h (gimple_bb): Add LOOPS.
2560 (GBB_LOOPS, gbb_loop_index, gbb_loop_at_index): New.
2562 2009-03-11 Tobias Grosser <grosser@fim.uni-passau.de>
2564 Revert previous commit.
2566 2009-03-11 Sebastian Pop <sebastian.pop@amd.com>
2568 * sese.c (expand_scalar_variables_expr): Handle tcc_comparison.
2569 (register_old_and_new_names): Update the content of the map.
2570 When there was already a rename_map_elt in the map at that
2572 (copy_bb_and_scalar_dependences): Do rename_variables after
2573 expand_scalar_variables.
2574 * graphite-clast-to-gimple.c (build_iv_mapping): Update the content
2575 of the map. When there was already a rename_map_elt in the
2576 map at that location, free it.
2577 (translate_clast): Pass the rename_map. Do not initialize and free
2578 a rename_map per stmt_user.
2579 (gloog): Initialize and free one rename_map and pass it to
2582 2009-03-11 Tobias Grosser <grosser@fim.uni-passau.de>
2584 Remove forgotten line in revert.
2586 2009-03-11 Sebastian Pop <sebastian.pop@amd.com>
2588 Revert previous commit.
2590 2009-03-10 Sebastian Pop <sebastian.pop@amd.com>
2592 * sese.c (register_old_and_new_names): Update the content
2593 of the map. When there was already a rename_map_elt in the
2594 map at that location, free it.
2595 (copy_bb_and_scalar_dependences): Do rename_variables after
2596 expand_scalar_variables.
2597 * graphite-clast-to-gimple.c (build_iv_mapping): Update the content
2598 of the map. When there was already a rename_map_elt in the
2599 map at that location, free it.
2600 (translate_clast): Pass the rename_map. Do not initialize and free
2601 a rename_map per stmt_user.
2602 (gloog): Initialize and free one rename_map and pass it to
2605 2009-03-10 Sebastian Pop <sebastian.pop@amd.com>
2607 * graphite-clast-to-gimple.c (translate_clast): context_loop
2610 2009-03-10 Tobias Grosser <grosser@fim.uni-passau.de>
2611 Sebastian Pop <sebastian.pop@amd.com>
2613 * graphite-ppl.c (ppl_insert_dimensions): Fix stupid mistake
2614 of the use of ppl_Polyhedron_map_space_dimensions.
2616 2009-03-10 Tobias Grosser <grosser@fim.uni-passau.de>
2617 Sebastian Pop <sebastian.pop@amd.com>
2619 * graphite-poly.c (unify_scattering_dimensions): Fix types.
2620 * graphite-poly.h (poly_dr_p, poly_dr, POLY_DR_TYPE, PDR_BB,
2621 PDR_TYPE, PDR_ACCESSES, pdr_accessp_nb_subscripts,
2622 pdr_accessp_nb_iterators, pdr_accessp_nb_params,
2623 pdr_accessp_alias_set_dim, pdr_accessp_subscript_dim,
2624 pdr_accessp_iterator_dim, pdr_accessp_param_dim,
2625 pbb_nb_params): New.
2626 (pbb_nb_loops, pbb_nb_scattering, scop_nb_params,
2627 nb_loops_around_pbb): Adapt return types.
2629 2009-03-09 Tobias Grosser <grosser@fim.uni-passau.de>
2631 * Makefile.in (graphite.o, graphite-sese-to-poly.o,
2632 graphite-clast-to-gimple.o, graphite-data-ref.o,
2633 graphite-scop-detection.o, graphite-poly.o): Add
2636 2009-03-05 Tobias Grosser <grosser@fim.uni-passau.de>
2638 * Makefile.in (graphite.o, graphite-sese-to-poly.o,
2639 graphite-clast-to-gimple.o, graphite-data-ref.o,
2640 graphite-scop-detection.o, graphite-poly.o): Add graphite-poly.h.
2642 2009-03-04 Tobias Grosser <grosser@fim.uni-passau.de>
2644 * testsuite/gcc.dg/graphite/pr37485.c: Remove -floop-block
2645 * testsuite/gcc.dg/graphite/pr37828.c: Same.
2646 * testsuite/gcc.dg/graphite/pr37684.c: Same.
2647 * testsuite/gcc.dg/graphite/block-0.c: Same.
2648 * testsuite/gcc.dg/graphite/block-1.c: Same.
2649 * testsuite/gcc.dg/graphite/block-2.c: Same.
2650 * testsuite/gcc.dg/graphite/block-3.c: Same.
2651 * testsuite/gcc.dg/graphite/block-4.c: Same.
2652 * testsuite/gcc.dg/graphite/block-5.c: Same.
2653 * testsuite/gcc.dg/graphite/block-6.c: Same.
2654 * testsuite/gfortran.dg/graphite/pr38083.f90: Same.
2655 * testsuite/gfortran.dg/graphite/block-1.f90: Same.
2656 * testsuite/gfortran.dg/graphite/block-3.f90: Same.
2657 * testsuite/gfortran.dg/graphite/pr37852.f90: Same.
2658 * testsuite/gfortran.dg/graphite/block-4.f90: Same.
2659 * testsuite/gfortran.dg/graphite/pr37980.f90: Same.
2660 * testsuite/gfortran.dg/graphite/pr38953.f90: Same.
2661 * testsuite/gfortran.dg/graphite/pr37857.f90: Same.
2662 * opts.c: Remove -floop-block from -O2.
2663 * graphite-poly.c: Fail if -floop-block -floop-interchange or
2664 -floop-strip-mine are used.
2666 2009-03-04 Tobias Grosser <grosser@fim.uni-passau.de>
2667 Sebastian Pop <sebastian.pop@amd.com>
2669 * graphite-clast-to-gimple.c (build_cloog_prog): Unify scattering
2671 * graphite-poly.c (pbb_compare, graphite_sort_pbbs,
2672 graphite_trans_bb_move_loop, graphite_trans_bb_strip_mine,
2673 strip_mine_profitable_p, is_interchange_valid,
2674 graphite_trans_bb_block, graphite_trans_loop_block,
2675 graphite_trans_scop_block): Temporary removed.
2676 (extend_scattering, unify_scattering_dimensions): New.
2677 (print_scattering_function, graphite_read_transforms):
2678 PBB_SCATTERING -> PBB_TRANSFORMED_SCATTERING.
2679 (graphite_generate_scattering_fns): Removed.
2680 (apply_poly_transforms): Cleanup.
2681 (free_poly_bb): Add PBB_SCATTERING -> PBB_TRANSFORMED_SCATTERING.
2682 (schedule_to_scattering): Moved.
2683 (PBB_STATIC_SCHEDULE, PBB_SCATTERING): Removed.
2684 (PBB_ORIGINAL_SCATTERING, PBB_TRANSFORMED_SCATTERING): New.
2685 (pbb_nb_scattering): New.
2686 (SCOP_ENTRY, SCOP_EXIT, SCOP_REGION_BBS, SCOP_DEP_GRAPH, SCOP_PARAMS,
2687 SCOP_LOOP_NEST, SCOP_PARAMS, SCOP_OLDIVS, SCOP_LIVEOUT_RENAMES):
2689 * graphite-ppl.c (ppl_insert_dimensions): Extended and renamed from
2691 (ppl_strip_loop): PBB_SCATTERING -> PBB_TRANSFORMED_SCATTERING.
2692 * graphite-scop-detection.c (dot_all_scops_1): PBB_SCATTERING
2693 -> PBB_TRANSFORMED_SCATTERING.
2694 * graphite-sese-to-poly.c (build_scop_bbs): Remove region.
2695 (build_pbb_scattering_polyhedron): Moved from schedule_to_scattering.
2696 (build_scop_scattering): Renamed from build_scop_canonical_schedules.
2697 (check_poly_representation): Do not return bool.
2698 (graphite_transform_loops): Reformat.
2699 * sese.h (SESE_ENTRY_BB, SESE_EXIT_BB): New.
2701 2009-03-04 Sebastian Pop <sebastian.pop@amd.com>
2703 * graphite-poly.c (print_pbb_domain, print_pbb, print_scop,
2704 debug_pbb_domain, debug_pbb, debug_scop): New.
2705 * graphite-poly.h (print_pbb_domain, print_pbb, print_scop,
2706 debug_pbb_domain, debug_pbb, debug_scop): Declared.
2708 2009-03-02 Sebastian Pop <sebastian.pop@amd.com>
2711 * tree-parloops.c (canonicalize_loop_ivs): Call fold_convert
2712 when the type precision of the induction variable should be
2713 larger than the type precision of nit.
2714 (gen_parallel_loop): Update use of canonicalize_loop_ivs.
2715 * graphite-clast-to-gimple.c (graphite_loop_normal_form): Same.
2716 * tree-flow.h (canonicalize_loop_ivs): Update declaration.
2718 * testsuite/gcc.dg/graphite/pr39335_1.c: New.
2719 * testsuite/gcc.dg/graphite/pr39335.c: New.
2721 2009-03-02 Sebastian Pop <sebastian.pop@amd.com>
2723 * tree-parloops.c (canonicalize_loop_ivs): reduction_list contains
2724 SSA_NAMES not struct reduction_info.
2726 2009-03-02 Sebastian Pop <sebastian.pop@amd.com>
2728 * sese.c (expand_scalar_variables_expr): Handle ADDR_EXPR.
2730 2009-02-27 Sebastian Pop <sebastian.pop@amd.com>
2731 Tobias Grosser <grosser@fim.uni-passau.de>
2733 * sese.c (new_sese): Initialize SESE_REDUCTION_LIST.
2734 (free_sese): Free SESE_REDUCTION_LIST.
2735 * sese.h (struct sese): Add field reduction_list.
2736 (SESE_REDUCTION_LIST): New.
2737 * graphite-clast-to-gimple.c (graphite_loop_normal_form): Call
2738 canonicalize_loop_ivs on SESE_REDUCTION_LIST.
2740 2009-02-27 Sebastian Pop <sebastian.pop@amd.com>
2741 Tobias Grosser <grosser@fim.uni-passau.de>
2743 * tree-flow.h (gather_scalar_reductions): Use struct loop * instead
2746 2009-02-27 Sebastian Pop <sebastian.pop@amd.com>
2747 Tobias Grosser <grosser@fim.uni-passau.de>
2749 * tree-parloops.c (struct brli, build_reduction_list_info,
2750 analyze_reduction_list, gather_scalar_reductions): New.
2751 (loop_parallel_p): Build a reduction list containing only
2752 PHI_RESULT SSA_NAMEs: call gather_scalar_reductions.
2753 (gen_parallel_loop): Call the analysis analyze_reduction_list.
2754 (parallelize_loops): Now reduction_list is a htab_t of SSA_NAMEs.
2755 * tree-flow.h (gather_scalar_reductions): Declared.
2757 2009-02-26 Sebastian Pop <sebastian.pop@amd.com>
2760 * graphite-clast-to-gimple.c (graphite_loop_normal_form): Do not call
2761 number_of_iterations_exit from a gcc_assert.
2763 2009-02-25 Sebastian Pop <sebastian.pop@amd.com>
2764 Jan Sjodin <jan.sjodin@amd.com>
2766 * output.h (graphite_out_file, graphite_in_file): Declared.
2767 * toplev.c (graphite_out_file, graphite_in_file): New.
2768 (init_asm_output): Initialize graphite_in_file and graphite_out_file.
2769 * graphite-clast-to-gimple.c (build_cloog_prog): Read PBB_SCATTERING.
2770 Don't call schedule_to_scattering.
2771 * common.opt (fgraphite-write, fgraphite-read): New.
2772 * graphite-poly.c: Include output.h.
2773 (print_scattering_function, print_scattering_functions,
2774 debug_scattering_function, debug_scattering_functions,
2775 graphite_write_transforms, graphite_read_transforms,
2776 graphite_generate_scattering_fns): New.
2777 (apply_poly_transforms): Do not apply transform if flag_graphite_read.
2778 Call graphite_generate_scattering_fns, graphite_write_transforms,
2779 graphite_read_transforms.
2780 (new_poly_bb): Initialize PBB_SCATTERING.
2781 (free_poly_bb): Free PBB_SCATTERING.
2782 (schedule_to_scattering): Does not return, initialize PBB_SCATTERING.
2783 * graphite-poly.h (struct poly_bb): Add field scattering.
2784 (PBB_SCATTERING): New.
2785 (print_scattering_function, print_scattering_functions,
2786 debug_scattering_function, debug_scattering_functions): Declared.
2787 * graphite-ppl.c (cloog_matrix_to_ppl_constraint): Matrices contain
2788 GMP values, not integers!
2789 (ppl_print_polyhedron_matrix, debug_ppl_polyhedron_matrix,
2790 ppl_read_polyhedron_matrix): New.
2791 * graphite-ppl.h (ppl_print_polyhedron_matrix,
2792 debug_ppl_polyhedron_matrix,
2793 ppl_read_polyhedron_matrix): Declared.
2794 * Makefile.in (graphite-poly.o): Depends on output.h.
2796 2009-02-23 Sebastian Pop <sebastian.pop@amd.com>
2797 Tobias Grosser <grosser@fim.uni-passau.de>
2800 * graphite-scop-detection.c (stmt_simple_for_scop_p): Analyze
2801 scalar evolutions in the scop_entry->loop_father.
2803 2009-02-23 Sebastian Pop <sebastian.pop@amd.com>
2804 Tobias Grosser <grosser@fim.uni-passau.de>
2806 * graphite.h (ref_nb_loops): Remove declaration.
2807 (struct gimple_bb, gimple_bb_p, GBB_BB, GBB_DATA_REFS, GBB_CONDITIONS,
2808 GBB_CONDITION_CASES, GBB_CLOOG_IV_TYPES, gbb_loop, print_gimple_bb,
2809 debug_gbb): Moved to sese.h.
2812 2009-02-23 Sebastian Pop <sebastian.pop@amd.com>
2813 Tobias Grosser <grosser@fim.uni-passau.de>
2815 * graphite-data-ref.[ch]: Disable.
2817 2009-02-23 Sebastian Pop <sebastian.pop@amd.com>
2818 Tobias Grosser <grosser@fim.uni-passau.de>
2820 * graphite-scop-detection.c (stmt_simple_for_scop_p): Analyze
2821 scalar evolutions in the scop_entry->loop_father.
2823 2009-02-23 Sebastian Pop <sebastian.pop@amd.com>
2825 * graphite-scop-detection.c (nb_reductions_in_loop): Moved here...
2826 (graphite_cannot_represent_loop_niter): Renamed
2827 graphite_cannot_represent_loop. Call nb_reductions_in_loop.
2828 (limit_scops): build_sese_loop_nests does not return a bool.
2829 * graphite-scop-detection.h (nb_reductions_in_loop): Declared.
2830 * sese.c (nb_reductions_in_loop): ... from here.
2831 (graphite_loop_normal_form): ... from here.
2832 (sese_record_loop): Does not fail, so does not return a bool.
2833 (build_sese_loop_nests): Same.
2834 * sese.h (build_sese_loop_nests): Update declaration.
2835 * graphite-clast-to-gimple.c (graphite_loop_normal_form): Moved here...
2836 (build_graphite_loop_normal_form): New.
2837 (gloog): Call build_graphite_loop_normal_form.
2838 * graphite-sese-to-poly.c (build_poly_scop): Don't fail on
2839 build_sese_loop_nests.
2841 * testsuite/gcc.dg/graphite/id-1.c: New.
2843 2009-02-23 Sebastian Pop <sebastian.pop@amd.com>
2844 Tobias Grosser <grosser@fim.uni-passau.de>
2846 * graphite-sese-to-poly.c (scan_tree_for_params): Remove REAL_CST.
2847 The SCoP detection fix is sufficient.
2849 2009-02-21 Sebastian Pop <sebastian.pop@amd.com>
2851 PR tree-optimization/39260
2852 * graphite-scop-detection.c (harmful_stmt_in_bb): Stop a SCoP when
2853 the basic block contains a condition with a real type.
2854 * graphite-sese-to-poly.c (scan_tree_for_params): Handle REAL_CST.
2856 * gcc.dg/graphite/pr39260.c: New.
2858 2009-02-21 Sebastian Pop <sebastian.pop@amd.com>
2860 * graphite-poly.c: Inlcude params.h.
2861 (graphite_trans_loop_block): Use PARAM_LOOP_BLOCK_TILE_SIZE for
2863 * Makefile.in (graphite-poly.o): Depend on PARAMS_H.
2864 * params.def (PARAM_LOOP_BLOCK_TILE_SIZE): Define.
2866 2009-02-20 Sebastian Pop <sebastian.pop@amd.com>
2867 Tobias Grosser <grosser@fim.uni-passau.de>
2869 * graphite-scop-detection.c (dot_all_scops_1,
2870 dot_all_scops): Moved here.
2871 * graphite-scop-detection.h (dot_all_scops): Declared here.
2872 * graphite.c (graphite_initialize, graphite_finalize): New.
2873 (graphite_transform_loops): Cleaned up.
2874 * sese.c (debug_oldivs): Moved here.
2875 * graphite-poly.c (graphite_apply_transformations): Renamed
2876 apply_poly_transforms.
2877 (debug_loop_vec): Moved here.
2878 * graphite-sese-to-poly.c (build_bb_loops, build_sese_conditions_1,
2879 scop_contains_non_iv_scalar_phi_nodes, build_sese_conditions,
2880 find_scop_parameters, build_scop_iteration_domain,
2881 add_conditions_to_constraints, build_scop_canonical_schedules,
2882 build_scop_data_accesses): Now static.
2883 (build_poly_scop, check_poly_representation): New.
2885 2009-02-20 Sebastian Pop <sebastian.pop@amd.com>
2887 * graphite.c (graphite_stmt_p, new_gimple_bb, free_gimple_bb,
2888 remove_gbbs_in_scop, free_scops, try_generate_gimple_bb,
2889 build_scop_bbs, ref_nb_loops, compare_prefix_loops,
2890 build_scop_canonical_schedules, build_bb_loops, add_value_to_dim,
2891 scan_tree_for_params_right_scev, scan_tree_for_params_int,
2892 scan_tree_for_params, struct irp_data, dx_record_params,
2893 find_params_in_bb, find_scop_parameters, gbb_from_bb,
2894 build_loop_iteration_domains, add_conditions_to_domain,
2895 phi_node_is_iv, bb_contains_non_iv_scalar_phi_nodes,
2896 scop_contains_non_iv_scalar_phi_nodes, build_sese_conditions_1,
2897 build_sese_conditions, add_conditions_to_constraints,
2898 build_scop_iteration_domain, build_access_matrix_with_af,
2899 build_access_matrix,
2900 build_scop_data_accesses): Moved to graphite-sese-to-poly.c.
2902 * graphite-sese-to-poly.c: New.
2903 * graphite-sese-to-poly.h: New.
2905 * Makefile.in: Add new rule for graphite-sese-to-poly.o.
2907 2009-02-20 Sebastian Pop <sebastian.pop@amd.com>
2909 * graphite.c: Split graphite code generation to a new file.
2910 (graphite_verify, gmp_cst_to_tree, clast_name_to_gcc,
2911 max_precision_type, clast_to_gcc_expression_red,
2912 clast_to_gcc_expression, gcc_type_for_clast_expr,
2913 gcc_type_for_clast_eq, loop_iv_stack_patch_for_consts,
2914 graphite_translate_clast_equation, graphite_create_guard_cond_expr,
2915 graphite_create_new_guard, clast_get_body_of_loop,
2916 gcc_type_for_cloog_iv, gcc_type_for_iv_of_clast_loop,
2917 graphite_create_new_loop, build_iv_mapping, copy_renames,
2918 translate_clast, find_cloog_iv_in_expr, compute_cloog_iv_types_1,
2919 compute_cloog_iv_types, free_scattering, save_var_name,
2920 initialize_cloog_names, build_scop_context, build_cloog_prog,
2921 set_cloog_options, debug_clast_stmt, scop_to_clast,
2922 print_generated_program, debug_generated_program,
2923 gloog): Moved to graphite-clast-to-gimple.c.
2925 (struct cloog_prog_clast): Moved to graphite-clast-to-gimple.h.
2927 (iv_stack_entry_is_constant, iv_stack_entry_is_iv,
2928 loop_iv_stack_push_iv, loop_iv_stack_insert_constant,
2929 loop_iv_stack_pop, loop_iv_stack_get_iv,
2930 loop_iv_stack_get_iv_from_name, debug_loop_iv_stack,
2931 free_loop_iv_stack, loop_iv_stack_remove_constants,
2932 debug_rename_elt, debug_rename_map_1, debug_rename_map,
2933 rename_map_elt_info, eq_rename_map_elts, debug_ivtype_elt,
2934 debug_ivtype_map_1, debug_ivtype_map, ivtype_map_elt_info,
2935 eq_ivtype_map_elts, sese_add_exit_phis_edge,
2936 sese_add_exit_phis_var, sese_insert_phis_for_liveouts,
2937 get_vdef_before_sese, sese_adjust_vphi,
2938 get_new_name_from_old_name, sese_adjust_phis_for_liveouts,
2939 oldiv_for_loop, rename_variables_in_stmt, is_parameter,
2940 is_iv, expand_scalar_variables_ssa_name,
2941 expand_scalar_variables_expr, expand_scalar_variables_stmt,
2942 expand_scalar_variables, rename_variables, remove_condition,
2943 get_true_edge_from_guard_bb, get_false_edge_from_guard_bb,
2944 add_loop_exit_phis, insert_loop_close_phis, struct igp,
2945 default_liveout_before_guard, add_guard_exit_phis,
2946 insert_guard_phis, register_old_and_new_names,
2947 graphite_copy_stmts_from_block, register_sese_liveout_renames,
2948 copy_bb_and_scalar_dependences, outermost_loop_in_sese,
2949 if_region_set_false_region, create_if_region_on_edge,
2950 move_sese_in_condition): Moved to sese.c.
2952 (nb_loops_around_loop_in_sese, struct ifsese, if_region_entry,
2953 if_region_exit, if_region_get_condition_block,
2954 struct rename_map_elt, new_rename_map_elt, enum iv_stack_entry_kind,
2955 union iv_stack_entry_data_union, struct iv_stack_entry_struct,
2956 iv_stack_entry_p, loop_iv_stack, struct ivtype_map_elt,
2957 ivtype_map_elt, new_ivtype_map_elt,
2958 recompute_all_dominators): Moved to sese.h.
2960 * graphite-clast-to-gimple.c: New.
2961 * graphite-clast-to-gimple.h: New.
2962 * Makefile.in: Add new rule for graphite-clast-to-gimple.o.
2963 * sese.c: Modified as said above.
2966 2009-02-20 Sebastian Pop <sebastian.pop@amd.com>
2968 * graphite.c: Split scop detection to a new file.
2969 (enum gbb_type, gbb_type, get_bb_type, struct sd_region_p, sd_region,
2970 move_sd_regions, loop_affine_expr, exclude_component_ref,
2971 is_simple_operand, stmt_simple_for_scop_p, harmful_stmt_in_bb,
2972 graphite_cannot_represent_loop_niter, struct scopdet_info,
2973 scopdet_basic_block_info, build_scops_1, bb_in_sd_region,
2974 find_single_entry_edge, find_single_exit_edge,
2975 create_single_entry_edge, sd_region_without_exit,
2976 create_single_exit_edge, unmark_exit_edges, mark_exit_edges,
2977 create_sese_edges, build_graphite_scops, limit_scops, build_scops):
2978 Moved to graphite-scop-detection.c.
2980 * graphite-scop-detection.c: New.
2981 * graphite-scop-detection.h: New.
2982 * Makefile.in: Add new rule for graphite-scop-detection.o.
2984 * sese.c: Include tree-chrec.h, tree-data-ref.h, and
2985 tree-scalar-evolution.h.
2986 (nb_reductions_in_loop, graphite_loop_normal_form, sese_record_loop,
2987 build_sese_loop_nests): Moved here from graphite.c.
2988 (param_index): Renamed parameter_index_in_region.
2990 2009-02-18 Tobias Grosser <grosser@fim.uni-passau.de>
2991 Sebastian Pop <sebastian.pop@amd.com>
2993 * gcc.dg/graphite/block-0.c: Expected to fail now.
2994 * gcc.dg/graphite/block-1.c: Same.
2995 * gcc.dg/graphite/block-5.c: Same.
2996 * gcc.dg/graphite/block-6.c: Same.
2998 2009-02-18 Tobias Grosser <grosser@fim.uni-passau.de>
2999 Sebastian Pop <sebastian.pop@amd.com>
3001 * graphite.h: Separate from graphite_bb_p the polyhedral
3002 representation in poly_bb_p and the GCC specifics in gimple_bb_p.
3003 (struct data_dependence_polyhedron, RDGE_DDP, ddp_p): Moved to
3004 graphite-data-ref.h.
3005 (struct poly_bb, PBB_SCOP, PBB_STATIC_SCHEDULE, PBB_DOMAIN,
3006 PBB_BLACK_BOX, PBB_LOOPS, pbb_nb_loops, pbb_loop_at_index,
3007 pbb_loop_index, struct scop, SCOP_BBS, SCOP_REGION, SCOP_ENTRY,
3008 SCOP_EXIT, SCOP_REGION_BBS, SCOP_DEP_GRAPH, SCOP_PARAMS,
3009 SCOP_LOOP_NEST, SCOP_PARAMS, SCOP_OLDIVS, SCOP_LIVEOUT_RENAMES,
3010 scop_nb_params): Moved to graphite-poly.h.
3011 * graphite-data-ref.c: Same.
3012 * graphite-data-ref.h: New.
3014 (pbb_compare, graphite_sort_pbbs, graphite_trans_bb_move_loop,
3015 graphite_trans_bb_strip_mine, strip_mine_profitable_p,
3016 is_interchange_valid, graphite_trans_bb_block,
3017 graphite_trans_loop_block, scop_max_loop_depth,
3018 graphite_trans_scop_block, graphite_apply_transformations,
3019 new_poly_bb, free_poly_bb, new_scop, free_scop): Moved to
3021 * graphite-poly.h: New.
3022 * graphite-poly.c: New.
3023 * Makefile.in (OBJS-common): Add graphite-poly.o.
3024 (graphite-poly.o): New rule.
3025 * tree-data-ref.h (struct data_reference): Remove unused scop field.
3028 2009-02-18 Sebastian Pop <sebastian.pop@amd.com>
3029 Tobias Grosser <grosser@fim.uni-passau.de>
3031 * graphite.c: Replace gb -> gbb.
3033 * graphite-data-ref.c: Same.
3035 2009-02-18 Sebastian Pop <sebastian.pop@amd.com>
3036 Tobias Grosser <grosser@fim.uni-passau.de>
3038 * Makefile.in (OBJS-commmon): Add sese.o.
3040 (graphite.o): Add sese.h.
3041 * graphite.c (bb_in_ss_p, loop_in_sese_p,
3042 sese_build_livein_liveouts_use, sese_build_livein_liveouts_bb,
3043 sese_build_livein_liveouts, register_bb_in_sese, new_sese, free_sese):
3045 (block_before_scop): Add missing return.
3046 (new_scop, free_scop): Remove SESE data structures.
3047 (scop_record_loop, scan_tree_for_params, find_params_in_bb,
3048 find_scop_parameters, build_loop_iteration_domains,
3049 add_conditions_to_domain, register_scop_liveout_renames,
3050 copy_bb_and_scalar_dependences): Scop -> SESE.
3052 (add_conditions_to_domain): SCoP -> SESE and remove check
3053 (scop_contains_non_iv_scalar_phi_nodes): New.
3054 (build_scop_conditions_1, build_scop_conditions): Remove check for
3055 non iv scalar phi nodes.
3056 (print_scop_statistics): New.
3057 (graphite_transform_loops): Cleanup.
3059 * graphite.h: Move to sese & cleanup.
3063 2009-02-16 Sebastian Pop <sebastian.pop@amd.com>
3064 Tobias Grosser <grosser@fim.uni-passau.de>
3066 * graphite.c (build_scop_conditions_1): Conditions are only
3067 at the end of a basic block.
3069 2009-02-16 Sebastian Pop <sebastian.pop@amd.com>
3070 Tobias Grosser <grosser@fim.uni-passau>
3072 * graphite.h (struct graphite_bb): Remove compressed_alpha_matrix
3074 (GBB_ALPHA): Removed.
3076 2009-02-16 Sebastian Pop <sebastian.pop@amd.com>
3077 Tobias Grosser <grosser@fim.uni-passau.de>
3079 * graphite-data-ref.c (graphite_test_dependence): Don't use
3080 GBB_DYNAMIC_SCHEDULE.
3081 * graphite.c (new_graphite_bb): Same.
3082 (free_graphite_bb): Same.
3083 (build_scop_dynamic_schedules): Removed.
3084 (graphite_transform_loops): Don't call it.
3085 * graphite.h (struct graphite_bb): Remove dynamic_schedule field.
3086 (GBB_DYNAMIC_SCHEDULE): Removed.
3088 2009-02-16 Sebastian Pop <sebastian.pop@amd.com>
3089 Tobias Grosser <grosser@fim.uni-passau.de>
3091 * graphite.c (schedule_to_scattering): Don't use CloogMatrix.
3092 (print_graphite_bb): Same.
3093 (build_cloog_prog): Same.
3095 2009-02-16 Sebastian Pop <sebastian.pop@amd.com>
3096 Tobias Grosser <grosser@fim.uni-passau.de>
3098 * graphite.c (build_cloog_prog): Don't use CloogMatrix.
3100 2009-02-16 Sebastian Pop <sebastian.pop@amd.com>
3101 Tobias Grosser <grosser@fim.uni-passau.de>
3103 * graphite.c (build_scop_context): Don't use CloogMatrix.
3104 * graphite-ppl.c (new_Cloog_Domain_from_ppl_Polyhedron): New.
3105 * graphite-ppl.h (new_Cloog_Domain_from_ppl_Polyhedron): Declared.
3107 2009-02-16 Sebastian Pop <sebastian.pop@amd.com>
3108 Tobias Grosser <grosser@fim.uni-passau.de>
3110 * graphite.h (struct scop): Move params, old_ivs, loops, loop_nest,
3111 liveout_renames, add_params fields...
3112 (struct sese): ... here.
3113 (SESE_PARAMS, SESE_LOOPS, SESE_LOOP_NEST, SESE_ADD_PARAMS,
3114 SESE_PARAMS, SESE_OLDIVS, SESE_LIVEOUT_RENAMES): New.
3116 2009-02-16 Sebastian Pop <sebastian.pop@amd.com>
3117 Tobias Grosser <grosser@fim.uni-passau.de>
3119 * graphite.c (print_scop): Do not print the CLooG program.
3120 (new_scop, free_scop, initialize_cloog_names, build_scop_context,
3121 build_cloog_prog, gloog): Don't use SCOP_PROG.
3122 (find_transform): Renamed scop_to_clast.
3123 (print_generated_program, debug_generated_program): New.
3124 (graphite_transform_loops): Adapt to new interface.
3125 * graphite.h (struct scop): Remove program field.
3126 (SCOP_PROG): Removed.
3127 (print_generated_program, debug_generated_program): Declared.
3129 2009-02-16 Sebastian Pop <sebastian.pop@amd.com>
3131 * graphite-data-ref.c (schedule_precedes_p, schedule_same_p): New.
3132 (statement_precedes_p): Use schedule_same_p and schedule_precedes_p.
3133 * graphite.c (gbb_compare, schedule_to_scattering, print_graphite_bb,
3134 free_graphite_bb, build_scop_canonical_schedules,
3135 graphite_trans_bb_strip_mine, graphite_trans_scop_block): Static
3136 schedules are now represented using a ppl_Linear_Expression_t.
3137 * graphite.h (struct graphite_bb): Same.
3138 * graphite-ppl.c (ppl_lexico_compare_linear_expressions): New.
3139 * graphite-ppl.h (ppl_lexico_compare_linear_expressions): Declared.
3141 2009-02-15 Sebastian Pop <sebastian.pop@amd.com>
3143 * graphite.c: Free local memory.
3144 * graphite-ppl.c: Same.
3146 2009-02-15 Sebastian Pop <sebastian.pop@amd.com>
3148 * graphite.c (const_column_index, get_first_matching_sign_row_index,
3149 get_lower_bound_row, get_upper_bound_row, copy_constraint,
3150 swap_constraint_variables, scale_constraint_variable): Removed.
3151 (graphite_trans_bb_strip_mine): Remove pong.
3152 * graphite-ppl.c: Include missing header files.
3153 (set_inhomogeneous, set_coef, shift_poly, ppl_strip_loop): New.
3154 * graphite-ppl.h (ppl_strip_loop): Declared.
3155 * Makefile.in (graphite-ppl.o): Adjust dependences.
3157 2009-02-14 Sebastian Pop <sebastian.pop@amd.com>
3159 * graphite.c (build_loop_iteration_domains): Remove ping pong.
3160 (build_scop_iteration_domain): Same.
3162 2009-02-13 Sebastian Pop <sebastian.pop@amd.com>
3164 * graphite.c (scan_tree_for_params, add_conditions_to_domain): Remove
3166 (add_value_to_dim, scan_tree_for_params_right_scev,
3167 scan_tree_for_params_int): New.
3168 * graphite-ppl.c (oppose_constraint): New.
3169 (insert_constraint_into_matrix): Implement missing cases.
3170 * graphite-ppl.h (insert_constraint_into_matrix): Declared.
3172 2009-02-13 Sebastian Pop <sebastian.pop@amd.com>
3174 * graphite.c (graphite_trans_bb_move_loop): Remove ping pong,
3175 use ppl_move_dimension.
3177 2009-02-12 Sebastian Pop <sebastian.pop@amd.com>
3179 * graphite-data-ref.c: Domains are now ppl_Polyhedra_t.
3182 * graphite-ppl.c: Same.
3183 * graphite-ppl.h: Same.
3185 2009-02-12 Sebastian Pop <sebastian.pop@amd.com>
3187 Revert last 3 commits.
3189 2009-02-10 Sebastian Pop <sebastian.pop@amd.com>
3191 * graphite.c (scan_tree_for_params, add_conditions_to_domain): Remove
3193 (add_value_to_dim, scan_tree_for_params_right_scev,
3194 scan_tree_for_params_int): New.
3195 * graphite-ppl.c (oppose_constraint): New.
3196 (insert_constraint_into_matrix): Implement missing cases.
3197 * graphite-ppl.h (insert_constraint_into_matrix): Declared.
3199 2009-02-10 Sebastian Pop <sebastian.pop@amd.com>
3201 * graphite.c (graphite_trans_bb_move_loop): Remove unused variables.
3203 2009-02-10 Sebastian Pop <sebastian.pop@amd.com>
3204 Tobias Grosser <grosser@fim.uni-passau.de>
3206 * graphite.c (graphite_trans_bb_move_loop): Remove ping pong,
3207 use ppl_move_dimension.
3208 * graphite-ppl.c (ppl_move_dimension): New.
3209 * graphite-ppl.h (ppl_move_dimension): Declared.
3211 2009-02-10 Sebastian Pop <sebastian.pop@amd.com>
3213 * graphite.c: Do not include cloog/cloog.h.
3214 (print_graphite_bb): Remove ping pong, call PPL print function.
3216 2009-02-10 Tobias Grosser <grosser@fim.uni-passau.de>
3218 * Makefile.in (OBJS-common): Add graphite-ppl.o.
3219 (graphite.o): Add dependence on graphite-ppl.h.
3220 (graphite-ppl.o): New.
3221 (graphite-data-ref.c): Ping pong between PPL data structures
3223 * graphite-ppl.c: New.
3224 * graphite-ppl.h: New.
3225 * graphite.c: Include graphite-ppl.h.
3226 (print_graphite_bb, add_conditions_to_domain, build_cloog_prog,
3227 graphite_trans_bb_move_loop, graphite_trans_bb_strip_mine):
3228 Ping pong between PPL data structures and matrices.
3229 (new_graphite_bb): Create a PPL constraint system.
3230 Call ppl_delete_Constraint_System instead of cloog_matrix_free.
3231 (build_loop_iteration_domains): Use PPL functions.
3232 * graphite.h: Include graphite-ppl.h. Fix comments.
3233 (graphite_bb): Use a ppl_Constraint_System_t instead of
3234 CloogMatrix for representing the domain.
3235 (scop): Remove static_schedule.
3236 (gbb_nb_loops): Ping pong between PPL data structures and matrices.
3238 2009-02-06 Sebastian Pop <sebastian.pop@amd.com>
3240 * graphite.c: Fix some comments.
3242 2009-02-05 Sebastian Pop <sebastian.pop@amd.com>
3245 * graphite.c (if_region_set_false_region): After moving a region
3246 in the false branch of a condition, remove the empty dummy
3248 (gloog): Remove wrong fix for PR38953.
3250 2009-02-03 Tobias Grosser <grosser@fim.uni-passau.de>
3252 * graphite.c (bb_in_sese_p, sese_build_livein_liveouts_use,
3253 sese_build_livein_liveouts_bb, sese_build_livein_liveouts,
3254 register_bb_in_sese, new_sese, free_sese): Moved.
3255 (dot_scop_1, build_scop_loop_nests, build_loop_iteration_domains,
3256 outermost_loop_in_scop, build_scop_iteration_domain,
3257 expand_scalar_variables_ssa_name, get_vdef_before_scop,
3258 limit_scops): Use bb_in_sese_p instead of bb_in_scop_p.
3259 Use loop_in_sese_p instead of loop_in_scop_p.
3260 (new_graphite_bb, new_scop, gloog): Do not initialize SCOP_BBS_B.
3261 (free_scop): Do not free SCOP_BBS_B.
3262 (nb_loops_around_loop_in_scop, nb_loops_around_gb,
3263 ref_nb_loops): Moved here...
3264 * graphite.h (ref_nb_loops): ... from here.
3265 (struct scop): Remove bbs_b bitmap.
3266 (SCOP_BBS_B, bb_in_scop_p, loop_in_scop_p): Removed.
3267 * testsuite/gcc.dg/graphite/scop-19.c: New
3269 2009-02-03 Tobias Grosser <grosser@fim.uni-passau.de>
3271 * graphite.c (scopdet_basic_block_info): Fix bug in scop
3274 2009-01-30 Tobias Grosser <grosser@fim.uni-passau.de>
3276 * graphite.c (new_loop_to_cloog_loop_str, hash_loop_to_cloog_loop,
3277 eq_loop_to_cloog_loop): Remove.
3278 (new_scop, free_scop): Remove SCOP_LOOP2CLOOG_LOOP.
3279 * graphite.h (struct scop): Remove loop2cloog_loop.
3280 (loop_domain_dim, loop_iteration_vector_dim): Remove.
3282 2009-01-30 Tobias Grosser <grosser@fim.uni-passau.de>
3284 * opts.c (decode_options): Only add graphite options to O2
3285 if we compile with graphite enabled.
3287 2009-01-26 Sebastian Pop <sebastian.pop@amd.com>
3289 * Merge from mainline (r143163:143684).
3291 2009-01-26 Sebastian Pop <sebastian.pop@amd.com>
3293 * graphite.c (debug_value): Removed.
3294 * graphite.h (debug_value): Removed.
3296 2009-01-23 Sebastian Pop <sebastian.pop@amd.com>
3298 * passes.c (init_optimization_passes): Do not call pass_copy_prop
3299 after graphite: pass_copy_prop does not maintain a proper loop closed
3300 SSA form. pass_copy_prop should be fixed.
3302 2009-01-23 Sebastian Pop <sebastian.pop@amd.com>
3304 * graphite.c (scop_adjust_phis_for_liveouts): Fix warning.
3306 2009-01-23 Sebastian Pop <sebastian.pop@amd.com>
3308 * graphite.c (graphite_verify): Add a call to verify_loop_closed_ssa.
3309 (gloog): Split the exit of the scop when the scop exit is a loop exit.
3310 (graphite_transform_loops): Only call cleanup_tree_cfg if gloog
3313 2009-01-20 Sebastian Pop <sebastian.pop@amd.com>
3315 * graphite.c (gloog): Return true when code gen succeeded.
3316 (graphite_transform_loops): Do not call cleanup_tree_cfg if
3317 the code of the function did not changed. After cleanup_tree_cfg
3318 call rewrite_into_loop_closed_ssa to maintain the loop closed ssa
3321 2009-01-19 Sebastian Pop <sebastian.pop@amd.com>
3323 * graphite.c (stmt_simple_for_scop_p): Also handle cases when
3324 gimple_call_lhs is NULL.
3326 2009-01-16 Sebastian Pop <sebastian.pop@amd.com>
3327 Tobias Grosser <tobi.grosser@amd.com>
3329 * graphite.c (graphite_trans_scop_block): Do not block single
3332 2009-01-15 Sebastian Pop <sebastian.pop@amd.com>
3333 Tobias Grosser <tobi.grosser@amd.com>
3335 * graphite.c (build_scop_canonical_schedules): Start schedules at
3338 2009-01-15 Sebastian Pop <sebastian.pop@amd.com>
3339 Tobias Grosser <tobi.grosser@amd.com>
3341 * graphite.c (compare_prefix_loops): New.
3342 (build_scop_canonical_schedules): Rewritten.
3343 (graphite_transform_loops): Move build_scop_canonical_schedules
3344 after build_scop_iteration_domain.
3346 2009-01-14 Sebastian Pop <sebastian.pop@amd.com>
3347 Tobias Grosser <tobi.grosser@amd.com>
3349 * graphite.c (add_conditions_to_domain): Add the loops to
3350 the dimension of the iteration domain. Do copy the domain
3351 only when it exists.
3352 (build_scop_conditions_1): Do not call add_conditions_to_domain.
3353 (add_conditions_to_constraints): New.
3354 (can_generate_code_stmt, can_generate_code): Removed.
3355 (gloog): Do not call can_generate_code.
3356 (graphite_transform_loops): Call add_conditions_to_constraints
3357 after building the iteration domain.
3359 2009-01-14 Sebastian Pop <sebastian.pop@amd.com>
3360 Tobias Grosser <tobi.grosser@amd.com>
3361 Jan Sjodin <jan.sjodin@amd.com>
3363 * graphite.c (scan_tree_for_params): On substractions negate
3364 all the coefficients of the term.
3365 (clast_to_gcc_expression_red): New. Handle reduction expressions
3366 of more than two operands.
3367 (clast_to_gcc_expression): Call clast_to_gcc_expression_red.
3368 (get_vdef_before_scop): Handle also the case of default definitions.
3370 2009-01-14 Sebastian Pop <sebastian.pop@amd.com>
3373 * graphite.c (get_vdef_before_scop, scop_adjust_vphi): New.
3374 (scop_adjust_phis_for_liveouts): Call scop_adjust_vphi.
3375 (gloog): Do not call cleanup_tree_cfg.
3376 (graphite_transform_loops): Call cleanup_tree_cfg after all
3377 scops have been code generated.
3379 2009-01-13 Sebastian Pop <sebastian.pop@amd.com>
3381 * passes.c (init_optimization_passes): Schedule after
3382 graphite transforms pass_copy_prop, pass_dce_loop and pass_lim.
3384 2009-01-13 Sebastian Pop <sebastian.pop@amd.com>
3386 * graphite.c (expand_scalar_variables_stmt): Do not pass loop_p.
3388 (expand_scalar_variables_ssa_name): Do not pass loop_p. Fix comment.
3389 Set the type of an expression to the type of its assign statement.
3390 (expand_scalar_variables_expr): Do not pass loop_p.
3391 Fix comment. Stop recursion on tcc_constant or tcc_declaration.
3392 (copy_bb_and_scalar_dependences): Do not pass loop_p.
3393 (translate_clast): Update call to copy_bb_and_scalar_dependences.
3395 2009-01-11 Sebastian Pop <sebastian.pop@amd.com>
3397 * graphite.c (expand_scalar_variables_ssa_name): Set the type of
3398 an expression to the gimple_expr_type of its assign statement.
3399 (expand_scalar_variables_expr): Stop recursion on tcc_constant
3402 2009-01-11 Sebastian Pop <sebastian.pop@amd.com>
3404 PR tree-optimization/38786
3405 * testsuite/gcc.dg/graphite/pr38786.c: New.
3406 * graphite.c (expand_scalar_variables_ssa_name): New, outlined from
3407 the SSA_NAME case of expand_scalar_variables_expr.
3408 (expand_scalar_variables_expr): Also gather the scalar computation
3409 used to index the memory access.
3410 (expand_scalar_variables_stmt): Pass to expand_scalar_variables_expr
3411 the gimple_stmt_iterator where it inserts new code.
3413 2009-01-10 Sebastian Pop <sebastian.pop@amd.com>
3415 * testsuite/gcc.dg/graphite/block-3.c: Fix compile error on 32bit.
3417 2009-01-10 Sebastian Pop <sebastian.pop@amd.com>
3419 * opts.c (decode_options): Enable flag_graphite_identity and
3420 flag_loop_block in -O2 and above.
3422 2009-01-08 Sebastian Pop <sebastian.pop@amd.com>
3424 * libjava/classpath/lib/gnu/java/awt/peer/gtk/GtkMouseInfoPeer.class:
3425 Fix merge problem: replace with the file from trunk.
3427 2009-01-08 Sebastian Pop <sebastian.pop@amd.com>
3429 * Merge from mainline (r141727:143163).
3431 2009-01-07 Sebastian Pop <sebastian.pop@amd.com>
3432 Jan Sjodin <jan.sjodin@amd.com>
3434 PR tree-optimization/38559
3435 * testsuite/gcc.dg/graphite/pr38559.c: New.
3437 * graphite.c (debug_value, copy_constraint,
3438 swap_constraint_variables, scale_constraint_variable, ): New.
3439 (get_lower_bound, get_upper_bound): Removed.
3440 (graphite_trans_bb_strip_mine): Clean up this code that works
3441 only for constant number of iterations. Fully copy upper and
3442 lower bound constraints, not only the constant part of them.
3443 * graphite.h (debug_value): Declared.
3445 2009-01-06 Jan Sjodin <jan.sjodin@amd.com>
3447 PR tree-optimization/38492
3448 PR tree-optimization/38498
3449 * tree-check.c (operator_is_linear, scev_is_linear_expression): New.
3450 * tree-chrec.h (scev_is_linear_expression): Declared.
3451 * graphite.c (graphite_cannot_represent_loop_niter): New.
3452 (scopdet_basic_block_info): Call graphite_cannot_represent_loop_niter.
3453 (graphite_loop_normal_form): Use gcc_assert.
3454 (scan_tree_for_params): Use CASE_CONVERT.
3455 (phi_node_is_iv, bb_contains_non_iv_scalar_phi_nodes): New.
3456 (build_scop_conditions_1): Call bb_contains_non_iv_scalar_phi_nodes.
3457 Use gcc_assert. Discard scops that contain unhandled cases.
3458 (build_scop_conditions): Return a boolean status for unhandled cases.
3459 (strip_mine_profitable_p): Print the loop number, not its depth.
3460 (is_interchange_valid): Pass the depth of the loop nest, don't
3461 recompute it wrongly.
3462 (graphite_trans_bb_block): Same.
3463 (graphite_trans_bb_block): Print tentative of loop blocking.
3464 (graphite_trans_scop_block): Do not print that the loop has been
3466 (graphite_transform_loops): Do not handle scops that contain condition
3469 * testsuite/gcc.dg/graphite/pr38500.c: Fixed warning as committed
3471 * testsuite/gcc.dg/graphite/block-0.c: Update test.
3472 * testsuite/gcc.dg/graphite/block-1.c: Same.
3473 * testsuite/gcc.dg/graphite/block-2.c: Remove xfail and test for
3475 * testsuite/gcc.dg/graphite/block-4.c: Remove test for strip mine.
3476 * testsuite/gcc.dg/graphite/block-3.c: New.
3477 * testsuite/gcc.dg/graphite/pr38498.c: New.
3479 2008-12-22 Harsha Jagasia <harsha.jagasia@amd.com>
3481 PR tree-optimization/38510
3482 * gcc.dg/graphite/pr38510.c: New.
3483 * graphite.c (recompute_all_dominators): Call mark_irreducible_loops.
3484 (translate_clast): Call recompute_all_dominators before
3486 (gloog): Call recompute_all_dominators before graphite_verify.
3488 2008-12-12 Sebastian Pop <sebastian.pop@amd.com>
3490 PR tree-optimization/38492
3491 * graphite.c (rename_map_elt, debug_rename_elt,
3492 debug_rename_map_1, debug_rename_map, new_rename_map_elt,
3493 rename_map_elt_info, eq_rename_map_elts,
3494 get_new_name_from_old_name, bb_in_sese_p): Moved around.
3495 (sese_find_uses_to_rename_use): Renamed sese_build_livein_liveouts_use.
3496 (sese_find_uses_to_rename_bb): Renamed sese_build_livein_liveouts_bb.
3497 (sese_build_livein_liveouts): New.
3498 (new_sese, free_sese): New.
3499 (new_scop): Call new_sese.
3500 (free_scop): Call free_sese.
3501 (rename_variables_from_edge, rename_phis_end_scop): Removed.
3502 (register_old_new_names): Renamed register_old_and_new_names.
3503 (register_scop_liveout_renames, add_loop_exit_phis,
3504 insert_loop_close_phis, struct igp,
3505 default_liveout_before_guard, add_guard_exit_phis,
3506 insert_guard_phis, copy_renames): New.
3507 (translate_clast): Call insert_loop_close_phis and insert_guard_phis.
3508 (sese_add_exit_phis_edge): Renamed scop_add_exit_phis_edge.
3509 (rewrite_into_sese_closed_ssa): Renamed scop_insert_phis_for_liveouts.
3510 (scop_adjust_phis_for_liveouts): New.
3511 (gloog): Call scop_adjust_phis_for_liveouts.
3513 * graphite.h (struct sese): Documented. Added fields liveout,
3515 (SESE_LIVEOUT, SESE_LIVEIN, SESE_LIVEIN_VER, SESE_NUM_VER): New.
3516 (new_sese, free_sese, sese_build_livein_liveouts): Declared.
3517 (struct scop): Added field liveout_renames.
3518 (SCOP_LIVEOUT_RENAMES): New.
3520 2008-12-11 Sebastian Pop <sebastian.pop@amd.com>
3522 PR tree-optimization/38409
3523 * gcc.dg/graphite/pr38409.c: New.
3524 * graphite.c (nb_reductions_in_loop): Use simple_iv.
3526 2008-12-11 Sebastian Pop <sebastian.pop@amd.com>
3528 * graphite.c (gcc_type_for_cloog_iv): By default return
3530 (graphite_create_new_loop): Don't fold_convert the already
3531 fold_convert-ed expression.
3533 2008-12-11 Harsha Jagasia <harsha.jagasia@amd.com>
3535 PR tree-optimization/38446
3536 * gcc.dg/graphite/pr38446.c: New.
3537 * graphite.c (register_bb_in_sese): New.
3538 (bb_in_sese_p): Check if bb belongs to sese region by explicitly
3539 looking at the bbs in the region.
3540 * graphite.h (sese): Add region_basic_blocks pointer set to
3541 structure and initialize at the time of defining new scop.
3543 2008-12-11 Tobias Grosser <grosser@fim.uni-passau.de>
3545 * graphite.c (new_graphite_bb): Initialize GBB_STATIC_SCHEDULE.
3546 (find_params_in_bb): Do not free data refs.
3547 (free_graphite_bb): Add FIXME on disabled free_data_refs.
3549 2008-12-11 Sebastian Pop <sebastian.pop@amd.com>
3551 * testsuite/gcc.dg/graphite/scop-16.c: Test only scop specific info.
3552 * testsuite/gcc.dg/graphite/scop-17.c: Same.
3553 * testsuite/gcc.dg/graphite/block-5.c: New.
3554 * testsuite/gcc.dg/graphite/block-6.c: New.
3555 * testsuite/gcc.dg/graphite/pr37485.c: Clean dump file after.
3556 * testsuite/gcc.dg/graphite/pr37684.c: Same.
3557 * testsuite/gcc.dg/graphite/block-2.c: Same.
3559 * graphite.c (struct ivtype_map_elt): New.
3560 (debug_ivtype_elt, debug_ivtype_map_1, debug_ivtype_map,
3561 new_ivtype_map_elt, ivtype_map_elt_info, eq_ivtype_map_elts,
3562 gcc_type_for_cloog_iv): New.
3563 (loop_iv_stack_patch_for_consts): Use the type of the induction
3564 variable from the original loop, except for the automatically
3565 generated loops, i.e., in the case of a strip-mined loop, in
3566 which case there is no original loop: in that case just use
3568 (new_graphite_bb): Initialize GBB_CLOOG_IV_TYPES.
3569 (free_graphite_bb): Free GBB_CLOOG_IV_TYPES.
3570 (clast_name_to_gcc): Accept params to be NULL.
3571 (clast_to_gcc_expression): Take an extra parameter for the type.
3572 Convert to that type all the expressions built by this function.
3573 (gcc_type_for_clast_expr, gcc_type_for_clast_eq): New.
3574 (graphite_translate_clast_equation): Compute the type of the
3575 clast_equation before translating its LHS and RHS.
3576 (clast_get_body_of_loop, gcc_type_for_iv_of_clast_loop): New.
3577 (graphite_create_new_loop): Compute the type of the induction
3578 variable before translating the lower and upper bounds and before
3579 creating the induction variable.
3580 (rename_variables_from_edge, rename_phis_end_scop): New.
3581 (copy_bb_and_scalar_dependences): Call rename_phis_end_scop.
3582 (sese_add_exit_phis_edge): Do not use integer_zero_node.
3583 (find_cloog_iv_in_expr, compute_cloog_iv_types_1,
3584 compute_cloog_iv_types): New.
3585 (gloog): Call compute_cloog_iv_types before starting the
3586 translation of the clast.
3588 * graphite.h (struct graphite_bb): New field cloog_iv_types.
3589 (GBB_CLOOG_IV_TYPES): New.
3590 (debug_ivtype_map): Declared.
3591 (oldiv_for_loop): New.
3593 2008-12-10 Tobias Grosser <grosser@fim.uni-passau.de>
3596 * graphite.c (new_scop): Initialize SCOP_ADD_PARAMS.
3597 (param_index): Assert if parameter is not know after parameter
3599 (find_params_in_bb): Detect params directly in GBB_CONDITIONS.
3600 (find_scop_parameters): Mark, that we have finished parameter
3602 (graphite_transform_loops): Move condition detection before parameter
3604 * graphite.h (struct scop): Add SCOP_ADD_PARAMS.
3605 * testsuite/gfortran.dg/graphite/pr38459.f90: New.
3607 2008-12-09 Tobias Grosser <grosser@fim.uni-passau.de>
3609 * graphite.c (graphite_transform_loops): Always call find_transform ()
3610 in ENABLE_CHECKING. So we test these code paths, even if we do not
3613 2008-12-09 Tobias Grosser <grosser@fim.uni-passau.de>
3615 * graphite.c (print_graphite_bb): Fix printing to file != dump_file.
3616 (print_scop): Ditto.
3618 2008-12-08 Tobias Grosser <grosser@fim.uni-passau.de>
3621 Fix testsuite/gfortran.dg/graphite/id-3.f90.
3622 * graphite.c (scopdet_basic_block_info): Fix bug that found some
3623 regions more than once.
3625 2008-12-03 Sebastian Pop <sebastian.pop@amd.com>
3627 Fix testsuite/gfortran.dg/graphite/id-4.f90.
3628 * graphite.c (scan_tree_for_params): Do not compute the multiplicand
3631 2008-12-03 Sebastian Pop <sebastian.pop@amd.com>
3633 Fix testsuite/gfortran.dg/graphite/id-1.f90.
3634 * graphite.c (gmp_cst_to_tree): Pass the type in parameter.
3635 (loop_iv_stack_patch_for_consts): Update use of gmp_cst_to_tree.
3636 (max_precision_type): New.
3637 (value_clast): Removed.
3638 (clast_to_gcc_expression): Be more careful to types of expressions.
3639 Use max_precision_type and update use of gmp_cst_to_tree.
3640 (graphite_translate_clast_equation): Use max_precision_type.
3641 (graphite_create_guard_cond_expr): Do not use integer_type_node,
3642 use the type of the condition.
3643 (graphite_create_new_loop): Do not use integer_type_node, use the
3644 max_precision_type of lb and ub.
3646 2008-12-03 Sebastian Pop <sebastian.pop@amd.com>
3648 * graphite.c (build_scops_1): Initialize open_scop.exit
3651 2008-12-02 Sebastian Pop <sebastian.pop@amd.com>
3653 * testsuite/gcc.dg/graphite/pr38084.c: New.
3654 * testsuite/gfortran.dg/graphite/id-1.f90: New.
3655 * testsuite/gfortran.dg/graphite/id-2.f90: New.
3656 * testsuite/gfortran.dg/graphite/id-3.f90: New.
3657 * testsuite/gfortran.dg/graphite/id-4.f90: New.
3658 * testsuite/gfortran.dg/graphite/pr37857.f90: New.
3660 2008-12-02 Sebastian Pop <sebastian.pop@amd.com>
3661 Jan Sjodin <jan.sjodin@amd.com>
3662 Harsha Jagasia <harsha.jagasia@amd.com>
3674 * testsuite/gcc.dg/graphite/pr38073.c: New.
3675 * testsuite/gcc.dg/graphite/pr37928.c: New.
3676 * testsuite/gcc.dg/graphite/pr37883.c: New.
3677 * testsuite/gcc.dg/graphite/pr38125.c: New.
3678 * testsuite/gfortran.dg/graphite/pr38083.f90: New.
3679 * testsuite/gfortran.dg/graphite/pr37852.f90: New.
3680 * testsuite/gfortran.dg/graphite/pr37980.f90: New.
3682 * testsuite/gcc.dg/graphite/scop-18.c: Remove reduction, test for
3683 the number of detected scops. Copy exact same test for loop
3685 * testsuite/gcc.dg/graphite/block-1.c: Fix the number of expected
3686 loops to be blocked as reductions are not handled.
3687 * testsuite/gcc.dg/graphite/block-4.c: ...here. New.
3689 * tree-phinodes.c (remove_phi_nodes): New, extracted from...
3690 * tree-cfg.c (remove_phi_nodes_and_edges_for_unreachable_block):
3692 * tree-flow.h (remove_phi_nodes, canonicalize_loop_ivs): Declared.
3693 * Makefile.in (graphite.o): Depend on value-prof.h.
3694 (graphite.o-warn): Removed -Wno-error.
3695 * tree-parloops.c (canonicalize_loop_ivs): Allow reduction_list
3696 to be a NULL pointer. Call update_stmt. Return the newly created
3697 cannonical induction variable.
3699 * graphite.h (debug_rename_map): Declared. Fix some comments.
3701 * graphite.c: Reimplement the code generation from graphite to gimple.
3702 Include value-prof.h.
3703 (loop_iv_stack_get_iv): Do not return NULL for constant substitutions.
3704 (get_old_iv_from_ssa_name): Removed.
3705 (graphite_stmt_p): New.
3706 (new_graphite_bb): Test for useful statements before building a
3707 graphite statement for the basic block.
3708 (free_graphite_bb): Do not free GBB_DATA_REFS: this is a bug
3709 in free_data_ref that calls BITMAP_FREE (DR_VOPS (dr)) without
3711 (recompute_all_dominators, graphite_verify,
3712 nb_reductions_in_loop, graphite_loop_normal_form): New.
3713 (scop_record_loop): Call graphite_loop_normal_form.
3714 (build_scop_loop_nests): Iterate over all the blocks of the
3715 function instead of relying on the incomplete information from
3716 SCOP_BBS. Return the success of the operation.
3717 (find_params_in_bb): Use the data from GBB_DATA_REFS.
3718 (add_bb_domains): Removed.
3719 (build_loop_iteration_domains): Don't call add_bb_domains.
3720 Add the iteration domain only to the basic blocks that have been
3721 translated to graphite.
3722 (build_scop_conditions_1): Add constraints only if the basic
3723 block have been translated to graphite.
3724 (build_scop_data_accesses): Completely disabled until data
3725 dependence is correctly implemented.
3726 (debug_rename_elt, debug_rename_map_1, debug_rename_map): New.
3727 (remove_all_edges_1, remove_all_edges): Removed.
3728 (get_new_name_from_old_name): New.
3729 (graphite_rename_variables_in_stmt): Renamed
3730 rename_variables_in_stmt. Call get_new_name_from_old_name.
3731 Use replace_exp and update_stmt.
3732 (is_old_iv): Renamed is_iv.
3733 (expand_scalar_variables_stmt): Extra parameter for renaming map.
3734 Use replace_exp and update_stmt.
3735 (expand_scalar_variables_expr): Same. Use the map to get the
3736 new names for the renaming of induction variables and for the
3737 renaming of variables after a basic block has been copied.
3738 (expand_scalar_variables): Same.
3739 (graphite_rename_variables): Renamed rename_variables.
3740 (move_phi_nodes): Removed.
3741 (get_false_edge_from_guard_bb): New.
3742 (build_iv_mapping): Do not insert the induction variable of a
3743 loop in the renaming iv map if the basic block does not belong
3745 (register_old_new_names, graphite_copy_stmts_from_block,
3746 copy_bb_and_scalar_dependences): New.
3747 (translate_clast): Heavily reimplemented: copy basic blocks,
3748 do not move them. Finally, in call cleanup_tree_cfg in gloog.
3749 At each translation step call graphite_verify ensuring the
3750 consistency of the SSA, loops and dominators information.
3751 (collect_virtual_phis, find_vdef_for_var_in_bb,
3752 find_vdef_for_var_1, find_vdef_for_var,
3753 patch_phis_for_virtual_defs): Removed huge hack.
3754 (mark_old_loops, remove_dead_loops, skip_phi_defs,
3755 collect_scop_exit_phi_args, patch_scop_exit_phi_args,
3756 gbb_can_be_ignored, scop_remove_ignoreable_gbbs, ): Removed.
3757 (remove_sese_region, ifsese, if_region_entry, if_region_exit,
3758 if_region_get_condition_block, if_region_set_false_region,
3759 create_if_region_on_edge, move_sese_in_condition, bb_in_sese_p,
3760 sese_find_uses_to_rename_use, sese_find_uses_to_rename_bb,
3761 sese_add_exit_phis_edge, sese_add_exit_phis_var,
3762 rewrite_into_sese_closed_ssa): New.
3763 (gloog): Remove dead code. Early return if code cannot be
3764 generated. Call cleanup_tree_cfg once the scop has been code
3766 (graphite_trans_scop_block, graphite_trans_loop_block): Do not
3767 block loops with less than two loops.
3768 (graphite_apply_transformations): Remove the call to
3769 scop_remove_ignoreable_gbbs.
3770 (limit_scops): When build_scop_loop_nests fails, continue on
3771 the next scop. Fix open_scop.entry.
3772 (graphite_transform_loops): Call recompute_all_dominators: force the
3773 recomputation of correct CDI_DOMINATORS and CDI_POST_DOMINATORS.
3774 Call initialize_original_copy_tables and free_original_copy_tables
3775 to be able to copy basic blocks during code generation.
3776 When build_scop_loop_nests fails, continue on next scop.
3777 (value_clast): New union.
3778 (clast_to_gcc_expression): Fix type cast warning.
3780 2008-11-09 Sebastian Pop <sebastian.pop@amd.com>
3782 * Merge from mainline (r140838:141727).
3784 2008-11-05 Tobias Grosser <grosser@fim.uni-passau.de>
3788 * graphite.c (scan_tree_for_params): Add POINTER_PLUS_EXPR.
3790 2008-11-05 Tobias Grosser <grosser@fim.uni-passau.de>
3794 * graphite.c (scopdet_basic_block_info): Fix loops with multiple
3795 exits and conditions.
3796 * testsuite/gcc.dg/graphite/pr37943.c: New.
3798 2008-10-23 Tobias Grosser <grosser@fim.uni-passau.de>
3801 * graphite.c (gloog): Replace EXIT_BLOCK_PTR with scop exit.
3803 2008-10-23 Tobias Grosser <grosser@fim.uni-passau.de>
3805 * doc/invoke.texi: Fix spaces.
3807 2008-10-22 Sebastian Pop <sebastian.pop@amd.com>
3809 PR tree-optimization/37891
3810 Reverted last commit.
3811 * graphite.c (create_single_entry_edge): Set
3812 EDGE_IRREDUCIBLE_LOOP and BB_IRREDUCIBLE_LOOP.
3814 2008-10-21 Sebastian Pop <sebastian.pop@amd.com>
3815 Mitul Thakkar <mitul.thakkar@amd.com>
3817 * graphite.c (create_single_entry_edge): Set
3818 EDGE_IRREDUCIBLE_LOOP and BB_IRREDUCIBLE_LOOP.
3820 2008-10-16 Tobias Grosser <grosser@fim.uni-passau.de>
3822 * doc/invoke.texi: Add -fgraphite-identity.
3823 * graphite.c (graphite_apply_transformations): Check for
3824 -fgraphite-identity.
3825 * toplev.c (process_options): Add flag_graphite_identity.
3826 * tree-ssa-loop.c: Add flag_graphite_identity.
3828 2008-10-14 Sebastian Pop <sebastian.pop@amd.com>
3830 Undo changes from 2008-10-02:
3831 * tree-ssa-loop-ivopts.c (rewrite_use_nonlinear_expr): Convert
3832 operand type when copying the operand to a variable of different type.
3833 * cfgloopmanip.c (create_empty_loop_on_edge): Write exit condition
3834 with the IV name after increment.
3836 2008-10-14 Sebastian Pop <sebastian.pop@amd.com>
3837 Harsha Jagasia <harsha.jagasia@amd.com>
3839 PR tree-optimization/37828
3840 * testsuite/gcc.dg/graphite/pr37828.c: New.
3841 * graphite.c (graphite_trans_loop_block): Do not loop block
3842 single nested loops.
3844 2008-10-09 Harsha Jagasia <harsha.jagasia@amd.com>
3845 Sebastian Pop <sebastian.pop@amd.com>
3847 * graphite.c (struct rename_map_elt, new_rename_map_elt,
3848 rename_map_elt_info, eq_rename_map_elts): New.
3849 (graphite_rename_ivs_stmt): Renamed graphite_rename_variables_in_stmt.
3850 (expand_scalar_variables_expr): Change parameters.
3851 (expand_scalar_variables_stmt): Same.
3852 (expand_scalar_variables): Same.
3853 (graphite_rename_ivs): Rename graphite_rename_variables.
3854 (build_iv_mapping): New.
3855 (translate_clast): Call build_iv_mapping.
3856 * graphite.h (gbb_p): New name.
3858 2008-10-03 Harsha Jagasia <harsha.jagasia@amd.com>
3860 PR tree-optimization/37684
3861 * gcc.dg/graphite/pr37684.c: New.
3862 * graphite.c (exclude_component_ref): New.
3863 (is_simple_operand): Call exclude_component_ref.
3865 2008-10-02 Jan Sjodin <jan.sjodin@amd.com>
3866 Harsha Jagasia <harsha.jagasia@amd.com>
3868 PR tree-optimization/37485
3869 * gcc.dg/graphite/block-2.c: New
3870 * graphite.c (gmp_cst_to_tree): Moved.
3871 (iv_stack_entry_is_constant): New.
3872 (iv_stack_entry_is_iv): New.
3873 (loop_iv_stack_push): Renamed to loop_iv_stack_push_iv.
3874 (loop_iv_stack_insert_constant): New.
3875 (loop_iv_stack_pop): Use new datatpype.
3876 (loop_iv_stack_get_iv): Same.
3877 (loop_iv_stack_get_iv_from_name): Same.
3878 (loop_iv_stack_debug): Renamed to debug_loop_iv_stack.
3879 (loop_iv_stack_patch_for_consts): New.
3880 (loop_iv_stack_remove_constants): New.
3881 (graphite_create_new_loop): Use loop_iv_stack_push_iv.
3882 (translate_clast): Call loop_iv_stack_patch_for_consts and
3883 loop_iv_stack_remove_constants.
3884 (gloog): Use new datatype. Redirect construction edge to end
3885 block to avoid accidental deletion.
3886 * graphite.h (enum iv_stack_entry_kind): New. Tag for data in
3888 (union iv_stack_entry_data): New. Data in iv stack entry.
3889 (struct iv_stack_entry): New. Datatype for iv stack entries.
3891 2008-10-02 Sebastian Pop <sebastian.pop@amd.com>
3893 * tree-ssa-loop-ivopts.c (rewrite_use_nonlinear_expr): Convert
3894 operand type when copying the operand to a variable of different type.
3896 2008-10-02 Sebastian Pop <sebastian.pop@amd.com>
3898 * cfgloopmanip.c (create_empty_loop_on_edge): Write exit condition
3899 with the IV name after increment.
3901 2008-10-02 Sebastian Pop <sebastian.pop@amd.com>
3903 * Merge from mainline (r140164:140838).
3905 2008-09-10 Konrad Trifunovic <konrad.trifunovic@inria.fr>
3907 * graphite-data-ref.c: New.
3908 * graphite.c (print_scop): Also dump the dependence