1 2009-10-15 Sebastian Pop <sebastian.pop@amd.com>
3 * graphite-blocking.c (lst_do_strip_mine): Avoid strip mining the
5 * graphite-interchange.c (lst_do_interchange): Avoid interchanging
7 * graphite-poly.c (scop_to_lst): Fix LST sequence in an outermost
9 (print_lst): Print the root of LST in a different format.
10 * graphite-poly.h (lst_depth): Adjust to include the root of the LST.
12 2009-10-15 Sebastian Pop <sebastian.pop@amd.com>
14 * graphite-poly.c (print_scop): Fix pretty printing of a SCoP.
16 2009-10-15 Sebastian Pop <sebastian.pop@amd.com>
18 * doc/passes.texi: Document the Graphite infrastructure.
20 2009-10-15 Sebastian Pop <sebastian.pop@amd.com>
22 * graphite-sese-to-poly.c (insert_copyin): Use gsi_insert_seq_on_edge.
23 (rewrite_commutative_reductions_out_of_ssa): Call gsi_commit_edge_inserts,
24 and check the SSA representation.
26 * gfortran.dg/graphite/id-18.f90: New, reduced from PR41193.
28 2009-10-15 Sebastian Pop <sebastian.pop@amd.com>
30 * gcc.dg/graphite/pr40157.c: Use -floop-block as reported in the PR.
32 2009-10-14 Sebastian Pop <sebastian.pop@amd.com>
34 * gcc.dg/graphite/interchange-11.c: New.
36 2009-10-14 Sebastian Pop <sebastian.pop@amd.com>
38 * gcc.dg/graphite/interchange-8.c: Enable loop interchange.
40 2009-10-14 Sebastian Pop <sebastian.pop@amd.com>
42 * gcc.dg/graphite/graphite.exp (DEFAULT_CFLAGS_GRAPHITE_BLOCK):
43 Add -fno-loop-strip-mine and -fno-loop-interchange.
44 (DEFAULT_FLAGS_GRAPHITE_INTERCHANGE): Add -fno-loop-block and
46 * gfortran.dg/graphite/graphite.exp: Same.
48 2009-10-14 Sebastian Pop <sebastian.pop@amd.com>
50 * gcc.dg/graphite/graphite.exp (DEFAULT_CFLAGS_GRAPHITE_BLOCK):
51 Renamed DEFAULT_FLAGS_GRAPHITE_BLOCK.
52 (DEFAULT_CFLAGS_GRAPHITE_IDENTITY): Renamed
53 DEFAULT_FLAGS_GRAPHITE_IDENTITY.
54 (DEFAULT_CFLAGS_GRAPHITE_INTERCHANGE): Renamed
55 DEFAULT_FLAGS_GRAPHITE_INTERCHANGE.
56 (DEFAULT_CFLAGS_GRAPHITE_SCOP): Renamed
57 DEFAULT_FLAGS_GRAPHITE_SCOP.
58 (DEFAULT_CFLAGS_RUN_ID): Renamed DEFAULT_FLAGS_RUN_ID.
59 (DEFAULT_CFLAGS_GRAPHITE): Renamed DEFAULT_FLAGS_GRAPHITE.
61 2009-10-14 Sebastian Pop <sebastian.pop@amd.com>
63 * graphite-poly.c (pbb_number_of_iterations_at_time): Cleanup comments.
65 2009-10-14 Konrad Trifunovic <konrad.trifunovic@gmail.com>
66 Sebastian Pop <sebastian.pop@amd.com>
68 * graphite-interchange.c (build_linearized_memory_access): Pass an
70 (memory_stride_in_loop): Include transform scattering in the
71 access functions to be able to querry the strides in the
73 (pbb_interchange_loop_depths): Interchange the psct_dynamic_dim,
74 not the psct_iterator_dim.
76 2009-10-14 Sebastian Pop <sebastian.pop@amd.com>
78 * graphite-blocking.c (pbb_do_strip_mine): Removed.
79 (lst_do_strip_mine_loop): New.
80 (lst_do_strip_mine): New.
81 (scop_do_strip_mine): Call lst_do_strip_mine.
82 * graphite-poly.h (lst_add_loop_under_loop): New.
83 (lst_find_first_pbb): New.
85 2009-10-14 Sebastian Pop <sebastian.pop@amd.com>
87 * graphite-poly.c (loop_to_lst): Fix LST creation.
89 2009-10-14 Tobias Grosser <grosser@fim.uni-passau.de>
91 * testsuite/gcc.dg/graphite/id-15.c: (8 * 8) replaced with
92 sizeof(unsigned long) to make it run on 32bit systems.
94 2009-10-14 Tobias Grosser <grosser@fim.uni-passau.de>
96 * testsuite/gcc.dg/graphite/run-id-1.c: Use smaller matrix to not
99 2009-10-14 Ramakrishna Upadrasta <Ramakrishna.Upadrasta@inria.fr>
101 * graphite-sese-to-poly.c (write_alias_graph_to_ascii_dimacs): Fix
103 (write_alias_graph_to_ascii_dot): New.
104 (write_alias_graph_to_ascii_ecc): Ditto.
105 (partition_drs_to_sets): Add testing of optimality of current method
106 which assigns alias numbers according to DFS Comopnent number. used
107 as heuristic for the upcoming ECC algorithm.
108 (build_scop_drs): Write to file also with the ecc and dot format.
110 2009-10-13 Sebastian Pop <sebastian.pop@amd.com>
112 * gfortran.dg/graphite/interchange-1.f: XFail.
114 2009-10-13 Sebastian Pop <sebastian.pop@amd.com>
116 * graphite.c (graphite_initialize): Do not handle functions with
117 more than 100 basic blocks.
119 2009-10-13 Sebastian Pop <sebastian.pop@amd.com>
121 * graphite-blocking.c (pbb_do_strip_mine): Use
122 PARAM_LOOP_BLOCK_TILE_SIZE.
124 2009-10-13 Sebastian Pop <sebastian.pop@amd.com>
126 * graphite-poly.c (dot_lst_1): New.
128 * graphite-poly.h (dot_lst): Declared.
130 2009-10-13 Sebastian Pop <sebastian.pop@amd.com>
132 * graphite-dependences.c (dot_deps_stmt_1): New.
133 (dot_deps_stmt): New.
134 * graphite-dependences.h (dot_deps_stmt): Declared.
136 2009-10-09 Sebastian Pop <sebastian.pop@amd.com>
138 * graphite-sese-to-poly.c (rewrite_cross_bb_scalar_dependence): Do
139 not replace cross BB scalar dependences ending on PHI nodes.
140 (rewrite_cross_bb_scalar_deps): Filter out GIMPLE_PHI nodes.
142 2009-10-09 Sebastian Pop <sebastian.pop@amd.com>
144 * graphite-poly.c (apply_poly_transforms): Implement the high
145 level driver for flag_loop_block.
146 * tree-ssa-loop.c (gate_graphite_transforms): Remove call to sorry for
149 * gcc.dg/graphite/graphite.exp (DEFAULT_CFLAGS_GRAPHITE_BLOCK): Add
151 * gfortran.dg/graphite/graphite.exp (DEFAULT_CFLAGS_GRAPHITE_BLOCK):
154 2009-10-09 Sebastian Pop <sebastian.pop@amd.com>
156 * graphite-poly.h (lst_find_pbb): New.
157 (find_lst_loop): New.
159 2009-10-09 Sebastian Pop <sebastian.pop@amd.com>
161 * graphite-poly.c (new_scop): Remove init of SCOP_DEP_GRAPH.
162 * graphite-poly.h (struct scop): Remove dep_graph field.
163 (SCOP_DEP_GRAPH): Removed.
165 2009-10-09 Sebastian Pop <sebastian.pop@amd.com>
167 * graphite-poly.h (copy_lst): Do full copy of LST.
169 2009-10-07 Sebastian Pop <sebastian.pop@amd.com>
171 * graphite-sese-to-poly.c (reduction_phi_p): Call remove_invariant_phi
172 when the loop stride is zero.
174 * gcc.dg/graphite/id-16.c: New.
176 2009-10-06 Sebastian Pop <sebastian.pop@amd.com>
178 * graphite-dependences.c (reduction_dr_1): New.
179 (reduction_dr_p): New.
180 (graphite_legal_transform_dr): Call reduction_dr_p.
181 (reduction_ddr): Renamed reduction_ddr_p.
182 * graphite-poly.h (same_pdr_p): New.
183 (number_of_write_pdrs): New.
184 * graphite-sese-to-poly.c (nb_data_writes_in_bb): New.
185 (split_reduction_stmt): Do not split reduction statements
186 when there are no writes to memory.
187 (translate_scalar_reduction_to_array_for_stmt): Insert the
188 memory reduction statement just after the scalar reduction statement.
190 * gcc.dg/graphite/interchange-10.c: Updated to differ from interchange-4.c.
192 * gcc.dg/graphite/interchange-3.c: Un-XFAIL-ed.
193 * gcc.dg/graphite/interchange-4.c: Un-XFAIL-ed.
195 2009-10-06 Sebastian Pop <sebastian.pop@amd.com>
197 * graphite-interchange.c (lst_apply_interchange): New.
198 (lst_interchange_profitable_p): New.
199 (lst_try_interchange_loops): New.
200 (lst_try_interchange): New.
201 (lst_do_interchange): New.
202 (pbb_do_interchange): Removed.
203 (scop_do_interchange): Call lst_do_interchange.
205 2009-10-06 Sebastian Pop <sebastian.pop@amd.com>
207 * graphite-poly.c (print_scop): Print SCOP_ORIGINAL_SCHEDULE and
208 SCOP_TRANSFORMED_SCHEDULE.
213 * graphite-poly.h (lst_p): New.
216 (LST_LOOP_FATHER): New.
219 (scop_to_lst): Declared.
220 (print_lst): Declared.
221 (debug_lst): Declared.
226 (lst_dewey_number): New.
227 (struct scop): Add original_schedule and transformed_schedule fields.
228 (SCOP_ORIGINAL_SCHEDULE): New.
229 (SCOP_TRANSFORMED_SCHEDULE): New.
230 * graphite-sese-to-poly.c (build_poly_scop): Call scop_to_lst.
232 2009-10-05 Sebastian Pop <sebastian.pop@amd.com>
234 * graphite-dependences.c (reduction_ddr): New.
235 (graphite_legal_transform_bb): Call reduction_ddr.
236 * graphite-poly.c (new_poly_bb): Pass a new bool parameter.
237 Initialize PBB_IS_REDUCTION.
238 * graphite-poly.h (struct poly_bb): New bool field is_reduction.
239 (PBB_IS_REDUCTION): New.
240 (new_poly_bb): Update declaration.
241 * graphite-scop-detection.h (build_scop_bbs): Removed.
242 (nb_reductions_in_loop): Removed.
243 * graphite-sese-to-poly.c (try_generate_gimple_bb): Pass a sbitmap
244 parameter for reductions.
245 (try_generate_gimple_bb): Update call to new_poly_bb.
246 (build_scop_bbs_1): Same.
247 (build_scop_bbs): Same.
248 (gsi_for_phi_node): New.
249 (scalar_close_phi_node_p): Remove gcc_assert.
250 (split_reduction_stmt): New.
251 (is_reduction_operation_p): New.
252 (phi_contains_arg): New.
253 (follow_ssa_with_commutative_ops): New.
254 (detect_commutative_reduction_arg): New.
255 (detect_commutative_reduction_assign): New.
256 (follow_inital_value_to_phi): New.
257 (edge_initial_value_for_loop_phi): New.
258 (initial_value_for_loop_phi): New.
259 (detect_commutative_reduction): New.
260 (translate_scalar_reduction_to_array_for_stmt): New.
261 (insert_copyout): New.
262 (insert_copyin): New.
263 (translate_scalar_reduction_to_array): New.
264 (rewrite_commutative_reductions_out_of_ssa_close_phi): New.
265 (rewrite_commutative_reductions_out_of_ssa_loop): New.
266 (rewrite_commutative_reductions_out_of_ssa): New.
267 (build_poly_scop): Call rewrite_commutative_reductions_out_of_ssa.
268 * sese.h (split_region_for_bb): New.
270 * gcc.dg/graphite/graphite.exp (DEFAULT_CFLAGS_GRAPHITE_BLOCK): Add -ffast-math.
271 * gcc.dg/graphite/interchange-1.c: Fix format.
272 * gcc.dg/graphite/interchange-10.c: New.
274 2009-10-05 Sebastian Pop <sebastian.pop@amd.com>
276 * graphite-sese-to-poly.c (insert_out_of_ssa_copy): Remove
279 2009-10-05 Sebastian Pop <sebastian.pop@amd.com>
281 * graphite-sese-to-poly.c (scev_analyzable_p): New.
282 (rewrite_cross_bb_scalar_dependence): New.
283 (rewrite_cross_bb_scalar_deps): New.
284 (rewrite_reductions_out_of_ssa): Use bb_in_sese_p.
285 Call rewrite_cross_bb_scalar_deps.
287 2009-10-05 Sebastian Pop <sebastian.pop@amd.com>
289 * graphite-sese-to-poly.c (gsi_for_ssa_name_def): Removed.
290 (insert_out_of_ssa_copy): Directly use gsi_after_labels and
293 2009-10-05 Sebastian Pop <sebastian.pop@amd.com>
295 * graphite-clast-to-gimple.c (build_cloog_prog): Use pbb_index.
296 * graphite-interchange.c (pbb_do_interchange): Same.
297 * graphite-poly.c (print_scattering_function): Same.
299 * graphite-poly.h (pbb_loop): New.
300 * graphite-sese-to-poly.c (create_linear_expr_from_tree): Use pbb_loop.
302 2009-09-27 Sebastian Pop <sebastian.pop@amd.com>
304 * graphite-scop-detection.c (limit_scops): Do not build poly_bbs.
306 2009-09-27 Sebastian Pop <sebastian.pop@amd.com>
308 * graphite-sese-to-poly.c (partition_drs_to_sets): Drs is not modified,
309 so don't pass a pointer to it.
310 (build_alias_set_for_drs): Same.
311 (build_base_obj_set_for_drs): Same.
312 (build_scop_drs): Same.
314 2009-09-26 Li Feng <nemokingdom@gmail.com>
316 * graphite-sese-to-poly.c (build_scop_drs): Disable writing to file
317 the alias graph of data references.
319 2009-09-25 Li Feng <nemokingdom@gmail.com>
321 * graphite-sese-to-poly.c (write_alias_graph_to_ascii_dimacs): New.
322 (build_scop_drs): When debugging, write the alias graph to file,
323 otherwise, should be disabled.
325 2009-09-17 Sebastian Pop <sebastian.pop@amd.com>
327 * graphite-scop-detection.c (stmt_simple_memref_p): Removed.
328 (is_simple_operand): Remove call to stmt_simple_memref_p.
329 (stmt_simple_for_scop_p): Update call to is_simple_operand.
331 2009-09-17 David Edelsohn <edelsohn@gnu.org>
333 * testsuite/gcc.dg/graphite/interchange-mvt.c: New File.
334 * testsuite/gcc.dg/graphite/scop-dsyrk.c: New File.
335 * testsuite/gcc.dg/graphite/scop-dsyr2k.c: New File.
336 * testsuite/gcc.dg/graphite/scop-mvt.c: New File.
337 * testsuite/gcc.dg/graphite/scop-sor.c: New File.
339 2009-09-17 Li Feng <nemokingdom@gmail.com>
342 * graphite-dependences.c (poly_drs_may_alias_p): Adjust definition.
343 (pddr_original_scattering): Make sure 2 pdr2 in the same base object set.
344 (graphite_carried_dependence_level_k): Ditto.
345 * graphite-poly.c (new_poly_dr): Add init of PDR_BASE_OBJECT_SET.
346 * graphite-poly.h (struct poly_dr): Add member dr_base_object_set.
347 (new_poly_dr): Adjust declaration.
348 * graphite-sese-to-poly.c (free_data_refs_aux): New.
349 (free_gimple_bb): Added free_data_refs_aux.
350 (build_poly_dr): Add dr_base_object_set.
351 (partition_drs_to_sets): New.
352 (dr_same_base_object_p): New.
353 (build_alias_set_for_drs): New.
354 (build_base_object_set_for_drs): New.
355 (build_scop_drs): Add build_base_obj_set_for_drs.
356 * graphite-sese-to-poly.h: Added #define for alias set number index and
357 base object set index.
358 * libgomp/testsuite/libgomp.graphite/force-parallel-6.c: Refine tests.
359 * libgomp/testsuite/libgomp.graphite/pr4118.c: New.
361 2009-09-16 Alexander Monakov <amonakov@ispras.ru>
363 * graphite-sese-to-poly.c (pdr_add_data_dimensions): Add bounds only
364 for ARRAY_REFs. Use array_ref_{low,up}_bound to determine bounds.
366 2009-09-14 Sebastian Pop <sebastian.pop@amd.com>
368 * graphite-sese-to-poly.c (struct irp_data): Removed.
369 (idx_record_params): Removed.
370 (find_params_in_bb): Scan for parameters the access functions; don't
371 parse the tree representation.
373 2009-09-14 Sebastian Pop <sebastian.pop@amd.com>
375 * tree-ssa-loop.c (gate_graphite_transforms): Disable Graphite
376 passes at -O1 and below.
378 2009-09-14 Sebastian Pop <sebastian.pop@amd.com>
380 * graphite-blocking.c: Fix order of includes: tree-chrec.h, then
381 tree-scalar-evolution.h, and then tree-data-ref.h.
382 * graphite-clast-to-gimple.c: Same.
383 * graphite-dependences.c: Same.
384 * graphite-interchange.c: Same.
385 * graphite-poly.c: Same.
386 * graphite-scop-detection.c: Same.
387 * graphite-sese-to-poly.c: Same.
389 * lambda-code.c: Same.
390 * matrix-reorg.c: Same.
391 * tree-data-ref.c: Same.
392 * tree-if-conv.c: Same.
393 * tree-loop-distribu: Same.: Same.
394 * tree-loop-linear.c: Same.
395 * tree-parloops.c: Same.
396 * tree-predcom.c: Same.
397 * tree-vect-patterns.c: Same.
399 2009-09-02 Sebastian Pop <sebastian.pop@amd.com>
401 Partially revert the previous patch, except the following.
402 * tree-scalar-evolution.c (instantiate_scev_not): Adapted to pass
403 as parameters the operands of the not expression.
405 2009-09-01 Sebastian Pop <sebastian.pop@amd.com>
407 * tree-scalar-evolution.c (instantiate_scev_assign): New.
408 Do not call analyze_scalar_evolution on assignments.
409 (instantiate_scev_phi): Call analyze_scalar_evolution.
410 (instantiate_scev_name): Call instantiate_scev_assign and
411 instantiate_scev_phi.
412 (instantiate_scev_not): Adapted to pass as parameters the operands
413 of the not expression.
415 2009-09-01 Sebastian Pop <sebastian.pop@amd.com>
417 * tree-scalar-evolution.c (instantiate_scev_binary): Adapted
418 to pass as parameters the operands of the binary expression.
420 2009-09-01 Sebastian Pop <sebastian.pop@amd.com>
422 * tree-scalar-evolution.c (instantiate_scev_bitnot): Renamed
423 instantiate_scev_not. Handle NEGATE_EXPR.
424 (instantiate_scev_r): Handle NEGATE_EXPR.
426 2009-09-01 Sebastian Pop <sebastian.pop@amd.com>
428 * tree-scalar-evolution.c (instantiate_scev_1): Renamed
430 (instantiate_scev_r): Move code in instantiate_scev_2
431 and instantiate_scev_1.
433 2009-09-01 Sebastian Pop <sebastian.pop@amd.com>
435 * tree-scalar-evolution.c (instantiate_scev_3): New.
436 (instantiate_scev_1): Move code in instantiate_scev_3.
438 2009-09-01 Sebastian Pop <sebastian.pop@amd.com>
440 * tree-scalar-evolution.c (instantiate_scev_poly): New.
441 (instantiate_scev_1): Move code in instantiate_scev_poly.
443 2009-09-01 Sebastian Pop <sebastian.pop@amd.com>
445 * tree-scalar-evolution.c (instantiate_scev_bitnot): New.
446 (instantiate_scev_1): Move code in instantiate_scev_bitnot.
448 2009-09-01 Sebastian Pop <sebastian.pop@amd.com>
450 * tree-scalar-evolution.c (instantiate_scev_convert): New.
451 (instantiate_scev_1): Move code in instantiate_scev_convert.
453 2009-09-01 Sebastian Pop <sebastian.pop@amd.com>
455 * tree-scalar-evolution.c (instantiate_scev_binary): New.
456 (instantiate_scev_1): Move code in instantiate_scev_binary.
458 2009-09-01 Sebastian Pop <sebastian.pop@amd.com>
460 * tree-scalar-evolution.c (instantiate_scev_name): New.
461 (instantiate_scev_1): Move code in instantiate_scev_name.
463 2009-08-28 Sebastian Pop <sebastian.pop@amd.com>
465 * Merge from mainline (150992:151171).
467 2009-08-25 Sebastian Pop <sebastian.pop@amd.com>
469 * graphite-dependences.c (graphite_legal_transform_bb): Call
470 pbb_remove_duplicate_pdrs.
471 * graphite-poly.c (can_collapse_pdr): Removed.
472 (pdr_find_duplicate): Removed.
473 (can_collapse_pdrs): New.
474 (pbb_remove_duplicate_pdrs): New.
475 (new_poly_dr): Do not look for duplicates.
476 * graphite-poly.h (struct poly_bb): New field pdr_duplicates_removed.
477 (PBB_PDR_DUPLICATES_REMOVED): New.
478 (pbb_remove_duplicate_pdrs): Declared.
480 2009-08-25 Sebastian Pop <sebastian.pop@amd.com>
482 * graphite-interchange.c (pbb_interchange_profitable_p): Adjust
483 the strides by multiplying by PDR_NB_REFS.
484 * graphite-poly.c (can_collapse_pdr): New.
485 (pdr_find_duplicate): New.
486 (new_poly_dr): Call pdr_find_duplicate. Collapse duplicate PDRs.
487 Initialize PDR_NB_REFS.
488 * graphite-poly.h (struct poly_dr): Add field nb_refs.
490 (new_poly_dr): Number of subscripts is a graphite_dim_t.
492 2009-08-25 Sebastian Pop <sebastian.pop@amd.com>
494 Revert one of the previous commits:
495 * graphite-dependences.c (graphite_legal_transform_bb): Avoid
496 the computation of symmetric data dependence relations.
497 (dependency_between_pbbs_p): Same.
499 2009-08-25 Sebastian Pop <sebastian.pop@amd.com>
502 * graphite-poly.c (apply_poly_transforms): Remove legality test before
505 2009-08-25 Sebastian Pop <sebastian.pop@amd.com>
507 * graphite-dependences.c (pddr_original_scattering): Return NULL
508 for read-read dependence relations.
509 * graphite-poly.h (enum poly_dr_type): Fix comment.
512 (pdr_may_write_p): New.
514 2009-08-25 Sebastian Pop <sebastian.pop@amd.com>
516 * graphite-poly.h (enum POLY_DR_TYPE): Renamed poly_dr_type.
517 (struct poly_dr): Same.
519 * graphite-poly.c (new_poly_dr): Same.
521 2009-08-25 Konrad Trifunovic <konrad.trifunovic@gmail.com>
522 Sebastian Pop <sebastian.pop@amd.com>
524 * graphite-blocking.c (pbb_strip_mine_loop_depth): Renamed
525 pbb_strip_mine_time_depth. Changed the implementation so that
526 transformation is expressed as a transformation on
527 time (scatttering) dimensions. Also, ensures that the 2d+1
528 scheduling format is preserved.
529 (pbb_strip_mine_profitable_p): Profitability is based on the
530 iteration number of a given time (scattering) dimension,
531 and not on a original loop depth dimension.
532 (pbb_strip_mine): Call pbb_number_of_iterations_at_time.
533 (pbb_do_strip_mine): Call psct_dynamic_dim.
534 * graphite-poly.c (pbb_number_of_iterations_at_time): New.
535 * graphite-poly.h (pbb_number_of_iterations_at_time): Declared.
536 (pbb_nb_dynamic_scattering_transform): New.
537 (psct_dynamic_dim): New.
539 2009-08-25 Konrad Trifunovic <konrad.trifunovic@gmail.com>
541 * graphite-ppl.c (ppl_max_for_le): Renamed ppl_max_for_le_pointset.
542 * graphite-ppl.h (ppl_max_for_le): Renamed ppl_max_for_le_pointset.
543 * graphite-poly.c (pbb_number_of_iterations): Rename ppl_max_for_le.
544 * graphite-interchange.c (build_linearized_memory_access): Same.
545 (memory_stride_in_loop): Same.
547 2009-08-25 Sebastian Pop <sebastian.pop@amd.com>
549 * graphite-dependences.c (pddr_original_scattering): New.
550 (graphite_legal_transform_dr): Call pddr_original_scattering.
553 * graphite-dependences.h (dot_deps): Declared.
554 * graphite-poly.c (new_poly_dr): Initialize PDR_ID.
555 (print_pdr): Print PDR_ID.
556 * graphite-poly.h (struct poly_dr): Add field id.
559 * graphite-scop-detection.c (dot_all_scops_1): Cleanup comment.
561 2009-08-22 Sebastian Pop <sebastian.pop@amd.com>
563 * graphite-dependences.c (graphite_carried_dependence_level_k): Do
564 not delete the original dependence relation.
566 2009-08-21 Sebastian Pop <sebastian.pop@amd.com>
568 * graphite-dependences.c (graphite_legal_transform_bb): Avoid
569 the computation of symmetric data dependence relations.
570 (dependency_between_pbbs_p): Same.
572 2009-08-21 Sebastian Pop <sebastian.pop@amd.com>
574 * graphite-dependences.c (new_poly_dr_pair): Renamed new_poly_ddr.
575 (eq_poly_dr_pair_p): Renamed eq_poly_ddr_p.
576 (hash_poly_dr_pair_p): Renamed hash_poly_ddr_p.
577 (free_poly_ddr): New.
578 (pddr_is_empty): New.
579 (dependence_polyhedron_1): Now returns a poly_ddr_p.
580 (dependence_polyhedron): Same. Remove useless gcc_assert.
582 (graphite_legal_transform_dr): Call pddr_is_empty and free_poly_ddr.
583 (graphite_carried_dependence_level_k): Call pddr_is_empty.
584 * graphite-dependences.h (enum poly_dependence_kind): New.
585 (poly_dr_pair): Renamed poly_ddr. Added a field kind.
586 (PDRP_SOURCE): Renamed PDDR_SOURCE.
587 (PDRP_SINK): Renamed PDDR_SINK.
588 (PDRP_DDP): Renamed PDDR_DDP.
590 (free_poly_ddr): Declared.
591 * graphite-poly.c (new_scop): Use the new hash function names.
592 * graphite-poly.h (struct scop): Renamed field original_pdr_pairs
594 (SCOP_ORIGINAL_PDR_PAIRS): Renamed SCOP_ORIGINAL_PDDRS.
596 2009-08-21 Sebastian Pop <sebastian.pop@amd.com>
598 * Merge from mainline (150764:150992).
600 2009-08-18 Sebastian Pop <sebastian.pop@amd.com>
602 * cfgloopmanip.c (create_empty_loop_on_edge): Generate upper
603 bounds with LT_EXPR to make niter analysis more precise on code
604 generated by Graphite.
606 2009-08-18 Sebastian Pop <sebastian.pop@amd.com>
608 * graphite-dependences.c (graphite_legal_transform_dr): Fix formatting.
609 (graphite_legal_transform_bb): Same.
610 (poly_drs_may_alias_p): Same.
612 2009-08-15 Sebastian Pop <sebastian.pop@amd.com>
615 * graphite-ppl.c (ppl_max_for_le): Correct the use of
616 ppl_Pointset_Powerset_C_Polyhedron_maximize.
618 2009-08-13 Sebastian Pop <sebastian.pop@amd.com>
620 * graphite-poly.c (print_pbb): Print PBB index.
622 2009-08-13 Sebastian Pop <sebastian.pop@amd.com>
624 * Merge from mainline (r150672:150764).
626 2009-08-13 Sebastian Pop <sebastian.pop@amd.com>
628 * graphite-interchange.c (ppl_max_for_le): Moved...
629 * graphite-poly.c (pbb_number_of_iterations): Call ppl_max_for_le.
630 * graphite-ppl.c (ppl_max_for_le): ... here.
631 * graphite-ppl.h (ppl_max_for_le): Declared.
633 2009-08-12 Sebastian Pop <sebastian.pop@amd.com>
635 * Merge from mainline (r150372:150672).
637 2009-08-11 Sebastian Pop <sebastian.pop@amd.com>
640 * sese.c (convert_for_phi_arg): New.
641 (add_guard_exit_phis): Use convert_for_phi_arg.
643 * testsuite/gfortran.dg/graphite/id-17.f: New.
645 2009-08-11 Sebastian Pop <sebastian.pop@amd.com>
647 * graphite-sese-to-poly.c (pdr_add_data_dimensions): Dont add
648 unknown subscript upper bounds.
650 * testsuite/gcc.dg/graphite/interchange-6.c: Un-XFAIL.
652 2009-08-11 Sebastian Pop <sebastian.pop@amd.com>
653 Pranav Garg <pranav.garg2107@gmail.com>
655 * graphite-interchange.c (gather_access_strides): Removed.
656 (ppl_max_for_le): New.
657 (build_linearized_memory_access): New.
658 (memory_stride_in_loop): New.
659 (pbb_interchange_profitable_p): Reimplemented.
660 * graphite-ppl.h (ppl_new_id_map): New.
661 (ppl_interchange): New.
663 * testsuite/gcc.dg/graphite/interchange-6.c: XFAILed.
665 2009-08-11 Sebastian Pop <sebastian.pop@amd.com>
667 * graphite-interchange.c (compute_subscript): Removed.
668 (compute_array_size_cstr): Removed.
669 (compute_array_size_poly): Removed.
670 (compute_array_size): Removed.
671 (gather_access_strides_poly): Removed.
672 (gather_access_strides): Empty.
674 2009-08-11 Sebastian Pop <sebastian.pop@amd.com>
676 * graphite-dependences.c (dependence_polyhedron_1): Replace
677 pdr_nb_subscripts with PDR_NB_SUBSCRIPTS.
678 (graphite_legal_transform_dr): Same.
679 (graphite_carried_dependence_level_k): Same.
680 * graphite-poly.c (new_poly_dr): Add a parameter nb_subscripts.
681 Initialize PDR_NB_SUBSCRIPTS.
682 (print_pdr_access_layout): Replace pdr_nb_subscripts with
684 * graphite-poly.h (struct poly_dr): Add nb_subscripts field.
685 (PDR_NB_SUBSCRIPTS): New.
686 (pdr_nb_subscripts): Removed.
687 (pdr_dim): Simplified.
688 * graphite-sese-to-poly.c (build_poly_dr): Replace pdr_nb_subscripts
689 with PDR_NB_SUBSCRIPTS.
691 2009-08-11 Sebastian Pop <sebastian.pop@amd.com>
693 * graphite-interchange.c (compute_array_size): Remove use of
695 * graphite-poly.c (new_poly_dr): Remove argument data_container.
696 Do not initialize PDR_DATA_CONTAINER.
697 (print_pdr): Do not print PDR_DATA_CONTAINER.
698 * graphite-poly.h (struct poly_dr): Remove data_container field.
699 (PDR_DATA_CONTAINER): Removed.
700 * graphite-sese-to-poly.c (pdr_add_data_dimensions): Remove use of
702 (build_poly_dr): Same.
704 2009-08-11 Sebastian Pop <sebastian.pop@amd.com>
706 * testsuite/gcc.dg/graphite/interchange-9.c: New.
708 2009-08-05 Konrad Trifunovic <konrad.trifunovic@gmail.com>
709 Sebastian Pop <sebastian.pop@amd.com>
711 * graphite-dependences.c (graphite_legal_transform_dr): Work on a
712 copy of the dependence polyhedron. Free the temporary objects.
713 (graphite_carried_dependence_level_k): Free unused objects before
716 * testsuite/gcc.dg/graphite/interchange-1.c: XFAILed.
717 * testsuite/gcc.dg/graphite/interchange-2.c: XFAILed.
718 * testsuite/gcc.dg/graphite/interchange-3.c: XFAILed.
719 * testsuite/gcc.dg/graphite/interchange-4.c: XFAILed.
720 * testsuite/gcc.dg/graphite/interchange-7.c: XFAILed.
722 2009-08-05 Sebastian Pop <sebastian.pop@amd.com>
724 * graphite-blocking.c (scop_do_strip_mine): Call store_scattering.
725 Early return without analyzing the data dependences if no
726 transform has been done. Call restore_scattering if the transform
728 (graphite-interchange.c): Same.
729 * graphite-poly.c (print_scattering_function): Test for PBB_TRANSFORMED.
730 (graphite_read_transforms): Initialize PBB_TRANSFORMED.
731 (apply_poly_transforms): Do not gcc_assert that
732 the transform is legal.
733 (new_poly_bb): Initialize PBB_TRANSFORMED, PBB_SAVED, and PBB_ORIGINAL.
734 Do not initialize PBB_NB_SCATTERING_TRANSFORM, PBB_NB_LOCAL_VARIABLES,
735 PBB_TRANSFORMED_SCATTERING, and PBB_ORIGINAL_SCATTERING.
736 (free_poly_dr): Free PBB_TRANSFORMED, PBB_SAVED, and PBB_ORIGINAL.
737 * graphite-poly.h (struct poly_scattering): New.
738 (struct poly_bb): Add original, transformed, and saved fields.
739 Remove transformed_scattering, original_scattering, nb_local_variables,
740 and nb_scattering_transform fields.
741 (PBB_ORIGINAL, PBB_TRANSFORMED, PBB_SAVED): New.
742 (poly_scattering_new): New.
743 (poly_scattering_free): New.
744 (poly_scattering_copy): New.
745 (store_scattering_pbb): New.
746 (store_scattering): New.
747 (restore_scattering_pbb): New.
748 (restore_scattering): New.
749 * graphite-sese-to-poly.c (build_pbb_scattering_polyhedrons):
750 Initialize PBB_TRANSFORMED and PBB_ORIGINAL.
752 2009-08-05 Sebastian Pop <sebastian.pop@amd.com>
754 * graphite-poly.c (print_pbb): Add parentheses in the pretty print.
757 2009-08-05 Sebastian Pop <sebastian.pop@amd.com>
759 * Makefile.in (graphite.o): Depends on PREDICT_H.
760 * graphite.c: Include predict.h.
761 (graphite_finalize): Call tree_estimate_probability.
762 * predict.c (predict_loops): Do not call scev_initialize and
764 (tree_estimate_probability_bb): New.
765 (tree_estimate_probability): Do not initialize loops: move that
766 code to the driver. Call tree_estimate_probability_bb.
767 (tree_estimate_probability_driver): New.
768 (pass_profile): Use tree_estimate_probability_driver.
769 * predict.h (tree_estimate_probability): Declared.
771 2009-08-05 Sebastian Pop <sebastian.pop@amd.com>
773 * graphite-clast-to-gimple.c (gloog): Add time to TV_GRAPHITE_CODE_GEN.
774 * graphite-dependences.c (graphite_legal_transform): Add time to
775 TV_GRAPHITE_DATA_DEPS.
776 (dependency_between_pbbs_p): Same.
777 * timevar.def (TV_GRAPHITE_DATA_DEPS, TV_GRAPHITE_CODE_GEN): New.
779 2009-08-03 Sebastian Pop <sebastian.pop@amd.com>
781 * Merge from mainline (r149952:150372).
783 2009-07-28 Sebastian Pop <sebastian.pop@amd.com>
785 * ChangeLog.graphite: Fix indenting, white spaces and 80 columns.
786 * graphite-blocking.c: Same.
787 * graphite-clast-to-gimple.c: Same.
788 * graphite-dependences.c: Same.
789 * graphite-poly.c: Same.
790 * graphite-poly.h: Same.
791 * graphite-ppl.c: Same.
792 * graphite-scop-detection.c: Same.
793 * graphite-sese-to-poly.c: Same.
796 2009-07-28 Sebastian Pop <sebastian.pop@amd.com>
798 * graphite-sese-to-poly.c (loop_entry_phi_arg): New.
799 (remove_simple_copy_phi): New.
800 (remove_invariant_phi): New.
801 (simple_copy_phi_p): New.
802 (reduction_phi_p): New.
803 (gsi_for_ssa_name_def): New.
804 (insert_out_of_ssa_copy): New.
805 (insert_out_of_ssa_copy_on_edge): New.
806 (create_zero_dim_array): New.
807 (scalar_close_phi_node_p): New.
808 (rewrite_close_phi_out_of_ssa): New.
809 (rewrite_phi_out_of_ssa): New.
810 (rewrite_reductions_out_of_ssa): New.
811 (build_poly_scop): Call rewrite_reductions_out_of_ssa.
813 * testsuite/gcc.dg/graphite/id-11.c: New.
814 * testsuite/gcc.dg/graphite/id-15.c: New.
815 * testsuite/gcc.dg/graphite/interchange-1.c: Un-XFAIL.
816 * testsuite/gcc.dg/graphite/interchange-2.c: Un-XFAIL.
817 * testsuite/gcc.dg/graphite/interchange-3.c: Un-XFAIL.
818 * testsuite/gcc.dg/graphite/interchange-4.c: Un-XFAIL.
819 * testsuite/gcc.dg/graphite/interchange-7.c: Un-XFAIL.
820 * testsuite/gcc.dg/graphite/scop-matmult.c: Un-XFAIL.
821 * testsuite/gfortran.dg/graphite/id-13.f: New.
822 * testsuite/gfortran.dg/graphite/id-5.f: New.
824 2009-07-28 Sebastian Pop <sebastian.pop@amd.com>
826 * graphite-clast-to-gimple.c (graphite_loop_normal_form): Do not
827 check that nb_reductions_in_loop is zero.
828 * graphite-scop-detection.c (harmful_stmt_in_bb): Don't filter out
830 (nb_reductions_in_loop): Removed.
831 (graphite_can_represent_loop): Do not call nb_reductions_in_loop.
832 * graphite-sese-to-poly.c (phi_node_is_iv): Removed.
833 (bb_contains_non_iv_scalar_phi_nodes): Removed.
834 (scop_contains_non_iv_scalar_phi_nodes): Removed.
835 (build_poly_scop): Do not call scop_contains_non_iv_scalar_phi_nodes.
837 2009-07-28 Sebastian Pop <sebastian.pop@amd.com>
839 * graphite-clast-to-gimple.c (build_cloog_prog): Do not code generate
840 statements that have an empty iteration domain.
841 * testsuite/gfortran.dg/graphite/id-16.f: New.
843 2009-07-28 Sebastian Pop <sebastian.pop@amd.com>
845 * tree-scalar-evolution.c (instantiate_scev_1): Return
846 chrec_dont_know when the result is not above instantiate_below.
847 * graphite-scop-detection.c (scopdet_basic_block_info): Fix formatting.
848 * graphite-sese-to-poly.c (create_linear_expr_from_tree): Assert that
849 the tree has a known scalar evolution.
850 * testsuite/gfortran.dg/graphite/id-14.f: New.
851 * testsuite/gfortran.dg/graphite/id-15.f: New.
853 2009-07-28 Sebastian Pop <sebastian.pop@amd.com>
855 * sese.c (rename_variables_in_stmt): Pass in an extra parameter
857 (rename_variables): Keep inserting renames after the ones already
860 2009-07-28 Sebastian Pop <sebastian.pop@amd.com>
862 * graphite-sese-to-poly.c (compare_bb_depths): New.
863 (graphite_sort_dominated_info): New.
864 (build_scop_bbs_1): Call graphite_sort_dominated_info.
865 (build_scop_scattering): Fix comment.
867 2009-07-28 Sebastian Pop <sebastian.pop@amd.com>
869 * graphite.c (graphite_finalize): Call print_loops instead of
870 dump_function_to_file.
871 * testsuite/gcc.dg/graphite/graphite.exp: Fix formatting.
872 * testsuite/gcc.dg/graphite/pr35356-1.c: New. Look for the number of
873 loops generated in the graphite output file.
874 * testsuite/gcc.dg/graphite/pr35356-2.c: New.
875 * testsuite/gcc.dg/graphite/pr35356-3.c: New. XFAILed for now.
876 * testsuite/gfortran.dg/graphite/id-12.f: New.
878 2009-07-24 Li Feng <nemokingdom@gmail.com>
880 * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-8.c:
883 2009-07-24 Li Feng <nemokingdom@gmail.com>
884 Tobias Grosser <grosser@fim.uni-passau.de>
886 * graphite-sese-to-poly.c (pdr_add_alias_set): Use data reference's
887 alias set number build alias in ACCESSES polyhedron.
888 (build_alias_set_for_drs): New.
889 (build_pbb_drs): Added build_alias_set_for_drs.
890 * graphite-dependences.c (poly_drs_may_alias_p): New.
891 (graphite_carried_dependence_level_k): Check alias information
892 before building polyhedron.
894 2009-07-24 Tobias Grosser <grosser@fim.uni-passau.de>
896 * Makefile.in (lambda-code.o): Fix formatting.
898 2009-07-24 Tobias Grosser <grosser@fim.uni-passau.de>
900 * Merge from mainline (r149350-149952)
902 2009-07-18 Tobias Grosser <grosser@fim.uni-passau.de>
904 * graphite-poly.c (apply_poly_transforms): Move strip_mine
905 before interchange to prepare for loop blocking.
907 2009-07-18 Tobias Grosser <grosser@fim.uni-passau.de>
909 * graphite-poly.c (apply_poly_transforms): Add checks after every
911 * graphite-sese-to-poly.c (build_poly_scop): Remove check, as already
912 done in apply_poly_transforms.
914 2009-07-17 Konrad Trifunovic <konrad.trifunovic@gmail.com>
916 * graphite-dependences.c (build_lexicographically_gt_constraint):
917 Replace RES parameter with *RES.
918 (dependence_polyhedron_1): Pass an address of the parameter RES
919 instead of value of RES.
921 2009-07-16 Sebastian Pop <sebastian.pop@amd.com>
923 * graphite.c (graphite_finalize): Fix comment.
924 (graphite_transform_loops): Reset scev info after code generation
927 2009-07-16 Sebastian Pop <sebastian.pop@amd.com>
929 * graphite.c (graphite_finalize): Call scev_reset.
931 2009-07-16 Sebastian Pop <sebastian.pop@amd.com>
933 * graphite-clast-to-gimple.c (compute_cloog_iv_types): Do not create
934 GBB_CLOOG_IV_TYPES hash table twice.
935 * graphite-sese-to-poly.c (free_gimple_bb): Call free_data_refs.
936 (add_condition_to_domain): Clear GMP values.
938 2009-07-16 Sebastian Pop <sebastian.pop@amd.com>
940 * graphite-dependences.c: Fix formatting.
941 * graphite-poly.c (free_poly_dr): Also free PDR_DATA_CONTAINER.
942 (pbb_number_of_iterations): Free ppl_Linear_Expression.
943 * graphite-sese-to-poly.c: Fix formatting.
944 * graphite.c (graphite_transform_loops): Create the hash table
945 after the early return.
947 2009-07-16 Sebastian Pop <sebastian.pop@amd.com>
949 * testsuite/gcc.dg/graphite/id-14.c: New.
950 * testsuite/gcc.dg/graphite/pr40157.c: New.
951 * testsuite/gfortran.dg/graphite/id-11.f: New.
953 2009-07-16 Sebastian Pop <sebastian.pop@amd.com>
955 * graphite-sese-to-poly.c (nb_pbbs_in_loops): New.
956 (build_poly_scop): Return false when there are no pbbs within
957 loops to avoid to pass to cloog scops with no loops.
959 2009-07-16 Sebastian Pop <sebastian.pop@amd.com>
961 * graphite-sese-to-poly.c (build_pbb_scattering_polyhedrons): Avoid
962 useless test "i % 2".
963 (build_pbb_scattering_polyhedrons): Fix formatting.
964 (build_poly_dr): Same.
965 * graphite.c (graphite_transform_loops): Restructure.
967 2009-07-14 Razya Ladelsky <razya@il.ibm.com>
969 * tree-ssa-loop-manip.c (rewrite_phi_with_iv): Remove
970 reduction_list parameter.
971 (rewrite_all_phi_nodes_with_iv): Same.
972 (canonicalize_loop_ivs): Same.
973 * tree-parloops.c (struct brli): Removed.
974 (build_reduction_list_info): Removed.
975 (build_new_reduction): New.
976 (analyze_reduction_list): Removed.
977 (gather_scalar_reductions): Find reductions instead of phi
978 nodes that can't be canonicalized.
979 (try_create_reduction_list): Remove reduction_list parameter.
980 (gen_parallel_loop): Same.
981 (parallelize_loops): Remove analyze_reductions variable,
982 initialization and free.
983 Change reduction_list htab initialization to reduction_info
984 elements instead of ssa names.
985 Call try_create_reduction_list and gen_parallel_loop without
986 analyzed_reduction argument.
987 * graphite-clast-to-gimple (graphite_loop_normal_form): Call
988 canonicalize_loop_ivs with one less argument.
989 * tree-flow.h (canonicalize_loop_ivs): Remove one argument.
991 2009-07-14 Konrad Trifunovic <konrad.trifunovic@gmail.com>
993 * graphite-dependences.c (new_poly_dr_pair): New.
994 (dependence_polyhedron): Renamed into dependence_polyhedron_1.
995 (new_poly_dr_pair): New.
996 (eq_poly_dr_pair_p): New.
997 (hash_poly_dr_pair_p): New.
998 * graphite-dependences.h (struct poly_dr_pair): New.
999 (eq_poly_dr_pair_p): Declared.
1000 (hash_poly_dr_pair_p): Declared.
1001 * graphite-poly.c (new_scop): Initialize SCOP_ORIGINAL_PDR_PAIRS.
1002 (free_scop): Free SCOP_ORIGINAL_PDR_PAIRS.
1003 * graphite-poly.h (struct scop): Add original_pdr_pairs field.
1004 * Makefile.in (graphite-poly.o): Add dependence on
1005 graphite-dependences.h.
1007 2009-07-14 Sebastian Pop <sebastian.pop@amd.com>
1009 * graphite-scop-detection.c (graphite_can_represent_scev): Do not let
1010 polynomials of degree > 1 pass to Graphite.
1011 * tree-chrec.c (scev_is_linear_expression): Call
1012 evolution_function_is_affine_multivariate_p.
1013 * testsuite/gfortran.dg/graphite/id-10.f90: New.
1015 2009-07-14 Sebastian Pop <sebastian.pop@amd.com>
1017 * tree-scalar-evolution.c (compute_overall_effect_of_inner_loop):
1018 Instantiate scevs varying in outer loops.
1019 * testsuite/gfortran.dg/graphite/id-9.f: Correct testcase.
1021 2009-07-14 Sebastian Pop <sebastian.pop@amd.com>
1023 * graphite-sese-to-poly.c (build_loop_iteration_domains): Do not insert
1024 redundant constraint.
1026 2009-07-14 Sebastian Pop <sebastian.pop@amd.com>
1028 * testsuite/gcc.dg/graphite/graphite.exp: Fix comments.
1029 * testsuite/gfortran.dg/graphite/graphite.exp: Trigger actions
1030 based on the file names as in the C testsuite.
1031 * testsuite/gfortran.dg/graphite/block-1.f90: Fix patterns.
1032 * testsuite/gfortran.dg/graphite/block-2.f: Same.
1033 * testsuite/gfortran.dg/graphite/block-3.f90: Same.
1034 * testsuite/gfortran.dg/graphite/block-4.f90: Same.
1035 * testsuite/gfortran.dg/graphite/id-1.f90: Same.
1036 * testsuite/gfortran.dg/graphite/id-2.f90: Same.
1037 * testsuite/gfortran.dg/graphite/id-3.f90: Same.
1038 * testsuite/gfortran.dg/graphite/id-4.f90: Same.
1039 * testsuite/gfortran.dg/graphite/id-6.f: Same.
1040 * testsuite/gfortran.dg/graphite/id-9.f: Same.
1041 * testsuite/gfortran.dg/graphite/interchange-1.f: Same.
1042 * testsuite/gfortran.dg/graphite/interchange-2.f: Same.
1043 * testsuite/gfortran.dg/graphite/scop-1.f: Same.
1045 2009-07-14 Sebastian Pop <sebastian.pop@amd.com>
1047 * sese.c (expand_scalar_variables_call): New.
1048 (expand_scalar_variables_ssa_name): Handle calls in expander.
1050 2009-07-13 Sebastian Pop <sebastian.pop@amd.com>
1052 * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-6.c:
1053 Expect to see the pattern twice.
1054 * testsuite/gcc.dg/graphite/interchange-0.c: Un-XFAIL.
1055 * testsuite/gcc.dg/graphite/interchange-5.c: Same.
1056 * testsuite/gcc.dg/graphite/interchange-6.c: Same.
1058 2009-07-13 Sebastian Pop <sebastian.pop@amd.com>
1060 * testsuite/gcc.dg/graphite/id-10.c: New.
1061 * testsuite/gcc.dg/graphite/id-12.c: New.
1062 * testsuite/gfortran.dg/graphite/id-7.f: New.
1063 * testsuite/gfortran.dg/graphite/id-8.f: New.
1065 2009-07-13 Sebastian Pop <sebastian.pop@amd.com>
1067 * graphite-sese-to-poly.c (pdr_add_data_dimensions): Fix division by
1070 2009-07-13 Sebastian Pop <sebastian.pop@amd.com>
1072 * sese.c (rename_variables_in_stmt): Call fold_convert during renaming.
1074 2009-07-13 Sebastian Pop <sebastian.pop@amd.com>
1076 * sese.c (expand_scalar_variables_stmt): Avoid unnecessary expansion.
1078 2009-07-10 Sebastian Pop <sebastian.pop@amd.com>
1080 * graphite-sese-to-poly.c (pdr_add_memory_accesses): Fix order of
1081 building PDR subscripts.
1083 2009-07-10 Sebastian Pop <sebastian.pop@amd.com>
1085 * graphite-sese-to-poly.c (pdr_add_data_dimensions): Fix the
1086 computation of array sizes.
1088 2009-07-10 Sebastian Pop <sebastian.pop@amd.com>
1090 * graphite-sese-to-poly.c (add_param_constraints): Disabled.
1092 2009-07-10 Tobias Grosser <grosser@fim.uni-passau.de>
1094 * graphite-dependences.c (map_into_dep_poly, map_dr_into_dep_poly,
1095 build_pairwise_constraint, dr_equality_constraints,
1096 build_pairwise_scheduling_equality,
1097 build_pairwise_scheduling_inequality, lexicographically_gt_p,
1098 build_lexicographically_gt_constraint, dependence_polyhedron,
1099 graphite_legal_transform_dr, graphite_carried_dependence_level_k):
1100 Move from NNC_Polyhedron to C_Polyhedron.
1101 * graphite-interchange.c (compute_array_size_poly,
1102 gather_access_strides): Dito.
1103 * graphite-poly.c (apply_poly_transforms, new_poly_dr, free_poly_bb,
1104 free_scop, pbb_number_of_iterations): Dito.
1105 * graphite-poly.h (struct poly_dr, pdr_nb_subscripts, struct poly_bb,
1106 pbb_dim_iter_domain, struct scop): Dito.
1107 * graphite-ppl.c (new_Constraint_System_from_Cloog_Matrix,
1108 new_Cloog_Domain_from_ppl_Polyhedron,
1109 new_Cloog_Domain_from_ppl_Pointset_Powerset, ppl_set_coef_gmp,
1110 ppl_insert_dimensions_pointset, ppl_insert_dimensions_pointset,
1111 ppl_strip_loop, ppl_strip_loop, ppl_print_polyhedron_matrix,
1112 ppl_print_powerset_matrix, debug_ppl_polyhedron_matrix,
1113 debug_ppl_powerset_matrix, ppl_read_polyhedron_matrix): Dito.
1114 * graphite-ppl.h (ppl_Pointset_Powerset_C_Polyhedron_t,
1115 new_C_Polyhedron_from_Cloog_Matrix, ppl_print_powerset_matrix,
1116 debug_ppl_powerset_matrix, ppl_insert_dimensions_pointset): Dito.
1117 * graphite-sese-to-poly.c (build_pbb_scattering_polyhedrons,
1118 build_loop_iteration_domains, ppl_constraint_type_from_tree_code,
1119 add_condition_to_domain, add_condition_to_pbb, build_scop_context,
1120 build_scop_iteration_domain, build_poly_dr): Dito
1122 2009-07-09 Sebastian Pop <sebastian.pop@amd.com>
1124 * testsuite/gcc.dg/graphite/graphite.exp: Added a rule to execute
1126 * testsuite/gcc.dg/graphite/run-id-1.c: New.
1128 2009-07-09 Sebastian Pop <sebastian.pop@amd.com>
1130 * graphite-sese-to-poly.c (build_loop_iteration_domains): Add the
1131 positivity constraint on the symbolic number of iterations.
1133 2009-07-09 Sebastian Pop <sebastian.pop@amd.com>
1135 * graphite-sese-to-poly.c (build_loop_iteration_domains): Rewrite.
1137 2009-07-09 Sebastian Pop <sebastian.pop@amd.com>
1138 Tobias Grosser <grosser@fim.uni-passau.de>
1140 * graphite-clast-to-gimple.c (build_scop_context): Removed.
1141 (build_cloog_prog): Directly use SCOP_CONTEXT.
1142 * graphite-poly.c (new_scop): Initialize SCOP_CONTEXT.
1143 (free_scop): Free SCOP_CONTEXT.
1144 (print_scop_context): New.
1145 (print_scop): Call print_scop_context.
1146 (debug_scop_context): New.
1147 * graphite-poly.h (print_scop_context, debug_scop_context): Declared.
1148 (struct scop): Added field context.
1149 (SCOP_CONTEXT): New.
1150 * graphite-sese-to-poly.c (add_param_constraints): New.
1151 (build_scop_context): New.
1152 (build_poly_scop): Call build_scop_context.
1154 2009-07-09 Sebastian Pop <sebastian.pop@amd.com>
1156 * graphite-clast-to-gimple.c (gmp_cst_to_tree): Moved...
1157 * graphite-ppl.c (ppl_set_inhomogeneous_gmp, ppl_set_coef_gmp): New.
1158 (ppl_set_inhomogeneous, ppl_set_coef): Moved...
1159 * graphite-ppl.h: Include double-int.h and tree.h.
1160 (ppl_set_inhomogeneous_gmp, ppl_set_coef_gmp): Declared.
1161 (ppl_set_inhomogeneous, ppl_set_coef): ...here.
1162 (gmp_cst_to_tree): ...here. Reimplemented using mpz_get_double_int.
1163 (tree_int_to_gmp, ppl_set_inhomogeneous_tree, ppl_set_coef_tree): New.
1165 2009-07-09 Sebastian Pop <sebastian.pop@amd.com>
1167 * graphite-clast-to-gimple.c (clast_to_gcc_expression_red): Generate
1168 POINTER_PLUS_EXPR for pointer types.
1169 (clast_to_gcc_expression): Same.
1171 2009-07-09 Sebastian Pop <sebastian.pop@amd.com>
1173 * graphite-poly.c (print_scattering_function): Early return when
1174 PBB_TRANSFORMED_SCATTERING is not initialized.
1175 (print_pbb_domain): Early return when PBB_DOMAIN is not initialized.
1177 2009-07-08 Sebastian Pop <sebastian.pop@amd.com>
1179 * tree-parloops.c (analyze_reduction_list): Remove unused variable
1182 2009-07-08 Razya Ladelsky <razya@il.ibm.com>
1184 * tree-parloops.c (analyze_reduction_list): Change return
1186 (try_create_reduction_list): Move the call to
1187 analyze_reduction_list to the beginining.
1188 Call reduction_phi with analyzed_reductions as argument
1189 instead of reduction_list.
1191 2009-07-08 Tobias Grosser <grosser@fim.uni-passau.de>
1193 * Merge from mainline (r148296:149346)
1195 2009-07-07 Sebastian Pop <sebastian.pop@amd.com>
1197 * graphite-scop-detection.c (graphite_can_represent_init): New.
1198 (graphite_can_represent_scev): Call graphite_can_represent_init:
1199 check that the initial value does not contain multiplications of
1201 (stmt_has_simple_data_refs_p): New.
1202 (stmt_simple_for_scop_p): Call stmt_simple_for_scop_p.
1203 (is_simple_operand): Fix formatting.
1204 * graphite-sese-to-poly.c (try_generate_gimple_bb): Fix formatting.
1206 2009-07-07 Sebastian Pop <sebastian.pop@amd.com>
1208 * testsuite/gcc.dg/graphite/id-13.c: New.
1209 * graphite-sese-to-poly.c (graphite_stmt_p): Do not call
1210 analyze_scalar_evolution, use scalar_evolution_in_region.
1211 (scan_tree_for_params_right_scev): Add extra assert.
1212 (parameter_index_in_region_1): Split from parameter_index_in_region.
1213 (idx_record_params): Use scalar_evolution_in_region.
1214 (find_params_in_bb): Same.
1215 (find_scop_parameters): Same.
1216 (build_loop_iteration_domains): Same.
1217 (create_linear_expr_from_tree): Same.
1218 * sese.c (scalar_evolution_in_region): New.
1219 * sese.h (scalar_evolution_in_region): Declared.
1220 (defined_in_sese_p): New.
1221 * tree-scalar-evolution.c (compute_overall_effect_of_inner_loop): Not
1223 * tree-scalar-evolution.h (compute_overall_effect_of_inner_loop):
1226 2009-07-07 Sebastian Pop <sebastian.pop@amd.com>
1228 * Makefile.in: Replace dependences on tree-chrec.h with SCEV_H.
1229 TREE_DATA_REF_H also implies SCEV_H.
1231 2009-07-07 Sebastian Pop <sebastian.pop@amd.com>
1233 * graphite-poly.c (print_scop_params): New.
1234 (print_scop): Call print_scop_params.
1235 (debug_scop_params): New.
1236 * graphite-poly.h (print_scop_params, debug_scop_params): Declared.
1238 2009-07-07 Li Feng <nemokingdom@gmail.com>
1240 * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-4.c: New.
1241 * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-5.c: New.
1242 * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-6.c: New.
1243 * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-7.c: New.
1244 * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-8.c: New.
1245 * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-9.c: New.
1247 2009-07-07 Li Feng <nemokingdom@gmail.com>
1249 * graphite-clast-to-gimple.c (mark_loops_parallel): Dump information
1250 for dependency checking part.
1251 * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-1.c: Add
1252 tests for dependency checking.
1253 * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-2.c: Ditto.
1254 * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-3.c: Ditto.
1255 * testsuite/gcc.dg/graphite/graphite_autopar/graphite_autopar.exp: Add
1256 flag -fdump-tree-graphite-all for autopar testsuites.
1258 2009-07-06 Sebastian Pop <sebastian.pop@amd.com>
1260 * Makefile.in (tree-ssa-loop-manip.o): Depends on langhooks.h.
1261 * tree-parloops.c (rewrite_phi_with_iv, rewrite_all_phi_nodes_with_iv,
1262 canonicalize_loop_ivs): Moved...
1263 * tree-ssa-loop-manip.c: ... here. Include langhooks.h.
1265 2009-07-06 Sebastian Pop <sebastian.pop@amd.com>
1267 * tree-parloops.c (try_create_reduction_list): Pass an extra
1268 argument analyzed_reductions. Call analyze_reduction_list.
1269 (gen_parallel_loop): Do not call analyze_reduction_list.
1270 (parallelize_loops): Init and finalize analyzed_reductions.
1272 2009-07-06 Li Feng <nemokingdom@gmail.com>
1274 * testsuite/gcc.dg/graphite/graphite_autopar/graphite_autopar.exp:
1275 Added flag -fno-loop-strip-mine for autopar testcase.
1277 2009-07-04 Li Feng <nemokingdom@gmail.com>
1279 * graphite-dependences.c (graphite_carried_dependence_level_k): Use
1280 transformed scattering dimension instead of unmatch orignal when
1281 calling dependence_polyhedron.
1283 2009-06-30 Sebastian Pop <sebastian.pop@amd.com>
1285 * opts.c (decode_options): Enable flag_loop_strip_mine at -O2.
1287 2009-06-30 Sebastian Pop <sebastian.pop@amd.com>
1289 * graphite-poly.c (pbb_number_of_iterations): Check for returned
1290 value 1 from ppl_Pointset_Powerset_NNC_Polyhedron_maximize.
1292 2009-06-30 Sebastian Pop <sebastian.pop@amd.com>
1294 * graphite-blocking.c (pbb_strip_mine_profitable_p): New.
1295 (pbb_do_strip_mine): Call pbb_strip_mine_profitable_p.
1296 * graphite-poly.c (pbb_number_of_iterations): New.
1297 * graphite-poly.h (pbb_number_of_iterations): Declared.
1298 (pbb_iterator_dim, pbb_parameter_dim): New.
1300 2009-06-29 Sebastian Pop <sebastian.pop@amd.com>
1302 * graphite-clast-to-gimple.c (graphite_create_new_loop): Revert the
1303 last commit on type of lower and upper bound of loops.
1305 2009-06-29 Li Feng <nemokingdom@gmail.com>
1307 * Makefile.in (graphite-clast-to-gimple.o): Added dependence on
1308 graphite-dependences.h.
1309 * graphite-clast-to-gimple.c (new_bb_pbb_def): New.
1310 (mark_bb_with_pbb): New.
1311 (get_stmtfor_depth): New.
1312 (find_pbb_via_hash): New.
1313 (dependency_in_loop_p): New.
1314 (mark_loops_parallel): New.
1315 (free_aux_in_new_loops): New.
1316 (translate_clast): Add parameter BB_PBB_MAPPING. Mark newly created
1317 bb with it's relevant pbb. Mark newly created loops. Remove mark
1318 innermost loop parallel without checking.
1319 (gloog): Add parameter BB_PBB_MAPPING.
1320 * graphite-clast-to-gimple.h (struct bb_pbb_def): New.
1321 (gloog): Change declaration.
1322 (mark_loop_parallel): Make extern.
1323 (free_aux_in_new_loops): Declare.
1324 (bb_pbb_map_hash): New.
1325 (eq_bb_pbb_map): New.
1326 * graphite.c (graphite_transform_loops): Added BB_PBB_MAPPING. Trigger
1327 auto parallelization when flag_graphite_force_parallel is set.
1328 (graphite_finalize): Added free_aux_in_new_loops.
1329 * tree-parloops.c (parallelize_loops): Only generate parallel code for
1330 the innermost loop that marked parallel. Use
1331 flag_graphite_force_parallel instead of loop->can_be_parallel.
1332 (loop_parallel_p): Move inner most checking out of function.
1334 2009-06-26 Sebastian Pop <sebastian.pop@amd.com>
1336 * graphite-clast-to-gimple.c (graphite_create_new_loop): Make the
1337 type of lower and upper bound of loops signed long int.
1339 2009-06-26 Sebastian Pop <sebastian.pop@amd.com>
1341 * cfgloopmanip.c (create_empty_loop_on_edge): Gimplify the loop exit
1342 expression outside the loop.
1344 2009-06-26 Sebastian Pop <sebastian.pop@amd.com>
1346 * gcc.dg/graphite/interchange-8.c: New.
1348 2009-06-26 Sebastian Pop <sebastian.pop@amd.com>
1350 * gcc.dg/graphite/interchange-0.c: XFailed.
1351 * gcc.dg/graphite/interchange-5.c: XFailed.
1352 * gcc.dg/graphite/interchange-6.c: XFailed.
1354 2009-06-26 Sebastian Pop <sebastian.pop@amd.com>
1356 * graphite-interchange.c (compute_array_size_poly): The end of the
1357 recursion should return 1.
1359 2009-06-26 Sebastian Pop <sebastian.pop@amd.com>
1361 * graphite-interchange.c (compute_array_size_cstr): Allow the
1362 subscript multiplier to be -1.
1363 (compute_array_size): Use PDR_DATA_CONTAINER and not PDR_ACCESSES.
1364 * graphite-poly.c (new_poly_dr): Takes an extra argument for the
1365 data_container. Initializes PDR_DATA_CONTAINER.
1366 (print_pdr_access_layout): New.
1367 (print_pdr): Call print_pdr_access_layout. Print PDR_DATA_CONTAINER.
1368 * graphite-poly.h (struct poly_dr): Adjust comment. Add a new field
1370 (PDR_DATA_CONTAINER): New.
1371 (new_poly_dr): Update declaration.
1372 * graphite-sese-to-poly.c (pdr_add_data_dimensions): New.
1373 (build_poly_dr): Call pdr_add_data_dimensions.
1375 2009-06-26 Sebastian Pop <sebastian.pop@amd.com>
1377 * graphite-poly.h (struct poly_dr): Fix comment.
1378 * graphite-sese-to-poly.c (pdr_add_alias_set): New.
1379 (pdr_add_memory_accesses): New.
1380 (build_poly_dr): Call pdr_add_memory_accesses and pdr_add_alias_set.
1382 2009-06-26 Sebastian Pop <sebastian.pop@amd.com>
1384 * graphite-poly.c (print_pdrs, debug_pdrs): New.
1385 (print_pbb): Add call to print_pdrs.
1386 * graphite-poly.h (print_pdrs, debug_pdrs): Declared.
1388 2009-06-24 Konrad Trifunovic <konrad.trifunovic@gmail.com>
1389 Li Feng <nemokingdom@gmail.com>
1391 * graphite-dependences.c (graphite_carried_dependence_level_k): New.
1392 (dependency_between_pbbs_p): New.
1393 (lexicographically_gt_p): Assure !empty_p before polyhedron
1394 intersection assign.
1395 (build_lexicographically_gt_constraint): Correct lexicographically
1397 * graphite-dependences.h: New.
1398 * Makefile.in (graphite-dependences.o): Add graphite-dependences.h.
1400 2009-06-24 Sebastian Pop <sebastian.pop@amd.com>
1402 * graphite-clast-to-gimple.c (print_clast_stmt): New.
1403 (gloog): Print to dump_file the generated clast.
1404 * graphite-clast-to-gimple.h (print_clast_stmt): Declared.
1405 * graphite-interchange.c (pbb_do_interchange): Fix dump formatting.
1407 2009-06-24 Sebastian Pop <sebastian.pop@amd.com>
1409 * graphite-poly.c (extend_scattering): Increment
1410 PBB_NB_LOCAL_VARIABLES by the number of added dimensions.
1412 2009-06-24 Sebastian Pop <sebastian.pop@amd.com>
1414 * graphite-interchange.c (compute_array_size_poly): Added exit of
1415 recursion condition. Continue iterating even after the first equality.
1416 (compute_array_size): Same.
1418 2009-06-24 Li Feng <nemokingdom@gmail.com>
1420 * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-1.c: Update
1421 -fdump-tree-final_cleanup to -fdump-tree-optimized.
1422 * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-2.c: Ditto.
1423 * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-3.c: Ditto.
1424 * testsuite/gcc.dg/graphite/graphite_autopar/graphite_autopar.exp: Ditto.
1426 2009-06-23 Sebastian Pop <sebastian.pop@amd.com>
1428 * sese.c (expand_scalar_variables_stmt): Expand scalar variables
1429 only when the use verifies is_gimple_reg.
1431 2009-06-23 Sebastian Pop <sebastian.pop@amd.com>
1433 * graphite-clast-to-gimple.c (build_cloog_prog): Fix memory corruption.
1434 Allocate scaldims after call to unify_scattering_dimensions.
1436 2009-06-23 Sebastian Pop <sebastian.pop@amd.com>
1438 * graphite-clast-to-gimple.c (translate_clast): Fix memory leak.
1440 2009-06-23 Sebastian Pop <sebastian.pop@amd.com>
1441 Albert Cohen <albert.cohen@inria.fr>
1443 * graphite-blocking.c (pbb_strip_mine_loop_depth): Do not use local
1444 variables for the strip mining.
1446 2009-06-23 Sebastian Pop <sebastian.pop@amd.com>
1447 Pranav Garg <pranav.garg2107@gmail.com>
1449 * Makefile.in (OBJS-common): Added graphite-blocking.o.
1450 (graphite-sese-to-poly.o): Moved down to be in lexicographical order.
1451 (graphite-blocking.o): New rule.
1452 (graphite-poly.o, graphite-ppl.o): Moved to be in lexicographical order.
1453 * graphite-blocking.c: New.
1454 * graphite-poly.c (apply_poly_transforms): Call scop_do_strip_mine for
1455 flag_loop_strip_mine.
1456 (psct_scattering_dim_for_loop_depth): New.
1457 * graphite-poly.h (scop_do_strip_mine): Declared.
1458 (psct_add_local_variable): Increment PBB_NB_LOCAL_VARIABLES.
1459 * tree-ssa-loop.c (gate_graphite_transforms): Do not fail when using
1460 flag_loop_strip_mine.
1462 2009-06-23 Sebastian Pop <sebastian.pop@amd.com>
1464 * graphite-poly.c (extend_scattering): Avoid initializing and freeing
1465 a GMP value and a PPL coefficient at each iteration of a loop.
1467 2009-06-23 Sebastian Pop <sebastian.pop@amd.com>
1469 * graphite-dependences.c (dependence_polyhedron): Do not use
1470 pbb_nb_scattering_dims anymore. Use pbb_nb_scattering_orig and
1471 pbb_nb_scattering_transform.
1472 (graphite_legal_transform_dr): Same.
1473 * graphite-poly.c (extend_scattering): Same.
1474 (unify_scattering_dimensions): Same.
1475 (print_scattering_function): Same.
1476 (new_poly_bb): Initialize PBB_NB_SCATTERING_TRANSFORM and
1477 PBB_NB_LOCAL_VARIABLES.
1478 * graphite-poly.h (pbb_nb_scattering): Removed declaration.
1479 (struct poly_bb): Added nb_local_variables and nb_scattering_transform.
1480 (PBB_NB_LOCAL_VARIABLES, PBB_NB_SCATTERING_TRANSFORM): New.
1481 (pbb_nb_scattering_orig, pbb_nb_scattering_transform): New.
1482 (pbb_nb_scattering_dims, pbb_nb_scattering): Removed.
1483 (pbb_nb_scattering_transform): New.
1484 (pbb_nb_local_vars): Return PBB_NB_LOCAL_VARIABLES.
1485 (psco_scattering_dim): Add assert on parameters.
1486 (psct_scattering_dim): Same.
1487 (psct_scattering_dim_for_loop_depth): Declared.
1488 (psct_local_var_dim): New.
1489 (psco_iterator_dim, psco_parameter_dim): Add assert on parameters.
1490 (psct_iterator_dim, psct_parameter_dim): Same. To maintain the
1491 correct layout, call pbb_nb_local_vars.
1492 (psct_add_local_variable, psct_add_scattering_dimension): New.
1493 * graphite-sese-to-poly.c (build_pbb_scattering_polyhedrons):
1494 Initialize PBB_NB_SCATTERING_TRANSFORM.
1496 2009-06-23 Sebastian Pop <sebastian.pop@amd.com>
1498 * graphite-ppl.c (set_inhomogeneous): Renamed ppl_set_inhomogeneous.
1499 (set_coef): Renamed ppl_set_coef.
1500 * graphite-ppl.h (ppl_set_inhomogeneous, ppl_set_coef): Declared.
1502 2009-06-23 Sebastian Pop <sebastian.pop@amd.com>
1504 * graphite-dependences.c (build_pairwise_scheduling_inequality): Don't
1505 test a boolean against 1.
1506 * graphite-interchange.c (pbb_interchange_loop_depths): Do not build
1507 a new polyhedron for the PBB_TRANSFORMED_SCATTERING.
1508 (pbb_do_interchange): Returns true when a transform has been performed.
1509 (scop_do_interchange): Same.
1510 * graphite-poly.c (apply_poly_transforms): Use the return value of
1511 scop_do_interchange.
1512 * graphite-poly.h (scop_do_interchange): Update declaration.
1514 2009-06-23 Tobias Grosser <grosser@fim.uni-passau.de>
1516 * graphite-clast-to-gimple.c (gloog): Reset loop->aux right
1518 * sese.c (sese_reset_aux_in_loops): New.
1519 * sese.h (sese_reset_aux_in_loops): New.
1521 2009-06-19 Sebastian Pop <sebastian.pop@amd.com>
1523 * graphite-sese-to-poly.c (scan_tree_for_params_int): Pass in the
1524 multiplier and multiply the constant by the multiplier.
1525 (scan_tree_for_params): Bound the multiplier to its MULT_EXPR.
1526 (build_poly_dr): Do not use the multiplier to define the subscript.
1528 2009-06-19 Sebastian Pop <sebastian.pop@amd.com>
1530 * graphite-poly.c (new_poly_dr): Pass an extra argument for the
1531 compiler's data reference. Initialize PDR_CDR.
1532 (print_pdr): Call dump_data_reference.
1533 * graphite-poly.h (struct poly_dr): Rename black_box into pbb.
1534 Add compiler_dr field.
1535 (PDR_BB): Renamed PDR_PBB.
1537 * graphite-sese-to-poly.c (build_poly_dr): Pass to new_poly_dr
1538 GCC's data reference representation.
1539 * tree-data-ref.c (debug_data_references, debug_data_reference): New.
1540 * tree-data-ref.h (debug_data_references, debug_data_reference): Decl.
1542 2009-06-19 Sebastian Pop <sebastian.pop@amd.com>
1544 * graphite-poly.c (print_scattering_function): Also print the layout.
1545 * graphite-poly.h (pbb_nb_local_vars): New.
1547 2009-06-19 Sebastian Pop <sebastian.pop@amd.com>
1549 * graphite-poly.c (print_pbb_domain): Also print the layout names.
1551 2009-06-19 Sebastian Pop <sebastian.pop@amd.com>
1553 * graphite-poly.c (print_pdr, debug_pdr): New.
1554 * graphite-poly.h (print_pdr, debug_pdr): Declared.
1555 (PDR_BASE): Removed.
1557 2009-06-18 Sebastian Pop <sebastian.pop@amd.com>
1559 * gcc/testsuite/gcc.dg/graphite/interchange-{1..7}.c: New avatars of
1562 2009-06-18 Sebastian Pop <sebastian.pop@amd.com>
1564 * graphite-interchange.c (compute_subscript): Allow also -1 in the
1565 subscript identification column.
1566 (pbb_do_interchange): Print to dump_file that some loops "will be
1567 interchanged". Rely on that chain of characters in the testcases.
1568 * gcc.dg/graphite/interchange-0.c: New.
1569 * gcc.dg/graphite/graphite.exp: Iterate over the testsuite
1570 interchange-*.c files and compile them with -floop-interchange.
1572 2009-06-18 Pranav Garg <pranav.garg2107@gmail.com>
1574 * graphite-interchange.c (interchange_profitable_p): Renamed
1575 pbb_interchange_profitable_p.
1577 2009-06-18 Sebastian Pop <sebastian.pop@amd.com>
1578 Harsha Jagasia <harsha.jagasia@amd.com>
1579 Pranav Garg <pranav.garg2107@gmail.com>
1581 * graphite-interchange.c (interchange_profitable_p): Make static.
1582 (pbb_interchange_loop_depths, pbb_do_interchange,
1583 scop_do_interchange): New.
1584 * graphite-poly.c (apply_poly_transforms): Call scop_do_interchange
1585 for flag_loop_interchange.
1586 * graphite-poly.h (scop_do_interchange): Declared.
1587 * tree-ssa-loop.c (gate_graphite_transforms): Do not fail when
1588 flag_loop_interchange is used.
1590 2009-06-18 Sebastian Pop <sebastian.pop@amd.com>
1592 * graphite-dependences.c (dependence_polyhedron): Update use of
1593 pbb_nb_scattering_dims.
1594 * graphite-poly.h (pbb_nb_scattering_dims): Do not pass SCOP.
1595 (pbb_nb_scattering): Update use of pbb_nb_scattering_dims.
1596 (psco_scattering_dim, psct_scattering_dim, psco_iterator_dim,
1597 psct_iterator_dim, psco_parameter_dim, psct_parameter_dim): New.
1599 2009-06-16 Sebastian Pop <sebastian.pop@amd.com>
1601 * graphite.c: Cleanup foo.
1603 2009-06-16 Sebastian Pop <sebastian.pop@amd.com>
1605 * Merge from mainline (r143684:148293).
1606 * Disabled libpcp until it gets fixed.
1608 2009-06-05 Sebastian Pop <sebastian.pop@amd.com>
1609 Harsha Jagasia <harsha.jagasia@amd.com>
1611 * graphite-interchange.c: New.
1612 * Makefile.in (graphite-interchange.o): New.
1613 * graphite-poly.h (interchange_profitable_p): Declared.
1614 * graphite-ppl.h (value_max): New.
1616 2009-06-04 Sebastian Pop <sebastian.pop@amd.com>
1618 * graphite-dependences.c (dependence_polyhedron): Use pdr_dim.
1619 * graphite-poly.h: Fix some comments.
1623 2009-06-04 Sebastian Pop <sebastian.pop@amd.com>
1626 (pdr_accessp_nb_subscripts): Renamed pdr_nb_subscripts.
1627 (pdr_accessp_nb_iterators): Renamed pdr_dim_iter_domain.
1628 (pdr_accessp_nb_params): Renamed pdr_nb_params.
1629 (pdr_accessp_alias_set_dim): Renamed pdr_alias_set_dim.
1630 (pdr_accessp_subscript_dim): Renamed pdr_subscript_dim.
1631 (pdr_accessp_iterator_dim): Renamed pdr_iterator_dim.
1632 (pdr_accessp_param_dim): Renamed pdr_parameter_dim.
1633 (pbb_nb_loops): Renamed pbb_dim_iter_domain.
1634 * graphite-clast-to-gimple.c: Same.
1635 * graphite-dependences.c: Same.
1636 * graphite-poly.c: Same.
1637 * graphite-sese-to-poly.c: Same.
1639 2009-06-03 Sebastian Pop <sebastian.pop@amd.com>
1641 * graphite-clast-to-gimple.c (build_iv_mapping): Insert full
1642 expressions for an IV rename, as returned by clast_to_gcc_expression.
1643 (copy_renames): Rename new_name to expr.
1644 * sese.c (debug_rename_elt): Same.
1647 (sese_adjust_liveout_phis): Call force_gimple_operand before using
1648 the information from the rename map.
1649 (rename_variables_in_stmt): Same.
1650 (add_loop_exit_phis): Rename new_name to expr.
1651 (insert_loop_close_phis): Same.
1652 (add_guard_exit_phis): Same. Call force_gimple_operand.
1653 * sese.h (struct rename_map_elt): Rename new_name to expr.
1654 (new_rename_map_elt): Same.
1656 2009-06-03 Sebastian Pop <sebastian.pop@amd.com>
1658 * graphite-clast-to-gimple.c (build_iv_mapping): Use set_rename.
1659 * sese.c (set_rename): Make it extern.
1660 * sese.h (set_rename): Declared.
1662 2009-06-03 Sebastian Pop <sebastian.pop@amd.com>
1664 * graphite-poly.c (extend_scattering): Free values.
1665 * graphite-ppl.c (new_Cloog_Domain_from_ppl_Pointset_Powerset):
1667 (ppl_print_powerset_matrix): Same.
1668 * graphite-scop-detection.c (free_scops_1): New.
1669 (limit_scops): Call free_scops_1.
1670 * graphite-sese-to-poly.c (build_scop_bbs_1): Free dom.
1671 (build_poly_dr): Free PPL coefficients.
1672 * tree-parloops.c (rewrite_all_phi_nodes_with_iv): Free bbs.
1674 2009-06-02 Sebastian Pop <sebastian.pop@amd.com>
1676 * graphite-dependences.c: New.
1677 * graphite-data-ref.c: Removed.
1678 * graphite-data-ref.h: Removed.
1679 * Makefile.in (graphite-data-ref.o): Removed.
1680 (graphite-dependences.o): Added.
1681 * graphite-clast-to-gimple.c: Remove dependence on graphite-data-ref.h.
1682 * graphite-poly.c: Same.
1683 Move the data dependence testing to graphite-dependences.c.
1685 2009-05-19 Tobias Grosser <grosser@fim.uni-passau.de>
1687 * graphite-scop-detection.c (graphite_can_represent_loop): Renamed
1688 from graphite_cannot_represent_loop. Code refactored.
1689 (scopdet_basic_block_info): Call graphite_can_represent_loop.
1691 2009-05-17 Li Feng <nemokingdom@gmail.com>
1693 * testsuite/gcc.dg/graphite/graphite_autopar/graphite_autopar.exp:
1694 Cover all the testcases (not only the filtered ones).
1696 2009-05-17 Tobias Grosser <grosser@fim.uni-passau.de>
1698 * graphite-scop-detection.c (stmt_simple_for_scop_p): Remove
1699 unnecessary check. Update comments. Move check for REAL_TYPE here.
1700 (harmful_stmt_in_bb): Remove checks for conditions. This is already
1701 done in (stmt_simple_for_scop_p).
1703 2009-05-14 Tobias Grosser <grosser@fim.uni-passau.de>
1705 * graphite.c (print_global_statistics): New.
1706 (print_graphite_scop_statistic): New.
1707 (print_graphite_statistics): New.
1708 (graphite_initialize, graphite_transform_loops): Print statistics.
1709 * graphite-scop-detection (build_scops): Print statistics.
1710 (print_graphite_scop_statistics): New.
1711 (print_graphite_statistics): New.
1713 2009-05-13 Sebastian Pop <sebastian.pop@amd.com>
1715 * graphite-clast-to-gimple.c (struct clast_name_index): Removed.
1716 (debug_clast_name_index): Removed.
1717 (debug_clast_name_indexes_1): Removed.
1718 (debug_clast_name_indexes): Removed.
1719 (clast_name_index_elt_info): Removed.
1720 (eq_clast_name_indexes): Removed.
1721 (clast_name_to_index): Removed.
1722 (new_clast_name_index): Removed.
1723 (save_clast_name_index): Removed.
1724 (save_var_name): Moved...
1725 (init_sese_params_index): Removed.
1726 (clast_name_to_gcc): Remove use of name_tree.
1727 (initialize_cloog_names): Same.
1728 (gloog): Do not call init_sese_params_index.
1729 * graphite-sese-to-poly.c (save_var_name): ...here.
1730 (parameter_index_in_region): New.
1731 * sese.c (new_sese): Initialize SESE_PARAMS_NAMES.
1732 (parameter_index_in_region): Removed.
1733 (is_parameter): Remove use of name_tree.
1734 * sese.h (struct name_tree): Removed.
1735 (struct sese): Remove use of name_tree. New field params_names.
1736 (SESE_PARAMS_NAMES): New.
1737 (SESE_PARAMS): Remove duplicate.
1738 (parameter_index_in_region): Removed.
1739 (sese_nb_params): Remove use of name_tree.
1740 (struct clast_name_index): New.
1741 (new_clast_name_index): New.
1742 (clast_name_to_index): New.
1743 (save_clast_name_index): New.
1744 (debug_clast_name_index): New.
1745 (debug_clast_name_indexes_1): New.
1746 (debug_clast_name_indexes): New.
1747 (clast_name_index_elt_info): New.
1748 (eq_clast_name_indexes): New.
1750 2009-05-13 Sebastian Pop <sebastian.pop@amd.com>
1752 * graphite-clast-to-gimple.c (compute_cloog_iv_types_1): Call
1753 pbb_to_depth_to_oldiv. Remove call to oldiv_for_loop.
1754 (graphite_loop_normal_form): Do not pass region. Do not
1755 initialize SESE_OLDIVS.
1756 (build_graphite_loop_normal_form): Update call to
1757 graphite_loop_normal_form.
1758 * sese.c (debug_oldivs): Removed.
1759 (new_sese): Do not initialize SESE_OLDIVS.
1760 (free_sese): Do not free SESE_OLDIVS.
1761 (oldiv_for_loop): Removed.
1762 * sese.h (struct sese): Remove old_ivs.
1763 (SESE_OLDIVS): Removed.
1764 (oldiv_for_loop): Removed.
1766 2009-05-13 Sebastian Pop <sebastian.pop@amd.com>
1768 * graphite-clast-to-gimple.c (clast_name_to_gcc): Pass newivs,
1769 remove ivstack. Remove call to loop_iv_stack_get_iv_from_name,
1770 replaced by a call to newivs_to_depth_to_newiv.
1771 (clast_to_gcc_expression): Pass newivs, remove ivstack.
1772 (clast_to_gcc_expression_red): Same.
1773 (gcc_type_for_clast_expr): Same.
1774 (gcc_type_for_clast_eq): Same.
1775 (graphite_translate_clast_equation): Same.
1776 (graphite_create_guard_cond_expr): Same.
1777 (graphite_create_new_guard): Same.
1778 (graphite_create_new_loop): Same.
1779 (build_iv_mapping): Same.
1780 (translate_clast): Same.
1782 (loop_iv_stack_patch_for_consts): Removed. *
1783 sese.c (iv_stack_entry_is_constant): Removed.
1784 (iv_stack_entry_is_iv): Removed.
1785 (loop_iv_stack_push_iv): Removed.
1786 (loop_iv_stack_insert_constant): Removed.
1787 (loop_iv_stack_pop): Removed.
1788 (loop_iv_stack_get_iv): Removed.
1789 (loop_iv_stack_get_iv_from_name): Removed.
1790 (debug_loop_iv_stack): Removed.
1791 (free_loop_iv_stack): Removed.
1792 (loop_iv_stack_remove_constants): Removed. *
1793 sese.h (iv_stack_entry_kind): Removed.
1794 (iv_stack_entry_data_union): Removed.
1795 (iv_stack_entry_struct): Removed.
1796 (iv_stack_entry_p): Removed.
1797 (debug_oldivs, debug_loop_iv_stack, loop_iv_stack_insert_constant,
1798 loop_iv_stack_get_iv_from_name, loop_iv_stack_push_iv,
1799 loop_iv_stack_get_iv, loop_iv_stack_remove_constants,
1800 loop_iv_stack_pop, free_loop_iv_stack): Removed.
1801 (gbb_loop_at_index): Fix indenting.
1802 (gbb_loop_index): Removed.
1804 2009-05-13 Sebastian Pop <sebastian.pop@amd.com>
1806 * graphite-clast-to-gimple.c (clast_name_to_gcc): Do not use strcmp.
1807 Call clast_name_to_index.
1809 2009-05-13 Sebastian Pop <sebastian.pop@amd.com>
1811 * graphite-clast-to-gimple.c (clast_name_to_gcc): Pass region,
1812 do not pass params. Get params from SESE_PARAMS.
1813 (clast_to_gcc_expression): Same.
1814 (clast_to_gcc_expression_red): Same.
1815 (gcc_type_for_clast_eq): Same.
1816 (graphite_translate_clast_equation): Same.
1817 (graphite_create_new_loop): Same.
1818 * sese.c (rename_variables_in_stmt): Fix comment.
1820 2009-05-13 Sebastian Pop <sebastian.pop@amd.com>
1822 * graphite-clast-to-gimple.c (graphite_create_new_loop): Pass
1824 Call save_clast_name_index.
1825 (translate_clast): Pass newivs_index.
1826 (gloog): Create and free newivs_index.
1828 2009-05-13 Sebastian Pop <sebastian.pop@amd.com>
1830 * graphite-clast-to-gimple.c (clast_name_index): New structure.
1831 (clast_name_index_p): New type.
1832 (debug_clast_name_index): New.
1833 (debug_clast_name_indexes_1): New.
1834 (debug_clast_name_indexes): New.
1835 (clast_name_index_elt_info): New.
1836 (eq_clast_name_indexes): New.
1837 (clast_name_to_index): New.
1838 (new_clast_name_index): New.
1839 (save_clast_name_index): New.
1840 (init_sese_params_index): New.
1841 (gloog): Call init_sese_params_index.
1842 * graphite-clast-to-gimple.h (debug_clast_name_indexes): Declared.
1843 * sese.c (new_sese): Initialize SESE_PARAMS_INDEX.
1844 (free_sese): Free SESE_PARAMS_INDEX.
1845 * sese.h (struct sese): Add params_index.
1846 (SESE_PARAMS_INDEX): New.
1848 2009-05-13 Sebastian Pop <sebastian.pop@amd.com>
1850 * graphite-clast-to-gimple.c (newivs_to_depth_to_newiv): New.
1851 (graphite_create_new_loop): Pass the newivs vector. Push the
1852 newly created IV to newivs.
1853 (translate_clast): Pass the newivs vector.
1854 (gloog): Create and destroy the newivs vector.
1856 2009-05-13 Sebastian Pop <sebastian.pop@amd.com>
1858 * graphite-clast-to-gimple.c (pbb_to_depth_to_oldiv): New.
1859 (graphite_loop_normal_form): Initialize loop->aux with the unique
1860 IV that has been created.
1862 2009-05-13 Tobias Grosser <grosser@fim.uni-passau.de>
1864 * tree-chrec.c (evolution_function_right_is_integer_cst): Allow
1865 scev with parameters in the base part. They where forbidden
1868 2009-05-11 Li Feng <nemokingdom@gmail.com>
1870 * testsuite/gcc.dg/graphite/graphite.exp: Set different default
1871 compile options by file names.
1872 * testsuite/gcc.dg/graphite/block{0-6}.c: Remove dg-option line.
1873 * testsuite/gcc.dg/graphite/id-{1-9}.c: Ditto.
1874 * testsuite/gcc.dg/graphite/scop-{0-20}.c: Ditto.
1875 * testsuite/gcc.dg/graphite/scop-matmult.c: Ditto.
1877 2009-05-08 Li Feng <nemokingdom@gmail.com>
1879 * testsuite/gcc.dg/graphite/graphite_autopar/graphite_autopar.exp: New.
1880 * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-1.c: New.
1881 * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-2.c: New.
1882 * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-3.c: New.
1884 2009-05-07 Tobias Grosser <grosser@fim.uni-passau.de>
1886 * graphite-scop-detection (build_scops_1): Fix little bug introduced
1889 2009-05-07 Tobias Grosser <grosser@fim.uni-passau.de>
1891 * graphite-scop-detection.c (graphite_can_represent_scev): Only
1892 allow integer constant strides.
1893 (graphite_can_represent_expr): Depend on outermost_loop.
1894 (stmt_simple_memref_p, graphite_cannot_represent_loop,
1895 harmful_stmt_in_bb, is_simple_operand, stmt_simple_for_scop_p,
1896 build_scops_1): Same.
1897 (scopdet_basic_block_info): Same and insert layered SCoP
1899 (try_generate_gimple_bb): Cleanup.
1900 (build_scops): Enable data references.
1902 * testsuite/gcc.dg/graphite/id-5.c: New.
1903 * testsuite/gcc.dg/graphite/id-9.c: New.
1904 * tree-chrec.c (evolution_function_right_is_integer_cst): New.
1905 * tree-chrec.h (evolution_function_right_is_integer_cst): New.
1907 2009-05-06 Tobias Grosser <grosser@fim.uni-passau.de>
1909 * sese.c (expand_scalar_variables_ssa_name): Only build expressions,
1910 that we have not yet built for this SCoP.
1912 2009-05-06 Tobias Grosser <grosser@fim.uni-passau.de>
1914 * sese.c (expand_scalar_variables_expr): Fix expand_scalar_variables
1915 for complex numbers.
1917 2009-05-06 Tobias Grosser <grosser@fim.uni-passau.de>
1919 * graphite-ppl.c: Fix build if cloog is not available.
1921 2009-05-04 Li Feng <nemokingdom@gmail.com>
1923 * tree-parloops.c (loop_parallel_p): Remove construction of
1924 NITER and REDUCTION_LIST.
1925 (try_get_loop_niter): New.
1926 (try_create_reduction_list): New.
1927 (parallelize_loops): Bypass the failed checkings in autopar
1928 when can_be_parallel in loop structure is set to true.
1930 2009-05-01 Tobias Grosser <grosser@fim.uni-passau.de>
1932 * testsuite/gcc.dg/graphite/id-6.c: Update testcase.
1933 * testsuite/gcc.dg/graphite/scop-3.c: Dito.
1935 2009-05-01 Tobias Grosser <grosser@fim.uni-passau.de>
1937 * graphite-scop-detection.c (stmt_simple_for_scop_p):
1938 Enable EQ_EXPR and NE_EXPR again.
1940 2009-04-30 Tobias Grosser <grosser@fim.uni-passau.de>
1942 * graphite-scop-detection.c (graphite_can_represent_scev):
1943 Add check if scev is affine multivariate.
1944 (harmful_stmt_in_bb): Check if we can represent the conditions.
1945 (scopdet_basic_block_info (basic_block bb, VEC): Pass the loop to
1947 * testsuite/gcc.dg/graphite/id-7.c: New.
1949 2009-04-30 Tobias Grosser <grosser@fim.uni-passau.de>
1951 * graphite-sese-to-poly.c (bb_contains_non_iv_scalar_phi_nodes):
1952 Check all bbs in region, not only the bbs that are represented in
1954 (build_poly_scop): Add newline.
1955 * testsuite/gcc.dg/graphite/id-8.c: New.
1957 2009-04-30 Li Feng <nemokingdom@gmail.com>
1959 * cfgloop.c (alloc_loop): Initialize can_be_parallel to false
1960 when loop initialize.
1961 * cfgloop.h (struct loop): Introduce flag can_be_parallel.
1962 * common.opt: Declare flag_graphite_force_parallel.
1963 * graphite-clast-to-gimple.c (translate_clast): Mark the innermost
1965 * graphite-poly.c (apply_poly_transforms): Introduce
1966 flag_graphite_force_parallel.
1967 * tree-ssa-loop.c (gate_graphite_transforms): ditto.
1968 * toplev.c (process_options): ditto and replace a not correctly
1971 2009-04-30 Li Feng <nemokingdom@gmail.com>
1973 * graphite-clast-to-gimple.c (loop_iv_stack_patch_for_consts):
1974 Change the call of gbb_loop_at_index and/or gbb_loop_index due
1975 to the redefinition.
1976 (compute_cloog_iv_types_1): ditto.
1977 (build_iv_mapping): ditto.
1978 * graphite-sese-to-poly.c (new_gimple_bb): Remove GBB_LOOPS related
1980 (free_gimple_bb): Removed GBB_LOOPS related free part.
1981 (build_bb_loops): Removed.
1982 * sese.h (struct gimple_bb): Removed loops.
1983 (GBB_LOOPS): Removed.
1984 (gbb_loop_at_index): Instead of using GBB_LOOPS, we use sese instead.
1985 (gbb_loop_index): ditto.
1987 2009-04-24 Tobias Grosser <grosser@fim.uni-passau.de>
1989 * graphite-scop-detection.c (graphite_can_represent_scev): Do not
1990 allow non constant strides.
1991 * testsuite/gcc.dg/graphite/scop-20.c: New.
1993 2009-04-24 Sebastian Pop <sebastian.pop@amd.com>
1995 * graphite-scop-detection.c (dot_all_scops): Fix system call
1996 return value warning.
1999 2009-04-24 Sebastian Pop <sebastian.pop@amd.com>
2001 * testsuite/gcc.dg/graphite/id-6.c: Fix pattern.
2002 * testsuite/gcc.dg/graphite/scop-3.c: Same.
2004 2009-04-24 Sebastian Pop <sebastian.pop@amd.com>
2006 * graphite-poly.c (map_into_dep_poly, map_dr_into_dep_poly,
2007 build_pairwise_constraint, dr_equality_constraints,
2008 build_pairwise_scheduling_equality,
2009 build_pairwise_scheduling_inequality, lexicographically_gt_p,
2010 build_lexicographically_gt_constraint, dependence_polyhedron,
2011 graphite_legal_transform_dr, graphite_legal_transform_bb,
2012 graphite_legal_transform): New.
2013 * graphite-poly.h (graphite_legal_transform): Declared.
2014 * graphite-sese-to-poly.c (build_poly_scop): Call to
2015 graphite_legal_transform is disabled for the moment.
2017 2009-04-24 Sebastian Pop <sebastian.pop@amd.com>
2019 * graphite-poly.h (pbb_nb_scattering_dims): New.
2020 (pbb_nb_scattering): Use it.
2022 2009-04-24 Sebastian Pop <sebastian.pop@amd.com>
2024 * graphite-ppl.c (ppl_insert_dimensions_pointset): Add
2025 Pointset_Powerset version of ppl_insert_dimensions.
2026 * graphite-ppl.h (ppl_insert_dimensions_pointset): Declared.
2028 2009-04-24 Sebastian Pop <sebastian.pop@amd.com>
2030 * graphite-ppl.c (ppl_insert_dimensions): Fix formatting.
2032 2009-04-24 Sebastian Pop <sebastian.pop@amd.com>
2034 * graphite-poly.h: Fix comment.
2036 2009-04-24 Sebastian Pop <sebastian.pop@amd.com>
2038 * graphite-sese-to-poly.c (build_poly_dr): Fix data ref multiplier.
2040 2009-04-24 Tobias Grosser <grosser@fim.uni-passau.de>
2042 * sese.c (expand_scalar_variables_stmt): Only iterate over the old
2045 2009-04-24 Tobias Grosser <grosser@fim.uni-passau.de>
2047 * graphite-sese-to-poly.c (var_used_in_not_loop_header_phi_node): New.
2048 (graphite_stmt_p): Represent bbs necessary to build the phi nodes of
2051 2009-04-20 Sebastian Pop <sebastian.pop@amd.com>
2053 * graphite-scop-detection.c (stmt_simple_for_scop_p): Do not
2054 handle EQ_EXPR and NE_EXPR.
2056 2009-04-17 Tobias Grosser <grosser@fim.uni-passau.de>
2058 * graphite-poly.h (poly_dr): Fix comment.
2060 2009-04-09 Sebastian Pop <sebastian.pop@amd.com>
2061 Tobias Grosser <grosser@fim.uni-passau.de>
2063 * graphite-poly.c (new_poly_bb): Do not initialize PBB_DOMAIN
2064 with a zero dimension polyhedron.
2065 (find_scop_parameters): Move the call to scop_set_nb_params here.
2066 (build_loop_iteration_domains): Store in loop->aux the iteration
2068 (build_scop_iteration_domain): Fix PBB_DOMAIN for bbs not surrounded
2069 by any loop in scop.
2070 (build_poly_scop): Do not call scop_set_nb_params.
2072 2009-04-09 Sebastian Pop <sebastian.pop@amd.com>
2073 Tobias Grosser <grosser@fim.uni-passau.de>
2075 * graphite-sese-to-poly.c (add_condition_to_pbb): Pass code to
2076 add_condition_to_domain not GT_EXPR.
2078 2009-04-09 Tobias Grosser <grosser@fim.uni-passau.de>
2080 * graphite-ppl.c (debug_ppl_powerset_matrix): New.
2081 * graphite-ppl.h (debug_ppl_powerset_matrix): New.
2082 * graphite-sese-to-poly.c (add_condition_to_pbb): Use
2083 upper_bound_assign to calculate unions.
2084 * testsuite/gcc.dg/graphite/id-6.c: New.
2086 2009-04-09 Tobias Grosser <grosser@fim.uni-passau.de>
2088 * graphite-scop-detection.c (canonicalize_loop_closed_ssa): Do not
2089 handle abnormal edges.
2091 2009-04-09 Tobias Grosser <grosser@fim.uni-passau.de>
2093 * graphite-poly.c (new_poly_dr, free_poly_dr): New.
2094 (free_poly_bb): Also free poly_drs.
2095 * graphite-poly.h (new_poly_dr, free_poly_dr): New.
2096 (poly_dr): Polyhedron to Pointset_Powerset.
2097 (pdr_accessp_nb_subscripts): Same.
2098 * graphite-sese-to-poly.c (build_poly_dr): Same. And actually build
2101 2009-04-08 Sebastian Pop <sebastian.pop@amd.com>
2103 * graphite-clast-to-gimple.c (initialize_cloog_names): Change cloog
2104 names into more meaningful names.
2106 2009-04-08 Sebastian Pop <sebastian.pop@amd.com>
2108 * testsuite/gfortran.dg/graphite/interchange-1.c: New.
2109 * testsuite/gfortran.dg/graphite/interchange-2.c: New.
2111 2009-04-08 Sebastian Pop <sebastian.pop@amd.com>
2113 * graphite-clast-to-gimple.c (graphite_loop_normal_form): Do not build
2115 * tree-parloops.c (rewrite_phi_with_iv): New.
2116 (rewrite_all_phi_nodes_with_iv): New.
2117 (canonicalize_loop_ivs): Call them.
2119 2009-04-08 Sebastian Pop <sebastian.pop@amd.com>
2121 * graphite-sese-to-poly.c (try_generate_gimple_bb): Use
2122 graphite_find_data_references_in_stmt.
2123 * tree-data-ref.c (graphite_find_data_references_in_stmt): New.
2124 * tree-data-ref.h (graphite_find_data_references_in_stmt): Declared.
2126 2009-04-08 Sebastian Pop <sebastian.pop@amd.com>
2128 * sese.c (add_loop_exit_phis): Don't fail on non SSA_NAME renames.
2130 2009-04-08 Sebastian Pop <sebastian.pop@amd.com>
2132 * graphite-sese-to-poly.c (build_scop_bbs_1): Use bb_in_sese_p
2133 instead of bb_in_region.
2134 (flag_bb_in_region): Same. Renamed flag_bb_in_sese.
2135 (build_sese_conditions): Use flag_bb_in_sese.
2136 * sese.c (register_bb_in_sese): Removed.
2137 (new_sese): Remove initialization of SESE_REGION_BBS.
2138 (free_sese): Do not free SESE_REGION_BBS.
2139 * sese.h (struct sese): Remove field region_basic_blocks.
2140 (SESE_REGION_BBS): Removed.
2141 (bb_in_sese_p): Implement in function of bb_in_region.
2143 2009-04-08 Sebastian Pop <sebastian.pop@amd.com>
2145 * graphite-scop-detection.c (limit_scops): Deal only with single exit
2148 2009-04-08 Tobias Grosser <grosser@fim.uni-passau.de>
2150 * graphite-scop-detection.c (stmt_simple_for_scop_p): Allow NE_EXPR
2152 * graphite-sese-to-poly.c (create_linear_expr_from_tree): New.
2153 (add_condition_to_domain): New.
2154 (add_condition_to_pbb): New.
2155 (add_conditions_to_domain): Cleanup and handle of NE_EXPR and EQ_EXPR.
2156 * testsuite/gcc.dg/graphite/scop-3.c: Update number of detected SCoPs.
2158 2009-04-08 Tobias Grosser <grosser@fim.uni-passau.de>
2160 * graphite-clast-to-gimple.c (build_cloog_prog): ppl_Polyhedron ->
2161 ppl_Pointset_Powerset.
2162 * graphite-poly.c (new_poly_bb, free_poly_bb): Same.
2163 * graphite-poly.h (poly_bb): poly_bb.domain Same.
2164 (pbb_nb_loops): Same.
2165 * graphite-sese-to-poly.c (build_loop_iteration_domains,
2166 add_conditions_to_domain): Same.
2167 * graphite-ppl.c (new_Cloog_Domain_from_ppl_Pointset_Powerset): New.
2168 (ppl_print_polyhedron_matrix): ppl_Polyhedron_t ->
2169 ppl_const_Polyhedron_t.
2170 (ppl_print_powerset_matrix): New.
2171 * graphite-ppl.h (new_Cloog_Domain_from_ppl_Pointset_Powerset,
2172 ppl_print_powerset_matrix): New.
2173 (ppl_print_polyhedron_matrix): Updated.
2175 2009-04-07 Sebastian Pop <sebastian.pop@amd.com>
2177 * tree-scalar-evolution.c (analyze_scalar_evolution_1): Fix comment.
2179 2009-04-07 Sebastian Pop <sebastian.pop@amd.com>
2181 * graphite-poly.c (extend_scattering): Fix indenting. Free cstr.
2182 (print_iteration_domains, debug_iteration_domain,
2183 debug_iteration_domains): New.
2184 * graphite-poly.h (print_iteration_domains, debug_iteration_domain,
2185 debug_iteration_domains): Declared.
2186 * graphite-sese-to-poly.c (build_pbb_scattering_polyhedrons): Fix
2189 2009-04-03 Tobias Grosser <grosser@fim.uni-passau.de>
2190 Sebastian Pop <sebastian.pop@amd.com>
2192 * graphite-poly.h (print_iteration_domain): New.
2193 * graphite-sese-to-poly.c (add_conditions_to_domain): Fixed bug.
2194 (build_sese_conditions_1, build_sese_conditions_after,
2195 build_sese_conditions_before): New.
2196 (build_sese_conditions): Rewritten.
2198 2009-04-03 Sebastian Pop <sebastian.pop@amd.com>
2199 Tobias Grosser <grosser@fim.uni-passau.de>
2201 Cleanup of code generation liveouts.
2202 * graphite-clast-to-gimple.c (translate_clast): Use a single
2203 rename_map instead of one per translated statement.
2204 Do not use SESE_LIVEOUT_RENAMES.
2205 (graphite_loop_normal_form): Do not use SESE_REDUCTION_LIST.
2206 (gloog): Do not use SESE_LIVEOUT_RENAMES.
2207 * graphite-scop-detection.c (harmful_stmt_in_bb): Return the close
2208 phi node of a reduction: when a loop contains a reduction used outside
2209 the loop, there should be a scalar close phi node on the exit block.
2210 * sese.c (new_sese): Do not initialize SESE_LIVEOUT,
2211 SESE_LIVEOUT_RENAMES, and SESE_REDUCTION_LIST.
2212 (free_sese): Do not free them.
2213 (sese_build_liveouts_use): Do not use them.
2214 (sese_build_liveouts_bb): Same.
2215 (sese_build_liveouts): Same.
2216 (sese_insert_phis_for_liveouts): Same.
2217 (sese_adjust_phis_for_liveouts): Same. Renamed sese_adjust_liveout_phis.
2218 (defined_in_loop_p): New.
2219 (alive_after_loop): New.
2220 (close_phi_not_yet_inserted_p): New.
2221 (struct alep, alep_p): New.
2222 (add_loop_exit_phis): Remove from the rename_map all the names defined
2223 in the code generated loop.
2224 (insert_loop_close_phis): Traverse the rename_map passed to it.
2225 Don't use SESE_LIVEOUT_RENAMES.
2226 (default_liveout_before_guard): Renamed default_before_guard.
2227 (insert_guard_phis): Do not use SESE_LIVEOUT_RENAMES.
2228 (graphite_copy_stmts_from_block): Do not directly call set_rename.
2229 (register_sese_liveout_renames): Removed.
2230 (copy_bb_and_scalar_dependences): Do not call it.
2231 * sese.h (struct sese): Removed fields: liveout, liveout_renames, and
2233 (SESE_LIVEOUT): Removed.
2234 (SESE_LIVEOUT_RENAMES): Removed.
2235 (SESE_REDUCTION_LIST): Removed.
2236 (sese_build_liveouts): Removed.
2237 (sese_adjust_phis_for_liveouts): Renamed sese_adjust_liveout_phis.
2238 (insert_loop_close_phis): Pass a htab_t instead of a sese.
2239 (insert_guard_phis): Same.
2240 (rename_map_elt): Declare a VEC of them.
2241 * tree-parloops.c (canonicalize_loop_ivs): reduction_list contains
2242 trees not pointers to trees.
2244 Rewrite in canonical close SSA form:
2245 * graphite-scop-detection.c (contains_only_close_phi_nodes): New.
2246 (limit_scops): Close the scop after the block containing the close phi
2248 (canonicalize_loop_closed_ssa): New.
2249 (canonicalize_loop_closed_ssa_form): New.
2250 (build_scops): Call canonicalize_loop_closed_ssa_form.
2252 * graphite-sese-to-poly.c: Fix typos.
2254 2009-04-03 Sebastian Pop <sebastian.pop@amd.com>
2256 * graphite-poly.c (print_scattering_function, print_pbb_domain):
2258 (dump_gbb_conditions, dump_gbb_cases, print_iteration_domain): New.
2259 (print_pbb): Add conditions.
2261 2009-04-01 Tobias Grosser <grosser@fim.uni-passau.de>
2262 Sebastian Pop <sebastian.pop@amd.com>
2264 * graphite-scop-detection.c (bb_in_sd_region): Use bb_in_region.
2265 * graphite-sese-to-poly.c (all_non_dominated_preds_marked_p): New.
2266 (build_scop_bbs_1): New.
2267 (build_scop_bbs): Rewrite.
2268 * sese.h (bb_in_region): New.
2270 2009-03-29 Tobias Grosser <grosser@fim.uni-passau.de>
2272 * graphite-poly.c (new_poly_bb, free_poly_bb): Initialize/free
2274 (print_scop): Style.
2275 * graphite-poly.h (poly_bb): Add drs vector.
2276 (PBB_DRS): Add accessor.
2277 * graphite-sese-to-poly.c (build_poly_dr): New.
2278 (build_pbb_drs, build_scop_drs): New.
2279 (build_poly_scop): call build_scop_drs (Disabled at the moment).
2281 2009-03-29 Tobias Grosser <grosser@fim.uni-passau.de>
2283 * tree-ssa-loop.c: Include forgotten toplev.h
2285 2009-03-29 Tobias Grosser <grosser@fim.uni-passau.de>
2287 * graphite-poly.c: (apply_poly_transforms): sorry -> gcc_unreachable.
2288 * testsuite/gcc.dg/graphite/pr37883.c: Remove -floop-*
2289 * testsuite/gcc.dg/graphite/pr37928.c: Same
2290 * testsuite/gcc.dg/graphite/pr38409.c: Same
2291 * testsuite/gcc.dg/graphite/pr38498.c: Same
2292 * testsuite/gcc.dg/graphite/pr38559.c: Same
2293 * testsuite/gcc.dg/graphite/pr39335.c: Same
2294 * testsuite/gcc.dg/graphite/pr39335_1.c: Same
2295 * testsuite/gfortran.dg/graphite/block-2.f: Same
2296 * tree-ssa-loop.c (gate_graphite_transforms): Always fail if called
2299 2009-03-28 Tobias Grosser <grosser@fim.uni-passau.de>
2301 * graphite-sese-to-poly.c (ref_nb_loops, build_access_matrix_with_af,
2302 build_access_matrix, build_scop_data_accesses): Remove access function
2303 building. (We get a new version soon).
2304 (build_bb_loops, scan_tree_for_params_right_scev): Update.
2305 * sese.h (nb_loops_around_loop_in_sese): Remove.
2306 (sese_loop_depth): Do not use SESE_LOOP_NEST any more.
2308 2009-03-27 Tobias Grosser <grosser@fim.uni-passau.de>
2309 Sebastian Pop <sebastian.pop@amd.com>
2311 * graphite-scop-detection.c (struct scopdet_info): Rename last
2313 (scopdet_basic_block_info, build_scops_1): Don't use
2314 CDI_POST_DOMINATORS. CDI_POST_DOMINATORS should never be used.
2316 2009-03-26 Tobias Grosser <grosser@fim.uni-passau.de>
2317 Sebastian Pop <sebastian.pop@amd.com>
2319 * graphite-clast-to-gimple.c (gloog): Call sese_build_liveouts.
2320 * sese.c (sese_build_liveouts_use): Renamed from
2321 sese_build_livein_liveouts_use. Remove liveins.
2322 (sese_build_liveouts_bb): Renamed from sese_build_livein_liveouts_bb.
2323 Call sese_build_liveouts_use.
2324 (sese_build_liveouts): Renamed from sese_build_livein_liveouts.
2325 Call sese_build_liveouts_bb.
2326 (new_sese, free_sese): Remove liveins.
2327 (sese_add_exit_phis_var): Deleted.
2328 (sese_insert_phis_for_liveouts): Call sese_add_exit_phis_edge
2330 (graphite_copy_stmts_from_block): Remove SESE_NUM_VER.
2332 * sese.h (sese): Remove num_ver and livein.
2333 (SESE_LIVEIN, SESE_LIVEIN_VER, SESE_NUM_VER): Removed.
2335 2009-03-25 Tobias Grosser <grosser@fim.uni-passau.de>
2337 * graphite-sese-to-poly.c (build_scop_scattering): Fix compile.
2339 2009-03-25 Tobias Grosser <grosser@fim.uni-passau.de>
2341 * graphite-sese-to-poly.c (compare_prefix_loops): Removed.
2342 (build_scop_scattering): Do not use compare_prefix_loops any more.
2343 (nb_common_loops): New.
2345 2009-03-24 Sebastian Pop <sebastian.pop@amd.com>
2347 * sese.c (get_new_name_from_old_name): Renamed get_rename.
2348 (register_old_and_new_names): Renamed set_rename.
2350 2009-03-24 Sebastian Pop <sebastian.pop@amd.com>
2352 * graphite-scop-detection.h (nb_reductions_in_loop): Revert removal
2353 of the decl from the previous commit.
2355 2009-03-24 Sebastian Pop <sebastian.pop@amd.com>
2357 * graphite-scop-detection.c (dot_scop): New.
2358 * graphite-scop-detection.h (dot_scop): Declared.
2360 2009-03-24 Sebastian Pop <sebastian.pop@amd.com>
2362 * graphite-sese-to-poly.c (compare_prefix_loops): Fix compare.
2364 2009-03-24 Sebastian Pop <sebastian.pop@amd.com>
2366 * cfgloopmanip.c (create_empty_loop_on_edge): Generate the loop exit
2367 condition at the end of the loop.
2368 * graphite.c (graphite_initialize, graphite_finalize): Print to
2369 dump_file the compiled function.
2370 * graphite-clast-to-gimple.c (graphite_create_new_loop): Update use
2371 of create_empty_loop_on_edge.
2372 (translate_clast): Update the code generation of loops for the new
2374 * cfgloop.h (create_empty_loop_on_edge): Update declaration.
2376 2009-03-24 Sebastian Pop <sebastian.pop@amd.com>
2378 Reverted the patch from 2009-03-19.
2380 2009-03-19 Tobias Grosser <grosser@fim.uni-passau.de>
2382 * graphite-poly.c (new_poly_bb, free_poly_bb): Initialize/free
2384 (print_scop): Style.
2385 * graphite-poly.h (poly_bb): Add drs vector.
2386 (PBB_DRS): Add accessor.
2387 * graphite-sese-to-poly.c (ref_nb_loops): Remove.
2388 (build_access_matrix_with_af, build_access_matrix,
2389 build_scop_data_accesses): Delete.
2390 (build_poly_dr): New.
2391 (build_pbb_drs, build_scop_drs): New.
2392 (build_poly_scop): call build_scop_drs.
2394 2009-03-13 Sebastian Pop <sebastian.pop@amd.com>
2396 * graphite-scop-detection.c (dot_all_scops_1): Close the table
2397 once per basic block.
2399 2009-03-13 Tobias Grosser <grosser@fim.uni-passau.de>
2401 * graphite-scop-detection.c (graphite_can_represent_scev): New.
2402 (graphite_can_represent_expr): Renamed from loop_affine_expr
2404 (stmt_simple_for_scop_p): Call graphite_can_represent_expr.
2405 (graphite_cannot_represent_loop): Add scop_entry to parameters.
2406 (scopdet_basic_block_info): Actually define entry_block.
2407 (stmt_simple_memref_p): Moved here from ...
2409 * tree-data-ref.c (stmt_simple_memref_p): here.
2410 * tree-data-ref.h (stmt_simple_memref_p): Removed.
2412 2009-03-13 Tobias Grosser <grosser@fim.uni-passau.de>
2414 * testsuite/gcc.dg/graphite/id-4.c: New.
2416 2009-03-12 Sebastian Pop <sebastian.pop@amd.com>
2418 * sese.c (expand_scalar_variables_expr): Handle tcc_comparison.
2419 (register_old_and_new_names): Update the content of the map.
2420 When there was already a rename_map_elt in the map at that
2422 (copy_bb_and_scalar_dependences): Do rename_variables after
2423 expand_scalar_variables.
2424 * graphite-clast-to-gimple.c (build_iv_mapping): Update the content
2425 of the map. When there was already a rename_map_elt in the
2426 map at that location, free it.
2427 (translate_clast): Pass the rename_map. Do not initialize and free
2428 a rename_map per stmt_user.
2429 (gloog): Initialize and free one rename_map and pass it to
2432 2009-03-12 Sebastian Pop <sebastian.pop@amd.com>
2434 * sese.c (expand_scalar_variables_stmt,
2435 expand_scalar_variables_ssa_name): Add a gimple_stmt_iterator
2437 (expand_scalar_variables_expr): Handle REALPART_EXPR and IMAGPART_EXPR.
2438 (expand_scalar_variables): Pass to expand_scalar_variables_stmt
2439 the gimple_stmt_iterator of the statement to be expanded.
2440 * graphite-scop-detection.c (is_simple_operand): Do handle
2443 2009-03-11 Tobias Grosser <grosser@fim.uni-passau.de>
2445 * graphite-scop-detection.c (is_simple_operand): Do not handle
2447 * testsuite/gcc.dg/graphite/id-2.c: New.
2449 * graphite-sese-to-poly.c (build_bb_loops,
2450 add_value_to_dim, scan_tree_for_params_right_scev,
2451 scan_tree_for_params_int, scan_tree_for_params, idx_record_params,
2452 find_params_in_bb, build_loop_iteration_domains,
2453 add_conditions_to_domain): Remove subtract.
2455 2009-03-11 Tobias Grosser <grosser@fim.uni-passau.de>
2457 * graphite-clast-to-gimple.c (loop_iv_stack_patch_for_consts,
2458 build_iv_mapping, compute_cloog_iv_types_1, build_cloog_prog):
2459 pbb_loop_at_index -> gbb_loop_at_index.
2460 * graphite-poly.c (new_poly_bb, new_scop): New accessors.
2461 (debug_loop_vec): Delete.
2462 * graphite-poly.h (poly_bb, scop): Change black_box and region to void
2463 pointer. Move LOOPS to gimple_bb_p and insert nb_params.
2464 (PBB_LOOPS): Removed.
2465 (PBB_BLACK_BOX): Insert cast.
2466 (pbb_set_black_box): New setter.
2467 (pbb_loop_at_index, pbb_loop_index): Removed.
2468 (scop_set_region, scop_set_nb_params): New.
2469 * graphite-sese-to-poly.c (new_gimple_bb, free_gimple_bb,
2470 build_scop_scattering, build_bb_loops): Add GBB_LOOPS.
2471 (build_poly_scop): Use scop_set_nb_params.
2472 * sese.h (gimple_bb): Add LOOPS.
2473 (GBB_LOOPS, gbb_loop_index, gbb_loop_at_index): New.
2475 2009-03-11 Tobias Grosser <grosser@fim.uni-passau.de>
2477 Revert previous commit.
2479 2009-03-11 Sebastian Pop <sebastian.pop@amd.com>
2481 * sese.c (expand_scalar_variables_expr): Handle tcc_comparison.
2482 (register_old_and_new_names): Update the content of the map.
2483 When there was already a rename_map_elt in the map at that
2485 (copy_bb_and_scalar_dependences): Do rename_variables after
2486 expand_scalar_variables.
2487 * graphite-clast-to-gimple.c (build_iv_mapping): Update the content
2488 of the map. When there was already a rename_map_elt in the
2489 map at that location, free it.
2490 (translate_clast): Pass the rename_map. Do not initialize and free
2491 a rename_map per stmt_user.
2492 (gloog): Initialize and free one rename_map and pass it to
2495 2009-03-11 Tobias Grosser <grosser@fim.uni-passau.de>
2497 Remove forgotten line in revert.
2499 2009-03-11 Sebastian Pop <sebastian.pop@amd.com>
2501 Revert previous commit.
2503 2009-03-10 Sebastian Pop <sebastian.pop@amd.com>
2505 * sese.c (register_old_and_new_names): Update the content
2506 of the map. When there was already a rename_map_elt in the
2507 map at that location, free it.
2508 (copy_bb_and_scalar_dependences): Do rename_variables after
2509 expand_scalar_variables.
2510 * graphite-clast-to-gimple.c (build_iv_mapping): Update the content
2511 of the map. When there was already a rename_map_elt in the
2512 map at that location, free it.
2513 (translate_clast): Pass the rename_map. Do not initialize and free
2514 a rename_map per stmt_user.
2515 (gloog): Initialize and free one rename_map and pass it to
2518 2009-03-10 Sebastian Pop <sebastian.pop@amd.com>
2520 * graphite-clast-to-gimple.c (translate_clast): context_loop
2523 2009-03-10 Tobias Grosser <grosser@fim.uni-passau.de>
2524 Sebastian Pop <sebastian.pop@amd.com>
2526 * graphite-ppl.c (ppl_insert_dimensions): Fix stupid mistake
2527 of the use of ppl_Polyhedron_map_space_dimensions.
2529 2009-03-10 Tobias Grosser <grosser@fim.uni-passau.de>
2530 Sebastian Pop <sebastian.pop@amd.com>
2532 * graphite-poly.c (unify_scattering_dimensions): Fix types.
2533 * graphite-poly.h (poly_dr_p, poly_dr, POLY_DR_TYPE, PDR_BB,
2534 PDR_TYPE, PDR_ACCESSES, pdr_accessp_nb_subscripts,
2535 pdr_accessp_nb_iterators, pdr_accessp_nb_params,
2536 pdr_accessp_alias_set_dim, pdr_accessp_subscript_dim,
2537 pdr_accessp_iterator_dim, pdr_accessp_param_dim,
2538 pbb_nb_params): New.
2539 (pbb_nb_loops, pbb_nb_scattering, scop_nb_params,
2540 nb_loops_around_pbb): Adapt return types.
2542 2009-03-09 Tobias Grosser <grosser@fim.uni-passau.de>
2544 * Makefile.in (graphite.o, graphite-sese-to-poly.o,
2545 graphite-clast-to-gimple.o, graphite-data-ref.o,
2546 graphite-scop-detection.o, graphite-poly.o): Add
2549 2009-03-05 Tobias Grosser <grosser@fim.uni-passau.de>
2551 * Makefile.in (graphite.o, graphite-sese-to-poly.o,
2552 graphite-clast-to-gimple.o, graphite-data-ref.o,
2553 graphite-scop-detection.o, graphite-poly.o): Add graphite-poly.h.
2555 2009-03-04 Tobias Grosser <grosser@fim.uni-passau.de>
2557 * testsuite/gcc.dg/graphite/pr37485.c: Remove -floop-block
2558 * testsuite/gcc.dg/graphite/pr37828.c: Same.
2559 * testsuite/gcc.dg/graphite/pr37684.c: Same.
2560 * testsuite/gcc.dg/graphite/block-0.c: Same.
2561 * testsuite/gcc.dg/graphite/block-1.c: Same.
2562 * testsuite/gcc.dg/graphite/block-2.c: Same.
2563 * testsuite/gcc.dg/graphite/block-3.c: Same.
2564 * testsuite/gcc.dg/graphite/block-4.c: Same.
2565 * testsuite/gcc.dg/graphite/block-5.c: Same.
2566 * testsuite/gcc.dg/graphite/block-6.c: Same.
2567 * testsuite/gfortran.dg/graphite/pr38083.f90: Same.
2568 * testsuite/gfortran.dg/graphite/block-1.f90: Same.
2569 * testsuite/gfortran.dg/graphite/block-3.f90: Same.
2570 * testsuite/gfortran.dg/graphite/pr37852.f90: Same.
2571 * testsuite/gfortran.dg/graphite/block-4.f90: Same.
2572 * testsuite/gfortran.dg/graphite/pr37980.f90: Same.
2573 * testsuite/gfortran.dg/graphite/pr38953.f90: Same.
2574 * testsuite/gfortran.dg/graphite/pr37857.f90: Same.
2575 * opts.c: Remove -floop-block from -O2.
2576 * graphite-poly.c: Fail if -floop-block -floop-interchange or
2577 -floop-strip-mine are used.
2579 2009-03-04 Tobias Grosser <grosser@fim.uni-passau.de>
2580 Sebastian Pop <sebastian.pop@amd.com>
2582 * graphite-clast-to-gimple.c (build_cloog_prog): Unify scattering
2584 * graphite-poly.c (pbb_compare, graphite_sort_pbbs,
2585 graphite_trans_bb_move_loop, graphite_trans_bb_strip_mine,
2586 strip_mine_profitable_p, is_interchange_valid,
2587 graphite_trans_bb_block, graphite_trans_loop_block,
2588 graphite_trans_scop_block): Temporary removed.
2589 (extend_scattering, unify_scattering_dimensions): New.
2590 (print_scattering_function, graphite_read_transforms):
2591 PBB_SCATTERING -> PBB_TRANSFORMED_SCATTERING.
2592 (graphite_generate_scattering_fns): Removed.
2593 (apply_poly_transforms): Cleanup.
2594 (free_poly_bb): Add PBB_SCATTERING -> PBB_TRANSFORMED_SCATTERING.
2595 (schedule_to_scattering): Moved.
2596 (PBB_STATIC_SCHEDULE, PBB_SCATTERING): Removed.
2597 (PBB_ORIGINAL_SCATTERING, PBB_TRANSFORMED_SCATTERING): New.
2598 (pbb_nb_scattering): New.
2599 (SCOP_ENTRY, SCOP_EXIT, SCOP_REGION_BBS, SCOP_DEP_GRAPH, SCOP_PARAMS,
2600 SCOP_LOOP_NEST, SCOP_PARAMS, SCOP_OLDIVS, SCOP_LIVEOUT_RENAMES):
2602 * graphite-ppl.c (ppl_insert_dimensions): Extended and renamed from
2604 (ppl_strip_loop): PBB_SCATTERING -> PBB_TRANSFORMED_SCATTERING.
2605 * graphite-scop-detection.c (dot_all_scops_1): PBB_SCATTERING
2606 -> PBB_TRANSFORMED_SCATTERING.
2607 * graphite-sese-to-poly.c (build_scop_bbs): Remove region.
2608 (build_pbb_scattering_polyhedron): Moved from schedule_to_scattering.
2609 (build_scop_scattering): Renamed from build_scop_canonical_schedules.
2610 (check_poly_representation): Do not return bool.
2611 (graphite_transform_loops): Reformat.
2612 * sese.h (SESE_ENTRY_BB, SESE_EXIT_BB): New.
2614 2009-03-04 Sebastian Pop <sebastian.pop@amd.com>
2616 * graphite-poly.c (print_pbb_domain, print_pbb, print_scop,
2617 debug_pbb_domain, debug_pbb, debug_scop): New.
2618 * graphite-poly.h (print_pbb_domain, print_pbb, print_scop,
2619 debug_pbb_domain, debug_pbb, debug_scop): Declared.
2621 2009-03-02 Sebastian Pop <sebastian.pop@amd.com>
2624 * tree-parloops.c (canonicalize_loop_ivs): Call fold_convert
2625 when the type precision of the induction variable should be
2626 larger than the type precision of nit.
2627 (gen_parallel_loop): Update use of canonicalize_loop_ivs.
2628 * graphite-clast-to-gimple.c (graphite_loop_normal_form): Same.
2629 * tree-flow.h (canonicalize_loop_ivs): Update declaration.
2631 * testsuite/gcc.dg/graphite/pr39335_1.c: New.
2632 * testsuite/gcc.dg/graphite/pr39335.c: New.
2634 2009-03-02 Sebastian Pop <sebastian.pop@amd.com>
2636 * tree-parloops.c (canonicalize_loop_ivs): reduction_list contains
2637 SSA_NAMES not struct reduction_info.
2639 2009-03-02 Sebastian Pop <sebastian.pop@amd.com>
2641 * sese.c (expand_scalar_variables_expr): Handle ADDR_EXPR.
2643 2009-02-27 Sebastian Pop <sebastian.pop@amd.com>
2644 Tobias Grosser <grosser@fim.uni-passau.de>
2646 * sese.c (new_sese): Initialize SESE_REDUCTION_LIST.
2647 (free_sese): Free SESE_REDUCTION_LIST.
2648 * sese.h (struct sese): Add field reduction_list.
2649 (SESE_REDUCTION_LIST): New.
2650 * graphite-clast-to-gimple.c (graphite_loop_normal_form): Call
2651 canonicalize_loop_ivs on SESE_REDUCTION_LIST.
2653 2009-02-27 Sebastian Pop <sebastian.pop@amd.com>
2654 Tobias Grosser <grosser@fim.uni-passau.de>
2656 * tree-flow.h (gather_scalar_reductions): Use struct loop * instead
2659 2009-02-27 Sebastian Pop <sebastian.pop@amd.com>
2660 Tobias Grosser <grosser@fim.uni-passau.de>
2662 * tree-parloops.c (struct brli, build_reduction_list_info,
2663 analyze_reduction_list, gather_scalar_reductions): New.
2664 (loop_parallel_p): Build a reduction list containing only
2665 PHI_RESULT SSA_NAMEs: call gather_scalar_reductions.
2666 (gen_parallel_loop): Call the analysis analyze_reduction_list.
2667 (parallelize_loops): Now reduction_list is a htab_t of SSA_NAMEs.
2668 * tree-flow.h (gather_scalar_reductions): Declared.
2670 2009-02-26 Sebastian Pop <sebastian.pop@amd.com>
2673 * graphite-clast-to-gimple.c (graphite_loop_normal_form): Do not call
2674 number_of_iterations_exit from a gcc_assert.
2676 2009-02-25 Sebastian Pop <sebastian.pop@amd.com>
2677 Jan Sjodin <jan.sjodin@amd.com>
2679 * output.h (graphite_out_file, graphite_in_file): Declared.
2680 * toplev.c (graphite_out_file, graphite_in_file): New.
2681 (init_asm_output): Initialize graphite_in_file and graphite_out_file.
2682 * graphite-clast-to-gimple.c (build_cloog_prog): Read PBB_SCATTERING.
2683 Don't call schedule_to_scattering.
2684 * common.opt (fgraphite-write, fgraphite-read): New.
2685 * graphite-poly.c: Include output.h.
2686 (print_scattering_function, print_scattering_functions,
2687 debug_scattering_function, debug_scattering_functions,
2688 graphite_write_transforms, graphite_read_transforms,
2689 graphite_generate_scattering_fns): New.
2690 (apply_poly_transforms): Do not apply transform if flag_graphite_read.
2691 Call graphite_generate_scattering_fns, graphite_write_transforms,
2692 graphite_read_transforms.
2693 (new_poly_bb): Initialize PBB_SCATTERING.
2694 (free_poly_bb): Free PBB_SCATTERING.
2695 (schedule_to_scattering): Does not return, initialize PBB_SCATTERING.
2696 * graphite-poly.h (struct poly_bb): Add field scattering.
2697 (PBB_SCATTERING): New.
2698 (print_scattering_function, print_scattering_functions,
2699 debug_scattering_function, debug_scattering_functions): Declared.
2700 * graphite-ppl.c (cloog_matrix_to_ppl_constraint): Matrices contain
2701 GMP values, not integers!
2702 (ppl_print_polyhedron_matrix, debug_ppl_polyhedron_matrix,
2703 ppl_read_polyhedron_matrix): New.
2704 * graphite-ppl.h (ppl_print_polyhedron_matrix,
2705 debug_ppl_polyhedron_matrix,
2706 ppl_read_polyhedron_matrix): Declared.
2707 * Makefile.in (graphite-poly.o): Depends on output.h.
2709 2009-02-23 Sebastian Pop <sebastian.pop@amd.com>
2710 Tobias Grosser <grosser@fim.uni-passau.de>
2713 * graphite-scop-detection.c (stmt_simple_for_scop_p): Analyze
2714 scalar evolutions in the scop_entry->loop_father.
2716 2009-02-23 Sebastian Pop <sebastian.pop@amd.com>
2717 Tobias Grosser <grosser@fim.uni-passau.de>
2719 * graphite.h (ref_nb_loops): Remove declaration.
2720 (struct gimple_bb, gimple_bb_p, GBB_BB, GBB_DATA_REFS, GBB_CONDITIONS,
2721 GBB_CONDITION_CASES, GBB_CLOOG_IV_TYPES, gbb_loop, print_gimple_bb,
2722 debug_gbb): Moved to sese.h.
2725 2009-02-23 Sebastian Pop <sebastian.pop@amd.com>
2726 Tobias Grosser <grosser@fim.uni-passau.de>
2728 * graphite-data-ref.[ch]: Disable.
2730 2009-02-23 Sebastian Pop <sebastian.pop@amd.com>
2731 Tobias Grosser <grosser@fim.uni-passau.de>
2733 * graphite-scop-detection.c (stmt_simple_for_scop_p): Analyze
2734 scalar evolutions in the scop_entry->loop_father.
2736 2009-02-23 Sebastian Pop <sebastian.pop@amd.com>
2738 * graphite-scop-detection.c (nb_reductions_in_loop): Moved here...
2739 (graphite_cannot_represent_loop_niter): Renamed
2740 graphite_cannot_represent_loop. Call nb_reductions_in_loop.
2741 (limit_scops): build_sese_loop_nests does not return a bool.
2742 * graphite-scop-detection.h (nb_reductions_in_loop): Declared.
2743 * sese.c (nb_reductions_in_loop): ... from here.
2744 (graphite_loop_normal_form): ... from here.
2745 (sese_record_loop): Does not fail, so does not return a bool.
2746 (build_sese_loop_nests): Same.
2747 * sese.h (build_sese_loop_nests): Update declaration.
2748 * graphite-clast-to-gimple.c (graphite_loop_normal_form): Moved here...
2749 (build_graphite_loop_normal_form): New.
2750 (gloog): Call build_graphite_loop_normal_form.
2751 * graphite-sese-to-poly.c (build_poly_scop): Don't fail on
2752 build_sese_loop_nests.
2754 * testsuite/gcc.dg/graphite/id-1.c: New.
2756 2009-02-23 Sebastian Pop <sebastian.pop@amd.com>
2757 Tobias Grosser <grosser@fim.uni-passau.de>
2759 * graphite-sese-to-poly.c (scan_tree_for_params): Remove REAL_CST.
2760 The SCoP detection fix is sufficient.
2762 2009-02-21 Sebastian Pop <sebastian.pop@amd.com>
2764 PR tree-optimization/39260
2765 * graphite-scop-detection.c (harmful_stmt_in_bb): Stop a SCoP when
2766 the basic block contains a condition with a real type.
2767 * graphite-sese-to-poly.c (scan_tree_for_params): Handle REAL_CST.
2769 * gcc.dg/graphite/pr39260.c: New.
2771 2009-02-21 Sebastian Pop <sebastian.pop@amd.com>
2773 * graphite-poly.c: Inlcude params.h.
2774 (graphite_trans_loop_block): Use PARAM_LOOP_BLOCK_TILE_SIZE for
2776 * Makefile.in (graphite-poly.o): Depend on PARAMS_H.
2777 * params.def (PARAM_LOOP_BLOCK_TILE_SIZE): Define.
2779 2009-02-20 Sebastian Pop <sebastian.pop@amd.com>
2780 Tobias Grosser <grosser@fim.uni-passau.de>
2782 * graphite-scop-detection.c (dot_all_scops_1,
2783 dot_all_scops): Moved here.
2784 * graphite-scop-detection.h (dot_all_scops): Declared here.
2785 * graphite.c (graphite_initialize, graphite_finalize): New.
2786 (graphite_transform_loops): Cleaned up.
2787 * sese.c (debug_oldivs): Moved here.
2788 * graphite-poly.c (graphite_apply_transformations): Renamed
2789 apply_poly_transforms.
2790 (debug_loop_vec): Moved here.
2791 * graphite-sese-to-poly.c (build_bb_loops, build_sese_conditions_1,
2792 scop_contains_non_iv_scalar_phi_nodes, build_sese_conditions,
2793 find_scop_parameters, build_scop_iteration_domain,
2794 add_conditions_to_constraints, build_scop_canonical_schedules,
2795 build_scop_data_accesses): Now static.
2796 (build_poly_scop, check_poly_representation): New.
2798 2009-02-20 Sebastian Pop <sebastian.pop@amd.com>
2800 * graphite.c (graphite_stmt_p, new_gimple_bb, free_gimple_bb,
2801 remove_gbbs_in_scop, free_scops, try_generate_gimple_bb,
2802 build_scop_bbs, ref_nb_loops, compare_prefix_loops,
2803 build_scop_canonical_schedules, build_bb_loops, add_value_to_dim,
2804 scan_tree_for_params_right_scev, scan_tree_for_params_int,
2805 scan_tree_for_params, struct irp_data, dx_record_params,
2806 find_params_in_bb, find_scop_parameters, gbb_from_bb,
2807 build_loop_iteration_domains, add_conditions_to_domain,
2808 phi_node_is_iv, bb_contains_non_iv_scalar_phi_nodes,
2809 scop_contains_non_iv_scalar_phi_nodes, build_sese_conditions_1,
2810 build_sese_conditions, add_conditions_to_constraints,
2811 build_scop_iteration_domain, build_access_matrix_with_af,
2812 build_access_matrix,
2813 build_scop_data_accesses): Moved to graphite-sese-to-poly.c.
2815 * graphite-sese-to-poly.c: New.
2816 * graphite-sese-to-poly.h: New.
2818 * Makefile.in: Add new rule for graphite-sese-to-poly.o.
2820 2009-02-20 Sebastian Pop <sebastian.pop@amd.com>
2822 * graphite.c: Split graphite code generation to a new file.
2823 (graphite_verify, gmp_cst_to_tree, clast_name_to_gcc,
2824 max_precision_type, clast_to_gcc_expression_red,
2825 clast_to_gcc_expression, gcc_type_for_clast_expr,
2826 gcc_type_for_clast_eq, loop_iv_stack_patch_for_consts,
2827 graphite_translate_clast_equation, graphite_create_guard_cond_expr,
2828 graphite_create_new_guard, clast_get_body_of_loop,
2829 gcc_type_for_cloog_iv, gcc_type_for_iv_of_clast_loop,
2830 graphite_create_new_loop, build_iv_mapping, copy_renames,
2831 translate_clast, find_cloog_iv_in_expr, compute_cloog_iv_types_1,
2832 compute_cloog_iv_types, free_scattering, save_var_name,
2833 initialize_cloog_names, build_scop_context, build_cloog_prog,
2834 set_cloog_options, debug_clast_stmt, scop_to_clast,
2835 print_generated_program, debug_generated_program,
2836 gloog): Moved to graphite-clast-to-gimple.c.
2838 (struct cloog_prog_clast): Moved to graphite-clast-to-gimple.h.
2840 (iv_stack_entry_is_constant, iv_stack_entry_is_iv,
2841 loop_iv_stack_push_iv, loop_iv_stack_insert_constant,
2842 loop_iv_stack_pop, loop_iv_stack_get_iv,
2843 loop_iv_stack_get_iv_from_name, debug_loop_iv_stack,
2844 free_loop_iv_stack, loop_iv_stack_remove_constants,
2845 debug_rename_elt, debug_rename_map_1, debug_rename_map,
2846 rename_map_elt_info, eq_rename_map_elts, debug_ivtype_elt,
2847 debug_ivtype_map_1, debug_ivtype_map, ivtype_map_elt_info,
2848 eq_ivtype_map_elts, sese_add_exit_phis_edge,
2849 sese_add_exit_phis_var, sese_insert_phis_for_liveouts,
2850 get_vdef_before_sese, sese_adjust_vphi,
2851 get_new_name_from_old_name, sese_adjust_phis_for_liveouts,
2852 oldiv_for_loop, rename_variables_in_stmt, is_parameter,
2853 is_iv, expand_scalar_variables_ssa_name,
2854 expand_scalar_variables_expr, expand_scalar_variables_stmt,
2855 expand_scalar_variables, rename_variables, remove_condition,
2856 get_true_edge_from_guard_bb, get_false_edge_from_guard_bb,
2857 add_loop_exit_phis, insert_loop_close_phis, struct igp,
2858 default_liveout_before_guard, add_guard_exit_phis,
2859 insert_guard_phis, register_old_and_new_names,
2860 graphite_copy_stmts_from_block, register_sese_liveout_renames,
2861 copy_bb_and_scalar_dependences, outermost_loop_in_sese,
2862 if_region_set_false_region, create_if_region_on_edge,
2863 move_sese_in_condition): Moved to sese.c.
2865 (nb_loops_around_loop_in_sese, struct ifsese, if_region_entry,
2866 if_region_exit, if_region_get_condition_block,
2867 struct rename_map_elt, new_rename_map_elt, enum iv_stack_entry_kind,
2868 union iv_stack_entry_data_union, struct iv_stack_entry_struct,
2869 iv_stack_entry_p, loop_iv_stack, struct ivtype_map_elt,
2870 ivtype_map_elt, new_ivtype_map_elt,
2871 recompute_all_dominators): Moved to sese.h.
2873 * graphite-clast-to-gimple.c: New.
2874 * graphite-clast-to-gimple.h: New.
2875 * Makefile.in: Add new rule for graphite-clast-to-gimple.o.
2876 * sese.c: Modified as said above.
2879 2009-02-20 Sebastian Pop <sebastian.pop@amd.com>
2881 * graphite.c: Split scop detection to a new file.
2882 (enum gbb_type, gbb_type, get_bb_type, struct sd_region_p, sd_region,
2883 move_sd_regions, loop_affine_expr, exclude_component_ref,
2884 is_simple_operand, stmt_simple_for_scop_p, harmful_stmt_in_bb,
2885 graphite_cannot_represent_loop_niter, struct scopdet_info,
2886 scopdet_basic_block_info, build_scops_1, bb_in_sd_region,
2887 find_single_entry_edge, find_single_exit_edge,
2888 create_single_entry_edge, sd_region_without_exit,
2889 create_single_exit_edge, unmark_exit_edges, mark_exit_edges,
2890 create_sese_edges, build_graphite_scops, limit_scops, build_scops):
2891 Moved to graphite-scop-detection.c.
2893 * graphite-scop-detection.c: New.
2894 * graphite-scop-detection.h: New.
2895 * Makefile.in: Add new rule for graphite-scop-detection.o.
2897 * sese.c: Include tree-chrec.h, tree-data-ref.h, and
2898 tree-scalar-evolution.h.
2899 (nb_reductions_in_loop, graphite_loop_normal_form, sese_record_loop,
2900 build_sese_loop_nests): Moved here from graphite.c.
2901 (param_index): Renamed parameter_index_in_region.
2903 2009-02-18 Tobias Grosser <grosser@fim.uni-passau.de>
2904 Sebastian Pop <sebastian.pop@amd.com>
2906 * gcc.dg/graphite/block-0.c: Expected to fail now.
2907 * gcc.dg/graphite/block-1.c: Same.
2908 * gcc.dg/graphite/block-5.c: Same.
2909 * gcc.dg/graphite/block-6.c: Same.
2911 2009-02-18 Tobias Grosser <grosser@fim.uni-passau.de>
2912 Sebastian Pop <sebastian.pop@amd.com>
2914 * graphite.h: Separate from graphite_bb_p the polyhedral
2915 representation in poly_bb_p and the GCC specifics in gimple_bb_p.
2916 (struct data_dependence_polyhedron, RDGE_DDP, ddp_p): Moved to
2917 graphite-data-ref.h.
2918 (struct poly_bb, PBB_SCOP, PBB_STATIC_SCHEDULE, PBB_DOMAIN,
2919 PBB_BLACK_BOX, PBB_LOOPS, pbb_nb_loops, pbb_loop_at_index,
2920 pbb_loop_index, struct scop, SCOP_BBS, SCOP_REGION, SCOP_ENTRY,
2921 SCOP_EXIT, SCOP_REGION_BBS, SCOP_DEP_GRAPH, SCOP_PARAMS,
2922 SCOP_LOOP_NEST, SCOP_PARAMS, SCOP_OLDIVS, SCOP_LIVEOUT_RENAMES,
2923 scop_nb_params): Moved to graphite-poly.h.
2924 * graphite-data-ref.c: Same.
2925 * graphite-data-ref.h: New.
2927 (pbb_compare, graphite_sort_pbbs, graphite_trans_bb_move_loop,
2928 graphite_trans_bb_strip_mine, strip_mine_profitable_p,
2929 is_interchange_valid, graphite_trans_bb_block,
2930 graphite_trans_loop_block, scop_max_loop_depth,
2931 graphite_trans_scop_block, graphite_apply_transformations,
2932 new_poly_bb, free_poly_bb, new_scop, free_scop): Moved to
2934 * graphite-poly.h: New.
2935 * graphite-poly.c: New.
2936 * Makefile.in (OBJS-common): Add graphite-poly.o.
2937 (graphite-poly.o): New rule.
2938 * tree-data-ref.h (struct data_reference): Remove unused scop field.
2941 2009-02-18 Sebastian Pop <sebastian.pop@amd.com>
2942 Tobias Grosser <grosser@fim.uni-passau.de>
2944 * graphite.c: Replace gb -> gbb.
2946 * graphite-data-ref.c: Same.
2948 2009-02-18 Sebastian Pop <sebastian.pop@amd.com>
2949 Tobias Grosser <grosser@fim.uni-passau.de>
2951 * Makefile.in (OBJS-commmon): Add sese.o.
2953 (graphite.o): Add sese.h.
2954 * graphite.c (bb_in_ss_p, loop_in_sese_p,
2955 sese_build_livein_liveouts_use, sese_build_livein_liveouts_bb,
2956 sese_build_livein_liveouts, register_bb_in_sese, new_sese, free_sese):
2958 (block_before_scop): Add missing return.
2959 (new_scop, free_scop): Remove SESE data structures.
2960 (scop_record_loop, scan_tree_for_params, find_params_in_bb,
2961 find_scop_parameters, build_loop_iteration_domains,
2962 add_conditions_to_domain, register_scop_liveout_renames,
2963 copy_bb_and_scalar_dependences): Scop -> SESE.
2965 (add_conditions_to_domain): SCoP -> SESE and remove check
2966 (scop_contains_non_iv_scalar_phi_nodes): New.
2967 (build_scop_conditions_1, build_scop_conditions): Remove check for
2968 non iv scalar phi nodes.
2969 (print_scop_statistics): New.
2970 (graphite_transform_loops): Cleanup.
2972 * graphite.h: Move to sese & cleanup.
2976 2009-02-16 Sebastian Pop <sebastian.pop@amd.com>
2977 Tobias Grosser <grosser@fim.uni-passau.de>
2979 * graphite.c (build_scop_conditions_1): Conditions are only
2980 at the end of a basic block.
2982 2009-02-16 Sebastian Pop <sebastian.pop@amd.com>
2983 Tobias Grosser <grosser@fim.uni-passau>
2985 * graphite.h (struct graphite_bb): Remove compressed_alpha_matrix
2987 (GBB_ALPHA): Removed.
2989 2009-02-16 Sebastian Pop <sebastian.pop@amd.com>
2990 Tobias Grosser <grosser@fim.uni-passau.de>
2992 * graphite-data-ref.c (graphite_test_dependence): Don't use
2993 GBB_DYNAMIC_SCHEDULE.
2994 * graphite.c (new_graphite_bb): Same.
2995 (free_graphite_bb): Same.
2996 (build_scop_dynamic_schedules): Removed.
2997 (graphite_transform_loops): Don't call it.
2998 * graphite.h (struct graphite_bb): Remove dynamic_schedule field.
2999 (GBB_DYNAMIC_SCHEDULE): Removed.
3001 2009-02-16 Sebastian Pop <sebastian.pop@amd.com>
3002 Tobias Grosser <grosser@fim.uni-passau.de>
3004 * graphite.c (schedule_to_scattering): Don't use CloogMatrix.
3005 (print_graphite_bb): Same.
3006 (build_cloog_prog): Same.
3008 2009-02-16 Sebastian Pop <sebastian.pop@amd.com>
3009 Tobias Grosser <grosser@fim.uni-passau.de>
3011 * graphite.c (build_cloog_prog): Don't use CloogMatrix.
3013 2009-02-16 Sebastian Pop <sebastian.pop@amd.com>
3014 Tobias Grosser <grosser@fim.uni-passau.de>
3016 * graphite.c (build_scop_context): Don't use CloogMatrix.
3017 * graphite-ppl.c (new_Cloog_Domain_from_ppl_Polyhedron): New.
3018 * graphite-ppl.h (new_Cloog_Domain_from_ppl_Polyhedron): Declared.
3020 2009-02-16 Sebastian Pop <sebastian.pop@amd.com>
3021 Tobias Grosser <grosser@fim.uni-passau.de>
3023 * graphite.h (struct scop): Move params, old_ivs, loops, loop_nest,
3024 liveout_renames, add_params fields...
3025 (struct sese): ... here.
3026 (SESE_PARAMS, SESE_LOOPS, SESE_LOOP_NEST, SESE_ADD_PARAMS,
3027 SESE_PARAMS, SESE_OLDIVS, SESE_LIVEOUT_RENAMES): New.
3029 2009-02-16 Sebastian Pop <sebastian.pop@amd.com>
3030 Tobias Grosser <grosser@fim.uni-passau.de>
3032 * graphite.c (print_scop): Do not print the CLooG program.
3033 (new_scop, free_scop, initialize_cloog_names, build_scop_context,
3034 build_cloog_prog, gloog): Don't use SCOP_PROG.
3035 (find_transform): Renamed scop_to_clast.
3036 (print_generated_program, debug_generated_program): New.
3037 (graphite_transform_loops): Adapt to new interface.
3038 * graphite.h (struct scop): Remove program field.
3039 (SCOP_PROG): Removed.
3040 (print_generated_program, debug_generated_program): Declared.
3042 2009-02-16 Sebastian Pop <sebastian.pop@amd.com>
3044 * graphite-data-ref.c (schedule_precedes_p, schedule_same_p): New.
3045 (statement_precedes_p): Use schedule_same_p and schedule_precedes_p.
3046 * graphite.c (gbb_compare, schedule_to_scattering, print_graphite_bb,
3047 free_graphite_bb, build_scop_canonical_schedules,
3048 graphite_trans_bb_strip_mine, graphite_trans_scop_block): Static
3049 schedules are now represented using a ppl_Linear_Expression_t.
3050 * graphite.h (struct graphite_bb): Same.
3051 * graphite-ppl.c (ppl_lexico_compare_linear_expressions): New.
3052 * graphite-ppl.h (ppl_lexico_compare_linear_expressions): Declared.
3054 2009-02-15 Sebastian Pop <sebastian.pop@amd.com>
3056 * graphite.c: Free local memory.
3057 * graphite-ppl.c: Same.
3059 2009-02-15 Sebastian Pop <sebastian.pop@amd.com>
3061 * graphite.c (const_column_index, get_first_matching_sign_row_index,
3062 get_lower_bound_row, get_upper_bound_row, copy_constraint,
3063 swap_constraint_variables, scale_constraint_variable): Removed.
3064 (graphite_trans_bb_strip_mine): Remove pong.
3065 * graphite-ppl.c: Include missing header files.
3066 (set_inhomogeneous, set_coef, shift_poly, ppl_strip_loop): New.
3067 * graphite-ppl.h (ppl_strip_loop): Declared.
3068 * Makefile.in (graphite-ppl.o): Adjust dependences.
3070 2009-02-14 Sebastian Pop <sebastian.pop@amd.com>
3072 * graphite.c (build_loop_iteration_domains): Remove ping pong.
3073 (build_scop_iteration_domain): Same.
3075 2009-02-13 Sebastian Pop <sebastian.pop@amd.com>
3077 * graphite.c (scan_tree_for_params, add_conditions_to_domain): Remove
3079 (add_value_to_dim, scan_tree_for_params_right_scev,
3080 scan_tree_for_params_int): New.
3081 * graphite-ppl.c (oppose_constraint): New.
3082 (insert_constraint_into_matrix): Implement missing cases.
3083 * graphite-ppl.h (insert_constraint_into_matrix): Declared.
3085 2009-02-13 Sebastian Pop <sebastian.pop@amd.com>
3087 * graphite.c (graphite_trans_bb_move_loop): Remove ping pong,
3088 use ppl_move_dimension.
3090 2009-02-12 Sebastian Pop <sebastian.pop@amd.com>
3092 * graphite-data-ref.c: Domains are now ppl_Polyhedra_t.
3095 * graphite-ppl.c: Same.
3096 * graphite-ppl.h: Same.
3098 2009-02-12 Sebastian Pop <sebastian.pop@amd.com>
3100 Revert last 3 commits.
3102 2009-02-10 Sebastian Pop <sebastian.pop@amd.com>
3104 * graphite.c (scan_tree_for_params, add_conditions_to_domain): Remove
3106 (add_value_to_dim, scan_tree_for_params_right_scev,
3107 scan_tree_for_params_int): New.
3108 * graphite-ppl.c (oppose_constraint): New.
3109 (insert_constraint_into_matrix): Implement missing cases.
3110 * graphite-ppl.h (insert_constraint_into_matrix): Declared.
3112 2009-02-10 Sebastian Pop <sebastian.pop@amd.com>
3114 * graphite.c (graphite_trans_bb_move_loop): Remove unused variables.
3116 2009-02-10 Sebastian Pop <sebastian.pop@amd.com>
3117 Tobias Grosser <grosser@fim.uni-passau.de>
3119 * graphite.c (graphite_trans_bb_move_loop): Remove ping pong,
3120 use ppl_move_dimension.
3121 * graphite-ppl.c (ppl_move_dimension): New.
3122 * graphite-ppl.h (ppl_move_dimension): Declared.
3124 2009-02-10 Sebastian Pop <sebastian.pop@amd.com>
3126 * graphite.c: Do not include cloog/cloog.h.
3127 (print_graphite_bb): Remove ping pong, call PPL print function.
3129 2009-02-10 Tobias Grosser <grosser@fim.uni-passau.de>
3131 * Makefile.in (OBJS-common): Add graphite-ppl.o.
3132 (graphite.o): Add dependence on graphite-ppl.h.
3133 (graphite-ppl.o): New.
3134 (graphite-data-ref.c): Ping pong between PPL data structures
3136 * graphite-ppl.c: New.
3137 * graphite-ppl.h: New.
3138 * graphite.c: Include graphite-ppl.h.
3139 (print_graphite_bb, add_conditions_to_domain, build_cloog_prog,
3140 graphite_trans_bb_move_loop, graphite_trans_bb_strip_mine):
3141 Ping pong between PPL data structures and matrices.
3142 (new_graphite_bb): Create a PPL constraint system.
3143 Call ppl_delete_Constraint_System instead of cloog_matrix_free.
3144 (build_loop_iteration_domains): Use PPL functions.
3145 * graphite.h: Include graphite-ppl.h. Fix comments.
3146 (graphite_bb): Use a ppl_Constraint_System_t instead of
3147 CloogMatrix for representing the domain.
3148 (scop): Remove static_schedule.
3149 (gbb_nb_loops): Ping pong between PPL data structures and matrices.
3151 2009-02-06 Sebastian Pop <sebastian.pop@amd.com>
3153 * graphite.c: Fix some comments.
3155 2009-02-05 Sebastian Pop <sebastian.pop@amd.com>
3158 * graphite.c (if_region_set_false_region): After moving a region
3159 in the false branch of a condition, remove the empty dummy
3161 (gloog): Remove wrong fix for PR38953.
3163 2009-02-03 Tobias Grosser <grosser@fim.uni-passau.de>
3165 * graphite.c (bb_in_sese_p, sese_build_livein_liveouts_use,
3166 sese_build_livein_liveouts_bb, sese_build_livein_liveouts,
3167 register_bb_in_sese, new_sese, free_sese): Moved.
3168 (dot_scop_1, build_scop_loop_nests, build_loop_iteration_domains,
3169 outermost_loop_in_scop, build_scop_iteration_domain,
3170 expand_scalar_variables_ssa_name, get_vdef_before_scop,
3171 limit_scops): Use bb_in_sese_p instead of bb_in_scop_p.
3172 Use loop_in_sese_p instead of loop_in_scop_p.
3173 (new_graphite_bb, new_scop, gloog): Do not initialize SCOP_BBS_B.
3174 (free_scop): Do not free SCOP_BBS_B.
3175 (nb_loops_around_loop_in_scop, nb_loops_around_gb,
3176 ref_nb_loops): Moved here...
3177 * graphite.h (ref_nb_loops): ... from here.
3178 (struct scop): Remove bbs_b bitmap.
3179 (SCOP_BBS_B, bb_in_scop_p, loop_in_scop_p): Removed.
3180 * testsuite/gcc.dg/graphite/scop-19.c: New
3182 2009-02-03 Tobias Grosser <grosser@fim.uni-passau.de>
3184 * graphite.c (scopdet_basic_block_info): Fix bug in scop
3187 2009-01-30 Tobias Grosser <grosser@fim.uni-passau.de>
3189 * graphite.c (new_loop_to_cloog_loop_str, hash_loop_to_cloog_loop,
3190 eq_loop_to_cloog_loop): Remove.
3191 (new_scop, free_scop): Remove SCOP_LOOP2CLOOG_LOOP.
3192 * graphite.h (struct scop): Remove loop2cloog_loop.
3193 (loop_domain_dim, loop_iteration_vector_dim): Remove.
3195 2009-01-30 Tobias Grosser <grosser@fim.uni-passau.de>
3197 * opts.c (decode_options): Only add graphite options to O2
3198 if we compile with graphite enabled.
3200 2009-01-26 Sebastian Pop <sebastian.pop@amd.com>
3202 * Merge from mainline (r143163:143684).
3204 2009-01-26 Sebastian Pop <sebastian.pop@amd.com>
3206 * graphite.c (debug_value): Removed.
3207 * graphite.h (debug_value): Removed.
3209 2009-01-23 Sebastian Pop <sebastian.pop@amd.com>
3211 * passes.c (init_optimization_passes): Do not call pass_copy_prop
3212 after graphite: pass_copy_prop does not maintain a proper loop closed
3213 SSA form. pass_copy_prop should be fixed.
3215 2009-01-23 Sebastian Pop <sebastian.pop@amd.com>
3217 * graphite.c (scop_adjust_phis_for_liveouts): Fix warning.
3219 2009-01-23 Sebastian Pop <sebastian.pop@amd.com>
3221 * graphite.c (graphite_verify): Add a call to verify_loop_closed_ssa.
3222 (gloog): Split the exit of the scop when the scop exit is a loop exit.
3223 (graphite_transform_loops): Only call cleanup_tree_cfg if gloog
3226 2009-01-20 Sebastian Pop <sebastian.pop@amd.com>
3228 * graphite.c (gloog): Return true when code gen succeeded.
3229 (graphite_transform_loops): Do not call cleanup_tree_cfg if
3230 the code of the function did not changed. After cleanup_tree_cfg
3231 call rewrite_into_loop_closed_ssa to maintain the loop closed ssa
3234 2009-01-19 Sebastian Pop <sebastian.pop@amd.com>
3236 * graphite.c (stmt_simple_for_scop_p): Also handle cases when
3237 gimple_call_lhs is NULL.
3239 2009-01-16 Sebastian Pop <sebastian.pop@amd.com>
3240 Tobias Grosser <tobi.grosser@amd.com>
3242 * graphite.c (graphite_trans_scop_block): Do not block single
3245 2009-01-15 Sebastian Pop <sebastian.pop@amd.com>
3246 Tobias Grosser <tobi.grosser@amd.com>
3248 * graphite.c (build_scop_canonical_schedules): Start schedules at
3251 2009-01-15 Sebastian Pop <sebastian.pop@amd.com>
3252 Tobias Grosser <tobi.grosser@amd.com>
3254 * graphite.c (compare_prefix_loops): New.
3255 (build_scop_canonical_schedules): Rewritten.
3256 (graphite_transform_loops): Move build_scop_canonical_schedules
3257 after build_scop_iteration_domain.
3259 2009-01-14 Sebastian Pop <sebastian.pop@amd.com>
3260 Tobias Grosser <tobi.grosser@amd.com>
3262 * graphite.c (add_conditions_to_domain): Add the loops to
3263 the dimension of the iteration domain. Do copy the domain
3264 only when it exists.
3265 (build_scop_conditions_1): Do not call add_conditions_to_domain.
3266 (add_conditions_to_constraints): New.
3267 (can_generate_code_stmt, can_generate_code): Removed.
3268 (gloog): Do not call can_generate_code.
3269 (graphite_transform_loops): Call add_conditions_to_constraints
3270 after building the iteration domain.
3272 2009-01-14 Sebastian Pop <sebastian.pop@amd.com>
3273 Tobias Grosser <tobi.grosser@amd.com>
3274 Jan Sjodin <jan.sjodin@amd.com>
3276 * graphite.c (scan_tree_for_params): On substractions negate
3277 all the coefficients of the term.
3278 (clast_to_gcc_expression_red): New. Handle reduction expressions
3279 of more than two operands.
3280 (clast_to_gcc_expression): Call clast_to_gcc_expression_red.
3281 (get_vdef_before_scop): Handle also the case of default definitions.
3283 2009-01-14 Sebastian Pop <sebastian.pop@amd.com>
3286 * graphite.c (get_vdef_before_scop, scop_adjust_vphi): New.
3287 (scop_adjust_phis_for_liveouts): Call scop_adjust_vphi.
3288 (gloog): Do not call cleanup_tree_cfg.
3289 (graphite_transform_loops): Call cleanup_tree_cfg after all
3290 scops have been code generated.
3292 2009-01-13 Sebastian Pop <sebastian.pop@amd.com>
3294 * passes.c (init_optimization_passes): Schedule after
3295 graphite transforms pass_copy_prop, pass_dce_loop and pass_lim.
3297 2009-01-13 Sebastian Pop <sebastian.pop@amd.com>
3299 * graphite.c (expand_scalar_variables_stmt): Do not pass loop_p.
3301 (expand_scalar_variables_ssa_name): Do not pass loop_p. Fix comment.
3302 Set the type of an expression to the type of its assign statement.
3303 (expand_scalar_variables_expr): Do not pass loop_p.
3304 Fix comment. Stop recursion on tcc_constant or tcc_declaration.
3305 (copy_bb_and_scalar_dependences): Do not pass loop_p.
3306 (translate_clast): Update call to copy_bb_and_scalar_dependences.
3308 2009-01-11 Sebastian Pop <sebastian.pop@amd.com>
3310 * graphite.c (expand_scalar_variables_ssa_name): Set the type of
3311 an expression to the gimple_expr_type of its assign statement.
3312 (expand_scalar_variables_expr): Stop recursion on tcc_constant
3315 2009-01-11 Sebastian Pop <sebastian.pop@amd.com>
3317 PR tree-optimization/38786
3318 * testsuite/gcc.dg/graphite/pr38786.c: New.
3319 * graphite.c (expand_scalar_variables_ssa_name): New, outlined from
3320 the SSA_NAME case of expand_scalar_variables_expr.
3321 (expand_scalar_variables_expr): Also gather the scalar computation
3322 used to index the memory access.
3323 (expand_scalar_variables_stmt): Pass to expand_scalar_variables_expr
3324 the gimple_stmt_iterator where it inserts new code.
3326 2009-01-10 Sebastian Pop <sebastian.pop@amd.com>
3328 * testsuite/gcc.dg/graphite/block-3.c: Fix compile error on 32bit.
3330 2009-01-10 Sebastian Pop <sebastian.pop@amd.com>
3332 * opts.c (decode_options): Enable flag_graphite_identity and
3333 flag_loop_block in -O2 and above.
3335 2009-01-08 Sebastian Pop <sebastian.pop@amd.com>
3337 * libjava/classpath/lib/gnu/java/awt/peer/gtk/GtkMouseInfoPeer.class:
3338 Fix merge problem: replace with the file from trunk.
3340 2009-01-08 Sebastian Pop <sebastian.pop@amd.com>
3342 * Merge from mainline (r141727:143163).
3344 2009-01-07 Sebastian Pop <sebastian.pop@amd.com>
3345 Jan Sjodin <jan.sjodin@amd.com>
3347 PR tree-optimization/38559
3348 * testsuite/gcc.dg/graphite/pr38559.c: New.
3350 * graphite.c (debug_value, copy_constraint,
3351 swap_constraint_variables, scale_constraint_variable, ): New.
3352 (get_lower_bound, get_upper_bound): Removed.
3353 (graphite_trans_bb_strip_mine): Clean up this code that works
3354 only for constant number of iterations. Fully copy upper and
3355 lower bound constraints, not only the constant part of them.
3356 * graphite.h (debug_value): Declared.
3358 2009-01-06 Jan Sjodin <jan.sjodin@amd.com>
3360 PR tree-optimization/38492
3361 PR tree-optimization/38498
3362 * tree-check.c (operator_is_linear, scev_is_linear_expression): New.
3363 * tree-chrec.h (scev_is_linear_expression): Declared.
3364 * graphite.c (graphite_cannot_represent_loop_niter): New.
3365 (scopdet_basic_block_info): Call graphite_cannot_represent_loop_niter.
3366 (graphite_loop_normal_form): Use gcc_assert.
3367 (scan_tree_for_params): Use CASE_CONVERT.
3368 (phi_node_is_iv, bb_contains_non_iv_scalar_phi_nodes): New.
3369 (build_scop_conditions_1): Call bb_contains_non_iv_scalar_phi_nodes.
3370 Use gcc_assert. Discard scops that contain unhandled cases.
3371 (build_scop_conditions): Return a boolean status for unhandled cases.
3372 (strip_mine_profitable_p): Print the loop number, not its depth.
3373 (is_interchange_valid): Pass the depth of the loop nest, don't
3374 recompute it wrongly.
3375 (graphite_trans_bb_block): Same.
3376 (graphite_trans_bb_block): Print tentative of loop blocking.
3377 (graphite_trans_scop_block): Do not print that the loop has been
3379 (graphite_transform_loops): Do not handle scops that contain condition
3382 * testsuite/gcc.dg/graphite/pr38500.c: Fixed warning as committed
3384 * testsuite/gcc.dg/graphite/block-0.c: Update test.
3385 * testsuite/gcc.dg/graphite/block-1.c: Same.
3386 * testsuite/gcc.dg/graphite/block-2.c: Remove xfail and test for
3388 * testsuite/gcc.dg/graphite/block-4.c: Remove test for strip mine.
3389 * testsuite/gcc.dg/graphite/block-3.c: New.
3390 * testsuite/gcc.dg/graphite/pr38498.c: New.
3392 2008-12-22 Harsha Jagasia <harsha.jagasia@amd.com>
3394 PR tree-optimization/38510
3395 * gcc.dg/graphite/pr38510.c: New.
3396 * graphite.c (recompute_all_dominators): Call mark_irreducible_loops.
3397 (translate_clast): Call recompute_all_dominators before
3399 (gloog): Call recompute_all_dominators before graphite_verify.
3401 2008-12-12 Sebastian Pop <sebastian.pop@amd.com>
3403 PR tree-optimization/38492
3404 * graphite.c (rename_map_elt, debug_rename_elt,
3405 debug_rename_map_1, debug_rename_map, new_rename_map_elt,
3406 rename_map_elt_info, eq_rename_map_elts,
3407 get_new_name_from_old_name, bb_in_sese_p): Moved around.
3408 (sese_find_uses_to_rename_use): Renamed sese_build_livein_liveouts_use.
3409 (sese_find_uses_to_rename_bb): Renamed sese_build_livein_liveouts_bb.
3410 (sese_build_livein_liveouts): New.
3411 (new_sese, free_sese): New.
3412 (new_scop): Call new_sese.
3413 (free_scop): Call free_sese.
3414 (rename_variables_from_edge, rename_phis_end_scop): Removed.
3415 (register_old_new_names): Renamed register_old_and_new_names.
3416 (register_scop_liveout_renames, add_loop_exit_phis,
3417 insert_loop_close_phis, struct igp,
3418 default_liveout_before_guard, add_guard_exit_phis,
3419 insert_guard_phis, copy_renames): New.
3420 (translate_clast): Call insert_loop_close_phis and insert_guard_phis.
3421 (sese_add_exit_phis_edge): Renamed scop_add_exit_phis_edge.
3422 (rewrite_into_sese_closed_ssa): Renamed scop_insert_phis_for_liveouts.
3423 (scop_adjust_phis_for_liveouts): New.
3424 (gloog): Call scop_adjust_phis_for_liveouts.
3426 * graphite.h (struct sese): Documented. Added fields liveout,
3428 (SESE_LIVEOUT, SESE_LIVEIN, SESE_LIVEIN_VER, SESE_NUM_VER): New.
3429 (new_sese, free_sese, sese_build_livein_liveouts): Declared.
3430 (struct scop): Added field liveout_renames.
3431 (SCOP_LIVEOUT_RENAMES): New.
3433 2008-12-11 Sebastian Pop <sebastian.pop@amd.com>
3435 PR tree-optimization/38409
3436 * gcc.dg/graphite/pr38409.c: New.
3437 * graphite.c (nb_reductions_in_loop): Use simple_iv.
3439 2008-12-11 Sebastian Pop <sebastian.pop@amd.com>
3441 * graphite.c (gcc_type_for_cloog_iv): By default return
3443 (graphite_create_new_loop): Don't fold_convert the already
3444 fold_convert-ed expression.
3446 2008-12-11 Harsha Jagasia <harsha.jagasia@amd.com>
3448 PR tree-optimization/38446
3449 * gcc.dg/graphite/pr38446.c: New.
3450 * graphite.c (register_bb_in_sese): New.
3451 (bb_in_sese_p): Check if bb belongs to sese region by explicitly
3452 looking at the bbs in the region.
3453 * graphite.h (sese): Add region_basic_blocks pointer set to
3454 structure and initialize at the time of defining new scop.
3456 2008-12-11 Tobias Grosser <grosser@fim.uni-passau.de>
3458 * graphite.c (new_graphite_bb): Initialize GBB_STATIC_SCHEDULE.
3459 (find_params_in_bb): Do not free data refs.
3460 (free_graphite_bb): Add FIXME on disabled free_data_refs.
3462 2008-12-11 Sebastian Pop <sebastian.pop@amd.com>
3464 * testsuite/gcc.dg/graphite/scop-16.c: Test only scop specific info.
3465 * testsuite/gcc.dg/graphite/scop-17.c: Same.
3466 * testsuite/gcc.dg/graphite/block-5.c: New.
3467 * testsuite/gcc.dg/graphite/block-6.c: New.
3468 * testsuite/gcc.dg/graphite/pr37485.c: Clean dump file after.
3469 * testsuite/gcc.dg/graphite/pr37684.c: Same.
3470 * testsuite/gcc.dg/graphite/block-2.c: Same.
3472 * graphite.c (struct ivtype_map_elt): New.
3473 (debug_ivtype_elt, debug_ivtype_map_1, debug_ivtype_map,
3474 new_ivtype_map_elt, ivtype_map_elt_info, eq_ivtype_map_elts,
3475 gcc_type_for_cloog_iv): New.
3476 (loop_iv_stack_patch_for_consts): Use the type of the induction
3477 variable from the original loop, except for the automatically
3478 generated loops, i.e., in the case of a strip-mined loop, in
3479 which case there is no original loop: in that case just use
3481 (new_graphite_bb): Initialize GBB_CLOOG_IV_TYPES.
3482 (free_graphite_bb): Free GBB_CLOOG_IV_TYPES.
3483 (clast_name_to_gcc): Accept params to be NULL.
3484 (clast_to_gcc_expression): Take an extra parameter for the type.
3485 Convert to that type all the expressions built by this function.
3486 (gcc_type_for_clast_expr, gcc_type_for_clast_eq): New.
3487 (graphite_translate_clast_equation): Compute the type of the
3488 clast_equation before translating its LHS and RHS.
3489 (clast_get_body_of_loop, gcc_type_for_iv_of_clast_loop): New.
3490 (graphite_create_new_loop): Compute the type of the induction
3491 variable before translating the lower and upper bounds and before
3492 creating the induction variable.
3493 (rename_variables_from_edge, rename_phis_end_scop): New.
3494 (copy_bb_and_scalar_dependences): Call rename_phis_end_scop.
3495 (sese_add_exit_phis_edge): Do not use integer_zero_node.
3496 (find_cloog_iv_in_expr, compute_cloog_iv_types_1,
3497 compute_cloog_iv_types): New.
3498 (gloog): Call compute_cloog_iv_types before starting the
3499 translation of the clast.
3501 * graphite.h (struct graphite_bb): New field cloog_iv_types.
3502 (GBB_CLOOG_IV_TYPES): New.
3503 (debug_ivtype_map): Declared.
3504 (oldiv_for_loop): New.
3506 2008-12-10 Tobias Grosser <grosser@fim.uni-passau.de>
3509 * graphite.c (new_scop): Initialize SCOP_ADD_PARAMS.
3510 (param_index): Assert if parameter is not know after parameter
3512 (find_params_in_bb): Detect params directly in GBB_CONDITIONS.
3513 (find_scop_parameters): Mark, that we have finished parameter
3515 (graphite_transform_loops): Move condition detection before parameter
3517 * graphite.h (struct scop): Add SCOP_ADD_PARAMS.
3518 * testsuite/gfortran.dg/graphite/pr38459.f90: New.
3520 2008-12-09 Tobias Grosser <grosser@fim.uni-passau.de>
3522 * graphite.c (graphite_transform_loops): Always call find_transform ()
3523 in ENABLE_CHECKING. So we test these code paths, even if we do not
3526 2008-12-09 Tobias Grosser <grosser@fim.uni-passau.de>
3528 * graphite.c (print_graphite_bb): Fix printing to file != dump_file.
3529 (print_scop): Ditto.
3531 2008-12-08 Tobias Grosser <grosser@fim.uni-passau.de>
3534 Fix testsuite/gfortran.dg/graphite/id-3.f90.
3535 * graphite.c (scopdet_basic_block_info): Fix bug that found some
3536 regions more than once.
3538 2008-12-03 Sebastian Pop <sebastian.pop@amd.com>
3540 Fix testsuite/gfortran.dg/graphite/id-4.f90.
3541 * graphite.c (scan_tree_for_params): Do not compute the multiplicand
3544 2008-12-03 Sebastian Pop <sebastian.pop@amd.com>
3546 Fix testsuite/gfortran.dg/graphite/id-1.f90.
3547 * graphite.c (gmp_cst_to_tree): Pass the type in parameter.
3548 (loop_iv_stack_patch_for_consts): Update use of gmp_cst_to_tree.
3549 (max_precision_type): New.
3550 (value_clast): Removed.
3551 (clast_to_gcc_expression): Be more careful to types of expressions.
3552 Use max_precision_type and update use of gmp_cst_to_tree.
3553 (graphite_translate_clast_equation): Use max_precision_type.
3554 (graphite_create_guard_cond_expr): Do not use integer_type_node,
3555 use the type of the condition.
3556 (graphite_create_new_loop): Do not use integer_type_node, use the
3557 max_precision_type of lb and ub.
3559 2008-12-03 Sebastian Pop <sebastian.pop@amd.com>
3561 * graphite.c (build_scops_1): Initialize open_scop.exit
3564 2008-12-02 Sebastian Pop <sebastian.pop@amd.com>
3566 * testsuite/gcc.dg/graphite/pr38084.c: New.
3567 * testsuite/gfortran.dg/graphite/id-1.f90: New.
3568 * testsuite/gfortran.dg/graphite/id-2.f90: New.
3569 * testsuite/gfortran.dg/graphite/id-3.f90: New.
3570 * testsuite/gfortran.dg/graphite/id-4.f90: New.
3571 * testsuite/gfortran.dg/graphite/pr37857.f90: New.
3573 2008-12-02 Sebastian Pop <sebastian.pop@amd.com>
3574 Jan Sjodin <jan.sjodin@amd.com>
3575 Harsha Jagasia <harsha.jagasia@amd.com>
3587 * testsuite/gcc.dg/graphite/pr38073.c: New.
3588 * testsuite/gcc.dg/graphite/pr37928.c: New.
3589 * testsuite/gcc.dg/graphite/pr37883.c: New.
3590 * testsuite/gcc.dg/graphite/pr38125.c: New.
3591 * testsuite/gfortran.dg/graphite/pr38083.f90: New.
3592 * testsuite/gfortran.dg/graphite/pr37852.f90: New.
3593 * testsuite/gfortran.dg/graphite/pr37980.f90: New.
3595 * testsuite/gcc.dg/graphite/scop-18.c: Remove reduction, test for
3596 the number of detected scops. Copy exact same test for loop
3598 * testsuite/gcc.dg/graphite/block-1.c: Fix the number of expected
3599 loops to be blocked as reductions are not handled.
3600 * testsuite/gcc.dg/graphite/block-4.c: ...here. New.
3602 * tree-phinodes.c (remove_phi_nodes): New, extracted from...
3603 * tree-cfg.c (remove_phi_nodes_and_edges_for_unreachable_block):
3605 * tree-flow.h (remove_phi_nodes, canonicalize_loop_ivs): Declared.
3606 * Makefile.in (graphite.o): Depend on value-prof.h.
3607 (graphite.o-warn): Removed -Wno-error.
3608 * tree-parloops.c (canonicalize_loop_ivs): Allow reduction_list
3609 to be a NULL pointer. Call update_stmt. Return the newly created
3610 cannonical induction variable.
3612 * graphite.h (debug_rename_map): Declared. Fix some comments.
3614 * graphite.c: Reimplement the code generation from graphite to gimple.
3615 Include value-prof.h.
3616 (loop_iv_stack_get_iv): Do not return NULL for constant substitutions.
3617 (get_old_iv_from_ssa_name): Removed.
3618 (graphite_stmt_p): New.
3619 (new_graphite_bb): Test for useful statements before building a
3620 graphite statement for the basic block.
3621 (free_graphite_bb): Do not free GBB_DATA_REFS: this is a bug
3622 in free_data_ref that calls BITMAP_FREE (DR_VOPS (dr)) without
3624 (recompute_all_dominators, graphite_verify,
3625 nb_reductions_in_loop, graphite_loop_normal_form): New.
3626 (scop_record_loop): Call graphite_loop_normal_form.
3627 (build_scop_loop_nests): Iterate over all the blocks of the
3628 function instead of relying on the incomplete information from
3629 SCOP_BBS. Return the success of the operation.
3630 (find_params_in_bb): Use the data from GBB_DATA_REFS.
3631 (add_bb_domains): Removed.
3632 (build_loop_iteration_domains): Don't call add_bb_domains.
3633 Add the iteration domain only to the basic blocks that have been
3634 translated to graphite.
3635 (build_scop_conditions_1): Add constraints only if the basic
3636 block have been translated to graphite.
3637 (build_scop_data_accesses): Completely disabled until data
3638 dependence is correctly implemented.
3639 (debug_rename_elt, debug_rename_map_1, debug_rename_map): New.
3640 (remove_all_edges_1, remove_all_edges): Removed.
3641 (get_new_name_from_old_name): New.
3642 (graphite_rename_variables_in_stmt): Renamed
3643 rename_variables_in_stmt. Call get_new_name_from_old_name.
3644 Use replace_exp and update_stmt.
3645 (is_old_iv): Renamed is_iv.
3646 (expand_scalar_variables_stmt): Extra parameter for renaming map.
3647 Use replace_exp and update_stmt.
3648 (expand_scalar_variables_expr): Same. Use the map to get the
3649 new names for the renaming of induction variables and for the
3650 renaming of variables after a basic block has been copied.
3651 (expand_scalar_variables): Same.
3652 (graphite_rename_variables): Renamed rename_variables.
3653 (move_phi_nodes): Removed.
3654 (get_false_edge_from_guard_bb): New.
3655 (build_iv_mapping): Do not insert the induction variable of a
3656 loop in the renaming iv map if the basic block does not belong
3658 (register_old_new_names, graphite_copy_stmts_from_block,
3659 copy_bb_and_scalar_dependences): New.
3660 (translate_clast): Heavily reimplemented: copy basic blocks,
3661 do not move them. Finally, in call cleanup_tree_cfg in gloog.
3662 At each translation step call graphite_verify ensuring the
3663 consistency of the SSA, loops and dominators information.
3664 (collect_virtual_phis, find_vdef_for_var_in_bb,
3665 find_vdef_for_var_1, find_vdef_for_var,
3666 patch_phis_for_virtual_defs): Removed huge hack.
3667 (mark_old_loops, remove_dead_loops, skip_phi_defs,
3668 collect_scop_exit_phi_args, patch_scop_exit_phi_args,
3669 gbb_can_be_ignored, scop_remove_ignoreable_gbbs, ): Removed.
3670 (remove_sese_region, ifsese, if_region_entry, if_region_exit,
3671 if_region_get_condition_block, if_region_set_false_region,
3672 create_if_region_on_edge, move_sese_in_condition, bb_in_sese_p,
3673 sese_find_uses_to_rename_use, sese_find_uses_to_rename_bb,
3674 sese_add_exit_phis_edge, sese_add_exit_phis_var,
3675 rewrite_into_sese_closed_ssa): New.
3676 (gloog): Remove dead code. Early return if code cannot be
3677 generated. Call cleanup_tree_cfg once the scop has been code
3679 (graphite_trans_scop_block, graphite_trans_loop_block): Do not
3680 block loops with less than two loops.
3681 (graphite_apply_transformations): Remove the call to
3682 scop_remove_ignoreable_gbbs.
3683 (limit_scops): When build_scop_loop_nests fails, continue on
3684 the next scop. Fix open_scop.entry.
3685 (graphite_transform_loops): Call recompute_all_dominators: force the
3686 recomputation of correct CDI_DOMINATORS and CDI_POST_DOMINATORS.
3687 Call initialize_original_copy_tables and free_original_copy_tables
3688 to be able to copy basic blocks during code generation.
3689 When build_scop_loop_nests fails, continue on next scop.
3690 (value_clast): New union.
3691 (clast_to_gcc_expression): Fix type cast warning.
3693 2008-11-09 Sebastian Pop <sebastian.pop@amd.com>
3695 * Merge from mainline (r140838:141727).
3697 2008-11-05 Tobias Grosser <grosser@fim.uni-passau.de>
3701 * graphite.c (scan_tree_for_params): Add POINTER_PLUS_EXPR.
3703 2008-11-05 Tobias Grosser <grosser@fim.uni-passau.de>
3707 * graphite.c (scopdet_basic_block_info): Fix loops with multiple
3708 exits and conditions.
3709 * testsuite/gcc.dg/graphite/pr37943.c: New.
3711 2008-10-23 Tobias Grosser <grosser@fim.uni-passau.de>
3714 * graphite.c (gloog): Replace EXIT_BLOCK_PTR with scop exit.
3716 2008-10-23 Tobias Grosser <grosser@fim.uni-passau.de>
3718 * doc/invoke.texi: Fix spaces.
3720 2008-10-22 Sebastian Pop <sebastian.pop@amd.com>
3722 PR tree-optimization/37891
3723 Reverted last commit.
3724 * graphite.c (create_single_entry_edge): Set
3725 EDGE_IRREDUCIBLE_LOOP and BB_IRREDUCIBLE_LOOP.
3727 2008-10-21 Sebastian Pop <sebastian.pop@amd.com>
3728 Mitul Thakkar <mitul.thakkar@amd.com>
3730 * graphite.c (create_single_entry_edge): Set
3731 EDGE_IRREDUCIBLE_LOOP and BB_IRREDUCIBLE_LOOP.
3733 2008-10-16 Tobias Grosser <grosser@fim.uni-passau.de>
3735 * doc/invoke.texi: Add -fgraphite-identity.
3736 * graphite.c (graphite_apply_transformations): Check for
3737 -fgraphite-identity.
3738 * toplev.c (process_options): Add flag_graphite_identity.
3739 * tree-ssa-loop.c: Add flag_graphite_identity.
3741 2008-10-14 Sebastian Pop <sebastian.pop@amd.com>
3743 Undo changes from 2008-10-02:
3744 * tree-ssa-loop-ivopts.c (rewrite_use_nonlinear_expr): Convert
3745 operand type when copying the operand to a variable of different type.
3746 * cfgloopmanip.c (create_empty_loop_on_edge): Write exit condition
3747 with the IV name after increment.
3749 2008-10-14 Sebastian Pop <sebastian.pop@amd.com>
3750 Harsha Jagasia <harsha.jagasia@amd.com>
3752 PR tree-optimization/37828
3753 * testsuite/gcc.dg/graphite/pr37828.c: New.
3754 * graphite.c (graphite_trans_loop_block): Do not loop block
3755 single nested loops.
3757 2008-10-09 Harsha Jagasia <harsha.jagasia@amd.com>
3758 Sebastian Pop <sebastian.pop@amd.com>
3760 * graphite.c (struct rename_map_elt, new_rename_map_elt,
3761 rename_map_elt_info, eq_rename_map_elts): New.
3762 (graphite_rename_ivs_stmt): Renamed graphite_rename_variables_in_stmt.
3763 (expand_scalar_variables_expr): Change parameters.
3764 (expand_scalar_variables_stmt): Same.
3765 (expand_scalar_variables): Same.
3766 (graphite_rename_ivs): Rename graphite_rename_variables.
3767 (build_iv_mapping): New.
3768 (translate_clast): Call build_iv_mapping.
3769 * graphite.h (gbb_p): New name.
3771 2008-10-03 Harsha Jagasia <harsha.jagasia@amd.com>
3773 PR tree-optimization/37684
3774 * gcc.dg/graphite/pr37684.c: New.
3775 * graphite.c (exclude_component_ref): New.
3776 (is_simple_operand): Call exclude_component_ref.
3778 2008-10-02 Jan Sjodin <jan.sjodin@amd.com>
3779 Harsha Jagasia <harsha.jagasia@amd.com>
3781 PR tree-optimization/37485
3782 * gcc.dg/graphite/block-2.c: New
3783 * graphite.c (gmp_cst_to_tree): Moved.
3784 (iv_stack_entry_is_constant): New.
3785 (iv_stack_entry_is_iv): New.
3786 (loop_iv_stack_push): Renamed to loop_iv_stack_push_iv.
3787 (loop_iv_stack_insert_constant): New.
3788 (loop_iv_stack_pop): Use new datatpype.
3789 (loop_iv_stack_get_iv): Same.
3790 (loop_iv_stack_get_iv_from_name): Same.
3791 (loop_iv_stack_debug): Renamed to debug_loop_iv_stack.
3792 (loop_iv_stack_patch_for_consts): New.
3793 (loop_iv_stack_remove_constants): New.
3794 (graphite_create_new_loop): Use loop_iv_stack_push_iv.
3795 (translate_clast): Call loop_iv_stack_patch_for_consts and
3796 loop_iv_stack_remove_constants.
3797 (gloog): Use new datatype. Redirect construction edge to end
3798 block to avoid accidental deletion.
3799 * graphite.h (enum iv_stack_entry_kind): New. Tag for data in
3801 (union iv_stack_entry_data): New. Data in iv stack entry.
3802 (struct iv_stack_entry): New. Datatype for iv stack entries.
3804 2008-10-02 Sebastian Pop <sebastian.pop@amd.com>
3806 * tree-ssa-loop-ivopts.c (rewrite_use_nonlinear_expr): Convert
3807 operand type when copying the operand to a variable of different type.
3809 2008-10-02 Sebastian Pop <sebastian.pop@amd.com>
3811 * cfgloopmanip.c (create_empty_loop_on_edge): Write exit condition
3812 with the IV name after increment.
3814 2008-10-02 Sebastian Pop <sebastian.pop@amd.com>
3816 * Merge from mainline (r140164:140838).
3818 2008-09-10 Konrad Trifunovic <konrad.trifunovic@inria.fr>
3820 * graphite-data-ref.c: New.
3821 * graphite.c (print_scop): Also dump the dependence graph.
3822 (bb_in_scop_p, loop_in_scop_p, nb_loops_around_gb): Moved...
3823 (new_scop): Initialize SCOP_DEP_GRAPH.
3824 (build_scop_dynamic_schedules): New.
3825 (build_access_matrix_with_af): Fixed column numbering.
3826 (graphite_transform_loops): Call build_scop_dynamic_schedules.
3827 * graphite.h: Add ifndef/define guards against multiple inclusion.
3828 (struct scop): Add dep_graph field.
3829 (SCOP_DEP_GRAPH): Defined.
3830 (ref_nb_loops): Fixed and moved to other position.
3831 (bb_in_scop_p, loop_in_scop_p, nb_loops_around_gb): ... here.
3832 (nb_loops_around_loop_in_scop): New.
3833 (graphite_dump_dependence_graph): Declared.
3834 (graphite_build_rdg_all_levels): Declared.
3835 (graphite_test_dependence): Declared.
3836 * Makefile.in (graphite-data-ref.o): New target.
3838 2008-09-09 Sebastian Pop <sebastian.pop@amd.com>
3840 * Merge from mainline (139870:140164).
3842 2008-09-01 Sebastian Pop <sebastian.pop@amd.com>
3844 * Merge from mainline (138275:139870).
3845 * testsuite/gcc.dg/graphite/scop-matmult.c: XFailed as one of
3846 the commits from trunk broke the niter detection.
3848 2008-09-01 Sebastian Pop <sebastian.pop@amd.com>
3850 * graphite.c: Add more documentation. Fix formatting.
3851 (debug_loop_vec, debug_oldivs, loop_iv_stack,
3852 loop_iv_stack_debug): Moved...
3853 (schedule_to_scattering): Move before use.
3854 (dot_all_scops): Include in "#if 0" the code for system
3857 * graphite.h: (debug_loop_vec, debug_oldivs, loop_iv_stack,
3858 loop_iv_stack_debug): ...here.
3860 2008-08-29 Jan Sjodin <jan.sjodin@amd.com>
3862 * tree-phinodes.c (make_phi_node): Extern.
3863 (add_phi_node_to_bb): New.
3864 (create_phi_node): Call add_phi_node_to_bb.
3865 * tree-ssa-loop-ivopts.c (get_phi_with_result): New.
3866 (remove_statement): Handle case where stored phi was updated
3867 and is no longer the same.
3868 * graphite.c (is_parameter): New.
3870 (expand_scalar_variables_expr): New.
3871 (expand_scalar_variables_stmt): New.
3872 (expand_scalar_variables): New.
3873 (move_phi_nodes): Create new phi instead of moving old one.
3874 (translate_clast): Call expand_scalar_variables.
3875 (find_vdef_for_var_in_bb): Also scan regular definitions.
3876 (skip_phi_defs): New.
3877 (collect_scop_exit_phi_args): New.
3878 (patch_scop_exit_phi_args): New.
3879 (gloog): Patch phis after scop.
3880 * tree-flow.h: (add_phi_node_to_bb): Declared.
3881 (make_phi_node): Declared.
3883 2008-08-26 Sebastian Pop <sebastian.pop@amd.com>
3885 * graphite.c (end_scop): Split the entry of the scop when it
3886 is the header of the loop in which the scop is ending.
3887 (build_scops_1, limit_scops): Update uses of end_scop.
3889 2008-08-26 Sebastian Pop <sebastian.pop@amd.com>
3891 * graphite.c (dot_all_scops_1): Do not fail on uninitialized
3892 SCOP_ENTRY or SCOP_EXIT.
3894 2008-08-25 Sebastian Pop <sebastian.pop@amd.com>
3896 * graphite.c (get_construction_edge): Removed.
3897 (gloog): Construction edge is the scop entry edge.
3899 2008-08-25 Sebastian Pop <sebastian.pop@amd.com>
3901 * graphite.c (can_generate_for_scop): Removed.
3902 (gloog): Do not call it.
3904 2008-08-25 Sebastian Pop <sebastian.pop@amd.com>
3906 * graphite.c (new_scop): Entry of a scop is an edge.
3907 Initialize SESE region.
3908 (free_scop): Free SESE region.
3909 (build_scops_1, scopdet_bb_info): Work on edges, not on bbs.
3910 (split_difficult_bb): New, split from end_scop.
3911 (end_scop): Exit of a scop is an edge.
3912 (build_scop_bbs): Never check CDI_POST_DOMINATORS: this info is
3913 not automatically updated and thus is always wrong.
3914 * graphite.h (struct sese): New.
3917 (struct scop): New field for a SESE region. Remove entry, exit.
3918 (SCOP_ENTRY, SCOP_EXIT): Update definitions to match same
3919 semantics as before. Moved comment around.
3921 2008-08-25 Tobias Grosser <grosser@fim.uni-passau.de>
3922 Sebastian Pop <sebastian.pop@amd.com>
3924 * graphite.c (graphite_transform_loops): Always enable gloog
3925 and find_transform when ENABLE_CHECKING.
3927 2008-08-25 Sebastian Pop <sebastian.pop@amd.com>
3929 * graphite.c (graphite_transform_loops): Move pretty printer
3930 of SCOPs before doing any transform. Remove call to print_scops
3931 and dot_all_scops_1.
3933 2008-08-25 Sebastian Pop <sebastian.pop@amd.com>
3935 * graphite.c (dump_gbb_conditions): Don't try to print NULL pointers.
3936 (print_graphite_bb): Same.
3938 2008-08-25 Sebastian Pop <sebastian.pop@amd.com>
3940 * graphite.c (dot_all_scops_1): Cleanup.
3941 (move_scops): Fix comment.
3943 2008-08-25 Sebastian Pop <sebastian.pop@amd.com>
3945 * graphite.c (build_scop_bbs): Revert commit 139355:
3947 2008-08-20 Sebastian Pop <sebastian.pop@amd.com>
3948 Dwarakanath Rajagopal <dwarak.rajagopal@amd.com>
3950 * graphite.c (build_scop_bbs): Factor up code.
3952 2008-08-25 Tobias Grosser <grosser@fim.uni-passau.de>
3954 * graphite.c (gloog): Update dominator info.
3956 2008-08-25 Tobias Grosser <grosser@fim.uni-passau.de>
3958 * graphite.c (remove_cond_exprs): Do not fail on empty bbs.
3960 2008-08-24 Sebastian Pop <sebastian.pop@amd.com>
3962 * graphite.c (new_graphite_bb): Remove GBB_INDEX_TO_NUM_MAP
3964 (free_graphite_bb): Remove GBB_INDEX_TO_NUM_MAP free.
3965 (translate_clast): Correct formatting.
3966 * graphite.h (struct num_map): Removed.
3967 (struct graphite_bb): Remove num_map field.
3968 (GBB_INDEX_TO_NUM_MAP): Removed.
3970 2008-08-24 Sebastian Pop <sebastian.pop@amd.com>
3972 * graphite.c (build_access_matrix_with_af): Fix comments.
3973 (build_scop_data_accesses): Same.
3975 2008-08-24 Sebastian Pop <sebastian.pop@amd.com>
3977 * graphite.c (build_scop_data_accesses): Don't construct
3978 access matrices. Add a FIXME and an assert condition that
3979 should pass when the access matrices will be needed.
3981 2008-08-24 Sebastian Pop <sebastian.pop@amd.com>
3983 * tree-data-ref.c (stmt_simple_memref_p): Don't call
3985 * graphite.c (build_graphite_bb): Renamed new_graphite_bb.
3986 Moved close by free_graphite_bb.
3987 (free_graphite_bb): Call free_data_refs. Reset bb->aux.
3988 (new_scop): Move close by free_scop.
3989 (graphite_transform_loops): Avoid linear scan to reset bb->aux.
3991 2008-08-22 Jan Sjodin <jan.sjodin@amd.com>
3993 * cfgloopmanip.c (create_empty_if_region_on_edge): New.
3994 * graphite.c (clast_to_gcc_expression): Call gmp_cst_to_tree
3995 instead of recursive call.
3996 (graphite_translate_clast_equation): New.
3997 (graphite_create_guard_cond_expr): New.
3998 (graphite_create_new_guard): New.
3999 (get_stack_index_from_iv): Removed.
4000 (graphite_rename_ivs_stmt): Use gbb_loop_index.
4001 (get_true_edge_from_guard_bb): New.
4002 (translate_clast): Handle stmt_guard in clast.
4003 (get_construction_edge): Allow construction edge detection for
4004 a scope entry with multiple predecessors if one predecessor is
4005 the immediate dominator of scope entry.
4006 (can_generate_code_stmt): Enable code generation for clast_guard.
4007 (gloog): Use correct context loop. Removed check for post dominators.
4008 * cfgloop.h (create_empty_if_region_on_edge): Declared.
4010 2008-08-21 Sebastian Pop <sebastian.pop@amd.com>
4012 * graphite.c (remove_dead_loops): Document better which
4015 2008-08-21 Sebastian Pop <sebastian.pop@amd.com>
4017 * Makefile.in: Rename POLYLIBLIBS and POLYLIBINC to PPLLIBS
4019 (graphite.o): Also depends on pointer-set.h.
4021 2008-08-21 Sebastian Pop <sebastian.pop@amd.com>
4023 * graphite.c (scop_record_loop): Fix compile warning.
4025 2008-08-21 Harsha Jagasia <harsha.jagasia@amd.com>
4026 Sebastian Pop <sebastian.pop@amd.com>
4028 * graphite.c (scop_record_loop): DECL_NAME can be NULL.
4030 2008-08-21 Sebastian Pop <sebastian.pop@amd.com>
4032 * graphite.c (build_graphite_bb): Initialize bb->aux to
4033 point to the graphite_bb_p.
4034 (graphite_bb_from_bb): Renamed gbb_from_bb; returns the
4036 (add_bb_domains): Does not use the scop parameter.
4037 (graphite_transform_loops): Clean bb->aux at the end.
4039 2008-08-20 Dwarakanath Rajagopal <dwarak.rajagopal@amd.com>
4040 Sebastian Pop <sebastian.pop@amd.com>
4042 * testsuite/lib/target-supports.exp
4043 (check_effective_target_fgraphite): New.
4045 * testsuite/gcc.dg/graphite/graphite.exp: Early exit when
4046 check_effective_target_fgraphite returns false.
4047 Set dg-do-what-default to compile.
4048 (scan-graphite-dump-times): Removed.
4049 * testsuite/gfortran.dg/graphite/graphite.exp: Same.
4051 * testsuite/gcc.dg/graphite/scop-0.c: Do not use "dg-do compile".
4052 Use scan-tree-dump-times instead of scan-graphite-dump-times.
4053 * testsuite/gcc.dg/graphite/scop-1.c: Same.
4054 * testsuite/gcc.dg/graphite/scop-2.c: Same.
4055 * testsuite/gcc.dg/graphite/scop-3.c: Same.
4056 * testsuite/gcc.dg/graphite/scop-4.c: Same.
4057 * testsuite/gcc.dg/graphite/scop-5.c: Same.
4058 * testsuite/gcc.dg/graphite/scop-6.c: Same.
4059 * testsuite/gcc.dg/graphite/scop-7.c: Same.
4060 * testsuite/gcc.dg/graphite/scop-8.c: Same.
4061 * testsuite/gcc.dg/graphite/scop-9.c: Same.
4062 * testsuite/gcc.dg/graphite/scop-10.c: Same.
4063 * testsuite/gcc.dg/graphite/scop-11.c: Same.
4064 * testsuite/gcc.dg/graphite/scop-12.c: Same.
4065 * testsuite/gcc.dg/graphite/scop-13.c: Same.
4066 * testsuite/gcc.dg/graphite/scop-matmult.c: Same.
4067 * testsuite/gcc.dg/graphite/scop-14.c: Same.
4068 * testsuite/gcc.dg/graphite/scop-15.c: Same.
4069 * testsuite/gcc.dg/graphite/block-0.c: Same.
4070 * testsuite/gcc.dg/graphite/scop-16.c: Same.
4071 * testsuite/gcc.dg/graphite/block-1.c: Same.
4072 * testsuite/gcc.dg/graphite/scop-17.c: Same.
4073 * testsuite/gcc.dg/graphite/scop-18.c: Same.
4074 * testsuite/gfortran.dg/graphite/block-1.f90: Same.
4075 * testsuite/gfortran.dg/graphite/scop-1.f: Same.
4076 * testsuite/gfortran.dg/graphite/block-2.f: Same.
4078 2008-08-20 Sebastian Pop <sebastian.pop@amd.com>
4080 * graphite.c: Fix some XXX comments.
4081 (build_scop_dynamic_schedules): Removed.
4083 2008-08-20 Sebastian Pop <sebastian.pop@amd.com>
4085 * graphite.h (scop_max_loop_depth): Moved...
4086 * graphite.c (scop_max_loop_depth): ...here.
4087 (remove_all_edges_1): New.
4088 (remove_all_edges): Factored code.
4089 (remove_cond_exprs): Check only the last statement for
4090 a GIMPLE_COND expression.
4092 2008-08-20 Sebastian Pop <sebastian.pop@amd.com>
4094 * graphite.c (scan_tree_for_params): Early return when the
4095 expression is a chrec_dont_know. Handle case NEGATE_EXPR.
4096 (find_scop_parameters): Factor out code.
4097 (graphite_trans_bb_strip_mine): Remove dead code.
4099 2008-08-20 Sebastian Pop <sebastian.pop@amd.com>
4101 * graphite.c (clast_to_gcc_expression, graphite_create_new_loop,
4102 graphite_trans_bb_move_loop): Factor asserts.
4103 (gloog): Perform sanity checks only for ENABLE_CHECKING.
4104 Do not call calculate_dominance_info and estimate_bb_frequencies.
4106 2008-08-20 Jan Sjodin <jan.sjodin@amd.com>
4108 * graphite.c (create_loops_mapping, free_loops_mapping,
4109 create_loops_mapping_num, debug_loop_mapping_1,
4110 debug_loop_mapping, graphite_loops_mapping_max_loop_num,
4111 get_loop_mapping_for_num, graphite_loops_mapping_add_child,
4112 graphite_loops_mapping_add_child_num,
4113 graphite_loops_mapping_insert_child,
4114 graphite_loops_mapping_parent, get_loop_mapped_depth_for_num,
4115 get_loop_mapped_depth, split_loop_mapped_depth_for_num,
4116 loop_mapped_depth_split_loop, swap_loop_mapped_depth_for_num,
4117 create_num_from_index, get_num_from_index,
4118 swap_loop_mapped_depth): Removed.
4119 (new_scop): Do not initialize SCOP_LOOPS_MAPPING.
4120 (free_scop): Do not call free_loops_mapping.
4121 (graphite_get_new_iv_stack_index_from_old_iv): Renamed
4122 get_stack_index_from_iv. Use GBB_LOOPS instead of calling
4123 get_loop_mapped_depth.
4124 (graphite_trans_bb_move_loop): Do not update the loop mapping.
4125 (graphite_trans_bb_strip_mine): Same.
4126 * graphite.h (graphite_loops_mapping, graphite_loop_node): Removed.
4127 (struct scop): Remove field loops_mapping.
4129 2008-08-20 Sebastian Pop <sebastian.pop@amd.com>
4130 Dwarakanath Rajagopal <dwarak.rajagopal@amd.com>
4132 * graphite.c (scop_record_loop): Factor out one level of the
4133 condition by early return.
4134 (build_scop_loop_nests): Format following FSF coding style.
4135 (build_scop_dynamic_schedules): Factor out code.
4136 (scopdet_bb_info): Reindent. Default case should not be reachable.
4138 2008-08-20 Sebastian Pop <sebastian.pop@amd.com>
4139 Dwarakanath Rajagopal <dwarak.rajagopal@amd.com>
4141 * graphite.c (loop_affine_expr): Check for DECL_P or struct
4142 assignments that are not handled as simple operands for now.
4144 2008-08-20 Sebastian Pop <sebastian.pop@amd.com>
4145 Dwarakanath Rajagopal <dwarak.rajagopal@amd.com>
4147 * graphite.c (build_scop_bbs): Factor up code.
4149 2008-08-20 Sebastian Pop <sebastian.pop@amd.com>
4150 Dwarakanath Rajagopal <dwarak.rajagopal@amd.com>
4152 * graphite.c (stmt_simple_for_scop_p): Factor code out
4154 (enum gbb_type): New. Group all the GBB_* types under it.
4155 (is_loop_exit): Moved...
4156 (end_scop): Enable BB spliting.
4157 * cfgloop.c (is_loop_exit): ...here. Reimplemented.
4158 * cfgloop.h (is_loop_exit): Declared.
4160 2008-08-20 Sebastian Pop <sebastian.pop@amd.com>
4162 * doc/invoke.texi: Remove strides from examples containing
4163 DO loops when the strides are equal to 1.
4165 2008-08-20 Harsha Jagasia <harsha.jagasia@amd.com>
4166 Dwarakanath Rajagopal <dwarak.rajagopal@amd.com>
4168 * graphite.c (graphite_trans_scop_block): Or the result with
4169 the result from graphite_trans_loop_block.
4170 * testsuite/gcc.dg/graphite/block-1.c: New.
4171 * testsuite/gfortran.dg/graphite/block-1.f90: New.
4172 * testsuite/gfortran.dg/graphite/block-2.f: New.
4174 2008-08-20 Sebastian Pop <sebastian.pop@amd.com>
4176 * graphite.c (graphite_transform_loops): Call cloog_initialize
4179 2008-08-20 Sebastian Pop <sebastian.pop@amd.com>
4181 * tree-data-ref.c) (stmt_simple_memref_p): New.
4182 * tree-data-ref.h (stmt_simple_memref_p): Declared.
4183 * graphite.c (stmt_simple_memref_for_scop_p): Removed.
4184 (is_simple_operand): Call stmt_simple_memref_p.
4186 * testsuite/gcc.dg/graphite/scop-matmult.c: Updated for not
4187 using pointer arithmetic, as this is optimized by PRE and
4188 makes the code too difficult to analyze.
4190 * testsuite/gcc.dg/graphite/scop-18.c: Same.
4192 2008-08-20 Sebastian Pop <sebastian.pop@amd.com>
4194 * gdbinit.in (pgg): New.
4196 2008-08-15 Tobias Grosser <grosser@fim.uni-passau.de>
4198 * graphite.c (graphite_trans_loop_block): Fix warning.
4200 2008-08-15 Tobias Grosser <grosser@fim.uni-passau.de>
4202 * graphite.c (graphite_trans_loop_block): Fix my merge error.
4204 2008-08-15 Tobias Grosser <grosser@fim.uni-passau.de>
4206 * graphite.c (graphite_trans_bb_block): Remove check for
4207 flag_loop_strip_mine, flag_loop_block, flag_loop_interchange.
4208 Check if loop blocking is profitable for every loop, before applying
4210 (graphite_apply_transformations): Call graphite_trans_bb_block only,
4211 if flag_loop_block is set.
4213 2008-08-14 Sebastian Pop <sebastian.pop@amd.com>
4215 * graphite.c: Add some more documentation for the loop
4218 2008-08-14 Sebastian Pop <sebastian.pop@amd.com>
4220 * Makefile.in (tree-data-ref.o): Remove dependence on graphite.h.
4221 * graphite.c: Format on less than 80 columns.
4224 2008-08-14 Sebastian Pop <sebastian.pop@amd.com>
4226 * cfgloopmanip.c (loopify): Use update_dominators_in_loop.
4228 2008-08-14 Sebastian Pop <sebastian.pop@amd.com>
4230 * doc/invoke.texi (floop-block, floop-strip-mine,
4231 floop-interchange): Update documentation with examples.
4233 2008-08-13 Sebastian Pop <sebastian.pop@amd.com>
4235 * cfgloopmanip.c (create_empty_loop_on_edge): Don't call
4237 * graphite.c (graphite_create_new_loop): Call add_referenced_var.
4239 2008-08-13 Sebastian Pop <sebastian.pop@amd.com>
4241 * cfgloopmanip.c (create_empty_loop_on_edge): Improve documentation.
4242 Factor gcc_asserts into a single one. Use force_gimple_operand_gsi.
4243 * tree-scalar-evolution.c: Revert useless changes.
4244 * tree-phinodes.c: Same.
4247 * tree-vectorizer.h: Same.
4248 * tree-flow.h: Same.
4250 * common.opt (fgraphite): Update documentation.
4252 2008-08-12 Harsha Jagasia <harsha.jagasia@amd.com>
4254 * doc/invoke.texi (-floop-block, -floop-strip-mine,
4255 -floop-interchange): Add more text for explaining what each of these
4257 * tree-into-ssa.c (gimple_vec): Moved to...
4258 * graphite.c: Include gimple.h.
4259 (gimple_vec): Moved to...
4260 (del_loop_to_cloog_loop): Removed.
4261 (loop_affine_expr): Do not call create_data_ref when the
4262 operand is a constant.
4263 (new_scop): Use free instead of del_loop_to_cloog_loop.
4264 * Makefile.in (graphite.o): Depend on GIMPLE_H.
4265 * gimple.h (gimple_vec): ... here.
4267 2008-08-11 Tobias Grosser <grosser@fim.uni-passau.de>
4269 * graphite.c (scopdet_bb_info): Only allow loops with known number of
4271 (build_loop_iteration_domains): Fail, if latch executions unknown.
4273 2008-08-11 Tobias Grosser <grosser@fim.uni-passau.de>
4275 * graphite.c (add_conditions_to_domain): New.
4276 (build_scop_conditions_1): Call add_conditions_to_domain.
4277 (set_cloog_options): Allow to disable optimizations.
4279 2008-08-11 Tobias Grosser <grosser@fim.uni-passau.de>
4281 * graphite.c (find_params_in_bb): Look for parameters in conditions.
4282 Do not use walk_dominator_tree.
4283 (find_scop_parameters): Do not use walk_dominator_tree.
4285 2008-08-11 Tobias Grosser <grosser@fim.uni-passau.de>
4287 * graphite.c (scan_tree_for_params) Add / Subtract inequality.
4288 (idx_record_params): Adapt.
4289 * graphite.h (scop_gimple_loop_depth): New.
4291 2008-08-11 Tobias Grosser <grosser@fim.uni-passau.de>
4293 * graphite.c (build_scop_dynamic_schedules): Remove value_init.
4294 (scan_tree_for_params): Remove value_init.
4295 (build_scop_context): Remove value_init.
4296 (build_loop_iteration_domains): Remove value_init.
4297 (schedule_to_scattering): Remove value_init.
4298 (graphite_trans_bb_strip_mine): Remove value_init.
4300 2008-08-11 Tobias Grosser <grosser@fim.uni-passau.de>
4302 * gcc/graphite.c (limit_scops): New.
4303 (graphite_transform_loops): Add limit SCoPs.
4304 * gcc/testsuite/gcc.dg/graphite/scop-0.c: Update number of SCoPs.
4305 * gcc/testsuite/gcc.dg/graphite/scop-1.c: Update number of SCoPs.
4306 * gcc/testsuite/gcc.dg/graphite/scop-10.c: Update number of SCoPs.
4307 * gcc/testsuite/gcc.dg/graphite/scop-11.c: Update number of SCoPs.
4308 * gcc/testsuite/gcc.dg/graphite/scop-12.c: Update number of SCoPs.
4309 * gcc/testsuite/gcc.dg/graphite/scop-13.c: Update number of SCoPs.
4310 * gcc/testsuite/gcc.dg/graphite/scop-14.c: Update number of SCoPs.
4311 * gcc/testsuite/gcc.dg/graphite/scop-15.c: Update number of SCoPs.
4312 * gcc/testsuite/gcc.dg/graphite/scop-16.c: Update number of SCoPs.
4313 Change loop numbers.
4314 * gcc/testsuite/gcc.dg/graphite/scop-17.c: Update number of SCoPs.
4315 Change loop numbers.
4316 * gcc/testsuite/gcc.dg/graphite/scop-18.c: Update number of SCoPs.
4317 * gcc/testsuite/gcc.dg/graphite/scop-2.c: Update number of SCoPs.
4318 * gcc/testsuite/gcc.dg/graphite/scop-3.c: Update number of SCoPs.
4319 * gcc/testsuite/gcc.dg/graphite/scop-4.c: Update number of SCoPs.
4320 * gcc/testsuite/gcc.dg/graphite/scop-5.c: Update number of SCoPs.
4321 * gcc/testsuite/gcc.dg/graphite/scop-6.c: Update number of SCoPs.
4322 * gcc/testsuite/gcc.dg/graphite/scop-7.c: Update number of SCoPs.
4323 * gcc/testsuite/gcc.dg/graphite/scop-8.c: Update number of SCoPs.
4324 * gcc/testsuite/gcc.dg/graphite/scop-9.c: Update number of SCoPs.
4325 * gcc/testsuite/gcc.dg/graphite/scop-matmult.c: Update number of SCoPs.
4327 2008-08-11 Tobias Grosser <grosser@fim.uni-passau.de>
4329 * graphite.c (graphite_transform_loops): Call always find_transform.
4331 2008-08-08 Tobias Grosser <grosser@fim.uni-passau.de>
4333 * graphite.c (free_loops_mapping): New.
4334 (stmt_simple_for_scop_p): Fix typo.
4335 (stmt_simple_for_scop_p): Fix tuples functions, that
4337 (free_graphite_bb): Fix some memleaks.
4338 (free_scop): Fix some memleaks.
4339 (scopdet_bb_info): Do not forget some tmp SCoPs.
4340 (find_params_in_bb): Fix some memleaks.
4341 (clast_to_gcc_expression): Fix warning.
4343 2008-08-07 Tobias Grosser <grosser@fim.uni-passau.de>
4345 * testsuite/gcc.dg/graphite/scop-16.c: Fix for 32bit.
4346 * testsuite/gcc.dg/graphite/scop-17.c: Fix for 32bit.
4348 2008-08-04 Sebastian Pop <sebastian.pop@amd.com>
4350 * tree-ssa-loop.c (tree-ssa-loop.o): Do not include toplev.h.
4351 Move code ifdef-ed HAVE_cloog...
4352 * graphite.c: Include toplev.h.
4354 * Makefile.in (OBJS-common): Always build graphite.o.
4355 (BACKEND): Remove @GRAPHITE@.
4356 (tree-ssa-loop.o): Do not depend on TOPLEV_H.
4357 (graphite.o): Depend on TOPLEV_H.
4359 2008-08-04 Sebastian Pop <sebastian.pop@amd.com>
4361 * Makefile.in (tree-ssa-loop.o): Depend on TOPLEV_H.
4362 Remove typo left from polylib to ppl conversion.
4363 * graphite.c (graphite_transforms): Use sorry instead of fatal.
4365 2008-08-03 Sebastian Pop <sebastian.pop@amd.com>
4367 * toplev.c (process_options): Move the graphite loop optimization
4369 * tree-ssa-loop.c (graphite_transforms): ... here.
4370 When not configured with CLooG, print to dump_file that
4371 Graphite transforms were not performed.
4372 * testsuite/gcc.dg/graphite/graphite.exp (scan-graphite-dump-times):
4374 * testsuite/gcc.dg/graphite/*.c: Updated all testcases to use
4375 scan-graphite-dump-times.
4377 2008-08-03 Sebastian Pop <sebastian.pop@amd.com>
4379 * graphite.c (dot_scop, dot_all_scops): Do not call system.
4380 Do not open /tmp/scop.dot and /tmp/allscops.dot.
4382 2008-08-02 Sebastian Pop <sebastian.pop@amd.com>
4383 Jan Sjodin <jan.sjodin@amd.com>
4385 * configure: Regenerated.
4386 * omp-low.c (expand_omp_sections): Remove now unused code.
4387 * config.in (HAVE_polylib): Removed.
4388 * configure.ac (HAVE_polylib, POLYLIBLIBS, POLYLIBINC): Removed.
4389 (PPLLIBS, PPLINC): Added.
4390 * graphite.c: Replace unsigned with int wherever possible.
4391 Don't access Cloog's data structures, but use accessor functions.
4392 Clast's stmt->type is now implemented as a vtable: change the
4393 switches of stmt->type into ifs.
4394 (polylib/polylibgmp.h): Don't include.
4395 (initialize_dependence_polyhedron,
4396 initialize_data_dependence_polyhedron, is_empty_polyhedron,
4397 statement_precedes_p, test_dependence, build_rdg_all_levels,
4398 dump_dependence_graph): Removed until this code is cleaned up
4400 * Makefile.in (POLYLIBLIBS): Renamed PPLLIBS.
4401 (POLYLIBINC): Renamed PPLINC.
4403 2008-08-01 Harsha Jagasia <harsha.jagasia@amd.com>
4404 Dwarakanath Rajagopal <dwarak.rajagopal@amd.com>
4405 Jan Sjodin <jan.sjodin@amd.com>
4407 Finish the merge and tuplification of graphite.
4409 2008-07-24 Sebastian Pop <sebastian.pop@amd.com>
4410 Jan Sjodin <jan.sjodin@amd.com>
4412 Partial merge from mainline (138072:138275).
4413 * graphite.c still has to be tuplified.
4415 2008-07-29 Jan Sjodin <jan.sjodin@amd.com>
4417 * graphite.c (graphite_loops_mapping_max_loop_num): New.
4418 (create_num_from_index): New.
4419 (get_num_from_index): Also pass in the graphite BB.
4420 (free_graphite_bb): Free GBB_INDEX_TO_NUM_MAP.
4421 (build_graphite_bb): Initialize GBB_INDEX_TO_NUM_MAP.
4422 (graphite_trans_bb_strip_mine): Call create_num_from_index.
4423 (is_interchange_valid): Return false when failing.
4424 * graphite.h (struct num_map): New.
4425 (struct graphite_bb): New field num_map.
4426 (GBB_LOOPS_MAPPING): Renamed GBB_INDEX_TO_NUM_MAP.
4428 2008-07-29 Tobias Grosser <grosser@fim.uni-passau.de>
4430 * graphite.c (dump_gbb_conditions): Print also conditions like
4431 "if (a)". Remove dublicated code and use print_generic_expr ().
4432 (stmt_simple_for_scop_p): Only allow conditions we can handle
4435 2008-07-25 Jan Sjodin <jan.sjodin@amd.com>
4437 * graphite.h (struct scop): Removed new_ivs field.
4438 (SCOP_NEWIVS): Deleted.
4439 * graphite.c (new_scop, free_scop, clast_name_to_gcc,
4440 clast_to_gcc_expression, graphite_create_new_loop):
4441 Removed use of new_ivs.
4443 2008-07-25 Jan Sjodin <jan.sjodin@amd.com>
4445 * graphite.c (debug_oldivs, debug_loop_vec, create_loops_mapping,
4446 create_loops_mapping_num, debug_loop_mapping_1): New.
4447 (debug_loop_mapping): Call debug_loop_mapping_1.
4448 (get_loop_mapping_for_num,
4449 graphite_loops_mapping_add_child,
4450 graphite_loops_mapping_add_child_num,
4451 graphite_loops_mapping_insert_child,
4452 graphite_loops_mapping_parent,
4453 split_loop_mapped_depth_for_num,
4454 loop_mapped_depth_split_loop): New.
4455 (increment_loop_mapped_depths): Removed.
4456 (swap_loop_mapped_depth_for_num): Reimplemented.
4457 (new_scop): Call create_loops_mapping.
4458 (scop_record_loop): Call graphite_loops_mapping_insert_child.
4459 (translate_clast): Pass the old loop father in parameter, and pass
4460 it to get_old_iv_from_ssa_name.
4461 (remove_edges_around_useless_blocks, can_generate_code_stmt,
4462 can_generate_code, can_generate_for_scop): New.
4463 (graphite_trans_bb_block): Returns false when it fails to transform.
4464 * graphite.h (graphite_loop_node, graphite_loops_mapping): New.
4466 2008-07-25 Sebastian Pop <sebastian.pop@amd.com>
4468 Reverted all the changes related to the streamization and
4470 These changes are now tracked in the streamization branch.
4472 2008-07-25 Sebastian Pop <sebastian.pop@amd.com>
4473 Jan Sjodin <jan.sjodin@amd.com>
4475 * graphite.c (gbb_compare): Correctly constify.
4476 (gbb_can_be_ignored): Indent.
4477 (graphite_trans_scop_swap_1and2): Add legality check.
4480 2008-07-25 Sebastian Pop <sebastian.pop@amd.com>
4482 Remove fallouts from "Reverted the Condate changes".
4483 * tree.h: Remove unused decl.
4484 * testsuite/gcc.dg/tree-checker: Same.
4485 * timevar.def: Remove counter.
4487 2008-07-24 Sebastian Pop <sebastian.pop@amd.com>
4489 * Merge from mainline (135673:138072).
4491 Reverted the MIRO changes (from 2008-04-05) that are now
4492 tracked in the miro branch.
4493 * tree-bounds.c: Removed.
4494 * tree-bounds.h: Removed.
4496 Reverted the Condate changes (from 2006-07-04, 2007-03-20) that
4497 are now tracked in the condate branch.
4498 * tree-check.c: Removed.
4499 * tree-match.c: Removed.
4500 * condate.y: Removed.
4502 2008-07-24 Dwarakanath Rajagopal <dwarak.rajagopal@amd.com>
4504 * common.opt: New user flag -floop-block, -floop-strip-mine
4505 and -floop-interchange.
4506 * toplev.c (process_options): Enable -fgraphite pass if any one of the
4507 graphite loop optimization flags is turned on.
4508 * graphite.c (graphite_apply_transformations): Add flag_loop_block,
4509 flag_loop_strip_mine and flag_loop_interchange checks before
4511 * doc/invoke.texi: Remove -fgraphite and add -floop-block,
4512 -floop-strip-mine and -floop-interchange.
4513 * testsuite/gcc.dg/graphite/block-0.c: Add -floop-block and remove
4515 * testsuite/gcc.dg/graphite/scop-16.c: Ditto.
4516 * testsuite/gcc.dg/graphite/scop-17.c: Ditto.
4517 * testsuite/gcc.dg/graphite/scop-18.c: Ditto.
4519 2008-07-23 Jan Sjodin <jan.sjodin@amd.com>
4520 Sebastian Pop <sebastian.pop@amd.com>
4522 * cfgloopmanip.c (update_dominators_in_loop): Make it static.
4523 (create_empty_loop_on_edge): More fixes.
4524 * tree-phinodes.c (resize_phi_node): Extern.
4525 (unlink_phi_node, move_phi_node): New split from remove_phi_node.
4526 * cfghooks.c (update_dominator_information): New split from
4528 * tree-vectorizer.c (rename_variables_in_bb): Extern.
4529 * tree-dfa.c (collect_dfa_stats): Start walking the CFG on the
4530 successor of the function entry block.
4532 * graphite.c: Include pointer-set.h.
4533 (debug_loop_mapping, increment_loop_mapped_depths,
4534 get_loop_mapped_depth_for_num, get_loop_mapped_depth,
4535 set_loop_mapped_depth_for_num, set_loop_mapped_depth,
4536 swap_loop_mapped_depth_for_num, get_num_from_index,
4537 swap_loop_mapped_depth, loop_iv_stack_debug,
4538 loop_iv_stack_push, loop_iv_stack_pop, loop_iv_stack_get_iv,
4539 loop_iv_stack_get_iv_from_name, loop_iv_stack_debug,
4540 get_old_iv_from_ssa_name): New.
4541 (new_scop): Initialize SCOP_LOOPS_MAPPING.
4542 (free_scop): Free SCOP_LOOPS_MAPPING.
4543 (scop_record_loop): Record old ivs.
4544 (create_var_name): Removed.
4545 (initialize_cloog_names): Allocate double space in case strip mine
4546 applies to all loops once.
4547 (clast_name_to_gcc): Look up in the map ivstack passed in parameter.
4548 (clast_to_gcc_expression): Same. Implement more clast to gimple
4550 (graphite_create_new_loop): Pass in ivstack.
4551 (remove_all_edges): Pass in the construction_edge.
4552 (graphite_remove_iv): Removed.
4553 (graphite_rename_ivs, graphite_rename_ivs_stmt,
4554 remove_cond_exprs): Rewritten.
4555 (move_phi_nodes): New.
4556 (disconnect_virtual_phi_nodes, disconnect_cond_expr): Removed.
4557 (translate_clast): Pass in ivstack. Rewrite some cases.
4558 (set_cloog_options, debug_clast_stmt): New.
4559 (find_transform): Use set_cloog_options.
4560 (outermost_loop_layer): Removed.
4561 (get_construction_edge, collect_virtual_phis, find_vdef_for_var_in_bb,
4562 find_vdef_for_var_1, find_vdef_for_var, patch_phis_for_virtual_defs,
4563 mark_old_loops, remove_dead_loops): New.
4565 (graphite_trans_bb_move_loop): Call swap_loop_mapped_depth.
4566 (const_column_index, get_first_matching_sign_row_index,
4567 get_lower_bound_row, get_upper_bound_row, get_lower_bound,
4568 get_upper_bound): New.
4569 (graphite_trans_bb_strip_mine): Also update the iv map.
4571 * graphite.h (graphite_loops_mapping, GBB_LOOPS_MAPPING): New.
4572 (struct name_tree): Add a loop field.
4573 (struct scop): Add a graphite_loops_mapping field.
4574 (SCOP_LOOPS_MAPPING): New.
4575 (debug_clast_stmt): Declare.
4576 * lambda.h (find_induction_var_from_exit_cond): Declare.
4577 (lambda-code.c): (find_induction_var_from_exit_cond): Extern.
4578 * cfgloop.h (update_dominators_in_loop): Removed declaration.
4579 (create_empty_loop_on_edge): Updated.
4580 * tree-flow.h (remove_bb, resize_phi_node, move_phi_node,
4581 rename_variables_in_bb): Declare.
4582 * tree-cfg.c (remove_bb): Extern.
4584 * testsuite/gcc.dg/graphite/block-0.c: New.
4586 2008-07-21 Dwarakanath Rajagopal <dwarak.rajagopal@amd.com>
4587 Sebastian Pop <sebastian.pop@amd.com>
4589 * graphite.c (strip_mine_profitable_p): New.
4590 (graphite_trans_bb_block): Disable strip mining if not profitable.
4592 * testsuite/gcc.dg/graphite/scop-18.c: New.
4593 * testsuite/gcc.dg/graphite/scop-17.c: Fixed.
4594 * testsuite/gcc.dg/graphite/scop-16.c: Fixed.
4596 2008-07-17 Harsha Jagasia <harsha.jagasia@amd.com>
4597 Jan Sjodin <jan.sjodin@amd.com>
4598 Sebastian Pop <sebastian.pop@amd.com>
4600 * graphite.c (is_interchange_valid): New.
4601 (graphite_trans_bb_block): Check loop nest of basic block for legality
4604 * graphite.h (gbb_inner_most_loop_index, outer_most_loop_1,
4605 outer_most_loop, gbb_outer_most_loop_index): New.
4607 * tree-loop-linear.c (perfect_loop_nest_depth): Remove static.
4608 * tree-flow.h (perfect_loop_nest_depth): Declare as extern.
4609 * testsuite/gcc.dg/graphite/scop-16.c: New.
4610 * testsuite/gcc.dg/graphite/scop-17.c: New.
4612 2008-07-11 Tobias Grosser <grosser@fim.uni-passau.de>
4614 * graphite.c (scop_remove_ignoreable_gbbs): Also update bitmap.
4615 (graphite_trans_scop_block): Ignore SCoPs without bbs.
4617 2008-07-11 Tobias Grosser <grosser@fim.uni-passau.de>
4619 * graphite.c (new_scop): Initialize SCOP_EXIT.
4620 (scopdet_info): Add.
4621 (scopdet_bb_info): Rename from is_bb_addable. Cleanup, bugfixes.
4622 (build_scops_1): Cleanup, bugfixes.
4623 (build_scops): Cleanup.
4625 * testsuite/gcc.dg/graphite/scop-matmult.c: Remove duplicated code.
4626 * testsuite/gcc.dg/graphite/scop-15.c: Add SCoP numbers.
4628 2008-07-10 Harsha Jagasia <harsha.jagasia@amd.com>
4630 * testsuite/gfortran.dg/graphite/scop-1.f: Update to reduced test case.
4632 * testsuite/gfortran.dg/graphite/graphite.exp: Use
4633 DEFAULT_GRAPHITE_FLAGS.
4635 * testsuite/gcc.dg/graphite/scop-15.c: Update to reduced test case.
4637 2008-07-10 Harsha Jagasia <harsha.jagasia@amd.com>
4639 * graphite.c (scan_tree_for_params): Do not assert any more if
4640 MULT_EXPR parameter is negative.
4642 * testsuite/gfortran.dg/graphite/scop-1.f: New.
4644 * testsuite/gfortran.dg/graphite/graphite.exp: New.
4646 * testsuite/gcc.dg/graphite/scop-15.c: New.
4648 2008-07-10 Harsha Jagasia <harsha.jagasia@amd.com>
4650 * graphite.c (is_bb_addable): Fix segfault in spec gzip and reformat.
4652 2008-07-10 Tobias Grosser <grosser@fim.uni-passau.de>
4654 * graphite.c (graphite_trans_bb_swap_loops): Rename from
4655 graphite_swap_loops.
4656 (graphite_trans_bb_move_loop): New.
4657 (graphite_trans_bb_strip_mine): Rename from graphite_strip_mine_loop.
4658 (graphite_trans_bb_block): New.
4659 (graphite_trans_loop_block): New.
4660 (graphite_trans_scop_swap_1and2): Rename from
4661 graphite_trans_swap_1and2.
4662 (graphite_trans_scop_strip): Rename from graphite_trans_strip.
4663 (graphite_trans_scop_block): New.
4664 (graphite_apply_transformations): Rename from
4665 graphite_transformations.
4667 * testsuite/gcc.dg/graphite/scop-matmult.c: New.
4669 2008-07-10 Tobias Grosser <grosser@fim.uni-passau.de>
4671 * graphite.c (gbb_compare): New.
4672 (graphite_sort_gbbs): New.
4673 (gbb_can_be_ignored): New.
4674 (scop_remove_ignoreable_gbbs): New.
4675 (graphite_transformations): Cleanup and add
4676 scop_remove_ignoreable_gbbs.
4677 * lambda.h (lambda_vector_compare): New.
4679 2008-07-09 Tobias Grosser <grosser@fim.uni-passau.de>
4681 * graphite.c (print_graphite_bb): Correct printing of static schedule.
4682 (graphite_swap_loops): int -> unsigned
4683 (graphite_strip_mine_loop): int -> unsigned, Fix SCHEDULE
4684 (graphite_transformations): New.
4685 (graphite_transform_loops): Move to graphite_transformations.
4686 * graphite.h (gbb_nb_loops): Return unsigned.
4688 2008-07-04 Tobias Grosser <grosser@fim.uni-passau.de>
4690 * graphite.c (scan_tree_for_params): Fix insertion of parameters into
4691 the domain matrix. This makes scop-0.c work again.
4693 2008-06-20 Richard Guenther <rguenther@suse.de>
4695 * graphite.h: Adjust copyright to GPLv3.
4696 * graphite.c: Likewise.
4697 (stmt_simple_memref_for_scop_p): Split out from ...
4698 (stmt_simple_for_scop_p): ... here. Fix handling of calls
4700 (get_bb_type): Optimize.
4702 (is_bb_addable): Fix memleak, replace is_pred call with
4704 (build_scops): Use current_loops.
4705 (param_index): Fix memleak.
4707 2008-06-20 Konrad Trifunovic <konrad.trifunovic@inria.fr>
4709 * graphite.c: Fix formatting.
4711 2008-06-19 Konrad Trifunovic <konrad.trifunovic@inria.fr>
4713 * graphite.c (new_scop): Memory allocation for SCOP_{NEWIVS, OLDIVS}.
4714 (free_scop): Memory deallocation for SCOP_NEWIVS, SCOP_OLDIVS.
4715 (create_var_name, save_var_name): Newly defined functions.
4716 (initialize_cloog_names): Part of the code factored out to
4718 (clast_to_gcc_expression): Now handles the case of clast_red_sum
4719 in clast_reduction statement.
4720 (graphite_create_new_loop): Now takes a new parameter
4722 (translate_clast): Now also takes the context_loop and bb_exit
4723 parameters. Rewritten the code so that it creates a gimple code
4724 inside the given context.
4725 (outermost_loop_layer, graphite_remove_iv, graphite_rename_ivs,
4726 remove_cond_expr, disconnect_cond_expr,
4727 disconnect_virtual_phi_nodes): Newly defined functions.
4728 * graphite.h (struct scop): added old_ivs vector.
4729 SCOP_OLDIVS: New macro.
4731 2008-06-19 Sebastian Pop <sebastian.pop@amd.com>
4733 * cfgloopmanip.c: Add missing function comments, fix formatting.
4735 2008-06-18 Konrad Trifunovic <konrad.trifunovic@inria.fr>
4737 * cfgloopmanip.c (update_dominators_in_loop): Defined.
4738 (create_empty_loop_on_edge): Defined.
4739 * tree-parloops.c (canonicalize_loop_ivs): Returns tree
4741 * cfgloop.h (create_empty_loop_on_edge): Declared as extern.
4742 (update_dominators_in_loop): Declared as extern
4743 * tree-flow.h (canonicalize_loop_ivs): Declared as extern.
4745 2008-06-16 Tobias Grosser <grosser@fim.uni-passau.de>
4747 * graphite.c (print_graphite_bb): Allow changing number of loops
4749 (initialize_cloog_names): Allow changing number of loops.
4750 (build_cloog_prog): Simplify.
4751 (find_transform): Enable cloog option --strides.
4752 (graphite_swap_loops): New.
4753 (graphite_strip_mine_loop): New.
4754 (graphite_trans_swap_1and2): New.
4755 (graphite_trans_strip): New.
4756 (graphite_transform_loops): Add graphite_trans_strip.
4757 * graphite.h (scop_max_loop_depth): New.
4759 2008-06-15 Tobias Grosser <grosser@fim.uni-passau.de>
4761 * graphite.c (build_scop_iteration_domain): Remove forgotten
4762 line. (Fixes compile)
4764 2008-06-15 Tobias Grosser <grosser@fim.uni-passau.de>
4766 * graphite.c (print_graphite_bb): Add output of GBB_LOOPS.
4767 (build_graphite_bb): Add GBB_LOOPS and GBB_DOMAIN and reorder.
4768 (build_bb_loops): New.
4769 (graphite_transform_loops): Add build_bb_loops.
4770 (schedule_to_scattering): Use gbb_nb_loops to support changing loop
4772 * graphite.h (graphite_bb): Add loops.
4773 (gbb_nb_loops): New.
4774 (gbb_loop_at_index): New.
4775 (gbb_loop_index): New.
4776 (nb_params_in_scop): Renamed to scop_nb_params. Updated all functions
4777 using nb_params_in_scop.
4779 2008-06-14 Tobias Grosser <grosser@fim.uni-passau.de>
4781 * graphite.c (print_graphite_bb): Adapt to minimized schedule.
4782 (build_scop_canonical_schedules): Build minimized schedule.
4783 (schedule_to_scattering): Adapt to minimized schedule.
4784 * graphite.h (graphite_bb): Add/Update descriptions.
4786 2008-06-14 Adrien Eliche <aeliche@isty.uvsq.fr>
4787 Tobias Grosser <grosser@fim.uni-passau.de>
4789 * graphite.c (print_graphite_bb): Add condition printing.
4791 (dump_gbb_conditions): New.
4792 (build_scop_conditions_1): New.
4793 (build_scop_conditions): New.
4794 * graphite.h (graphite_bb): Add conditions.
4796 2008-06-14 Tobias Grosser <grosser@fim.uni-passau.de>
4798 * graphite.c (print_graphite_bb):
4799 (free_graphite_bb): New.
4800 (free_scop): Free bbs.
4801 (get_bb_type): Free doms.
4802 (build_scop_context): Free context matrix.
4803 (build_loop_iteration_domains): Remove unused code.
4804 (build_cloog_prog): Free scattering function and blocklist.
4805 (find_transform): Free options.
4807 2008-06-13 Tobias Grosser <grosser@fim.uni-passau.de>
4809 * graphite.c (loop_body_to_cloog_stmts): Rename to add_bb_domains.
4810 Remove unnecessery cloog data structures. Make a copy of the domain
4811 (setup_cloog_loop): Rename to build_loop_iteration_domains. Remove
4812 unnecessary cloog data structures. Fix memory leaks. Remove insert
4813 into SCOP_LOOP2CLOOG_LOOP as the inserted CloogLoops will never be
4815 (build_scop_iteration_domain): Remove unnecessary cloog
4816 data structures. Fix memory leaks.
4817 (graphite_transform_loops): Disable build_scop_dynamic_schedules as it
4818 uses SCOP_LOOP2CLOOG_LOOP, that is at the moment not working.
4820 2008-06-12 Tobias Grosser <grosser@fim.uni-passau.de>
4822 * graphite.c (find_scop_params): Remove initialize_cloog_names.
4824 2008-06-12 Tobias Grosser <grosser@fim.uni-passau.de>
4826 * graphite.c (end_scop): Style fix.
4827 (schedule_to_scattering): Style and comment fix.
4829 2008-06-12 Tobias Grosser <grosser@fim.uni-passau.de>
4830 * graphite.c (print_graphite_bb): Fix definiton of
4831 schedule_to_scattering.
4832 (initialize_cloog_names): Change nb_scattdims to max loop
4834 (schedule_to_scattering): Take parameter for number of scattering
4836 (build_cloog_prog): Only build as much scattering dimensions as
4839 2008-06-12 Tobias Grosser <grosser@fim.uni-passau.de>
4841 * graphite.c (end_scop): Disable bb splitting. Fixes SIGSEGV
4842 in polyhedron/aermod.f90.
4844 2008-06-11 Tobias Grosser <grosser@fim.uni-passau.de>
4845 Dwarak Rajagopal <dwarak.rajagopal@amd.com>
4846 Harsha Jagasia <harsha.jagasia@amd.com>
4848 * graphite.c (is_bb_addable): Fix segfault.
4850 2008-06-10 Tobias Grosser <grosser@fim.uni-passau.de>
4852 * graphite.c (is_bb_addable): Fix memory leak, handling of loops
4853 with multiple exits and conditional handling in edge cases.
4854 (is_loop_exit): Fix memory leak. (Forgotten in last commit)
4856 * testsuite/gcc.dg/graphite/scop-14.c: New.
4858 2008-06-06 Tobias Grosser <grosser@fim.uni-passau.de>
4859 Adrien Eliche <aeliche@isty.uvsq.fr>
4861 * graphite.c (is_bb_addable): Add more comments and enhance
4862 readablity of the source code. Fix memory leak.
4863 (is_loop_exit): Fix memory leak.
4865 2008-06-05 Tobias Grosser <grosser@fim.uni-passau.de>
4867 * graphite.c (first_loop_in_scop): Deleted.
4868 (setup_cloog_loop): Only walk the loop chain for inner loops.
4869 (build_scop_iteration_domain): Execute setup_cloog_loop for
4870 all loops in the first layer.
4872 2008-06-05 Tobias Grosser <grosser@fim.uni-passau.de>
4874 * graphite.c (scan_tree_for_params): Change the way params are
4875 added to be indepenent of the number of loops.
4876 (setup_cloog_loop): Revert to short matrix format. Fix parameter
4878 (build_cloog_prog): Revert to short matrix format.
4880 2008-06-05 Sebastian Pop <sebastian.pop@amd.com>
4881 Dwarak Rajagopal <dwarak.rajagopal@amd.com>
4883 * tree-loop-fusion.c (fuse_loops): Fix uninitialized variable
4886 2008-06-05 Sebastian Pop <sebastian.pop@amd.com>
4888 * graphite.c (nb_data_refs_in_scop): New.
4889 (graphite_transform_loops): Print more stats: number of
4890 loops, basic blocks and data references per scop.
4892 2008-06-04 Sebastian Pop <sebastian.pop@amd.com>
4893 Jan Sjodin <jan.sjodin@amd.com>
4895 * graphite.c (loop_affine_expr, idx_record_params,
4896 find_scop_parameters, setup_cloog_loop): Use instantiate_scev
4897 instead of instantiate_parameters.
4899 2008-06-04 Tobias Grosser <grosser@fim.uni-passau.de>
4901 * graphite.c (schedule_to_scattering): Fix scattering dimensions,
4902 add support for parameters, add STATIC_SCHEDULE at the right places,
4905 2008-06-04 Tobias Grosser <grosser@fim.uni-passau.de>
4907 * graphite.c (build_scop_loop_nests): Only add the loops, that
4908 are contained completely in the SCoP.
4909 (build_cloog_prog): Disable scattering, until schedule_to_scattering
4910 and the domains are fixed.
4911 (build_scop_canonical_schedules): Add support for bbs not contained
4914 2008-06-04 Tobias Grosser <grosser@fim.uni-passau.de>
4916 * graphite.h (scop_contains_loop): Update comments to match
4917 the actual behavior.
4918 (scop_contains_loop): New.
4919 * graphite.c (schedule_to_scattering): Use scop_contains_loop.
4921 2008-06-04 Sebastian Pop <sebastian.pop@amd.com>
4923 * graphite.c (get_bb_type): On function body, i.e. loop_0,
4924 don't mark blocks as GBB_LOOP_SING_EXIT_HEADER, mark them
4927 2008-06-04 Sebastian Pop <sebastian.pop@amd.com>
4928 Tobias Grosser <grosser@fim.uni-passau.de>
4930 * graphite.c (graphite_transform_loops): Early return when
4931 there are no loops in the function.
4933 2008-05-31 Sebastian Pop <sebastian.pop@amd.com>
4934 Jan Sjodin <jan.sjodin@amd.com>
4936 * graphite.c (scan_tree_for_params, setup_cloog_loop): Compute the
4937 offset of the last loop.
4938 (setup_cloog_loop): Copy the entire outer constraint matrix.
4940 2008-05-31 Sebastian Pop <sebastian.pop@amd.com>
4941 Jan Sjodin <jan.sjodin@amd.com>
4943 * graphite.c (stmt_in_scop_p, function_parameter_p,
4944 invariant_in_scop_p): Removed.
4945 (scan_tree_for_params): Can be used with no constraint
4946 matrix for gathering parameters.
4947 (idx_record_params): Don't use idx_record_param, instead use
4948 scan_tree_for_params.
4949 (find_scop_parameters): Same.
4950 (setup_cloog_loop, build_scop_iteration_domain, build_cloog_prog):
4951 Fix the size of loop domains.
4952 (schedule_to_scattering): Exit when the outer loop is not in scop.
4953 (find_transform): Enable build_cloog_prog.
4955 2008-05-31 Sebastian Pop <sebastian.pop@amd.com>
4956 Jan Sjodin <jan.sjodin@amd.com>
4958 * graphite.c (schedule_to_scattering): Make scattering domains
4959 uniformly of the same size, as required by CLooG 0.14.0 and before.
4961 2008-05-31 Sebastian Pop <sebastian.pop@amd.com>
4962 Jan Sjodin <jan.sjodin@amd.com>
4964 * graphite.c (schedule_to_scattering): Rewrite, correct the
4965 translation of the scheduling function to scattering.
4966 (build_cloog_prog): Call schedule_to_scattering only once.
4967 * graphite.h (scop_loop_index): Do not fail for loops not
4968 in the scop: return -1.
4970 2008-05-30 Tobias Grosser <grosser@fim.uni-passau.de>
4972 * graphite.c (build_graphite_bb): Initialize GBB_DOMAIN.
4973 (loop_body_to_cloog_stmts): Export GBB_DOMAIN.
4974 (setup_cloog_loop): Export GBB_DOMAIN.
4975 (build_cloog_prog): New. Create new CLOOG_PROG, which should be
4976 able to rebuild the original control flow.
4977 * graphite.h (graphite_bb): Add domain field and access macro.
4980 2008-05-30 Sebastian Pop <sebastian.pop@amd.com>
4982 * graphite.c (debug_gbb): New.
4983 (print_scop, build_graphite_bb): Use SCOP_BBS.
4984 (build_scop_bbs): Reimplemented.
4985 (dfs_bb_in_scop_p): Removed.
4986 (build_scop_loop_nests): Reorder loops inserted in
4987 SCOP_LOOP_NEST: outer loops should come first.
4988 (build_scop_canonical_schedules): Reinitialize at zero
4989 the components of the SCOP_STATIC_SCHEDULE for the loops
4990 that have already been parsed.
4992 * graphite.h (debug_gbb): Declared.
4994 2008-05-30 Sebastian Pop <sebastian.pop@amd.com>
4995 Jan Sjodin <jan.sjodin@amd.com>
4997 * graphite.c (create_empty_loop): Renamed graphite_create_new_loop.
4998 (graphite_loop_to_gcc_loop): Removed.
4999 (remove_all_edges): New.
5000 (graphite_stmt_to_gcc_stmt): Renamed translate_clast.
5001 (gloog): Remove useless code.
5003 2008-05-29 Tobias Grosser <grosser@fim.uni-passau.de>
5005 * graphite.c (get_bb_type): Reworked. We distinguish between
5006 loops with one or multiple exits.
5007 (is_loop_exit): New.
5009 (is_bb_addable): Rework condition handling, now support for case
5010 case statements and loops with multiple exits.
5012 * testsuite/gcc.dg/graphite/scop-11.c: New.
5013 * testsuite/gcc.dg/graphite/scop-12.c: New.
5014 * testsuite/gcc.dg/graphite/scop-13.c: New.
5016 2008-05-29 Tobias Grosser <grosser@fim.uni-passau.de>
5018 * graphite.c (dot_all_scops_1): Fix some colors. Reuse colors, if
5019 we have too many colors.
5021 2008-05-22 Sandeep Maram <smaram_b04@iiita.ac.in>
5023 * doc/invoke.texi (-ftree-loop-fusion): Document.
5024 * tree-pass.h (pass_loop_fusion): Declared.
5025 * tree-loop-fusion.c: New.
5026 * timevar.def (TV_TREE_LOOP_FUSION): Declared.
5027 * tree-data-ref.c (find_data_references_in_loop): Make extern.
5028 * tree-data-ref.h (find_data_references_in_loop): Declared.
5029 * common.opt (ftree-loop-fusion): Declared.
5030 * Makefile.in (tree-loop-fusion.o): Added rule and to OBJS-common.
5032 2008-05-21 Sebastian Pop <sebastian.pop@amd.com>
5034 * graphite.c (build_access_matrix): Fix typo from the merge.
5036 2008-05-20 Sebastian Pop <sebastian.pop@amd.com>
5038 * Merge from mainline (130800:135673).
5040 2008-05-07 Sebastian Pop <sebastian.pop@amd.com>
5042 * graphite.c (end_scop): The exit of the scop is not part of the scop.
5043 Update dominators after splitting.
5045 2008-05-07 Sebastian Pop <sebastian.pop@amd.com>
5047 * graphite.c (is_bb_addable): Return the harmful statement.
5048 Factor up some code.
5049 (end_scop): New. Splits end of scope bbs on a harmful statement.
5050 (build_scops_1): Call end_scop.
5052 2008-05-07 Sebastian Pop <sebastian.pop@amd.com>
5054 * graphite.c: (succs_at_same_depth, end_scop, all_preds_visited_p,
5055 all_succs_visited_p, start_new_scop_for_each_succ, start_new_scop,
5056 add_dominators_to_open_scops, stop_last_open_scop, scop_end_loop,
5057 build_scops_1): Removed.
5058 (build_scops_2): Renamed build_scops_1.
5060 2008-05-06 Sebastian Pop <sebastian.pop@amd.com>
5062 * graphite.c: Fix formatting.
5064 2008-05-06 Tobias Grosser <grosser@fim.uni-passau.de>
5066 * graphite.c (get_bb_type): New.
5068 (build_scops_2): New.
5069 (is_bb_addable): New.
5070 (build_scops): Switch the scop detection.
5071 (build_scop_bbs): Add entry bb to scop.
5072 * graphite.h (struct scop): Update comment.
5074 2008-05-06 Tobias Grosser <grosser@fim.uni-passau.de>
5076 * graphite.c (dot_all_scops_1): Fix some incorrect colors and add
5079 2008-05-06 Tobias Grosser <grosser@fim.uni-passau.de>
5081 * testsuite/gcc.dg/graphite/scop-1.c: Update.
5082 * testsuite/gcc.dg/graphite/scop-2.c: Update.
5083 * testsuite/gcc.dg/graphite/scop-4.c: Update.
5084 * testsuite/gcc.dg/graphite/scop-5.c: Add.
5085 * testsuite/gcc.dg/graphite/scop-6.c: Add.
5087 2008-05-06 Sebastian Pop <sebastian.pop@amd.com>
5089 * testsuite/gcc.dg/graphite/scop-0.c: Add.
5090 * testsuite/gcc.dg/graphite/scop-7.c: Add.
5091 * testsuite/gcc.dg/graphite/scop-8.c: Add.
5092 * testsuite/gcc.dg/graphite/scop-9.c: Add.
5093 * testsuite/gcc.dg/graphite/scop-10.c: Add.
5095 2008-05-06 Tobias Grosser <grosser@fim.uni-passau.de>
5097 * graphite.c (scop_affine_expr): Renamed to loop_affine_expr.
5098 Check affine expressions depending on the outermost loop
5100 (stmt_simple_for_scop_p): Same.
5101 (harmfule_stmt_in_scop): Same.
5103 2008-04-28 Tobias Grosser <grosser@fim.uni-passau.de>
5105 * graphite.c (dot_all_scops): Remove incorrect difficult bb coloring,
5106 mark entry and exit, that are not part of the SCoP and update HTML
5109 2008-04-25 Sebastian Pop <sebastian.pop@amd.com>
5111 * graphite.c (basic_block_simple_for_scop_p): Renamed
5113 (save_scop, preds_at_same_depth, test_for_scop_bound): Removed.
5114 (add_dominators_to_open_scops, build_scops_1): Reimplemented.
5115 (all_preds_visited_p, all_succs_visited_p,
5116 start_new_scop_for_each_succ, start_new_scop, stop_last_open_scop,
5117 scop_end_loop): New.
5118 (build_scops): Do not use dfs_enumerate_from.
5120 * testsuite/gcc.dg/graphite/scop-{1,2,4}.c: Updated.
5122 2008-04-23 Sebastian Pop <sebastian.pop@amd.com>
5124 * graphite.c: Add comments to functions that are missing a
5126 (graphite_create_iv): Removed. Merged in graphite_loop_to_gcc_loop.
5128 2008-04-23 Sebastian Pop <sebastian.pop@amd.com>
5130 * graphite.c (nb_params_in_scop): Moved...
5131 (graphite_bb_from_bb, loop_body_to_cloog_stmts): New.
5132 (setup_cloog_loop): Call loop_body_to_cloog_stmts.
5133 (clast_to_gcc_expression): Reduce column size to less than 80.
5134 (graphite_create_iv): Return the new name of the IV.
5135 (find_transform): Set options->esp and options->cpp.
5136 (gloog): Comment out the invalidation of the old loop code.
5137 (initialize_dependence_polyhedron): Replace scop_nb_params with
5140 * graphite.h (nb_params_in_scop): ... here.
5141 (scop_nb_params): Removed.
5142 (loop_domain_dim): Return something even when the loop was not
5143 found in the hash table: avoid ICEing on all the graphite.exp
5146 2008-04-14 Konrad Trifunovic <konrad.trifunovic@inria.fr>
5148 * tree-chrec.c (for_each_scev_op): SCEV can have 3 operands.
5150 * graphite.c (build_scop_dynamic_schedules): Schedule is built
5151 according to nesting level.
5152 (find_scop_parameters): Call instantiate_parameters.
5153 (scan_tree_for_params): Extend it to handle general affine bounds.
5154 Inner loop bound can depend on outer loop induction variable.
5155 (setup_cloog_loop): tmp variable is allocated on stack. Call
5156 instantiate_parameters with respect to outermost_loop_in_scop.
5157 (loop_domain_dim, ref_nb_loops, loop_iteration_vector_dim): moved to
5159 (create_empty_loop): Function loopify should be given edge
5160 probability, instead of edge frequency. Dominance relation from
5161 switch_bb to loop_header.
5162 (clast_to_gcc_expression): Added handling of clast_reduction node.
5163 (gloog): New functionality for removing old loop.
5164 (test_dependence): Factored out from build_rdg_all_levels.
5165 (build_rdg_all_levels): Dependence testing factored out to
5166 test_dependence function.
5168 * graphite.h (struct graphite_bb): Extended with dynamic_schedule.
5169 (loop_domain_dim, ref_nb_loops, loop_iteration_vector_dim): Moved
5172 2008-04-07 Sebastian Pop <sebastian.pop@amd.com>
5174 * graphite.c (free_scop, param_index, initialize_cloog_names,
5175 nb_params_in_scop): Use name_tree map instead of just a tree
5176 for keeping track of the variable name associated to that tree.
5177 (create_empty_loop, gmp_cst_to_tree, clast_name_to_gcc,
5178 clast_to_gcc_expression, graphite_create_iv,
5179 graphite_loop_to_gcc_loop, graphite_cond_to_gcc_cond,
5180 graphite_stmt_to_gcc_stmt): New.
5181 (gloog): Call these.
5182 * graphite.h (struct name_tree): New.
5183 (struct scop): Use name_tree instead of tree for params.
5184 Store a vector of name_tree for new_ivs.
5186 (scop_nb_params): Use name_tree instead of tree.
5188 2008-04-05 Alexander Lamaison <awl03@doc.ic.ac.uk>
5189 Sebastian Pop <sebastian.pop@amd.com>
5191 * tree-bounds.c: New.
5192 * tree-bounds.h: New.
5193 * tree-pass.h: Declare pass_bounds_early and pass_bounds_late.
5194 * passes.c: Schedule pass_bounds_early, pass_bounds_late.
5195 * builtins.c (expand_builtin_alloca): Add flag_bounds as for
5199 * c-cppbuiltin.c: Same.
5203 * tree-outof-ssa.c: Same.
5205 * Makefile.in: Same.
5207 2008-03-15 Antoniu Pop <antoniu.pop@gmail.com>
5208 Sebastian Pop <sebastian.pop@amd.com>
5210 * tree-loop-distribution.c (remaining_stmts,
5211 upstream_mem_writes): Removed static variables.
5212 (copy_loop_before, create_bb_after_loop,
5213 mark_nodes_having_upstream_mem_writes, free_rdg_components,
5214 rdg_build_components, rdg_build_partitions,
5215 dump_rdg_partitions): Extern.
5216 (generate_loops_for_partition, generate_code_for_partition): Do not
5218 (already_processed_vertex_p, predecessor_has_mem_write,
5219 mark_nodes_having_upstream_mem_writes, has_upstream_mem_writes,
5220 rdg_flag_all_uses, rdg_flag_uses, rdg_flag_vertex_and_dependent,
5221 rdg_flag_loop_exits, rdg_flag_similar_memory_accesses,
5222 build_rdg_partition_for_component, rdg_build_partitions, ldist_gen):
5223 Pass remaining_stmts and upstream_mem_writes as parameters.
5224 (rdg_component): Moved...
5225 (build_rdg_partition_for_component): Do not aggregate components when
5226 flag_streamize_loops is set.
5227 (gen_sequential_loops): New.
5228 (ldist_gen): Call gen_sequential_loops.
5230 * tree-pass.h (pass_loop_streamization): Declared.
5232 * omp-low.c (expand_omp_sections): Call add_bb_to_loop on created
5233 basic blocks when loops structures exist.
5235 * builtin-types.def (BT_FN_VOID_PTR_PTR_INT): New.
5237 * tree-ssa-loop-ivopts.c (expr_invariant_in_region_p): New.
5239 * tree-parloops.c (take_address_of, eliminate_local_variables_1,
5240 eliminate_local_variables_stmt, eliminate_local_variables,
5241 separate_decls_in_loop_name, separate_decls_in_loop_stmt,
5242 separate_decls_in_loop, gen_parallel_loop): Make them work on a region
5243 of code delimited by two edges in the CFG.
5244 (separate_decls_in_loop_name): Renamed separate_decls_in_region_name.
5245 (separate_decls_in_loop_stmt): Renamed separate_decls_in_region_stmt.
5246 (separate_decls_in_loop): Renamed separate_decls_in_region. Isolate
5247 the case of parallelisation of reductions.
5248 (create_loop_fn): Extern.
5249 (create_omp_parallel_region): New.
5251 * tree-data-ref.c (dump_data_dependence_relation): Don't call
5252 dump_data_reference for printing dra and drb.
5253 (create_rdg_edge_for_ddr, create_rdg_edges_for_scalar): Initialise
5255 (build_rdg): Don't call free_dependence_relations for the moment, as
5256 we attach dependence relations on each edge of the RDG.
5259 * tree-data-ref.h (rdg_component): ...here.
5260 (struct rdg_edge): New field ddr_p relation.
5261 (RDGE_RELATION): New.
5262 (create_bb_after_loop, copy_loop_before,
5263 mark_nodes_having_upstream_mem_writes, rdg_build_components,
5264 rdg_build_partitions, dump_rdg_partitions,
5265 free_rdg_components): Declared.
5267 * omp-builtins.def (BUILT_IN_GOMP_STREAM_ALIGN_PUSH,
5268 BUILT_IN_GOMP_STREAM_ALIGN_POP): New.
5270 * tree-loop-streamization.c: New.
5272 * tree-flow.h (gather_blocks_in_sese_region, create_loop_fn,
5273 create_omp_parallel_region, expr_invariant_in_region_p): Declared.
5275 * Makefile.in (tree-loop-streamization.o): Added to OBJS-common.
5277 * tree-cfg.c (gather_blocks_in_sese_region): Extern.
5279 * passes.c: Schedule pass_loop_streamization.
5281 2008-03-08 Tobias Grosser <grosser@fmi.uni-passau.de>
5283 * graphite.c (dot_all_scops_1): Fix formatting for difficult bbs and
5286 2008-03-07 Tobias Grosser <grosser@fim.uni-passau.de>
5288 * graphite.c (dot_all_scops): Update formatting.
5289 Bbs can now be part of more than one SCoP.
5291 2008-03-04 Sebastian Pop <sebastian.pop@amd.com>
5293 * graphite.c (new_loop_to_cloog_loop_str, setup_cloog_loop): Fix
5295 (loop_domain_dim): Check for unregistered toplev SCOP loop.
5296 * graphite.h (loop_to_cloog_loop): New.
5298 2008-03-04 Konrad Trifunovic <konrad.trifunovic@inria.fr>
5300 * graphite.c (loop_domain_dim, ref_nb_loops,
5301 loop_iteration_vector_dim): New.
5302 (build_access_matrix_with_af, build_access_matrix,
5303 initialize_dependence_polyhedron): Fixed for new matrix layout.
5304 No longer assume that all iteration domains are of the same
5307 2008-03-02 Sebastian Pop <sebastian.pop@amd.com>
5309 * tree-scalar-evolution.c (instantiate_parameters_1): An SSA_NAME
5310 defined in a loop at depth 0 is invariant.
5311 * tree-chrec.c (evolution_function_is_invariant_rec_p): Ditto.
5312 * tree-ssa-loop-ivopts.c (expr_invariant_in_loop_p): Should never
5313 be called at loop depth 0.
5315 * graphite.c (basic_block_simple_for_scop_p): Take the scop as
5317 (dot_all_scops_1): Update use of basic_block_simple_for_scop_p.
5318 (down_open_scop): Removed.
5319 (loop_in_scop_p): Redefined.
5320 (scop_affine_expr): New argument: scop.
5321 (stmt_simple_for_scop_p): New argument: scop. RETURN_EXPR is not
5322 a harmful statement ending a scop.
5323 (basic_block_simple_for_scop_p): New argument: scop.
5324 (get_loop_start): Removed.
5325 (new_scop): Initialize SCOP_LOOPS.
5326 (free_scop): Free SCOP_LOOPS.
5327 (succs_at_same_depth, preds_at_same_depth): New.
5328 (end_scop): Test the validity of a scop.
5329 (add_dominators_to_open_scops): New.
5330 (test_for_scop_bound): Call add_dominators_to_open_scops.
5331 Add cases for opening and closing multiple scops.
5332 (build_scops, build_scop_bbs): Iterate over basic blocks in
5334 (build_graphite_bb): Pass scop directly.
5335 (dfs_bb_in_scop_p): New.
5336 (scop_record_loop): Use SCOP_LOOPS for not recording the same loop
5338 (nb_loops_around_gb): Use loop_in_scop_p.
5339 (schedule_to_scattering): Disabled for the moment the code computing
5340 the "textual order for outer loop".
5342 * graphite.h (struct scop): New field loops.
5344 (scop_loop_index): Test that the given loop belongs to SCOP_LOOPS.
5346 * testsuite/gcc.dg/graphite/scop-{1,...,7}.c: Updated.
5348 2008-02-27 Antoniu Pop <antoniu.pop@gmail.com>
5349 Sebastian Pop <sebastian.pop@amd.com>
5351 * builtin-types.def (BT_FN_PTR_SIZE_UINT, BT_FN_BOOL_PTR): New.
5352 * common.opt (fstreamize-loops): New.
5353 * omp-builtins.def (BUILT_IN_GOMP_STREAM_CREATE,
5354 BUILT_IN_GOMP_STREAM_PUSH, BUILT_IN_GOMP_STREAM_HEAD,
5355 BUILT_IN_GOMP_STREAM_POP, BUILT_IN_GOMP_STREAM_EOS_P,
5356 BUILT_IN_GOMP_STREAM_SET_EOS, BUILT_IN_GOMP_STREAM_DESTROY): New.
5358 2008-02-22 Konrad Trifunovic <konrad.trifunovic@inria.fr>
5360 * tree-data-ref.c (build_empty_rdg): New.
5361 (build_rdg): Use it.
5362 * tree-data-ref.h (build_empty_rdg): Declared.
5363 * graphite.c (free_scop): Free SCOP_LOOP2CLOOG_LOOP.
5364 (find_vertex_for_stmt): Removed.
5365 (build_rdg_all_levels): Use build_empty_rdg and rdg_vertex_for_stmt.
5367 2008-02-21 Sebastian Pop <sebastian.pop@amd.com>
5369 * tree-loop-distribution.c (generate_builtin): After cancelling the
5370 loop tree, also delete basic blocks.
5371 (rdg_flag_uses): Stop recursion when a vertex has already been
5374 2008-02-15 Konrad Trifunovic <konrad.trifunovic@inria.fr>
5376 * graphite.c (build_scop_alpha): Removed.
5377 (graphite_transform_loops): Add a dummy call to build_all_rdg_levels
5378 and dump_dependence_graph to avoid compiler warnings.
5380 2008-02-14 Konrad Trifunovic <konrad.trifunovic@inria.fr>
5382 * tree-data-ref.c (dr_may_alias_p, create_rdg_vertices): Extern.
5383 * tree-data-ref.h (dr_may_alias_p, create_rdg_vertices): Declared.
5384 * graphite.c (new_loop_to_cloog_loop_str, hash_loop_to_cloog_loop,
5385 eq_loop_to_cloog_loop, del_loop_to_cloog_loop): New.
5386 (new_scop, setup_cloog_loop): Initialize SCOP_LOOP2CLOOG_LOOP.
5387 (initialize_dependence_polyhedron, find_vertex_for_stmt,
5388 initialize_data_dependence_polyhedron, is_empty_polyhedron,
5389 statement_precedes_p, build_rdg_all_levels, build_scop_alpha,
5390 dump_dependence_graph): New.
5391 * graphite.h (struct graphite_bb): New field compressed_alpha_matrix.
5393 (struct scop): New field loop2cloog_loop.
5394 (SCOP_LOOP2CLOOG_LOOP, struct data_dependence_polyhedron,
5395 RDGE_DDP, ddp_p, struct loop_to_cloog_loop_str): New.
5397 2008-02-10 Konrad Trifunovic <konrad.trifunovic@inria.fr>
5399 * graphite.c (build_graphite_bb): Fix initialization
5400 of the graphite basic block.
5402 2008-02-05 Sebastian Pop <sebastian.pop@amd.com>
5404 * graphite.c (scan_tree_for_params): Rewrite for the new layout of
5405 loop domain matrix. Pass in the number of loops contained in the
5407 (nb_loops_around_gb): Moved before setup_cloog_loop that uses it.
5408 (setup_cloog_loop): Rewrite for the new layout of loop domain matrix:
5409 loops that are not surrounding the current loop are not represented
5410 in the domain constraint matrix.
5411 (build_scop_iteration_domain): Initial domain constraint matrix
5412 contains only the eq/ineq, cst, and scop parameters columns.
5414 2008-01-29 Tobias Grosser <grosser@fim.uni-passau.de>
5416 * graphite.c (schedule_to_scattering, nb_loops_around_gb): New.
5417 (print_graphite_bb): Print scattering.
5419 2008-01-29 Tobias Grosser <grosser@fim.uni-passau.de>
5421 * graphite.c (initialize_cloog_names): Initialize names of
5422 scattering variables.
5424 2009-01-29 Tobias Grosser <grosser@fim.uni-passau.de>
5426 * graphite.c (dot_all_scops_1): Disable debug output while
5429 2008-01-29 Tobias Grosser <grosser@fim.uni-passau.de>
5431 * graphite.c (find_transform): Change cloog output language to C.
5433 2008-01-27 Sebastian Pop <sebastian.pop@amd.com>
5435 * tree-loop-distribution.c (generate_memset_zero,
5436 generate_builtin, generate_code_for_partition,
5437 rdg_flag_all_uses): New.
5438 (rdg_flag_uses): Gather in the same partition the statements defining
5439 the VUSES of the current statement.
5440 (rdg_flag_similar_stores): Renamed rdg_flag_similar_memory_accesses.
5441 Gather in the same partition not only the stores to the same memory
5442 access, but also the reads.
5443 (ldist_generate_loops): Renamed ldist_gen.
5445 2008-01-24 Sebastian Pop <sebastian.pop@amd.com>
5446 Tobias Grosser <grosser@fmi.uni-passau.de>
5448 * graphite.c (setup_cloog_loop): Chain all cloog loops with the
5449 next pointer, don't use the inner pointer.
5451 2008-01-20 Tobias Grosser <grosser@fmi.uni-passau.de>
5453 * graphite.c (dot_all_scops, dot_all_scops_1): New.
5454 (find_transform): Call dot_all_1.
5455 * graphite.h (dot_all_scops): Declared.
5457 2007-12-14 Sebastian Pop <sebastian.pop@amd.com>
5459 * tree-loop-distribution.c: Fix apsi.f ICE.
5460 (create_bb_after_loop): New.
5461 (generate_loops_for_partition): Use it.
5462 * testsuite/gfortran.dg/ldist-1.f90: New.
5464 * tree-data-ref.c (dot_rdg): Use /tmp/rdg.dot for dotty format.
5465 * graphite.c (dot_scop): Use /tmp/scop.dot for dotty format.
5467 2007-12-13 Tobias Grosser <grosser@fmi.uni-passau.de>
5469 * graphite.c (find_transform): Dump cloog program sent to cloog.
5471 2007-12-13 Tobias Grosser <grosser@fmi.uni-passau.de>
5473 * graphite.c (initialize_cloog_names): Initialize cloog
5476 2007-12-13 Tobias Grosser <grosser@fmi.uni-passau.de>
5478 * graphite.c (build_scop_context): Fix typo, for the matrix
5479 format: insert '0 >= 0' instead of '-1 >= 0'.
5481 2007-12-13 Sebastian Pop <sebastian.pop@amd.com>
5483 * Fix merge problems.
5485 2007-12-13 Sebastian Pop <sebastian.pop@amd.com>
5487 * graphite.c (setup_cloog_loop): Fix typo.
5489 2007-12-12 Sebastian Pop <sebastian.pop@amd.com>
5491 * doc/invoke.texi (-ftree-loop-distribution): Documented.
5492 * tree-loop-distribution.c: Reimplemented.
5493 * tree-pass.h (pass_loop_distribution): New.
5494 * tree-scalar-evolution.c (number_of_iterations_for_all_loops): Use
5496 * graphds.h (struct graph): New field indexes.
5497 * timevar.def (TV_TREE_LOOP_DISTRIBUTION): New.
5499 * tree-vect-analyze.c: Remove declaration of static functions when not
5501 * tree-vectorizer.c: Same.
5502 (rename_variables_in_loop): Now extern.
5503 (slpeel_tree_duplicate_loop_to_edge_cfg): Renamed
5504 tree_duplicate_loop_to_edge_cfg. Reset PENDING_STMT for edges after
5505 calling redirect_edge_and_branch_force.
5507 * tree-vectorizer.h (tree_duplicate_loop_on_edge): Declared.
5509 * tree-data-ref.c: Don't include tree-chrec.h.
5510 (debug_data_dependence_relations): New.
5511 (dump_data_dependence_relation): Call dump_data_reference on data refs
5513 (same_access_functions): Moved...
5514 (find_vertex_for_stmt): Renamed rdg_vertex_for_stmt.
5515 (dump_rdg_vertex, debug_rdg_vertex, dump_rdg_component,
5516 debug_rdg_component, dump_rdg, debug_rdg, dot_rdg_1, dot_rdg,
5517 struct rdg_vertex_info, ): New.
5518 (create_rdg_edge_for_ddr): Compute the dependence level before looking
5520 (create_rdg_vertices): Initialize the htab of graph->indexes.
5521 Initialize RDG_MEM_WRITE_STMT and RDG_MEM_READS_STMT.
5522 (stmts_from_loop): Don't save LABEL_EXPR.
5523 (hash_stmt_vertex_info, eq_stmt_vertex_info,
5524 hash_stmt_vertex_del): New.
5525 (build_rdg): Initialize rdg->indexes.
5526 (free_rdg, stores_from_loop, ref_base_address,
5527 rdg_defs_used_in_other_loops_p, have_similar_memory_accesses,
5528 have_similar_memory_accesses_1, ref_base_address_1,
5529 remove_similar_memory_refs): New.
5531 * tree-data-ref.h: Include tree-chrec.h.
5532 (debug_data_dependence_relations): Declared.
5533 (same_access_functions): ...here. Now static inline.
5534 (ddr_is_anti_dependent, ddrs_have_anti_deps,
5535 ddr_dependence_level): New.
5536 (struct rdg_vertex): New fields has_mem_write, has_mem_reads.
5537 (RDGV_HAS_MEM_WRITE, RDGV_HAS_MEM_READS, RDG_STMT, RDG_MEM_WRITE_STMT,
5538 RDG_MEM_READS_STMT): New.
5539 (dump_rdg_vertex, debug_rdg_vertex, dump_rdg_component,
5540 debug_rdg_component, dump_rdg, debug_rdg, dot_rdg,
5541 rdg_vertex_for_stmt): Declared.
5542 (struct rdg_edge): New field level.
5543 (RDGE_LEVEL, free_rdg): New.
5544 (stores_from_loop, remove_similar_memory_refs,
5545 rdg_defs_used_in_other_loops_p,
5546 have_similar_memory_accesses): Declared.
5547 (rdg_has_similar_memory_accesses): New.
5549 * lambda.h (dependence_level): New.
5550 * common.opt (ftree-loop-distribution): New.
5551 * tree-flow.h (debug_loop_ir): Renamed debug_loops.
5552 (print_loop_ir): Renamed print_loops.
5553 (debug_loop, debug_loop_num, print_loops_bb, mark_virtual_ops_in_bb,
5554 tree_duplicate_loop_to_edge_cfg, rename_variables_in_loop): Declared.
5555 * Makefile.in (TREE_DATA_REF_H): Depends on tree-chrec.h.
5556 (tree-loop-distribution.o): Added.
5557 * tree-cfg.c (mark_virtual_ops_in_region): Use mark_virtual_ops_in_bb.
5558 (mark_virtual_ops_in_bb): New.
5559 (print_loops_bb, debug_loop_num, debug_loop): New.
5560 * passes.c: Scheduled pass_loop_distribution.
5562 2007-12-12 Konrad Trifunovic <konrad.trifunovic@inria.fr>
5564 * graphite.c (scan_tree_for_params): Correct the number of columns
5566 (nb_flat_iterator): New.
5567 (setup_cloog_loop): Initialize to 1 the first column for inequalities.
5568 (build_scop_iteration_domain): Correct the number of columns for
5571 2007-12-12 Sebastian Pop <sebastian.pop@amd.com>
5573 * Merge from mainline (129697:130800).
5575 2007-10-30 Sebastian Pop <sebastian.pop@amd.com>
5577 * graphite.c (build_graphite_bb): SCoP's basic blocks are post
5578 dominated by SCoP's exit.
5579 (graphite_transform_loops): Compute post dominators.
5581 2007-10-28 Sebastian Pop <sebastian.pop@amd.com>
5583 * Merge from mainline (127169:129697).
5585 2007-10-28 Sebastian Pop <sebastian.pop@amd.com>
5587 * graphite.c (affine_expr): Renamed scop_affine_expr. Use an extra
5588 parameter for the basic block that contains the expression. Use
5589 outermost_loop_in_scop for evolution_function_is_affine_multivariate_p.
5590 (stmt_simple_for_scop_p): Pass to scop_affine_expr the basic block of
5592 * graphite.h (gbb_loop): New.
5593 (GBB_LOOP): Removed.
5595 2007-08-03 Sebastian Pop <sebpop@gmail.com>
5597 * Makefile.in: Fix merge problem.
5599 2007-08-03 Sebastian Pop <sebpop@gmail.com>
5601 * Merge from mainline (125309:127169).
5602 * tree-loop-distribution.c: Disabled.
5604 2007-06-05 Sebastian Pop <sebpop@gmail.com>
5606 * Merge from mainline (r123693:125309).
5608 2007-05-30 Sebastian Pop <sebpop@gmail.com>
5610 * tree-loop-distribution.c (correct_modify_expr_p): Renamed
5612 (correct_modify_p, check_statements, number_of_lvalue_uses,
5613 number_of_scalar_dependences, create_edges): Use GIMPLE_MODIFY_STMT
5614 instead of MODIFY_EXPR.
5615 (update_edge_with_ddv): Don't pass index_of_edge. Initialize
5618 2007-05-24 Sebastian Pop <sebpop@gmail.com>
5620 * tree-loop-distribution.c (struct rdg): Replace arrays by
5621 VECs for edges and vertices.
5622 (RDG_NBV, RDG_NBE, RDG_VERTEX, RDG_EDGE): Removed.
5623 (RDGV_NB_PARTITIONS): New.
5624 (PRDG_NBV, PRDG_NBE): Removed.
5625 (build_scc_graph, correct_partitions_p, mark_partitions, build_prdg,
5626 dump_rdg, find_vertex_with_stmt, create_vertices, free_rdg,
5627 number_of_scalar_dependences, create_edges, build_rdg): Use VECs.
5629 2007-05-17 Georges-Andre Silber <silber@cri.ensmp.fr>
5630 Sebastian Pop <sebpop@gmail.com>
5632 * doc/invoke.texi (-ftree-loop-distribution): Document.
5633 * tree-loop-distribution.c: New file.
5634 * tree-pass.h (pass_loop_distribution): Declared.
5635 * timevar.def (TV_TREE_LOOP_DISTRIBUTION): New.
5636 * tree-data-ref.c (initialize_data_dependence_relation): Initialize
5638 * tree-data-ref.h (data_dependence_relation): Add reversed_p.
5639 (DDR_REVERSED_P): New.
5640 * common.opt (-ftree-loop-distribution): New.
5641 * tree-flow.h (distribute_loops): Declared.
5642 * Makefile.in (OBJS-common): Depend on tree-loop-distribution.o.
5643 * passes.c (init_optimization_passes): Schedule loop distribution.
5645 2007-05-12 Sebastian Pop <sebastian.pop@inria.fr>
5647 * graphite.c (print_graphite_bb): Don't call dump_data_references.
5648 (print_scop): Don't print when scop is NULL.
5649 (build_scop_context, find_transform): Don't output to stderr.
5651 2007-05-09 Sebastian Pop <sebastian.pop@inria.fr>
5653 * tree-data-ref.c: Don't include graphite.h.
5654 Comment out the code for printing data reference's scop.
5655 (build_access_matrix_with_af): Moved...
5656 * tree-data-ref.h (build_access_matrix_with_af): Removed declaration.
5657 * graphite.c (build_access_matrix_with_af): ... here. Now static.
5658 (print_graphite_bb): Print basic block's schedule.
5659 (print_scop): Don't print the schedule, call cloog's pretty printer.
5660 (bb_in_scop_p): A basic block is in a scop only if it is both
5661 dominated and postdominated by the scop's entry and exit basic blocks.
5662 (function_parameter_p): New.
5663 (invariant_in_scop_p): Use function_parameter_p.
5664 (new_scop, save_scop): New.
5665 (end_scop, test_for_scop_bound, build_scops): Use new_scop, and
5667 (scan_tree_for_params): Directly build the constraint as CloogMatrix.
5668 (loop_in_scop_p): New.
5669 (scop_record_loop): Use loop_in_scop_p.
5670 (build_scop_domain): Renamed build_scop_iteration_domain.
5671 (setup_cloog_loop, initialize_cloog_names, find_scop_parameters,
5672 nb_params_in_scop, build_scop_context, first_loop_in_scop,
5673 setup_cloog_loop, dot_scop_1, dot_scop): New.
5674 * graphite.h (GBB_LOOP, SCOP_PROG, dot_scop): New.
5675 (struct scop): Add a pointer to cloog's representation of a program.
5677 2007-04-14 Sebastian Pop <sebastian.pop@inria.fr>
5679 * doc/invoke.texi (-ftree-check-verbose): Renamed
5680 -ftree-checks-verbose.
5681 * common.opt (flag_tree_check_verbose): Renamed
5682 flag_tree_checks_verbose.
5683 * tree-check.c (tree_check_warning): Use flag_tree_checks_verbose.
5685 2007-04-14 Sebastian Pop <sebastian.pop@inria.fr>
5687 * configure: Regenerated.
5688 * config.in: Regenerated.
5689 * tree-ssa-loop.c (graphite_transforms): Execute
5690 graphite_transform_loops only when HAVE_cloog.
5691 * configure.ac (HAVE_polylib, HAVE_cloog, GRAPHITE): Defined.
5692 * graphite.c: Include polylibgmp.h and cloog.h.
5693 (graphite_transform_loops): Removed loops parameter.
5694 * tree-flow.h (graphite_transform_loops): Update declaration.
5695 * Makefile.in (POLYLIBLIBS, POLYLIBINC, CLOOGLIBS, CLOOGINC): New.
5696 (LIBS): Depend on CLOOGLIBS and on POLYLIBLIBS.
5697 (INCLUDES): Depend on POLYLIBINC and on CLOOGINC.
5698 (OBJS-common): Remove dependence on graphite.o.
5699 (BACKEND): Depend on @GRAPHITE@.
5701 2007-04-13 Sebastian Pop <sebastian.pop@inria.fr>
5703 * doc/invoke.texi (-ftree-check-verbose): Documented.
5704 * testsuite/gcc.dg/tree-checker/tree-checks-1.c: New.
5705 * testsuite/gcc.dg/tree-checker/tree-checks-2.c: New.
5706 * testsuite/gcc.dg/tree-checker/tree-checks-3.c: New.
5707 * testsuite/gcc.dg/tree-checker/tree-checks-4.c: New.
5708 * testsuite/gcc.dg/tree-checker/tree-checks.exp: New.
5709 * testsuite/gcc.dg/tree-checker/condates.crp: New.
5710 * common.opt (ftree-checks-verbose): New.
5711 * tree-check.c (tree_check_warning): Move extra stderr output
5712 under control of flag_tree_check_verbose.
5714 2007-04-12 Sebastian Pop <sebastian.pop@inria.fr>
5716 * tree-match.c: Fix comments formatting.
5717 * tree-match.h: Fix comments formatting.
5718 * tree-check.c: Fix comments formatting.
5719 (tree_check_init): Restructure.
5721 2007-04-12 Nic Volanschi <nic.volanschi@free.fr>
5723 * doc/invoke.texi (-ftree-check, -ftree-checks): Documented.
5725 2007-04-10 Sebastian Pop <sebastian.pop@inria.fr>
5727 * Merge from mainline (r120733:123693).
5729 2007-03-20 Nic Volanschi <nic.volanschi@free.fr>
5731 * condate.y: New file.
5732 * tree-match.h (struct patt_info_s): New field sign.
5733 (struct condate_s): New field msg.
5734 (normalize_condate, name_condate, add_condate): New.
5735 (conds[], condate_parse): Made extern.
5736 * tree-check.c (tree_check_warning): First arg changed to cond;
5737 warning reformatted.
5738 (tree_check_init): Reset the TREE_VISITED bit on every CFG node.
5740 (tree_check): Process trivial condates.
5741 (read_delimited_string): Removed.
5742 (print_cond): Print name and msg.
5743 (conds[]): Made extern.
5744 (parse_tree_check_file_once): Rewritten to use the parser in
5746 Processing of option --tree_check_string moved to tree_scan().
5747 * Makefile.in: Added condate.y
5749 2007-03-12 Sebastian Pop <sebastian.pop@inria.fr>
5751 * tree-pretty-print.c (dump_generic_bb_buff, lazy_dump_generic_node):
5752 Use VECs instead of varrays.
5753 * diagnostic.h (lazy_dump_generic_node): Update declaration.
5754 * Makefile.in (pretty-print.o): Depend on vec.h.
5755 * pretty-print.c: Include tree.h and vec.h.
5756 (pp_clear_state, pp_write_list_to_stream, pp_base_format,
5757 pp_base_format, pp_construct, pp_base_string, pp_lazy_mode,
5758 new_tree_chunk, pp_add_tree, pp_add_string, pp_add_char, pp_write_list,
5759 pp_free_list): Use VECs instead of varrays.
5760 * pretty-print.h: Do not include varray.h.
5761 (struct tree_chunk_s): Declaration moved before its use.
5762 (output_buffer): Rename varray field to chunks.
5763 * tree-match.c (tree_equal, chunk_1st_char, chunks_lookahead,
5764 tree_1st_char, match_chunks_pattinfo, match_tree_pattinfo,
5765 save_global_holes): Use VECs instead of varrays.
5766 * tree-match.h: Declare VECs of cfg_node, and hole_p.
5767 * tree-check.c (scan_cfg_stmts, push_node,
5768 print_matching_stmt): Removed.
5769 (tree_check_instance, push_global_holes_if_new, tree_check,
5770 execute_tree_check): Use VECs instead of varrays.
5771 (gate_tree_check): Don't execute the CFG check when basic_block_info
5774 2007-01-12 Sebastian Pop <sebastian.pop@inria.fr>
5776 * Merge from mainline (r115016:120733).
5778 2007-01-12 Sebastian Pop <sebastian.pop@inria.fr>
5780 * Merge from mainline (r117632:117661).
5782 2007-01-12 Sebastian Pop <sebastian.pop@inria.fr>
5784 * tree-dump.c (dump_option_value_in): Add TDF_DEBUG.
5785 * tree-pass.h (TDF_DEBUG, debug_p): New.
5786 * tree-scalar-evolution.c (set_scalar_evolution, get_scalar_evolution,
5787 get_scalar_evolution, add_to_evolution, set_nb_iterations_in_loop,
5788 get_loop_exit_condition, analyze_evolution_in_loop,
5789 analyze_initial_condition, analyze_scalar_evolution,
5790 instantiate_parameters, number_of_latch_executions): Use debug_p.
5791 * tree-chrec.c (chrec_apply): Use debug_p.
5792 * tree-data-ref.c: Include graphite.h.
5793 (dump_data_reference): Print also the access matrix.
5794 (analyze_array, analyze_indirect_ref, init_data_ref,
5795 analyze_offset_expr, address_analysis, object_analysis,
5796 create_data_ref, finalize_ddr_dependent,
5797 non_affine_dependence_relation, analyze_ziv_subscript,
5798 analyze_siv_subscript_cst_affine,
5799 compute_overlap_steps_for_affine_1_2, analyze_subscript_affine_affine,
5800 can_use_analyze_subscript_affine_affine, analyze_siv_subscript,
5801 analyze_miv_subscript, analyze_overlapping_iterations,
5802 build_classic_dist_vector, subscript_dependence_tester,
5803 compute_affine_dependence, analyze_all_data_dependences): Use debug_p.
5804 (build_access_matrix_with_af): No longer static.
5805 * tree-data-ref.h (scop_p): ... declaration here.
5806 (data_reference.scop): New field.
5807 (DR_SCOP, DR_ACCESS_MATRIX): New.
5808 (build_access_matrix_with_af, dr_num_subscripts): Declared.
5809 * graphite.c (print_graphite_bb): Call dump_data_references.
5810 (print_scop): Use scop_nb_loops and scop_dim_domain.
5811 (test_for_scop_bound): Use debug_p.
5812 (scan_tree_for_params): Use scop_nb_loops, scop_nb_loops and
5814 (scop_loop_index): Moved...
5815 (scop_record_loop): New.
5816 (build_scop_loop_nests): Use scop_record_loop.
5817 (build_scop_domain): Use scop_dim_domain.
5818 (build_access_matrix): Implemented.
5819 (build_scop_canonical_schedules): Use scop_nb_loops.
5820 (build_graphite_bb): Initialize GBB_SCOP.
5821 * graphite.h (scop_p): Moved...
5822 (graphite_bb.scop): New field.
5823 (graphite_bb.iteration_domain, GBB_DOMAIN, scop.nb_params,
5824 scop.nb_loops, scop.dim_domain, SCOP_NB_LOOPS, SCOP_NB_PARAMS,
5825 SCOP_DIM_DOMAIN, SCOP_STMTS): Removed.
5826 (scop_nb_params, scop_nb_loops, scop_dim_domain, gbb_dim_domain,
5827 scop_loop_index): New.
5828 * Makefile.in (tree-data-ref.o): Depends on graphite.h.
5830 2007-01-05 Sebastian Pop <sebastian.pop@inria.fr>
5832 * Merge from mainline (r117661:120450).
5834 2006-10-12 Sebastian Pop <sebastian.pop@inria.fr>
5836 * tree-scalar-evolution.c (instantiate_parameters_1): Don't stop
5837 at the first declaration outside the varying loop, instantiate as
5839 * tree-chrec.c (for_each_scev_op): New.
5840 * tree-chrec.h (for_each_scev_op): Declared.
5841 * tree-ssa-loop.c (pass_graphite_trans): Don't dump the function.
5842 * tree-data-ref.c (get_references_in_stmt,
5843 find_data_references_in_stmt): New, from trunk.
5844 (find_data_references_in_loop): Use get_references_in_stmt
5845 and find_data_references_in_loop, modified as in trunk.
5846 (build_access_matrix_with_af): New.
5847 * tree-data-ref.h (data_reference): Add a field access_matrix.
5848 (data_ref_loc): New, as in trunk.
5849 * graphite.c (print_graphite_bb, bb_in_scop_p, stmt_in_scop_p,
5850 invariant_in_scop_p, param_index, scan_tree_for_params,
5851 scop_loop_index, build_scop_loop_nests, build_scop_domain, irp_data,
5852 idx_record_param, idx_record_params, build_access_matrix,
5853 build_scop_data_accesses, build_scop_canonical_schedules,
5854 build_graphite_bb, build_scop_bbs, find_params_in_bb,
5855 build_scop_params): New.
5856 * graphite.h (graphite_bb): New.
5857 (scop): Add fields static_schedule, params, loop_nest,
5859 * lambda.h: Declare vecs of lambda_matrix.
5860 * tree-flow.h (print_loop_ir_bb): Declared.
5861 * tree-cfg.c (print_loop_ir_bb): New.
5862 (print_loop): Use print_loop_ir_bb.
5864 2006-10-12 Sebastian Pop <pop@cri.ensmp.fr>
5866 * Merge from mainline (r115016:117632).
5868 2006-10-11 Sebastian Pop <pop@cri.ensmp.fr>
5870 * graphite.c (debug_scops): Adjust definition for avoiding a bootstrap
5871 break due to a warning.
5873 2006-10-10 Sebastian Pop <pop@cri.ensmp.fr>
5875 * graphite.c (print_scops, debug_scops): New.
5876 (graphite_transform): Renamed graphite_find_transform.
5877 * graphite.h (debug_scops): Declared.
5879 2006-08-17 Sebastian Pop <pop@cri.ensmp.fr>
5881 * tree-match.c: Reformat following the GNU style.
5882 * tree-match.h: Reformat following the GNU style.
5883 * tree-pattern.h: Removed empty file.
5884 * Makefile.in: Remove references to tree-pattern.h.
5885 * tree-check.c: Reformat following the GNU style.
5886 (execute_tree_check): Move gate condition code to...
5887 (gate_tree_check): ...here. New function.
5888 (pass_check): Use the gate function.
5890 2006-07-04 Nic Volanschi <nic.volanschi@free.fr>
5892 * tree-pattern.h: New. Tree pattern matching and checking using
5894 * tree-check.c: New. Tree/CFG checking pass.
5895 * tree-match.c: New. Library for tree pattern matching.
5896 * opts.c, common.opt: Add options --ftree-check & --ftree-checks.
5897 * toplev.c, flags.h: Add globals for tree-check pass.
5898 * Makefile.in: Integrate the files in tree-check pass.
5899 * timevar.def, tree-optimize.c, tree-pass.h: Register tree-check pass.
5900 * pretty-print.c, pretty-print.h, tree-pretty-print.c, diagnostic.h:
5901 Introduce a "lazy" pretty-print mode.
5902 * tree.c, tree.h: Add tree_name.
5904 2006-07-04 Sebastian Pop <pop@cri.ensmp.fr>
5906 * doc/invoke.texi (-fgraphite): Correct typo.
5907 * tree-scalar-evolution.c (number_of_iterations_for_all_loops): Update
5908 use of print_loop_ir.
5909 * testsuite/gcc.dg/graphite/scop-1.c: New.
5910 * testsuite/gcc.dg/graphite/scop-2.c: New.
5911 * testsuite/gcc.dg/graphite/graphite.exp: New.
5912 * graphite.c: Include domwalk.h.
5913 (print_scop): Print only the entry and exit blocks.
5914 (debug_scop): No longer static.
5915 (affine_expr): Fix formating. Return also true when the expression is
5917 (stmt_simple_for_scop_p): Fix formating.
5918 (build_scops): Use domwalk.
5919 (get_loop_start, end_scop, test_for_scop_bound): New.
5920 (graphite_transform_loops): Avoid printing on stderr.
5921 * graphite.h (debug_scop): Declared.
5922 * tree-flow.h (debug_loop_ir, print_loop_ir): Update declarations.
5923 * Makefile.in (graphite.o): Depend on domwalk.h.
5924 * tree-cfg.c (print_loop, print_pred_bbs, print_succ_bbs): Remove
5925 declarations for static functions.
5926 (print_loop, print_loop_ir, debug_loop_ir): Use an extra parameter for
5927 controlling output verbosity.
5929 2006-06-26 Sebastian Pop <pop@cri.ensmp.fr>
5930 Plesco Alexandru <shurikx@gmail.com>
5932 * doc/invoke.texi (-fgraphite): Document.
5933 * tree-pass.h (pass_graphite_transforms): Declared.
5934 * timevar.def (TV_GRAPHITE_TRANSFORMS): New.
5935 * tree-ssa-loop.c (graphite_transforms, gate_graphite_transforms): New.
5936 (pass_graphite_transforms): Defined.
5937 * tree-data-ref.c (free_data_ref, data_reference): Extern.
5938 * tree-data-ref.h (free_data_ref, data_reference): Declared.
5939 * graphite.c, graphite.h: New.
5940 * common.opt (fgraphite): Declared.
5941 * tree-flow.h (graphite_transform_loops): Declared.
5942 * Makefile.in (OBJS-common): Add graphite.o.
5943 (graphite.o): New rule.
5944 * passes.c (pass_graphite_transforms): Scheduled.