1 2009-10-15 Sebastian Pop <sebastian.pop@amd.com>
3 * graphite-sese-to-poly.c (insert_copyin): Use gsi_insert_seq_on_edge.
4 (rewrite_commutative_reductions_out_of_ssa): Call gsi_commit_edge_inserts,
5 and check the SSA representation.
7 * gfortran.dg/graphite/id-18.f90: New, reduced from PR41193.
9 2009-10-15 Sebastian Pop <sebastian.pop@amd.com>
11 * gcc.dg/graphite/pr40157.c: Use -floop-block as reported in the PR.
13 2009-10-14 Sebastian Pop <sebastian.pop@amd.com>
15 * gcc.dg/graphite/interchange-11.c: New.
17 2009-10-14 Sebastian Pop <sebastian.pop@amd.com>
19 * gcc.dg/graphite/interchange-8.c: Enable loop interchange.
21 2009-10-14 Sebastian Pop <sebastian.pop@amd.com>
23 * gcc.dg/graphite/graphite.exp (DEFAULT_CFLAGS_GRAPHITE_BLOCK):
24 Add -fno-loop-strip-mine and -fno-loop-interchange.
25 (DEFAULT_FLAGS_GRAPHITE_INTERCHANGE): Add -fno-loop-block and
27 * gfortran.dg/graphite/graphite.exp: Same.
29 2009-10-14 Sebastian Pop <sebastian.pop@amd.com>
31 * gcc.dg/graphite/graphite.exp (DEFAULT_CFLAGS_GRAPHITE_BLOCK):
32 Renamed DEFAULT_FLAGS_GRAPHITE_BLOCK.
33 (DEFAULT_CFLAGS_GRAPHITE_IDENTITY): Renamed
34 DEFAULT_FLAGS_GRAPHITE_IDENTITY.
35 (DEFAULT_CFLAGS_GRAPHITE_INTERCHANGE): Renamed
36 DEFAULT_FLAGS_GRAPHITE_INTERCHANGE.
37 (DEFAULT_CFLAGS_GRAPHITE_SCOP): Renamed
38 DEFAULT_FLAGS_GRAPHITE_SCOP.
39 (DEFAULT_CFLAGS_RUN_ID): Renamed DEFAULT_FLAGS_RUN_ID.
40 (DEFAULT_CFLAGS_GRAPHITE): Renamed DEFAULT_FLAGS_GRAPHITE.
42 2009-10-14 Sebastian Pop <sebastian.pop@amd.com>
44 * graphite-poly.c (pbb_number_of_iterations_at_time): Cleanup comments.
46 2009-10-14 Konrad Trifunovic <konrad.trifunovic@gmail.com>
47 Sebastian Pop <sebastian.pop@amd.com>
49 * graphite-interchange.c (build_linearized_memory_access): Pass an
51 (memory_stride_in_loop): Include transform scattering in the
52 access functions to be able to querry the strides in the
54 (pbb_interchange_loop_depths): Interchange the psct_dynamic_dim,
55 not the psct_iterator_dim.
57 2009-10-14 Sebastian Pop <sebastian.pop@amd.com>
59 * graphite-blocking.c (pbb_do_strip_mine): Removed.
60 (lst_do_strip_mine_loop): New.
61 (lst_do_strip_mine): New.
62 (scop_do_strip_mine): Call lst_do_strip_mine.
63 * graphite-poly.h (lst_add_loop_under_loop): New.
64 (lst_find_first_pbb): New.
66 2009-10-14 Sebastian Pop <sebastian.pop@amd.com>
68 * graphite-poly.c (loop_to_lst): Fix LST creation.
70 2009-10-14 Tobias Grosser <grosser@fim.uni-passau.de>
72 * testsuite/gcc.dg/graphite/id-15.c: (8 * 8) replaced with
73 sizeof(unsigned long) to make it run on 32bit systems.
75 2009-10-14 Tobias Grosser <grosser@fim.uni-passau.de>
77 * testsuite/gcc.dg/graphite/run-id-1.c: Use smaller matrix to not
80 2009-10-14 Ramakrishna Upadrasta <Ramakrishna.Upadrasta@inria.fr>
82 * graphite-sese-to-poly.c (write_alias_graph_to_ascii_dimacs): Fix
84 (write_alias_graph_to_ascii_dot): New.
85 (write_alias_graph_to_ascii_ecc): Ditto.
86 (partition_drs_to_sets): Add testing of optimality of current method
87 which assigns alias numbers according to DFS Comopnent number. used
88 as heuristic for the upcoming ECC algorithm.
89 (build_scop_drs): Write to file also with the ecc and dot format.
91 2009-10-13 Sebastian Pop <sebastian.pop@amd.com>
93 * gfortran.dg/graphite/interchange-1.f: XFail.
95 2009-10-13 Sebastian Pop <sebastian.pop@amd.com>
97 * graphite.c (graphite_initialize): Do not handle functions with
98 more than 100 basic blocks.
100 2009-10-13 Sebastian Pop <sebastian.pop@amd.com>
102 * graphite-blocking.c (pbb_do_strip_mine): Use
103 PARAM_LOOP_BLOCK_TILE_SIZE.
105 2009-10-13 Sebastian Pop <sebastian.pop@amd.com>
107 * graphite-poly.c (dot_lst_1): New.
109 * graphite-poly.h (dot_lst): Declared.
111 2009-10-13 Sebastian Pop <sebastian.pop@amd.com>
113 * graphite-dependences.c (dot_deps_stmt_1): New.
114 (dot_deps_stmt): New.
115 * graphite-dependences.h (dot_deps_stmt): Declared.
117 2009-10-09 Sebastian Pop <sebastian.pop@amd.com>
119 * graphite-sese-to-poly.c (rewrite_cross_bb_scalar_dependence): Do
120 not replace cross BB scalar dependences ending on PHI nodes.
121 (rewrite_cross_bb_scalar_deps): Filter out GIMPLE_PHI nodes.
123 2009-10-09 Sebastian Pop <sebastian.pop@amd.com>
125 * graphite-poly.c (apply_poly_transforms): Implement the high
126 level driver for flag_loop_block.
127 * tree-ssa-loop.c (gate_graphite_transforms): Remove call to sorry for
130 * gcc.dg/graphite/graphite.exp (DEFAULT_CFLAGS_GRAPHITE_BLOCK): Add
132 * gfortran.dg/graphite/graphite.exp (DEFAULT_CFLAGS_GRAPHITE_BLOCK):
135 2009-10-09 Sebastian Pop <sebastian.pop@amd.com>
137 * graphite-poly.h (lst_find_pbb): New.
138 (find_lst_loop): New.
140 2009-10-09 Sebastian Pop <sebastian.pop@amd.com>
142 * graphite-poly.c (new_scop): Remove init of SCOP_DEP_GRAPH.
143 * graphite-poly.h (struct scop): Remove dep_graph field.
144 (SCOP_DEP_GRAPH): Removed.
146 2009-10-09 Sebastian Pop <sebastian.pop@amd.com>
148 * graphite-poly.h (copy_lst): Do full copy of LST.
150 2009-10-07 Sebastian Pop <sebastian.pop@amd.com>
152 * graphite-sese-to-poly.c (reduction_phi_p): Call remove_invariant_phi
153 when the loop stride is zero.
155 * gcc.dg/graphite/id-16.c: New.
157 2009-10-06 Sebastian Pop <sebastian.pop@amd.com>
159 * graphite-dependences.c (reduction_dr_1): New.
160 (reduction_dr_p): New.
161 (graphite_legal_transform_dr): Call reduction_dr_p.
162 (reduction_ddr): Renamed reduction_ddr_p.
163 * graphite-poly.h (same_pdr_p): New.
164 (number_of_write_pdrs): New.
165 * graphite-sese-to-poly.c (nb_data_writes_in_bb): New.
166 (split_reduction_stmt): Do not split reduction statements
167 when there are no writes to memory.
168 (translate_scalar_reduction_to_array_for_stmt): Insert the
169 memory reduction statement just after the scalar reduction statement.
171 * gcc.dg/graphite/interchange-10.c: Updated to differ from interchange-4.c.
173 * gcc.dg/graphite/interchange-3.c: Un-XFAIL-ed.
174 * gcc.dg/graphite/interchange-4.c: Un-XFAIL-ed.
176 2009-10-06 Sebastian Pop <sebastian.pop@amd.com>
178 * graphite-interchange.c (lst_apply_interchange): New.
179 (lst_interchange_profitable_p): New.
180 (lst_try_interchange_loops): New.
181 (lst_try_interchange): New.
182 (lst_do_interchange): New.
183 (pbb_do_interchange): Removed.
184 (scop_do_interchange): Call lst_do_interchange.
186 2009-10-06 Sebastian Pop <sebastian.pop@amd.com>
188 * graphite-poly.c (print_scop): Print SCOP_ORIGINAL_SCHEDULE and
189 SCOP_TRANSFORMED_SCHEDULE.
194 * graphite-poly.h (lst_p): New.
197 (LST_LOOP_FATHER): New.
200 (scop_to_lst): Declared.
201 (print_lst): Declared.
202 (debug_lst): Declared.
207 (lst_dewey_number): New.
208 (struct scop): Add original_schedule and transformed_schedule fields.
209 (SCOP_ORIGINAL_SCHEDULE): New.
210 (SCOP_TRANSFORMED_SCHEDULE): New.
211 * graphite-sese-to-poly.c (build_poly_scop): Call scop_to_lst.
213 2009-10-05 Sebastian Pop <sebastian.pop@amd.com>
215 * graphite-dependences.c (reduction_ddr): New.
216 (graphite_legal_transform_bb): Call reduction_ddr.
217 * graphite-poly.c (new_poly_bb): Pass a new bool parameter.
218 Initialize PBB_IS_REDUCTION.
219 * graphite-poly.h (struct poly_bb): New bool field is_reduction.
220 (PBB_IS_REDUCTION): New.
221 (new_poly_bb): Update declaration.
222 * graphite-scop-detection.h (build_scop_bbs): Removed.
223 (nb_reductions_in_loop): Removed.
224 * graphite-sese-to-poly.c (try_generate_gimple_bb): Pass a sbitmap
225 parameter for reductions.
226 (try_generate_gimple_bb): Update call to new_poly_bb.
227 (build_scop_bbs_1): Same.
228 (build_scop_bbs): Same.
229 (gsi_for_phi_node): New.
230 (scalar_close_phi_node_p): Remove gcc_assert.
231 (split_reduction_stmt): New.
232 (is_reduction_operation_p): New.
233 (phi_contains_arg): New.
234 (follow_ssa_with_commutative_ops): New.
235 (detect_commutative_reduction_arg): New.
236 (detect_commutative_reduction_assign): New.
237 (follow_inital_value_to_phi): New.
238 (edge_initial_value_for_loop_phi): New.
239 (initial_value_for_loop_phi): New.
240 (detect_commutative_reduction): New.
241 (translate_scalar_reduction_to_array_for_stmt): New.
242 (insert_copyout): New.
243 (insert_copyin): New.
244 (translate_scalar_reduction_to_array): New.
245 (rewrite_commutative_reductions_out_of_ssa_close_phi): New.
246 (rewrite_commutative_reductions_out_of_ssa_loop): New.
247 (rewrite_commutative_reductions_out_of_ssa): New.
248 (build_poly_scop): Call rewrite_commutative_reductions_out_of_ssa.
249 * sese.h (split_region_for_bb): New.
251 * gcc.dg/graphite/graphite.exp (DEFAULT_CFLAGS_GRAPHITE_BLOCK): Add -ffast-math.
252 * gcc.dg/graphite/interchange-1.c: Fix format.
253 * gcc.dg/graphite/interchange-10.c: New.
255 2009-10-05 Sebastian Pop <sebastian.pop@amd.com>
257 * graphite-sese-to-poly.c (insert_out_of_ssa_copy): Remove
260 2009-10-05 Sebastian Pop <sebastian.pop@amd.com>
262 * graphite-sese-to-poly.c (scev_analyzable_p): New.
263 (rewrite_cross_bb_scalar_dependence): New.
264 (rewrite_cross_bb_scalar_deps): New.
265 (rewrite_reductions_out_of_ssa): Use bb_in_sese_p.
266 Call rewrite_cross_bb_scalar_deps.
268 2009-10-05 Sebastian Pop <sebastian.pop@amd.com>
270 * graphite-sese-to-poly.c (gsi_for_ssa_name_def): Removed.
271 (insert_out_of_ssa_copy): Directly use gsi_after_labels and
274 2009-10-05 Sebastian Pop <sebastian.pop@amd.com>
276 * graphite-clast-to-gimple.c (build_cloog_prog): Use pbb_index.
277 * graphite-interchange.c (pbb_do_interchange): Same.
278 * graphite-poly.c (print_scattering_function): Same.
280 * graphite-poly.h (pbb_loop): New.
281 * graphite-sese-to-poly.c (create_linear_expr_from_tree): Use pbb_loop.
283 2009-09-27 Sebastian Pop <sebastian.pop@amd.com>
285 * graphite-scop-detection.c (limit_scops): Do not build poly_bbs.
287 2009-09-27 Sebastian Pop <sebastian.pop@amd.com>
289 * graphite-sese-to-poly.c (partition_drs_to_sets): Drs is not modified,
290 so don't pass a pointer to it.
291 (build_alias_set_for_drs): Same.
292 (build_base_obj_set_for_drs): Same.
293 (build_scop_drs): Same.
295 2009-09-26 Li Feng <nemokingdom@gmail.com>
297 * graphite-sese-to-poly.c (build_scop_drs): Disable writing to file
298 the alias graph of data references.
300 2009-09-25 Li Feng <nemokingdom@gmail.com>
302 * graphite-sese-to-poly.c (write_alias_graph_to_ascii_dimacs): New.
303 (build_scop_drs): When debugging, write the alias graph to file,
304 otherwise, should be disabled.
306 2009-09-17 Sebastian Pop <sebastian.pop@amd.com>
308 * graphite-scop-detection.c (stmt_simple_memref_p): Removed.
309 (is_simple_operand): Remove call to stmt_simple_memref_p.
310 (stmt_simple_for_scop_p): Update call to is_simple_operand.
312 2009-09-17 David Edelsohn <edelsohn@gnu.org>
314 * testsuite/gcc.dg/graphite/interchange-mvt.c: New File.
315 * testsuite/gcc.dg/graphite/scop-dsyrk.c: New File.
316 * testsuite/gcc.dg/graphite/scop-dsyr2k.c: New File.
317 * testsuite/gcc.dg/graphite/scop-mvt.c: New File.
318 * testsuite/gcc.dg/graphite/scop-sor.c: New File.
320 2009-09-17 Li Feng <nemokingdom@gmail.com>
323 * graphite-dependences.c (poly_drs_may_alias_p): Adjust definition.
324 (pddr_original_scattering): Make sure 2 pdr2 in the same base object set.
325 (graphite_carried_dependence_level_k): Ditto.
326 * graphite-poly.c (new_poly_dr): Add init of PDR_BASE_OBJECT_SET.
327 * graphite-poly.h (struct poly_dr): Add member dr_base_object_set.
328 (new_poly_dr): Adjust declaration.
329 * graphite-sese-to-poly.c (free_data_refs_aux): New.
330 (free_gimple_bb): Added free_data_refs_aux.
331 (build_poly_dr): Add dr_base_object_set.
332 (partition_drs_to_sets): New.
333 (dr_same_base_object_p): New.
334 (build_alias_set_for_drs): New.
335 (build_base_object_set_for_drs): New.
336 (build_scop_drs): Add build_base_obj_set_for_drs.
337 * graphite-sese-to-poly.h: Added #define for alias set number index and
338 base object set index.
339 * libgomp/testsuite/libgomp.graphite/force-parallel-6.c: Refine tests.
340 * libgomp/testsuite/libgomp.graphite/pr4118.c: New.
342 2009-09-16 Alexander Monakov <amonakov@ispras.ru>
344 * graphite-sese-to-poly.c (pdr_add_data_dimensions): Add bounds only
345 for ARRAY_REFs. Use array_ref_{low,up}_bound to determine bounds.
347 2009-09-14 Sebastian Pop <sebastian.pop@amd.com>
349 * graphite-sese-to-poly.c (struct irp_data): Removed.
350 (idx_record_params): Removed.
351 (find_params_in_bb): Scan for parameters the access functions; don't
352 parse the tree representation.
354 2009-09-14 Sebastian Pop <sebastian.pop@amd.com>
356 * tree-ssa-loop.c (gate_graphite_transforms): Disable Graphite
357 passes at -O1 and below.
359 2009-09-14 Sebastian Pop <sebastian.pop@amd.com>
361 * graphite-blocking.c: Fix order of includes: tree-chrec.h, then
362 tree-scalar-evolution.h, and then tree-data-ref.h.
363 * graphite-clast-to-gimple.c: Same.
364 * graphite-dependences.c: Same.
365 * graphite-interchange.c: Same.
366 * graphite-poly.c: Same.
367 * graphite-scop-detection.c: Same.
368 * graphite-sese-to-poly.c: Same.
370 * lambda-code.c: Same.
371 * matrix-reorg.c: Same.
372 * tree-data-ref.c: Same.
373 * tree-if-conv.c: Same.
374 * tree-loop-distribu: Same.: Same.
375 * tree-loop-linear.c: Same.
376 * tree-parloops.c: Same.
377 * tree-predcom.c: Same.
378 * tree-vect-patterns.c: Same.
380 2009-09-02 Sebastian Pop <sebastian.pop@amd.com>
382 Partially revert the previous patch, except the following.
383 * tree-scalar-evolution.c (instantiate_scev_not): Adapted to pass
384 as parameters the operands of the not expression.
386 2009-09-01 Sebastian Pop <sebastian.pop@amd.com>
388 * tree-scalar-evolution.c (instantiate_scev_assign): New.
389 Do not call analyze_scalar_evolution on assignments.
390 (instantiate_scev_phi): Call analyze_scalar_evolution.
391 (instantiate_scev_name): Call instantiate_scev_assign and
392 instantiate_scev_phi.
393 (instantiate_scev_not): Adapted to pass as parameters the operands
394 of the not expression.
396 2009-09-01 Sebastian Pop <sebastian.pop@amd.com>
398 * tree-scalar-evolution.c (instantiate_scev_binary): Adapted
399 to pass as parameters the operands of the binary expression.
401 2009-09-01 Sebastian Pop <sebastian.pop@amd.com>
403 * tree-scalar-evolution.c (instantiate_scev_bitnot): Renamed
404 instantiate_scev_not. Handle NEGATE_EXPR.
405 (instantiate_scev_r): Handle NEGATE_EXPR.
407 2009-09-01 Sebastian Pop <sebastian.pop@amd.com>
409 * tree-scalar-evolution.c (instantiate_scev_1): Renamed
411 (instantiate_scev_r): Move code in instantiate_scev_2
412 and instantiate_scev_1.
414 2009-09-01 Sebastian Pop <sebastian.pop@amd.com>
416 * tree-scalar-evolution.c (instantiate_scev_3): New.
417 (instantiate_scev_1): Move code in instantiate_scev_3.
419 2009-09-01 Sebastian Pop <sebastian.pop@amd.com>
421 * tree-scalar-evolution.c (instantiate_scev_poly): New.
422 (instantiate_scev_1): Move code in instantiate_scev_poly.
424 2009-09-01 Sebastian Pop <sebastian.pop@amd.com>
426 * tree-scalar-evolution.c (instantiate_scev_bitnot): New.
427 (instantiate_scev_1): Move code in instantiate_scev_bitnot.
429 2009-09-01 Sebastian Pop <sebastian.pop@amd.com>
431 * tree-scalar-evolution.c (instantiate_scev_convert): New.
432 (instantiate_scev_1): Move code in instantiate_scev_convert.
434 2009-09-01 Sebastian Pop <sebastian.pop@amd.com>
436 * tree-scalar-evolution.c (instantiate_scev_binary): New.
437 (instantiate_scev_1): Move code in instantiate_scev_binary.
439 2009-09-01 Sebastian Pop <sebastian.pop@amd.com>
441 * tree-scalar-evolution.c (instantiate_scev_name): New.
442 (instantiate_scev_1): Move code in instantiate_scev_name.
444 2009-08-28 Sebastian Pop <sebastian.pop@amd.com>
446 * Merge from mainline (150992:151171).
448 2009-08-25 Sebastian Pop <sebastian.pop@amd.com>
450 * graphite-dependences.c (graphite_legal_transform_bb): Call
451 pbb_remove_duplicate_pdrs.
452 * graphite-poly.c (can_collapse_pdr): Removed.
453 (pdr_find_duplicate): Removed.
454 (can_collapse_pdrs): New.
455 (pbb_remove_duplicate_pdrs): New.
456 (new_poly_dr): Do not look for duplicates.
457 * graphite-poly.h (struct poly_bb): New field pdr_duplicates_removed.
458 (PBB_PDR_DUPLICATES_REMOVED): New.
459 (pbb_remove_duplicate_pdrs): Declared.
461 2009-08-25 Sebastian Pop <sebastian.pop@amd.com>
463 * graphite-interchange.c (pbb_interchange_profitable_p): Adjust
464 the strides by multiplying by PDR_NB_REFS.
465 * graphite-poly.c (can_collapse_pdr): New.
466 (pdr_find_duplicate): New.
467 (new_poly_dr): Call pdr_find_duplicate. Collapse duplicate PDRs.
468 Initialize PDR_NB_REFS.
469 * graphite-poly.h (struct poly_dr): Add field nb_refs.
471 (new_poly_dr): Number of subscripts is a graphite_dim_t.
473 2009-08-25 Sebastian Pop <sebastian.pop@amd.com>
475 Revert one of the previous commits:
476 * graphite-dependences.c (graphite_legal_transform_bb): Avoid
477 the computation of symmetric data dependence relations.
478 (dependency_between_pbbs_p): Same.
480 2009-08-25 Sebastian Pop <sebastian.pop@amd.com>
483 * graphite-poly.c (apply_poly_transforms): Remove legality test before
486 2009-08-25 Sebastian Pop <sebastian.pop@amd.com>
488 * graphite-dependences.c (pddr_original_scattering): Return NULL
489 for read-read dependence relations.
490 * graphite-poly.h (enum poly_dr_type): Fix comment.
493 (pdr_may_write_p): New.
495 2009-08-25 Sebastian Pop <sebastian.pop@amd.com>
497 * graphite-poly.h (enum POLY_DR_TYPE): Renamed poly_dr_type.
498 (struct poly_dr): Same.
500 * graphite-poly.c (new_poly_dr): Same.
502 2009-08-25 Konrad Trifunovic <konrad.trifunovic@gmail.com>
503 Sebastian Pop <sebastian.pop@amd.com>
505 * graphite-blocking.c (pbb_strip_mine_loop_depth): Renamed
506 pbb_strip_mine_time_depth. Changed the implementation so that
507 transformation is expressed as a transformation on
508 time (scatttering) dimensions. Also, ensures that the 2d+1
509 scheduling format is preserved.
510 (pbb_strip_mine_profitable_p): Profitability is based on the
511 iteration number of a given time (scattering) dimension,
512 and not on a original loop depth dimension.
513 (pbb_strip_mine): Call pbb_number_of_iterations_at_time.
514 (pbb_do_strip_mine): Call psct_dynamic_dim.
515 * graphite-poly.c (pbb_number_of_iterations_at_time): New.
516 * graphite-poly.h (pbb_number_of_iterations_at_time): Declared.
517 (pbb_nb_dynamic_scattering_transform): New.
518 (psct_dynamic_dim): New.
520 2009-08-25 Konrad Trifunovic <konrad.trifunovic@gmail.com>
522 * graphite-ppl.c (ppl_max_for_le): Renamed ppl_max_for_le_pointset.
523 * graphite-ppl.h (ppl_max_for_le): Renamed ppl_max_for_le_pointset.
524 * graphite-poly.c (pbb_number_of_iterations): Rename ppl_max_for_le.
525 * graphite-interchange.c (build_linearized_memory_access): Same.
526 (memory_stride_in_loop): Same.
528 2009-08-25 Sebastian Pop <sebastian.pop@amd.com>
530 * graphite-dependences.c (pddr_original_scattering): New.
531 (graphite_legal_transform_dr): Call pddr_original_scattering.
534 * graphite-dependences.h (dot_deps): Declared.
535 * graphite-poly.c (new_poly_dr): Initialize PDR_ID.
536 (print_pdr): Print PDR_ID.
537 * graphite-poly.h (struct poly_dr): Add field id.
540 * graphite-scop-detection.c (dot_all_scops_1): Cleanup comment.
542 2009-08-22 Sebastian Pop <sebastian.pop@amd.com>
544 * graphite-dependences.c (graphite_carried_dependence_level_k): Do
545 not delete the original dependence relation.
547 2009-08-21 Sebastian Pop <sebastian.pop@amd.com>
549 * graphite-dependences.c (graphite_legal_transform_bb): Avoid
550 the computation of symmetric data dependence relations.
551 (dependency_between_pbbs_p): Same.
553 2009-08-21 Sebastian Pop <sebastian.pop@amd.com>
555 * graphite-dependences.c (new_poly_dr_pair): Renamed new_poly_ddr.
556 (eq_poly_dr_pair_p): Renamed eq_poly_ddr_p.
557 (hash_poly_dr_pair_p): Renamed hash_poly_ddr_p.
558 (free_poly_ddr): New.
559 (pddr_is_empty): New.
560 (dependence_polyhedron_1): Now returns a poly_ddr_p.
561 (dependence_polyhedron): Same. Remove useless gcc_assert.
563 (graphite_legal_transform_dr): Call pddr_is_empty and free_poly_ddr.
564 (graphite_carried_dependence_level_k): Call pddr_is_empty.
565 * graphite-dependences.h (enum poly_dependence_kind): New.
566 (poly_dr_pair): Renamed poly_ddr. Added a field kind.
567 (PDRP_SOURCE): Renamed PDDR_SOURCE.
568 (PDRP_SINK): Renamed PDDR_SINK.
569 (PDRP_DDP): Renamed PDDR_DDP.
571 (free_poly_ddr): Declared.
572 * graphite-poly.c (new_scop): Use the new hash function names.
573 * graphite-poly.h (struct scop): Renamed field original_pdr_pairs
575 (SCOP_ORIGINAL_PDR_PAIRS): Renamed SCOP_ORIGINAL_PDDRS.
577 2009-08-21 Sebastian Pop <sebastian.pop@amd.com>
579 * Merge from mainline (150764:150992).
581 2009-08-18 Sebastian Pop <sebastian.pop@amd.com>
583 * cfgloopmanip.c (create_empty_loop_on_edge): Generate upper
584 bounds with LT_EXPR to make niter analysis more precise on code
585 generated by Graphite.
587 2009-08-18 Sebastian Pop <sebastian.pop@amd.com>
589 * graphite-dependences.c (graphite_legal_transform_dr): Fix formatting.
590 (graphite_legal_transform_bb): Same.
591 (poly_drs_may_alias_p): Same.
593 2009-08-15 Sebastian Pop <sebastian.pop@amd.com>
596 * graphite-ppl.c (ppl_max_for_le): Correct the use of
597 ppl_Pointset_Powerset_C_Polyhedron_maximize.
599 2009-08-13 Sebastian Pop <sebastian.pop@amd.com>
601 * graphite-poly.c (print_pbb): Print PBB index.
603 2009-08-13 Sebastian Pop <sebastian.pop@amd.com>
605 * Merge from mainline (r150672:150764).
607 2009-08-13 Sebastian Pop <sebastian.pop@amd.com>
609 * graphite-interchange.c (ppl_max_for_le): Moved...
610 * graphite-poly.c (pbb_number_of_iterations): Call ppl_max_for_le.
611 * graphite-ppl.c (ppl_max_for_le): ... here.
612 * graphite-ppl.h (ppl_max_for_le): Declared.
614 2009-08-12 Sebastian Pop <sebastian.pop@amd.com>
616 * Merge from mainline (r150372:150672).
618 2009-08-11 Sebastian Pop <sebastian.pop@amd.com>
621 * sese.c (convert_for_phi_arg): New.
622 (add_guard_exit_phis): Use convert_for_phi_arg.
624 * testsuite/gfortran.dg/graphite/id-17.f: New.
626 2009-08-11 Sebastian Pop <sebastian.pop@amd.com>
628 * graphite-sese-to-poly.c (pdr_add_data_dimensions): Dont add
629 unknown subscript upper bounds.
631 * testsuite/gcc.dg/graphite/interchange-6.c: Un-XFAIL.
633 2009-08-11 Sebastian Pop <sebastian.pop@amd.com>
634 Pranav Garg <pranav.garg2107@gmail.com>
636 * graphite-interchange.c (gather_access_strides): Removed.
637 (ppl_max_for_le): New.
638 (build_linearized_memory_access): New.
639 (memory_stride_in_loop): New.
640 (pbb_interchange_profitable_p): Reimplemented.
641 * graphite-ppl.h (ppl_new_id_map): New.
642 (ppl_interchange): New.
644 * testsuite/gcc.dg/graphite/interchange-6.c: XFAILed.
646 2009-08-11 Sebastian Pop <sebastian.pop@amd.com>
648 * graphite-interchange.c (compute_subscript): Removed.
649 (compute_array_size_cstr): Removed.
650 (compute_array_size_poly): Removed.
651 (compute_array_size): Removed.
652 (gather_access_strides_poly): Removed.
653 (gather_access_strides): Empty.
655 2009-08-11 Sebastian Pop <sebastian.pop@amd.com>
657 * graphite-dependences.c (dependence_polyhedron_1): Replace
658 pdr_nb_subscripts with PDR_NB_SUBSCRIPTS.
659 (graphite_legal_transform_dr): Same.
660 (graphite_carried_dependence_level_k): Same.
661 * graphite-poly.c (new_poly_dr): Add a parameter nb_subscripts.
662 Initialize PDR_NB_SUBSCRIPTS.
663 (print_pdr_access_layout): Replace pdr_nb_subscripts with
665 * graphite-poly.h (struct poly_dr): Add nb_subscripts field.
666 (PDR_NB_SUBSCRIPTS): New.
667 (pdr_nb_subscripts): Removed.
668 (pdr_dim): Simplified.
669 * graphite-sese-to-poly.c (build_poly_dr): Replace pdr_nb_subscripts
670 with PDR_NB_SUBSCRIPTS.
672 2009-08-11 Sebastian Pop <sebastian.pop@amd.com>
674 * graphite-interchange.c (compute_array_size): Remove use of
676 * graphite-poly.c (new_poly_dr): Remove argument data_container.
677 Do not initialize PDR_DATA_CONTAINER.
678 (print_pdr): Do not print PDR_DATA_CONTAINER.
679 * graphite-poly.h (struct poly_dr): Remove data_container field.
680 (PDR_DATA_CONTAINER): Removed.
681 * graphite-sese-to-poly.c (pdr_add_data_dimensions): Remove use of
683 (build_poly_dr): Same.
685 2009-08-11 Sebastian Pop <sebastian.pop@amd.com>
687 * testsuite/gcc.dg/graphite/interchange-9.c: New.
689 2009-08-05 Konrad Trifunovic <konrad.trifunovic@gmail.com>
690 Sebastian Pop <sebastian.pop@amd.com>
692 * graphite-dependences.c (graphite_legal_transform_dr): Work on a
693 copy of the dependence polyhedron. Free the temporary objects.
694 (graphite_carried_dependence_level_k): Free unused objects before
697 * testsuite/gcc.dg/graphite/interchange-1.c: XFAILed.
698 * testsuite/gcc.dg/graphite/interchange-2.c: XFAILed.
699 * testsuite/gcc.dg/graphite/interchange-3.c: XFAILed.
700 * testsuite/gcc.dg/graphite/interchange-4.c: XFAILed.
701 * testsuite/gcc.dg/graphite/interchange-7.c: XFAILed.
703 2009-08-05 Sebastian Pop <sebastian.pop@amd.com>
705 * graphite-blocking.c (scop_do_strip_mine): Call store_scattering.
706 Early return without analyzing the data dependences if no
707 transform has been done. Call restore_scattering if the transform
709 (graphite-interchange.c): Same.
710 * graphite-poly.c (print_scattering_function): Test for PBB_TRANSFORMED.
711 (graphite_read_transforms): Initialize PBB_TRANSFORMED.
712 (apply_poly_transforms): Do not gcc_assert that
713 the transform is legal.
714 (new_poly_bb): Initialize PBB_TRANSFORMED, PBB_SAVED, and PBB_ORIGINAL.
715 Do not initialize PBB_NB_SCATTERING_TRANSFORM, PBB_NB_LOCAL_VARIABLES,
716 PBB_TRANSFORMED_SCATTERING, and PBB_ORIGINAL_SCATTERING.
717 (free_poly_dr): Free PBB_TRANSFORMED, PBB_SAVED, and PBB_ORIGINAL.
718 * graphite-poly.h (struct poly_scattering): New.
719 (struct poly_bb): Add original, transformed, and saved fields.
720 Remove transformed_scattering, original_scattering, nb_local_variables,
721 and nb_scattering_transform fields.
722 (PBB_ORIGINAL, PBB_TRANSFORMED, PBB_SAVED): New.
723 (poly_scattering_new): New.
724 (poly_scattering_free): New.
725 (poly_scattering_copy): New.
726 (store_scattering_pbb): New.
727 (store_scattering): New.
728 (restore_scattering_pbb): New.
729 (restore_scattering): New.
730 * graphite-sese-to-poly.c (build_pbb_scattering_polyhedrons):
731 Initialize PBB_TRANSFORMED and PBB_ORIGINAL.
733 2009-08-05 Sebastian Pop <sebastian.pop@amd.com>
735 * graphite-poly.c (print_pbb): Add parentheses in the pretty print.
738 2009-08-05 Sebastian Pop <sebastian.pop@amd.com>
740 * Makefile.in (graphite.o): Depends on PREDICT_H.
741 * graphite.c: Include predict.h.
742 (graphite_finalize): Call tree_estimate_probability.
743 * predict.c (predict_loops): Do not call scev_initialize and
745 (tree_estimate_probability_bb): New.
746 (tree_estimate_probability): Do not initialize loops: move that
747 code to the driver. Call tree_estimate_probability_bb.
748 (tree_estimate_probability_driver): New.
749 (pass_profile): Use tree_estimate_probability_driver.
750 * predict.h (tree_estimate_probability): Declared.
752 2009-08-05 Sebastian Pop <sebastian.pop@amd.com>
754 * graphite-clast-to-gimple.c (gloog): Add time to TV_GRAPHITE_CODE_GEN.
755 * graphite-dependences.c (graphite_legal_transform): Add time to
756 TV_GRAPHITE_DATA_DEPS.
757 (dependency_between_pbbs_p): Same.
758 * timevar.def (TV_GRAPHITE_DATA_DEPS, TV_GRAPHITE_CODE_GEN): New.
760 2009-08-03 Sebastian Pop <sebastian.pop@amd.com>
762 * Merge from mainline (r149952:150372).
764 2009-07-28 Sebastian Pop <sebastian.pop@amd.com>
766 * ChangeLog.graphite: Fix indenting, white spaces and 80 columns.
767 * graphite-blocking.c: Same.
768 * graphite-clast-to-gimple.c: Same.
769 * graphite-dependences.c: Same.
770 * graphite-poly.c: Same.
771 * graphite-poly.h: Same.
772 * graphite-ppl.c: Same.
773 * graphite-scop-detection.c: Same.
774 * graphite-sese-to-poly.c: Same.
777 2009-07-28 Sebastian Pop <sebastian.pop@amd.com>
779 * graphite-sese-to-poly.c (loop_entry_phi_arg): New.
780 (remove_simple_copy_phi): New.
781 (remove_invariant_phi): New.
782 (simple_copy_phi_p): New.
783 (reduction_phi_p): New.
784 (gsi_for_ssa_name_def): New.
785 (insert_out_of_ssa_copy): New.
786 (insert_out_of_ssa_copy_on_edge): New.
787 (create_zero_dim_array): New.
788 (scalar_close_phi_node_p): New.
789 (rewrite_close_phi_out_of_ssa): New.
790 (rewrite_phi_out_of_ssa): New.
791 (rewrite_reductions_out_of_ssa): New.
792 (build_poly_scop): Call rewrite_reductions_out_of_ssa.
794 * testsuite/gcc.dg/graphite/id-11.c: New.
795 * testsuite/gcc.dg/graphite/id-15.c: New.
796 * testsuite/gcc.dg/graphite/interchange-1.c: Un-XFAIL.
797 * testsuite/gcc.dg/graphite/interchange-2.c: Un-XFAIL.
798 * testsuite/gcc.dg/graphite/interchange-3.c: Un-XFAIL.
799 * testsuite/gcc.dg/graphite/interchange-4.c: Un-XFAIL.
800 * testsuite/gcc.dg/graphite/interchange-7.c: Un-XFAIL.
801 * testsuite/gcc.dg/graphite/scop-matmult.c: Un-XFAIL.
802 * testsuite/gfortran.dg/graphite/id-13.f: New.
803 * testsuite/gfortran.dg/graphite/id-5.f: New.
805 2009-07-28 Sebastian Pop <sebastian.pop@amd.com>
807 * graphite-clast-to-gimple.c (graphite_loop_normal_form): Do not
808 check that nb_reductions_in_loop is zero.
809 * graphite-scop-detection.c (harmful_stmt_in_bb): Don't filter out
811 (nb_reductions_in_loop): Removed.
812 (graphite_can_represent_loop): Do not call nb_reductions_in_loop.
813 * graphite-sese-to-poly.c (phi_node_is_iv): Removed.
814 (bb_contains_non_iv_scalar_phi_nodes): Removed.
815 (scop_contains_non_iv_scalar_phi_nodes): Removed.
816 (build_poly_scop): Do not call scop_contains_non_iv_scalar_phi_nodes.
818 2009-07-28 Sebastian Pop <sebastian.pop@amd.com>
820 * graphite-clast-to-gimple.c (build_cloog_prog): Do not code generate
821 statements that have an empty iteration domain.
822 * testsuite/gfortran.dg/graphite/id-16.f: New.
824 2009-07-28 Sebastian Pop <sebastian.pop@amd.com>
826 * tree-scalar-evolution.c (instantiate_scev_1): Return
827 chrec_dont_know when the result is not above instantiate_below.
828 * graphite-scop-detection.c (scopdet_basic_block_info): Fix formatting.
829 * graphite-sese-to-poly.c (create_linear_expr_from_tree): Assert that
830 the tree has a known scalar evolution.
831 * testsuite/gfortran.dg/graphite/id-14.f: New.
832 * testsuite/gfortran.dg/graphite/id-15.f: New.
834 2009-07-28 Sebastian Pop <sebastian.pop@amd.com>
836 * sese.c (rename_variables_in_stmt): Pass in an extra parameter
838 (rename_variables): Keep inserting renames after the ones already
841 2009-07-28 Sebastian Pop <sebastian.pop@amd.com>
843 * graphite-sese-to-poly.c (compare_bb_depths): New.
844 (graphite_sort_dominated_info): New.
845 (build_scop_bbs_1): Call graphite_sort_dominated_info.
846 (build_scop_scattering): Fix comment.
848 2009-07-28 Sebastian Pop <sebastian.pop@amd.com>
850 * graphite.c (graphite_finalize): Call print_loops instead of
851 dump_function_to_file.
852 * testsuite/gcc.dg/graphite/graphite.exp: Fix formatting.
853 * testsuite/gcc.dg/graphite/pr35356-1.c: New. Look for the number of
854 loops generated in the graphite output file.
855 * testsuite/gcc.dg/graphite/pr35356-2.c: New.
856 * testsuite/gcc.dg/graphite/pr35356-3.c: New. XFAILed for now.
857 * testsuite/gfortran.dg/graphite/id-12.f: New.
859 2009-07-24 Li Feng <nemokingdom@gmail.com>
861 * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-8.c:
864 2009-07-24 Li Feng <nemokingdom@gmail.com>
865 Tobias Grosser <grosser@fim.uni-passau.de>
867 * graphite-sese-to-poly.c (pdr_add_alias_set): Use data reference's
868 alias set number build alias in ACCESSES polyhedron.
869 (build_alias_set_for_drs): New.
870 (build_pbb_drs): Added build_alias_set_for_drs.
871 * graphite-dependences.c (poly_drs_may_alias_p): New.
872 (graphite_carried_dependence_level_k): Check alias information
873 before building polyhedron.
875 2009-07-24 Tobias Grosser <grosser@fim.uni-passau.de>
877 * Makefile.in (lambda-code.o): Fix formatting.
879 2009-07-24 Tobias Grosser <grosser@fim.uni-passau.de>
881 * Merge from mainline (r149350-149952)
883 2009-07-18 Tobias Grosser <grosser@fim.uni-passau.de>
885 * graphite-poly.c (apply_poly_transforms): Move strip_mine
886 before interchange to prepare for loop blocking.
888 2009-07-18 Tobias Grosser <grosser@fim.uni-passau.de>
890 * graphite-poly.c (apply_poly_transforms): Add checks after every
892 * graphite-sese-to-poly.c (build_poly_scop): Remove check, as already
893 done in apply_poly_transforms.
895 2009-07-17 Konrad Trifunovic <konrad.trifunovic@gmail.com>
897 * graphite-dependences.c (build_lexicographically_gt_constraint):
898 Replace RES parameter with *RES.
899 (dependence_polyhedron_1): Pass an address of the parameter RES
900 instead of value of RES.
902 2009-07-16 Sebastian Pop <sebastian.pop@amd.com>
904 * graphite.c (graphite_finalize): Fix comment.
905 (graphite_transform_loops): Reset scev info after code generation
908 2009-07-16 Sebastian Pop <sebastian.pop@amd.com>
910 * graphite.c (graphite_finalize): Call scev_reset.
912 2009-07-16 Sebastian Pop <sebastian.pop@amd.com>
914 * graphite-clast-to-gimple.c (compute_cloog_iv_types): Do not create
915 GBB_CLOOG_IV_TYPES hash table twice.
916 * graphite-sese-to-poly.c (free_gimple_bb): Call free_data_refs.
917 (add_condition_to_domain): Clear GMP values.
919 2009-07-16 Sebastian Pop <sebastian.pop@amd.com>
921 * graphite-dependences.c: Fix formatting.
922 * graphite-poly.c (free_poly_dr): Also free PDR_DATA_CONTAINER.
923 (pbb_number_of_iterations): Free ppl_Linear_Expression.
924 * graphite-sese-to-poly.c: Fix formatting.
925 * graphite.c (graphite_transform_loops): Create the hash table
926 after the early return.
928 2009-07-16 Sebastian Pop <sebastian.pop@amd.com>
930 * testsuite/gcc.dg/graphite/id-14.c: New.
931 * testsuite/gcc.dg/graphite/pr40157.c: New.
932 * testsuite/gfortran.dg/graphite/id-11.f: New.
934 2009-07-16 Sebastian Pop <sebastian.pop@amd.com>
936 * graphite-sese-to-poly.c (nb_pbbs_in_loops): New.
937 (build_poly_scop): Return false when there are no pbbs within
938 loops to avoid to pass to cloog scops with no loops.
940 2009-07-16 Sebastian Pop <sebastian.pop@amd.com>
942 * graphite-sese-to-poly.c (build_pbb_scattering_polyhedrons): Avoid
943 useless test "i % 2".
944 (build_pbb_scattering_polyhedrons): Fix formatting.
945 (build_poly_dr): Same.
946 * graphite.c (graphite_transform_loops): Restructure.
948 2009-07-14 Razya Ladelsky <razya@il.ibm.com>
950 * tree-ssa-loop-manip.c (rewrite_phi_with_iv): Remove
951 reduction_list parameter.
952 (rewrite_all_phi_nodes_with_iv): Same.
953 (canonicalize_loop_ivs): Same.
954 * tree-parloops.c (struct brli): Removed.
955 (build_reduction_list_info): Removed.
956 (build_new_reduction): New.
957 (analyze_reduction_list): Removed.
958 (gather_scalar_reductions): Find reductions instead of phi
959 nodes that can't be canonicalized.
960 (try_create_reduction_list): Remove reduction_list parameter.
961 (gen_parallel_loop): Same.
962 (parallelize_loops): Remove analyze_reductions variable,
963 initialization and free.
964 Change reduction_list htab initialization to reduction_info
965 elements instead of ssa names.
966 Call try_create_reduction_list and gen_parallel_loop without
967 analyzed_reduction argument.
968 * graphite-clast-to-gimple (graphite_loop_normal_form): Call
969 canonicalize_loop_ivs with one less argument.
970 * tree-flow.h (canonicalize_loop_ivs): Remove one argument.
972 2009-07-14 Konrad Trifunovic <konrad.trifunovic@gmail.com>
974 * graphite-dependences.c (new_poly_dr_pair): New.
975 (dependence_polyhedron): Renamed into dependence_polyhedron_1.
976 (new_poly_dr_pair): New.
977 (eq_poly_dr_pair_p): New.
978 (hash_poly_dr_pair_p): New.
979 * graphite-dependences.h (struct poly_dr_pair): New.
980 (eq_poly_dr_pair_p): Declared.
981 (hash_poly_dr_pair_p): Declared.
982 * graphite-poly.c (new_scop): Initialize SCOP_ORIGINAL_PDR_PAIRS.
983 (free_scop): Free SCOP_ORIGINAL_PDR_PAIRS.
984 * graphite-poly.h (struct scop): Add original_pdr_pairs field.
985 * Makefile.in (graphite-poly.o): Add dependence on
986 graphite-dependences.h.
988 2009-07-14 Sebastian Pop <sebastian.pop@amd.com>
990 * graphite-scop-detection.c (graphite_can_represent_scev): Do not let
991 polynomials of degree > 1 pass to Graphite.
992 * tree-chrec.c (scev_is_linear_expression): Call
993 evolution_function_is_affine_multivariate_p.
994 * testsuite/gfortran.dg/graphite/id-10.f90: New.
996 2009-07-14 Sebastian Pop <sebastian.pop@amd.com>
998 * tree-scalar-evolution.c (compute_overall_effect_of_inner_loop):
999 Instantiate scevs varying in outer loops.
1000 * testsuite/gfortran.dg/graphite/id-9.f: Correct testcase.
1002 2009-07-14 Sebastian Pop <sebastian.pop@amd.com>
1004 * graphite-sese-to-poly.c (build_loop_iteration_domains): Do not insert
1005 redundant constraint.
1007 2009-07-14 Sebastian Pop <sebastian.pop@amd.com>
1009 * testsuite/gcc.dg/graphite/graphite.exp: Fix comments.
1010 * testsuite/gfortran.dg/graphite/graphite.exp: Trigger actions
1011 based on the file names as in the C testsuite.
1012 * testsuite/gfortran.dg/graphite/block-1.f90: Fix patterns.
1013 * testsuite/gfortran.dg/graphite/block-2.f: Same.
1014 * testsuite/gfortran.dg/graphite/block-3.f90: Same.
1015 * testsuite/gfortran.dg/graphite/block-4.f90: Same.
1016 * testsuite/gfortran.dg/graphite/id-1.f90: Same.
1017 * testsuite/gfortran.dg/graphite/id-2.f90: Same.
1018 * testsuite/gfortran.dg/graphite/id-3.f90: Same.
1019 * testsuite/gfortran.dg/graphite/id-4.f90: Same.
1020 * testsuite/gfortran.dg/graphite/id-6.f: Same.
1021 * testsuite/gfortran.dg/graphite/id-9.f: Same.
1022 * testsuite/gfortran.dg/graphite/interchange-1.f: Same.
1023 * testsuite/gfortran.dg/graphite/interchange-2.f: Same.
1024 * testsuite/gfortran.dg/graphite/scop-1.f: Same.
1026 2009-07-14 Sebastian Pop <sebastian.pop@amd.com>
1028 * sese.c (expand_scalar_variables_call): New.
1029 (expand_scalar_variables_ssa_name): Handle calls in expander.
1031 2009-07-13 Sebastian Pop <sebastian.pop@amd.com>
1033 * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-6.c:
1034 Expect to see the pattern twice.
1035 * testsuite/gcc.dg/graphite/interchange-0.c: Un-XFAIL.
1036 * testsuite/gcc.dg/graphite/interchange-5.c: Same.
1037 * testsuite/gcc.dg/graphite/interchange-6.c: Same.
1039 2009-07-13 Sebastian Pop <sebastian.pop@amd.com>
1041 * testsuite/gcc.dg/graphite/id-10.c: New.
1042 * testsuite/gcc.dg/graphite/id-12.c: New.
1043 * testsuite/gfortran.dg/graphite/id-7.f: New.
1044 * testsuite/gfortran.dg/graphite/id-8.f: New.
1046 2009-07-13 Sebastian Pop <sebastian.pop@amd.com>
1048 * graphite-sese-to-poly.c (pdr_add_data_dimensions): Fix division by
1051 2009-07-13 Sebastian Pop <sebastian.pop@amd.com>
1053 * sese.c (rename_variables_in_stmt): Call fold_convert during renaming.
1055 2009-07-13 Sebastian Pop <sebastian.pop@amd.com>
1057 * sese.c (expand_scalar_variables_stmt): Avoid unnecessary expansion.
1059 2009-07-10 Sebastian Pop <sebastian.pop@amd.com>
1061 * graphite-sese-to-poly.c (pdr_add_memory_accesses): Fix order of
1062 building PDR subscripts.
1064 2009-07-10 Sebastian Pop <sebastian.pop@amd.com>
1066 * graphite-sese-to-poly.c (pdr_add_data_dimensions): Fix the
1067 computation of array sizes.
1069 2009-07-10 Sebastian Pop <sebastian.pop@amd.com>
1071 * graphite-sese-to-poly.c (add_param_constraints): Disabled.
1073 2009-07-10 Tobias Grosser <grosser@fim.uni-passau.de>
1075 * graphite-dependences.c (map_into_dep_poly, map_dr_into_dep_poly,
1076 build_pairwise_constraint, dr_equality_constraints,
1077 build_pairwise_scheduling_equality,
1078 build_pairwise_scheduling_inequality, lexicographically_gt_p,
1079 build_lexicographically_gt_constraint, dependence_polyhedron,
1080 graphite_legal_transform_dr, graphite_carried_dependence_level_k):
1081 Move from NNC_Polyhedron to C_Polyhedron.
1082 * graphite-interchange.c (compute_array_size_poly,
1083 gather_access_strides): Dito.
1084 * graphite-poly.c (apply_poly_transforms, new_poly_dr, free_poly_bb,
1085 free_scop, pbb_number_of_iterations): Dito.
1086 * graphite-poly.h (struct poly_dr, pdr_nb_subscripts, struct poly_bb,
1087 pbb_dim_iter_domain, struct scop): Dito.
1088 * graphite-ppl.c (new_Constraint_System_from_Cloog_Matrix,
1089 new_Cloog_Domain_from_ppl_Polyhedron,
1090 new_Cloog_Domain_from_ppl_Pointset_Powerset, ppl_set_coef_gmp,
1091 ppl_insert_dimensions_pointset, ppl_insert_dimensions_pointset,
1092 ppl_strip_loop, ppl_strip_loop, ppl_print_polyhedron_matrix,
1093 ppl_print_powerset_matrix, debug_ppl_polyhedron_matrix,
1094 debug_ppl_powerset_matrix, ppl_read_polyhedron_matrix): Dito.
1095 * graphite-ppl.h (ppl_Pointset_Powerset_C_Polyhedron_t,
1096 new_C_Polyhedron_from_Cloog_Matrix, ppl_print_powerset_matrix,
1097 debug_ppl_powerset_matrix, ppl_insert_dimensions_pointset): Dito.
1098 * graphite-sese-to-poly.c (build_pbb_scattering_polyhedrons,
1099 build_loop_iteration_domains, ppl_constraint_type_from_tree_code,
1100 add_condition_to_domain, add_condition_to_pbb, build_scop_context,
1101 build_scop_iteration_domain, build_poly_dr): Dito
1103 2009-07-09 Sebastian Pop <sebastian.pop@amd.com>
1105 * testsuite/gcc.dg/graphite/graphite.exp: Added a rule to execute
1107 * testsuite/gcc.dg/graphite/run-id-1.c: New.
1109 2009-07-09 Sebastian Pop <sebastian.pop@amd.com>
1111 * graphite-sese-to-poly.c (build_loop_iteration_domains): Add the
1112 positivity constraint on the symbolic number of iterations.
1114 2009-07-09 Sebastian Pop <sebastian.pop@amd.com>
1116 * graphite-sese-to-poly.c (build_loop_iteration_domains): Rewrite.
1118 2009-07-09 Sebastian Pop <sebastian.pop@amd.com>
1119 Tobias Grosser <grosser@fim.uni-passau.de>
1121 * graphite-clast-to-gimple.c (build_scop_context): Removed.
1122 (build_cloog_prog): Directly use SCOP_CONTEXT.
1123 * graphite-poly.c (new_scop): Initialize SCOP_CONTEXT.
1124 (free_scop): Free SCOP_CONTEXT.
1125 (print_scop_context): New.
1126 (print_scop): Call print_scop_context.
1127 (debug_scop_context): New.
1128 * graphite-poly.h (print_scop_context, debug_scop_context): Declared.
1129 (struct scop): Added field context.
1130 (SCOP_CONTEXT): New.
1131 * graphite-sese-to-poly.c (add_param_constraints): New.
1132 (build_scop_context): New.
1133 (build_poly_scop): Call build_scop_context.
1135 2009-07-09 Sebastian Pop <sebastian.pop@amd.com>
1137 * graphite-clast-to-gimple.c (gmp_cst_to_tree): Moved...
1138 * graphite-ppl.c (ppl_set_inhomogeneous_gmp, ppl_set_coef_gmp): New.
1139 (ppl_set_inhomogeneous, ppl_set_coef): Moved...
1140 * graphite-ppl.h: Include double-int.h and tree.h.
1141 (ppl_set_inhomogeneous_gmp, ppl_set_coef_gmp): Declared.
1142 (ppl_set_inhomogeneous, ppl_set_coef): ...here.
1143 (gmp_cst_to_tree): ...here. Reimplemented using mpz_get_double_int.
1144 (tree_int_to_gmp, ppl_set_inhomogeneous_tree, ppl_set_coef_tree): New.
1146 2009-07-09 Sebastian Pop <sebastian.pop@amd.com>
1148 * graphite-clast-to-gimple.c (clast_to_gcc_expression_red): Generate
1149 POINTER_PLUS_EXPR for pointer types.
1150 (clast_to_gcc_expression): Same.
1152 2009-07-09 Sebastian Pop <sebastian.pop@amd.com>
1154 * graphite-poly.c (print_scattering_function): Early return when
1155 PBB_TRANSFORMED_SCATTERING is not initialized.
1156 (print_pbb_domain): Early return when PBB_DOMAIN is not initialized.
1158 2009-07-08 Sebastian Pop <sebastian.pop@amd.com>
1160 * tree-parloops.c (analyze_reduction_list): Remove unused variable
1163 2009-07-08 Razya Ladelsky <razya@il.ibm.com>
1165 * tree-parloops.c (analyze_reduction_list): Change return
1167 (try_create_reduction_list): Move the call to
1168 analyze_reduction_list to the beginining.
1169 Call reduction_phi with analyzed_reductions as argument
1170 instead of reduction_list.
1172 2009-07-08 Tobias Grosser <grosser@fim.uni-passau.de>
1174 * Merge from mainline (r148296:149346)
1176 2009-07-07 Sebastian Pop <sebastian.pop@amd.com>
1178 * graphite-scop-detection.c (graphite_can_represent_init): New.
1179 (graphite_can_represent_scev): Call graphite_can_represent_init:
1180 check that the initial value does not contain multiplications of
1182 (stmt_has_simple_data_refs_p): New.
1183 (stmt_simple_for_scop_p): Call stmt_simple_for_scop_p.
1184 (is_simple_operand): Fix formatting.
1185 * graphite-sese-to-poly.c (try_generate_gimple_bb): Fix formatting.
1187 2009-07-07 Sebastian Pop <sebastian.pop@amd.com>
1189 * testsuite/gcc.dg/graphite/id-13.c: New.
1190 * graphite-sese-to-poly.c (graphite_stmt_p): Do not call
1191 analyze_scalar_evolution, use scalar_evolution_in_region.
1192 (scan_tree_for_params_right_scev): Add extra assert.
1193 (parameter_index_in_region_1): Split from parameter_index_in_region.
1194 (idx_record_params): Use scalar_evolution_in_region.
1195 (find_params_in_bb): Same.
1196 (find_scop_parameters): Same.
1197 (build_loop_iteration_domains): Same.
1198 (create_linear_expr_from_tree): Same.
1199 * sese.c (scalar_evolution_in_region): New.
1200 * sese.h (scalar_evolution_in_region): Declared.
1201 (defined_in_sese_p): New.
1202 * tree-scalar-evolution.c (compute_overall_effect_of_inner_loop): Not
1204 * tree-scalar-evolution.h (compute_overall_effect_of_inner_loop):
1207 2009-07-07 Sebastian Pop <sebastian.pop@amd.com>
1209 * Makefile.in: Replace dependences on tree-chrec.h with SCEV_H.
1210 TREE_DATA_REF_H also implies SCEV_H.
1212 2009-07-07 Sebastian Pop <sebastian.pop@amd.com>
1214 * graphite-poly.c (print_scop_params): New.
1215 (print_scop): Call print_scop_params.
1216 (debug_scop_params): New.
1217 * graphite-poly.h (print_scop_params, debug_scop_params): Declared.
1219 2009-07-07 Li Feng <nemokingdom@gmail.com>
1221 * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-4.c: New.
1222 * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-5.c: New.
1223 * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-6.c: New.
1224 * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-7.c: New.
1225 * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-8.c: New.
1226 * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-9.c: New.
1228 2009-07-07 Li Feng <nemokingdom@gmail.com>
1230 * graphite-clast-to-gimple.c (mark_loops_parallel): Dump information
1231 for dependency checking part.
1232 * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-1.c: Add
1233 tests for dependency checking.
1234 * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-2.c: Ditto.
1235 * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-3.c: Ditto.
1236 * testsuite/gcc.dg/graphite/graphite_autopar/graphite_autopar.exp: Add
1237 flag -fdump-tree-graphite-all for autopar testsuites.
1239 2009-07-06 Sebastian Pop <sebastian.pop@amd.com>
1241 * Makefile.in (tree-ssa-loop-manip.o): Depends on langhooks.h.
1242 * tree-parloops.c (rewrite_phi_with_iv, rewrite_all_phi_nodes_with_iv,
1243 canonicalize_loop_ivs): Moved...
1244 * tree-ssa-loop-manip.c: ... here. Include langhooks.h.
1246 2009-07-06 Sebastian Pop <sebastian.pop@amd.com>
1248 * tree-parloops.c (try_create_reduction_list): Pass an extra
1249 argument analyzed_reductions. Call analyze_reduction_list.
1250 (gen_parallel_loop): Do not call analyze_reduction_list.
1251 (parallelize_loops): Init and finalize analyzed_reductions.
1253 2009-07-06 Li Feng <nemokingdom@gmail.com>
1255 * testsuite/gcc.dg/graphite/graphite_autopar/graphite_autopar.exp:
1256 Added flag -fno-loop-strip-mine for autopar testcase.
1258 2009-07-04 Li Feng <nemokingdom@gmail.com>
1260 * graphite-dependences.c (graphite_carried_dependence_level_k): Use
1261 transformed scattering dimension instead of unmatch orignal when
1262 calling dependence_polyhedron.
1264 2009-06-30 Sebastian Pop <sebastian.pop@amd.com>
1266 * opts.c (decode_options): Enable flag_loop_strip_mine at -O2.
1268 2009-06-30 Sebastian Pop <sebastian.pop@amd.com>
1270 * graphite-poly.c (pbb_number_of_iterations): Check for returned
1271 value 1 from ppl_Pointset_Powerset_NNC_Polyhedron_maximize.
1273 2009-06-30 Sebastian Pop <sebastian.pop@amd.com>
1275 * graphite-blocking.c (pbb_strip_mine_profitable_p): New.
1276 (pbb_do_strip_mine): Call pbb_strip_mine_profitable_p.
1277 * graphite-poly.c (pbb_number_of_iterations): New.
1278 * graphite-poly.h (pbb_number_of_iterations): Declared.
1279 (pbb_iterator_dim, pbb_parameter_dim): New.
1281 2009-06-29 Sebastian Pop <sebastian.pop@amd.com>
1283 * graphite-clast-to-gimple.c (graphite_create_new_loop): Revert the
1284 last commit on type of lower and upper bound of loops.
1286 2009-06-29 Li Feng <nemokingdom@gmail.com>
1288 * Makefile.in (graphite-clast-to-gimple.o): Added dependence on
1289 graphite-dependences.h.
1290 * graphite-clast-to-gimple.c (new_bb_pbb_def): New.
1291 (mark_bb_with_pbb): New.
1292 (get_stmtfor_depth): New.
1293 (find_pbb_via_hash): New.
1294 (dependency_in_loop_p): New.
1295 (mark_loops_parallel): New.
1296 (free_aux_in_new_loops): New.
1297 (translate_clast): Add parameter BB_PBB_MAPPING. Mark newly created
1298 bb with it's relevant pbb. Mark newly created loops. Remove mark
1299 innermost loop parallel without checking.
1300 (gloog): Add parameter BB_PBB_MAPPING.
1301 * graphite-clast-to-gimple.h (struct bb_pbb_def): New.
1302 (gloog): Change declaration.
1303 (mark_loop_parallel): Make extern.
1304 (free_aux_in_new_loops): Declare.
1305 (bb_pbb_map_hash): New.
1306 (eq_bb_pbb_map): New.
1307 * graphite.c (graphite_transform_loops): Added BB_PBB_MAPPING. Trigger
1308 auto parallelization when flag_graphite_force_parallel is set.
1309 (graphite_finalize): Added free_aux_in_new_loops.
1310 * tree-parloops.c (parallelize_loops): Only generate parallel code for
1311 the innermost loop that marked parallel. Use
1312 flag_graphite_force_parallel instead of loop->can_be_parallel.
1313 (loop_parallel_p): Move inner most checking out of function.
1315 2009-06-26 Sebastian Pop <sebastian.pop@amd.com>
1317 * graphite-clast-to-gimple.c (graphite_create_new_loop): Make the
1318 type of lower and upper bound of loops signed long int.
1320 2009-06-26 Sebastian Pop <sebastian.pop@amd.com>
1322 * cfgloopmanip.c (create_empty_loop_on_edge): Gimplify the loop exit
1323 expression outside the loop.
1325 2009-06-26 Sebastian Pop <sebastian.pop@amd.com>
1327 * gcc.dg/graphite/interchange-8.c: New.
1329 2009-06-26 Sebastian Pop <sebastian.pop@amd.com>
1331 * gcc.dg/graphite/interchange-0.c: XFailed.
1332 * gcc.dg/graphite/interchange-5.c: XFailed.
1333 * gcc.dg/graphite/interchange-6.c: XFailed.
1335 2009-06-26 Sebastian Pop <sebastian.pop@amd.com>
1337 * graphite-interchange.c (compute_array_size_poly): The end of the
1338 recursion should return 1.
1340 2009-06-26 Sebastian Pop <sebastian.pop@amd.com>
1342 * graphite-interchange.c (compute_array_size_cstr): Allow the
1343 subscript multiplier to be -1.
1344 (compute_array_size): Use PDR_DATA_CONTAINER and not PDR_ACCESSES.
1345 * graphite-poly.c (new_poly_dr): Takes an extra argument for the
1346 data_container. Initializes PDR_DATA_CONTAINER.
1347 (print_pdr_access_layout): New.
1348 (print_pdr): Call print_pdr_access_layout. Print PDR_DATA_CONTAINER.
1349 * graphite-poly.h (struct poly_dr): Adjust comment. Add a new field
1351 (PDR_DATA_CONTAINER): New.
1352 (new_poly_dr): Update declaration.
1353 * graphite-sese-to-poly.c (pdr_add_data_dimensions): New.
1354 (build_poly_dr): Call pdr_add_data_dimensions.
1356 2009-06-26 Sebastian Pop <sebastian.pop@amd.com>
1358 * graphite-poly.h (struct poly_dr): Fix comment.
1359 * graphite-sese-to-poly.c (pdr_add_alias_set): New.
1360 (pdr_add_memory_accesses): New.
1361 (build_poly_dr): Call pdr_add_memory_accesses and pdr_add_alias_set.
1363 2009-06-26 Sebastian Pop <sebastian.pop@amd.com>
1365 * graphite-poly.c (print_pdrs, debug_pdrs): New.
1366 (print_pbb): Add call to print_pdrs.
1367 * graphite-poly.h (print_pdrs, debug_pdrs): Declared.
1369 2009-06-24 Konrad Trifunovic <konrad.trifunovic@gmail.com>
1370 Li Feng <nemokingdom@gmail.com>
1372 * graphite-dependences.c (graphite_carried_dependence_level_k): New.
1373 (dependency_between_pbbs_p): New.
1374 (lexicographically_gt_p): Assure !empty_p before polyhedron
1375 intersection assign.
1376 (build_lexicographically_gt_constraint): Correct lexicographically
1378 * graphite-dependences.h: New.
1379 * Makefile.in (graphite-dependences.o): Add graphite-dependences.h.
1381 2009-06-24 Sebastian Pop <sebastian.pop@amd.com>
1383 * graphite-clast-to-gimple.c (print_clast_stmt): New.
1384 (gloog): Print to dump_file the generated clast.
1385 * graphite-clast-to-gimple.h (print_clast_stmt): Declared.
1386 * graphite-interchange.c (pbb_do_interchange): Fix dump formatting.
1388 2009-06-24 Sebastian Pop <sebastian.pop@amd.com>
1390 * graphite-poly.c (extend_scattering): Increment
1391 PBB_NB_LOCAL_VARIABLES by the number of added dimensions.
1393 2009-06-24 Sebastian Pop <sebastian.pop@amd.com>
1395 * graphite-interchange.c (compute_array_size_poly): Added exit of
1396 recursion condition. Continue iterating even after the first equality.
1397 (compute_array_size): Same.
1399 2009-06-24 Li Feng <nemokingdom@gmail.com>
1401 * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-1.c: Update
1402 -fdump-tree-final_cleanup to -fdump-tree-optimized.
1403 * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-2.c: Ditto.
1404 * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-3.c: Ditto.
1405 * testsuite/gcc.dg/graphite/graphite_autopar/graphite_autopar.exp: Ditto.
1407 2009-06-23 Sebastian Pop <sebastian.pop@amd.com>
1409 * sese.c (expand_scalar_variables_stmt): Expand scalar variables
1410 only when the use verifies is_gimple_reg.
1412 2009-06-23 Sebastian Pop <sebastian.pop@amd.com>
1414 * graphite-clast-to-gimple.c (build_cloog_prog): Fix memory corruption.
1415 Allocate scaldims after call to unify_scattering_dimensions.
1417 2009-06-23 Sebastian Pop <sebastian.pop@amd.com>
1419 * graphite-clast-to-gimple.c (translate_clast): Fix memory leak.
1421 2009-06-23 Sebastian Pop <sebastian.pop@amd.com>
1422 Albert Cohen <albert.cohen@inria.fr>
1424 * graphite-blocking.c (pbb_strip_mine_loop_depth): Do not use local
1425 variables for the strip mining.
1427 2009-06-23 Sebastian Pop <sebastian.pop@amd.com>
1428 Pranav Garg <pranav.garg2107@gmail.com>
1430 * Makefile.in (OBJS-common): Added graphite-blocking.o.
1431 (graphite-sese-to-poly.o): Moved down to be in lexicographical order.
1432 (graphite-blocking.o): New rule.
1433 (graphite-poly.o, graphite-ppl.o): Moved to be in lexicographical order.
1434 * graphite-blocking.c: New.
1435 * graphite-poly.c (apply_poly_transforms): Call scop_do_strip_mine for
1436 flag_loop_strip_mine.
1437 (psct_scattering_dim_for_loop_depth): New.
1438 * graphite-poly.h (scop_do_strip_mine): Declared.
1439 (psct_add_local_variable): Increment PBB_NB_LOCAL_VARIABLES.
1440 * tree-ssa-loop.c (gate_graphite_transforms): Do not fail when using
1441 flag_loop_strip_mine.
1443 2009-06-23 Sebastian Pop <sebastian.pop@amd.com>
1445 * graphite-poly.c (extend_scattering): Avoid initializing and freeing
1446 a GMP value and a PPL coefficient at each iteration of a loop.
1448 2009-06-23 Sebastian Pop <sebastian.pop@amd.com>
1450 * graphite-dependences.c (dependence_polyhedron): Do not use
1451 pbb_nb_scattering_dims anymore. Use pbb_nb_scattering_orig and
1452 pbb_nb_scattering_transform.
1453 (graphite_legal_transform_dr): Same.
1454 * graphite-poly.c (extend_scattering): Same.
1455 (unify_scattering_dimensions): Same.
1456 (print_scattering_function): Same.
1457 (new_poly_bb): Initialize PBB_NB_SCATTERING_TRANSFORM and
1458 PBB_NB_LOCAL_VARIABLES.
1459 * graphite-poly.h (pbb_nb_scattering): Removed declaration.
1460 (struct poly_bb): Added nb_local_variables and nb_scattering_transform.
1461 (PBB_NB_LOCAL_VARIABLES, PBB_NB_SCATTERING_TRANSFORM): New.
1462 (pbb_nb_scattering_orig, pbb_nb_scattering_transform): New.
1463 (pbb_nb_scattering_dims, pbb_nb_scattering): Removed.
1464 (pbb_nb_scattering_transform): New.
1465 (pbb_nb_local_vars): Return PBB_NB_LOCAL_VARIABLES.
1466 (psco_scattering_dim): Add assert on parameters.
1467 (psct_scattering_dim): Same.
1468 (psct_scattering_dim_for_loop_depth): Declared.
1469 (psct_local_var_dim): New.
1470 (psco_iterator_dim, psco_parameter_dim): Add assert on parameters.
1471 (psct_iterator_dim, psct_parameter_dim): Same. To maintain the
1472 correct layout, call pbb_nb_local_vars.
1473 (psct_add_local_variable, psct_add_scattering_dimension): New.
1474 * graphite-sese-to-poly.c (build_pbb_scattering_polyhedrons):
1475 Initialize PBB_NB_SCATTERING_TRANSFORM.
1477 2009-06-23 Sebastian Pop <sebastian.pop@amd.com>
1479 * graphite-ppl.c (set_inhomogeneous): Renamed ppl_set_inhomogeneous.
1480 (set_coef): Renamed ppl_set_coef.
1481 * graphite-ppl.h (ppl_set_inhomogeneous, ppl_set_coef): Declared.
1483 2009-06-23 Sebastian Pop <sebastian.pop@amd.com>
1485 * graphite-dependences.c (build_pairwise_scheduling_inequality): Don't
1486 test a boolean against 1.
1487 * graphite-interchange.c (pbb_interchange_loop_depths): Do not build
1488 a new polyhedron for the PBB_TRANSFORMED_SCATTERING.
1489 (pbb_do_interchange): Returns true when a transform has been performed.
1490 (scop_do_interchange): Same.
1491 * graphite-poly.c (apply_poly_transforms): Use the return value of
1492 scop_do_interchange.
1493 * graphite-poly.h (scop_do_interchange): Update declaration.
1495 2009-06-23 Tobias Grosser <grosser@fim.uni-passau.de>
1497 * graphite-clast-to-gimple.c (gloog): Reset loop->aux right
1499 * sese.c (sese_reset_aux_in_loops): New.
1500 * sese.h (sese_reset_aux_in_loops): New.
1502 2009-06-19 Sebastian Pop <sebastian.pop@amd.com>
1504 * graphite-sese-to-poly.c (scan_tree_for_params_int): Pass in the
1505 multiplier and multiply the constant by the multiplier.
1506 (scan_tree_for_params): Bound the multiplier to its MULT_EXPR.
1507 (build_poly_dr): Do not use the multiplier to define the subscript.
1509 2009-06-19 Sebastian Pop <sebastian.pop@amd.com>
1511 * graphite-poly.c (new_poly_dr): Pass an extra argument for the
1512 compiler's data reference. Initialize PDR_CDR.
1513 (print_pdr): Call dump_data_reference.
1514 * graphite-poly.h (struct poly_dr): Rename black_box into pbb.
1515 Add compiler_dr field.
1516 (PDR_BB): Renamed PDR_PBB.
1518 * graphite-sese-to-poly.c (build_poly_dr): Pass to new_poly_dr
1519 GCC's data reference representation.
1520 * tree-data-ref.c (debug_data_references, debug_data_reference): New.
1521 * tree-data-ref.h (debug_data_references, debug_data_reference): Decl.
1523 2009-06-19 Sebastian Pop <sebastian.pop@amd.com>
1525 * graphite-poly.c (print_scattering_function): Also print the layout.
1526 * graphite-poly.h (pbb_nb_local_vars): New.
1528 2009-06-19 Sebastian Pop <sebastian.pop@amd.com>
1530 * graphite-poly.c (print_pbb_domain): Also print the layout names.
1532 2009-06-19 Sebastian Pop <sebastian.pop@amd.com>
1534 * graphite-poly.c (print_pdr, debug_pdr): New.
1535 * graphite-poly.h (print_pdr, debug_pdr): Declared.
1536 (PDR_BASE): Removed.
1538 2009-06-18 Sebastian Pop <sebastian.pop@amd.com>
1540 * gcc/testsuite/gcc.dg/graphite/interchange-{1..7}.c: New avatars of
1543 2009-06-18 Sebastian Pop <sebastian.pop@amd.com>
1545 * graphite-interchange.c (compute_subscript): Allow also -1 in the
1546 subscript identification column.
1547 (pbb_do_interchange): Print to dump_file that some loops "will be
1548 interchanged". Rely on that chain of characters in the testcases.
1549 * gcc.dg/graphite/interchange-0.c: New.
1550 * gcc.dg/graphite/graphite.exp: Iterate over the testsuite
1551 interchange-*.c files and compile them with -floop-interchange.
1553 2009-06-18 Pranav Garg <pranav.garg2107@gmail.com>
1555 * graphite-interchange.c (interchange_profitable_p): Renamed
1556 pbb_interchange_profitable_p.
1558 2009-06-18 Sebastian Pop <sebastian.pop@amd.com>
1559 Harsha Jagasia <harsha.jagasia@amd.com>
1560 Pranav Garg <pranav.garg2107@gmail.com>
1562 * graphite-interchange.c (interchange_profitable_p): Make static.
1563 (pbb_interchange_loop_depths, pbb_do_interchange,
1564 scop_do_interchange): New.
1565 * graphite-poly.c (apply_poly_transforms): Call scop_do_interchange
1566 for flag_loop_interchange.
1567 * graphite-poly.h (scop_do_interchange): Declared.
1568 * tree-ssa-loop.c (gate_graphite_transforms): Do not fail when
1569 flag_loop_interchange is used.
1571 2009-06-18 Sebastian Pop <sebastian.pop@amd.com>
1573 * graphite-dependences.c (dependence_polyhedron): Update use of
1574 pbb_nb_scattering_dims.
1575 * graphite-poly.h (pbb_nb_scattering_dims): Do not pass SCOP.
1576 (pbb_nb_scattering): Update use of pbb_nb_scattering_dims.
1577 (psco_scattering_dim, psct_scattering_dim, psco_iterator_dim,
1578 psct_iterator_dim, psco_parameter_dim, psct_parameter_dim): New.
1580 2009-06-16 Sebastian Pop <sebastian.pop@amd.com>
1582 * graphite.c: Cleanup foo.
1584 2009-06-16 Sebastian Pop <sebastian.pop@amd.com>
1586 * Merge from mainline (r143684:148293).
1587 * Disabled libpcp until it gets fixed.
1589 2009-06-05 Sebastian Pop <sebastian.pop@amd.com>
1590 Harsha Jagasia <harsha.jagasia@amd.com>
1592 * graphite-interchange.c: New.
1593 * Makefile.in (graphite-interchange.o): New.
1594 * graphite-poly.h (interchange_profitable_p): Declared.
1595 * graphite-ppl.h (value_max): New.
1597 2009-06-04 Sebastian Pop <sebastian.pop@amd.com>
1599 * graphite-dependences.c (dependence_polyhedron): Use pdr_dim.
1600 * graphite-poly.h: Fix some comments.
1604 2009-06-04 Sebastian Pop <sebastian.pop@amd.com>
1607 (pdr_accessp_nb_subscripts): Renamed pdr_nb_subscripts.
1608 (pdr_accessp_nb_iterators): Renamed pdr_dim_iter_domain.
1609 (pdr_accessp_nb_params): Renamed pdr_nb_params.
1610 (pdr_accessp_alias_set_dim): Renamed pdr_alias_set_dim.
1611 (pdr_accessp_subscript_dim): Renamed pdr_subscript_dim.
1612 (pdr_accessp_iterator_dim): Renamed pdr_iterator_dim.
1613 (pdr_accessp_param_dim): Renamed pdr_parameter_dim.
1614 (pbb_nb_loops): Renamed pbb_dim_iter_domain.
1615 * graphite-clast-to-gimple.c: Same.
1616 * graphite-dependences.c: Same.
1617 * graphite-poly.c: Same.
1618 * graphite-sese-to-poly.c: Same.
1620 2009-06-03 Sebastian Pop <sebastian.pop@amd.com>
1622 * graphite-clast-to-gimple.c (build_iv_mapping): Insert full
1623 expressions for an IV rename, as returned by clast_to_gcc_expression.
1624 (copy_renames): Rename new_name to expr.
1625 * sese.c (debug_rename_elt): Same.
1628 (sese_adjust_liveout_phis): Call force_gimple_operand before using
1629 the information from the rename map.
1630 (rename_variables_in_stmt): Same.
1631 (add_loop_exit_phis): Rename new_name to expr.
1632 (insert_loop_close_phis): Same.
1633 (add_guard_exit_phis): Same. Call force_gimple_operand.
1634 * sese.h (struct rename_map_elt): Rename new_name to expr.
1635 (new_rename_map_elt): Same.
1637 2009-06-03 Sebastian Pop <sebastian.pop@amd.com>
1639 * graphite-clast-to-gimple.c (build_iv_mapping): Use set_rename.
1640 * sese.c (set_rename): Make it extern.
1641 * sese.h (set_rename): Declared.
1643 2009-06-03 Sebastian Pop <sebastian.pop@amd.com>
1645 * graphite-poly.c (extend_scattering): Free values.
1646 * graphite-ppl.c (new_Cloog_Domain_from_ppl_Pointset_Powerset):
1648 (ppl_print_powerset_matrix): Same.
1649 * graphite-scop-detection.c (free_scops_1): New.
1650 (limit_scops): Call free_scops_1.
1651 * graphite-sese-to-poly.c (build_scop_bbs_1): Free dom.
1652 (build_poly_dr): Free PPL coefficients.
1653 * tree-parloops.c (rewrite_all_phi_nodes_with_iv): Free bbs.
1655 2009-06-02 Sebastian Pop <sebastian.pop@amd.com>
1657 * graphite-dependences.c: New.
1658 * graphite-data-ref.c: Removed.
1659 * graphite-data-ref.h: Removed.
1660 * Makefile.in (graphite-data-ref.o): Removed.
1661 (graphite-dependences.o): Added.
1662 * graphite-clast-to-gimple.c: Remove dependence on graphite-data-ref.h.
1663 * graphite-poly.c: Same.
1664 Move the data dependence testing to graphite-dependences.c.
1666 2009-05-19 Tobias Grosser <grosser@fim.uni-passau.de>
1668 * graphite-scop-detection.c (graphite_can_represent_loop): Renamed
1669 from graphite_cannot_represent_loop. Code refactored.
1670 (scopdet_basic_block_info): Call graphite_can_represent_loop.
1672 2009-05-17 Li Feng <nemokingdom@gmail.com>
1674 * testsuite/gcc.dg/graphite/graphite_autopar/graphite_autopar.exp:
1675 Cover all the testcases (not only the filtered ones).
1677 2009-05-17 Tobias Grosser <grosser@fim.uni-passau.de>
1679 * graphite-scop-detection.c (stmt_simple_for_scop_p): Remove
1680 unnecessary check. Update comments. Move check for REAL_TYPE here.
1681 (harmful_stmt_in_bb): Remove checks for conditions. This is already
1682 done in (stmt_simple_for_scop_p).
1684 2009-05-14 Tobias Grosser <grosser@fim.uni-passau.de>
1686 * graphite.c (print_global_statistics): New.
1687 (print_graphite_scop_statistic): New.
1688 (print_graphite_statistics): New.
1689 (graphite_initialize, graphite_transform_loops): Print statistics.
1690 * graphite-scop-detection (build_scops): Print statistics.
1691 (print_graphite_scop_statistics): New.
1692 (print_graphite_statistics): New.
1694 2009-05-13 Sebastian Pop <sebastian.pop@amd.com>
1696 * graphite-clast-to-gimple.c (struct clast_name_index): Removed.
1697 (debug_clast_name_index): Removed.
1698 (debug_clast_name_indexes_1): Removed.
1699 (debug_clast_name_indexes): Removed.
1700 (clast_name_index_elt_info): Removed.
1701 (eq_clast_name_indexes): Removed.
1702 (clast_name_to_index): Removed.
1703 (new_clast_name_index): Removed.
1704 (save_clast_name_index): Removed.
1705 (save_var_name): Moved...
1706 (init_sese_params_index): Removed.
1707 (clast_name_to_gcc): Remove use of name_tree.
1708 (initialize_cloog_names): Same.
1709 (gloog): Do not call init_sese_params_index.
1710 * graphite-sese-to-poly.c (save_var_name): ...here.
1711 (parameter_index_in_region): New.
1712 * sese.c (new_sese): Initialize SESE_PARAMS_NAMES.
1713 (parameter_index_in_region): Removed.
1714 (is_parameter): Remove use of name_tree.
1715 * sese.h (struct name_tree): Removed.
1716 (struct sese): Remove use of name_tree. New field params_names.
1717 (SESE_PARAMS_NAMES): New.
1718 (SESE_PARAMS): Remove duplicate.
1719 (parameter_index_in_region): Removed.
1720 (sese_nb_params): Remove use of name_tree.
1721 (struct clast_name_index): New.
1722 (new_clast_name_index): New.
1723 (clast_name_to_index): New.
1724 (save_clast_name_index): New.
1725 (debug_clast_name_index): New.
1726 (debug_clast_name_indexes_1): New.
1727 (debug_clast_name_indexes): New.
1728 (clast_name_index_elt_info): New.
1729 (eq_clast_name_indexes): New.
1731 2009-05-13 Sebastian Pop <sebastian.pop@amd.com>
1733 * graphite-clast-to-gimple.c (compute_cloog_iv_types_1): Call
1734 pbb_to_depth_to_oldiv. Remove call to oldiv_for_loop.
1735 (graphite_loop_normal_form): Do not pass region. Do not
1736 initialize SESE_OLDIVS.
1737 (build_graphite_loop_normal_form): Update call to
1738 graphite_loop_normal_form.
1739 * sese.c (debug_oldivs): Removed.
1740 (new_sese): Do not initialize SESE_OLDIVS.
1741 (free_sese): Do not free SESE_OLDIVS.
1742 (oldiv_for_loop): Removed.
1743 * sese.h (struct sese): Remove old_ivs.
1744 (SESE_OLDIVS): Removed.
1745 (oldiv_for_loop): Removed.
1747 2009-05-13 Sebastian Pop <sebastian.pop@amd.com>
1749 * graphite-clast-to-gimple.c (clast_name_to_gcc): Pass newivs,
1750 remove ivstack. Remove call to loop_iv_stack_get_iv_from_name,
1751 replaced by a call to newivs_to_depth_to_newiv.
1752 (clast_to_gcc_expression): Pass newivs, remove ivstack.
1753 (clast_to_gcc_expression_red): Same.
1754 (gcc_type_for_clast_expr): Same.
1755 (gcc_type_for_clast_eq): Same.
1756 (graphite_translate_clast_equation): Same.
1757 (graphite_create_guard_cond_expr): Same.
1758 (graphite_create_new_guard): Same.
1759 (graphite_create_new_loop): Same.
1760 (build_iv_mapping): Same.
1761 (translate_clast): Same.
1763 (loop_iv_stack_patch_for_consts): Removed. *
1764 sese.c (iv_stack_entry_is_constant): Removed.
1765 (iv_stack_entry_is_iv): Removed.
1766 (loop_iv_stack_push_iv): Removed.
1767 (loop_iv_stack_insert_constant): Removed.
1768 (loop_iv_stack_pop): Removed.
1769 (loop_iv_stack_get_iv): Removed.
1770 (loop_iv_stack_get_iv_from_name): Removed.
1771 (debug_loop_iv_stack): Removed.
1772 (free_loop_iv_stack): Removed.
1773 (loop_iv_stack_remove_constants): Removed. *
1774 sese.h (iv_stack_entry_kind): Removed.
1775 (iv_stack_entry_data_union): Removed.
1776 (iv_stack_entry_struct): Removed.
1777 (iv_stack_entry_p): Removed.
1778 (debug_oldivs, debug_loop_iv_stack, loop_iv_stack_insert_constant,
1779 loop_iv_stack_get_iv_from_name, loop_iv_stack_push_iv,
1780 loop_iv_stack_get_iv, loop_iv_stack_remove_constants,
1781 loop_iv_stack_pop, free_loop_iv_stack): Removed.
1782 (gbb_loop_at_index): Fix indenting.
1783 (gbb_loop_index): Removed.
1785 2009-05-13 Sebastian Pop <sebastian.pop@amd.com>
1787 * graphite-clast-to-gimple.c (clast_name_to_gcc): Do not use strcmp.
1788 Call clast_name_to_index.
1790 2009-05-13 Sebastian Pop <sebastian.pop@amd.com>
1792 * graphite-clast-to-gimple.c (clast_name_to_gcc): Pass region,
1793 do not pass params. Get params from SESE_PARAMS.
1794 (clast_to_gcc_expression): Same.
1795 (clast_to_gcc_expression_red): Same.
1796 (gcc_type_for_clast_eq): Same.
1797 (graphite_translate_clast_equation): Same.
1798 (graphite_create_new_loop): Same.
1799 * sese.c (rename_variables_in_stmt): Fix comment.
1801 2009-05-13 Sebastian Pop <sebastian.pop@amd.com>
1803 * graphite-clast-to-gimple.c (graphite_create_new_loop): Pass
1805 Call save_clast_name_index.
1806 (translate_clast): Pass newivs_index.
1807 (gloog): Create and free newivs_index.
1809 2009-05-13 Sebastian Pop <sebastian.pop@amd.com>
1811 * graphite-clast-to-gimple.c (clast_name_index): New structure.
1812 (clast_name_index_p): New type.
1813 (debug_clast_name_index): New.
1814 (debug_clast_name_indexes_1): New.
1815 (debug_clast_name_indexes): New.
1816 (clast_name_index_elt_info): New.
1817 (eq_clast_name_indexes): New.
1818 (clast_name_to_index): New.
1819 (new_clast_name_index): New.
1820 (save_clast_name_index): New.
1821 (init_sese_params_index): New.
1822 (gloog): Call init_sese_params_index.
1823 * graphite-clast-to-gimple.h (debug_clast_name_indexes): Declared.
1824 * sese.c (new_sese): Initialize SESE_PARAMS_INDEX.
1825 (free_sese): Free SESE_PARAMS_INDEX.
1826 * sese.h (struct sese): Add params_index.
1827 (SESE_PARAMS_INDEX): New.
1829 2009-05-13 Sebastian Pop <sebastian.pop@amd.com>
1831 * graphite-clast-to-gimple.c (newivs_to_depth_to_newiv): New.
1832 (graphite_create_new_loop): Pass the newivs vector. Push the
1833 newly created IV to newivs.
1834 (translate_clast): Pass the newivs vector.
1835 (gloog): Create and destroy the newivs vector.
1837 2009-05-13 Sebastian Pop <sebastian.pop@amd.com>
1839 * graphite-clast-to-gimple.c (pbb_to_depth_to_oldiv): New.
1840 (graphite_loop_normal_form): Initialize loop->aux with the unique
1841 IV that has been created.
1843 2009-05-13 Tobias Grosser <grosser@fim.uni-passau.de>
1845 * tree-chrec.c (evolution_function_right_is_integer_cst): Allow
1846 scev with parameters in the base part. They where forbidden
1849 2009-05-11 Li Feng <nemokingdom@gmail.com>
1851 * testsuite/gcc.dg/graphite/graphite.exp: Set different default
1852 compile options by file names.
1853 * testsuite/gcc.dg/graphite/block{0-6}.c: Remove dg-option line.
1854 * testsuite/gcc.dg/graphite/id-{1-9}.c: Ditto.
1855 * testsuite/gcc.dg/graphite/scop-{0-20}.c: Ditto.
1856 * testsuite/gcc.dg/graphite/scop-matmult.c: Ditto.
1858 2009-05-08 Li Feng <nemokingdom@gmail.com>
1860 * testsuite/gcc.dg/graphite/graphite_autopar/graphite_autopar.exp: New.
1861 * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-1.c: New.
1862 * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-2.c: New.
1863 * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-3.c: New.
1865 2009-05-07 Tobias Grosser <grosser@fim.uni-passau.de>
1867 * graphite-scop-detection (build_scops_1): Fix little bug introduced
1870 2009-05-07 Tobias Grosser <grosser@fim.uni-passau.de>
1872 * graphite-scop-detection.c (graphite_can_represent_scev): Only
1873 allow integer constant strides.
1874 (graphite_can_represent_expr): Depend on outermost_loop.
1875 (stmt_simple_memref_p, graphite_cannot_represent_loop,
1876 harmful_stmt_in_bb, is_simple_operand, stmt_simple_for_scop_p,
1877 build_scops_1): Same.
1878 (scopdet_basic_block_info): Same and insert layered SCoP
1880 (try_generate_gimple_bb): Cleanup.
1881 (build_scops): Enable data references.
1883 * testsuite/gcc.dg/graphite/id-5.c: New.
1884 * testsuite/gcc.dg/graphite/id-9.c: New.
1885 * tree-chrec.c (evolution_function_right_is_integer_cst): New.
1886 * tree-chrec.h (evolution_function_right_is_integer_cst): New.
1888 2009-05-06 Tobias Grosser <grosser@fim.uni-passau.de>
1890 * sese.c (expand_scalar_variables_ssa_name): Only build expressions,
1891 that we have not yet built for this SCoP.
1893 2009-05-06 Tobias Grosser <grosser@fim.uni-passau.de>
1895 * sese.c (expand_scalar_variables_expr): Fix expand_scalar_variables
1896 for complex numbers.
1898 2009-05-06 Tobias Grosser <grosser@fim.uni-passau.de>
1900 * graphite-ppl.c: Fix build if cloog is not available.
1902 2009-05-04 Li Feng <nemokingdom@gmail.com>
1904 * tree-parloops.c (loop_parallel_p): Remove construction of
1905 NITER and REDUCTION_LIST.
1906 (try_get_loop_niter): New.
1907 (try_create_reduction_list): New.
1908 (parallelize_loops): Bypass the failed checkings in autopar
1909 when can_be_parallel in loop structure is set to true.
1911 2009-05-01 Tobias Grosser <grosser@fim.uni-passau.de>
1913 * testsuite/gcc.dg/graphite/id-6.c: Update testcase.
1914 * testsuite/gcc.dg/graphite/scop-3.c: Dito.
1916 2009-05-01 Tobias Grosser <grosser@fim.uni-passau.de>
1918 * graphite-scop-detection.c (stmt_simple_for_scop_p):
1919 Enable EQ_EXPR and NE_EXPR again.
1921 2009-04-30 Tobias Grosser <grosser@fim.uni-passau.de>
1923 * graphite-scop-detection.c (graphite_can_represent_scev):
1924 Add check if scev is affine multivariate.
1925 (harmful_stmt_in_bb): Check if we can represent the conditions.
1926 (scopdet_basic_block_info (basic_block bb, VEC): Pass the loop to
1928 * testsuite/gcc.dg/graphite/id-7.c: New.
1930 2009-04-30 Tobias Grosser <grosser@fim.uni-passau.de>
1932 * graphite-sese-to-poly.c (bb_contains_non_iv_scalar_phi_nodes):
1933 Check all bbs in region, not only the bbs that are represented in
1935 (build_poly_scop): Add newline.
1936 * testsuite/gcc.dg/graphite/id-8.c: New.
1938 2009-04-30 Li Feng <nemokingdom@gmail.com>
1940 * cfgloop.c (alloc_loop): Initialize can_be_parallel to false
1941 when loop initialize.
1942 * cfgloop.h (struct loop): Introduce flag can_be_parallel.
1943 * common.opt: Declare flag_graphite_force_parallel.
1944 * graphite-clast-to-gimple.c (translate_clast): Mark the innermost
1946 * graphite-poly.c (apply_poly_transforms): Introduce
1947 flag_graphite_force_parallel.
1948 * tree-ssa-loop.c (gate_graphite_transforms): ditto.
1949 * toplev.c (process_options): ditto and replace a not correctly
1952 2009-04-30 Li Feng <nemokingdom@gmail.com>
1954 * graphite-clast-to-gimple.c (loop_iv_stack_patch_for_consts):
1955 Change the call of gbb_loop_at_index and/or gbb_loop_index due
1956 to the redefinition.
1957 (compute_cloog_iv_types_1): ditto.
1958 (build_iv_mapping): ditto.
1959 * graphite-sese-to-poly.c (new_gimple_bb): Remove GBB_LOOPS related
1961 (free_gimple_bb): Removed GBB_LOOPS related free part.
1962 (build_bb_loops): Removed.
1963 * sese.h (struct gimple_bb): Removed loops.
1964 (GBB_LOOPS): Removed.
1965 (gbb_loop_at_index): Instead of using GBB_LOOPS, we use sese instead.
1966 (gbb_loop_index): ditto.
1968 2009-04-24 Tobias Grosser <grosser@fim.uni-passau.de>
1970 * graphite-scop-detection.c (graphite_can_represent_scev): Do not
1971 allow non constant strides.
1972 * testsuite/gcc.dg/graphite/scop-20.c: New.
1974 2009-04-24 Sebastian Pop <sebastian.pop@amd.com>
1976 * graphite-scop-detection.c (dot_all_scops): Fix system call
1977 return value warning.
1980 2009-04-24 Sebastian Pop <sebastian.pop@amd.com>
1982 * testsuite/gcc.dg/graphite/id-6.c: Fix pattern.
1983 * testsuite/gcc.dg/graphite/scop-3.c: Same.
1985 2009-04-24 Sebastian Pop <sebastian.pop@amd.com>
1987 * graphite-poly.c (map_into_dep_poly, map_dr_into_dep_poly,
1988 build_pairwise_constraint, dr_equality_constraints,
1989 build_pairwise_scheduling_equality,
1990 build_pairwise_scheduling_inequality, lexicographically_gt_p,
1991 build_lexicographically_gt_constraint, dependence_polyhedron,
1992 graphite_legal_transform_dr, graphite_legal_transform_bb,
1993 graphite_legal_transform): New.
1994 * graphite-poly.h (graphite_legal_transform): Declared.
1995 * graphite-sese-to-poly.c (build_poly_scop): Call to
1996 graphite_legal_transform is disabled for the moment.
1998 2009-04-24 Sebastian Pop <sebastian.pop@amd.com>
2000 * graphite-poly.h (pbb_nb_scattering_dims): New.
2001 (pbb_nb_scattering): Use it.
2003 2009-04-24 Sebastian Pop <sebastian.pop@amd.com>
2005 * graphite-ppl.c (ppl_insert_dimensions_pointset): Add
2006 Pointset_Powerset version of ppl_insert_dimensions.
2007 * graphite-ppl.h (ppl_insert_dimensions_pointset): Declared.
2009 2009-04-24 Sebastian Pop <sebastian.pop@amd.com>
2011 * graphite-ppl.c (ppl_insert_dimensions): Fix formatting.
2013 2009-04-24 Sebastian Pop <sebastian.pop@amd.com>
2015 * graphite-poly.h: Fix comment.
2017 2009-04-24 Sebastian Pop <sebastian.pop@amd.com>
2019 * graphite-sese-to-poly.c (build_poly_dr): Fix data ref multiplier.
2021 2009-04-24 Tobias Grosser <grosser@fim.uni-passau.de>
2023 * sese.c (expand_scalar_variables_stmt): Only iterate over the old
2026 2009-04-24 Tobias Grosser <grosser@fim.uni-passau.de>
2028 * graphite-sese-to-poly.c (var_used_in_not_loop_header_phi_node): New.
2029 (graphite_stmt_p): Represent bbs necessary to build the phi nodes of
2032 2009-04-20 Sebastian Pop <sebastian.pop@amd.com>
2034 * graphite-scop-detection.c (stmt_simple_for_scop_p): Do not
2035 handle EQ_EXPR and NE_EXPR.
2037 2009-04-17 Tobias Grosser <grosser@fim.uni-passau.de>
2039 * graphite-poly.h (poly_dr): Fix comment.
2041 2009-04-09 Sebastian Pop <sebastian.pop@amd.com>
2042 Tobias Grosser <grosser@fim.uni-passau.de>
2044 * graphite-poly.c (new_poly_bb): Do not initialize PBB_DOMAIN
2045 with a zero dimension polyhedron.
2046 (find_scop_parameters): Move the call to scop_set_nb_params here.
2047 (build_loop_iteration_domains): Store in loop->aux the iteration
2049 (build_scop_iteration_domain): Fix PBB_DOMAIN for bbs not surrounded
2050 by any loop in scop.
2051 (build_poly_scop): Do not call scop_set_nb_params.
2053 2009-04-09 Sebastian Pop <sebastian.pop@amd.com>
2054 Tobias Grosser <grosser@fim.uni-passau.de>
2056 * graphite-sese-to-poly.c (add_condition_to_pbb): Pass code to
2057 add_condition_to_domain not GT_EXPR.
2059 2009-04-09 Tobias Grosser <grosser@fim.uni-passau.de>
2061 * graphite-ppl.c (debug_ppl_powerset_matrix): New.
2062 * graphite-ppl.h (debug_ppl_powerset_matrix): New.
2063 * graphite-sese-to-poly.c (add_condition_to_pbb): Use
2064 upper_bound_assign to calculate unions.
2065 * testsuite/gcc.dg/graphite/id-6.c: New.
2067 2009-04-09 Tobias Grosser <grosser@fim.uni-passau.de>
2069 * graphite-scop-detection.c (canonicalize_loop_closed_ssa): Do not
2070 handle abnormal edges.
2072 2009-04-09 Tobias Grosser <grosser@fim.uni-passau.de>
2074 * graphite-poly.c (new_poly_dr, free_poly_dr): New.
2075 (free_poly_bb): Also free poly_drs.
2076 * graphite-poly.h (new_poly_dr, free_poly_dr): New.
2077 (poly_dr): Polyhedron to Pointset_Powerset.
2078 (pdr_accessp_nb_subscripts): Same.
2079 * graphite-sese-to-poly.c (build_poly_dr): Same. And actually build
2082 2009-04-08 Sebastian Pop <sebastian.pop@amd.com>
2084 * graphite-clast-to-gimple.c (initialize_cloog_names): Change cloog
2085 names into more meaningful names.
2087 2009-04-08 Sebastian Pop <sebastian.pop@amd.com>
2089 * testsuite/gfortran.dg/graphite/interchange-1.c: New.
2090 * testsuite/gfortran.dg/graphite/interchange-2.c: New.
2092 2009-04-08 Sebastian Pop <sebastian.pop@amd.com>
2094 * graphite-clast-to-gimple.c (graphite_loop_normal_form): Do not build
2096 * tree-parloops.c (rewrite_phi_with_iv): New.
2097 (rewrite_all_phi_nodes_with_iv): New.
2098 (canonicalize_loop_ivs): Call them.
2100 2009-04-08 Sebastian Pop <sebastian.pop@amd.com>
2102 * graphite-sese-to-poly.c (try_generate_gimple_bb): Use
2103 graphite_find_data_references_in_stmt.
2104 * tree-data-ref.c (graphite_find_data_references_in_stmt): New.
2105 * tree-data-ref.h (graphite_find_data_references_in_stmt): Declared.
2107 2009-04-08 Sebastian Pop <sebastian.pop@amd.com>
2109 * sese.c (add_loop_exit_phis): Don't fail on non SSA_NAME renames.
2111 2009-04-08 Sebastian Pop <sebastian.pop@amd.com>
2113 * graphite-sese-to-poly.c (build_scop_bbs_1): Use bb_in_sese_p
2114 instead of bb_in_region.
2115 (flag_bb_in_region): Same. Renamed flag_bb_in_sese.
2116 (build_sese_conditions): Use flag_bb_in_sese.
2117 * sese.c (register_bb_in_sese): Removed.
2118 (new_sese): Remove initialization of SESE_REGION_BBS.
2119 (free_sese): Do not free SESE_REGION_BBS.
2120 * sese.h (struct sese): Remove field region_basic_blocks.
2121 (SESE_REGION_BBS): Removed.
2122 (bb_in_sese_p): Implement in function of bb_in_region.
2124 2009-04-08 Sebastian Pop <sebastian.pop@amd.com>
2126 * graphite-scop-detection.c (limit_scops): Deal only with single exit
2129 2009-04-08 Tobias Grosser <grosser@fim.uni-passau.de>
2131 * graphite-scop-detection.c (stmt_simple_for_scop_p): Allow NE_EXPR
2133 * graphite-sese-to-poly.c (create_linear_expr_from_tree): New.
2134 (add_condition_to_domain): New.
2135 (add_condition_to_pbb): New.
2136 (add_conditions_to_domain): Cleanup and handle of NE_EXPR and EQ_EXPR.
2137 * testsuite/gcc.dg/graphite/scop-3.c: Update number of detected SCoPs.
2139 2009-04-08 Tobias Grosser <grosser@fim.uni-passau.de>
2141 * graphite-clast-to-gimple.c (build_cloog_prog): ppl_Polyhedron ->
2142 ppl_Pointset_Powerset.
2143 * graphite-poly.c (new_poly_bb, free_poly_bb): Same.
2144 * graphite-poly.h (poly_bb): poly_bb.domain Same.
2145 (pbb_nb_loops): Same.
2146 * graphite-sese-to-poly.c (build_loop_iteration_domains,
2147 add_conditions_to_domain): Same.
2148 * graphite-ppl.c (new_Cloog_Domain_from_ppl_Pointset_Powerset): New.
2149 (ppl_print_polyhedron_matrix): ppl_Polyhedron_t ->
2150 ppl_const_Polyhedron_t.
2151 (ppl_print_powerset_matrix): New.
2152 * graphite-ppl.h (new_Cloog_Domain_from_ppl_Pointset_Powerset,
2153 ppl_print_powerset_matrix): New.
2154 (ppl_print_polyhedron_matrix): Updated.
2156 2009-04-07 Sebastian Pop <sebastian.pop@amd.com>
2158 * tree-scalar-evolution.c (analyze_scalar_evolution_1): Fix comment.
2160 2009-04-07 Sebastian Pop <sebastian.pop@amd.com>
2162 * graphite-poly.c (extend_scattering): Fix indenting. Free cstr.
2163 (print_iteration_domains, debug_iteration_domain,
2164 debug_iteration_domains): New.
2165 * graphite-poly.h (print_iteration_domains, debug_iteration_domain,
2166 debug_iteration_domains): Declared.
2167 * graphite-sese-to-poly.c (build_pbb_scattering_polyhedrons): Fix
2170 2009-04-03 Tobias Grosser <grosser@fim.uni-passau.de>
2171 Sebastian Pop <sebastian.pop@amd.com>
2173 * graphite-poly.h (print_iteration_domain): New.
2174 * graphite-sese-to-poly.c (add_conditions_to_domain): Fixed bug.
2175 (build_sese_conditions_1, build_sese_conditions_after,
2176 build_sese_conditions_before): New.
2177 (build_sese_conditions): Rewritten.
2179 2009-04-03 Sebastian Pop <sebastian.pop@amd.com>
2180 Tobias Grosser <grosser@fim.uni-passau.de>
2182 Cleanup of code generation liveouts.
2183 * graphite-clast-to-gimple.c (translate_clast): Use a single
2184 rename_map instead of one per translated statement.
2185 Do not use SESE_LIVEOUT_RENAMES.
2186 (graphite_loop_normal_form): Do not use SESE_REDUCTION_LIST.
2187 (gloog): Do not use SESE_LIVEOUT_RENAMES.
2188 * graphite-scop-detection.c (harmful_stmt_in_bb): Return the close
2189 phi node of a reduction: when a loop contains a reduction used outside
2190 the loop, there should be a scalar close phi node on the exit block.
2191 * sese.c (new_sese): Do not initialize SESE_LIVEOUT,
2192 SESE_LIVEOUT_RENAMES, and SESE_REDUCTION_LIST.
2193 (free_sese): Do not free them.
2194 (sese_build_liveouts_use): Do not use them.
2195 (sese_build_liveouts_bb): Same.
2196 (sese_build_liveouts): Same.
2197 (sese_insert_phis_for_liveouts): Same.
2198 (sese_adjust_phis_for_liveouts): Same. Renamed sese_adjust_liveout_phis.
2199 (defined_in_loop_p): New.
2200 (alive_after_loop): New.
2201 (close_phi_not_yet_inserted_p): New.
2202 (struct alep, alep_p): New.
2203 (add_loop_exit_phis): Remove from the rename_map all the names defined
2204 in the code generated loop.
2205 (insert_loop_close_phis): Traverse the rename_map passed to it.
2206 Don't use SESE_LIVEOUT_RENAMES.
2207 (default_liveout_before_guard): Renamed default_before_guard.
2208 (insert_guard_phis): Do not use SESE_LIVEOUT_RENAMES.
2209 (graphite_copy_stmts_from_block): Do not directly call set_rename.
2210 (register_sese_liveout_renames): Removed.
2211 (copy_bb_and_scalar_dependences): Do not call it.
2212 * sese.h (struct sese): Removed fields: liveout, liveout_renames, and
2214 (SESE_LIVEOUT): Removed.
2215 (SESE_LIVEOUT_RENAMES): Removed.
2216 (SESE_REDUCTION_LIST): Removed.
2217 (sese_build_liveouts): Removed.
2218 (sese_adjust_phis_for_liveouts): Renamed sese_adjust_liveout_phis.
2219 (insert_loop_close_phis): Pass a htab_t instead of a sese.
2220 (insert_guard_phis): Same.
2221 (rename_map_elt): Declare a VEC of them.
2222 * tree-parloops.c (canonicalize_loop_ivs): reduction_list contains
2223 trees not pointers to trees.
2225 Rewrite in canonical close SSA form:
2226 * graphite-scop-detection.c (contains_only_close_phi_nodes): New.
2227 (limit_scops): Close the scop after the block containing the close phi
2229 (canonicalize_loop_closed_ssa): New.
2230 (canonicalize_loop_closed_ssa_form): New.
2231 (build_scops): Call canonicalize_loop_closed_ssa_form.
2233 * graphite-sese-to-poly.c: Fix typos.
2235 2009-04-03 Sebastian Pop <sebastian.pop@amd.com>
2237 * graphite-poly.c (print_scattering_function, print_pbb_domain):
2239 (dump_gbb_conditions, dump_gbb_cases, print_iteration_domain): New.
2240 (print_pbb): Add conditions.
2242 2009-04-01 Tobias Grosser <grosser@fim.uni-passau.de>
2243 Sebastian Pop <sebastian.pop@amd.com>
2245 * graphite-scop-detection.c (bb_in_sd_region): Use bb_in_region.
2246 * graphite-sese-to-poly.c (all_non_dominated_preds_marked_p): New.
2247 (build_scop_bbs_1): New.
2248 (build_scop_bbs): Rewrite.
2249 * sese.h (bb_in_region): New.
2251 2009-03-29 Tobias Grosser <grosser@fim.uni-passau.de>
2253 * graphite-poly.c (new_poly_bb, free_poly_bb): Initialize/free
2255 (print_scop): Style.
2256 * graphite-poly.h (poly_bb): Add drs vector.
2257 (PBB_DRS): Add accessor.
2258 * graphite-sese-to-poly.c (build_poly_dr): New.
2259 (build_pbb_drs, build_scop_drs): New.
2260 (build_poly_scop): call build_scop_drs (Disabled at the moment).
2262 2009-03-29 Tobias Grosser <grosser@fim.uni-passau.de>
2264 * tree-ssa-loop.c: Include forgotten toplev.h
2266 2009-03-29 Tobias Grosser <grosser@fim.uni-passau.de>
2268 * graphite-poly.c: (apply_poly_transforms): sorry -> gcc_unreachable.
2269 * testsuite/gcc.dg/graphite/pr37883.c: Remove -floop-*
2270 * testsuite/gcc.dg/graphite/pr37928.c: Same
2271 * testsuite/gcc.dg/graphite/pr38409.c: Same
2272 * testsuite/gcc.dg/graphite/pr38498.c: Same
2273 * testsuite/gcc.dg/graphite/pr38559.c: Same
2274 * testsuite/gcc.dg/graphite/pr39335.c: Same
2275 * testsuite/gcc.dg/graphite/pr39335_1.c: Same
2276 * testsuite/gfortran.dg/graphite/block-2.f: Same
2277 * tree-ssa-loop.c (gate_graphite_transforms): Always fail if called
2280 2009-03-28 Tobias Grosser <grosser@fim.uni-passau.de>
2282 * graphite-sese-to-poly.c (ref_nb_loops, build_access_matrix_with_af,
2283 build_access_matrix, build_scop_data_accesses): Remove access function
2284 building. (We get a new version soon).
2285 (build_bb_loops, scan_tree_for_params_right_scev): Update.
2286 * sese.h (nb_loops_around_loop_in_sese): Remove.
2287 (sese_loop_depth): Do not use SESE_LOOP_NEST any more.
2289 2009-03-27 Tobias Grosser <grosser@fim.uni-passau.de>
2290 Sebastian Pop <sebastian.pop@amd.com>
2292 * graphite-scop-detection.c (struct scopdet_info): Rename last
2294 (scopdet_basic_block_info, build_scops_1): Don't use
2295 CDI_POST_DOMINATORS. CDI_POST_DOMINATORS should never be used.
2297 2009-03-26 Tobias Grosser <grosser@fim.uni-passau.de>
2298 Sebastian Pop <sebastian.pop@amd.com>
2300 * graphite-clast-to-gimple.c (gloog): Call sese_build_liveouts.
2301 * sese.c (sese_build_liveouts_use): Renamed from
2302 sese_build_livein_liveouts_use. Remove liveins.
2303 (sese_build_liveouts_bb): Renamed from sese_build_livein_liveouts_bb.
2304 Call sese_build_liveouts_use.
2305 (sese_build_liveouts): Renamed from sese_build_livein_liveouts.
2306 Call sese_build_liveouts_bb.
2307 (new_sese, free_sese): Remove liveins.
2308 (sese_add_exit_phis_var): Deleted.
2309 (sese_insert_phis_for_liveouts): Call sese_add_exit_phis_edge
2311 (graphite_copy_stmts_from_block): Remove SESE_NUM_VER.
2313 * sese.h (sese): Remove num_ver and livein.
2314 (SESE_LIVEIN, SESE_LIVEIN_VER, SESE_NUM_VER): Removed.
2316 2009-03-25 Tobias Grosser <grosser@fim.uni-passau.de>
2318 * graphite-sese-to-poly.c (build_scop_scattering): Fix compile.
2320 2009-03-25 Tobias Grosser <grosser@fim.uni-passau.de>
2322 * graphite-sese-to-poly.c (compare_prefix_loops): Removed.
2323 (build_scop_scattering): Do not use compare_prefix_loops any more.
2324 (nb_common_loops): New.
2326 2009-03-24 Sebastian Pop <sebastian.pop@amd.com>
2328 * sese.c (get_new_name_from_old_name): Renamed get_rename.
2329 (register_old_and_new_names): Renamed set_rename.
2331 2009-03-24 Sebastian Pop <sebastian.pop@amd.com>
2333 * graphite-scop-detection.h (nb_reductions_in_loop): Revert removal
2334 of the decl from the previous commit.
2336 2009-03-24 Sebastian Pop <sebastian.pop@amd.com>
2338 * graphite-scop-detection.c (dot_scop): New.
2339 * graphite-scop-detection.h (dot_scop): Declared.
2341 2009-03-24 Sebastian Pop <sebastian.pop@amd.com>
2343 * graphite-sese-to-poly.c (compare_prefix_loops): Fix compare.
2345 2009-03-24 Sebastian Pop <sebastian.pop@amd.com>
2347 * cfgloopmanip.c (create_empty_loop_on_edge): Generate the loop exit
2348 condition at the end of the loop.
2349 * graphite.c (graphite_initialize, graphite_finalize): Print to
2350 dump_file the compiled function.
2351 * graphite-clast-to-gimple.c (graphite_create_new_loop): Update use
2352 of create_empty_loop_on_edge.
2353 (translate_clast): Update the code generation of loops for the new
2355 * cfgloop.h (create_empty_loop_on_edge): Update declaration.
2357 2009-03-24 Sebastian Pop <sebastian.pop@amd.com>
2359 Reverted the patch from 2009-03-19.
2361 2009-03-19 Tobias Grosser <grosser@fim.uni-passau.de>
2363 * graphite-poly.c (new_poly_bb, free_poly_bb): Initialize/free
2365 (print_scop): Style.
2366 * graphite-poly.h (poly_bb): Add drs vector.
2367 (PBB_DRS): Add accessor.
2368 * graphite-sese-to-poly.c (ref_nb_loops): Remove.
2369 (build_access_matrix_with_af, build_access_matrix,
2370 build_scop_data_accesses): Delete.
2371 (build_poly_dr): New.
2372 (build_pbb_drs, build_scop_drs): New.
2373 (build_poly_scop): call build_scop_drs.
2375 2009-03-13 Sebastian Pop <sebastian.pop@amd.com>
2377 * graphite-scop-detection.c (dot_all_scops_1): Close the table
2378 once per basic block.
2380 2009-03-13 Tobias Grosser <grosser@fim.uni-passau.de>
2382 * graphite-scop-detection.c (graphite_can_represent_scev): New.
2383 (graphite_can_represent_expr): Renamed from loop_affine_expr
2385 (stmt_simple_for_scop_p): Call graphite_can_represent_expr.
2386 (graphite_cannot_represent_loop): Add scop_entry to parameters.
2387 (scopdet_basic_block_info): Actually define entry_block.
2388 (stmt_simple_memref_p): Moved here from ...
2390 * tree-data-ref.c (stmt_simple_memref_p): here.
2391 * tree-data-ref.h (stmt_simple_memref_p): Removed.
2393 2009-03-13 Tobias Grosser <grosser@fim.uni-passau.de>
2395 * testsuite/gcc.dg/graphite/id-4.c: New.
2397 2009-03-12 Sebastian Pop <sebastian.pop@amd.com>
2399 * sese.c (expand_scalar_variables_expr): Handle tcc_comparison.
2400 (register_old_and_new_names): Update the content of the map.
2401 When there was already a rename_map_elt in the map at that
2403 (copy_bb_and_scalar_dependences): Do rename_variables after
2404 expand_scalar_variables.
2405 * graphite-clast-to-gimple.c (build_iv_mapping): Update the content
2406 of the map. When there was already a rename_map_elt in the
2407 map at that location, free it.
2408 (translate_clast): Pass the rename_map. Do not initialize and free
2409 a rename_map per stmt_user.
2410 (gloog): Initialize and free one rename_map and pass it to
2413 2009-03-12 Sebastian Pop <sebastian.pop@amd.com>
2415 * sese.c (expand_scalar_variables_stmt,
2416 expand_scalar_variables_ssa_name): Add a gimple_stmt_iterator
2418 (expand_scalar_variables_expr): Handle REALPART_EXPR and IMAGPART_EXPR.
2419 (expand_scalar_variables): Pass to expand_scalar_variables_stmt
2420 the gimple_stmt_iterator of the statement to be expanded.
2421 * graphite-scop-detection.c (is_simple_operand): Do handle
2424 2009-03-11 Tobias Grosser <grosser@fim.uni-passau.de>
2426 * graphite-scop-detection.c (is_simple_operand): Do not handle
2428 * testsuite/gcc.dg/graphite/id-2.c: New.
2430 * graphite-sese-to-poly.c (build_bb_loops,
2431 add_value_to_dim, scan_tree_for_params_right_scev,
2432 scan_tree_for_params_int, scan_tree_for_params, idx_record_params,
2433 find_params_in_bb, build_loop_iteration_domains,
2434 add_conditions_to_domain): Remove subtract.
2436 2009-03-11 Tobias Grosser <grosser@fim.uni-passau.de>
2438 * graphite-clast-to-gimple.c (loop_iv_stack_patch_for_consts,
2439 build_iv_mapping, compute_cloog_iv_types_1, build_cloog_prog):
2440 pbb_loop_at_index -> gbb_loop_at_index.
2441 * graphite-poly.c (new_poly_bb, new_scop): New accessors.
2442 (debug_loop_vec): Delete.
2443 * graphite-poly.h (poly_bb, scop): Change black_box and region to void
2444 pointer. Move LOOPS to gimple_bb_p and insert nb_params.
2445 (PBB_LOOPS): Removed.
2446 (PBB_BLACK_BOX): Insert cast.
2447 (pbb_set_black_box): New setter.
2448 (pbb_loop_at_index, pbb_loop_index): Removed.
2449 (scop_set_region, scop_set_nb_params): New.
2450 * graphite-sese-to-poly.c (new_gimple_bb, free_gimple_bb,
2451 build_scop_scattering, build_bb_loops): Add GBB_LOOPS.
2452 (build_poly_scop): Use scop_set_nb_params.
2453 * sese.h (gimple_bb): Add LOOPS.
2454 (GBB_LOOPS, gbb_loop_index, gbb_loop_at_index): New.
2456 2009-03-11 Tobias Grosser <grosser@fim.uni-passau.de>
2458 Revert previous commit.
2460 2009-03-11 Sebastian Pop <sebastian.pop@amd.com>
2462 * sese.c (expand_scalar_variables_expr): Handle tcc_comparison.
2463 (register_old_and_new_names): Update the content of the map.
2464 When there was already a rename_map_elt in the map at that
2466 (copy_bb_and_scalar_dependences): Do rename_variables after
2467 expand_scalar_variables.
2468 * graphite-clast-to-gimple.c (build_iv_mapping): Update the content
2469 of the map. When there was already a rename_map_elt in the
2470 map at that location, free it.
2471 (translate_clast): Pass the rename_map. Do not initialize and free
2472 a rename_map per stmt_user.
2473 (gloog): Initialize and free one rename_map and pass it to
2476 2009-03-11 Tobias Grosser <grosser@fim.uni-passau.de>
2478 Remove forgotten line in revert.
2480 2009-03-11 Sebastian Pop <sebastian.pop@amd.com>
2482 Revert previous commit.
2484 2009-03-10 Sebastian Pop <sebastian.pop@amd.com>
2486 * sese.c (register_old_and_new_names): Update the content
2487 of the map. When there was already a rename_map_elt in the
2488 map at that location, free it.
2489 (copy_bb_and_scalar_dependences): Do rename_variables after
2490 expand_scalar_variables.
2491 * graphite-clast-to-gimple.c (build_iv_mapping): Update the content
2492 of the map. When there was already a rename_map_elt in the
2493 map at that location, free it.
2494 (translate_clast): Pass the rename_map. Do not initialize and free
2495 a rename_map per stmt_user.
2496 (gloog): Initialize and free one rename_map and pass it to
2499 2009-03-10 Sebastian Pop <sebastian.pop@amd.com>
2501 * graphite-clast-to-gimple.c (translate_clast): context_loop
2504 2009-03-10 Tobias Grosser <grosser@fim.uni-passau.de>
2505 Sebastian Pop <sebastian.pop@amd.com>
2507 * graphite-ppl.c (ppl_insert_dimensions): Fix stupid mistake
2508 of the use of ppl_Polyhedron_map_space_dimensions.
2510 2009-03-10 Tobias Grosser <grosser@fim.uni-passau.de>
2511 Sebastian Pop <sebastian.pop@amd.com>
2513 * graphite-poly.c (unify_scattering_dimensions): Fix types.
2514 * graphite-poly.h (poly_dr_p, poly_dr, POLY_DR_TYPE, PDR_BB,
2515 PDR_TYPE, PDR_ACCESSES, pdr_accessp_nb_subscripts,
2516 pdr_accessp_nb_iterators, pdr_accessp_nb_params,
2517 pdr_accessp_alias_set_dim, pdr_accessp_subscript_dim,
2518 pdr_accessp_iterator_dim, pdr_accessp_param_dim,
2519 pbb_nb_params): New.
2520 (pbb_nb_loops, pbb_nb_scattering, scop_nb_params,
2521 nb_loops_around_pbb): Adapt return types.
2523 2009-03-09 Tobias Grosser <grosser@fim.uni-passau.de>
2525 * Makefile.in (graphite.o, graphite-sese-to-poly.o,
2526 graphite-clast-to-gimple.o, graphite-data-ref.o,
2527 graphite-scop-detection.o, graphite-poly.o): Add
2530 2009-03-05 Tobias Grosser <grosser@fim.uni-passau.de>
2532 * Makefile.in (graphite.o, graphite-sese-to-poly.o,
2533 graphite-clast-to-gimple.o, graphite-data-ref.o,
2534 graphite-scop-detection.o, graphite-poly.o): Add graphite-poly.h.
2536 2009-03-04 Tobias Grosser <grosser@fim.uni-passau.de>
2538 * testsuite/gcc.dg/graphite/pr37485.c: Remove -floop-block
2539 * testsuite/gcc.dg/graphite/pr37828.c: Same.
2540 * testsuite/gcc.dg/graphite/pr37684.c: Same.
2541 * testsuite/gcc.dg/graphite/block-0.c: Same.
2542 * testsuite/gcc.dg/graphite/block-1.c: Same.
2543 * testsuite/gcc.dg/graphite/block-2.c: Same.
2544 * testsuite/gcc.dg/graphite/block-3.c: Same.
2545 * testsuite/gcc.dg/graphite/block-4.c: Same.
2546 * testsuite/gcc.dg/graphite/block-5.c: Same.
2547 * testsuite/gcc.dg/graphite/block-6.c: Same.
2548 * testsuite/gfortran.dg/graphite/pr38083.f90: Same.
2549 * testsuite/gfortran.dg/graphite/block-1.f90: Same.
2550 * testsuite/gfortran.dg/graphite/block-3.f90: Same.
2551 * testsuite/gfortran.dg/graphite/pr37852.f90: Same.
2552 * testsuite/gfortran.dg/graphite/block-4.f90: Same.
2553 * testsuite/gfortran.dg/graphite/pr37980.f90: Same.
2554 * testsuite/gfortran.dg/graphite/pr38953.f90: Same.
2555 * testsuite/gfortran.dg/graphite/pr37857.f90: Same.
2556 * opts.c: Remove -floop-block from -O2.
2557 * graphite-poly.c: Fail if -floop-block -floop-interchange or
2558 -floop-strip-mine are used.
2560 2009-03-04 Tobias Grosser <grosser@fim.uni-passau.de>
2561 Sebastian Pop <sebastian.pop@amd.com>
2563 * graphite-clast-to-gimple.c (build_cloog_prog): Unify scattering
2565 * graphite-poly.c (pbb_compare, graphite_sort_pbbs,
2566 graphite_trans_bb_move_loop, graphite_trans_bb_strip_mine,
2567 strip_mine_profitable_p, is_interchange_valid,
2568 graphite_trans_bb_block, graphite_trans_loop_block,
2569 graphite_trans_scop_block): Temporary removed.
2570 (extend_scattering, unify_scattering_dimensions): New.
2571 (print_scattering_function, graphite_read_transforms):
2572 PBB_SCATTERING -> PBB_TRANSFORMED_SCATTERING.
2573 (graphite_generate_scattering_fns): Removed.
2574 (apply_poly_transforms): Cleanup.
2575 (free_poly_bb): Add PBB_SCATTERING -> PBB_TRANSFORMED_SCATTERING.
2576 (schedule_to_scattering): Moved.
2577 (PBB_STATIC_SCHEDULE, PBB_SCATTERING): Removed.
2578 (PBB_ORIGINAL_SCATTERING, PBB_TRANSFORMED_SCATTERING): New.
2579 (pbb_nb_scattering): New.
2580 (SCOP_ENTRY, SCOP_EXIT, SCOP_REGION_BBS, SCOP_DEP_GRAPH, SCOP_PARAMS,
2581 SCOP_LOOP_NEST, SCOP_PARAMS, SCOP_OLDIVS, SCOP_LIVEOUT_RENAMES):
2583 * graphite-ppl.c (ppl_insert_dimensions): Extended and renamed from
2585 (ppl_strip_loop): PBB_SCATTERING -> PBB_TRANSFORMED_SCATTERING.
2586 * graphite-scop-detection.c (dot_all_scops_1): PBB_SCATTERING
2587 -> PBB_TRANSFORMED_SCATTERING.
2588 * graphite-sese-to-poly.c (build_scop_bbs): Remove region.
2589 (build_pbb_scattering_polyhedron): Moved from schedule_to_scattering.
2590 (build_scop_scattering): Renamed from build_scop_canonical_schedules.
2591 (check_poly_representation): Do not return bool.
2592 (graphite_transform_loops): Reformat.
2593 * sese.h (SESE_ENTRY_BB, SESE_EXIT_BB): New.
2595 2009-03-04 Sebastian Pop <sebastian.pop@amd.com>
2597 * graphite-poly.c (print_pbb_domain, print_pbb, print_scop,
2598 debug_pbb_domain, debug_pbb, debug_scop): New.
2599 * graphite-poly.h (print_pbb_domain, print_pbb, print_scop,
2600 debug_pbb_domain, debug_pbb, debug_scop): Declared.
2602 2009-03-02 Sebastian Pop <sebastian.pop@amd.com>
2605 * tree-parloops.c (canonicalize_loop_ivs): Call fold_convert
2606 when the type precision of the induction variable should be
2607 larger than the type precision of nit.
2608 (gen_parallel_loop): Update use of canonicalize_loop_ivs.
2609 * graphite-clast-to-gimple.c (graphite_loop_normal_form): Same.
2610 * tree-flow.h (canonicalize_loop_ivs): Update declaration.
2612 * testsuite/gcc.dg/graphite/pr39335_1.c: New.
2613 * testsuite/gcc.dg/graphite/pr39335.c: New.
2615 2009-03-02 Sebastian Pop <sebastian.pop@amd.com>
2617 * tree-parloops.c (canonicalize_loop_ivs): reduction_list contains
2618 SSA_NAMES not struct reduction_info.
2620 2009-03-02 Sebastian Pop <sebastian.pop@amd.com>
2622 * sese.c (expand_scalar_variables_expr): Handle ADDR_EXPR.
2624 2009-02-27 Sebastian Pop <sebastian.pop@amd.com>
2625 Tobias Grosser <grosser@fim.uni-passau.de>
2627 * sese.c (new_sese): Initialize SESE_REDUCTION_LIST.
2628 (free_sese): Free SESE_REDUCTION_LIST.
2629 * sese.h (struct sese): Add field reduction_list.
2630 (SESE_REDUCTION_LIST): New.
2631 * graphite-clast-to-gimple.c (graphite_loop_normal_form): Call
2632 canonicalize_loop_ivs on SESE_REDUCTION_LIST.
2634 2009-02-27 Sebastian Pop <sebastian.pop@amd.com>
2635 Tobias Grosser <grosser@fim.uni-passau.de>
2637 * tree-flow.h (gather_scalar_reductions): Use struct loop * instead
2640 2009-02-27 Sebastian Pop <sebastian.pop@amd.com>
2641 Tobias Grosser <grosser@fim.uni-passau.de>
2643 * tree-parloops.c (struct brli, build_reduction_list_info,
2644 analyze_reduction_list, gather_scalar_reductions): New.
2645 (loop_parallel_p): Build a reduction list containing only
2646 PHI_RESULT SSA_NAMEs: call gather_scalar_reductions.
2647 (gen_parallel_loop): Call the analysis analyze_reduction_list.
2648 (parallelize_loops): Now reduction_list is a htab_t of SSA_NAMEs.
2649 * tree-flow.h (gather_scalar_reductions): Declared.
2651 2009-02-26 Sebastian Pop <sebastian.pop@amd.com>
2654 * graphite-clast-to-gimple.c (graphite_loop_normal_form): Do not call
2655 number_of_iterations_exit from a gcc_assert.
2657 2009-02-25 Sebastian Pop <sebastian.pop@amd.com>
2658 Jan Sjodin <jan.sjodin@amd.com>
2660 * output.h (graphite_out_file, graphite_in_file): Declared.
2661 * toplev.c (graphite_out_file, graphite_in_file): New.
2662 (init_asm_output): Initialize graphite_in_file and graphite_out_file.
2663 * graphite-clast-to-gimple.c (build_cloog_prog): Read PBB_SCATTERING.
2664 Don't call schedule_to_scattering.
2665 * common.opt (fgraphite-write, fgraphite-read): New.
2666 * graphite-poly.c: Include output.h.
2667 (print_scattering_function, print_scattering_functions,
2668 debug_scattering_function, debug_scattering_functions,
2669 graphite_write_transforms, graphite_read_transforms,
2670 graphite_generate_scattering_fns): New.
2671 (apply_poly_transforms): Do not apply transform if flag_graphite_read.
2672 Call graphite_generate_scattering_fns, graphite_write_transforms,
2673 graphite_read_transforms.
2674 (new_poly_bb): Initialize PBB_SCATTERING.
2675 (free_poly_bb): Free PBB_SCATTERING.
2676 (schedule_to_scattering): Does not return, initialize PBB_SCATTERING.
2677 * graphite-poly.h (struct poly_bb): Add field scattering.
2678 (PBB_SCATTERING): New.
2679 (print_scattering_function, print_scattering_functions,
2680 debug_scattering_function, debug_scattering_functions): Declared.
2681 * graphite-ppl.c (cloog_matrix_to_ppl_constraint): Matrices contain
2682 GMP values, not integers!
2683 (ppl_print_polyhedron_matrix, debug_ppl_polyhedron_matrix,
2684 ppl_read_polyhedron_matrix): New.
2685 * graphite-ppl.h (ppl_print_polyhedron_matrix,
2686 debug_ppl_polyhedron_matrix,
2687 ppl_read_polyhedron_matrix): Declared.
2688 * Makefile.in (graphite-poly.o): Depends on output.h.
2690 2009-02-23 Sebastian Pop <sebastian.pop@amd.com>
2691 Tobias Grosser <grosser@fim.uni-passau.de>
2694 * graphite-scop-detection.c (stmt_simple_for_scop_p): Analyze
2695 scalar evolutions in the scop_entry->loop_father.
2697 2009-02-23 Sebastian Pop <sebastian.pop@amd.com>
2698 Tobias Grosser <grosser@fim.uni-passau.de>
2700 * graphite.h (ref_nb_loops): Remove declaration.
2701 (struct gimple_bb, gimple_bb_p, GBB_BB, GBB_DATA_REFS, GBB_CONDITIONS,
2702 GBB_CONDITION_CASES, GBB_CLOOG_IV_TYPES, gbb_loop, print_gimple_bb,
2703 debug_gbb): Moved to sese.h.
2706 2009-02-23 Sebastian Pop <sebastian.pop@amd.com>
2707 Tobias Grosser <grosser@fim.uni-passau.de>
2709 * graphite-data-ref.[ch]: Disable.
2711 2009-02-23 Sebastian Pop <sebastian.pop@amd.com>
2712 Tobias Grosser <grosser@fim.uni-passau.de>
2714 * graphite-scop-detection.c (stmt_simple_for_scop_p): Analyze
2715 scalar evolutions in the scop_entry->loop_father.
2717 2009-02-23 Sebastian Pop <sebastian.pop@amd.com>
2719 * graphite-scop-detection.c (nb_reductions_in_loop): Moved here...
2720 (graphite_cannot_represent_loop_niter): Renamed
2721 graphite_cannot_represent_loop. Call nb_reductions_in_loop.
2722 (limit_scops): build_sese_loop_nests does not return a bool.
2723 * graphite-scop-detection.h (nb_reductions_in_loop): Declared.
2724 * sese.c (nb_reductions_in_loop): ... from here.
2725 (graphite_loop_normal_form): ... from here.
2726 (sese_record_loop): Does not fail, so does not return a bool.
2727 (build_sese_loop_nests): Same.
2728 * sese.h (build_sese_loop_nests): Update declaration.
2729 * graphite-clast-to-gimple.c (graphite_loop_normal_form): Moved here...
2730 (build_graphite_loop_normal_form): New.
2731 (gloog): Call build_graphite_loop_normal_form.
2732 * graphite-sese-to-poly.c (build_poly_scop): Don't fail on
2733 build_sese_loop_nests.
2735 * testsuite/gcc.dg/graphite/id-1.c: New.
2737 2009-02-23 Sebastian Pop <sebastian.pop@amd.com>
2738 Tobias Grosser <grosser@fim.uni-passau.de>
2740 * graphite-sese-to-poly.c (scan_tree_for_params): Remove REAL_CST.
2741 The SCoP detection fix is sufficient.
2743 2009-02-21 Sebastian Pop <sebastian.pop@amd.com>
2745 PR tree-optimization/39260
2746 * graphite-scop-detection.c (harmful_stmt_in_bb): Stop a SCoP when
2747 the basic block contains a condition with a real type.
2748 * graphite-sese-to-poly.c (scan_tree_for_params): Handle REAL_CST.
2750 * gcc.dg/graphite/pr39260.c: New.
2752 2009-02-21 Sebastian Pop <sebastian.pop@amd.com>
2754 * graphite-poly.c: Inlcude params.h.
2755 (graphite_trans_loop_block): Use PARAM_LOOP_BLOCK_TILE_SIZE for
2757 * Makefile.in (graphite-poly.o): Depend on PARAMS_H.
2758 * params.def (PARAM_LOOP_BLOCK_TILE_SIZE): Define.
2760 2009-02-20 Sebastian Pop <sebastian.pop@amd.com>
2761 Tobias Grosser <grosser@fim.uni-passau.de>
2763 * graphite-scop-detection.c (dot_all_scops_1,
2764 dot_all_scops): Moved here.
2765 * graphite-scop-detection.h (dot_all_scops): Declared here.
2766 * graphite.c (graphite_initialize, graphite_finalize): New.
2767 (graphite_transform_loops): Cleaned up.
2768 * sese.c (debug_oldivs): Moved here.
2769 * graphite-poly.c (graphite_apply_transformations): Renamed
2770 apply_poly_transforms.
2771 (debug_loop_vec): Moved here.
2772 * graphite-sese-to-poly.c (build_bb_loops, build_sese_conditions_1,
2773 scop_contains_non_iv_scalar_phi_nodes, build_sese_conditions,
2774 find_scop_parameters, build_scop_iteration_domain,
2775 add_conditions_to_constraints, build_scop_canonical_schedules,
2776 build_scop_data_accesses): Now static.
2777 (build_poly_scop, check_poly_representation): New.
2779 2009-02-20 Sebastian Pop <sebastian.pop@amd.com>
2781 * graphite.c (graphite_stmt_p, new_gimple_bb, free_gimple_bb,
2782 remove_gbbs_in_scop, free_scops, try_generate_gimple_bb,
2783 build_scop_bbs, ref_nb_loops, compare_prefix_loops,
2784 build_scop_canonical_schedules, build_bb_loops, add_value_to_dim,
2785 scan_tree_for_params_right_scev, scan_tree_for_params_int,
2786 scan_tree_for_params, struct irp_data, dx_record_params,
2787 find_params_in_bb, find_scop_parameters, gbb_from_bb,
2788 build_loop_iteration_domains, add_conditions_to_domain,
2789 phi_node_is_iv, bb_contains_non_iv_scalar_phi_nodes,
2790 scop_contains_non_iv_scalar_phi_nodes, build_sese_conditions_1,
2791 build_sese_conditions, add_conditions_to_constraints,
2792 build_scop_iteration_domain, build_access_matrix_with_af,
2793 build_access_matrix,
2794 build_scop_data_accesses): Moved to graphite-sese-to-poly.c.
2796 * graphite-sese-to-poly.c: New.
2797 * graphite-sese-to-poly.h: New.
2799 * Makefile.in: Add new rule for graphite-sese-to-poly.o.
2801 2009-02-20 Sebastian Pop <sebastian.pop@amd.com>
2803 * graphite.c: Split graphite code generation to a new file.
2804 (graphite_verify, gmp_cst_to_tree, clast_name_to_gcc,
2805 max_precision_type, clast_to_gcc_expression_red,
2806 clast_to_gcc_expression, gcc_type_for_clast_expr,
2807 gcc_type_for_clast_eq, loop_iv_stack_patch_for_consts,
2808 graphite_translate_clast_equation, graphite_create_guard_cond_expr,
2809 graphite_create_new_guard, clast_get_body_of_loop,
2810 gcc_type_for_cloog_iv, gcc_type_for_iv_of_clast_loop,
2811 graphite_create_new_loop, build_iv_mapping, copy_renames,
2812 translate_clast, find_cloog_iv_in_expr, compute_cloog_iv_types_1,
2813 compute_cloog_iv_types, free_scattering, save_var_name,
2814 initialize_cloog_names, build_scop_context, build_cloog_prog,
2815 set_cloog_options, debug_clast_stmt, scop_to_clast,
2816 print_generated_program, debug_generated_program,
2817 gloog): Moved to graphite-clast-to-gimple.c.
2819 (struct cloog_prog_clast): Moved to graphite-clast-to-gimple.h.
2821 (iv_stack_entry_is_constant, iv_stack_entry_is_iv,
2822 loop_iv_stack_push_iv, loop_iv_stack_insert_constant,
2823 loop_iv_stack_pop, loop_iv_stack_get_iv,
2824 loop_iv_stack_get_iv_from_name, debug_loop_iv_stack,
2825 free_loop_iv_stack, loop_iv_stack_remove_constants,
2826 debug_rename_elt, debug_rename_map_1, debug_rename_map,
2827 rename_map_elt_info, eq_rename_map_elts, debug_ivtype_elt,
2828 debug_ivtype_map_1, debug_ivtype_map, ivtype_map_elt_info,
2829 eq_ivtype_map_elts, sese_add_exit_phis_edge,
2830 sese_add_exit_phis_var, sese_insert_phis_for_liveouts,
2831 get_vdef_before_sese, sese_adjust_vphi,
2832 get_new_name_from_old_name, sese_adjust_phis_for_liveouts,
2833 oldiv_for_loop, rename_variables_in_stmt, is_parameter,
2834 is_iv, expand_scalar_variables_ssa_name,
2835 expand_scalar_variables_expr, expand_scalar_variables_stmt,
2836 expand_scalar_variables, rename_variables, remove_condition,
2837 get_true_edge_from_guard_bb, get_false_edge_from_guard_bb,
2838 add_loop_exit_phis, insert_loop_close_phis, struct igp,
2839 default_liveout_before_guard, add_guard_exit_phis,
2840 insert_guard_phis, register_old_and_new_names,
2841 graphite_copy_stmts_from_block, register_sese_liveout_renames,
2842 copy_bb_and_scalar_dependences, outermost_loop_in_sese,
2843 if_region_set_false_region, create_if_region_on_edge,
2844 move_sese_in_condition): Moved to sese.c.
2846 (nb_loops_around_loop_in_sese, struct ifsese, if_region_entry,
2847 if_region_exit, if_region_get_condition_block,
2848 struct rename_map_elt, new_rename_map_elt, enum iv_stack_entry_kind,
2849 union iv_stack_entry_data_union, struct iv_stack_entry_struct,
2850 iv_stack_entry_p, loop_iv_stack, struct ivtype_map_elt,
2851 ivtype_map_elt, new_ivtype_map_elt,
2852 recompute_all_dominators): Moved to sese.h.
2854 * graphite-clast-to-gimple.c: New.
2855 * graphite-clast-to-gimple.h: New.
2856 * Makefile.in: Add new rule for graphite-clast-to-gimple.o.
2857 * sese.c: Modified as said above.
2860 2009-02-20 Sebastian Pop <sebastian.pop@amd.com>
2862 * graphite.c: Split scop detection to a new file.
2863 (enum gbb_type, gbb_type, get_bb_type, struct sd_region_p, sd_region,
2864 move_sd_regions, loop_affine_expr, exclude_component_ref,
2865 is_simple_operand, stmt_simple_for_scop_p, harmful_stmt_in_bb,
2866 graphite_cannot_represent_loop_niter, struct scopdet_info,
2867 scopdet_basic_block_info, build_scops_1, bb_in_sd_region,
2868 find_single_entry_edge, find_single_exit_edge,
2869 create_single_entry_edge, sd_region_without_exit,
2870 create_single_exit_edge, unmark_exit_edges, mark_exit_edges,
2871 create_sese_edges, build_graphite_scops, limit_scops, build_scops):
2872 Moved to graphite-scop-detection.c.
2874 * graphite-scop-detection.c: New.
2875 * graphite-scop-detection.h: New.
2876 * Makefile.in: Add new rule for graphite-scop-detection.o.
2878 * sese.c: Include tree-chrec.h, tree-data-ref.h, and
2879 tree-scalar-evolution.h.
2880 (nb_reductions_in_loop, graphite_loop_normal_form, sese_record_loop,
2881 build_sese_loop_nests): Moved here from graphite.c.
2882 (param_index): Renamed parameter_index_in_region.
2884 2009-02-18 Tobias Grosser <grosser@fim.uni-passau.de>
2885 Sebastian Pop <sebastian.pop@amd.com>
2887 * gcc.dg/graphite/block-0.c: Expected to fail now.
2888 * gcc.dg/graphite/block-1.c: Same.
2889 * gcc.dg/graphite/block-5.c: Same.
2890 * gcc.dg/graphite/block-6.c: Same.
2892 2009-02-18 Tobias Grosser <grosser@fim.uni-passau.de>
2893 Sebastian Pop <sebastian.pop@amd.com>
2895 * graphite.h: Separate from graphite_bb_p the polyhedral
2896 representation in poly_bb_p and the GCC specifics in gimple_bb_p.
2897 (struct data_dependence_polyhedron, RDGE_DDP, ddp_p): Moved to
2898 graphite-data-ref.h.
2899 (struct poly_bb, PBB_SCOP, PBB_STATIC_SCHEDULE, PBB_DOMAIN,
2900 PBB_BLACK_BOX, PBB_LOOPS, pbb_nb_loops, pbb_loop_at_index,
2901 pbb_loop_index, struct scop, SCOP_BBS, SCOP_REGION, SCOP_ENTRY,
2902 SCOP_EXIT, SCOP_REGION_BBS, SCOP_DEP_GRAPH, SCOP_PARAMS,
2903 SCOP_LOOP_NEST, SCOP_PARAMS, SCOP_OLDIVS, SCOP_LIVEOUT_RENAMES,
2904 scop_nb_params): Moved to graphite-poly.h.
2905 * graphite-data-ref.c: Same.
2906 * graphite-data-ref.h: New.
2908 (pbb_compare, graphite_sort_pbbs, graphite_trans_bb_move_loop,
2909 graphite_trans_bb_strip_mine, strip_mine_profitable_p,
2910 is_interchange_valid, graphite_trans_bb_block,
2911 graphite_trans_loop_block, scop_max_loop_depth,
2912 graphite_trans_scop_block, graphite_apply_transformations,
2913 new_poly_bb, free_poly_bb, new_scop, free_scop): Moved to
2915 * graphite-poly.h: New.
2916 * graphite-poly.c: New.
2917 * Makefile.in (OBJS-common): Add graphite-poly.o.
2918 (graphite-poly.o): New rule.
2919 * tree-data-ref.h (struct data_reference): Remove unused scop field.
2922 2009-02-18 Sebastian Pop <sebastian.pop@amd.com>
2923 Tobias Grosser <grosser@fim.uni-passau.de>
2925 * graphite.c: Replace gb -> gbb.
2927 * graphite-data-ref.c: Same.
2929 2009-02-18 Sebastian Pop <sebastian.pop@amd.com>
2930 Tobias Grosser <grosser@fim.uni-passau.de>
2932 * Makefile.in (OBJS-commmon): Add sese.o.
2934 (graphite.o): Add sese.h.
2935 * graphite.c (bb_in_ss_p, loop_in_sese_p,
2936 sese_build_livein_liveouts_use, sese_build_livein_liveouts_bb,
2937 sese_build_livein_liveouts, register_bb_in_sese, new_sese, free_sese):
2939 (block_before_scop): Add missing return.
2940 (new_scop, free_scop): Remove SESE data structures.
2941 (scop_record_loop, scan_tree_for_params, find_params_in_bb,
2942 find_scop_parameters, build_loop_iteration_domains,
2943 add_conditions_to_domain, register_scop_liveout_renames,
2944 copy_bb_and_scalar_dependences): Scop -> SESE.
2946 (add_conditions_to_domain): SCoP -> SESE and remove check
2947 (scop_contains_non_iv_scalar_phi_nodes): New.
2948 (build_scop_conditions_1, build_scop_conditions): Remove check for
2949 non iv scalar phi nodes.
2950 (print_scop_statistics): New.
2951 (graphite_transform_loops): Cleanup.
2953 * graphite.h: Move to sese & cleanup.
2957 2009-02-16 Sebastian Pop <sebastian.pop@amd.com>
2958 Tobias Grosser <grosser@fim.uni-passau.de>
2960 * graphite.c (build_scop_conditions_1): Conditions are only
2961 at the end of a basic block.
2963 2009-02-16 Sebastian Pop <sebastian.pop@amd.com>
2964 Tobias Grosser <grosser@fim.uni-passau>
2966 * graphite.h (struct graphite_bb): Remove compressed_alpha_matrix
2968 (GBB_ALPHA): Removed.
2970 2009-02-16 Sebastian Pop <sebastian.pop@amd.com>
2971 Tobias Grosser <grosser@fim.uni-passau.de>
2973 * graphite-data-ref.c (graphite_test_dependence): Don't use
2974 GBB_DYNAMIC_SCHEDULE.
2975 * graphite.c (new_graphite_bb): Same.
2976 (free_graphite_bb): Same.
2977 (build_scop_dynamic_schedules): Removed.
2978 (graphite_transform_loops): Don't call it.
2979 * graphite.h (struct graphite_bb): Remove dynamic_schedule field.
2980 (GBB_DYNAMIC_SCHEDULE): Removed.
2982 2009-02-16 Sebastian Pop <sebastian.pop@amd.com>
2983 Tobias Grosser <grosser@fim.uni-passau.de>
2985 * graphite.c (schedule_to_scattering): Don't use CloogMatrix.
2986 (print_graphite_bb): Same.
2987 (build_cloog_prog): Same.
2989 2009-02-16 Sebastian Pop <sebastian.pop@amd.com>
2990 Tobias Grosser <grosser@fim.uni-passau.de>
2992 * graphite.c (build_cloog_prog): Don't use CloogMatrix.
2994 2009-02-16 Sebastian Pop <sebastian.pop@amd.com>
2995 Tobias Grosser <grosser@fim.uni-passau.de>
2997 * graphite.c (build_scop_context): Don't use CloogMatrix.
2998 * graphite-ppl.c (new_Cloog_Domain_from_ppl_Polyhedron): New.
2999 * graphite-ppl.h (new_Cloog_Domain_from_ppl_Polyhedron): Declared.
3001 2009-02-16 Sebastian Pop <sebastian.pop@amd.com>
3002 Tobias Grosser <grosser@fim.uni-passau.de>
3004 * graphite.h (struct scop): Move params, old_ivs, loops, loop_nest,
3005 liveout_renames, add_params fields...
3006 (struct sese): ... here.
3007 (SESE_PARAMS, SESE_LOOPS, SESE_LOOP_NEST, SESE_ADD_PARAMS,
3008 SESE_PARAMS, SESE_OLDIVS, SESE_LIVEOUT_RENAMES): New.
3010 2009-02-16 Sebastian Pop <sebastian.pop@amd.com>
3011 Tobias Grosser <grosser@fim.uni-passau.de>
3013 * graphite.c (print_scop): Do not print the CLooG program.
3014 (new_scop, free_scop, initialize_cloog_names, build_scop_context,
3015 build_cloog_prog, gloog): Don't use SCOP_PROG.
3016 (find_transform): Renamed scop_to_clast.
3017 (print_generated_program, debug_generated_program): New.
3018 (graphite_transform_loops): Adapt to new interface.
3019 * graphite.h (struct scop): Remove program field.
3020 (SCOP_PROG): Removed.
3021 (print_generated_program, debug_generated_program): Declared.
3023 2009-02-16 Sebastian Pop <sebastian.pop@amd.com>
3025 * graphite-data-ref.c (schedule_precedes_p, schedule_same_p): New.
3026 (statement_precedes_p): Use schedule_same_p and schedule_precedes_p.
3027 * graphite.c (gbb_compare, schedule_to_scattering, print_graphite_bb,
3028 free_graphite_bb, build_scop_canonical_schedules,
3029 graphite_trans_bb_strip_mine, graphite_trans_scop_block): Static
3030 schedules are now represented using a ppl_Linear_Expression_t.
3031 * graphite.h (struct graphite_bb): Same.
3032 * graphite-ppl.c (ppl_lexico_compare_linear_expressions): New.
3033 * graphite-ppl.h (ppl_lexico_compare_linear_expressions): Declared.
3035 2009-02-15 Sebastian Pop <sebastian.pop@amd.com>
3037 * graphite.c: Free local memory.
3038 * graphite-ppl.c: Same.
3040 2009-02-15 Sebastian Pop <sebastian.pop@amd.com>
3042 * graphite.c (const_column_index, get_first_matching_sign_row_index,
3043 get_lower_bound_row, get_upper_bound_row, copy_constraint,
3044 swap_constraint_variables, scale_constraint_variable): Removed.
3045 (graphite_trans_bb_strip_mine): Remove pong.
3046 * graphite-ppl.c: Include missing header files.
3047 (set_inhomogeneous, set_coef, shift_poly, ppl_strip_loop): New.
3048 * graphite-ppl.h (ppl_strip_loop): Declared.
3049 * Makefile.in (graphite-ppl.o): Adjust dependences.
3051 2009-02-14 Sebastian Pop <sebastian.pop@amd.com>
3053 * graphite.c (build_loop_iteration_domains): Remove ping pong.
3054 (build_scop_iteration_domain): Same.
3056 2009-02-13 Sebastian Pop <sebastian.pop@amd.com>
3058 * graphite.c (scan_tree_for_params, add_conditions_to_domain): Remove
3060 (add_value_to_dim, scan_tree_for_params_right_scev,
3061 scan_tree_for_params_int): New.
3062 * graphite-ppl.c (oppose_constraint): New.
3063 (insert_constraint_into_matrix): Implement missing cases.
3064 * graphite-ppl.h (insert_constraint_into_matrix): Declared.
3066 2009-02-13 Sebastian Pop <sebastian.pop@amd.com>
3068 * graphite.c (graphite_trans_bb_move_loop): Remove ping pong,
3069 use ppl_move_dimension.
3071 2009-02-12 Sebastian Pop <sebastian.pop@amd.com>
3073 * graphite-data-ref.c: Domains are now ppl_Polyhedra_t.
3076 * graphite-ppl.c: Same.
3077 * graphite-ppl.h: Same.
3079 2009-02-12 Sebastian Pop <sebastian.pop@amd.com>
3081 Revert last 3 commits.
3083 2009-02-10 Sebastian Pop <sebastian.pop@amd.com>
3085 * graphite.c (scan_tree_for_params, add_conditions_to_domain): Remove
3087 (add_value_to_dim, scan_tree_for_params_right_scev,
3088 scan_tree_for_params_int): New.
3089 * graphite-ppl.c (oppose_constraint): New.
3090 (insert_constraint_into_matrix): Implement missing cases.
3091 * graphite-ppl.h (insert_constraint_into_matrix): Declared.
3093 2009-02-10 Sebastian Pop <sebastian.pop@amd.com>
3095 * graphite.c (graphite_trans_bb_move_loop): Remove unused variables.
3097 2009-02-10 Sebastian Pop <sebastian.pop@amd.com>
3098 Tobias Grosser <grosser@fim.uni-passau.de>
3100 * graphite.c (graphite_trans_bb_move_loop): Remove ping pong,
3101 use ppl_move_dimension.
3102 * graphite-ppl.c (ppl_move_dimension): New.
3103 * graphite-ppl.h (ppl_move_dimension): Declared.
3105 2009-02-10 Sebastian Pop <sebastian.pop@amd.com>
3107 * graphite.c: Do not include cloog/cloog.h.
3108 (print_graphite_bb): Remove ping pong, call PPL print function.
3110 2009-02-10 Tobias Grosser <grosser@fim.uni-passau.de>
3112 * Makefile.in (OBJS-common): Add graphite-ppl.o.
3113 (graphite.o): Add dependence on graphite-ppl.h.
3114 (graphite-ppl.o): New.
3115 (graphite-data-ref.c): Ping pong between PPL data structures
3117 * graphite-ppl.c: New.
3118 * graphite-ppl.h: New.
3119 * graphite.c: Include graphite-ppl.h.
3120 (print_graphite_bb, add_conditions_to_domain, build_cloog_prog,
3121 graphite_trans_bb_move_loop, graphite_trans_bb_strip_mine):
3122 Ping pong between PPL data structures and matrices.
3123 (new_graphite_bb): Create a PPL constraint system.
3124 Call ppl_delete_Constraint_System instead of cloog_matrix_free.
3125 (build_loop_iteration_domains): Use PPL functions.
3126 * graphite.h: Include graphite-ppl.h. Fix comments.
3127 (graphite_bb): Use a ppl_Constraint_System_t instead of
3128 CloogMatrix for representing the domain.
3129 (scop): Remove static_schedule.
3130 (gbb_nb_loops): Ping pong between PPL data structures and matrices.
3132 2009-02-06 Sebastian Pop <sebastian.pop@amd.com>
3134 * graphite.c: Fix some comments.
3136 2009-02-05 Sebastian Pop <sebastian.pop@amd.com>
3139 * graphite.c (if_region_set_false_region): After moving a region
3140 in the false branch of a condition, remove the empty dummy
3142 (gloog): Remove wrong fix for PR38953.
3144 2009-02-03 Tobias Grosser <grosser@fim.uni-passau.de>
3146 * graphite.c (bb_in_sese_p, sese_build_livein_liveouts_use,
3147 sese_build_livein_liveouts_bb, sese_build_livein_liveouts,
3148 register_bb_in_sese, new_sese, free_sese): Moved.
3149 (dot_scop_1, build_scop_loop_nests, build_loop_iteration_domains,
3150 outermost_loop_in_scop, build_scop_iteration_domain,
3151 expand_scalar_variables_ssa_name, get_vdef_before_scop,
3152 limit_scops): Use bb_in_sese_p instead of bb_in_scop_p.
3153 Use loop_in_sese_p instead of loop_in_scop_p.
3154 (new_graphite_bb, new_scop, gloog): Do not initialize SCOP_BBS_B.
3155 (free_scop): Do not free SCOP_BBS_B.
3156 (nb_loops_around_loop_in_scop, nb_loops_around_gb,
3157 ref_nb_loops): Moved here...
3158 * graphite.h (ref_nb_loops): ... from here.
3159 (struct scop): Remove bbs_b bitmap.
3160 (SCOP_BBS_B, bb_in_scop_p, loop_in_scop_p): Removed.
3161 * testsuite/gcc.dg/graphite/scop-19.c: New
3163 2009-02-03 Tobias Grosser <grosser@fim.uni-passau.de>
3165 * graphite.c (scopdet_basic_block_info): Fix bug in scop
3168 2009-01-30 Tobias Grosser <grosser@fim.uni-passau.de>
3170 * graphite.c (new_loop_to_cloog_loop_str, hash_loop_to_cloog_loop,
3171 eq_loop_to_cloog_loop): Remove.
3172 (new_scop, free_scop): Remove SCOP_LOOP2CLOOG_LOOP.
3173 * graphite.h (struct scop): Remove loop2cloog_loop.
3174 (loop_domain_dim, loop_iteration_vector_dim): Remove.
3176 2009-01-30 Tobias Grosser <grosser@fim.uni-passau.de>
3178 * opts.c (decode_options): Only add graphite options to O2
3179 if we compile with graphite enabled.
3181 2009-01-26 Sebastian Pop <sebastian.pop@amd.com>
3183 * Merge from mainline (r143163:143684).
3185 2009-01-26 Sebastian Pop <sebastian.pop@amd.com>
3187 * graphite.c (debug_value): Removed.
3188 * graphite.h (debug_value): Removed.
3190 2009-01-23 Sebastian Pop <sebastian.pop@amd.com>
3192 * passes.c (init_optimization_passes): Do not call pass_copy_prop
3193 after graphite: pass_copy_prop does not maintain a proper loop closed
3194 SSA form. pass_copy_prop should be fixed.
3196 2009-01-23 Sebastian Pop <sebastian.pop@amd.com>
3198 * graphite.c (scop_adjust_phis_for_liveouts): Fix warning.
3200 2009-01-23 Sebastian Pop <sebastian.pop@amd.com>
3202 * graphite.c (graphite_verify): Add a call to verify_loop_closed_ssa.
3203 (gloog): Split the exit of the scop when the scop exit is a loop exit.
3204 (graphite_transform_loops): Only call cleanup_tree_cfg if gloog
3207 2009-01-20 Sebastian Pop <sebastian.pop@amd.com>
3209 * graphite.c (gloog): Return true when code gen succeeded.
3210 (graphite_transform_loops): Do not call cleanup_tree_cfg if
3211 the code of the function did not changed. After cleanup_tree_cfg
3212 call rewrite_into_loop_closed_ssa to maintain the loop closed ssa
3215 2009-01-19 Sebastian Pop <sebastian.pop@amd.com>
3217 * graphite.c (stmt_simple_for_scop_p): Also handle cases when
3218 gimple_call_lhs is NULL.
3220 2009-01-16 Sebastian Pop <sebastian.pop@amd.com>
3221 Tobias Grosser <tobi.grosser@amd.com>
3223 * graphite.c (graphite_trans_scop_block): Do not block single
3226 2009-01-15 Sebastian Pop <sebastian.pop@amd.com>
3227 Tobias Grosser <tobi.grosser@amd.com>
3229 * graphite.c (build_scop_canonical_schedules): Start schedules at
3232 2009-01-15 Sebastian Pop <sebastian.pop@amd.com>
3233 Tobias Grosser <tobi.grosser@amd.com>
3235 * graphite.c (compare_prefix_loops): New.
3236 (build_scop_canonical_schedules): Rewritten.
3237 (graphite_transform_loops): Move build_scop_canonical_schedules
3238 after build_scop_iteration_domain.
3240 2009-01-14 Sebastian Pop <sebastian.pop@amd.com>
3241 Tobias Grosser <tobi.grosser@amd.com>
3243 * graphite.c (add_conditions_to_domain): Add the loops to
3244 the dimension of the iteration domain. Do copy the domain
3245 only when it exists.
3246 (build_scop_conditions_1): Do not call add_conditions_to_domain.
3247 (add_conditions_to_constraints): New.
3248 (can_generate_code_stmt, can_generate_code): Removed.
3249 (gloog): Do not call can_generate_code.
3250 (graphite_transform_loops): Call add_conditions_to_constraints
3251 after building the iteration domain.
3253 2009-01-14 Sebastian Pop <sebastian.pop@amd.com>
3254 Tobias Grosser <tobi.grosser@amd.com>
3255 Jan Sjodin <jan.sjodin@amd.com>
3257 * graphite.c (scan_tree_for_params): On substractions negate
3258 all the coefficients of the term.
3259 (clast_to_gcc_expression_red): New. Handle reduction expressions
3260 of more than two operands.
3261 (clast_to_gcc_expression): Call clast_to_gcc_expression_red.
3262 (get_vdef_before_scop): Handle also the case of default definitions.
3264 2009-01-14 Sebastian Pop <sebastian.pop@amd.com>
3267 * graphite.c (get_vdef_before_scop, scop_adjust_vphi): New.
3268 (scop_adjust_phis_for_liveouts): Call scop_adjust_vphi.
3269 (gloog): Do not call cleanup_tree_cfg.
3270 (graphite_transform_loops): Call cleanup_tree_cfg after all
3271 scops have been code generated.
3273 2009-01-13 Sebastian Pop <sebastian.pop@amd.com>
3275 * passes.c (init_optimization_passes): Schedule after
3276 graphite transforms pass_copy_prop, pass_dce_loop and pass_lim.
3278 2009-01-13 Sebastian Pop <sebastian.pop@amd.com>
3280 * graphite.c (expand_scalar_variables_stmt): Do not pass loop_p.
3282 (expand_scalar_variables_ssa_name): Do not pass loop_p. Fix comment.
3283 Set the type of an expression to the type of its assign statement.
3284 (expand_scalar_variables_expr): Do not pass loop_p.
3285 Fix comment. Stop recursion on tcc_constant or tcc_declaration.
3286 (copy_bb_and_scalar_dependences): Do not pass loop_p.
3287 (translate_clast): Update call to copy_bb_and_scalar_dependences.
3289 2009-01-11 Sebastian Pop <sebastian.pop@amd.com>
3291 * graphite.c (expand_scalar_variables_ssa_name): Set the type of
3292 an expression to the gimple_expr_type of its assign statement.
3293 (expand_scalar_variables_expr): Stop recursion on tcc_constant
3296 2009-01-11 Sebastian Pop <sebastian.pop@amd.com>
3298 PR tree-optimization/38786
3299 * testsuite/gcc.dg/graphite/pr38786.c: New.
3300 * graphite.c (expand_scalar_variables_ssa_name): New, outlined from
3301 the SSA_NAME case of expand_scalar_variables_expr.
3302 (expand_scalar_variables_expr): Also gather the scalar computation
3303 used to index the memory access.
3304 (expand_scalar_variables_stmt): Pass to expand_scalar_variables_expr
3305 the gimple_stmt_iterator where it inserts new code.
3307 2009-01-10 Sebastian Pop <sebastian.pop@amd.com>
3309 * testsuite/gcc.dg/graphite/block-3.c: Fix compile error on 32bit.
3311 2009-01-10 Sebastian Pop <sebastian.pop@amd.com>
3313 * opts.c (decode_options): Enable flag_graphite_identity and
3314 flag_loop_block in -O2 and above.
3316 2009-01-08 Sebastian Pop <sebastian.pop@amd.com>
3318 * libjava/classpath/lib/gnu/java/awt/peer/gtk/GtkMouseInfoPeer.class:
3319 Fix merge problem: replace with the file from trunk.
3321 2009-01-08 Sebastian Pop <sebastian.pop@amd.com>
3323 * Merge from mainline (r141727:143163).
3325 2009-01-07 Sebastian Pop <sebastian.pop@amd.com>
3326 Jan Sjodin <jan.sjodin@amd.com>
3328 PR tree-optimization/38559
3329 * testsuite/gcc.dg/graphite/pr38559.c: New.
3331 * graphite.c (debug_value, copy_constraint,
3332 swap_constraint_variables, scale_constraint_variable, ): New.
3333 (get_lower_bound, get_upper_bound): Removed.
3334 (graphite_trans_bb_strip_mine): Clean up this code that works
3335 only for constant number of iterations. Fully copy upper and
3336 lower bound constraints, not only the constant part of them.
3337 * graphite.h (debug_value): Declared.
3339 2009-01-06 Jan Sjodin <jan.sjodin@amd.com>
3341 PR tree-optimization/38492
3342 PR tree-optimization/38498
3343 * tree-check.c (operator_is_linear, scev_is_linear_expression): New.
3344 * tree-chrec.h (scev_is_linear_expression): Declared.
3345 * graphite.c (graphite_cannot_represent_loop_niter): New.
3346 (scopdet_basic_block_info): Call graphite_cannot_represent_loop_niter.
3347 (graphite_loop_normal_form): Use gcc_assert.
3348 (scan_tree_for_params): Use CASE_CONVERT.
3349 (phi_node_is_iv, bb_contains_non_iv_scalar_phi_nodes): New.
3350 (build_scop_conditions_1): Call bb_contains_non_iv_scalar_phi_nodes.
3351 Use gcc_assert. Discard scops that contain unhandled cases.
3352 (build_scop_conditions): Return a boolean status for unhandled cases.
3353 (strip_mine_profitable_p): Print the loop number, not its depth.
3354 (is_interchange_valid): Pass the depth of the loop nest, don't
3355 recompute it wrongly.
3356 (graphite_trans_bb_block): Same.
3357 (graphite_trans_bb_block): Print tentative of loop blocking.
3358 (graphite_trans_scop_block): Do not print that the loop has been
3360 (graphite_transform_loops): Do not handle scops that contain condition
3363 * testsuite/gcc.dg/graphite/pr38500.c: Fixed warning as committed
3365 * testsuite/gcc.dg/graphite/block-0.c: Update test.
3366 * testsuite/gcc.dg/graphite/block-1.c: Same.
3367 * testsuite/gcc.dg/graphite/block-2.c: Remove xfail and test for
3369 * testsuite/gcc.dg/graphite/block-4.c: Remove test for strip mine.
3370 * testsuite/gcc.dg/graphite/block-3.c: New.
3371 * testsuite/gcc.dg/graphite/pr38498.c: New.
3373 2008-12-22 Harsha Jagasia <harsha.jagasia@amd.com>
3375 PR tree-optimization/38510
3376 * gcc.dg/graphite/pr38510.c: New.
3377 * graphite.c (recompute_all_dominators): Call mark_irreducible_loops.
3378 (translate_clast): Call recompute_all_dominators before
3380 (gloog): Call recompute_all_dominators before graphite_verify.
3382 2008-12-12 Sebastian Pop <sebastian.pop@amd.com>
3384 PR tree-optimization/38492
3385 * graphite.c (rename_map_elt, debug_rename_elt,
3386 debug_rename_map_1, debug_rename_map, new_rename_map_elt,
3387 rename_map_elt_info, eq_rename_map_elts,
3388 get_new_name_from_old_name, bb_in_sese_p): Moved around.
3389 (sese_find_uses_to_rename_use): Renamed sese_build_livein_liveouts_use.
3390 (sese_find_uses_to_rename_bb): Renamed sese_build_livein_liveouts_bb.
3391 (sese_build_livein_liveouts): New.
3392 (new_sese, free_sese): New.
3393 (new_scop): Call new_sese.
3394 (free_scop): Call free_sese.
3395 (rename_variables_from_edge, rename_phis_end_scop): Removed.
3396 (register_old_new_names): Renamed register_old_and_new_names.
3397 (register_scop_liveout_renames, add_loop_exit_phis,
3398 insert_loop_close_phis, struct igp,
3399 default_liveout_before_guard, add_guard_exit_phis,
3400 insert_guard_phis, copy_renames): New.
3401 (translate_clast): Call insert_loop_close_phis and insert_guard_phis.
3402 (sese_add_exit_phis_edge): Renamed scop_add_exit_phis_edge.
3403 (rewrite_into_sese_closed_ssa): Renamed scop_insert_phis_for_liveouts.
3404 (scop_adjust_phis_for_liveouts): New.
3405 (gloog): Call scop_adjust_phis_for_liveouts.
3407 * graphite.h (struct sese): Documented. Added fields liveout,
3409 (SESE_LIVEOUT, SESE_LIVEIN, SESE_LIVEIN_VER, SESE_NUM_VER): New.
3410 (new_sese, free_sese, sese_build_livein_liveouts): Declared.
3411 (struct scop): Added field liveout_renames.
3412 (SCOP_LIVEOUT_RENAMES): New.
3414 2008-12-11 Sebastian Pop <sebastian.pop@amd.com>
3416 PR tree-optimization/38409
3417 * gcc.dg/graphite/pr38409.c: New.
3418 * graphite.c (nb_reductions_in_loop): Use simple_iv.
3420 2008-12-11 Sebastian Pop <sebastian.pop@amd.com>
3422 * graphite.c (gcc_type_for_cloog_iv): By default return
3424 (graphite_create_new_loop): Don't fold_convert the already
3425 fold_convert-ed expression.
3427 2008-12-11 Harsha Jagasia <harsha.jagasia@amd.com>
3429 PR tree-optimization/38446
3430 * gcc.dg/graphite/pr38446.c: New.
3431 * graphite.c (register_bb_in_sese): New.
3432 (bb_in_sese_p): Check if bb belongs to sese region by explicitly
3433 looking at the bbs in the region.
3434 * graphite.h (sese): Add region_basic_blocks pointer set to
3435 structure and initialize at the time of defining new scop.
3437 2008-12-11 Tobias Grosser <grosser@fim.uni-passau.de>
3439 * graphite.c (new_graphite_bb): Initialize GBB_STATIC_SCHEDULE.
3440 (find_params_in_bb): Do not free data refs.
3441 (free_graphite_bb): Add FIXME on disabled free_data_refs.
3443 2008-12-11 Sebastian Pop <sebastian.pop@amd.com>
3445 * testsuite/gcc.dg/graphite/scop-16.c: Test only scop specific info.
3446 * testsuite/gcc.dg/graphite/scop-17.c: Same.
3447 * testsuite/gcc.dg/graphite/block-5.c: New.
3448 * testsuite/gcc.dg/graphite/block-6.c: New.
3449 * testsuite/gcc.dg/graphite/pr37485.c: Clean dump file after.
3450 * testsuite/gcc.dg/graphite/pr37684.c: Same.
3451 * testsuite/gcc.dg/graphite/block-2.c: Same.
3453 * graphite.c (struct ivtype_map_elt): New.
3454 (debug_ivtype_elt, debug_ivtype_map_1, debug_ivtype_map,
3455 new_ivtype_map_elt, ivtype_map_elt_info, eq_ivtype_map_elts,
3456 gcc_type_for_cloog_iv): New.
3457 (loop_iv_stack_patch_for_consts): Use the type of the induction
3458 variable from the original loop, except for the automatically
3459 generated loops, i.e., in the case of a strip-mined loop, in
3460 which case there is no original loop: in that case just use
3462 (new_graphite_bb): Initialize GBB_CLOOG_IV_TYPES.
3463 (free_graphite_bb): Free GBB_CLOOG_IV_TYPES.
3464 (clast_name_to_gcc): Accept params to be NULL.
3465 (clast_to_gcc_expression): Take an extra parameter for the type.
3466 Convert to that type all the expressions built by this function.
3467 (gcc_type_for_clast_expr, gcc_type_for_clast_eq): New.
3468 (graphite_translate_clast_equation): Compute the type of the
3469 clast_equation before translating its LHS and RHS.
3470 (clast_get_body_of_loop, gcc_type_for_iv_of_clast_loop): New.
3471 (graphite_create_new_loop): Compute the type of the induction
3472 variable before translating the lower and upper bounds and before
3473 creating the induction variable.
3474 (rename_variables_from_edge, rename_phis_end_scop): New.
3475 (copy_bb_and_scalar_dependences): Call rename_phis_end_scop.
3476 (sese_add_exit_phis_edge): Do not use integer_zero_node.
3477 (find_cloog_iv_in_expr, compute_cloog_iv_types_1,
3478 compute_cloog_iv_types): New.
3479 (gloog): Call compute_cloog_iv_types before starting the
3480 translation of the clast.
3482 * graphite.h (struct graphite_bb): New field cloog_iv_types.
3483 (GBB_CLOOG_IV_TYPES): New.
3484 (debug_ivtype_map): Declared.
3485 (oldiv_for_loop): New.
3487 2008-12-10 Tobias Grosser <grosser@fim.uni-passau.de>
3490 * graphite.c (new_scop): Initialize SCOP_ADD_PARAMS.
3491 (param_index): Assert if parameter is not know after parameter
3493 (find_params_in_bb): Detect params directly in GBB_CONDITIONS.
3494 (find_scop_parameters): Mark, that we have finished parameter
3496 (graphite_transform_loops): Move condition detection before parameter
3498 * graphite.h (struct scop): Add SCOP_ADD_PARAMS.
3499 * testsuite/gfortran.dg/graphite/pr38459.f90: New.
3501 2008-12-09 Tobias Grosser <grosser@fim.uni-passau.de>
3503 * graphite.c (graphite_transform_loops): Always call find_transform ()
3504 in ENABLE_CHECKING. So we test these code paths, even if we do not
3507 2008-12-09 Tobias Grosser <grosser@fim.uni-passau.de>
3509 * graphite.c (print_graphite_bb): Fix printing to file != dump_file.
3510 (print_scop): Ditto.
3512 2008-12-08 Tobias Grosser <grosser@fim.uni-passau.de>
3515 Fix testsuite/gfortran.dg/graphite/id-3.f90.
3516 * graphite.c (scopdet_basic_block_info): Fix bug that found some
3517 regions more than once.
3519 2008-12-03 Sebastian Pop <sebastian.pop@amd.com>
3521 Fix testsuite/gfortran.dg/graphite/id-4.f90.
3522 * graphite.c (scan_tree_for_params): Do not compute the multiplicand
3525 2008-12-03 Sebastian Pop <sebastian.pop@amd.com>
3527 Fix testsuite/gfortran.dg/graphite/id-1.f90.
3528 * graphite.c (gmp_cst_to_tree): Pass the type in parameter.
3529 (loop_iv_stack_patch_for_consts): Update use of gmp_cst_to_tree.
3530 (max_precision_type): New.
3531 (value_clast): Removed.
3532 (clast_to_gcc_expression): Be more careful to types of expressions.
3533 Use max_precision_type and update use of gmp_cst_to_tree.
3534 (graphite_translate_clast_equation): Use max_precision_type.
3535 (graphite_create_guard_cond_expr): Do not use integer_type_node,
3536 use the type of the condition.
3537 (graphite_create_new_loop): Do not use integer_type_node, use the
3538 max_precision_type of lb and ub.
3540 2008-12-03 Sebastian Pop <sebastian.pop@amd.com>
3542 * graphite.c (build_scops_1): Initialize open_scop.exit
3545 2008-12-02 Sebastian Pop <sebastian.pop@amd.com>
3547 * testsuite/gcc.dg/graphite/pr38084.c: New.
3548 * testsuite/gfortran.dg/graphite/id-1.f90: New.
3549 * testsuite/gfortran.dg/graphite/id-2.f90: New.
3550 * testsuite/gfortran.dg/graphite/id-3.f90: New.
3551 * testsuite/gfortran.dg/graphite/id-4.f90: New.
3552 * testsuite/gfortran.dg/graphite/pr37857.f90: New.
3554 2008-12-02 Sebastian Pop <sebastian.pop@amd.com>
3555 Jan Sjodin <jan.sjodin@amd.com>
3556 Harsha Jagasia <harsha.jagasia@amd.com>
3568 * testsuite/gcc.dg/graphite/pr38073.c: New.
3569 * testsuite/gcc.dg/graphite/pr37928.c: New.
3570 * testsuite/gcc.dg/graphite/pr37883.c: New.
3571 * testsuite/gcc.dg/graphite/pr38125.c: New.
3572 * testsuite/gfortran.dg/graphite/pr38083.f90: New.
3573 * testsuite/gfortran.dg/graphite/pr37852.f90: New.
3574 * testsuite/gfortran.dg/graphite/pr37980.f90: New.
3576 * testsuite/gcc.dg/graphite/scop-18.c: Remove reduction, test for
3577 the number of detected scops. Copy exact same test for loop
3579 * testsuite/gcc.dg/graphite/block-1.c: Fix the number of expected
3580 loops to be blocked as reductions are not handled.
3581 * testsuite/gcc.dg/graphite/block-4.c: ...here. New.
3583 * tree-phinodes.c (remove_phi_nodes): New, extracted from...
3584 * tree-cfg.c (remove_phi_nodes_and_edges_for_unreachable_block):
3586 * tree-flow.h (remove_phi_nodes, canonicalize_loop_ivs): Declared.
3587 * Makefile.in (graphite.o): Depend on value-prof.h.
3588 (graphite.o-warn): Removed -Wno-error.
3589 * tree-parloops.c (canonicalize_loop_ivs): Allow reduction_list
3590 to be a NULL pointer. Call update_stmt. Return the newly created
3591 cannonical induction variable.
3593 * graphite.h (debug_rename_map): Declared. Fix some comments.
3595 * graphite.c: Reimplement the code generation from graphite to gimple.
3596 Include value-prof.h.
3597 (loop_iv_stack_get_iv): Do not return NULL for constant substitutions.
3598 (get_old_iv_from_ssa_name): Removed.
3599 (graphite_stmt_p): New.
3600 (new_graphite_bb): Test for useful statements before building a
3601 graphite statement for the basic block.
3602 (free_graphite_bb): Do not free GBB_DATA_REFS: this is a bug
3603 in free_data_ref that calls BITMAP_FREE (DR_VOPS (dr)) without
3605 (recompute_all_dominators, graphite_verify,
3606 nb_reductions_in_loop, graphite_loop_normal_form): New.
3607 (scop_record_loop): Call graphite_loop_normal_form.
3608 (build_scop_loop_nests): Iterate over all the blocks of the
3609 function instead of relying on the incomplete information from
3610 SCOP_BBS. Return the success of the operation.
3611 (find_params_in_bb): Use the data from GBB_DATA_REFS.
3612 (add_bb_domains): Removed.
3613 (build_loop_iteration_domains): Don't call add_bb_domains.
3614 Add the iteration domain only to the basic blocks that have been
3615 translated to graphite.
3616 (build_scop_conditions_1): Add constraints only if the basic
3617 block have been translated to graphite.
3618 (build_scop_data_accesses): Completely disabled until data
3619 dependence is correctly implemented.
3620 (debug_rename_elt, debug_rename_map_1, debug_rename_map): New.
3621 (remove_all_edges_1, remove_all_edges): Removed.
3622 (get_new_name_from_old_name): New.
3623 (graphite_rename_variables_in_stmt): Renamed
3624 rename_variables_in_stmt. Call get_new_name_from_old_name.
3625 Use replace_exp and update_stmt.
3626 (is_old_iv): Renamed is_iv.
3627 (expand_scalar_variables_stmt): Extra parameter for renaming map.
3628 Use replace_exp and update_stmt.
3629 (expand_scalar_variables_expr): Same. Use the map to get the
3630 new names for the renaming of induction variables and for the
3631 renaming of variables after a basic block has been copied.
3632 (expand_scalar_variables): Same.
3633 (graphite_rename_variables): Renamed rename_variables.
3634 (move_phi_nodes): Removed.
3635 (get_false_edge_from_guard_bb): New.
3636 (build_iv_mapping): Do not insert the induction variable of a
3637 loop in the renaming iv map if the basic block does not belong
3639 (register_old_new_names, graphite_copy_stmts_from_block,
3640 copy_bb_and_scalar_dependences): New.
3641 (translate_clast): Heavily reimplemented: copy basic blocks,
3642 do not move them. Finally, in call cleanup_tree_cfg in gloog.
3643 At each translation step call graphite_verify ensuring the
3644 consistency of the SSA, loops and dominators information.
3645 (collect_virtual_phis, find_vdef_for_var_in_bb,
3646 find_vdef_for_var_1, find_vdef_for_var,
3647 patch_phis_for_virtual_defs): Removed huge hack.
3648 (mark_old_loops, remove_dead_loops, skip_phi_defs,
3649 collect_scop_exit_phi_args, patch_scop_exit_phi_args,
3650 gbb_can_be_ignored, scop_remove_ignoreable_gbbs, ): Removed.
3651 (remove_sese_region, ifsese, if_region_entry, if_region_exit,
3652 if_region_get_condition_block, if_region_set_false_region,
3653 create_if_region_on_edge, move_sese_in_condition, bb_in_sese_p,
3654 sese_find_uses_to_rename_use, sese_find_uses_to_rename_bb,
3655 sese_add_exit_phis_edge, sese_add_exit_phis_var,
3656 rewrite_into_sese_closed_ssa): New.
3657 (gloog): Remove dead code. Early return if code cannot be
3658 generated. Call cleanup_tree_cfg once the scop has been code
3660 (graphite_trans_scop_block, graphite_trans_loop_block): Do not
3661 block loops with less than two loops.
3662 (graphite_apply_transformations): Remove the call to
3663 scop_remove_ignoreable_gbbs.
3664 (limit_scops): When build_scop_loop_nests fails, continue on
3665 the next scop. Fix open_scop.entry.
3666 (graphite_transform_loops): Call recompute_all_dominators: force the
3667 recomputation of correct CDI_DOMINATORS and CDI_POST_DOMINATORS.
3668 Call initialize_original_copy_tables and free_original_copy_tables
3669 to be able to copy basic blocks during code generation.
3670 When build_scop_loop_nests fails, continue on next scop.
3671 (value_clast): New union.
3672 (clast_to_gcc_expression): Fix type cast warning.
3674 2008-11-09 Sebastian Pop <sebastian.pop@amd.com>
3676 * Merge from mainline (r140838:141727).
3678 2008-11-05 Tobias Grosser <grosser@fim.uni-passau.de>
3682 * graphite.c (scan_tree_for_params): Add POINTER_PLUS_EXPR.
3684 2008-11-05 Tobias Grosser <grosser@fim.uni-passau.de>
3688 * graphite.c (scopdet_basic_block_info): Fix loops with multiple
3689 exits and conditions.
3690 * testsuite/gcc.dg/graphite/pr37943.c: New.
3692 2008-10-23 Tobias Grosser <grosser@fim.uni-passau.de>
3695 * graphite.c (gloog): Replace EXIT_BLOCK_PTR with scop exit.
3697 2008-10-23 Tobias Grosser <grosser@fim.uni-passau.de>
3699 * doc/invoke.texi: Fix spaces.
3701 2008-10-22 Sebastian Pop <sebastian.pop@amd.com>
3703 PR tree-optimization/37891
3704 Reverted last commit.
3705 * graphite.c (create_single_entry_edge): Set
3706 EDGE_IRREDUCIBLE_LOOP and BB_IRREDUCIBLE_LOOP.
3708 2008-10-21 Sebastian Pop <sebastian.pop@amd.com>
3709 Mitul Thakkar <mitul.thakkar@amd.com>
3711 * graphite.c (create_single_entry_edge): Set
3712 EDGE_IRREDUCIBLE_LOOP and BB_IRREDUCIBLE_LOOP.
3714 2008-10-16 Tobias Grosser <grosser@fim.uni-passau.de>
3716 * doc/invoke.texi: Add -fgraphite-identity.
3717 * graphite.c (graphite_apply_transformations): Check for
3718 -fgraphite-identity.
3719 * toplev.c (process_options): Add flag_graphite_identity.
3720 * tree-ssa-loop.c: Add flag_graphite_identity.
3722 2008-10-14 Sebastian Pop <sebastian.pop@amd.com>
3724 Undo changes from 2008-10-02:
3725 * tree-ssa-loop-ivopts.c (rewrite_use_nonlinear_expr): Convert
3726 operand type when copying the operand to a variable of different type.
3727 * cfgloopmanip.c (create_empty_loop_on_edge): Write exit condition
3728 with the IV name after increment.
3730 2008-10-14 Sebastian Pop <sebastian.pop@amd.com>
3731 Harsha Jagasia <harsha.jagasia@amd.com>
3733 PR tree-optimization/37828
3734 * testsuite/gcc.dg/graphite/pr37828.c: New.
3735 * graphite.c (graphite_trans_loop_block): Do not loop block
3736 single nested loops.
3738 2008-10-09 Harsha Jagasia <harsha.jagasia@amd.com>
3739 Sebastian Pop <sebastian.pop@amd.com>
3741 * graphite.c (struct rename_map_elt, new_rename_map_elt,
3742 rename_map_elt_info, eq_rename_map_elts): New.
3743 (graphite_rename_ivs_stmt): Renamed graphite_rename_variables_in_stmt.
3744 (expand_scalar_variables_expr): Change parameters.
3745 (expand_scalar_variables_stmt): Same.
3746 (expand_scalar_variables): Same.
3747 (graphite_rename_ivs): Rename graphite_rename_variables.
3748 (build_iv_mapping): New.
3749 (translate_clast): Call build_iv_mapping.
3750 * graphite.h (gbb_p): New name.
3752 2008-10-03 Harsha Jagasia <harsha.jagasia@amd.com>
3754 PR tree-optimization/37684
3755 * gcc.dg/graphite/pr37684.c: New.
3756 * graphite.c (exclude_component_ref): New.
3757 (is_simple_operand): Call exclude_component_ref.
3759 2008-10-02 Jan Sjodin <jan.sjodin@amd.com>
3760 Harsha Jagasia <harsha.jagasia@amd.com>
3762 PR tree-optimization/37485
3763 * gcc.dg/graphite/block-2.c: New
3764 * graphite.c (gmp_cst_to_tree): Moved.
3765 (iv_stack_entry_is_constant): New.
3766 (iv_stack_entry_is_iv): New.
3767 (loop_iv_stack_push): Renamed to loop_iv_stack_push_iv.
3768 (loop_iv_stack_insert_constant): New.
3769 (loop_iv_stack_pop): Use new datatpype.
3770 (loop_iv_stack_get_iv): Same.
3771 (loop_iv_stack_get_iv_from_name): Same.
3772 (loop_iv_stack_debug): Renamed to debug_loop_iv_stack.
3773 (loop_iv_stack_patch_for_consts): New.
3774 (loop_iv_stack_remove_constants): New.
3775 (graphite_create_new_loop): Use loop_iv_stack_push_iv.
3776 (translate_clast): Call loop_iv_stack_patch_for_consts and
3777 loop_iv_stack_remove_constants.
3778 (gloog): Use new datatype. Redirect construction edge to end
3779 block to avoid accidental deletion.
3780 * graphite.h (enum iv_stack_entry_kind): New. Tag for data in
3782 (union iv_stack_entry_data): New. Data in iv stack entry.
3783 (struct iv_stack_entry): New. Datatype for iv stack entries.
3785 2008-10-02 Sebastian Pop <sebastian.pop@amd.com>
3787 * tree-ssa-loop-ivopts.c (rewrite_use_nonlinear_expr): Convert
3788 operand type when copying the operand to a variable of different type.
3790 2008-10-02 Sebastian Pop <sebastian.pop@amd.com>
3792 * cfgloopmanip.c (create_empty_loop_on_edge): Write exit condition
3793 with the IV name after increment.
3795 2008-10-02 Sebastian Pop <sebastian.pop@amd.com>
3797 * Merge from mainline (r140164:140838).
3799 2008-09-10 Konrad Trifunovic <konrad.trifunovic@inria.fr>
3801 * graphite-data-ref.c: New.
3802 * graphite.c (print_scop): Also dump the dependence graph.
3803 (bb_in_scop_p, loop_in_scop_p, nb_loops_around_gb): Moved...
3804 (new_scop): Initialize SCOP_DEP_GRAPH.
3805 (build_scop_dynamic_schedules): New.
3806 (build_access_matrix_with_af): Fixed column numbering.
3807 (graphite_transform_loops): Call build_scop_dynamic_schedules.
3808 * graphite.h: Add ifndef/define guards against multiple inclusion.
3809 (struct scop): Add dep_graph field.
3810 (SCOP_DEP_GRAPH): Defined.
3811 (ref_nb_loops): Fixed and moved to other position.
3812 (bb_in_scop_p, loop_in_scop_p, nb_loops_around_gb): ... here.
3813 (nb_loops_around_loop_in_scop): New.
3814 (graphite_dump_dependence_graph): Declared.
3815 (graphite_build_rdg_all_levels): Declared.
3816 (graphite_test_dependence): Declared.
3817 * Makefile.in (graphite-data-ref.o): New target.
3819 2008-09-09 Sebastian Pop <sebastian.pop@amd.com>
3821 * Merge from mainline (139870:140164).
3823 2008-09-01 Sebastian Pop <sebastian.pop@amd.com>
3825 * Merge from mainline (138275:139870).
3826 * testsuite/gcc.dg/graphite/scop-matmult.c: XFailed as one of
3827 the commits from trunk broke the niter detection.
3829 2008-09-01 Sebastian Pop <sebastian.pop@amd.com>
3831 * graphite.c: Add more documentation. Fix formatting.
3832 (debug_loop_vec, debug_oldivs, loop_iv_stack,
3833 loop_iv_stack_debug): Moved...
3834 (schedule_to_scattering): Move before use.
3835 (dot_all_scops): Include in "#if 0" the code for system
3838 * graphite.h: (debug_loop_vec, debug_oldivs, loop_iv_stack,
3839 loop_iv_stack_debug): ...here.
3841 2008-08-29 Jan Sjodin <jan.sjodin@amd.com>
3843 * tree-phinodes.c (make_phi_node): Extern.
3844 (add_phi_node_to_bb): New.
3845 (create_phi_node): Call add_phi_node_to_bb.
3846 * tree-ssa-loop-ivopts.c (get_phi_with_result): New.
3847 (remove_statement): Handle case where stored phi was updated
3848 and is no longer the same.
3849 * graphite.c (is_parameter): New.
3851 (expand_scalar_variables_expr): New.
3852 (expand_scalar_variables_stmt): New.
3853 (expand_scalar_variables): New.
3854 (move_phi_nodes): Create new phi instead of moving old one.
3855 (translate_clast): Call expand_scalar_variables.
3856 (find_vdef_for_var_in_bb): Also scan regular definitions.
3857 (skip_phi_defs): New.
3858 (collect_scop_exit_phi_args): New.
3859 (patch_scop_exit_phi_args): New.
3860 (gloog): Patch phis after scop.
3861 * tree-flow.h: (add_phi_node_to_bb): Declared.
3862 (make_phi_node): Declared.
3864 2008-08-26 Sebastian Pop <sebastian.pop@amd.com>
3866 * graphite.c (end_scop): Split the entry of the scop when it
3867 is the header of the loop in which the scop is ending.
3868 (build_scops_1, limit_scops): Update uses of end_scop.
3870 2008-08-26 Sebastian Pop <sebastian.pop@amd.com>
3872 * graphite.c (dot_all_scops_1): Do not fail on uninitialized
3873 SCOP_ENTRY or SCOP_EXIT.
3875 2008-08-25 Sebastian Pop <sebastian.pop@amd.com>
3877 * graphite.c (get_construction_edge): Removed.
3878 (gloog): Construction edge is the scop entry edge.
3880 2008-08-25 Sebastian Pop <sebastian.pop@amd.com>
3882 * graphite.c (can_generate_for_scop): Removed.
3883 (gloog): Do not call it.
3885 2008-08-25 Sebastian Pop <sebastian.pop@amd.com>
3887 * graphite.c (new_scop): Entry of a scop is an edge.
3888 Initialize SESE region.
3889 (free_scop): Free SESE region.
3890 (build_scops_1, scopdet_bb_info): Work on edges, not on bbs.
3891 (split_difficult_bb): New, split from end_scop.
3892 (end_scop): Exit of a scop is an edge.
3893 (build_scop_bbs): Never check CDI_POST_DOMINATORS: this info is
3894 not automatically updated and thus is always wrong.
3895 * graphite.h (struct sese): New.
3898 (struct scop): New field for a SESE region. Remove entry, exit.
3899 (SCOP_ENTRY, SCOP_EXIT): Update definitions to match same
3900 semantics as before. Moved comment around.
3902 2008-08-25 Tobias Grosser <grosser@fim.uni-passau.de>
3903 Sebastian Pop <sebastian.pop@amd.com>
3905 * graphite.c (graphite_transform_loops): Always enable gloog
3906 and find_transform when ENABLE_CHECKING.
3908 2008-08-25 Sebastian Pop <sebastian.pop@amd.com>
3910 * graphite.c (graphite_transform_loops): Move pretty printer
3911 of SCOPs before doing any transform. Remove call to print_scops
3912 and dot_all_scops_1.
3914 2008-08-25 Sebastian Pop <sebastian.pop@amd.com>
3916 * graphite.c (dump_gbb_conditions): Don't try to print NULL pointers.
3917 (print_graphite_bb): Same.
3919 2008-08-25 Sebastian Pop <sebastian.pop@amd.com>
3921 * graphite.c (dot_all_scops_1): Cleanup.
3922 (move_scops): Fix comment.
3924 2008-08-25 Sebastian Pop <sebastian.pop@amd.com>
3926 * graphite.c (build_scop_bbs): Revert commit 139355:
3928 2008-08-20 Sebastian Pop <sebastian.pop@amd.com>
3929 Dwarakanath Rajagopal <dwarak.rajagopal@amd.com>
3931 * graphite.c (build_scop_bbs): Factor up code.
3933 2008-08-25 Tobias Grosser <grosser@fim.uni-passau.de>
3935 * graphite.c (gloog): Update dominator info.
3937 2008-08-25 Tobias Grosser <grosser@fim.uni-passau.de>
3939 * graphite.c (remove_cond_exprs): Do not fail on empty bbs.
3941 2008-08-24 Sebastian Pop <sebastian.pop@amd.com>
3943 * graphite.c (new_graphite_bb): Remove GBB_INDEX_TO_NUM_MAP
3945 (free_graphite_bb): Remove GBB_INDEX_TO_NUM_MAP free.
3946 (translate_clast): Correct formatting.
3947 * graphite.h (struct num_map): Removed.
3948 (struct graphite_bb): Remove num_map field.
3949 (GBB_INDEX_TO_NUM_MAP): Removed.
3951 2008-08-24 Sebastian Pop <sebastian.pop@amd.com>
3953 * graphite.c (build_access_matrix_with_af): Fix comments.
3954 (build_scop_data_accesses): Same.
3956 2008-08-24 Sebastian Pop <sebastian.pop@amd.com>
3958 * graphite.c (build_scop_data_accesses): Don't construct
3959 access matrices. Add a FIXME and an assert condition that
3960 should pass when the access matrices will be needed.
3962 2008-08-24 Sebastian Pop <sebastian.pop@amd.com>
3964 * tree-data-ref.c (stmt_simple_memref_p): Don't call
3966 * graphite.c (build_graphite_bb): Renamed new_graphite_bb.
3967 Moved close by free_graphite_bb.
3968 (free_graphite_bb): Call free_data_refs. Reset bb->aux.
3969 (new_scop): Move close by free_scop.
3970 (graphite_transform_loops): Avoid linear scan to reset bb->aux.
3972 2008-08-22 Jan Sjodin <jan.sjodin@amd.com>
3974 * cfgloopmanip.c (create_empty_if_region_on_edge): New.
3975 * graphite.c (clast_to_gcc_expression): Call gmp_cst_to_tree
3976 instead of recursive call.
3977 (graphite_translate_clast_equation): New.
3978 (graphite_create_guard_cond_expr): New.
3979 (graphite_create_new_guard): New.
3980 (get_stack_index_from_iv): Removed.
3981 (graphite_rename_ivs_stmt): Use gbb_loop_index.
3982 (get_true_edge_from_guard_bb): New.
3983 (translate_clast): Handle stmt_guard in clast.
3984 (get_construction_edge): Allow construction edge detection for
3985 a scope entry with multiple predecessors if one predecessor is
3986 the immediate dominator of scope entry.
3987 (can_generate_code_stmt): Enable code generation for clast_guard.
3988 (gloog): Use correct context loop. Removed check for post dominators.
3989 * cfgloop.h (create_empty_if_region_on_edge): Declared.
3991 2008-08-21 Sebastian Pop <sebastian.pop@amd.com>
3993 * graphite.c (remove_dead_loops): Document better which
3996 2008-08-21 Sebastian Pop <sebastian.pop@amd.com>
3998 * Makefile.in: Rename POLYLIBLIBS and POLYLIBINC to PPLLIBS
4000 (graphite.o): Also depends on pointer-set.h.
4002 2008-08-21 Sebastian Pop <sebastian.pop@amd.com>
4004 * graphite.c (scop_record_loop): Fix compile warning.
4006 2008-08-21 Harsha Jagasia <harsha.jagasia@amd.com>
4007 Sebastian Pop <sebastian.pop@amd.com>
4009 * graphite.c (scop_record_loop): DECL_NAME can be NULL.
4011 2008-08-21 Sebastian Pop <sebastian.pop@amd.com>
4013 * graphite.c (build_graphite_bb): Initialize bb->aux to
4014 point to the graphite_bb_p.
4015 (graphite_bb_from_bb): Renamed gbb_from_bb; returns the
4017 (add_bb_domains): Does not use the scop parameter.
4018 (graphite_transform_loops): Clean bb->aux at the end.
4020 2008-08-20 Dwarakanath Rajagopal <dwarak.rajagopal@amd.com>
4021 Sebastian Pop <sebastian.pop@amd.com>
4023 * testsuite/lib/target-supports.exp
4024 (check_effective_target_fgraphite): New.
4026 * testsuite/gcc.dg/graphite/graphite.exp: Early exit when
4027 check_effective_target_fgraphite returns false.
4028 Set dg-do-what-default to compile.
4029 (scan-graphite-dump-times): Removed.
4030 * testsuite/gfortran.dg/graphite/graphite.exp: Same.
4032 * testsuite/gcc.dg/graphite/scop-0.c: Do not use "dg-do compile".
4033 Use scan-tree-dump-times instead of scan-graphite-dump-times.
4034 * testsuite/gcc.dg/graphite/scop-1.c: Same.
4035 * testsuite/gcc.dg/graphite/scop-2.c: Same.
4036 * testsuite/gcc.dg/graphite/scop-3.c: Same.
4037 * testsuite/gcc.dg/graphite/scop-4.c: Same.
4038 * testsuite/gcc.dg/graphite/scop-5.c: Same.
4039 * testsuite/gcc.dg/graphite/scop-6.c: Same.
4040 * testsuite/gcc.dg/graphite/scop-7.c: Same.
4041 * testsuite/gcc.dg/graphite/scop-8.c: Same.
4042 * testsuite/gcc.dg/graphite/scop-9.c: Same.
4043 * testsuite/gcc.dg/graphite/scop-10.c: Same.
4044 * testsuite/gcc.dg/graphite/scop-11.c: Same.
4045 * testsuite/gcc.dg/graphite/scop-12.c: Same.
4046 * testsuite/gcc.dg/graphite/scop-13.c: Same.
4047 * testsuite/gcc.dg/graphite/scop-matmult.c: Same.
4048 * testsuite/gcc.dg/graphite/scop-14.c: Same.
4049 * testsuite/gcc.dg/graphite/scop-15.c: Same.
4050 * testsuite/gcc.dg/graphite/block-0.c: Same.
4051 * testsuite/gcc.dg/graphite/scop-16.c: Same.
4052 * testsuite/gcc.dg/graphite/block-1.c: Same.
4053 * testsuite/gcc.dg/graphite/scop-17.c: Same.
4054 * testsuite/gcc.dg/graphite/scop-18.c: Same.
4055 * testsuite/gfortran.dg/graphite/block-1.f90: Same.
4056 * testsuite/gfortran.dg/graphite/scop-1.f: Same.
4057 * testsuite/gfortran.dg/graphite/block-2.f: Same.
4059 2008-08-20 Sebastian Pop <sebastian.pop@amd.com>
4061 * graphite.c: Fix some XXX comments.
4062 (build_scop_dynamic_schedules): Removed.
4064 2008-08-20 Sebastian Pop <sebastian.pop@amd.com>
4066 * graphite.h (scop_max_loop_depth): Moved...
4067 * graphite.c (scop_max_loop_depth): ...here.
4068 (remove_all_edges_1): New.
4069 (remove_all_edges): Factored code.
4070 (remove_cond_exprs): Check only the last statement for
4071 a GIMPLE_COND expression.
4073 2008-08-20 Sebastian Pop <sebastian.pop@amd.com>
4075 * graphite.c (scan_tree_for_params): Early return when the
4076 expression is a chrec_dont_know. Handle case NEGATE_EXPR.
4077 (find_scop_parameters): Factor out code.
4078 (graphite_trans_bb_strip_mine): Remove dead code.
4080 2008-08-20 Sebastian Pop <sebastian.pop@amd.com>
4082 * graphite.c (clast_to_gcc_expression, graphite_create_new_loop,
4083 graphite_trans_bb_move_loop): Factor asserts.
4084 (gloog): Perform sanity checks only for ENABLE_CHECKING.
4085 Do not call calculate_dominance_info and estimate_bb_frequencies.
4087 2008-08-20 Jan Sjodin <jan.sjodin@amd.com>
4089 * graphite.c (create_loops_mapping, free_loops_mapping,
4090 create_loops_mapping_num, debug_loop_mapping_1,
4091 debug_loop_mapping, graphite_loops_mapping_max_loop_num,
4092 get_loop_mapping_for_num, graphite_loops_mapping_add_child,
4093 graphite_loops_mapping_add_child_num,
4094 graphite_loops_mapping_insert_child,
4095 graphite_loops_mapping_parent, get_loop_mapped_depth_for_num,
4096 get_loop_mapped_depth, split_loop_mapped_depth_for_num,
4097 loop_mapped_depth_split_loop, swap_loop_mapped_depth_for_num,
4098 create_num_from_index, get_num_from_index,
4099 swap_loop_mapped_depth): Removed.
4100 (new_scop): Do not initialize SCOP_LOOPS_MAPPING.
4101 (free_scop): Do not call free_loops_mapping.
4102 (graphite_get_new_iv_stack_index_from_old_iv): Renamed
4103 get_stack_index_from_iv. Use GBB_LOOPS instead of calling
4104 get_loop_mapped_depth.
4105 (graphite_trans_bb_move_loop): Do not update the loop mapping.
4106 (graphite_trans_bb_strip_mine): Same.
4107 * graphite.h (graphite_loops_mapping, graphite_loop_node): Removed.
4108 (struct scop): Remove field loops_mapping.
4110 2008-08-20 Sebastian Pop <sebastian.pop@amd.com>
4111 Dwarakanath Rajagopal <dwarak.rajagopal@amd.com>
4113 * graphite.c (scop_record_loop): Factor out one level of the
4114 condition by early return.
4115 (build_scop_loop_nests): Format following FSF coding style.
4116 (build_scop_dynamic_schedules): Factor out code.
4117 (scopdet_bb_info): Reindent. Default case should not be reachable.
4119 2008-08-20 Sebastian Pop <sebastian.pop@amd.com>
4120 Dwarakanath Rajagopal <dwarak.rajagopal@amd.com>
4122 * graphite.c (loop_affine_expr): Check for DECL_P or struct
4123 assignments that are not handled as simple operands for now.
4125 2008-08-20 Sebastian Pop <sebastian.pop@amd.com>
4126 Dwarakanath Rajagopal <dwarak.rajagopal@amd.com>
4128 * graphite.c (build_scop_bbs): Factor up code.
4130 2008-08-20 Sebastian Pop <sebastian.pop@amd.com>
4131 Dwarakanath Rajagopal <dwarak.rajagopal@amd.com>
4133 * graphite.c (stmt_simple_for_scop_p): Factor code out
4135 (enum gbb_type): New. Group all the GBB_* types under it.
4136 (is_loop_exit): Moved...
4137 (end_scop): Enable BB spliting.
4138 * cfgloop.c (is_loop_exit): ...here. Reimplemented.
4139 * cfgloop.h (is_loop_exit): Declared.
4141 2008-08-20 Sebastian Pop <sebastian.pop@amd.com>
4143 * doc/invoke.texi: Remove strides from examples containing
4144 DO loops when the strides are equal to 1.
4146 2008-08-20 Harsha Jagasia <harsha.jagasia@amd.com>
4147 Dwarakanath Rajagopal <dwarak.rajagopal@amd.com>
4149 * graphite.c (graphite_trans_scop_block): Or the result with
4150 the result from graphite_trans_loop_block.
4151 * testsuite/gcc.dg/graphite/block-1.c: New.
4152 * testsuite/gfortran.dg/graphite/block-1.f90: New.
4153 * testsuite/gfortran.dg/graphite/block-2.f: New.
4155 2008-08-20 Sebastian Pop <sebastian.pop@amd.com>
4157 * graphite.c (graphite_transform_loops): Call cloog_initialize
4160 2008-08-20 Sebastian Pop <sebastian.pop@amd.com>
4162 * tree-data-ref.c) (stmt_simple_memref_p): New.
4163 * tree-data-ref.h (stmt_simple_memref_p): Declared.
4164 * graphite.c (stmt_simple_memref_for_scop_p): Removed.
4165 (is_simple_operand): Call stmt_simple_memref_p.
4167 * testsuite/gcc.dg/graphite/scop-matmult.c: Updated for not
4168 using pointer arithmetic, as this is optimized by PRE and
4169 makes the code too difficult to analyze.
4171 * testsuite/gcc.dg/graphite/scop-18.c: Same.
4173 2008-08-20 Sebastian Pop <sebastian.pop@amd.com>
4175 * gdbinit.in (pgg): New.
4177 2008-08-15 Tobias Grosser <grosser@fim.uni-passau.de>
4179 * graphite.c (graphite_trans_loop_block): Fix warning.
4181 2008-08-15 Tobias Grosser <grosser@fim.uni-passau.de>
4183 * graphite.c (graphite_trans_loop_block): Fix my merge error.
4185 2008-08-15 Tobias Grosser <grosser@fim.uni-passau.de>
4187 * graphite.c (graphite_trans_bb_block): Remove check for
4188 flag_loop_strip_mine, flag_loop_block, flag_loop_interchange.
4189 Check if loop blocking is profitable for every loop, before applying
4191 (graphite_apply_transformations): Call graphite_trans_bb_block only,
4192 if flag_loop_block is set.
4194 2008-08-14 Sebastian Pop <sebastian.pop@amd.com>
4196 * graphite.c: Add some more documentation for the loop
4199 2008-08-14 Sebastian Pop <sebastian.pop@amd.com>
4201 * Makefile.in (tree-data-ref.o): Remove dependence on graphite.h.
4202 * graphite.c: Format on less than 80 columns.
4205 2008-08-14 Sebastian Pop <sebastian.pop@amd.com>
4207 * cfgloopmanip.c (loopify): Use update_dominators_in_loop.
4209 2008-08-14 Sebastian Pop <sebastian.pop@amd.com>
4211 * doc/invoke.texi (floop-block, floop-strip-mine,
4212 floop-interchange): Update documentation with examples.
4214 2008-08-13 Sebastian Pop <sebastian.pop@amd.com>
4216 * cfgloopmanip.c (create_empty_loop_on_edge): Don't call
4218 * graphite.c (graphite_create_new_loop): Call add_referenced_var.
4220 2008-08-13 Sebastian Pop <sebastian.pop@amd.com>
4222 * cfgloopmanip.c (create_empty_loop_on_edge): Improve documentation.
4223 Factor gcc_asserts into a single one. Use force_gimple_operand_gsi.
4224 * tree-scalar-evolution.c: Revert useless changes.
4225 * tree-phinodes.c: Same.
4228 * tree-vectorizer.h: Same.
4229 * tree-flow.h: Same.
4231 * common.opt (fgraphite): Update documentation.
4233 2008-08-12 Harsha Jagasia <harsha.jagasia@amd.com>
4235 * doc/invoke.texi (-floop-block, -floop-strip-mine,
4236 -floop-interchange): Add more text for explaining what each of these
4238 * tree-into-ssa.c (gimple_vec): Moved to...
4239 * graphite.c: Include gimple.h.
4240 (gimple_vec): Moved to...
4241 (del_loop_to_cloog_loop): Removed.
4242 (loop_affine_expr): Do not call create_data_ref when the
4243 operand is a constant.
4244 (new_scop): Use free instead of del_loop_to_cloog_loop.
4245 * Makefile.in (graphite.o): Depend on GIMPLE_H.
4246 * gimple.h (gimple_vec): ... here.
4248 2008-08-11 Tobias Grosser <grosser@fim.uni-passau.de>
4250 * graphite.c (scopdet_bb_info): Only allow loops with known number of
4252 (build_loop_iteration_domains): Fail, if latch executions unknown.
4254 2008-08-11 Tobias Grosser <grosser@fim.uni-passau.de>
4256 * graphite.c (add_conditions_to_domain): New.
4257 (build_scop_conditions_1): Call add_conditions_to_domain.
4258 (set_cloog_options): Allow to disable optimizations.
4260 2008-08-11 Tobias Grosser <grosser@fim.uni-passau.de>
4262 * graphite.c (find_params_in_bb): Look for parameters in conditions.
4263 Do not use walk_dominator_tree.
4264 (find_scop_parameters): Do not use walk_dominator_tree.
4266 2008-08-11 Tobias Grosser <grosser@fim.uni-passau.de>
4268 * graphite.c (scan_tree_for_params) Add / Subtract inequality.
4269 (idx_record_params): Adapt.
4270 * graphite.h (scop_gimple_loop_depth): New.
4272 2008-08-11 Tobias Grosser <grosser@fim.uni-passau.de>
4274 * graphite.c (build_scop_dynamic_schedules): Remove value_init.
4275 (scan_tree_for_params): Remove value_init.
4276 (build_scop_context): Remove value_init.
4277 (build_loop_iteration_domains): Remove value_init.
4278 (schedule_to_scattering): Remove value_init.
4279 (graphite_trans_bb_strip_mine): Remove value_init.
4281 2008-08-11 Tobias Grosser <grosser@fim.uni-passau.de>
4283 * gcc/graphite.c (limit_scops): New.
4284 (graphite_transform_loops): Add limit SCoPs.
4285 * gcc/testsuite/gcc.dg/graphite/scop-0.c: Update number of SCoPs.
4286 * gcc/testsuite/gcc.dg/graphite/scop-1.c: Update number of SCoPs.
4287 * gcc/testsuite/gcc.dg/graphite/scop-10.c: Update number of SCoPs.
4288 * gcc/testsuite/gcc.dg/graphite/scop-11.c: Update number of SCoPs.
4289 * gcc/testsuite/gcc.dg/graphite/scop-12.c: Update number of SCoPs.
4290 * gcc/testsuite/gcc.dg/graphite/scop-13.c: Update number of SCoPs.
4291 * gcc/testsuite/gcc.dg/graphite/scop-14.c: Update number of SCoPs.
4292 * gcc/testsuite/gcc.dg/graphite/scop-15.c: Update number of SCoPs.
4293 * gcc/testsuite/gcc.dg/graphite/scop-16.c: Update number of SCoPs.
4294 Change loop numbers.
4295 * gcc/testsuite/gcc.dg/graphite/scop-17.c: Update number of SCoPs.
4296 Change loop numbers.
4297 * gcc/testsuite/gcc.dg/graphite/scop-18.c: Update number of SCoPs.
4298 * gcc/testsuite/gcc.dg/graphite/scop-2.c: Update number of SCoPs.
4299 * gcc/testsuite/gcc.dg/graphite/scop-3.c: Update number of SCoPs.
4300 * gcc/testsuite/gcc.dg/graphite/scop-4.c: Update number of SCoPs.
4301 * gcc/testsuite/gcc.dg/graphite/scop-5.c: Update number of SCoPs.
4302 * gcc/testsuite/gcc.dg/graphite/scop-6.c: Update number of SCoPs.
4303 * gcc/testsuite/gcc.dg/graphite/scop-7.c: Update number of SCoPs.
4304 * gcc/testsuite/gcc.dg/graphite/scop-8.c: Update number of SCoPs.
4305 * gcc/testsuite/gcc.dg/graphite/scop-9.c: Update number of SCoPs.
4306 * gcc/testsuite/gcc.dg/graphite/scop-matmult.c: Update number of SCoPs.
4308 2008-08-11 Tobias Grosser <grosser@fim.uni-passau.de>
4310 * graphite.c (graphite_transform_loops): Call always find_transform.
4312 2008-08-08 Tobias Grosser <grosser@fim.uni-passau.de>
4314 * graphite.c (free_loops_mapping): New.
4315 (stmt_simple_for_scop_p): Fix typo.
4316 (stmt_simple_for_scop_p): Fix tuples functions, that
4318 (free_graphite_bb): Fix some memleaks.
4319 (free_scop): Fix some memleaks.
4320 (scopdet_bb_info): Do not forget some tmp SCoPs.
4321 (find_params_in_bb): Fix some memleaks.
4322 (clast_to_gcc_expression): Fix warning.
4324 2008-08-07 Tobias Grosser <grosser@fim.uni-passau.de>
4326 * testsuite/gcc.dg/graphite/scop-16.c: Fix for 32bit.
4327 * testsuite/gcc.dg/graphite/scop-17.c: Fix for 32bit.
4329 2008-08-04 Sebastian Pop <sebastian.pop@amd.com>
4331 * tree-ssa-loop.c (tree-ssa-loop.o): Do not include toplev.h.
4332 Move code ifdef-ed HAVE_cloog...
4333 * graphite.c: Include toplev.h.
4335 * Makefile.in (OBJS-common): Always build graphite.o.
4336 (BACKEND): Remove @GRAPHITE@.
4337 (tree-ssa-loop.o): Do not depend on TOPLEV_H.
4338 (graphite.o): Depend on TOPLEV_H.
4340 2008-08-04 Sebastian Pop <sebastian.pop@amd.com>
4342 * Makefile.in (tree-ssa-loop.o): Depend on TOPLEV_H.
4343 Remove typo left from polylib to ppl conversion.
4344 * graphite.c (graphite_transforms): Use sorry instead of fatal.
4346 2008-08-03 Sebastian Pop <sebastian.pop@amd.com>
4348 * toplev.c (process_options): Move the graphite loop optimization
4350 * tree-ssa-loop.c (graphite_transforms): ... here.
4351 When not configured with CLooG, print to dump_file that
4352 Graphite transforms were not performed.
4353 * testsuite/gcc.dg/graphite/graphite.exp (scan-graphite-dump-times):
4355 * testsuite/gcc.dg/graphite/*.c: Updated all testcases to use
4356 scan-graphite-dump-times.
4358 2008-08-03 Sebastian Pop <sebastian.pop@amd.com>
4360 * graphite.c (dot_scop, dot_all_scops): Do not call system.
4361 Do not open /tmp/scop.dot and /tmp/allscops.dot.
4363 2008-08-02 Sebastian Pop <sebastian.pop@amd.com>
4364 Jan Sjodin <jan.sjodin@amd.com>
4366 * configure: Regenerated.
4367 * omp-low.c (expand_omp_sections): Remove now unused code.
4368 * config.in (HAVE_polylib): Removed.
4369 * configure.ac (HAVE_polylib, POLYLIBLIBS, POLYLIBINC): Removed.
4370 (PPLLIBS, PPLINC): Added.
4371 * graphite.c: Replace unsigned with int wherever possible.
4372 Don't access Cloog's data structures, but use accessor functions.
4373 Clast's stmt->type is now implemented as a vtable: change the
4374 switches of stmt->type into ifs.
4375 (polylib/polylibgmp.h): Don't include.
4376 (initialize_dependence_polyhedron,
4377 initialize_data_dependence_polyhedron, is_empty_polyhedron,
4378 statement_precedes_p, test_dependence, build_rdg_all_levels,
4379 dump_dependence_graph): Removed until this code is cleaned up
4381 * Makefile.in (POLYLIBLIBS): Renamed PPLLIBS.
4382 (POLYLIBINC): Renamed PPLINC.
4384 2008-08-01 Harsha Jagasia <harsha.jagasia@amd.com>
4385 Dwarakanath Rajagopal <dwarak.rajagopal@amd.com>
4386 Jan Sjodin <jan.sjodin@amd.com>
4388 Finish the merge and tuplification of graphite.
4390 2008-07-24 Sebastian Pop <sebastian.pop@amd.com>
4391 Jan Sjodin <jan.sjodin@amd.com>
4393 Partial merge from mainline (138072:138275).
4394 * graphite.c still has to be tuplified.
4396 2008-07-29 Jan Sjodin <jan.sjodin@amd.com>
4398 * graphite.c (graphite_loops_mapping_max_loop_num): New.
4399 (create_num_from_index): New.
4400 (get_num_from_index): Also pass in the graphite BB.
4401 (free_graphite_bb): Free GBB_INDEX_TO_NUM_MAP.
4402 (build_graphite_bb): Initialize GBB_INDEX_TO_NUM_MAP.
4403 (graphite_trans_bb_strip_mine): Call create_num_from_index.
4404 (is_interchange_valid): Return false when failing.
4405 * graphite.h (struct num_map): New.
4406 (struct graphite_bb): New field num_map.
4407 (GBB_LOOPS_MAPPING): Renamed GBB_INDEX_TO_NUM_MAP.
4409 2008-07-29 Tobias Grosser <grosser@fim.uni-passau.de>
4411 * graphite.c (dump_gbb_conditions): Print also conditions like
4412 "if (a)". Remove dublicated code and use print_generic_expr ().
4413 (stmt_simple_for_scop_p): Only allow conditions we can handle
4416 2008-07-25 Jan Sjodin <jan.sjodin@amd.com>
4418 * graphite.h (struct scop): Removed new_ivs field.
4419 (SCOP_NEWIVS): Deleted.
4420 * graphite.c (new_scop, free_scop, clast_name_to_gcc,
4421 clast_to_gcc_expression, graphite_create_new_loop):
4422 Removed use of new_ivs.
4424 2008-07-25 Jan Sjodin <jan.sjodin@amd.com>
4426 * graphite.c (debug_oldivs, debug_loop_vec, create_loops_mapping,
4427 create_loops_mapping_num, debug_loop_mapping_1): New.
4428 (debug_loop_mapping): Call debug_loop_mapping_1.
4429 (get_loop_mapping_for_num,
4430 graphite_loops_mapping_add_child,
4431 graphite_loops_mapping_add_child_num,
4432 graphite_loops_mapping_insert_child,
4433 graphite_loops_mapping_parent,
4434 split_loop_mapped_depth_for_num,
4435 loop_mapped_depth_split_loop): New.
4436 (increment_loop_mapped_depths): Removed.
4437 (swap_loop_mapped_depth_for_num): Reimplemented.
4438 (new_scop): Call create_loops_mapping.
4439 (scop_record_loop): Call graphite_loops_mapping_insert_child.
4440 (translate_clast): Pass the old loop father in parameter, and pass
4441 it to get_old_iv_from_ssa_name.
4442 (remove_edges_around_useless_blocks, can_generate_code_stmt,
4443 can_generate_code, can_generate_for_scop): New.
4444 (graphite_trans_bb_block): Returns false when it fails to transform.
4445 * graphite.h (graphite_loop_node, graphite_loops_mapping): New.
4447 2008-07-25 Sebastian Pop <sebastian.pop@amd.com>
4449 Reverted all the changes related to the streamization and
4451 These changes are now tracked in the streamization branch.
4453 2008-07-25 Sebastian Pop <sebastian.pop@amd.com>
4454 Jan Sjodin <jan.sjodin@amd.com>
4456 * graphite.c (gbb_compare): Correctly constify.
4457 (gbb_can_be_ignored): Indent.
4458 (graphite_trans_scop_swap_1and2): Add legality check.
4461 2008-07-25 Sebastian Pop <sebastian.pop@amd.com>
4463 Remove fallouts from "Reverted the Condate changes".
4464 * tree.h: Remove unused decl.
4465 * testsuite/gcc.dg/tree-checker: Same.
4466 * timevar.def: Remove counter.
4468 2008-07-24 Sebastian Pop <sebastian.pop@amd.com>
4470 * Merge from mainline (135673:138072).
4472 Reverted the MIRO changes (from 2008-04-05) that are now
4473 tracked in the miro branch.
4474 * tree-bounds.c: Removed.
4475 * tree-bounds.h: Removed.
4477 Reverted the Condate changes (from 2006-07-04, 2007-03-20) that
4478 are now tracked in the condate branch.
4479 * tree-check.c: Removed.
4480 * tree-match.c: Removed.
4481 * condate.y: Removed.
4483 2008-07-24 Dwarakanath Rajagopal <dwarak.rajagopal@amd.com>
4485 * common.opt: New user flag -floop-block, -floop-strip-mine
4486 and -floop-interchange.
4487 * toplev.c (process_options): Enable -fgraphite pass if any one of the
4488 graphite loop optimization flags is turned on.
4489 * graphite.c (graphite_apply_transformations): Add flag_loop_block,
4490 flag_loop_strip_mine and flag_loop_interchange checks before
4492 * doc/invoke.texi: Remove -fgraphite and add -floop-block,
4493 -floop-strip-mine and -floop-interchange.
4494 * testsuite/gcc.dg/graphite/block-0.c: Add -floop-block and remove
4496 * testsuite/gcc.dg/graphite/scop-16.c: Ditto.
4497 * testsuite/gcc.dg/graphite/scop-17.c: Ditto.
4498 * testsuite/gcc.dg/graphite/scop-18.c: Ditto.
4500 2008-07-23 Jan Sjodin <jan.sjodin@amd.com>
4501 Sebastian Pop <sebastian.pop@amd.com>
4503 * cfgloopmanip.c (update_dominators_in_loop): Make it static.
4504 (create_empty_loop_on_edge): More fixes.
4505 * tree-phinodes.c (resize_phi_node): Extern.
4506 (unlink_phi_node, move_phi_node): New split from remove_phi_node.
4507 * cfghooks.c (update_dominator_information): New split from
4509 * tree-vectorizer.c (rename_variables_in_bb): Extern.
4510 * tree-dfa.c (collect_dfa_stats): Start walking the CFG on the
4511 successor of the function entry block.
4513 * graphite.c: Include pointer-set.h.
4514 (debug_loop_mapping, increment_loop_mapped_depths,
4515 get_loop_mapped_depth_for_num, get_loop_mapped_depth,
4516 set_loop_mapped_depth_for_num, set_loop_mapped_depth,
4517 swap_loop_mapped_depth_for_num, get_num_from_index,
4518 swap_loop_mapped_depth, loop_iv_stack_debug,
4519 loop_iv_stack_push, loop_iv_stack_pop, loop_iv_stack_get_iv,
4520 loop_iv_stack_get_iv_from_name, loop_iv_stack_debug,
4521 get_old_iv_from_ssa_name): New.
4522 (new_scop): Initialize SCOP_LOOPS_MAPPING.
4523 (free_scop): Free SCOP_LOOPS_MAPPING.
4524 (scop_record_loop): Record old ivs.
4525 (create_var_name): Removed.
4526 (initialize_cloog_names): Allocate double space in case strip mine
4527 applies to all loops once.
4528 (clast_name_to_gcc): Look up in the map ivstack passed in parameter.
4529 (clast_to_gcc_expression): Same. Implement more clast to gimple
4531 (graphite_create_new_loop): Pass in ivstack.
4532 (remove_all_edges): Pass in the construction_edge.
4533 (graphite_remove_iv): Removed.
4534 (graphite_rename_ivs, graphite_rename_ivs_stmt,
4535 remove_cond_exprs): Rewritten.
4536 (move_phi_nodes): New.
4537 (disconnect_virtual_phi_nodes, disconnect_cond_expr): Removed.
4538 (translate_clast): Pass in ivstack. Rewrite some cases.
4539 (set_cloog_options, debug_clast_stmt): New.
4540 (find_transform): Use set_cloog_options.
4541 (outermost_loop_layer): Removed.
4542 (get_construction_edge, collect_virtual_phis, find_vdef_for_var_in_bb,
4543 find_vdef_for_var_1, find_vdef_for_var, patch_phis_for_virtual_defs,
4544 mark_old_loops, remove_dead_loops): New.
4546 (graphite_trans_bb_move_loop): Call swap_loop_mapped_depth.
4547 (const_column_index, get_first_matching_sign_row_index,
4548 get_lower_bound_row, get_upper_bound_row, get_lower_bound,
4549 get_upper_bound): New.
4550 (graphite_trans_bb_strip_mine): Also update the iv map.
4552 * graphite.h (graphite_loops_mapping, GBB_LOOPS_MAPPING): New.
4553 (struct name_tree): Add a loop field.
4554 (struct scop): Add a graphite_loops_mapping field.
4555 (SCOP_LOOPS_MAPPING): New.
4556 (debug_clast_stmt): Declare.
4557 * lambda.h (find_induction_var_from_exit_cond): Declare.
4558 (lambda-code.c): (find_induction_var_from_exit_cond): Extern.
4559 * cfgloop.h (update_dominators_in_loop): Removed declaration.
4560 (create_empty_loop_on_edge): Updated.
4561 * tree-flow.h (remove_bb, resize_phi_node, move_phi_node,
4562 rename_variables_in_bb): Declare.
4563 * tree-cfg.c (remove_bb): Extern.
4565 * testsuite/gcc.dg/graphite/block-0.c: New.
4567 2008-07-21 Dwarakanath Rajagopal <dwarak.rajagopal@amd.com>
4568 Sebastian Pop <sebastian.pop@amd.com>
4570 * graphite.c (strip_mine_profitable_p): New.
4571 (graphite_trans_bb_block): Disable strip mining if not profitable.
4573 * testsuite/gcc.dg/graphite/scop-18.c: New.
4574 * testsuite/gcc.dg/graphite/scop-17.c: Fixed.
4575 * testsuite/gcc.dg/graphite/scop-16.c: Fixed.
4577 2008-07-17 Harsha Jagasia <harsha.jagasia@amd.com>
4578 Jan Sjodin <jan.sjodin@amd.com>
4579 Sebastian Pop <sebastian.pop@amd.com>
4581 * graphite.c (is_interchange_valid): New.
4582 (graphite_trans_bb_block): Check loop nest of basic block for legality
4585 * graphite.h (gbb_inner_most_loop_index, outer_most_loop_1,
4586 outer_most_loop, gbb_outer_most_loop_index): New.
4588 * tree-loop-linear.c (perfect_loop_nest_depth): Remove static.
4589 * tree-flow.h (perfect_loop_nest_depth): Declare as extern.
4590 * testsuite/gcc.dg/graphite/scop-16.c: New.
4591 * testsuite/gcc.dg/graphite/scop-17.c: New.
4593 2008-07-11 Tobias Grosser <grosser@fim.uni-passau.de>
4595 * graphite.c (scop_remove_ignoreable_gbbs): Also update bitmap.
4596 (graphite_trans_scop_block): Ignore SCoPs without bbs.
4598 2008-07-11 Tobias Grosser <grosser@fim.uni-passau.de>
4600 * graphite.c (new_scop): Initialize SCOP_EXIT.
4601 (scopdet_info): Add.
4602 (scopdet_bb_info): Rename from is_bb_addable. Cleanup, bugfixes.
4603 (build_scops_1): Cleanup, bugfixes.
4604 (build_scops): Cleanup.
4606 * testsuite/gcc.dg/graphite/scop-matmult.c: Remove duplicated code.
4607 * testsuite/gcc.dg/graphite/scop-15.c: Add SCoP numbers.
4609 2008-07-10 Harsha Jagasia <harsha.jagasia@amd.com>
4611 * testsuite/gfortran.dg/graphite/scop-1.f: Update to reduced test case.
4613 * testsuite/gfortran.dg/graphite/graphite.exp: Use
4614 DEFAULT_GRAPHITE_FLAGS.
4616 * testsuite/gcc.dg/graphite/scop-15.c: Update to reduced test case.
4618 2008-07-10 Harsha Jagasia <harsha.jagasia@amd.com>
4620 * graphite.c (scan_tree_for_params): Do not assert any more if
4621 MULT_EXPR parameter is negative.
4623 * testsuite/gfortran.dg/graphite/scop-1.f: New.
4625 * testsuite/gfortran.dg/graphite/graphite.exp: New.
4627 * testsuite/gcc.dg/graphite/scop-15.c: New.
4629 2008-07-10 Harsha Jagasia <harsha.jagasia@amd.com>
4631 * graphite.c (is_bb_addable): Fix segfault in spec gzip and reformat.
4633 2008-07-10 Tobias Grosser <grosser@fim.uni-passau.de>
4635 * graphite.c (graphite_trans_bb_swap_loops): Rename from
4636 graphite_swap_loops.
4637 (graphite_trans_bb_move_loop): New.
4638 (graphite_trans_bb_strip_mine): Rename from graphite_strip_mine_loop.
4639 (graphite_trans_bb_block): New.
4640 (graphite_trans_loop_block): New.
4641 (graphite_trans_scop_swap_1and2): Rename from
4642 graphite_trans_swap_1and2.
4643 (graphite_trans_scop_strip): Rename from graphite_trans_strip.
4644 (graphite_trans_scop_block): New.
4645 (graphite_apply_transformations): Rename from
4646 graphite_transformations.
4648 * testsuite/gcc.dg/graphite/scop-matmult.c: New.
4650 2008-07-10 Tobias Grosser <grosser@fim.uni-passau.de>
4652 * graphite.c (gbb_compare): New.
4653 (graphite_sort_gbbs): New.
4654 (gbb_can_be_ignored): New.
4655 (scop_remove_ignoreable_gbbs): New.
4656 (graphite_transformations): Cleanup and add
4657 scop_remove_ignoreable_gbbs.
4658 * lambda.h (lambda_vector_compare): New.
4660 2008-07-09 Tobias Grosser <grosser@fim.uni-passau.de>
4662 * graphite.c (print_graphite_bb): Correct printing of static schedule.
4663 (graphite_swap_loops): int -> unsigned
4664 (graphite_strip_mine_loop): int -> unsigned, Fix SCHEDULE
4665 (graphite_transformations): New.
4666 (graphite_transform_loops): Move to graphite_transformations.
4667 * graphite.h (gbb_nb_loops): Return unsigned.
4669 2008-07-04 Tobias Grosser <grosser@fim.uni-passau.de>
4671 * graphite.c (scan_tree_for_params): Fix insertion of parameters into
4672 the domain matrix. This makes scop-0.c work again.
4674 2008-06-20 Richard Guenther <rguenther@suse.de>
4676 * graphite.h: Adjust copyright to GPLv3.
4677 * graphite.c: Likewise.
4678 (stmt_simple_memref_for_scop_p): Split out from ...
4679 (stmt_simple_for_scop_p): ... here. Fix handling of calls
4681 (get_bb_type): Optimize.
4683 (is_bb_addable): Fix memleak, replace is_pred call with
4685 (build_scops): Use current_loops.
4686 (param_index): Fix memleak.
4688 2008-06-20 Konrad Trifunovic <konrad.trifunovic@inria.fr>
4690 * graphite.c: Fix formatting.
4692 2008-06-19 Konrad Trifunovic <konrad.trifunovic@inria.fr>
4694 * graphite.c (new_scop): Memory allocation for SCOP_{NEWIVS, OLDIVS}.
4695 (free_scop): Memory deallocation for SCOP_NEWIVS, SCOP_OLDIVS.
4696 (create_var_name, save_var_name): Newly defined functions.
4697 (initialize_cloog_names): Part of the code factored out to
4699 (clast_to_gcc_expression): Now handles the case of clast_red_sum
4700 in clast_reduction statement.
4701 (graphite_create_new_loop): Now takes a new parameter
4703 (translate_clast): Now also takes the context_loop and bb_exit
4704 parameters. Rewritten the code so that it creates a gimple code
4705 inside the given context.
4706 (outermost_loop_layer, graphite_remove_iv, graphite_rename_ivs,
4707 remove_cond_expr, disconnect_cond_expr,
4708 disconnect_virtual_phi_nodes): Newly defined functions.
4709 * graphite.h (struct scop): added old_ivs vector.
4710 SCOP_OLDIVS: New macro.
4712 2008-06-19 Sebastian Pop <sebastian.pop@amd.com>
4714 * cfgloopmanip.c: Add missing function comments, fix formatting.
4716 2008-06-18 Konrad Trifunovic <konrad.trifunovic@inria.fr>
4718 * cfgloopmanip.c (update_dominators_in_loop): Defined.
4719 (create_empty_loop_on_edge): Defined.
4720 * tree-parloops.c (canonicalize_loop_ivs): Returns tree
4722 * cfgloop.h (create_empty_loop_on_edge): Declared as extern.
4723 (update_dominators_in_loop): Declared as extern
4724 * tree-flow.h (canonicalize_loop_ivs): Declared as extern.
4726 2008-06-16 Tobias Grosser <grosser@fim.uni-passau.de>
4728 * graphite.c (print_graphite_bb): Allow changing number of loops
4730 (initialize_cloog_names): Allow changing number of loops.
4731 (build_cloog_prog): Simplify.
4732 (find_transform): Enable cloog option --strides.
4733 (graphite_swap_loops): New.
4734 (graphite_strip_mine_loop): New.
4735 (graphite_trans_swap_1and2): New.
4736 (graphite_trans_strip): New.
4737 (graphite_transform_loops): Add graphite_trans_strip.
4738 * graphite.h (scop_max_loop_depth): New.
4740 2008-06-15 Tobias Grosser <grosser@fim.uni-passau.de>
4742 * graphite.c (build_scop_iteration_domain): Remove forgotten
4743 line. (Fixes compile)
4745 2008-06-15 Tobias Grosser <grosser@fim.uni-passau.de>
4747 * graphite.c (print_graphite_bb): Add output of GBB_LOOPS.
4748 (build_graphite_bb): Add GBB_LOOPS and GBB_DOMAIN and reorder.
4749 (build_bb_loops): New.
4750 (graphite_transform_loops): Add build_bb_loops.
4751 (schedule_to_scattering): Use gbb_nb_loops to support changing loop
4753 * graphite.h (graphite_bb): Add loops.
4754 (gbb_nb_loops): New.
4755 (gbb_loop_at_index): New.
4756 (gbb_loop_index): New.
4757 (nb_params_in_scop): Renamed to scop_nb_params. Updated all functions
4758 using nb_params_in_scop.
4760 2008-06-14 Tobias Grosser <grosser@fim.uni-passau.de>
4762 * graphite.c (print_graphite_bb): Adapt to minimized schedule.
4763 (build_scop_canonical_schedules): Build minimized schedule.
4764 (schedule_to_scattering): Adapt to minimized schedule.
4765 * graphite.h (graphite_bb): Add/Update descriptions.
4767 2008-06-14 Adrien Eliche <aeliche@isty.uvsq.fr>
4768 Tobias Grosser <grosser@fim.uni-passau.de>
4770 * graphite.c (print_graphite_bb): Add condition printing.
4772 (dump_gbb_conditions): New.
4773 (build_scop_conditions_1): New.
4774 (build_scop_conditions): New.
4775 * graphite.h (graphite_bb): Add conditions.
4777 2008-06-14 Tobias Grosser <grosser@fim.uni-passau.de>
4779 * graphite.c (print_graphite_bb):
4780 (free_graphite_bb): New.
4781 (free_scop): Free bbs.
4782 (get_bb_type): Free doms.
4783 (build_scop_context): Free context matrix.
4784 (build_loop_iteration_domains): Remove unused code.
4785 (build_cloog_prog): Free scattering function and blocklist.
4786 (find_transform): Free options.
4788 2008-06-13 Tobias Grosser <grosser@fim.uni-passau.de>
4790 * graphite.c (loop_body_to_cloog_stmts): Rename to add_bb_domains.
4791 Remove unnecessery cloog data structures. Make a copy of the domain
4792 (setup_cloog_loop): Rename to build_loop_iteration_domains. Remove
4793 unnecessary cloog data structures. Fix memory leaks. Remove insert
4794 into SCOP_LOOP2CLOOG_LOOP as the inserted CloogLoops will never be
4796 (build_scop_iteration_domain): Remove unnecessary cloog
4797 data structures. Fix memory leaks.
4798 (graphite_transform_loops): Disable build_scop_dynamic_schedules as it
4799 uses SCOP_LOOP2CLOOG_LOOP, that is at the moment not working.
4801 2008-06-12 Tobias Grosser <grosser@fim.uni-passau.de>
4803 * graphite.c (find_scop_params): Remove initialize_cloog_names.
4805 2008-06-12 Tobias Grosser <grosser@fim.uni-passau.de>
4807 * graphite.c (end_scop): Style fix.
4808 (schedule_to_scattering): Style and comment fix.
4810 2008-06-12 Tobias Grosser <grosser@fim.uni-passau.de>
4811 * graphite.c (print_graphite_bb): Fix definiton of
4812 schedule_to_scattering.
4813 (initialize_cloog_names): Change nb_scattdims to max loop
4815 (schedule_to_scattering): Take parameter for number of scattering
4817 (build_cloog_prog): Only build as much scattering dimensions as
4820 2008-06-12 Tobias Grosser <grosser@fim.uni-passau.de>
4822 * graphite.c (end_scop): Disable bb splitting. Fixes SIGSEGV
4823 in polyhedron/aermod.f90.
4825 2008-06-11 Tobias Grosser <grosser@fim.uni-passau.de>
4826 Dwarak Rajagopal <dwarak.rajagopal@amd.com>
4827 Harsha Jagasia <harsha.jagasia@amd.com>
4829 * graphite.c (is_bb_addable): Fix segfault.
4831 2008-06-10 Tobias Grosser <grosser@fim.uni-passau.de>
4833 * graphite.c (is_bb_addable): Fix memory leak, handling of loops
4834 with multiple exits and conditional handling in edge cases.
4835 (is_loop_exit): Fix memory leak. (Forgotten in last commit)
4837 * testsuite/gcc.dg/graphite/scop-14.c: New.
4839 2008-06-06 Tobias Grosser <grosser@fim.uni-passau.de>
4840 Adrien Eliche <aeliche@isty.uvsq.fr>
4842 * graphite.c (is_bb_addable): Add more comments and enhance
4843 readablity of the source code. Fix memory leak.
4844 (is_loop_exit): Fix memory leak.
4846 2008-06-05 Tobias Grosser <grosser@fim.uni-passau.de>
4848 * graphite.c (first_loop_in_scop): Deleted.
4849 (setup_cloog_loop): Only walk the loop chain for inner loops.
4850 (build_scop_iteration_domain): Execute setup_cloog_loop for
4851 all loops in the first layer.
4853 2008-06-05 Tobias Grosser <grosser@fim.uni-passau.de>
4855 * graphite.c (scan_tree_for_params): Change the way params are
4856 added to be indepenent of the number of loops.
4857 (setup_cloog_loop): Revert to short matrix format. Fix parameter
4859 (build_cloog_prog): Revert to short matrix format.
4861 2008-06-05 Sebastian Pop <sebastian.pop@amd.com>
4862 Dwarak Rajagopal <dwarak.rajagopal@amd.com>
4864 * tree-loop-fusion.c (fuse_loops): Fix uninitialized variable
4867 2008-06-05 Sebastian Pop <sebastian.pop@amd.com>
4869 * graphite.c (nb_data_refs_in_scop): New.
4870 (graphite_transform_loops): Print more stats: number of
4871 loops, basic blocks and data references per scop.
4873 2008-06-04 Sebastian Pop <sebastian.pop@amd.com>
4874 Jan Sjodin <jan.sjodin@amd.com>
4876 * graphite.c (loop_affine_expr, idx_record_params,
4877 find_scop_parameters, setup_cloog_loop): Use instantiate_scev
4878 instead of instantiate_parameters.
4880 2008-06-04 Tobias Grosser <grosser@fim.uni-passau.de>
4882 * graphite.c (schedule_to_scattering): Fix scattering dimensions,
4883 add support for parameters, add STATIC_SCHEDULE at the right places,
4886 2008-06-04 Tobias Grosser <grosser@fim.uni-passau.de>
4888 * graphite.c (build_scop_loop_nests): Only add the loops, that
4889 are contained completely in the SCoP.
4890 (build_cloog_prog): Disable scattering, until schedule_to_scattering
4891 and the domains are fixed.
4892 (build_scop_canonical_schedules): Add support for bbs not contained
4895 2008-06-04 Tobias Grosser <grosser@fim.uni-passau.de>
4897 * graphite.h (scop_contains_loop): Update comments to match
4898 the actual behavior.
4899 (scop_contains_loop): New.
4900 * graphite.c (schedule_to_scattering): Use scop_contains_loop.
4902 2008-06-04 Sebastian Pop <sebastian.pop@amd.com>
4904 * graphite.c (get_bb_type): On function body, i.e. loop_0,
4905 don't mark blocks as GBB_LOOP_SING_EXIT_HEADER, mark them
4908 2008-06-04 Sebastian Pop <sebastian.pop@amd.com>
4909 Tobias Grosser <grosser@fim.uni-passau.de>
4911 * graphite.c (graphite_transform_loops): Early return when
4912 there are no loops in the function.
4914 2008-05-31 Sebastian Pop <sebastian.pop@amd.com>
4915 Jan Sjodin <jan.sjodin@amd.com>
4917 * graphite.c (scan_tree_for_params, setup_cloog_loop): Compute the
4918 offset of the last loop.
4919 (setup_cloog_loop): Copy the entire outer constraint matrix.
4921 2008-05-31 Sebastian Pop <sebastian.pop@amd.com>
4922 Jan Sjodin <jan.sjodin@amd.com>
4924 * graphite.c (stmt_in_scop_p, function_parameter_p,
4925 invariant_in_scop_p): Removed.
4926 (scan_tree_for_params): Can be used with no constraint
4927 matrix for gathering parameters.
4928 (idx_record_params): Don't use idx_record_param, instead use
4929 scan_tree_for_params.
4930 (find_scop_parameters): Same.
4931 (setup_cloog_loop, build_scop_iteration_domain, build_cloog_prog):
4932 Fix the size of loop domains.
4933 (schedule_to_scattering): Exit when the outer loop is not in scop.
4934 (find_transform): Enable build_cloog_prog.
4936 2008-05-31 Sebastian Pop <sebastian.pop@amd.com>
4937 Jan Sjodin <jan.sjodin@amd.com>
4939 * graphite.c (schedule_to_scattering): Make scattering domains
4940 uniformly of the same size, as required by CLooG 0.14.0 and before.
4942 2008-05-31 Sebastian Pop <sebastian.pop@amd.com>
4943 Jan Sjodin <jan.sjodin@amd.com>
4945 * graphite.c (schedule_to_scattering): Rewrite, correct the
4946 translation of the scheduling function to scattering.
4947 (build_cloog_prog): Call schedule_to_scattering only once.
4948 * graphite.h (scop_loop_index): Do not fail for loops not
4949 in the scop: return -1.
4951 2008-05-30 Tobias Grosser <grosser@fim.uni-passau.de>
4953 * graphite.c (build_graphite_bb): Initialize GBB_DOMAIN.
4954 (loop_body_to_cloog_stmts): Export GBB_DOMAIN.
4955 (setup_cloog_loop): Export GBB_DOMAIN.
4956 (build_cloog_prog): New. Create new CLOOG_PROG, which should be
4957 able to rebuild the original control flow.
4958 * graphite.h (graphite_bb): Add domain field and access macro.
4961 2008-05-30 Sebastian Pop <sebastian.pop@amd.com>
4963 * graphite.c (debug_gbb): New.
4964 (print_scop, build_graphite_bb): Use SCOP_BBS.
4965 (build_scop_bbs): Reimplemented.
4966 (dfs_bb_in_scop_p): Removed.
4967 (build_scop_loop_nests): Reorder loops inserted in
4968 SCOP_LOOP_NEST: outer loops should come first.
4969 (build_scop_canonical_schedules): Reinitialize at zero
4970 the components of the SCOP_STATIC_SCHEDULE for the loops
4971 that have already been parsed.
4973 * graphite.h (debug_gbb): Declared.
4975 2008-05-30 Sebastian Pop <sebastian.pop@amd.com>
4976 Jan Sjodin <jan.sjodin@amd.com>
4978 * graphite.c (create_empty_loop): Renamed graphite_create_new_loop.
4979 (graphite_loop_to_gcc_loop): Removed.
4980 (remove_all_edges): New.
4981 (graphite_stmt_to_gcc_stmt): Renamed translate_clast.
4982 (gloog): Remove useless code.
4984 2008-05-29 Tobias Grosser <grosser@fim.uni-passau.de>
4986 * graphite.c (get_bb_type): Reworked. We distinguish between
4987 loops with one or multiple exits.
4988 (is_loop_exit): New.
4990 (is_bb_addable): Rework condition handling, now support for case
4991 case statements and loops with multiple exits.
4993 * testsuite/gcc.dg/graphite/scop-11.c: New.
4994 * testsuite/gcc.dg/graphite/scop-12.c: New.
4995 * testsuite/gcc.dg/graphite/scop-13.c: New.
4997 2008-05-29 Tobias Grosser <grosser@fim.uni-passau.de>
4999 * graphite.c (dot_all_scops_1): Fix some colors. Reuse colors, if
5000 we have too many colors.
5002 2008-05-22 Sandeep Maram <smaram_b04@iiita.ac.in>
5004 * doc/invoke.texi (-ftree-loop-fusion): Document.
5005 * tree-pass.h (pass_loop_fusion): Declared.
5006 * tree-loop-fusion.c: New.
5007 * timevar.def (TV_TREE_LOOP_FUSION): Declared.
5008 * tree-data-ref.c (find_data_references_in_loop): Make extern.
5009 * tree-data-ref.h (find_data_references_in_loop): Declared.
5010 * common.opt (ftree-loop-fusion): Declared.
5011 * Makefile.in (tree-loop-fusion.o): Added rule and to OBJS-common.
5013 2008-05-21 Sebastian Pop <sebastian.pop@amd.com>
5015 * graphite.c (build_access_matrix): Fix typo from the merge.
5017 2008-05-20 Sebastian Pop <sebastian.pop@amd.com>
5019 * Merge from mainline (130800:135673).
5021 2008-05-07 Sebastian Pop <sebastian.pop@amd.com>
5023 * graphite.c (end_scop): The exit of the scop is not part of the scop.
5024 Update dominators after splitting.
5026 2008-05-07 Sebastian Pop <sebastian.pop@amd.com>
5028 * graphite.c (is_bb_addable): Return the harmful statement.
5029 Factor up some code.
5030 (end_scop): New. Splits end of scope bbs on a harmful statement.
5031 (build_scops_1): Call end_scop.
5033 2008-05-07 Sebastian Pop <sebastian.pop@amd.com>
5035 * graphite.c: (succs_at_same_depth, end_scop, all_preds_visited_p,
5036 all_succs_visited_p, start_new_scop_for_each_succ, start_new_scop,
5037 add_dominators_to_open_scops, stop_last_open_scop, scop_end_loop,
5038 build_scops_1): Removed.
5039 (build_scops_2): Renamed build_scops_1.
5041 2008-05-06 Sebastian Pop <sebastian.pop@amd.com>
5043 * graphite.c: Fix formatting.
5045 2008-05-06 Tobias Grosser <grosser@fim.uni-passau.de>
5047 * graphite.c (get_bb_type): New.
5049 (build_scops_2): New.
5050 (is_bb_addable): New.
5051 (build_scops): Switch the scop detection.
5052 (build_scop_bbs): Add entry bb to scop.
5053 * graphite.h (struct scop): Update comment.
5055 2008-05-06 Tobias Grosser <grosser@fim.uni-passau.de>
5057 * graphite.c (dot_all_scops_1): Fix some incorrect colors and add
5060 2008-05-06 Tobias Grosser <grosser@fim.uni-passau.de>
5062 * testsuite/gcc.dg/graphite/scop-1.c: Update.
5063 * testsuite/gcc.dg/graphite/scop-2.c: Update.
5064 * testsuite/gcc.dg/graphite/scop-4.c: Update.
5065 * testsuite/gcc.dg/graphite/scop-5.c: Add.
5066 * testsuite/gcc.dg/graphite/scop-6.c: Add.
5068 2008-05-06 Sebastian Pop <sebastian.pop@amd.com>
5070 * testsuite/gcc.dg/graphite/scop-0.c: Add.
5071 * testsuite/gcc.dg/graphite/scop-7.c: Add.
5072 * testsuite/gcc.dg/graphite/scop-8.c: Add.
5073 * testsuite/gcc.dg/graphite/scop-9.c: Add.
5074 * testsuite/gcc.dg/graphite/scop-10.c: Add.
5076 2008-05-06 Tobias Grosser <grosser@fim.uni-passau.de>
5078 * graphite.c (scop_affine_expr): Renamed to loop_affine_expr.
5079 Check affine expressions depending on the outermost loop
5081 (stmt_simple_for_scop_p): Same.
5082 (harmfule_stmt_in_scop): Same.
5084 2008-04-28 Tobias Grosser <grosser@fim.uni-passau.de>
5086 * graphite.c (dot_all_scops): Remove incorrect difficult bb coloring,
5087 mark entry and exit, that are not part of the SCoP and update HTML
5090 2008-04-25 Sebastian Pop <sebastian.pop@amd.com>
5092 * graphite.c (basic_block_simple_for_scop_p): Renamed
5094 (save_scop, preds_at_same_depth, test_for_scop_bound): Removed.
5095 (add_dominators_to_open_scops, build_scops_1): Reimplemented.
5096 (all_preds_visited_p, all_succs_visited_p,
5097 start_new_scop_for_each_succ, start_new_scop, stop_last_open_scop,
5098 scop_end_loop): New.
5099 (build_scops): Do not use dfs_enumerate_from.
5101 * testsuite/gcc.dg/graphite/scop-{1,2,4}.c: Updated.
5103 2008-04-23 Sebastian Pop <sebastian.pop@amd.com>
5105 * graphite.c: Add comments to functions that are missing a
5107 (graphite_create_iv): Removed. Merged in graphite_loop_to_gcc_loop.
5109 2008-04-23 Sebastian Pop <sebastian.pop@amd.com>
5111 * graphite.c (nb_params_in_scop): Moved...
5112 (graphite_bb_from_bb, loop_body_to_cloog_stmts): New.
5113 (setup_cloog_loop): Call loop_body_to_cloog_stmts.
5114 (clast_to_gcc_expression): Reduce column size to less than 80.
5115 (graphite_create_iv): Return the new name of the IV.
5116 (find_transform): Set options->esp and options->cpp.
5117 (gloog): Comment out the invalidation of the old loop code.
5118 (initialize_dependence_polyhedron): Replace scop_nb_params with
5121 * graphite.h (nb_params_in_scop): ... here.
5122 (scop_nb_params): Removed.
5123 (loop_domain_dim): Return something even when the loop was not
5124 found in the hash table: avoid ICEing on all the graphite.exp
5127 2008-04-14 Konrad Trifunovic <konrad.trifunovic@inria.fr>
5129 * tree-chrec.c (for_each_scev_op): SCEV can have 3 operands.
5131 * graphite.c (build_scop_dynamic_schedules): Schedule is built
5132 according to nesting level.
5133 (find_scop_parameters): Call instantiate_parameters.
5134 (scan_tree_for_params): Extend it to handle general affine bounds.
5135 Inner loop bound can depend on outer loop induction variable.
5136 (setup_cloog_loop): tmp variable is allocated on stack. Call
5137 instantiate_parameters with respect to outermost_loop_in_scop.
5138 (loop_domain_dim, ref_nb_loops, loop_iteration_vector_dim): moved to
5140 (create_empty_loop): Function loopify should be given edge
5141 probability, instead of edge frequency. Dominance relation from
5142 switch_bb to loop_header.
5143 (clast_to_gcc_expression): Added handling of clast_reduction node.
5144 (gloog): New functionality for removing old loop.
5145 (test_dependence): Factored out from build_rdg_all_levels.
5146 (build_rdg_all_levels): Dependence testing factored out to
5147 test_dependence function.
5149 * graphite.h (struct graphite_bb): Extended with dynamic_schedule.
5150 (loop_domain_dim, ref_nb_loops, loop_iteration_vector_dim): Moved
5153 2008-04-07 Sebastian Pop <sebastian.pop@amd.com>
5155 * graphite.c (free_scop, param_index, initialize_cloog_names,
5156 nb_params_in_scop): Use name_tree map instead of just a tree
5157 for keeping track of the variable name associated to that tree.
5158 (create_empty_loop, gmp_cst_to_tree, clast_name_to_gcc,
5159 clast_to_gcc_expression, graphite_create_iv,
5160 graphite_loop_to_gcc_loop, graphite_cond_to_gcc_cond,
5161 graphite_stmt_to_gcc_stmt): New.
5162 (gloog): Call these.
5163 * graphite.h (struct name_tree): New.
5164 (struct scop): Use name_tree instead of tree for params.
5165 Store a vector of name_tree for new_ivs.
5167 (scop_nb_params): Use name_tree instead of tree.
5169 2008-04-05 Alexander Lamaison <awl03@doc.ic.ac.uk>
5170 Sebastian Pop <sebastian.pop@amd.com>
5172 * tree-bounds.c: New.
5173 * tree-bounds.h: New.
5174 * tree-pass.h: Declare pass_bounds_early and pass_bounds_late.
5175 * passes.c: Schedule pass_bounds_early, pass_bounds_late.
5176 * builtins.c (expand_builtin_alloca): Add flag_bounds as for
5180 * c-cppbuiltin.c: Same.
5184 * tree-outof-ssa.c: Same.
5186 * Makefile.in: Same.
5188 2008-03-15 Antoniu Pop <antoniu.pop@gmail.com>
5189 Sebastian Pop <sebastian.pop@amd.com>
5191 * tree-loop-distribution.c (remaining_stmts,
5192 upstream_mem_writes): Removed static variables.
5193 (copy_loop_before, create_bb_after_loop,
5194 mark_nodes_having_upstream_mem_writes, free_rdg_components,
5195 rdg_build_components, rdg_build_partitions,
5196 dump_rdg_partitions): Extern.
5197 (generate_loops_for_partition, generate_code_for_partition): Do not
5199 (already_processed_vertex_p, predecessor_has_mem_write,
5200 mark_nodes_having_upstream_mem_writes, has_upstream_mem_writes,
5201 rdg_flag_all_uses, rdg_flag_uses, rdg_flag_vertex_and_dependent,
5202 rdg_flag_loop_exits, rdg_flag_similar_memory_accesses,
5203 build_rdg_partition_for_component, rdg_build_partitions, ldist_gen):
5204 Pass remaining_stmts and upstream_mem_writes as parameters.
5205 (rdg_component): Moved...
5206 (build_rdg_partition_for_component): Do not aggregate components when
5207 flag_streamize_loops is set.
5208 (gen_sequential_loops): New.
5209 (ldist_gen): Call gen_sequential_loops.
5211 * tree-pass.h (pass_loop_streamization): Declared.
5213 * omp-low.c (expand_omp_sections): Call add_bb_to_loop on created
5214 basic blocks when loops structures exist.
5216 * builtin-types.def (BT_FN_VOID_PTR_PTR_INT): New.
5218 * tree-ssa-loop-ivopts.c (expr_invariant_in_region_p): New.
5220 * tree-parloops.c (take_address_of, eliminate_local_variables_1,
5221 eliminate_local_variables_stmt, eliminate_local_variables,
5222 separate_decls_in_loop_name, separate_decls_in_loop_stmt,
5223 separate_decls_in_loop, gen_parallel_loop): Make them work on a region
5224 of code delimited by two edges in the CFG.
5225 (separate_decls_in_loop_name): Renamed separate_decls_in_region_name.
5226 (separate_decls_in_loop_stmt): Renamed separate_decls_in_region_stmt.
5227 (separate_decls_in_loop): Renamed separate_decls_in_region. Isolate
5228 the case of parallelisation of reductions.
5229 (create_loop_fn): Extern.
5230 (create_omp_parallel_region): New.
5232 * tree-data-ref.c (dump_data_dependence_relation): Don't call
5233 dump_data_reference for printing dra and drb.
5234 (create_rdg_edge_for_ddr, create_rdg_edges_for_scalar): Initialise
5236 (build_rdg): Don't call free_dependence_relations for the moment, as
5237 we attach dependence relations on each edge of the RDG.
5240 * tree-data-ref.h (rdg_component): ...here.
5241 (struct rdg_edge): New field ddr_p relation.
5242 (RDGE_RELATION): New.
5243 (create_bb_after_loop, copy_loop_before,
5244 mark_nodes_having_upstream_mem_writes, rdg_build_components,
5245 rdg_build_partitions, dump_rdg_partitions,
5246 free_rdg_components): Declared.
5248 * omp-builtins.def (BUILT_IN_GOMP_STREAM_ALIGN_PUSH,
5249 BUILT_IN_GOMP_STREAM_ALIGN_POP): New.
5251 * tree-loop-streamization.c: New.
5253 * tree-flow.h (gather_blocks_in_sese_region, create_loop_fn,
5254 create_omp_parallel_region, expr_invariant_in_region_p): Declared.
5256 * Makefile.in (tree-loop-streamization.o): Added to OBJS-common.
5258 * tree-cfg.c (gather_blocks_in_sese_region): Extern.
5260 * passes.c: Schedule pass_loop_streamization.
5262 2008-03-08 Tobias Grosser <grosser@fmi.uni-passau.de>
5264 * graphite.c (dot_all_scops_1): Fix formatting for difficult bbs and
5267 2008-03-07 Tobias Grosser <grosser@fim.uni-passau.de>
5269 * graphite.c (dot_all_scops): Update formatting.
5270 Bbs can now be part of more than one SCoP.
5272 2008-03-04 Sebastian Pop <sebastian.pop@amd.com>
5274 * graphite.c (new_loop_to_cloog_loop_str, setup_cloog_loop): Fix
5276 (loop_domain_dim): Check for unregistered toplev SCOP loop.
5277 * graphite.h (loop_to_cloog_loop): New.
5279 2008-03-04 Konrad Trifunovic <konrad.trifunovic@inria.fr>
5281 * graphite.c (loop_domain_dim, ref_nb_loops,
5282 loop_iteration_vector_dim): New.
5283 (build_access_matrix_with_af, build_access_matrix,
5284 initialize_dependence_polyhedron): Fixed for new matrix layout.
5285 No longer assume that all iteration domains are of the same
5288 2008-03-02 Sebastian Pop <sebastian.pop@amd.com>
5290 * tree-scalar-evolution.c (instantiate_parameters_1): An SSA_NAME
5291 defined in a loop at depth 0 is invariant.
5292 * tree-chrec.c (evolution_function_is_invariant_rec_p): Ditto.
5293 * tree-ssa-loop-ivopts.c (expr_invariant_in_loop_p): Should never
5294 be called at loop depth 0.
5296 * graphite.c (basic_block_simple_for_scop_p): Take the scop as
5298 (dot_all_scops_1): Update use of basic_block_simple_for_scop_p.
5299 (down_open_scop): Removed.
5300 (loop_in_scop_p): Redefined.
5301 (scop_affine_expr): New argument: scop.
5302 (stmt_simple_for_scop_p): New argument: scop. RETURN_EXPR is not
5303 a harmful statement ending a scop.
5304 (basic_block_simple_for_scop_p): New argument: scop.
5305 (get_loop_start): Removed.
5306 (new_scop): Initialize SCOP_LOOPS.
5307 (free_scop): Free SCOP_LOOPS.
5308 (succs_at_same_depth, preds_at_same_depth): New.
5309 (end_scop): Test the validity of a scop.
5310 (add_dominators_to_open_scops): New.
5311 (test_for_scop_bound): Call add_dominators_to_open_scops.
5312 Add cases for opening and closing multiple scops.
5313 (build_scops, build_scop_bbs): Iterate over basic blocks in
5315 (build_graphite_bb): Pass scop directly.
5316 (dfs_bb_in_scop_p): New.
5317 (scop_record_loop): Use SCOP_LOOPS for not recording the same loop
5319 (nb_loops_around_gb): Use loop_in_scop_p.
5320 (schedule_to_scattering): Disabled for the moment the code computing
5321 the "textual order for outer loop".
5323 * graphite.h (struct scop): New field loops.
5325 (scop_loop_index): Test that the given loop belongs to SCOP_LOOPS.
5327 * testsuite/gcc.dg/graphite/scop-{1,...,7}.c: Updated.
5329 2008-02-27 Antoniu Pop <antoniu.pop@gmail.com>
5330 Sebastian Pop <sebastian.pop@amd.com>
5332 * builtin-types.def (BT_FN_PTR_SIZE_UINT, BT_FN_BOOL_PTR): New.
5333 * common.opt (fstreamize-loops): New.
5334 * omp-builtins.def (BUILT_IN_GOMP_STREAM_CREATE,
5335 BUILT_IN_GOMP_STREAM_PUSH, BUILT_IN_GOMP_STREAM_HEAD,
5336 BUILT_IN_GOMP_STREAM_POP, BUILT_IN_GOMP_STREAM_EOS_P,
5337 BUILT_IN_GOMP_STREAM_SET_EOS, BUILT_IN_GOMP_STREAM_DESTROY): New.
5339 2008-02-22 Konrad Trifunovic <konrad.trifunovic@inria.fr>
5341 * tree-data-ref.c (build_empty_rdg): New.
5342 (build_rdg): Use it.
5343 * tree-data-ref.h (build_empty_rdg): Declared.
5344 * graphite.c (free_scop): Free SCOP_LOOP2CLOOG_LOOP.
5345 (find_vertex_for_stmt): Removed.
5346 (build_rdg_all_levels): Use build_empty_rdg and rdg_vertex_for_stmt.
5348 2008-02-21 Sebastian Pop <sebastian.pop@amd.com>
5350 * tree-loop-distribution.c (generate_builtin): After cancelling the
5351 loop tree, also delete basic blocks.
5352 (rdg_flag_uses): Stop recursion when a vertex has already been
5355 2008-02-15 Konrad Trifunovic <konrad.trifunovic@inria.fr>
5357 * graphite.c (build_scop_alpha): Removed.
5358 (graphite_transform_loops): Add a dummy call to build_all_rdg_levels
5359 and dump_dependence_graph to avoid compiler warnings.
5361 2008-02-14 Konrad Trifunovic <konrad.trifunovic@inria.fr>
5363 * tree-data-ref.c (dr_may_alias_p, create_rdg_vertices): Extern.
5364 * tree-data-ref.h (dr_may_alias_p, create_rdg_vertices): Declared.
5365 * graphite.c (new_loop_to_cloog_loop_str, hash_loop_to_cloog_loop,
5366 eq_loop_to_cloog_loop, del_loop_to_cloog_loop): New.
5367 (new_scop, setup_cloog_loop): Initialize SCOP_LOOP2CLOOG_LOOP.
5368 (initialize_dependence_polyhedron, find_vertex_for_stmt,
5369 initialize_data_dependence_polyhedron, is_empty_polyhedron,
5370 statement_precedes_p, build_rdg_all_levels, build_scop_alpha,
5371 dump_dependence_graph): New.
5372 * graphite.h (struct graphite_bb): New field compressed_alpha_matrix.
5374 (struct scop): New field loop2cloog_loop.
5375 (SCOP_LOOP2CLOOG_LOOP, struct data_dependence_polyhedron,
5376 RDGE_DDP, ddp_p, struct loop_to_cloog_loop_str): New.
5378 2008-02-10 Konrad Trifunovic <konrad.trifunovic@inria.fr>
5380 * graphite.c (build_graphite_bb): Fix initialization
5381 of the graphite basic block.
5383 2008-02-05 Sebastian Pop <sebastian.pop@amd.com>
5385 * graphite.c (scan_tree_for_params): Rewrite for the new layout of
5386 loop domain matrix. Pass in the number of loops contained in the
5388 (nb_loops_around_gb): Moved before setup_cloog_loop that uses it.
5389 (setup_cloog_loop): Rewrite for the new layout of loop domain matrix:
5390 loops that are not surrounding the current loop are not represented
5391 in the domain constraint matrix.
5392 (build_scop_iteration_domain): Initial domain constraint matrix
5393 contains only the eq/ineq, cst, and scop parameters columns.
5395 2008-01-29 Tobias Grosser <grosser@fim.uni-passau.de>
5397 * graphite.c (schedule_to_scattering, nb_loops_around_gb): New.
5398 (print_graphite_bb): Print scattering.
5400 2008-01-29 Tobias Grosser <grosser@fim.uni-passau.de>
5402 * graphite.c (initialize_cloog_names): Initialize names of
5403 scattering variables.
5405 2009-01-29 Tobias Grosser <grosser@fim.uni-passau.de>
5407 * graphite.c (dot_all_scops_1): Disable debug output while
5410 2008-01-29 Tobias Grosser <grosser@fim.uni-passau.de>
5412 * graphite.c (find_transform): Change cloog output language to C.
5414 2008-01-27 Sebastian Pop <sebastian.pop@amd.com>
5416 * tree-loop-distribution.c (generate_memset_zero,
5417 generate_builtin, generate_code_for_partition,
5418 rdg_flag_all_uses): New.
5419 (rdg_flag_uses): Gather in the same partition the statements defining
5420 the VUSES of the current statement.
5421 (rdg_flag_similar_stores): Renamed rdg_flag_similar_memory_accesses.
5422 Gather in the same partition not only the stores to the same memory
5423 access, but also the reads.
5424 (ldist_generate_loops): Renamed ldist_gen.
5426 2008-01-24 Sebastian Pop <sebastian.pop@amd.com>
5427 Tobias Grosser <grosser@fmi.uni-passau.de>
5429 * graphite.c (setup_cloog_loop): Chain all cloog loops with the
5430 next pointer, don't use the inner pointer.
5432 2008-01-20 Tobias Grosser <grosser@fmi.uni-passau.de>
5434 * graphite.c (dot_all_scops, dot_all_scops_1): New.
5435 (find_transform): Call dot_all_1.
5436 * graphite.h (dot_all_scops): Declared.
5438 2007-12-14 Sebastian Pop <sebastian.pop@amd.com>
5440 * tree-loop-distribution.c: Fix apsi.f ICE.
5441 (create_bb_after_loop): New.
5442 (generate_loops_for_partition): Use it.
5443 * testsuite/gfortran.dg/ldist-1.f90: New.
5445 * tree-data-ref.c (dot_rdg): Use /tmp/rdg.dot for dotty format.
5446 * graphite.c (dot_scop): Use /tmp/scop.dot for dotty format.
5448 2007-12-13 Tobias Grosser <grosser@fmi.uni-passau.de>
5450 * graphite.c (find_transform): Dump cloog program sent to cloog.
5452 2007-12-13 Tobias Grosser <grosser@fmi.uni-passau.de>
5454 * graphite.c (initialize_cloog_names): Initialize cloog
5457 2007-12-13 Tobias Grosser <grosser@fmi.uni-passau.de>
5459 * graphite.c (build_scop_context): Fix typo, for the matrix
5460 format: insert '0 >= 0' instead of '-1 >= 0'.
5462 2007-12-13 Sebastian Pop <sebastian.pop@amd.com>
5464 * Fix merge problems.
5466 2007-12-13 Sebastian Pop <sebastian.pop@amd.com>
5468 * graphite.c (setup_cloog_loop): Fix typo.
5470 2007-12-12 Sebastian Pop <sebastian.pop@amd.com>
5472 * doc/invoke.texi (-ftree-loop-distribution): Documented.
5473 * tree-loop-distribution.c: Reimplemented.
5474 * tree-pass.h (pass_loop_distribution): New.
5475 * tree-scalar-evolution.c (number_of_iterations_for_all_loops): Use
5477 * graphds.h (struct graph): New field indexes.
5478 * timevar.def (TV_TREE_LOOP_DISTRIBUTION): New.
5480 * tree-vect-analyze.c: Remove declaration of static functions when not
5482 * tree-vectorizer.c: Same.
5483 (rename_variables_in_loop): Now extern.
5484 (slpeel_tree_duplicate_loop_to_edge_cfg): Renamed
5485 tree_duplicate_loop_to_edge_cfg. Reset PENDING_STMT for edges after
5486 calling redirect_edge_and_branch_force.
5488 * tree-vectorizer.h (tree_duplicate_loop_on_edge): Declared.
5490 * tree-data-ref.c: Don't include tree-chrec.h.
5491 (debug_data_dependence_relations): New.
5492 (dump_data_dependence_relation): Call dump_data_reference on data refs
5494 (same_access_functions): Moved...
5495 (find_vertex_for_stmt): Renamed rdg_vertex_for_stmt.
5496 (dump_rdg_vertex, debug_rdg_vertex, dump_rdg_component,
5497 debug_rdg_component, dump_rdg, debug_rdg, dot_rdg_1, dot_rdg,
5498 struct rdg_vertex_info, ): New.
5499 (create_rdg_edge_for_ddr): Compute the dependence level before looking
5501 (create_rdg_vertices): Initialize the htab of graph->indexes.
5502 Initialize RDG_MEM_WRITE_STMT and RDG_MEM_READS_STMT.
5503 (stmts_from_loop): Don't save LABEL_EXPR.
5504 (hash_stmt_vertex_info, eq_stmt_vertex_info,
5505 hash_stmt_vertex_del): New.
5506 (build_rdg): Initialize rdg->indexes.
5507 (free_rdg, stores_from_loop, ref_base_address,
5508 rdg_defs_used_in_other_loops_p, have_similar_memory_accesses,
5509 have_similar_memory_accesses_1, ref_base_address_1,
5510 remove_similar_memory_refs): New.
5512 * tree-data-ref.h: Include tree-chrec.h.
5513 (debug_data_dependence_relations): Declared.
5514 (same_access_functions): ...here. Now static inline.
5515 (ddr_is_anti_dependent, ddrs_have_anti_deps,
5516 ddr_dependence_level): New.
5517 (struct rdg_vertex): New fields has_mem_write, has_mem_reads.
5518 (RDGV_HAS_MEM_WRITE, RDGV_HAS_MEM_READS, RDG_STMT, RDG_MEM_WRITE_STMT,
5519 RDG_MEM_READS_STMT): New.
5520 (dump_rdg_vertex, debug_rdg_vertex, dump_rdg_component,
5521 debug_rdg_component, dump_rdg, debug_rdg, dot_rdg,
5522 rdg_vertex_for_stmt): Declared.
5523 (struct rdg_edge): New field level.
5524 (RDGE_LEVEL, free_rdg): New.
5525 (stores_from_loop, remove_similar_memory_refs,
5526 rdg_defs_used_in_other_loops_p,
5527 have_similar_memory_accesses): Declared.
5528 (rdg_has_similar_memory_accesses): New.
5530 * lambda.h (dependence_level): New.
5531 * common.opt (ftree-loop-distribution): New.
5532 * tree-flow.h (debug_loop_ir): Renamed debug_loops.
5533 (print_loop_ir): Renamed print_loops.
5534 (debug_loop, debug_loop_num, print_loops_bb, mark_virtual_ops_in_bb,
5535 tree_duplicate_loop_to_edge_cfg, rename_variables_in_loop): Declared.
5536 * Makefile.in (TREE_DATA_REF_H): Depends on tree-chrec.h.
5537 (tree-loop-distribution.o): Added.
5538 * tree-cfg.c (mark_virtual_ops_in_region): Use mark_virtual_ops_in_bb.
5539 (mark_virtual_ops_in_bb): New.
5540 (print_loops_bb, debug_loop_num, debug_loop): New.
5541 * passes.c: Scheduled pass_loop_distribution.
5543 2007-12-12 Konrad Trifunovic <konrad.trifunovic@inria.fr>
5545 * graphite.c (scan_tree_for_params): Correct the number of columns
5547 (nb_flat_iterator): New.
5548 (setup_cloog_loop): Initialize to 1 the first column for inequalities.
5549 (build_scop_iteration_domain): Correct the number of columns for
5552 2007-12-12 Sebastian Pop <sebastian.pop@amd.com>
5554 * Merge from mainline (129697:130800).
5556 2007-10-30 Sebastian Pop <sebastian.pop@amd.com>
5558 * graphite.c (build_graphite_bb): SCoP's basic blocks are post
5559 dominated by SCoP's exit.
5560 (graphite_transform_loops): Compute post dominators.
5562 2007-10-28 Sebastian Pop <sebastian.pop@amd.com>
5564 * Merge from mainline (127169:129697).
5566 2007-10-28 Sebastian Pop <sebastian.pop@amd.com>
5568 * graphite.c (affine_expr): Renamed scop_affine_expr. Use an extra
5569 parameter for the basic block that contains the expression. Use
5570 outermost_loop_in_scop for evolution_function_is_affine_multivariate_p.
5571 (stmt_simple_for_scop_p): Pass to scop_affine_expr the basic block of
5573 * graphite.h (gbb_loop): New.
5574 (GBB_LOOP): Removed.
5576 2007-08-03 Sebastian Pop <sebpop@gmail.com>
5578 * Makefile.in: Fix merge problem.
5580 2007-08-03 Sebastian Pop <sebpop@gmail.com>
5582 * Merge from mainline (125309:127169).
5583 * tree-loop-distribution.c: Disabled.
5585 2007-06-05 Sebastian Pop <sebpop@gmail.com>
5587 * Merge from mainline (r123693:125309).
5589 2007-05-30 Sebastian Pop <sebpop@gmail.com>
5591 * tree-loop-distribution.c (correct_modify_expr_p): Renamed
5593 (correct_modify_p, check_statements, number_of_lvalue_uses,
5594 number_of_scalar_dependences, create_edges): Use GIMPLE_MODIFY_STMT
5595 instead of MODIFY_EXPR.
5596 (update_edge_with_ddv): Don't pass index_of_edge. Initialize
5599 2007-05-24 Sebastian Pop <sebpop@gmail.com>
5601 * tree-loop-distribution.c (struct rdg): Replace arrays by
5602 VECs for edges and vertices.
5603 (RDG_NBV, RDG_NBE, RDG_VERTEX, RDG_EDGE): Removed.
5604 (RDGV_NB_PARTITIONS): New.
5605 (PRDG_NBV, PRDG_NBE): Removed.
5606 (build_scc_graph, correct_partitions_p, mark_partitions, build_prdg,
5607 dump_rdg, find_vertex_with_stmt, create_vertices, free_rdg,
5608 number_of_scalar_dependences, create_edges, build_rdg): Use VECs.
5610 2007-05-17 Georges-Andre Silber <silber@cri.ensmp.fr>
5611 Sebastian Pop <sebpop@gmail.com>
5613 * doc/invoke.texi (-ftree-loop-distribution): Document.
5614 * tree-loop-distribution.c: New file.
5615 * tree-pass.h (pass_loop_distribution): Declared.
5616 * timevar.def (TV_TREE_LOOP_DISTRIBUTION): New.
5617 * tree-data-ref.c (initialize_data_dependence_relation): Initialize
5619 * tree-data-ref.h (data_dependence_relation): Add reversed_p.
5620 (DDR_REVERSED_P): New.
5621 * common.opt (-ftree-loop-distribution): New.
5622 * tree-flow.h (distribute_loops): Declared.
5623 * Makefile.in (OBJS-common): Depend on tree-loop-distribution.o.
5624 * passes.c (init_optimization_passes): Schedule loop distribution.
5626 2007-05-12 Sebastian Pop <sebastian.pop@inria.fr>
5628 * graphite.c (print_graphite_bb): Don't call dump_data_references.
5629 (print_scop): Don't print when scop is NULL.
5630 (build_scop_context, find_transform): Don't output to stderr.
5632 2007-05-09 Sebastian Pop <sebastian.pop@inria.fr>
5634 * tree-data-ref.c: Don't include graphite.h.
5635 Comment out the code for printing data reference's scop.
5636 (build_access_matrix_with_af): Moved...
5637 * tree-data-ref.h (build_access_matrix_with_af): Removed declaration.
5638 * graphite.c (build_access_matrix_with_af): ... here. Now static.
5639 (print_graphite_bb): Print basic block's schedule.
5640 (print_scop): Don't print the schedule, call cloog's pretty printer.
5641 (bb_in_scop_p): A basic block is in a scop only if it is both
5642 dominated and postdominated by the scop's entry and exit basic blocks.
5643 (function_parameter_p): New.
5644 (invariant_in_scop_p): Use function_parameter_p.
5645 (new_scop, save_scop): New.
5646 (end_scop, test_for_scop_bound, build_scops): Use new_scop, and
5648 (scan_tree_for_params): Directly build the constraint as CloogMatrix.
5649 (loop_in_scop_p): New.
5650 (scop_record_loop): Use loop_in_scop_p.
5651 (build_scop_domain): Renamed build_scop_iteration_domain.
5652 (setup_cloog_loop, initialize_cloog_names, find_scop_parameters,
5653 nb_params_in_scop, build_scop_context, first_loop_in_scop,
5654 setup_cloog_loop, dot_scop_1, dot_scop): New.
5655 * graphite.h (GBB_LOOP, SCOP_PROG, dot_scop): New.
5656 (struct scop): Add a pointer to cloog's representation of a program.
5658 2007-04-14 Sebastian Pop <sebastian.pop@inria.fr>
5660 * doc/invoke.texi (-ftree-check-verbose): Renamed
5661 -ftree-checks-verbose.
5662 * common.opt (flag_tree_check_verbose): Renamed
5663 flag_tree_checks_verbose.
5664 * tree-check.c (tree_check_warning): Use flag_tree_checks_verbose.
5666 2007-04-14 Sebastian Pop <sebastian.pop@inria.fr>
5668 * configure: Regenerated.
5669 * config.in: Regenerated.
5670 * tree-ssa-loop.c (graphite_transforms): Execute
5671 graphite_transform_loops only when HAVE_cloog.
5672 * configure.ac (HAVE_polylib, HAVE_cloog, GRAPHITE): Defined.
5673 * graphite.c: Include polylibgmp.h and cloog.h.
5674 (graphite_transform_loops): Removed loops parameter.
5675 * tree-flow.h (graphite_transform_loops): Update declaration.
5676 * Makefile.in (POLYLIBLIBS, POLYLIBINC, CLOOGLIBS, CLOOGINC): New.
5677 (LIBS): Depend on CLOOGLIBS and on POLYLIBLIBS.
5678 (INCLUDES): Depend on POLYLIBINC and on CLOOGINC.
5679 (OBJS-common): Remove dependence on graphite.o.
5680 (BACKEND): Depend on @GRAPHITE@.
5682 2007-04-13 Sebastian Pop <sebastian.pop@inria.fr>
5684 * doc/invoke.texi (-ftree-check-verbose): Documented.
5685 * testsuite/gcc.dg/tree-checker/tree-checks-1.c: New.
5686 * testsuite/gcc.dg/tree-checker/tree-checks-2.c: New.
5687 * testsuite/gcc.dg/tree-checker/tree-checks-3.c: New.
5688 * testsuite/gcc.dg/tree-checker/tree-checks-4.c: New.
5689 * testsuite/gcc.dg/tree-checker/tree-checks.exp: New.
5690 * testsuite/gcc.dg/tree-checker/condates.crp: New.
5691 * common.opt (ftree-checks-verbose): New.
5692 * tree-check.c (tree_check_warning): Move extra stderr output
5693 under control of flag_tree_check_verbose.
5695 2007-04-12 Sebastian Pop <sebastian.pop@inria.fr>
5697 * tree-match.c: Fix comments formatting.
5698 * tree-match.h: Fix comments formatting.
5699 * tree-check.c: Fix comments formatting.
5700 (tree_check_init): Restructure.
5702 2007-04-12 Nic Volanschi <nic.volanschi@free.fr>
5704 * doc/invoke.texi (-ftree-check, -ftree-checks): Documented.
5706 2007-04-10 Sebastian Pop <sebastian.pop@inria.fr>
5708 * Merge from mainline (r120733:123693).
5710 2007-03-20 Nic Volanschi <nic.volanschi@free.fr>
5712 * condate.y: New file.
5713 * tree-match.h (struct patt_info_s): New field sign.
5714 (struct condate_s): New field msg.
5715 (normalize_condate, name_condate, add_condate): New.
5716 (conds[], condate_parse): Made extern.
5717 * tree-check.c (tree_check_warning): First arg changed to cond;
5718 warning reformatted.
5719 (tree_check_init): Reset the TREE_VISITED bit on every CFG node.
5721 (tree_check): Process trivial condates.
5722 (read_delimited_string): Removed.
5723 (print_cond): Print name and msg.
5724 (conds[]): Made extern.
5725 (parse_tree_check_file_once): Rewritten to use the parser in
5727 Processing of option --tree_check_string moved to tree_scan().
5728 * Makefile.in: Added condate.y
5730 2007-03-12 Sebastian Pop <sebastian.pop@inria.fr>
5732 * tree-pretty-print.c (dump_generic_bb_buff, lazy_dump_generic_node):
5733 Use VECs instead of varrays.
5734 * diagnostic.h (lazy_dump_generic_node): Update declaration.
5735 * Makefile.in (pretty-print.o): Depend on vec.h.
5736 * pretty-print.c: Include tree.h and vec.h.
5737 (pp_clear_state, pp_write_list_to_stream, pp_base_format,
5738 pp_base_format, pp_construct, pp_base_string, pp_lazy_mode,
5739 new_tree_chunk, pp_add_tree, pp_add_string, pp_add_char, pp_write_list,
5740 pp_free_list): Use VECs instead of varrays.
5741 * pretty-print.h: Do not include varray.h.
5742 (struct tree_chunk_s): Declaration moved before its use.
5743 (output_buffer): Rename varray field to chunks.
5744 * tree-match.c (tree_equal, chunk_1st_char, chunks_lookahead,
5745 tree_1st_char, match_chunks_pattinfo, match_tree_pattinfo,
5746 save_global_holes): Use VECs instead of varrays.
5747 * tree-match.h: Declare VECs of cfg_node, and hole_p.
5748 * tree-check.c (scan_cfg_stmts, push_node,
5749 print_matching_stmt): Removed.
5750 (tree_check_instance, push_global_holes_if_new, tree_check,
5751 execute_tree_check): Use VECs instead of varrays.
5752 (gate_tree_check): Don't execute the CFG check when basic_block_info
5755 2007-01-12 Sebastian Pop <sebastian.pop@inria.fr>
5757 * Merge from mainline (r115016:120733).
5759 2007-01-12 Sebastian Pop <sebastian.pop@inria.fr>
5761 * Merge from mainline (r117632:117661).
5763 2007-01-12 Sebastian Pop <sebastian.pop@inria.fr>
5765 * tree-dump.c (dump_option_value_in): Add TDF_DEBUG.
5766 * tree-pass.h (TDF_DEBUG, debug_p): New.
5767 * tree-scalar-evolution.c (set_scalar_evolution, get_scalar_evolution,
5768 get_scalar_evolution, add_to_evolution, set_nb_iterations_in_loop,
5769 get_loop_exit_condition, analyze_evolution_in_loop,
5770 analyze_initial_condition, analyze_scalar_evolution,
5771 instantiate_parameters, number_of_latch_executions): Use debug_p.
5772 * tree-chrec.c (chrec_apply): Use debug_p.
5773 * tree-data-ref.c: Include graphite.h.
5774 (dump_data_reference): Print also the access matrix.
5775 (analyze_array, analyze_indirect_ref, init_data_ref,
5776 analyze_offset_expr, address_analysis, object_analysis,
5777 create_data_ref, finalize_ddr_dependent,
5778 non_affine_dependence_relation, analyze_ziv_subscript,
5779 analyze_siv_subscript_cst_affine,
5780 compute_overlap_steps_for_affine_1_2, analyze_subscript_affine_affine,
5781 can_use_analyze_subscript_affine_affine, analyze_siv_subscript,
5782 analyze_miv_subscript, analyze_overlapping_iterations,
5783 build_classic_dist_vector, subscript_dependence_tester,
5784 compute_affine_dependence, analyze_all_data_dependences): Use debug_p.
5785 (build_access_matrix_with_af): No longer static.
5786 * tree-data-ref.h (scop_p): ... declaration here.
5787 (data_reference.scop): New field.
5788 (DR_SCOP, DR_ACCESS_MATRIX): New.
5789 (build_access_matrix_with_af, dr_num_subscripts): Declared.
5790 * graphite.c (print_graphite_bb): Call dump_data_references.
5791 (print_scop): Use scop_nb_loops and scop_dim_domain.
5792 (test_for_scop_bound): Use debug_p.
5793 (scan_tree_for_params): Use scop_nb_loops, scop_nb_loops and
5795 (scop_loop_index): Moved...
5796 (scop_record_loop): New.
5797 (build_scop_loop_nests): Use scop_record_loop.
5798 (build_scop_domain): Use scop_dim_domain.
5799 (build_access_matrix): Implemented.
5800 (build_scop_canonical_schedules): Use scop_nb_loops.
5801 (build_graphite_bb): Initialize GBB_SCOP.
5802 * graphite.h (scop_p): Moved...
5803 (graphite_bb.scop): New field.
5804 (graphite_bb.iteration_domain, GBB_DOMAIN, scop.nb_params,
5805 scop.nb_loops, scop.dim_domain, SCOP_NB_LOOPS, SCOP_NB_PARAMS,
5806 SCOP_DIM_DOMAIN, SCOP_STMTS): Removed.
5807 (scop_nb_params, scop_nb_loops, scop_dim_domain, gbb_dim_domain,
5808 scop_loop_index): New.
5809 * Makefile.in (tree-data-ref.o): Depends on graphite.h.
5811 2007-01-05 Sebastian Pop <sebastian.pop@inria.fr>
5813 * Merge from mainline (r117661:120450).
5815 2006-10-12 Sebastian Pop <sebastian.pop@inria.fr>
5817 * tree-scalar-evolution.c (instantiate_parameters_1): Don't stop
5818 at the first declaration outside the varying loop, instantiate as
5820 * tree-chrec.c (for_each_scev_op): New.
5821 * tree-chrec.h (for_each_scev_op): Declared.
5822 * tree-ssa-loop.c (pass_graphite_trans): Don't dump the function.
5823 * tree-data-ref.c (get_references_in_stmt,
5824 find_data_references_in_stmt): New, from trunk.
5825 (find_data_references_in_loop): Use get_references_in_stmt
5826 and find_data_references_in_loop, modified as in trunk.
5827 (build_access_matrix_with_af): New.
5828 * tree-data-ref.h (data_reference): Add a field access_matrix.
5829 (data_ref_loc): New, as in trunk.
5830 * graphite.c (print_graphite_bb, bb_in_scop_p, stmt_in_scop_p,
5831 invariant_in_scop_p, param_index, scan_tree_for_params,
5832 scop_loop_index, build_scop_loop_nests, build_scop_domain, irp_data,
5833 idx_record_param, idx_record_params, build_access_matrix,
5834 build_scop_data_accesses, build_scop_canonical_schedules,
5835 build_graphite_bb, build_scop_bbs, find_params_in_bb,
5836 build_scop_params): New.
5837 * graphite.h (graphite_bb): New.
5838 (scop): Add fields static_schedule, params, loop_nest,
5840 * lambda.h: Declare vecs of lambda_matrix.
5841 * tree-flow.h (print_loop_ir_bb): Declared.
5842 * tree-cfg.c (print_loop_ir_bb): New.
5843 (print_loop): Use print_loop_ir_bb.
5845 2006-10-12 Sebastian Pop <pop@cri.ensmp.fr>
5847 * Merge from mainline (r115016:117632).
5849 2006-10-11 Sebastian Pop <pop@cri.ensmp.fr>
5851 * graphite.c (debug_scops): Adjust definition for avoiding a bootstrap
5852 break due to a warning.
5854 2006-10-10 Sebastian Pop <pop@cri.ensmp.fr>
5856 * graphite.c (print_scops, debug_scops): New.
5857 (graphite_transform): Renamed graphite_find_transform.
5858 * graphite.h (debug_scops): Declared.
5860 2006-08-17 Sebastian Pop <pop@cri.ensmp.fr>
5862 * tree-match.c: Reformat following the GNU style.
5863 * tree-match.h: Reformat following the GNU style.
5864 * tree-pattern.h: Removed empty file.
5865 * Makefile.in: Remove references to tree-pattern.h.
5866 * tree-check.c: Reformat following the GNU style.
5867 (execute_tree_check): Move gate condition code to...
5868 (gate_tree_check): ...here. New function.
5869 (pass_check): Use the gate function.
5871 2006-07-04 Nic Volanschi <nic.volanschi@free.fr>
5873 * tree-pattern.h: New. Tree pattern matching and checking using
5875 * tree-check.c: New. Tree/CFG checking pass.
5876 * tree-match.c: New. Library for tree pattern matching.
5877 * opts.c, common.opt: Add options --ftree-check & --ftree-checks.
5878 * toplev.c, flags.h: Add globals for tree-check pass.
5879 * Makefile.in: Integrate the files in tree-check pass.
5880 * timevar.def, tree-optimize.c, tree-pass.h: Register tree-check pass.
5881 * pretty-print.c, pretty-print.h, tree-pretty-print.c, diagnostic.h:
5882 Introduce a "lazy" pretty-print mode.
5883 * tree.c, tree.h: Add tree_name.
5885 2006-07-04 Sebastian Pop <pop@cri.ensmp.fr>
5887 * doc/invoke.texi (-fgraphite): Correct typo.
5888 * tree-scalar-evolution.c (number_of_iterations_for_all_loops): Update
5889 use of print_loop_ir.
5890 * testsuite/gcc.dg/graphite/scop-1.c: New.
5891 * testsuite/gcc.dg/graphite/scop-2.c: New.
5892 * testsuite/gcc.dg/graphite/graphite.exp: New.
5893 * graphite.c: Include domwalk.h.
5894 (print_scop): Print only the entry and exit blocks.
5895 (debug_scop): No longer static.
5896 (affine_expr): Fix formating. Return also true when the expression is
5898 (stmt_simple_for_scop_p): Fix formating.
5899 (build_scops): Use domwalk.
5900 (get_loop_start, end_scop, test_for_scop_bound): New.
5901 (graphite_transform_loops): Avoid printing on stderr.
5902 * graphite.h (debug_scop): Declared.
5903 * tree-flow.h (debug_loop_ir, print_loop_ir): Update declarations.
5904 * Makefile.in (graphite.o): Depend on domwalk.h.
5905 * tree-cfg.c (print_loop, print_pred_bbs, print_succ_bbs): Remove
5906 declarations for static functions.
5907 (print_loop, print_loop_ir, debug_loop_ir): Use an extra parameter for
5908 controlling output verbosity.
5910 2006-06-26 Sebastian Pop <pop@cri.ensmp.fr>
5911 Plesco Alexandru <shurikx@gmail.com>
5913 * doc/invoke.texi (-fgraphite): Document.
5914 * tree-pass.h (pass_graphite_transforms): Declared.
5915 * timevar.def (TV_GRAPHITE_TRANSFORMS): New.
5916 * tree-ssa-loop.c (graphite_transforms, gate_graphite_transforms): New.
5917 (pass_graphite_transforms): Defined.
5918 * tree-data-ref.c (free_data_ref, data_reference): Extern.
5919 * tree-data-ref.h (free_data_ref, data_reference): Declared.
5920 * graphite.c, graphite.h: New.
5921 * common.opt (fgraphite): Declared.
5922 * tree-flow.h (graphite_transform_loops): Declared.
5923 * Makefile.in (OBJS-common): Add graphite.o.
5924 (graphite.o): New rule.
5925 * passes.c (pass_graphite_transforms): Scheduled.