1 2009-10-17 Sebastian Pop <sebastian.pop@amd.com>
3 * graphite-dependences.c (dependence_polyhedron_1): Remove
4 unused gdim dimensions from the DDR polyhedron.
6 2009-10-17 Sebastian Pop <sebastian.pop@amd.com>
8 * graphite-dependences.c (pddr_transformed_scattering): New.
9 (dot_original_deps_stmt_1): New.
10 (dot_transformed_deps_stmt_1): New.
11 (dot_deps_stmt_1): Call dot_original_deps_stmt_1 and
12 dot_transformed_deps_stmt_1.
13 (dot_original_deps): New.
14 (dot_transformed_deps): New.
15 (dot_deps_1): Call dot_original_deps and dot_transformed_deps.
17 2009-10-17 Sebastian Pop <sebastian.pop@amd.com>
19 * graphite-dependences.c (reduction_dr_1): Remove wrong
20 assert: reduction BBs can have multiple reduction writes
21 to memory. interchange-3.f90 is an example.
23 2009-10-17 Sebastian Pop <sebastian.pop@amd.com>
25 * gfortran.dg/graphite/interchange-3.f90: New.
27 2009-10-17 Sebastian Pop <sebastian.pop@amd.com>
29 * gcc.dg/graphite/interchange-1.c: Un-XFAILed.
31 2009-10-17 Sebastian Pop <sebastian.pop@amd.com>
33 * graphite-dependences.c (dependence_polyhedron_1): Add the
34 context to the dependence polyhedron.
36 2009-10-17 Sebastian Pop <sebastian.pop@amd.com>
38 * graphite-poly.c (pbb_remove_duplicate_pdrs): Initialize
39 PBB_PDR_DUPLICATES_REMOVED.
42 2009-10-17 Sebastian Pop <sebastian.pop@amd.com>
44 * graphite-sese-to-poly.c (find_scop_parameters): Initialize
46 (build_loop_iteration_domains): Extract bounds on parameters
47 based on the data size.
48 (build_scop_context): Do not initialize SCOP_CONTEXT;
51 2009-10-17 Sebastian Pop <sebastian.pop@amd.com>
53 * graphite-ppl.c (ppl_min_for_le_polyhedron): New.
54 * graphite-ppl.h (graphite-ppl.h): Declared.
56 2009-10-17 Sebastian Pop <sebastian.pop@amd.com>
58 * graphite-ppl.c (ppl_print_linear_expr): New.
59 (debug_ppl_linear_expr): New.
60 * graphite-ppl.h (ppl_print_linear_expr): Declared.
61 (debug_ppl_linear_expr): Declared.
63 2009-10-16 Sebastian Pop <sebastian.pop@amd.com>
65 * graphite-interchange.c: Fix comments.
66 * gcc.dg/graphite/block-1.c: Fix comments.
68 2009-10-16 Sebastian Pop <sebastian.pop@amd.com>
70 * gcc.dg/graphite/interchange-7.c: Un-XFAILed.
71 * gcc.dg/graphite/interchange-9.c: Un-XFAILed.
73 2009-10-16 Sebastian Pop <sebastian.pop@amd.com>
75 Reapply the patch from Alexander Monakov that disappeared during
76 the last merges from trunk.
78 2009-09-16 Alexander Monakov <amonakov@ispras.ru>
80 * graphite-sese-to-poly.c (pdr_add_data_dimensions): Add bounds only
81 for ARRAY_REFs. Use array_ref_{low,up}_bound to determine bounds.
83 2009-10-15 Sebastian Pop <sebastian.pop@amd.com>
85 * graphite-interchange.c (memory_stride_in_loop): The depth
86 argument corresponds to a dynamic time dimension, so use
87 psct_dynamic_dim to refer to the transformed scattering dimension.
89 2009-10-15 Sebastian Pop <sebastian.pop@amd.com>
91 * graphite-interchange.c (memory_stride_in_loop): Fix comments.
93 2009-10-15 Sebastian Pop <sebastian.pop@amd.com>
95 * graphite-blocking.c (lst_do_strip_mine): Avoid strip mining the
97 * graphite-interchange.c (lst_do_interchange): Avoid interchanging
99 * graphite-poly.c (scop_to_lst): Fix LST sequence in an outermost
101 (print_lst): Print the root of LST in a different format.
102 * graphite-poly.h (lst_depth): Adjust to include the root of the LST.
104 2009-10-15 Sebastian Pop <sebastian.pop@amd.com>
106 * graphite-poly.c (print_scop): Fix pretty printing of a SCoP.
108 2009-10-15 Sebastian Pop <sebastian.pop@amd.com>
110 * doc/passes.texi: Document the Graphite infrastructure.
112 2009-10-15 Sebastian Pop <sebastian.pop@amd.com>
114 * graphite-sese-to-poly.c (insert_copyin): Use gsi_insert_seq_on_edge.
115 (rewrite_commutative_reductions_out_of_ssa): Call gsi_commit_edge_inserts,
116 and check the SSA representation.
118 * gfortran.dg/graphite/id-18.f90: New, reduced from PR41193.
120 2009-10-15 Sebastian Pop <sebastian.pop@amd.com>
122 * gcc.dg/graphite/pr40157.c: Use -floop-block as reported in the PR.
124 2009-10-14 Sebastian Pop <sebastian.pop@amd.com>
126 * gcc.dg/graphite/interchange-11.c: New.
128 2009-10-14 Sebastian Pop <sebastian.pop@amd.com>
130 * gcc.dg/graphite/interchange-8.c: Enable loop interchange.
132 2009-10-14 Sebastian Pop <sebastian.pop@amd.com>
134 * gcc.dg/graphite/graphite.exp (DEFAULT_CFLAGS_GRAPHITE_BLOCK):
135 Add -fno-loop-strip-mine and -fno-loop-interchange.
136 (DEFAULT_FLAGS_GRAPHITE_INTERCHANGE): Add -fno-loop-block and
137 -fno-loop-strip-mine.
138 * gfortran.dg/graphite/graphite.exp: Same.
140 2009-10-14 Sebastian Pop <sebastian.pop@amd.com>
142 * gcc.dg/graphite/graphite.exp (DEFAULT_CFLAGS_GRAPHITE_BLOCK):
143 Renamed DEFAULT_FLAGS_GRAPHITE_BLOCK.
144 (DEFAULT_CFLAGS_GRAPHITE_IDENTITY): Renamed
145 DEFAULT_FLAGS_GRAPHITE_IDENTITY.
146 (DEFAULT_CFLAGS_GRAPHITE_INTERCHANGE): Renamed
147 DEFAULT_FLAGS_GRAPHITE_INTERCHANGE.
148 (DEFAULT_CFLAGS_GRAPHITE_SCOP): Renamed
149 DEFAULT_FLAGS_GRAPHITE_SCOP.
150 (DEFAULT_CFLAGS_RUN_ID): Renamed DEFAULT_FLAGS_RUN_ID.
151 (DEFAULT_CFLAGS_GRAPHITE): Renamed DEFAULT_FLAGS_GRAPHITE.
153 2009-10-14 Sebastian Pop <sebastian.pop@amd.com>
155 * graphite-poly.c (pbb_number_of_iterations_at_time): Cleanup comments.
157 2009-10-14 Konrad Trifunovic <konrad.trifunovic@gmail.com>
158 Sebastian Pop <sebastian.pop@amd.com>
160 * graphite-interchange.c (build_linearized_memory_access): Pass an
162 (memory_stride_in_loop): Include transform scattering in the
163 access functions to be able to querry the strides in the
165 (pbb_interchange_loop_depths): Interchange the psct_dynamic_dim,
166 not the psct_iterator_dim.
168 2009-10-14 Sebastian Pop <sebastian.pop@amd.com>
170 * graphite-blocking.c (pbb_do_strip_mine): Removed.
171 (lst_do_strip_mine_loop): New.
172 (lst_do_strip_mine): New.
173 (scop_do_strip_mine): Call lst_do_strip_mine.
174 * graphite-poly.h (lst_add_loop_under_loop): New.
175 (lst_find_first_pbb): New.
177 2009-10-14 Sebastian Pop <sebastian.pop@amd.com>
179 * graphite-poly.c (loop_to_lst): Fix LST creation.
181 2009-10-14 Tobias Grosser <grosser@fim.uni-passau.de>
183 * testsuite/gcc.dg/graphite/id-15.c: (8 * 8) replaced with
184 sizeof(unsigned long) to make it run on 32bit systems.
186 2009-10-14 Tobias Grosser <grosser@fim.uni-passau.de>
188 * testsuite/gcc.dg/graphite/run-id-1.c: Use smaller matrix to not
191 2009-10-14 Ramakrishna Upadrasta <Ramakrishna.Upadrasta@inria.fr>
193 * graphite-sese-to-poly.c (write_alias_graph_to_ascii_dimacs): Fix
195 (write_alias_graph_to_ascii_dot): New.
196 (write_alias_graph_to_ascii_ecc): Ditto.
197 (partition_drs_to_sets): Add testing of optimality of current method
198 which assigns alias numbers according to DFS Comopnent number. used
199 as heuristic for the upcoming ECC algorithm.
200 (build_scop_drs): Write to file also with the ecc and dot format.
202 2009-10-13 Sebastian Pop <sebastian.pop@amd.com>
204 * gfortran.dg/graphite/interchange-1.f: XFail.
206 2009-10-13 Sebastian Pop <sebastian.pop@amd.com>
208 * graphite.c (graphite_initialize): Do not handle functions with
209 more than 100 basic blocks.
211 2009-10-13 Sebastian Pop <sebastian.pop@amd.com>
213 * graphite-blocking.c (pbb_do_strip_mine): Use
214 PARAM_LOOP_BLOCK_TILE_SIZE.
216 2009-10-13 Sebastian Pop <sebastian.pop@amd.com>
218 * graphite-poly.c (dot_lst_1): New.
220 * graphite-poly.h (dot_lst): Declared.
222 2009-10-13 Sebastian Pop <sebastian.pop@amd.com>
224 * graphite-dependences.c (dot_deps_stmt_1): New.
225 (dot_deps_stmt): New.
226 * graphite-dependences.h (dot_deps_stmt): Declared.
228 2009-10-09 Sebastian Pop <sebastian.pop@amd.com>
230 * graphite-sese-to-poly.c (rewrite_cross_bb_scalar_dependence): Do
231 not replace cross BB scalar dependences ending on PHI nodes.
232 (rewrite_cross_bb_scalar_deps): Filter out GIMPLE_PHI nodes.
234 2009-10-09 Sebastian Pop <sebastian.pop@amd.com>
236 * graphite-poly.c (apply_poly_transforms): Implement the high
237 level driver for flag_loop_block.
238 * tree-ssa-loop.c (gate_graphite_transforms): Remove call to sorry for
241 * gcc.dg/graphite/graphite.exp (DEFAULT_CFLAGS_GRAPHITE_BLOCK): Add
243 * gfortran.dg/graphite/graphite.exp (DEFAULT_CFLAGS_GRAPHITE_BLOCK):
246 2009-10-09 Sebastian Pop <sebastian.pop@amd.com>
248 * graphite-poly.h (lst_find_pbb): New.
249 (find_lst_loop): New.
251 2009-10-09 Sebastian Pop <sebastian.pop@amd.com>
253 * graphite-poly.c (new_scop): Remove init of SCOP_DEP_GRAPH.
254 * graphite-poly.h (struct scop): Remove dep_graph field.
255 (SCOP_DEP_GRAPH): Removed.
257 2009-10-09 Sebastian Pop <sebastian.pop@amd.com>
259 * graphite-poly.h (copy_lst): Do full copy of LST.
261 2009-10-07 Sebastian Pop <sebastian.pop@amd.com>
263 * graphite-sese-to-poly.c (reduction_phi_p): Call remove_invariant_phi
264 when the loop stride is zero.
266 * gcc.dg/graphite/id-16.c: New.
268 2009-10-06 Sebastian Pop <sebastian.pop@amd.com>
270 * graphite-dependences.c (reduction_dr_1): New.
271 (reduction_dr_p): New.
272 (graphite_legal_transform_dr): Call reduction_dr_p.
273 (reduction_ddr): Renamed reduction_ddr_p.
274 * graphite-poly.h (same_pdr_p): New.
275 (number_of_write_pdrs): New.
276 * graphite-sese-to-poly.c (nb_data_writes_in_bb): New.
277 (split_reduction_stmt): Do not split reduction statements
278 when there are no writes to memory.
279 (translate_scalar_reduction_to_array_for_stmt): Insert the
280 memory reduction statement just after the scalar reduction statement.
282 * gcc.dg/graphite/interchange-10.c: Updated to differ from interchange-4.c.
284 * gcc.dg/graphite/interchange-3.c: Un-XFAIL-ed.
285 * gcc.dg/graphite/interchange-4.c: Un-XFAIL-ed.
287 2009-10-06 Sebastian Pop <sebastian.pop@amd.com>
289 * graphite-interchange.c (lst_apply_interchange): New.
290 (lst_interchange_profitable_p): New.
291 (lst_try_interchange_loops): New.
292 (lst_try_interchange): New.
293 (lst_do_interchange): New.
294 (pbb_do_interchange): Removed.
295 (scop_do_interchange): Call lst_do_interchange.
297 2009-10-06 Sebastian Pop <sebastian.pop@amd.com>
299 * graphite-poly.c (print_scop): Print SCOP_ORIGINAL_SCHEDULE and
300 SCOP_TRANSFORMED_SCHEDULE.
305 * graphite-poly.h (lst_p): New.
308 (LST_LOOP_FATHER): New.
311 (scop_to_lst): Declared.
312 (print_lst): Declared.
313 (debug_lst): Declared.
318 (lst_dewey_number): New.
319 (struct scop): Add original_schedule and transformed_schedule fields.
320 (SCOP_ORIGINAL_SCHEDULE): New.
321 (SCOP_TRANSFORMED_SCHEDULE): New.
322 * graphite-sese-to-poly.c (build_poly_scop): Call scop_to_lst.
324 2009-10-05 Sebastian Pop <sebastian.pop@amd.com>
326 * graphite-dependences.c (reduction_ddr): New.
327 (graphite_legal_transform_bb): Call reduction_ddr.
328 * graphite-poly.c (new_poly_bb): Pass a new bool parameter.
329 Initialize PBB_IS_REDUCTION.
330 * graphite-poly.h (struct poly_bb): New bool field is_reduction.
331 (PBB_IS_REDUCTION): New.
332 (new_poly_bb): Update declaration.
333 * graphite-scop-detection.h (build_scop_bbs): Removed.
334 (nb_reductions_in_loop): Removed.
335 * graphite-sese-to-poly.c (try_generate_gimple_bb): Pass a sbitmap
336 parameter for reductions.
337 (try_generate_gimple_bb): Update call to new_poly_bb.
338 (build_scop_bbs_1): Same.
339 (build_scop_bbs): Same.
340 (gsi_for_phi_node): New.
341 (scalar_close_phi_node_p): Remove gcc_assert.
342 (split_reduction_stmt): New.
343 (is_reduction_operation_p): New.
344 (phi_contains_arg): New.
345 (follow_ssa_with_commutative_ops): New.
346 (detect_commutative_reduction_arg): New.
347 (detect_commutative_reduction_assign): New.
348 (follow_inital_value_to_phi): New.
349 (edge_initial_value_for_loop_phi): New.
350 (initial_value_for_loop_phi): New.
351 (detect_commutative_reduction): New.
352 (translate_scalar_reduction_to_array_for_stmt): New.
353 (insert_copyout): New.
354 (insert_copyin): New.
355 (translate_scalar_reduction_to_array): New.
356 (rewrite_commutative_reductions_out_of_ssa_close_phi): New.
357 (rewrite_commutative_reductions_out_of_ssa_loop): New.
358 (rewrite_commutative_reductions_out_of_ssa): New.
359 (build_poly_scop): Call rewrite_commutative_reductions_out_of_ssa.
360 * sese.h (split_region_for_bb): New.
362 * gcc.dg/graphite/graphite.exp (DEFAULT_CFLAGS_GRAPHITE_BLOCK): Add -ffast-math.
363 * gcc.dg/graphite/interchange-1.c: Fix format.
364 * gcc.dg/graphite/interchange-10.c: New.
366 2009-10-05 Sebastian Pop <sebastian.pop@amd.com>
368 * graphite-sese-to-poly.c (insert_out_of_ssa_copy): Remove
371 2009-10-05 Sebastian Pop <sebastian.pop@amd.com>
373 * graphite-sese-to-poly.c (scev_analyzable_p): New.
374 (rewrite_cross_bb_scalar_dependence): New.
375 (rewrite_cross_bb_scalar_deps): New.
376 (rewrite_reductions_out_of_ssa): Use bb_in_sese_p.
377 Call rewrite_cross_bb_scalar_deps.
379 2009-10-05 Sebastian Pop <sebastian.pop@amd.com>
381 * graphite-sese-to-poly.c (gsi_for_ssa_name_def): Removed.
382 (insert_out_of_ssa_copy): Directly use gsi_after_labels and
385 2009-10-05 Sebastian Pop <sebastian.pop@amd.com>
387 * graphite-clast-to-gimple.c (build_cloog_prog): Use pbb_index.
388 * graphite-interchange.c (pbb_do_interchange): Same.
389 * graphite-poly.c (print_scattering_function): Same.
391 * graphite-poly.h (pbb_loop): New.
392 * graphite-sese-to-poly.c (create_linear_expr_from_tree): Use pbb_loop.
394 2009-09-27 Sebastian Pop <sebastian.pop@amd.com>
396 * graphite-scop-detection.c (limit_scops): Do not build poly_bbs.
398 2009-09-27 Sebastian Pop <sebastian.pop@amd.com>
400 * graphite-sese-to-poly.c (partition_drs_to_sets): Drs is not modified,
401 so don't pass a pointer to it.
402 (build_alias_set_for_drs): Same.
403 (build_base_obj_set_for_drs): Same.
404 (build_scop_drs): Same.
406 2009-09-26 Li Feng <nemokingdom@gmail.com>
408 * graphite-sese-to-poly.c (build_scop_drs): Disable writing to file
409 the alias graph of data references.
411 2009-09-25 Li Feng <nemokingdom@gmail.com>
413 * graphite-sese-to-poly.c (write_alias_graph_to_ascii_dimacs): New.
414 (build_scop_drs): When debugging, write the alias graph to file,
415 otherwise, should be disabled.
417 2009-09-17 Sebastian Pop <sebastian.pop@amd.com>
419 * graphite-scop-detection.c (stmt_simple_memref_p): Removed.
420 (is_simple_operand): Remove call to stmt_simple_memref_p.
421 (stmt_simple_for_scop_p): Update call to is_simple_operand.
423 2009-09-17 David Edelsohn <edelsohn@gnu.org>
425 * testsuite/gcc.dg/graphite/interchange-mvt.c: New File.
426 * testsuite/gcc.dg/graphite/scop-dsyrk.c: New File.
427 * testsuite/gcc.dg/graphite/scop-dsyr2k.c: New File.
428 * testsuite/gcc.dg/graphite/scop-mvt.c: New File.
429 * testsuite/gcc.dg/graphite/scop-sor.c: New File.
431 2009-09-17 Li Feng <nemokingdom@gmail.com>
434 * graphite-dependences.c (poly_drs_may_alias_p): Adjust definition.
435 (pddr_original_scattering): Make sure 2 pdr2 in the same base object set.
436 (graphite_carried_dependence_level_k): Ditto.
437 * graphite-poly.c (new_poly_dr): Add init of PDR_BASE_OBJECT_SET.
438 * graphite-poly.h (struct poly_dr): Add member dr_base_object_set.
439 (new_poly_dr): Adjust declaration.
440 * graphite-sese-to-poly.c (free_data_refs_aux): New.
441 (free_gimple_bb): Added free_data_refs_aux.
442 (build_poly_dr): Add dr_base_object_set.
443 (partition_drs_to_sets): New.
444 (dr_same_base_object_p): New.
445 (build_alias_set_for_drs): New.
446 (build_base_object_set_for_drs): New.
447 (build_scop_drs): Add build_base_obj_set_for_drs.
448 * graphite-sese-to-poly.h: Added #define for alias set number index and
449 base object set index.
450 * libgomp/testsuite/libgomp.graphite/force-parallel-6.c: Refine tests.
451 * libgomp/testsuite/libgomp.graphite/pr4118.c: New.
453 2009-09-16 Alexander Monakov <amonakov@ispras.ru>
455 * graphite-sese-to-poly.c (pdr_add_data_dimensions): Add bounds only
456 for ARRAY_REFs. Use array_ref_{low,up}_bound to determine bounds.
458 2009-09-14 Sebastian Pop <sebastian.pop@amd.com>
460 * graphite-sese-to-poly.c (struct irp_data): Removed.
461 (idx_record_params): Removed.
462 (find_params_in_bb): Scan for parameters the access functions; don't
463 parse the tree representation.
465 2009-09-14 Sebastian Pop <sebastian.pop@amd.com>
467 * tree-ssa-loop.c (gate_graphite_transforms): Disable Graphite
468 passes at -O1 and below.
470 2009-09-14 Sebastian Pop <sebastian.pop@amd.com>
472 * graphite-blocking.c: Fix order of includes: tree-chrec.h, then
473 tree-scalar-evolution.h, and then tree-data-ref.h.
474 * graphite-clast-to-gimple.c: Same.
475 * graphite-dependences.c: Same.
476 * graphite-interchange.c: Same.
477 * graphite-poly.c: Same.
478 * graphite-scop-detection.c: Same.
479 * graphite-sese-to-poly.c: Same.
481 * lambda-code.c: Same.
482 * matrix-reorg.c: Same.
483 * tree-data-ref.c: Same.
484 * tree-if-conv.c: Same.
485 * tree-loop-distribu: Same.: Same.
486 * tree-loop-linear.c: Same.
487 * tree-parloops.c: Same.
488 * tree-predcom.c: Same.
489 * tree-vect-patterns.c: Same.
491 2009-09-02 Sebastian Pop <sebastian.pop@amd.com>
493 Partially revert the previous patch, except the following.
494 * tree-scalar-evolution.c (instantiate_scev_not): Adapted to pass
495 as parameters the operands of the not expression.
497 2009-09-01 Sebastian Pop <sebastian.pop@amd.com>
499 * tree-scalar-evolution.c (instantiate_scev_assign): New.
500 Do not call analyze_scalar_evolution on assignments.
501 (instantiate_scev_phi): Call analyze_scalar_evolution.
502 (instantiate_scev_name): Call instantiate_scev_assign and
503 instantiate_scev_phi.
504 (instantiate_scev_not): Adapted to pass as parameters the operands
505 of the not expression.
507 2009-09-01 Sebastian Pop <sebastian.pop@amd.com>
509 * tree-scalar-evolution.c (instantiate_scev_binary): Adapted
510 to pass as parameters the operands of the binary expression.
512 2009-09-01 Sebastian Pop <sebastian.pop@amd.com>
514 * tree-scalar-evolution.c (instantiate_scev_bitnot): Renamed
515 instantiate_scev_not. Handle NEGATE_EXPR.
516 (instantiate_scev_r): Handle NEGATE_EXPR.
518 2009-09-01 Sebastian Pop <sebastian.pop@amd.com>
520 * tree-scalar-evolution.c (instantiate_scev_1): Renamed
522 (instantiate_scev_r): Move code in instantiate_scev_2
523 and instantiate_scev_1.
525 2009-09-01 Sebastian Pop <sebastian.pop@amd.com>
527 * tree-scalar-evolution.c (instantiate_scev_3): New.
528 (instantiate_scev_1): Move code in instantiate_scev_3.
530 2009-09-01 Sebastian Pop <sebastian.pop@amd.com>
532 * tree-scalar-evolution.c (instantiate_scev_poly): New.
533 (instantiate_scev_1): Move code in instantiate_scev_poly.
535 2009-09-01 Sebastian Pop <sebastian.pop@amd.com>
537 * tree-scalar-evolution.c (instantiate_scev_bitnot): New.
538 (instantiate_scev_1): Move code in instantiate_scev_bitnot.
540 2009-09-01 Sebastian Pop <sebastian.pop@amd.com>
542 * tree-scalar-evolution.c (instantiate_scev_convert): New.
543 (instantiate_scev_1): Move code in instantiate_scev_convert.
545 2009-09-01 Sebastian Pop <sebastian.pop@amd.com>
547 * tree-scalar-evolution.c (instantiate_scev_binary): New.
548 (instantiate_scev_1): Move code in instantiate_scev_binary.
550 2009-09-01 Sebastian Pop <sebastian.pop@amd.com>
552 * tree-scalar-evolution.c (instantiate_scev_name): New.
553 (instantiate_scev_1): Move code in instantiate_scev_name.
555 2009-08-28 Sebastian Pop <sebastian.pop@amd.com>
557 * Merge from mainline (150992:151171).
559 2009-08-25 Sebastian Pop <sebastian.pop@amd.com>
561 * graphite-dependences.c (graphite_legal_transform_bb): Call
562 pbb_remove_duplicate_pdrs.
563 * graphite-poly.c (can_collapse_pdr): Removed.
564 (pdr_find_duplicate): Removed.
565 (can_collapse_pdrs): New.
566 (pbb_remove_duplicate_pdrs): New.
567 (new_poly_dr): Do not look for duplicates.
568 * graphite-poly.h (struct poly_bb): New field pdr_duplicates_removed.
569 (PBB_PDR_DUPLICATES_REMOVED): New.
570 (pbb_remove_duplicate_pdrs): Declared.
572 2009-08-25 Sebastian Pop <sebastian.pop@amd.com>
574 * graphite-interchange.c (pbb_interchange_profitable_p): Adjust
575 the strides by multiplying by PDR_NB_REFS.
576 * graphite-poly.c (can_collapse_pdr): New.
577 (pdr_find_duplicate): New.
578 (new_poly_dr): Call pdr_find_duplicate. Collapse duplicate PDRs.
579 Initialize PDR_NB_REFS.
580 * graphite-poly.h (struct poly_dr): Add field nb_refs.
582 (new_poly_dr): Number of subscripts is a graphite_dim_t.
584 2009-08-25 Sebastian Pop <sebastian.pop@amd.com>
586 Revert one of the previous commits:
587 * graphite-dependences.c (graphite_legal_transform_bb): Avoid
588 the computation of symmetric data dependence relations.
589 (dependency_between_pbbs_p): Same.
591 2009-08-25 Sebastian Pop <sebastian.pop@amd.com>
594 * graphite-poly.c (apply_poly_transforms): Remove legality test before
597 2009-08-25 Sebastian Pop <sebastian.pop@amd.com>
599 * graphite-dependences.c (pddr_original_scattering): Return NULL
600 for read-read dependence relations.
601 * graphite-poly.h (enum poly_dr_type): Fix comment.
604 (pdr_may_write_p): New.
606 2009-08-25 Sebastian Pop <sebastian.pop@amd.com>
608 * graphite-poly.h (enum POLY_DR_TYPE): Renamed poly_dr_type.
609 (struct poly_dr): Same.
611 * graphite-poly.c (new_poly_dr): Same.
613 2009-08-25 Konrad Trifunovic <konrad.trifunovic@gmail.com>
614 Sebastian Pop <sebastian.pop@amd.com>
616 * graphite-blocking.c (pbb_strip_mine_loop_depth): Renamed
617 pbb_strip_mine_time_depth. Changed the implementation so that
618 transformation is expressed as a transformation on
619 time (scatttering) dimensions. Also, ensures that the 2d+1
620 scheduling format is preserved.
621 (pbb_strip_mine_profitable_p): Profitability is based on the
622 iteration number of a given time (scattering) dimension,
623 and not on a original loop depth dimension.
624 (pbb_strip_mine): Call pbb_number_of_iterations_at_time.
625 (pbb_do_strip_mine): Call psct_dynamic_dim.
626 * graphite-poly.c (pbb_number_of_iterations_at_time): New.
627 * graphite-poly.h (pbb_number_of_iterations_at_time): Declared.
628 (pbb_nb_dynamic_scattering_transform): New.
629 (psct_dynamic_dim): New.
631 2009-08-25 Konrad Trifunovic <konrad.trifunovic@gmail.com>
633 * graphite-ppl.c (ppl_max_for_le): Renamed ppl_max_for_le_pointset.
634 * graphite-ppl.h (ppl_max_for_le): Renamed ppl_max_for_le_pointset.
635 * graphite-poly.c (pbb_number_of_iterations): Rename ppl_max_for_le.
636 * graphite-interchange.c (build_linearized_memory_access): Same.
637 (memory_stride_in_loop): Same.
639 2009-08-25 Sebastian Pop <sebastian.pop@amd.com>
641 * graphite-dependences.c (pddr_original_scattering): New.
642 (graphite_legal_transform_dr): Call pddr_original_scattering.
645 * graphite-dependences.h (dot_deps): Declared.
646 * graphite-poly.c (new_poly_dr): Initialize PDR_ID.
647 (print_pdr): Print PDR_ID.
648 * graphite-poly.h (struct poly_dr): Add field id.
651 * graphite-scop-detection.c (dot_all_scops_1): Cleanup comment.
653 2009-08-22 Sebastian Pop <sebastian.pop@amd.com>
655 * graphite-dependences.c (graphite_carried_dependence_level_k): Do
656 not delete the original dependence relation.
658 2009-08-21 Sebastian Pop <sebastian.pop@amd.com>
660 * graphite-dependences.c (graphite_legal_transform_bb): Avoid
661 the computation of symmetric data dependence relations.
662 (dependency_between_pbbs_p): Same.
664 2009-08-21 Sebastian Pop <sebastian.pop@amd.com>
666 * graphite-dependences.c (new_poly_dr_pair): Renamed new_poly_ddr.
667 (eq_poly_dr_pair_p): Renamed eq_poly_ddr_p.
668 (hash_poly_dr_pair_p): Renamed hash_poly_ddr_p.
669 (free_poly_ddr): New.
670 (pddr_is_empty): New.
671 (dependence_polyhedron_1): Now returns a poly_ddr_p.
672 (dependence_polyhedron): Same. Remove useless gcc_assert.
674 (graphite_legal_transform_dr): Call pddr_is_empty and free_poly_ddr.
675 (graphite_carried_dependence_level_k): Call pddr_is_empty.
676 * graphite-dependences.h (enum poly_dependence_kind): New.
677 (poly_dr_pair): Renamed poly_ddr. Added a field kind.
678 (PDRP_SOURCE): Renamed PDDR_SOURCE.
679 (PDRP_SINK): Renamed PDDR_SINK.
680 (PDRP_DDP): Renamed PDDR_DDP.
682 (free_poly_ddr): Declared.
683 * graphite-poly.c (new_scop): Use the new hash function names.
684 * graphite-poly.h (struct scop): Renamed field original_pdr_pairs
686 (SCOP_ORIGINAL_PDR_PAIRS): Renamed SCOP_ORIGINAL_PDDRS.
688 2009-08-21 Sebastian Pop <sebastian.pop@amd.com>
690 * Merge from mainline (150764:150992).
692 2009-08-18 Sebastian Pop <sebastian.pop@amd.com>
694 * cfgloopmanip.c (create_empty_loop_on_edge): Generate upper
695 bounds with LT_EXPR to make niter analysis more precise on code
696 generated by Graphite.
698 2009-08-18 Sebastian Pop <sebastian.pop@amd.com>
700 * graphite-dependences.c (graphite_legal_transform_dr): Fix formatting.
701 (graphite_legal_transform_bb): Same.
702 (poly_drs_may_alias_p): Same.
704 2009-08-15 Sebastian Pop <sebastian.pop@amd.com>
707 * graphite-ppl.c (ppl_max_for_le): Correct the use of
708 ppl_Pointset_Powerset_C_Polyhedron_maximize.
710 2009-08-13 Sebastian Pop <sebastian.pop@amd.com>
712 * graphite-poly.c (print_pbb): Print PBB index.
714 2009-08-13 Sebastian Pop <sebastian.pop@amd.com>
716 * Merge from mainline (r150672:150764).
718 2009-08-13 Sebastian Pop <sebastian.pop@amd.com>
720 * graphite-interchange.c (ppl_max_for_le): Moved...
721 * graphite-poly.c (pbb_number_of_iterations): Call ppl_max_for_le.
722 * graphite-ppl.c (ppl_max_for_le): ... here.
723 * graphite-ppl.h (ppl_max_for_le): Declared.
725 2009-08-12 Sebastian Pop <sebastian.pop@amd.com>
727 * Merge from mainline (r150372:150672).
729 2009-08-11 Sebastian Pop <sebastian.pop@amd.com>
732 * sese.c (convert_for_phi_arg): New.
733 (add_guard_exit_phis): Use convert_for_phi_arg.
735 * testsuite/gfortran.dg/graphite/id-17.f: New.
737 2009-08-11 Sebastian Pop <sebastian.pop@amd.com>
739 * graphite-sese-to-poly.c (pdr_add_data_dimensions): Dont add
740 unknown subscript upper bounds.
742 * testsuite/gcc.dg/graphite/interchange-6.c: Un-XFAIL.
744 2009-08-11 Sebastian Pop <sebastian.pop@amd.com>
745 Pranav Garg <pranav.garg2107@gmail.com>
747 * graphite-interchange.c (gather_access_strides): Removed.
748 (ppl_max_for_le): New.
749 (build_linearized_memory_access): New.
750 (memory_stride_in_loop): New.
751 (pbb_interchange_profitable_p): Reimplemented.
752 * graphite-ppl.h (ppl_new_id_map): New.
753 (ppl_interchange): New.
755 * testsuite/gcc.dg/graphite/interchange-6.c: XFAILed.
757 2009-08-11 Sebastian Pop <sebastian.pop@amd.com>
759 * graphite-interchange.c (compute_subscript): Removed.
760 (compute_array_size_cstr): Removed.
761 (compute_array_size_poly): Removed.
762 (compute_array_size): Removed.
763 (gather_access_strides_poly): Removed.
764 (gather_access_strides): Empty.
766 2009-08-11 Sebastian Pop <sebastian.pop@amd.com>
768 * graphite-dependences.c (dependence_polyhedron_1): Replace
769 pdr_nb_subscripts with PDR_NB_SUBSCRIPTS.
770 (graphite_legal_transform_dr): Same.
771 (graphite_carried_dependence_level_k): Same.
772 * graphite-poly.c (new_poly_dr): Add a parameter nb_subscripts.
773 Initialize PDR_NB_SUBSCRIPTS.
774 (print_pdr_access_layout): Replace pdr_nb_subscripts with
776 * graphite-poly.h (struct poly_dr): Add nb_subscripts field.
777 (PDR_NB_SUBSCRIPTS): New.
778 (pdr_nb_subscripts): Removed.
779 (pdr_dim): Simplified.
780 * graphite-sese-to-poly.c (build_poly_dr): Replace pdr_nb_subscripts
781 with PDR_NB_SUBSCRIPTS.
783 2009-08-11 Sebastian Pop <sebastian.pop@amd.com>
785 * graphite-interchange.c (compute_array_size): Remove use of
787 * graphite-poly.c (new_poly_dr): Remove argument data_container.
788 Do not initialize PDR_DATA_CONTAINER.
789 (print_pdr): Do not print PDR_DATA_CONTAINER.
790 * graphite-poly.h (struct poly_dr): Remove data_container field.
791 (PDR_DATA_CONTAINER): Removed.
792 * graphite-sese-to-poly.c (pdr_add_data_dimensions): Remove use of
794 (build_poly_dr): Same.
796 2009-08-11 Sebastian Pop <sebastian.pop@amd.com>
798 * testsuite/gcc.dg/graphite/interchange-9.c: New.
800 2009-08-05 Konrad Trifunovic <konrad.trifunovic@gmail.com>
801 Sebastian Pop <sebastian.pop@amd.com>
803 * graphite-dependences.c (graphite_legal_transform_dr): Work on a
804 copy of the dependence polyhedron. Free the temporary objects.
805 (graphite_carried_dependence_level_k): Free unused objects before
808 * testsuite/gcc.dg/graphite/interchange-1.c: XFAILed.
809 * testsuite/gcc.dg/graphite/interchange-2.c: XFAILed.
810 * testsuite/gcc.dg/graphite/interchange-3.c: XFAILed.
811 * testsuite/gcc.dg/graphite/interchange-4.c: XFAILed.
812 * testsuite/gcc.dg/graphite/interchange-7.c: XFAILed.
814 2009-08-05 Sebastian Pop <sebastian.pop@amd.com>
816 * graphite-blocking.c (scop_do_strip_mine): Call store_scattering.
817 Early return without analyzing the data dependences if no
818 transform has been done. Call restore_scattering if the transform
820 (graphite-interchange.c): Same.
821 * graphite-poly.c (print_scattering_function): Test for PBB_TRANSFORMED.
822 (graphite_read_transforms): Initialize PBB_TRANSFORMED.
823 (apply_poly_transforms): Do not gcc_assert that
824 the transform is legal.
825 (new_poly_bb): Initialize PBB_TRANSFORMED, PBB_SAVED, and PBB_ORIGINAL.
826 Do not initialize PBB_NB_SCATTERING_TRANSFORM, PBB_NB_LOCAL_VARIABLES,
827 PBB_TRANSFORMED_SCATTERING, and PBB_ORIGINAL_SCATTERING.
828 (free_poly_dr): Free PBB_TRANSFORMED, PBB_SAVED, and PBB_ORIGINAL.
829 * graphite-poly.h (struct poly_scattering): New.
830 (struct poly_bb): Add original, transformed, and saved fields.
831 Remove transformed_scattering, original_scattering, nb_local_variables,
832 and nb_scattering_transform fields.
833 (PBB_ORIGINAL, PBB_TRANSFORMED, PBB_SAVED): New.
834 (poly_scattering_new): New.
835 (poly_scattering_free): New.
836 (poly_scattering_copy): New.
837 (store_scattering_pbb): New.
838 (store_scattering): New.
839 (restore_scattering_pbb): New.
840 (restore_scattering): New.
841 * graphite-sese-to-poly.c (build_pbb_scattering_polyhedrons):
842 Initialize PBB_TRANSFORMED and PBB_ORIGINAL.
844 2009-08-05 Sebastian Pop <sebastian.pop@amd.com>
846 * graphite-poly.c (print_pbb): Add parentheses in the pretty print.
849 2009-08-05 Sebastian Pop <sebastian.pop@amd.com>
851 * Makefile.in (graphite.o): Depends on PREDICT_H.
852 * graphite.c: Include predict.h.
853 (graphite_finalize): Call tree_estimate_probability.
854 * predict.c (predict_loops): Do not call scev_initialize and
856 (tree_estimate_probability_bb): New.
857 (tree_estimate_probability): Do not initialize loops: move that
858 code to the driver. Call tree_estimate_probability_bb.
859 (tree_estimate_probability_driver): New.
860 (pass_profile): Use tree_estimate_probability_driver.
861 * predict.h (tree_estimate_probability): Declared.
863 2009-08-05 Sebastian Pop <sebastian.pop@amd.com>
865 * graphite-clast-to-gimple.c (gloog): Add time to TV_GRAPHITE_CODE_GEN.
866 * graphite-dependences.c (graphite_legal_transform): Add time to
867 TV_GRAPHITE_DATA_DEPS.
868 (dependency_between_pbbs_p): Same.
869 * timevar.def (TV_GRAPHITE_DATA_DEPS, TV_GRAPHITE_CODE_GEN): New.
871 2009-08-03 Sebastian Pop <sebastian.pop@amd.com>
873 * Merge from mainline (r149952:150372).
875 2009-07-28 Sebastian Pop <sebastian.pop@amd.com>
877 * ChangeLog.graphite: Fix indenting, white spaces and 80 columns.
878 * graphite-blocking.c: Same.
879 * graphite-clast-to-gimple.c: Same.
880 * graphite-dependences.c: Same.
881 * graphite-poly.c: Same.
882 * graphite-poly.h: Same.
883 * graphite-ppl.c: Same.
884 * graphite-scop-detection.c: Same.
885 * graphite-sese-to-poly.c: Same.
888 2009-07-28 Sebastian Pop <sebastian.pop@amd.com>
890 * graphite-sese-to-poly.c (loop_entry_phi_arg): New.
891 (remove_simple_copy_phi): New.
892 (remove_invariant_phi): New.
893 (simple_copy_phi_p): New.
894 (reduction_phi_p): New.
895 (gsi_for_ssa_name_def): New.
896 (insert_out_of_ssa_copy): New.
897 (insert_out_of_ssa_copy_on_edge): New.
898 (create_zero_dim_array): New.
899 (scalar_close_phi_node_p): New.
900 (rewrite_close_phi_out_of_ssa): New.
901 (rewrite_phi_out_of_ssa): New.
902 (rewrite_reductions_out_of_ssa): New.
903 (build_poly_scop): Call rewrite_reductions_out_of_ssa.
905 * testsuite/gcc.dg/graphite/id-11.c: New.
906 * testsuite/gcc.dg/graphite/id-15.c: New.
907 * testsuite/gcc.dg/graphite/interchange-1.c: Un-XFAIL.
908 * testsuite/gcc.dg/graphite/interchange-2.c: Un-XFAIL.
909 * testsuite/gcc.dg/graphite/interchange-3.c: Un-XFAIL.
910 * testsuite/gcc.dg/graphite/interchange-4.c: Un-XFAIL.
911 * testsuite/gcc.dg/graphite/interchange-7.c: Un-XFAIL.
912 * testsuite/gcc.dg/graphite/scop-matmult.c: Un-XFAIL.
913 * testsuite/gfortran.dg/graphite/id-13.f: New.
914 * testsuite/gfortran.dg/graphite/id-5.f: New.
916 2009-07-28 Sebastian Pop <sebastian.pop@amd.com>
918 * graphite-clast-to-gimple.c (graphite_loop_normal_form): Do not
919 check that nb_reductions_in_loop is zero.
920 * graphite-scop-detection.c (harmful_stmt_in_bb): Don't filter out
922 (nb_reductions_in_loop): Removed.
923 (graphite_can_represent_loop): Do not call nb_reductions_in_loop.
924 * graphite-sese-to-poly.c (phi_node_is_iv): Removed.
925 (bb_contains_non_iv_scalar_phi_nodes): Removed.
926 (scop_contains_non_iv_scalar_phi_nodes): Removed.
927 (build_poly_scop): Do not call scop_contains_non_iv_scalar_phi_nodes.
929 2009-07-28 Sebastian Pop <sebastian.pop@amd.com>
931 * graphite-clast-to-gimple.c (build_cloog_prog): Do not code generate
932 statements that have an empty iteration domain.
933 * testsuite/gfortran.dg/graphite/id-16.f: New.
935 2009-07-28 Sebastian Pop <sebastian.pop@amd.com>
937 * tree-scalar-evolution.c (instantiate_scev_1): Return
938 chrec_dont_know when the result is not above instantiate_below.
939 * graphite-scop-detection.c (scopdet_basic_block_info): Fix formatting.
940 * graphite-sese-to-poly.c (create_linear_expr_from_tree): Assert that
941 the tree has a known scalar evolution.
942 * testsuite/gfortran.dg/graphite/id-14.f: New.
943 * testsuite/gfortran.dg/graphite/id-15.f: New.
945 2009-07-28 Sebastian Pop <sebastian.pop@amd.com>
947 * sese.c (rename_variables_in_stmt): Pass in an extra parameter
949 (rename_variables): Keep inserting renames after the ones already
952 2009-07-28 Sebastian Pop <sebastian.pop@amd.com>
954 * graphite-sese-to-poly.c (compare_bb_depths): New.
955 (graphite_sort_dominated_info): New.
956 (build_scop_bbs_1): Call graphite_sort_dominated_info.
957 (build_scop_scattering): Fix comment.
959 2009-07-28 Sebastian Pop <sebastian.pop@amd.com>
961 * graphite.c (graphite_finalize): Call print_loops instead of
962 dump_function_to_file.
963 * testsuite/gcc.dg/graphite/graphite.exp: Fix formatting.
964 * testsuite/gcc.dg/graphite/pr35356-1.c: New. Look for the number of
965 loops generated in the graphite output file.
966 * testsuite/gcc.dg/graphite/pr35356-2.c: New.
967 * testsuite/gcc.dg/graphite/pr35356-3.c: New. XFAILed for now.
968 * testsuite/gfortran.dg/graphite/id-12.f: New.
970 2009-07-24 Li Feng <nemokingdom@gmail.com>
972 * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-8.c:
975 2009-07-24 Li Feng <nemokingdom@gmail.com>
976 Tobias Grosser <grosser@fim.uni-passau.de>
978 * graphite-sese-to-poly.c (pdr_add_alias_set): Use data reference's
979 alias set number build alias in ACCESSES polyhedron.
980 (build_alias_set_for_drs): New.
981 (build_pbb_drs): Added build_alias_set_for_drs.
982 * graphite-dependences.c (poly_drs_may_alias_p): New.
983 (graphite_carried_dependence_level_k): Check alias information
984 before building polyhedron.
986 2009-07-24 Tobias Grosser <grosser@fim.uni-passau.de>
988 * Makefile.in (lambda-code.o): Fix formatting.
990 2009-07-24 Tobias Grosser <grosser@fim.uni-passau.de>
992 * Merge from mainline (r149350-149952)
994 2009-07-18 Tobias Grosser <grosser@fim.uni-passau.de>
996 * graphite-poly.c (apply_poly_transforms): Move strip_mine
997 before interchange to prepare for loop blocking.
999 2009-07-18 Tobias Grosser <grosser@fim.uni-passau.de>
1001 * graphite-poly.c (apply_poly_transforms): Add checks after every
1003 * graphite-sese-to-poly.c (build_poly_scop): Remove check, as already
1004 done in apply_poly_transforms.
1006 2009-07-17 Konrad Trifunovic <konrad.trifunovic@gmail.com>
1008 * graphite-dependences.c (build_lexicographically_gt_constraint):
1009 Replace RES parameter with *RES.
1010 (dependence_polyhedron_1): Pass an address of the parameter RES
1011 instead of value of RES.
1013 2009-07-16 Sebastian Pop <sebastian.pop@amd.com>
1015 * graphite.c (graphite_finalize): Fix comment.
1016 (graphite_transform_loops): Reset scev info after code generation
1019 2009-07-16 Sebastian Pop <sebastian.pop@amd.com>
1021 * graphite.c (graphite_finalize): Call scev_reset.
1023 2009-07-16 Sebastian Pop <sebastian.pop@amd.com>
1025 * graphite-clast-to-gimple.c (compute_cloog_iv_types): Do not create
1026 GBB_CLOOG_IV_TYPES hash table twice.
1027 * graphite-sese-to-poly.c (free_gimple_bb): Call free_data_refs.
1028 (add_condition_to_domain): Clear GMP values.
1030 2009-07-16 Sebastian Pop <sebastian.pop@amd.com>
1032 * graphite-dependences.c: Fix formatting.
1033 * graphite-poly.c (free_poly_dr): Also free PDR_DATA_CONTAINER.
1034 (pbb_number_of_iterations): Free ppl_Linear_Expression.
1035 * graphite-sese-to-poly.c: Fix formatting.
1036 * graphite.c (graphite_transform_loops): Create the hash table
1037 after the early return.
1039 2009-07-16 Sebastian Pop <sebastian.pop@amd.com>
1041 * testsuite/gcc.dg/graphite/id-14.c: New.
1042 * testsuite/gcc.dg/graphite/pr40157.c: New.
1043 * testsuite/gfortran.dg/graphite/id-11.f: New.
1045 2009-07-16 Sebastian Pop <sebastian.pop@amd.com>
1047 * graphite-sese-to-poly.c (nb_pbbs_in_loops): New.
1048 (build_poly_scop): Return false when there are no pbbs within
1049 loops to avoid to pass to cloog scops with no loops.
1051 2009-07-16 Sebastian Pop <sebastian.pop@amd.com>
1053 * graphite-sese-to-poly.c (build_pbb_scattering_polyhedrons): Avoid
1054 useless test "i % 2".
1055 (build_pbb_scattering_polyhedrons): Fix formatting.
1056 (build_poly_dr): Same.
1057 * graphite.c (graphite_transform_loops): Restructure.
1059 2009-07-14 Razya Ladelsky <razya@il.ibm.com>
1061 * tree-ssa-loop-manip.c (rewrite_phi_with_iv): Remove
1062 reduction_list parameter.
1063 (rewrite_all_phi_nodes_with_iv): Same.
1064 (canonicalize_loop_ivs): Same.
1065 * tree-parloops.c (struct brli): Removed.
1066 (build_reduction_list_info): Removed.
1067 (build_new_reduction): New.
1068 (analyze_reduction_list): Removed.
1069 (gather_scalar_reductions): Find reductions instead of phi
1070 nodes that can't be canonicalized.
1071 (try_create_reduction_list): Remove reduction_list parameter.
1072 (gen_parallel_loop): Same.
1073 (parallelize_loops): Remove analyze_reductions variable,
1074 initialization and free.
1075 Change reduction_list htab initialization to reduction_info
1076 elements instead of ssa names.
1077 Call try_create_reduction_list and gen_parallel_loop without
1078 analyzed_reduction argument.
1079 * graphite-clast-to-gimple (graphite_loop_normal_form): Call
1080 canonicalize_loop_ivs with one less argument.
1081 * tree-flow.h (canonicalize_loop_ivs): Remove one argument.
1083 2009-07-14 Konrad Trifunovic <konrad.trifunovic@gmail.com>
1085 * graphite-dependences.c (new_poly_dr_pair): New.
1086 (dependence_polyhedron): Renamed into dependence_polyhedron_1.
1087 (new_poly_dr_pair): New.
1088 (eq_poly_dr_pair_p): New.
1089 (hash_poly_dr_pair_p): New.
1090 * graphite-dependences.h (struct poly_dr_pair): New.
1091 (eq_poly_dr_pair_p): Declared.
1092 (hash_poly_dr_pair_p): Declared.
1093 * graphite-poly.c (new_scop): Initialize SCOP_ORIGINAL_PDR_PAIRS.
1094 (free_scop): Free SCOP_ORIGINAL_PDR_PAIRS.
1095 * graphite-poly.h (struct scop): Add original_pdr_pairs field.
1096 * Makefile.in (graphite-poly.o): Add dependence on
1097 graphite-dependences.h.
1099 2009-07-14 Sebastian Pop <sebastian.pop@amd.com>
1101 * graphite-scop-detection.c (graphite_can_represent_scev): Do not let
1102 polynomials of degree > 1 pass to Graphite.
1103 * tree-chrec.c (scev_is_linear_expression): Call
1104 evolution_function_is_affine_multivariate_p.
1105 * testsuite/gfortran.dg/graphite/id-10.f90: New.
1107 2009-07-14 Sebastian Pop <sebastian.pop@amd.com>
1109 * tree-scalar-evolution.c (compute_overall_effect_of_inner_loop):
1110 Instantiate scevs varying in outer loops.
1111 * testsuite/gfortran.dg/graphite/id-9.f: Correct testcase.
1113 2009-07-14 Sebastian Pop <sebastian.pop@amd.com>
1115 * graphite-sese-to-poly.c (build_loop_iteration_domains): Do not insert
1116 redundant constraint.
1118 2009-07-14 Sebastian Pop <sebastian.pop@amd.com>
1120 * testsuite/gcc.dg/graphite/graphite.exp: Fix comments.
1121 * testsuite/gfortran.dg/graphite/graphite.exp: Trigger actions
1122 based on the file names as in the C testsuite.
1123 * testsuite/gfortran.dg/graphite/block-1.f90: Fix patterns.
1124 * testsuite/gfortran.dg/graphite/block-2.f: Same.
1125 * testsuite/gfortran.dg/graphite/block-3.f90: Same.
1126 * testsuite/gfortran.dg/graphite/block-4.f90: Same.
1127 * testsuite/gfortran.dg/graphite/id-1.f90: Same.
1128 * testsuite/gfortran.dg/graphite/id-2.f90: Same.
1129 * testsuite/gfortran.dg/graphite/id-3.f90: Same.
1130 * testsuite/gfortran.dg/graphite/id-4.f90: Same.
1131 * testsuite/gfortran.dg/graphite/id-6.f: Same.
1132 * testsuite/gfortran.dg/graphite/id-9.f: Same.
1133 * testsuite/gfortran.dg/graphite/interchange-1.f: Same.
1134 * testsuite/gfortran.dg/graphite/interchange-2.f: Same.
1135 * testsuite/gfortran.dg/graphite/scop-1.f: Same.
1137 2009-07-14 Sebastian Pop <sebastian.pop@amd.com>
1139 * sese.c (expand_scalar_variables_call): New.
1140 (expand_scalar_variables_ssa_name): Handle calls in expander.
1142 2009-07-13 Sebastian Pop <sebastian.pop@amd.com>
1144 * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-6.c:
1145 Expect to see the pattern twice.
1146 * testsuite/gcc.dg/graphite/interchange-0.c: Un-XFAIL.
1147 * testsuite/gcc.dg/graphite/interchange-5.c: Same.
1148 * testsuite/gcc.dg/graphite/interchange-6.c: Same.
1150 2009-07-13 Sebastian Pop <sebastian.pop@amd.com>
1152 * testsuite/gcc.dg/graphite/id-10.c: New.
1153 * testsuite/gcc.dg/graphite/id-12.c: New.
1154 * testsuite/gfortran.dg/graphite/id-7.f: New.
1155 * testsuite/gfortran.dg/graphite/id-8.f: New.
1157 2009-07-13 Sebastian Pop <sebastian.pop@amd.com>
1159 * graphite-sese-to-poly.c (pdr_add_data_dimensions): Fix division by
1162 2009-07-13 Sebastian Pop <sebastian.pop@amd.com>
1164 * sese.c (rename_variables_in_stmt): Call fold_convert during renaming.
1166 2009-07-13 Sebastian Pop <sebastian.pop@amd.com>
1168 * sese.c (expand_scalar_variables_stmt): Avoid unnecessary expansion.
1170 2009-07-10 Sebastian Pop <sebastian.pop@amd.com>
1172 * graphite-sese-to-poly.c (pdr_add_memory_accesses): Fix order of
1173 building PDR subscripts.
1175 2009-07-10 Sebastian Pop <sebastian.pop@amd.com>
1177 * graphite-sese-to-poly.c (pdr_add_data_dimensions): Fix the
1178 computation of array sizes.
1180 2009-07-10 Sebastian Pop <sebastian.pop@amd.com>
1182 * graphite-sese-to-poly.c (add_param_constraints): Disabled.
1184 2009-07-10 Tobias Grosser <grosser@fim.uni-passau.de>
1186 * graphite-dependences.c (map_into_dep_poly, map_dr_into_dep_poly,
1187 build_pairwise_constraint, dr_equality_constraints,
1188 build_pairwise_scheduling_equality,
1189 build_pairwise_scheduling_inequality, lexicographically_gt_p,
1190 build_lexicographically_gt_constraint, dependence_polyhedron,
1191 graphite_legal_transform_dr, graphite_carried_dependence_level_k):
1192 Move from NNC_Polyhedron to C_Polyhedron.
1193 * graphite-interchange.c (compute_array_size_poly,
1194 gather_access_strides): Dito.
1195 * graphite-poly.c (apply_poly_transforms, new_poly_dr, free_poly_bb,
1196 free_scop, pbb_number_of_iterations): Dito.
1197 * graphite-poly.h (struct poly_dr, pdr_nb_subscripts, struct poly_bb,
1198 pbb_dim_iter_domain, struct scop): Dito.
1199 * graphite-ppl.c (new_Constraint_System_from_Cloog_Matrix,
1200 new_Cloog_Domain_from_ppl_Polyhedron,
1201 new_Cloog_Domain_from_ppl_Pointset_Powerset, ppl_set_coef_gmp,
1202 ppl_insert_dimensions_pointset, ppl_insert_dimensions_pointset,
1203 ppl_strip_loop, ppl_strip_loop, ppl_print_polyhedron_matrix,
1204 ppl_print_powerset_matrix, debug_ppl_polyhedron_matrix,
1205 debug_ppl_powerset_matrix, ppl_read_polyhedron_matrix): Dito.
1206 * graphite-ppl.h (ppl_Pointset_Powerset_C_Polyhedron_t,
1207 new_C_Polyhedron_from_Cloog_Matrix, ppl_print_powerset_matrix,
1208 debug_ppl_powerset_matrix, ppl_insert_dimensions_pointset): Dito.
1209 * graphite-sese-to-poly.c (build_pbb_scattering_polyhedrons,
1210 build_loop_iteration_domains, ppl_constraint_type_from_tree_code,
1211 add_condition_to_domain, add_condition_to_pbb, build_scop_context,
1212 build_scop_iteration_domain, build_poly_dr): Dito
1214 2009-07-09 Sebastian Pop <sebastian.pop@amd.com>
1216 * testsuite/gcc.dg/graphite/graphite.exp: Added a rule to execute
1218 * testsuite/gcc.dg/graphite/run-id-1.c: New.
1220 2009-07-09 Sebastian Pop <sebastian.pop@amd.com>
1222 * graphite-sese-to-poly.c (build_loop_iteration_domains): Add the
1223 positivity constraint on the symbolic number of iterations.
1225 2009-07-09 Sebastian Pop <sebastian.pop@amd.com>
1227 * graphite-sese-to-poly.c (build_loop_iteration_domains): Rewrite.
1229 2009-07-09 Sebastian Pop <sebastian.pop@amd.com>
1230 Tobias Grosser <grosser@fim.uni-passau.de>
1232 * graphite-clast-to-gimple.c (build_scop_context): Removed.
1233 (build_cloog_prog): Directly use SCOP_CONTEXT.
1234 * graphite-poly.c (new_scop): Initialize SCOP_CONTEXT.
1235 (free_scop): Free SCOP_CONTEXT.
1236 (print_scop_context): New.
1237 (print_scop): Call print_scop_context.
1238 (debug_scop_context): New.
1239 * graphite-poly.h (print_scop_context, debug_scop_context): Declared.
1240 (struct scop): Added field context.
1241 (SCOP_CONTEXT): New.
1242 * graphite-sese-to-poly.c (add_param_constraints): New.
1243 (build_scop_context): New.
1244 (build_poly_scop): Call build_scop_context.
1246 2009-07-09 Sebastian Pop <sebastian.pop@amd.com>
1248 * graphite-clast-to-gimple.c (gmp_cst_to_tree): Moved...
1249 * graphite-ppl.c (ppl_set_inhomogeneous_gmp, ppl_set_coef_gmp): New.
1250 (ppl_set_inhomogeneous, ppl_set_coef): Moved...
1251 * graphite-ppl.h: Include double-int.h and tree.h.
1252 (ppl_set_inhomogeneous_gmp, ppl_set_coef_gmp): Declared.
1253 (ppl_set_inhomogeneous, ppl_set_coef): ...here.
1254 (gmp_cst_to_tree): ...here. Reimplemented using mpz_get_double_int.
1255 (tree_int_to_gmp, ppl_set_inhomogeneous_tree, ppl_set_coef_tree): New.
1257 2009-07-09 Sebastian Pop <sebastian.pop@amd.com>
1259 * graphite-clast-to-gimple.c (clast_to_gcc_expression_red): Generate
1260 POINTER_PLUS_EXPR for pointer types.
1261 (clast_to_gcc_expression): Same.
1263 2009-07-09 Sebastian Pop <sebastian.pop@amd.com>
1265 * graphite-poly.c (print_scattering_function): Early return when
1266 PBB_TRANSFORMED_SCATTERING is not initialized.
1267 (print_pbb_domain): Early return when PBB_DOMAIN is not initialized.
1269 2009-07-08 Sebastian Pop <sebastian.pop@amd.com>
1271 * tree-parloops.c (analyze_reduction_list): Remove unused variable
1274 2009-07-08 Razya Ladelsky <razya@il.ibm.com>
1276 * tree-parloops.c (analyze_reduction_list): Change return
1278 (try_create_reduction_list): Move the call to
1279 analyze_reduction_list to the beginining.
1280 Call reduction_phi with analyzed_reductions as argument
1281 instead of reduction_list.
1283 2009-07-08 Tobias Grosser <grosser@fim.uni-passau.de>
1285 * Merge from mainline (r148296:149346)
1287 2009-07-07 Sebastian Pop <sebastian.pop@amd.com>
1289 * graphite-scop-detection.c (graphite_can_represent_init): New.
1290 (graphite_can_represent_scev): Call graphite_can_represent_init:
1291 check that the initial value does not contain multiplications of
1293 (stmt_has_simple_data_refs_p): New.
1294 (stmt_simple_for_scop_p): Call stmt_simple_for_scop_p.
1295 (is_simple_operand): Fix formatting.
1296 * graphite-sese-to-poly.c (try_generate_gimple_bb): Fix formatting.
1298 2009-07-07 Sebastian Pop <sebastian.pop@amd.com>
1300 * testsuite/gcc.dg/graphite/id-13.c: New.
1301 * graphite-sese-to-poly.c (graphite_stmt_p): Do not call
1302 analyze_scalar_evolution, use scalar_evolution_in_region.
1303 (scan_tree_for_params_right_scev): Add extra assert.
1304 (parameter_index_in_region_1): Split from parameter_index_in_region.
1305 (idx_record_params): Use scalar_evolution_in_region.
1306 (find_params_in_bb): Same.
1307 (find_scop_parameters): Same.
1308 (build_loop_iteration_domains): Same.
1309 (create_linear_expr_from_tree): Same.
1310 * sese.c (scalar_evolution_in_region): New.
1311 * sese.h (scalar_evolution_in_region): Declared.
1312 (defined_in_sese_p): New.
1313 * tree-scalar-evolution.c (compute_overall_effect_of_inner_loop): Not
1315 * tree-scalar-evolution.h (compute_overall_effect_of_inner_loop):
1318 2009-07-07 Sebastian Pop <sebastian.pop@amd.com>
1320 * Makefile.in: Replace dependences on tree-chrec.h with SCEV_H.
1321 TREE_DATA_REF_H also implies SCEV_H.
1323 2009-07-07 Sebastian Pop <sebastian.pop@amd.com>
1325 * graphite-poly.c (print_scop_params): New.
1326 (print_scop): Call print_scop_params.
1327 (debug_scop_params): New.
1328 * graphite-poly.h (print_scop_params, debug_scop_params): Declared.
1330 2009-07-07 Li Feng <nemokingdom@gmail.com>
1332 * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-4.c: New.
1333 * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-5.c: New.
1334 * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-6.c: New.
1335 * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-7.c: New.
1336 * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-8.c: New.
1337 * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-9.c: New.
1339 2009-07-07 Li Feng <nemokingdom@gmail.com>
1341 * graphite-clast-to-gimple.c (mark_loops_parallel): Dump information
1342 for dependency checking part.
1343 * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-1.c: Add
1344 tests for dependency checking.
1345 * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-2.c: Ditto.
1346 * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-3.c: Ditto.
1347 * testsuite/gcc.dg/graphite/graphite_autopar/graphite_autopar.exp: Add
1348 flag -fdump-tree-graphite-all for autopar testsuites.
1350 2009-07-06 Sebastian Pop <sebastian.pop@amd.com>
1352 * Makefile.in (tree-ssa-loop-manip.o): Depends on langhooks.h.
1353 * tree-parloops.c (rewrite_phi_with_iv, rewrite_all_phi_nodes_with_iv,
1354 canonicalize_loop_ivs): Moved...
1355 * tree-ssa-loop-manip.c: ... here. Include langhooks.h.
1357 2009-07-06 Sebastian Pop <sebastian.pop@amd.com>
1359 * tree-parloops.c (try_create_reduction_list): Pass an extra
1360 argument analyzed_reductions. Call analyze_reduction_list.
1361 (gen_parallel_loop): Do not call analyze_reduction_list.
1362 (parallelize_loops): Init and finalize analyzed_reductions.
1364 2009-07-06 Li Feng <nemokingdom@gmail.com>
1366 * testsuite/gcc.dg/graphite/graphite_autopar/graphite_autopar.exp:
1367 Added flag -fno-loop-strip-mine for autopar testcase.
1369 2009-07-04 Li Feng <nemokingdom@gmail.com>
1371 * graphite-dependences.c (graphite_carried_dependence_level_k): Use
1372 transformed scattering dimension instead of unmatch orignal when
1373 calling dependence_polyhedron.
1375 2009-06-30 Sebastian Pop <sebastian.pop@amd.com>
1377 * opts.c (decode_options): Enable flag_loop_strip_mine at -O2.
1379 2009-06-30 Sebastian Pop <sebastian.pop@amd.com>
1381 * graphite-poly.c (pbb_number_of_iterations): Check for returned
1382 value 1 from ppl_Pointset_Powerset_NNC_Polyhedron_maximize.
1384 2009-06-30 Sebastian Pop <sebastian.pop@amd.com>
1386 * graphite-blocking.c (pbb_strip_mine_profitable_p): New.
1387 (pbb_do_strip_mine): Call pbb_strip_mine_profitable_p.
1388 * graphite-poly.c (pbb_number_of_iterations): New.
1389 * graphite-poly.h (pbb_number_of_iterations): Declared.
1390 (pbb_iterator_dim, pbb_parameter_dim): New.
1392 2009-06-29 Sebastian Pop <sebastian.pop@amd.com>
1394 * graphite-clast-to-gimple.c (graphite_create_new_loop): Revert the
1395 last commit on type of lower and upper bound of loops.
1397 2009-06-29 Li Feng <nemokingdom@gmail.com>
1399 * Makefile.in (graphite-clast-to-gimple.o): Added dependence on
1400 graphite-dependences.h.
1401 * graphite-clast-to-gimple.c (new_bb_pbb_def): New.
1402 (mark_bb_with_pbb): New.
1403 (get_stmtfor_depth): New.
1404 (find_pbb_via_hash): New.
1405 (dependency_in_loop_p): New.
1406 (mark_loops_parallel): New.
1407 (free_aux_in_new_loops): New.
1408 (translate_clast): Add parameter BB_PBB_MAPPING. Mark newly created
1409 bb with it's relevant pbb. Mark newly created loops. Remove mark
1410 innermost loop parallel without checking.
1411 (gloog): Add parameter BB_PBB_MAPPING.
1412 * graphite-clast-to-gimple.h (struct bb_pbb_def): New.
1413 (gloog): Change declaration.
1414 (mark_loop_parallel): Make extern.
1415 (free_aux_in_new_loops): Declare.
1416 (bb_pbb_map_hash): New.
1417 (eq_bb_pbb_map): New.
1418 * graphite.c (graphite_transform_loops): Added BB_PBB_MAPPING. Trigger
1419 auto parallelization when flag_graphite_force_parallel is set.
1420 (graphite_finalize): Added free_aux_in_new_loops.
1421 * tree-parloops.c (parallelize_loops): Only generate parallel code for
1422 the innermost loop that marked parallel. Use
1423 flag_graphite_force_parallel instead of loop->can_be_parallel.
1424 (loop_parallel_p): Move inner most checking out of function.
1426 2009-06-26 Sebastian Pop <sebastian.pop@amd.com>
1428 * graphite-clast-to-gimple.c (graphite_create_new_loop): Make the
1429 type of lower and upper bound of loops signed long int.
1431 2009-06-26 Sebastian Pop <sebastian.pop@amd.com>
1433 * cfgloopmanip.c (create_empty_loop_on_edge): Gimplify the loop exit
1434 expression outside the loop.
1436 2009-06-26 Sebastian Pop <sebastian.pop@amd.com>
1438 * gcc.dg/graphite/interchange-8.c: New.
1440 2009-06-26 Sebastian Pop <sebastian.pop@amd.com>
1442 * gcc.dg/graphite/interchange-0.c: XFailed.
1443 * gcc.dg/graphite/interchange-5.c: XFailed.
1444 * gcc.dg/graphite/interchange-6.c: XFailed.
1446 2009-06-26 Sebastian Pop <sebastian.pop@amd.com>
1448 * graphite-interchange.c (compute_array_size_poly): The end of the
1449 recursion should return 1.
1451 2009-06-26 Sebastian Pop <sebastian.pop@amd.com>
1453 * graphite-interchange.c (compute_array_size_cstr): Allow the
1454 subscript multiplier to be -1.
1455 (compute_array_size): Use PDR_DATA_CONTAINER and not PDR_ACCESSES.
1456 * graphite-poly.c (new_poly_dr): Takes an extra argument for the
1457 data_container. Initializes PDR_DATA_CONTAINER.
1458 (print_pdr_access_layout): New.
1459 (print_pdr): Call print_pdr_access_layout. Print PDR_DATA_CONTAINER.
1460 * graphite-poly.h (struct poly_dr): Adjust comment. Add a new field
1462 (PDR_DATA_CONTAINER): New.
1463 (new_poly_dr): Update declaration.
1464 * graphite-sese-to-poly.c (pdr_add_data_dimensions): New.
1465 (build_poly_dr): Call pdr_add_data_dimensions.
1467 2009-06-26 Sebastian Pop <sebastian.pop@amd.com>
1469 * graphite-poly.h (struct poly_dr): Fix comment.
1470 * graphite-sese-to-poly.c (pdr_add_alias_set): New.
1471 (pdr_add_memory_accesses): New.
1472 (build_poly_dr): Call pdr_add_memory_accesses and pdr_add_alias_set.
1474 2009-06-26 Sebastian Pop <sebastian.pop@amd.com>
1476 * graphite-poly.c (print_pdrs, debug_pdrs): New.
1477 (print_pbb): Add call to print_pdrs.
1478 * graphite-poly.h (print_pdrs, debug_pdrs): Declared.
1480 2009-06-24 Konrad Trifunovic <konrad.trifunovic@gmail.com>
1481 Li Feng <nemokingdom@gmail.com>
1483 * graphite-dependences.c (graphite_carried_dependence_level_k): New.
1484 (dependency_between_pbbs_p): New.
1485 (lexicographically_gt_p): Assure !empty_p before polyhedron
1486 intersection assign.
1487 (build_lexicographically_gt_constraint): Correct lexicographically
1489 * graphite-dependences.h: New.
1490 * Makefile.in (graphite-dependences.o): Add graphite-dependences.h.
1492 2009-06-24 Sebastian Pop <sebastian.pop@amd.com>
1494 * graphite-clast-to-gimple.c (print_clast_stmt): New.
1495 (gloog): Print to dump_file the generated clast.
1496 * graphite-clast-to-gimple.h (print_clast_stmt): Declared.
1497 * graphite-interchange.c (pbb_do_interchange): Fix dump formatting.
1499 2009-06-24 Sebastian Pop <sebastian.pop@amd.com>
1501 * graphite-poly.c (extend_scattering): Increment
1502 PBB_NB_LOCAL_VARIABLES by the number of added dimensions.
1504 2009-06-24 Sebastian Pop <sebastian.pop@amd.com>
1506 * graphite-interchange.c (compute_array_size_poly): Added exit of
1507 recursion condition. Continue iterating even after the first equality.
1508 (compute_array_size): Same.
1510 2009-06-24 Li Feng <nemokingdom@gmail.com>
1512 * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-1.c: Update
1513 -fdump-tree-final_cleanup to -fdump-tree-optimized.
1514 * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-2.c: Ditto.
1515 * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-3.c: Ditto.
1516 * testsuite/gcc.dg/graphite/graphite_autopar/graphite_autopar.exp: Ditto.
1518 2009-06-23 Sebastian Pop <sebastian.pop@amd.com>
1520 * sese.c (expand_scalar_variables_stmt): Expand scalar variables
1521 only when the use verifies is_gimple_reg.
1523 2009-06-23 Sebastian Pop <sebastian.pop@amd.com>
1525 * graphite-clast-to-gimple.c (build_cloog_prog): Fix memory corruption.
1526 Allocate scaldims after call to unify_scattering_dimensions.
1528 2009-06-23 Sebastian Pop <sebastian.pop@amd.com>
1530 * graphite-clast-to-gimple.c (translate_clast): Fix memory leak.
1532 2009-06-23 Sebastian Pop <sebastian.pop@amd.com>
1533 Albert Cohen <albert.cohen@inria.fr>
1535 * graphite-blocking.c (pbb_strip_mine_loop_depth): Do not use local
1536 variables for the strip mining.
1538 2009-06-23 Sebastian Pop <sebastian.pop@amd.com>
1539 Pranav Garg <pranav.garg2107@gmail.com>
1541 * Makefile.in (OBJS-common): Added graphite-blocking.o.
1542 (graphite-sese-to-poly.o): Moved down to be in lexicographical order.
1543 (graphite-blocking.o): New rule.
1544 (graphite-poly.o, graphite-ppl.o): Moved to be in lexicographical order.
1545 * graphite-blocking.c: New.
1546 * graphite-poly.c (apply_poly_transforms): Call scop_do_strip_mine for
1547 flag_loop_strip_mine.
1548 (psct_scattering_dim_for_loop_depth): New.
1549 * graphite-poly.h (scop_do_strip_mine): Declared.
1550 (psct_add_local_variable): Increment PBB_NB_LOCAL_VARIABLES.
1551 * tree-ssa-loop.c (gate_graphite_transforms): Do not fail when using
1552 flag_loop_strip_mine.
1554 2009-06-23 Sebastian Pop <sebastian.pop@amd.com>
1556 * graphite-poly.c (extend_scattering): Avoid initializing and freeing
1557 a GMP value and a PPL coefficient at each iteration of a loop.
1559 2009-06-23 Sebastian Pop <sebastian.pop@amd.com>
1561 * graphite-dependences.c (dependence_polyhedron): Do not use
1562 pbb_nb_scattering_dims anymore. Use pbb_nb_scattering_orig and
1563 pbb_nb_scattering_transform.
1564 (graphite_legal_transform_dr): Same.
1565 * graphite-poly.c (extend_scattering): Same.
1566 (unify_scattering_dimensions): Same.
1567 (print_scattering_function): Same.
1568 (new_poly_bb): Initialize PBB_NB_SCATTERING_TRANSFORM and
1569 PBB_NB_LOCAL_VARIABLES.
1570 * graphite-poly.h (pbb_nb_scattering): Removed declaration.
1571 (struct poly_bb): Added nb_local_variables and nb_scattering_transform.
1572 (PBB_NB_LOCAL_VARIABLES, PBB_NB_SCATTERING_TRANSFORM): New.
1573 (pbb_nb_scattering_orig, pbb_nb_scattering_transform): New.
1574 (pbb_nb_scattering_dims, pbb_nb_scattering): Removed.
1575 (pbb_nb_scattering_transform): New.
1576 (pbb_nb_local_vars): Return PBB_NB_LOCAL_VARIABLES.
1577 (psco_scattering_dim): Add assert on parameters.
1578 (psct_scattering_dim): Same.
1579 (psct_scattering_dim_for_loop_depth): Declared.
1580 (psct_local_var_dim): New.
1581 (psco_iterator_dim, psco_parameter_dim): Add assert on parameters.
1582 (psct_iterator_dim, psct_parameter_dim): Same. To maintain the
1583 correct layout, call pbb_nb_local_vars.
1584 (psct_add_local_variable, psct_add_scattering_dimension): New.
1585 * graphite-sese-to-poly.c (build_pbb_scattering_polyhedrons):
1586 Initialize PBB_NB_SCATTERING_TRANSFORM.
1588 2009-06-23 Sebastian Pop <sebastian.pop@amd.com>
1590 * graphite-ppl.c (set_inhomogeneous): Renamed ppl_set_inhomogeneous.
1591 (set_coef): Renamed ppl_set_coef.
1592 * graphite-ppl.h (ppl_set_inhomogeneous, ppl_set_coef): Declared.
1594 2009-06-23 Sebastian Pop <sebastian.pop@amd.com>
1596 * graphite-dependences.c (build_pairwise_scheduling_inequality): Don't
1597 test a boolean against 1.
1598 * graphite-interchange.c (pbb_interchange_loop_depths): Do not build
1599 a new polyhedron for the PBB_TRANSFORMED_SCATTERING.
1600 (pbb_do_interchange): Returns true when a transform has been performed.
1601 (scop_do_interchange): Same.
1602 * graphite-poly.c (apply_poly_transforms): Use the return value of
1603 scop_do_interchange.
1604 * graphite-poly.h (scop_do_interchange): Update declaration.
1606 2009-06-23 Tobias Grosser <grosser@fim.uni-passau.de>
1608 * graphite-clast-to-gimple.c (gloog): Reset loop->aux right
1610 * sese.c (sese_reset_aux_in_loops): New.
1611 * sese.h (sese_reset_aux_in_loops): New.
1613 2009-06-19 Sebastian Pop <sebastian.pop@amd.com>
1615 * graphite-sese-to-poly.c (scan_tree_for_params_int): Pass in the
1616 multiplier and multiply the constant by the multiplier.
1617 (scan_tree_for_params): Bound the multiplier to its MULT_EXPR.
1618 (build_poly_dr): Do not use the multiplier to define the subscript.
1620 2009-06-19 Sebastian Pop <sebastian.pop@amd.com>
1622 * graphite-poly.c (new_poly_dr): Pass an extra argument for the
1623 compiler's data reference. Initialize PDR_CDR.
1624 (print_pdr): Call dump_data_reference.
1625 * graphite-poly.h (struct poly_dr): Rename black_box into pbb.
1626 Add compiler_dr field.
1627 (PDR_BB): Renamed PDR_PBB.
1629 * graphite-sese-to-poly.c (build_poly_dr): Pass to new_poly_dr
1630 GCC's data reference representation.
1631 * tree-data-ref.c (debug_data_references, debug_data_reference): New.
1632 * tree-data-ref.h (debug_data_references, debug_data_reference): Decl.
1634 2009-06-19 Sebastian Pop <sebastian.pop@amd.com>
1636 * graphite-poly.c (print_scattering_function): Also print the layout.
1637 * graphite-poly.h (pbb_nb_local_vars): New.
1639 2009-06-19 Sebastian Pop <sebastian.pop@amd.com>
1641 * graphite-poly.c (print_pbb_domain): Also print the layout names.
1643 2009-06-19 Sebastian Pop <sebastian.pop@amd.com>
1645 * graphite-poly.c (print_pdr, debug_pdr): New.
1646 * graphite-poly.h (print_pdr, debug_pdr): Declared.
1647 (PDR_BASE): Removed.
1649 2009-06-18 Sebastian Pop <sebastian.pop@amd.com>
1651 * gcc/testsuite/gcc.dg/graphite/interchange-{1..7}.c: New avatars of
1654 2009-06-18 Sebastian Pop <sebastian.pop@amd.com>
1656 * graphite-interchange.c (compute_subscript): Allow also -1 in the
1657 subscript identification column.
1658 (pbb_do_interchange): Print to dump_file that some loops "will be
1659 interchanged". Rely on that chain of characters in the testcases.
1660 * gcc.dg/graphite/interchange-0.c: New.
1661 * gcc.dg/graphite/graphite.exp: Iterate over the testsuite
1662 interchange-*.c files and compile them with -floop-interchange.
1664 2009-06-18 Pranav Garg <pranav.garg2107@gmail.com>
1666 * graphite-interchange.c (interchange_profitable_p): Renamed
1667 pbb_interchange_profitable_p.
1669 2009-06-18 Sebastian Pop <sebastian.pop@amd.com>
1670 Harsha Jagasia <harsha.jagasia@amd.com>
1671 Pranav Garg <pranav.garg2107@gmail.com>
1673 * graphite-interchange.c (interchange_profitable_p): Make static.
1674 (pbb_interchange_loop_depths, pbb_do_interchange,
1675 scop_do_interchange): New.
1676 * graphite-poly.c (apply_poly_transforms): Call scop_do_interchange
1677 for flag_loop_interchange.
1678 * graphite-poly.h (scop_do_interchange): Declared.
1679 * tree-ssa-loop.c (gate_graphite_transforms): Do not fail when
1680 flag_loop_interchange is used.
1682 2009-06-18 Sebastian Pop <sebastian.pop@amd.com>
1684 * graphite-dependences.c (dependence_polyhedron): Update use of
1685 pbb_nb_scattering_dims.
1686 * graphite-poly.h (pbb_nb_scattering_dims): Do not pass SCOP.
1687 (pbb_nb_scattering): Update use of pbb_nb_scattering_dims.
1688 (psco_scattering_dim, psct_scattering_dim, psco_iterator_dim,
1689 psct_iterator_dim, psco_parameter_dim, psct_parameter_dim): New.
1691 2009-06-16 Sebastian Pop <sebastian.pop@amd.com>
1693 * graphite.c: Cleanup foo.
1695 2009-06-16 Sebastian Pop <sebastian.pop@amd.com>
1697 * Merge from mainline (r143684:148293).
1698 * Disabled libpcp until it gets fixed.
1700 2009-06-05 Sebastian Pop <sebastian.pop@amd.com>
1701 Harsha Jagasia <harsha.jagasia@amd.com>
1703 * graphite-interchange.c: New.
1704 * Makefile.in (graphite-interchange.o): New.
1705 * graphite-poly.h (interchange_profitable_p): Declared.
1706 * graphite-ppl.h (value_max): New.
1708 2009-06-04 Sebastian Pop <sebastian.pop@amd.com>
1710 * graphite-dependences.c (dependence_polyhedron): Use pdr_dim.
1711 * graphite-poly.h: Fix some comments.
1715 2009-06-04 Sebastian Pop <sebastian.pop@amd.com>
1718 (pdr_accessp_nb_subscripts): Renamed pdr_nb_subscripts.
1719 (pdr_accessp_nb_iterators): Renamed pdr_dim_iter_domain.
1720 (pdr_accessp_nb_params): Renamed pdr_nb_params.
1721 (pdr_accessp_alias_set_dim): Renamed pdr_alias_set_dim.
1722 (pdr_accessp_subscript_dim): Renamed pdr_subscript_dim.
1723 (pdr_accessp_iterator_dim): Renamed pdr_iterator_dim.
1724 (pdr_accessp_param_dim): Renamed pdr_parameter_dim.
1725 (pbb_nb_loops): Renamed pbb_dim_iter_domain.
1726 * graphite-clast-to-gimple.c: Same.
1727 * graphite-dependences.c: Same.
1728 * graphite-poly.c: Same.
1729 * graphite-sese-to-poly.c: Same.
1731 2009-06-03 Sebastian Pop <sebastian.pop@amd.com>
1733 * graphite-clast-to-gimple.c (build_iv_mapping): Insert full
1734 expressions for an IV rename, as returned by clast_to_gcc_expression.
1735 (copy_renames): Rename new_name to expr.
1736 * sese.c (debug_rename_elt): Same.
1739 (sese_adjust_liveout_phis): Call force_gimple_operand before using
1740 the information from the rename map.
1741 (rename_variables_in_stmt): Same.
1742 (add_loop_exit_phis): Rename new_name to expr.
1743 (insert_loop_close_phis): Same.
1744 (add_guard_exit_phis): Same. Call force_gimple_operand.
1745 * sese.h (struct rename_map_elt): Rename new_name to expr.
1746 (new_rename_map_elt): Same.
1748 2009-06-03 Sebastian Pop <sebastian.pop@amd.com>
1750 * graphite-clast-to-gimple.c (build_iv_mapping): Use set_rename.
1751 * sese.c (set_rename): Make it extern.
1752 * sese.h (set_rename): Declared.
1754 2009-06-03 Sebastian Pop <sebastian.pop@amd.com>
1756 * graphite-poly.c (extend_scattering): Free values.
1757 * graphite-ppl.c (new_Cloog_Domain_from_ppl_Pointset_Powerset):
1759 (ppl_print_powerset_matrix): Same.
1760 * graphite-scop-detection.c (free_scops_1): New.
1761 (limit_scops): Call free_scops_1.
1762 * graphite-sese-to-poly.c (build_scop_bbs_1): Free dom.
1763 (build_poly_dr): Free PPL coefficients.
1764 * tree-parloops.c (rewrite_all_phi_nodes_with_iv): Free bbs.
1766 2009-06-02 Sebastian Pop <sebastian.pop@amd.com>
1768 * graphite-dependences.c: New.
1769 * graphite-data-ref.c: Removed.
1770 * graphite-data-ref.h: Removed.
1771 * Makefile.in (graphite-data-ref.o): Removed.
1772 (graphite-dependences.o): Added.
1773 * graphite-clast-to-gimple.c: Remove dependence on graphite-data-ref.h.
1774 * graphite-poly.c: Same.
1775 Move the data dependence testing to graphite-dependences.c.
1777 2009-05-19 Tobias Grosser <grosser@fim.uni-passau.de>
1779 * graphite-scop-detection.c (graphite_can_represent_loop): Renamed
1780 from graphite_cannot_represent_loop. Code refactored.
1781 (scopdet_basic_block_info): Call graphite_can_represent_loop.
1783 2009-05-17 Li Feng <nemokingdom@gmail.com>
1785 * testsuite/gcc.dg/graphite/graphite_autopar/graphite_autopar.exp:
1786 Cover all the testcases (not only the filtered ones).
1788 2009-05-17 Tobias Grosser <grosser@fim.uni-passau.de>
1790 * graphite-scop-detection.c (stmt_simple_for_scop_p): Remove
1791 unnecessary check. Update comments. Move check for REAL_TYPE here.
1792 (harmful_stmt_in_bb): Remove checks for conditions. This is already
1793 done in (stmt_simple_for_scop_p).
1795 2009-05-14 Tobias Grosser <grosser@fim.uni-passau.de>
1797 * graphite.c (print_global_statistics): New.
1798 (print_graphite_scop_statistic): New.
1799 (print_graphite_statistics): New.
1800 (graphite_initialize, graphite_transform_loops): Print statistics.
1801 * graphite-scop-detection (build_scops): Print statistics.
1802 (print_graphite_scop_statistics): New.
1803 (print_graphite_statistics): New.
1805 2009-05-13 Sebastian Pop <sebastian.pop@amd.com>
1807 * graphite-clast-to-gimple.c (struct clast_name_index): Removed.
1808 (debug_clast_name_index): Removed.
1809 (debug_clast_name_indexes_1): Removed.
1810 (debug_clast_name_indexes): Removed.
1811 (clast_name_index_elt_info): Removed.
1812 (eq_clast_name_indexes): Removed.
1813 (clast_name_to_index): Removed.
1814 (new_clast_name_index): Removed.
1815 (save_clast_name_index): Removed.
1816 (save_var_name): Moved...
1817 (init_sese_params_index): Removed.
1818 (clast_name_to_gcc): Remove use of name_tree.
1819 (initialize_cloog_names): Same.
1820 (gloog): Do not call init_sese_params_index.
1821 * graphite-sese-to-poly.c (save_var_name): ...here.
1822 (parameter_index_in_region): New.
1823 * sese.c (new_sese): Initialize SESE_PARAMS_NAMES.
1824 (parameter_index_in_region): Removed.
1825 (is_parameter): Remove use of name_tree.
1826 * sese.h (struct name_tree): Removed.
1827 (struct sese): Remove use of name_tree. New field params_names.
1828 (SESE_PARAMS_NAMES): New.
1829 (SESE_PARAMS): Remove duplicate.
1830 (parameter_index_in_region): Removed.
1831 (sese_nb_params): Remove use of name_tree.
1832 (struct clast_name_index): New.
1833 (new_clast_name_index): New.
1834 (clast_name_to_index): New.
1835 (save_clast_name_index): New.
1836 (debug_clast_name_index): New.
1837 (debug_clast_name_indexes_1): New.
1838 (debug_clast_name_indexes): New.
1839 (clast_name_index_elt_info): New.
1840 (eq_clast_name_indexes): New.
1842 2009-05-13 Sebastian Pop <sebastian.pop@amd.com>
1844 * graphite-clast-to-gimple.c (compute_cloog_iv_types_1): Call
1845 pbb_to_depth_to_oldiv. Remove call to oldiv_for_loop.
1846 (graphite_loop_normal_form): Do not pass region. Do not
1847 initialize SESE_OLDIVS.
1848 (build_graphite_loop_normal_form): Update call to
1849 graphite_loop_normal_form.
1850 * sese.c (debug_oldivs): Removed.
1851 (new_sese): Do not initialize SESE_OLDIVS.
1852 (free_sese): Do not free SESE_OLDIVS.
1853 (oldiv_for_loop): Removed.
1854 * sese.h (struct sese): Remove old_ivs.
1855 (SESE_OLDIVS): Removed.
1856 (oldiv_for_loop): Removed.
1858 2009-05-13 Sebastian Pop <sebastian.pop@amd.com>
1860 * graphite-clast-to-gimple.c (clast_name_to_gcc): Pass newivs,
1861 remove ivstack. Remove call to loop_iv_stack_get_iv_from_name,
1862 replaced by a call to newivs_to_depth_to_newiv.
1863 (clast_to_gcc_expression): Pass newivs, remove ivstack.
1864 (clast_to_gcc_expression_red): Same.
1865 (gcc_type_for_clast_expr): Same.
1866 (gcc_type_for_clast_eq): Same.
1867 (graphite_translate_clast_equation): Same.
1868 (graphite_create_guard_cond_expr): Same.
1869 (graphite_create_new_guard): Same.
1870 (graphite_create_new_loop): Same.
1871 (build_iv_mapping): Same.
1872 (translate_clast): Same.
1874 (loop_iv_stack_patch_for_consts): Removed. *
1875 sese.c (iv_stack_entry_is_constant): Removed.
1876 (iv_stack_entry_is_iv): Removed.
1877 (loop_iv_stack_push_iv): Removed.
1878 (loop_iv_stack_insert_constant): Removed.
1879 (loop_iv_stack_pop): Removed.
1880 (loop_iv_stack_get_iv): Removed.
1881 (loop_iv_stack_get_iv_from_name): Removed.
1882 (debug_loop_iv_stack): Removed.
1883 (free_loop_iv_stack): Removed.
1884 (loop_iv_stack_remove_constants): Removed. *
1885 sese.h (iv_stack_entry_kind): Removed.
1886 (iv_stack_entry_data_union): Removed.
1887 (iv_stack_entry_struct): Removed.
1888 (iv_stack_entry_p): Removed.
1889 (debug_oldivs, debug_loop_iv_stack, loop_iv_stack_insert_constant,
1890 loop_iv_stack_get_iv_from_name, loop_iv_stack_push_iv,
1891 loop_iv_stack_get_iv, loop_iv_stack_remove_constants,
1892 loop_iv_stack_pop, free_loop_iv_stack): Removed.
1893 (gbb_loop_at_index): Fix indenting.
1894 (gbb_loop_index): Removed.
1896 2009-05-13 Sebastian Pop <sebastian.pop@amd.com>
1898 * graphite-clast-to-gimple.c (clast_name_to_gcc): Do not use strcmp.
1899 Call clast_name_to_index.
1901 2009-05-13 Sebastian Pop <sebastian.pop@amd.com>
1903 * graphite-clast-to-gimple.c (clast_name_to_gcc): Pass region,
1904 do not pass params. Get params from SESE_PARAMS.
1905 (clast_to_gcc_expression): Same.
1906 (clast_to_gcc_expression_red): Same.
1907 (gcc_type_for_clast_eq): Same.
1908 (graphite_translate_clast_equation): Same.
1909 (graphite_create_new_loop): Same.
1910 * sese.c (rename_variables_in_stmt): Fix comment.
1912 2009-05-13 Sebastian Pop <sebastian.pop@amd.com>
1914 * graphite-clast-to-gimple.c (graphite_create_new_loop): Pass
1916 Call save_clast_name_index.
1917 (translate_clast): Pass newivs_index.
1918 (gloog): Create and free newivs_index.
1920 2009-05-13 Sebastian Pop <sebastian.pop@amd.com>
1922 * graphite-clast-to-gimple.c (clast_name_index): New structure.
1923 (clast_name_index_p): New type.
1924 (debug_clast_name_index): New.
1925 (debug_clast_name_indexes_1): New.
1926 (debug_clast_name_indexes): New.
1927 (clast_name_index_elt_info): New.
1928 (eq_clast_name_indexes): New.
1929 (clast_name_to_index): New.
1930 (new_clast_name_index): New.
1931 (save_clast_name_index): New.
1932 (init_sese_params_index): New.
1933 (gloog): Call init_sese_params_index.
1934 * graphite-clast-to-gimple.h (debug_clast_name_indexes): Declared.
1935 * sese.c (new_sese): Initialize SESE_PARAMS_INDEX.
1936 (free_sese): Free SESE_PARAMS_INDEX.
1937 * sese.h (struct sese): Add params_index.
1938 (SESE_PARAMS_INDEX): New.
1940 2009-05-13 Sebastian Pop <sebastian.pop@amd.com>
1942 * graphite-clast-to-gimple.c (newivs_to_depth_to_newiv): New.
1943 (graphite_create_new_loop): Pass the newivs vector. Push the
1944 newly created IV to newivs.
1945 (translate_clast): Pass the newivs vector.
1946 (gloog): Create and destroy the newivs vector.
1948 2009-05-13 Sebastian Pop <sebastian.pop@amd.com>
1950 * graphite-clast-to-gimple.c (pbb_to_depth_to_oldiv): New.
1951 (graphite_loop_normal_form): Initialize loop->aux with the unique
1952 IV that has been created.
1954 2009-05-13 Tobias Grosser <grosser@fim.uni-passau.de>
1956 * tree-chrec.c (evolution_function_right_is_integer_cst): Allow
1957 scev with parameters in the base part. They where forbidden
1960 2009-05-11 Li Feng <nemokingdom@gmail.com>
1962 * testsuite/gcc.dg/graphite/graphite.exp: Set different default
1963 compile options by file names.
1964 * testsuite/gcc.dg/graphite/block{0-6}.c: Remove dg-option line.
1965 * testsuite/gcc.dg/graphite/id-{1-9}.c: Ditto.
1966 * testsuite/gcc.dg/graphite/scop-{0-20}.c: Ditto.
1967 * testsuite/gcc.dg/graphite/scop-matmult.c: Ditto.
1969 2009-05-08 Li Feng <nemokingdom@gmail.com>
1971 * testsuite/gcc.dg/graphite/graphite_autopar/graphite_autopar.exp: New.
1972 * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-1.c: New.
1973 * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-2.c: New.
1974 * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-3.c: New.
1976 2009-05-07 Tobias Grosser <grosser@fim.uni-passau.de>
1978 * graphite-scop-detection (build_scops_1): Fix little bug introduced
1981 2009-05-07 Tobias Grosser <grosser@fim.uni-passau.de>
1983 * graphite-scop-detection.c (graphite_can_represent_scev): Only
1984 allow integer constant strides.
1985 (graphite_can_represent_expr): Depend on outermost_loop.
1986 (stmt_simple_memref_p, graphite_cannot_represent_loop,
1987 harmful_stmt_in_bb, is_simple_operand, stmt_simple_for_scop_p,
1988 build_scops_1): Same.
1989 (scopdet_basic_block_info): Same and insert layered SCoP
1991 (try_generate_gimple_bb): Cleanup.
1992 (build_scops): Enable data references.
1994 * testsuite/gcc.dg/graphite/id-5.c: New.
1995 * testsuite/gcc.dg/graphite/id-9.c: New.
1996 * tree-chrec.c (evolution_function_right_is_integer_cst): New.
1997 * tree-chrec.h (evolution_function_right_is_integer_cst): New.
1999 2009-05-06 Tobias Grosser <grosser@fim.uni-passau.de>
2001 * sese.c (expand_scalar_variables_ssa_name): Only build expressions,
2002 that we have not yet built for this SCoP.
2004 2009-05-06 Tobias Grosser <grosser@fim.uni-passau.de>
2006 * sese.c (expand_scalar_variables_expr): Fix expand_scalar_variables
2007 for complex numbers.
2009 2009-05-06 Tobias Grosser <grosser@fim.uni-passau.de>
2011 * graphite-ppl.c: Fix build if cloog is not available.
2013 2009-05-04 Li Feng <nemokingdom@gmail.com>
2015 * tree-parloops.c (loop_parallel_p): Remove construction of
2016 NITER and REDUCTION_LIST.
2017 (try_get_loop_niter): New.
2018 (try_create_reduction_list): New.
2019 (parallelize_loops): Bypass the failed checkings in autopar
2020 when can_be_parallel in loop structure is set to true.
2022 2009-05-01 Tobias Grosser <grosser@fim.uni-passau.de>
2024 * testsuite/gcc.dg/graphite/id-6.c: Update testcase.
2025 * testsuite/gcc.dg/graphite/scop-3.c: Dito.
2027 2009-05-01 Tobias Grosser <grosser@fim.uni-passau.de>
2029 * graphite-scop-detection.c (stmt_simple_for_scop_p):
2030 Enable EQ_EXPR and NE_EXPR again.
2032 2009-04-30 Tobias Grosser <grosser@fim.uni-passau.de>
2034 * graphite-scop-detection.c (graphite_can_represent_scev):
2035 Add check if scev is affine multivariate.
2036 (harmful_stmt_in_bb): Check if we can represent the conditions.
2037 (scopdet_basic_block_info (basic_block bb, VEC): Pass the loop to
2039 * testsuite/gcc.dg/graphite/id-7.c: New.
2041 2009-04-30 Tobias Grosser <grosser@fim.uni-passau.de>
2043 * graphite-sese-to-poly.c (bb_contains_non_iv_scalar_phi_nodes):
2044 Check all bbs in region, not only the bbs that are represented in
2046 (build_poly_scop): Add newline.
2047 * testsuite/gcc.dg/graphite/id-8.c: New.
2049 2009-04-30 Li Feng <nemokingdom@gmail.com>
2051 * cfgloop.c (alloc_loop): Initialize can_be_parallel to false
2052 when loop initialize.
2053 * cfgloop.h (struct loop): Introduce flag can_be_parallel.
2054 * common.opt: Declare flag_graphite_force_parallel.
2055 * graphite-clast-to-gimple.c (translate_clast): Mark the innermost
2057 * graphite-poly.c (apply_poly_transforms): Introduce
2058 flag_graphite_force_parallel.
2059 * tree-ssa-loop.c (gate_graphite_transforms): ditto.
2060 * toplev.c (process_options): ditto and replace a not correctly
2063 2009-04-30 Li Feng <nemokingdom@gmail.com>
2065 * graphite-clast-to-gimple.c (loop_iv_stack_patch_for_consts):
2066 Change the call of gbb_loop_at_index and/or gbb_loop_index due
2067 to the redefinition.
2068 (compute_cloog_iv_types_1): ditto.
2069 (build_iv_mapping): ditto.
2070 * graphite-sese-to-poly.c (new_gimple_bb): Remove GBB_LOOPS related
2072 (free_gimple_bb): Removed GBB_LOOPS related free part.
2073 (build_bb_loops): Removed.
2074 * sese.h (struct gimple_bb): Removed loops.
2075 (GBB_LOOPS): Removed.
2076 (gbb_loop_at_index): Instead of using GBB_LOOPS, we use sese instead.
2077 (gbb_loop_index): ditto.
2079 2009-04-24 Tobias Grosser <grosser@fim.uni-passau.de>
2081 * graphite-scop-detection.c (graphite_can_represent_scev): Do not
2082 allow non constant strides.
2083 * testsuite/gcc.dg/graphite/scop-20.c: New.
2085 2009-04-24 Sebastian Pop <sebastian.pop@amd.com>
2087 * graphite-scop-detection.c (dot_all_scops): Fix system call
2088 return value warning.
2091 2009-04-24 Sebastian Pop <sebastian.pop@amd.com>
2093 * testsuite/gcc.dg/graphite/id-6.c: Fix pattern.
2094 * testsuite/gcc.dg/graphite/scop-3.c: Same.
2096 2009-04-24 Sebastian Pop <sebastian.pop@amd.com>
2098 * graphite-poly.c (map_into_dep_poly, map_dr_into_dep_poly,
2099 build_pairwise_constraint, dr_equality_constraints,
2100 build_pairwise_scheduling_equality,
2101 build_pairwise_scheduling_inequality, lexicographically_gt_p,
2102 build_lexicographically_gt_constraint, dependence_polyhedron,
2103 graphite_legal_transform_dr, graphite_legal_transform_bb,
2104 graphite_legal_transform): New.
2105 * graphite-poly.h (graphite_legal_transform): Declared.
2106 * graphite-sese-to-poly.c (build_poly_scop): Call to
2107 graphite_legal_transform is disabled for the moment.
2109 2009-04-24 Sebastian Pop <sebastian.pop@amd.com>
2111 * graphite-poly.h (pbb_nb_scattering_dims): New.
2112 (pbb_nb_scattering): Use it.
2114 2009-04-24 Sebastian Pop <sebastian.pop@amd.com>
2116 * graphite-ppl.c (ppl_insert_dimensions_pointset): Add
2117 Pointset_Powerset version of ppl_insert_dimensions.
2118 * graphite-ppl.h (ppl_insert_dimensions_pointset): Declared.
2120 2009-04-24 Sebastian Pop <sebastian.pop@amd.com>
2122 * graphite-ppl.c (ppl_insert_dimensions): Fix formatting.
2124 2009-04-24 Sebastian Pop <sebastian.pop@amd.com>
2126 * graphite-poly.h: Fix comment.
2128 2009-04-24 Sebastian Pop <sebastian.pop@amd.com>
2130 * graphite-sese-to-poly.c (build_poly_dr): Fix data ref multiplier.
2132 2009-04-24 Tobias Grosser <grosser@fim.uni-passau.de>
2134 * sese.c (expand_scalar_variables_stmt): Only iterate over the old
2137 2009-04-24 Tobias Grosser <grosser@fim.uni-passau.de>
2139 * graphite-sese-to-poly.c (var_used_in_not_loop_header_phi_node): New.
2140 (graphite_stmt_p): Represent bbs necessary to build the phi nodes of
2143 2009-04-20 Sebastian Pop <sebastian.pop@amd.com>
2145 * graphite-scop-detection.c (stmt_simple_for_scop_p): Do not
2146 handle EQ_EXPR and NE_EXPR.
2148 2009-04-17 Tobias Grosser <grosser@fim.uni-passau.de>
2150 * graphite-poly.h (poly_dr): Fix comment.
2152 2009-04-09 Sebastian Pop <sebastian.pop@amd.com>
2153 Tobias Grosser <grosser@fim.uni-passau.de>
2155 * graphite-poly.c (new_poly_bb): Do not initialize PBB_DOMAIN
2156 with a zero dimension polyhedron.
2157 (find_scop_parameters): Move the call to scop_set_nb_params here.
2158 (build_loop_iteration_domains): Store in loop->aux the iteration
2160 (build_scop_iteration_domain): Fix PBB_DOMAIN for bbs not surrounded
2161 by any loop in scop.
2162 (build_poly_scop): Do not call scop_set_nb_params.
2164 2009-04-09 Sebastian Pop <sebastian.pop@amd.com>
2165 Tobias Grosser <grosser@fim.uni-passau.de>
2167 * graphite-sese-to-poly.c (add_condition_to_pbb): Pass code to
2168 add_condition_to_domain not GT_EXPR.
2170 2009-04-09 Tobias Grosser <grosser@fim.uni-passau.de>
2172 * graphite-ppl.c (debug_ppl_powerset_matrix): New.
2173 * graphite-ppl.h (debug_ppl_powerset_matrix): New.
2174 * graphite-sese-to-poly.c (add_condition_to_pbb): Use
2175 upper_bound_assign to calculate unions.
2176 * testsuite/gcc.dg/graphite/id-6.c: New.
2178 2009-04-09 Tobias Grosser <grosser@fim.uni-passau.de>
2180 * graphite-scop-detection.c (canonicalize_loop_closed_ssa): Do not
2181 handle abnormal edges.
2183 2009-04-09 Tobias Grosser <grosser@fim.uni-passau.de>
2185 * graphite-poly.c (new_poly_dr, free_poly_dr): New.
2186 (free_poly_bb): Also free poly_drs.
2187 * graphite-poly.h (new_poly_dr, free_poly_dr): New.
2188 (poly_dr): Polyhedron to Pointset_Powerset.
2189 (pdr_accessp_nb_subscripts): Same.
2190 * graphite-sese-to-poly.c (build_poly_dr): Same. And actually build
2193 2009-04-08 Sebastian Pop <sebastian.pop@amd.com>
2195 * graphite-clast-to-gimple.c (initialize_cloog_names): Change cloog
2196 names into more meaningful names.
2198 2009-04-08 Sebastian Pop <sebastian.pop@amd.com>
2200 * testsuite/gfortran.dg/graphite/interchange-1.c: New.
2201 * testsuite/gfortran.dg/graphite/interchange-2.c: New.
2203 2009-04-08 Sebastian Pop <sebastian.pop@amd.com>
2205 * graphite-clast-to-gimple.c (graphite_loop_normal_form): Do not build
2207 * tree-parloops.c (rewrite_phi_with_iv): New.
2208 (rewrite_all_phi_nodes_with_iv): New.
2209 (canonicalize_loop_ivs): Call them.
2211 2009-04-08 Sebastian Pop <sebastian.pop@amd.com>
2213 * graphite-sese-to-poly.c (try_generate_gimple_bb): Use
2214 graphite_find_data_references_in_stmt.
2215 * tree-data-ref.c (graphite_find_data_references_in_stmt): New.
2216 * tree-data-ref.h (graphite_find_data_references_in_stmt): Declared.
2218 2009-04-08 Sebastian Pop <sebastian.pop@amd.com>
2220 * sese.c (add_loop_exit_phis): Don't fail on non SSA_NAME renames.
2222 2009-04-08 Sebastian Pop <sebastian.pop@amd.com>
2224 * graphite-sese-to-poly.c (build_scop_bbs_1): Use bb_in_sese_p
2225 instead of bb_in_region.
2226 (flag_bb_in_region): Same. Renamed flag_bb_in_sese.
2227 (build_sese_conditions): Use flag_bb_in_sese.
2228 * sese.c (register_bb_in_sese): Removed.
2229 (new_sese): Remove initialization of SESE_REGION_BBS.
2230 (free_sese): Do not free SESE_REGION_BBS.
2231 * sese.h (struct sese): Remove field region_basic_blocks.
2232 (SESE_REGION_BBS): Removed.
2233 (bb_in_sese_p): Implement in function of bb_in_region.
2235 2009-04-08 Sebastian Pop <sebastian.pop@amd.com>
2237 * graphite-scop-detection.c (limit_scops): Deal only with single exit
2240 2009-04-08 Tobias Grosser <grosser@fim.uni-passau.de>
2242 * graphite-scop-detection.c (stmt_simple_for_scop_p): Allow NE_EXPR
2244 * graphite-sese-to-poly.c (create_linear_expr_from_tree): New.
2245 (add_condition_to_domain): New.
2246 (add_condition_to_pbb): New.
2247 (add_conditions_to_domain): Cleanup and handle of NE_EXPR and EQ_EXPR.
2248 * testsuite/gcc.dg/graphite/scop-3.c: Update number of detected SCoPs.
2250 2009-04-08 Tobias Grosser <grosser@fim.uni-passau.de>
2252 * graphite-clast-to-gimple.c (build_cloog_prog): ppl_Polyhedron ->
2253 ppl_Pointset_Powerset.
2254 * graphite-poly.c (new_poly_bb, free_poly_bb): Same.
2255 * graphite-poly.h (poly_bb): poly_bb.domain Same.
2256 (pbb_nb_loops): Same.
2257 * graphite-sese-to-poly.c (build_loop_iteration_domains,
2258 add_conditions_to_domain): Same.
2259 * graphite-ppl.c (new_Cloog_Domain_from_ppl_Pointset_Powerset): New.
2260 (ppl_print_polyhedron_matrix): ppl_Polyhedron_t ->
2261 ppl_const_Polyhedron_t.
2262 (ppl_print_powerset_matrix): New.
2263 * graphite-ppl.h (new_Cloog_Domain_from_ppl_Pointset_Powerset,
2264 ppl_print_powerset_matrix): New.
2265 (ppl_print_polyhedron_matrix): Updated.
2267 2009-04-07 Sebastian Pop <sebastian.pop@amd.com>
2269 * tree-scalar-evolution.c (analyze_scalar_evolution_1): Fix comment.
2271 2009-04-07 Sebastian Pop <sebastian.pop@amd.com>
2273 * graphite-poly.c (extend_scattering): Fix indenting. Free cstr.
2274 (print_iteration_domains, debug_iteration_domain,
2275 debug_iteration_domains): New.
2276 * graphite-poly.h (print_iteration_domains, debug_iteration_domain,
2277 debug_iteration_domains): Declared.
2278 * graphite-sese-to-poly.c (build_pbb_scattering_polyhedrons): Fix
2281 2009-04-03 Tobias Grosser <grosser@fim.uni-passau.de>
2282 Sebastian Pop <sebastian.pop@amd.com>
2284 * graphite-poly.h (print_iteration_domain): New.
2285 * graphite-sese-to-poly.c (add_conditions_to_domain): Fixed bug.
2286 (build_sese_conditions_1, build_sese_conditions_after,
2287 build_sese_conditions_before): New.
2288 (build_sese_conditions): Rewritten.
2290 2009-04-03 Sebastian Pop <sebastian.pop@amd.com>
2291 Tobias Grosser <grosser@fim.uni-passau.de>
2293 Cleanup of code generation liveouts.
2294 * graphite-clast-to-gimple.c (translate_clast): Use a single
2295 rename_map instead of one per translated statement.
2296 Do not use SESE_LIVEOUT_RENAMES.
2297 (graphite_loop_normal_form): Do not use SESE_REDUCTION_LIST.
2298 (gloog): Do not use SESE_LIVEOUT_RENAMES.
2299 * graphite-scop-detection.c (harmful_stmt_in_bb): Return the close
2300 phi node of a reduction: when a loop contains a reduction used outside
2301 the loop, there should be a scalar close phi node on the exit block.
2302 * sese.c (new_sese): Do not initialize SESE_LIVEOUT,
2303 SESE_LIVEOUT_RENAMES, and SESE_REDUCTION_LIST.
2304 (free_sese): Do not free them.
2305 (sese_build_liveouts_use): Do not use them.
2306 (sese_build_liveouts_bb): Same.
2307 (sese_build_liveouts): Same.
2308 (sese_insert_phis_for_liveouts): Same.
2309 (sese_adjust_phis_for_liveouts): Same. Renamed sese_adjust_liveout_phis.
2310 (defined_in_loop_p): New.
2311 (alive_after_loop): New.
2312 (close_phi_not_yet_inserted_p): New.
2313 (struct alep, alep_p): New.
2314 (add_loop_exit_phis): Remove from the rename_map all the names defined
2315 in the code generated loop.
2316 (insert_loop_close_phis): Traverse the rename_map passed to it.
2317 Don't use SESE_LIVEOUT_RENAMES.
2318 (default_liveout_before_guard): Renamed default_before_guard.
2319 (insert_guard_phis): Do not use SESE_LIVEOUT_RENAMES.
2320 (graphite_copy_stmts_from_block): Do not directly call set_rename.
2321 (register_sese_liveout_renames): Removed.
2322 (copy_bb_and_scalar_dependences): Do not call it.
2323 * sese.h (struct sese): Removed fields: liveout, liveout_renames, and
2325 (SESE_LIVEOUT): Removed.
2326 (SESE_LIVEOUT_RENAMES): Removed.
2327 (SESE_REDUCTION_LIST): Removed.
2328 (sese_build_liveouts): Removed.
2329 (sese_adjust_phis_for_liveouts): Renamed sese_adjust_liveout_phis.
2330 (insert_loop_close_phis): Pass a htab_t instead of a sese.
2331 (insert_guard_phis): Same.
2332 (rename_map_elt): Declare a VEC of them.
2333 * tree-parloops.c (canonicalize_loop_ivs): reduction_list contains
2334 trees not pointers to trees.
2336 Rewrite in canonical close SSA form:
2337 * graphite-scop-detection.c (contains_only_close_phi_nodes): New.
2338 (limit_scops): Close the scop after the block containing the close phi
2340 (canonicalize_loop_closed_ssa): New.
2341 (canonicalize_loop_closed_ssa_form): New.
2342 (build_scops): Call canonicalize_loop_closed_ssa_form.
2344 * graphite-sese-to-poly.c: Fix typos.
2346 2009-04-03 Sebastian Pop <sebastian.pop@amd.com>
2348 * graphite-poly.c (print_scattering_function, print_pbb_domain):
2350 (dump_gbb_conditions, dump_gbb_cases, print_iteration_domain): New.
2351 (print_pbb): Add conditions.
2353 2009-04-01 Tobias Grosser <grosser@fim.uni-passau.de>
2354 Sebastian Pop <sebastian.pop@amd.com>
2356 * graphite-scop-detection.c (bb_in_sd_region): Use bb_in_region.
2357 * graphite-sese-to-poly.c (all_non_dominated_preds_marked_p): New.
2358 (build_scop_bbs_1): New.
2359 (build_scop_bbs): Rewrite.
2360 * sese.h (bb_in_region): New.
2362 2009-03-29 Tobias Grosser <grosser@fim.uni-passau.de>
2364 * graphite-poly.c (new_poly_bb, free_poly_bb): Initialize/free
2366 (print_scop): Style.
2367 * graphite-poly.h (poly_bb): Add drs vector.
2368 (PBB_DRS): Add accessor.
2369 * graphite-sese-to-poly.c (build_poly_dr): New.
2370 (build_pbb_drs, build_scop_drs): New.
2371 (build_poly_scop): call build_scop_drs (Disabled at the moment).
2373 2009-03-29 Tobias Grosser <grosser@fim.uni-passau.de>
2375 * tree-ssa-loop.c: Include forgotten toplev.h
2377 2009-03-29 Tobias Grosser <grosser@fim.uni-passau.de>
2379 * graphite-poly.c: (apply_poly_transforms): sorry -> gcc_unreachable.
2380 * testsuite/gcc.dg/graphite/pr37883.c: Remove -floop-*
2381 * testsuite/gcc.dg/graphite/pr37928.c: Same
2382 * testsuite/gcc.dg/graphite/pr38409.c: Same
2383 * testsuite/gcc.dg/graphite/pr38498.c: Same
2384 * testsuite/gcc.dg/graphite/pr38559.c: Same
2385 * testsuite/gcc.dg/graphite/pr39335.c: Same
2386 * testsuite/gcc.dg/graphite/pr39335_1.c: Same
2387 * testsuite/gfortran.dg/graphite/block-2.f: Same
2388 * tree-ssa-loop.c (gate_graphite_transforms): Always fail if called
2391 2009-03-28 Tobias Grosser <grosser@fim.uni-passau.de>
2393 * graphite-sese-to-poly.c (ref_nb_loops, build_access_matrix_with_af,
2394 build_access_matrix, build_scop_data_accesses): Remove access function
2395 building. (We get a new version soon).
2396 (build_bb_loops, scan_tree_for_params_right_scev): Update.
2397 * sese.h (nb_loops_around_loop_in_sese): Remove.
2398 (sese_loop_depth): Do not use SESE_LOOP_NEST any more.
2400 2009-03-27 Tobias Grosser <grosser@fim.uni-passau.de>
2401 Sebastian Pop <sebastian.pop@amd.com>
2403 * graphite-scop-detection.c (struct scopdet_info): Rename last
2405 (scopdet_basic_block_info, build_scops_1): Don't use
2406 CDI_POST_DOMINATORS. CDI_POST_DOMINATORS should never be used.
2408 2009-03-26 Tobias Grosser <grosser@fim.uni-passau.de>
2409 Sebastian Pop <sebastian.pop@amd.com>
2411 * graphite-clast-to-gimple.c (gloog): Call sese_build_liveouts.
2412 * sese.c (sese_build_liveouts_use): Renamed from
2413 sese_build_livein_liveouts_use. Remove liveins.
2414 (sese_build_liveouts_bb): Renamed from sese_build_livein_liveouts_bb.
2415 Call sese_build_liveouts_use.
2416 (sese_build_liveouts): Renamed from sese_build_livein_liveouts.
2417 Call sese_build_liveouts_bb.
2418 (new_sese, free_sese): Remove liveins.
2419 (sese_add_exit_phis_var): Deleted.
2420 (sese_insert_phis_for_liveouts): Call sese_add_exit_phis_edge
2422 (graphite_copy_stmts_from_block): Remove SESE_NUM_VER.
2424 * sese.h (sese): Remove num_ver and livein.
2425 (SESE_LIVEIN, SESE_LIVEIN_VER, SESE_NUM_VER): Removed.
2427 2009-03-25 Tobias Grosser <grosser@fim.uni-passau.de>
2429 * graphite-sese-to-poly.c (build_scop_scattering): Fix compile.
2431 2009-03-25 Tobias Grosser <grosser@fim.uni-passau.de>
2433 * graphite-sese-to-poly.c (compare_prefix_loops): Removed.
2434 (build_scop_scattering): Do not use compare_prefix_loops any more.
2435 (nb_common_loops): New.
2437 2009-03-24 Sebastian Pop <sebastian.pop@amd.com>
2439 * sese.c (get_new_name_from_old_name): Renamed get_rename.
2440 (register_old_and_new_names): Renamed set_rename.
2442 2009-03-24 Sebastian Pop <sebastian.pop@amd.com>
2444 * graphite-scop-detection.h (nb_reductions_in_loop): Revert removal
2445 of the decl from the previous commit.
2447 2009-03-24 Sebastian Pop <sebastian.pop@amd.com>
2449 * graphite-scop-detection.c (dot_scop): New.
2450 * graphite-scop-detection.h (dot_scop): Declared.
2452 2009-03-24 Sebastian Pop <sebastian.pop@amd.com>
2454 * graphite-sese-to-poly.c (compare_prefix_loops): Fix compare.
2456 2009-03-24 Sebastian Pop <sebastian.pop@amd.com>
2458 * cfgloopmanip.c (create_empty_loop_on_edge): Generate the loop exit
2459 condition at the end of the loop.
2460 * graphite.c (graphite_initialize, graphite_finalize): Print to
2461 dump_file the compiled function.
2462 * graphite-clast-to-gimple.c (graphite_create_new_loop): Update use
2463 of create_empty_loop_on_edge.
2464 (translate_clast): Update the code generation of loops for the new
2466 * cfgloop.h (create_empty_loop_on_edge): Update declaration.
2468 2009-03-24 Sebastian Pop <sebastian.pop@amd.com>
2470 Reverted the patch from 2009-03-19.
2472 2009-03-19 Tobias Grosser <grosser@fim.uni-passau.de>
2474 * graphite-poly.c (new_poly_bb, free_poly_bb): Initialize/free
2476 (print_scop): Style.
2477 * graphite-poly.h (poly_bb): Add drs vector.
2478 (PBB_DRS): Add accessor.
2479 * graphite-sese-to-poly.c (ref_nb_loops): Remove.
2480 (build_access_matrix_with_af, build_access_matrix,
2481 build_scop_data_accesses): Delete.
2482 (build_poly_dr): New.
2483 (build_pbb_drs, build_scop_drs): New.
2484 (build_poly_scop): call build_scop_drs.
2486 2009-03-13 Sebastian Pop <sebastian.pop@amd.com>
2488 * graphite-scop-detection.c (dot_all_scops_1): Close the table
2489 once per basic block.
2491 2009-03-13 Tobias Grosser <grosser@fim.uni-passau.de>
2493 * graphite-scop-detection.c (graphite_can_represent_scev): New.
2494 (graphite_can_represent_expr): Renamed from loop_affine_expr
2496 (stmt_simple_for_scop_p): Call graphite_can_represent_expr.
2497 (graphite_cannot_represent_loop): Add scop_entry to parameters.
2498 (scopdet_basic_block_info): Actually define entry_block.
2499 (stmt_simple_memref_p): Moved here from ...
2501 * tree-data-ref.c (stmt_simple_memref_p): here.
2502 * tree-data-ref.h (stmt_simple_memref_p): Removed.
2504 2009-03-13 Tobias Grosser <grosser@fim.uni-passau.de>
2506 * testsuite/gcc.dg/graphite/id-4.c: New.
2508 2009-03-12 Sebastian Pop <sebastian.pop@amd.com>
2510 * sese.c (expand_scalar_variables_expr): Handle tcc_comparison.
2511 (register_old_and_new_names): Update the content of the map.
2512 When there was already a rename_map_elt in the map at that
2514 (copy_bb_and_scalar_dependences): Do rename_variables after
2515 expand_scalar_variables.
2516 * graphite-clast-to-gimple.c (build_iv_mapping): Update the content
2517 of the map. When there was already a rename_map_elt in the
2518 map at that location, free it.
2519 (translate_clast): Pass the rename_map. Do not initialize and free
2520 a rename_map per stmt_user.
2521 (gloog): Initialize and free one rename_map and pass it to
2524 2009-03-12 Sebastian Pop <sebastian.pop@amd.com>
2526 * sese.c (expand_scalar_variables_stmt,
2527 expand_scalar_variables_ssa_name): Add a gimple_stmt_iterator
2529 (expand_scalar_variables_expr): Handle REALPART_EXPR and IMAGPART_EXPR.
2530 (expand_scalar_variables): Pass to expand_scalar_variables_stmt
2531 the gimple_stmt_iterator of the statement to be expanded.
2532 * graphite-scop-detection.c (is_simple_operand): Do handle
2535 2009-03-11 Tobias Grosser <grosser@fim.uni-passau.de>
2537 * graphite-scop-detection.c (is_simple_operand): Do not handle
2539 * testsuite/gcc.dg/graphite/id-2.c: New.
2541 * graphite-sese-to-poly.c (build_bb_loops,
2542 add_value_to_dim, scan_tree_for_params_right_scev,
2543 scan_tree_for_params_int, scan_tree_for_params, idx_record_params,
2544 find_params_in_bb, build_loop_iteration_domains,
2545 add_conditions_to_domain): Remove subtract.
2547 2009-03-11 Tobias Grosser <grosser@fim.uni-passau.de>
2549 * graphite-clast-to-gimple.c (loop_iv_stack_patch_for_consts,
2550 build_iv_mapping, compute_cloog_iv_types_1, build_cloog_prog):
2551 pbb_loop_at_index -> gbb_loop_at_index.
2552 * graphite-poly.c (new_poly_bb, new_scop): New accessors.
2553 (debug_loop_vec): Delete.
2554 * graphite-poly.h (poly_bb, scop): Change black_box and region to void
2555 pointer. Move LOOPS to gimple_bb_p and insert nb_params.
2556 (PBB_LOOPS): Removed.
2557 (PBB_BLACK_BOX): Insert cast.
2558 (pbb_set_black_box): New setter.
2559 (pbb_loop_at_index, pbb_loop_index): Removed.
2560 (scop_set_region, scop_set_nb_params): New.
2561 * graphite-sese-to-poly.c (new_gimple_bb, free_gimple_bb,
2562 build_scop_scattering, build_bb_loops): Add GBB_LOOPS.
2563 (build_poly_scop): Use scop_set_nb_params.
2564 * sese.h (gimple_bb): Add LOOPS.
2565 (GBB_LOOPS, gbb_loop_index, gbb_loop_at_index): New.
2567 2009-03-11 Tobias Grosser <grosser@fim.uni-passau.de>
2569 Revert previous commit.
2571 2009-03-11 Sebastian Pop <sebastian.pop@amd.com>
2573 * sese.c (expand_scalar_variables_expr): Handle tcc_comparison.
2574 (register_old_and_new_names): Update the content of the map.
2575 When there was already a rename_map_elt in the map at that
2577 (copy_bb_and_scalar_dependences): Do rename_variables after
2578 expand_scalar_variables.
2579 * graphite-clast-to-gimple.c (build_iv_mapping): Update the content
2580 of the map. When there was already a rename_map_elt in the
2581 map at that location, free it.
2582 (translate_clast): Pass the rename_map. Do not initialize and free
2583 a rename_map per stmt_user.
2584 (gloog): Initialize and free one rename_map and pass it to
2587 2009-03-11 Tobias Grosser <grosser@fim.uni-passau.de>
2589 Remove forgotten line in revert.
2591 2009-03-11 Sebastian Pop <sebastian.pop@amd.com>
2593 Revert previous commit.
2595 2009-03-10 Sebastian Pop <sebastian.pop@amd.com>
2597 * sese.c (register_old_and_new_names): 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 (copy_bb_and_scalar_dependences): Do rename_variables after
2601 expand_scalar_variables.
2602 * graphite-clast-to-gimple.c (build_iv_mapping): Update the content
2603 of the map. When there was already a rename_map_elt in the
2604 map at that location, free it.
2605 (translate_clast): Pass the rename_map. Do not initialize and free
2606 a rename_map per stmt_user.
2607 (gloog): Initialize and free one rename_map and pass it to
2610 2009-03-10 Sebastian Pop <sebastian.pop@amd.com>
2612 * graphite-clast-to-gimple.c (translate_clast): context_loop
2615 2009-03-10 Tobias Grosser <grosser@fim.uni-passau.de>
2616 Sebastian Pop <sebastian.pop@amd.com>
2618 * graphite-ppl.c (ppl_insert_dimensions): Fix stupid mistake
2619 of the use of ppl_Polyhedron_map_space_dimensions.
2621 2009-03-10 Tobias Grosser <grosser@fim.uni-passau.de>
2622 Sebastian Pop <sebastian.pop@amd.com>
2624 * graphite-poly.c (unify_scattering_dimensions): Fix types.
2625 * graphite-poly.h (poly_dr_p, poly_dr, POLY_DR_TYPE, PDR_BB,
2626 PDR_TYPE, PDR_ACCESSES, pdr_accessp_nb_subscripts,
2627 pdr_accessp_nb_iterators, pdr_accessp_nb_params,
2628 pdr_accessp_alias_set_dim, pdr_accessp_subscript_dim,
2629 pdr_accessp_iterator_dim, pdr_accessp_param_dim,
2630 pbb_nb_params): New.
2631 (pbb_nb_loops, pbb_nb_scattering, scop_nb_params,
2632 nb_loops_around_pbb): Adapt return types.
2634 2009-03-09 Tobias Grosser <grosser@fim.uni-passau.de>
2636 * Makefile.in (graphite.o, graphite-sese-to-poly.o,
2637 graphite-clast-to-gimple.o, graphite-data-ref.o,
2638 graphite-scop-detection.o, graphite-poly.o): Add
2641 2009-03-05 Tobias Grosser <grosser@fim.uni-passau.de>
2643 * Makefile.in (graphite.o, graphite-sese-to-poly.o,
2644 graphite-clast-to-gimple.o, graphite-data-ref.o,
2645 graphite-scop-detection.o, graphite-poly.o): Add graphite-poly.h.
2647 2009-03-04 Tobias Grosser <grosser@fim.uni-passau.de>
2649 * testsuite/gcc.dg/graphite/pr37485.c: Remove -floop-block
2650 * testsuite/gcc.dg/graphite/pr37828.c: Same.
2651 * testsuite/gcc.dg/graphite/pr37684.c: Same.
2652 * testsuite/gcc.dg/graphite/block-0.c: Same.
2653 * testsuite/gcc.dg/graphite/block-1.c: Same.
2654 * testsuite/gcc.dg/graphite/block-2.c: Same.
2655 * testsuite/gcc.dg/graphite/block-3.c: Same.
2656 * testsuite/gcc.dg/graphite/block-4.c: Same.
2657 * testsuite/gcc.dg/graphite/block-5.c: Same.
2658 * testsuite/gcc.dg/graphite/block-6.c: Same.
2659 * testsuite/gfortran.dg/graphite/pr38083.f90: Same.
2660 * testsuite/gfortran.dg/graphite/block-1.f90: Same.
2661 * testsuite/gfortran.dg/graphite/block-3.f90: Same.
2662 * testsuite/gfortran.dg/graphite/pr37852.f90: Same.
2663 * testsuite/gfortran.dg/graphite/block-4.f90: Same.
2664 * testsuite/gfortran.dg/graphite/pr37980.f90: Same.
2665 * testsuite/gfortran.dg/graphite/pr38953.f90: Same.
2666 * testsuite/gfortran.dg/graphite/pr37857.f90: Same.
2667 * opts.c: Remove -floop-block from -O2.
2668 * graphite-poly.c: Fail if -floop-block -floop-interchange or
2669 -floop-strip-mine are used.
2671 2009-03-04 Tobias Grosser <grosser@fim.uni-passau.de>
2672 Sebastian Pop <sebastian.pop@amd.com>
2674 * graphite-clast-to-gimple.c (build_cloog_prog): Unify scattering
2676 * graphite-poly.c (pbb_compare, graphite_sort_pbbs,
2677 graphite_trans_bb_move_loop, graphite_trans_bb_strip_mine,
2678 strip_mine_profitable_p, is_interchange_valid,
2679 graphite_trans_bb_block, graphite_trans_loop_block,
2680 graphite_trans_scop_block): Temporary removed.
2681 (extend_scattering, unify_scattering_dimensions): New.
2682 (print_scattering_function, graphite_read_transforms):
2683 PBB_SCATTERING -> PBB_TRANSFORMED_SCATTERING.
2684 (graphite_generate_scattering_fns): Removed.
2685 (apply_poly_transforms): Cleanup.
2686 (free_poly_bb): Add PBB_SCATTERING -> PBB_TRANSFORMED_SCATTERING.
2687 (schedule_to_scattering): Moved.
2688 (PBB_STATIC_SCHEDULE, PBB_SCATTERING): Removed.
2689 (PBB_ORIGINAL_SCATTERING, PBB_TRANSFORMED_SCATTERING): New.
2690 (pbb_nb_scattering): New.
2691 (SCOP_ENTRY, SCOP_EXIT, SCOP_REGION_BBS, SCOP_DEP_GRAPH, SCOP_PARAMS,
2692 SCOP_LOOP_NEST, SCOP_PARAMS, SCOP_OLDIVS, SCOP_LIVEOUT_RENAMES):
2694 * graphite-ppl.c (ppl_insert_dimensions): Extended and renamed from
2696 (ppl_strip_loop): PBB_SCATTERING -> PBB_TRANSFORMED_SCATTERING.
2697 * graphite-scop-detection.c (dot_all_scops_1): PBB_SCATTERING
2698 -> PBB_TRANSFORMED_SCATTERING.
2699 * graphite-sese-to-poly.c (build_scop_bbs): Remove region.
2700 (build_pbb_scattering_polyhedron): Moved from schedule_to_scattering.
2701 (build_scop_scattering): Renamed from build_scop_canonical_schedules.
2702 (check_poly_representation): Do not return bool.
2703 (graphite_transform_loops): Reformat.
2704 * sese.h (SESE_ENTRY_BB, SESE_EXIT_BB): New.
2706 2009-03-04 Sebastian Pop <sebastian.pop@amd.com>
2708 * graphite-poly.c (print_pbb_domain, print_pbb, print_scop,
2709 debug_pbb_domain, debug_pbb, debug_scop): New.
2710 * graphite-poly.h (print_pbb_domain, print_pbb, print_scop,
2711 debug_pbb_domain, debug_pbb, debug_scop): Declared.
2713 2009-03-02 Sebastian Pop <sebastian.pop@amd.com>
2716 * tree-parloops.c (canonicalize_loop_ivs): Call fold_convert
2717 when the type precision of the induction variable should be
2718 larger than the type precision of nit.
2719 (gen_parallel_loop): Update use of canonicalize_loop_ivs.
2720 * graphite-clast-to-gimple.c (graphite_loop_normal_form): Same.
2721 * tree-flow.h (canonicalize_loop_ivs): Update declaration.
2723 * testsuite/gcc.dg/graphite/pr39335_1.c: New.
2724 * testsuite/gcc.dg/graphite/pr39335.c: New.
2726 2009-03-02 Sebastian Pop <sebastian.pop@amd.com>
2728 * tree-parloops.c (canonicalize_loop_ivs): reduction_list contains
2729 SSA_NAMES not struct reduction_info.
2731 2009-03-02 Sebastian Pop <sebastian.pop@amd.com>
2733 * sese.c (expand_scalar_variables_expr): Handle ADDR_EXPR.
2735 2009-02-27 Sebastian Pop <sebastian.pop@amd.com>
2736 Tobias Grosser <grosser@fim.uni-passau.de>
2738 * sese.c (new_sese): Initialize SESE_REDUCTION_LIST.
2739 (free_sese): Free SESE_REDUCTION_LIST.
2740 * sese.h (struct sese): Add field reduction_list.
2741 (SESE_REDUCTION_LIST): New.
2742 * graphite-clast-to-gimple.c (graphite_loop_normal_form): Call
2743 canonicalize_loop_ivs on SESE_REDUCTION_LIST.
2745 2009-02-27 Sebastian Pop <sebastian.pop@amd.com>
2746 Tobias Grosser <grosser@fim.uni-passau.de>
2748 * tree-flow.h (gather_scalar_reductions): Use struct loop * instead
2751 2009-02-27 Sebastian Pop <sebastian.pop@amd.com>
2752 Tobias Grosser <grosser@fim.uni-passau.de>
2754 * tree-parloops.c (struct brli, build_reduction_list_info,
2755 analyze_reduction_list, gather_scalar_reductions): New.
2756 (loop_parallel_p): Build a reduction list containing only
2757 PHI_RESULT SSA_NAMEs: call gather_scalar_reductions.
2758 (gen_parallel_loop): Call the analysis analyze_reduction_list.
2759 (parallelize_loops): Now reduction_list is a htab_t of SSA_NAMEs.
2760 * tree-flow.h (gather_scalar_reductions): Declared.
2762 2009-02-26 Sebastian Pop <sebastian.pop@amd.com>
2765 * graphite-clast-to-gimple.c (graphite_loop_normal_form): Do not call
2766 number_of_iterations_exit from a gcc_assert.
2768 2009-02-25 Sebastian Pop <sebastian.pop@amd.com>
2769 Jan Sjodin <jan.sjodin@amd.com>
2771 * output.h (graphite_out_file, graphite_in_file): Declared.
2772 * toplev.c (graphite_out_file, graphite_in_file): New.
2773 (init_asm_output): Initialize graphite_in_file and graphite_out_file.
2774 * graphite-clast-to-gimple.c (build_cloog_prog): Read PBB_SCATTERING.
2775 Don't call schedule_to_scattering.
2776 * common.opt (fgraphite-write, fgraphite-read): New.
2777 * graphite-poly.c: Include output.h.
2778 (print_scattering_function, print_scattering_functions,
2779 debug_scattering_function, debug_scattering_functions,
2780 graphite_write_transforms, graphite_read_transforms,
2781 graphite_generate_scattering_fns): New.
2782 (apply_poly_transforms): Do not apply transform if flag_graphite_read.
2783 Call graphite_generate_scattering_fns, graphite_write_transforms,
2784 graphite_read_transforms.
2785 (new_poly_bb): Initialize PBB_SCATTERING.
2786 (free_poly_bb): Free PBB_SCATTERING.
2787 (schedule_to_scattering): Does not return, initialize PBB_SCATTERING.
2788 * graphite-poly.h (struct poly_bb): Add field scattering.
2789 (PBB_SCATTERING): New.
2790 (print_scattering_function, print_scattering_functions,
2791 debug_scattering_function, debug_scattering_functions): Declared.
2792 * graphite-ppl.c (cloog_matrix_to_ppl_constraint): Matrices contain
2793 GMP values, not integers!
2794 (ppl_print_polyhedron_matrix, debug_ppl_polyhedron_matrix,
2795 ppl_read_polyhedron_matrix): New.
2796 * graphite-ppl.h (ppl_print_polyhedron_matrix,
2797 debug_ppl_polyhedron_matrix,
2798 ppl_read_polyhedron_matrix): Declared.
2799 * Makefile.in (graphite-poly.o): Depends on output.h.
2801 2009-02-23 Sebastian Pop <sebastian.pop@amd.com>
2802 Tobias Grosser <grosser@fim.uni-passau.de>
2805 * graphite-scop-detection.c (stmt_simple_for_scop_p): Analyze
2806 scalar evolutions in the scop_entry->loop_father.
2808 2009-02-23 Sebastian Pop <sebastian.pop@amd.com>
2809 Tobias Grosser <grosser@fim.uni-passau.de>
2811 * graphite.h (ref_nb_loops): Remove declaration.
2812 (struct gimple_bb, gimple_bb_p, GBB_BB, GBB_DATA_REFS, GBB_CONDITIONS,
2813 GBB_CONDITION_CASES, GBB_CLOOG_IV_TYPES, gbb_loop, print_gimple_bb,
2814 debug_gbb): Moved to sese.h.
2817 2009-02-23 Sebastian Pop <sebastian.pop@amd.com>
2818 Tobias Grosser <grosser@fim.uni-passau.de>
2820 * graphite-data-ref.[ch]: Disable.
2822 2009-02-23 Sebastian Pop <sebastian.pop@amd.com>
2823 Tobias Grosser <grosser@fim.uni-passau.de>
2825 * graphite-scop-detection.c (stmt_simple_for_scop_p): Analyze
2826 scalar evolutions in the scop_entry->loop_father.
2828 2009-02-23 Sebastian Pop <sebastian.pop@amd.com>
2830 * graphite-scop-detection.c (nb_reductions_in_loop): Moved here...
2831 (graphite_cannot_represent_loop_niter): Renamed
2832 graphite_cannot_represent_loop. Call nb_reductions_in_loop.
2833 (limit_scops): build_sese_loop_nests does not return a bool.
2834 * graphite-scop-detection.h (nb_reductions_in_loop): Declared.
2835 * sese.c (nb_reductions_in_loop): ... from here.
2836 (graphite_loop_normal_form): ... from here.
2837 (sese_record_loop): Does not fail, so does not return a bool.
2838 (build_sese_loop_nests): Same.
2839 * sese.h (build_sese_loop_nests): Update declaration.
2840 * graphite-clast-to-gimple.c (graphite_loop_normal_form): Moved here...
2841 (build_graphite_loop_normal_form): New.
2842 (gloog): Call build_graphite_loop_normal_form.
2843 * graphite-sese-to-poly.c (build_poly_scop): Don't fail on
2844 build_sese_loop_nests.
2846 * testsuite/gcc.dg/graphite/id-1.c: New.
2848 2009-02-23 Sebastian Pop <sebastian.pop@amd.com>
2849 Tobias Grosser <grosser@fim.uni-passau.de>
2851 * graphite-sese-to-poly.c (scan_tree_for_params): Remove REAL_CST.
2852 The SCoP detection fix is sufficient.
2854 2009-02-21 Sebastian Pop <sebastian.pop@amd.com>
2856 PR tree-optimization/39260
2857 * graphite-scop-detection.c (harmful_stmt_in_bb): Stop a SCoP when
2858 the basic block contains a condition with a real type.
2859 * graphite-sese-to-poly.c (scan_tree_for_params): Handle REAL_CST.
2861 * gcc.dg/graphite/pr39260.c: New.
2863 2009-02-21 Sebastian Pop <sebastian.pop@amd.com>
2865 * graphite-poly.c: Inlcude params.h.
2866 (graphite_trans_loop_block): Use PARAM_LOOP_BLOCK_TILE_SIZE for
2868 * Makefile.in (graphite-poly.o): Depend on PARAMS_H.
2869 * params.def (PARAM_LOOP_BLOCK_TILE_SIZE): Define.
2871 2009-02-20 Sebastian Pop <sebastian.pop@amd.com>
2872 Tobias Grosser <grosser@fim.uni-passau.de>
2874 * graphite-scop-detection.c (dot_all_scops_1,
2875 dot_all_scops): Moved here.
2876 * graphite-scop-detection.h (dot_all_scops): Declared here.
2877 * graphite.c (graphite_initialize, graphite_finalize): New.
2878 (graphite_transform_loops): Cleaned up.
2879 * sese.c (debug_oldivs): Moved here.
2880 * graphite-poly.c (graphite_apply_transformations): Renamed
2881 apply_poly_transforms.
2882 (debug_loop_vec): Moved here.
2883 * graphite-sese-to-poly.c (build_bb_loops, build_sese_conditions_1,
2884 scop_contains_non_iv_scalar_phi_nodes, build_sese_conditions,
2885 find_scop_parameters, build_scop_iteration_domain,
2886 add_conditions_to_constraints, build_scop_canonical_schedules,
2887 build_scop_data_accesses): Now static.
2888 (build_poly_scop, check_poly_representation): New.
2890 2009-02-20 Sebastian Pop <sebastian.pop@amd.com>
2892 * graphite.c (graphite_stmt_p, new_gimple_bb, free_gimple_bb,
2893 remove_gbbs_in_scop, free_scops, try_generate_gimple_bb,
2894 build_scop_bbs, ref_nb_loops, compare_prefix_loops,
2895 build_scop_canonical_schedules, build_bb_loops, add_value_to_dim,
2896 scan_tree_for_params_right_scev, scan_tree_for_params_int,
2897 scan_tree_for_params, struct irp_data, dx_record_params,
2898 find_params_in_bb, find_scop_parameters, gbb_from_bb,
2899 build_loop_iteration_domains, add_conditions_to_domain,
2900 phi_node_is_iv, bb_contains_non_iv_scalar_phi_nodes,
2901 scop_contains_non_iv_scalar_phi_nodes, build_sese_conditions_1,
2902 build_sese_conditions, add_conditions_to_constraints,
2903 build_scop_iteration_domain, build_access_matrix_with_af,
2904 build_access_matrix,
2905 build_scop_data_accesses): Moved to graphite-sese-to-poly.c.
2907 * graphite-sese-to-poly.c: New.
2908 * graphite-sese-to-poly.h: New.
2910 * Makefile.in: Add new rule for graphite-sese-to-poly.o.
2912 2009-02-20 Sebastian Pop <sebastian.pop@amd.com>
2914 * graphite.c: Split graphite code generation to a new file.
2915 (graphite_verify, gmp_cst_to_tree, clast_name_to_gcc,
2916 max_precision_type, clast_to_gcc_expression_red,
2917 clast_to_gcc_expression, gcc_type_for_clast_expr,
2918 gcc_type_for_clast_eq, loop_iv_stack_patch_for_consts,
2919 graphite_translate_clast_equation, graphite_create_guard_cond_expr,
2920 graphite_create_new_guard, clast_get_body_of_loop,
2921 gcc_type_for_cloog_iv, gcc_type_for_iv_of_clast_loop,
2922 graphite_create_new_loop, build_iv_mapping, copy_renames,
2923 translate_clast, find_cloog_iv_in_expr, compute_cloog_iv_types_1,
2924 compute_cloog_iv_types, free_scattering, save_var_name,
2925 initialize_cloog_names, build_scop_context, build_cloog_prog,
2926 set_cloog_options, debug_clast_stmt, scop_to_clast,
2927 print_generated_program, debug_generated_program,
2928 gloog): Moved to graphite-clast-to-gimple.c.
2930 (struct cloog_prog_clast): Moved to graphite-clast-to-gimple.h.
2932 (iv_stack_entry_is_constant, iv_stack_entry_is_iv,
2933 loop_iv_stack_push_iv, loop_iv_stack_insert_constant,
2934 loop_iv_stack_pop, loop_iv_stack_get_iv,
2935 loop_iv_stack_get_iv_from_name, debug_loop_iv_stack,
2936 free_loop_iv_stack, loop_iv_stack_remove_constants,
2937 debug_rename_elt, debug_rename_map_1, debug_rename_map,
2938 rename_map_elt_info, eq_rename_map_elts, debug_ivtype_elt,
2939 debug_ivtype_map_1, debug_ivtype_map, ivtype_map_elt_info,
2940 eq_ivtype_map_elts, sese_add_exit_phis_edge,
2941 sese_add_exit_phis_var, sese_insert_phis_for_liveouts,
2942 get_vdef_before_sese, sese_adjust_vphi,
2943 get_new_name_from_old_name, sese_adjust_phis_for_liveouts,
2944 oldiv_for_loop, rename_variables_in_stmt, is_parameter,
2945 is_iv, expand_scalar_variables_ssa_name,
2946 expand_scalar_variables_expr, expand_scalar_variables_stmt,
2947 expand_scalar_variables, rename_variables, remove_condition,
2948 get_true_edge_from_guard_bb, get_false_edge_from_guard_bb,
2949 add_loop_exit_phis, insert_loop_close_phis, struct igp,
2950 default_liveout_before_guard, add_guard_exit_phis,
2951 insert_guard_phis, register_old_and_new_names,
2952 graphite_copy_stmts_from_block, register_sese_liveout_renames,
2953 copy_bb_and_scalar_dependences, outermost_loop_in_sese,
2954 if_region_set_false_region, create_if_region_on_edge,
2955 move_sese_in_condition): Moved to sese.c.
2957 (nb_loops_around_loop_in_sese, struct ifsese, if_region_entry,
2958 if_region_exit, if_region_get_condition_block,
2959 struct rename_map_elt, new_rename_map_elt, enum iv_stack_entry_kind,
2960 union iv_stack_entry_data_union, struct iv_stack_entry_struct,
2961 iv_stack_entry_p, loop_iv_stack, struct ivtype_map_elt,
2962 ivtype_map_elt, new_ivtype_map_elt,
2963 recompute_all_dominators): Moved to sese.h.
2965 * graphite-clast-to-gimple.c: New.
2966 * graphite-clast-to-gimple.h: New.
2967 * Makefile.in: Add new rule for graphite-clast-to-gimple.o.
2968 * sese.c: Modified as said above.
2971 2009-02-20 Sebastian Pop <sebastian.pop@amd.com>
2973 * graphite.c: Split scop detection to a new file.
2974 (enum gbb_type, gbb_type, get_bb_type, struct sd_region_p, sd_region,
2975 move_sd_regions, loop_affine_expr, exclude_component_ref,
2976 is_simple_operand, stmt_simple_for_scop_p, harmful_stmt_in_bb,
2977 graphite_cannot_represent_loop_niter, struct scopdet_info,
2978 scopdet_basic_block_info, build_scops_1, bb_in_sd_region,
2979 find_single_entry_edge, find_single_exit_edge,
2980 create_single_entry_edge, sd_region_without_exit,
2981 create_single_exit_edge, unmark_exit_edges, mark_exit_edges,
2982 create_sese_edges, build_graphite_scops, limit_scops, build_scops):
2983 Moved to graphite-scop-detection.c.
2985 * graphite-scop-detection.c: New.
2986 * graphite-scop-detection.h: New.
2987 * Makefile.in: Add new rule for graphite-scop-detection.o.
2989 * sese.c: Include tree-chrec.h, tree-data-ref.h, and
2990 tree-scalar-evolution.h.
2991 (nb_reductions_in_loop, graphite_loop_normal_form, sese_record_loop,
2992 build_sese_loop_nests): Moved here from graphite.c.
2993 (param_index): Renamed parameter_index_in_region.
2995 2009-02-18 Tobias Grosser <grosser@fim.uni-passau.de>
2996 Sebastian Pop <sebastian.pop@amd.com>
2998 * gcc.dg/graphite/block-0.c: Expected to fail now.
2999 * gcc.dg/graphite/block-1.c: Same.
3000 * gcc.dg/graphite/block-5.c: Same.
3001 * gcc.dg/graphite/block-6.c: Same.
3003 2009-02-18 Tobias Grosser <grosser@fim.uni-passau.de>
3004 Sebastian Pop <sebastian.pop@amd.com>
3006 * graphite.h: Separate from graphite_bb_p the polyhedral
3007 representation in poly_bb_p and the GCC specifics in gimple_bb_p.
3008 (struct data_dependence_polyhedron, RDGE_DDP, ddp_p): Moved to
3009 graphite-data-ref.h.
3010 (struct poly_bb, PBB_SCOP, PBB_STATIC_SCHEDULE, PBB_DOMAIN,
3011 PBB_BLACK_BOX, PBB_LOOPS, pbb_nb_loops, pbb_loop_at_index,
3012 pbb_loop_index, struct scop, SCOP_BBS, SCOP_REGION, SCOP_ENTRY,
3013 SCOP_EXIT, SCOP_REGION_BBS, SCOP_DEP_GRAPH, SCOP_PARAMS,
3014 SCOP_LOOP_NEST, SCOP_PARAMS, SCOP_OLDIVS, SCOP_LIVEOUT_RENAMES,
3015 scop_nb_params): Moved to graphite-poly.h.
3016 * graphite-data-ref.c: Same.
3017 * graphite-data-ref.h: New.
3019 (pbb_compare, graphite_sort_pbbs, graphite_trans_bb_move_loop,
3020 graphite_trans_bb_strip_mine, strip_mine_profitable_p,
3021 is_interchange_valid, graphite_trans_bb_block,
3022 graphite_trans_loop_block, scop_max_loop_depth,
3023 graphite_trans_scop_block, graphite_apply_transformations,
3024 new_poly_bb, free_poly_bb, new_scop, free_scop): Moved to
3026 * graphite-poly.h: New.
3027 * graphite-poly.c: New.
3028 * Makefile.in (OBJS-common): Add graphite-poly.o.
3029 (graphite-poly.o): New rule.
3030 * tree-data-ref.h (struct data_reference): Remove unused scop field.
3033 2009-02-18 Sebastian Pop <sebastian.pop@amd.com>
3034 Tobias Grosser <grosser@fim.uni-passau.de>
3036 * graphite.c: Replace gb -> gbb.
3038 * graphite-data-ref.c: Same.
3040 2009-02-18 Sebastian Pop <sebastian.pop@amd.com>
3041 Tobias Grosser <grosser@fim.uni-passau.de>
3043 * Makefile.in (OBJS-commmon): Add sese.o.
3045 (graphite.o): Add sese.h.
3046 * graphite.c (bb_in_ss_p, loop_in_sese_p,
3047 sese_build_livein_liveouts_use, sese_build_livein_liveouts_bb,
3048 sese_build_livein_liveouts, register_bb_in_sese, new_sese, free_sese):
3050 (block_before_scop): Add missing return.
3051 (new_scop, free_scop): Remove SESE data structures.
3052 (scop_record_loop, scan_tree_for_params, find_params_in_bb,
3053 find_scop_parameters, build_loop_iteration_domains,
3054 add_conditions_to_domain, register_scop_liveout_renames,
3055 copy_bb_and_scalar_dependences): Scop -> SESE.
3057 (add_conditions_to_domain): SCoP -> SESE and remove check
3058 (scop_contains_non_iv_scalar_phi_nodes): New.
3059 (build_scop_conditions_1, build_scop_conditions): Remove check for
3060 non iv scalar phi nodes.
3061 (print_scop_statistics): New.
3062 (graphite_transform_loops): Cleanup.
3064 * graphite.h: Move to sese & cleanup.
3068 2009-02-16 Sebastian Pop <sebastian.pop@amd.com>
3069 Tobias Grosser <grosser@fim.uni-passau.de>
3071 * graphite.c (build_scop_conditions_1): Conditions are only
3072 at the end of a basic block.
3074 2009-02-16 Sebastian Pop <sebastian.pop@amd.com>
3075 Tobias Grosser <grosser@fim.uni-passau>
3077 * graphite.h (struct graphite_bb): Remove compressed_alpha_matrix
3079 (GBB_ALPHA): Removed.
3081 2009-02-16 Sebastian Pop <sebastian.pop@amd.com>
3082 Tobias Grosser <grosser@fim.uni-passau.de>
3084 * graphite-data-ref.c (graphite_test_dependence): Don't use
3085 GBB_DYNAMIC_SCHEDULE.
3086 * graphite.c (new_graphite_bb): Same.
3087 (free_graphite_bb): Same.
3088 (build_scop_dynamic_schedules): Removed.
3089 (graphite_transform_loops): Don't call it.
3090 * graphite.h (struct graphite_bb): Remove dynamic_schedule field.
3091 (GBB_DYNAMIC_SCHEDULE): Removed.
3093 2009-02-16 Sebastian Pop <sebastian.pop@amd.com>
3094 Tobias Grosser <grosser@fim.uni-passau.de>
3096 * graphite.c (schedule_to_scattering): Don't use CloogMatrix.
3097 (print_graphite_bb): Same.
3098 (build_cloog_prog): Same.
3100 2009-02-16 Sebastian Pop <sebastian.pop@amd.com>
3101 Tobias Grosser <grosser@fim.uni-passau.de>
3103 * graphite.c (build_cloog_prog): Don't use CloogMatrix.
3105 2009-02-16 Sebastian Pop <sebastian.pop@amd.com>
3106 Tobias Grosser <grosser@fim.uni-passau.de>
3108 * graphite.c (build_scop_context): Don't use CloogMatrix.
3109 * graphite-ppl.c (new_Cloog_Domain_from_ppl_Polyhedron): New.
3110 * graphite-ppl.h (new_Cloog_Domain_from_ppl_Polyhedron): Declared.
3112 2009-02-16 Sebastian Pop <sebastian.pop@amd.com>
3113 Tobias Grosser <grosser@fim.uni-passau.de>
3115 * graphite.h (struct scop): Move params, old_ivs, loops, loop_nest,
3116 liveout_renames, add_params fields...
3117 (struct sese): ... here.
3118 (SESE_PARAMS, SESE_LOOPS, SESE_LOOP_NEST, SESE_ADD_PARAMS,
3119 SESE_PARAMS, SESE_OLDIVS, SESE_LIVEOUT_RENAMES): New.
3121 2009-02-16 Sebastian Pop <sebastian.pop@amd.com>
3122 Tobias Grosser <grosser@fim.uni-passau.de>
3124 * graphite.c (print_scop): Do not print the CLooG program.
3125 (new_scop, free_scop, initialize_cloog_names, build_scop_context,
3126 build_cloog_prog, gloog): Don't use SCOP_PROG.
3127 (find_transform): Renamed scop_to_clast.
3128 (print_generated_program, debug_generated_program): New.
3129 (graphite_transform_loops): Adapt to new interface.
3130 * graphite.h (struct scop): Remove program field.
3131 (SCOP_PROG): Removed.
3132 (print_generated_program, debug_generated_program): Declared.
3134 2009-02-16 Sebastian Pop <sebastian.pop@amd.com>
3136 * graphite-data-ref.c (schedule_precedes_p, schedule_same_p): New.
3137 (statement_precedes_p): Use schedule_same_p and schedule_precedes_p.
3138 * graphite.c (gbb_compare, schedule_to_scattering, print_graphite_bb,
3139 free_graphite_bb, build_scop_canonical_schedules,
3140 graphite_trans_bb_strip_mine, graphite_trans_scop_block): Static
3141 schedules are now represented using a ppl_Linear_Expression_t.
3142 * graphite.h (struct graphite_bb): Same.
3143 * graphite-ppl.c (ppl_lexico_compare_linear_expressions): New.
3144 * graphite-ppl.h (ppl_lexico_compare_linear_expressions): Declared.
3146 2009-02-15 Sebastian Pop <sebastian.pop@amd.com>
3148 * graphite.c: Free local memory.
3149 * graphite-ppl.c: Same.
3151 2009-02-15 Sebastian Pop <sebastian.pop@amd.com>
3153 * graphite.c (const_column_index, get_first_matching_sign_row_index,
3154 get_lower_bound_row, get_upper_bound_row, copy_constraint,
3155 swap_constraint_variables, scale_constraint_variable): Removed.
3156 (graphite_trans_bb_strip_mine): Remove pong.
3157 * graphite-ppl.c: Include missing header files.
3158 (set_inhomogeneous, set_coef, shift_poly, ppl_strip_loop): New.
3159 * graphite-ppl.h (ppl_strip_loop): Declared.
3160 * Makefile.in (graphite-ppl.o): Adjust dependences.
3162 2009-02-14 Sebastian Pop <sebastian.pop@amd.com>
3164 * graphite.c (build_loop_iteration_domains): Remove ping pong.
3165 (build_scop_iteration_domain): Same.
3167 2009-02-13 Sebastian Pop <sebastian.pop@amd.com>
3169 * graphite.c (scan_tree_for_params, add_conditions_to_domain): Remove
3171 (add_value_to_dim, scan_tree_for_params_right_scev,
3172 scan_tree_for_params_int): New.
3173 * graphite-ppl.c (oppose_constraint): New.
3174 (insert_constraint_into_matrix): Implement missing cases.
3175 * graphite-ppl.h (insert_constraint_into_matrix): Declared.
3177 2009-02-13 Sebastian Pop <sebastian.pop@amd.com>
3179 * graphite.c (graphite_trans_bb_move_loop): Remove ping pong,
3180 use ppl_move_dimension.
3182 2009-02-12 Sebastian Pop <sebastian.pop@amd.com>
3184 * graphite-data-ref.c: Domains are now ppl_Polyhedra_t.
3187 * graphite-ppl.c: Same.
3188 * graphite-ppl.h: Same.
3190 2009-02-12 Sebastian Pop <sebastian.pop@amd.com>
3192 Revert last 3 commits.
3194 2009-02-10 Sebastian Pop <sebastian.pop@amd.com>
3196 * graphite.c (scan_tree_for_params, add_conditions_to_domain): Remove
3198 (add_value_to_dim, scan_tree_for_params_right_scev,
3199 scan_tree_for_params_int): New.
3200 * graphite-ppl.c (oppose_constraint): New.
3201 (insert_constraint_into_matrix): Implement missing cases.
3202 * graphite-ppl.h (insert_constraint_into_matrix): Declared.
3204 2009-02-10 Sebastian Pop <sebastian.pop@amd.com>
3206 * graphite.c (graphite_trans_bb_move_loop): Remove unused variables.
3208 2009-02-10 Sebastian Pop <sebastian.pop@amd.com>
3209 Tobias Grosser <grosser@fim.uni-passau.de>
3211 * graphite.c (graphite_trans_bb_move_loop): Remove ping pong,
3212 use ppl_move_dimension.
3213 * graphite-ppl.c (ppl_move_dimension): New.
3214 * graphite-ppl.h (ppl_move_dimension): Declared.
3216 2009-02-10 Sebastian Pop <sebastian.pop@amd.com>
3218 * graphite.c: Do not include cloog/cloog.h.
3219 (print_graphite_bb): Remove ping pong, call PPL print function.
3221 2009-02-10 Tobias Grosser <grosser@fim.uni-passau.de>
3223 * Makefile.in (OBJS-common): Add graphite-ppl.o.
3224 (graphite.o): Add dependence on graphite-ppl.h.
3225 (graphite-ppl.o): New.
3226 (graphite-data-ref.c): Ping pong between PPL data structures
3228 * graphite-ppl.c: New.
3229 * graphite-ppl.h: New.
3230 * graphite.c: Include graphite-ppl.h.
3231 (print_graphite_bb, add_conditions_to_domain, build_cloog_prog,
3232 graphite_trans_bb_move_loop, graphite_trans_bb_strip_mine):
3233 Ping pong between PPL data structures and matrices.
3234 (new_graphite_bb): Create a PPL constraint system.
3235 Call ppl_delete_Constraint_System instead of cloog_matrix_free.
3236 (build_loop_iteration_domains): Use PPL functions.
3237 * graphite.h: Include graphite-ppl.h. Fix comments.
3238 (graphite_bb): Use a ppl_Constraint_System_t instead of
3239 CloogMatrix for representing the domain.
3240 (scop): Remove static_schedule.
3241 (gbb_nb_loops): Ping pong between PPL data structures and matrices.
3243 2009-02-06 Sebastian Pop <sebastian.pop@amd.com>
3245 * graphite.c: Fix some comments.
3247 2009-02-05 Sebastian Pop <sebastian.pop@amd.com>
3250 * graphite.c (if_region_set_false_region): After moving a region
3251 in the false branch of a condition, remove the empty dummy
3253 (gloog): Remove wrong fix for PR38953.
3255 2009-02-03 Tobias Grosser <grosser@fim.uni-passau.de>
3257 * graphite.c (bb_in_sese_p, sese_build_livein_liveouts_use,
3258 sese_build_livein_liveouts_bb, sese_build_livein_liveouts,
3259 register_bb_in_sese, new_sese, free_sese): Moved.
3260 (dot_scop_1, build_scop_loop_nests, build_loop_iteration_domains,
3261 outermost_loop_in_scop, build_scop_iteration_domain,
3262 expand_scalar_variables_ssa_name, get_vdef_before_scop,
3263 limit_scops): Use bb_in_sese_p instead of bb_in_scop_p.
3264 Use loop_in_sese_p instead of loop_in_scop_p.
3265 (new_graphite_bb, new_scop, gloog): Do not initialize SCOP_BBS_B.
3266 (free_scop): Do not free SCOP_BBS_B.
3267 (nb_loops_around_loop_in_scop, nb_loops_around_gb,
3268 ref_nb_loops): Moved here...
3269 * graphite.h (ref_nb_loops): ... from here.
3270 (struct scop): Remove bbs_b bitmap.
3271 (SCOP_BBS_B, bb_in_scop_p, loop_in_scop_p): Removed.
3272 * testsuite/gcc.dg/graphite/scop-19.c: New
3274 2009-02-03 Tobias Grosser <grosser@fim.uni-passau.de>
3276 * graphite.c (scopdet_basic_block_info): Fix bug in scop
3279 2009-01-30 Tobias Grosser <grosser@fim.uni-passau.de>
3281 * graphite.c (new_loop_to_cloog_loop_str, hash_loop_to_cloog_loop,
3282 eq_loop_to_cloog_loop): Remove.
3283 (new_scop, free_scop): Remove SCOP_LOOP2CLOOG_LOOP.
3284 * graphite.h (struct scop): Remove loop2cloog_loop.
3285 (loop_domain_dim, loop_iteration_vector_dim): Remove.
3287 2009-01-30 Tobias Grosser <grosser@fim.uni-passau.de>
3289 * opts.c (decode_options): Only add graphite options to O2
3290 if we compile with graphite enabled.
3292 2009-01-26 Sebastian Pop <sebastian.pop@amd.com>
3294 * Merge from mainline (r143163:143684).
3296 2009-01-26 Sebastian Pop <sebastian.pop@amd.com>
3298 * graphite.c (debug_value): Removed.
3299 * graphite.h (debug_value): Removed.
3301 2009-01-23 Sebastian Pop <sebastian.pop@amd.com>
3303 * passes.c (init_optimization_passes): Do not call pass_copy_prop
3304 after graphite: pass_copy_prop does not maintain a proper loop closed
3305 SSA form. pass_copy_prop should be fixed.
3307 2009-01-23 Sebastian Pop <sebastian.pop@amd.com>
3309 * graphite.c (scop_adjust_phis_for_liveouts): Fix warning.
3311 2009-01-23 Sebastian Pop <sebastian.pop@amd.com>
3313 * graphite.c (graphite_verify): Add a call to verify_loop_closed_ssa.
3314 (gloog): Split the exit of the scop when the scop exit is a loop exit.
3315 (graphite_transform_loops): Only call cleanup_tree_cfg if gloog
3318 2009-01-20 Sebastian Pop <sebastian.pop@amd.com>
3320 * graphite.c (gloog): Return true when code gen succeeded.
3321 (graphite_transform_loops): Do not call cleanup_tree_cfg if
3322 the code of the function did not changed. After cleanup_tree_cfg
3323 call rewrite_into_loop_closed_ssa to maintain the loop closed ssa
3326 2009-01-19 Sebastian Pop <sebastian.pop@amd.com>
3328 * graphite.c (stmt_simple_for_scop_p): Also handle cases when
3329 gimple_call_lhs is NULL.
3331 2009-01-16 Sebastian Pop <sebastian.pop@amd.com>
3332 Tobias Grosser <tobi.grosser@amd.com>
3334 * graphite.c (graphite_trans_scop_block): Do not block single
3337 2009-01-15 Sebastian Pop <sebastian.pop@amd.com>
3338 Tobias Grosser <tobi.grosser@amd.com>
3340 * graphite.c (build_scop_canonical_schedules): Start schedules at
3343 2009-01-15 Sebastian Pop <sebastian.pop@amd.com>
3344 Tobias Grosser <tobi.grosser@amd.com>
3346 * graphite.c (compare_prefix_loops): New.
3347 (build_scop_canonical_schedules): Rewritten.
3348 (graphite_transform_loops): Move build_scop_canonical_schedules
3349 after build_scop_iteration_domain.
3351 2009-01-14 Sebastian Pop <sebastian.pop@amd.com>
3352 Tobias Grosser <tobi.grosser@amd.com>
3354 * graphite.c (add_conditions_to_domain): Add the loops to
3355 the dimension of the iteration domain. Do copy the domain
3356 only when it exists.
3357 (build_scop_conditions_1): Do not call add_conditions_to_domain.
3358 (add_conditions_to_constraints): New.
3359 (can_generate_code_stmt, can_generate_code): Removed.
3360 (gloog): Do not call can_generate_code.
3361 (graphite_transform_loops): Call add_conditions_to_constraints
3362 after building the iteration domain.
3364 2009-01-14 Sebastian Pop <sebastian.pop@amd.com>
3365 Tobias Grosser <tobi.grosser@amd.com>
3366 Jan Sjodin <jan.sjodin@amd.com>
3368 * graphite.c (scan_tree_for_params): On substractions negate
3369 all the coefficients of the term.
3370 (clast_to_gcc_expression_red): New. Handle reduction expressions
3371 of more than two operands.
3372 (clast_to_gcc_expression): Call clast_to_gcc_expression_red.
3373 (get_vdef_before_scop): Handle also the case of default definitions.
3375 2009-01-14 Sebastian Pop <sebastian.pop@amd.com>
3378 * graphite.c (get_vdef_before_scop, scop_adjust_vphi): New.
3379 (scop_adjust_phis_for_liveouts): Call scop_adjust_vphi.
3380 (gloog): Do not call cleanup_tree_cfg.
3381 (graphite_transform_loops): Call cleanup_tree_cfg after all
3382 scops have been code generated.
3384 2009-01-13 Sebastian Pop <sebastian.pop@amd.com>
3386 * passes.c (init_optimization_passes): Schedule after
3387 graphite transforms pass_copy_prop, pass_dce_loop and pass_lim.
3389 2009-01-13 Sebastian Pop <sebastian.pop@amd.com>
3391 * graphite.c (expand_scalar_variables_stmt): Do not pass loop_p.
3393 (expand_scalar_variables_ssa_name): Do not pass loop_p. Fix comment.
3394 Set the type of an expression to the type of its assign statement.
3395 (expand_scalar_variables_expr): Do not pass loop_p.
3396 Fix comment. Stop recursion on tcc_constant or tcc_declaration.
3397 (copy_bb_and_scalar_dependences): Do not pass loop_p.
3398 (translate_clast): Update call to copy_bb_and_scalar_dependences.
3400 2009-01-11 Sebastian Pop <sebastian.pop@amd.com>
3402 * graphite.c (expand_scalar_variables_ssa_name): Set the type of
3403 an expression to the gimple_expr_type of its assign statement.
3404 (expand_scalar_variables_expr): Stop recursion on tcc_constant
3407 2009-01-11 Sebastian Pop <sebastian.pop@amd.com>
3409 PR tree-optimization/38786
3410 * testsuite/gcc.dg/graphite/pr38786.c: New.
3411 * graphite.c (expand_scalar_variables_ssa_name): New, outlined from
3412 the SSA_NAME case of expand_scalar_variables_expr.
3413 (expand_scalar_variables_expr): Also gather the scalar computation
3414 used to index the memory access.
3415 (expand_scalar_variables_stmt): Pass to expand_scalar_variables_expr
3416 the gimple_stmt_iterator where it inserts new code.
3418 2009-01-10 Sebastian Pop <sebastian.pop@amd.com>
3420 * testsuite/gcc.dg/graphite/block-3.c: Fix compile error on 32bit.
3422 2009-01-10 Sebastian Pop <sebastian.pop@amd.com>
3424 * opts.c (decode_options): Enable flag_graphite_identity and
3425 flag_loop_block in -O2 and above.
3427 2009-01-08 Sebastian Pop <sebastian.pop@amd.com>
3429 * libjava/classpath/lib/gnu/java/awt/peer/gtk/GtkMouseInfoPeer.class:
3430 Fix merge problem: replace with the file from trunk.
3432 2009-01-08 Sebastian Pop <sebastian.pop@amd.com>
3434 * Merge from mainline (r141727:143163).
3436 2009-01-07 Sebastian Pop <sebastian.pop@amd.com>
3437 Jan Sjodin <jan.sjodin@amd.com>
3439 PR tree-optimization/38559
3440 * testsuite/gcc.dg/graphite/pr38559.c: New.
3442 * graphite.c (debug_value, copy_constraint,
3443 swap_constraint_variables, scale_constraint_variable, ): New.
3444 (get_lower_bound, get_upper_bound): Removed.
3445 (graphite_trans_bb_strip_mine): Clean up this code that works
3446 only for constant number of iterations. Fully copy upper and
3447 lower bound constraints, not only the constant part of them.
3448 * graphite.h (debug_value): Declared.
3450 2009-01-06 Jan Sjodin <jan.sjodin@amd.com>
3452 PR tree-optimization/38492
3453 PR tree-optimization/38498
3454 * tree-check.c (operator_is_linear, scev_is_linear_expression): New.
3455 * tree-chrec.h (scev_is_linear_expression): Declared.
3456 * graphite.c (graphite_cannot_represent_loop_niter): New.
3457 (scopdet_basic_block_info): Call graphite_cannot_represent_loop_niter.
3458 (graphite_loop_normal_form): Use gcc_assert.
3459 (scan_tree_for_params): Use CASE_CONVERT.
3460 (phi_node_is_iv, bb_contains_non_iv_scalar_phi_nodes): New.
3461 (build_scop_conditions_1): Call bb_contains_non_iv_scalar_phi_nodes.
3462 Use gcc_assert. Discard scops that contain unhandled cases.
3463 (build_scop_conditions): Return a boolean status for unhandled cases.
3464 (strip_mine_profitable_p): Print the loop number, not its depth.
3465 (is_interchange_valid): Pass the depth of the loop nest, don't
3466 recompute it wrongly.
3467 (graphite_trans_bb_block): Same.
3468 (graphite_trans_bb_block): Print tentative of loop blocking.
3469 (graphite_trans_scop_block): Do not print that the loop has been
3471 (graphite_transform_loops): Do not handle scops that contain condition
3474 * testsuite/gcc.dg/graphite/pr38500.c: Fixed warning as committed
3476 * testsuite/gcc.dg/graphite/block-0.c: Update test.
3477 * testsuite/gcc.dg/graphite/block-1.c: Same.
3478 * testsuite/gcc.dg/graphite/block-2.c: Remove xfail and test for
3480 * testsuite/gcc.dg/graphite/block-4.c: Remove test for strip mine.
3481 * testsuite/gcc.dg/graphite/block-3.c: New.
3482 * testsuite/gcc.dg/graphite/pr38498.c: New.
3484 2008-12-22 Harsha Jagasia <harsha.jagasia@amd.com>
3486 PR tree-optimization/38510
3487 * gcc.dg/graphite/pr38510.c: New.
3488 * graphite.c (recompute_all_dominators): Call mark_irreducible_loops.
3489 (translate_clast): Call recompute_all_dominators before
3491 (gloog): Call recompute_all_dominators before graphite_verify.
3493 2008-12-12 Sebastian Pop <sebastian.pop@amd.com>
3495 PR tree-optimization/38492
3496 * graphite.c (rename_map_elt, debug_rename_elt,
3497 debug_rename_map_1, debug_rename_map, new_rename_map_elt,
3498 rename_map_elt_info, eq_rename_map_elts,
3499 get_new_name_from_old_name, bb_in_sese_p): Moved around.
3500 (sese_find_uses_to_rename_use): Renamed sese_build_livein_liveouts_use.
3501 (sese_find_uses_to_rename_bb): Renamed sese_build_livein_liveouts_bb.
3502 (sese_build_livein_liveouts): New.
3503 (new_sese, free_sese): New.
3504 (new_scop): Call new_sese.
3505 (free_scop): Call free_sese.
3506 (rename_variables_from_edge, rename_phis_end_scop): Removed.
3507 (register_old_new_names): Renamed register_old_and_new_names.
3508 (register_scop_liveout_renames, add_loop_exit_phis,
3509 insert_loop_close_phis, struct igp,
3510 default_liveout_before_guard, add_guard_exit_phis,
3511 insert_guard_phis, copy_renames): New.
3512 (translate_clast): Call insert_loop_close_phis and insert_guard_phis.
3513 (sese_add_exit_phis_edge): Renamed scop_add_exit_phis_edge.
3514 (rewrite_into_sese_closed_ssa): Renamed scop_insert_phis_for_liveouts.
3515 (scop_adjust_phis_for_liveouts): New.
3516 (gloog): Call scop_adjust_phis_for_liveouts.
3518 * graphite.h (struct sese): Documented. Added fields liveout,
3520 (SESE_LIVEOUT, SESE_LIVEIN, SESE_LIVEIN_VER, SESE_NUM_VER): New.
3521 (new_sese, free_sese, sese_build_livein_liveouts): Declared.
3522 (struct scop): Added field liveout_renames.
3523 (SCOP_LIVEOUT_RENAMES): New.
3525 2008-12-11 Sebastian Pop <sebastian.pop@amd.com>
3527 PR tree-optimization/38409
3528 * gcc.dg/graphite/pr38409.c: New.
3529 * graphite.c (nb_reductions_in_loop): Use simple_iv.
3531 2008-12-11 Sebastian Pop <sebastian.pop@amd.com>
3533 * graphite.c (gcc_type_for_cloog_iv): By default return
3535 (graphite_create_new_loop): Don't fold_convert the already
3536 fold_convert-ed expression.
3538 2008-12-11 Harsha Jagasia <harsha.jagasia@amd.com>
3540 PR tree-optimization/38446
3541 * gcc.dg/graphite/pr38446.c: New.
3542 * graphite.c (register_bb_in_sese): New.
3543 (bb_in_sese_p): Check if bb belongs to sese region by explicitly
3544 looking at the bbs in the region.
3545 * graphite.h (sese): Add region_basic_blocks pointer set to
3546 structure and initialize at the time of defining new scop.
3548 2008-12-11 Tobias Grosser <grosser@fim.uni-passau.de>
3550 * graphite.c (new_graphite_bb): Initialize GBB_STATIC_SCHEDULE.
3551 (find_params_in_bb): Do not free data refs.
3552 (free_graphite_bb): Add FIXME on disabled free_data_refs.
3554 2008-12-11 Sebastian Pop <sebastian.pop@amd.com>
3556 * testsuite/gcc.dg/graphite/scop-16.c: Test only scop specific info.
3557 * testsuite/gcc.dg/graphite/scop-17.c: Same.
3558 * testsuite/gcc.dg/graphite/block-5.c: New.
3559 * testsuite/gcc.dg/graphite/block-6.c: New.
3560 * testsuite/gcc.dg/graphite/pr37485.c: Clean dump file after.
3561 * testsuite/gcc.dg/graphite/pr37684.c: Same.
3562 * testsuite/gcc.dg/graphite/block-2.c: Same.
3564 * graphite.c (struct ivtype_map_elt): New.
3565 (debug_ivtype_elt, debug_ivtype_map_1, debug_ivtype_map,
3566 new_ivtype_map_elt, ivtype_map_elt_info, eq_ivtype_map_elts,
3567 gcc_type_for_cloog_iv): New.
3568 (loop_iv_stack_patch_for_consts): Use the type of the induction
3569 variable from the original loop, except for the automatically
3570 generated loops, i.e., in the case of a strip-mined loop, in
3571 which case there is no original loop: in that case just use
3573 (new_graphite_bb): Initialize GBB_CLOOG_IV_TYPES.
3574 (free_graphite_bb): Free GBB_CLOOG_IV_TYPES.
3575 (clast_name_to_gcc): Accept params to be NULL.
3576 (clast_to_gcc_expression): Take an extra parameter for the type.
3577 Convert to that type all the expressions built by this function.
3578 (gcc_type_for_clast_expr, gcc_type_for_clast_eq): New.
3579 (graphite_translate_clast_equation): Compute the type of the
3580 clast_equation before translating its LHS and RHS.
3581 (clast_get_body_of_loop, gcc_type_for_iv_of_clast_loop): New.
3582 (graphite_create_new_loop): Compute the type of the induction
3583 variable before translating the lower and upper bounds and before
3584 creating the induction variable.
3585 (rename_variables_from_edge, rename_phis_end_scop): New.
3586 (copy_bb_and_scalar_dependences): Call rename_phis_end_scop.
3587 (sese_add_exit_phis_edge): Do not use integer_zero_node.
3588 (find_cloog_iv_in_expr, compute_cloog_iv_types_1,
3589 compute_cloog_iv_types): New.
3590 (gloog): Call compute_cloog_iv_types before starting the
3591 translation of the clast.
3593 * graphite.h (struct graphite_bb): New field cloog_iv_types.
3594 (GBB_CLOOG_IV_TYPES): New.
3595 (debug_ivtype_map): Declared.
3596 (oldiv_for_loop): New.
3598 2008-12-10 Tobias Grosser <grosser@fim.uni-passau.de>
3601 * graphite.c (new_scop): Initialize SCOP_ADD_PARAMS.
3602 (param_index): Assert if parameter is not know after parameter
3604 (find_params_in_bb): Detect params directly in GBB_CONDITIONS.
3605 (find_scop_parameters): Mark, that we have finished parameter
3607 (graphite_transform_loops): Move condition detection before parameter
3609 * graphite.h (struct scop): Add SCOP_ADD_PARAMS.
3610 * testsuite/gfortran.dg/graphite/pr38459.f90: New.
3612 2008-12-09 Tobias Grosser <grosser@fim.uni-passau.de>
3614 * graphite.c (graphite_transform_loops): Always call find_transform ()
3615 in ENABLE_CHECKING. So we test these code paths, even if we do not
3618 2008-12-09 Tobias Grosser <grosser@fim.uni-passau.de>
3620 * graphite.c (print_graphite_bb): Fix printing to file != dump_file.
3621 (print_scop): Ditto.
3623 2008-12-08 Tobias Grosser <grosser@fim.uni-passau.de>
3626 Fix testsuite/gfortran.dg/graphite/id-3.f90.
3627 * graphite.c (scopdet_basic_block_info): Fix bug that found some
3628 regions more than once.
3630 2008-12-03 Sebastian Pop <sebastian.pop@amd.com>
3632 Fix testsuite/gfortran.dg/graphite/id-4.f90.
3633 * graphite.c (scan_tree_for_params): Do not compute the multiplicand
3636 2008-12-03 Sebastian Pop <sebastian.pop@amd.com>
3638 Fix testsuite/gfortran.dg/graphite/id-1.f90.
3639 * graphite.c (gmp_cst_to_tree): Pass the type in parameter.
3640 (loop_iv_stack_patch_for_consts): Update use of gmp_cst_to_tree.
3641 (max_precision_type): New.
3642 (value_clast): Removed.
3643 (clast_to_gcc_expression): Be more careful to types of expressions.
3644 Use max_precision_type and update use of gmp_cst_to_tree.
3645 (graphite_translate_clast_equation): Use max_precision_type.
3646 (graphite_create_guard_cond_expr): Do not use integer_type_node,
3647 use the type of the condition.
3648 (graphite_create_new_loop): Do not use integer_type_node, use the
3649 max_precision_type of lb and ub.
3651 2008-12-03 Sebastian Pop <sebastian.pop@amd.com>
3653 * graphite.c (build_scops_1): Initialize open_scop.exit
3656 2008-12-02 Sebastian Pop <sebastian.pop@amd.com>
3658 * testsuite/gcc.dg/graphite/pr38084.c: New.
3659 * testsuite/gfortran.dg/graphite/id-1.f90: New.
3660 * testsuite/gfortran.dg/graphite/id-2.f90: New.
3661 * testsuite/gfortran.dg/graphite/id-3.f90: New.
3662 * testsuite/gfortran.dg/graphite/id-4.f90: New.
3663 * testsuite/gfortran.dg/graphite/pr37857.f90: New.
3665 2008-12-02 Sebastian Pop <sebastian.pop@amd.com>
3666 Jan Sjodin <jan.sjodin@amd.com>
3667 Harsha Jagasia <harsha.jagasia@amd.com>
3679 * testsuite/gcc.dg/graphite/pr38073.c: New.
3680 * testsuite/gcc.dg/graphite/pr37928.c: New.
3681 * testsuite/gcc.dg/graphite/pr37883.c: New.
3682 * testsuite/gcc.dg/graphite/pr38125.c: New.
3683 * testsuite/gfortran.dg/graphite/pr38083.f90: New.
3684 * testsuite/gfortran.dg/graphite/pr37852.f90: New.
3685 * testsuite/gfortran.dg/graphite/pr37980.f90: New.
3687 * testsuite/gcc.dg/graphite/scop-18.c: Remove reduction, test for
3688 the number of detected scops. Copy exact same test for loop
3690 * testsuite/gcc.dg/graphite/block-1.c: Fix the number of expected
3691 loops to be blocked as reductions are not handled.
3692 * testsuite/gcc.dg/graphite/block-4.c: ...here. New.
3694 * tree-phinodes.c (remove_phi_nodes): New, extracted from...
3695 * tree-cfg.c (remove_phi_nodes_and_edges_for_unreachable_block):
3697 * tree-flow.h (remove_phi_nodes, canonicalize_loop_ivs): Declared.
3698 * Makefile.in (graphite.o): Depend on value-prof.h.
3699 (graphite.o-warn): Removed -Wno-error.
3700 * tree-parloops.c (canonicalize_loop_ivs): Allow reduction_list
3701 to be a NULL pointer. Call update_stmt. Return the newly created
3702 cannonical induction variable.
3704 * graphite.h (debug_rename_map): Declared. Fix some comments.
3706 * graphite.c: Reimplement the code generation from graphite to gimple.
3707 Include value-prof.h.
3708 (loop_iv_stack_get_iv): Do not return NULL for constant substitutions.
3709 (get_old_iv_from_ssa_name): Removed.
3710 (graphite_stmt_p): New.
3711 (new_graphite_bb): Test for useful statements before building a
3712 graphite statement for the basic block.
3713 (free_graphite_bb): Do not free GBB_DATA_REFS: this is a bug
3714 in free_data_ref that calls BITMAP_FREE (DR_VOPS (dr)) without
3716 (recompute_all_dominators, graphite_verify,
3717 nb_reductions_in_loop, graphite_loop_normal_form): New.
3718 (scop_record_loop): Call graphite_loop_normal_form.
3719 (build_scop_loop_nests): Iterate over all the blocks of the
3720 function instead of relying on the incomplete information from
3721 SCOP_BBS. Return the success of the operation.
3722 (find_params_in_bb): Use the data from GBB_DATA_REFS.
3723 (add_bb_domains): Removed.
3724 (build_loop_iteration_domains): Don't call add_bb_domains.
3725 Add the iteration domain only to the basic blocks that have been
3726 translated to graphite.
3727 (build_scop_conditions_1): Add constraints only if the basic
3728 block have been translated to graphite.
3729 (build_scop_data_accesses): Completely disabled until data
3730 dependence is correctly implemented.
3731 (debug_rename_elt, debug_rename_map_1, debug_rename_map): New.
3732 (remove_all_edges_1, remove_all_edges): Removed.
3733 (get_new_name_from_old_name): New.
3734 (graphite_rename_variables_in_stmt): Renamed
3735 rename_variables_in_stmt. Call get_new_name_from_old_name.
3736 Use replace_exp and update_stmt.
3737 (is_old_iv): Renamed is_iv.
3738 (expand_scalar_variables_stmt): Extra parameter for renaming map.
3739 Use replace_exp and update_stmt.
3740 (expand_scalar_variables_expr): Same. Use the map to get the
3741 new names for the renaming of induction variables and for the
3742 renaming of variables after a basic block has been copied.
3743 (expand_scalar_variables): Same.
3744 (graphite_rename_variables): Renamed rename_variables.
3745 (move_phi_nodes): Removed.
3746 (get_false_edge_from_guard_bb): New.
3747 (build_iv_mapping): Do not insert the induction variable of a
3748 loop in the renaming iv map if the basic block does not belong
3750 (register_old_new_names, graphite_copy_stmts_from_block,
3751 copy_bb_and_scalar_dependences): New.
3752 (translate_clast): Heavily reimplemented: copy basic blocks,
3753 do not move them. Finally, in call cleanup_tree_cfg in gloog.
3754 At each translation step call graphite_verify ensuring the
3755 consistency of the SSA, loops and dominators information.
3756 (collect_virtual_phis, find_vdef_for_var_in_bb,
3757 find_vdef_for_var_1, find_vdef_for_var,
3758 patch_phis_for_virtual_defs): Removed huge hack.
3759 (mark_old_loops, remove_dead_loops, skip_phi_defs,
3760 collect_scop_exit_phi_args, patch_scop_exit_phi_args,
3761 gbb_can_be_ignored, scop_remove_ignoreable_gbbs, ): Removed.
3762 (remove_sese_region, ifsese, if_region_entry, if_region_exit,
3763 if_region_get_condition_block, if_region_set_false_region,
3764 create_if_region_on_edge, move_sese_in_condition, bb_in_sese_p,
3765 sese_find_uses_to_rename_use, sese_find_uses_to_rename_bb,
3766 sese_add_exit_phis_edge, sese_add_exit_phis_var,
3767 rewrite_into_sese_closed_ssa): New.
3768 (gloog): Remove dead code. Early return if code cannot be
3769 generated. Call cleanup_tree_cfg once the scop has been code
3771 (graphite_trans_scop_block, graphite_trans_loop_block): Do not
3772 block loops with less than two loops.
3773 (graphite_apply_transformations): Remove the call to
3774 scop_remove_ignoreable_gbbs.
3775 (limit_scops): When build_scop_loop_nests fails, continue on
3776 the next scop. Fix open_scop.entry.
3777 (graphite_transform_loops): Call recompute_all_dominators: force the
3778 recomputation of correct CDI_DOMINATORS and CDI_POST_DOMINATORS.
3779 Call initialize_original_copy_tables and free_original_copy_tables
3780 to be able to copy basic blocks during code generation.
3781 When build_scop_loop_nests fails, continue on next scop.
3782 (value_clast): New union.
3783 (clast_to_gcc_expression): Fix type cast warning.
3785 2008-11-09 Sebastian Pop <sebastian.pop@amd.com>
3787 * Merge from mainline (r140838:141727).
3789 2008-11-05 Tobias Grosser <grosser@fim.uni-passau.de>
3793 * graphite.c (scan_tree_for_params): Add POINTER_PLUS_EXPR.
3795 2008-11-05 Tobias Grosser <grosser@fim.uni-passau.de>
3799 * graphite.c (scopdet_basic_block_info): Fix loops with multiple
3800 exits and conditions.
3801 * testsuite/gcc.dg/graphite/pr37943.c: New.
3803 2008-10-23 Tobias Grosser <grosser@fim.uni-passau.de>
3806 * graphite.c (gloog): Replace EXIT_BLOCK_PTR with scop exit.
3808 2008-10-23 Tobias Grosser <grosser@fim.uni-passau.de>
3810 * doc/invoke.texi: Fix spaces.
3812 2008-10-22 Sebastian Pop <sebastian.pop@amd.com>
3814 PR tree-optimization/37891
3815 Reverted last commit.
3816 * graphite.c (create_single_entry_edge): Set
3817 EDGE_IRREDUCIBLE_LOOP and BB_IRREDUCIBLE_LOOP.
3819 2008-10-21 Sebastian Pop <sebastian.pop@amd.com>
3820 Mitul Thakkar <mitul.thakkar@amd.com>
3822 * graphite.c (create_single_entry_edge): Set
3823 EDGE_IRREDUCIBLE_LOOP and BB_IRREDUCIBLE_LOOP.
3825 2008-10-16 Tobias Grosser <grosser@fim.uni-passau.de>
3827 * doc/invoke.texi: Add -fgraphite-identity.
3828 * graphite.c (graphite_apply_transformations): Check for
3829 -fgraphite-identity.
3830 * toplev.c (process_options): Add flag_graphite_identity.
3831 * tree-ssa-loop.c: Add flag_graphite_identity.
3833 2008-10-14 Sebastian Pop <sebastian.pop@amd.com>
3835 Undo changes from 2008-10-02:
3836 * tree-ssa-loop-ivopts.c (rewrite_use_nonlinear_expr): Convert
3837 operand type when copying the operand to a variable of different type.
3838 * cfgloopmanip.c (create_empty_loop_on_edge): Write exit condition
3839 with the IV name after increment.
3841 2008-10-14 Sebastian Pop <sebastian.pop@amd.com>
3842 Harsha Jagasia <harsha.jagasia@amd.com>
3844 PR tree-optimization/37828
3845 * testsuite/gcc.dg/graphite/pr37828.c: New.
3846 * graphite.c (graphite_trans_loop_block): Do not loop block
3847 single nested loops.
3849 2008-10-09 Harsha Jagasia <harsha.jagasia@amd.com>
3850 Sebastian Pop <sebastian.pop@amd.com>
3852 * graphite.c (struct rename_map_elt, new_rename_map_elt,
3853 rename_map_elt_info, eq_rename_map_elts): New.
3854 (graphite_rename_ivs_stmt): Renamed graphite_rename_variables_in_stmt.
3855 (expand_scalar_variables_expr): Change parameters.
3856 (expand_scalar_variables_stmt): Same.
3857 (expand_scalar_variables): Same.
3858 (graphite_rename_ivs): Rename graphite_rename_variables.
3859 (build_iv_mapping): New.
3860 (translate_clast): Call build_iv_mapping.
3861 * graphite.h (gbb_p): New name.
3863 2008-10-03 Harsha Jagasia <harsha.jagasia@amd.com>
3865 PR tree-optimization/37684
3866 * gcc.dg/graphite/pr37684.c: New.
3867 * graphite.c (exclude_component_ref): New.
3868 (is_simple_operand): Call exclude_component_ref.
3870 2008-10-02 Jan Sjodin <jan.sjodin@amd.com>
3871 Harsha Jagasia <harsha.jagasia@amd.com>
3873 PR tree-optimization/37485
3874 * gcc.dg/graphite/block-2.c: New
3875 * graphite.c (gmp_cst_to_tree): Moved.
3876 (iv_stack_entry_is_constant): New.
3877 (iv_stack_entry_is_iv): New.
3878 (loop_iv_stack_push): Renamed to loop_iv_stack_push_iv.
3879 (loop_iv_stack_insert_constant): New.
3880 (loop_iv_stack_pop): Use new datatpype.
3881 (loop_iv_stack_get_iv): Same.
3882 (loop_iv_stack_get_iv_from_name): Same.
3883 (loop_iv_stack_debug): Renamed to debug_loop_iv_stack.
3884 (loop_iv_stack_patch_for_consts): New.
3885 (loop_iv_stack_remove_constants): New.
3886 (graphite_create_new_loop): Use loop_iv_stack_push_iv.
3887 (translate_clast): Call loop_iv_stack_patch_for_consts and
3888 loop_iv_stack_remove_constants.
3889 (gloog): Use new datatype. Redirect construction edge to end
3890 block to avoid accidental deletion.
3891 * graphite.h (enum iv_stack_entry_kind): New. Tag for data in
3893 (union iv_stack_entry_data): New. Data in iv stack entry.
3894 (struct iv_stack_entry): New. Datatype for iv stack entries.
3896 2008-10-02 Sebastian Pop <sebastian.pop@amd.com>
3898 * tree-ssa-loop-ivopts.c (rewrite_use_nonlinear_expr): Convert
3899 operand type when copying the operand to a variable of different type.
3901 2008-10-02 Sebastian Pop <sebastian.pop@amd.com>
3903 * cfgloopmanip.c (create_empty_loop_on_edge): Write exit condition
3904 with the IV name after increment.
3906 2008-10-02 Sebastian Pop <sebastian.pop@amd.com>
3908 * Merge from mainline (r140164:140838).
3910 2008-09-10 Konrad Trifunovic <konrad.trifunovic@inria.fr>
3912 * graphite-data-ref.c: New.
3913 * graphite.c (print_scop): Also dump the dependence graph.
3914 (bb_in_scop_p, loop_in_scop_p, nb_loops_around_gb): Moved...
3915 (new_scop): Initialize SCOP_DEP_GRAPH.
3916 (build_scop_dynamic_schedules): New.
3917 (build_access_matrix_with_af): Fixed column numbering.
3918 (graphite_transform_loops): Call build_scop_dynamic_schedules.
3919 * graphite.h: Add ifndef/define guards against multiple inclusion.
3920 (struct scop): Add dep_graph field.
3921 (SCOP_DEP_GRAPH): Defined.
3922 (ref_nb_loops): Fixed and moved to other position.
3923 (bb_in_scop_p, loop_in_scop_p, nb_loops_around_gb): ... here.
3924 (nb_loops_around_loop_in_scop): New.
3925 (graphite_dump_dependence_graph): Declared.
3926 (graphite_build_rdg_all_levels): Declared.
3927 (graphite_test_dependence): Declared.
3928 * Makefile.in (graphite-data-ref.o): New target.
3930 2008-09-09 Sebastian Pop <sebastian.pop@amd.com>
3932 * Merge from mainline (139870:140164).
3934 2008-09-01 Sebastian Pop <sebastian.pop@amd.com>
3936 * Merge from mainline (138275:139870).
3937 * testsuite/gcc.dg/graphite/scop-matmult.c: XFailed as one of
3938 the commits from trunk broke the niter detection.
3940 2008-09-01 Sebastian Pop <sebastian.pop@amd.com>
3942 * graphite.c: Add more documentation. Fix formatting.
3943 (debug_loop_vec, debug_oldivs, loop_iv_stack,
3944 loop_iv_stack_debug): Moved...
3945 (schedule_to_scattering): Move before use.
3946 (dot_all_scops): Include in "#if 0" the code for system
3949 * graphite.h: (debug_loop_vec, debug_oldivs, loop_iv_stack,
3950 loop_iv_stack_debug): ...here.
3952 2008-08-29 Jan Sjodin <jan.sjodin@amd.com>
3954 * tree-phinodes.c (make_phi_node): Extern.
3955 (add_phi_node_to_bb): New.
3956 (create_phi_node): Call add_phi_node_to_bb.
3957 * tree-ssa-loop-ivopts.c (get_phi_with_result): New.
3958 (remove_statement): Handle case where stored phi was updated
3959 and is no longer the same.
3960 * graphite.c (is_parameter): New.
3962 (expand_scalar_variables_expr): New.
3963 (expand_scalar_variables_stmt): New.
3964 (expand_scalar_variables): New.
3965 (move_phi_nodes): Create new phi instead of moving old one.
3966 (translate_clast): Call expand_scalar_variables.
3967 (find_vdef_for_var_in_bb): Also scan regular definitions.
3968 (skip_phi_defs): New.
3969 (collect_scop_exit_phi_args): New.
3970 (patch_scop_exit_phi_args): New.
3971 (gloog): Patch phis after scop.
3972 * tree-flow.h: (add_phi_node_to_bb): Declared.
3973 (make_phi_node): Declared.
3975 2008-08-26 Sebastian Pop <sebastian.pop@amd.com>
3977 * graphite.c (end_scop): Split the entry of the scop when it
3978 is the header of the loop in which the scop is ending.
3979 (build_scops_1, limit_scops): Update uses of end_scop.
3981 2008-08-26 Sebastian Pop <sebastian.pop@amd.com>
3983 * graphite.c (dot_all_scops_1): Do not fail on uninitialized
3984 SCOP_ENTRY or SCOP_EXIT.
3986 2008-08-25 Sebastian Pop <sebastian.pop@amd.com>
3988 * graphite.c (get_construction_edge): Removed.
3989 (gloog): Construction edge is the scop entry edge.
3991 2008-08-25 Sebastian Pop <sebastian.pop@amd.com>
3993 * graphite.c (can_generate_for_scop): Removed.
3994 (gloog): Do not call it.
3996 2008-08-25 Sebastian Pop <sebastian.pop@amd.com>
3998 * graphite.c (new_scop): Entry of a scop is an edge.
3999 Initialize SESE region.
4000 (free_scop): Free SESE region.
4001 (build_scops_1, scopdet_bb_info): Work on edges, not on bbs.
4002 (split_difficult_bb): New, split from end_scop.
4003 (end_scop): Exit of a scop is an edge.
4004 (build_scop_bbs): Never check CDI_POST_DOMINATORS: this info is
4005 not automatically updated and thus is always wrong.
4006 * graphite.h (struct sese): New.
4009 (struct scop): New field for a SESE region. Remove entry, exit.
4010 (SCOP_ENTRY, SCOP_EXIT): Update definitions to match same
4011 semantics as before. Moved comment around.
4013 2008-08-25 Tobias Grosser <grosser@fim.uni-passau.de>
4014 Sebastian Pop <sebastian.pop@amd.com>
4016 * graphite.c (graphite_transform_loops): Always enable gloog
4017 and find_transform when ENABLE_CHECKING.
4019 2008-08-25 Sebastian Pop <sebastian.pop@amd.com>
4021 * graphite.c (graphite_transform_loops): Move pretty printer
4022 of SCOPs before doing any transform. Remove call to print_scops
4023 and dot_all_scops_1.
4025 2008-08-25 Sebastian Pop <sebastian.pop@amd.com>
4027 * graphite.c (dump_gbb_conditions): Don't try to print NULL pointers.
4028 (print_graphite_bb): Same.
4030 2008-08-25 Sebastian Pop <sebastian.pop@amd.com>
4032 * graphite.c (dot_all_scops_1): Cleanup.
4033 (move_scops): Fix comment.
4035 2008-08-25 Sebastian Pop <sebastian.pop@amd.com>
4037 * graphite.c (build_scop_bbs): Revert commit 139355:
4039 2008-08-20 Sebastian Pop <sebastian.pop@amd.com>
4040 Dwarakanath Rajagopal <dwarak.rajagopal@amd.com>
4042 * graphite.c (build_scop_bbs): Factor up code.
4044 2008-08-25 Tobias Grosser <grosser@fim.uni-passau.de>
4046 * graphite.c (gloog): Update dominator info.
4048 2008-08-25 Tobias Grosser <grosser@fim.uni-passau.de>
4050 * graphite.c (remove_cond_exprs): Do not fail on empty bbs.
4052 2008-08-24 Sebastian Pop <sebastian.pop@amd.com>
4054 * graphite.c (new_graphite_bb): Remove GBB_INDEX_TO_NUM_MAP
4056 (free_graphite_bb): Remove GBB_INDEX_TO_NUM_MAP free.
4057 (translate_clast): Correct formatting.
4058 * graphite.h (struct num_map): Removed.
4059 (struct graphite_bb): Remove num_map field.
4060 (GBB_INDEX_TO_NUM_MAP): Removed.
4062 2008-08-24 Sebastian Pop <sebastian.pop@amd.com>
4064 * graphite.c (build_access_matrix_with_af): Fix comments.
4065 (build_scop_data_accesses): Same.
4067 2008-08-24 Sebastian Pop <sebastian.pop@amd.com>
4069 * graphite.c (build_scop_data_accesses): Don't construct
4070 access matrices. Add a FIXME and an assert condition that
4071 should pass when the access matrices will be needed.
4073 2008-08-24 Sebastian Pop <sebastian.pop@amd.com>
4075 * tree-data-ref.c (stmt_simple_memref_p): Don't call
4077 * graphite.c (build_graphite_bb): Renamed new_graphite_bb.
4078 Moved close by free_graphite_bb.
4079 (free_graphite_bb): Call free_data_refs. Reset bb->aux.
4080 (new_scop): Move close by free_scop.
4081 (graphite_transform_loops): Avoid linear scan to reset bb->aux.
4083 2008-08-22 Jan Sjodin <jan.sjodin@amd.com>
4085 * cfgloopmanip.c (create_empty_if_region_on_edge): New.
4086 * graphite.c (clast_to_gcc_expression): Call gmp_cst_to_tree
4087 instead of recursive call.
4088 (graphite_translate_clast_equation): New.
4089 (graphite_create_guard_cond_expr): New.
4090 (graphite_create_new_guard): New.
4091 (get_stack_index_from_iv): Removed.
4092 (graphite_rename_ivs_stmt): Use gbb_loop_index.
4093 (get_true_edge_from_guard_bb): New.
4094 (translate_clast): Handle stmt_guard in clast.
4095 (get_construction_edge): Allow construction edge detection for
4096 a scope entry with multiple predecessors if one predecessor is
4097 the immediate dominator of scope entry.
4098 (can_generate_code_stmt): Enable code generation for clast_guard.
4099 (gloog): Use correct context loop. Removed check for post dominators.
4100 * cfgloop.h (create_empty_if_region_on_edge): Declared.
4102 2008-08-21 Sebastian Pop <sebastian.pop@amd.com>
4104 * graphite.c (remove_dead_loops): Document better which
4107 2008-08-21 Sebastian Pop <sebastian.pop@amd.com>
4109 * Makefile.in: Rename POLYLIBLIBS and POLYLIBINC to PPLLIBS
4111 (graphite.o): Also depends on pointer-set.h.
4113 2008-08-21 Sebastian Pop <sebastian.pop@amd.com>
4115 * graphite.c (scop_record_loop): Fix compile warning.
4117 2008-08-21 Harsha Jagasia <harsha.jagasia@amd.com>
4118 Sebastian Pop <sebastian.pop@amd.com>
4120 * graphite.c (scop_record_loop): DECL_NAME can be NULL.
4122 2008-08-21 Sebastian Pop <sebastian.pop@amd.com>
4124 * graphite.c (build_graphite_bb): Initialize bb->aux to
4125 point to the graphite_bb_p.
4126 (graphite_bb_from_bb): Renamed gbb_from_bb; returns the
4128 (add_bb_domains): Does not use the scop parameter.
4129 (graphite_transform_loops): Clean bb->aux at the end.
4131 2008-08-20 Dwarakanath Rajagopal <dwarak.rajagopal@amd.com>
4132 Sebastian Pop <sebastian.pop@amd.com>
4134 * testsuite/lib/target-supports.exp
4135 (check_effective_target_fgraphite): New.
4137 * testsuite/gcc.dg/graphite/graphite.exp: Early exit when
4138 check_effective_target_fgraphite returns false.
4139 Set dg-do-what-default to compile.
4140 (scan-graphite-dump-times): Removed.
4141 * testsuite/gfortran.dg/graphite/graphite.exp: Same.
4143 * testsuite/gcc.dg/graphite/scop-0.c: Do not use "dg-do compile".
4144 Use scan-tree-dump-times instead of scan-graphite-dump-times.
4145 * testsuite/gcc.dg/graphite/scop-1.c: Same.
4146 * testsuite/gcc.dg/graphite/scop-2.c: Same.
4147 * testsuite/gcc.dg/graphite/scop-3.c: Same.
4148 * testsuite/gcc.dg/graphite/scop-4.c: Same.
4149 * testsuite/gcc.dg/graphite/scop-5.c: Same.
4150 * testsuite/gcc.dg/graphite/scop-6.c: Same.
4151 * testsuite/gcc.dg/graphite/scop-7.c: Same.
4152 * testsuite/gcc.dg/graphite/scop-8.c: Same.
4153 * testsuite/gcc.dg/graphite/scop-9.c: Same.
4154 * testsuite/gcc.dg/graphite/scop-10.c: Same.
4155 * testsuite/gcc.dg/graphite/scop-11.c: Same.
4156 * testsuite/gcc.dg/graphite/scop-12.c: Same.
4157 * testsuite/gcc.dg/graphite/scop-13.c: Same.
4158 * testsuite/gcc.dg/graphite/scop-matmult.c: Same.
4159 * testsuite/gcc.dg/graphite/scop-14.c: Same.
4160 * testsuite/gcc.dg/graphite/scop-15.c: Same.
4161 * testsuite/gcc.dg/graphite/block-0.c: Same.
4162 * testsuite/gcc.dg/graphite/scop-16.c: Same.
4163 * testsuite/gcc.dg/graphite/block-1.c: Same.
4164 * testsuite/gcc.dg/graphite/scop-17.c: Same.
4165 * testsuite/gcc.dg/graphite/scop-18.c: Same.
4166 * testsuite/gfortran.dg/graphite/block-1.f90: Same.
4167 * testsuite/gfortran.dg/graphite/scop-1.f: Same.
4168 * testsuite/gfortran.dg/graphite/block-2.f: Same.
4170 2008-08-20 Sebastian Pop <sebastian.pop@amd.com>
4172 * graphite.c: Fix some XXX comments.
4173 (build_scop_dynamic_schedules): Removed.
4175 2008-08-20 Sebastian Pop <sebastian.pop@amd.com>
4177 * graphite.h (scop_max_loop_depth): Moved...
4178 * graphite.c (scop_max_loop_depth): ...here.
4179 (remove_all_edges_1): New.
4180 (remove_all_edges): Factored code.
4181 (remove_cond_exprs): Check only the last statement for
4182 a GIMPLE_COND expression.
4184 2008-08-20 Sebastian Pop <sebastian.pop@amd.com>
4186 * graphite.c (scan_tree_for_params): Early return when the
4187 expression is a chrec_dont_know. Handle case NEGATE_EXPR.
4188 (find_scop_parameters): Factor out code.
4189 (graphite_trans_bb_strip_mine): Remove dead code.
4191 2008-08-20 Sebastian Pop <sebastian.pop@amd.com>
4193 * graphite.c (clast_to_gcc_expression, graphite_create_new_loop,
4194 graphite_trans_bb_move_loop): Factor asserts.
4195 (gloog): Perform sanity checks only for ENABLE_CHECKING.
4196 Do not call calculate_dominance_info and estimate_bb_frequencies.
4198 2008-08-20 Jan Sjodin <jan.sjodin@amd.com>
4200 * graphite.c (create_loops_mapping, free_loops_mapping,
4201 create_loops_mapping_num, debug_loop_mapping_1,
4202 debug_loop_mapping, graphite_loops_mapping_max_loop_num,
4203 get_loop_mapping_for_num, graphite_loops_mapping_add_child,
4204 graphite_loops_mapping_add_child_num,
4205 graphite_loops_mapping_insert_child,
4206 graphite_loops_mapping_parent, get_loop_mapped_depth_for_num,
4207 get_loop_mapped_depth, split_loop_mapped_depth_for_num,
4208 loop_mapped_depth_split_loop, swap_loop_mapped_depth_for_num,
4209 create_num_from_index, get_num_from_index,
4210 swap_loop_mapped_depth): Removed.
4211 (new_scop): Do not initialize SCOP_LOOPS_MAPPING.
4212 (free_scop): Do not call free_loops_mapping.
4213 (graphite_get_new_iv_stack_index_from_old_iv): Renamed
4214 get_stack_index_from_iv. Use GBB_LOOPS instead of calling
4215 get_loop_mapped_depth.
4216 (graphite_trans_bb_move_loop): Do not update the loop mapping.
4217 (graphite_trans_bb_strip_mine): Same.
4218 * graphite.h (graphite_loops_mapping, graphite_loop_node): Removed.
4219 (struct scop): Remove field loops_mapping.
4221 2008-08-20 Sebastian Pop <sebastian.pop@amd.com>
4222 Dwarakanath Rajagopal <dwarak.rajagopal@amd.com>
4224 * graphite.c (scop_record_loop): Factor out one level of the
4225 condition by early return.
4226 (build_scop_loop_nests): Format following FSF coding style.
4227 (build_scop_dynamic_schedules): Factor out code.
4228 (scopdet_bb_info): Reindent. Default case should not be reachable.
4230 2008-08-20 Sebastian Pop <sebastian.pop@amd.com>
4231 Dwarakanath Rajagopal <dwarak.rajagopal@amd.com>
4233 * graphite.c (loop_affine_expr): Check for DECL_P or struct
4234 assignments that are not handled as simple operands for now.
4236 2008-08-20 Sebastian Pop <sebastian.pop@amd.com>
4237 Dwarakanath Rajagopal <dwarak.rajagopal@amd.com>
4239 * graphite.c (build_scop_bbs): Factor up code.
4241 2008-08-20 Sebastian Pop <sebastian.pop@amd.com>
4242 Dwarakanath Rajagopal <dwarak.rajagopal@amd.com>
4244 * graphite.c (stmt_simple_for_scop_p): Factor code out
4246 (enum gbb_type): New. Group all the GBB_* types under it.
4247 (is_loop_exit): Moved...
4248 (end_scop): Enable BB spliting.
4249 * cfgloop.c (is_loop_exit): ...here. Reimplemented.
4250 * cfgloop.h (is_loop_exit): Declared.
4252 2008-08-20 Sebastian Pop <sebastian.pop@amd.com>
4254 * doc/invoke.texi: Remove strides from examples containing
4255 DO loops when the strides are equal to 1.
4257 2008-08-20 Harsha Jagasia <harsha.jagasia@amd.com>
4258 Dwarakanath Rajagopal <dwarak.rajagopal@amd.com>
4260 * graphite.c (graphite_trans_scop_block): Or the result with
4261 the result from graphite_trans_loop_block.
4262 * testsuite/gcc.dg/graphite/block-1.c: New.
4263 * testsuite/gfortran.dg/graphite/block-1.f90: New.
4264 * testsuite/gfortran.dg/graphite/block-2.f: New.
4266 2008-08-20 Sebastian Pop <sebastian.pop@amd.com>
4268 * graphite.c (graphite_transform_loops): Call cloog_initialize
4271 2008-08-20 Sebastian Pop <sebastian.pop@amd.com>
4273 * tree-data-ref.c) (stmt_simple_memref_p): New.
4274 * tree-data-ref.h (stmt_simple_memref_p): Declared.
4275 * graphite.c (stmt_simple_memref_for_scop_p): Removed.
4276 (is_simple_operand): Call stmt_simple_memref_p.
4278 * testsuite/gcc.dg/graphite/scop-matmult.c: Updated for not
4279 using pointer arithmetic, as this is optimized by PRE and
4280 makes the code too difficult to analyze.
4282 * testsuite/gcc.dg/graphite/scop-18.c: Same.
4284 2008-08-20 Sebastian Pop <sebastian.pop@amd.com>
4286 * gdbinit.in (pgg): New.
4288 2008-08-15 Tobias Grosser <grosser@fim.uni-passau.de>
4290 * graphite.c (graphite_trans_loop_block): Fix warning.
4292 2008-08-15 Tobias Grosser <grosser@fim.uni-passau.de>
4294 * graphite.c (graphite_trans_loop_block): Fix my merge error.
4296 2008-08-15 Tobias Grosser <grosser@fim.uni-passau.de>
4298 * graphite.c (graphite_trans_bb_block): Remove check for
4299 flag_loop_strip_mine, flag_loop_block, flag_loop_interchange.
4300 Check if loop blocking is profitable for every loop, before applying
4302 (graphite_apply_transformations): Call graphite_trans_bb_block only,
4303 if flag_loop_block is set.
4305 2008-08-14 Sebastian Pop <sebastian.pop@amd.com>
4307 * graphite.c: Add some more documentation for the loop
4310 2008-08-14 Sebastian Pop <sebastian.pop@amd.com>
4312 * Makefile.in (tree-data-ref.o): Remove dependence on graphite.h.
4313 * graphite.c: Format on less than 80 columns.
4316 2008-08-14 Sebastian Pop <sebastian.pop@amd.com>
4318 * cfgloopmanip.c (loopify): Use update_dominators_in_loop.
4320 2008-08-14 Sebastian Pop <sebastian.pop@amd.com>
4322 * doc/invoke.texi (floop-block, floop-strip-mine,
4323 floop-interchange): Update documentation with examples.
4325 2008-08-13 Sebastian Pop <sebastian.pop@amd.com>
4327 * cfgloopmanip.c (create_empty_loop_on_edge): Don't call
4329 * graphite.c (graphite_create_new_loop): Call add_referenced_var.
4331 2008-08-13 Sebastian Pop <sebastian.pop@amd.com>
4333 * cfgloopmanip.c (create_empty_loop_on_edge): Improve documentation.
4334 Factor gcc_asserts into a single one. Use force_gimple_operand_gsi.
4335 * tree-scalar-evolution.c: Revert useless changes.
4336 * tree-phinodes.c: Same.
4339 * tree-vectorizer.h: Same.
4340 * tree-flow.h: Same.
4342 * common.opt (fgraphite): Update documentation.
4344 2008-08-12 Harsha Jagasia <harsha.jagasia@amd.com>
4346 * doc/invoke.texi (-floop-block, -floop-strip-mine,
4347 -floop-interchange): Add more text for explaining what each of these
4349 * tree-into-ssa.c (gimple_vec): Moved to...
4350 * graphite.c: Include gimple.h.
4351 (gimple_vec): Moved to...
4352 (del_loop_to_cloog_loop): Removed.
4353 (loop_affine_expr): Do not call create_data_ref when the
4354 operand is a constant.
4355 (new_scop): Use free instead of del_loop_to_cloog_loop.
4356 * Makefile.in (graphite.o): Depend on GIMPLE_H.
4357 * gimple.h (gimple_vec): ... here.
4359 2008-08-11 Tobias Grosser <grosser@fim.uni-passau.de>
4361 * graphite.c (scopdet_bb_info): Only allow loops with known number of
4363 (build_loop_iteration_domains): Fail, if latch executions unknown.
4365 2008-08-11 Tobias Grosser <grosser@fim.uni-passau.de>
4367 * graphite.c (add_conditions_to_domain): New.
4368 (build_scop_conditions_1): Call add_conditions_to_domain.
4369 (set_cloog_options): Allow to disable optimizations.
4371 2008-08-11 Tobias Grosser <grosser@fim.uni-passau.de>
4373 * graphite.c (find_params_in_bb): Look for parameters in conditions.
4374 Do not use walk_dominator_tree.
4375 (find_scop_parameters): Do not use walk_dominator_tree.
4377 2008-08-11 Tobias Grosser <grosser@fim.uni-passau.de>
4379 * graphite.c (scan_tree_for_params) Add / Subtract inequality.
4380 (idx_record_params): Adapt.
4381 * graphite.h (scop_gimple_loop_depth): New.
4383 2008-08-11 Tobias Grosser <grosser@fim.uni-passau.de>
4385 * graphite.c (build_scop_dynamic_schedules): Remove value_init.
4386 (scan_tree_for_params): Remove value_init.
4387 (build_scop_context): Remove value_init.
4388 (build_loop_iteration_domains): Remove value_init.
4389 (schedule_to_scattering): Remove value_init.
4390 (graphite_trans_bb_strip_mine): Remove value_init.
4392 2008-08-11 Tobias Grosser <grosser@fim.uni-passau.de>
4394 * gcc/graphite.c (limit_scops): New.
4395 (graphite_transform_loops): Add limit SCoPs.
4396 * gcc/testsuite/gcc.dg/graphite/scop-0.c: Update number of SCoPs.
4397 * gcc/testsuite/gcc.dg/graphite/scop-1.c: Update number of SCoPs.
4398 * gcc/testsuite/gcc.dg/graphite/scop-10.c: Update number of SCoPs.
4399 * gcc/testsuite/gcc.dg/graphite/scop-11.c: Update number of SCoPs.
4400 * gcc/testsuite/gcc.dg/graphite/scop-12.c: Update number of SCoPs.
4401 * gcc/testsuite/gcc.dg/graphite/scop-13.c: Update number of SCoPs.
4402 * gcc/testsuite/gcc.dg/graphite/scop-14.c: Update number of SCoPs.
4403 * gcc/testsuite/gcc.dg/graphite/scop-15.c: Update number of SCoPs.
4404 * gcc/testsuite/gcc.dg/graphite/scop-16.c: Update number of SCoPs.
4405 Change loop numbers.
4406 * gcc/testsuite/gcc.dg/graphite/scop-17.c: Update number of SCoPs.
4407 Change loop numbers.
4408 * gcc/testsuite/gcc.dg/graphite/scop-18.c: Update number of SCoPs.
4409 * gcc/testsuite/gcc.dg/graphite/scop-2.c: Update number of SCoPs.
4410 * gcc/testsuite/gcc.dg/graphite/scop-3.c: Update number of SCoPs.
4411 * gcc/testsuite/gcc.dg/graphite/scop-4.c: Update number of SCoPs.
4412 * gcc/testsuite/gcc.dg/graphite/scop-5.c: Update number of SCoPs.
4413 * gcc/testsuite/gcc.dg/graphite/scop-6.c: Update number of SCoPs.
4414 * gcc/testsuite/gcc.dg/graphite/scop-7.c: Update number of SCoPs.
4415 * gcc/testsuite/gcc.dg/graphite/scop-8.c: Update number of SCoPs.
4416 * gcc/testsuite/gcc.dg/graphite/scop-9.c: Update number of SCoPs.
4417 * gcc/testsuite/gcc.dg/graphite/scop-matmult.c: Update number of SCoPs.
4419 2008-08-11 Tobias Grosser <grosser@fim.uni-passau.de>
4421 * graphite.c (graphite_transform_loops): Call always find_transform.
4423 2008-08-08 Tobias Grosser <grosser@fim.uni-passau.de>
4425 * graphite.c (free_loops_mapping): New.
4426 (stmt_simple_for_scop_p): Fix typo.
4427 (stmt_simple_for_scop_p): Fix tuples functions, that
4429 (free_graphite_bb): Fix some memleaks.
4430 (free_scop): Fix some memleaks.
4431 (scopdet_bb_info): Do not forget some tmp SCoPs.
4432 (find_params_in_bb): Fix some memleaks.
4433 (clast_to_gcc_expression): Fix warning.
4435 2008-08-07 Tobias Grosser <grosser@fim.uni-passau.de>
4437 * testsuite/gcc.dg/graphite/scop-16.c: Fix for 32bit.
4438 * testsuite/gcc.dg/graphite/scop-17.c: Fix for 32bit.
4440 2008-08-04 Sebastian Pop <sebastian.pop@amd.com>
4442 * tree-ssa-loop.c (tree-ssa-loop.o): Do not include toplev.h.
4443 Move code ifdef-ed HAVE_cloog...
4444 * graphite.c: Include toplev.h.
4446 * Makefile.in (OBJS-common): Always build graphite.o.
4447 (BACKEND): Remove @GRAPHITE@.
4448 (tree-ssa-loop.o): Do not depend on TOPLEV_H.
4449 (graphite.o): Depend on TOPLEV_H.
4451 2008-08-04 Sebastian Pop <sebastian.pop@amd.com>
4453 * Makefile.in (tree-ssa-loop.o): Depend on TOPLEV_H.
4454 Remove typo left from polylib to ppl conversion.
4455 * graphite.c (graphite_transforms): Use sorry instead of fatal.
4457 2008-08-03 Sebastian Pop <sebastian.pop@amd.com>
4459 * toplev.c (process_options): Move the graphite loop optimization
4461 * tree-ssa-loop.c (graphite_transforms): ... here.
4462 When not configured with CLooG, print to dump_file that
4463 Graphite transforms were not performed.
4464 * testsuite/gcc.dg/graphite/graphite.exp (scan-graphite-dump-times):
4466 * testsuite/gcc.dg/graphite/*.c: Updated all testcases to use
4467 scan-graphite-dump-times.
4469 2008-08-03 Sebastian Pop <sebastian.pop@amd.com>
4471 * graphite.c (dot_scop, dot_all_scops): Do not call system.
4472 Do not open /tmp/scop.dot and /tmp/allscops.dot.
4474 2008-08-02 Sebastian Pop <sebastian.pop@amd.com>
4475 Jan Sjodin <jan.sjodin@amd.com>
4477 * configure: Regenerated.
4478 * omp-low.c (expand_omp_sections): Remove now unused code.
4479 * config.in (HAVE_polylib): Removed.
4480 * configure.ac (HAVE_polylib, POLYLIBLIBS, POLYLIBINC): Removed.
4481 (PPLLIBS, PPLINC): Added.
4482 * graphite.c: Replace unsigned with int wherever possible.
4483 Don't access Cloog's data structures, but use accessor functions.
4484 Clast's stmt->type is now implemented as a vtable: change the
4485 switches of stmt->type into ifs.
4486 (polylib/polylibgmp.h): Don't include.
4487 (initialize_dependence_polyhedron,
4488 initialize_data_dependence_polyhedron, is_empty_polyhedron,
4489 statement_precedes_p, test_dependence, build_rdg_all_levels,
4490 dump_dependence_graph): Removed until this code is cleaned up
4492 * Makefile.in (POLYLIBLIBS): Renamed PPLLIBS.
4493 (POLYLIBINC): Renamed PPLINC.
4495 2008-08-01 Harsha Jagasia <harsha.jagasia@amd.com>
4496 Dwarakanath Rajagopal <dwarak.rajagopal@amd.com>
4497 Jan Sjodin <jan.sjodin@amd.com>
4499 Finish the merge and tuplification of graphite.
4501 2008-07-24 Sebastian Pop <sebastian.pop@amd.com>
4502 Jan Sjodin <jan.sjodin@amd.com>
4504 Partial merge from mainline (138072:138275).
4505 * graphite.c still has to be tuplified.
4507 2008-07-29 Jan Sjodin <jan.sjodin@amd.com>
4509 * graphite.c (graphite_loops_mapping_max_loop_num): New.
4510 (create_num_from_index): New.
4511 (get_num_from_index): Also pass in the graphite BB.
4512 (free_graphite_bb): Free GBB_INDEX_TO_NUM_MAP.
4513 (build_graphite_bb): Initialize GBB_INDEX_TO_NUM_MAP.
4514 (graphite_trans_bb_strip_mine): Call create_num_from_index.
4515 (is_interchange_valid): Return false when failing.
4516 * graphite.h (struct num_map): New.
4517 (struct graphite_bb): New field num_map.
4518 (GBB_LOOPS_MAPPING): Renamed GBB_INDEX_TO_NUM_MAP.
4520 2008-07-29 Tobias Grosser <grosser@fim.uni-passau.de>
4522 * graphite.c (dump_gbb_conditions): Print also conditions like
4523 "if (a)". Remove dublicated code and use print_generic_expr ().
4524 (stmt_simple_for_scop_p): Only allow conditions we can handle
4527 2008-07-25 Jan Sjodin <jan.sjodin@amd.com>
4529 * graphite.h (struct scop): Removed new_ivs field.
4530 (SCOP_NEWIVS): Deleted.
4531 * graphite.c (new_scop, free_scop, clast_name_to_gcc,
4532 clast_to_gcc_expression, graphite_create_new_loop):
4533 Removed use of new_ivs.
4535 2008-07-25 Jan Sjodin <jan.sjodin@amd.com>
4537 * graphite.c (debug_oldivs, debug_loop_vec, create_loops_mapping,
4538 create_loops_mapping_num, debug_loop_mapping_1): New.
4539 (debug_loop_mapping): Call debug_loop_mapping_1.
4540 (get_loop_mapping_for_num,
4541 graphite_loops_mapping_add_child,
4542 graphite_loops_mapping_add_child_num,
4543 graphite_loops_mapping_insert_child,
4544 graphite_loops_mapping_parent,
4545 split_loop_mapped_depth_for_num,
4546 loop_mapped_depth_split_loop): New.
4547 (increment_loop_mapped_depths): Removed.
4548 (swap_loop_mapped_depth_for_num): Reimplemented.
4549 (new_scop): Call create_loops_mapping.
4550 (scop_record_loop): Call graphite_loops_mapping_insert_child.
4551 (translate_clast): Pass the old loop father in parameter, and pass
4552 it to get_old_iv_from_ssa_name.
4553 (remove_edges_around_useless_blocks, can_generate_code_stmt,
4554 can_generate_code, can_generate_for_scop): New.
4555 (graphite_trans_bb_block): Returns false when it fails to transform.
4556 * graphite.h (graphite_loop_node, graphite_loops_mapping): New.
4558 2008-07-25 Sebastian Pop <sebastian.pop@amd.com>
4560 Reverted all the changes related to the streamization and
4562 These changes are now tracked in the streamization branch.
4564 2008-07-25 Sebastian Pop <sebastian.pop@amd.com>
4565 Jan Sjodin <jan.sjodin@amd.com>
4567 * graphite.c (gbb_compare): Correctly constify.
4568 (gbb_can_be_ignored): Indent.
4569 (graphite_trans_scop_swap_1and2): Add legality check.
4572 2008-07-25 Sebastian Pop <sebastian.pop@amd.com>
4574 Remove fallouts from "Reverted the Condate changes".
4575 * tree.h: Remove unused decl.
4576 * testsuite/gcc.dg/tree-checker: Same.
4577 * timevar.def: Remove counter.
4579 2008-07-24 Sebastian Pop <sebastian.pop@amd.com>
4581 * Merge from mainline (135673:138072).
4583 Reverted the MIRO changes (from 2008-04-05) that are now
4584 tracked in the miro branch.
4585 * tree-bounds.c: Removed.
4586 * tree-bounds.h: Removed.
4588 Reverted the Condate changes (from 2006-07-04, 2007-03-20) that
4589 are now tracked in the condate branch.
4590 * tree-check.c: Removed.
4591 * tree-match.c: Removed.
4592 * condate.y: Removed.
4594 2008-07-24 Dwarakanath Rajagopal <dwarak.rajagopal@amd.com>
4596 * common.opt: New user flag -floop-block, -floop-strip-mine
4597 and -floop-interchange.
4598 * toplev.c (process_options): Enable -fgraphite pass if any one of the
4599 graphite loop optimization flags is turned on.
4600 * graphite.c (graphite_apply_transformations): Add flag_loop_block,
4601 flag_loop_strip_mine and flag_loop_interchange checks before
4603 * doc/invoke.texi: Remove -fgraphite and add -floop-block,
4604 -floop-strip-mine and -floop-interchange.
4605 * testsuite/gcc.dg/graphite/block-0.c: Add -floop-block and remove
4607 * testsuite/gcc.dg/graphite/scop-16.c: Ditto.
4608 * testsuite/gcc.dg/graphite/scop-17.c: Ditto.
4609 * testsuite/gcc.dg/graphite/scop-18.c: Ditto.
4611 2008-07-23 Jan Sjodin <jan.sjodin@amd.com>
4612 Sebastian Pop <sebastian.pop@amd.com>
4614 * cfgloopmanip.c (update_dominators_in_loop): Make it static.
4615 (create_empty_loop_on_edge): More fixes.
4616 * tree-phinodes.c (resize_phi_node): Extern.
4617 (unlink_phi_node, move_phi_node): New split from remove_phi_node.
4618 * cfghooks.c (update_dominator_information): New split from
4620 * tree-vectorizer.c (rename_variables_in_bb): Extern.
4621 * tree-dfa.c (collect_dfa_stats): Start walking the CFG on the
4622 successor of the function entry block.
4624 * graphite.c: Include pointer-set.h.
4625 (debug_loop_mapping, increment_loop_mapped_depths,
4626 get_loop_mapped_depth_for_num, get_loop_mapped_depth,
4627 set_loop_mapped_depth_for_num, set_loop_mapped_depth,
4628 swap_loop_mapped_depth_for_num, get_num_from_index,
4629 swap_loop_mapped_depth, loop_iv_stack_debug,
4630 loop_iv_stack_push, loop_iv_stack_pop, loop_iv_stack_get_iv,
4631 loop_iv_stack_get_iv_from_name, loop_iv_stack_debug,
4632 get_old_iv_from_ssa_name): New.
4633 (new_scop): Initialize SCOP_LOOPS_MAPPING.
4634 (free_scop): Free SCOP_LOOPS_MAPPING.
4635 (scop_record_loop): Record old ivs.
4636 (create_var_name): Removed.
4637 (initialize_cloog_names): Allocate double space in case strip mine
4638 applies to all loops once.
4639 (clast_name_to_gcc): Look up in the map ivstack passed in parameter.
4640 (clast_to_gcc_expression): Same. Implement more clast to gimple
4642 (graphite_create_new_loop): Pass in ivstack.
4643 (remove_all_edges): Pass in the construction_edge.
4644 (graphite_remove_iv): Removed.
4645 (graphite_rename_ivs, graphite_rename_ivs_stmt,
4646 remove_cond_exprs): Rewritten.
4647 (move_phi_nodes): New.
4648 (disconnect_virtual_phi_nodes, disconnect_cond_expr): Removed.
4649 (translate_clast): Pass in ivstack. Rewrite some cases.
4650 (set_cloog_options, debug_clast_stmt): New.
4651 (find_transform): Use set_cloog_options.
4652 (outermost_loop_layer): Removed.
4653 (get_construction_edge, collect_virtual_phis, find_vdef_for_var_in_bb,
4654 find_vdef_for_var_1, find_vdef_for_var, patch_phis_for_virtual_defs,
4655 mark_old_loops, remove_dead_loops): New.
4657 (graphite_trans_bb_move_loop): Call swap_loop_mapped_depth.
4658 (const_column_index, get_first_matching_sign_row_index,
4659 get_lower_bound_row, get_upper_bound_row, get_lower_bound,
4660 get_upper_bound): New.
4661 (graphite_trans_bb_strip_mine): Also update the iv map.
4663 * graphite.h (graphite_loops_mapping, GBB_LOOPS_MAPPING): New.
4664 (struct name_tree): Add a loop field.
4665 (struct scop): Add a graphite_loops_mapping field.
4666 (SCOP_LOOPS_MAPPING): New.
4667 (debug_clast_stmt): Declare.
4668 * lambda.h (find_induction_var_from_exit_cond): Declare.
4669 (lambda-code.c): (find_induction_var_from_exit_cond): Extern.
4670 * cfgloop.h (update_dominators_in_loop): Removed declaration.
4671 (create_empty_loop_on_edge): Updated.
4672 * tree-flow.h (remove_bb, resize_phi_node, move_phi_node,
4673 rename_variables_in_bb): Declare.
4674 * tree-cfg.c (remove_bb): Extern.
4676 * testsuite/gcc.dg/graphite/block-0.c: New.
4678 2008-07-21 Dwarakanath Rajagopal <dwarak.rajagopal@amd.com>
4679 Sebastian Pop <sebastian.pop@amd.com>
4681 * graphite.c (strip_mine_profitable_p): New.
4682 (graphite_trans_bb_block): Disable strip mining if not profitable.
4684 * testsuite/gcc.dg/graphite/scop-18.c: New.
4685 * testsuite/gcc.dg/graphite/scop-17.c: Fixed.
4686 * testsuite/gcc.dg/graphite/scop-16.c: Fixed.
4688 2008-07-17 Harsha Jagasia <harsha.jagasia@amd.com>
4689 Jan Sjodin <jan.sjodin@amd.com>
4690 Sebastian Pop <sebastian.pop@amd.com>
4692 * graphite.c (is_interchange_valid): New.
4693 (graphite_trans_bb_block): Check loop nest of basic block for legality
4696 * graphite.h (gbb_inner_most_loop_index, outer_most_loop_1,
4697 outer_most_loop, gbb_outer_most_loop_index): New.
4699 * tree-loop-linear.c (perfect_loop_nest_depth): Remove static.
4700 * tree-flow.h (perfect_loop_nest_depth): Declare as extern.
4701 * testsuite/gcc.dg/graphite/scop-16.c: New.
4702 * testsuite/gcc.dg/graphite/scop-17.c: New.
4704 2008-07-11 Tobias Grosser <grosser@fim.uni-passau.de>
4706 * graphite.c (scop_remove_ignoreable_gbbs): Also update bitmap.
4707 (graphite_trans_scop_block): Ignore SCoPs without bbs.
4709 2008-07-11 Tobias Grosser <grosser@fim.uni-passau.de>
4711 * graphite.c (new_scop): Initialize SCOP_EXIT.
4712 (scopdet_info): Add.
4713 (scopdet_bb_info): Rename from is_bb_addable. Cleanup, bugfixes.
4714 (build_scops_1): Cleanup, bugfixes.
4715 (build_scops): Cleanup.
4717 * testsuite/gcc.dg/graphite/scop-matmult.c: Remove duplicated code.
4718 * testsuite/gcc.dg/graphite/scop-15.c: Add SCoP numbers.
4720 2008-07-10 Harsha Jagasia <harsha.jagasia@amd.com>
4722 * testsuite/gfortran.dg/graphite/scop-1.f: Update to reduced test case.
4724 * testsuite/gfortran.dg/graphite/graphite.exp: Use
4725 DEFAULT_GRAPHITE_FLAGS.
4727 * testsuite/gcc.dg/graphite/scop-15.c: Update to reduced test case.
4729 2008-07-10 Harsha Jagasia <harsha.jagasia@amd.com>
4731 * graphite.c (scan_tree_for_params): Do not assert any more if
4732 MULT_EXPR parameter is negative.
4734 * testsuite/gfortran.dg/graphite/scop-1.f: New.
4736 * testsuite/gfortran.dg/graphite/graphite.exp: New.
4738 * testsuite/gcc.dg/graphite/scop-15.c: New.
4740 2008-07-10 Harsha Jagasia <harsha.jagasia@amd.com>
4742 * graphite.c (is_bb_addable): Fix segfault in spec gzip and reformat.
4744 2008-07-10 Tobias Grosser <grosser@fim.uni-passau.de>
4746 * graphite.c (graphite_trans_bb_swap_loops): Rename from
4747 graphite_swap_loops.
4748 (graphite_trans_bb_move_loop): New.
4749 (graphite_trans_bb_strip_mine): Rename from graphite_strip_mine_loop.
4750 (graphite_trans_bb_block): New.
4751 (graphite_trans_loop_block): New.
4752 (graphite_trans_scop_swap_1and2): Rename from
4753 graphite_trans_swap_1and2.
4754 (graphite_trans_scop_strip): Rename from graphite_trans_strip.
4755 (graphite_trans_scop_block): New.
4756 (graphite_apply_transformations): Rename from
4757 graphite_transformations.
4759 * testsuite/gcc.dg/graphite/scop-matmult.c: New.
4761 2008-07-10 Tobias Grosser <grosser@fim.uni-passau.de>
4763 * graphite.c (gbb_compare): New.
4764 (graphite_sort_gbbs): New.
4765 (gbb_can_be_ignored): New.
4766 (scop_remove_ignoreable_gbbs): New.
4767 (graphite_transformations): Cleanup and add
4768 scop_remove_ignoreable_gbbs.
4769 * lambda.h (lambda_vector_compare): New.
4771 2008-07-09 Tobias Grosser <grosser@fim.uni-passau.de>
4773 * graphite.c (print_graphite_bb): Correct printing of static schedule.
4774 (graphite_swap_loops): int -> unsigned
4775 (graphite_strip_mine_loop): int -> unsigned, Fix SCHEDULE
4776 (graphite_transformations): New.
4777 (graphite_transform_loops): Move to graphite_transformations.
4778 * graphite.h (gbb_nb_loops): Return unsigned.
4780 2008-07-04 Tobias Grosser <grosser@fim.uni-passau.de>
4782 * graphite.c (scan_tree_for_params): Fix insertion of parameters into
4783 the domain matrix. This makes scop-0.c work again.
4785 2008-06-20 Richard Guenther <rguenther@suse.de>
4787 * graphite.h: Adjust copyright to GPLv3.
4788 * graphite.c: Likewise.
4789 (stmt_simple_memref_for_scop_p): Split out from ...
4790 (stmt_simple_for_scop_p): ... here. Fix handling of calls
4792 (get_bb_type): Optimize.
4794 (is_bb_addable): Fix memleak, replace is_pred call with
4796 (build_scops): Use current_loops.
4797 (param_index): Fix memleak.
4799 2008-06-20 Konrad Trifunovic <konrad.trifunovic@inria.fr>
4801 * graphite.c: Fix formatting.
4803 2008-06-19 Konrad Trifunovic <konrad.trifunovic@inria.fr>
4805 * graphite.c (new_scop): Memory allocation for SCOP_{NEWIVS, OLDIVS}.
4806 (free_scop): Memory deallocation for SCOP_NEWIVS, SCOP_OLDIVS.
4807 (create_var_name, save_var_name): Newly defined functions.
4808 (initialize_cloog_names): Part of the code factored out to
4810 (clast_to_gcc_expression): Now handles the case of clast_red_sum
4811 in clast_reduction statement.
4812 (graphite_create_new_loop): Now takes a new parameter
4814 (translate_clast): Now also takes the context_loop and bb_exit
4815 parameters. Rewritten the code so that it creates a gimple code
4816 inside the given context.
4817 (outermost_loop_layer, graphite_remove_iv, graphite_rename_ivs,
4818 remove_cond_expr, disconnect_cond_expr,
4819 disconnect_virtual_phi_nodes): Newly defined functions.
4820 * graphite.h (struct scop): added old_ivs vector.
4821 SCOP_OLDIVS: New macro.
4823 2008-06-19 Sebastian Pop <sebastian.pop@amd.com>
4825 * cfgloopmanip.c: Add missing function comments, fix formatting.
4827 2008-06-18 Konrad Trifunovic <konrad.trifunovic@inria.fr>
4829 * cfgloopmanip.c (update_dominators_in_loop): Defined.
4830 (create_empty_loop_on_edge): Defined.
4831 * tree-parloops.c (canonicalize_loop_ivs): Returns tree
4833 * cfgloop.h (create_empty_loop_on_edge): Declared as extern.
4834 (update_dominators_in_loop): Declared as extern
4835 * tree-flow.h (canonicalize_loop_ivs): Declared as extern.
4837 2008-06-16 Tobias Grosser <grosser@fim.uni-passau.de>
4839 * graphite.c (print_graphite_bb): Allow changing number of loops
4841 (initialize_cloog_names): Allow changing number of loops.
4842 (build_cloog_prog): Simplify.
4843 (find_transform): Enable cloog option --strides.
4844 (graphite_swap_loops): New.
4845 (graphite_strip_mine_loop): New.
4846 (graphite_trans_swap_1and2): New.
4847 (graphite_trans_strip): New.
4848 (graphite_transform_loops): Add graphite_trans_strip.
4849 * graphite.h (scop_max_loop_depth): New.
4851 2008-06-15 Tobias Grosser <grosser@fim.uni-passau.de>
4853 * graphite.c (build_scop_iteration_domain): Remove forgotten
4854 line. (Fixes compile)
4856 2008-06-15 Tobias Grosser <grosser@fim.uni-passau.de>
4858 * graphite.c (print_graphite_bb): Add output of GBB_LOOPS.
4859 (build_graphite_bb): Add GBB_LOOPS and GBB_DOMAIN and reorder.
4860 (build_bb_loops): New.
4861 (graphite_transform_loops): Add build_bb_loops.
4862 (schedule_to_scattering): Use gbb_nb_loops to support changing loop
4864 * graphite.h (graphite_bb): Add loops.
4865 (gbb_nb_loops): New.
4866 (gbb_loop_at_index): New.
4867 (gbb_loop_index): New.
4868 (nb_params_in_scop): Renamed to scop_nb_params. Updated all functions
4869 using nb_params_in_scop.
4871 2008-06-14 Tobias Grosser <grosser@fim.uni-passau.de>
4873 * graphite.c (print_graphite_bb): Adapt to minimized schedule.
4874 (build_scop_canonical_schedules): Build minimized schedule.
4875 (schedule_to_scattering): Adapt to minimized schedule.
4876 * graphite.h (graphite_bb): Add/Update descriptions.
4878 2008-06-14 Adrien Eliche <aeliche@isty.uvsq.fr>
4879 Tobias Grosser <grosser@fim.uni-passau.de>
4881 * graphite.c (print_graphite_bb): Add condition printing.
4883 (dump_gbb_conditions): New.
4884 (build_scop_conditions_1): New.
4885 (build_scop_conditions): New.
4886 * graphite.h (graphite_bb): Add conditions.
4888 2008-06-14 Tobias Grosser <grosser@fim.uni-passau.de>
4890 * graphite.c (print_graphite_bb):
4891 (free_graphite_bb): New.
4892 (free_scop): Free bbs.
4893 (get_bb_type): Free doms.
4894 (build_scop_context): Free context matrix.
4895 (build_loop_iteration_domains): Remove unused code.
4896 (build_cloog_prog): Free scattering function and blocklist.
4897 (find_transform): Free options.
4899 2008-06-13 Tobias Grosser <grosser@fim.uni-passau.de>
4901 * graphite.c (loop_body_to_cloog_stmts): Rename to add_bb_domains.
4902 Remove unnecessery cloog data structures. Make a copy of the domain
4903 (setup_cloog_loop): Rename to build_loop_iteration_domains. Remove
4904 unnecessary cloog data structures. Fix memory leaks. Remove insert
4905 into SCOP_LOOP2CLOOG_LOOP as the inserted CloogLoops will never be
4907 (build_scop_iteration_domain): Remove unnecessary cloog
4908 data structures. Fix memory leaks.
4909 (graphite_transform_loops): Disable build_scop_dynamic_schedules as it
4910 uses SCOP_LOOP2CLOOG_LOOP, that is at the moment not working.
4912 2008-06-12 Tobias Grosser <grosser@fim.uni-passau.de>
4914 * graphite.c (find_scop_params): Remove initialize_cloog_names.
4916 2008-06-12 Tobias Grosser <grosser@fim.uni-passau.de>
4918 * graphite.c (end_scop): Style fix.
4919 (schedule_to_scattering): Style and comment fix.
4921 2008-06-12 Tobias Grosser <grosser@fim.uni-passau.de>
4922 * graphite.c (print_graphite_bb): Fix definiton of
4923 schedule_to_scattering.
4924 (initialize_cloog_names): Change nb_scattdims to max loop
4926 (schedule_to_scattering): Take parameter for number of scattering
4928 (build_cloog_prog): Only build as much scattering dimensions as
4931 2008-06-12 Tobias Grosser <grosser@fim.uni-passau.de>
4933 * graphite.c (end_scop): Disable bb splitting. Fixes SIGSEGV
4934 in polyhedron/aermod.f90.
4936 2008-06-11 Tobias Grosser <grosser@fim.uni-passau.de>
4937 Dwarak Rajagopal <dwarak.rajagopal@amd.com>
4938 Harsha Jagasia <harsha.jagasia@amd.com>
4940 * graphite.c (is_bb_addable): Fix segfault.
4942 2008-06-10 Tobias Grosser <grosser@fim.uni-passau.de>
4944 * graphite.c (is_bb_addable): Fix memory leak, handling of loops
4945 with multiple exits and conditional handling in edge cases.
4946 (is_loop_exit): Fix memory leak. (Forgotten in last commit)
4948 * testsuite/gcc.dg/graphite/scop-14.c: New.
4950 2008-06-06 Tobias Grosser <grosser@fim.uni-passau.de>
4951 Adrien Eliche <aeliche@isty.uvsq.fr>
4953 * graphite.c (is_bb_addable): Add more comments and enhance
4954 readablity of the source code. Fix memory leak.
4955 (is_loop_exit): Fix memory leak.
4957 2008-06-05 Tobias Grosser <grosser@fim.uni-passau.de>
4959 * graphite.c (first_loop_in_scop): Deleted.
4960 (setup_cloog_loop): Only walk the loop chain for inner loops.
4961 (build_scop_iteration_domain): Execute setup_cloog_loop for
4962 all loops in the first layer.
4964 2008-06-05 Tobias Grosser <grosser@fim.uni-passau.de>
4966 * graphite.c (scan_tree_for_params): Change the way params are
4967 added to be indepenent of the number of loops.
4968 (setup_cloog_loop): Revert to short matrix format. Fix parameter
4970 (build_cloog_prog): Revert to short matrix format.
4972 2008-06-05 Sebastian Pop <sebastian.pop@amd.com>
4973 Dwarak Rajagopal <dwarak.rajagopal@amd.com>
4975 * tree-loop-fusion.c (fuse_loops): Fix uninitialized variable
4978 2008-06-05 Sebastian Pop <sebastian.pop@amd.com>
4980 * graphite.c (nb_data_refs_in_scop): New.
4981 (graphite_transform_loops): Print more stats: number of
4982 loops, basic blocks and data references per scop.
4984 2008-06-04 Sebastian Pop <sebastian.pop@amd.com>
4985 Jan Sjodin <jan.sjodin@amd.com>
4987 * graphite.c (loop_affine_expr, idx_record_params,
4988 find_scop_parameters, setup_cloog_loop): Use instantiate_scev
4989 instead of instantiate_parameters.
4991 2008-06-04 Tobias Grosser <grosser@fim.uni-passau.de>
4993 * graphite.c (schedule_to_scattering): Fix scattering dimensions,
4994 add support for parameters, add STATIC_SCHEDULE at the right places,
4997 2008-06-04 Tobias Grosser <grosser@fim.uni-passau.de>
4999 * graphite.c (build_scop_loop_nests): Only add the loops, that
5000 are contained completely in the SCoP.
5001 (build_cloog_prog): Disable scattering, until schedule_to_scattering
5002 and the domains are fixed.
5003 (build_scop_canonical_schedules): Add support for bbs not contained
5006 2008-06-04 Tobias Grosser <grosser@fim.uni-passau.de>
5008 * graphite.h (scop_contains_loop): Update comments to match
5009 the actual behavior.
5010 (scop_contains_loop): New.
5011 * graphite.c (schedule_to_scattering): Use scop_contains_loop.
5013 2008-06-04 Sebastian Pop <sebastian.pop@amd.com>
5015 * graphite.c (get_bb_type): On function body, i.e. loop_0,
5016 don't mark blocks as GBB_LOOP_SING_EXIT_HEADER, mark them
5019 2008-06-04 Sebastian Pop <sebastian.pop@amd.com>
5020 Tobias Grosser <grosser@fim.uni-passau.de>
5022 * graphite.c (graphite_transform_loops): Early return when
5023 there are no loops in the function.
5025 2008-05-31 Sebastian Pop <sebastian.pop@amd.com>
5026 Jan Sjodin <jan.sjodin@amd.com>
5028 * graphite.c (scan_tree_for_params, setup_cloog_loop): Compute the
5029 offset of the last loop.
5030 (setup_cloog_loop): Copy the entire outer constraint matrix.
5032 2008-05-31 Sebastian Pop <sebastian.pop@amd.com>
5033 Jan Sjodin <jan.sjodin@amd.com>
5035 * graphite.c (stmt_in_scop_p, function_parameter_p,
5036 invariant_in_scop_p): Removed.
5037 (scan_tree_for_params): Can be used with no constraint
5038 matrix for gathering parameters.
5039 (idx_record_params): Don't use idx_record_param, instead use
5040 scan_tree_for_params.
5041 (find_scop_parameters): Same.
5042 (setup_cloog_loop, build_scop_iteration_domain, build_cloog_prog):
5043 Fix the size of loop domains.
5044 (schedule_to_scattering): Exit when the outer loop is not in scop.
5045 (find_transform): Enable build_cloog_prog.
5047 2008-05-31 Sebastian Pop <sebastian.pop@amd.com>
5048 Jan Sjodin <jan.sjodin@amd.com>
5050 * graphite.c (schedule_to_scattering): Make scattering domains
5051 uniformly of the same size, as required by CLooG 0.14.0 and before.
5053 2008-05-31 Sebastian Pop <sebastian.pop@amd.com>
5054 Jan Sjodin <jan.sjodin@amd.com>
5056 * graphite.c (schedule_to_scattering): Rewrite, correct the
5057 translation of the scheduling function to scattering.
5058 (build_cloog_prog): Call schedule_to_scattering only once.
5059 * graphite.h (scop_loop_index): Do not fail for loops not
5060 in the scop: return -1.
5062 2008-05-30 Tobias Grosser <grosser@fim.uni-passau.de>
5064 * graphite.c (build_graphite_bb): Initialize GBB_DOMAIN.
5065 (loop_body_to_cloog_stmts): Export GBB_DOMAIN.
5066 (setup_cloog_loop): Export GBB_DOMAIN.
5067 (build_cloog_prog): New. Create new CLOOG_PROG, which should be
5068 able to rebuild the original control flow.
5069 * graphite.h (graphite_bb): Add domain field and access macro.
5072 2008-05-30 Sebastian Pop <sebastian.pop@amd.com>
5074 * graphite.c (debug_gbb): New.
5075 (print_scop, build_graphite_bb): Use SCOP_BBS.
5076 (build_scop_bbs): Reimplemented.
5077 (dfs_bb_in_scop_p): Removed.
5078 (build_scop_loop_nests): Reorder loops inserted in
5079 SCOP_LOOP_NEST: outer loops should come first.
5080 (build_scop_canonical_schedules): Reinitialize at zero
5081 the components of the SCOP_STATIC_SCHEDULE for the loops
5082 that have already been parsed.
5084 * graphite.h (debug_gbb): Declared.
5086 2008-05-30 Sebastian Pop <sebastian.pop@amd.com>
5087 Jan Sjodin <jan.sjodin@amd.com>
5089 * graphite.c (create_empty_loop): Renamed graphite_create_new_loop.
5090 (graphite_loop_to_gcc_loop): Removed.
5091 (remove_all_edges): New.
5092 (graphite_stmt_to_gcc_stmt): Renamed translate_clast.
5093 (gloog): Remove useless code.
5095 2008-05-29 Tobias Grosser <grosser@fim.uni-passau.de>
5097 * graphite.c (get_bb_type): Reworked. We distinguish between
5098 loops with one or multiple exits.
5099 (is_loop_exit): New.
5101 (is_bb_addable): Rework condition handling, now support for case
5102 case statements and loops with multiple exits.
5104 * testsuite/gcc.dg/graphite/scop-11.c: New.
5105 * testsuite/gcc.dg/graphite/scop-12.c: New.
5106 * testsuite/gcc.dg/graphite/scop-13.c: New.
5108 2008-05-29 Tobias Grosser <grosser@fim.uni-passau.de>
5110 * graphite.c (dot_all_scops_1): Fix some colors. Reuse colors, if
5111 we have too many colors.
5113 2008-05-22 Sandeep Maram <smaram_b04@iiita.ac.in>
5115 * doc/invoke.texi (-ftree-loop-fusion): Document.
5116 * tree-pass.h (pass_loop_fusion): Declared.
5117 * tree-loop-fusion.c: New.
5118 * timevar.def (TV_TREE_LOOP_FUSION): Declared.
5119 * tree-data-ref.c (find_data_references_in_loop): Make extern.
5120 * tree-data-ref.h (find_data_references_in_loop): Declared.
5121 * common.opt (ftree-loop-fusion): Declared.
5122 * Makefile.in (tree-loop-fusion.o): Added rule and to OBJS-common.
5124 2008-05-21 Sebastian Pop <sebastian.pop@amd.com>
5126 * graphite.c (build_access_matrix): Fix typo from the merge.
5128 2008-05-20 Sebastian Pop <sebastian.pop@amd.com>
5130 * Merge from mainline (130800:135673).
5132 2008-05-07 Sebastian Pop <sebastian.pop@amd.com>
5134 * graphite.c (end_scop): The exit of the scop is not part of the scop.
5135 Update dominators after splitting.
5137 2008-05-07 Sebastian Pop <sebastian.pop@amd.com>
5139 * graphite.c (is_bb_addable): Return the harmful statement.
5140 Factor up some code.
5141 (end_scop): New. Splits end of scope bbs on a harmful statement.
5142 (build_scops_1): Call end_scop.
5144 2008-05-07 Sebastian Pop <sebastian.pop@amd.com>
5146 * graphite.c: (succs_at_same_depth, end_scop, all_preds_visited_p,
5147 all_succs_visited_p, start_new_scop_for_each_succ, start_new_scop,
5148 add_dominators_to_open_scops, stop_last_open_scop, scop_end_loop,
5149 build_scops_1): Removed.
5150 (build_scops_2): Renamed build_scops_1.
5152 2008-05-06 Sebastian Pop <sebastian.pop@amd.com>
5154 * graphite.c: Fix formatting.
5156 2008-05-06 Tobias Grosser <grosser@fim.uni-passau.de>
5158 * graphite.c (get_bb_type): New.
5160 (build_scops_2): New.
5161 (is_bb_addable): New.
5162 (build_scops): Switch the scop detection.
5163 (build_scop_bbs): Add entry bb to scop.
5164 * graphite.h (struct scop): Update comment.
5166 2008-05-06 Tobias Grosser <grosser@fim.uni-passau.de>
5168 * graphite.c (dot_all_scops_1): Fix some incorrect colors and add
5171 2008-05-06 Tobias Grosser <grosser@fim.uni-passau.de>
5173 * testsuite/gcc.dg/graphite/scop-1.c: Update.
5174 * testsuite/gcc.dg/graphite/scop-2.c: Update.
5175 * testsuite/gcc.dg/graphite/scop-4.c: Update.
5176 * testsuite/gcc.dg/graphite/scop-5.c: Add.
5177 * testsuite/gcc.dg/graphite/scop-6.c: Add.
5179 2008-05-06 Sebastian Pop <sebastian.pop@amd.com>
5181 * testsuite/gcc.dg/graphite/scop-0.c: Add.
5182 * testsuite/gcc.dg/graphite/scop-7.c: Add.
5183 * testsuite/gcc.dg/graphite/scop-8.c: Add.
5184 * testsuite/gcc.dg/graphite/scop-9.c: Add.
5185 * testsuite/gcc.dg/graphite/scop-10.c: Add.
5187 2008-05-06 Tobias Grosser <grosser@fim.uni-passau.de>
5189 * graphite.c (scop_affine_expr): Renamed to loop_affine_expr.
5190 Check affine expressions depending on the outermost loop
5192 (stmt_simple_for_scop_p): Same.
5193 (harmfule_stmt_in_scop): Same.
5195 2008-04-28 Tobias Grosser <grosser@fim.uni-passau.de>
5197 * graphite.c (dot_all_scops): Remove incorrect difficult bb coloring,
5198 mark entry and exit, that are not part of the SCoP and update HTML
5201 2008-04-25 Sebastian Pop <sebastian.pop@amd.com>
5203 * graphite.c (basic_block_simple_for_scop_p): Renamed
5205 (save_scop, preds_at_same_depth, test_for_scop_bound): Removed.
5206 (add_dominators_to_open_scops, build_scops_1): Reimplemented.
5207 (all_preds_visited_p, all_succs_visited_p,
5208 start_new_scop_for_each_succ, start_new_scop, stop_last_open_scop,
5209 scop_end_loop): New.
5210 (build_scops): Do not use dfs_enumerate_from.
5212 * testsuite/gcc.dg/graphite/scop-{1,2,4}.c: Updated.
5214 2008-04-23 Sebastian Pop <sebastian.pop@amd.com>
5216 * graphite.c: Add comments to functions that are missing a
5218 (graphite_create_iv): Removed. Merged in graphite_loop_to_gcc_loop.
5220 2008-04-23 Sebastian Pop <sebastian.pop@amd.com>
5222 * graphite.c (nb_params_in_scop): Moved...
5223 (graphite_bb_from_bb, loop_body_to_cloog_stmts): New.
5224 (setup_cloog_loop): Call loop_body_to_cloog_stmts.
5225 (clast_to_gcc_expression): Reduce column size to less than 80.
5226 (graphite_create_iv): Return the new name of the IV.
5227 (find_transform): Set options->esp and options->cpp.
5228 (gloog): Comment out the invalidation of the old loop code.
5229 (initialize_dependence_polyhedron): Replace scop_nb_params with
5232 * graphite.h (nb_params_in_scop): ... here.
5233 (scop_nb_params): Removed.
5234 (loop_domain_dim): Return something even when the loop was not
5235 found in the hash table: avoid ICEing on all the graphite.exp
5238 2008-04-14 Konrad Trifunovic <konrad.trifunovic@inria.fr>
5240 * tree-chrec.c (for_each_scev_op): SCEV can have 3 operands.
5242 * graphite.c (build_scop_dynamic_schedules): Schedule is built
5243 according to nesting level.
5244 (find_scop_parameters): Call instantiate_parameters.
5245 (scan_tree_for_params): Extend it to handle general affine bounds.
5246 Inner loop bound can depend on outer loop induction variable.
5247 (setup_cloog_loop): tmp variable is allocated on stack. Call
5248 instantiate_parameters with respect to outermost_loop_in_scop.
5249 (loop_domain_dim, ref_nb_loops, loop_iteration_vector_dim): moved to
5251 (create_empty_loop): Function loopify should be given edge
5252 probability, instead of edge frequency. Dominance relation from
5253 switch_bb to loop_header.
5254 (clast_to_gcc_expression): Added handling of clast_reduction node.
5255 (gloog): New functionality for removing old loop.
5256 (test_dependence): Factored out from build_rdg_all_levels.
5257 (build_rdg_all_levels): Dependence testing factored out to
5258 test_dependence function.
5260 * graphite.h (struct graphite_bb): Extended with dynamic_schedule.
5261 (loop_domain_dim, ref_nb_loops, loop_iteration_vector_dim): Moved
5264 2008-04-07 Sebastian Pop <sebastian.pop@amd.com>
5266 * graphite.c (free_scop, param_index, initialize_cloog_names,
5267 nb_params_in_scop): Use name_tree map instead of just a tree
5268 for keeping track of the variable name associated to that tree.
5269 (create_empty_loop, gmp_cst_to_tree, clast_name_to_gcc,
5270 clast_to_gcc_expression, graphite_create_iv,
5271 graphite_loop_to_gcc_loop, graphite_cond_to_gcc_cond,
5272 graphite_stmt_to_gcc_stmt): New.
5273 (gloog): Call these.
5274 * graphite.h (struct name_tree): New.
5275 (struct scop): Use name_tree instead of tree for params.
5276 Store a vector of name_tree for new_ivs.
5278 (scop_nb_params): Use name_tree instead of tree.
5280 2008-04-05 Alexander Lamaison <awl03@doc.ic.ac.uk>
5281 Sebastian Pop <sebastian.pop@amd.com>
5283 * tree-bounds.c: New.
5284 * tree-bounds.h: New.
5285 * tree-pass.h: Declare pass_bounds_early and pass_bounds_late.
5286 * passes.c: Schedule pass_bounds_early, pass_bounds_late.
5287 * builtins.c (expand_builtin_alloca): Add flag_bounds as for
5291 * c-cppbuiltin.c: Same.
5295 * tree-outof-ssa.c: Same.
5297 * Makefile.in: Same.
5299 2008-03-15 Antoniu Pop <antoniu.pop@gmail.com>
5300 Sebastian Pop <sebastian.pop@amd.com>
5302 * tree-loop-distribution.c (remaining_stmts,
5303 upstream_mem_writes): Removed static variables.
5304 (copy_loop_before, create_bb_after_loop,
5305 mark_nodes_having_upstream_mem_writes, free_rdg_components,
5306 rdg_build_components, rdg_build_partitions,
5307 dump_rdg_partitions): Extern.
5308 (generate_loops_for_partition, generate_code_for_partition): Do not
5310 (already_processed_vertex_p, predecessor_has_mem_write,
5311 mark_nodes_having_upstream_mem_writes, has_upstream_mem_writes,
5312 rdg_flag_all_uses, rdg_flag_uses, rdg_flag_vertex_and_dependent,
5313 rdg_flag_loop_exits, rdg_flag_similar_memory_accesses,
5314 build_rdg_partition_for_component, rdg_build_partitions, ldist_gen):
5315 Pass remaining_stmts and upstream_mem_writes as parameters.
5316 (rdg_component): Moved...
5317 (build_rdg_partition_for_component): Do not aggregate components when
5318 flag_streamize_loops is set.
5319 (gen_sequential_loops): New.
5320 (ldist_gen): Call gen_sequential_loops.
5322 * tree-pass.h (pass_loop_streamization): Declared.
5324 * omp-low.c (expand_omp_sections): Call add_bb_to_loop on created
5325 basic blocks when loops structures exist.
5327 * builtin-types.def (BT_FN_VOID_PTR_PTR_INT): New.
5329 * tree-ssa-loop-ivopts.c (expr_invariant_in_region_p): New.
5331 * tree-parloops.c (take_address_of, eliminate_local_variables_1,
5332 eliminate_local_variables_stmt, eliminate_local_variables,
5333 separate_decls_in_loop_name, separate_decls_in_loop_stmt,
5334 separate_decls_in_loop, gen_parallel_loop): Make them work on a region
5335 of code delimited by two edges in the CFG.
5336 (separate_decls_in_loop_name): Renamed separate_decls_in_region_name.
5337 (separate_decls_in_loop_stmt): Renamed separate_decls_in_region_stmt.
5338 (separate_decls_in_loop): Renamed separate_decls_in_region. Isolate
5339 the case of parallelisation of reductions.
5340 (create_loop_fn): Extern.
5341 (create_omp_parallel_region): New.
5343 * tree-data-ref.c (dump_data_dependence_relation): Don't call
5344 dump_data_reference for printing dra and drb.
5345 (create_rdg_edge_for_ddr, create_rdg_edges_for_scalar): Initialise
5347 (build_rdg): Don't call free_dependence_relations for the moment, as
5348 we attach dependence relations on each edge of the RDG.
5351 * tree-data-ref.h (rdg_component): ...here.
5352 (struct rdg_edge): New field ddr_p relation.
5353 (RDGE_RELATION): New.
5354 (create_bb_after_loop, copy_loop_before,
5355 mark_nodes_having_upstream_mem_writes, rdg_build_components,
5356 rdg_build_partitions, dump_rdg_partitions,
5357 free_rdg_components): Declared.
5359 * omp-builtins.def (BUILT_IN_GOMP_STREAM_ALIGN_PUSH,
5360 BUILT_IN_GOMP_STREAM_ALIGN_POP): New.
5362 * tree-loop-streamization.c: New.
5364 * tree-flow.h (gather_blocks_in_sese_region, create_loop_fn,
5365 create_omp_parallel_region, expr_invariant_in_region_p): Declared.
5367 * Makefile.in (tree-loop-streamization.o): Added to OBJS-common.
5369 * tree-cfg.c (gather_blocks_in_sese_region): Extern.
5371 * passes.c: Schedule pass_loop_streamization.
5373 2008-03-08 Tobias Grosser <grosser@fmi.uni-passau.de>
5375 * graphite.c (dot_all_scops_1): Fix formatting for difficult bbs and
5378 2008-03-07 Tobias Grosser <grosser@fim.uni-passau.de>
5380 * graphite.c (dot_all_scops): Update formatting.
5381 Bbs can now be part of more than one SCoP.
5383 2008-03-04 Sebastian Pop <sebastian.pop@amd.com>
5385 * graphite.c (new_loop_to_cloog_loop_str, setup_cloog_loop): Fix
5387 (loop_domain_dim): Check for unregistered toplev SCOP loop.
5388 * graphite.h (loop_to_cloog_loop): New.
5390 2008-03-04 Konrad Trifunovic <konrad.trifunovic@inria.fr>
5392 * graphite.c (loop_domain_dim, ref_nb_loops,
5393 loop_iteration_vector_dim): New.
5394 (build_access_matrix_with_af, build_access_matrix,
5395 initialize_dependence_polyhedron): Fixed for new matrix layout.
5396 No longer assume that all iteration domains are of the same
5399 2008-03-02 Sebastian Pop <sebastian.pop@amd.com>
5401 * tree-scalar-evolution.c (instantiate_parameters_1): An SSA_NAME
5402 defined in a loop at depth 0 is invariant.
5403 * tree-chrec.c (evolution_function_is_invariant_rec_p): Ditto.
5404 * tree-ssa-loop-ivopts.c (expr_invariant_in_loop_p): Should never
5405 be called at loop depth 0.
5407 * graphite.c (basic_block_simple_for_scop_p): Take the scop as
5409 (dot_all_scops_1): Update use of basic_block_simple_for_scop_p.
5410 (down_open_scop): Removed.
5411 (loop_in_scop_p): Redefined.
5412 (scop_affine_expr): New argument: scop.
5413 (stmt_simple_for_scop_p): New argument: scop. RETURN_EXPR is not
5414 a harmful statement ending a scop.
5415 (basic_block_simple_for_scop_p): New argument: scop.
5416 (get_loop_start): Removed.
5417 (new_scop): Initialize SCOP_LOOPS.
5418 (free_scop): Free SCOP_LOOPS.
5419 (succs_at_same_depth, preds_at_same_depth): New.
5420 (end_scop): Test the validity of a scop.
5421 (add_dominators_to_open_scops): New.
5422 (test_for_scop_bound): Call add_dominators_to_open_scops.
5423 Add cases for opening and closing multiple scops.
5424 (build_scops, build_scop_bbs): Iterate over basic blocks in
5426 (build_graphite_bb): Pass scop directly.
5427 (dfs_bb_in_scop_p): New.
5428 (scop_record_loop): Use SCOP_LOOPS for not recording the same loop
5430 (nb_loops_around_gb): Use loop_in_scop_p.
5431 (schedule_to_scattering): Disabled for the moment the code computing
5432 the "textual order for outer loop".
5434 * graphite.h (struct scop): New field loops.
5436 (scop_loop_index): Test that the given loop belongs to SCOP_LOOPS.
5438 * testsuite/gcc.dg/graphite/scop-{1,...,7}.c: Updated.
5440 2008-02-27 Antoniu Pop <antoniu.pop@gmail.com>
5441 Sebastian Pop <sebastian.pop@amd.com>
5443 * builtin-types.def (BT_FN_PTR_SIZE_UINT, BT_FN_BOOL_PTR): New.
5444 * common.opt (fstreamize-loops): New.
5445 * omp-builtins.def (BUILT_IN_GOMP_STREAM_CREATE,
5446 BUILT_IN_GOMP_STREAM_PUSH, BUILT_IN_GOMP_STREAM_HEAD,
5447 BUILT_IN_GOMP_STREAM_POP, BUILT_IN_GOMP_STREAM_EOS_P,
5448 BUILT_IN_GOMP_STREAM_SET_EOS, BUILT_IN_GOMP_STREAM_DESTROY): New.
5450 2008-02-22 Konrad Trifunovic <konrad.trifunovic@inria.fr>
5452 * tree-data-ref.c (build_empty_rdg): New.
5453 (build_rdg): Use it.
5454 * tree-data-ref.h (build_empty_rdg): Declared.
5455 * graphite.c (free_scop): Free SCOP_LOOP2CLOOG_LOOP.
5456 (find_vertex_for_stmt): Removed.
5457 (build_rdg_all_levels): Use build_empty_rdg and rdg_vertex_for_stmt.
5459 2008-02-21 Sebastian Pop <sebastian.pop@amd.com>
5461 * tree-loop-distribution.c (generate_builtin): After cancelling the
5462 loop tree, also delete basic blocks.
5463 (rdg_flag_uses): Stop recursion when a vertex has already been
5466 2008-02-15 Konrad Trifunovic <konrad.trifunovic@inria.fr>
5468 * graphite.c (build_scop_alpha): Removed.
5469 (graphite_transform_loops): Add a dummy call to build_all_rdg_levels
5470 and dump_dependence_graph to avoid compiler warnings.
5472 2008-02-14 Konrad Trifunovic <konrad.trifunovic@inria.fr>
5474 * tree-data-ref.c (dr_may_alias_p, create_rdg_vertices): Extern.
5475 * tree-data-ref.h (dr_may_alias_p, create_rdg_vertices): Declared.
5476 * graphite.c (new_loop_to_cloog_loop_str, hash_loop_to_cloog_loop,
5477 eq_loop_to_cloog_loop, del_loop_to_cloog_loop): New.
5478 (new_scop, setup_cloog_loop): Initialize SCOP_LOOP2CLOOG_LOOP.
5479 (initialize_dependence_polyhedron, find_vertex_for_stmt,
5480 initialize_data_dependence_polyhedron, is_empty_polyhedron,
5481 statement_precedes_p, build_rdg_all_levels, build_scop_alpha,
5482 dump_dependence_graph): New.
5483 * graphite.h (struct graphite_bb): New field compressed_alpha_matrix.
5485 (struct scop): New field loop2cloog_loop.
5486 (SCOP_LOOP2CLOOG_LOOP, struct data_dependence_polyhedron,
5487 RDGE_DDP, ddp_p, struct loop_to_cloog_loop_str): New.
5489 2008-02-10 Konrad Trifunovic <konrad.trifunovic@inria.fr>
5491 * graphite.c (build_graphite_bb): Fix initialization
5492 of the graphite basic block.
5494 2008-02-05 Sebastian Pop <sebastian.pop@amd.com>
5496 * graphite.c (scan_tree_for_params): Rewrite for the new layout of
5497 loop domain matrix. Pass in the number of loops contained in the
5499 (nb_loops_around_gb): Moved before setup_cloog_loop that uses it.
5500 (setup_cloog_loop): Rewrite for the new layout of loop domain matrix:
5501 loops that are not surrounding the current loop are not represented
5502 in the domain constraint matrix.
5503 (build_scop_iteration_domain): Initial domain constraint matrix
5504 contains only the eq/ineq, cst, and scop parameters columns.
5506 2008-01-29 Tobias Grosser <grosser@fim.uni-passau.de>
5508 * graphite.c (schedule_to_scattering, nb_loops_around_gb): New.
5509 (print_graphite_bb): Print scattering.
5511 2008-01-29 Tobias Grosser <grosser@fim.uni-passau.de>
5513 * graphite.c (initialize_cloog_names): Initialize names of
5514 scattering variables.
5516 2009-01-29 Tobias Grosser <grosser@fim.uni-passau.de>
5518 * graphite.c (dot_all_scops_1): Disable debug output while
5521 2008-01-29 Tobias Grosser <grosser@fim.uni-passau.de>
5523 * graphite.c (find_transform): Change cloog output language to C.
5525 2008-01-27 Sebastian Pop <sebastian.pop@amd.com>
5527 * tree-loop-distribution.c (generate_memset_zero,
5528 generate_builtin, generate_code_for_partition,
5529 rdg_flag_all_uses): New.
5530 (rdg_flag_uses): Gather in the same partition the statements defining
5531 the VUSES of the current statement.
5532 (rdg_flag_similar_stores): Renamed rdg_flag_similar_memory_accesses.
5533 Gather in the same partition not only the stores to the same memory
5534 access, but also the reads.
5535 (ldist_generate_loops): Renamed ldist_gen.
5537 2008-01-24 Sebastian Pop <sebastian.pop@amd.com>
5538 Tobias Grosser <grosser@fmi.uni-passau.de>
5540 * graphite.c (setup_cloog_loop): Chain all cloog loops with the
5541 next pointer, don't use the inner pointer.
5543 2008-01-20 Tobias Grosser <grosser@fmi.uni-passau.de>
5545 * graphite.c (dot_all_scops, dot_all_scops_1): New.
5546 (find_transform): Call dot_all_1.
5547 * graphite.h (dot_all_scops): Declared.
5549 2007-12-14 Sebastian Pop <sebastian.pop@amd.com>
5551 * tree-loop-distribution.c: Fix apsi.f ICE.
5552 (create_bb_after_loop): New.
5553 (generate_loops_for_partition): Use it.
5554 * testsuite/gfortran.dg/ldist-1.f90: New.
5556 * tree-data-ref.c (dot_rdg): Use /tmp/rdg.dot for dotty format.
5557 * graphite.c (dot_scop): Use /tmp/scop.dot for dotty format.
5559 2007-12-13 Tobias Grosser <grosser@fmi.uni-passau.de>
5561 * graphite.c (find_transform): Dump cloog program sent to cloog.
5563 2007-12-13 Tobias Grosser <grosser@fmi.uni-passau.de>
5565 * graphite.c (initialize_cloog_names): Initialize cloog
5568 2007-12-13 Tobias Grosser <grosser@fmi.uni-passau.de>
5570 * graphite.c (build_scop_context): Fix typo, for the matrix
5571 format: insert '0 >= 0' instead of '-1 >= 0'.
5573 2007-12-13 Sebastian Pop <sebastian.pop@amd.com>
5575 * Fix merge problems.
5577 2007-12-13 Sebastian Pop <sebastian.pop@amd.com>
5579 * graphite.c (setup_cloog_loop): Fix typo.
5581 2007-12-12 Sebastian Pop <sebastian.pop@amd.com>
5583 * doc/invoke.texi (-ftree-loop-distribution): Documented.
5584 * tree-loop-distribution.c: Reimplemented.
5585 * tree-pass.h (pass_loop_distribution): New.
5586 * tree-scalar-evolution.c (number_of_iterations_for_all_loops): Use
5588 * graphds.h (struct graph): New field indexes.
5589 * timevar.def (TV_TREE_LOOP_DISTRIBUTION): New.
5591 * tree-vect-analyze.c: Remove declaration of static functions when not
5593 * tree-vectorizer.c: Same.
5594 (rename_variables_in_loop): Now extern.
5595 (slpeel_tree_duplicate_loop_to_edge_cfg): Renamed
5596 tree_duplicate_loop_to_edge_cfg. Reset PENDING_STMT for edges after
5597 calling redirect_edge_and_branch_force.
5599 * tree-vectorizer.h (tree_duplicate_loop_on_edge): Declared.
5601 * tree-data-ref.c: Don't include tree-chrec.h.
5602 (debug_data_dependence_relations): New.
5603 (dump_data_dependence_relation): Call dump_data_reference on data refs
5605 (same_access_functions): Moved...
5606 (find_vertex_for_stmt): Renamed rdg_vertex_for_stmt.
5607 (dump_rdg_vertex, debug_rdg_vertex, dump_rdg_component,
5608 debug_rdg_component, dump_rdg, debug_rdg, dot_rdg_1, dot_rdg,
5609 struct rdg_vertex_info, ): New.
5610 (create_rdg_edge_for_ddr): Compute the dependence level before looking
5612 (create_rdg_vertices): Initialize the htab of graph->indexes.
5613 Initialize RDG_MEM_WRITE_STMT and RDG_MEM_READS_STMT.
5614 (stmts_from_loop): Don't save LABEL_EXPR.
5615 (hash_stmt_vertex_info, eq_stmt_vertex_info,
5616 hash_stmt_vertex_del): New.
5617 (build_rdg): Initialize rdg->indexes.
5618 (free_rdg, stores_from_loop, ref_base_address,
5619 rdg_defs_used_in_other_loops_p, have_similar_memory_accesses,
5620 have_similar_memory_accesses_1, ref_base_address_1,
5621 remove_similar_memory_refs): New.
5623 * tree-data-ref.h: Include tree-chrec.h.
5624 (debug_data_dependence_relations): Declared.
5625 (same_access_functions): ...here. Now static inline.
5626 (ddr_is_anti_dependent, ddrs_have_anti_deps,
5627 ddr_dependence_level): New.
5628 (struct rdg_vertex): New fields has_mem_write, has_mem_reads.
5629 (RDGV_HAS_MEM_WRITE, RDGV_HAS_MEM_READS, RDG_STMT, RDG_MEM_WRITE_STMT,
5630 RDG_MEM_READS_STMT): New.
5631 (dump_rdg_vertex, debug_rdg_vertex, dump_rdg_component,
5632 debug_rdg_component, dump_rdg, debug_rdg, dot_rdg,
5633 rdg_vertex_for_stmt): Declared.
5634 (struct rdg_edge): New field level.
5635 (RDGE_LEVEL, free_rdg): New.
5636 (stores_from_loop, remove_similar_memory_refs,
5637 rdg_defs_used_in_other_loops_p,
5638 have_similar_memory_accesses): Declared.
5639 (rdg_has_similar_memory_accesses): New.
5641 * lambda.h (dependence_level): New.
5642 * common.opt (ftree-loop-distribution): New.
5643 * tree-flow.h (debug_loop_ir): Renamed debug_loops.
5644 (print_loop_ir): Renamed print_loops.
5645 (debug_loop, debug_loop_num, print_loops_bb, mark_virtual_ops_in_bb,
5646 tree_duplicate_loop_to_edge_cfg, rename_variables_in_loop): Declared.
5647 * Makefile.in (TREE_DATA_REF_H): Depends on tree-chrec.h.
5648 (tree-loop-distribution.o): Added.
5649 * tree-cfg.c (mark_virtual_ops_in_region): Use mark_virtual_ops_in_bb.
5650 (mark_virtual_ops_in_bb): New.
5651 (print_loops_bb, debug_loop_num, debug_loop): New.
5652 * passes.c: Scheduled pass_loop_distribution.
5654 2007-12-12 Konrad Trifunovic <konrad.trifunovic@inria.fr>
5656 * graphite.c (scan_tree_for_params): Correct the number of columns
5658 (nb_flat_iterator): New.
5659 (setup_cloog_loop): Initialize to 1 the first column for inequalities.
5660 (build_scop_iteration_domain): Correct the number of columns for
5663 2007-12-12 Sebastian Pop <sebastian.pop@amd.com>
5665 * Merge from mainline (129697:130800).
5667 2007-10-30 Sebastian Pop <sebastian.pop@amd.com>
5669 * graphite.c (build_graphite_bb): SCoP's basic blocks are post
5670 dominated by SCoP's exit.
5671 (graphite_transform_loops): Compute post dominators.
5673 2007-10-28 Sebastian Pop <sebastian.pop@amd.com>
5675 * Merge from mainline (127169:129697).
5677 2007-10-28 Sebastian Pop <sebastian.pop@amd.com>
5679 * graphite.c (affine_expr): Renamed scop_affine_expr. Use an extra
5680 parameter for the basic block that contains the expression. Use
5681 outermost_loop_in_scop for evolution_function_is_affine_multivariate_p.
5682 (stmt_simple_for_scop_p): Pass to scop_affine_expr the basic block of
5684 * graphite.h (gbb_loop): New.
5685 (GBB_LOOP): Removed.
5687 2007-08-03 Sebastian Pop <sebpop@gmail.com>
5689 * Makefile.in: Fix merge problem.
5691 2007-08-03 Sebastian Pop <sebpop@gmail.com>
5693 * Merge from mainline (125309:127169).
5694 * tree-loop-distribution.c: Disabled.
5696 2007-06-05 Sebastian Pop <sebpop@gmail.com>
5698 * Merge from mainline (r123693:125309).
5700 2007-05-30 Sebastian Pop <sebpop@gmail.com>
5702 * tree-loop-distribution.c (correct_modify_expr_p): Renamed
5704 (correct_modify_p, check_statements, number_of_lvalue_uses,
5705 number_of_scalar_dependences, create_edges): Use GIMPLE_MODIFY_STMT
5706 instead of MODIFY_EXPR.
5707 (update_edge_with_ddv): Don't pass index_of_edge. Initialize
5710 2007-05-24 Sebastian Pop <sebpop@gmail.com>
5712 * tree-loop-distribution.c (struct rdg): Replace arrays by
5713 VECs for edges and vertices.
5714 (RDG_NBV, RDG_NBE, RDG_VERTEX, RDG_EDGE): Removed.
5715 (RDGV_NB_PARTITIONS): New.
5716 (PRDG_NBV, PRDG_NBE): Removed.
5717 (build_scc_graph, correct_partitions_p, mark_partitions, build_prdg,
5718 dump_rdg, find_vertex_with_stmt, create_vertices, free_rdg,
5719 number_of_scalar_dependences, create_edges, build_rdg): Use VECs.
5721 2007-05-17 Georges-Andre Silber <silber@cri.ensmp.fr>
5722 Sebastian Pop <sebpop@gmail.com>
5724 * doc/invoke.texi (-ftree-loop-distribution): Document.
5725 * tree-loop-distribution.c: New file.
5726 * tree-pass.h (pass_loop_distribution): Declared.
5727 * timevar.def (TV_TREE_LOOP_DISTRIBUTION): New.
5728 * tree-data-ref.c (initialize_data_dependence_relation): Initialize
5730 * tree-data-ref.h (data_dependence_relation): Add reversed_p.
5731 (DDR_REVERSED_P): New.
5732 * common.opt (-ftree-loop-distribution): New.
5733 * tree-flow.h (distribute_loops): Declared.
5734 * Makefile.in (OBJS-common): Depend on tree-loop-distribution.o.
5735 * passes.c (init_optimization_passes): Schedule loop distribution.
5737 2007-05-12 Sebastian Pop <sebastian.pop@inria.fr>
5739 * graphite.c (print_graphite_bb): Don't call dump_data_references.
5740 (print_scop): Don't print when scop is NULL.
5741 (build_scop_context, find_transform): Don't output to stderr.
5743 2007-05-09 Sebastian Pop <sebastian.pop@inria.fr>
5745 * tree-data-ref.c: Don't include graphite.h.
5746 Comment out the code for printing data reference's scop.
5747 (build_access_matrix_with_af): Moved...
5748 * tree-data-ref.h (build_access_matrix_with_af): Removed declaration.
5749 * graphite.c (build_access_matrix_with_af): ... here. Now static.
5750 (print_graphite_bb): Print basic block's schedule.
5751 (print_scop): Don't print the schedule, call cloog's pretty printer.
5752 (bb_in_scop_p): A basic block is in a scop only if it is both
5753 dominated and postdominated by the scop's entry and exit basic blocks.
5754 (function_parameter_p): New.
5755 (invariant_in_scop_p): Use function_parameter_p.
5756 (new_scop, save_scop): New.
5757 (end_scop, test_for_scop_bound, build_scops): Use new_scop, and
5759 (scan_tree_for_params): Directly build the constraint as CloogMatrix.
5760 (loop_in_scop_p): New.
5761 (scop_record_loop): Use loop_in_scop_p.
5762 (build_scop_domain): Renamed build_scop_iteration_domain.
5763 (setup_cloog_loop, initialize_cloog_names, find_scop_parameters,
5764 nb_params_in_scop, build_scop_context, first_loop_in_scop,
5765 setup_cloog_loop, dot_scop_1, dot_scop): New.
5766 * graphite.h (GBB_LOOP, SCOP_PROG, dot_scop): New.
5767 (struct scop): Add a pointer to cloog's representation of a program.
5769 2007-04-14 Sebastian Pop <sebastian.pop@inria.fr>
5771 * doc/invoke.texi (-ftree-check-verbose): Renamed
5772 -ftree-checks-verbose.
5773 * common.opt (flag_tree_check_verbose): Renamed
5774 flag_tree_checks_verbose.
5775 * tree-check.c (tree_check_warning): Use flag_tree_checks_verbose.
5777 2007-04-14 Sebastian Pop <sebastian.pop@inria.fr>
5779 * configure: Regenerated.
5780 * config.in: Regenerated.
5781 * tree-ssa-loop.c (graphite_transforms): Execute
5782 graphite_transform_loops only when HAVE_cloog.
5783 * configure.ac (HAVE_polylib, HAVE_cloog, GRAPHITE): Defined.
5784 * graphite.c: Include polylibgmp.h and cloog.h.
5785 (graphite_transform_loops): Removed loops parameter.
5786 * tree-flow.h (graphite_transform_loops): Update declaration.
5787 * Makefile.in (POLYLIBLIBS, POLYLIBINC, CLOOGLIBS, CLOOGINC): New.
5788 (LIBS): Depend on CLOOGLIBS and on POLYLIBLIBS.
5789 (INCLUDES): Depend on POLYLIBINC and on CLOOGINC.
5790 (OBJS-common): Remove dependence on graphite.o.
5791 (BACKEND): Depend on @GRAPHITE@.
5793 2007-04-13 Sebastian Pop <sebastian.pop@inria.fr>
5795 * doc/invoke.texi (-ftree-check-verbose): Documented.
5796 * testsuite/gcc.dg/tree-checker/tree-checks-1.c: New.
5797 * testsuite/gcc.dg/tree-checker/tree-checks-2.c: New.
5798 * testsuite/gcc.dg/tree-checker/tree-checks-3.c: New.
5799 * testsuite/gcc.dg/tree-checker/tree-checks-4.c: New.
5800 * testsuite/gcc.dg/tree-checker/tree-checks.exp: New.
5801 * testsuite/gcc.dg/tree-checker/condates.crp: New.
5802 * common.opt (ftree-checks-verbose): New.
5803 * tree-check.c (tree_check_warning): Move extra stderr output
5804 under control of flag_tree_check_verbose.
5806 2007-04-12 Sebastian Pop <sebastian.pop@inria.fr>
5808 * tree-match.c: Fix comments formatting.
5809 * tree-match.h: Fix comments formatting.
5810 * tree-check.c: Fix comments formatting.
5811 (tree_check_init): Restructure.
5813 2007-04-12 Nic Volanschi <nic.volanschi@free.fr>
5815 * doc/invoke.texi (-ftree-check, -ftree-checks): Documented.
5817 2007-04-10 Sebastian Pop <sebastian.pop@inria.fr>
5819 * Merge from mainline (r120733:123693).
5821 2007-03-20 Nic Volanschi <nic.volanschi@free.fr>
5823 * condate.y: New file.
5824 * tree-match.h (struct patt_info_s): New field sign.
5825 (struct condate_s): New field msg.
5826 (normalize_condate, name_condate, add_condate): New.
5827 (conds[], condate_parse): Made extern.
5828 * tree-check.c (tree_check_warning): First arg changed to cond;
5829 warning reformatted.
5830 (tree_check_init): Reset the TREE_VISITED bit on every CFG node.
5832 (tree_check): Process trivial condates.
5833 (read_delimited_string): Removed.
5834 (print_cond): Print name and msg.
5835 (conds[]): Made extern.
5836 (parse_tree_check_file_once): Rewritten to use the parser in
5838 Processing of option --tree_check_string moved to tree_scan().
5839 * Makefile.in: Added condate.y
5841 2007-03-12 Sebastian Pop <sebastian.pop@inria.fr>
5843 * tree-pretty-print.c (dump_generic_bb_buff, lazy_dump_generic_node):
5844 Use VECs instead of varrays.
5845 * diagnostic.h (lazy_dump_generic_node): Update declaration.
5846 * Makefile.in (pretty-print.o): Depend on vec.h.
5847 * pretty-print.c: Include tree.h and vec.h.
5848 (pp_clear_state, pp_write_list_to_stream, pp_base_format,
5849 pp_base_format, pp_construct, pp_base_string, pp_lazy_mode,
5850 new_tree_chunk, pp_add_tree, pp_add_string, pp_add_char, pp_write_list,
5851 pp_free_list): Use VECs instead of varrays.
5852 * pretty-print.h: Do not include varray.h.
5853 (struct tree_chunk_s): Declaration moved before its use.
5854 (output_buffer): Rename varray field to chunks.
5855 * tree-match.c (tree_equal, chunk_1st_char, chunks_lookahead,
5856 tree_1st_char, match_chunks_pattinfo, match_tree_pattinfo,
5857 save_global_holes): Use VECs instead of varrays.
5858 * tree-match.h: Declare VECs of cfg_node, and hole_p.
5859 * tree-check.c (scan_cfg_stmts, push_node,
5860 print_matching_stmt): Removed.
5861 (tree_check_instance, push_global_holes_if_new, tree_check,
5862 execute_tree_check): Use VECs instead of varrays.
5863 (gate_tree_check): Don't execute the CFG check when basic_block_info
5866 2007-01-12 Sebastian Pop <sebastian.pop@inria.fr>
5868 * Merge from mainline (r115016:120733).
5870 2007-01-12 Sebastian Pop <sebastian.pop@inria.fr>
5872 * Merge from mainline (r117632:117661).
5874 2007-01-12 Sebastian Pop <sebastian.pop@inria.fr>
5876 * tree-dump.c (dump_option_value_in): Add TDF_DEBUG.
5877 * tree-pass.h (TDF_DEBUG, debug_p): New.
5878 * tree-scalar-evolution.c (set_scalar_evolution, get_scalar_evolution,
5879 get_scalar_evolution, add_to_evolution, set_nb_iterations_in_loop,
5880 get_loop_exit_condition, analyze_evolution_in_loop,
5881 analyze_initial_condition, analyze_scalar_evolution,
5882 instantiate_parameters, number_of_latch_executions): Use debug_p.
5883 * tree-chrec.c (chrec_apply): Use debug_p.
5884 * tree-data-ref.c: Include graphite.h.
5885 (dump_data_reference): Print also the access matrix.
5886 (analyze_array, analyze_indirect_ref, init_data_ref,
5887 analyze_offset_expr, address_analysis, object_analysis,
5888 create_data_ref, finalize_ddr_dependent,
5889 non_affine_dependence_relation, analyze_ziv_subscript,
5890 analyze_siv_subscript_cst_affine,
5891 compute_overlap_steps_for_affine_1_2, analyze_subscript_affine_affine,
5892 can_use_analyze_subscript_affine_affine, analyze_siv_subscript,
5893 analyze_miv_subscript, analyze_overlapping_iterations,
5894 build_classic_dist_vector, subscript_dependence_tester,
5895 compute_affine_dependence, analyze_all_data_dependences): Use debug_p.
5896 (build_access_matrix_with_af): No longer static.
5897 * tree-data-ref.h (scop_p): ... declaration here.
5898 (data_reference.scop): New field.
5899 (DR_SCOP, DR_ACCESS_MATRIX): New.
5900 (build_access_matrix_with_af, dr_num_subscripts): Declared.
5901 * graphite.c (print_graphite_bb): Call dump_data_references.
5902 (print_scop): Use scop_nb_loops and scop_dim_domain.
5903 (test_for_scop_bound): Use debug_p.
5904 (scan_tree_for_params): Use scop_nb_loops, scop_nb_loops and
5906 (scop_loop_index): Moved...
5907 (scop_record_loop): New.
5908 (build_scop_loop_nests): Use scop_record_loop.
5909 (build_scop_domain): Use scop_dim_domain.
5910 (build_access_matrix): Implemented.
5911 (build_scop_canonical_schedules): Use scop_nb_loops.
5912 (build_graphite_bb): Initialize GBB_SCOP.
5913 * graphite.h (scop_p): Moved...
5914 (graphite_bb.scop): New field.
5915 (graphite_bb.iteration_domain, GBB_DOMAIN, scop.nb_params,
5916 scop.nb_loops, scop.dim_domain, SCOP_NB_LOOPS, SCOP_NB_PARAMS,
5917 SCOP_DIM_DOMAIN, SCOP_STMTS): Removed.
5918 (scop_nb_params, scop_nb_loops, scop_dim_domain, gbb_dim_domain,
5919 scop_loop_index): New.
5920 * Makefile.in (tree-data-ref.o): Depends on graphite.h.
5922 2007-01-05 Sebastian Pop <sebastian.pop@inria.fr>
5924 * Merge from mainline (r117661:120450).
5926 2006-10-12 Sebastian Pop <sebastian.pop@inria.fr>
5928 * tree-scalar-evolution.c (instantiate_parameters_1): Don't stop
5929 at the first declaration outside the varying loop, instantiate as
5931 * tree-chrec.c (for_each_scev_op): New.
5932 * tree-chrec.h (for_each_scev_op): Declared.
5933 * tree-ssa-loop.c (pass_graphite_trans): Don't dump the function.
5934 * tree-data-ref.c (get_references_in_stmt,
5935 find_data_references_in_stmt): New, from trunk.
5936 (find_data_references_in_loop): Use get_references_in_stmt
5937 and find_data_references_in_loop, modified as in trunk.
5938 (build_access_matrix_with_af): New.
5939 * tree-data-ref.h (data_reference): Add a field access_matrix.
5940 (data_ref_loc): New, as in trunk.
5941 * graphite.c (print_graphite_bb, bb_in_scop_p, stmt_in_scop_p,
5942 invariant_in_scop_p, param_index, scan_tree_for_params,
5943 scop_loop_index, build_scop_loop_nests, build_scop_domain, irp_data,
5944 idx_record_param, idx_record_params, build_access_matrix,
5945 build_scop_data_accesses, build_scop_canonical_schedules,
5946 build_graphite_bb, build_scop_bbs, find_params_in_bb,
5947 build_scop_params): New.
5948 * graphite.h (graphite_bb): New.
5949 (scop): Add fields static_schedule, params, loop_nest,
5951 * lambda.h: Declare vecs of lambda_matrix.
5952 * tree-flow.h (print_loop_ir_bb): Declared.
5953 * tree-cfg.c (print_loop_ir_bb): New.
5954 (print_loop): Use print_loop_ir_bb.
5956 2006-10-12 Sebastian Pop <pop@cri.ensmp.fr>
5958 * Merge from mainline (r115016:117632).
5960 2006-10-11 Sebastian Pop <pop@cri.ensmp.fr>
5962 * graphite.c (debug_scops): Adjust definition for avoiding a bootstrap
5963 break due to a warning.
5965 2006-10-10 Sebastian Pop <pop@cri.ensmp.fr>
5967 * graphite.c (print_scops, debug_scops): New.
5968 (graphite_transform): Renamed graphite_find_transform.
5969 * graphite.h (debug_scops): Declared.
5971 2006-08-17 Sebastian Pop <pop@cri.ensmp.fr>
5973 * tree-match.c: Reformat following the GNU style.
5974 * tree-match.h: Reformat following the GNU style.
5975 * tree-pattern.h: Removed empty file.
5976 * Makefile.in: Remove references to tree-pattern.h.
5977 * tree-check.c: Reformat following the GNU style.
5978 (execute_tree_check): Move gate condition code to...
5979 (gate_tree_check): ...here. New function.
5980 (pass_check): Use the gate function.
5982 2006-07-04 Nic Volanschi <nic.volanschi@free.fr>
5984 * tree-pattern.h: New. Tree pattern matching and checking using
5986 * tree-check.c: New. Tree/CFG checking pass.
5987 * tree-match.c: New. Library for tree pattern matching.
5988 * opts.c, common.opt: Add options --ftree-check & --ftree-checks.
5989 * toplev.c, flags.h: Add globals for tree-check pass.
5990 * Makefile.in: Integrate the files in tree-check pass.
5991 * timevar.def, tree-optimize.c, tree-pass.h: Register tree-check pass.
5992 * pretty-print.c, pretty-print.h, tree-pretty-print.c, diagnostic.h:
5993 Introduce a "lazy" pretty-print mode.
5994 * tree.c, tree.h: Add tree_name.
5996 2006-07-04 Sebastian Pop <pop@cri.ensmp.fr>
5998 * doc/invoke.texi (-fgraphite): Correct typo.
5999 * tree-scalar-evolution.c (number_of_iterations_for_all_loops): Update
6000 use of print_loop_ir.
6001 * testsuite/gcc.dg/graphite/scop-1.c: New.
6002 * testsuite/gcc.dg/graphite/scop-2.c: New.
6003 * testsuite/gcc.dg/graphite/graphite.exp: New.
6004 * graphite.c: Include domwalk.h.
6005 (print_scop): Print only the entry and exit blocks.
6006 (debug_scop): No longer static.
6007 (affine_expr): Fix formating. Return also true when the expression is
6009 (stmt_simple_for_scop_p): Fix formating.
6010 (build_scops): Use domwalk.
6011 (get_loop_start, end_scop, test_for_scop_bound): New.
6012 (graphite_transform_loops): Avoid printing on stderr.
6013 * graphite.h (debug_scop): Declared.
6014 * tree-flow.h (debug_loop_ir, print_loop_ir): Update declarations.
6015 * Makefile.in (graphite.o): Depend on domwalk.h.
6016 * tree-cfg.c (print_loop, print_pred_bbs, print_succ_bbs): Remove
6017 declarations for static functions.
6018 (print_loop, print_loop_ir, debug_loop_ir): Use an extra parameter for
6019 controlling output verbosity.
6021 2006-06-26 Sebastian Pop <pop@cri.ensmp.fr>
6022 Plesco Alexandru <shurikx@gmail.com>
6024 * doc/invoke.texi (-fgraphite): Document.
6025 * tree-pass.h (pass_graphite_transforms): Declared.
6026 * timevar.def (TV_GRAPHITE_TRANSFORMS): New.
6027 * tree-ssa-loop.c (graphite_transforms, gate_graphite_transforms): New.
6028 (pass_graphite_transforms): Defined.
6029 * tree-data-ref.c (free_data_ref, data_reference): Extern.
6030 * tree-data-ref.h (free_data_ref, data_reference): Declared.
6031 * graphite.c, graphite.h: New.
6032 * common.opt (fgraphite): Declared.
6033 * tree-flow.h (graphite_transform_loops): Declared.
6034 * Makefile.in (OBJS-common): Add graphite.o.
6035 (graphite.o): New rule.
6036 * passes.c (pass_graphite_transforms): Scheduled.