1 2009-10-15 Sebastian Pop <sebastian.pop@amd.com>
3 * doc/passes.texi: Document the Graphite infrastructure.
5 2009-10-15 Sebastian Pop <sebastian.pop@amd.com>
7 * graphite-sese-to-poly.c (insert_copyin): Use gsi_insert_seq_on_edge.
8 (rewrite_commutative_reductions_out_of_ssa): Call gsi_commit_edge_inserts,
9 and check the SSA representation.
11 * gfortran.dg/graphite/id-18.f90: New, reduced from PR41193.
13 2009-10-15 Sebastian Pop <sebastian.pop@amd.com>
15 * gcc.dg/graphite/pr40157.c: Use -floop-block as reported in the PR.
17 2009-10-14 Sebastian Pop <sebastian.pop@amd.com>
19 * gcc.dg/graphite/interchange-11.c: New.
21 2009-10-14 Sebastian Pop <sebastian.pop@amd.com>
23 * gcc.dg/graphite/interchange-8.c: Enable loop interchange.
25 2009-10-14 Sebastian Pop <sebastian.pop@amd.com>
27 * gcc.dg/graphite/graphite.exp (DEFAULT_CFLAGS_GRAPHITE_BLOCK):
28 Add -fno-loop-strip-mine and -fno-loop-interchange.
29 (DEFAULT_FLAGS_GRAPHITE_INTERCHANGE): Add -fno-loop-block and
31 * gfortran.dg/graphite/graphite.exp: Same.
33 2009-10-14 Sebastian Pop <sebastian.pop@amd.com>
35 * gcc.dg/graphite/graphite.exp (DEFAULT_CFLAGS_GRAPHITE_BLOCK):
36 Renamed DEFAULT_FLAGS_GRAPHITE_BLOCK.
37 (DEFAULT_CFLAGS_GRAPHITE_IDENTITY): Renamed
38 DEFAULT_FLAGS_GRAPHITE_IDENTITY.
39 (DEFAULT_CFLAGS_GRAPHITE_INTERCHANGE): Renamed
40 DEFAULT_FLAGS_GRAPHITE_INTERCHANGE.
41 (DEFAULT_CFLAGS_GRAPHITE_SCOP): Renamed
42 DEFAULT_FLAGS_GRAPHITE_SCOP.
43 (DEFAULT_CFLAGS_RUN_ID): Renamed DEFAULT_FLAGS_RUN_ID.
44 (DEFAULT_CFLAGS_GRAPHITE): Renamed DEFAULT_FLAGS_GRAPHITE.
46 2009-10-14 Sebastian Pop <sebastian.pop@amd.com>
48 * graphite-poly.c (pbb_number_of_iterations_at_time): Cleanup comments.
50 2009-10-14 Konrad Trifunovic <konrad.trifunovic@gmail.com>
51 Sebastian Pop <sebastian.pop@amd.com>
53 * graphite-interchange.c (build_linearized_memory_access): Pass an
55 (memory_stride_in_loop): Include transform scattering in the
56 access functions to be able to querry the strides in the
58 (pbb_interchange_loop_depths): Interchange the psct_dynamic_dim,
59 not the psct_iterator_dim.
61 2009-10-14 Sebastian Pop <sebastian.pop@amd.com>
63 * graphite-blocking.c (pbb_do_strip_mine): Removed.
64 (lst_do_strip_mine_loop): New.
65 (lst_do_strip_mine): New.
66 (scop_do_strip_mine): Call lst_do_strip_mine.
67 * graphite-poly.h (lst_add_loop_under_loop): New.
68 (lst_find_first_pbb): New.
70 2009-10-14 Sebastian Pop <sebastian.pop@amd.com>
72 * graphite-poly.c (loop_to_lst): Fix LST creation.
74 2009-10-14 Tobias Grosser <grosser@fim.uni-passau.de>
76 * testsuite/gcc.dg/graphite/id-15.c: (8 * 8) replaced with
77 sizeof(unsigned long) to make it run on 32bit systems.
79 2009-10-14 Tobias Grosser <grosser@fim.uni-passau.de>
81 * testsuite/gcc.dg/graphite/run-id-1.c: Use smaller matrix to not
84 2009-10-14 Ramakrishna Upadrasta <Ramakrishna.Upadrasta@inria.fr>
86 * graphite-sese-to-poly.c (write_alias_graph_to_ascii_dimacs): Fix
88 (write_alias_graph_to_ascii_dot): New.
89 (write_alias_graph_to_ascii_ecc): Ditto.
90 (partition_drs_to_sets): Add testing of optimality of current method
91 which assigns alias numbers according to DFS Comopnent number. used
92 as heuristic for the upcoming ECC algorithm.
93 (build_scop_drs): Write to file also with the ecc and dot format.
95 2009-10-13 Sebastian Pop <sebastian.pop@amd.com>
97 * gfortran.dg/graphite/interchange-1.f: XFail.
99 2009-10-13 Sebastian Pop <sebastian.pop@amd.com>
101 * graphite.c (graphite_initialize): Do not handle functions with
102 more than 100 basic blocks.
104 2009-10-13 Sebastian Pop <sebastian.pop@amd.com>
106 * graphite-blocking.c (pbb_do_strip_mine): Use
107 PARAM_LOOP_BLOCK_TILE_SIZE.
109 2009-10-13 Sebastian Pop <sebastian.pop@amd.com>
111 * graphite-poly.c (dot_lst_1): New.
113 * graphite-poly.h (dot_lst): Declared.
115 2009-10-13 Sebastian Pop <sebastian.pop@amd.com>
117 * graphite-dependences.c (dot_deps_stmt_1): New.
118 (dot_deps_stmt): New.
119 * graphite-dependences.h (dot_deps_stmt): Declared.
121 2009-10-09 Sebastian Pop <sebastian.pop@amd.com>
123 * graphite-sese-to-poly.c (rewrite_cross_bb_scalar_dependence): Do
124 not replace cross BB scalar dependences ending on PHI nodes.
125 (rewrite_cross_bb_scalar_deps): Filter out GIMPLE_PHI nodes.
127 2009-10-09 Sebastian Pop <sebastian.pop@amd.com>
129 * graphite-poly.c (apply_poly_transforms): Implement the high
130 level driver for flag_loop_block.
131 * tree-ssa-loop.c (gate_graphite_transforms): Remove call to sorry for
134 * gcc.dg/graphite/graphite.exp (DEFAULT_CFLAGS_GRAPHITE_BLOCK): Add
136 * gfortran.dg/graphite/graphite.exp (DEFAULT_CFLAGS_GRAPHITE_BLOCK):
139 2009-10-09 Sebastian Pop <sebastian.pop@amd.com>
141 * graphite-poly.h (lst_find_pbb): New.
142 (find_lst_loop): New.
144 2009-10-09 Sebastian Pop <sebastian.pop@amd.com>
146 * graphite-poly.c (new_scop): Remove init of SCOP_DEP_GRAPH.
147 * graphite-poly.h (struct scop): Remove dep_graph field.
148 (SCOP_DEP_GRAPH): Removed.
150 2009-10-09 Sebastian Pop <sebastian.pop@amd.com>
152 * graphite-poly.h (copy_lst): Do full copy of LST.
154 2009-10-07 Sebastian Pop <sebastian.pop@amd.com>
156 * graphite-sese-to-poly.c (reduction_phi_p): Call remove_invariant_phi
157 when the loop stride is zero.
159 * gcc.dg/graphite/id-16.c: New.
161 2009-10-06 Sebastian Pop <sebastian.pop@amd.com>
163 * graphite-dependences.c (reduction_dr_1): New.
164 (reduction_dr_p): New.
165 (graphite_legal_transform_dr): Call reduction_dr_p.
166 (reduction_ddr): Renamed reduction_ddr_p.
167 * graphite-poly.h (same_pdr_p): New.
168 (number_of_write_pdrs): New.
169 * graphite-sese-to-poly.c (nb_data_writes_in_bb): New.
170 (split_reduction_stmt): Do not split reduction statements
171 when there are no writes to memory.
172 (translate_scalar_reduction_to_array_for_stmt): Insert the
173 memory reduction statement just after the scalar reduction statement.
175 * gcc.dg/graphite/interchange-10.c: Updated to differ from interchange-4.c.
177 * gcc.dg/graphite/interchange-3.c: Un-XFAIL-ed.
178 * gcc.dg/graphite/interchange-4.c: Un-XFAIL-ed.
180 2009-10-06 Sebastian Pop <sebastian.pop@amd.com>
182 * graphite-interchange.c (lst_apply_interchange): New.
183 (lst_interchange_profitable_p): New.
184 (lst_try_interchange_loops): New.
185 (lst_try_interchange): New.
186 (lst_do_interchange): New.
187 (pbb_do_interchange): Removed.
188 (scop_do_interchange): Call lst_do_interchange.
190 2009-10-06 Sebastian Pop <sebastian.pop@amd.com>
192 * graphite-poly.c (print_scop): Print SCOP_ORIGINAL_SCHEDULE and
193 SCOP_TRANSFORMED_SCHEDULE.
198 * graphite-poly.h (lst_p): New.
201 (LST_LOOP_FATHER): New.
204 (scop_to_lst): Declared.
205 (print_lst): Declared.
206 (debug_lst): Declared.
211 (lst_dewey_number): New.
212 (struct scop): Add original_schedule and transformed_schedule fields.
213 (SCOP_ORIGINAL_SCHEDULE): New.
214 (SCOP_TRANSFORMED_SCHEDULE): New.
215 * graphite-sese-to-poly.c (build_poly_scop): Call scop_to_lst.
217 2009-10-05 Sebastian Pop <sebastian.pop@amd.com>
219 * graphite-dependences.c (reduction_ddr): New.
220 (graphite_legal_transform_bb): Call reduction_ddr.
221 * graphite-poly.c (new_poly_bb): Pass a new bool parameter.
222 Initialize PBB_IS_REDUCTION.
223 * graphite-poly.h (struct poly_bb): New bool field is_reduction.
224 (PBB_IS_REDUCTION): New.
225 (new_poly_bb): Update declaration.
226 * graphite-scop-detection.h (build_scop_bbs): Removed.
227 (nb_reductions_in_loop): Removed.
228 * graphite-sese-to-poly.c (try_generate_gimple_bb): Pass a sbitmap
229 parameter for reductions.
230 (try_generate_gimple_bb): Update call to new_poly_bb.
231 (build_scop_bbs_1): Same.
232 (build_scop_bbs): Same.
233 (gsi_for_phi_node): New.
234 (scalar_close_phi_node_p): Remove gcc_assert.
235 (split_reduction_stmt): New.
236 (is_reduction_operation_p): New.
237 (phi_contains_arg): New.
238 (follow_ssa_with_commutative_ops): New.
239 (detect_commutative_reduction_arg): New.
240 (detect_commutative_reduction_assign): New.
241 (follow_inital_value_to_phi): New.
242 (edge_initial_value_for_loop_phi): New.
243 (initial_value_for_loop_phi): New.
244 (detect_commutative_reduction): New.
245 (translate_scalar_reduction_to_array_for_stmt): New.
246 (insert_copyout): New.
247 (insert_copyin): New.
248 (translate_scalar_reduction_to_array): New.
249 (rewrite_commutative_reductions_out_of_ssa_close_phi): New.
250 (rewrite_commutative_reductions_out_of_ssa_loop): New.
251 (rewrite_commutative_reductions_out_of_ssa): New.
252 (build_poly_scop): Call rewrite_commutative_reductions_out_of_ssa.
253 * sese.h (split_region_for_bb): New.
255 * gcc.dg/graphite/graphite.exp (DEFAULT_CFLAGS_GRAPHITE_BLOCK): Add -ffast-math.
256 * gcc.dg/graphite/interchange-1.c: Fix format.
257 * gcc.dg/graphite/interchange-10.c: New.
259 2009-10-05 Sebastian Pop <sebastian.pop@amd.com>
261 * graphite-sese-to-poly.c (insert_out_of_ssa_copy): Remove
264 2009-10-05 Sebastian Pop <sebastian.pop@amd.com>
266 * graphite-sese-to-poly.c (scev_analyzable_p): New.
267 (rewrite_cross_bb_scalar_dependence): New.
268 (rewrite_cross_bb_scalar_deps): New.
269 (rewrite_reductions_out_of_ssa): Use bb_in_sese_p.
270 Call rewrite_cross_bb_scalar_deps.
272 2009-10-05 Sebastian Pop <sebastian.pop@amd.com>
274 * graphite-sese-to-poly.c (gsi_for_ssa_name_def): Removed.
275 (insert_out_of_ssa_copy): Directly use gsi_after_labels and
278 2009-10-05 Sebastian Pop <sebastian.pop@amd.com>
280 * graphite-clast-to-gimple.c (build_cloog_prog): Use pbb_index.
281 * graphite-interchange.c (pbb_do_interchange): Same.
282 * graphite-poly.c (print_scattering_function): Same.
284 * graphite-poly.h (pbb_loop): New.
285 * graphite-sese-to-poly.c (create_linear_expr_from_tree): Use pbb_loop.
287 2009-09-27 Sebastian Pop <sebastian.pop@amd.com>
289 * graphite-scop-detection.c (limit_scops): Do not build poly_bbs.
291 2009-09-27 Sebastian Pop <sebastian.pop@amd.com>
293 * graphite-sese-to-poly.c (partition_drs_to_sets): Drs is not modified,
294 so don't pass a pointer to it.
295 (build_alias_set_for_drs): Same.
296 (build_base_obj_set_for_drs): Same.
297 (build_scop_drs): Same.
299 2009-09-26 Li Feng <nemokingdom@gmail.com>
301 * graphite-sese-to-poly.c (build_scop_drs): Disable writing to file
302 the alias graph of data references.
304 2009-09-25 Li Feng <nemokingdom@gmail.com>
306 * graphite-sese-to-poly.c (write_alias_graph_to_ascii_dimacs): New.
307 (build_scop_drs): When debugging, write the alias graph to file,
308 otherwise, should be disabled.
310 2009-09-17 Sebastian Pop <sebastian.pop@amd.com>
312 * graphite-scop-detection.c (stmt_simple_memref_p): Removed.
313 (is_simple_operand): Remove call to stmt_simple_memref_p.
314 (stmt_simple_for_scop_p): Update call to is_simple_operand.
316 2009-09-17 David Edelsohn <edelsohn@gnu.org>
318 * testsuite/gcc.dg/graphite/interchange-mvt.c: New File.
319 * testsuite/gcc.dg/graphite/scop-dsyrk.c: New File.
320 * testsuite/gcc.dg/graphite/scop-dsyr2k.c: New File.
321 * testsuite/gcc.dg/graphite/scop-mvt.c: New File.
322 * testsuite/gcc.dg/graphite/scop-sor.c: New File.
324 2009-09-17 Li Feng <nemokingdom@gmail.com>
327 * graphite-dependences.c (poly_drs_may_alias_p): Adjust definition.
328 (pddr_original_scattering): Make sure 2 pdr2 in the same base object set.
329 (graphite_carried_dependence_level_k): Ditto.
330 * graphite-poly.c (new_poly_dr): Add init of PDR_BASE_OBJECT_SET.
331 * graphite-poly.h (struct poly_dr): Add member dr_base_object_set.
332 (new_poly_dr): Adjust declaration.
333 * graphite-sese-to-poly.c (free_data_refs_aux): New.
334 (free_gimple_bb): Added free_data_refs_aux.
335 (build_poly_dr): Add dr_base_object_set.
336 (partition_drs_to_sets): New.
337 (dr_same_base_object_p): New.
338 (build_alias_set_for_drs): New.
339 (build_base_object_set_for_drs): New.
340 (build_scop_drs): Add build_base_obj_set_for_drs.
341 * graphite-sese-to-poly.h: Added #define for alias set number index and
342 base object set index.
343 * libgomp/testsuite/libgomp.graphite/force-parallel-6.c: Refine tests.
344 * libgomp/testsuite/libgomp.graphite/pr4118.c: New.
346 2009-09-16 Alexander Monakov <amonakov@ispras.ru>
348 * graphite-sese-to-poly.c (pdr_add_data_dimensions): Add bounds only
349 for ARRAY_REFs. Use array_ref_{low,up}_bound to determine bounds.
351 2009-09-14 Sebastian Pop <sebastian.pop@amd.com>
353 * graphite-sese-to-poly.c (struct irp_data): Removed.
354 (idx_record_params): Removed.
355 (find_params_in_bb): Scan for parameters the access functions; don't
356 parse the tree representation.
358 2009-09-14 Sebastian Pop <sebastian.pop@amd.com>
360 * tree-ssa-loop.c (gate_graphite_transforms): Disable Graphite
361 passes at -O1 and below.
363 2009-09-14 Sebastian Pop <sebastian.pop@amd.com>
365 * graphite-blocking.c: Fix order of includes: tree-chrec.h, then
366 tree-scalar-evolution.h, and then tree-data-ref.h.
367 * graphite-clast-to-gimple.c: Same.
368 * graphite-dependences.c: Same.
369 * graphite-interchange.c: Same.
370 * graphite-poly.c: Same.
371 * graphite-scop-detection.c: Same.
372 * graphite-sese-to-poly.c: Same.
374 * lambda-code.c: Same.
375 * matrix-reorg.c: Same.
376 * tree-data-ref.c: Same.
377 * tree-if-conv.c: Same.
378 * tree-loop-distribu: Same.: Same.
379 * tree-loop-linear.c: Same.
380 * tree-parloops.c: Same.
381 * tree-predcom.c: Same.
382 * tree-vect-patterns.c: Same.
384 2009-09-02 Sebastian Pop <sebastian.pop@amd.com>
386 Partially revert the previous patch, except the following.
387 * tree-scalar-evolution.c (instantiate_scev_not): Adapted to pass
388 as parameters the operands of the not expression.
390 2009-09-01 Sebastian Pop <sebastian.pop@amd.com>
392 * tree-scalar-evolution.c (instantiate_scev_assign): New.
393 Do not call analyze_scalar_evolution on assignments.
394 (instantiate_scev_phi): Call analyze_scalar_evolution.
395 (instantiate_scev_name): Call instantiate_scev_assign and
396 instantiate_scev_phi.
397 (instantiate_scev_not): Adapted to pass as parameters the operands
398 of the not expression.
400 2009-09-01 Sebastian Pop <sebastian.pop@amd.com>
402 * tree-scalar-evolution.c (instantiate_scev_binary): Adapted
403 to pass as parameters the operands of the binary expression.
405 2009-09-01 Sebastian Pop <sebastian.pop@amd.com>
407 * tree-scalar-evolution.c (instantiate_scev_bitnot): Renamed
408 instantiate_scev_not. Handle NEGATE_EXPR.
409 (instantiate_scev_r): Handle NEGATE_EXPR.
411 2009-09-01 Sebastian Pop <sebastian.pop@amd.com>
413 * tree-scalar-evolution.c (instantiate_scev_1): Renamed
415 (instantiate_scev_r): Move code in instantiate_scev_2
416 and instantiate_scev_1.
418 2009-09-01 Sebastian Pop <sebastian.pop@amd.com>
420 * tree-scalar-evolution.c (instantiate_scev_3): New.
421 (instantiate_scev_1): Move code in instantiate_scev_3.
423 2009-09-01 Sebastian Pop <sebastian.pop@amd.com>
425 * tree-scalar-evolution.c (instantiate_scev_poly): New.
426 (instantiate_scev_1): Move code in instantiate_scev_poly.
428 2009-09-01 Sebastian Pop <sebastian.pop@amd.com>
430 * tree-scalar-evolution.c (instantiate_scev_bitnot): New.
431 (instantiate_scev_1): Move code in instantiate_scev_bitnot.
433 2009-09-01 Sebastian Pop <sebastian.pop@amd.com>
435 * tree-scalar-evolution.c (instantiate_scev_convert): New.
436 (instantiate_scev_1): Move code in instantiate_scev_convert.
438 2009-09-01 Sebastian Pop <sebastian.pop@amd.com>
440 * tree-scalar-evolution.c (instantiate_scev_binary): New.
441 (instantiate_scev_1): Move code in instantiate_scev_binary.
443 2009-09-01 Sebastian Pop <sebastian.pop@amd.com>
445 * tree-scalar-evolution.c (instantiate_scev_name): New.
446 (instantiate_scev_1): Move code in instantiate_scev_name.
448 2009-08-28 Sebastian Pop <sebastian.pop@amd.com>
450 * Merge from mainline (150992:151171).
452 2009-08-25 Sebastian Pop <sebastian.pop@amd.com>
454 * graphite-dependences.c (graphite_legal_transform_bb): Call
455 pbb_remove_duplicate_pdrs.
456 * graphite-poly.c (can_collapse_pdr): Removed.
457 (pdr_find_duplicate): Removed.
458 (can_collapse_pdrs): New.
459 (pbb_remove_duplicate_pdrs): New.
460 (new_poly_dr): Do not look for duplicates.
461 * graphite-poly.h (struct poly_bb): New field pdr_duplicates_removed.
462 (PBB_PDR_DUPLICATES_REMOVED): New.
463 (pbb_remove_duplicate_pdrs): Declared.
465 2009-08-25 Sebastian Pop <sebastian.pop@amd.com>
467 * graphite-interchange.c (pbb_interchange_profitable_p): Adjust
468 the strides by multiplying by PDR_NB_REFS.
469 * graphite-poly.c (can_collapse_pdr): New.
470 (pdr_find_duplicate): New.
471 (new_poly_dr): Call pdr_find_duplicate. Collapse duplicate PDRs.
472 Initialize PDR_NB_REFS.
473 * graphite-poly.h (struct poly_dr): Add field nb_refs.
475 (new_poly_dr): Number of subscripts is a graphite_dim_t.
477 2009-08-25 Sebastian Pop <sebastian.pop@amd.com>
479 Revert one of the previous commits:
480 * graphite-dependences.c (graphite_legal_transform_bb): Avoid
481 the computation of symmetric data dependence relations.
482 (dependency_between_pbbs_p): Same.
484 2009-08-25 Sebastian Pop <sebastian.pop@amd.com>
487 * graphite-poly.c (apply_poly_transforms): Remove legality test before
490 2009-08-25 Sebastian Pop <sebastian.pop@amd.com>
492 * graphite-dependences.c (pddr_original_scattering): Return NULL
493 for read-read dependence relations.
494 * graphite-poly.h (enum poly_dr_type): Fix comment.
497 (pdr_may_write_p): New.
499 2009-08-25 Sebastian Pop <sebastian.pop@amd.com>
501 * graphite-poly.h (enum POLY_DR_TYPE): Renamed poly_dr_type.
502 (struct poly_dr): Same.
504 * graphite-poly.c (new_poly_dr): Same.
506 2009-08-25 Konrad Trifunovic <konrad.trifunovic@gmail.com>
507 Sebastian Pop <sebastian.pop@amd.com>
509 * graphite-blocking.c (pbb_strip_mine_loop_depth): Renamed
510 pbb_strip_mine_time_depth. Changed the implementation so that
511 transformation is expressed as a transformation on
512 time (scatttering) dimensions. Also, ensures that the 2d+1
513 scheduling format is preserved.
514 (pbb_strip_mine_profitable_p): Profitability is based on the
515 iteration number of a given time (scattering) dimension,
516 and not on a original loop depth dimension.
517 (pbb_strip_mine): Call pbb_number_of_iterations_at_time.
518 (pbb_do_strip_mine): Call psct_dynamic_dim.
519 * graphite-poly.c (pbb_number_of_iterations_at_time): New.
520 * graphite-poly.h (pbb_number_of_iterations_at_time): Declared.
521 (pbb_nb_dynamic_scattering_transform): New.
522 (psct_dynamic_dim): New.
524 2009-08-25 Konrad Trifunovic <konrad.trifunovic@gmail.com>
526 * graphite-ppl.c (ppl_max_for_le): Renamed ppl_max_for_le_pointset.
527 * graphite-ppl.h (ppl_max_for_le): Renamed ppl_max_for_le_pointset.
528 * graphite-poly.c (pbb_number_of_iterations): Rename ppl_max_for_le.
529 * graphite-interchange.c (build_linearized_memory_access): Same.
530 (memory_stride_in_loop): Same.
532 2009-08-25 Sebastian Pop <sebastian.pop@amd.com>
534 * graphite-dependences.c (pddr_original_scattering): New.
535 (graphite_legal_transform_dr): Call pddr_original_scattering.
538 * graphite-dependences.h (dot_deps): Declared.
539 * graphite-poly.c (new_poly_dr): Initialize PDR_ID.
540 (print_pdr): Print PDR_ID.
541 * graphite-poly.h (struct poly_dr): Add field id.
544 * graphite-scop-detection.c (dot_all_scops_1): Cleanup comment.
546 2009-08-22 Sebastian Pop <sebastian.pop@amd.com>
548 * graphite-dependences.c (graphite_carried_dependence_level_k): Do
549 not delete the original dependence relation.
551 2009-08-21 Sebastian Pop <sebastian.pop@amd.com>
553 * graphite-dependences.c (graphite_legal_transform_bb): Avoid
554 the computation of symmetric data dependence relations.
555 (dependency_between_pbbs_p): Same.
557 2009-08-21 Sebastian Pop <sebastian.pop@amd.com>
559 * graphite-dependences.c (new_poly_dr_pair): Renamed new_poly_ddr.
560 (eq_poly_dr_pair_p): Renamed eq_poly_ddr_p.
561 (hash_poly_dr_pair_p): Renamed hash_poly_ddr_p.
562 (free_poly_ddr): New.
563 (pddr_is_empty): New.
564 (dependence_polyhedron_1): Now returns a poly_ddr_p.
565 (dependence_polyhedron): Same. Remove useless gcc_assert.
567 (graphite_legal_transform_dr): Call pddr_is_empty and free_poly_ddr.
568 (graphite_carried_dependence_level_k): Call pddr_is_empty.
569 * graphite-dependences.h (enum poly_dependence_kind): New.
570 (poly_dr_pair): Renamed poly_ddr. Added a field kind.
571 (PDRP_SOURCE): Renamed PDDR_SOURCE.
572 (PDRP_SINK): Renamed PDDR_SINK.
573 (PDRP_DDP): Renamed PDDR_DDP.
575 (free_poly_ddr): Declared.
576 * graphite-poly.c (new_scop): Use the new hash function names.
577 * graphite-poly.h (struct scop): Renamed field original_pdr_pairs
579 (SCOP_ORIGINAL_PDR_PAIRS): Renamed SCOP_ORIGINAL_PDDRS.
581 2009-08-21 Sebastian Pop <sebastian.pop@amd.com>
583 * Merge from mainline (150764:150992).
585 2009-08-18 Sebastian Pop <sebastian.pop@amd.com>
587 * cfgloopmanip.c (create_empty_loop_on_edge): Generate upper
588 bounds with LT_EXPR to make niter analysis more precise on code
589 generated by Graphite.
591 2009-08-18 Sebastian Pop <sebastian.pop@amd.com>
593 * graphite-dependences.c (graphite_legal_transform_dr): Fix formatting.
594 (graphite_legal_transform_bb): Same.
595 (poly_drs_may_alias_p): Same.
597 2009-08-15 Sebastian Pop <sebastian.pop@amd.com>
600 * graphite-ppl.c (ppl_max_for_le): Correct the use of
601 ppl_Pointset_Powerset_C_Polyhedron_maximize.
603 2009-08-13 Sebastian Pop <sebastian.pop@amd.com>
605 * graphite-poly.c (print_pbb): Print PBB index.
607 2009-08-13 Sebastian Pop <sebastian.pop@amd.com>
609 * Merge from mainline (r150672:150764).
611 2009-08-13 Sebastian Pop <sebastian.pop@amd.com>
613 * graphite-interchange.c (ppl_max_for_le): Moved...
614 * graphite-poly.c (pbb_number_of_iterations): Call ppl_max_for_le.
615 * graphite-ppl.c (ppl_max_for_le): ... here.
616 * graphite-ppl.h (ppl_max_for_le): Declared.
618 2009-08-12 Sebastian Pop <sebastian.pop@amd.com>
620 * Merge from mainline (r150372:150672).
622 2009-08-11 Sebastian Pop <sebastian.pop@amd.com>
625 * sese.c (convert_for_phi_arg): New.
626 (add_guard_exit_phis): Use convert_for_phi_arg.
628 * testsuite/gfortran.dg/graphite/id-17.f: New.
630 2009-08-11 Sebastian Pop <sebastian.pop@amd.com>
632 * graphite-sese-to-poly.c (pdr_add_data_dimensions): Dont add
633 unknown subscript upper bounds.
635 * testsuite/gcc.dg/graphite/interchange-6.c: Un-XFAIL.
637 2009-08-11 Sebastian Pop <sebastian.pop@amd.com>
638 Pranav Garg <pranav.garg2107@gmail.com>
640 * graphite-interchange.c (gather_access_strides): Removed.
641 (ppl_max_for_le): New.
642 (build_linearized_memory_access): New.
643 (memory_stride_in_loop): New.
644 (pbb_interchange_profitable_p): Reimplemented.
645 * graphite-ppl.h (ppl_new_id_map): New.
646 (ppl_interchange): New.
648 * testsuite/gcc.dg/graphite/interchange-6.c: XFAILed.
650 2009-08-11 Sebastian Pop <sebastian.pop@amd.com>
652 * graphite-interchange.c (compute_subscript): Removed.
653 (compute_array_size_cstr): Removed.
654 (compute_array_size_poly): Removed.
655 (compute_array_size): Removed.
656 (gather_access_strides_poly): Removed.
657 (gather_access_strides): Empty.
659 2009-08-11 Sebastian Pop <sebastian.pop@amd.com>
661 * graphite-dependences.c (dependence_polyhedron_1): Replace
662 pdr_nb_subscripts with PDR_NB_SUBSCRIPTS.
663 (graphite_legal_transform_dr): Same.
664 (graphite_carried_dependence_level_k): Same.
665 * graphite-poly.c (new_poly_dr): Add a parameter nb_subscripts.
666 Initialize PDR_NB_SUBSCRIPTS.
667 (print_pdr_access_layout): Replace pdr_nb_subscripts with
669 * graphite-poly.h (struct poly_dr): Add nb_subscripts field.
670 (PDR_NB_SUBSCRIPTS): New.
671 (pdr_nb_subscripts): Removed.
672 (pdr_dim): Simplified.
673 * graphite-sese-to-poly.c (build_poly_dr): Replace pdr_nb_subscripts
674 with PDR_NB_SUBSCRIPTS.
676 2009-08-11 Sebastian Pop <sebastian.pop@amd.com>
678 * graphite-interchange.c (compute_array_size): Remove use of
680 * graphite-poly.c (new_poly_dr): Remove argument data_container.
681 Do not initialize PDR_DATA_CONTAINER.
682 (print_pdr): Do not print PDR_DATA_CONTAINER.
683 * graphite-poly.h (struct poly_dr): Remove data_container field.
684 (PDR_DATA_CONTAINER): Removed.
685 * graphite-sese-to-poly.c (pdr_add_data_dimensions): Remove use of
687 (build_poly_dr): Same.
689 2009-08-11 Sebastian Pop <sebastian.pop@amd.com>
691 * testsuite/gcc.dg/graphite/interchange-9.c: New.
693 2009-08-05 Konrad Trifunovic <konrad.trifunovic@gmail.com>
694 Sebastian Pop <sebastian.pop@amd.com>
696 * graphite-dependences.c (graphite_legal_transform_dr): Work on a
697 copy of the dependence polyhedron. Free the temporary objects.
698 (graphite_carried_dependence_level_k): Free unused objects before
701 * testsuite/gcc.dg/graphite/interchange-1.c: XFAILed.
702 * testsuite/gcc.dg/graphite/interchange-2.c: XFAILed.
703 * testsuite/gcc.dg/graphite/interchange-3.c: XFAILed.
704 * testsuite/gcc.dg/graphite/interchange-4.c: XFAILed.
705 * testsuite/gcc.dg/graphite/interchange-7.c: XFAILed.
707 2009-08-05 Sebastian Pop <sebastian.pop@amd.com>
709 * graphite-blocking.c (scop_do_strip_mine): Call store_scattering.
710 Early return without analyzing the data dependences if no
711 transform has been done. Call restore_scattering if the transform
713 (graphite-interchange.c): Same.
714 * graphite-poly.c (print_scattering_function): Test for PBB_TRANSFORMED.
715 (graphite_read_transforms): Initialize PBB_TRANSFORMED.
716 (apply_poly_transforms): Do not gcc_assert that
717 the transform is legal.
718 (new_poly_bb): Initialize PBB_TRANSFORMED, PBB_SAVED, and PBB_ORIGINAL.
719 Do not initialize PBB_NB_SCATTERING_TRANSFORM, PBB_NB_LOCAL_VARIABLES,
720 PBB_TRANSFORMED_SCATTERING, and PBB_ORIGINAL_SCATTERING.
721 (free_poly_dr): Free PBB_TRANSFORMED, PBB_SAVED, and PBB_ORIGINAL.
722 * graphite-poly.h (struct poly_scattering): New.
723 (struct poly_bb): Add original, transformed, and saved fields.
724 Remove transformed_scattering, original_scattering, nb_local_variables,
725 and nb_scattering_transform fields.
726 (PBB_ORIGINAL, PBB_TRANSFORMED, PBB_SAVED): New.
727 (poly_scattering_new): New.
728 (poly_scattering_free): New.
729 (poly_scattering_copy): New.
730 (store_scattering_pbb): New.
731 (store_scattering): New.
732 (restore_scattering_pbb): New.
733 (restore_scattering): New.
734 * graphite-sese-to-poly.c (build_pbb_scattering_polyhedrons):
735 Initialize PBB_TRANSFORMED and PBB_ORIGINAL.
737 2009-08-05 Sebastian Pop <sebastian.pop@amd.com>
739 * graphite-poly.c (print_pbb): Add parentheses in the pretty print.
742 2009-08-05 Sebastian Pop <sebastian.pop@amd.com>
744 * Makefile.in (graphite.o): Depends on PREDICT_H.
745 * graphite.c: Include predict.h.
746 (graphite_finalize): Call tree_estimate_probability.
747 * predict.c (predict_loops): Do not call scev_initialize and
749 (tree_estimate_probability_bb): New.
750 (tree_estimate_probability): Do not initialize loops: move that
751 code to the driver. Call tree_estimate_probability_bb.
752 (tree_estimate_probability_driver): New.
753 (pass_profile): Use tree_estimate_probability_driver.
754 * predict.h (tree_estimate_probability): Declared.
756 2009-08-05 Sebastian Pop <sebastian.pop@amd.com>
758 * graphite-clast-to-gimple.c (gloog): Add time to TV_GRAPHITE_CODE_GEN.
759 * graphite-dependences.c (graphite_legal_transform): Add time to
760 TV_GRAPHITE_DATA_DEPS.
761 (dependency_between_pbbs_p): Same.
762 * timevar.def (TV_GRAPHITE_DATA_DEPS, TV_GRAPHITE_CODE_GEN): New.
764 2009-08-03 Sebastian Pop <sebastian.pop@amd.com>
766 * Merge from mainline (r149952:150372).
768 2009-07-28 Sebastian Pop <sebastian.pop@amd.com>
770 * ChangeLog.graphite: Fix indenting, white spaces and 80 columns.
771 * graphite-blocking.c: Same.
772 * graphite-clast-to-gimple.c: Same.
773 * graphite-dependences.c: Same.
774 * graphite-poly.c: Same.
775 * graphite-poly.h: Same.
776 * graphite-ppl.c: Same.
777 * graphite-scop-detection.c: Same.
778 * graphite-sese-to-poly.c: Same.
781 2009-07-28 Sebastian Pop <sebastian.pop@amd.com>
783 * graphite-sese-to-poly.c (loop_entry_phi_arg): New.
784 (remove_simple_copy_phi): New.
785 (remove_invariant_phi): New.
786 (simple_copy_phi_p): New.
787 (reduction_phi_p): New.
788 (gsi_for_ssa_name_def): New.
789 (insert_out_of_ssa_copy): New.
790 (insert_out_of_ssa_copy_on_edge): New.
791 (create_zero_dim_array): New.
792 (scalar_close_phi_node_p): New.
793 (rewrite_close_phi_out_of_ssa): New.
794 (rewrite_phi_out_of_ssa): New.
795 (rewrite_reductions_out_of_ssa): New.
796 (build_poly_scop): Call rewrite_reductions_out_of_ssa.
798 * testsuite/gcc.dg/graphite/id-11.c: New.
799 * testsuite/gcc.dg/graphite/id-15.c: New.
800 * testsuite/gcc.dg/graphite/interchange-1.c: Un-XFAIL.
801 * testsuite/gcc.dg/graphite/interchange-2.c: Un-XFAIL.
802 * testsuite/gcc.dg/graphite/interchange-3.c: Un-XFAIL.
803 * testsuite/gcc.dg/graphite/interchange-4.c: Un-XFAIL.
804 * testsuite/gcc.dg/graphite/interchange-7.c: Un-XFAIL.
805 * testsuite/gcc.dg/graphite/scop-matmult.c: Un-XFAIL.
806 * testsuite/gfortran.dg/graphite/id-13.f: New.
807 * testsuite/gfortran.dg/graphite/id-5.f: New.
809 2009-07-28 Sebastian Pop <sebastian.pop@amd.com>
811 * graphite-clast-to-gimple.c (graphite_loop_normal_form): Do not
812 check that nb_reductions_in_loop is zero.
813 * graphite-scop-detection.c (harmful_stmt_in_bb): Don't filter out
815 (nb_reductions_in_loop): Removed.
816 (graphite_can_represent_loop): Do not call nb_reductions_in_loop.
817 * graphite-sese-to-poly.c (phi_node_is_iv): Removed.
818 (bb_contains_non_iv_scalar_phi_nodes): Removed.
819 (scop_contains_non_iv_scalar_phi_nodes): Removed.
820 (build_poly_scop): Do not call scop_contains_non_iv_scalar_phi_nodes.
822 2009-07-28 Sebastian Pop <sebastian.pop@amd.com>
824 * graphite-clast-to-gimple.c (build_cloog_prog): Do not code generate
825 statements that have an empty iteration domain.
826 * testsuite/gfortran.dg/graphite/id-16.f: New.
828 2009-07-28 Sebastian Pop <sebastian.pop@amd.com>
830 * tree-scalar-evolution.c (instantiate_scev_1): Return
831 chrec_dont_know when the result is not above instantiate_below.
832 * graphite-scop-detection.c (scopdet_basic_block_info): Fix formatting.
833 * graphite-sese-to-poly.c (create_linear_expr_from_tree): Assert that
834 the tree has a known scalar evolution.
835 * testsuite/gfortran.dg/graphite/id-14.f: New.
836 * testsuite/gfortran.dg/graphite/id-15.f: New.
838 2009-07-28 Sebastian Pop <sebastian.pop@amd.com>
840 * sese.c (rename_variables_in_stmt): Pass in an extra parameter
842 (rename_variables): Keep inserting renames after the ones already
845 2009-07-28 Sebastian Pop <sebastian.pop@amd.com>
847 * graphite-sese-to-poly.c (compare_bb_depths): New.
848 (graphite_sort_dominated_info): New.
849 (build_scop_bbs_1): Call graphite_sort_dominated_info.
850 (build_scop_scattering): Fix comment.
852 2009-07-28 Sebastian Pop <sebastian.pop@amd.com>
854 * graphite.c (graphite_finalize): Call print_loops instead of
855 dump_function_to_file.
856 * testsuite/gcc.dg/graphite/graphite.exp: Fix formatting.
857 * testsuite/gcc.dg/graphite/pr35356-1.c: New. Look for the number of
858 loops generated in the graphite output file.
859 * testsuite/gcc.dg/graphite/pr35356-2.c: New.
860 * testsuite/gcc.dg/graphite/pr35356-3.c: New. XFAILed for now.
861 * testsuite/gfortran.dg/graphite/id-12.f: New.
863 2009-07-24 Li Feng <nemokingdom@gmail.com>
865 * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-8.c:
868 2009-07-24 Li Feng <nemokingdom@gmail.com>
869 Tobias Grosser <grosser@fim.uni-passau.de>
871 * graphite-sese-to-poly.c (pdr_add_alias_set): Use data reference's
872 alias set number build alias in ACCESSES polyhedron.
873 (build_alias_set_for_drs): New.
874 (build_pbb_drs): Added build_alias_set_for_drs.
875 * graphite-dependences.c (poly_drs_may_alias_p): New.
876 (graphite_carried_dependence_level_k): Check alias information
877 before building polyhedron.
879 2009-07-24 Tobias Grosser <grosser@fim.uni-passau.de>
881 * Makefile.in (lambda-code.o): Fix formatting.
883 2009-07-24 Tobias Grosser <grosser@fim.uni-passau.de>
885 * Merge from mainline (r149350-149952)
887 2009-07-18 Tobias Grosser <grosser@fim.uni-passau.de>
889 * graphite-poly.c (apply_poly_transforms): Move strip_mine
890 before interchange to prepare for loop blocking.
892 2009-07-18 Tobias Grosser <grosser@fim.uni-passau.de>
894 * graphite-poly.c (apply_poly_transforms): Add checks after every
896 * graphite-sese-to-poly.c (build_poly_scop): Remove check, as already
897 done in apply_poly_transforms.
899 2009-07-17 Konrad Trifunovic <konrad.trifunovic@gmail.com>
901 * graphite-dependences.c (build_lexicographically_gt_constraint):
902 Replace RES parameter with *RES.
903 (dependence_polyhedron_1): Pass an address of the parameter RES
904 instead of value of RES.
906 2009-07-16 Sebastian Pop <sebastian.pop@amd.com>
908 * graphite.c (graphite_finalize): Fix comment.
909 (graphite_transform_loops): Reset scev info after code generation
912 2009-07-16 Sebastian Pop <sebastian.pop@amd.com>
914 * graphite.c (graphite_finalize): Call scev_reset.
916 2009-07-16 Sebastian Pop <sebastian.pop@amd.com>
918 * graphite-clast-to-gimple.c (compute_cloog_iv_types): Do not create
919 GBB_CLOOG_IV_TYPES hash table twice.
920 * graphite-sese-to-poly.c (free_gimple_bb): Call free_data_refs.
921 (add_condition_to_domain): Clear GMP values.
923 2009-07-16 Sebastian Pop <sebastian.pop@amd.com>
925 * graphite-dependences.c: Fix formatting.
926 * graphite-poly.c (free_poly_dr): Also free PDR_DATA_CONTAINER.
927 (pbb_number_of_iterations): Free ppl_Linear_Expression.
928 * graphite-sese-to-poly.c: Fix formatting.
929 * graphite.c (graphite_transform_loops): Create the hash table
930 after the early return.
932 2009-07-16 Sebastian Pop <sebastian.pop@amd.com>
934 * testsuite/gcc.dg/graphite/id-14.c: New.
935 * testsuite/gcc.dg/graphite/pr40157.c: New.
936 * testsuite/gfortran.dg/graphite/id-11.f: New.
938 2009-07-16 Sebastian Pop <sebastian.pop@amd.com>
940 * graphite-sese-to-poly.c (nb_pbbs_in_loops): New.
941 (build_poly_scop): Return false when there are no pbbs within
942 loops to avoid to pass to cloog scops with no loops.
944 2009-07-16 Sebastian Pop <sebastian.pop@amd.com>
946 * graphite-sese-to-poly.c (build_pbb_scattering_polyhedrons): Avoid
947 useless test "i % 2".
948 (build_pbb_scattering_polyhedrons): Fix formatting.
949 (build_poly_dr): Same.
950 * graphite.c (graphite_transform_loops): Restructure.
952 2009-07-14 Razya Ladelsky <razya@il.ibm.com>
954 * tree-ssa-loop-manip.c (rewrite_phi_with_iv): Remove
955 reduction_list parameter.
956 (rewrite_all_phi_nodes_with_iv): Same.
957 (canonicalize_loop_ivs): Same.
958 * tree-parloops.c (struct brli): Removed.
959 (build_reduction_list_info): Removed.
960 (build_new_reduction): New.
961 (analyze_reduction_list): Removed.
962 (gather_scalar_reductions): Find reductions instead of phi
963 nodes that can't be canonicalized.
964 (try_create_reduction_list): Remove reduction_list parameter.
965 (gen_parallel_loop): Same.
966 (parallelize_loops): Remove analyze_reductions variable,
967 initialization and free.
968 Change reduction_list htab initialization to reduction_info
969 elements instead of ssa names.
970 Call try_create_reduction_list and gen_parallel_loop without
971 analyzed_reduction argument.
972 * graphite-clast-to-gimple (graphite_loop_normal_form): Call
973 canonicalize_loop_ivs with one less argument.
974 * tree-flow.h (canonicalize_loop_ivs): Remove one argument.
976 2009-07-14 Konrad Trifunovic <konrad.trifunovic@gmail.com>
978 * graphite-dependences.c (new_poly_dr_pair): New.
979 (dependence_polyhedron): Renamed into dependence_polyhedron_1.
980 (new_poly_dr_pair): New.
981 (eq_poly_dr_pair_p): New.
982 (hash_poly_dr_pair_p): New.
983 * graphite-dependences.h (struct poly_dr_pair): New.
984 (eq_poly_dr_pair_p): Declared.
985 (hash_poly_dr_pair_p): Declared.
986 * graphite-poly.c (new_scop): Initialize SCOP_ORIGINAL_PDR_PAIRS.
987 (free_scop): Free SCOP_ORIGINAL_PDR_PAIRS.
988 * graphite-poly.h (struct scop): Add original_pdr_pairs field.
989 * Makefile.in (graphite-poly.o): Add dependence on
990 graphite-dependences.h.
992 2009-07-14 Sebastian Pop <sebastian.pop@amd.com>
994 * graphite-scop-detection.c (graphite_can_represent_scev): Do not let
995 polynomials of degree > 1 pass to Graphite.
996 * tree-chrec.c (scev_is_linear_expression): Call
997 evolution_function_is_affine_multivariate_p.
998 * testsuite/gfortran.dg/graphite/id-10.f90: New.
1000 2009-07-14 Sebastian Pop <sebastian.pop@amd.com>
1002 * tree-scalar-evolution.c (compute_overall_effect_of_inner_loop):
1003 Instantiate scevs varying in outer loops.
1004 * testsuite/gfortran.dg/graphite/id-9.f: Correct testcase.
1006 2009-07-14 Sebastian Pop <sebastian.pop@amd.com>
1008 * graphite-sese-to-poly.c (build_loop_iteration_domains): Do not insert
1009 redundant constraint.
1011 2009-07-14 Sebastian Pop <sebastian.pop@amd.com>
1013 * testsuite/gcc.dg/graphite/graphite.exp: Fix comments.
1014 * testsuite/gfortran.dg/graphite/graphite.exp: Trigger actions
1015 based on the file names as in the C testsuite.
1016 * testsuite/gfortran.dg/graphite/block-1.f90: Fix patterns.
1017 * testsuite/gfortran.dg/graphite/block-2.f: Same.
1018 * testsuite/gfortran.dg/graphite/block-3.f90: Same.
1019 * testsuite/gfortran.dg/graphite/block-4.f90: Same.
1020 * testsuite/gfortran.dg/graphite/id-1.f90: Same.
1021 * testsuite/gfortran.dg/graphite/id-2.f90: Same.
1022 * testsuite/gfortran.dg/graphite/id-3.f90: Same.
1023 * testsuite/gfortran.dg/graphite/id-4.f90: Same.
1024 * testsuite/gfortran.dg/graphite/id-6.f: Same.
1025 * testsuite/gfortran.dg/graphite/id-9.f: Same.
1026 * testsuite/gfortran.dg/graphite/interchange-1.f: Same.
1027 * testsuite/gfortran.dg/graphite/interchange-2.f: Same.
1028 * testsuite/gfortran.dg/graphite/scop-1.f: Same.
1030 2009-07-14 Sebastian Pop <sebastian.pop@amd.com>
1032 * sese.c (expand_scalar_variables_call): New.
1033 (expand_scalar_variables_ssa_name): Handle calls in expander.
1035 2009-07-13 Sebastian Pop <sebastian.pop@amd.com>
1037 * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-6.c:
1038 Expect to see the pattern twice.
1039 * testsuite/gcc.dg/graphite/interchange-0.c: Un-XFAIL.
1040 * testsuite/gcc.dg/graphite/interchange-5.c: Same.
1041 * testsuite/gcc.dg/graphite/interchange-6.c: Same.
1043 2009-07-13 Sebastian Pop <sebastian.pop@amd.com>
1045 * testsuite/gcc.dg/graphite/id-10.c: New.
1046 * testsuite/gcc.dg/graphite/id-12.c: New.
1047 * testsuite/gfortran.dg/graphite/id-7.f: New.
1048 * testsuite/gfortran.dg/graphite/id-8.f: New.
1050 2009-07-13 Sebastian Pop <sebastian.pop@amd.com>
1052 * graphite-sese-to-poly.c (pdr_add_data_dimensions): Fix division by
1055 2009-07-13 Sebastian Pop <sebastian.pop@amd.com>
1057 * sese.c (rename_variables_in_stmt): Call fold_convert during renaming.
1059 2009-07-13 Sebastian Pop <sebastian.pop@amd.com>
1061 * sese.c (expand_scalar_variables_stmt): Avoid unnecessary expansion.
1063 2009-07-10 Sebastian Pop <sebastian.pop@amd.com>
1065 * graphite-sese-to-poly.c (pdr_add_memory_accesses): Fix order of
1066 building PDR subscripts.
1068 2009-07-10 Sebastian Pop <sebastian.pop@amd.com>
1070 * graphite-sese-to-poly.c (pdr_add_data_dimensions): Fix the
1071 computation of array sizes.
1073 2009-07-10 Sebastian Pop <sebastian.pop@amd.com>
1075 * graphite-sese-to-poly.c (add_param_constraints): Disabled.
1077 2009-07-10 Tobias Grosser <grosser@fim.uni-passau.de>
1079 * graphite-dependences.c (map_into_dep_poly, map_dr_into_dep_poly,
1080 build_pairwise_constraint, dr_equality_constraints,
1081 build_pairwise_scheduling_equality,
1082 build_pairwise_scheduling_inequality, lexicographically_gt_p,
1083 build_lexicographically_gt_constraint, dependence_polyhedron,
1084 graphite_legal_transform_dr, graphite_carried_dependence_level_k):
1085 Move from NNC_Polyhedron to C_Polyhedron.
1086 * graphite-interchange.c (compute_array_size_poly,
1087 gather_access_strides): Dito.
1088 * graphite-poly.c (apply_poly_transforms, new_poly_dr, free_poly_bb,
1089 free_scop, pbb_number_of_iterations): Dito.
1090 * graphite-poly.h (struct poly_dr, pdr_nb_subscripts, struct poly_bb,
1091 pbb_dim_iter_domain, struct scop): Dito.
1092 * graphite-ppl.c (new_Constraint_System_from_Cloog_Matrix,
1093 new_Cloog_Domain_from_ppl_Polyhedron,
1094 new_Cloog_Domain_from_ppl_Pointset_Powerset, ppl_set_coef_gmp,
1095 ppl_insert_dimensions_pointset, ppl_insert_dimensions_pointset,
1096 ppl_strip_loop, ppl_strip_loop, ppl_print_polyhedron_matrix,
1097 ppl_print_powerset_matrix, debug_ppl_polyhedron_matrix,
1098 debug_ppl_powerset_matrix, ppl_read_polyhedron_matrix): Dito.
1099 * graphite-ppl.h (ppl_Pointset_Powerset_C_Polyhedron_t,
1100 new_C_Polyhedron_from_Cloog_Matrix, ppl_print_powerset_matrix,
1101 debug_ppl_powerset_matrix, ppl_insert_dimensions_pointset): Dito.
1102 * graphite-sese-to-poly.c (build_pbb_scattering_polyhedrons,
1103 build_loop_iteration_domains, ppl_constraint_type_from_tree_code,
1104 add_condition_to_domain, add_condition_to_pbb, build_scop_context,
1105 build_scop_iteration_domain, build_poly_dr): Dito
1107 2009-07-09 Sebastian Pop <sebastian.pop@amd.com>
1109 * testsuite/gcc.dg/graphite/graphite.exp: Added a rule to execute
1111 * testsuite/gcc.dg/graphite/run-id-1.c: New.
1113 2009-07-09 Sebastian Pop <sebastian.pop@amd.com>
1115 * graphite-sese-to-poly.c (build_loop_iteration_domains): Add the
1116 positivity constraint on the symbolic number of iterations.
1118 2009-07-09 Sebastian Pop <sebastian.pop@amd.com>
1120 * graphite-sese-to-poly.c (build_loop_iteration_domains): Rewrite.
1122 2009-07-09 Sebastian Pop <sebastian.pop@amd.com>
1123 Tobias Grosser <grosser@fim.uni-passau.de>
1125 * graphite-clast-to-gimple.c (build_scop_context): Removed.
1126 (build_cloog_prog): Directly use SCOP_CONTEXT.
1127 * graphite-poly.c (new_scop): Initialize SCOP_CONTEXT.
1128 (free_scop): Free SCOP_CONTEXT.
1129 (print_scop_context): New.
1130 (print_scop): Call print_scop_context.
1131 (debug_scop_context): New.
1132 * graphite-poly.h (print_scop_context, debug_scop_context): Declared.
1133 (struct scop): Added field context.
1134 (SCOP_CONTEXT): New.
1135 * graphite-sese-to-poly.c (add_param_constraints): New.
1136 (build_scop_context): New.
1137 (build_poly_scop): Call build_scop_context.
1139 2009-07-09 Sebastian Pop <sebastian.pop@amd.com>
1141 * graphite-clast-to-gimple.c (gmp_cst_to_tree): Moved...
1142 * graphite-ppl.c (ppl_set_inhomogeneous_gmp, ppl_set_coef_gmp): New.
1143 (ppl_set_inhomogeneous, ppl_set_coef): Moved...
1144 * graphite-ppl.h: Include double-int.h and tree.h.
1145 (ppl_set_inhomogeneous_gmp, ppl_set_coef_gmp): Declared.
1146 (ppl_set_inhomogeneous, ppl_set_coef): ...here.
1147 (gmp_cst_to_tree): ...here. Reimplemented using mpz_get_double_int.
1148 (tree_int_to_gmp, ppl_set_inhomogeneous_tree, ppl_set_coef_tree): New.
1150 2009-07-09 Sebastian Pop <sebastian.pop@amd.com>
1152 * graphite-clast-to-gimple.c (clast_to_gcc_expression_red): Generate
1153 POINTER_PLUS_EXPR for pointer types.
1154 (clast_to_gcc_expression): Same.
1156 2009-07-09 Sebastian Pop <sebastian.pop@amd.com>
1158 * graphite-poly.c (print_scattering_function): Early return when
1159 PBB_TRANSFORMED_SCATTERING is not initialized.
1160 (print_pbb_domain): Early return when PBB_DOMAIN is not initialized.
1162 2009-07-08 Sebastian Pop <sebastian.pop@amd.com>
1164 * tree-parloops.c (analyze_reduction_list): Remove unused variable
1167 2009-07-08 Razya Ladelsky <razya@il.ibm.com>
1169 * tree-parloops.c (analyze_reduction_list): Change return
1171 (try_create_reduction_list): Move the call to
1172 analyze_reduction_list to the beginining.
1173 Call reduction_phi with analyzed_reductions as argument
1174 instead of reduction_list.
1176 2009-07-08 Tobias Grosser <grosser@fim.uni-passau.de>
1178 * Merge from mainline (r148296:149346)
1180 2009-07-07 Sebastian Pop <sebastian.pop@amd.com>
1182 * graphite-scop-detection.c (graphite_can_represent_init): New.
1183 (graphite_can_represent_scev): Call graphite_can_represent_init:
1184 check that the initial value does not contain multiplications of
1186 (stmt_has_simple_data_refs_p): New.
1187 (stmt_simple_for_scop_p): Call stmt_simple_for_scop_p.
1188 (is_simple_operand): Fix formatting.
1189 * graphite-sese-to-poly.c (try_generate_gimple_bb): Fix formatting.
1191 2009-07-07 Sebastian Pop <sebastian.pop@amd.com>
1193 * testsuite/gcc.dg/graphite/id-13.c: New.
1194 * graphite-sese-to-poly.c (graphite_stmt_p): Do not call
1195 analyze_scalar_evolution, use scalar_evolution_in_region.
1196 (scan_tree_for_params_right_scev): Add extra assert.
1197 (parameter_index_in_region_1): Split from parameter_index_in_region.
1198 (idx_record_params): Use scalar_evolution_in_region.
1199 (find_params_in_bb): Same.
1200 (find_scop_parameters): Same.
1201 (build_loop_iteration_domains): Same.
1202 (create_linear_expr_from_tree): Same.
1203 * sese.c (scalar_evolution_in_region): New.
1204 * sese.h (scalar_evolution_in_region): Declared.
1205 (defined_in_sese_p): New.
1206 * tree-scalar-evolution.c (compute_overall_effect_of_inner_loop): Not
1208 * tree-scalar-evolution.h (compute_overall_effect_of_inner_loop):
1211 2009-07-07 Sebastian Pop <sebastian.pop@amd.com>
1213 * Makefile.in: Replace dependences on tree-chrec.h with SCEV_H.
1214 TREE_DATA_REF_H also implies SCEV_H.
1216 2009-07-07 Sebastian Pop <sebastian.pop@amd.com>
1218 * graphite-poly.c (print_scop_params): New.
1219 (print_scop): Call print_scop_params.
1220 (debug_scop_params): New.
1221 * graphite-poly.h (print_scop_params, debug_scop_params): Declared.
1223 2009-07-07 Li Feng <nemokingdom@gmail.com>
1225 * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-4.c: New.
1226 * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-5.c: New.
1227 * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-6.c: New.
1228 * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-7.c: New.
1229 * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-8.c: New.
1230 * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-9.c: New.
1232 2009-07-07 Li Feng <nemokingdom@gmail.com>
1234 * graphite-clast-to-gimple.c (mark_loops_parallel): Dump information
1235 for dependency checking part.
1236 * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-1.c: Add
1237 tests for dependency checking.
1238 * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-2.c: Ditto.
1239 * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-3.c: Ditto.
1240 * testsuite/gcc.dg/graphite/graphite_autopar/graphite_autopar.exp: Add
1241 flag -fdump-tree-graphite-all for autopar testsuites.
1243 2009-07-06 Sebastian Pop <sebastian.pop@amd.com>
1245 * Makefile.in (tree-ssa-loop-manip.o): Depends on langhooks.h.
1246 * tree-parloops.c (rewrite_phi_with_iv, rewrite_all_phi_nodes_with_iv,
1247 canonicalize_loop_ivs): Moved...
1248 * tree-ssa-loop-manip.c: ... here. Include langhooks.h.
1250 2009-07-06 Sebastian Pop <sebastian.pop@amd.com>
1252 * tree-parloops.c (try_create_reduction_list): Pass an extra
1253 argument analyzed_reductions. Call analyze_reduction_list.
1254 (gen_parallel_loop): Do not call analyze_reduction_list.
1255 (parallelize_loops): Init and finalize analyzed_reductions.
1257 2009-07-06 Li Feng <nemokingdom@gmail.com>
1259 * testsuite/gcc.dg/graphite/graphite_autopar/graphite_autopar.exp:
1260 Added flag -fno-loop-strip-mine for autopar testcase.
1262 2009-07-04 Li Feng <nemokingdom@gmail.com>
1264 * graphite-dependences.c (graphite_carried_dependence_level_k): Use
1265 transformed scattering dimension instead of unmatch orignal when
1266 calling dependence_polyhedron.
1268 2009-06-30 Sebastian Pop <sebastian.pop@amd.com>
1270 * opts.c (decode_options): Enable flag_loop_strip_mine at -O2.
1272 2009-06-30 Sebastian Pop <sebastian.pop@amd.com>
1274 * graphite-poly.c (pbb_number_of_iterations): Check for returned
1275 value 1 from ppl_Pointset_Powerset_NNC_Polyhedron_maximize.
1277 2009-06-30 Sebastian Pop <sebastian.pop@amd.com>
1279 * graphite-blocking.c (pbb_strip_mine_profitable_p): New.
1280 (pbb_do_strip_mine): Call pbb_strip_mine_profitable_p.
1281 * graphite-poly.c (pbb_number_of_iterations): New.
1282 * graphite-poly.h (pbb_number_of_iterations): Declared.
1283 (pbb_iterator_dim, pbb_parameter_dim): New.
1285 2009-06-29 Sebastian Pop <sebastian.pop@amd.com>
1287 * graphite-clast-to-gimple.c (graphite_create_new_loop): Revert the
1288 last commit on type of lower and upper bound of loops.
1290 2009-06-29 Li Feng <nemokingdom@gmail.com>
1292 * Makefile.in (graphite-clast-to-gimple.o): Added dependence on
1293 graphite-dependences.h.
1294 * graphite-clast-to-gimple.c (new_bb_pbb_def): New.
1295 (mark_bb_with_pbb): New.
1296 (get_stmtfor_depth): New.
1297 (find_pbb_via_hash): New.
1298 (dependency_in_loop_p): New.
1299 (mark_loops_parallel): New.
1300 (free_aux_in_new_loops): New.
1301 (translate_clast): Add parameter BB_PBB_MAPPING. Mark newly created
1302 bb with it's relevant pbb. Mark newly created loops. Remove mark
1303 innermost loop parallel without checking.
1304 (gloog): Add parameter BB_PBB_MAPPING.
1305 * graphite-clast-to-gimple.h (struct bb_pbb_def): New.
1306 (gloog): Change declaration.
1307 (mark_loop_parallel): Make extern.
1308 (free_aux_in_new_loops): Declare.
1309 (bb_pbb_map_hash): New.
1310 (eq_bb_pbb_map): New.
1311 * graphite.c (graphite_transform_loops): Added BB_PBB_MAPPING. Trigger
1312 auto parallelization when flag_graphite_force_parallel is set.
1313 (graphite_finalize): Added free_aux_in_new_loops.
1314 * tree-parloops.c (parallelize_loops): Only generate parallel code for
1315 the innermost loop that marked parallel. Use
1316 flag_graphite_force_parallel instead of loop->can_be_parallel.
1317 (loop_parallel_p): Move inner most checking out of function.
1319 2009-06-26 Sebastian Pop <sebastian.pop@amd.com>
1321 * graphite-clast-to-gimple.c (graphite_create_new_loop): Make the
1322 type of lower and upper bound of loops signed long int.
1324 2009-06-26 Sebastian Pop <sebastian.pop@amd.com>
1326 * cfgloopmanip.c (create_empty_loop_on_edge): Gimplify the loop exit
1327 expression outside the loop.
1329 2009-06-26 Sebastian Pop <sebastian.pop@amd.com>
1331 * gcc.dg/graphite/interchange-8.c: New.
1333 2009-06-26 Sebastian Pop <sebastian.pop@amd.com>
1335 * gcc.dg/graphite/interchange-0.c: XFailed.
1336 * gcc.dg/graphite/interchange-5.c: XFailed.
1337 * gcc.dg/graphite/interchange-6.c: XFailed.
1339 2009-06-26 Sebastian Pop <sebastian.pop@amd.com>
1341 * graphite-interchange.c (compute_array_size_poly): The end of the
1342 recursion should return 1.
1344 2009-06-26 Sebastian Pop <sebastian.pop@amd.com>
1346 * graphite-interchange.c (compute_array_size_cstr): Allow the
1347 subscript multiplier to be -1.
1348 (compute_array_size): Use PDR_DATA_CONTAINER and not PDR_ACCESSES.
1349 * graphite-poly.c (new_poly_dr): Takes an extra argument for the
1350 data_container. Initializes PDR_DATA_CONTAINER.
1351 (print_pdr_access_layout): New.
1352 (print_pdr): Call print_pdr_access_layout. Print PDR_DATA_CONTAINER.
1353 * graphite-poly.h (struct poly_dr): Adjust comment. Add a new field
1355 (PDR_DATA_CONTAINER): New.
1356 (new_poly_dr): Update declaration.
1357 * graphite-sese-to-poly.c (pdr_add_data_dimensions): New.
1358 (build_poly_dr): Call pdr_add_data_dimensions.
1360 2009-06-26 Sebastian Pop <sebastian.pop@amd.com>
1362 * graphite-poly.h (struct poly_dr): Fix comment.
1363 * graphite-sese-to-poly.c (pdr_add_alias_set): New.
1364 (pdr_add_memory_accesses): New.
1365 (build_poly_dr): Call pdr_add_memory_accesses and pdr_add_alias_set.
1367 2009-06-26 Sebastian Pop <sebastian.pop@amd.com>
1369 * graphite-poly.c (print_pdrs, debug_pdrs): New.
1370 (print_pbb): Add call to print_pdrs.
1371 * graphite-poly.h (print_pdrs, debug_pdrs): Declared.
1373 2009-06-24 Konrad Trifunovic <konrad.trifunovic@gmail.com>
1374 Li Feng <nemokingdom@gmail.com>
1376 * graphite-dependences.c (graphite_carried_dependence_level_k): New.
1377 (dependency_between_pbbs_p): New.
1378 (lexicographically_gt_p): Assure !empty_p before polyhedron
1379 intersection assign.
1380 (build_lexicographically_gt_constraint): Correct lexicographically
1382 * graphite-dependences.h: New.
1383 * Makefile.in (graphite-dependences.o): Add graphite-dependences.h.
1385 2009-06-24 Sebastian Pop <sebastian.pop@amd.com>
1387 * graphite-clast-to-gimple.c (print_clast_stmt): New.
1388 (gloog): Print to dump_file the generated clast.
1389 * graphite-clast-to-gimple.h (print_clast_stmt): Declared.
1390 * graphite-interchange.c (pbb_do_interchange): Fix dump formatting.
1392 2009-06-24 Sebastian Pop <sebastian.pop@amd.com>
1394 * graphite-poly.c (extend_scattering): Increment
1395 PBB_NB_LOCAL_VARIABLES by the number of added dimensions.
1397 2009-06-24 Sebastian Pop <sebastian.pop@amd.com>
1399 * graphite-interchange.c (compute_array_size_poly): Added exit of
1400 recursion condition. Continue iterating even after the first equality.
1401 (compute_array_size): Same.
1403 2009-06-24 Li Feng <nemokingdom@gmail.com>
1405 * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-1.c: Update
1406 -fdump-tree-final_cleanup to -fdump-tree-optimized.
1407 * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-2.c: Ditto.
1408 * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-3.c: Ditto.
1409 * testsuite/gcc.dg/graphite/graphite_autopar/graphite_autopar.exp: Ditto.
1411 2009-06-23 Sebastian Pop <sebastian.pop@amd.com>
1413 * sese.c (expand_scalar_variables_stmt): Expand scalar variables
1414 only when the use verifies is_gimple_reg.
1416 2009-06-23 Sebastian Pop <sebastian.pop@amd.com>
1418 * graphite-clast-to-gimple.c (build_cloog_prog): Fix memory corruption.
1419 Allocate scaldims after call to unify_scattering_dimensions.
1421 2009-06-23 Sebastian Pop <sebastian.pop@amd.com>
1423 * graphite-clast-to-gimple.c (translate_clast): Fix memory leak.
1425 2009-06-23 Sebastian Pop <sebastian.pop@amd.com>
1426 Albert Cohen <albert.cohen@inria.fr>
1428 * graphite-blocking.c (pbb_strip_mine_loop_depth): Do not use local
1429 variables for the strip mining.
1431 2009-06-23 Sebastian Pop <sebastian.pop@amd.com>
1432 Pranav Garg <pranav.garg2107@gmail.com>
1434 * Makefile.in (OBJS-common): Added graphite-blocking.o.
1435 (graphite-sese-to-poly.o): Moved down to be in lexicographical order.
1436 (graphite-blocking.o): New rule.
1437 (graphite-poly.o, graphite-ppl.o): Moved to be in lexicographical order.
1438 * graphite-blocking.c: New.
1439 * graphite-poly.c (apply_poly_transforms): Call scop_do_strip_mine for
1440 flag_loop_strip_mine.
1441 (psct_scattering_dim_for_loop_depth): New.
1442 * graphite-poly.h (scop_do_strip_mine): Declared.
1443 (psct_add_local_variable): Increment PBB_NB_LOCAL_VARIABLES.
1444 * tree-ssa-loop.c (gate_graphite_transforms): Do not fail when using
1445 flag_loop_strip_mine.
1447 2009-06-23 Sebastian Pop <sebastian.pop@amd.com>
1449 * graphite-poly.c (extend_scattering): Avoid initializing and freeing
1450 a GMP value and a PPL coefficient at each iteration of a loop.
1452 2009-06-23 Sebastian Pop <sebastian.pop@amd.com>
1454 * graphite-dependences.c (dependence_polyhedron): Do not use
1455 pbb_nb_scattering_dims anymore. Use pbb_nb_scattering_orig and
1456 pbb_nb_scattering_transform.
1457 (graphite_legal_transform_dr): Same.
1458 * graphite-poly.c (extend_scattering): Same.
1459 (unify_scattering_dimensions): Same.
1460 (print_scattering_function): Same.
1461 (new_poly_bb): Initialize PBB_NB_SCATTERING_TRANSFORM and
1462 PBB_NB_LOCAL_VARIABLES.
1463 * graphite-poly.h (pbb_nb_scattering): Removed declaration.
1464 (struct poly_bb): Added nb_local_variables and nb_scattering_transform.
1465 (PBB_NB_LOCAL_VARIABLES, PBB_NB_SCATTERING_TRANSFORM): New.
1466 (pbb_nb_scattering_orig, pbb_nb_scattering_transform): New.
1467 (pbb_nb_scattering_dims, pbb_nb_scattering): Removed.
1468 (pbb_nb_scattering_transform): New.
1469 (pbb_nb_local_vars): Return PBB_NB_LOCAL_VARIABLES.
1470 (psco_scattering_dim): Add assert on parameters.
1471 (psct_scattering_dim): Same.
1472 (psct_scattering_dim_for_loop_depth): Declared.
1473 (psct_local_var_dim): New.
1474 (psco_iterator_dim, psco_parameter_dim): Add assert on parameters.
1475 (psct_iterator_dim, psct_parameter_dim): Same. To maintain the
1476 correct layout, call pbb_nb_local_vars.
1477 (psct_add_local_variable, psct_add_scattering_dimension): New.
1478 * graphite-sese-to-poly.c (build_pbb_scattering_polyhedrons):
1479 Initialize PBB_NB_SCATTERING_TRANSFORM.
1481 2009-06-23 Sebastian Pop <sebastian.pop@amd.com>
1483 * graphite-ppl.c (set_inhomogeneous): Renamed ppl_set_inhomogeneous.
1484 (set_coef): Renamed ppl_set_coef.
1485 * graphite-ppl.h (ppl_set_inhomogeneous, ppl_set_coef): Declared.
1487 2009-06-23 Sebastian Pop <sebastian.pop@amd.com>
1489 * graphite-dependences.c (build_pairwise_scheduling_inequality): Don't
1490 test a boolean against 1.
1491 * graphite-interchange.c (pbb_interchange_loop_depths): Do not build
1492 a new polyhedron for the PBB_TRANSFORMED_SCATTERING.
1493 (pbb_do_interchange): Returns true when a transform has been performed.
1494 (scop_do_interchange): Same.
1495 * graphite-poly.c (apply_poly_transforms): Use the return value of
1496 scop_do_interchange.
1497 * graphite-poly.h (scop_do_interchange): Update declaration.
1499 2009-06-23 Tobias Grosser <grosser@fim.uni-passau.de>
1501 * graphite-clast-to-gimple.c (gloog): Reset loop->aux right
1503 * sese.c (sese_reset_aux_in_loops): New.
1504 * sese.h (sese_reset_aux_in_loops): New.
1506 2009-06-19 Sebastian Pop <sebastian.pop@amd.com>
1508 * graphite-sese-to-poly.c (scan_tree_for_params_int): Pass in the
1509 multiplier and multiply the constant by the multiplier.
1510 (scan_tree_for_params): Bound the multiplier to its MULT_EXPR.
1511 (build_poly_dr): Do not use the multiplier to define the subscript.
1513 2009-06-19 Sebastian Pop <sebastian.pop@amd.com>
1515 * graphite-poly.c (new_poly_dr): Pass an extra argument for the
1516 compiler's data reference. Initialize PDR_CDR.
1517 (print_pdr): Call dump_data_reference.
1518 * graphite-poly.h (struct poly_dr): Rename black_box into pbb.
1519 Add compiler_dr field.
1520 (PDR_BB): Renamed PDR_PBB.
1522 * graphite-sese-to-poly.c (build_poly_dr): Pass to new_poly_dr
1523 GCC's data reference representation.
1524 * tree-data-ref.c (debug_data_references, debug_data_reference): New.
1525 * tree-data-ref.h (debug_data_references, debug_data_reference): Decl.
1527 2009-06-19 Sebastian Pop <sebastian.pop@amd.com>
1529 * graphite-poly.c (print_scattering_function): Also print the layout.
1530 * graphite-poly.h (pbb_nb_local_vars): New.
1532 2009-06-19 Sebastian Pop <sebastian.pop@amd.com>
1534 * graphite-poly.c (print_pbb_domain): Also print the layout names.
1536 2009-06-19 Sebastian Pop <sebastian.pop@amd.com>
1538 * graphite-poly.c (print_pdr, debug_pdr): New.
1539 * graphite-poly.h (print_pdr, debug_pdr): Declared.
1540 (PDR_BASE): Removed.
1542 2009-06-18 Sebastian Pop <sebastian.pop@amd.com>
1544 * gcc/testsuite/gcc.dg/graphite/interchange-{1..7}.c: New avatars of
1547 2009-06-18 Sebastian Pop <sebastian.pop@amd.com>
1549 * graphite-interchange.c (compute_subscript): Allow also -1 in the
1550 subscript identification column.
1551 (pbb_do_interchange): Print to dump_file that some loops "will be
1552 interchanged". Rely on that chain of characters in the testcases.
1553 * gcc.dg/graphite/interchange-0.c: New.
1554 * gcc.dg/graphite/graphite.exp: Iterate over the testsuite
1555 interchange-*.c files and compile them with -floop-interchange.
1557 2009-06-18 Pranav Garg <pranav.garg2107@gmail.com>
1559 * graphite-interchange.c (interchange_profitable_p): Renamed
1560 pbb_interchange_profitable_p.
1562 2009-06-18 Sebastian Pop <sebastian.pop@amd.com>
1563 Harsha Jagasia <harsha.jagasia@amd.com>
1564 Pranav Garg <pranav.garg2107@gmail.com>
1566 * graphite-interchange.c (interchange_profitable_p): Make static.
1567 (pbb_interchange_loop_depths, pbb_do_interchange,
1568 scop_do_interchange): New.
1569 * graphite-poly.c (apply_poly_transforms): Call scop_do_interchange
1570 for flag_loop_interchange.
1571 * graphite-poly.h (scop_do_interchange): Declared.
1572 * tree-ssa-loop.c (gate_graphite_transforms): Do not fail when
1573 flag_loop_interchange is used.
1575 2009-06-18 Sebastian Pop <sebastian.pop@amd.com>
1577 * graphite-dependences.c (dependence_polyhedron): Update use of
1578 pbb_nb_scattering_dims.
1579 * graphite-poly.h (pbb_nb_scattering_dims): Do not pass SCOP.
1580 (pbb_nb_scattering): Update use of pbb_nb_scattering_dims.
1581 (psco_scattering_dim, psct_scattering_dim, psco_iterator_dim,
1582 psct_iterator_dim, psco_parameter_dim, psct_parameter_dim): New.
1584 2009-06-16 Sebastian Pop <sebastian.pop@amd.com>
1586 * graphite.c: Cleanup foo.
1588 2009-06-16 Sebastian Pop <sebastian.pop@amd.com>
1590 * Merge from mainline (r143684:148293).
1591 * Disabled libpcp until it gets fixed.
1593 2009-06-05 Sebastian Pop <sebastian.pop@amd.com>
1594 Harsha Jagasia <harsha.jagasia@amd.com>
1596 * graphite-interchange.c: New.
1597 * Makefile.in (graphite-interchange.o): New.
1598 * graphite-poly.h (interchange_profitable_p): Declared.
1599 * graphite-ppl.h (value_max): New.
1601 2009-06-04 Sebastian Pop <sebastian.pop@amd.com>
1603 * graphite-dependences.c (dependence_polyhedron): Use pdr_dim.
1604 * graphite-poly.h: Fix some comments.
1608 2009-06-04 Sebastian Pop <sebastian.pop@amd.com>
1611 (pdr_accessp_nb_subscripts): Renamed pdr_nb_subscripts.
1612 (pdr_accessp_nb_iterators): Renamed pdr_dim_iter_domain.
1613 (pdr_accessp_nb_params): Renamed pdr_nb_params.
1614 (pdr_accessp_alias_set_dim): Renamed pdr_alias_set_dim.
1615 (pdr_accessp_subscript_dim): Renamed pdr_subscript_dim.
1616 (pdr_accessp_iterator_dim): Renamed pdr_iterator_dim.
1617 (pdr_accessp_param_dim): Renamed pdr_parameter_dim.
1618 (pbb_nb_loops): Renamed pbb_dim_iter_domain.
1619 * graphite-clast-to-gimple.c: Same.
1620 * graphite-dependences.c: Same.
1621 * graphite-poly.c: Same.
1622 * graphite-sese-to-poly.c: Same.
1624 2009-06-03 Sebastian Pop <sebastian.pop@amd.com>
1626 * graphite-clast-to-gimple.c (build_iv_mapping): Insert full
1627 expressions for an IV rename, as returned by clast_to_gcc_expression.
1628 (copy_renames): Rename new_name to expr.
1629 * sese.c (debug_rename_elt): Same.
1632 (sese_adjust_liveout_phis): Call force_gimple_operand before using
1633 the information from the rename map.
1634 (rename_variables_in_stmt): Same.
1635 (add_loop_exit_phis): Rename new_name to expr.
1636 (insert_loop_close_phis): Same.
1637 (add_guard_exit_phis): Same. Call force_gimple_operand.
1638 * sese.h (struct rename_map_elt): Rename new_name to expr.
1639 (new_rename_map_elt): Same.
1641 2009-06-03 Sebastian Pop <sebastian.pop@amd.com>
1643 * graphite-clast-to-gimple.c (build_iv_mapping): Use set_rename.
1644 * sese.c (set_rename): Make it extern.
1645 * sese.h (set_rename): Declared.
1647 2009-06-03 Sebastian Pop <sebastian.pop@amd.com>
1649 * graphite-poly.c (extend_scattering): Free values.
1650 * graphite-ppl.c (new_Cloog_Domain_from_ppl_Pointset_Powerset):
1652 (ppl_print_powerset_matrix): Same.
1653 * graphite-scop-detection.c (free_scops_1): New.
1654 (limit_scops): Call free_scops_1.
1655 * graphite-sese-to-poly.c (build_scop_bbs_1): Free dom.
1656 (build_poly_dr): Free PPL coefficients.
1657 * tree-parloops.c (rewrite_all_phi_nodes_with_iv): Free bbs.
1659 2009-06-02 Sebastian Pop <sebastian.pop@amd.com>
1661 * graphite-dependences.c: New.
1662 * graphite-data-ref.c: Removed.
1663 * graphite-data-ref.h: Removed.
1664 * Makefile.in (graphite-data-ref.o): Removed.
1665 (graphite-dependences.o): Added.
1666 * graphite-clast-to-gimple.c: Remove dependence on graphite-data-ref.h.
1667 * graphite-poly.c: Same.
1668 Move the data dependence testing to graphite-dependences.c.
1670 2009-05-19 Tobias Grosser <grosser@fim.uni-passau.de>
1672 * graphite-scop-detection.c (graphite_can_represent_loop): Renamed
1673 from graphite_cannot_represent_loop. Code refactored.
1674 (scopdet_basic_block_info): Call graphite_can_represent_loop.
1676 2009-05-17 Li Feng <nemokingdom@gmail.com>
1678 * testsuite/gcc.dg/graphite/graphite_autopar/graphite_autopar.exp:
1679 Cover all the testcases (not only the filtered ones).
1681 2009-05-17 Tobias Grosser <grosser@fim.uni-passau.de>
1683 * graphite-scop-detection.c (stmt_simple_for_scop_p): Remove
1684 unnecessary check. Update comments. Move check for REAL_TYPE here.
1685 (harmful_stmt_in_bb): Remove checks for conditions. This is already
1686 done in (stmt_simple_for_scop_p).
1688 2009-05-14 Tobias Grosser <grosser@fim.uni-passau.de>
1690 * graphite.c (print_global_statistics): New.
1691 (print_graphite_scop_statistic): New.
1692 (print_graphite_statistics): New.
1693 (graphite_initialize, graphite_transform_loops): Print statistics.
1694 * graphite-scop-detection (build_scops): Print statistics.
1695 (print_graphite_scop_statistics): New.
1696 (print_graphite_statistics): New.
1698 2009-05-13 Sebastian Pop <sebastian.pop@amd.com>
1700 * graphite-clast-to-gimple.c (struct clast_name_index): Removed.
1701 (debug_clast_name_index): Removed.
1702 (debug_clast_name_indexes_1): Removed.
1703 (debug_clast_name_indexes): Removed.
1704 (clast_name_index_elt_info): Removed.
1705 (eq_clast_name_indexes): Removed.
1706 (clast_name_to_index): Removed.
1707 (new_clast_name_index): Removed.
1708 (save_clast_name_index): Removed.
1709 (save_var_name): Moved...
1710 (init_sese_params_index): Removed.
1711 (clast_name_to_gcc): Remove use of name_tree.
1712 (initialize_cloog_names): Same.
1713 (gloog): Do not call init_sese_params_index.
1714 * graphite-sese-to-poly.c (save_var_name): ...here.
1715 (parameter_index_in_region): New.
1716 * sese.c (new_sese): Initialize SESE_PARAMS_NAMES.
1717 (parameter_index_in_region): Removed.
1718 (is_parameter): Remove use of name_tree.
1719 * sese.h (struct name_tree): Removed.
1720 (struct sese): Remove use of name_tree. New field params_names.
1721 (SESE_PARAMS_NAMES): New.
1722 (SESE_PARAMS): Remove duplicate.
1723 (parameter_index_in_region): Removed.
1724 (sese_nb_params): Remove use of name_tree.
1725 (struct clast_name_index): New.
1726 (new_clast_name_index): New.
1727 (clast_name_to_index): New.
1728 (save_clast_name_index): New.
1729 (debug_clast_name_index): New.
1730 (debug_clast_name_indexes_1): New.
1731 (debug_clast_name_indexes): New.
1732 (clast_name_index_elt_info): New.
1733 (eq_clast_name_indexes): New.
1735 2009-05-13 Sebastian Pop <sebastian.pop@amd.com>
1737 * graphite-clast-to-gimple.c (compute_cloog_iv_types_1): Call
1738 pbb_to_depth_to_oldiv. Remove call to oldiv_for_loop.
1739 (graphite_loop_normal_form): Do not pass region. Do not
1740 initialize SESE_OLDIVS.
1741 (build_graphite_loop_normal_form): Update call to
1742 graphite_loop_normal_form.
1743 * sese.c (debug_oldivs): Removed.
1744 (new_sese): Do not initialize SESE_OLDIVS.
1745 (free_sese): Do not free SESE_OLDIVS.
1746 (oldiv_for_loop): Removed.
1747 * sese.h (struct sese): Remove old_ivs.
1748 (SESE_OLDIVS): Removed.
1749 (oldiv_for_loop): Removed.
1751 2009-05-13 Sebastian Pop <sebastian.pop@amd.com>
1753 * graphite-clast-to-gimple.c (clast_name_to_gcc): Pass newivs,
1754 remove ivstack. Remove call to loop_iv_stack_get_iv_from_name,
1755 replaced by a call to newivs_to_depth_to_newiv.
1756 (clast_to_gcc_expression): Pass newivs, remove ivstack.
1757 (clast_to_gcc_expression_red): Same.
1758 (gcc_type_for_clast_expr): Same.
1759 (gcc_type_for_clast_eq): Same.
1760 (graphite_translate_clast_equation): Same.
1761 (graphite_create_guard_cond_expr): Same.
1762 (graphite_create_new_guard): Same.
1763 (graphite_create_new_loop): Same.
1764 (build_iv_mapping): Same.
1765 (translate_clast): Same.
1767 (loop_iv_stack_patch_for_consts): Removed. *
1768 sese.c (iv_stack_entry_is_constant): Removed.
1769 (iv_stack_entry_is_iv): Removed.
1770 (loop_iv_stack_push_iv): Removed.
1771 (loop_iv_stack_insert_constant): Removed.
1772 (loop_iv_stack_pop): Removed.
1773 (loop_iv_stack_get_iv): Removed.
1774 (loop_iv_stack_get_iv_from_name): Removed.
1775 (debug_loop_iv_stack): Removed.
1776 (free_loop_iv_stack): Removed.
1777 (loop_iv_stack_remove_constants): Removed. *
1778 sese.h (iv_stack_entry_kind): Removed.
1779 (iv_stack_entry_data_union): Removed.
1780 (iv_stack_entry_struct): Removed.
1781 (iv_stack_entry_p): Removed.
1782 (debug_oldivs, debug_loop_iv_stack, loop_iv_stack_insert_constant,
1783 loop_iv_stack_get_iv_from_name, loop_iv_stack_push_iv,
1784 loop_iv_stack_get_iv, loop_iv_stack_remove_constants,
1785 loop_iv_stack_pop, free_loop_iv_stack): Removed.
1786 (gbb_loop_at_index): Fix indenting.
1787 (gbb_loop_index): Removed.
1789 2009-05-13 Sebastian Pop <sebastian.pop@amd.com>
1791 * graphite-clast-to-gimple.c (clast_name_to_gcc): Do not use strcmp.
1792 Call clast_name_to_index.
1794 2009-05-13 Sebastian Pop <sebastian.pop@amd.com>
1796 * graphite-clast-to-gimple.c (clast_name_to_gcc): Pass region,
1797 do not pass params. Get params from SESE_PARAMS.
1798 (clast_to_gcc_expression): Same.
1799 (clast_to_gcc_expression_red): Same.
1800 (gcc_type_for_clast_eq): Same.
1801 (graphite_translate_clast_equation): Same.
1802 (graphite_create_new_loop): Same.
1803 * sese.c (rename_variables_in_stmt): Fix comment.
1805 2009-05-13 Sebastian Pop <sebastian.pop@amd.com>
1807 * graphite-clast-to-gimple.c (graphite_create_new_loop): Pass
1809 Call save_clast_name_index.
1810 (translate_clast): Pass newivs_index.
1811 (gloog): Create and free newivs_index.
1813 2009-05-13 Sebastian Pop <sebastian.pop@amd.com>
1815 * graphite-clast-to-gimple.c (clast_name_index): New structure.
1816 (clast_name_index_p): New type.
1817 (debug_clast_name_index): New.
1818 (debug_clast_name_indexes_1): New.
1819 (debug_clast_name_indexes): New.
1820 (clast_name_index_elt_info): New.
1821 (eq_clast_name_indexes): New.
1822 (clast_name_to_index): New.
1823 (new_clast_name_index): New.
1824 (save_clast_name_index): New.
1825 (init_sese_params_index): New.
1826 (gloog): Call init_sese_params_index.
1827 * graphite-clast-to-gimple.h (debug_clast_name_indexes): Declared.
1828 * sese.c (new_sese): Initialize SESE_PARAMS_INDEX.
1829 (free_sese): Free SESE_PARAMS_INDEX.
1830 * sese.h (struct sese): Add params_index.
1831 (SESE_PARAMS_INDEX): New.
1833 2009-05-13 Sebastian Pop <sebastian.pop@amd.com>
1835 * graphite-clast-to-gimple.c (newivs_to_depth_to_newiv): New.
1836 (graphite_create_new_loop): Pass the newivs vector. Push the
1837 newly created IV to newivs.
1838 (translate_clast): Pass the newivs vector.
1839 (gloog): Create and destroy the newivs vector.
1841 2009-05-13 Sebastian Pop <sebastian.pop@amd.com>
1843 * graphite-clast-to-gimple.c (pbb_to_depth_to_oldiv): New.
1844 (graphite_loop_normal_form): Initialize loop->aux with the unique
1845 IV that has been created.
1847 2009-05-13 Tobias Grosser <grosser@fim.uni-passau.de>
1849 * tree-chrec.c (evolution_function_right_is_integer_cst): Allow
1850 scev with parameters in the base part. They where forbidden
1853 2009-05-11 Li Feng <nemokingdom@gmail.com>
1855 * testsuite/gcc.dg/graphite/graphite.exp: Set different default
1856 compile options by file names.
1857 * testsuite/gcc.dg/graphite/block{0-6}.c: Remove dg-option line.
1858 * testsuite/gcc.dg/graphite/id-{1-9}.c: Ditto.
1859 * testsuite/gcc.dg/graphite/scop-{0-20}.c: Ditto.
1860 * testsuite/gcc.dg/graphite/scop-matmult.c: Ditto.
1862 2009-05-08 Li Feng <nemokingdom@gmail.com>
1864 * testsuite/gcc.dg/graphite/graphite_autopar/graphite_autopar.exp: New.
1865 * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-1.c: New.
1866 * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-2.c: New.
1867 * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-3.c: New.
1869 2009-05-07 Tobias Grosser <grosser@fim.uni-passau.de>
1871 * graphite-scop-detection (build_scops_1): Fix little bug introduced
1874 2009-05-07 Tobias Grosser <grosser@fim.uni-passau.de>
1876 * graphite-scop-detection.c (graphite_can_represent_scev): Only
1877 allow integer constant strides.
1878 (graphite_can_represent_expr): Depend on outermost_loop.
1879 (stmt_simple_memref_p, graphite_cannot_represent_loop,
1880 harmful_stmt_in_bb, is_simple_operand, stmt_simple_for_scop_p,
1881 build_scops_1): Same.
1882 (scopdet_basic_block_info): Same and insert layered SCoP
1884 (try_generate_gimple_bb): Cleanup.
1885 (build_scops): Enable data references.
1887 * testsuite/gcc.dg/graphite/id-5.c: New.
1888 * testsuite/gcc.dg/graphite/id-9.c: New.
1889 * tree-chrec.c (evolution_function_right_is_integer_cst): New.
1890 * tree-chrec.h (evolution_function_right_is_integer_cst): New.
1892 2009-05-06 Tobias Grosser <grosser@fim.uni-passau.de>
1894 * sese.c (expand_scalar_variables_ssa_name): Only build expressions,
1895 that we have not yet built for this SCoP.
1897 2009-05-06 Tobias Grosser <grosser@fim.uni-passau.de>
1899 * sese.c (expand_scalar_variables_expr): Fix expand_scalar_variables
1900 for complex numbers.
1902 2009-05-06 Tobias Grosser <grosser@fim.uni-passau.de>
1904 * graphite-ppl.c: Fix build if cloog is not available.
1906 2009-05-04 Li Feng <nemokingdom@gmail.com>
1908 * tree-parloops.c (loop_parallel_p): Remove construction of
1909 NITER and REDUCTION_LIST.
1910 (try_get_loop_niter): New.
1911 (try_create_reduction_list): New.
1912 (parallelize_loops): Bypass the failed checkings in autopar
1913 when can_be_parallel in loop structure is set to true.
1915 2009-05-01 Tobias Grosser <grosser@fim.uni-passau.de>
1917 * testsuite/gcc.dg/graphite/id-6.c: Update testcase.
1918 * testsuite/gcc.dg/graphite/scop-3.c: Dito.
1920 2009-05-01 Tobias Grosser <grosser@fim.uni-passau.de>
1922 * graphite-scop-detection.c (stmt_simple_for_scop_p):
1923 Enable EQ_EXPR and NE_EXPR again.
1925 2009-04-30 Tobias Grosser <grosser@fim.uni-passau.de>
1927 * graphite-scop-detection.c (graphite_can_represent_scev):
1928 Add check if scev is affine multivariate.
1929 (harmful_stmt_in_bb): Check if we can represent the conditions.
1930 (scopdet_basic_block_info (basic_block bb, VEC): Pass the loop to
1932 * testsuite/gcc.dg/graphite/id-7.c: New.
1934 2009-04-30 Tobias Grosser <grosser@fim.uni-passau.de>
1936 * graphite-sese-to-poly.c (bb_contains_non_iv_scalar_phi_nodes):
1937 Check all bbs in region, not only the bbs that are represented in
1939 (build_poly_scop): Add newline.
1940 * testsuite/gcc.dg/graphite/id-8.c: New.
1942 2009-04-30 Li Feng <nemokingdom@gmail.com>
1944 * cfgloop.c (alloc_loop): Initialize can_be_parallel to false
1945 when loop initialize.
1946 * cfgloop.h (struct loop): Introduce flag can_be_parallel.
1947 * common.opt: Declare flag_graphite_force_parallel.
1948 * graphite-clast-to-gimple.c (translate_clast): Mark the innermost
1950 * graphite-poly.c (apply_poly_transforms): Introduce
1951 flag_graphite_force_parallel.
1952 * tree-ssa-loop.c (gate_graphite_transforms): ditto.
1953 * toplev.c (process_options): ditto and replace a not correctly
1956 2009-04-30 Li Feng <nemokingdom@gmail.com>
1958 * graphite-clast-to-gimple.c (loop_iv_stack_patch_for_consts):
1959 Change the call of gbb_loop_at_index and/or gbb_loop_index due
1960 to the redefinition.
1961 (compute_cloog_iv_types_1): ditto.
1962 (build_iv_mapping): ditto.
1963 * graphite-sese-to-poly.c (new_gimple_bb): Remove GBB_LOOPS related
1965 (free_gimple_bb): Removed GBB_LOOPS related free part.
1966 (build_bb_loops): Removed.
1967 * sese.h (struct gimple_bb): Removed loops.
1968 (GBB_LOOPS): Removed.
1969 (gbb_loop_at_index): Instead of using GBB_LOOPS, we use sese instead.
1970 (gbb_loop_index): ditto.
1972 2009-04-24 Tobias Grosser <grosser@fim.uni-passau.de>
1974 * graphite-scop-detection.c (graphite_can_represent_scev): Do not
1975 allow non constant strides.
1976 * testsuite/gcc.dg/graphite/scop-20.c: New.
1978 2009-04-24 Sebastian Pop <sebastian.pop@amd.com>
1980 * graphite-scop-detection.c (dot_all_scops): Fix system call
1981 return value warning.
1984 2009-04-24 Sebastian Pop <sebastian.pop@amd.com>
1986 * testsuite/gcc.dg/graphite/id-6.c: Fix pattern.
1987 * testsuite/gcc.dg/graphite/scop-3.c: Same.
1989 2009-04-24 Sebastian Pop <sebastian.pop@amd.com>
1991 * graphite-poly.c (map_into_dep_poly, map_dr_into_dep_poly,
1992 build_pairwise_constraint, dr_equality_constraints,
1993 build_pairwise_scheduling_equality,
1994 build_pairwise_scheduling_inequality, lexicographically_gt_p,
1995 build_lexicographically_gt_constraint, dependence_polyhedron,
1996 graphite_legal_transform_dr, graphite_legal_transform_bb,
1997 graphite_legal_transform): New.
1998 * graphite-poly.h (graphite_legal_transform): Declared.
1999 * graphite-sese-to-poly.c (build_poly_scop): Call to
2000 graphite_legal_transform is disabled for the moment.
2002 2009-04-24 Sebastian Pop <sebastian.pop@amd.com>
2004 * graphite-poly.h (pbb_nb_scattering_dims): New.
2005 (pbb_nb_scattering): Use it.
2007 2009-04-24 Sebastian Pop <sebastian.pop@amd.com>
2009 * graphite-ppl.c (ppl_insert_dimensions_pointset): Add
2010 Pointset_Powerset version of ppl_insert_dimensions.
2011 * graphite-ppl.h (ppl_insert_dimensions_pointset): Declared.
2013 2009-04-24 Sebastian Pop <sebastian.pop@amd.com>
2015 * graphite-ppl.c (ppl_insert_dimensions): Fix formatting.
2017 2009-04-24 Sebastian Pop <sebastian.pop@amd.com>
2019 * graphite-poly.h: Fix comment.
2021 2009-04-24 Sebastian Pop <sebastian.pop@amd.com>
2023 * graphite-sese-to-poly.c (build_poly_dr): Fix data ref multiplier.
2025 2009-04-24 Tobias Grosser <grosser@fim.uni-passau.de>
2027 * sese.c (expand_scalar_variables_stmt): Only iterate over the old
2030 2009-04-24 Tobias Grosser <grosser@fim.uni-passau.de>
2032 * graphite-sese-to-poly.c (var_used_in_not_loop_header_phi_node): New.
2033 (graphite_stmt_p): Represent bbs necessary to build the phi nodes of
2036 2009-04-20 Sebastian Pop <sebastian.pop@amd.com>
2038 * graphite-scop-detection.c (stmt_simple_for_scop_p): Do not
2039 handle EQ_EXPR and NE_EXPR.
2041 2009-04-17 Tobias Grosser <grosser@fim.uni-passau.de>
2043 * graphite-poly.h (poly_dr): Fix comment.
2045 2009-04-09 Sebastian Pop <sebastian.pop@amd.com>
2046 Tobias Grosser <grosser@fim.uni-passau.de>
2048 * graphite-poly.c (new_poly_bb): Do not initialize PBB_DOMAIN
2049 with a zero dimension polyhedron.
2050 (find_scop_parameters): Move the call to scop_set_nb_params here.
2051 (build_loop_iteration_domains): Store in loop->aux the iteration
2053 (build_scop_iteration_domain): Fix PBB_DOMAIN for bbs not surrounded
2054 by any loop in scop.
2055 (build_poly_scop): Do not call scop_set_nb_params.
2057 2009-04-09 Sebastian Pop <sebastian.pop@amd.com>
2058 Tobias Grosser <grosser@fim.uni-passau.de>
2060 * graphite-sese-to-poly.c (add_condition_to_pbb): Pass code to
2061 add_condition_to_domain not GT_EXPR.
2063 2009-04-09 Tobias Grosser <grosser@fim.uni-passau.de>
2065 * graphite-ppl.c (debug_ppl_powerset_matrix): New.
2066 * graphite-ppl.h (debug_ppl_powerset_matrix): New.
2067 * graphite-sese-to-poly.c (add_condition_to_pbb): Use
2068 upper_bound_assign to calculate unions.
2069 * testsuite/gcc.dg/graphite/id-6.c: New.
2071 2009-04-09 Tobias Grosser <grosser@fim.uni-passau.de>
2073 * graphite-scop-detection.c (canonicalize_loop_closed_ssa): Do not
2074 handle abnormal edges.
2076 2009-04-09 Tobias Grosser <grosser@fim.uni-passau.de>
2078 * graphite-poly.c (new_poly_dr, free_poly_dr): New.
2079 (free_poly_bb): Also free poly_drs.
2080 * graphite-poly.h (new_poly_dr, free_poly_dr): New.
2081 (poly_dr): Polyhedron to Pointset_Powerset.
2082 (pdr_accessp_nb_subscripts): Same.
2083 * graphite-sese-to-poly.c (build_poly_dr): Same. And actually build
2086 2009-04-08 Sebastian Pop <sebastian.pop@amd.com>
2088 * graphite-clast-to-gimple.c (initialize_cloog_names): Change cloog
2089 names into more meaningful names.
2091 2009-04-08 Sebastian Pop <sebastian.pop@amd.com>
2093 * testsuite/gfortran.dg/graphite/interchange-1.c: New.
2094 * testsuite/gfortran.dg/graphite/interchange-2.c: New.
2096 2009-04-08 Sebastian Pop <sebastian.pop@amd.com>
2098 * graphite-clast-to-gimple.c (graphite_loop_normal_form): Do not build
2100 * tree-parloops.c (rewrite_phi_with_iv): New.
2101 (rewrite_all_phi_nodes_with_iv): New.
2102 (canonicalize_loop_ivs): Call them.
2104 2009-04-08 Sebastian Pop <sebastian.pop@amd.com>
2106 * graphite-sese-to-poly.c (try_generate_gimple_bb): Use
2107 graphite_find_data_references_in_stmt.
2108 * tree-data-ref.c (graphite_find_data_references_in_stmt): New.
2109 * tree-data-ref.h (graphite_find_data_references_in_stmt): Declared.
2111 2009-04-08 Sebastian Pop <sebastian.pop@amd.com>
2113 * sese.c (add_loop_exit_phis): Don't fail on non SSA_NAME renames.
2115 2009-04-08 Sebastian Pop <sebastian.pop@amd.com>
2117 * graphite-sese-to-poly.c (build_scop_bbs_1): Use bb_in_sese_p
2118 instead of bb_in_region.
2119 (flag_bb_in_region): Same. Renamed flag_bb_in_sese.
2120 (build_sese_conditions): Use flag_bb_in_sese.
2121 * sese.c (register_bb_in_sese): Removed.
2122 (new_sese): Remove initialization of SESE_REGION_BBS.
2123 (free_sese): Do not free SESE_REGION_BBS.
2124 * sese.h (struct sese): Remove field region_basic_blocks.
2125 (SESE_REGION_BBS): Removed.
2126 (bb_in_sese_p): Implement in function of bb_in_region.
2128 2009-04-08 Sebastian Pop <sebastian.pop@amd.com>
2130 * graphite-scop-detection.c (limit_scops): Deal only with single exit
2133 2009-04-08 Tobias Grosser <grosser@fim.uni-passau.de>
2135 * graphite-scop-detection.c (stmt_simple_for_scop_p): Allow NE_EXPR
2137 * graphite-sese-to-poly.c (create_linear_expr_from_tree): New.
2138 (add_condition_to_domain): New.
2139 (add_condition_to_pbb): New.
2140 (add_conditions_to_domain): Cleanup and handle of NE_EXPR and EQ_EXPR.
2141 * testsuite/gcc.dg/graphite/scop-3.c: Update number of detected SCoPs.
2143 2009-04-08 Tobias Grosser <grosser@fim.uni-passau.de>
2145 * graphite-clast-to-gimple.c (build_cloog_prog): ppl_Polyhedron ->
2146 ppl_Pointset_Powerset.
2147 * graphite-poly.c (new_poly_bb, free_poly_bb): Same.
2148 * graphite-poly.h (poly_bb): poly_bb.domain Same.
2149 (pbb_nb_loops): Same.
2150 * graphite-sese-to-poly.c (build_loop_iteration_domains,
2151 add_conditions_to_domain): Same.
2152 * graphite-ppl.c (new_Cloog_Domain_from_ppl_Pointset_Powerset): New.
2153 (ppl_print_polyhedron_matrix): ppl_Polyhedron_t ->
2154 ppl_const_Polyhedron_t.
2155 (ppl_print_powerset_matrix): New.
2156 * graphite-ppl.h (new_Cloog_Domain_from_ppl_Pointset_Powerset,
2157 ppl_print_powerset_matrix): New.
2158 (ppl_print_polyhedron_matrix): Updated.
2160 2009-04-07 Sebastian Pop <sebastian.pop@amd.com>
2162 * tree-scalar-evolution.c (analyze_scalar_evolution_1): Fix comment.
2164 2009-04-07 Sebastian Pop <sebastian.pop@amd.com>
2166 * graphite-poly.c (extend_scattering): Fix indenting. Free cstr.
2167 (print_iteration_domains, debug_iteration_domain,
2168 debug_iteration_domains): New.
2169 * graphite-poly.h (print_iteration_domains, debug_iteration_domain,
2170 debug_iteration_domains): Declared.
2171 * graphite-sese-to-poly.c (build_pbb_scattering_polyhedrons): Fix
2174 2009-04-03 Tobias Grosser <grosser@fim.uni-passau.de>
2175 Sebastian Pop <sebastian.pop@amd.com>
2177 * graphite-poly.h (print_iteration_domain): New.
2178 * graphite-sese-to-poly.c (add_conditions_to_domain): Fixed bug.
2179 (build_sese_conditions_1, build_sese_conditions_after,
2180 build_sese_conditions_before): New.
2181 (build_sese_conditions): Rewritten.
2183 2009-04-03 Sebastian Pop <sebastian.pop@amd.com>
2184 Tobias Grosser <grosser@fim.uni-passau.de>
2186 Cleanup of code generation liveouts.
2187 * graphite-clast-to-gimple.c (translate_clast): Use a single
2188 rename_map instead of one per translated statement.
2189 Do not use SESE_LIVEOUT_RENAMES.
2190 (graphite_loop_normal_form): Do not use SESE_REDUCTION_LIST.
2191 (gloog): Do not use SESE_LIVEOUT_RENAMES.
2192 * graphite-scop-detection.c (harmful_stmt_in_bb): Return the close
2193 phi node of a reduction: when a loop contains a reduction used outside
2194 the loop, there should be a scalar close phi node on the exit block.
2195 * sese.c (new_sese): Do not initialize SESE_LIVEOUT,
2196 SESE_LIVEOUT_RENAMES, and SESE_REDUCTION_LIST.
2197 (free_sese): Do not free them.
2198 (sese_build_liveouts_use): Do not use them.
2199 (sese_build_liveouts_bb): Same.
2200 (sese_build_liveouts): Same.
2201 (sese_insert_phis_for_liveouts): Same.
2202 (sese_adjust_phis_for_liveouts): Same. Renamed sese_adjust_liveout_phis.
2203 (defined_in_loop_p): New.
2204 (alive_after_loop): New.
2205 (close_phi_not_yet_inserted_p): New.
2206 (struct alep, alep_p): New.
2207 (add_loop_exit_phis): Remove from the rename_map all the names defined
2208 in the code generated loop.
2209 (insert_loop_close_phis): Traverse the rename_map passed to it.
2210 Don't use SESE_LIVEOUT_RENAMES.
2211 (default_liveout_before_guard): Renamed default_before_guard.
2212 (insert_guard_phis): Do not use SESE_LIVEOUT_RENAMES.
2213 (graphite_copy_stmts_from_block): Do not directly call set_rename.
2214 (register_sese_liveout_renames): Removed.
2215 (copy_bb_and_scalar_dependences): Do not call it.
2216 * sese.h (struct sese): Removed fields: liveout, liveout_renames, and
2218 (SESE_LIVEOUT): Removed.
2219 (SESE_LIVEOUT_RENAMES): Removed.
2220 (SESE_REDUCTION_LIST): Removed.
2221 (sese_build_liveouts): Removed.
2222 (sese_adjust_phis_for_liveouts): Renamed sese_adjust_liveout_phis.
2223 (insert_loop_close_phis): Pass a htab_t instead of a sese.
2224 (insert_guard_phis): Same.
2225 (rename_map_elt): Declare a VEC of them.
2226 * tree-parloops.c (canonicalize_loop_ivs): reduction_list contains
2227 trees not pointers to trees.
2229 Rewrite in canonical close SSA form:
2230 * graphite-scop-detection.c (contains_only_close_phi_nodes): New.
2231 (limit_scops): Close the scop after the block containing the close phi
2233 (canonicalize_loop_closed_ssa): New.
2234 (canonicalize_loop_closed_ssa_form): New.
2235 (build_scops): Call canonicalize_loop_closed_ssa_form.
2237 * graphite-sese-to-poly.c: Fix typos.
2239 2009-04-03 Sebastian Pop <sebastian.pop@amd.com>
2241 * graphite-poly.c (print_scattering_function, print_pbb_domain):
2243 (dump_gbb_conditions, dump_gbb_cases, print_iteration_domain): New.
2244 (print_pbb): Add conditions.
2246 2009-04-01 Tobias Grosser <grosser@fim.uni-passau.de>
2247 Sebastian Pop <sebastian.pop@amd.com>
2249 * graphite-scop-detection.c (bb_in_sd_region): Use bb_in_region.
2250 * graphite-sese-to-poly.c (all_non_dominated_preds_marked_p): New.
2251 (build_scop_bbs_1): New.
2252 (build_scop_bbs): Rewrite.
2253 * sese.h (bb_in_region): New.
2255 2009-03-29 Tobias Grosser <grosser@fim.uni-passau.de>
2257 * graphite-poly.c (new_poly_bb, free_poly_bb): Initialize/free
2259 (print_scop): Style.
2260 * graphite-poly.h (poly_bb): Add drs vector.
2261 (PBB_DRS): Add accessor.
2262 * graphite-sese-to-poly.c (build_poly_dr): New.
2263 (build_pbb_drs, build_scop_drs): New.
2264 (build_poly_scop): call build_scop_drs (Disabled at the moment).
2266 2009-03-29 Tobias Grosser <grosser@fim.uni-passau.de>
2268 * tree-ssa-loop.c: Include forgotten toplev.h
2270 2009-03-29 Tobias Grosser <grosser@fim.uni-passau.de>
2272 * graphite-poly.c: (apply_poly_transforms): sorry -> gcc_unreachable.
2273 * testsuite/gcc.dg/graphite/pr37883.c: Remove -floop-*
2274 * testsuite/gcc.dg/graphite/pr37928.c: Same
2275 * testsuite/gcc.dg/graphite/pr38409.c: Same
2276 * testsuite/gcc.dg/graphite/pr38498.c: Same
2277 * testsuite/gcc.dg/graphite/pr38559.c: Same
2278 * testsuite/gcc.dg/graphite/pr39335.c: Same
2279 * testsuite/gcc.dg/graphite/pr39335_1.c: Same
2280 * testsuite/gfortran.dg/graphite/block-2.f: Same
2281 * tree-ssa-loop.c (gate_graphite_transforms): Always fail if called
2284 2009-03-28 Tobias Grosser <grosser@fim.uni-passau.de>
2286 * graphite-sese-to-poly.c (ref_nb_loops, build_access_matrix_with_af,
2287 build_access_matrix, build_scop_data_accesses): Remove access function
2288 building. (We get a new version soon).
2289 (build_bb_loops, scan_tree_for_params_right_scev): Update.
2290 * sese.h (nb_loops_around_loop_in_sese): Remove.
2291 (sese_loop_depth): Do not use SESE_LOOP_NEST any more.
2293 2009-03-27 Tobias Grosser <grosser@fim.uni-passau.de>
2294 Sebastian Pop <sebastian.pop@amd.com>
2296 * graphite-scop-detection.c (struct scopdet_info): Rename last
2298 (scopdet_basic_block_info, build_scops_1): Don't use
2299 CDI_POST_DOMINATORS. CDI_POST_DOMINATORS should never be used.
2301 2009-03-26 Tobias Grosser <grosser@fim.uni-passau.de>
2302 Sebastian Pop <sebastian.pop@amd.com>
2304 * graphite-clast-to-gimple.c (gloog): Call sese_build_liveouts.
2305 * sese.c (sese_build_liveouts_use): Renamed from
2306 sese_build_livein_liveouts_use. Remove liveins.
2307 (sese_build_liveouts_bb): Renamed from sese_build_livein_liveouts_bb.
2308 Call sese_build_liveouts_use.
2309 (sese_build_liveouts): Renamed from sese_build_livein_liveouts.
2310 Call sese_build_liveouts_bb.
2311 (new_sese, free_sese): Remove liveins.
2312 (sese_add_exit_phis_var): Deleted.
2313 (sese_insert_phis_for_liveouts): Call sese_add_exit_phis_edge
2315 (graphite_copy_stmts_from_block): Remove SESE_NUM_VER.
2317 * sese.h (sese): Remove num_ver and livein.
2318 (SESE_LIVEIN, SESE_LIVEIN_VER, SESE_NUM_VER): Removed.
2320 2009-03-25 Tobias Grosser <grosser@fim.uni-passau.de>
2322 * graphite-sese-to-poly.c (build_scop_scattering): Fix compile.
2324 2009-03-25 Tobias Grosser <grosser@fim.uni-passau.de>
2326 * graphite-sese-to-poly.c (compare_prefix_loops): Removed.
2327 (build_scop_scattering): Do not use compare_prefix_loops any more.
2328 (nb_common_loops): New.
2330 2009-03-24 Sebastian Pop <sebastian.pop@amd.com>
2332 * sese.c (get_new_name_from_old_name): Renamed get_rename.
2333 (register_old_and_new_names): Renamed set_rename.
2335 2009-03-24 Sebastian Pop <sebastian.pop@amd.com>
2337 * graphite-scop-detection.h (nb_reductions_in_loop): Revert removal
2338 of the decl from the previous commit.
2340 2009-03-24 Sebastian Pop <sebastian.pop@amd.com>
2342 * graphite-scop-detection.c (dot_scop): New.
2343 * graphite-scop-detection.h (dot_scop): Declared.
2345 2009-03-24 Sebastian Pop <sebastian.pop@amd.com>
2347 * graphite-sese-to-poly.c (compare_prefix_loops): Fix compare.
2349 2009-03-24 Sebastian Pop <sebastian.pop@amd.com>
2351 * cfgloopmanip.c (create_empty_loop_on_edge): Generate the loop exit
2352 condition at the end of the loop.
2353 * graphite.c (graphite_initialize, graphite_finalize): Print to
2354 dump_file the compiled function.
2355 * graphite-clast-to-gimple.c (graphite_create_new_loop): Update use
2356 of create_empty_loop_on_edge.
2357 (translate_clast): Update the code generation of loops for the new
2359 * cfgloop.h (create_empty_loop_on_edge): Update declaration.
2361 2009-03-24 Sebastian Pop <sebastian.pop@amd.com>
2363 Reverted the patch from 2009-03-19.
2365 2009-03-19 Tobias Grosser <grosser@fim.uni-passau.de>
2367 * graphite-poly.c (new_poly_bb, free_poly_bb): Initialize/free
2369 (print_scop): Style.
2370 * graphite-poly.h (poly_bb): Add drs vector.
2371 (PBB_DRS): Add accessor.
2372 * graphite-sese-to-poly.c (ref_nb_loops): Remove.
2373 (build_access_matrix_with_af, build_access_matrix,
2374 build_scop_data_accesses): Delete.
2375 (build_poly_dr): New.
2376 (build_pbb_drs, build_scop_drs): New.
2377 (build_poly_scop): call build_scop_drs.
2379 2009-03-13 Sebastian Pop <sebastian.pop@amd.com>
2381 * graphite-scop-detection.c (dot_all_scops_1): Close the table
2382 once per basic block.
2384 2009-03-13 Tobias Grosser <grosser@fim.uni-passau.de>
2386 * graphite-scop-detection.c (graphite_can_represent_scev): New.
2387 (graphite_can_represent_expr): Renamed from loop_affine_expr
2389 (stmt_simple_for_scop_p): Call graphite_can_represent_expr.
2390 (graphite_cannot_represent_loop): Add scop_entry to parameters.
2391 (scopdet_basic_block_info): Actually define entry_block.
2392 (stmt_simple_memref_p): Moved here from ...
2394 * tree-data-ref.c (stmt_simple_memref_p): here.
2395 * tree-data-ref.h (stmt_simple_memref_p): Removed.
2397 2009-03-13 Tobias Grosser <grosser@fim.uni-passau.de>
2399 * testsuite/gcc.dg/graphite/id-4.c: New.
2401 2009-03-12 Sebastian Pop <sebastian.pop@amd.com>
2403 * sese.c (expand_scalar_variables_expr): Handle tcc_comparison.
2404 (register_old_and_new_names): Update the content of the map.
2405 When there was already a rename_map_elt in the map at that
2407 (copy_bb_and_scalar_dependences): Do rename_variables after
2408 expand_scalar_variables.
2409 * graphite-clast-to-gimple.c (build_iv_mapping): Update the content
2410 of the map. When there was already a rename_map_elt in the
2411 map at that location, free it.
2412 (translate_clast): Pass the rename_map. Do not initialize and free
2413 a rename_map per stmt_user.
2414 (gloog): Initialize and free one rename_map and pass it to
2417 2009-03-12 Sebastian Pop <sebastian.pop@amd.com>
2419 * sese.c (expand_scalar_variables_stmt,
2420 expand_scalar_variables_ssa_name): Add a gimple_stmt_iterator
2422 (expand_scalar_variables_expr): Handle REALPART_EXPR and IMAGPART_EXPR.
2423 (expand_scalar_variables): Pass to expand_scalar_variables_stmt
2424 the gimple_stmt_iterator of the statement to be expanded.
2425 * graphite-scop-detection.c (is_simple_operand): Do handle
2428 2009-03-11 Tobias Grosser <grosser@fim.uni-passau.de>
2430 * graphite-scop-detection.c (is_simple_operand): Do not handle
2432 * testsuite/gcc.dg/graphite/id-2.c: New.
2434 * graphite-sese-to-poly.c (build_bb_loops,
2435 add_value_to_dim, scan_tree_for_params_right_scev,
2436 scan_tree_for_params_int, scan_tree_for_params, idx_record_params,
2437 find_params_in_bb, build_loop_iteration_domains,
2438 add_conditions_to_domain): Remove subtract.
2440 2009-03-11 Tobias Grosser <grosser@fim.uni-passau.de>
2442 * graphite-clast-to-gimple.c (loop_iv_stack_patch_for_consts,
2443 build_iv_mapping, compute_cloog_iv_types_1, build_cloog_prog):
2444 pbb_loop_at_index -> gbb_loop_at_index.
2445 * graphite-poly.c (new_poly_bb, new_scop): New accessors.
2446 (debug_loop_vec): Delete.
2447 * graphite-poly.h (poly_bb, scop): Change black_box and region to void
2448 pointer. Move LOOPS to gimple_bb_p and insert nb_params.
2449 (PBB_LOOPS): Removed.
2450 (PBB_BLACK_BOX): Insert cast.
2451 (pbb_set_black_box): New setter.
2452 (pbb_loop_at_index, pbb_loop_index): Removed.
2453 (scop_set_region, scop_set_nb_params): New.
2454 * graphite-sese-to-poly.c (new_gimple_bb, free_gimple_bb,
2455 build_scop_scattering, build_bb_loops): Add GBB_LOOPS.
2456 (build_poly_scop): Use scop_set_nb_params.
2457 * sese.h (gimple_bb): Add LOOPS.
2458 (GBB_LOOPS, gbb_loop_index, gbb_loop_at_index): New.
2460 2009-03-11 Tobias Grosser <grosser@fim.uni-passau.de>
2462 Revert previous commit.
2464 2009-03-11 Sebastian Pop <sebastian.pop@amd.com>
2466 * sese.c (expand_scalar_variables_expr): Handle tcc_comparison.
2467 (register_old_and_new_names): Update the content of the map.
2468 When there was already a rename_map_elt in the map at that
2470 (copy_bb_and_scalar_dependences): Do rename_variables after
2471 expand_scalar_variables.
2472 * graphite-clast-to-gimple.c (build_iv_mapping): Update the content
2473 of the map. When there was already a rename_map_elt in the
2474 map at that location, free it.
2475 (translate_clast): Pass the rename_map. Do not initialize and free
2476 a rename_map per stmt_user.
2477 (gloog): Initialize and free one rename_map and pass it to
2480 2009-03-11 Tobias Grosser <grosser@fim.uni-passau.de>
2482 Remove forgotten line in revert.
2484 2009-03-11 Sebastian Pop <sebastian.pop@amd.com>
2486 Revert previous commit.
2488 2009-03-10 Sebastian Pop <sebastian.pop@amd.com>
2490 * sese.c (register_old_and_new_names): Update the content
2491 of the map. When there was already a rename_map_elt in the
2492 map at that location, free it.
2493 (copy_bb_and_scalar_dependences): Do rename_variables after
2494 expand_scalar_variables.
2495 * graphite-clast-to-gimple.c (build_iv_mapping): Update the content
2496 of the map. When there was already a rename_map_elt in the
2497 map at that location, free it.
2498 (translate_clast): Pass the rename_map. Do not initialize and free
2499 a rename_map per stmt_user.
2500 (gloog): Initialize and free one rename_map and pass it to
2503 2009-03-10 Sebastian Pop <sebastian.pop@amd.com>
2505 * graphite-clast-to-gimple.c (translate_clast): context_loop
2508 2009-03-10 Tobias Grosser <grosser@fim.uni-passau.de>
2509 Sebastian Pop <sebastian.pop@amd.com>
2511 * graphite-ppl.c (ppl_insert_dimensions): Fix stupid mistake
2512 of the use of ppl_Polyhedron_map_space_dimensions.
2514 2009-03-10 Tobias Grosser <grosser@fim.uni-passau.de>
2515 Sebastian Pop <sebastian.pop@amd.com>
2517 * graphite-poly.c (unify_scattering_dimensions): Fix types.
2518 * graphite-poly.h (poly_dr_p, poly_dr, POLY_DR_TYPE, PDR_BB,
2519 PDR_TYPE, PDR_ACCESSES, pdr_accessp_nb_subscripts,
2520 pdr_accessp_nb_iterators, pdr_accessp_nb_params,
2521 pdr_accessp_alias_set_dim, pdr_accessp_subscript_dim,
2522 pdr_accessp_iterator_dim, pdr_accessp_param_dim,
2523 pbb_nb_params): New.
2524 (pbb_nb_loops, pbb_nb_scattering, scop_nb_params,
2525 nb_loops_around_pbb): Adapt return types.
2527 2009-03-09 Tobias Grosser <grosser@fim.uni-passau.de>
2529 * Makefile.in (graphite.o, graphite-sese-to-poly.o,
2530 graphite-clast-to-gimple.o, graphite-data-ref.o,
2531 graphite-scop-detection.o, graphite-poly.o): Add
2534 2009-03-05 Tobias Grosser <grosser@fim.uni-passau.de>
2536 * Makefile.in (graphite.o, graphite-sese-to-poly.o,
2537 graphite-clast-to-gimple.o, graphite-data-ref.o,
2538 graphite-scop-detection.o, graphite-poly.o): Add graphite-poly.h.
2540 2009-03-04 Tobias Grosser <grosser@fim.uni-passau.de>
2542 * testsuite/gcc.dg/graphite/pr37485.c: Remove -floop-block
2543 * testsuite/gcc.dg/graphite/pr37828.c: Same.
2544 * testsuite/gcc.dg/graphite/pr37684.c: Same.
2545 * testsuite/gcc.dg/graphite/block-0.c: Same.
2546 * testsuite/gcc.dg/graphite/block-1.c: Same.
2547 * testsuite/gcc.dg/graphite/block-2.c: Same.
2548 * testsuite/gcc.dg/graphite/block-3.c: Same.
2549 * testsuite/gcc.dg/graphite/block-4.c: Same.
2550 * testsuite/gcc.dg/graphite/block-5.c: Same.
2551 * testsuite/gcc.dg/graphite/block-6.c: Same.
2552 * testsuite/gfortran.dg/graphite/pr38083.f90: Same.
2553 * testsuite/gfortran.dg/graphite/block-1.f90: Same.
2554 * testsuite/gfortran.dg/graphite/block-3.f90: Same.
2555 * testsuite/gfortran.dg/graphite/pr37852.f90: Same.
2556 * testsuite/gfortran.dg/graphite/block-4.f90: Same.
2557 * testsuite/gfortran.dg/graphite/pr37980.f90: Same.
2558 * testsuite/gfortran.dg/graphite/pr38953.f90: Same.
2559 * testsuite/gfortran.dg/graphite/pr37857.f90: Same.
2560 * opts.c: Remove -floop-block from -O2.
2561 * graphite-poly.c: Fail if -floop-block -floop-interchange or
2562 -floop-strip-mine are used.
2564 2009-03-04 Tobias Grosser <grosser@fim.uni-passau.de>
2565 Sebastian Pop <sebastian.pop@amd.com>
2567 * graphite-clast-to-gimple.c (build_cloog_prog): Unify scattering
2569 * graphite-poly.c (pbb_compare, graphite_sort_pbbs,
2570 graphite_trans_bb_move_loop, graphite_trans_bb_strip_mine,
2571 strip_mine_profitable_p, is_interchange_valid,
2572 graphite_trans_bb_block, graphite_trans_loop_block,
2573 graphite_trans_scop_block): Temporary removed.
2574 (extend_scattering, unify_scattering_dimensions): New.
2575 (print_scattering_function, graphite_read_transforms):
2576 PBB_SCATTERING -> PBB_TRANSFORMED_SCATTERING.
2577 (graphite_generate_scattering_fns): Removed.
2578 (apply_poly_transforms): Cleanup.
2579 (free_poly_bb): Add PBB_SCATTERING -> PBB_TRANSFORMED_SCATTERING.
2580 (schedule_to_scattering): Moved.
2581 (PBB_STATIC_SCHEDULE, PBB_SCATTERING): Removed.
2582 (PBB_ORIGINAL_SCATTERING, PBB_TRANSFORMED_SCATTERING): New.
2583 (pbb_nb_scattering): New.
2584 (SCOP_ENTRY, SCOP_EXIT, SCOP_REGION_BBS, SCOP_DEP_GRAPH, SCOP_PARAMS,
2585 SCOP_LOOP_NEST, SCOP_PARAMS, SCOP_OLDIVS, SCOP_LIVEOUT_RENAMES):
2587 * graphite-ppl.c (ppl_insert_dimensions): Extended and renamed from
2589 (ppl_strip_loop): PBB_SCATTERING -> PBB_TRANSFORMED_SCATTERING.
2590 * graphite-scop-detection.c (dot_all_scops_1): PBB_SCATTERING
2591 -> PBB_TRANSFORMED_SCATTERING.
2592 * graphite-sese-to-poly.c (build_scop_bbs): Remove region.
2593 (build_pbb_scattering_polyhedron): Moved from schedule_to_scattering.
2594 (build_scop_scattering): Renamed from build_scop_canonical_schedules.
2595 (check_poly_representation): Do not return bool.
2596 (graphite_transform_loops): Reformat.
2597 * sese.h (SESE_ENTRY_BB, SESE_EXIT_BB): New.
2599 2009-03-04 Sebastian Pop <sebastian.pop@amd.com>
2601 * graphite-poly.c (print_pbb_domain, print_pbb, print_scop,
2602 debug_pbb_domain, debug_pbb, debug_scop): New.
2603 * graphite-poly.h (print_pbb_domain, print_pbb, print_scop,
2604 debug_pbb_domain, debug_pbb, debug_scop): Declared.
2606 2009-03-02 Sebastian Pop <sebastian.pop@amd.com>
2609 * tree-parloops.c (canonicalize_loop_ivs): Call fold_convert
2610 when the type precision of the induction variable should be
2611 larger than the type precision of nit.
2612 (gen_parallel_loop): Update use of canonicalize_loop_ivs.
2613 * graphite-clast-to-gimple.c (graphite_loop_normal_form): Same.
2614 * tree-flow.h (canonicalize_loop_ivs): Update declaration.
2616 * testsuite/gcc.dg/graphite/pr39335_1.c: New.
2617 * testsuite/gcc.dg/graphite/pr39335.c: New.
2619 2009-03-02 Sebastian Pop <sebastian.pop@amd.com>
2621 * tree-parloops.c (canonicalize_loop_ivs): reduction_list contains
2622 SSA_NAMES not struct reduction_info.
2624 2009-03-02 Sebastian Pop <sebastian.pop@amd.com>
2626 * sese.c (expand_scalar_variables_expr): Handle ADDR_EXPR.
2628 2009-02-27 Sebastian Pop <sebastian.pop@amd.com>
2629 Tobias Grosser <grosser@fim.uni-passau.de>
2631 * sese.c (new_sese): Initialize SESE_REDUCTION_LIST.
2632 (free_sese): Free SESE_REDUCTION_LIST.
2633 * sese.h (struct sese): Add field reduction_list.
2634 (SESE_REDUCTION_LIST): New.
2635 * graphite-clast-to-gimple.c (graphite_loop_normal_form): Call
2636 canonicalize_loop_ivs on SESE_REDUCTION_LIST.
2638 2009-02-27 Sebastian Pop <sebastian.pop@amd.com>
2639 Tobias Grosser <grosser@fim.uni-passau.de>
2641 * tree-flow.h (gather_scalar_reductions): Use struct loop * instead
2644 2009-02-27 Sebastian Pop <sebastian.pop@amd.com>
2645 Tobias Grosser <grosser@fim.uni-passau.de>
2647 * tree-parloops.c (struct brli, build_reduction_list_info,
2648 analyze_reduction_list, gather_scalar_reductions): New.
2649 (loop_parallel_p): Build a reduction list containing only
2650 PHI_RESULT SSA_NAMEs: call gather_scalar_reductions.
2651 (gen_parallel_loop): Call the analysis analyze_reduction_list.
2652 (parallelize_loops): Now reduction_list is a htab_t of SSA_NAMEs.
2653 * tree-flow.h (gather_scalar_reductions): Declared.
2655 2009-02-26 Sebastian Pop <sebastian.pop@amd.com>
2658 * graphite-clast-to-gimple.c (graphite_loop_normal_form): Do not call
2659 number_of_iterations_exit from a gcc_assert.
2661 2009-02-25 Sebastian Pop <sebastian.pop@amd.com>
2662 Jan Sjodin <jan.sjodin@amd.com>
2664 * output.h (graphite_out_file, graphite_in_file): Declared.
2665 * toplev.c (graphite_out_file, graphite_in_file): New.
2666 (init_asm_output): Initialize graphite_in_file and graphite_out_file.
2667 * graphite-clast-to-gimple.c (build_cloog_prog): Read PBB_SCATTERING.
2668 Don't call schedule_to_scattering.
2669 * common.opt (fgraphite-write, fgraphite-read): New.
2670 * graphite-poly.c: Include output.h.
2671 (print_scattering_function, print_scattering_functions,
2672 debug_scattering_function, debug_scattering_functions,
2673 graphite_write_transforms, graphite_read_transforms,
2674 graphite_generate_scattering_fns): New.
2675 (apply_poly_transforms): Do not apply transform if flag_graphite_read.
2676 Call graphite_generate_scattering_fns, graphite_write_transforms,
2677 graphite_read_transforms.
2678 (new_poly_bb): Initialize PBB_SCATTERING.
2679 (free_poly_bb): Free PBB_SCATTERING.
2680 (schedule_to_scattering): Does not return, initialize PBB_SCATTERING.
2681 * graphite-poly.h (struct poly_bb): Add field scattering.
2682 (PBB_SCATTERING): New.
2683 (print_scattering_function, print_scattering_functions,
2684 debug_scattering_function, debug_scattering_functions): Declared.
2685 * graphite-ppl.c (cloog_matrix_to_ppl_constraint): Matrices contain
2686 GMP values, not integers!
2687 (ppl_print_polyhedron_matrix, debug_ppl_polyhedron_matrix,
2688 ppl_read_polyhedron_matrix): New.
2689 * graphite-ppl.h (ppl_print_polyhedron_matrix,
2690 debug_ppl_polyhedron_matrix,
2691 ppl_read_polyhedron_matrix): Declared.
2692 * Makefile.in (graphite-poly.o): Depends on output.h.
2694 2009-02-23 Sebastian Pop <sebastian.pop@amd.com>
2695 Tobias Grosser <grosser@fim.uni-passau.de>
2698 * graphite-scop-detection.c (stmt_simple_for_scop_p): Analyze
2699 scalar evolutions in the scop_entry->loop_father.
2701 2009-02-23 Sebastian Pop <sebastian.pop@amd.com>
2702 Tobias Grosser <grosser@fim.uni-passau.de>
2704 * graphite.h (ref_nb_loops): Remove declaration.
2705 (struct gimple_bb, gimple_bb_p, GBB_BB, GBB_DATA_REFS, GBB_CONDITIONS,
2706 GBB_CONDITION_CASES, GBB_CLOOG_IV_TYPES, gbb_loop, print_gimple_bb,
2707 debug_gbb): Moved to sese.h.
2710 2009-02-23 Sebastian Pop <sebastian.pop@amd.com>
2711 Tobias Grosser <grosser@fim.uni-passau.de>
2713 * graphite-data-ref.[ch]: Disable.
2715 2009-02-23 Sebastian Pop <sebastian.pop@amd.com>
2716 Tobias Grosser <grosser@fim.uni-passau.de>
2718 * graphite-scop-detection.c (stmt_simple_for_scop_p): Analyze
2719 scalar evolutions in the scop_entry->loop_father.
2721 2009-02-23 Sebastian Pop <sebastian.pop@amd.com>
2723 * graphite-scop-detection.c (nb_reductions_in_loop): Moved here...
2724 (graphite_cannot_represent_loop_niter): Renamed
2725 graphite_cannot_represent_loop. Call nb_reductions_in_loop.
2726 (limit_scops): build_sese_loop_nests does not return a bool.
2727 * graphite-scop-detection.h (nb_reductions_in_loop): Declared.
2728 * sese.c (nb_reductions_in_loop): ... from here.
2729 (graphite_loop_normal_form): ... from here.
2730 (sese_record_loop): Does not fail, so does not return a bool.
2731 (build_sese_loop_nests): Same.
2732 * sese.h (build_sese_loop_nests): Update declaration.
2733 * graphite-clast-to-gimple.c (graphite_loop_normal_form): Moved here...
2734 (build_graphite_loop_normal_form): New.
2735 (gloog): Call build_graphite_loop_normal_form.
2736 * graphite-sese-to-poly.c (build_poly_scop): Don't fail on
2737 build_sese_loop_nests.
2739 * testsuite/gcc.dg/graphite/id-1.c: New.
2741 2009-02-23 Sebastian Pop <sebastian.pop@amd.com>
2742 Tobias Grosser <grosser@fim.uni-passau.de>
2744 * graphite-sese-to-poly.c (scan_tree_for_params): Remove REAL_CST.
2745 The SCoP detection fix is sufficient.
2747 2009-02-21 Sebastian Pop <sebastian.pop@amd.com>
2749 PR tree-optimization/39260
2750 * graphite-scop-detection.c (harmful_stmt_in_bb): Stop a SCoP when
2751 the basic block contains a condition with a real type.
2752 * graphite-sese-to-poly.c (scan_tree_for_params): Handle REAL_CST.
2754 * gcc.dg/graphite/pr39260.c: New.
2756 2009-02-21 Sebastian Pop <sebastian.pop@amd.com>
2758 * graphite-poly.c: Inlcude params.h.
2759 (graphite_trans_loop_block): Use PARAM_LOOP_BLOCK_TILE_SIZE for
2761 * Makefile.in (graphite-poly.o): Depend on PARAMS_H.
2762 * params.def (PARAM_LOOP_BLOCK_TILE_SIZE): Define.
2764 2009-02-20 Sebastian Pop <sebastian.pop@amd.com>
2765 Tobias Grosser <grosser@fim.uni-passau.de>
2767 * graphite-scop-detection.c (dot_all_scops_1,
2768 dot_all_scops): Moved here.
2769 * graphite-scop-detection.h (dot_all_scops): Declared here.
2770 * graphite.c (graphite_initialize, graphite_finalize): New.
2771 (graphite_transform_loops): Cleaned up.
2772 * sese.c (debug_oldivs): Moved here.
2773 * graphite-poly.c (graphite_apply_transformations): Renamed
2774 apply_poly_transforms.
2775 (debug_loop_vec): Moved here.
2776 * graphite-sese-to-poly.c (build_bb_loops, build_sese_conditions_1,
2777 scop_contains_non_iv_scalar_phi_nodes, build_sese_conditions,
2778 find_scop_parameters, build_scop_iteration_domain,
2779 add_conditions_to_constraints, build_scop_canonical_schedules,
2780 build_scop_data_accesses): Now static.
2781 (build_poly_scop, check_poly_representation): New.
2783 2009-02-20 Sebastian Pop <sebastian.pop@amd.com>
2785 * graphite.c (graphite_stmt_p, new_gimple_bb, free_gimple_bb,
2786 remove_gbbs_in_scop, free_scops, try_generate_gimple_bb,
2787 build_scop_bbs, ref_nb_loops, compare_prefix_loops,
2788 build_scop_canonical_schedules, build_bb_loops, add_value_to_dim,
2789 scan_tree_for_params_right_scev, scan_tree_for_params_int,
2790 scan_tree_for_params, struct irp_data, dx_record_params,
2791 find_params_in_bb, find_scop_parameters, gbb_from_bb,
2792 build_loop_iteration_domains, add_conditions_to_domain,
2793 phi_node_is_iv, bb_contains_non_iv_scalar_phi_nodes,
2794 scop_contains_non_iv_scalar_phi_nodes, build_sese_conditions_1,
2795 build_sese_conditions, add_conditions_to_constraints,
2796 build_scop_iteration_domain, build_access_matrix_with_af,
2797 build_access_matrix,
2798 build_scop_data_accesses): Moved to graphite-sese-to-poly.c.
2800 * graphite-sese-to-poly.c: New.
2801 * graphite-sese-to-poly.h: New.
2803 * Makefile.in: Add new rule for graphite-sese-to-poly.o.
2805 2009-02-20 Sebastian Pop <sebastian.pop@amd.com>
2807 * graphite.c: Split graphite code generation to a new file.
2808 (graphite_verify, gmp_cst_to_tree, clast_name_to_gcc,
2809 max_precision_type, clast_to_gcc_expression_red,
2810 clast_to_gcc_expression, gcc_type_for_clast_expr,
2811 gcc_type_for_clast_eq, loop_iv_stack_patch_for_consts,
2812 graphite_translate_clast_equation, graphite_create_guard_cond_expr,
2813 graphite_create_new_guard, clast_get_body_of_loop,
2814 gcc_type_for_cloog_iv, gcc_type_for_iv_of_clast_loop,
2815 graphite_create_new_loop, build_iv_mapping, copy_renames,
2816 translate_clast, find_cloog_iv_in_expr, compute_cloog_iv_types_1,
2817 compute_cloog_iv_types, free_scattering, save_var_name,
2818 initialize_cloog_names, build_scop_context, build_cloog_prog,
2819 set_cloog_options, debug_clast_stmt, scop_to_clast,
2820 print_generated_program, debug_generated_program,
2821 gloog): Moved to graphite-clast-to-gimple.c.
2823 (struct cloog_prog_clast): Moved to graphite-clast-to-gimple.h.
2825 (iv_stack_entry_is_constant, iv_stack_entry_is_iv,
2826 loop_iv_stack_push_iv, loop_iv_stack_insert_constant,
2827 loop_iv_stack_pop, loop_iv_stack_get_iv,
2828 loop_iv_stack_get_iv_from_name, debug_loop_iv_stack,
2829 free_loop_iv_stack, loop_iv_stack_remove_constants,
2830 debug_rename_elt, debug_rename_map_1, debug_rename_map,
2831 rename_map_elt_info, eq_rename_map_elts, debug_ivtype_elt,
2832 debug_ivtype_map_1, debug_ivtype_map, ivtype_map_elt_info,
2833 eq_ivtype_map_elts, sese_add_exit_phis_edge,
2834 sese_add_exit_phis_var, sese_insert_phis_for_liveouts,
2835 get_vdef_before_sese, sese_adjust_vphi,
2836 get_new_name_from_old_name, sese_adjust_phis_for_liveouts,
2837 oldiv_for_loop, rename_variables_in_stmt, is_parameter,
2838 is_iv, expand_scalar_variables_ssa_name,
2839 expand_scalar_variables_expr, expand_scalar_variables_stmt,
2840 expand_scalar_variables, rename_variables, remove_condition,
2841 get_true_edge_from_guard_bb, get_false_edge_from_guard_bb,
2842 add_loop_exit_phis, insert_loop_close_phis, struct igp,
2843 default_liveout_before_guard, add_guard_exit_phis,
2844 insert_guard_phis, register_old_and_new_names,
2845 graphite_copy_stmts_from_block, register_sese_liveout_renames,
2846 copy_bb_and_scalar_dependences, outermost_loop_in_sese,
2847 if_region_set_false_region, create_if_region_on_edge,
2848 move_sese_in_condition): Moved to sese.c.
2850 (nb_loops_around_loop_in_sese, struct ifsese, if_region_entry,
2851 if_region_exit, if_region_get_condition_block,
2852 struct rename_map_elt, new_rename_map_elt, enum iv_stack_entry_kind,
2853 union iv_stack_entry_data_union, struct iv_stack_entry_struct,
2854 iv_stack_entry_p, loop_iv_stack, struct ivtype_map_elt,
2855 ivtype_map_elt, new_ivtype_map_elt,
2856 recompute_all_dominators): Moved to sese.h.
2858 * graphite-clast-to-gimple.c: New.
2859 * graphite-clast-to-gimple.h: New.
2860 * Makefile.in: Add new rule for graphite-clast-to-gimple.o.
2861 * sese.c: Modified as said above.
2864 2009-02-20 Sebastian Pop <sebastian.pop@amd.com>
2866 * graphite.c: Split scop detection to a new file.
2867 (enum gbb_type, gbb_type, get_bb_type, struct sd_region_p, sd_region,
2868 move_sd_regions, loop_affine_expr, exclude_component_ref,
2869 is_simple_operand, stmt_simple_for_scop_p, harmful_stmt_in_bb,
2870 graphite_cannot_represent_loop_niter, struct scopdet_info,
2871 scopdet_basic_block_info, build_scops_1, bb_in_sd_region,
2872 find_single_entry_edge, find_single_exit_edge,
2873 create_single_entry_edge, sd_region_without_exit,
2874 create_single_exit_edge, unmark_exit_edges, mark_exit_edges,
2875 create_sese_edges, build_graphite_scops, limit_scops, build_scops):
2876 Moved to graphite-scop-detection.c.
2878 * graphite-scop-detection.c: New.
2879 * graphite-scop-detection.h: New.
2880 * Makefile.in: Add new rule for graphite-scop-detection.o.
2882 * sese.c: Include tree-chrec.h, tree-data-ref.h, and
2883 tree-scalar-evolution.h.
2884 (nb_reductions_in_loop, graphite_loop_normal_form, sese_record_loop,
2885 build_sese_loop_nests): Moved here from graphite.c.
2886 (param_index): Renamed parameter_index_in_region.
2888 2009-02-18 Tobias Grosser <grosser@fim.uni-passau.de>
2889 Sebastian Pop <sebastian.pop@amd.com>
2891 * gcc.dg/graphite/block-0.c: Expected to fail now.
2892 * gcc.dg/graphite/block-1.c: Same.
2893 * gcc.dg/graphite/block-5.c: Same.
2894 * gcc.dg/graphite/block-6.c: Same.
2896 2009-02-18 Tobias Grosser <grosser@fim.uni-passau.de>
2897 Sebastian Pop <sebastian.pop@amd.com>
2899 * graphite.h: Separate from graphite_bb_p the polyhedral
2900 representation in poly_bb_p and the GCC specifics in gimple_bb_p.
2901 (struct data_dependence_polyhedron, RDGE_DDP, ddp_p): Moved to
2902 graphite-data-ref.h.
2903 (struct poly_bb, PBB_SCOP, PBB_STATIC_SCHEDULE, PBB_DOMAIN,
2904 PBB_BLACK_BOX, PBB_LOOPS, pbb_nb_loops, pbb_loop_at_index,
2905 pbb_loop_index, struct scop, SCOP_BBS, SCOP_REGION, SCOP_ENTRY,
2906 SCOP_EXIT, SCOP_REGION_BBS, SCOP_DEP_GRAPH, SCOP_PARAMS,
2907 SCOP_LOOP_NEST, SCOP_PARAMS, SCOP_OLDIVS, SCOP_LIVEOUT_RENAMES,
2908 scop_nb_params): Moved to graphite-poly.h.
2909 * graphite-data-ref.c: Same.
2910 * graphite-data-ref.h: New.
2912 (pbb_compare, graphite_sort_pbbs, graphite_trans_bb_move_loop,
2913 graphite_trans_bb_strip_mine, strip_mine_profitable_p,
2914 is_interchange_valid, graphite_trans_bb_block,
2915 graphite_trans_loop_block, scop_max_loop_depth,
2916 graphite_trans_scop_block, graphite_apply_transformations,
2917 new_poly_bb, free_poly_bb, new_scop, free_scop): Moved to
2919 * graphite-poly.h: New.
2920 * graphite-poly.c: New.
2921 * Makefile.in (OBJS-common): Add graphite-poly.o.
2922 (graphite-poly.o): New rule.
2923 * tree-data-ref.h (struct data_reference): Remove unused scop field.
2926 2009-02-18 Sebastian Pop <sebastian.pop@amd.com>
2927 Tobias Grosser <grosser@fim.uni-passau.de>
2929 * graphite.c: Replace gb -> gbb.
2931 * graphite-data-ref.c: Same.
2933 2009-02-18 Sebastian Pop <sebastian.pop@amd.com>
2934 Tobias Grosser <grosser@fim.uni-passau.de>
2936 * Makefile.in (OBJS-commmon): Add sese.o.
2938 (graphite.o): Add sese.h.
2939 * graphite.c (bb_in_ss_p, loop_in_sese_p,
2940 sese_build_livein_liveouts_use, sese_build_livein_liveouts_bb,
2941 sese_build_livein_liveouts, register_bb_in_sese, new_sese, free_sese):
2943 (block_before_scop): Add missing return.
2944 (new_scop, free_scop): Remove SESE data structures.
2945 (scop_record_loop, scan_tree_for_params, find_params_in_bb,
2946 find_scop_parameters, build_loop_iteration_domains,
2947 add_conditions_to_domain, register_scop_liveout_renames,
2948 copy_bb_and_scalar_dependences): Scop -> SESE.
2950 (add_conditions_to_domain): SCoP -> SESE and remove check
2951 (scop_contains_non_iv_scalar_phi_nodes): New.
2952 (build_scop_conditions_1, build_scop_conditions): Remove check for
2953 non iv scalar phi nodes.
2954 (print_scop_statistics): New.
2955 (graphite_transform_loops): Cleanup.
2957 * graphite.h: Move to sese & cleanup.
2961 2009-02-16 Sebastian Pop <sebastian.pop@amd.com>
2962 Tobias Grosser <grosser@fim.uni-passau.de>
2964 * graphite.c (build_scop_conditions_1): Conditions are only
2965 at the end of a basic block.
2967 2009-02-16 Sebastian Pop <sebastian.pop@amd.com>
2968 Tobias Grosser <grosser@fim.uni-passau>
2970 * graphite.h (struct graphite_bb): Remove compressed_alpha_matrix
2972 (GBB_ALPHA): Removed.
2974 2009-02-16 Sebastian Pop <sebastian.pop@amd.com>
2975 Tobias Grosser <grosser@fim.uni-passau.de>
2977 * graphite-data-ref.c (graphite_test_dependence): Don't use
2978 GBB_DYNAMIC_SCHEDULE.
2979 * graphite.c (new_graphite_bb): Same.
2980 (free_graphite_bb): Same.
2981 (build_scop_dynamic_schedules): Removed.
2982 (graphite_transform_loops): Don't call it.
2983 * graphite.h (struct graphite_bb): Remove dynamic_schedule field.
2984 (GBB_DYNAMIC_SCHEDULE): Removed.
2986 2009-02-16 Sebastian Pop <sebastian.pop@amd.com>
2987 Tobias Grosser <grosser@fim.uni-passau.de>
2989 * graphite.c (schedule_to_scattering): Don't use CloogMatrix.
2990 (print_graphite_bb): Same.
2991 (build_cloog_prog): Same.
2993 2009-02-16 Sebastian Pop <sebastian.pop@amd.com>
2994 Tobias Grosser <grosser@fim.uni-passau.de>
2996 * graphite.c (build_cloog_prog): Don't use CloogMatrix.
2998 2009-02-16 Sebastian Pop <sebastian.pop@amd.com>
2999 Tobias Grosser <grosser@fim.uni-passau.de>
3001 * graphite.c (build_scop_context): Don't use CloogMatrix.
3002 * graphite-ppl.c (new_Cloog_Domain_from_ppl_Polyhedron): New.
3003 * graphite-ppl.h (new_Cloog_Domain_from_ppl_Polyhedron): Declared.
3005 2009-02-16 Sebastian Pop <sebastian.pop@amd.com>
3006 Tobias Grosser <grosser@fim.uni-passau.de>
3008 * graphite.h (struct scop): Move params, old_ivs, loops, loop_nest,
3009 liveout_renames, add_params fields...
3010 (struct sese): ... here.
3011 (SESE_PARAMS, SESE_LOOPS, SESE_LOOP_NEST, SESE_ADD_PARAMS,
3012 SESE_PARAMS, SESE_OLDIVS, SESE_LIVEOUT_RENAMES): New.
3014 2009-02-16 Sebastian Pop <sebastian.pop@amd.com>
3015 Tobias Grosser <grosser@fim.uni-passau.de>
3017 * graphite.c (print_scop): Do not print the CLooG program.
3018 (new_scop, free_scop, initialize_cloog_names, build_scop_context,
3019 build_cloog_prog, gloog): Don't use SCOP_PROG.
3020 (find_transform): Renamed scop_to_clast.
3021 (print_generated_program, debug_generated_program): New.
3022 (graphite_transform_loops): Adapt to new interface.
3023 * graphite.h (struct scop): Remove program field.
3024 (SCOP_PROG): Removed.
3025 (print_generated_program, debug_generated_program): Declared.
3027 2009-02-16 Sebastian Pop <sebastian.pop@amd.com>
3029 * graphite-data-ref.c (schedule_precedes_p, schedule_same_p): New.
3030 (statement_precedes_p): Use schedule_same_p and schedule_precedes_p.
3031 * graphite.c (gbb_compare, schedule_to_scattering, print_graphite_bb,
3032 free_graphite_bb, build_scop_canonical_schedules,
3033 graphite_trans_bb_strip_mine, graphite_trans_scop_block): Static
3034 schedules are now represented using a ppl_Linear_Expression_t.
3035 * graphite.h (struct graphite_bb): Same.
3036 * graphite-ppl.c (ppl_lexico_compare_linear_expressions): New.
3037 * graphite-ppl.h (ppl_lexico_compare_linear_expressions): Declared.
3039 2009-02-15 Sebastian Pop <sebastian.pop@amd.com>
3041 * graphite.c: Free local memory.
3042 * graphite-ppl.c: Same.
3044 2009-02-15 Sebastian Pop <sebastian.pop@amd.com>
3046 * graphite.c (const_column_index, get_first_matching_sign_row_index,
3047 get_lower_bound_row, get_upper_bound_row, copy_constraint,
3048 swap_constraint_variables, scale_constraint_variable): Removed.
3049 (graphite_trans_bb_strip_mine): Remove pong.
3050 * graphite-ppl.c: Include missing header files.
3051 (set_inhomogeneous, set_coef, shift_poly, ppl_strip_loop): New.
3052 * graphite-ppl.h (ppl_strip_loop): Declared.
3053 * Makefile.in (graphite-ppl.o): Adjust dependences.
3055 2009-02-14 Sebastian Pop <sebastian.pop@amd.com>
3057 * graphite.c (build_loop_iteration_domains): Remove ping pong.
3058 (build_scop_iteration_domain): Same.
3060 2009-02-13 Sebastian Pop <sebastian.pop@amd.com>
3062 * graphite.c (scan_tree_for_params, add_conditions_to_domain): Remove
3064 (add_value_to_dim, scan_tree_for_params_right_scev,
3065 scan_tree_for_params_int): New.
3066 * graphite-ppl.c (oppose_constraint): New.
3067 (insert_constraint_into_matrix): Implement missing cases.
3068 * graphite-ppl.h (insert_constraint_into_matrix): Declared.
3070 2009-02-13 Sebastian Pop <sebastian.pop@amd.com>
3072 * graphite.c (graphite_trans_bb_move_loop): Remove ping pong,
3073 use ppl_move_dimension.
3075 2009-02-12 Sebastian Pop <sebastian.pop@amd.com>
3077 * graphite-data-ref.c: Domains are now ppl_Polyhedra_t.
3080 * graphite-ppl.c: Same.
3081 * graphite-ppl.h: Same.
3083 2009-02-12 Sebastian Pop <sebastian.pop@amd.com>
3085 Revert last 3 commits.
3087 2009-02-10 Sebastian Pop <sebastian.pop@amd.com>
3089 * graphite.c (scan_tree_for_params, add_conditions_to_domain): Remove
3091 (add_value_to_dim, scan_tree_for_params_right_scev,
3092 scan_tree_for_params_int): New.
3093 * graphite-ppl.c (oppose_constraint): New.
3094 (insert_constraint_into_matrix): Implement missing cases.
3095 * graphite-ppl.h (insert_constraint_into_matrix): Declared.
3097 2009-02-10 Sebastian Pop <sebastian.pop@amd.com>
3099 * graphite.c (graphite_trans_bb_move_loop): Remove unused variables.
3101 2009-02-10 Sebastian Pop <sebastian.pop@amd.com>
3102 Tobias Grosser <grosser@fim.uni-passau.de>
3104 * graphite.c (graphite_trans_bb_move_loop): Remove ping pong,
3105 use ppl_move_dimension.
3106 * graphite-ppl.c (ppl_move_dimension): New.
3107 * graphite-ppl.h (ppl_move_dimension): Declared.
3109 2009-02-10 Sebastian Pop <sebastian.pop@amd.com>
3111 * graphite.c: Do not include cloog/cloog.h.
3112 (print_graphite_bb): Remove ping pong, call PPL print function.
3114 2009-02-10 Tobias Grosser <grosser@fim.uni-passau.de>
3116 * Makefile.in (OBJS-common): Add graphite-ppl.o.
3117 (graphite.o): Add dependence on graphite-ppl.h.
3118 (graphite-ppl.o): New.
3119 (graphite-data-ref.c): Ping pong between PPL data structures
3121 * graphite-ppl.c: New.
3122 * graphite-ppl.h: New.
3123 * graphite.c: Include graphite-ppl.h.
3124 (print_graphite_bb, add_conditions_to_domain, build_cloog_prog,
3125 graphite_trans_bb_move_loop, graphite_trans_bb_strip_mine):
3126 Ping pong between PPL data structures and matrices.
3127 (new_graphite_bb): Create a PPL constraint system.
3128 Call ppl_delete_Constraint_System instead of cloog_matrix_free.
3129 (build_loop_iteration_domains): Use PPL functions.
3130 * graphite.h: Include graphite-ppl.h. Fix comments.
3131 (graphite_bb): Use a ppl_Constraint_System_t instead of
3132 CloogMatrix for representing the domain.
3133 (scop): Remove static_schedule.
3134 (gbb_nb_loops): Ping pong between PPL data structures and matrices.
3136 2009-02-06 Sebastian Pop <sebastian.pop@amd.com>
3138 * graphite.c: Fix some comments.
3140 2009-02-05 Sebastian Pop <sebastian.pop@amd.com>
3143 * graphite.c (if_region_set_false_region): After moving a region
3144 in the false branch of a condition, remove the empty dummy
3146 (gloog): Remove wrong fix for PR38953.
3148 2009-02-03 Tobias Grosser <grosser@fim.uni-passau.de>
3150 * graphite.c (bb_in_sese_p, sese_build_livein_liveouts_use,
3151 sese_build_livein_liveouts_bb, sese_build_livein_liveouts,
3152 register_bb_in_sese, new_sese, free_sese): Moved.
3153 (dot_scop_1, build_scop_loop_nests, build_loop_iteration_domains,
3154 outermost_loop_in_scop, build_scop_iteration_domain,
3155 expand_scalar_variables_ssa_name, get_vdef_before_scop,
3156 limit_scops): Use bb_in_sese_p instead of bb_in_scop_p.
3157 Use loop_in_sese_p instead of loop_in_scop_p.
3158 (new_graphite_bb, new_scop, gloog): Do not initialize SCOP_BBS_B.
3159 (free_scop): Do not free SCOP_BBS_B.
3160 (nb_loops_around_loop_in_scop, nb_loops_around_gb,
3161 ref_nb_loops): Moved here...
3162 * graphite.h (ref_nb_loops): ... from here.
3163 (struct scop): Remove bbs_b bitmap.
3164 (SCOP_BBS_B, bb_in_scop_p, loop_in_scop_p): Removed.
3165 * testsuite/gcc.dg/graphite/scop-19.c: New
3167 2009-02-03 Tobias Grosser <grosser@fim.uni-passau.de>
3169 * graphite.c (scopdet_basic_block_info): Fix bug in scop
3172 2009-01-30 Tobias Grosser <grosser@fim.uni-passau.de>
3174 * graphite.c (new_loop_to_cloog_loop_str, hash_loop_to_cloog_loop,
3175 eq_loop_to_cloog_loop): Remove.
3176 (new_scop, free_scop): Remove SCOP_LOOP2CLOOG_LOOP.
3177 * graphite.h (struct scop): Remove loop2cloog_loop.
3178 (loop_domain_dim, loop_iteration_vector_dim): Remove.
3180 2009-01-30 Tobias Grosser <grosser@fim.uni-passau.de>
3182 * opts.c (decode_options): Only add graphite options to O2
3183 if we compile with graphite enabled.
3185 2009-01-26 Sebastian Pop <sebastian.pop@amd.com>
3187 * Merge from mainline (r143163:143684).
3189 2009-01-26 Sebastian Pop <sebastian.pop@amd.com>
3191 * graphite.c (debug_value): Removed.
3192 * graphite.h (debug_value): Removed.
3194 2009-01-23 Sebastian Pop <sebastian.pop@amd.com>
3196 * passes.c (init_optimization_passes): Do not call pass_copy_prop
3197 after graphite: pass_copy_prop does not maintain a proper loop closed
3198 SSA form. pass_copy_prop should be fixed.
3200 2009-01-23 Sebastian Pop <sebastian.pop@amd.com>
3202 * graphite.c (scop_adjust_phis_for_liveouts): Fix warning.
3204 2009-01-23 Sebastian Pop <sebastian.pop@amd.com>
3206 * graphite.c (graphite_verify): Add a call to verify_loop_closed_ssa.
3207 (gloog): Split the exit of the scop when the scop exit is a loop exit.
3208 (graphite_transform_loops): Only call cleanup_tree_cfg if gloog
3211 2009-01-20 Sebastian Pop <sebastian.pop@amd.com>
3213 * graphite.c (gloog): Return true when code gen succeeded.
3214 (graphite_transform_loops): Do not call cleanup_tree_cfg if
3215 the code of the function did not changed. After cleanup_tree_cfg
3216 call rewrite_into_loop_closed_ssa to maintain the loop closed ssa
3219 2009-01-19 Sebastian Pop <sebastian.pop@amd.com>
3221 * graphite.c (stmt_simple_for_scop_p): Also handle cases when
3222 gimple_call_lhs is NULL.
3224 2009-01-16 Sebastian Pop <sebastian.pop@amd.com>
3225 Tobias Grosser <tobi.grosser@amd.com>
3227 * graphite.c (graphite_trans_scop_block): Do not block single
3230 2009-01-15 Sebastian Pop <sebastian.pop@amd.com>
3231 Tobias Grosser <tobi.grosser@amd.com>
3233 * graphite.c (build_scop_canonical_schedules): Start schedules at
3236 2009-01-15 Sebastian Pop <sebastian.pop@amd.com>
3237 Tobias Grosser <tobi.grosser@amd.com>
3239 * graphite.c (compare_prefix_loops): New.
3240 (build_scop_canonical_schedules): Rewritten.
3241 (graphite_transform_loops): Move build_scop_canonical_schedules
3242 after build_scop_iteration_domain.
3244 2009-01-14 Sebastian Pop <sebastian.pop@amd.com>
3245 Tobias Grosser <tobi.grosser@amd.com>
3247 * graphite.c (add_conditions_to_domain): Add the loops to
3248 the dimension of the iteration domain. Do copy the domain
3249 only when it exists.
3250 (build_scop_conditions_1): Do not call add_conditions_to_domain.
3251 (add_conditions_to_constraints): New.
3252 (can_generate_code_stmt, can_generate_code): Removed.
3253 (gloog): Do not call can_generate_code.
3254 (graphite_transform_loops): Call add_conditions_to_constraints
3255 after building the iteration domain.
3257 2009-01-14 Sebastian Pop <sebastian.pop@amd.com>
3258 Tobias Grosser <tobi.grosser@amd.com>
3259 Jan Sjodin <jan.sjodin@amd.com>
3261 * graphite.c (scan_tree_for_params): On substractions negate
3262 all the coefficients of the term.
3263 (clast_to_gcc_expression_red): New. Handle reduction expressions
3264 of more than two operands.
3265 (clast_to_gcc_expression): Call clast_to_gcc_expression_red.
3266 (get_vdef_before_scop): Handle also the case of default definitions.
3268 2009-01-14 Sebastian Pop <sebastian.pop@amd.com>
3271 * graphite.c (get_vdef_before_scop, scop_adjust_vphi): New.
3272 (scop_adjust_phis_for_liveouts): Call scop_adjust_vphi.
3273 (gloog): Do not call cleanup_tree_cfg.
3274 (graphite_transform_loops): Call cleanup_tree_cfg after all
3275 scops have been code generated.
3277 2009-01-13 Sebastian Pop <sebastian.pop@amd.com>
3279 * passes.c (init_optimization_passes): Schedule after
3280 graphite transforms pass_copy_prop, pass_dce_loop and pass_lim.
3282 2009-01-13 Sebastian Pop <sebastian.pop@amd.com>
3284 * graphite.c (expand_scalar_variables_stmt): Do not pass loop_p.
3286 (expand_scalar_variables_ssa_name): Do not pass loop_p. Fix comment.
3287 Set the type of an expression to the type of its assign statement.
3288 (expand_scalar_variables_expr): Do not pass loop_p.
3289 Fix comment. Stop recursion on tcc_constant or tcc_declaration.
3290 (copy_bb_and_scalar_dependences): Do not pass loop_p.
3291 (translate_clast): Update call to copy_bb_and_scalar_dependences.
3293 2009-01-11 Sebastian Pop <sebastian.pop@amd.com>
3295 * graphite.c (expand_scalar_variables_ssa_name): Set the type of
3296 an expression to the gimple_expr_type of its assign statement.
3297 (expand_scalar_variables_expr): Stop recursion on tcc_constant
3300 2009-01-11 Sebastian Pop <sebastian.pop@amd.com>
3302 PR tree-optimization/38786
3303 * testsuite/gcc.dg/graphite/pr38786.c: New.
3304 * graphite.c (expand_scalar_variables_ssa_name): New, outlined from
3305 the SSA_NAME case of expand_scalar_variables_expr.
3306 (expand_scalar_variables_expr): Also gather the scalar computation
3307 used to index the memory access.
3308 (expand_scalar_variables_stmt): Pass to expand_scalar_variables_expr
3309 the gimple_stmt_iterator where it inserts new code.
3311 2009-01-10 Sebastian Pop <sebastian.pop@amd.com>
3313 * testsuite/gcc.dg/graphite/block-3.c: Fix compile error on 32bit.
3315 2009-01-10 Sebastian Pop <sebastian.pop@amd.com>
3317 * opts.c (decode_options): Enable flag_graphite_identity and
3318 flag_loop_block in -O2 and above.
3320 2009-01-08 Sebastian Pop <sebastian.pop@amd.com>
3322 * libjava/classpath/lib/gnu/java/awt/peer/gtk/GtkMouseInfoPeer.class:
3323 Fix merge problem: replace with the file from trunk.
3325 2009-01-08 Sebastian Pop <sebastian.pop@amd.com>
3327 * Merge from mainline (r141727:143163).
3329 2009-01-07 Sebastian Pop <sebastian.pop@amd.com>
3330 Jan Sjodin <jan.sjodin@amd.com>
3332 PR tree-optimization/38559
3333 * testsuite/gcc.dg/graphite/pr38559.c: New.
3335 * graphite.c (debug_value, copy_constraint,
3336 swap_constraint_variables, scale_constraint_variable, ): New.
3337 (get_lower_bound, get_upper_bound): Removed.
3338 (graphite_trans_bb_strip_mine): Clean up this code that works
3339 only for constant number of iterations. Fully copy upper and
3340 lower bound constraints, not only the constant part of them.
3341 * graphite.h (debug_value): Declared.
3343 2009-01-06 Jan Sjodin <jan.sjodin@amd.com>
3345 PR tree-optimization/38492
3346 PR tree-optimization/38498
3347 * tree-check.c (operator_is_linear, scev_is_linear_expression): New.
3348 * tree-chrec.h (scev_is_linear_expression): Declared.
3349 * graphite.c (graphite_cannot_represent_loop_niter): New.
3350 (scopdet_basic_block_info): Call graphite_cannot_represent_loop_niter.
3351 (graphite_loop_normal_form): Use gcc_assert.
3352 (scan_tree_for_params): Use CASE_CONVERT.
3353 (phi_node_is_iv, bb_contains_non_iv_scalar_phi_nodes): New.
3354 (build_scop_conditions_1): Call bb_contains_non_iv_scalar_phi_nodes.
3355 Use gcc_assert. Discard scops that contain unhandled cases.
3356 (build_scop_conditions): Return a boolean status for unhandled cases.
3357 (strip_mine_profitable_p): Print the loop number, not its depth.
3358 (is_interchange_valid): Pass the depth of the loop nest, don't
3359 recompute it wrongly.
3360 (graphite_trans_bb_block): Same.
3361 (graphite_trans_bb_block): Print tentative of loop blocking.
3362 (graphite_trans_scop_block): Do not print that the loop has been
3364 (graphite_transform_loops): Do not handle scops that contain condition
3367 * testsuite/gcc.dg/graphite/pr38500.c: Fixed warning as committed
3369 * testsuite/gcc.dg/graphite/block-0.c: Update test.
3370 * testsuite/gcc.dg/graphite/block-1.c: Same.
3371 * testsuite/gcc.dg/graphite/block-2.c: Remove xfail and test for
3373 * testsuite/gcc.dg/graphite/block-4.c: Remove test for strip mine.
3374 * testsuite/gcc.dg/graphite/block-3.c: New.
3375 * testsuite/gcc.dg/graphite/pr38498.c: New.
3377 2008-12-22 Harsha Jagasia <harsha.jagasia@amd.com>
3379 PR tree-optimization/38510
3380 * gcc.dg/graphite/pr38510.c: New.
3381 * graphite.c (recompute_all_dominators): Call mark_irreducible_loops.
3382 (translate_clast): Call recompute_all_dominators before
3384 (gloog): Call recompute_all_dominators before graphite_verify.
3386 2008-12-12 Sebastian Pop <sebastian.pop@amd.com>
3388 PR tree-optimization/38492
3389 * graphite.c (rename_map_elt, debug_rename_elt,
3390 debug_rename_map_1, debug_rename_map, new_rename_map_elt,
3391 rename_map_elt_info, eq_rename_map_elts,
3392 get_new_name_from_old_name, bb_in_sese_p): Moved around.
3393 (sese_find_uses_to_rename_use): Renamed sese_build_livein_liveouts_use.
3394 (sese_find_uses_to_rename_bb): Renamed sese_build_livein_liveouts_bb.
3395 (sese_build_livein_liveouts): New.
3396 (new_sese, free_sese): New.
3397 (new_scop): Call new_sese.
3398 (free_scop): Call free_sese.
3399 (rename_variables_from_edge, rename_phis_end_scop): Removed.
3400 (register_old_new_names): Renamed register_old_and_new_names.
3401 (register_scop_liveout_renames, add_loop_exit_phis,
3402 insert_loop_close_phis, struct igp,
3403 default_liveout_before_guard, add_guard_exit_phis,
3404 insert_guard_phis, copy_renames): New.
3405 (translate_clast): Call insert_loop_close_phis and insert_guard_phis.
3406 (sese_add_exit_phis_edge): Renamed scop_add_exit_phis_edge.
3407 (rewrite_into_sese_closed_ssa): Renamed scop_insert_phis_for_liveouts.
3408 (scop_adjust_phis_for_liveouts): New.
3409 (gloog): Call scop_adjust_phis_for_liveouts.
3411 * graphite.h (struct sese): Documented. Added fields liveout,
3413 (SESE_LIVEOUT, SESE_LIVEIN, SESE_LIVEIN_VER, SESE_NUM_VER): New.
3414 (new_sese, free_sese, sese_build_livein_liveouts): Declared.
3415 (struct scop): Added field liveout_renames.
3416 (SCOP_LIVEOUT_RENAMES): New.
3418 2008-12-11 Sebastian Pop <sebastian.pop@amd.com>
3420 PR tree-optimization/38409
3421 * gcc.dg/graphite/pr38409.c: New.
3422 * graphite.c (nb_reductions_in_loop): Use simple_iv.
3424 2008-12-11 Sebastian Pop <sebastian.pop@amd.com>
3426 * graphite.c (gcc_type_for_cloog_iv): By default return
3428 (graphite_create_new_loop): Don't fold_convert the already
3429 fold_convert-ed expression.
3431 2008-12-11 Harsha Jagasia <harsha.jagasia@amd.com>
3433 PR tree-optimization/38446
3434 * gcc.dg/graphite/pr38446.c: New.
3435 * graphite.c (register_bb_in_sese): New.
3436 (bb_in_sese_p): Check if bb belongs to sese region by explicitly
3437 looking at the bbs in the region.
3438 * graphite.h (sese): Add region_basic_blocks pointer set to
3439 structure and initialize at the time of defining new scop.
3441 2008-12-11 Tobias Grosser <grosser@fim.uni-passau.de>
3443 * graphite.c (new_graphite_bb): Initialize GBB_STATIC_SCHEDULE.
3444 (find_params_in_bb): Do not free data refs.
3445 (free_graphite_bb): Add FIXME on disabled free_data_refs.
3447 2008-12-11 Sebastian Pop <sebastian.pop@amd.com>
3449 * testsuite/gcc.dg/graphite/scop-16.c: Test only scop specific info.
3450 * testsuite/gcc.dg/graphite/scop-17.c: Same.
3451 * testsuite/gcc.dg/graphite/block-5.c: New.
3452 * testsuite/gcc.dg/graphite/block-6.c: New.
3453 * testsuite/gcc.dg/graphite/pr37485.c: Clean dump file after.
3454 * testsuite/gcc.dg/graphite/pr37684.c: Same.
3455 * testsuite/gcc.dg/graphite/block-2.c: Same.
3457 * graphite.c (struct ivtype_map_elt): New.
3458 (debug_ivtype_elt, debug_ivtype_map_1, debug_ivtype_map,
3459 new_ivtype_map_elt, ivtype_map_elt_info, eq_ivtype_map_elts,
3460 gcc_type_for_cloog_iv): New.
3461 (loop_iv_stack_patch_for_consts): Use the type of the induction
3462 variable from the original loop, except for the automatically
3463 generated loops, i.e., in the case of a strip-mined loop, in
3464 which case there is no original loop: in that case just use
3466 (new_graphite_bb): Initialize GBB_CLOOG_IV_TYPES.
3467 (free_graphite_bb): Free GBB_CLOOG_IV_TYPES.
3468 (clast_name_to_gcc): Accept params to be NULL.
3469 (clast_to_gcc_expression): Take an extra parameter for the type.
3470 Convert to that type all the expressions built by this function.
3471 (gcc_type_for_clast_expr, gcc_type_for_clast_eq): New.
3472 (graphite_translate_clast_equation): Compute the type of the
3473 clast_equation before translating its LHS and RHS.
3474 (clast_get_body_of_loop, gcc_type_for_iv_of_clast_loop): New.
3475 (graphite_create_new_loop): Compute the type of the induction
3476 variable before translating the lower and upper bounds and before
3477 creating the induction variable.
3478 (rename_variables_from_edge, rename_phis_end_scop): New.
3479 (copy_bb_and_scalar_dependences): Call rename_phis_end_scop.
3480 (sese_add_exit_phis_edge): Do not use integer_zero_node.
3481 (find_cloog_iv_in_expr, compute_cloog_iv_types_1,
3482 compute_cloog_iv_types): New.
3483 (gloog): Call compute_cloog_iv_types before starting the
3484 translation of the clast.
3486 * graphite.h (struct graphite_bb): New field cloog_iv_types.
3487 (GBB_CLOOG_IV_TYPES): New.
3488 (debug_ivtype_map): Declared.
3489 (oldiv_for_loop): New.
3491 2008-12-10 Tobias Grosser <grosser@fim.uni-passau.de>
3494 * graphite.c (new_scop): Initialize SCOP_ADD_PARAMS.
3495 (param_index): Assert if parameter is not know after parameter
3497 (find_params_in_bb): Detect params directly in GBB_CONDITIONS.
3498 (find_scop_parameters): Mark, that we have finished parameter
3500 (graphite_transform_loops): Move condition detection before parameter
3502 * graphite.h (struct scop): Add SCOP_ADD_PARAMS.
3503 * testsuite/gfortran.dg/graphite/pr38459.f90: New.
3505 2008-12-09 Tobias Grosser <grosser@fim.uni-passau.de>
3507 * graphite.c (graphite_transform_loops): Always call find_transform ()
3508 in ENABLE_CHECKING. So we test these code paths, even if we do not
3511 2008-12-09 Tobias Grosser <grosser@fim.uni-passau.de>
3513 * graphite.c (print_graphite_bb): Fix printing to file != dump_file.
3514 (print_scop): Ditto.
3516 2008-12-08 Tobias Grosser <grosser@fim.uni-passau.de>
3519 Fix testsuite/gfortran.dg/graphite/id-3.f90.
3520 * graphite.c (scopdet_basic_block_info): Fix bug that found some
3521 regions more than once.
3523 2008-12-03 Sebastian Pop <sebastian.pop@amd.com>
3525 Fix testsuite/gfortran.dg/graphite/id-4.f90.
3526 * graphite.c (scan_tree_for_params): Do not compute the multiplicand
3529 2008-12-03 Sebastian Pop <sebastian.pop@amd.com>
3531 Fix testsuite/gfortran.dg/graphite/id-1.f90.
3532 * graphite.c (gmp_cst_to_tree): Pass the type in parameter.
3533 (loop_iv_stack_patch_for_consts): Update use of gmp_cst_to_tree.
3534 (max_precision_type): New.
3535 (value_clast): Removed.
3536 (clast_to_gcc_expression): Be more careful to types of expressions.
3537 Use max_precision_type and update use of gmp_cst_to_tree.
3538 (graphite_translate_clast_equation): Use max_precision_type.
3539 (graphite_create_guard_cond_expr): Do not use integer_type_node,
3540 use the type of the condition.
3541 (graphite_create_new_loop): Do not use integer_type_node, use the
3542 max_precision_type of lb and ub.
3544 2008-12-03 Sebastian Pop <sebastian.pop@amd.com>
3546 * graphite.c (build_scops_1): Initialize open_scop.exit
3549 2008-12-02 Sebastian Pop <sebastian.pop@amd.com>
3551 * testsuite/gcc.dg/graphite/pr38084.c: New.
3552 * testsuite/gfortran.dg/graphite/id-1.f90: New.
3553 * testsuite/gfortran.dg/graphite/id-2.f90: New.
3554 * testsuite/gfortran.dg/graphite/id-3.f90: New.
3555 * testsuite/gfortran.dg/graphite/id-4.f90: New.
3556 * testsuite/gfortran.dg/graphite/pr37857.f90: New.
3558 2008-12-02 Sebastian Pop <sebastian.pop@amd.com>
3559 Jan Sjodin <jan.sjodin@amd.com>
3560 Harsha Jagasia <harsha.jagasia@amd.com>
3572 * testsuite/gcc.dg/graphite/pr38073.c: New.
3573 * testsuite/gcc.dg/graphite/pr37928.c: New.
3574 * testsuite/gcc.dg/graphite/pr37883.c: New.
3575 * testsuite/gcc.dg/graphite/pr38125.c: New.
3576 * testsuite/gfortran.dg/graphite/pr38083.f90: New.
3577 * testsuite/gfortran.dg/graphite/pr37852.f90: New.
3578 * testsuite/gfortran.dg/graphite/pr37980.f90: New.
3580 * testsuite/gcc.dg/graphite/scop-18.c: Remove reduction, test for
3581 the number of detected scops. Copy exact same test for loop
3583 * testsuite/gcc.dg/graphite/block-1.c: Fix the number of expected
3584 loops to be blocked as reductions are not handled.
3585 * testsuite/gcc.dg/graphite/block-4.c: ...here. New.
3587 * tree-phinodes.c (remove_phi_nodes): New, extracted from...
3588 * tree-cfg.c (remove_phi_nodes_and_edges_for_unreachable_block):
3590 * tree-flow.h (remove_phi_nodes, canonicalize_loop_ivs): Declared.
3591 * Makefile.in (graphite.o): Depend on value-prof.h.
3592 (graphite.o-warn): Removed -Wno-error.
3593 * tree-parloops.c (canonicalize_loop_ivs): Allow reduction_list
3594 to be a NULL pointer. Call update_stmt. Return the newly created
3595 cannonical induction variable.
3597 * graphite.h (debug_rename_map): Declared. Fix some comments.
3599 * graphite.c: Reimplement the code generation from graphite to gimple.
3600 Include value-prof.h.
3601 (loop_iv_stack_get_iv): Do not return NULL for constant substitutions.
3602 (get_old_iv_from_ssa_name): Removed.
3603 (graphite_stmt_p): New.
3604 (new_graphite_bb): Test for useful statements before building a
3605 graphite statement for the basic block.
3606 (free_graphite_bb): Do not free GBB_DATA_REFS: this is a bug
3607 in free_data_ref that calls BITMAP_FREE (DR_VOPS (dr)) without
3609 (recompute_all_dominators, graphite_verify,
3610 nb_reductions_in_loop, graphite_loop_normal_form): New.
3611 (scop_record_loop): Call graphite_loop_normal_form.
3612 (build_scop_loop_nests): Iterate over all the blocks of the
3613 function instead of relying on the incomplete information from
3614 SCOP_BBS. Return the success of the operation.
3615 (find_params_in_bb): Use the data from GBB_DATA_REFS.
3616 (add_bb_domains): Removed.
3617 (build_loop_iteration_domains): Don't call add_bb_domains.
3618 Add the iteration domain only to the basic blocks that have been
3619 translated to graphite.
3620 (build_scop_conditions_1): Add constraints only if the basic
3621 block have been translated to graphite.
3622 (build_scop_data_accesses): Completely disabled until data
3623 dependence is correctly implemented.
3624 (debug_rename_elt, debug_rename_map_1, debug_rename_map): New.
3625 (remove_all_edges_1, remove_all_edges): Removed.
3626 (get_new_name_from_old_name): New.
3627 (graphite_rename_variables_in_stmt): Renamed
3628 rename_variables_in_stmt. Call get_new_name_from_old_name.
3629 Use replace_exp and update_stmt.
3630 (is_old_iv): Renamed is_iv.
3631 (expand_scalar_variables_stmt): Extra parameter for renaming map.
3632 Use replace_exp and update_stmt.
3633 (expand_scalar_variables_expr): Same. Use the map to get the
3634 new names for the renaming of induction variables and for the
3635 renaming of variables after a basic block has been copied.
3636 (expand_scalar_variables): Same.
3637 (graphite_rename_variables): Renamed rename_variables.
3638 (move_phi_nodes): Removed.
3639 (get_false_edge_from_guard_bb): New.
3640 (build_iv_mapping): Do not insert the induction variable of a
3641 loop in the renaming iv map if the basic block does not belong
3643 (register_old_new_names, graphite_copy_stmts_from_block,
3644 copy_bb_and_scalar_dependences): New.
3645 (translate_clast): Heavily reimplemented: copy basic blocks,
3646 do not move them. Finally, in call cleanup_tree_cfg in gloog.
3647 At each translation step call graphite_verify ensuring the
3648 consistency of the SSA, loops and dominators information.
3649 (collect_virtual_phis, find_vdef_for_var_in_bb,
3650 find_vdef_for_var_1, find_vdef_for_var,
3651 patch_phis_for_virtual_defs): Removed huge hack.
3652 (mark_old_loops, remove_dead_loops, skip_phi_defs,
3653 collect_scop_exit_phi_args, patch_scop_exit_phi_args,
3654 gbb_can_be_ignored, scop_remove_ignoreable_gbbs, ): Removed.
3655 (remove_sese_region, ifsese, if_region_entry, if_region_exit,
3656 if_region_get_condition_block, if_region_set_false_region,
3657 create_if_region_on_edge, move_sese_in_condition, bb_in_sese_p,
3658 sese_find_uses_to_rename_use, sese_find_uses_to_rename_bb,
3659 sese_add_exit_phis_edge, sese_add_exit_phis_var,
3660 rewrite_into_sese_closed_ssa): New.
3661 (gloog): Remove dead code. Early return if code cannot be
3662 generated. Call cleanup_tree_cfg once the scop has been code
3664 (graphite_trans_scop_block, graphite_trans_loop_block): Do not
3665 block loops with less than two loops.
3666 (graphite_apply_transformations): Remove the call to
3667 scop_remove_ignoreable_gbbs.
3668 (limit_scops): When build_scop_loop_nests fails, continue on
3669 the next scop. Fix open_scop.entry.
3670 (graphite_transform_loops): Call recompute_all_dominators: force the
3671 recomputation of correct CDI_DOMINATORS and CDI_POST_DOMINATORS.
3672 Call initialize_original_copy_tables and free_original_copy_tables
3673 to be able to copy basic blocks during code generation.
3674 When build_scop_loop_nests fails, continue on next scop.
3675 (value_clast): New union.
3676 (clast_to_gcc_expression): Fix type cast warning.
3678 2008-11-09 Sebastian Pop <sebastian.pop@amd.com>
3680 * Merge from mainline (r140838:141727).
3682 2008-11-05 Tobias Grosser <grosser@fim.uni-passau.de>
3686 * graphite.c (scan_tree_for_params): Add POINTER_PLUS_EXPR.
3688 2008-11-05 Tobias Grosser <grosser@fim.uni-passau.de>
3692 * graphite.c (scopdet_basic_block_info): Fix loops with multiple
3693 exits and conditions.
3694 * testsuite/gcc.dg/graphite/pr37943.c: New.
3696 2008-10-23 Tobias Grosser <grosser@fim.uni-passau.de>
3699 * graphite.c (gloog): Replace EXIT_BLOCK_PTR with scop exit.
3701 2008-10-23 Tobias Grosser <grosser@fim.uni-passau.de>
3703 * doc/invoke.texi: Fix spaces.
3705 2008-10-22 Sebastian Pop <sebastian.pop@amd.com>
3707 PR tree-optimization/37891
3708 Reverted last commit.
3709 * graphite.c (create_single_entry_edge): Set
3710 EDGE_IRREDUCIBLE_LOOP and BB_IRREDUCIBLE_LOOP.
3712 2008-10-21 Sebastian Pop <sebastian.pop@amd.com>
3713 Mitul Thakkar <mitul.thakkar@amd.com>
3715 * graphite.c (create_single_entry_edge): Set
3716 EDGE_IRREDUCIBLE_LOOP and BB_IRREDUCIBLE_LOOP.
3718 2008-10-16 Tobias Grosser <grosser@fim.uni-passau.de>
3720 * doc/invoke.texi: Add -fgraphite-identity.
3721 * graphite.c (graphite_apply_transformations): Check for
3722 -fgraphite-identity.
3723 * toplev.c (process_options): Add flag_graphite_identity.
3724 * tree-ssa-loop.c: Add flag_graphite_identity.
3726 2008-10-14 Sebastian Pop <sebastian.pop@amd.com>
3728 Undo changes from 2008-10-02:
3729 * tree-ssa-loop-ivopts.c (rewrite_use_nonlinear_expr): Convert
3730 operand type when copying the operand to a variable of different type.
3731 * cfgloopmanip.c (create_empty_loop_on_edge): Write exit condition
3732 with the IV name after increment.
3734 2008-10-14 Sebastian Pop <sebastian.pop@amd.com>
3735 Harsha Jagasia <harsha.jagasia@amd.com>
3737 PR tree-optimization/37828
3738 * testsuite/gcc.dg/graphite/pr37828.c: New.
3739 * graphite.c (graphite_trans_loop_block): Do not loop block
3740 single nested loops.
3742 2008-10-09 Harsha Jagasia <harsha.jagasia@amd.com>
3743 Sebastian Pop <sebastian.pop@amd.com>
3745 * graphite.c (struct rename_map_elt, new_rename_map_elt,
3746 rename_map_elt_info, eq_rename_map_elts): New.
3747 (graphite_rename_ivs_stmt): Renamed graphite_rename_variables_in_stmt.
3748 (expand_scalar_variables_expr): Change parameters.
3749 (expand_scalar_variables_stmt): Same.
3750 (expand_scalar_variables): Same.
3751 (graphite_rename_ivs): Rename graphite_rename_variables.
3752 (build_iv_mapping): New.
3753 (translate_clast): Call build_iv_mapping.
3754 * graphite.h (gbb_p): New name.
3756 2008-10-03 Harsha Jagasia <harsha.jagasia@amd.com>
3758 PR tree-optimization/37684
3759 * gcc.dg/graphite/pr37684.c: New.
3760 * graphite.c (exclude_component_ref): New.
3761 (is_simple_operand): Call exclude_component_ref.
3763 2008-10-02 Jan Sjodin <jan.sjodin@amd.com>
3764 Harsha Jagasia <harsha.jagasia@amd.com>
3766 PR tree-optimization/37485
3767 * gcc.dg/graphite/block-2.c: New
3768 * graphite.c (gmp_cst_to_tree): Moved.
3769 (iv_stack_entry_is_constant): New.
3770 (iv_stack_entry_is_iv): New.
3771 (loop_iv_stack_push): Renamed to loop_iv_stack_push_iv.
3772 (loop_iv_stack_insert_constant): New.
3773 (loop_iv_stack_pop): Use new datatpype.
3774 (loop_iv_stack_get_iv): Same.
3775 (loop_iv_stack_get_iv_from_name): Same.
3776 (loop_iv_stack_debug): Renamed to debug_loop_iv_stack.
3777 (loop_iv_stack_patch_for_consts): New.
3778 (loop_iv_stack_remove_constants): New.
3779 (graphite_create_new_loop): Use loop_iv_stack_push_iv.
3780 (translate_clast): Call loop_iv_stack_patch_for_consts and
3781 loop_iv_stack_remove_constants.
3782 (gloog): Use new datatype. Redirect construction edge to end
3783 block to avoid accidental deletion.
3784 * graphite.h (enum iv_stack_entry_kind): New. Tag for data in
3786 (union iv_stack_entry_data): New. Data in iv stack entry.
3787 (struct iv_stack_entry): New. Datatype for iv stack entries.
3789 2008-10-02 Sebastian Pop <sebastian.pop@amd.com>
3791 * tree-ssa-loop-ivopts.c (rewrite_use_nonlinear_expr): Convert
3792 operand type when copying the operand to a variable of different type.
3794 2008-10-02 Sebastian Pop <sebastian.pop@amd.com>
3796 * cfgloopmanip.c (create_empty_loop_on_edge): Write exit condition
3797 with the IV name after increment.
3799 2008-10-02 Sebastian Pop <sebastian.pop@amd.com>
3801 * Merge from mainline (r140164:140838).
3803 2008-09-10 Konrad Trifunovic <konrad.trifunovic@inria.fr>
3805 * graphite-data-ref.c: New.
3806 * graphite.c (print_scop): Also dump the dependence graph.
3807 (bb_in_scop_p, loop_in_scop_p, nb_loops_around_gb): Moved...
3808 (new_scop): Initialize SCOP_DEP_GRAPH.
3809 (build_scop_dynamic_schedules): New.
3810 (build_access_matrix_with_af): Fixed column numbering.
3811 (graphite_transform_loops): Call build_scop_dynamic_schedules.
3812 * graphite.h: Add ifndef/define guards against multiple inclusion.
3813 (struct scop): Add dep_graph field.
3814 (SCOP_DEP_GRAPH): Defined.
3815 (ref_nb_loops): Fixed and moved to other position.
3816 (bb_in_scop_p, loop_in_scop_p, nb_loops_around_gb): ... here.
3817 (nb_loops_around_loop_in_scop): New.
3818 (graphite_dump_dependence_graph): Declared.
3819 (graphite_build_rdg_all_levels): Declared.
3820 (graphite_test_dependence): Declared.
3821 * Makefile.in (graphite-data-ref.o): New target.
3823 2008-09-09 Sebastian Pop <sebastian.pop@amd.com>
3825 * Merge from mainline (139870:140164).
3827 2008-09-01 Sebastian Pop <sebastian.pop@amd.com>
3829 * Merge from mainline (138275:139870).
3830 * testsuite/gcc.dg/graphite/scop-matmult.c: XFailed as one of
3831 the commits from trunk broke the niter detection.
3833 2008-09-01 Sebastian Pop <sebastian.pop@amd.com>
3835 * graphite.c: Add more documentation. Fix formatting.
3836 (debug_loop_vec, debug_oldivs, loop_iv_stack,
3837 loop_iv_stack_debug): Moved...
3838 (schedule_to_scattering): Move before use.
3839 (dot_all_scops): Include in "#if 0" the code for system
3842 * graphite.h: (debug_loop_vec, debug_oldivs, loop_iv_stack,
3843 loop_iv_stack_debug): ...here.
3845 2008-08-29 Jan Sjodin <jan.sjodin@amd.com>
3847 * tree-phinodes.c (make_phi_node): Extern.
3848 (add_phi_node_to_bb): New.
3849 (create_phi_node): Call add_phi_node_to_bb.
3850 * tree-ssa-loop-ivopts.c (get_phi_with_result): New.
3851 (remove_statement): Handle case where stored phi was updated
3852 and is no longer the same.
3853 * graphite.c (is_parameter): New.
3855 (expand_scalar_variables_expr): New.
3856 (expand_scalar_variables_stmt): New.
3857 (expand_scalar_variables): New.
3858 (move_phi_nodes): Create new phi instead of moving old one.
3859 (translate_clast): Call expand_scalar_variables.
3860 (find_vdef_for_var_in_bb): Also scan regular definitions.
3861 (skip_phi_defs): New.
3862 (collect_scop_exit_phi_args): New.
3863 (patch_scop_exit_phi_args): New.
3864 (gloog): Patch phis after scop.
3865 * tree-flow.h: (add_phi_node_to_bb): Declared.
3866 (make_phi_node): Declared.
3868 2008-08-26 Sebastian Pop <sebastian.pop@amd.com>
3870 * graphite.c (end_scop): Split the entry of the scop when it
3871 is the header of the loop in which the scop is ending.
3872 (build_scops_1, limit_scops): Update uses of end_scop.
3874 2008-08-26 Sebastian Pop <sebastian.pop@amd.com>
3876 * graphite.c (dot_all_scops_1): Do not fail on uninitialized
3877 SCOP_ENTRY or SCOP_EXIT.
3879 2008-08-25 Sebastian Pop <sebastian.pop@amd.com>
3881 * graphite.c (get_construction_edge): Removed.
3882 (gloog): Construction edge is the scop entry edge.
3884 2008-08-25 Sebastian Pop <sebastian.pop@amd.com>
3886 * graphite.c (can_generate_for_scop): Removed.
3887 (gloog): Do not call it.
3889 2008-08-25 Sebastian Pop <sebastian.pop@amd.com>
3891 * graphite.c (new_scop): Entry of a scop is an edge.
3892 Initialize SESE region.
3893 (free_scop): Free SESE region.
3894 (build_scops_1, scopdet_bb_info): Work on edges, not on bbs.
3895 (split_difficult_bb): New, split from end_scop.
3896 (end_scop): Exit of a scop is an edge.
3897 (build_scop_bbs): Never check CDI_POST_DOMINATORS: this info is
3898 not automatically updated and thus is always wrong.
3899 * graphite.h (struct sese): New.
3902 (struct scop): New field for a SESE region. Remove entry, exit.
3903 (SCOP_ENTRY, SCOP_EXIT): Update definitions to match same
3904 semantics as before. Moved comment around.
3906 2008-08-25 Tobias Grosser <grosser@fim.uni-passau.de>
3907 Sebastian Pop <sebastian.pop@amd.com>
3909 * graphite.c (graphite_transform_loops): Always enable gloog
3910 and find_transform when ENABLE_CHECKING.
3912 2008-08-25 Sebastian Pop <sebastian.pop@amd.com>
3914 * graphite.c (graphite_transform_loops): Move pretty printer
3915 of SCOPs before doing any transform. Remove call to print_scops
3916 and dot_all_scops_1.
3918 2008-08-25 Sebastian Pop <sebastian.pop@amd.com>
3920 * graphite.c (dump_gbb_conditions): Don't try to print NULL pointers.
3921 (print_graphite_bb): Same.
3923 2008-08-25 Sebastian Pop <sebastian.pop@amd.com>
3925 * graphite.c (dot_all_scops_1): Cleanup.
3926 (move_scops): Fix comment.
3928 2008-08-25 Sebastian Pop <sebastian.pop@amd.com>
3930 * graphite.c (build_scop_bbs): Revert commit 139355:
3932 2008-08-20 Sebastian Pop <sebastian.pop@amd.com>
3933 Dwarakanath Rajagopal <dwarak.rajagopal@amd.com>
3935 * graphite.c (build_scop_bbs): Factor up code.
3937 2008-08-25 Tobias Grosser <grosser@fim.uni-passau.de>
3939 * graphite.c (gloog): Update dominator info.
3941 2008-08-25 Tobias Grosser <grosser@fim.uni-passau.de>
3943 * graphite.c (remove_cond_exprs): Do not fail on empty bbs.
3945 2008-08-24 Sebastian Pop <sebastian.pop@amd.com>
3947 * graphite.c (new_graphite_bb): Remove GBB_INDEX_TO_NUM_MAP
3949 (free_graphite_bb): Remove GBB_INDEX_TO_NUM_MAP free.
3950 (translate_clast): Correct formatting.
3951 * graphite.h (struct num_map): Removed.
3952 (struct graphite_bb): Remove num_map field.
3953 (GBB_INDEX_TO_NUM_MAP): Removed.
3955 2008-08-24 Sebastian Pop <sebastian.pop@amd.com>
3957 * graphite.c (build_access_matrix_with_af): Fix comments.
3958 (build_scop_data_accesses): Same.
3960 2008-08-24 Sebastian Pop <sebastian.pop@amd.com>
3962 * graphite.c (build_scop_data_accesses): Don't construct
3963 access matrices. Add a FIXME and an assert condition that
3964 should pass when the access matrices will be needed.
3966 2008-08-24 Sebastian Pop <sebastian.pop@amd.com>
3968 * tree-data-ref.c (stmt_simple_memref_p): Don't call
3970 * graphite.c (build_graphite_bb): Renamed new_graphite_bb.
3971 Moved close by free_graphite_bb.
3972 (free_graphite_bb): Call free_data_refs. Reset bb->aux.
3973 (new_scop): Move close by free_scop.
3974 (graphite_transform_loops): Avoid linear scan to reset bb->aux.
3976 2008-08-22 Jan Sjodin <jan.sjodin@amd.com>
3978 * cfgloopmanip.c (create_empty_if_region_on_edge): New.
3979 * graphite.c (clast_to_gcc_expression): Call gmp_cst_to_tree
3980 instead of recursive call.
3981 (graphite_translate_clast_equation): New.
3982 (graphite_create_guard_cond_expr): New.
3983 (graphite_create_new_guard): New.
3984 (get_stack_index_from_iv): Removed.
3985 (graphite_rename_ivs_stmt): Use gbb_loop_index.
3986 (get_true_edge_from_guard_bb): New.
3987 (translate_clast): Handle stmt_guard in clast.
3988 (get_construction_edge): Allow construction edge detection for
3989 a scope entry with multiple predecessors if one predecessor is
3990 the immediate dominator of scope entry.
3991 (can_generate_code_stmt): Enable code generation for clast_guard.
3992 (gloog): Use correct context loop. Removed check for post dominators.
3993 * cfgloop.h (create_empty_if_region_on_edge): Declared.
3995 2008-08-21 Sebastian Pop <sebastian.pop@amd.com>
3997 * graphite.c (remove_dead_loops): Document better which
4000 2008-08-21 Sebastian Pop <sebastian.pop@amd.com>
4002 * Makefile.in: Rename POLYLIBLIBS and POLYLIBINC to PPLLIBS
4004 (graphite.o): Also depends on pointer-set.h.
4006 2008-08-21 Sebastian Pop <sebastian.pop@amd.com>
4008 * graphite.c (scop_record_loop): Fix compile warning.
4010 2008-08-21 Harsha Jagasia <harsha.jagasia@amd.com>
4011 Sebastian Pop <sebastian.pop@amd.com>
4013 * graphite.c (scop_record_loop): DECL_NAME can be NULL.
4015 2008-08-21 Sebastian Pop <sebastian.pop@amd.com>
4017 * graphite.c (build_graphite_bb): Initialize bb->aux to
4018 point to the graphite_bb_p.
4019 (graphite_bb_from_bb): Renamed gbb_from_bb; returns the
4021 (add_bb_domains): Does not use the scop parameter.
4022 (graphite_transform_loops): Clean bb->aux at the end.
4024 2008-08-20 Dwarakanath Rajagopal <dwarak.rajagopal@amd.com>
4025 Sebastian Pop <sebastian.pop@amd.com>
4027 * testsuite/lib/target-supports.exp
4028 (check_effective_target_fgraphite): New.
4030 * testsuite/gcc.dg/graphite/graphite.exp: Early exit when
4031 check_effective_target_fgraphite returns false.
4032 Set dg-do-what-default to compile.
4033 (scan-graphite-dump-times): Removed.
4034 * testsuite/gfortran.dg/graphite/graphite.exp: Same.
4036 * testsuite/gcc.dg/graphite/scop-0.c: Do not use "dg-do compile".
4037 Use scan-tree-dump-times instead of scan-graphite-dump-times.
4038 * testsuite/gcc.dg/graphite/scop-1.c: Same.
4039 * testsuite/gcc.dg/graphite/scop-2.c: Same.
4040 * testsuite/gcc.dg/graphite/scop-3.c: Same.
4041 * testsuite/gcc.dg/graphite/scop-4.c: Same.
4042 * testsuite/gcc.dg/graphite/scop-5.c: Same.
4043 * testsuite/gcc.dg/graphite/scop-6.c: Same.
4044 * testsuite/gcc.dg/graphite/scop-7.c: Same.
4045 * testsuite/gcc.dg/graphite/scop-8.c: Same.
4046 * testsuite/gcc.dg/graphite/scop-9.c: Same.
4047 * testsuite/gcc.dg/graphite/scop-10.c: Same.
4048 * testsuite/gcc.dg/graphite/scop-11.c: Same.
4049 * testsuite/gcc.dg/graphite/scop-12.c: Same.
4050 * testsuite/gcc.dg/graphite/scop-13.c: Same.
4051 * testsuite/gcc.dg/graphite/scop-matmult.c: Same.
4052 * testsuite/gcc.dg/graphite/scop-14.c: Same.
4053 * testsuite/gcc.dg/graphite/scop-15.c: Same.
4054 * testsuite/gcc.dg/graphite/block-0.c: Same.
4055 * testsuite/gcc.dg/graphite/scop-16.c: Same.
4056 * testsuite/gcc.dg/graphite/block-1.c: Same.
4057 * testsuite/gcc.dg/graphite/scop-17.c: Same.
4058 * testsuite/gcc.dg/graphite/scop-18.c: Same.
4059 * testsuite/gfortran.dg/graphite/block-1.f90: Same.
4060 * testsuite/gfortran.dg/graphite/scop-1.f: Same.
4061 * testsuite/gfortran.dg/graphite/block-2.f: Same.
4063 2008-08-20 Sebastian Pop <sebastian.pop@amd.com>
4065 * graphite.c: Fix some XXX comments.
4066 (build_scop_dynamic_schedules): Removed.
4068 2008-08-20 Sebastian Pop <sebastian.pop@amd.com>
4070 * graphite.h (scop_max_loop_depth): Moved...
4071 * graphite.c (scop_max_loop_depth): ...here.
4072 (remove_all_edges_1): New.
4073 (remove_all_edges): Factored code.
4074 (remove_cond_exprs): Check only the last statement for
4075 a GIMPLE_COND expression.
4077 2008-08-20 Sebastian Pop <sebastian.pop@amd.com>
4079 * graphite.c (scan_tree_for_params): Early return when the
4080 expression is a chrec_dont_know. Handle case NEGATE_EXPR.
4081 (find_scop_parameters): Factor out code.
4082 (graphite_trans_bb_strip_mine): Remove dead code.
4084 2008-08-20 Sebastian Pop <sebastian.pop@amd.com>
4086 * graphite.c (clast_to_gcc_expression, graphite_create_new_loop,
4087 graphite_trans_bb_move_loop): Factor asserts.
4088 (gloog): Perform sanity checks only for ENABLE_CHECKING.
4089 Do not call calculate_dominance_info and estimate_bb_frequencies.
4091 2008-08-20 Jan Sjodin <jan.sjodin@amd.com>
4093 * graphite.c (create_loops_mapping, free_loops_mapping,
4094 create_loops_mapping_num, debug_loop_mapping_1,
4095 debug_loop_mapping, graphite_loops_mapping_max_loop_num,
4096 get_loop_mapping_for_num, graphite_loops_mapping_add_child,
4097 graphite_loops_mapping_add_child_num,
4098 graphite_loops_mapping_insert_child,
4099 graphite_loops_mapping_parent, get_loop_mapped_depth_for_num,
4100 get_loop_mapped_depth, split_loop_mapped_depth_for_num,
4101 loop_mapped_depth_split_loop, swap_loop_mapped_depth_for_num,
4102 create_num_from_index, get_num_from_index,
4103 swap_loop_mapped_depth): Removed.
4104 (new_scop): Do not initialize SCOP_LOOPS_MAPPING.
4105 (free_scop): Do not call free_loops_mapping.
4106 (graphite_get_new_iv_stack_index_from_old_iv): Renamed
4107 get_stack_index_from_iv. Use GBB_LOOPS instead of calling
4108 get_loop_mapped_depth.
4109 (graphite_trans_bb_move_loop): Do not update the loop mapping.
4110 (graphite_trans_bb_strip_mine): Same.
4111 * graphite.h (graphite_loops_mapping, graphite_loop_node): Removed.
4112 (struct scop): Remove field loops_mapping.
4114 2008-08-20 Sebastian Pop <sebastian.pop@amd.com>
4115 Dwarakanath Rajagopal <dwarak.rajagopal@amd.com>
4117 * graphite.c (scop_record_loop): Factor out one level of the
4118 condition by early return.
4119 (build_scop_loop_nests): Format following FSF coding style.
4120 (build_scop_dynamic_schedules): Factor out code.
4121 (scopdet_bb_info): Reindent. Default case should not be reachable.
4123 2008-08-20 Sebastian Pop <sebastian.pop@amd.com>
4124 Dwarakanath Rajagopal <dwarak.rajagopal@amd.com>
4126 * graphite.c (loop_affine_expr): Check for DECL_P or struct
4127 assignments that are not handled as simple operands for now.
4129 2008-08-20 Sebastian Pop <sebastian.pop@amd.com>
4130 Dwarakanath Rajagopal <dwarak.rajagopal@amd.com>
4132 * graphite.c (build_scop_bbs): Factor up code.
4134 2008-08-20 Sebastian Pop <sebastian.pop@amd.com>
4135 Dwarakanath Rajagopal <dwarak.rajagopal@amd.com>
4137 * graphite.c (stmt_simple_for_scop_p): Factor code out
4139 (enum gbb_type): New. Group all the GBB_* types under it.
4140 (is_loop_exit): Moved...
4141 (end_scop): Enable BB spliting.
4142 * cfgloop.c (is_loop_exit): ...here. Reimplemented.
4143 * cfgloop.h (is_loop_exit): Declared.
4145 2008-08-20 Sebastian Pop <sebastian.pop@amd.com>
4147 * doc/invoke.texi: Remove strides from examples containing
4148 DO loops when the strides are equal to 1.
4150 2008-08-20 Harsha Jagasia <harsha.jagasia@amd.com>
4151 Dwarakanath Rajagopal <dwarak.rajagopal@amd.com>
4153 * graphite.c (graphite_trans_scop_block): Or the result with
4154 the result from graphite_trans_loop_block.
4155 * testsuite/gcc.dg/graphite/block-1.c: New.
4156 * testsuite/gfortran.dg/graphite/block-1.f90: New.
4157 * testsuite/gfortran.dg/graphite/block-2.f: New.
4159 2008-08-20 Sebastian Pop <sebastian.pop@amd.com>
4161 * graphite.c (graphite_transform_loops): Call cloog_initialize
4164 2008-08-20 Sebastian Pop <sebastian.pop@amd.com>
4166 * tree-data-ref.c) (stmt_simple_memref_p): New.
4167 * tree-data-ref.h (stmt_simple_memref_p): Declared.
4168 * graphite.c (stmt_simple_memref_for_scop_p): Removed.
4169 (is_simple_operand): Call stmt_simple_memref_p.
4171 * testsuite/gcc.dg/graphite/scop-matmult.c: Updated for not
4172 using pointer arithmetic, as this is optimized by PRE and
4173 makes the code too difficult to analyze.
4175 * testsuite/gcc.dg/graphite/scop-18.c: Same.
4177 2008-08-20 Sebastian Pop <sebastian.pop@amd.com>
4179 * gdbinit.in (pgg): New.
4181 2008-08-15 Tobias Grosser <grosser@fim.uni-passau.de>
4183 * graphite.c (graphite_trans_loop_block): Fix warning.
4185 2008-08-15 Tobias Grosser <grosser@fim.uni-passau.de>
4187 * graphite.c (graphite_trans_loop_block): Fix my merge error.
4189 2008-08-15 Tobias Grosser <grosser@fim.uni-passau.de>
4191 * graphite.c (graphite_trans_bb_block): Remove check for
4192 flag_loop_strip_mine, flag_loop_block, flag_loop_interchange.
4193 Check if loop blocking is profitable for every loop, before applying
4195 (graphite_apply_transformations): Call graphite_trans_bb_block only,
4196 if flag_loop_block is set.
4198 2008-08-14 Sebastian Pop <sebastian.pop@amd.com>
4200 * graphite.c: Add some more documentation for the loop
4203 2008-08-14 Sebastian Pop <sebastian.pop@amd.com>
4205 * Makefile.in (tree-data-ref.o): Remove dependence on graphite.h.
4206 * graphite.c: Format on less than 80 columns.
4209 2008-08-14 Sebastian Pop <sebastian.pop@amd.com>
4211 * cfgloopmanip.c (loopify): Use update_dominators_in_loop.
4213 2008-08-14 Sebastian Pop <sebastian.pop@amd.com>
4215 * doc/invoke.texi (floop-block, floop-strip-mine,
4216 floop-interchange): Update documentation with examples.
4218 2008-08-13 Sebastian Pop <sebastian.pop@amd.com>
4220 * cfgloopmanip.c (create_empty_loop_on_edge): Don't call
4222 * graphite.c (graphite_create_new_loop): Call add_referenced_var.
4224 2008-08-13 Sebastian Pop <sebastian.pop@amd.com>
4226 * cfgloopmanip.c (create_empty_loop_on_edge): Improve documentation.
4227 Factor gcc_asserts into a single one. Use force_gimple_operand_gsi.
4228 * tree-scalar-evolution.c: Revert useless changes.
4229 * tree-phinodes.c: Same.
4232 * tree-vectorizer.h: Same.
4233 * tree-flow.h: Same.
4235 * common.opt (fgraphite): Update documentation.
4237 2008-08-12 Harsha Jagasia <harsha.jagasia@amd.com>
4239 * doc/invoke.texi (-floop-block, -floop-strip-mine,
4240 -floop-interchange): Add more text for explaining what each of these
4242 * tree-into-ssa.c (gimple_vec): Moved to...
4243 * graphite.c: Include gimple.h.
4244 (gimple_vec): Moved to...
4245 (del_loop_to_cloog_loop): Removed.
4246 (loop_affine_expr): Do not call create_data_ref when the
4247 operand is a constant.
4248 (new_scop): Use free instead of del_loop_to_cloog_loop.
4249 * Makefile.in (graphite.o): Depend on GIMPLE_H.
4250 * gimple.h (gimple_vec): ... here.
4252 2008-08-11 Tobias Grosser <grosser@fim.uni-passau.de>
4254 * graphite.c (scopdet_bb_info): Only allow loops with known number of
4256 (build_loop_iteration_domains): Fail, if latch executions unknown.
4258 2008-08-11 Tobias Grosser <grosser@fim.uni-passau.de>
4260 * graphite.c (add_conditions_to_domain): New.
4261 (build_scop_conditions_1): Call add_conditions_to_domain.
4262 (set_cloog_options): Allow to disable optimizations.
4264 2008-08-11 Tobias Grosser <grosser@fim.uni-passau.de>
4266 * graphite.c (find_params_in_bb): Look for parameters in conditions.
4267 Do not use walk_dominator_tree.
4268 (find_scop_parameters): Do not use walk_dominator_tree.
4270 2008-08-11 Tobias Grosser <grosser@fim.uni-passau.de>
4272 * graphite.c (scan_tree_for_params) Add / Subtract inequality.
4273 (idx_record_params): Adapt.
4274 * graphite.h (scop_gimple_loop_depth): New.
4276 2008-08-11 Tobias Grosser <grosser@fim.uni-passau.de>
4278 * graphite.c (build_scop_dynamic_schedules): Remove value_init.
4279 (scan_tree_for_params): Remove value_init.
4280 (build_scop_context): Remove value_init.
4281 (build_loop_iteration_domains): Remove value_init.
4282 (schedule_to_scattering): Remove value_init.
4283 (graphite_trans_bb_strip_mine): Remove value_init.
4285 2008-08-11 Tobias Grosser <grosser@fim.uni-passau.de>
4287 * gcc/graphite.c (limit_scops): New.
4288 (graphite_transform_loops): Add limit SCoPs.
4289 * gcc/testsuite/gcc.dg/graphite/scop-0.c: Update number of SCoPs.
4290 * gcc/testsuite/gcc.dg/graphite/scop-1.c: Update number of SCoPs.
4291 * gcc/testsuite/gcc.dg/graphite/scop-10.c: Update number of SCoPs.
4292 * gcc/testsuite/gcc.dg/graphite/scop-11.c: Update number of SCoPs.
4293 * gcc/testsuite/gcc.dg/graphite/scop-12.c: Update number of SCoPs.
4294 * gcc/testsuite/gcc.dg/graphite/scop-13.c: Update number of SCoPs.
4295 * gcc/testsuite/gcc.dg/graphite/scop-14.c: Update number of SCoPs.
4296 * gcc/testsuite/gcc.dg/graphite/scop-15.c: Update number of SCoPs.
4297 * gcc/testsuite/gcc.dg/graphite/scop-16.c: Update number of SCoPs.
4298 Change loop numbers.
4299 * gcc/testsuite/gcc.dg/graphite/scop-17.c: Update number of SCoPs.
4300 Change loop numbers.
4301 * gcc/testsuite/gcc.dg/graphite/scop-18.c: Update number of SCoPs.
4302 * gcc/testsuite/gcc.dg/graphite/scop-2.c: Update number of SCoPs.
4303 * gcc/testsuite/gcc.dg/graphite/scop-3.c: Update number of SCoPs.
4304 * gcc/testsuite/gcc.dg/graphite/scop-4.c: Update number of SCoPs.
4305 * gcc/testsuite/gcc.dg/graphite/scop-5.c: Update number of SCoPs.
4306 * gcc/testsuite/gcc.dg/graphite/scop-6.c: Update number of SCoPs.
4307 * gcc/testsuite/gcc.dg/graphite/scop-7.c: Update number of SCoPs.
4308 * gcc/testsuite/gcc.dg/graphite/scop-8.c: Update number of SCoPs.
4309 * gcc/testsuite/gcc.dg/graphite/scop-9.c: Update number of SCoPs.
4310 * gcc/testsuite/gcc.dg/graphite/scop-matmult.c: Update number of SCoPs.
4312 2008-08-11 Tobias Grosser <grosser@fim.uni-passau.de>
4314 * graphite.c (graphite_transform_loops): Call always find_transform.
4316 2008-08-08 Tobias Grosser <grosser@fim.uni-passau.de>
4318 * graphite.c (free_loops_mapping): New.
4319 (stmt_simple_for_scop_p): Fix typo.
4320 (stmt_simple_for_scop_p): Fix tuples functions, that
4322 (free_graphite_bb): Fix some memleaks.
4323 (free_scop): Fix some memleaks.
4324 (scopdet_bb_info): Do not forget some tmp SCoPs.
4325 (find_params_in_bb): Fix some memleaks.
4326 (clast_to_gcc_expression): Fix warning.
4328 2008-08-07 Tobias Grosser <grosser@fim.uni-passau.de>
4330 * testsuite/gcc.dg/graphite/scop-16.c: Fix for 32bit.
4331 * testsuite/gcc.dg/graphite/scop-17.c: Fix for 32bit.
4333 2008-08-04 Sebastian Pop <sebastian.pop@amd.com>
4335 * tree-ssa-loop.c (tree-ssa-loop.o): Do not include toplev.h.
4336 Move code ifdef-ed HAVE_cloog...
4337 * graphite.c: Include toplev.h.
4339 * Makefile.in (OBJS-common): Always build graphite.o.
4340 (BACKEND): Remove @GRAPHITE@.
4341 (tree-ssa-loop.o): Do not depend on TOPLEV_H.
4342 (graphite.o): Depend on TOPLEV_H.
4344 2008-08-04 Sebastian Pop <sebastian.pop@amd.com>
4346 * Makefile.in (tree-ssa-loop.o): Depend on TOPLEV_H.
4347 Remove typo left from polylib to ppl conversion.
4348 * graphite.c (graphite_transforms): Use sorry instead of fatal.
4350 2008-08-03 Sebastian Pop <sebastian.pop@amd.com>
4352 * toplev.c (process_options): Move the graphite loop optimization
4354 * tree-ssa-loop.c (graphite_transforms): ... here.
4355 When not configured with CLooG, print to dump_file that
4356 Graphite transforms were not performed.
4357 * testsuite/gcc.dg/graphite/graphite.exp (scan-graphite-dump-times):
4359 * testsuite/gcc.dg/graphite/*.c: Updated all testcases to use
4360 scan-graphite-dump-times.
4362 2008-08-03 Sebastian Pop <sebastian.pop@amd.com>
4364 * graphite.c (dot_scop, dot_all_scops): Do not call system.
4365 Do not open /tmp/scop.dot and /tmp/allscops.dot.
4367 2008-08-02 Sebastian Pop <sebastian.pop@amd.com>
4368 Jan Sjodin <jan.sjodin@amd.com>
4370 * configure: Regenerated.
4371 * omp-low.c (expand_omp_sections): Remove now unused code.
4372 * config.in (HAVE_polylib): Removed.
4373 * configure.ac (HAVE_polylib, POLYLIBLIBS, POLYLIBINC): Removed.
4374 (PPLLIBS, PPLINC): Added.
4375 * graphite.c: Replace unsigned with int wherever possible.
4376 Don't access Cloog's data structures, but use accessor functions.
4377 Clast's stmt->type is now implemented as a vtable: change the
4378 switches of stmt->type into ifs.
4379 (polylib/polylibgmp.h): Don't include.
4380 (initialize_dependence_polyhedron,
4381 initialize_data_dependence_polyhedron, is_empty_polyhedron,
4382 statement_precedes_p, test_dependence, build_rdg_all_levels,
4383 dump_dependence_graph): Removed until this code is cleaned up
4385 * Makefile.in (POLYLIBLIBS): Renamed PPLLIBS.
4386 (POLYLIBINC): Renamed PPLINC.
4388 2008-08-01 Harsha Jagasia <harsha.jagasia@amd.com>
4389 Dwarakanath Rajagopal <dwarak.rajagopal@amd.com>
4390 Jan Sjodin <jan.sjodin@amd.com>
4392 Finish the merge and tuplification of graphite.
4394 2008-07-24 Sebastian Pop <sebastian.pop@amd.com>
4395 Jan Sjodin <jan.sjodin@amd.com>
4397 Partial merge from mainline (138072:138275).
4398 * graphite.c still has to be tuplified.
4400 2008-07-29 Jan Sjodin <jan.sjodin@amd.com>
4402 * graphite.c (graphite_loops_mapping_max_loop_num): New.
4403 (create_num_from_index): New.
4404 (get_num_from_index): Also pass in the graphite BB.
4405 (free_graphite_bb): Free GBB_INDEX_TO_NUM_MAP.
4406 (build_graphite_bb): Initialize GBB_INDEX_TO_NUM_MAP.
4407 (graphite_trans_bb_strip_mine): Call create_num_from_index.
4408 (is_interchange_valid): Return false when failing.
4409 * graphite.h (struct num_map): New.
4410 (struct graphite_bb): New field num_map.
4411 (GBB_LOOPS_MAPPING): Renamed GBB_INDEX_TO_NUM_MAP.
4413 2008-07-29 Tobias Grosser <grosser@fim.uni-passau.de>
4415 * graphite.c (dump_gbb_conditions): Print also conditions like
4416 "if (a)". Remove dublicated code and use print_generic_expr ().
4417 (stmt_simple_for_scop_p): Only allow conditions we can handle
4420 2008-07-25 Jan Sjodin <jan.sjodin@amd.com>
4422 * graphite.h (struct scop): Removed new_ivs field.
4423 (SCOP_NEWIVS): Deleted.
4424 * graphite.c (new_scop, free_scop, clast_name_to_gcc,
4425 clast_to_gcc_expression, graphite_create_new_loop):
4426 Removed use of new_ivs.
4428 2008-07-25 Jan Sjodin <jan.sjodin@amd.com>
4430 * graphite.c (debug_oldivs, debug_loop_vec, create_loops_mapping,
4431 create_loops_mapping_num, debug_loop_mapping_1): New.
4432 (debug_loop_mapping): Call debug_loop_mapping_1.
4433 (get_loop_mapping_for_num,
4434 graphite_loops_mapping_add_child,
4435 graphite_loops_mapping_add_child_num,
4436 graphite_loops_mapping_insert_child,
4437 graphite_loops_mapping_parent,
4438 split_loop_mapped_depth_for_num,
4439 loop_mapped_depth_split_loop): New.
4440 (increment_loop_mapped_depths): Removed.
4441 (swap_loop_mapped_depth_for_num): Reimplemented.
4442 (new_scop): Call create_loops_mapping.
4443 (scop_record_loop): Call graphite_loops_mapping_insert_child.
4444 (translate_clast): Pass the old loop father in parameter, and pass
4445 it to get_old_iv_from_ssa_name.
4446 (remove_edges_around_useless_blocks, can_generate_code_stmt,
4447 can_generate_code, can_generate_for_scop): New.
4448 (graphite_trans_bb_block): Returns false when it fails to transform.
4449 * graphite.h (graphite_loop_node, graphite_loops_mapping): New.
4451 2008-07-25 Sebastian Pop <sebastian.pop@amd.com>
4453 Reverted all the changes related to the streamization and
4455 These changes are now tracked in the streamization branch.
4457 2008-07-25 Sebastian Pop <sebastian.pop@amd.com>
4458 Jan Sjodin <jan.sjodin@amd.com>
4460 * graphite.c (gbb_compare): Correctly constify.
4461 (gbb_can_be_ignored): Indent.
4462 (graphite_trans_scop_swap_1and2): Add legality check.
4465 2008-07-25 Sebastian Pop <sebastian.pop@amd.com>
4467 Remove fallouts from "Reverted the Condate changes".
4468 * tree.h: Remove unused decl.
4469 * testsuite/gcc.dg/tree-checker: Same.
4470 * timevar.def: Remove counter.
4472 2008-07-24 Sebastian Pop <sebastian.pop@amd.com>
4474 * Merge from mainline (135673:138072).
4476 Reverted the MIRO changes (from 2008-04-05) that are now
4477 tracked in the miro branch.
4478 * tree-bounds.c: Removed.
4479 * tree-bounds.h: Removed.
4481 Reverted the Condate changes (from 2006-07-04, 2007-03-20) that
4482 are now tracked in the condate branch.
4483 * tree-check.c: Removed.
4484 * tree-match.c: Removed.
4485 * condate.y: Removed.
4487 2008-07-24 Dwarakanath Rajagopal <dwarak.rajagopal@amd.com>
4489 * common.opt: New user flag -floop-block, -floop-strip-mine
4490 and -floop-interchange.
4491 * toplev.c (process_options): Enable -fgraphite pass if any one of the
4492 graphite loop optimization flags is turned on.
4493 * graphite.c (graphite_apply_transformations): Add flag_loop_block,
4494 flag_loop_strip_mine and flag_loop_interchange checks before
4496 * doc/invoke.texi: Remove -fgraphite and add -floop-block,
4497 -floop-strip-mine and -floop-interchange.
4498 * testsuite/gcc.dg/graphite/block-0.c: Add -floop-block and remove
4500 * testsuite/gcc.dg/graphite/scop-16.c: Ditto.
4501 * testsuite/gcc.dg/graphite/scop-17.c: Ditto.
4502 * testsuite/gcc.dg/graphite/scop-18.c: Ditto.
4504 2008-07-23 Jan Sjodin <jan.sjodin@amd.com>
4505 Sebastian Pop <sebastian.pop@amd.com>
4507 * cfgloopmanip.c (update_dominators_in_loop): Make it static.
4508 (create_empty_loop_on_edge): More fixes.
4509 * tree-phinodes.c (resize_phi_node): Extern.
4510 (unlink_phi_node, move_phi_node): New split from remove_phi_node.
4511 * cfghooks.c (update_dominator_information): New split from
4513 * tree-vectorizer.c (rename_variables_in_bb): Extern.
4514 * tree-dfa.c (collect_dfa_stats): Start walking the CFG on the
4515 successor of the function entry block.
4517 * graphite.c: Include pointer-set.h.
4518 (debug_loop_mapping, increment_loop_mapped_depths,
4519 get_loop_mapped_depth_for_num, get_loop_mapped_depth,
4520 set_loop_mapped_depth_for_num, set_loop_mapped_depth,
4521 swap_loop_mapped_depth_for_num, get_num_from_index,
4522 swap_loop_mapped_depth, loop_iv_stack_debug,
4523 loop_iv_stack_push, loop_iv_stack_pop, loop_iv_stack_get_iv,
4524 loop_iv_stack_get_iv_from_name, loop_iv_stack_debug,
4525 get_old_iv_from_ssa_name): New.
4526 (new_scop): Initialize SCOP_LOOPS_MAPPING.
4527 (free_scop): Free SCOP_LOOPS_MAPPING.
4528 (scop_record_loop): Record old ivs.
4529 (create_var_name): Removed.
4530 (initialize_cloog_names): Allocate double space in case strip mine
4531 applies to all loops once.
4532 (clast_name_to_gcc): Look up in the map ivstack passed in parameter.
4533 (clast_to_gcc_expression): Same. Implement more clast to gimple
4535 (graphite_create_new_loop): Pass in ivstack.
4536 (remove_all_edges): Pass in the construction_edge.
4537 (graphite_remove_iv): Removed.
4538 (graphite_rename_ivs, graphite_rename_ivs_stmt,
4539 remove_cond_exprs): Rewritten.
4540 (move_phi_nodes): New.
4541 (disconnect_virtual_phi_nodes, disconnect_cond_expr): Removed.
4542 (translate_clast): Pass in ivstack. Rewrite some cases.
4543 (set_cloog_options, debug_clast_stmt): New.
4544 (find_transform): Use set_cloog_options.
4545 (outermost_loop_layer): Removed.
4546 (get_construction_edge, collect_virtual_phis, find_vdef_for_var_in_bb,
4547 find_vdef_for_var_1, find_vdef_for_var, patch_phis_for_virtual_defs,
4548 mark_old_loops, remove_dead_loops): New.
4550 (graphite_trans_bb_move_loop): Call swap_loop_mapped_depth.
4551 (const_column_index, get_first_matching_sign_row_index,
4552 get_lower_bound_row, get_upper_bound_row, get_lower_bound,
4553 get_upper_bound): New.
4554 (graphite_trans_bb_strip_mine): Also update the iv map.
4556 * graphite.h (graphite_loops_mapping, GBB_LOOPS_MAPPING): New.
4557 (struct name_tree): Add a loop field.
4558 (struct scop): Add a graphite_loops_mapping field.
4559 (SCOP_LOOPS_MAPPING): New.
4560 (debug_clast_stmt): Declare.
4561 * lambda.h (find_induction_var_from_exit_cond): Declare.
4562 (lambda-code.c): (find_induction_var_from_exit_cond): Extern.
4563 * cfgloop.h (update_dominators_in_loop): Removed declaration.
4564 (create_empty_loop_on_edge): Updated.
4565 * tree-flow.h (remove_bb, resize_phi_node, move_phi_node,
4566 rename_variables_in_bb): Declare.
4567 * tree-cfg.c (remove_bb): Extern.
4569 * testsuite/gcc.dg/graphite/block-0.c: New.
4571 2008-07-21 Dwarakanath Rajagopal <dwarak.rajagopal@amd.com>
4572 Sebastian Pop <sebastian.pop@amd.com>
4574 * graphite.c (strip_mine_profitable_p): New.
4575 (graphite_trans_bb_block): Disable strip mining if not profitable.
4577 * testsuite/gcc.dg/graphite/scop-18.c: New.
4578 * testsuite/gcc.dg/graphite/scop-17.c: Fixed.
4579 * testsuite/gcc.dg/graphite/scop-16.c: Fixed.
4581 2008-07-17 Harsha Jagasia <harsha.jagasia@amd.com>
4582 Jan Sjodin <jan.sjodin@amd.com>
4583 Sebastian Pop <sebastian.pop@amd.com>
4585 * graphite.c (is_interchange_valid): New.
4586 (graphite_trans_bb_block): Check loop nest of basic block for legality
4589 * graphite.h (gbb_inner_most_loop_index, outer_most_loop_1,
4590 outer_most_loop, gbb_outer_most_loop_index): New.
4592 * tree-loop-linear.c (perfect_loop_nest_depth): Remove static.
4593 * tree-flow.h (perfect_loop_nest_depth): Declare as extern.
4594 * testsuite/gcc.dg/graphite/scop-16.c: New.
4595 * testsuite/gcc.dg/graphite/scop-17.c: New.
4597 2008-07-11 Tobias Grosser <grosser@fim.uni-passau.de>
4599 * graphite.c (scop_remove_ignoreable_gbbs): Also update bitmap.
4600 (graphite_trans_scop_block): Ignore SCoPs without bbs.
4602 2008-07-11 Tobias Grosser <grosser@fim.uni-passau.de>
4604 * graphite.c (new_scop): Initialize SCOP_EXIT.
4605 (scopdet_info): Add.
4606 (scopdet_bb_info): Rename from is_bb_addable. Cleanup, bugfixes.
4607 (build_scops_1): Cleanup, bugfixes.
4608 (build_scops): Cleanup.
4610 * testsuite/gcc.dg/graphite/scop-matmult.c: Remove duplicated code.
4611 * testsuite/gcc.dg/graphite/scop-15.c: Add SCoP numbers.
4613 2008-07-10 Harsha Jagasia <harsha.jagasia@amd.com>
4615 * testsuite/gfortran.dg/graphite/scop-1.f: Update to reduced test case.
4617 * testsuite/gfortran.dg/graphite/graphite.exp: Use
4618 DEFAULT_GRAPHITE_FLAGS.
4620 * testsuite/gcc.dg/graphite/scop-15.c: Update to reduced test case.
4622 2008-07-10 Harsha Jagasia <harsha.jagasia@amd.com>
4624 * graphite.c (scan_tree_for_params): Do not assert any more if
4625 MULT_EXPR parameter is negative.
4627 * testsuite/gfortran.dg/graphite/scop-1.f: New.
4629 * testsuite/gfortran.dg/graphite/graphite.exp: New.
4631 * testsuite/gcc.dg/graphite/scop-15.c: New.
4633 2008-07-10 Harsha Jagasia <harsha.jagasia@amd.com>
4635 * graphite.c (is_bb_addable): Fix segfault in spec gzip and reformat.
4637 2008-07-10 Tobias Grosser <grosser@fim.uni-passau.de>
4639 * graphite.c (graphite_trans_bb_swap_loops): Rename from
4640 graphite_swap_loops.
4641 (graphite_trans_bb_move_loop): New.
4642 (graphite_trans_bb_strip_mine): Rename from graphite_strip_mine_loop.
4643 (graphite_trans_bb_block): New.
4644 (graphite_trans_loop_block): New.
4645 (graphite_trans_scop_swap_1and2): Rename from
4646 graphite_trans_swap_1and2.
4647 (graphite_trans_scop_strip): Rename from graphite_trans_strip.
4648 (graphite_trans_scop_block): New.
4649 (graphite_apply_transformations): Rename from
4650 graphite_transformations.
4652 * testsuite/gcc.dg/graphite/scop-matmult.c: New.
4654 2008-07-10 Tobias Grosser <grosser@fim.uni-passau.de>
4656 * graphite.c (gbb_compare): New.
4657 (graphite_sort_gbbs): New.
4658 (gbb_can_be_ignored): New.
4659 (scop_remove_ignoreable_gbbs): New.
4660 (graphite_transformations): Cleanup and add
4661 scop_remove_ignoreable_gbbs.
4662 * lambda.h (lambda_vector_compare): New.
4664 2008-07-09 Tobias Grosser <grosser@fim.uni-passau.de>
4666 * graphite.c (print_graphite_bb): Correct printing of static schedule.
4667 (graphite_swap_loops): int -> unsigned
4668 (graphite_strip_mine_loop): int -> unsigned, Fix SCHEDULE
4669 (graphite_transformations): New.
4670 (graphite_transform_loops): Move to graphite_transformations.
4671 * graphite.h (gbb_nb_loops): Return unsigned.
4673 2008-07-04 Tobias Grosser <grosser@fim.uni-passau.de>
4675 * graphite.c (scan_tree_for_params): Fix insertion of parameters into
4676 the domain matrix. This makes scop-0.c work again.
4678 2008-06-20 Richard Guenther <rguenther@suse.de>
4680 * graphite.h: Adjust copyright to GPLv3.
4681 * graphite.c: Likewise.
4682 (stmt_simple_memref_for_scop_p): Split out from ...
4683 (stmt_simple_for_scop_p): ... here. Fix handling of calls
4685 (get_bb_type): Optimize.
4687 (is_bb_addable): Fix memleak, replace is_pred call with
4689 (build_scops): Use current_loops.
4690 (param_index): Fix memleak.
4692 2008-06-20 Konrad Trifunovic <konrad.trifunovic@inria.fr>
4694 * graphite.c: Fix formatting.
4696 2008-06-19 Konrad Trifunovic <konrad.trifunovic@inria.fr>
4698 * graphite.c (new_scop): Memory allocation for SCOP_{NEWIVS, OLDIVS}.
4699 (free_scop): Memory deallocation for SCOP_NEWIVS, SCOP_OLDIVS.
4700 (create_var_name, save_var_name): Newly defined functions.
4701 (initialize_cloog_names): Part of the code factored out to
4703 (clast_to_gcc_expression): Now handles the case of clast_red_sum
4704 in clast_reduction statement.
4705 (graphite_create_new_loop): Now takes a new parameter
4707 (translate_clast): Now also takes the context_loop and bb_exit
4708 parameters. Rewritten the code so that it creates a gimple code
4709 inside the given context.
4710 (outermost_loop_layer, graphite_remove_iv, graphite_rename_ivs,
4711 remove_cond_expr, disconnect_cond_expr,
4712 disconnect_virtual_phi_nodes): Newly defined functions.
4713 * graphite.h (struct scop): added old_ivs vector.
4714 SCOP_OLDIVS: New macro.
4716 2008-06-19 Sebastian Pop <sebastian.pop@amd.com>
4718 * cfgloopmanip.c: Add missing function comments, fix formatting.
4720 2008-06-18 Konrad Trifunovic <konrad.trifunovic@inria.fr>
4722 * cfgloopmanip.c (update_dominators_in_loop): Defined.
4723 (create_empty_loop_on_edge): Defined.
4724 * tree-parloops.c (canonicalize_loop_ivs): Returns tree
4726 * cfgloop.h (create_empty_loop_on_edge): Declared as extern.
4727 (update_dominators_in_loop): Declared as extern
4728 * tree-flow.h (canonicalize_loop_ivs): Declared as extern.
4730 2008-06-16 Tobias Grosser <grosser@fim.uni-passau.de>
4732 * graphite.c (print_graphite_bb): Allow changing number of loops
4734 (initialize_cloog_names): Allow changing number of loops.
4735 (build_cloog_prog): Simplify.
4736 (find_transform): Enable cloog option --strides.
4737 (graphite_swap_loops): New.
4738 (graphite_strip_mine_loop): New.
4739 (graphite_trans_swap_1and2): New.
4740 (graphite_trans_strip): New.
4741 (graphite_transform_loops): Add graphite_trans_strip.
4742 * graphite.h (scop_max_loop_depth): New.
4744 2008-06-15 Tobias Grosser <grosser@fim.uni-passau.de>
4746 * graphite.c (build_scop_iteration_domain): Remove forgotten
4747 line. (Fixes compile)
4749 2008-06-15 Tobias Grosser <grosser@fim.uni-passau.de>
4751 * graphite.c (print_graphite_bb): Add output of GBB_LOOPS.
4752 (build_graphite_bb): Add GBB_LOOPS and GBB_DOMAIN and reorder.
4753 (build_bb_loops): New.
4754 (graphite_transform_loops): Add build_bb_loops.
4755 (schedule_to_scattering): Use gbb_nb_loops to support changing loop
4757 * graphite.h (graphite_bb): Add loops.
4758 (gbb_nb_loops): New.
4759 (gbb_loop_at_index): New.
4760 (gbb_loop_index): New.
4761 (nb_params_in_scop): Renamed to scop_nb_params. Updated all functions
4762 using nb_params_in_scop.
4764 2008-06-14 Tobias Grosser <grosser@fim.uni-passau.de>
4766 * graphite.c (print_graphite_bb): Adapt to minimized schedule.
4767 (build_scop_canonical_schedules): Build minimized schedule.
4768 (schedule_to_scattering): Adapt to minimized schedule.
4769 * graphite.h (graphite_bb): Add/Update descriptions.
4771 2008-06-14 Adrien Eliche <aeliche@isty.uvsq.fr>
4772 Tobias Grosser <grosser@fim.uni-passau.de>
4774 * graphite.c (print_graphite_bb): Add condition printing.
4776 (dump_gbb_conditions): New.
4777 (build_scop_conditions_1): New.
4778 (build_scop_conditions): New.
4779 * graphite.h (graphite_bb): Add conditions.
4781 2008-06-14 Tobias Grosser <grosser@fim.uni-passau.de>
4783 * graphite.c (print_graphite_bb):
4784 (free_graphite_bb): New.
4785 (free_scop): Free bbs.
4786 (get_bb_type): Free doms.
4787 (build_scop_context): Free context matrix.
4788 (build_loop_iteration_domains): Remove unused code.
4789 (build_cloog_prog): Free scattering function and blocklist.
4790 (find_transform): Free options.
4792 2008-06-13 Tobias Grosser <grosser@fim.uni-passau.de>
4794 * graphite.c (loop_body_to_cloog_stmts): Rename to add_bb_domains.
4795 Remove unnecessery cloog data structures. Make a copy of the domain
4796 (setup_cloog_loop): Rename to build_loop_iteration_domains. Remove
4797 unnecessary cloog data structures. Fix memory leaks. Remove insert
4798 into SCOP_LOOP2CLOOG_LOOP as the inserted CloogLoops will never be
4800 (build_scop_iteration_domain): Remove unnecessary cloog
4801 data structures. Fix memory leaks.
4802 (graphite_transform_loops): Disable build_scop_dynamic_schedules as it
4803 uses SCOP_LOOP2CLOOG_LOOP, that is at the moment not working.
4805 2008-06-12 Tobias Grosser <grosser@fim.uni-passau.de>
4807 * graphite.c (find_scop_params): Remove initialize_cloog_names.
4809 2008-06-12 Tobias Grosser <grosser@fim.uni-passau.de>
4811 * graphite.c (end_scop): Style fix.
4812 (schedule_to_scattering): Style and comment fix.
4814 2008-06-12 Tobias Grosser <grosser@fim.uni-passau.de>
4815 * graphite.c (print_graphite_bb): Fix definiton of
4816 schedule_to_scattering.
4817 (initialize_cloog_names): Change nb_scattdims to max loop
4819 (schedule_to_scattering): Take parameter for number of scattering
4821 (build_cloog_prog): Only build as much scattering dimensions as
4824 2008-06-12 Tobias Grosser <grosser@fim.uni-passau.de>
4826 * graphite.c (end_scop): Disable bb splitting. Fixes SIGSEGV
4827 in polyhedron/aermod.f90.
4829 2008-06-11 Tobias Grosser <grosser@fim.uni-passau.de>
4830 Dwarak Rajagopal <dwarak.rajagopal@amd.com>
4831 Harsha Jagasia <harsha.jagasia@amd.com>
4833 * graphite.c (is_bb_addable): Fix segfault.
4835 2008-06-10 Tobias Grosser <grosser@fim.uni-passau.de>
4837 * graphite.c (is_bb_addable): Fix memory leak, handling of loops
4838 with multiple exits and conditional handling in edge cases.
4839 (is_loop_exit): Fix memory leak. (Forgotten in last commit)
4841 * testsuite/gcc.dg/graphite/scop-14.c: New.
4843 2008-06-06 Tobias Grosser <grosser@fim.uni-passau.de>
4844 Adrien Eliche <aeliche@isty.uvsq.fr>
4846 * graphite.c (is_bb_addable): Add more comments and enhance
4847 readablity of the source code. Fix memory leak.
4848 (is_loop_exit): Fix memory leak.
4850 2008-06-05 Tobias Grosser <grosser@fim.uni-passau.de>
4852 * graphite.c (first_loop_in_scop): Deleted.
4853 (setup_cloog_loop): Only walk the loop chain for inner loops.
4854 (build_scop_iteration_domain): Execute setup_cloog_loop for
4855 all loops in the first layer.
4857 2008-06-05 Tobias Grosser <grosser@fim.uni-passau.de>
4859 * graphite.c (scan_tree_for_params): Change the way params are
4860 added to be indepenent of the number of loops.
4861 (setup_cloog_loop): Revert to short matrix format. Fix parameter
4863 (build_cloog_prog): Revert to short matrix format.
4865 2008-06-05 Sebastian Pop <sebastian.pop@amd.com>
4866 Dwarak Rajagopal <dwarak.rajagopal@amd.com>
4868 * tree-loop-fusion.c (fuse_loops): Fix uninitialized variable
4871 2008-06-05 Sebastian Pop <sebastian.pop@amd.com>
4873 * graphite.c (nb_data_refs_in_scop): New.
4874 (graphite_transform_loops): Print more stats: number of
4875 loops, basic blocks and data references per scop.
4877 2008-06-04 Sebastian Pop <sebastian.pop@amd.com>
4878 Jan Sjodin <jan.sjodin@amd.com>
4880 * graphite.c (loop_affine_expr, idx_record_params,
4881 find_scop_parameters, setup_cloog_loop): Use instantiate_scev
4882 instead of instantiate_parameters.
4884 2008-06-04 Tobias Grosser <grosser@fim.uni-passau.de>
4886 * graphite.c (schedule_to_scattering): Fix scattering dimensions,
4887 add support for parameters, add STATIC_SCHEDULE at the right places,
4890 2008-06-04 Tobias Grosser <grosser@fim.uni-passau.de>
4892 * graphite.c (build_scop_loop_nests): Only add the loops, that
4893 are contained completely in the SCoP.
4894 (build_cloog_prog): Disable scattering, until schedule_to_scattering
4895 and the domains are fixed.
4896 (build_scop_canonical_schedules): Add support for bbs not contained
4899 2008-06-04 Tobias Grosser <grosser@fim.uni-passau.de>
4901 * graphite.h (scop_contains_loop): Update comments to match
4902 the actual behavior.
4903 (scop_contains_loop): New.
4904 * graphite.c (schedule_to_scattering): Use scop_contains_loop.
4906 2008-06-04 Sebastian Pop <sebastian.pop@amd.com>
4908 * graphite.c (get_bb_type): On function body, i.e. loop_0,
4909 don't mark blocks as GBB_LOOP_SING_EXIT_HEADER, mark them
4912 2008-06-04 Sebastian Pop <sebastian.pop@amd.com>
4913 Tobias Grosser <grosser@fim.uni-passau.de>
4915 * graphite.c (graphite_transform_loops): Early return when
4916 there are no loops in the function.
4918 2008-05-31 Sebastian Pop <sebastian.pop@amd.com>
4919 Jan Sjodin <jan.sjodin@amd.com>
4921 * graphite.c (scan_tree_for_params, setup_cloog_loop): Compute the
4922 offset of the last loop.
4923 (setup_cloog_loop): Copy the entire outer constraint matrix.
4925 2008-05-31 Sebastian Pop <sebastian.pop@amd.com>
4926 Jan Sjodin <jan.sjodin@amd.com>
4928 * graphite.c (stmt_in_scop_p, function_parameter_p,
4929 invariant_in_scop_p): Removed.
4930 (scan_tree_for_params): Can be used with no constraint
4931 matrix for gathering parameters.
4932 (idx_record_params): Don't use idx_record_param, instead use
4933 scan_tree_for_params.
4934 (find_scop_parameters): Same.
4935 (setup_cloog_loop, build_scop_iteration_domain, build_cloog_prog):
4936 Fix the size of loop domains.
4937 (schedule_to_scattering): Exit when the outer loop is not in scop.
4938 (find_transform): Enable build_cloog_prog.
4940 2008-05-31 Sebastian Pop <sebastian.pop@amd.com>
4941 Jan Sjodin <jan.sjodin@amd.com>
4943 * graphite.c (schedule_to_scattering): Make scattering domains
4944 uniformly of the same size, as required by CLooG 0.14.0 and before.
4946 2008-05-31 Sebastian Pop <sebastian.pop@amd.com>
4947 Jan Sjodin <jan.sjodin@amd.com>
4949 * graphite.c (schedule_to_scattering): Rewrite, correct the
4950 translation of the scheduling function to scattering.
4951 (build_cloog_prog): Call schedule_to_scattering only once.
4952 * graphite.h (scop_loop_index): Do not fail for loops not
4953 in the scop: return -1.
4955 2008-05-30 Tobias Grosser <grosser@fim.uni-passau.de>
4957 * graphite.c (build_graphite_bb): Initialize GBB_DOMAIN.
4958 (loop_body_to_cloog_stmts): Export GBB_DOMAIN.
4959 (setup_cloog_loop): Export GBB_DOMAIN.
4960 (build_cloog_prog): New. Create new CLOOG_PROG, which should be
4961 able to rebuild the original control flow.
4962 * graphite.h (graphite_bb): Add domain field and access macro.
4965 2008-05-30 Sebastian Pop <sebastian.pop@amd.com>
4967 * graphite.c (debug_gbb): New.
4968 (print_scop, build_graphite_bb): Use SCOP_BBS.
4969 (build_scop_bbs): Reimplemented.
4970 (dfs_bb_in_scop_p): Removed.
4971 (build_scop_loop_nests): Reorder loops inserted in
4972 SCOP_LOOP_NEST: outer loops should come first.
4973 (build_scop_canonical_schedules): Reinitialize at zero
4974 the components of the SCOP_STATIC_SCHEDULE for the loops
4975 that have already been parsed.
4977 * graphite.h (debug_gbb): Declared.
4979 2008-05-30 Sebastian Pop <sebastian.pop@amd.com>
4980 Jan Sjodin <jan.sjodin@amd.com>
4982 * graphite.c (create_empty_loop): Renamed graphite_create_new_loop.
4983 (graphite_loop_to_gcc_loop): Removed.
4984 (remove_all_edges): New.
4985 (graphite_stmt_to_gcc_stmt): Renamed translate_clast.
4986 (gloog): Remove useless code.
4988 2008-05-29 Tobias Grosser <grosser@fim.uni-passau.de>
4990 * graphite.c (get_bb_type): Reworked. We distinguish between
4991 loops with one or multiple exits.
4992 (is_loop_exit): New.
4994 (is_bb_addable): Rework condition handling, now support for case
4995 case statements and loops with multiple exits.
4997 * testsuite/gcc.dg/graphite/scop-11.c: New.
4998 * testsuite/gcc.dg/graphite/scop-12.c: New.
4999 * testsuite/gcc.dg/graphite/scop-13.c: New.
5001 2008-05-29 Tobias Grosser <grosser@fim.uni-passau.de>
5003 * graphite.c (dot_all_scops_1): Fix some colors. Reuse colors, if
5004 we have too many colors.
5006 2008-05-22 Sandeep Maram <smaram_b04@iiita.ac.in>
5008 * doc/invoke.texi (-ftree-loop-fusion): Document.
5009 * tree-pass.h (pass_loop_fusion): Declared.
5010 * tree-loop-fusion.c: New.
5011 * timevar.def (TV_TREE_LOOP_FUSION): Declared.
5012 * tree-data-ref.c (find_data_references_in_loop): Make extern.
5013 * tree-data-ref.h (find_data_references_in_loop): Declared.
5014 * common.opt (ftree-loop-fusion): Declared.
5015 * Makefile.in (tree-loop-fusion.o): Added rule and to OBJS-common.
5017 2008-05-21 Sebastian Pop <sebastian.pop@amd.com>
5019 * graphite.c (build_access_matrix): Fix typo from the merge.
5021 2008-05-20 Sebastian Pop <sebastian.pop@amd.com>
5023 * Merge from mainline (130800:135673).
5025 2008-05-07 Sebastian Pop <sebastian.pop@amd.com>
5027 * graphite.c (end_scop): The exit of the scop is not part of the scop.
5028 Update dominators after splitting.
5030 2008-05-07 Sebastian Pop <sebastian.pop@amd.com>
5032 * graphite.c (is_bb_addable): Return the harmful statement.
5033 Factor up some code.
5034 (end_scop): New. Splits end of scope bbs on a harmful statement.
5035 (build_scops_1): Call end_scop.
5037 2008-05-07 Sebastian Pop <sebastian.pop@amd.com>
5039 * graphite.c: (succs_at_same_depth, end_scop, all_preds_visited_p,
5040 all_succs_visited_p, start_new_scop_for_each_succ, start_new_scop,
5041 add_dominators_to_open_scops, stop_last_open_scop, scop_end_loop,
5042 build_scops_1): Removed.
5043 (build_scops_2): Renamed build_scops_1.
5045 2008-05-06 Sebastian Pop <sebastian.pop@amd.com>
5047 * graphite.c: Fix formatting.
5049 2008-05-06 Tobias Grosser <grosser@fim.uni-passau.de>
5051 * graphite.c (get_bb_type): New.
5053 (build_scops_2): New.
5054 (is_bb_addable): New.
5055 (build_scops): Switch the scop detection.
5056 (build_scop_bbs): Add entry bb to scop.
5057 * graphite.h (struct scop): Update comment.
5059 2008-05-06 Tobias Grosser <grosser@fim.uni-passau.de>
5061 * graphite.c (dot_all_scops_1): Fix some incorrect colors and add
5064 2008-05-06 Tobias Grosser <grosser@fim.uni-passau.de>
5066 * testsuite/gcc.dg/graphite/scop-1.c: Update.
5067 * testsuite/gcc.dg/graphite/scop-2.c: Update.
5068 * testsuite/gcc.dg/graphite/scop-4.c: Update.
5069 * testsuite/gcc.dg/graphite/scop-5.c: Add.
5070 * testsuite/gcc.dg/graphite/scop-6.c: Add.
5072 2008-05-06 Sebastian Pop <sebastian.pop@amd.com>
5074 * testsuite/gcc.dg/graphite/scop-0.c: Add.
5075 * testsuite/gcc.dg/graphite/scop-7.c: Add.
5076 * testsuite/gcc.dg/graphite/scop-8.c: Add.
5077 * testsuite/gcc.dg/graphite/scop-9.c: Add.
5078 * testsuite/gcc.dg/graphite/scop-10.c: Add.
5080 2008-05-06 Tobias Grosser <grosser@fim.uni-passau.de>
5082 * graphite.c (scop_affine_expr): Renamed to loop_affine_expr.
5083 Check affine expressions depending on the outermost loop
5085 (stmt_simple_for_scop_p): Same.
5086 (harmfule_stmt_in_scop): Same.
5088 2008-04-28 Tobias Grosser <grosser@fim.uni-passau.de>
5090 * graphite.c (dot_all_scops): Remove incorrect difficult bb coloring,
5091 mark entry and exit, that are not part of the SCoP and update HTML
5094 2008-04-25 Sebastian Pop <sebastian.pop@amd.com>
5096 * graphite.c (basic_block_simple_for_scop_p): Renamed
5098 (save_scop, preds_at_same_depth, test_for_scop_bound): Removed.
5099 (add_dominators_to_open_scops, build_scops_1): Reimplemented.
5100 (all_preds_visited_p, all_succs_visited_p,
5101 start_new_scop_for_each_succ, start_new_scop, stop_last_open_scop,
5102 scop_end_loop): New.
5103 (build_scops): Do not use dfs_enumerate_from.
5105 * testsuite/gcc.dg/graphite/scop-{1,2,4}.c: Updated.
5107 2008-04-23 Sebastian Pop <sebastian.pop@amd.com>
5109 * graphite.c: Add comments to functions that are missing a
5111 (graphite_create_iv): Removed. Merged in graphite_loop_to_gcc_loop.
5113 2008-04-23 Sebastian Pop <sebastian.pop@amd.com>
5115 * graphite.c (nb_params_in_scop): Moved...
5116 (graphite_bb_from_bb, loop_body_to_cloog_stmts): New.
5117 (setup_cloog_loop): Call loop_body_to_cloog_stmts.
5118 (clast_to_gcc_expression): Reduce column size to less than 80.
5119 (graphite_create_iv): Return the new name of the IV.
5120 (find_transform): Set options->esp and options->cpp.
5121 (gloog): Comment out the invalidation of the old loop code.
5122 (initialize_dependence_polyhedron): Replace scop_nb_params with
5125 * graphite.h (nb_params_in_scop): ... here.
5126 (scop_nb_params): Removed.
5127 (loop_domain_dim): Return something even when the loop was not
5128 found in the hash table: avoid ICEing on all the graphite.exp
5131 2008-04-14 Konrad Trifunovic <konrad.trifunovic@inria.fr>
5133 * tree-chrec.c (for_each_scev_op): SCEV can have 3 operands.
5135 * graphite.c (build_scop_dynamic_schedules): Schedule is built
5136 according to nesting level.
5137 (find_scop_parameters): Call instantiate_parameters.
5138 (scan_tree_for_params): Extend it to handle general affine bounds.
5139 Inner loop bound can depend on outer loop induction variable.
5140 (setup_cloog_loop): tmp variable is allocated on stack. Call
5141 instantiate_parameters with respect to outermost_loop_in_scop.
5142 (loop_domain_dim, ref_nb_loops, loop_iteration_vector_dim): moved to
5144 (create_empty_loop): Function loopify should be given edge
5145 probability, instead of edge frequency. Dominance relation from
5146 switch_bb to loop_header.
5147 (clast_to_gcc_expression): Added handling of clast_reduction node.
5148 (gloog): New functionality for removing old loop.
5149 (test_dependence): Factored out from build_rdg_all_levels.
5150 (build_rdg_all_levels): Dependence testing factored out to
5151 test_dependence function.
5153 * graphite.h (struct graphite_bb): Extended with dynamic_schedule.
5154 (loop_domain_dim, ref_nb_loops, loop_iteration_vector_dim): Moved
5157 2008-04-07 Sebastian Pop <sebastian.pop@amd.com>
5159 * graphite.c (free_scop, param_index, initialize_cloog_names,
5160 nb_params_in_scop): Use name_tree map instead of just a tree
5161 for keeping track of the variable name associated to that tree.
5162 (create_empty_loop, gmp_cst_to_tree, clast_name_to_gcc,
5163 clast_to_gcc_expression, graphite_create_iv,
5164 graphite_loop_to_gcc_loop, graphite_cond_to_gcc_cond,
5165 graphite_stmt_to_gcc_stmt): New.
5166 (gloog): Call these.
5167 * graphite.h (struct name_tree): New.
5168 (struct scop): Use name_tree instead of tree for params.
5169 Store a vector of name_tree for new_ivs.
5171 (scop_nb_params): Use name_tree instead of tree.
5173 2008-04-05 Alexander Lamaison <awl03@doc.ic.ac.uk>
5174 Sebastian Pop <sebastian.pop@amd.com>
5176 * tree-bounds.c: New.
5177 * tree-bounds.h: New.
5178 * tree-pass.h: Declare pass_bounds_early and pass_bounds_late.
5179 * passes.c: Schedule pass_bounds_early, pass_bounds_late.
5180 * builtins.c (expand_builtin_alloca): Add flag_bounds as for
5184 * c-cppbuiltin.c: Same.
5188 * tree-outof-ssa.c: Same.
5190 * Makefile.in: Same.
5192 2008-03-15 Antoniu Pop <antoniu.pop@gmail.com>
5193 Sebastian Pop <sebastian.pop@amd.com>
5195 * tree-loop-distribution.c (remaining_stmts,
5196 upstream_mem_writes): Removed static variables.
5197 (copy_loop_before, create_bb_after_loop,
5198 mark_nodes_having_upstream_mem_writes, free_rdg_components,
5199 rdg_build_components, rdg_build_partitions,
5200 dump_rdg_partitions): Extern.
5201 (generate_loops_for_partition, generate_code_for_partition): Do not
5203 (already_processed_vertex_p, predecessor_has_mem_write,
5204 mark_nodes_having_upstream_mem_writes, has_upstream_mem_writes,
5205 rdg_flag_all_uses, rdg_flag_uses, rdg_flag_vertex_and_dependent,
5206 rdg_flag_loop_exits, rdg_flag_similar_memory_accesses,
5207 build_rdg_partition_for_component, rdg_build_partitions, ldist_gen):
5208 Pass remaining_stmts and upstream_mem_writes as parameters.
5209 (rdg_component): Moved...
5210 (build_rdg_partition_for_component): Do not aggregate components when
5211 flag_streamize_loops is set.
5212 (gen_sequential_loops): New.
5213 (ldist_gen): Call gen_sequential_loops.
5215 * tree-pass.h (pass_loop_streamization): Declared.
5217 * omp-low.c (expand_omp_sections): Call add_bb_to_loop on created
5218 basic blocks when loops structures exist.
5220 * builtin-types.def (BT_FN_VOID_PTR_PTR_INT): New.
5222 * tree-ssa-loop-ivopts.c (expr_invariant_in_region_p): New.
5224 * tree-parloops.c (take_address_of, eliminate_local_variables_1,
5225 eliminate_local_variables_stmt, eliminate_local_variables,
5226 separate_decls_in_loop_name, separate_decls_in_loop_stmt,
5227 separate_decls_in_loop, gen_parallel_loop): Make them work on a region
5228 of code delimited by two edges in the CFG.
5229 (separate_decls_in_loop_name): Renamed separate_decls_in_region_name.
5230 (separate_decls_in_loop_stmt): Renamed separate_decls_in_region_stmt.
5231 (separate_decls_in_loop): Renamed separate_decls_in_region. Isolate
5232 the case of parallelisation of reductions.
5233 (create_loop_fn): Extern.
5234 (create_omp_parallel_region): New.
5236 * tree-data-ref.c (dump_data_dependence_relation): Don't call
5237 dump_data_reference for printing dra and drb.
5238 (create_rdg_edge_for_ddr, create_rdg_edges_for_scalar): Initialise
5240 (build_rdg): Don't call free_dependence_relations for the moment, as
5241 we attach dependence relations on each edge of the RDG.
5244 * tree-data-ref.h (rdg_component): ...here.
5245 (struct rdg_edge): New field ddr_p relation.
5246 (RDGE_RELATION): New.
5247 (create_bb_after_loop, copy_loop_before,
5248 mark_nodes_having_upstream_mem_writes, rdg_build_components,
5249 rdg_build_partitions, dump_rdg_partitions,
5250 free_rdg_components): Declared.
5252 * omp-builtins.def (BUILT_IN_GOMP_STREAM_ALIGN_PUSH,
5253 BUILT_IN_GOMP_STREAM_ALIGN_POP): New.
5255 * tree-loop-streamization.c: New.
5257 * tree-flow.h (gather_blocks_in_sese_region, create_loop_fn,
5258 create_omp_parallel_region, expr_invariant_in_region_p): Declared.
5260 * Makefile.in (tree-loop-streamization.o): Added to OBJS-common.
5262 * tree-cfg.c (gather_blocks_in_sese_region): Extern.
5264 * passes.c: Schedule pass_loop_streamization.
5266 2008-03-08 Tobias Grosser <grosser@fmi.uni-passau.de>
5268 * graphite.c (dot_all_scops_1): Fix formatting for difficult bbs and
5271 2008-03-07 Tobias Grosser <grosser@fim.uni-passau.de>
5273 * graphite.c (dot_all_scops): Update formatting.
5274 Bbs can now be part of more than one SCoP.
5276 2008-03-04 Sebastian Pop <sebastian.pop@amd.com>
5278 * graphite.c (new_loop_to_cloog_loop_str, setup_cloog_loop): Fix
5280 (loop_domain_dim): Check for unregistered toplev SCOP loop.
5281 * graphite.h (loop_to_cloog_loop): New.
5283 2008-03-04 Konrad Trifunovic <konrad.trifunovic@inria.fr>
5285 * graphite.c (loop_domain_dim, ref_nb_loops,
5286 loop_iteration_vector_dim): New.
5287 (build_access_matrix_with_af, build_access_matrix,
5288 initialize_dependence_polyhedron): Fixed for new matrix layout.
5289 No longer assume that all iteration domains are of the same
5292 2008-03-02 Sebastian Pop <sebastian.pop@amd.com>
5294 * tree-scalar-evolution.c (instantiate_parameters_1): An SSA_NAME
5295 defined in a loop at depth 0 is invariant.
5296 * tree-chrec.c (evolution_function_is_invariant_rec_p): Ditto.
5297 * tree-ssa-loop-ivopts.c (expr_invariant_in_loop_p): Should never
5298 be called at loop depth 0.
5300 * graphite.c (basic_block_simple_for_scop_p): Take the scop as
5302 (dot_all_scops_1): Update use of basic_block_simple_for_scop_p.
5303 (down_open_scop): Removed.
5304 (loop_in_scop_p): Redefined.
5305 (scop_affine_expr): New argument: scop.
5306 (stmt_simple_for_scop_p): New argument: scop. RETURN_EXPR is not
5307 a harmful statement ending a scop.
5308 (basic_block_simple_for_scop_p): New argument: scop.
5309 (get_loop_start): Removed.
5310 (new_scop): Initialize SCOP_LOOPS.
5311 (free_scop): Free SCOP_LOOPS.
5312 (succs_at_same_depth, preds_at_same_depth): New.
5313 (end_scop): Test the validity of a scop.
5314 (add_dominators_to_open_scops): New.
5315 (test_for_scop_bound): Call add_dominators_to_open_scops.
5316 Add cases for opening and closing multiple scops.
5317 (build_scops, build_scop_bbs): Iterate over basic blocks in
5319 (build_graphite_bb): Pass scop directly.
5320 (dfs_bb_in_scop_p): New.
5321 (scop_record_loop): Use SCOP_LOOPS for not recording the same loop
5323 (nb_loops_around_gb): Use loop_in_scop_p.
5324 (schedule_to_scattering): Disabled for the moment the code computing
5325 the "textual order for outer loop".
5327 * graphite.h (struct scop): New field loops.
5329 (scop_loop_index): Test that the given loop belongs to SCOP_LOOPS.
5331 * testsuite/gcc.dg/graphite/scop-{1,...,7}.c: Updated.
5333 2008-02-27 Antoniu Pop <antoniu.pop@gmail.com>
5334 Sebastian Pop <sebastian.pop@amd.com>
5336 * builtin-types.def (BT_FN_PTR_SIZE_UINT, BT_FN_BOOL_PTR): New.
5337 * common.opt (fstreamize-loops): New.
5338 * omp-builtins.def (BUILT_IN_GOMP_STREAM_CREATE,
5339 BUILT_IN_GOMP_STREAM_PUSH, BUILT_IN_GOMP_STREAM_HEAD,
5340 BUILT_IN_GOMP_STREAM_POP, BUILT_IN_GOMP_STREAM_EOS_P,
5341 BUILT_IN_GOMP_STREAM_SET_EOS, BUILT_IN_GOMP_STREAM_DESTROY): New.
5343 2008-02-22 Konrad Trifunovic <konrad.trifunovic@inria.fr>
5345 * tree-data-ref.c (build_empty_rdg): New.
5346 (build_rdg): Use it.
5347 * tree-data-ref.h (build_empty_rdg): Declared.
5348 * graphite.c (free_scop): Free SCOP_LOOP2CLOOG_LOOP.
5349 (find_vertex_for_stmt): Removed.
5350 (build_rdg_all_levels): Use build_empty_rdg and rdg_vertex_for_stmt.
5352 2008-02-21 Sebastian Pop <sebastian.pop@amd.com>
5354 * tree-loop-distribution.c (generate_builtin): After cancelling the
5355 loop tree, also delete basic blocks.
5356 (rdg_flag_uses): Stop recursion when a vertex has already been
5359 2008-02-15 Konrad Trifunovic <konrad.trifunovic@inria.fr>
5361 * graphite.c (build_scop_alpha): Removed.
5362 (graphite_transform_loops): Add a dummy call to build_all_rdg_levels
5363 and dump_dependence_graph to avoid compiler warnings.
5365 2008-02-14 Konrad Trifunovic <konrad.trifunovic@inria.fr>
5367 * tree-data-ref.c (dr_may_alias_p, create_rdg_vertices): Extern.
5368 * tree-data-ref.h (dr_may_alias_p, create_rdg_vertices): Declared.
5369 * graphite.c (new_loop_to_cloog_loop_str, hash_loop_to_cloog_loop,
5370 eq_loop_to_cloog_loop, del_loop_to_cloog_loop): New.
5371 (new_scop, setup_cloog_loop): Initialize SCOP_LOOP2CLOOG_LOOP.
5372 (initialize_dependence_polyhedron, find_vertex_for_stmt,
5373 initialize_data_dependence_polyhedron, is_empty_polyhedron,
5374 statement_precedes_p, build_rdg_all_levels, build_scop_alpha,
5375 dump_dependence_graph): New.
5376 * graphite.h (struct graphite_bb): New field compressed_alpha_matrix.
5378 (struct scop): New field loop2cloog_loop.
5379 (SCOP_LOOP2CLOOG_LOOP, struct data_dependence_polyhedron,
5380 RDGE_DDP, ddp_p, struct loop_to_cloog_loop_str): New.
5382 2008-02-10 Konrad Trifunovic <konrad.trifunovic@inria.fr>
5384 * graphite.c (build_graphite_bb): Fix initialization
5385 of the graphite basic block.
5387 2008-02-05 Sebastian Pop <sebastian.pop@amd.com>
5389 * graphite.c (scan_tree_for_params): Rewrite for the new layout of
5390 loop domain matrix. Pass in the number of loops contained in the
5392 (nb_loops_around_gb): Moved before setup_cloog_loop that uses it.
5393 (setup_cloog_loop): Rewrite for the new layout of loop domain matrix:
5394 loops that are not surrounding the current loop are not represented
5395 in the domain constraint matrix.
5396 (build_scop_iteration_domain): Initial domain constraint matrix
5397 contains only the eq/ineq, cst, and scop parameters columns.
5399 2008-01-29 Tobias Grosser <grosser@fim.uni-passau.de>
5401 * graphite.c (schedule_to_scattering, nb_loops_around_gb): New.
5402 (print_graphite_bb): Print scattering.
5404 2008-01-29 Tobias Grosser <grosser@fim.uni-passau.de>
5406 * graphite.c (initialize_cloog_names): Initialize names of
5407 scattering variables.
5409 2009-01-29 Tobias Grosser <grosser@fim.uni-passau.de>
5411 * graphite.c (dot_all_scops_1): Disable debug output while
5414 2008-01-29 Tobias Grosser <grosser@fim.uni-passau.de>
5416 * graphite.c (find_transform): Change cloog output language to C.
5418 2008-01-27 Sebastian Pop <sebastian.pop@amd.com>
5420 * tree-loop-distribution.c (generate_memset_zero,
5421 generate_builtin, generate_code_for_partition,
5422 rdg_flag_all_uses): New.
5423 (rdg_flag_uses): Gather in the same partition the statements defining
5424 the VUSES of the current statement.
5425 (rdg_flag_similar_stores): Renamed rdg_flag_similar_memory_accesses.
5426 Gather in the same partition not only the stores to the same memory
5427 access, but also the reads.
5428 (ldist_generate_loops): Renamed ldist_gen.
5430 2008-01-24 Sebastian Pop <sebastian.pop@amd.com>
5431 Tobias Grosser <grosser@fmi.uni-passau.de>
5433 * graphite.c (setup_cloog_loop): Chain all cloog loops with the
5434 next pointer, don't use the inner pointer.
5436 2008-01-20 Tobias Grosser <grosser@fmi.uni-passau.de>
5438 * graphite.c (dot_all_scops, dot_all_scops_1): New.
5439 (find_transform): Call dot_all_1.
5440 * graphite.h (dot_all_scops): Declared.
5442 2007-12-14 Sebastian Pop <sebastian.pop@amd.com>
5444 * tree-loop-distribution.c: Fix apsi.f ICE.
5445 (create_bb_after_loop): New.
5446 (generate_loops_for_partition): Use it.
5447 * testsuite/gfortran.dg/ldist-1.f90: New.
5449 * tree-data-ref.c (dot_rdg): Use /tmp/rdg.dot for dotty format.
5450 * graphite.c (dot_scop): Use /tmp/scop.dot for dotty format.
5452 2007-12-13 Tobias Grosser <grosser@fmi.uni-passau.de>
5454 * graphite.c (find_transform): Dump cloog program sent to cloog.
5456 2007-12-13 Tobias Grosser <grosser@fmi.uni-passau.de>
5458 * graphite.c (initialize_cloog_names): Initialize cloog
5461 2007-12-13 Tobias Grosser <grosser@fmi.uni-passau.de>
5463 * graphite.c (build_scop_context): Fix typo, for the matrix
5464 format: insert '0 >= 0' instead of '-1 >= 0'.
5466 2007-12-13 Sebastian Pop <sebastian.pop@amd.com>
5468 * Fix merge problems.
5470 2007-12-13 Sebastian Pop <sebastian.pop@amd.com>
5472 * graphite.c (setup_cloog_loop): Fix typo.
5474 2007-12-12 Sebastian Pop <sebastian.pop@amd.com>
5476 * doc/invoke.texi (-ftree-loop-distribution): Documented.
5477 * tree-loop-distribution.c: Reimplemented.
5478 * tree-pass.h (pass_loop_distribution): New.
5479 * tree-scalar-evolution.c (number_of_iterations_for_all_loops): Use
5481 * graphds.h (struct graph): New field indexes.
5482 * timevar.def (TV_TREE_LOOP_DISTRIBUTION): New.
5484 * tree-vect-analyze.c: Remove declaration of static functions when not
5486 * tree-vectorizer.c: Same.
5487 (rename_variables_in_loop): Now extern.
5488 (slpeel_tree_duplicate_loop_to_edge_cfg): Renamed
5489 tree_duplicate_loop_to_edge_cfg. Reset PENDING_STMT for edges after
5490 calling redirect_edge_and_branch_force.
5492 * tree-vectorizer.h (tree_duplicate_loop_on_edge): Declared.
5494 * tree-data-ref.c: Don't include tree-chrec.h.
5495 (debug_data_dependence_relations): New.
5496 (dump_data_dependence_relation): Call dump_data_reference on data refs
5498 (same_access_functions): Moved...
5499 (find_vertex_for_stmt): Renamed rdg_vertex_for_stmt.
5500 (dump_rdg_vertex, debug_rdg_vertex, dump_rdg_component,
5501 debug_rdg_component, dump_rdg, debug_rdg, dot_rdg_1, dot_rdg,
5502 struct rdg_vertex_info, ): New.
5503 (create_rdg_edge_for_ddr): Compute the dependence level before looking
5505 (create_rdg_vertices): Initialize the htab of graph->indexes.
5506 Initialize RDG_MEM_WRITE_STMT and RDG_MEM_READS_STMT.
5507 (stmts_from_loop): Don't save LABEL_EXPR.
5508 (hash_stmt_vertex_info, eq_stmt_vertex_info,
5509 hash_stmt_vertex_del): New.
5510 (build_rdg): Initialize rdg->indexes.
5511 (free_rdg, stores_from_loop, ref_base_address,
5512 rdg_defs_used_in_other_loops_p, have_similar_memory_accesses,
5513 have_similar_memory_accesses_1, ref_base_address_1,
5514 remove_similar_memory_refs): New.
5516 * tree-data-ref.h: Include tree-chrec.h.
5517 (debug_data_dependence_relations): Declared.
5518 (same_access_functions): ...here. Now static inline.
5519 (ddr_is_anti_dependent, ddrs_have_anti_deps,
5520 ddr_dependence_level): New.
5521 (struct rdg_vertex): New fields has_mem_write, has_mem_reads.
5522 (RDGV_HAS_MEM_WRITE, RDGV_HAS_MEM_READS, RDG_STMT, RDG_MEM_WRITE_STMT,
5523 RDG_MEM_READS_STMT): New.
5524 (dump_rdg_vertex, debug_rdg_vertex, dump_rdg_component,
5525 debug_rdg_component, dump_rdg, debug_rdg, dot_rdg,
5526 rdg_vertex_for_stmt): Declared.
5527 (struct rdg_edge): New field level.
5528 (RDGE_LEVEL, free_rdg): New.
5529 (stores_from_loop, remove_similar_memory_refs,
5530 rdg_defs_used_in_other_loops_p,
5531 have_similar_memory_accesses): Declared.
5532 (rdg_has_similar_memory_accesses): New.
5534 * lambda.h (dependence_level): New.
5535 * common.opt (ftree-loop-distribution): New.
5536 * tree-flow.h (debug_loop_ir): Renamed debug_loops.
5537 (print_loop_ir): Renamed print_loops.
5538 (debug_loop, debug_loop_num, print_loops_bb, mark_virtual_ops_in_bb,
5539 tree_duplicate_loop_to_edge_cfg, rename_variables_in_loop): Declared.
5540 * Makefile.in (TREE_DATA_REF_H): Depends on tree-chrec.h.
5541 (tree-loop-distribution.o): Added.
5542 * tree-cfg.c (mark_virtual_ops_in_region): Use mark_virtual_ops_in_bb.
5543 (mark_virtual_ops_in_bb): New.
5544 (print_loops_bb, debug_loop_num, debug_loop): New.
5545 * passes.c: Scheduled pass_loop_distribution.
5547 2007-12-12 Konrad Trifunovic <konrad.trifunovic@inria.fr>
5549 * graphite.c (scan_tree_for_params): Correct the number of columns
5551 (nb_flat_iterator): New.
5552 (setup_cloog_loop): Initialize to 1 the first column for inequalities.
5553 (build_scop_iteration_domain): Correct the number of columns for
5556 2007-12-12 Sebastian Pop <sebastian.pop@amd.com>
5558 * Merge from mainline (129697:130800).
5560 2007-10-30 Sebastian Pop <sebastian.pop@amd.com>
5562 * graphite.c (build_graphite_bb): SCoP's basic blocks are post
5563 dominated by SCoP's exit.
5564 (graphite_transform_loops): Compute post dominators.
5566 2007-10-28 Sebastian Pop <sebastian.pop@amd.com>
5568 * Merge from mainline (127169:129697).
5570 2007-10-28 Sebastian Pop <sebastian.pop@amd.com>
5572 * graphite.c (affine_expr): Renamed scop_affine_expr. Use an extra
5573 parameter for the basic block that contains the expression. Use
5574 outermost_loop_in_scop for evolution_function_is_affine_multivariate_p.
5575 (stmt_simple_for_scop_p): Pass to scop_affine_expr the basic block of
5577 * graphite.h (gbb_loop): New.
5578 (GBB_LOOP): Removed.
5580 2007-08-03 Sebastian Pop <sebpop@gmail.com>
5582 * Makefile.in: Fix merge problem.
5584 2007-08-03 Sebastian Pop <sebpop@gmail.com>
5586 * Merge from mainline (125309:127169).
5587 * tree-loop-distribution.c: Disabled.
5589 2007-06-05 Sebastian Pop <sebpop@gmail.com>
5591 * Merge from mainline (r123693:125309).
5593 2007-05-30 Sebastian Pop <sebpop@gmail.com>
5595 * tree-loop-distribution.c (correct_modify_expr_p): Renamed
5597 (correct_modify_p, check_statements, number_of_lvalue_uses,
5598 number_of_scalar_dependences, create_edges): Use GIMPLE_MODIFY_STMT
5599 instead of MODIFY_EXPR.
5600 (update_edge_with_ddv): Don't pass index_of_edge. Initialize
5603 2007-05-24 Sebastian Pop <sebpop@gmail.com>
5605 * tree-loop-distribution.c (struct rdg): Replace arrays by
5606 VECs for edges and vertices.
5607 (RDG_NBV, RDG_NBE, RDG_VERTEX, RDG_EDGE): Removed.
5608 (RDGV_NB_PARTITIONS): New.
5609 (PRDG_NBV, PRDG_NBE): Removed.
5610 (build_scc_graph, correct_partitions_p, mark_partitions, build_prdg,
5611 dump_rdg, find_vertex_with_stmt, create_vertices, free_rdg,
5612 number_of_scalar_dependences, create_edges, build_rdg): Use VECs.
5614 2007-05-17 Georges-Andre Silber <silber@cri.ensmp.fr>
5615 Sebastian Pop <sebpop@gmail.com>
5617 * doc/invoke.texi (-ftree-loop-distribution): Document.
5618 * tree-loop-distribution.c: New file.
5619 * tree-pass.h (pass_loop_distribution): Declared.
5620 * timevar.def (TV_TREE_LOOP_DISTRIBUTION): New.
5621 * tree-data-ref.c (initialize_data_dependence_relation): Initialize
5623 * tree-data-ref.h (data_dependence_relation): Add reversed_p.
5624 (DDR_REVERSED_P): New.
5625 * common.opt (-ftree-loop-distribution): New.
5626 * tree-flow.h (distribute_loops): Declared.
5627 * Makefile.in (OBJS-common): Depend on tree-loop-distribution.o.
5628 * passes.c (init_optimization_passes): Schedule loop distribution.
5630 2007-05-12 Sebastian Pop <sebastian.pop@inria.fr>
5632 * graphite.c (print_graphite_bb): Don't call dump_data_references.
5633 (print_scop): Don't print when scop is NULL.
5634 (build_scop_context, find_transform): Don't output to stderr.
5636 2007-05-09 Sebastian Pop <sebastian.pop@inria.fr>
5638 * tree-data-ref.c: Don't include graphite.h.
5639 Comment out the code for printing data reference's scop.
5640 (build_access_matrix_with_af): Moved...
5641 * tree-data-ref.h (build_access_matrix_with_af): Removed declaration.
5642 * graphite.c (build_access_matrix_with_af): ... here. Now static.
5643 (print_graphite_bb): Print basic block's schedule.
5644 (print_scop): Don't print the schedule, call cloog's pretty printer.
5645 (bb_in_scop_p): A basic block is in a scop only if it is both
5646 dominated and postdominated by the scop's entry and exit basic blocks.
5647 (function_parameter_p): New.
5648 (invariant_in_scop_p): Use function_parameter_p.
5649 (new_scop, save_scop): New.
5650 (end_scop, test_for_scop_bound, build_scops): Use new_scop, and
5652 (scan_tree_for_params): Directly build the constraint as CloogMatrix.
5653 (loop_in_scop_p): New.
5654 (scop_record_loop): Use loop_in_scop_p.
5655 (build_scop_domain): Renamed build_scop_iteration_domain.
5656 (setup_cloog_loop, initialize_cloog_names, find_scop_parameters,
5657 nb_params_in_scop, build_scop_context, first_loop_in_scop,
5658 setup_cloog_loop, dot_scop_1, dot_scop): New.
5659 * graphite.h (GBB_LOOP, SCOP_PROG, dot_scop): New.
5660 (struct scop): Add a pointer to cloog's representation of a program.
5662 2007-04-14 Sebastian Pop <sebastian.pop@inria.fr>
5664 * doc/invoke.texi (-ftree-check-verbose): Renamed
5665 -ftree-checks-verbose.
5666 * common.opt (flag_tree_check_verbose): Renamed
5667 flag_tree_checks_verbose.
5668 * tree-check.c (tree_check_warning): Use flag_tree_checks_verbose.
5670 2007-04-14 Sebastian Pop <sebastian.pop@inria.fr>
5672 * configure: Regenerated.
5673 * config.in: Regenerated.
5674 * tree-ssa-loop.c (graphite_transforms): Execute
5675 graphite_transform_loops only when HAVE_cloog.
5676 * configure.ac (HAVE_polylib, HAVE_cloog, GRAPHITE): Defined.
5677 * graphite.c: Include polylibgmp.h and cloog.h.
5678 (graphite_transform_loops): Removed loops parameter.
5679 * tree-flow.h (graphite_transform_loops): Update declaration.
5680 * Makefile.in (POLYLIBLIBS, POLYLIBINC, CLOOGLIBS, CLOOGINC): New.
5681 (LIBS): Depend on CLOOGLIBS and on POLYLIBLIBS.
5682 (INCLUDES): Depend on POLYLIBINC and on CLOOGINC.
5683 (OBJS-common): Remove dependence on graphite.o.
5684 (BACKEND): Depend on @GRAPHITE@.
5686 2007-04-13 Sebastian Pop <sebastian.pop@inria.fr>
5688 * doc/invoke.texi (-ftree-check-verbose): Documented.
5689 * testsuite/gcc.dg/tree-checker/tree-checks-1.c: New.
5690 * testsuite/gcc.dg/tree-checker/tree-checks-2.c: New.
5691 * testsuite/gcc.dg/tree-checker/tree-checks-3.c: New.
5692 * testsuite/gcc.dg/tree-checker/tree-checks-4.c: New.
5693 * testsuite/gcc.dg/tree-checker/tree-checks.exp: New.
5694 * testsuite/gcc.dg/tree-checker/condates.crp: New.
5695 * common.opt (ftree-checks-verbose): New.
5696 * tree-check.c (tree_check_warning): Move extra stderr output
5697 under control of flag_tree_check_verbose.
5699 2007-04-12 Sebastian Pop <sebastian.pop@inria.fr>
5701 * tree-match.c: Fix comments formatting.
5702 * tree-match.h: Fix comments formatting.
5703 * tree-check.c: Fix comments formatting.
5704 (tree_check_init): Restructure.
5706 2007-04-12 Nic Volanschi <nic.volanschi@free.fr>
5708 * doc/invoke.texi (-ftree-check, -ftree-checks): Documented.
5710 2007-04-10 Sebastian Pop <sebastian.pop@inria.fr>
5712 * Merge from mainline (r120733:123693).
5714 2007-03-20 Nic Volanschi <nic.volanschi@free.fr>
5716 * condate.y: New file.
5717 * tree-match.h (struct patt_info_s): New field sign.
5718 (struct condate_s): New field msg.
5719 (normalize_condate, name_condate, add_condate): New.
5720 (conds[], condate_parse): Made extern.
5721 * tree-check.c (tree_check_warning): First arg changed to cond;
5722 warning reformatted.
5723 (tree_check_init): Reset the TREE_VISITED bit on every CFG node.
5725 (tree_check): Process trivial condates.
5726 (read_delimited_string): Removed.
5727 (print_cond): Print name and msg.
5728 (conds[]): Made extern.
5729 (parse_tree_check_file_once): Rewritten to use the parser in
5731 Processing of option --tree_check_string moved to tree_scan().
5732 * Makefile.in: Added condate.y
5734 2007-03-12 Sebastian Pop <sebastian.pop@inria.fr>
5736 * tree-pretty-print.c (dump_generic_bb_buff, lazy_dump_generic_node):
5737 Use VECs instead of varrays.
5738 * diagnostic.h (lazy_dump_generic_node): Update declaration.
5739 * Makefile.in (pretty-print.o): Depend on vec.h.
5740 * pretty-print.c: Include tree.h and vec.h.
5741 (pp_clear_state, pp_write_list_to_stream, pp_base_format,
5742 pp_base_format, pp_construct, pp_base_string, pp_lazy_mode,
5743 new_tree_chunk, pp_add_tree, pp_add_string, pp_add_char, pp_write_list,
5744 pp_free_list): Use VECs instead of varrays.
5745 * pretty-print.h: Do not include varray.h.
5746 (struct tree_chunk_s): Declaration moved before its use.
5747 (output_buffer): Rename varray field to chunks.
5748 * tree-match.c (tree_equal, chunk_1st_char, chunks_lookahead,
5749 tree_1st_char, match_chunks_pattinfo, match_tree_pattinfo,
5750 save_global_holes): Use VECs instead of varrays.
5751 * tree-match.h: Declare VECs of cfg_node, and hole_p.
5752 * tree-check.c (scan_cfg_stmts, push_node,
5753 print_matching_stmt): Removed.
5754 (tree_check_instance, push_global_holes_if_new, tree_check,
5755 execute_tree_check): Use VECs instead of varrays.
5756 (gate_tree_check): Don't execute the CFG check when basic_block_info
5759 2007-01-12 Sebastian Pop <sebastian.pop@inria.fr>
5761 * Merge from mainline (r115016:120733).
5763 2007-01-12 Sebastian Pop <sebastian.pop@inria.fr>
5765 * Merge from mainline (r117632:117661).
5767 2007-01-12 Sebastian Pop <sebastian.pop@inria.fr>
5769 * tree-dump.c (dump_option_value_in): Add TDF_DEBUG.
5770 * tree-pass.h (TDF_DEBUG, debug_p): New.
5771 * tree-scalar-evolution.c (set_scalar_evolution, get_scalar_evolution,
5772 get_scalar_evolution, add_to_evolution, set_nb_iterations_in_loop,
5773 get_loop_exit_condition, analyze_evolution_in_loop,
5774 analyze_initial_condition, analyze_scalar_evolution,
5775 instantiate_parameters, number_of_latch_executions): Use debug_p.
5776 * tree-chrec.c (chrec_apply): Use debug_p.
5777 * tree-data-ref.c: Include graphite.h.
5778 (dump_data_reference): Print also the access matrix.
5779 (analyze_array, analyze_indirect_ref, init_data_ref,
5780 analyze_offset_expr, address_analysis, object_analysis,
5781 create_data_ref, finalize_ddr_dependent,
5782 non_affine_dependence_relation, analyze_ziv_subscript,
5783 analyze_siv_subscript_cst_affine,
5784 compute_overlap_steps_for_affine_1_2, analyze_subscript_affine_affine,
5785 can_use_analyze_subscript_affine_affine, analyze_siv_subscript,
5786 analyze_miv_subscript, analyze_overlapping_iterations,
5787 build_classic_dist_vector, subscript_dependence_tester,
5788 compute_affine_dependence, analyze_all_data_dependences): Use debug_p.
5789 (build_access_matrix_with_af): No longer static.
5790 * tree-data-ref.h (scop_p): ... declaration here.
5791 (data_reference.scop): New field.
5792 (DR_SCOP, DR_ACCESS_MATRIX): New.
5793 (build_access_matrix_with_af, dr_num_subscripts): Declared.
5794 * graphite.c (print_graphite_bb): Call dump_data_references.
5795 (print_scop): Use scop_nb_loops and scop_dim_domain.
5796 (test_for_scop_bound): Use debug_p.
5797 (scan_tree_for_params): Use scop_nb_loops, scop_nb_loops and
5799 (scop_loop_index): Moved...
5800 (scop_record_loop): New.
5801 (build_scop_loop_nests): Use scop_record_loop.
5802 (build_scop_domain): Use scop_dim_domain.
5803 (build_access_matrix): Implemented.
5804 (build_scop_canonical_schedules): Use scop_nb_loops.
5805 (build_graphite_bb): Initialize GBB_SCOP.
5806 * graphite.h (scop_p): Moved...
5807 (graphite_bb.scop): New field.
5808 (graphite_bb.iteration_domain, GBB_DOMAIN, scop.nb_params,
5809 scop.nb_loops, scop.dim_domain, SCOP_NB_LOOPS, SCOP_NB_PARAMS,
5810 SCOP_DIM_DOMAIN, SCOP_STMTS): Removed.
5811 (scop_nb_params, scop_nb_loops, scop_dim_domain, gbb_dim_domain,
5812 scop_loop_index): New.
5813 * Makefile.in (tree-data-ref.o): Depends on graphite.h.
5815 2007-01-05 Sebastian Pop <sebastian.pop@inria.fr>
5817 * Merge from mainline (r117661:120450).
5819 2006-10-12 Sebastian Pop <sebastian.pop@inria.fr>
5821 * tree-scalar-evolution.c (instantiate_parameters_1): Don't stop
5822 at the first declaration outside the varying loop, instantiate as
5824 * tree-chrec.c (for_each_scev_op): New.
5825 * tree-chrec.h (for_each_scev_op): Declared.
5826 * tree-ssa-loop.c (pass_graphite_trans): Don't dump the function.
5827 * tree-data-ref.c (get_references_in_stmt,
5828 find_data_references_in_stmt): New, from trunk.
5829 (find_data_references_in_loop): Use get_references_in_stmt
5830 and find_data_references_in_loop, modified as in trunk.
5831 (build_access_matrix_with_af): New.
5832 * tree-data-ref.h (data_reference): Add a field access_matrix.
5833 (data_ref_loc): New, as in trunk.
5834 * graphite.c (print_graphite_bb, bb_in_scop_p, stmt_in_scop_p,
5835 invariant_in_scop_p, param_index, scan_tree_for_params,
5836 scop_loop_index, build_scop_loop_nests, build_scop_domain, irp_data,
5837 idx_record_param, idx_record_params, build_access_matrix,
5838 build_scop_data_accesses, build_scop_canonical_schedules,
5839 build_graphite_bb, build_scop_bbs, find_params_in_bb,
5840 build_scop_params): New.
5841 * graphite.h (graphite_bb): New.
5842 (scop): Add fields static_schedule, params, loop_nest,
5844 * lambda.h: Declare vecs of lambda_matrix.
5845 * tree-flow.h (print_loop_ir_bb): Declared.
5846 * tree-cfg.c (print_loop_ir_bb): New.
5847 (print_loop): Use print_loop_ir_bb.
5849 2006-10-12 Sebastian Pop <pop@cri.ensmp.fr>
5851 * Merge from mainline (r115016:117632).
5853 2006-10-11 Sebastian Pop <pop@cri.ensmp.fr>
5855 * graphite.c (debug_scops): Adjust definition for avoiding a bootstrap
5856 break due to a warning.
5858 2006-10-10 Sebastian Pop <pop@cri.ensmp.fr>
5860 * graphite.c (print_scops, debug_scops): New.
5861 (graphite_transform): Renamed graphite_find_transform.
5862 * graphite.h (debug_scops): Declared.
5864 2006-08-17 Sebastian Pop <pop@cri.ensmp.fr>
5866 * tree-match.c: Reformat following the GNU style.
5867 * tree-match.h: Reformat following the GNU style.
5868 * tree-pattern.h: Removed empty file.
5869 * Makefile.in: Remove references to tree-pattern.h.
5870 * tree-check.c: Reformat following the GNU style.
5871 (execute_tree_check): Move gate condition code to...
5872 (gate_tree_check): ...here. New function.
5873 (pass_check): Use the gate function.
5875 2006-07-04 Nic Volanschi <nic.volanschi@free.fr>
5877 * tree-pattern.h: New. Tree pattern matching and checking using
5879 * tree-check.c: New. Tree/CFG checking pass.
5880 * tree-match.c: New. Library for tree pattern matching.
5881 * opts.c, common.opt: Add options --ftree-check & --ftree-checks.
5882 * toplev.c, flags.h: Add globals for tree-check pass.
5883 * Makefile.in: Integrate the files in tree-check pass.
5884 * timevar.def, tree-optimize.c, tree-pass.h: Register tree-check pass.
5885 * pretty-print.c, pretty-print.h, tree-pretty-print.c, diagnostic.h:
5886 Introduce a "lazy" pretty-print mode.
5887 * tree.c, tree.h: Add tree_name.
5889 2006-07-04 Sebastian Pop <pop@cri.ensmp.fr>
5891 * doc/invoke.texi (-fgraphite): Correct typo.
5892 * tree-scalar-evolution.c (number_of_iterations_for_all_loops): Update
5893 use of print_loop_ir.
5894 * testsuite/gcc.dg/graphite/scop-1.c: New.
5895 * testsuite/gcc.dg/graphite/scop-2.c: New.
5896 * testsuite/gcc.dg/graphite/graphite.exp: New.
5897 * graphite.c: Include domwalk.h.
5898 (print_scop): Print only the entry and exit blocks.
5899 (debug_scop): No longer static.
5900 (affine_expr): Fix formating. Return also true when the expression is
5902 (stmt_simple_for_scop_p): Fix formating.
5903 (build_scops): Use domwalk.
5904 (get_loop_start, end_scop, test_for_scop_bound): New.
5905 (graphite_transform_loops): Avoid printing on stderr.
5906 * graphite.h (debug_scop): Declared.
5907 * tree-flow.h (debug_loop_ir, print_loop_ir): Update declarations.
5908 * Makefile.in (graphite.o): Depend on domwalk.h.
5909 * tree-cfg.c (print_loop, print_pred_bbs, print_succ_bbs): Remove
5910 declarations for static functions.
5911 (print_loop, print_loop_ir, debug_loop_ir): Use an extra parameter for
5912 controlling output verbosity.
5914 2006-06-26 Sebastian Pop <pop@cri.ensmp.fr>
5915 Plesco Alexandru <shurikx@gmail.com>
5917 * doc/invoke.texi (-fgraphite): Document.
5918 * tree-pass.h (pass_graphite_transforms): Declared.
5919 * timevar.def (TV_GRAPHITE_TRANSFORMS): New.
5920 * tree-ssa-loop.c (graphite_transforms, gate_graphite_transforms): New.
5921 (pass_graphite_transforms): Defined.
5922 * tree-data-ref.c (free_data_ref, data_reference): Extern.
5923 * tree-data-ref.h (free_data_ref, data_reference): Declared.
5924 * graphite.c, graphite.h: New.
5925 * common.opt (fgraphite): Declared.
5926 * tree-flow.h (graphite_transform_loops): Declared.
5927 * Makefile.in (OBJS-common): Add graphite.o.
5928 (graphite.o): New rule.
5929 * passes.c (pass_graphite_transforms): Scheduled.