1 2009-10-06 Sebastian Pop <sebastian.pop@amd.com>
3 * graphite-interchange.c (lst_apply_interchange): New.
4 (lst_interchange_profitable_p): New.
5 (lst_try_interchange_loops): New.
6 (lst_try_interchange): New.
7 (lst_do_interchange): New.
8 (pbb_do_interchange): Removed.
9 (scop_do_interchange): Call lst_do_interchange.
11 2009-10-06 Sebastian Pop <sebastian.pop@amd.com>
13 * graphite-poly.c (print_scop): Print SCOP_ORIGINAL_SCHEDULE and
14 SCOP_TRANSFORMED_SCHEDULE.
19 * graphite-poly.h (lst_p): New.
22 (LST_LOOP_FATHER): New.
25 (scop_to_lst): Declared.
26 (print_lst): Declared.
27 (debug_lst): Declared.
32 (lst_dewey_number): New.
33 (struct scop): Add original_schedule and transformed_schedule fields.
34 (SCOP_ORIGINAL_SCHEDULE): New.
35 (SCOP_TRANSFORMED_SCHEDULE): New.
36 * graphite-sese-to-poly.c (build_poly_scop): Call scop_to_lst.
38 2009-10-05 Sebastian Pop <sebastian.pop@amd.com>
40 * graphite-dependences.c (reduction_ddr): New.
41 (graphite_legal_transform_bb): Call reduction_ddr.
42 * graphite-poly.c (new_poly_bb): Pass a new bool parameter.
43 Initialize PBB_IS_REDUCTION.
44 * graphite-poly.h (struct poly_bb): New bool field is_reduction.
45 (PBB_IS_REDUCTION): New.
46 (new_poly_bb): Update declaration.
47 * graphite-scop-detection.h (build_scop_bbs): Removed.
48 (nb_reductions_in_loop): Removed.
49 * graphite-sese-to-poly.c (try_generate_gimple_bb): Pass a sbitmap
50 parameter for reductions.
51 (try_generate_gimple_bb): Update call to new_poly_bb.
52 (build_scop_bbs_1): Same.
53 (build_scop_bbs): Same.
54 (gsi_for_phi_node): New.
55 (scalar_close_phi_node_p): Remove gcc_assert.
56 (split_reduction_stmt): New.
57 (is_reduction_operation_p): New.
58 (phi_contains_arg): New.
59 (follow_ssa_with_commutative_ops): New.
60 (detect_commutative_reduction_arg): New.
61 (detect_commutative_reduction_assign): New.
62 (follow_inital_value_to_phi): New.
63 (edge_initial_value_for_loop_phi): New.
64 (initial_value_for_loop_phi): New.
65 (detect_commutative_reduction): New.
66 (translate_scalar_reduction_to_array_for_stmt): New.
67 (insert_copyout): New.
69 (translate_scalar_reduction_to_array): New.
70 (rewrite_commutative_reductions_out_of_ssa_close_phi): New.
71 (rewrite_commutative_reductions_out_of_ssa_loop): New.
72 (rewrite_commutative_reductions_out_of_ssa): New.
73 (build_poly_scop): Call rewrite_commutative_reductions_out_of_ssa.
74 * sese.h (split_region_for_bb): New.
76 * gcc.dg/graphite/graphite.exp (DEFAULT_CFLAGS_GRAPHITE_BLOCK): Add -ffast-math.
77 * gcc.dg/graphite/interchange-1.c: Fix format.
78 * gcc.dg/graphite/interchange-10.c: New.
80 2009-10-05 Sebastian Pop <sebastian.pop@amd.com>
82 * graphite-sese-to-poly.c (insert_out_of_ssa_copy): Remove
85 2009-10-05 Sebastian Pop <sebastian.pop@amd.com>
87 * graphite-sese-to-poly.c (scev_analyzable_p): New.
88 (rewrite_cross_bb_scalar_dependence): New.
89 (rewrite_cross_bb_scalar_deps): New.
90 (rewrite_reductions_out_of_ssa): Use bb_in_sese_p.
91 Call rewrite_cross_bb_scalar_deps.
93 2009-10-05 Sebastian Pop <sebastian.pop@amd.com>
95 * graphite-sese-to-poly.c (gsi_for_ssa_name_def): Removed.
96 (insert_out_of_ssa_copy): Directly use gsi_after_labels and
99 2009-10-05 Sebastian Pop <sebastian.pop@amd.com>
101 * graphite-clast-to-gimple.c (build_cloog_prog): Use pbb_index.
102 * graphite-interchange.c (pbb_do_interchange): Same.
103 * graphite-poly.c (print_scattering_function): Same.
105 * graphite-poly.h (pbb_loop): New.
106 * graphite-sese-to-poly.c (create_linear_expr_from_tree): Use pbb_loop.
108 2009-09-27 Sebastian Pop <sebastian.pop@amd.com>
110 * graphite-scop-detection.c (limit_scops): Do not build poly_bbs.
112 2009-09-27 Sebastian Pop <sebastian.pop@amd.com>
114 * graphite-sese-to-poly.c (partition_drs_to_sets): Drs is not modified,
115 so don't pass a pointer to it.
116 (build_alias_set_for_drs): Same.
117 (build_base_obj_set_for_drs): Same.
118 (build_scop_drs): Same.
120 2009-09-26 Li Feng <nemokingdom@gmail.com>
122 * graphite-sese-to-poly.c (build_scop_drs): Disable writing to file
123 the alias graph of data references.
125 2009-09-25 Li Feng <nemokingdom@gmail.com>
127 * graphite-sese-to-poly.c (write_alias_graph_to_ascii_dimacs): New.
128 (build_scop_drs): When debugging, write the alias graph to file,
129 otherwise, should be disabled.
131 2009-09-17 Sebastian Pop <sebastian.pop@amd.com>
133 * graphite-scop-detection.c (stmt_simple_memref_p): Removed.
134 (is_simple_operand): Remove call to stmt_simple_memref_p.
135 (stmt_simple_for_scop_p): Update call to is_simple_operand.
137 2009-09-17 David Edelsohn <edelsohn@gnu.org>
139 * testsuite/gcc.dg/graphite/interchange-mvt.c: New File.
140 * testsuite/gcc.dg/graphite/scop-dsyrk.c: New File.
141 * testsuite/gcc.dg/graphite/scop-dsyr2k.c: New File.
142 * testsuite/gcc.dg/graphite/scop-mvt.c: New File.
143 * testsuite/gcc.dg/graphite/scop-sor.c: New File.
145 2009-09-17 Li Feng <nemokingdom@gmail.com>
148 * graphite-dependences.c (poly_drs_may_alias_p): Adjust definition.
149 (pddr_original_scattering): Make sure 2 pdr2 in the same base object set.
150 (graphite_carried_dependence_level_k): Ditto.
151 * graphite-poly.c (new_poly_dr): Add init of PDR_BASE_OBJECT_SET.
152 * graphite-poly.h (struct poly_dr): Add member dr_base_object_set.
153 (new_poly_dr): Adjust declaration.
154 * graphite-sese-to-poly.c (free_data_refs_aux): New.
155 (free_gimple_bb): Added free_data_refs_aux.
156 (build_poly_dr): Add dr_base_object_set.
157 (partition_drs_to_sets): New.
158 (dr_same_base_object_p): New.
159 (build_alias_set_for_drs): New.
160 (build_base_object_set_for_drs): New.
161 (build_scop_drs): Add build_base_obj_set_for_drs.
162 * graphite-sese-to-poly.h: Added #define for alias set number index and
163 base object set index.
164 * libgomp/testsuite/libgomp.graphite/force-parallel-6.c: Refine tests.
165 * libgomp/testsuite/libgomp.graphite/pr4118.c: New.
167 2009-09-16 Alexander Monakov <amonakov@ispras.ru>
169 * graphite-sese-to-poly.c (pdr_add_data_dimensions): Add bounds only
170 for ARRAY_REFs. Use array_ref_{low,up}_bound to determine bounds.
172 2009-09-14 Sebastian Pop <sebastian.pop@amd.com>
174 * graphite-sese-to-poly.c (struct irp_data): Removed.
175 (idx_record_params): Removed.
176 (find_params_in_bb): Scan for parameters the access functions; don't
177 parse the tree representation.
179 2009-09-14 Sebastian Pop <sebastian.pop@amd.com>
181 * tree-ssa-loop.c (gate_graphite_transforms): Disable Graphite
182 passes at -O1 and below.
184 2009-09-14 Sebastian Pop <sebastian.pop@amd.com>
186 * graphite-blocking.c: Fix order of includes: tree-chrec.h, then
187 tree-scalar-evolution.h, and then tree-data-ref.h.
188 * graphite-clast-to-gimple.c: Same.
189 * graphite-dependences.c: Same.
190 * graphite-interchange.c: Same.
191 * graphite-poly.c: Same.
192 * graphite-scop-detection.c: Same.
193 * graphite-sese-to-poly.c: Same.
195 * lambda-code.c: Same.
196 * matrix-reorg.c: Same.
197 * tree-data-ref.c: Same.
198 * tree-if-conv.c: Same.
199 * tree-loop-distribu: Same.: Same.
200 * tree-loop-linear.c: Same.
201 * tree-parloops.c: Same.
202 * tree-predcom.c: Same.
203 * tree-vect-patterns.c: Same.
205 2009-09-02 Sebastian Pop <sebastian.pop@amd.com>
207 Partially revert the previous patch, except the following.
208 * tree-scalar-evolution.c (instantiate_scev_not): Adapted to pass
209 as parameters the operands of the not expression.
211 2009-09-01 Sebastian Pop <sebastian.pop@amd.com>
213 * tree-scalar-evolution.c (instantiate_scev_assign): New.
214 Do not call analyze_scalar_evolution on assignments.
215 (instantiate_scev_phi): Call analyze_scalar_evolution.
216 (instantiate_scev_name): Call instantiate_scev_assign and
217 instantiate_scev_phi.
218 (instantiate_scev_not): Adapted to pass as parameters the operands
219 of the not expression.
221 2009-09-01 Sebastian Pop <sebastian.pop@amd.com>
223 * tree-scalar-evolution.c (instantiate_scev_binary): Adapted
224 to pass as parameters the operands of the binary expression.
226 2009-09-01 Sebastian Pop <sebastian.pop@amd.com>
228 * tree-scalar-evolution.c (instantiate_scev_bitnot): Renamed
229 instantiate_scev_not. Handle NEGATE_EXPR.
230 (instantiate_scev_r): Handle NEGATE_EXPR.
232 2009-09-01 Sebastian Pop <sebastian.pop@amd.com>
234 * tree-scalar-evolution.c (instantiate_scev_1): Renamed
236 (instantiate_scev_r): Move code in instantiate_scev_2
237 and instantiate_scev_1.
239 2009-09-01 Sebastian Pop <sebastian.pop@amd.com>
241 * tree-scalar-evolution.c (instantiate_scev_3): New.
242 (instantiate_scev_1): Move code in instantiate_scev_3.
244 2009-09-01 Sebastian Pop <sebastian.pop@amd.com>
246 * tree-scalar-evolution.c (instantiate_scev_poly): New.
247 (instantiate_scev_1): Move code in instantiate_scev_poly.
249 2009-09-01 Sebastian Pop <sebastian.pop@amd.com>
251 * tree-scalar-evolution.c (instantiate_scev_bitnot): New.
252 (instantiate_scev_1): Move code in instantiate_scev_bitnot.
254 2009-09-01 Sebastian Pop <sebastian.pop@amd.com>
256 * tree-scalar-evolution.c (instantiate_scev_convert): New.
257 (instantiate_scev_1): Move code in instantiate_scev_convert.
259 2009-09-01 Sebastian Pop <sebastian.pop@amd.com>
261 * tree-scalar-evolution.c (instantiate_scev_binary): New.
262 (instantiate_scev_1): Move code in instantiate_scev_binary.
264 2009-09-01 Sebastian Pop <sebastian.pop@amd.com>
266 * tree-scalar-evolution.c (instantiate_scev_name): New.
267 (instantiate_scev_1): Move code in instantiate_scev_name.
269 2009-08-28 Sebastian Pop <sebastian.pop@amd.com>
271 * Merge from mainline (150992:151171).
273 2009-08-25 Sebastian Pop <sebastian.pop@amd.com>
275 * graphite-dependences.c (graphite_legal_transform_bb): Call
276 pbb_remove_duplicate_pdrs.
277 * graphite-poly.c (can_collapse_pdr): Removed.
278 (pdr_find_duplicate): Removed.
279 (can_collapse_pdrs): New.
280 (pbb_remove_duplicate_pdrs): New.
281 (new_poly_dr): Do not look for duplicates.
282 * graphite-poly.h (struct poly_bb): New field pdr_duplicates_removed.
283 (PBB_PDR_DUPLICATES_REMOVED): New.
284 (pbb_remove_duplicate_pdrs): Declared.
286 2009-08-25 Sebastian Pop <sebastian.pop@amd.com>
288 * graphite-interchange.c (pbb_interchange_profitable_p): Adjust
289 the strides by multiplying by PDR_NB_REFS.
290 * graphite-poly.c (can_collapse_pdr): New.
291 (pdr_find_duplicate): New.
292 (new_poly_dr): Call pdr_find_duplicate. Collapse duplicate PDRs.
293 Initialize PDR_NB_REFS.
294 * graphite-poly.h (struct poly_dr): Add field nb_refs.
296 (new_poly_dr): Number of subscripts is a graphite_dim_t.
298 2009-08-25 Sebastian Pop <sebastian.pop@amd.com>
300 Revert one of the previous commits:
301 * graphite-dependences.c (graphite_legal_transform_bb): Avoid
302 the computation of symmetric data dependence relations.
303 (dependency_between_pbbs_p): Same.
305 2009-08-25 Sebastian Pop <sebastian.pop@amd.com>
308 * graphite-poly.c (apply_poly_transforms): Remove legality test before
311 2009-08-25 Sebastian Pop <sebastian.pop@amd.com>
313 * graphite-dependences.c (pddr_original_scattering): Return NULL
314 for read-read dependence relations.
315 * graphite-poly.h (enum poly_dr_type): Fix comment.
318 (pdr_may_write_p): New.
320 2009-08-25 Sebastian Pop <sebastian.pop@amd.com>
322 * graphite-poly.h (enum POLY_DR_TYPE): Renamed poly_dr_type.
323 (struct poly_dr): Same.
325 * graphite-poly.c (new_poly_dr): Same.
327 2009-08-25 Konrad Trifunovic <konrad.trifunovic@gmail.com>
328 Sebastian Pop <sebastian.pop@amd.com>
330 * graphite-blocking.c (pbb_strip_mine_loop_depth): Renamed
331 pbb_strip_mine_time_depth. Changed the implementation so that
332 transformation is expressed as a transformation on
333 time (scatttering) dimensions. Also, ensures that the 2d+1
334 scheduling format is preserved.
335 (pbb_strip_mine_profitable_p): Profitability is based on the
336 iteration number of a given time (scattering) dimension,
337 and not on a original loop depth dimension.
338 (pbb_strip_mine): Call pbb_number_of_iterations_at_time.
339 (pbb_do_strip_mine): Call psct_dynamic_dim.
340 * graphite-poly.c (pbb_number_of_iterations_at_time): New.
341 * graphite-poly.h (pbb_number_of_iterations_at_time): Declared.
342 (pbb_nb_dynamic_scattering_transform): New.
343 (psct_dynamic_dim): New.
345 2009-08-25 Konrad Trifunovic <konrad.trifunovic@gmail.com>
347 * graphite-ppl.c (ppl_max_for_le): Renamed ppl_max_for_le_pointset.
348 * graphite-ppl.h (ppl_max_for_le): Renamed ppl_max_for_le_pointset.
349 * graphite-poly.c (pbb_number_of_iterations): Rename ppl_max_for_le.
350 * graphite-interchange.c (build_linearized_memory_access): Same.
351 (memory_stride_in_loop): Same.
353 2009-08-25 Sebastian Pop <sebastian.pop@amd.com>
355 * graphite-dependences.c (pddr_original_scattering): New.
356 (graphite_legal_transform_dr): Call pddr_original_scattering.
359 * graphite-dependences.h (dot_deps): Declared.
360 * graphite-poly.c (new_poly_dr): Initialize PDR_ID.
361 (print_pdr): Print PDR_ID.
362 * graphite-poly.h (struct poly_dr): Add field id.
365 * graphite-scop-detection.c (dot_all_scops_1): Cleanup comment.
367 2009-08-22 Sebastian Pop <sebastian.pop@amd.com>
369 * graphite-dependences.c (graphite_carried_dependence_level_k): Do
370 not delete the original dependence relation.
372 2009-08-21 Sebastian Pop <sebastian.pop@amd.com>
374 * graphite-dependences.c (graphite_legal_transform_bb): Avoid
375 the computation of symmetric data dependence relations.
376 (dependency_between_pbbs_p): Same.
378 2009-08-21 Sebastian Pop <sebastian.pop@amd.com>
380 * graphite-dependences.c (new_poly_dr_pair): Renamed new_poly_ddr.
381 (eq_poly_dr_pair_p): Renamed eq_poly_ddr_p.
382 (hash_poly_dr_pair_p): Renamed hash_poly_ddr_p.
383 (free_poly_ddr): New.
384 (pddr_is_empty): New.
385 (dependence_polyhedron_1): Now returns a poly_ddr_p.
386 (dependence_polyhedron): Same. Remove useless gcc_assert.
388 (graphite_legal_transform_dr): Call pddr_is_empty and free_poly_ddr.
389 (graphite_carried_dependence_level_k): Call pddr_is_empty.
390 * graphite-dependences.h (enum poly_dependence_kind): New.
391 (poly_dr_pair): Renamed poly_ddr. Added a field kind.
392 (PDRP_SOURCE): Renamed PDDR_SOURCE.
393 (PDRP_SINK): Renamed PDDR_SINK.
394 (PDRP_DDP): Renamed PDDR_DDP.
396 (free_poly_ddr): Declared.
397 * graphite-poly.c (new_scop): Use the new hash function names.
398 * graphite-poly.h (struct scop): Renamed field original_pdr_pairs
400 (SCOP_ORIGINAL_PDR_PAIRS): Renamed SCOP_ORIGINAL_PDDRS.
402 2009-08-21 Sebastian Pop <sebastian.pop@amd.com>
404 * Merge from mainline (150764:150992).
406 2009-08-18 Sebastian Pop <sebastian.pop@amd.com>
408 * cfgloopmanip.c (create_empty_loop_on_edge): Generate upper
409 bounds with LT_EXPR to make niter analysis more precise on code
410 generated by Graphite.
412 2009-08-18 Sebastian Pop <sebastian.pop@amd.com>
414 * graphite-dependences.c (graphite_legal_transform_dr): Fix formatting.
415 (graphite_legal_transform_bb): Same.
416 (poly_drs_may_alias_p): Same.
418 2009-08-15 Sebastian Pop <sebastian.pop@amd.com>
421 * graphite-ppl.c (ppl_max_for_le): Correct the use of
422 ppl_Pointset_Powerset_C_Polyhedron_maximize.
424 2009-08-13 Sebastian Pop <sebastian.pop@amd.com>
426 * graphite-poly.c (print_pbb): Print PBB index.
428 2009-08-13 Sebastian Pop <sebastian.pop@amd.com>
430 * Merge from mainline (r150672:150764).
432 2009-08-13 Sebastian Pop <sebastian.pop@amd.com>
434 * graphite-interchange.c (ppl_max_for_le): Moved...
435 * graphite-poly.c (pbb_number_of_iterations): Call ppl_max_for_le.
436 * graphite-ppl.c (ppl_max_for_le): ... here.
437 * graphite-ppl.h (ppl_max_for_le): Declared.
439 2009-08-12 Sebastian Pop <sebastian.pop@amd.com>
441 * Merge from mainline (r150372:150672).
443 2009-08-11 Sebastian Pop <sebastian.pop@amd.com>
446 * sese.c (convert_for_phi_arg): New.
447 (add_guard_exit_phis): Use convert_for_phi_arg.
449 * testsuite/gfortran.dg/graphite/id-17.f: New.
451 2009-08-11 Sebastian Pop <sebastian.pop@amd.com>
453 * graphite-sese-to-poly.c (pdr_add_data_dimensions): Dont add
454 unknown subscript upper bounds.
456 * testsuite/gcc.dg/graphite/interchange-6.c: Un-XFAIL.
458 2009-08-11 Sebastian Pop <sebastian.pop@amd.com>
459 Pranav Garg <pranav.garg2107@gmail.com>
461 * graphite-interchange.c (gather_access_strides): Removed.
462 (ppl_max_for_le): New.
463 (build_linearized_memory_access): New.
464 (memory_stride_in_loop): New.
465 (pbb_interchange_profitable_p): Reimplemented.
466 * graphite-ppl.h (ppl_new_id_map): New.
467 (ppl_interchange): New.
469 * testsuite/gcc.dg/graphite/interchange-6.c: XFAILed.
471 2009-08-11 Sebastian Pop <sebastian.pop@amd.com>
473 * graphite-interchange.c (compute_subscript): Removed.
474 (compute_array_size_cstr): Removed.
475 (compute_array_size_poly): Removed.
476 (compute_array_size): Removed.
477 (gather_access_strides_poly): Removed.
478 (gather_access_strides): Empty.
480 2009-08-11 Sebastian Pop <sebastian.pop@amd.com>
482 * graphite-dependences.c (dependence_polyhedron_1): Replace
483 pdr_nb_subscripts with PDR_NB_SUBSCRIPTS.
484 (graphite_legal_transform_dr): Same.
485 (graphite_carried_dependence_level_k): Same.
486 * graphite-poly.c (new_poly_dr): Add a parameter nb_subscripts.
487 Initialize PDR_NB_SUBSCRIPTS.
488 (print_pdr_access_layout): Replace pdr_nb_subscripts with
490 * graphite-poly.h (struct poly_dr): Add nb_subscripts field.
491 (PDR_NB_SUBSCRIPTS): New.
492 (pdr_nb_subscripts): Removed.
493 (pdr_dim): Simplified.
494 * graphite-sese-to-poly.c (build_poly_dr): Replace pdr_nb_subscripts
495 with PDR_NB_SUBSCRIPTS.
497 2009-08-11 Sebastian Pop <sebastian.pop@amd.com>
499 * graphite-interchange.c (compute_array_size): Remove use of
501 * graphite-poly.c (new_poly_dr): Remove argument data_container.
502 Do not initialize PDR_DATA_CONTAINER.
503 (print_pdr): Do not print PDR_DATA_CONTAINER.
504 * graphite-poly.h (struct poly_dr): Remove data_container field.
505 (PDR_DATA_CONTAINER): Removed.
506 * graphite-sese-to-poly.c (pdr_add_data_dimensions): Remove use of
508 (build_poly_dr): Same.
510 2009-08-11 Sebastian Pop <sebastian.pop@amd.com>
512 * testsuite/gcc.dg/graphite/interchange-9.c: New.
514 2009-08-05 Konrad Trifunovic <konrad.trifunovic@gmail.com>
515 Sebastian Pop <sebastian.pop@amd.com>
517 * graphite-dependences.c (graphite_legal_transform_dr): Work on a
518 copy of the dependence polyhedron. Free the temporary objects.
519 (graphite_carried_dependence_level_k): Free unused objects before
522 * testsuite/gcc.dg/graphite/interchange-1.c: XFAILed.
523 * testsuite/gcc.dg/graphite/interchange-2.c: XFAILed.
524 * testsuite/gcc.dg/graphite/interchange-3.c: XFAILed.
525 * testsuite/gcc.dg/graphite/interchange-4.c: XFAILed.
526 * testsuite/gcc.dg/graphite/interchange-7.c: XFAILed.
528 2009-08-05 Sebastian Pop <sebastian.pop@amd.com>
530 * graphite-blocking.c (scop_do_strip_mine): Call store_scattering.
531 Early return without analyzing the data dependences if no
532 transform has been done. Call restore_scattering if the transform
534 (graphite-interchange.c): Same.
535 * graphite-poly.c (print_scattering_function): Test for PBB_TRANSFORMED.
536 (graphite_read_transforms): Initialize PBB_TRANSFORMED.
537 (apply_poly_transforms): Do not gcc_assert that
538 the transform is legal.
539 (new_poly_bb): Initialize PBB_TRANSFORMED, PBB_SAVED, and PBB_ORIGINAL.
540 Do not initialize PBB_NB_SCATTERING_TRANSFORM, PBB_NB_LOCAL_VARIABLES,
541 PBB_TRANSFORMED_SCATTERING, and PBB_ORIGINAL_SCATTERING.
542 (free_poly_dr): Free PBB_TRANSFORMED, PBB_SAVED, and PBB_ORIGINAL.
543 * graphite-poly.h (struct poly_scattering): New.
544 (struct poly_bb): Add original, transformed, and saved fields.
545 Remove transformed_scattering, original_scattering, nb_local_variables,
546 and nb_scattering_transform fields.
547 (PBB_ORIGINAL, PBB_TRANSFORMED, PBB_SAVED): New.
548 (poly_scattering_new): New.
549 (poly_scattering_free): New.
550 (poly_scattering_copy): New.
551 (store_scattering_pbb): New.
552 (store_scattering): New.
553 (restore_scattering_pbb): New.
554 (restore_scattering): New.
555 * graphite-sese-to-poly.c (build_pbb_scattering_polyhedrons):
556 Initialize PBB_TRANSFORMED and PBB_ORIGINAL.
558 2009-08-05 Sebastian Pop <sebastian.pop@amd.com>
560 * graphite-poly.c (print_pbb): Add parentheses in the pretty print.
563 2009-08-05 Sebastian Pop <sebastian.pop@amd.com>
565 * Makefile.in (graphite.o): Depends on PREDICT_H.
566 * graphite.c: Include predict.h.
567 (graphite_finalize): Call tree_estimate_probability.
568 * predict.c (predict_loops): Do not call scev_initialize and
570 (tree_estimate_probability_bb): New.
571 (tree_estimate_probability): Do not initialize loops: move that
572 code to the driver. Call tree_estimate_probability_bb.
573 (tree_estimate_probability_driver): New.
574 (pass_profile): Use tree_estimate_probability_driver.
575 * predict.h (tree_estimate_probability): Declared.
577 2009-08-05 Sebastian Pop <sebastian.pop@amd.com>
579 * graphite-clast-to-gimple.c (gloog): Add time to TV_GRAPHITE_CODE_GEN.
580 * graphite-dependences.c (graphite_legal_transform): Add time to
581 TV_GRAPHITE_DATA_DEPS.
582 (dependency_between_pbbs_p): Same.
583 * timevar.def (TV_GRAPHITE_DATA_DEPS, TV_GRAPHITE_CODE_GEN): New.
585 2009-08-03 Sebastian Pop <sebastian.pop@amd.com>
587 * Merge from mainline (r149952:150372).
589 2009-07-28 Sebastian Pop <sebastian.pop@amd.com>
591 * ChangeLog.graphite: Fix indenting, white spaces and 80 columns.
592 * graphite-blocking.c: Same.
593 * graphite-clast-to-gimple.c: Same.
594 * graphite-dependences.c: Same.
595 * graphite-poly.c: Same.
596 * graphite-poly.h: Same.
597 * graphite-ppl.c: Same.
598 * graphite-scop-detection.c: Same.
599 * graphite-sese-to-poly.c: Same.
602 2009-07-28 Sebastian Pop <sebastian.pop@amd.com>
604 * graphite-sese-to-poly.c (loop_entry_phi_arg): New.
605 (remove_simple_copy_phi): New.
606 (remove_invariant_phi): New.
607 (simple_copy_phi_p): New.
608 (reduction_phi_p): New.
609 (gsi_for_ssa_name_def): New.
610 (insert_out_of_ssa_copy): New.
611 (insert_out_of_ssa_copy_on_edge): New.
612 (create_zero_dim_array): New.
613 (scalar_close_phi_node_p): New.
614 (rewrite_close_phi_out_of_ssa): New.
615 (rewrite_phi_out_of_ssa): New.
616 (rewrite_reductions_out_of_ssa): New.
617 (build_poly_scop): Call rewrite_reductions_out_of_ssa.
619 * testsuite/gcc.dg/graphite/id-11.c: New.
620 * testsuite/gcc.dg/graphite/id-15.c: New.
621 * testsuite/gcc.dg/graphite/interchange-1.c: Un-XFAIL.
622 * testsuite/gcc.dg/graphite/interchange-2.c: Un-XFAIL.
623 * testsuite/gcc.dg/graphite/interchange-3.c: Un-XFAIL.
624 * testsuite/gcc.dg/graphite/interchange-4.c: Un-XFAIL.
625 * testsuite/gcc.dg/graphite/interchange-7.c: Un-XFAIL.
626 * testsuite/gcc.dg/graphite/scop-matmult.c: Un-XFAIL.
627 * testsuite/gfortran.dg/graphite/id-13.f: New.
628 * testsuite/gfortran.dg/graphite/id-5.f: New.
630 2009-07-28 Sebastian Pop <sebastian.pop@amd.com>
632 * graphite-clast-to-gimple.c (graphite_loop_normal_form): Do not
633 check that nb_reductions_in_loop is zero.
634 * graphite-scop-detection.c (harmful_stmt_in_bb): Don't filter out
636 (nb_reductions_in_loop): Removed.
637 (graphite_can_represent_loop): Do not call nb_reductions_in_loop.
638 * graphite-sese-to-poly.c (phi_node_is_iv): Removed.
639 (bb_contains_non_iv_scalar_phi_nodes): Removed.
640 (scop_contains_non_iv_scalar_phi_nodes): Removed.
641 (build_poly_scop): Do not call scop_contains_non_iv_scalar_phi_nodes.
643 2009-07-28 Sebastian Pop <sebastian.pop@amd.com>
645 * graphite-clast-to-gimple.c (build_cloog_prog): Do not code generate
646 statements that have an empty iteration domain.
647 * testsuite/gfortran.dg/graphite/id-16.f: New.
649 2009-07-28 Sebastian Pop <sebastian.pop@amd.com>
651 * tree-scalar-evolution.c (instantiate_scev_1): Return
652 chrec_dont_know when the result is not above instantiate_below.
653 * graphite-scop-detection.c (scopdet_basic_block_info): Fix formatting.
654 * graphite-sese-to-poly.c (create_linear_expr_from_tree): Assert that
655 the tree has a known scalar evolution.
656 * testsuite/gfortran.dg/graphite/id-14.f: New.
657 * testsuite/gfortran.dg/graphite/id-15.f: New.
659 2009-07-28 Sebastian Pop <sebastian.pop@amd.com>
661 * sese.c (rename_variables_in_stmt): Pass in an extra parameter
663 (rename_variables): Keep inserting renames after the ones already
666 2009-07-28 Sebastian Pop <sebastian.pop@amd.com>
668 * graphite-sese-to-poly.c (compare_bb_depths): New.
669 (graphite_sort_dominated_info): New.
670 (build_scop_bbs_1): Call graphite_sort_dominated_info.
671 (build_scop_scattering): Fix comment.
673 2009-07-28 Sebastian Pop <sebastian.pop@amd.com>
675 * graphite.c (graphite_finalize): Call print_loops instead of
676 dump_function_to_file.
677 * testsuite/gcc.dg/graphite/graphite.exp: Fix formatting.
678 * testsuite/gcc.dg/graphite/pr35356-1.c: New. Look for the number of
679 loops generated in the graphite output file.
680 * testsuite/gcc.dg/graphite/pr35356-2.c: New.
681 * testsuite/gcc.dg/graphite/pr35356-3.c: New. XFAILed for now.
682 * testsuite/gfortran.dg/graphite/id-12.f: New.
684 2009-07-24 Li Feng <nemokingdom@gmail.com>
686 * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-8.c:
689 2009-07-24 Li Feng <nemokingdom@gmail.com>
690 Tobias Grosser <grosser@fim.uni-passau.de>
692 * graphite-sese-to-poly.c (pdr_add_alias_set): Use data reference's
693 alias set number build alias in ACCESSES polyhedron.
694 (build_alias_set_for_drs): New.
695 (build_pbb_drs): Added build_alias_set_for_drs.
696 * graphite-dependences.c (poly_drs_may_alias_p): New.
697 (graphite_carried_dependence_level_k): Check alias information
698 before building polyhedron.
700 2009-07-24 Tobias Grosser <grosser@fim.uni-passau.de>
702 * Makefile.in (lambda-code.o): Fix formatting.
704 2009-07-24 Tobias Grosser <grosser@fim.uni-passau.de>
706 * Merge from mainline (r149350-149952)
708 2009-07-18 Tobias Grosser <grosser@fim.uni-passau.de>
710 * graphite-poly.c (apply_poly_transforms): Move strip_mine
711 before interchange to prepare for loop blocking.
713 2009-07-18 Tobias Grosser <grosser@fim.uni-passau.de>
715 * graphite-poly.c (apply_poly_transforms): Add checks after every
717 * graphite-sese-to-poly.c (build_poly_scop): Remove check, as already
718 done in apply_poly_transforms.
720 2009-07-17 Konrad Trifunovic <konrad.trifunovic@gmail.com>
722 * graphite-dependences.c (build_lexicographically_gt_constraint):
723 Replace RES parameter with *RES.
724 (dependence_polyhedron_1): Pass an address of the parameter RES
725 instead of value of RES.
727 2009-07-16 Sebastian Pop <sebastian.pop@amd.com>
729 * graphite.c (graphite_finalize): Fix comment.
730 (graphite_transform_loops): Reset scev info after code generation
733 2009-07-16 Sebastian Pop <sebastian.pop@amd.com>
735 * graphite.c (graphite_finalize): Call scev_reset.
737 2009-07-16 Sebastian Pop <sebastian.pop@amd.com>
739 * graphite-clast-to-gimple.c (compute_cloog_iv_types): Do not create
740 GBB_CLOOG_IV_TYPES hash table twice.
741 * graphite-sese-to-poly.c (free_gimple_bb): Call free_data_refs.
742 (add_condition_to_domain): Clear GMP values.
744 2009-07-16 Sebastian Pop <sebastian.pop@amd.com>
746 * graphite-dependences.c: Fix formatting.
747 * graphite-poly.c (free_poly_dr): Also free PDR_DATA_CONTAINER.
748 (pbb_number_of_iterations): Free ppl_Linear_Expression.
749 * graphite-sese-to-poly.c: Fix formatting.
750 * graphite.c (graphite_transform_loops): Create the hash table
751 after the early return.
753 2009-07-16 Sebastian Pop <sebastian.pop@amd.com>
755 * testsuite/gcc.dg/graphite/id-14.c: New.
756 * testsuite/gcc.dg/graphite/pr40157.c: New.
757 * testsuite/gfortran.dg/graphite/id-11.f: New.
759 2009-07-16 Sebastian Pop <sebastian.pop@amd.com>
761 * graphite-sese-to-poly.c (nb_pbbs_in_loops): New.
762 (build_poly_scop): Return false when there are no pbbs within
763 loops to avoid to pass to cloog scops with no loops.
765 2009-07-16 Sebastian Pop <sebastian.pop@amd.com>
767 * graphite-sese-to-poly.c (build_pbb_scattering_polyhedrons): Avoid
768 useless test "i % 2".
769 (build_pbb_scattering_polyhedrons): Fix formatting.
770 (build_poly_dr): Same.
771 * graphite.c (graphite_transform_loops): Restructure.
773 2009-07-14 Razya Ladelsky <razya@il.ibm.com>
775 * tree-ssa-loop-manip.c (rewrite_phi_with_iv): Remove
776 reduction_list parameter.
777 (rewrite_all_phi_nodes_with_iv): Same.
778 (canonicalize_loop_ivs): Same.
779 * tree-parloops.c (struct brli): Removed.
780 (build_reduction_list_info): Removed.
781 (build_new_reduction): New.
782 (analyze_reduction_list): Removed.
783 (gather_scalar_reductions): Find reductions instead of phi
784 nodes that can't be canonicalized.
785 (try_create_reduction_list): Remove reduction_list parameter.
786 (gen_parallel_loop): Same.
787 (parallelize_loops): Remove analyze_reductions variable,
788 initialization and free.
789 Change reduction_list htab initialization to reduction_info
790 elements instead of ssa names.
791 Call try_create_reduction_list and gen_parallel_loop without
792 analyzed_reduction argument.
793 * graphite-clast-to-gimple (graphite_loop_normal_form): Call
794 canonicalize_loop_ivs with one less argument.
795 * tree-flow.h (canonicalize_loop_ivs): Remove one argument.
797 2009-07-14 Konrad Trifunovic <konrad.trifunovic@gmail.com>
799 * graphite-dependences.c (new_poly_dr_pair): New.
800 (dependence_polyhedron): Renamed into dependence_polyhedron_1.
801 (new_poly_dr_pair): New.
802 (eq_poly_dr_pair_p): New.
803 (hash_poly_dr_pair_p): New.
804 * graphite-dependences.h (struct poly_dr_pair): New.
805 (eq_poly_dr_pair_p): Declared.
806 (hash_poly_dr_pair_p): Declared.
807 * graphite-poly.c (new_scop): Initialize SCOP_ORIGINAL_PDR_PAIRS.
808 (free_scop): Free SCOP_ORIGINAL_PDR_PAIRS.
809 * graphite-poly.h (struct scop): Add original_pdr_pairs field.
810 * Makefile.in (graphite-poly.o): Add dependence on
811 graphite-dependences.h.
813 2009-07-14 Sebastian Pop <sebastian.pop@amd.com>
815 * graphite-scop-detection.c (graphite_can_represent_scev): Do not let
816 polynomials of degree > 1 pass to Graphite.
817 * tree-chrec.c (scev_is_linear_expression): Call
818 evolution_function_is_affine_multivariate_p.
819 * testsuite/gfortran.dg/graphite/id-10.f90: New.
821 2009-07-14 Sebastian Pop <sebastian.pop@amd.com>
823 * tree-scalar-evolution.c (compute_overall_effect_of_inner_loop):
824 Instantiate scevs varying in outer loops.
825 * testsuite/gfortran.dg/graphite/id-9.f: Correct testcase.
827 2009-07-14 Sebastian Pop <sebastian.pop@amd.com>
829 * graphite-sese-to-poly.c (build_loop_iteration_domains): Do not insert
830 redundant constraint.
832 2009-07-14 Sebastian Pop <sebastian.pop@amd.com>
834 * testsuite/gcc.dg/graphite/graphite.exp: Fix comments.
835 * testsuite/gfortran.dg/graphite/graphite.exp: Trigger actions
836 based on the file names as in the C testsuite.
837 * testsuite/gfortran.dg/graphite/block-1.f90: Fix patterns.
838 * testsuite/gfortran.dg/graphite/block-2.f: Same.
839 * testsuite/gfortran.dg/graphite/block-3.f90: Same.
840 * testsuite/gfortran.dg/graphite/block-4.f90: Same.
841 * testsuite/gfortran.dg/graphite/id-1.f90: Same.
842 * testsuite/gfortran.dg/graphite/id-2.f90: Same.
843 * testsuite/gfortran.dg/graphite/id-3.f90: Same.
844 * testsuite/gfortran.dg/graphite/id-4.f90: Same.
845 * testsuite/gfortran.dg/graphite/id-6.f: Same.
846 * testsuite/gfortran.dg/graphite/id-9.f: Same.
847 * testsuite/gfortran.dg/graphite/interchange-1.f: Same.
848 * testsuite/gfortran.dg/graphite/interchange-2.f: Same.
849 * testsuite/gfortran.dg/graphite/scop-1.f: Same.
851 2009-07-14 Sebastian Pop <sebastian.pop@amd.com>
853 * sese.c (expand_scalar_variables_call): New.
854 (expand_scalar_variables_ssa_name): Handle calls in expander.
856 2009-07-13 Sebastian Pop <sebastian.pop@amd.com>
858 * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-6.c:
859 Expect to see the pattern twice.
860 * testsuite/gcc.dg/graphite/interchange-0.c: Un-XFAIL.
861 * testsuite/gcc.dg/graphite/interchange-5.c: Same.
862 * testsuite/gcc.dg/graphite/interchange-6.c: Same.
864 2009-07-13 Sebastian Pop <sebastian.pop@amd.com>
866 * testsuite/gcc.dg/graphite/id-10.c: New.
867 * testsuite/gcc.dg/graphite/id-12.c: New.
868 * testsuite/gfortran.dg/graphite/id-7.f: New.
869 * testsuite/gfortran.dg/graphite/id-8.f: New.
871 2009-07-13 Sebastian Pop <sebastian.pop@amd.com>
873 * graphite-sese-to-poly.c (pdr_add_data_dimensions): Fix division by
876 2009-07-13 Sebastian Pop <sebastian.pop@amd.com>
878 * sese.c (rename_variables_in_stmt): Call fold_convert during renaming.
880 2009-07-13 Sebastian Pop <sebastian.pop@amd.com>
882 * sese.c (expand_scalar_variables_stmt): Avoid unnecessary expansion.
884 2009-07-10 Sebastian Pop <sebastian.pop@amd.com>
886 * graphite-sese-to-poly.c (pdr_add_memory_accesses): Fix order of
887 building PDR subscripts.
889 2009-07-10 Sebastian Pop <sebastian.pop@amd.com>
891 * graphite-sese-to-poly.c (pdr_add_data_dimensions): Fix the
892 computation of array sizes.
894 2009-07-10 Sebastian Pop <sebastian.pop@amd.com>
896 * graphite-sese-to-poly.c (add_param_constraints): Disabled.
898 2009-07-10 Tobias Grosser <grosser@fim.uni-passau.de>
900 * graphite-dependences.c (map_into_dep_poly, map_dr_into_dep_poly,
901 build_pairwise_constraint, dr_equality_constraints,
902 build_pairwise_scheduling_equality,
903 build_pairwise_scheduling_inequality, lexicographically_gt_p,
904 build_lexicographically_gt_constraint, dependence_polyhedron,
905 graphite_legal_transform_dr, graphite_carried_dependence_level_k):
906 Move from NNC_Polyhedron to C_Polyhedron.
907 * graphite-interchange.c (compute_array_size_poly,
908 gather_access_strides): Dito.
909 * graphite-poly.c (apply_poly_transforms, new_poly_dr, free_poly_bb,
910 free_scop, pbb_number_of_iterations): Dito.
911 * graphite-poly.h (struct poly_dr, pdr_nb_subscripts, struct poly_bb,
912 pbb_dim_iter_domain, struct scop): Dito.
913 * graphite-ppl.c (new_Constraint_System_from_Cloog_Matrix,
914 new_Cloog_Domain_from_ppl_Polyhedron,
915 new_Cloog_Domain_from_ppl_Pointset_Powerset, ppl_set_coef_gmp,
916 ppl_insert_dimensions_pointset, ppl_insert_dimensions_pointset,
917 ppl_strip_loop, ppl_strip_loop, ppl_print_polyhedron_matrix,
918 ppl_print_powerset_matrix, debug_ppl_polyhedron_matrix,
919 debug_ppl_powerset_matrix, ppl_read_polyhedron_matrix): Dito.
920 * graphite-ppl.h (ppl_Pointset_Powerset_C_Polyhedron_t,
921 new_C_Polyhedron_from_Cloog_Matrix, ppl_print_powerset_matrix,
922 debug_ppl_powerset_matrix, ppl_insert_dimensions_pointset): Dito.
923 * graphite-sese-to-poly.c (build_pbb_scattering_polyhedrons,
924 build_loop_iteration_domains, ppl_constraint_type_from_tree_code,
925 add_condition_to_domain, add_condition_to_pbb, build_scop_context,
926 build_scop_iteration_domain, build_poly_dr): Dito
928 2009-07-09 Sebastian Pop <sebastian.pop@amd.com>
930 * testsuite/gcc.dg/graphite/graphite.exp: Added a rule to execute
932 * testsuite/gcc.dg/graphite/run-id-1.c: New.
934 2009-07-09 Sebastian Pop <sebastian.pop@amd.com>
936 * graphite-sese-to-poly.c (build_loop_iteration_domains): Add the
937 positivity constraint on the symbolic number of iterations.
939 2009-07-09 Sebastian Pop <sebastian.pop@amd.com>
941 * graphite-sese-to-poly.c (build_loop_iteration_domains): Rewrite.
943 2009-07-09 Sebastian Pop <sebastian.pop@amd.com>
944 Tobias Grosser <grosser@fim.uni-passau.de>
946 * graphite-clast-to-gimple.c (build_scop_context): Removed.
947 (build_cloog_prog): Directly use SCOP_CONTEXT.
948 * graphite-poly.c (new_scop): Initialize SCOP_CONTEXT.
949 (free_scop): Free SCOP_CONTEXT.
950 (print_scop_context): New.
951 (print_scop): Call print_scop_context.
952 (debug_scop_context): New.
953 * graphite-poly.h (print_scop_context, debug_scop_context): Declared.
954 (struct scop): Added field context.
956 * graphite-sese-to-poly.c (add_param_constraints): New.
957 (build_scop_context): New.
958 (build_poly_scop): Call build_scop_context.
960 2009-07-09 Sebastian Pop <sebastian.pop@amd.com>
962 * graphite-clast-to-gimple.c (gmp_cst_to_tree): Moved...
963 * graphite-ppl.c (ppl_set_inhomogeneous_gmp, ppl_set_coef_gmp): New.
964 (ppl_set_inhomogeneous, ppl_set_coef): Moved...
965 * graphite-ppl.h: Include double-int.h and tree.h.
966 (ppl_set_inhomogeneous_gmp, ppl_set_coef_gmp): Declared.
967 (ppl_set_inhomogeneous, ppl_set_coef): ...here.
968 (gmp_cst_to_tree): ...here. Reimplemented using mpz_get_double_int.
969 (tree_int_to_gmp, ppl_set_inhomogeneous_tree, ppl_set_coef_tree): New.
971 2009-07-09 Sebastian Pop <sebastian.pop@amd.com>
973 * graphite-clast-to-gimple.c (clast_to_gcc_expression_red): Generate
974 POINTER_PLUS_EXPR for pointer types.
975 (clast_to_gcc_expression): Same.
977 2009-07-09 Sebastian Pop <sebastian.pop@amd.com>
979 * graphite-poly.c (print_scattering_function): Early return when
980 PBB_TRANSFORMED_SCATTERING is not initialized.
981 (print_pbb_domain): Early return when PBB_DOMAIN is not initialized.
983 2009-07-08 Sebastian Pop <sebastian.pop@amd.com>
985 * tree-parloops.c (analyze_reduction_list): Remove unused variable
988 2009-07-08 Razya Ladelsky <razya@il.ibm.com>
990 * tree-parloops.c (analyze_reduction_list): Change return
992 (try_create_reduction_list): Move the call to
993 analyze_reduction_list to the beginining.
994 Call reduction_phi with analyzed_reductions as argument
995 instead of reduction_list.
997 2009-07-08 Tobias Grosser <grosser@fim.uni-passau.de>
999 * Merge from mainline (r148296:149346)
1001 2009-07-07 Sebastian Pop <sebastian.pop@amd.com>
1003 * graphite-scop-detection.c (graphite_can_represent_init): New.
1004 (graphite_can_represent_scev): Call graphite_can_represent_init:
1005 check that the initial value does not contain multiplications of
1007 (stmt_has_simple_data_refs_p): New.
1008 (stmt_simple_for_scop_p): Call stmt_simple_for_scop_p.
1009 (is_simple_operand): Fix formatting.
1010 * graphite-sese-to-poly.c (try_generate_gimple_bb): Fix formatting.
1012 2009-07-07 Sebastian Pop <sebastian.pop@amd.com>
1014 * testsuite/gcc.dg/graphite/id-13.c: New.
1015 * graphite-sese-to-poly.c (graphite_stmt_p): Do not call
1016 analyze_scalar_evolution, use scalar_evolution_in_region.
1017 (scan_tree_for_params_right_scev): Add extra assert.
1018 (parameter_index_in_region_1): Split from parameter_index_in_region.
1019 (idx_record_params): Use scalar_evolution_in_region.
1020 (find_params_in_bb): Same.
1021 (find_scop_parameters): Same.
1022 (build_loop_iteration_domains): Same.
1023 (create_linear_expr_from_tree): Same.
1024 * sese.c (scalar_evolution_in_region): New.
1025 * sese.h (scalar_evolution_in_region): Declared.
1026 (defined_in_sese_p): New.
1027 * tree-scalar-evolution.c (compute_overall_effect_of_inner_loop): Not
1029 * tree-scalar-evolution.h (compute_overall_effect_of_inner_loop):
1032 2009-07-07 Sebastian Pop <sebastian.pop@amd.com>
1034 * Makefile.in: Replace dependences on tree-chrec.h with SCEV_H.
1035 TREE_DATA_REF_H also implies SCEV_H.
1037 2009-07-07 Sebastian Pop <sebastian.pop@amd.com>
1039 * graphite-poly.c (print_scop_params): New.
1040 (print_scop): Call print_scop_params.
1041 (debug_scop_params): New.
1042 * graphite-poly.h (print_scop_params, debug_scop_params): Declared.
1044 2009-07-07 Li Feng <nemokingdom@gmail.com>
1046 * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-4.c: New.
1047 * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-5.c: New.
1048 * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-6.c: New.
1049 * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-7.c: New.
1050 * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-8.c: New.
1051 * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-9.c: New.
1053 2009-07-07 Li Feng <nemokingdom@gmail.com>
1055 * graphite-clast-to-gimple.c (mark_loops_parallel): Dump information
1056 for dependency checking part.
1057 * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-1.c: Add
1058 tests for dependency checking.
1059 * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-2.c: Ditto.
1060 * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-3.c: Ditto.
1061 * testsuite/gcc.dg/graphite/graphite_autopar/graphite_autopar.exp: Add
1062 flag -fdump-tree-graphite-all for autopar testsuites.
1064 2009-07-06 Sebastian Pop <sebastian.pop@amd.com>
1066 * Makefile.in (tree-ssa-loop-manip.o): Depends on langhooks.h.
1067 * tree-parloops.c (rewrite_phi_with_iv, rewrite_all_phi_nodes_with_iv,
1068 canonicalize_loop_ivs): Moved...
1069 * tree-ssa-loop-manip.c: ... here. Include langhooks.h.
1071 2009-07-06 Sebastian Pop <sebastian.pop@amd.com>
1073 * tree-parloops.c (try_create_reduction_list): Pass an extra
1074 argument analyzed_reductions. Call analyze_reduction_list.
1075 (gen_parallel_loop): Do not call analyze_reduction_list.
1076 (parallelize_loops): Init and finalize analyzed_reductions.
1078 2009-07-06 Li Feng <nemokingdom@gmail.com>
1080 * testsuite/gcc.dg/graphite/graphite_autopar/graphite_autopar.exp:
1081 Added flag -fno-loop-strip-mine for autopar testcase.
1083 2009-07-04 Li Feng <nemokingdom@gmail.com>
1085 * graphite-dependences.c (graphite_carried_dependence_level_k): Use
1086 transformed scattering dimension instead of unmatch orignal when
1087 calling dependence_polyhedron.
1089 2009-06-30 Sebastian Pop <sebastian.pop@amd.com>
1091 * opts.c (decode_options): Enable flag_loop_strip_mine at -O2.
1093 2009-06-30 Sebastian Pop <sebastian.pop@amd.com>
1095 * graphite-poly.c (pbb_number_of_iterations): Check for returned
1096 value 1 from ppl_Pointset_Powerset_NNC_Polyhedron_maximize.
1098 2009-06-30 Sebastian Pop <sebastian.pop@amd.com>
1100 * graphite-blocking.c (pbb_strip_mine_profitable_p): New.
1101 (pbb_do_strip_mine): Call pbb_strip_mine_profitable_p.
1102 * graphite-poly.c (pbb_number_of_iterations): New.
1103 * graphite-poly.h (pbb_number_of_iterations): Declared.
1104 (pbb_iterator_dim, pbb_parameter_dim): New.
1106 2009-06-29 Sebastian Pop <sebastian.pop@amd.com>
1108 * graphite-clast-to-gimple.c (graphite_create_new_loop): Revert the
1109 last commit on type of lower and upper bound of loops.
1111 2009-06-29 Li Feng <nemokingdom@gmail.com>
1113 * Makefile.in (graphite-clast-to-gimple.o): Added dependence on
1114 graphite-dependences.h.
1115 * graphite-clast-to-gimple.c (new_bb_pbb_def): New.
1116 (mark_bb_with_pbb): New.
1117 (get_stmtfor_depth): New.
1118 (find_pbb_via_hash): New.
1119 (dependency_in_loop_p): New.
1120 (mark_loops_parallel): New.
1121 (free_aux_in_new_loops): New.
1122 (translate_clast): Add parameter BB_PBB_MAPPING. Mark newly created
1123 bb with it's relevant pbb. Mark newly created loops. Remove mark
1124 innermost loop parallel without checking.
1125 (gloog): Add parameter BB_PBB_MAPPING.
1126 * graphite-clast-to-gimple.h (struct bb_pbb_def): New.
1127 (gloog): Change declaration.
1128 (mark_loop_parallel): Make extern.
1129 (free_aux_in_new_loops): Declare.
1130 (bb_pbb_map_hash): New.
1131 (eq_bb_pbb_map): New.
1132 * graphite.c (graphite_transform_loops): Added BB_PBB_MAPPING. Trigger
1133 auto parallelization when flag_graphite_force_parallel is set.
1134 (graphite_finalize): Added free_aux_in_new_loops.
1135 * tree-parloops.c (parallelize_loops): Only generate parallel code for
1136 the innermost loop that marked parallel. Use
1137 flag_graphite_force_parallel instead of loop->can_be_parallel.
1138 (loop_parallel_p): Move inner most checking out of function.
1140 2009-06-26 Sebastian Pop <sebastian.pop@amd.com>
1142 * graphite-clast-to-gimple.c (graphite_create_new_loop): Make the
1143 type of lower and upper bound of loops signed long int.
1145 2009-06-26 Sebastian Pop <sebastian.pop@amd.com>
1147 * cfgloopmanip.c (create_empty_loop_on_edge): Gimplify the loop exit
1148 expression outside the loop.
1150 2009-06-26 Sebastian Pop <sebastian.pop@amd.com>
1152 * gcc.dg/graphite/interchange-8.c: New.
1154 2009-06-26 Sebastian Pop <sebastian.pop@amd.com>
1156 * gcc.dg/graphite/interchange-0.c: XFailed.
1157 * gcc.dg/graphite/interchange-5.c: XFailed.
1158 * gcc.dg/graphite/interchange-6.c: XFailed.
1160 2009-06-26 Sebastian Pop <sebastian.pop@amd.com>
1162 * graphite-interchange.c (compute_array_size_poly): The end of the
1163 recursion should return 1.
1165 2009-06-26 Sebastian Pop <sebastian.pop@amd.com>
1167 * graphite-interchange.c (compute_array_size_cstr): Allow the
1168 subscript multiplier to be -1.
1169 (compute_array_size): Use PDR_DATA_CONTAINER and not PDR_ACCESSES.
1170 * graphite-poly.c (new_poly_dr): Takes an extra argument for the
1171 data_container. Initializes PDR_DATA_CONTAINER.
1172 (print_pdr_access_layout): New.
1173 (print_pdr): Call print_pdr_access_layout. Print PDR_DATA_CONTAINER.
1174 * graphite-poly.h (struct poly_dr): Adjust comment. Add a new field
1176 (PDR_DATA_CONTAINER): New.
1177 (new_poly_dr): Update declaration.
1178 * graphite-sese-to-poly.c (pdr_add_data_dimensions): New.
1179 (build_poly_dr): Call pdr_add_data_dimensions.
1181 2009-06-26 Sebastian Pop <sebastian.pop@amd.com>
1183 * graphite-poly.h (struct poly_dr): Fix comment.
1184 * graphite-sese-to-poly.c (pdr_add_alias_set): New.
1185 (pdr_add_memory_accesses): New.
1186 (build_poly_dr): Call pdr_add_memory_accesses and pdr_add_alias_set.
1188 2009-06-26 Sebastian Pop <sebastian.pop@amd.com>
1190 * graphite-poly.c (print_pdrs, debug_pdrs): New.
1191 (print_pbb): Add call to print_pdrs.
1192 * graphite-poly.h (print_pdrs, debug_pdrs): Declared.
1194 2009-06-24 Konrad Trifunovic <konrad.trifunovic@gmail.com>
1195 Li Feng <nemokingdom@gmail.com>
1197 * graphite-dependences.c (graphite_carried_dependence_level_k): New.
1198 (dependency_between_pbbs_p): New.
1199 (lexicographically_gt_p): Assure !empty_p before polyhedron
1200 intersection assign.
1201 (build_lexicographically_gt_constraint): Correct lexicographically
1203 * graphite-dependences.h: New.
1204 * Makefile.in (graphite-dependences.o): Add graphite-dependences.h.
1206 2009-06-24 Sebastian Pop <sebastian.pop@amd.com>
1208 * graphite-clast-to-gimple.c (print_clast_stmt): New.
1209 (gloog): Print to dump_file the generated clast.
1210 * graphite-clast-to-gimple.h (print_clast_stmt): Declared.
1211 * graphite-interchange.c (pbb_do_interchange): Fix dump formatting.
1213 2009-06-24 Sebastian Pop <sebastian.pop@amd.com>
1215 * graphite-poly.c (extend_scattering): Increment
1216 PBB_NB_LOCAL_VARIABLES by the number of added dimensions.
1218 2009-06-24 Sebastian Pop <sebastian.pop@amd.com>
1220 * graphite-interchange.c (compute_array_size_poly): Added exit of
1221 recursion condition. Continue iterating even after the first equality.
1222 (compute_array_size): Same.
1224 2009-06-24 Li Feng <nemokingdom@gmail.com>
1226 * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-1.c: Update
1227 -fdump-tree-final_cleanup to -fdump-tree-optimized.
1228 * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-2.c: Ditto.
1229 * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-3.c: Ditto.
1230 * testsuite/gcc.dg/graphite/graphite_autopar/graphite_autopar.exp: Ditto.
1232 2009-06-23 Sebastian Pop <sebastian.pop@amd.com>
1234 * sese.c (expand_scalar_variables_stmt): Expand scalar variables
1235 only when the use verifies is_gimple_reg.
1237 2009-06-23 Sebastian Pop <sebastian.pop@amd.com>
1239 * graphite-clast-to-gimple.c (build_cloog_prog): Fix memory corruption.
1240 Allocate scaldims after call to unify_scattering_dimensions.
1242 2009-06-23 Sebastian Pop <sebastian.pop@amd.com>
1244 * graphite-clast-to-gimple.c (translate_clast): Fix memory leak.
1246 2009-06-23 Sebastian Pop <sebastian.pop@amd.com>
1247 Albert Cohen <albert.cohen@inria.fr>
1249 * graphite-blocking.c (pbb_strip_mine_loop_depth): Do not use local
1250 variables for the strip mining.
1252 2009-06-23 Sebastian Pop <sebastian.pop@amd.com>
1253 Pranav Garg <pranav.garg2107@gmail.com>
1255 * Makefile.in (OBJS-common): Added graphite-blocking.o.
1256 (graphite-sese-to-poly.o): Moved down to be in lexicographical order.
1257 (graphite-blocking.o): New rule.
1258 (graphite-poly.o, graphite-ppl.o): Moved to be in lexicographical order.
1259 * graphite-blocking.c: New.
1260 * graphite-poly.c (apply_poly_transforms): Call scop_do_strip_mine for
1261 flag_loop_strip_mine.
1262 (psct_scattering_dim_for_loop_depth): New.
1263 * graphite-poly.h (scop_do_strip_mine): Declared.
1264 (psct_add_local_variable): Increment PBB_NB_LOCAL_VARIABLES.
1265 * tree-ssa-loop.c (gate_graphite_transforms): Do not fail when using
1266 flag_loop_strip_mine.
1268 2009-06-23 Sebastian Pop <sebastian.pop@amd.com>
1270 * graphite-poly.c (extend_scattering): Avoid initializing and freeing
1271 a GMP value and a PPL coefficient at each iteration of a loop.
1273 2009-06-23 Sebastian Pop <sebastian.pop@amd.com>
1275 * graphite-dependences.c (dependence_polyhedron): Do not use
1276 pbb_nb_scattering_dims anymore. Use pbb_nb_scattering_orig and
1277 pbb_nb_scattering_transform.
1278 (graphite_legal_transform_dr): Same.
1279 * graphite-poly.c (extend_scattering): Same.
1280 (unify_scattering_dimensions): Same.
1281 (print_scattering_function): Same.
1282 (new_poly_bb): Initialize PBB_NB_SCATTERING_TRANSFORM and
1283 PBB_NB_LOCAL_VARIABLES.
1284 * graphite-poly.h (pbb_nb_scattering): Removed declaration.
1285 (struct poly_bb): Added nb_local_variables and nb_scattering_transform.
1286 (PBB_NB_LOCAL_VARIABLES, PBB_NB_SCATTERING_TRANSFORM): New.
1287 (pbb_nb_scattering_orig, pbb_nb_scattering_transform): New.
1288 (pbb_nb_scattering_dims, pbb_nb_scattering): Removed.
1289 (pbb_nb_scattering_transform): New.
1290 (pbb_nb_local_vars): Return PBB_NB_LOCAL_VARIABLES.
1291 (psco_scattering_dim): Add assert on parameters.
1292 (psct_scattering_dim): Same.
1293 (psct_scattering_dim_for_loop_depth): Declared.
1294 (psct_local_var_dim): New.
1295 (psco_iterator_dim, psco_parameter_dim): Add assert on parameters.
1296 (psct_iterator_dim, psct_parameter_dim): Same. To maintain the
1297 correct layout, call pbb_nb_local_vars.
1298 (psct_add_local_variable, psct_add_scattering_dimension): New.
1299 * graphite-sese-to-poly.c (build_pbb_scattering_polyhedrons):
1300 Initialize PBB_NB_SCATTERING_TRANSFORM.
1302 2009-06-23 Sebastian Pop <sebastian.pop@amd.com>
1304 * graphite-ppl.c (set_inhomogeneous): Renamed ppl_set_inhomogeneous.
1305 (set_coef): Renamed ppl_set_coef.
1306 * graphite-ppl.h (ppl_set_inhomogeneous, ppl_set_coef): Declared.
1308 2009-06-23 Sebastian Pop <sebastian.pop@amd.com>
1310 * graphite-dependences.c (build_pairwise_scheduling_inequality): Don't
1311 test a boolean against 1.
1312 * graphite-interchange.c (pbb_interchange_loop_depths): Do not build
1313 a new polyhedron for the PBB_TRANSFORMED_SCATTERING.
1314 (pbb_do_interchange): Returns true when a transform has been performed.
1315 (scop_do_interchange): Same.
1316 * graphite-poly.c (apply_poly_transforms): Use the return value of
1317 scop_do_interchange.
1318 * graphite-poly.h (scop_do_interchange): Update declaration.
1320 2009-06-23 Tobias Grosser <grosser@fim.uni-passau.de>
1322 * graphite-clast-to-gimple.c (gloog): Reset loop->aux right
1324 * sese.c (sese_reset_aux_in_loops): New.
1325 * sese.h (sese_reset_aux_in_loops): New.
1327 2009-06-19 Sebastian Pop <sebastian.pop@amd.com>
1329 * graphite-sese-to-poly.c (scan_tree_for_params_int): Pass in the
1330 multiplier and multiply the constant by the multiplier.
1331 (scan_tree_for_params): Bound the multiplier to its MULT_EXPR.
1332 (build_poly_dr): Do not use the multiplier to define the subscript.
1334 2009-06-19 Sebastian Pop <sebastian.pop@amd.com>
1336 * graphite-poly.c (new_poly_dr): Pass an extra argument for the
1337 compiler's data reference. Initialize PDR_CDR.
1338 (print_pdr): Call dump_data_reference.
1339 * graphite-poly.h (struct poly_dr): Rename black_box into pbb.
1340 Add compiler_dr field.
1341 (PDR_BB): Renamed PDR_PBB.
1343 * graphite-sese-to-poly.c (build_poly_dr): Pass to new_poly_dr
1344 GCC's data reference representation.
1345 * tree-data-ref.c (debug_data_references, debug_data_reference): New.
1346 * tree-data-ref.h (debug_data_references, debug_data_reference): Decl.
1348 2009-06-19 Sebastian Pop <sebastian.pop@amd.com>
1350 * graphite-poly.c (print_scattering_function): Also print the layout.
1351 * graphite-poly.h (pbb_nb_local_vars): New.
1353 2009-06-19 Sebastian Pop <sebastian.pop@amd.com>
1355 * graphite-poly.c (print_pbb_domain): Also print the layout names.
1357 2009-06-19 Sebastian Pop <sebastian.pop@amd.com>
1359 * graphite-poly.c (print_pdr, debug_pdr): New.
1360 * graphite-poly.h (print_pdr, debug_pdr): Declared.
1361 (PDR_BASE): Removed.
1363 2009-06-18 Sebastian Pop <sebastian.pop@amd.com>
1365 * gcc/testsuite/gcc.dg/graphite/interchange-{1..7}.c: New avatars of
1368 2009-06-18 Sebastian Pop <sebastian.pop@amd.com>
1370 * graphite-interchange.c (compute_subscript): Allow also -1 in the
1371 subscript identification column.
1372 (pbb_do_interchange): Print to dump_file that some loops "will be
1373 interchanged". Rely on that chain of characters in the testcases.
1374 * gcc.dg/graphite/interchange-0.c: New.
1375 * gcc.dg/graphite/graphite.exp: Iterate over the testsuite
1376 interchange-*.c files and compile them with -floop-interchange.
1378 2009-06-18 Pranav Garg <pranav.garg2107@gmail.com>
1380 * graphite-interchange.c (interchange_profitable_p): Renamed
1381 pbb_interchange_profitable_p.
1383 2009-06-18 Sebastian Pop <sebastian.pop@amd.com>
1384 Harsha Jagasia <harsha.jagasia@amd.com>
1385 Pranav Garg <pranav.garg2107@gmail.com>
1387 * graphite-interchange.c (interchange_profitable_p): Make static.
1388 (pbb_interchange_loop_depths, pbb_do_interchange,
1389 scop_do_interchange): New.
1390 * graphite-poly.c (apply_poly_transforms): Call scop_do_interchange
1391 for flag_loop_interchange.
1392 * graphite-poly.h (scop_do_interchange): Declared.
1393 * tree-ssa-loop.c (gate_graphite_transforms): Do not fail when
1394 flag_loop_interchange is used.
1396 2009-06-18 Sebastian Pop <sebastian.pop@amd.com>
1398 * graphite-dependences.c (dependence_polyhedron): Update use of
1399 pbb_nb_scattering_dims.
1400 * graphite-poly.h (pbb_nb_scattering_dims): Do not pass SCOP.
1401 (pbb_nb_scattering): Update use of pbb_nb_scattering_dims.
1402 (psco_scattering_dim, psct_scattering_dim, psco_iterator_dim,
1403 psct_iterator_dim, psco_parameter_dim, psct_parameter_dim): New.
1405 2009-06-16 Sebastian Pop <sebastian.pop@amd.com>
1407 * graphite.c: Cleanup foo.
1409 2009-06-16 Sebastian Pop <sebastian.pop@amd.com>
1411 * Merge from mainline (r143684:148293).
1412 * Disabled libpcp until it gets fixed.
1414 2009-06-05 Sebastian Pop <sebastian.pop@amd.com>
1415 Harsha Jagasia <harsha.jagasia@amd.com>
1417 * graphite-interchange.c: New.
1418 * Makefile.in (graphite-interchange.o): New.
1419 * graphite-poly.h (interchange_profitable_p): Declared.
1420 * graphite-ppl.h (value_max): New.
1422 2009-06-04 Sebastian Pop <sebastian.pop@amd.com>
1424 * graphite-dependences.c (dependence_polyhedron): Use pdr_dim.
1425 * graphite-poly.h: Fix some comments.
1429 2009-06-04 Sebastian Pop <sebastian.pop@amd.com>
1432 (pdr_accessp_nb_subscripts): Renamed pdr_nb_subscripts.
1433 (pdr_accessp_nb_iterators): Renamed pdr_dim_iter_domain.
1434 (pdr_accessp_nb_params): Renamed pdr_nb_params.
1435 (pdr_accessp_alias_set_dim): Renamed pdr_alias_set_dim.
1436 (pdr_accessp_subscript_dim): Renamed pdr_subscript_dim.
1437 (pdr_accessp_iterator_dim): Renamed pdr_iterator_dim.
1438 (pdr_accessp_param_dim): Renamed pdr_parameter_dim.
1439 (pbb_nb_loops): Renamed pbb_dim_iter_domain.
1440 * graphite-clast-to-gimple.c: Same.
1441 * graphite-dependences.c: Same.
1442 * graphite-poly.c: Same.
1443 * graphite-sese-to-poly.c: Same.
1445 2009-06-03 Sebastian Pop <sebastian.pop@amd.com>
1447 * graphite-clast-to-gimple.c (build_iv_mapping): Insert full
1448 expressions for an IV rename, as returned by clast_to_gcc_expression.
1449 (copy_renames): Rename new_name to expr.
1450 * sese.c (debug_rename_elt): Same.
1453 (sese_adjust_liveout_phis): Call force_gimple_operand before using
1454 the information from the rename map.
1455 (rename_variables_in_stmt): Same.
1456 (add_loop_exit_phis): Rename new_name to expr.
1457 (insert_loop_close_phis): Same.
1458 (add_guard_exit_phis): Same. Call force_gimple_operand.
1459 * sese.h (struct rename_map_elt): Rename new_name to expr.
1460 (new_rename_map_elt): Same.
1462 2009-06-03 Sebastian Pop <sebastian.pop@amd.com>
1464 * graphite-clast-to-gimple.c (build_iv_mapping): Use set_rename.
1465 * sese.c (set_rename): Make it extern.
1466 * sese.h (set_rename): Declared.
1468 2009-06-03 Sebastian Pop <sebastian.pop@amd.com>
1470 * graphite-poly.c (extend_scattering): Free values.
1471 * graphite-ppl.c (new_Cloog_Domain_from_ppl_Pointset_Powerset):
1473 (ppl_print_powerset_matrix): Same.
1474 * graphite-scop-detection.c (free_scops_1): New.
1475 (limit_scops): Call free_scops_1.
1476 * graphite-sese-to-poly.c (build_scop_bbs_1): Free dom.
1477 (build_poly_dr): Free PPL coefficients.
1478 * tree-parloops.c (rewrite_all_phi_nodes_with_iv): Free bbs.
1480 2009-06-02 Sebastian Pop <sebastian.pop@amd.com>
1482 * graphite-dependences.c: New.
1483 * graphite-data-ref.c: Removed.
1484 * graphite-data-ref.h: Removed.
1485 * Makefile.in (graphite-data-ref.o): Removed.
1486 (graphite-dependences.o): Added.
1487 * graphite-clast-to-gimple.c: Remove dependence on graphite-data-ref.h.
1488 * graphite-poly.c: Same.
1489 Move the data dependence testing to graphite-dependences.c.
1491 2009-05-19 Tobias Grosser <grosser@fim.uni-passau.de>
1493 * graphite-scop-detection.c (graphite_can_represent_loop): Renamed
1494 from graphite_cannot_represent_loop. Code refactored.
1495 (scopdet_basic_block_info): Call graphite_can_represent_loop.
1497 2009-05-17 Li Feng <nemokingdom@gmail.com>
1499 * testsuite/gcc.dg/graphite/graphite_autopar/graphite_autopar.exp:
1500 Cover all the testcases (not only the filtered ones).
1502 2009-05-17 Tobias Grosser <grosser@fim.uni-passau.de>
1504 * graphite-scop-detection.c (stmt_simple_for_scop_p): Remove
1505 unnecessary check. Update comments. Move check for REAL_TYPE here.
1506 (harmful_stmt_in_bb): Remove checks for conditions. This is already
1507 done in (stmt_simple_for_scop_p).
1509 2009-05-14 Tobias Grosser <grosser@fim.uni-passau.de>
1511 * graphite.c (print_global_statistics): New.
1512 (print_graphite_scop_statistic): New.
1513 (print_graphite_statistics): New.
1514 (graphite_initialize, graphite_transform_loops): Print statistics.
1515 * graphite-scop-detection (build_scops): Print statistics.
1516 (print_graphite_scop_statistics): New.
1517 (print_graphite_statistics): New.
1519 2009-05-13 Sebastian Pop <sebastian.pop@amd.com>
1521 * graphite-clast-to-gimple.c (struct clast_name_index): Removed.
1522 (debug_clast_name_index): Removed.
1523 (debug_clast_name_indexes_1): Removed.
1524 (debug_clast_name_indexes): Removed.
1525 (clast_name_index_elt_info): Removed.
1526 (eq_clast_name_indexes): Removed.
1527 (clast_name_to_index): Removed.
1528 (new_clast_name_index): Removed.
1529 (save_clast_name_index): Removed.
1530 (save_var_name): Moved...
1531 (init_sese_params_index): Removed.
1532 (clast_name_to_gcc): Remove use of name_tree.
1533 (initialize_cloog_names): Same.
1534 (gloog): Do not call init_sese_params_index.
1535 * graphite-sese-to-poly.c (save_var_name): ...here.
1536 (parameter_index_in_region): New.
1537 * sese.c (new_sese): Initialize SESE_PARAMS_NAMES.
1538 (parameter_index_in_region): Removed.
1539 (is_parameter): Remove use of name_tree.
1540 * sese.h (struct name_tree): Removed.
1541 (struct sese): Remove use of name_tree. New field params_names.
1542 (SESE_PARAMS_NAMES): New.
1543 (SESE_PARAMS): Remove duplicate.
1544 (parameter_index_in_region): Removed.
1545 (sese_nb_params): Remove use of name_tree.
1546 (struct clast_name_index): New.
1547 (new_clast_name_index): New.
1548 (clast_name_to_index): New.
1549 (save_clast_name_index): New.
1550 (debug_clast_name_index): New.
1551 (debug_clast_name_indexes_1): New.
1552 (debug_clast_name_indexes): New.
1553 (clast_name_index_elt_info): New.
1554 (eq_clast_name_indexes): New.
1556 2009-05-13 Sebastian Pop <sebastian.pop@amd.com>
1558 * graphite-clast-to-gimple.c (compute_cloog_iv_types_1): Call
1559 pbb_to_depth_to_oldiv. Remove call to oldiv_for_loop.
1560 (graphite_loop_normal_form): Do not pass region. Do not
1561 initialize SESE_OLDIVS.
1562 (build_graphite_loop_normal_form): Update call to
1563 graphite_loop_normal_form.
1564 * sese.c (debug_oldivs): Removed.
1565 (new_sese): Do not initialize SESE_OLDIVS.
1566 (free_sese): Do not free SESE_OLDIVS.
1567 (oldiv_for_loop): Removed.
1568 * sese.h (struct sese): Remove old_ivs.
1569 (SESE_OLDIVS): Removed.
1570 (oldiv_for_loop): Removed.
1572 2009-05-13 Sebastian Pop <sebastian.pop@amd.com>
1574 * graphite-clast-to-gimple.c (clast_name_to_gcc): Pass newivs,
1575 remove ivstack. Remove call to loop_iv_stack_get_iv_from_name,
1576 replaced by a call to newivs_to_depth_to_newiv.
1577 (clast_to_gcc_expression): Pass newivs, remove ivstack.
1578 (clast_to_gcc_expression_red): Same.
1579 (gcc_type_for_clast_expr): Same.
1580 (gcc_type_for_clast_eq): Same.
1581 (graphite_translate_clast_equation): Same.
1582 (graphite_create_guard_cond_expr): Same.
1583 (graphite_create_new_guard): Same.
1584 (graphite_create_new_loop): Same.
1585 (build_iv_mapping): Same.
1586 (translate_clast): Same.
1588 (loop_iv_stack_patch_for_consts): Removed. *
1589 sese.c (iv_stack_entry_is_constant): Removed.
1590 (iv_stack_entry_is_iv): Removed.
1591 (loop_iv_stack_push_iv): Removed.
1592 (loop_iv_stack_insert_constant): Removed.
1593 (loop_iv_stack_pop): Removed.
1594 (loop_iv_stack_get_iv): Removed.
1595 (loop_iv_stack_get_iv_from_name): Removed.
1596 (debug_loop_iv_stack): Removed.
1597 (free_loop_iv_stack): Removed.
1598 (loop_iv_stack_remove_constants): Removed. *
1599 sese.h (iv_stack_entry_kind): Removed.
1600 (iv_stack_entry_data_union): Removed.
1601 (iv_stack_entry_struct): Removed.
1602 (iv_stack_entry_p): Removed.
1603 (debug_oldivs, debug_loop_iv_stack, loop_iv_stack_insert_constant,
1604 loop_iv_stack_get_iv_from_name, loop_iv_stack_push_iv,
1605 loop_iv_stack_get_iv, loop_iv_stack_remove_constants,
1606 loop_iv_stack_pop, free_loop_iv_stack): Removed.
1607 (gbb_loop_at_index): Fix indenting.
1608 (gbb_loop_index): Removed.
1610 2009-05-13 Sebastian Pop <sebastian.pop@amd.com>
1612 * graphite-clast-to-gimple.c (clast_name_to_gcc): Do not use strcmp.
1613 Call clast_name_to_index.
1615 2009-05-13 Sebastian Pop <sebastian.pop@amd.com>
1617 * graphite-clast-to-gimple.c (clast_name_to_gcc): Pass region,
1618 do not pass params. Get params from SESE_PARAMS.
1619 (clast_to_gcc_expression): Same.
1620 (clast_to_gcc_expression_red): Same.
1621 (gcc_type_for_clast_eq): Same.
1622 (graphite_translate_clast_equation): Same.
1623 (graphite_create_new_loop): Same.
1624 * sese.c (rename_variables_in_stmt): Fix comment.
1626 2009-05-13 Sebastian Pop <sebastian.pop@amd.com>
1628 * graphite-clast-to-gimple.c (graphite_create_new_loop): Pass
1630 Call save_clast_name_index.
1631 (translate_clast): Pass newivs_index.
1632 (gloog): Create and free newivs_index.
1634 2009-05-13 Sebastian Pop <sebastian.pop@amd.com>
1636 * graphite-clast-to-gimple.c (clast_name_index): New structure.
1637 (clast_name_index_p): New type.
1638 (debug_clast_name_index): New.
1639 (debug_clast_name_indexes_1): New.
1640 (debug_clast_name_indexes): New.
1641 (clast_name_index_elt_info): New.
1642 (eq_clast_name_indexes): New.
1643 (clast_name_to_index): New.
1644 (new_clast_name_index): New.
1645 (save_clast_name_index): New.
1646 (init_sese_params_index): New.
1647 (gloog): Call init_sese_params_index.
1648 * graphite-clast-to-gimple.h (debug_clast_name_indexes): Declared.
1649 * sese.c (new_sese): Initialize SESE_PARAMS_INDEX.
1650 (free_sese): Free SESE_PARAMS_INDEX.
1651 * sese.h (struct sese): Add params_index.
1652 (SESE_PARAMS_INDEX): New.
1654 2009-05-13 Sebastian Pop <sebastian.pop@amd.com>
1656 * graphite-clast-to-gimple.c (newivs_to_depth_to_newiv): New.
1657 (graphite_create_new_loop): Pass the newivs vector. Push the
1658 newly created IV to newivs.
1659 (translate_clast): Pass the newivs vector.
1660 (gloog): Create and destroy the newivs vector.
1662 2009-05-13 Sebastian Pop <sebastian.pop@amd.com>
1664 * graphite-clast-to-gimple.c (pbb_to_depth_to_oldiv): New.
1665 (graphite_loop_normal_form): Initialize loop->aux with the unique
1666 IV that has been created.
1668 2009-05-13 Tobias Grosser <grosser@fim.uni-passau.de>
1670 * tree-chrec.c (evolution_function_right_is_integer_cst): Allow
1671 scev with parameters in the base part. They where forbidden
1674 2009-05-11 Li Feng <nemokingdom@gmail.com>
1676 * testsuite/gcc.dg/graphite/graphite.exp: Set different default
1677 compile options by file names.
1678 * testsuite/gcc.dg/graphite/block{0-6}.c: Remove dg-option line.
1679 * testsuite/gcc.dg/graphite/id-{1-9}.c: Ditto.
1680 * testsuite/gcc.dg/graphite/scop-{0-20}.c: Ditto.
1681 * testsuite/gcc.dg/graphite/scop-matmult.c: Ditto.
1683 2009-05-08 Li Feng <nemokingdom@gmail.com>
1685 * testsuite/gcc.dg/graphite/graphite_autopar/graphite_autopar.exp: New.
1686 * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-1.c: New.
1687 * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-2.c: New.
1688 * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-3.c: New.
1690 2009-05-07 Tobias Grosser <grosser@fim.uni-passau.de>
1692 * graphite-scop-detection (build_scops_1): Fix little bug introduced
1695 2009-05-07 Tobias Grosser <grosser@fim.uni-passau.de>
1697 * graphite-scop-detection.c (graphite_can_represent_scev): Only
1698 allow integer constant strides.
1699 (graphite_can_represent_expr): Depend on outermost_loop.
1700 (stmt_simple_memref_p, graphite_cannot_represent_loop,
1701 harmful_stmt_in_bb, is_simple_operand, stmt_simple_for_scop_p,
1702 build_scops_1): Same.
1703 (scopdet_basic_block_info): Same and insert layered SCoP
1705 (try_generate_gimple_bb): Cleanup.
1706 (build_scops): Enable data references.
1708 * testsuite/gcc.dg/graphite/id-5.c: New.
1709 * testsuite/gcc.dg/graphite/id-9.c: New.
1710 * tree-chrec.c (evolution_function_right_is_integer_cst): New.
1711 * tree-chrec.h (evolution_function_right_is_integer_cst): New.
1713 2009-05-06 Tobias Grosser <grosser@fim.uni-passau.de>
1715 * sese.c (expand_scalar_variables_ssa_name): Only build expressions,
1716 that we have not yet built for this SCoP.
1718 2009-05-06 Tobias Grosser <grosser@fim.uni-passau.de>
1720 * sese.c (expand_scalar_variables_expr): Fix expand_scalar_variables
1721 for complex numbers.
1723 2009-05-06 Tobias Grosser <grosser@fim.uni-passau.de>
1725 * graphite-ppl.c: Fix build if cloog is not available.
1727 2009-05-04 Li Feng <nemokingdom@gmail.com>
1729 * tree-parloops.c (loop_parallel_p): Remove construction of
1730 NITER and REDUCTION_LIST.
1731 (try_get_loop_niter): New.
1732 (try_create_reduction_list): New.
1733 (parallelize_loops): Bypass the failed checkings in autopar
1734 when can_be_parallel in loop structure is set to true.
1736 2009-05-01 Tobias Grosser <grosser@fim.uni-passau.de>
1738 * testsuite/gcc.dg/graphite/id-6.c: Update testcase.
1739 * testsuite/gcc.dg/graphite/scop-3.c: Dito.
1741 2009-05-01 Tobias Grosser <grosser@fim.uni-passau.de>
1743 * graphite-scop-detection.c (stmt_simple_for_scop_p):
1744 Enable EQ_EXPR and NE_EXPR again.
1746 2009-04-30 Tobias Grosser <grosser@fim.uni-passau.de>
1748 * graphite-scop-detection.c (graphite_can_represent_scev):
1749 Add check if scev is affine multivariate.
1750 (harmful_stmt_in_bb): Check if we can represent the conditions.
1751 (scopdet_basic_block_info (basic_block bb, VEC): Pass the loop to
1753 * testsuite/gcc.dg/graphite/id-7.c: New.
1755 2009-04-30 Tobias Grosser <grosser@fim.uni-passau.de>
1757 * graphite-sese-to-poly.c (bb_contains_non_iv_scalar_phi_nodes):
1758 Check all bbs in region, not only the bbs that are represented in
1760 (build_poly_scop): Add newline.
1761 * testsuite/gcc.dg/graphite/id-8.c: New.
1763 2009-04-30 Li Feng <nemokingdom@gmail.com>
1765 * cfgloop.c (alloc_loop): Initialize can_be_parallel to false
1766 when loop initialize.
1767 * cfgloop.h (struct loop): Introduce flag can_be_parallel.
1768 * common.opt: Declare flag_graphite_force_parallel.
1769 * graphite-clast-to-gimple.c (translate_clast): Mark the innermost
1771 * graphite-poly.c (apply_poly_transforms): Introduce
1772 flag_graphite_force_parallel.
1773 * tree-ssa-loop.c (gate_graphite_transforms): ditto.
1774 * toplev.c (process_options): ditto and replace a not correctly
1777 2009-04-30 Li Feng <nemokingdom@gmail.com>
1779 * graphite-clast-to-gimple.c (loop_iv_stack_patch_for_consts):
1780 Change the call of gbb_loop_at_index and/or gbb_loop_index due
1781 to the redefinition.
1782 (compute_cloog_iv_types_1): ditto.
1783 (build_iv_mapping): ditto.
1784 * graphite-sese-to-poly.c (new_gimple_bb): Remove GBB_LOOPS related
1786 (free_gimple_bb): Removed GBB_LOOPS related free part.
1787 (build_bb_loops): Removed.
1788 * sese.h (struct gimple_bb): Removed loops.
1789 (GBB_LOOPS): Removed.
1790 (gbb_loop_at_index): Instead of using GBB_LOOPS, we use sese instead.
1791 (gbb_loop_index): ditto.
1793 2009-04-24 Tobias Grosser <grosser@fim.uni-passau.de>
1795 * graphite-scop-detection.c (graphite_can_represent_scev): Do not
1796 allow non constant strides.
1797 * testsuite/gcc.dg/graphite/scop-20.c: New.
1799 2009-04-24 Sebastian Pop <sebastian.pop@amd.com>
1801 * graphite-scop-detection.c (dot_all_scops): Fix system call
1802 return value warning.
1805 2009-04-24 Sebastian Pop <sebastian.pop@amd.com>
1807 * testsuite/gcc.dg/graphite/id-6.c: Fix pattern.
1808 * testsuite/gcc.dg/graphite/scop-3.c: Same.
1810 2009-04-24 Sebastian Pop <sebastian.pop@amd.com>
1812 * graphite-poly.c (map_into_dep_poly, map_dr_into_dep_poly,
1813 build_pairwise_constraint, dr_equality_constraints,
1814 build_pairwise_scheduling_equality,
1815 build_pairwise_scheduling_inequality, lexicographically_gt_p,
1816 build_lexicographically_gt_constraint, dependence_polyhedron,
1817 graphite_legal_transform_dr, graphite_legal_transform_bb,
1818 graphite_legal_transform): New.
1819 * graphite-poly.h (graphite_legal_transform): Declared.
1820 * graphite-sese-to-poly.c (build_poly_scop): Call to
1821 graphite_legal_transform is disabled for the moment.
1823 2009-04-24 Sebastian Pop <sebastian.pop@amd.com>
1825 * graphite-poly.h (pbb_nb_scattering_dims): New.
1826 (pbb_nb_scattering): Use it.
1828 2009-04-24 Sebastian Pop <sebastian.pop@amd.com>
1830 * graphite-ppl.c (ppl_insert_dimensions_pointset): Add
1831 Pointset_Powerset version of ppl_insert_dimensions.
1832 * graphite-ppl.h (ppl_insert_dimensions_pointset): Declared.
1834 2009-04-24 Sebastian Pop <sebastian.pop@amd.com>
1836 * graphite-ppl.c (ppl_insert_dimensions): Fix formatting.
1838 2009-04-24 Sebastian Pop <sebastian.pop@amd.com>
1840 * graphite-poly.h: Fix comment.
1842 2009-04-24 Sebastian Pop <sebastian.pop@amd.com>
1844 * graphite-sese-to-poly.c (build_poly_dr): Fix data ref multiplier.
1846 2009-04-24 Tobias Grosser <grosser@fim.uni-passau.de>
1848 * sese.c (expand_scalar_variables_stmt): Only iterate over the old
1851 2009-04-24 Tobias Grosser <grosser@fim.uni-passau.de>
1853 * graphite-sese-to-poly.c (var_used_in_not_loop_header_phi_node): New.
1854 (graphite_stmt_p): Represent bbs necessary to build the phi nodes of
1857 2009-04-20 Sebastian Pop <sebastian.pop@amd.com>
1859 * graphite-scop-detection.c (stmt_simple_for_scop_p): Do not
1860 handle EQ_EXPR and NE_EXPR.
1862 2009-04-17 Tobias Grosser <grosser@fim.uni-passau.de>
1864 * graphite-poly.h (poly_dr): Fix comment.
1866 2009-04-09 Sebastian Pop <sebastian.pop@amd.com>
1867 Tobias Grosser <grosser@fim.uni-passau.de>
1869 * graphite-poly.c (new_poly_bb): Do not initialize PBB_DOMAIN
1870 with a zero dimension polyhedron.
1871 (find_scop_parameters): Move the call to scop_set_nb_params here.
1872 (build_loop_iteration_domains): Store in loop->aux the iteration
1874 (build_scop_iteration_domain): Fix PBB_DOMAIN for bbs not surrounded
1875 by any loop in scop.
1876 (build_poly_scop): Do not call scop_set_nb_params.
1878 2009-04-09 Sebastian Pop <sebastian.pop@amd.com>
1879 Tobias Grosser <grosser@fim.uni-passau.de>
1881 * graphite-sese-to-poly.c (add_condition_to_pbb): Pass code to
1882 add_condition_to_domain not GT_EXPR.
1884 2009-04-09 Tobias Grosser <grosser@fim.uni-passau.de>
1886 * graphite-ppl.c (debug_ppl_powerset_matrix): New.
1887 * graphite-ppl.h (debug_ppl_powerset_matrix): New.
1888 * graphite-sese-to-poly.c (add_condition_to_pbb): Use
1889 upper_bound_assign to calculate unions.
1890 * testsuite/gcc.dg/graphite/id-6.c: New.
1892 2009-04-09 Tobias Grosser <grosser@fim.uni-passau.de>
1894 * graphite-scop-detection.c (canonicalize_loop_closed_ssa): Do not
1895 handle abnormal edges.
1897 2009-04-09 Tobias Grosser <grosser@fim.uni-passau.de>
1899 * graphite-poly.c (new_poly_dr, free_poly_dr): New.
1900 (free_poly_bb): Also free poly_drs.
1901 * graphite-poly.h (new_poly_dr, free_poly_dr): New.
1902 (poly_dr): Polyhedron to Pointset_Powerset.
1903 (pdr_accessp_nb_subscripts): Same.
1904 * graphite-sese-to-poly.c (build_poly_dr): Same. And actually build
1907 2009-04-08 Sebastian Pop <sebastian.pop@amd.com>
1909 * graphite-clast-to-gimple.c (initialize_cloog_names): Change cloog
1910 names into more meaningful names.
1912 2009-04-08 Sebastian Pop <sebastian.pop@amd.com>
1914 * testsuite/gfortran.dg/graphite/interchange-1.c: New.
1915 * testsuite/gfortran.dg/graphite/interchange-2.c: New.
1917 2009-04-08 Sebastian Pop <sebastian.pop@amd.com>
1919 * graphite-clast-to-gimple.c (graphite_loop_normal_form): Do not build
1921 * tree-parloops.c (rewrite_phi_with_iv): New.
1922 (rewrite_all_phi_nodes_with_iv): New.
1923 (canonicalize_loop_ivs): Call them.
1925 2009-04-08 Sebastian Pop <sebastian.pop@amd.com>
1927 * graphite-sese-to-poly.c (try_generate_gimple_bb): Use
1928 graphite_find_data_references_in_stmt.
1929 * tree-data-ref.c (graphite_find_data_references_in_stmt): New.
1930 * tree-data-ref.h (graphite_find_data_references_in_stmt): Declared.
1932 2009-04-08 Sebastian Pop <sebastian.pop@amd.com>
1934 * sese.c (add_loop_exit_phis): Don't fail on non SSA_NAME renames.
1936 2009-04-08 Sebastian Pop <sebastian.pop@amd.com>
1938 * graphite-sese-to-poly.c (build_scop_bbs_1): Use bb_in_sese_p
1939 instead of bb_in_region.
1940 (flag_bb_in_region): Same. Renamed flag_bb_in_sese.
1941 (build_sese_conditions): Use flag_bb_in_sese.
1942 * sese.c (register_bb_in_sese): Removed.
1943 (new_sese): Remove initialization of SESE_REGION_BBS.
1944 (free_sese): Do not free SESE_REGION_BBS.
1945 * sese.h (struct sese): Remove field region_basic_blocks.
1946 (SESE_REGION_BBS): Removed.
1947 (bb_in_sese_p): Implement in function of bb_in_region.
1949 2009-04-08 Sebastian Pop <sebastian.pop@amd.com>
1951 * graphite-scop-detection.c (limit_scops): Deal only with single exit
1954 2009-04-08 Tobias Grosser <grosser@fim.uni-passau.de>
1956 * graphite-scop-detection.c (stmt_simple_for_scop_p): Allow NE_EXPR
1958 * graphite-sese-to-poly.c (create_linear_expr_from_tree): New.
1959 (add_condition_to_domain): New.
1960 (add_condition_to_pbb): New.
1961 (add_conditions_to_domain): Cleanup and handle of NE_EXPR and EQ_EXPR.
1962 * testsuite/gcc.dg/graphite/scop-3.c: Update number of detected SCoPs.
1964 2009-04-08 Tobias Grosser <grosser@fim.uni-passau.de>
1966 * graphite-clast-to-gimple.c (build_cloog_prog): ppl_Polyhedron ->
1967 ppl_Pointset_Powerset.
1968 * graphite-poly.c (new_poly_bb, free_poly_bb): Same.
1969 * graphite-poly.h (poly_bb): poly_bb.domain Same.
1970 (pbb_nb_loops): Same.
1971 * graphite-sese-to-poly.c (build_loop_iteration_domains,
1972 add_conditions_to_domain): Same.
1973 * graphite-ppl.c (new_Cloog_Domain_from_ppl_Pointset_Powerset): New.
1974 (ppl_print_polyhedron_matrix): ppl_Polyhedron_t ->
1975 ppl_const_Polyhedron_t.
1976 (ppl_print_powerset_matrix): New.
1977 * graphite-ppl.h (new_Cloog_Domain_from_ppl_Pointset_Powerset,
1978 ppl_print_powerset_matrix): New.
1979 (ppl_print_polyhedron_matrix): Updated.
1981 2009-04-07 Sebastian Pop <sebastian.pop@amd.com>
1983 * tree-scalar-evolution.c (analyze_scalar_evolution_1): Fix comment.
1985 2009-04-07 Sebastian Pop <sebastian.pop@amd.com>
1987 * graphite-poly.c (extend_scattering): Fix indenting. Free cstr.
1988 (print_iteration_domains, debug_iteration_domain,
1989 debug_iteration_domains): New.
1990 * graphite-poly.h (print_iteration_domains, debug_iteration_domain,
1991 debug_iteration_domains): Declared.
1992 * graphite-sese-to-poly.c (build_pbb_scattering_polyhedrons): Fix
1995 2009-04-03 Tobias Grosser <grosser@fim.uni-passau.de>
1996 Sebastian Pop <sebastian.pop@amd.com>
1998 * graphite-poly.h (print_iteration_domain): New.
1999 * graphite-sese-to-poly.c (add_conditions_to_domain): Fixed bug.
2000 (build_sese_conditions_1, build_sese_conditions_after,
2001 build_sese_conditions_before): New.
2002 (build_sese_conditions): Rewritten.
2004 2009-04-03 Sebastian Pop <sebastian.pop@amd.com>
2005 Tobias Grosser <grosser@fim.uni-passau.de>
2007 Cleanup of code generation liveouts.
2008 * graphite-clast-to-gimple.c (translate_clast): Use a single
2009 rename_map instead of one per translated statement.
2010 Do not use SESE_LIVEOUT_RENAMES.
2011 (graphite_loop_normal_form): Do not use SESE_REDUCTION_LIST.
2012 (gloog): Do not use SESE_LIVEOUT_RENAMES.
2013 * graphite-scop-detection.c (harmful_stmt_in_bb): Return the close
2014 phi node of a reduction: when a loop contains a reduction used outside
2015 the loop, there should be a scalar close phi node on the exit block.
2016 * sese.c (new_sese): Do not initialize SESE_LIVEOUT,
2017 SESE_LIVEOUT_RENAMES, and SESE_REDUCTION_LIST.
2018 (free_sese): Do not free them.
2019 (sese_build_liveouts_use): Do not use them.
2020 (sese_build_liveouts_bb): Same.
2021 (sese_build_liveouts): Same.
2022 (sese_insert_phis_for_liveouts): Same.
2023 (sese_adjust_phis_for_liveouts): Same. Renamed sese_adjust_liveout_phis.
2024 (defined_in_loop_p): New.
2025 (alive_after_loop): New.
2026 (close_phi_not_yet_inserted_p): New.
2027 (struct alep, alep_p): New.
2028 (add_loop_exit_phis): Remove from the rename_map all the names defined
2029 in the code generated loop.
2030 (insert_loop_close_phis): Traverse the rename_map passed to it.
2031 Don't use SESE_LIVEOUT_RENAMES.
2032 (default_liveout_before_guard): Renamed default_before_guard.
2033 (insert_guard_phis): Do not use SESE_LIVEOUT_RENAMES.
2034 (graphite_copy_stmts_from_block): Do not directly call set_rename.
2035 (register_sese_liveout_renames): Removed.
2036 (copy_bb_and_scalar_dependences): Do not call it.
2037 * sese.h (struct sese): Removed fields: liveout, liveout_renames, and
2039 (SESE_LIVEOUT): Removed.
2040 (SESE_LIVEOUT_RENAMES): Removed.
2041 (SESE_REDUCTION_LIST): Removed.
2042 (sese_build_liveouts): Removed.
2043 (sese_adjust_phis_for_liveouts): Renamed sese_adjust_liveout_phis.
2044 (insert_loop_close_phis): Pass a htab_t instead of a sese.
2045 (insert_guard_phis): Same.
2046 (rename_map_elt): Declare a VEC of them.
2047 * tree-parloops.c (canonicalize_loop_ivs): reduction_list contains
2048 trees not pointers to trees.
2050 Rewrite in canonical close SSA form:
2051 * graphite-scop-detection.c (contains_only_close_phi_nodes): New.
2052 (limit_scops): Close the scop after the block containing the close phi
2054 (canonicalize_loop_closed_ssa): New.
2055 (canonicalize_loop_closed_ssa_form): New.
2056 (build_scops): Call canonicalize_loop_closed_ssa_form.
2058 * graphite-sese-to-poly.c: Fix typos.
2060 2009-04-03 Sebastian Pop <sebastian.pop@amd.com>
2062 * graphite-poly.c (print_scattering_function, print_pbb_domain):
2064 (dump_gbb_conditions, dump_gbb_cases, print_iteration_domain): New.
2065 (print_pbb): Add conditions.
2067 2009-04-01 Tobias Grosser <grosser@fim.uni-passau.de>
2068 Sebastian Pop <sebastian.pop@amd.com>
2070 * graphite-scop-detection.c (bb_in_sd_region): Use bb_in_region.
2071 * graphite-sese-to-poly.c (all_non_dominated_preds_marked_p): New.
2072 (build_scop_bbs_1): New.
2073 (build_scop_bbs): Rewrite.
2074 * sese.h (bb_in_region): New.
2076 2009-03-29 Tobias Grosser <grosser@fim.uni-passau.de>
2078 * graphite-poly.c (new_poly_bb, free_poly_bb): Initialize/free
2080 (print_scop): Style.
2081 * graphite-poly.h (poly_bb): Add drs vector.
2082 (PBB_DRS): Add accessor.
2083 * graphite-sese-to-poly.c (build_poly_dr): New.
2084 (build_pbb_drs, build_scop_drs): New.
2085 (build_poly_scop): call build_scop_drs (Disabled at the moment).
2087 2009-03-29 Tobias Grosser <grosser@fim.uni-passau.de>
2089 * tree-ssa-loop.c: Include forgotten toplev.h
2091 2009-03-29 Tobias Grosser <grosser@fim.uni-passau.de>
2093 * graphite-poly.c: (apply_poly_transforms): sorry -> gcc_unreachable.
2094 * testsuite/gcc.dg/graphite/pr37883.c: Remove -floop-*
2095 * testsuite/gcc.dg/graphite/pr37928.c: Same
2096 * testsuite/gcc.dg/graphite/pr38409.c: Same
2097 * testsuite/gcc.dg/graphite/pr38498.c: Same
2098 * testsuite/gcc.dg/graphite/pr38559.c: Same
2099 * testsuite/gcc.dg/graphite/pr39335.c: Same
2100 * testsuite/gcc.dg/graphite/pr39335_1.c: Same
2101 * testsuite/gfortran.dg/graphite/block-2.f: Same
2102 * tree-ssa-loop.c (gate_graphite_transforms): Always fail if called
2105 2009-03-28 Tobias Grosser <grosser@fim.uni-passau.de>
2107 * graphite-sese-to-poly.c (ref_nb_loops, build_access_matrix_with_af,
2108 build_access_matrix, build_scop_data_accesses): Remove access function
2109 building. (We get a new version soon).
2110 (build_bb_loops, scan_tree_for_params_right_scev): Update.
2111 * sese.h (nb_loops_around_loop_in_sese): Remove.
2112 (sese_loop_depth): Do not use SESE_LOOP_NEST any more.
2114 2009-03-27 Tobias Grosser <grosser@fim.uni-passau.de>
2115 Sebastian Pop <sebastian.pop@amd.com>
2117 * graphite-scop-detection.c (struct scopdet_info): Rename last
2119 (scopdet_basic_block_info, build_scops_1): Don't use
2120 CDI_POST_DOMINATORS. CDI_POST_DOMINATORS should never be used.
2122 2009-03-26 Tobias Grosser <grosser@fim.uni-passau.de>
2123 Sebastian Pop <sebastian.pop@amd.com>
2125 * graphite-clast-to-gimple.c (gloog): Call sese_build_liveouts.
2126 * sese.c (sese_build_liveouts_use): Renamed from
2127 sese_build_livein_liveouts_use. Remove liveins.
2128 (sese_build_liveouts_bb): Renamed from sese_build_livein_liveouts_bb.
2129 Call sese_build_liveouts_use.
2130 (sese_build_liveouts): Renamed from sese_build_livein_liveouts.
2131 Call sese_build_liveouts_bb.
2132 (new_sese, free_sese): Remove liveins.
2133 (sese_add_exit_phis_var): Deleted.
2134 (sese_insert_phis_for_liveouts): Call sese_add_exit_phis_edge
2136 (graphite_copy_stmts_from_block): Remove SESE_NUM_VER.
2138 * sese.h (sese): Remove num_ver and livein.
2139 (SESE_LIVEIN, SESE_LIVEIN_VER, SESE_NUM_VER): Removed.
2141 2009-03-25 Tobias Grosser <grosser@fim.uni-passau.de>
2143 * graphite-sese-to-poly.c (build_scop_scattering): Fix compile.
2145 2009-03-25 Tobias Grosser <grosser@fim.uni-passau.de>
2147 * graphite-sese-to-poly.c (compare_prefix_loops): Removed.
2148 (build_scop_scattering): Do not use compare_prefix_loops any more.
2149 (nb_common_loops): New.
2151 2009-03-24 Sebastian Pop <sebastian.pop@amd.com>
2153 * sese.c (get_new_name_from_old_name): Renamed get_rename.
2154 (register_old_and_new_names): Renamed set_rename.
2156 2009-03-24 Sebastian Pop <sebastian.pop@amd.com>
2158 * graphite-scop-detection.h (nb_reductions_in_loop): Revert removal
2159 of the decl from the previous commit.
2161 2009-03-24 Sebastian Pop <sebastian.pop@amd.com>
2163 * graphite-scop-detection.c (dot_scop): New.
2164 * graphite-scop-detection.h (dot_scop): Declared.
2166 2009-03-24 Sebastian Pop <sebastian.pop@amd.com>
2168 * graphite-sese-to-poly.c (compare_prefix_loops): Fix compare.
2170 2009-03-24 Sebastian Pop <sebastian.pop@amd.com>
2172 * cfgloopmanip.c (create_empty_loop_on_edge): Generate the loop exit
2173 condition at the end of the loop.
2174 * graphite.c (graphite_initialize, graphite_finalize): Print to
2175 dump_file the compiled function.
2176 * graphite-clast-to-gimple.c (graphite_create_new_loop): Update use
2177 of create_empty_loop_on_edge.
2178 (translate_clast): Update the code generation of loops for the new
2180 * cfgloop.h (create_empty_loop_on_edge): Update declaration.
2182 2009-03-24 Sebastian Pop <sebastian.pop@amd.com>
2184 Reverted the patch from 2009-03-19.
2186 2009-03-19 Tobias Grosser <grosser@fim.uni-passau.de>
2188 * graphite-poly.c (new_poly_bb, free_poly_bb): Initialize/free
2190 (print_scop): Style.
2191 * graphite-poly.h (poly_bb): Add drs vector.
2192 (PBB_DRS): Add accessor.
2193 * graphite-sese-to-poly.c (ref_nb_loops): Remove.
2194 (build_access_matrix_with_af, build_access_matrix,
2195 build_scop_data_accesses): Delete.
2196 (build_poly_dr): New.
2197 (build_pbb_drs, build_scop_drs): New.
2198 (build_poly_scop): call build_scop_drs.
2200 2009-03-13 Sebastian Pop <sebastian.pop@amd.com>
2202 * graphite-scop-detection.c (dot_all_scops_1): Close the table
2203 once per basic block.
2205 2009-03-13 Tobias Grosser <grosser@fim.uni-passau.de>
2207 * graphite-scop-detection.c (graphite_can_represent_scev): New.
2208 (graphite_can_represent_expr): Renamed from loop_affine_expr
2210 (stmt_simple_for_scop_p): Call graphite_can_represent_expr.
2211 (graphite_cannot_represent_loop): Add scop_entry to parameters.
2212 (scopdet_basic_block_info): Actually define entry_block.
2213 (stmt_simple_memref_p): Moved here from ...
2215 * tree-data-ref.c (stmt_simple_memref_p): here.
2216 * tree-data-ref.h (stmt_simple_memref_p): Removed.
2218 2009-03-13 Tobias Grosser <grosser@fim.uni-passau.de>
2220 * testsuite/gcc.dg/graphite/id-4.c: New.
2222 2009-03-12 Sebastian Pop <sebastian.pop@amd.com>
2224 * sese.c (expand_scalar_variables_expr): Handle tcc_comparison.
2225 (register_old_and_new_names): Update the content of the map.
2226 When there was already a rename_map_elt in the map at that
2228 (copy_bb_and_scalar_dependences): Do rename_variables after
2229 expand_scalar_variables.
2230 * graphite-clast-to-gimple.c (build_iv_mapping): Update the content
2231 of the map. When there was already a rename_map_elt in the
2232 map at that location, free it.
2233 (translate_clast): Pass the rename_map. Do not initialize and free
2234 a rename_map per stmt_user.
2235 (gloog): Initialize and free one rename_map and pass it to
2238 2009-03-12 Sebastian Pop <sebastian.pop@amd.com>
2240 * sese.c (expand_scalar_variables_stmt,
2241 expand_scalar_variables_ssa_name): Add a gimple_stmt_iterator
2243 (expand_scalar_variables_expr): Handle REALPART_EXPR and IMAGPART_EXPR.
2244 (expand_scalar_variables): Pass to expand_scalar_variables_stmt
2245 the gimple_stmt_iterator of the statement to be expanded.
2246 * graphite-scop-detection.c (is_simple_operand): Do handle
2249 2009-03-11 Tobias Grosser <grosser@fim.uni-passau.de>
2251 * graphite-scop-detection.c (is_simple_operand): Do not handle
2253 * testsuite/gcc.dg/graphite/id-2.c: New.
2255 * graphite-sese-to-poly.c (build_bb_loops,
2256 add_value_to_dim, scan_tree_for_params_right_scev,
2257 scan_tree_for_params_int, scan_tree_for_params, idx_record_params,
2258 find_params_in_bb, build_loop_iteration_domains,
2259 add_conditions_to_domain): Remove subtract.
2261 2009-03-11 Tobias Grosser <grosser@fim.uni-passau.de>
2263 * graphite-clast-to-gimple.c (loop_iv_stack_patch_for_consts,
2264 build_iv_mapping, compute_cloog_iv_types_1, build_cloog_prog):
2265 pbb_loop_at_index -> gbb_loop_at_index.
2266 * graphite-poly.c (new_poly_bb, new_scop): New accessors.
2267 (debug_loop_vec): Delete.
2268 * graphite-poly.h (poly_bb, scop): Change black_box and region to void
2269 pointer. Move LOOPS to gimple_bb_p and insert nb_params.
2270 (PBB_LOOPS): Removed.
2271 (PBB_BLACK_BOX): Insert cast.
2272 (pbb_set_black_box): New setter.
2273 (pbb_loop_at_index, pbb_loop_index): Removed.
2274 (scop_set_region, scop_set_nb_params): New.
2275 * graphite-sese-to-poly.c (new_gimple_bb, free_gimple_bb,
2276 build_scop_scattering, build_bb_loops): Add GBB_LOOPS.
2277 (build_poly_scop): Use scop_set_nb_params.
2278 * sese.h (gimple_bb): Add LOOPS.
2279 (GBB_LOOPS, gbb_loop_index, gbb_loop_at_index): New.
2281 2009-03-11 Tobias Grosser <grosser@fim.uni-passau.de>
2283 Revert previous commit.
2285 2009-03-11 Sebastian Pop <sebastian.pop@amd.com>
2287 * sese.c (expand_scalar_variables_expr): Handle tcc_comparison.
2288 (register_old_and_new_names): Update the content of the map.
2289 When there was already a rename_map_elt in the map at that
2291 (copy_bb_and_scalar_dependences): Do rename_variables after
2292 expand_scalar_variables.
2293 * graphite-clast-to-gimple.c (build_iv_mapping): Update the content
2294 of the map. When there was already a rename_map_elt in the
2295 map at that location, free it.
2296 (translate_clast): Pass the rename_map. Do not initialize and free
2297 a rename_map per stmt_user.
2298 (gloog): Initialize and free one rename_map and pass it to
2301 2009-03-11 Tobias Grosser <grosser@fim.uni-passau.de>
2303 Remove forgotten line in revert.
2305 2009-03-11 Sebastian Pop <sebastian.pop@amd.com>
2307 Revert previous commit.
2309 2009-03-10 Sebastian Pop <sebastian.pop@amd.com>
2311 * sese.c (register_old_and_new_names): Update the content
2312 of the map. When there was already a rename_map_elt in the
2313 map at that location, free it.
2314 (copy_bb_and_scalar_dependences): Do rename_variables after
2315 expand_scalar_variables.
2316 * graphite-clast-to-gimple.c (build_iv_mapping): Update the content
2317 of the map. When there was already a rename_map_elt in the
2318 map at that location, free it.
2319 (translate_clast): Pass the rename_map. Do not initialize and free
2320 a rename_map per stmt_user.
2321 (gloog): Initialize and free one rename_map and pass it to
2324 2009-03-10 Sebastian Pop <sebastian.pop@amd.com>
2326 * graphite-clast-to-gimple.c (translate_clast): context_loop
2329 2009-03-10 Tobias Grosser <grosser@fim.uni-passau.de>
2330 Sebastian Pop <sebastian.pop@amd.com>
2332 * graphite-ppl.c (ppl_insert_dimensions): Fix stupid mistake
2333 of the use of ppl_Polyhedron_map_space_dimensions.
2335 2009-03-10 Tobias Grosser <grosser@fim.uni-passau.de>
2336 Sebastian Pop <sebastian.pop@amd.com>
2338 * graphite-poly.c (unify_scattering_dimensions): Fix types.
2339 * graphite-poly.h (poly_dr_p, poly_dr, POLY_DR_TYPE, PDR_BB,
2340 PDR_TYPE, PDR_ACCESSES, pdr_accessp_nb_subscripts,
2341 pdr_accessp_nb_iterators, pdr_accessp_nb_params,
2342 pdr_accessp_alias_set_dim, pdr_accessp_subscript_dim,
2343 pdr_accessp_iterator_dim, pdr_accessp_param_dim,
2344 pbb_nb_params): New.
2345 (pbb_nb_loops, pbb_nb_scattering, scop_nb_params,
2346 nb_loops_around_pbb): Adapt return types.
2348 2009-03-09 Tobias Grosser <grosser@fim.uni-passau.de>
2350 * Makefile.in (graphite.o, graphite-sese-to-poly.o,
2351 graphite-clast-to-gimple.o, graphite-data-ref.o,
2352 graphite-scop-detection.o, graphite-poly.o): Add
2355 2009-03-05 Tobias Grosser <grosser@fim.uni-passau.de>
2357 * Makefile.in (graphite.o, graphite-sese-to-poly.o,
2358 graphite-clast-to-gimple.o, graphite-data-ref.o,
2359 graphite-scop-detection.o, graphite-poly.o): Add graphite-poly.h.
2361 2009-03-04 Tobias Grosser <grosser@fim.uni-passau.de>
2363 * testsuite/gcc.dg/graphite/pr37485.c: Remove -floop-block
2364 * testsuite/gcc.dg/graphite/pr37828.c: Same.
2365 * testsuite/gcc.dg/graphite/pr37684.c: Same.
2366 * testsuite/gcc.dg/graphite/block-0.c: Same.
2367 * testsuite/gcc.dg/graphite/block-1.c: Same.
2368 * testsuite/gcc.dg/graphite/block-2.c: Same.
2369 * testsuite/gcc.dg/graphite/block-3.c: Same.
2370 * testsuite/gcc.dg/graphite/block-4.c: Same.
2371 * testsuite/gcc.dg/graphite/block-5.c: Same.
2372 * testsuite/gcc.dg/graphite/block-6.c: Same.
2373 * testsuite/gfortran.dg/graphite/pr38083.f90: Same.
2374 * testsuite/gfortran.dg/graphite/block-1.f90: Same.
2375 * testsuite/gfortran.dg/graphite/block-3.f90: Same.
2376 * testsuite/gfortran.dg/graphite/pr37852.f90: Same.
2377 * testsuite/gfortran.dg/graphite/block-4.f90: Same.
2378 * testsuite/gfortran.dg/graphite/pr37980.f90: Same.
2379 * testsuite/gfortran.dg/graphite/pr38953.f90: Same.
2380 * testsuite/gfortran.dg/graphite/pr37857.f90: Same.
2381 * opts.c: Remove -floop-block from -O2.
2382 * graphite-poly.c: Fail if -floop-block -floop-interchange or
2383 -floop-strip-mine are used.
2385 2009-03-04 Tobias Grosser <grosser@fim.uni-passau.de>
2386 Sebastian Pop <sebastian.pop@amd.com>
2388 * graphite-clast-to-gimple.c (build_cloog_prog): Unify scattering
2390 * graphite-poly.c (pbb_compare, graphite_sort_pbbs,
2391 graphite_trans_bb_move_loop, graphite_trans_bb_strip_mine,
2392 strip_mine_profitable_p, is_interchange_valid,
2393 graphite_trans_bb_block, graphite_trans_loop_block,
2394 graphite_trans_scop_block): Temporary removed.
2395 (extend_scattering, unify_scattering_dimensions): New.
2396 (print_scattering_function, graphite_read_transforms):
2397 PBB_SCATTERING -> PBB_TRANSFORMED_SCATTERING.
2398 (graphite_generate_scattering_fns): Removed.
2399 (apply_poly_transforms): Cleanup.
2400 (free_poly_bb): Add PBB_SCATTERING -> PBB_TRANSFORMED_SCATTERING.
2401 (schedule_to_scattering): Moved.
2402 (PBB_STATIC_SCHEDULE, PBB_SCATTERING): Removed.
2403 (PBB_ORIGINAL_SCATTERING, PBB_TRANSFORMED_SCATTERING): New.
2404 (pbb_nb_scattering): New.
2405 (SCOP_ENTRY, SCOP_EXIT, SCOP_REGION_BBS, SCOP_DEP_GRAPH, SCOP_PARAMS,
2406 SCOP_LOOP_NEST, SCOP_PARAMS, SCOP_OLDIVS, SCOP_LIVEOUT_RENAMES):
2408 * graphite-ppl.c (ppl_insert_dimensions): Extended and renamed from
2410 (ppl_strip_loop): PBB_SCATTERING -> PBB_TRANSFORMED_SCATTERING.
2411 * graphite-scop-detection.c (dot_all_scops_1): PBB_SCATTERING
2412 -> PBB_TRANSFORMED_SCATTERING.
2413 * graphite-sese-to-poly.c (build_scop_bbs): Remove region.
2414 (build_pbb_scattering_polyhedron): Moved from schedule_to_scattering.
2415 (build_scop_scattering): Renamed from build_scop_canonical_schedules.
2416 (check_poly_representation): Do not return bool.
2417 (graphite_transform_loops): Reformat.
2418 * sese.h (SESE_ENTRY_BB, SESE_EXIT_BB): New.
2420 2009-03-04 Sebastian Pop <sebastian.pop@amd.com>
2422 * graphite-poly.c (print_pbb_domain, print_pbb, print_scop,
2423 debug_pbb_domain, debug_pbb, debug_scop): New.
2424 * graphite-poly.h (print_pbb_domain, print_pbb, print_scop,
2425 debug_pbb_domain, debug_pbb, debug_scop): Declared.
2427 2009-03-02 Sebastian Pop <sebastian.pop@amd.com>
2430 * tree-parloops.c (canonicalize_loop_ivs): Call fold_convert
2431 when the type precision of the induction variable should be
2432 larger than the type precision of nit.
2433 (gen_parallel_loop): Update use of canonicalize_loop_ivs.
2434 * graphite-clast-to-gimple.c (graphite_loop_normal_form): Same.
2435 * tree-flow.h (canonicalize_loop_ivs): Update declaration.
2437 * testsuite/gcc.dg/graphite/pr39335_1.c: New.
2438 * testsuite/gcc.dg/graphite/pr39335.c: New.
2440 2009-03-02 Sebastian Pop <sebastian.pop@amd.com>
2442 * tree-parloops.c (canonicalize_loop_ivs): reduction_list contains
2443 SSA_NAMES not struct reduction_info.
2445 2009-03-02 Sebastian Pop <sebastian.pop@amd.com>
2447 * sese.c (expand_scalar_variables_expr): Handle ADDR_EXPR.
2449 2009-02-27 Sebastian Pop <sebastian.pop@amd.com>
2450 Tobias Grosser <grosser@fim.uni-passau.de>
2452 * sese.c (new_sese): Initialize SESE_REDUCTION_LIST.
2453 (free_sese): Free SESE_REDUCTION_LIST.
2454 * sese.h (struct sese): Add field reduction_list.
2455 (SESE_REDUCTION_LIST): New.
2456 * graphite-clast-to-gimple.c (graphite_loop_normal_form): Call
2457 canonicalize_loop_ivs on SESE_REDUCTION_LIST.
2459 2009-02-27 Sebastian Pop <sebastian.pop@amd.com>
2460 Tobias Grosser <grosser@fim.uni-passau.de>
2462 * tree-flow.h (gather_scalar_reductions): Use struct loop * instead
2465 2009-02-27 Sebastian Pop <sebastian.pop@amd.com>
2466 Tobias Grosser <grosser@fim.uni-passau.de>
2468 * tree-parloops.c (struct brli, build_reduction_list_info,
2469 analyze_reduction_list, gather_scalar_reductions): New.
2470 (loop_parallel_p): Build a reduction list containing only
2471 PHI_RESULT SSA_NAMEs: call gather_scalar_reductions.
2472 (gen_parallel_loop): Call the analysis analyze_reduction_list.
2473 (parallelize_loops): Now reduction_list is a htab_t of SSA_NAMEs.
2474 * tree-flow.h (gather_scalar_reductions): Declared.
2476 2009-02-26 Sebastian Pop <sebastian.pop@amd.com>
2479 * graphite-clast-to-gimple.c (graphite_loop_normal_form): Do not call
2480 number_of_iterations_exit from a gcc_assert.
2482 2009-02-25 Sebastian Pop <sebastian.pop@amd.com>
2483 Jan Sjodin <jan.sjodin@amd.com>
2485 * output.h (graphite_out_file, graphite_in_file): Declared.
2486 * toplev.c (graphite_out_file, graphite_in_file): New.
2487 (init_asm_output): Initialize graphite_in_file and graphite_out_file.
2488 * graphite-clast-to-gimple.c (build_cloog_prog): Read PBB_SCATTERING.
2489 Don't call schedule_to_scattering.
2490 * common.opt (fgraphite-write, fgraphite-read): New.
2491 * graphite-poly.c: Include output.h.
2492 (print_scattering_function, print_scattering_functions,
2493 debug_scattering_function, debug_scattering_functions,
2494 graphite_write_transforms, graphite_read_transforms,
2495 graphite_generate_scattering_fns): New.
2496 (apply_poly_transforms): Do not apply transform if flag_graphite_read.
2497 Call graphite_generate_scattering_fns, graphite_write_transforms,
2498 graphite_read_transforms.
2499 (new_poly_bb): Initialize PBB_SCATTERING.
2500 (free_poly_bb): Free PBB_SCATTERING.
2501 (schedule_to_scattering): Does not return, initialize PBB_SCATTERING.
2502 * graphite-poly.h (struct poly_bb): Add field scattering.
2503 (PBB_SCATTERING): New.
2504 (print_scattering_function, print_scattering_functions,
2505 debug_scattering_function, debug_scattering_functions): Declared.
2506 * graphite-ppl.c (cloog_matrix_to_ppl_constraint): Matrices contain
2507 GMP values, not integers!
2508 (ppl_print_polyhedron_matrix, debug_ppl_polyhedron_matrix,
2509 ppl_read_polyhedron_matrix): New.
2510 * graphite-ppl.h (ppl_print_polyhedron_matrix,
2511 debug_ppl_polyhedron_matrix,
2512 ppl_read_polyhedron_matrix): Declared.
2513 * Makefile.in (graphite-poly.o): Depends on output.h.
2515 2009-02-23 Sebastian Pop <sebastian.pop@amd.com>
2516 Tobias Grosser <grosser@fim.uni-passau.de>
2519 * graphite-scop-detection.c (stmt_simple_for_scop_p): Analyze
2520 scalar evolutions in the scop_entry->loop_father.
2522 2009-02-23 Sebastian Pop <sebastian.pop@amd.com>
2523 Tobias Grosser <grosser@fim.uni-passau.de>
2525 * graphite.h (ref_nb_loops): Remove declaration.
2526 (struct gimple_bb, gimple_bb_p, GBB_BB, GBB_DATA_REFS, GBB_CONDITIONS,
2527 GBB_CONDITION_CASES, GBB_CLOOG_IV_TYPES, gbb_loop, print_gimple_bb,
2528 debug_gbb): Moved to sese.h.
2531 2009-02-23 Sebastian Pop <sebastian.pop@amd.com>
2532 Tobias Grosser <grosser@fim.uni-passau.de>
2534 * graphite-data-ref.[ch]: Disable.
2536 2009-02-23 Sebastian Pop <sebastian.pop@amd.com>
2537 Tobias Grosser <grosser@fim.uni-passau.de>
2539 * graphite-scop-detection.c (stmt_simple_for_scop_p): Analyze
2540 scalar evolutions in the scop_entry->loop_father.
2542 2009-02-23 Sebastian Pop <sebastian.pop@amd.com>
2544 * graphite-scop-detection.c (nb_reductions_in_loop): Moved here...
2545 (graphite_cannot_represent_loop_niter): Renamed
2546 graphite_cannot_represent_loop. Call nb_reductions_in_loop.
2547 (limit_scops): build_sese_loop_nests does not return a bool.
2548 * graphite-scop-detection.h (nb_reductions_in_loop): Declared.
2549 * sese.c (nb_reductions_in_loop): ... from here.
2550 (graphite_loop_normal_form): ... from here.
2551 (sese_record_loop): Does not fail, so does not return a bool.
2552 (build_sese_loop_nests): Same.
2553 * sese.h (build_sese_loop_nests): Update declaration.
2554 * graphite-clast-to-gimple.c (graphite_loop_normal_form): Moved here...
2555 (build_graphite_loop_normal_form): New.
2556 (gloog): Call build_graphite_loop_normal_form.
2557 * graphite-sese-to-poly.c (build_poly_scop): Don't fail on
2558 build_sese_loop_nests.
2560 * testsuite/gcc.dg/graphite/id-1.c: New.
2562 2009-02-23 Sebastian Pop <sebastian.pop@amd.com>
2563 Tobias Grosser <grosser@fim.uni-passau.de>
2565 * graphite-sese-to-poly.c (scan_tree_for_params): Remove REAL_CST.
2566 The SCoP detection fix is sufficient.
2568 2009-02-21 Sebastian Pop <sebastian.pop@amd.com>
2570 PR tree-optimization/39260
2571 * graphite-scop-detection.c (harmful_stmt_in_bb): Stop a SCoP when
2572 the basic block contains a condition with a real type.
2573 * graphite-sese-to-poly.c (scan_tree_for_params): Handle REAL_CST.
2575 * gcc.dg/graphite/pr39260.c: New.
2577 2009-02-21 Sebastian Pop <sebastian.pop@amd.com>
2579 * graphite-poly.c: Inlcude params.h.
2580 (graphite_trans_loop_block): Use PARAM_LOOP_BLOCK_TILE_SIZE for
2582 * Makefile.in (graphite-poly.o): Depend on PARAMS_H.
2583 * params.def (PARAM_LOOP_BLOCK_TILE_SIZE): Define.
2585 2009-02-20 Sebastian Pop <sebastian.pop@amd.com>
2586 Tobias Grosser <grosser@fim.uni-passau.de>
2588 * graphite-scop-detection.c (dot_all_scops_1,
2589 dot_all_scops): Moved here.
2590 * graphite-scop-detection.h (dot_all_scops): Declared here.
2591 * graphite.c (graphite_initialize, graphite_finalize): New.
2592 (graphite_transform_loops): Cleaned up.
2593 * sese.c (debug_oldivs): Moved here.
2594 * graphite-poly.c (graphite_apply_transformations): Renamed
2595 apply_poly_transforms.
2596 (debug_loop_vec): Moved here.
2597 * graphite-sese-to-poly.c (build_bb_loops, build_sese_conditions_1,
2598 scop_contains_non_iv_scalar_phi_nodes, build_sese_conditions,
2599 find_scop_parameters, build_scop_iteration_domain,
2600 add_conditions_to_constraints, build_scop_canonical_schedules,
2601 build_scop_data_accesses): Now static.
2602 (build_poly_scop, check_poly_representation): New.
2604 2009-02-20 Sebastian Pop <sebastian.pop@amd.com>
2606 * graphite.c (graphite_stmt_p, new_gimple_bb, free_gimple_bb,
2607 remove_gbbs_in_scop, free_scops, try_generate_gimple_bb,
2608 build_scop_bbs, ref_nb_loops, compare_prefix_loops,
2609 build_scop_canonical_schedules, build_bb_loops, add_value_to_dim,
2610 scan_tree_for_params_right_scev, scan_tree_for_params_int,
2611 scan_tree_for_params, struct irp_data, dx_record_params,
2612 find_params_in_bb, find_scop_parameters, gbb_from_bb,
2613 build_loop_iteration_domains, add_conditions_to_domain,
2614 phi_node_is_iv, bb_contains_non_iv_scalar_phi_nodes,
2615 scop_contains_non_iv_scalar_phi_nodes, build_sese_conditions_1,
2616 build_sese_conditions, add_conditions_to_constraints,
2617 build_scop_iteration_domain, build_access_matrix_with_af,
2618 build_access_matrix,
2619 build_scop_data_accesses): Moved to graphite-sese-to-poly.c.
2621 * graphite-sese-to-poly.c: New.
2622 * graphite-sese-to-poly.h: New.
2624 * Makefile.in: Add new rule for graphite-sese-to-poly.o.
2626 2009-02-20 Sebastian Pop <sebastian.pop@amd.com>
2628 * graphite.c: Split graphite code generation to a new file.
2629 (graphite_verify, gmp_cst_to_tree, clast_name_to_gcc,
2630 max_precision_type, clast_to_gcc_expression_red,
2631 clast_to_gcc_expression, gcc_type_for_clast_expr,
2632 gcc_type_for_clast_eq, loop_iv_stack_patch_for_consts,
2633 graphite_translate_clast_equation, graphite_create_guard_cond_expr,
2634 graphite_create_new_guard, clast_get_body_of_loop,
2635 gcc_type_for_cloog_iv, gcc_type_for_iv_of_clast_loop,
2636 graphite_create_new_loop, build_iv_mapping, copy_renames,
2637 translate_clast, find_cloog_iv_in_expr, compute_cloog_iv_types_1,
2638 compute_cloog_iv_types, free_scattering, save_var_name,
2639 initialize_cloog_names, build_scop_context, build_cloog_prog,
2640 set_cloog_options, debug_clast_stmt, scop_to_clast,
2641 print_generated_program, debug_generated_program,
2642 gloog): Moved to graphite-clast-to-gimple.c.
2644 (struct cloog_prog_clast): Moved to graphite-clast-to-gimple.h.
2646 (iv_stack_entry_is_constant, iv_stack_entry_is_iv,
2647 loop_iv_stack_push_iv, loop_iv_stack_insert_constant,
2648 loop_iv_stack_pop, loop_iv_stack_get_iv,
2649 loop_iv_stack_get_iv_from_name, debug_loop_iv_stack,
2650 free_loop_iv_stack, loop_iv_stack_remove_constants,
2651 debug_rename_elt, debug_rename_map_1, debug_rename_map,
2652 rename_map_elt_info, eq_rename_map_elts, debug_ivtype_elt,
2653 debug_ivtype_map_1, debug_ivtype_map, ivtype_map_elt_info,
2654 eq_ivtype_map_elts, sese_add_exit_phis_edge,
2655 sese_add_exit_phis_var, sese_insert_phis_for_liveouts,
2656 get_vdef_before_sese, sese_adjust_vphi,
2657 get_new_name_from_old_name, sese_adjust_phis_for_liveouts,
2658 oldiv_for_loop, rename_variables_in_stmt, is_parameter,
2659 is_iv, expand_scalar_variables_ssa_name,
2660 expand_scalar_variables_expr, expand_scalar_variables_stmt,
2661 expand_scalar_variables, rename_variables, remove_condition,
2662 get_true_edge_from_guard_bb, get_false_edge_from_guard_bb,
2663 add_loop_exit_phis, insert_loop_close_phis, struct igp,
2664 default_liveout_before_guard, add_guard_exit_phis,
2665 insert_guard_phis, register_old_and_new_names,
2666 graphite_copy_stmts_from_block, register_sese_liveout_renames,
2667 copy_bb_and_scalar_dependences, outermost_loop_in_sese,
2668 if_region_set_false_region, create_if_region_on_edge,
2669 move_sese_in_condition): Moved to sese.c.
2671 (nb_loops_around_loop_in_sese, struct ifsese, if_region_entry,
2672 if_region_exit, if_region_get_condition_block,
2673 struct rename_map_elt, new_rename_map_elt, enum iv_stack_entry_kind,
2674 union iv_stack_entry_data_union, struct iv_stack_entry_struct,
2675 iv_stack_entry_p, loop_iv_stack, struct ivtype_map_elt,
2676 ivtype_map_elt, new_ivtype_map_elt,
2677 recompute_all_dominators): Moved to sese.h.
2679 * graphite-clast-to-gimple.c: New.
2680 * graphite-clast-to-gimple.h: New.
2681 * Makefile.in: Add new rule for graphite-clast-to-gimple.o.
2682 * sese.c: Modified as said above.
2685 2009-02-20 Sebastian Pop <sebastian.pop@amd.com>
2687 * graphite.c: Split scop detection to a new file.
2688 (enum gbb_type, gbb_type, get_bb_type, struct sd_region_p, sd_region,
2689 move_sd_regions, loop_affine_expr, exclude_component_ref,
2690 is_simple_operand, stmt_simple_for_scop_p, harmful_stmt_in_bb,
2691 graphite_cannot_represent_loop_niter, struct scopdet_info,
2692 scopdet_basic_block_info, build_scops_1, bb_in_sd_region,
2693 find_single_entry_edge, find_single_exit_edge,
2694 create_single_entry_edge, sd_region_without_exit,
2695 create_single_exit_edge, unmark_exit_edges, mark_exit_edges,
2696 create_sese_edges, build_graphite_scops, limit_scops, build_scops):
2697 Moved to graphite-scop-detection.c.
2699 * graphite-scop-detection.c: New.
2700 * graphite-scop-detection.h: New.
2701 * Makefile.in: Add new rule for graphite-scop-detection.o.
2703 * sese.c: Include tree-chrec.h, tree-data-ref.h, and
2704 tree-scalar-evolution.h.
2705 (nb_reductions_in_loop, graphite_loop_normal_form, sese_record_loop,
2706 build_sese_loop_nests): Moved here from graphite.c.
2707 (param_index): Renamed parameter_index_in_region.
2709 2009-02-18 Tobias Grosser <grosser@fim.uni-passau.de>
2710 Sebastian Pop <sebastian.pop@amd.com>
2712 * gcc.dg/graphite/block-0.c: Expected to fail now.
2713 * gcc.dg/graphite/block-1.c: Same.
2714 * gcc.dg/graphite/block-5.c: Same.
2715 * gcc.dg/graphite/block-6.c: Same.
2717 2009-02-18 Tobias Grosser <grosser@fim.uni-passau.de>
2718 Sebastian Pop <sebastian.pop@amd.com>
2720 * graphite.h: Separate from graphite_bb_p the polyhedral
2721 representation in poly_bb_p and the GCC specifics in gimple_bb_p.
2722 (struct data_dependence_polyhedron, RDGE_DDP, ddp_p): Moved to
2723 graphite-data-ref.h.
2724 (struct poly_bb, PBB_SCOP, PBB_STATIC_SCHEDULE, PBB_DOMAIN,
2725 PBB_BLACK_BOX, PBB_LOOPS, pbb_nb_loops, pbb_loop_at_index,
2726 pbb_loop_index, struct scop, SCOP_BBS, SCOP_REGION, SCOP_ENTRY,
2727 SCOP_EXIT, SCOP_REGION_BBS, SCOP_DEP_GRAPH, SCOP_PARAMS,
2728 SCOP_LOOP_NEST, SCOP_PARAMS, SCOP_OLDIVS, SCOP_LIVEOUT_RENAMES,
2729 scop_nb_params): Moved to graphite-poly.h.
2730 * graphite-data-ref.c: Same.
2731 * graphite-data-ref.h: New.
2733 (pbb_compare, graphite_sort_pbbs, graphite_trans_bb_move_loop,
2734 graphite_trans_bb_strip_mine, strip_mine_profitable_p,
2735 is_interchange_valid, graphite_trans_bb_block,
2736 graphite_trans_loop_block, scop_max_loop_depth,
2737 graphite_trans_scop_block, graphite_apply_transformations,
2738 new_poly_bb, free_poly_bb, new_scop, free_scop): Moved to
2740 * graphite-poly.h: New.
2741 * graphite-poly.c: New.
2742 * Makefile.in (OBJS-common): Add graphite-poly.o.
2743 (graphite-poly.o): New rule.
2744 * tree-data-ref.h (struct data_reference): Remove unused scop field.
2747 2009-02-18 Sebastian Pop <sebastian.pop@amd.com>
2748 Tobias Grosser <grosser@fim.uni-passau.de>
2750 * graphite.c: Replace gb -> gbb.
2752 * graphite-data-ref.c: Same.
2754 2009-02-18 Sebastian Pop <sebastian.pop@amd.com>
2755 Tobias Grosser <grosser@fim.uni-passau.de>
2757 * Makefile.in (OBJS-commmon): Add sese.o.
2759 (graphite.o): Add sese.h.
2760 * graphite.c (bb_in_ss_p, loop_in_sese_p,
2761 sese_build_livein_liveouts_use, sese_build_livein_liveouts_bb,
2762 sese_build_livein_liveouts, register_bb_in_sese, new_sese, free_sese):
2764 (block_before_scop): Add missing return.
2765 (new_scop, free_scop): Remove SESE data structures.
2766 (scop_record_loop, scan_tree_for_params, find_params_in_bb,
2767 find_scop_parameters, build_loop_iteration_domains,
2768 add_conditions_to_domain, register_scop_liveout_renames,
2769 copy_bb_and_scalar_dependences): Scop -> SESE.
2771 (add_conditions_to_domain): SCoP -> SESE and remove check
2772 (scop_contains_non_iv_scalar_phi_nodes): New.
2773 (build_scop_conditions_1, build_scop_conditions): Remove check for
2774 non iv scalar phi nodes.
2775 (print_scop_statistics): New.
2776 (graphite_transform_loops): Cleanup.
2778 * graphite.h: Move to sese & cleanup.
2782 2009-02-16 Sebastian Pop <sebastian.pop@amd.com>
2783 Tobias Grosser <grosser@fim.uni-passau.de>
2785 * graphite.c (build_scop_conditions_1): Conditions are only
2786 at the end of a basic block.
2788 2009-02-16 Sebastian Pop <sebastian.pop@amd.com>
2789 Tobias Grosser <grosser@fim.uni-passau>
2791 * graphite.h (struct graphite_bb): Remove compressed_alpha_matrix
2793 (GBB_ALPHA): Removed.
2795 2009-02-16 Sebastian Pop <sebastian.pop@amd.com>
2796 Tobias Grosser <grosser@fim.uni-passau.de>
2798 * graphite-data-ref.c (graphite_test_dependence): Don't use
2799 GBB_DYNAMIC_SCHEDULE.
2800 * graphite.c (new_graphite_bb): Same.
2801 (free_graphite_bb): Same.
2802 (build_scop_dynamic_schedules): Removed.
2803 (graphite_transform_loops): Don't call it.
2804 * graphite.h (struct graphite_bb): Remove dynamic_schedule field.
2805 (GBB_DYNAMIC_SCHEDULE): Removed.
2807 2009-02-16 Sebastian Pop <sebastian.pop@amd.com>
2808 Tobias Grosser <grosser@fim.uni-passau.de>
2810 * graphite.c (schedule_to_scattering): Don't use CloogMatrix.
2811 (print_graphite_bb): Same.
2812 (build_cloog_prog): Same.
2814 2009-02-16 Sebastian Pop <sebastian.pop@amd.com>
2815 Tobias Grosser <grosser@fim.uni-passau.de>
2817 * graphite.c (build_cloog_prog): Don't use CloogMatrix.
2819 2009-02-16 Sebastian Pop <sebastian.pop@amd.com>
2820 Tobias Grosser <grosser@fim.uni-passau.de>
2822 * graphite.c (build_scop_context): Don't use CloogMatrix.
2823 * graphite-ppl.c (new_Cloog_Domain_from_ppl_Polyhedron): New.
2824 * graphite-ppl.h (new_Cloog_Domain_from_ppl_Polyhedron): Declared.
2826 2009-02-16 Sebastian Pop <sebastian.pop@amd.com>
2827 Tobias Grosser <grosser@fim.uni-passau.de>
2829 * graphite.h (struct scop): Move params, old_ivs, loops, loop_nest,
2830 liveout_renames, add_params fields...
2831 (struct sese): ... here.
2832 (SESE_PARAMS, SESE_LOOPS, SESE_LOOP_NEST, SESE_ADD_PARAMS,
2833 SESE_PARAMS, SESE_OLDIVS, SESE_LIVEOUT_RENAMES): New.
2835 2009-02-16 Sebastian Pop <sebastian.pop@amd.com>
2836 Tobias Grosser <grosser@fim.uni-passau.de>
2838 * graphite.c (print_scop): Do not print the CLooG program.
2839 (new_scop, free_scop, initialize_cloog_names, build_scop_context,
2840 build_cloog_prog, gloog): Don't use SCOP_PROG.
2841 (find_transform): Renamed scop_to_clast.
2842 (print_generated_program, debug_generated_program): New.
2843 (graphite_transform_loops): Adapt to new interface.
2844 * graphite.h (struct scop): Remove program field.
2845 (SCOP_PROG): Removed.
2846 (print_generated_program, debug_generated_program): Declared.
2848 2009-02-16 Sebastian Pop <sebastian.pop@amd.com>
2850 * graphite-data-ref.c (schedule_precedes_p, schedule_same_p): New.
2851 (statement_precedes_p): Use schedule_same_p and schedule_precedes_p.
2852 * graphite.c (gbb_compare, schedule_to_scattering, print_graphite_bb,
2853 free_graphite_bb, build_scop_canonical_schedules,
2854 graphite_trans_bb_strip_mine, graphite_trans_scop_block): Static
2855 schedules are now represented using a ppl_Linear_Expression_t.
2856 * graphite.h (struct graphite_bb): Same.
2857 * graphite-ppl.c (ppl_lexico_compare_linear_expressions): New.
2858 * graphite-ppl.h (ppl_lexico_compare_linear_expressions): Declared.
2860 2009-02-15 Sebastian Pop <sebastian.pop@amd.com>
2862 * graphite.c: Free local memory.
2863 * graphite-ppl.c: Same.
2865 2009-02-15 Sebastian Pop <sebastian.pop@amd.com>
2867 * graphite.c (const_column_index, get_first_matching_sign_row_index,
2868 get_lower_bound_row, get_upper_bound_row, copy_constraint,
2869 swap_constraint_variables, scale_constraint_variable): Removed.
2870 (graphite_trans_bb_strip_mine): Remove pong.
2871 * graphite-ppl.c: Include missing header files.
2872 (set_inhomogeneous, set_coef, shift_poly, ppl_strip_loop): New.
2873 * graphite-ppl.h (ppl_strip_loop): Declared.
2874 * Makefile.in (graphite-ppl.o): Adjust dependences.
2876 2009-02-14 Sebastian Pop <sebastian.pop@amd.com>
2878 * graphite.c (build_loop_iteration_domains): Remove ping pong.
2879 (build_scop_iteration_domain): Same.
2881 2009-02-13 Sebastian Pop <sebastian.pop@amd.com>
2883 * graphite.c (scan_tree_for_params, add_conditions_to_domain): Remove
2885 (add_value_to_dim, scan_tree_for_params_right_scev,
2886 scan_tree_for_params_int): New.
2887 * graphite-ppl.c (oppose_constraint): New.
2888 (insert_constraint_into_matrix): Implement missing cases.
2889 * graphite-ppl.h (insert_constraint_into_matrix): Declared.
2891 2009-02-13 Sebastian Pop <sebastian.pop@amd.com>
2893 * graphite.c (graphite_trans_bb_move_loop): Remove ping pong,
2894 use ppl_move_dimension.
2896 2009-02-12 Sebastian Pop <sebastian.pop@amd.com>
2898 * graphite-data-ref.c: Domains are now ppl_Polyhedra_t.
2901 * graphite-ppl.c: Same.
2902 * graphite-ppl.h: Same.
2904 2009-02-12 Sebastian Pop <sebastian.pop@amd.com>
2906 Revert last 3 commits.
2908 2009-02-10 Sebastian Pop <sebastian.pop@amd.com>
2910 * graphite.c (scan_tree_for_params, add_conditions_to_domain): Remove
2912 (add_value_to_dim, scan_tree_for_params_right_scev,
2913 scan_tree_for_params_int): New.
2914 * graphite-ppl.c (oppose_constraint): New.
2915 (insert_constraint_into_matrix): Implement missing cases.
2916 * graphite-ppl.h (insert_constraint_into_matrix): Declared.
2918 2009-02-10 Sebastian Pop <sebastian.pop@amd.com>
2920 * graphite.c (graphite_trans_bb_move_loop): Remove unused variables.
2922 2009-02-10 Sebastian Pop <sebastian.pop@amd.com>
2923 Tobias Grosser <grosser@fim.uni-passau.de>
2925 * graphite.c (graphite_trans_bb_move_loop): Remove ping pong,
2926 use ppl_move_dimension.
2927 * graphite-ppl.c (ppl_move_dimension): New.
2928 * graphite-ppl.h (ppl_move_dimension): Declared.
2930 2009-02-10 Sebastian Pop <sebastian.pop@amd.com>
2932 * graphite.c: Do not include cloog/cloog.h.
2933 (print_graphite_bb): Remove ping pong, call PPL print function.
2935 2009-02-10 Tobias Grosser <grosser@fim.uni-passau.de>
2937 * Makefile.in (OBJS-common): Add graphite-ppl.o.
2938 (graphite.o): Add dependence on graphite-ppl.h.
2939 (graphite-ppl.o): New.
2940 (graphite-data-ref.c): Ping pong between PPL data structures
2942 * graphite-ppl.c: New.
2943 * graphite-ppl.h: New.
2944 * graphite.c: Include graphite-ppl.h.
2945 (print_graphite_bb, add_conditions_to_domain, build_cloog_prog,
2946 graphite_trans_bb_move_loop, graphite_trans_bb_strip_mine):
2947 Ping pong between PPL data structures and matrices.
2948 (new_graphite_bb): Create a PPL constraint system.
2949 Call ppl_delete_Constraint_System instead of cloog_matrix_free.
2950 (build_loop_iteration_domains): Use PPL functions.
2951 * graphite.h: Include graphite-ppl.h. Fix comments.
2952 (graphite_bb): Use a ppl_Constraint_System_t instead of
2953 CloogMatrix for representing the domain.
2954 (scop): Remove static_schedule.
2955 (gbb_nb_loops): Ping pong between PPL data structures and matrices.
2957 2009-02-06 Sebastian Pop <sebastian.pop@amd.com>
2959 * graphite.c: Fix some comments.
2961 2009-02-05 Sebastian Pop <sebastian.pop@amd.com>
2964 * graphite.c (if_region_set_false_region): After moving a region
2965 in the false branch of a condition, remove the empty dummy
2967 (gloog): Remove wrong fix for PR38953.
2969 2009-02-03 Tobias Grosser <grosser@fim.uni-passau.de>
2971 * graphite.c (bb_in_sese_p, sese_build_livein_liveouts_use,
2972 sese_build_livein_liveouts_bb, sese_build_livein_liveouts,
2973 register_bb_in_sese, new_sese, free_sese): Moved.
2974 (dot_scop_1, build_scop_loop_nests, build_loop_iteration_domains,
2975 outermost_loop_in_scop, build_scop_iteration_domain,
2976 expand_scalar_variables_ssa_name, get_vdef_before_scop,
2977 limit_scops): Use bb_in_sese_p instead of bb_in_scop_p.
2978 Use loop_in_sese_p instead of loop_in_scop_p.
2979 (new_graphite_bb, new_scop, gloog): Do not initialize SCOP_BBS_B.
2980 (free_scop): Do not free SCOP_BBS_B.
2981 (nb_loops_around_loop_in_scop, nb_loops_around_gb,
2982 ref_nb_loops): Moved here...
2983 * graphite.h (ref_nb_loops): ... from here.
2984 (struct scop): Remove bbs_b bitmap.
2985 (SCOP_BBS_B, bb_in_scop_p, loop_in_scop_p): Removed.
2986 * testsuite/gcc.dg/graphite/scop-19.c: New
2988 2009-02-03 Tobias Grosser <grosser@fim.uni-passau.de>
2990 * graphite.c (scopdet_basic_block_info): Fix bug in scop
2993 2009-01-30 Tobias Grosser <grosser@fim.uni-passau.de>
2995 * graphite.c (new_loop_to_cloog_loop_str, hash_loop_to_cloog_loop,
2996 eq_loop_to_cloog_loop): Remove.
2997 (new_scop, free_scop): Remove SCOP_LOOP2CLOOG_LOOP.
2998 * graphite.h (struct scop): Remove loop2cloog_loop.
2999 (loop_domain_dim, loop_iteration_vector_dim): Remove.
3001 2009-01-30 Tobias Grosser <grosser@fim.uni-passau.de>
3003 * opts.c (decode_options): Only add graphite options to O2
3004 if we compile with graphite enabled.
3006 2009-01-26 Sebastian Pop <sebastian.pop@amd.com>
3008 * Merge from mainline (r143163:143684).
3010 2009-01-26 Sebastian Pop <sebastian.pop@amd.com>
3012 * graphite.c (debug_value): Removed.
3013 * graphite.h (debug_value): Removed.
3015 2009-01-23 Sebastian Pop <sebastian.pop@amd.com>
3017 * passes.c (init_optimization_passes): Do not call pass_copy_prop
3018 after graphite: pass_copy_prop does not maintain a proper loop closed
3019 SSA form. pass_copy_prop should be fixed.
3021 2009-01-23 Sebastian Pop <sebastian.pop@amd.com>
3023 * graphite.c (scop_adjust_phis_for_liveouts): Fix warning.
3025 2009-01-23 Sebastian Pop <sebastian.pop@amd.com>
3027 * graphite.c (graphite_verify): Add a call to verify_loop_closed_ssa.
3028 (gloog): Split the exit of the scop when the scop exit is a loop exit.
3029 (graphite_transform_loops): Only call cleanup_tree_cfg if gloog
3032 2009-01-20 Sebastian Pop <sebastian.pop@amd.com>
3034 * graphite.c (gloog): Return true when code gen succeeded.
3035 (graphite_transform_loops): Do not call cleanup_tree_cfg if
3036 the code of the function did not changed. After cleanup_tree_cfg
3037 call rewrite_into_loop_closed_ssa to maintain the loop closed ssa
3040 2009-01-19 Sebastian Pop <sebastian.pop@amd.com>
3042 * graphite.c (stmt_simple_for_scop_p): Also handle cases when
3043 gimple_call_lhs is NULL.
3045 2009-01-16 Sebastian Pop <sebastian.pop@amd.com>
3046 Tobias Grosser <tobi.grosser@amd.com>
3048 * graphite.c (graphite_trans_scop_block): Do not block single
3051 2009-01-15 Sebastian Pop <sebastian.pop@amd.com>
3052 Tobias Grosser <tobi.grosser@amd.com>
3054 * graphite.c (build_scop_canonical_schedules): Start schedules at
3057 2009-01-15 Sebastian Pop <sebastian.pop@amd.com>
3058 Tobias Grosser <tobi.grosser@amd.com>
3060 * graphite.c (compare_prefix_loops): New.
3061 (build_scop_canonical_schedules): Rewritten.
3062 (graphite_transform_loops): Move build_scop_canonical_schedules
3063 after build_scop_iteration_domain.
3065 2009-01-14 Sebastian Pop <sebastian.pop@amd.com>
3066 Tobias Grosser <tobi.grosser@amd.com>
3068 * graphite.c (add_conditions_to_domain): Add the loops to
3069 the dimension of the iteration domain. Do copy the domain
3070 only when it exists.
3071 (build_scop_conditions_1): Do not call add_conditions_to_domain.
3072 (add_conditions_to_constraints): New.
3073 (can_generate_code_stmt, can_generate_code): Removed.
3074 (gloog): Do not call can_generate_code.
3075 (graphite_transform_loops): Call add_conditions_to_constraints
3076 after building the iteration domain.
3078 2009-01-14 Sebastian Pop <sebastian.pop@amd.com>
3079 Tobias Grosser <tobi.grosser@amd.com>
3080 Jan Sjodin <jan.sjodin@amd.com>
3082 * graphite.c (scan_tree_for_params): On substractions negate
3083 all the coefficients of the term.
3084 (clast_to_gcc_expression_red): New. Handle reduction expressions
3085 of more than two operands.
3086 (clast_to_gcc_expression): Call clast_to_gcc_expression_red.
3087 (get_vdef_before_scop): Handle also the case of default definitions.
3089 2009-01-14 Sebastian Pop <sebastian.pop@amd.com>
3092 * graphite.c (get_vdef_before_scop, scop_adjust_vphi): New.
3093 (scop_adjust_phis_for_liveouts): Call scop_adjust_vphi.
3094 (gloog): Do not call cleanup_tree_cfg.
3095 (graphite_transform_loops): Call cleanup_tree_cfg after all
3096 scops have been code generated.
3098 2009-01-13 Sebastian Pop <sebastian.pop@amd.com>
3100 * passes.c (init_optimization_passes): Schedule after
3101 graphite transforms pass_copy_prop, pass_dce_loop and pass_lim.
3103 2009-01-13 Sebastian Pop <sebastian.pop@amd.com>
3105 * graphite.c (expand_scalar_variables_stmt): Do not pass loop_p.
3107 (expand_scalar_variables_ssa_name): Do not pass loop_p. Fix comment.
3108 Set the type of an expression to the type of its assign statement.
3109 (expand_scalar_variables_expr): Do not pass loop_p.
3110 Fix comment. Stop recursion on tcc_constant or tcc_declaration.
3111 (copy_bb_and_scalar_dependences): Do not pass loop_p.
3112 (translate_clast): Update call to copy_bb_and_scalar_dependences.
3114 2009-01-11 Sebastian Pop <sebastian.pop@amd.com>
3116 * graphite.c (expand_scalar_variables_ssa_name): Set the type of
3117 an expression to the gimple_expr_type of its assign statement.
3118 (expand_scalar_variables_expr): Stop recursion on tcc_constant
3121 2009-01-11 Sebastian Pop <sebastian.pop@amd.com>
3123 PR tree-optimization/38786
3124 * testsuite/gcc.dg/graphite/pr38786.c: New.
3125 * graphite.c (expand_scalar_variables_ssa_name): New, outlined from
3126 the SSA_NAME case of expand_scalar_variables_expr.
3127 (expand_scalar_variables_expr): Also gather the scalar computation
3128 used to index the memory access.
3129 (expand_scalar_variables_stmt): Pass to expand_scalar_variables_expr
3130 the gimple_stmt_iterator where it inserts new code.
3132 2009-01-10 Sebastian Pop <sebastian.pop@amd.com>
3134 * testsuite/gcc.dg/graphite/block-3.c: Fix compile error on 32bit.
3136 2009-01-10 Sebastian Pop <sebastian.pop@amd.com>
3138 * opts.c (decode_options): Enable flag_graphite_identity and
3139 flag_loop_block in -O2 and above.
3141 2009-01-08 Sebastian Pop <sebastian.pop@amd.com>
3143 * libjava/classpath/lib/gnu/java/awt/peer/gtk/GtkMouseInfoPeer.class:
3144 Fix merge problem: replace with the file from trunk.
3146 2009-01-08 Sebastian Pop <sebastian.pop@amd.com>
3148 * Merge from mainline (r141727:143163).
3150 2009-01-07 Sebastian Pop <sebastian.pop@amd.com>
3151 Jan Sjodin <jan.sjodin@amd.com>
3153 PR tree-optimization/38559
3154 * testsuite/gcc.dg/graphite/pr38559.c: New.
3156 * graphite.c (debug_value, copy_constraint,
3157 swap_constraint_variables, scale_constraint_variable, ): New.
3158 (get_lower_bound, get_upper_bound): Removed.
3159 (graphite_trans_bb_strip_mine): Clean up this code that works
3160 only for constant number of iterations. Fully copy upper and
3161 lower bound constraints, not only the constant part of them.
3162 * graphite.h (debug_value): Declared.
3164 2009-01-06 Jan Sjodin <jan.sjodin@amd.com>
3166 PR tree-optimization/38492
3167 PR tree-optimization/38498
3168 * tree-check.c (operator_is_linear, scev_is_linear_expression): New.
3169 * tree-chrec.h (scev_is_linear_expression): Declared.
3170 * graphite.c (graphite_cannot_represent_loop_niter): New.
3171 (scopdet_basic_block_info): Call graphite_cannot_represent_loop_niter.
3172 (graphite_loop_normal_form): Use gcc_assert.
3173 (scan_tree_for_params): Use CASE_CONVERT.
3174 (phi_node_is_iv, bb_contains_non_iv_scalar_phi_nodes): New.
3175 (build_scop_conditions_1): Call bb_contains_non_iv_scalar_phi_nodes.
3176 Use gcc_assert. Discard scops that contain unhandled cases.
3177 (build_scop_conditions): Return a boolean status for unhandled cases.
3178 (strip_mine_profitable_p): Print the loop number, not its depth.
3179 (is_interchange_valid): Pass the depth of the loop nest, don't
3180 recompute it wrongly.
3181 (graphite_trans_bb_block): Same.
3182 (graphite_trans_bb_block): Print tentative of loop blocking.
3183 (graphite_trans_scop_block): Do not print that the loop has been
3185 (graphite_transform_loops): Do not handle scops that contain condition
3188 * testsuite/gcc.dg/graphite/pr38500.c: Fixed warning as committed
3190 * testsuite/gcc.dg/graphite/block-0.c: Update test.
3191 * testsuite/gcc.dg/graphite/block-1.c: Same.
3192 * testsuite/gcc.dg/graphite/block-2.c: Remove xfail and test for
3194 * testsuite/gcc.dg/graphite/block-4.c: Remove test for strip mine.
3195 * testsuite/gcc.dg/graphite/block-3.c: New.
3196 * testsuite/gcc.dg/graphite/pr38498.c: New.
3198 2008-12-22 Harsha Jagasia <harsha.jagasia@amd.com>
3200 PR tree-optimization/38510
3201 * gcc.dg/graphite/pr38510.c: New.
3202 * graphite.c (recompute_all_dominators): Call mark_irreducible_loops.
3203 (translate_clast): Call recompute_all_dominators before
3205 (gloog): Call recompute_all_dominators before graphite_verify.
3207 2008-12-12 Sebastian Pop <sebastian.pop@amd.com>
3209 PR tree-optimization/38492
3210 * graphite.c (rename_map_elt, debug_rename_elt,
3211 debug_rename_map_1, debug_rename_map, new_rename_map_elt,
3212 rename_map_elt_info, eq_rename_map_elts,
3213 get_new_name_from_old_name, bb_in_sese_p): Moved around.
3214 (sese_find_uses_to_rename_use): Renamed sese_build_livein_liveouts_use.
3215 (sese_find_uses_to_rename_bb): Renamed sese_build_livein_liveouts_bb.
3216 (sese_build_livein_liveouts): New.
3217 (new_sese, free_sese): New.
3218 (new_scop): Call new_sese.
3219 (free_scop): Call free_sese.
3220 (rename_variables_from_edge, rename_phis_end_scop): Removed.
3221 (register_old_new_names): Renamed register_old_and_new_names.
3222 (register_scop_liveout_renames, add_loop_exit_phis,
3223 insert_loop_close_phis, struct igp,
3224 default_liveout_before_guard, add_guard_exit_phis,
3225 insert_guard_phis, copy_renames): New.
3226 (translate_clast): Call insert_loop_close_phis and insert_guard_phis.
3227 (sese_add_exit_phis_edge): Renamed scop_add_exit_phis_edge.
3228 (rewrite_into_sese_closed_ssa): Renamed scop_insert_phis_for_liveouts.
3229 (scop_adjust_phis_for_liveouts): New.
3230 (gloog): Call scop_adjust_phis_for_liveouts.
3232 * graphite.h (struct sese): Documented. Added fields liveout,
3234 (SESE_LIVEOUT, SESE_LIVEIN, SESE_LIVEIN_VER, SESE_NUM_VER): New.
3235 (new_sese, free_sese, sese_build_livein_liveouts): Declared.
3236 (struct scop): Added field liveout_renames.
3237 (SCOP_LIVEOUT_RENAMES): New.
3239 2008-12-11 Sebastian Pop <sebastian.pop@amd.com>
3241 PR tree-optimization/38409
3242 * gcc.dg/graphite/pr38409.c: New.
3243 * graphite.c (nb_reductions_in_loop): Use simple_iv.
3245 2008-12-11 Sebastian Pop <sebastian.pop@amd.com>
3247 * graphite.c (gcc_type_for_cloog_iv): By default return
3249 (graphite_create_new_loop): Don't fold_convert the already
3250 fold_convert-ed expression.
3252 2008-12-11 Harsha Jagasia <harsha.jagasia@amd.com>
3254 PR tree-optimization/38446
3255 * gcc.dg/graphite/pr38446.c: New.
3256 * graphite.c (register_bb_in_sese): New.
3257 (bb_in_sese_p): Check if bb belongs to sese region by explicitly
3258 looking at the bbs in the region.
3259 * graphite.h (sese): Add region_basic_blocks pointer set to
3260 structure and initialize at the time of defining new scop.
3262 2008-12-11 Tobias Grosser <grosser@fim.uni-passau.de>
3264 * graphite.c (new_graphite_bb): Initialize GBB_STATIC_SCHEDULE.
3265 (find_params_in_bb): Do not free data refs.
3266 (free_graphite_bb): Add FIXME on disabled free_data_refs.
3268 2008-12-11 Sebastian Pop <sebastian.pop@amd.com>
3270 * testsuite/gcc.dg/graphite/scop-16.c: Test only scop specific info.
3271 * testsuite/gcc.dg/graphite/scop-17.c: Same.
3272 * testsuite/gcc.dg/graphite/block-5.c: New.
3273 * testsuite/gcc.dg/graphite/block-6.c: New.
3274 * testsuite/gcc.dg/graphite/pr37485.c: Clean dump file after.
3275 * testsuite/gcc.dg/graphite/pr37684.c: Same.
3276 * testsuite/gcc.dg/graphite/block-2.c: Same.
3278 * graphite.c (struct ivtype_map_elt): New.
3279 (debug_ivtype_elt, debug_ivtype_map_1, debug_ivtype_map,
3280 new_ivtype_map_elt, ivtype_map_elt_info, eq_ivtype_map_elts,
3281 gcc_type_for_cloog_iv): New.
3282 (loop_iv_stack_patch_for_consts): Use the type of the induction
3283 variable from the original loop, except for the automatically
3284 generated loops, i.e., in the case of a strip-mined loop, in
3285 which case there is no original loop: in that case just use
3287 (new_graphite_bb): Initialize GBB_CLOOG_IV_TYPES.
3288 (free_graphite_bb): Free GBB_CLOOG_IV_TYPES.
3289 (clast_name_to_gcc): Accept params to be NULL.
3290 (clast_to_gcc_expression): Take an extra parameter for the type.
3291 Convert to that type all the expressions built by this function.
3292 (gcc_type_for_clast_expr, gcc_type_for_clast_eq): New.
3293 (graphite_translate_clast_equation): Compute the type of the
3294 clast_equation before translating its LHS and RHS.
3295 (clast_get_body_of_loop, gcc_type_for_iv_of_clast_loop): New.
3296 (graphite_create_new_loop): Compute the type of the induction
3297 variable before translating the lower and upper bounds and before
3298 creating the induction variable.
3299 (rename_variables_from_edge, rename_phis_end_scop): New.
3300 (copy_bb_and_scalar_dependences): Call rename_phis_end_scop.
3301 (sese_add_exit_phis_edge): Do not use integer_zero_node.
3302 (find_cloog_iv_in_expr, compute_cloog_iv_types_1,
3303 compute_cloog_iv_types): New.
3304 (gloog): Call compute_cloog_iv_types before starting the
3305 translation of the clast.
3307 * graphite.h (struct graphite_bb): New field cloog_iv_types.
3308 (GBB_CLOOG_IV_TYPES): New.
3309 (debug_ivtype_map): Declared.
3310 (oldiv_for_loop): New.
3312 2008-12-10 Tobias Grosser <grosser@fim.uni-passau.de>
3315 * graphite.c (new_scop): Initialize SCOP_ADD_PARAMS.
3316 (param_index): Assert if parameter is not know after parameter
3318 (find_params_in_bb): Detect params directly in GBB_CONDITIONS.
3319 (find_scop_parameters): Mark, that we have finished parameter
3321 (graphite_transform_loops): Move condition detection before parameter
3323 * graphite.h (struct scop): Add SCOP_ADD_PARAMS.
3324 * testsuite/gfortran.dg/graphite/pr38459.f90: New.
3326 2008-12-09 Tobias Grosser <grosser@fim.uni-passau.de>
3328 * graphite.c (graphite_transform_loops): Always call find_transform ()
3329 in ENABLE_CHECKING. So we test these code paths, even if we do not
3332 2008-12-09 Tobias Grosser <grosser@fim.uni-passau.de>
3334 * graphite.c (print_graphite_bb): Fix printing to file != dump_file.
3335 (print_scop): Ditto.
3337 2008-12-08 Tobias Grosser <grosser@fim.uni-passau.de>
3340 Fix testsuite/gfortran.dg/graphite/id-3.f90.
3341 * graphite.c (scopdet_basic_block_info): Fix bug that found some
3342 regions more than once.
3344 2008-12-03 Sebastian Pop <sebastian.pop@amd.com>
3346 Fix testsuite/gfortran.dg/graphite/id-4.f90.
3347 * graphite.c (scan_tree_for_params): Do not compute the multiplicand
3350 2008-12-03 Sebastian Pop <sebastian.pop@amd.com>
3352 Fix testsuite/gfortran.dg/graphite/id-1.f90.
3353 * graphite.c (gmp_cst_to_tree): Pass the type in parameter.
3354 (loop_iv_stack_patch_for_consts): Update use of gmp_cst_to_tree.
3355 (max_precision_type): New.
3356 (value_clast): Removed.
3357 (clast_to_gcc_expression): Be more careful to types of expressions.
3358 Use max_precision_type and update use of gmp_cst_to_tree.
3359 (graphite_translate_clast_equation): Use max_precision_type.
3360 (graphite_create_guard_cond_expr): Do not use integer_type_node,
3361 use the type of the condition.
3362 (graphite_create_new_loop): Do not use integer_type_node, use the
3363 max_precision_type of lb and ub.
3365 2008-12-03 Sebastian Pop <sebastian.pop@amd.com>
3367 * graphite.c (build_scops_1): Initialize open_scop.exit
3370 2008-12-02 Sebastian Pop <sebastian.pop@amd.com>
3372 * testsuite/gcc.dg/graphite/pr38084.c: New.
3373 * testsuite/gfortran.dg/graphite/id-1.f90: New.
3374 * testsuite/gfortran.dg/graphite/id-2.f90: New.
3375 * testsuite/gfortran.dg/graphite/id-3.f90: New.
3376 * testsuite/gfortran.dg/graphite/id-4.f90: New.
3377 * testsuite/gfortran.dg/graphite/pr37857.f90: New.
3379 2008-12-02 Sebastian Pop <sebastian.pop@amd.com>
3380 Jan Sjodin <jan.sjodin@amd.com>
3381 Harsha Jagasia <harsha.jagasia@amd.com>
3393 * testsuite/gcc.dg/graphite/pr38073.c: New.
3394 * testsuite/gcc.dg/graphite/pr37928.c: New.
3395 * testsuite/gcc.dg/graphite/pr37883.c: New.
3396 * testsuite/gcc.dg/graphite/pr38125.c: New.
3397 * testsuite/gfortran.dg/graphite/pr38083.f90: New.
3398 * testsuite/gfortran.dg/graphite/pr37852.f90: New.
3399 * testsuite/gfortran.dg/graphite/pr37980.f90: New.
3401 * testsuite/gcc.dg/graphite/scop-18.c: Remove reduction, test for
3402 the number of detected scops. Copy exact same test for loop
3404 * testsuite/gcc.dg/graphite/block-1.c: Fix the number of expected
3405 loops to be blocked as reductions are not handled.
3406 * testsuite/gcc.dg/graphite/block-4.c: ...here. New.
3408 * tree-phinodes.c (remove_phi_nodes): New, extracted from...
3409 * tree-cfg.c (remove_phi_nodes_and_edges_for_unreachable_block):
3411 * tree-flow.h (remove_phi_nodes, canonicalize_loop_ivs): Declared.
3412 * Makefile.in (graphite.o): Depend on value-prof.h.
3413 (graphite.o-warn): Removed -Wno-error.
3414 * tree-parloops.c (canonicalize_loop_ivs): Allow reduction_list
3415 to be a NULL pointer. Call update_stmt. Return the newly created
3416 cannonical induction variable.
3418 * graphite.h (debug_rename_map): Declared. Fix some comments.
3420 * graphite.c: Reimplement the code generation from graphite to gimple.
3421 Include value-prof.h.
3422 (loop_iv_stack_get_iv): Do not return NULL for constant substitutions.
3423 (get_old_iv_from_ssa_name): Removed.
3424 (graphite_stmt_p): New.
3425 (new_graphite_bb): Test for useful statements before building a
3426 graphite statement for the basic block.
3427 (free_graphite_bb): Do not free GBB_DATA_REFS: this is a bug
3428 in free_data_ref that calls BITMAP_FREE (DR_VOPS (dr)) without
3430 (recompute_all_dominators, graphite_verify,
3431 nb_reductions_in_loop, graphite_loop_normal_form): New.
3432 (scop_record_loop): Call graphite_loop_normal_form.
3433 (build_scop_loop_nests): Iterate over all the blocks of the
3434 function instead of relying on the incomplete information from
3435 SCOP_BBS. Return the success of the operation.
3436 (find_params_in_bb): Use the data from GBB_DATA_REFS.
3437 (add_bb_domains): Removed.
3438 (build_loop_iteration_domains): Don't call add_bb_domains.
3439 Add the iteration domain only to the basic blocks that have been
3440 translated to graphite.
3441 (build_scop_conditions_1): Add constraints only if the basic
3442 block have been translated to graphite.
3443 (build_scop_data_accesses): Completely disabled until data
3444 dependence is correctly implemented.
3445 (debug_rename_elt, debug_rename_map_1, debug_rename_map): New.
3446 (remove_all_edges_1, remove_all_edges): Removed.
3447 (get_new_name_from_old_name): New.
3448 (graphite_rename_variables_in_stmt): Renamed
3449 rename_variables_in_stmt. Call get_new_name_from_old_name.
3450 Use replace_exp and update_stmt.
3451 (is_old_iv): Renamed is_iv.
3452 (expand_scalar_variables_stmt): Extra parameter for renaming map.
3453 Use replace_exp and update_stmt.
3454 (expand_scalar_variables_expr): Same. Use the map to get the
3455 new names for the renaming of induction variables and for the
3456 renaming of variables after a basic block has been copied.
3457 (expand_scalar_variables): Same.
3458 (graphite_rename_variables): Renamed rename_variables.
3459 (move_phi_nodes): Removed.
3460 (get_false_edge_from_guard_bb): New.
3461 (build_iv_mapping): Do not insert the induction variable of a
3462 loop in the renaming iv map if the basic block does not belong
3464 (register_old_new_names, graphite_copy_stmts_from_block,
3465 copy_bb_and_scalar_dependences): New.
3466 (translate_clast): Heavily reimplemented: copy basic blocks,
3467 do not move them. Finally, in call cleanup_tree_cfg in gloog.
3468 At each translation step call graphite_verify ensuring the
3469 consistency of the SSA, loops and dominators information.
3470 (collect_virtual_phis, find_vdef_for_var_in_bb,
3471 find_vdef_for_var_1, find_vdef_for_var,
3472 patch_phis_for_virtual_defs): Removed huge hack.
3473 (mark_old_loops, remove_dead_loops, skip_phi_defs,
3474 collect_scop_exit_phi_args, patch_scop_exit_phi_args,
3475 gbb_can_be_ignored, scop_remove_ignoreable_gbbs, ): Removed.
3476 (remove_sese_region, ifsese, if_region_entry, if_region_exit,
3477 if_region_get_condition_block, if_region_set_false_region,
3478 create_if_region_on_edge, move_sese_in_condition, bb_in_sese_p,
3479 sese_find_uses_to_rename_use, sese_find_uses_to_rename_bb,
3480 sese_add_exit_phis_edge, sese_add_exit_phis_var,
3481 rewrite_into_sese_closed_ssa): New.
3482 (gloog): Remove dead code. Early return if code cannot be
3483 generated. Call cleanup_tree_cfg once the scop has been code
3485 (graphite_trans_scop_block, graphite_trans_loop_block): Do not
3486 block loops with less than two loops.
3487 (graphite_apply_transformations): Remove the call to
3488 scop_remove_ignoreable_gbbs.
3489 (limit_scops): When build_scop_loop_nests fails, continue on
3490 the next scop. Fix open_scop.entry.
3491 (graphite_transform_loops): Call recompute_all_dominators: force the
3492 recomputation of correct CDI_DOMINATORS and CDI_POST_DOMINATORS.
3493 Call initialize_original_copy_tables and free_original_copy_tables
3494 to be able to copy basic blocks during code generation.
3495 When build_scop_loop_nests fails, continue on next scop.
3496 (value_clast): New union.
3497 (clast_to_gcc_expression): Fix type cast warning.
3499 2008-11-09 Sebastian Pop <sebastian.pop@amd.com>
3501 * Merge from mainline (r140838:141727).
3503 2008-11-05 Tobias Grosser <grosser@fim.uni-passau.de>
3507 * graphite.c (scan_tree_for_params): Add POINTER_PLUS_EXPR.
3509 2008-11-05 Tobias Grosser <grosser@fim.uni-passau.de>
3513 * graphite.c (scopdet_basic_block_info): Fix loops with multiple
3514 exits and conditions.
3515 * testsuite/gcc.dg/graphite/pr37943.c: New.
3517 2008-10-23 Tobias Grosser <grosser@fim.uni-passau.de>
3520 * graphite.c (gloog): Replace EXIT_BLOCK_PTR with scop exit.
3522 2008-10-23 Tobias Grosser <grosser@fim.uni-passau.de>
3524 * doc/invoke.texi: Fix spaces.
3526 2008-10-22 Sebastian Pop <sebastian.pop@amd.com>
3528 PR tree-optimization/37891
3529 Reverted last commit.
3530 * graphite.c (create_single_entry_edge): Set
3531 EDGE_IRREDUCIBLE_LOOP and BB_IRREDUCIBLE_LOOP.
3533 2008-10-21 Sebastian Pop <sebastian.pop@amd.com>
3534 Mitul Thakkar <mitul.thakkar@amd.com>
3536 * graphite.c (create_single_entry_edge): Set
3537 EDGE_IRREDUCIBLE_LOOP and BB_IRREDUCIBLE_LOOP.
3539 2008-10-16 Tobias Grosser <grosser@fim.uni-passau.de>
3541 * doc/invoke.texi: Add -fgraphite-identity.
3542 * graphite.c (graphite_apply_transformations): Check for
3543 -fgraphite-identity.
3544 * toplev.c (process_options): Add flag_graphite_identity.
3545 * tree-ssa-loop.c: Add flag_graphite_identity.
3547 2008-10-14 Sebastian Pop <sebastian.pop@amd.com>
3549 Undo changes from 2008-10-02:
3550 * tree-ssa-loop-ivopts.c (rewrite_use_nonlinear_expr): Convert
3551 operand type when copying the operand to a variable of different type.
3552 * cfgloopmanip.c (create_empty_loop_on_edge): Write exit condition
3553 with the IV name after increment.
3555 2008-10-14 Sebastian Pop <sebastian.pop@amd.com>
3556 Harsha Jagasia <harsha.jagasia@amd.com>
3558 PR tree-optimization/37828
3559 * testsuite/gcc.dg/graphite/pr37828.c: New.
3560 * graphite.c (graphite_trans_loop_block): Do not loop block
3561 single nested loops.
3563 2008-10-09 Harsha Jagasia <harsha.jagasia@amd.com>
3564 Sebastian Pop <sebastian.pop@amd.com>
3566 * graphite.c (struct rename_map_elt, new_rename_map_elt,
3567 rename_map_elt_info, eq_rename_map_elts): New.
3568 (graphite_rename_ivs_stmt): Renamed graphite_rename_variables_in_stmt.
3569 (expand_scalar_variables_expr): Change parameters.
3570 (expand_scalar_variables_stmt): Same.
3571 (expand_scalar_variables): Same.
3572 (graphite_rename_ivs): Rename graphite_rename_variables.
3573 (build_iv_mapping): New.
3574 (translate_clast): Call build_iv_mapping.
3575 * graphite.h (gbb_p): New name.
3577 2008-10-03 Harsha Jagasia <harsha.jagasia@amd.com>
3579 PR tree-optimization/37684
3580 * gcc.dg/graphite/pr37684.c: New.
3581 * graphite.c (exclude_component_ref): New.
3582 (is_simple_operand): Call exclude_component_ref.
3584 2008-10-02 Jan Sjodin <jan.sjodin@amd.com>
3585 Harsha Jagasia <harsha.jagasia@amd.com>
3587 PR tree-optimization/37485
3588 * gcc.dg/graphite/block-2.c: New
3589 * graphite.c (gmp_cst_to_tree): Moved.
3590 (iv_stack_entry_is_constant): New.
3591 (iv_stack_entry_is_iv): New.
3592 (loop_iv_stack_push): Renamed to loop_iv_stack_push_iv.
3593 (loop_iv_stack_insert_constant): New.
3594 (loop_iv_stack_pop): Use new datatpype.
3595 (loop_iv_stack_get_iv): Same.
3596 (loop_iv_stack_get_iv_from_name): Same.
3597 (loop_iv_stack_debug): Renamed to debug_loop_iv_stack.
3598 (loop_iv_stack_patch_for_consts): New.
3599 (loop_iv_stack_remove_constants): New.
3600 (graphite_create_new_loop): Use loop_iv_stack_push_iv.
3601 (translate_clast): Call loop_iv_stack_patch_for_consts and
3602 loop_iv_stack_remove_constants.
3603 (gloog): Use new datatype. Redirect construction edge to end
3604 block to avoid accidental deletion.
3605 * graphite.h (enum iv_stack_entry_kind): New. Tag for data in
3607 (union iv_stack_entry_data): New. Data in iv stack entry.
3608 (struct iv_stack_entry): New. Datatype for iv stack entries.
3610 2008-10-02 Sebastian Pop <sebastian.pop@amd.com>
3612 * tree-ssa-loop-ivopts.c (rewrite_use_nonlinear_expr): Convert
3613 operand type when copying the operand to a variable of different type.
3615 2008-10-02 Sebastian Pop <sebastian.pop@amd.com>
3617 * cfgloopmanip.c (create_empty_loop_on_edge): Write exit condition
3618 with the IV name after increment.
3620 2008-10-02 Sebastian Pop <sebastian.pop@amd.com>
3622 * Merge from mainline (r140164:140838).
3624 2008-09-10 Konrad Trifunovic <konrad.trifunovic@inria.fr>
3626 * graphite-data-ref.c: New.
3627 * graphite.c (print_scop): Also dump the dependence graph.
3628 (bb_in_scop_p, loop_in_scop_p, nb_loops_around_gb): Moved...
3629 (new_scop): Initialize SCOP_DEP_GRAPH.
3630 (build_scop_dynamic_schedules): New.
3631 (build_access_matrix_with_af): Fixed column numbering.
3632 (graphite_transform_loops): Call build_scop_dynamic_schedules.
3633 * graphite.h: Add ifndef/define guards against multiple inclusion.
3634 (struct scop): Add dep_graph field.
3635 (SCOP_DEP_GRAPH): Defined.
3636 (ref_nb_loops): Fixed and moved to other position.
3637 (bb_in_scop_p, loop_in_scop_p, nb_loops_around_gb): ... here.
3638 (nb_loops_around_loop_in_scop): New.
3639 (graphite_dump_dependence_graph): Declared.
3640 (graphite_build_rdg_all_levels): Declared.
3641 (graphite_test_dependence): Declared.
3642 * Makefile.in (graphite-data-ref.o): New target.
3644 2008-09-09 Sebastian Pop <sebastian.pop@amd.com>
3646 * Merge from mainline (139870:140164).
3648 2008-09-01 Sebastian Pop <sebastian.pop@amd.com>
3650 * Merge from mainline (138275:139870).
3651 * testsuite/gcc.dg/graphite/scop-matmult.c: XFailed as one of
3652 the commits from trunk broke the niter detection.
3654 2008-09-01 Sebastian Pop <sebastian.pop@amd.com>
3656 * graphite.c: Add more documentation. Fix formatting.
3657 (debug_loop_vec, debug_oldivs, loop_iv_stack,
3658 loop_iv_stack_debug): Moved...
3659 (schedule_to_scattering): Move before use.
3660 (dot_all_scops): Include in "#if 0" the code for system
3663 * graphite.h: (debug_loop_vec, debug_oldivs, loop_iv_stack,
3664 loop_iv_stack_debug): ...here.
3666 2008-08-29 Jan Sjodin <jan.sjodin@amd.com>
3668 * tree-phinodes.c (make_phi_node): Extern.
3669 (add_phi_node_to_bb): New.
3670 (create_phi_node): Call add_phi_node_to_bb.
3671 * tree-ssa-loop-ivopts.c (get_phi_with_result): New.
3672 (remove_statement): Handle case where stored phi was updated
3673 and is no longer the same.
3674 * graphite.c (is_parameter): New.
3676 (expand_scalar_variables_expr): New.
3677 (expand_scalar_variables_stmt): New.
3678 (expand_scalar_variables): New.
3679 (move_phi_nodes): Create new phi instead of moving old one.
3680 (translate_clast): Call expand_scalar_variables.
3681 (find_vdef_for_var_in_bb): Also scan regular definitions.
3682 (skip_phi_defs): New.
3683 (collect_scop_exit_phi_args): New.
3684 (patch_scop_exit_phi_args): New.
3685 (gloog): Patch phis after scop.
3686 * tree-flow.h: (add_phi_node_to_bb): Declared.
3687 (make_phi_node): Declared.
3689 2008-08-26 Sebastian Pop <sebastian.pop@amd.com>
3691 * graphite.c (end_scop): Split the entry of the scop when it
3692 is the header of the loop in which the scop is ending.
3693 (build_scops_1, limit_scops): Update uses of end_scop.
3695 2008-08-26 Sebastian Pop <sebastian.pop@amd.com>
3697 * graphite.c (dot_all_scops_1): Do not fail on uninitialized
3698 SCOP_ENTRY or SCOP_EXIT.
3700 2008-08-25 Sebastian Pop <sebastian.pop@amd.com>
3702 * graphite.c (get_construction_edge): Removed.
3703 (gloog): Construction edge is the scop entry edge.
3705 2008-08-25 Sebastian Pop <sebastian.pop@amd.com>
3707 * graphite.c (can_generate_for_scop): Removed.
3708 (gloog): Do not call it.
3710 2008-08-25 Sebastian Pop <sebastian.pop@amd.com>
3712 * graphite.c (new_scop): Entry of a scop is an edge.
3713 Initialize SESE region.
3714 (free_scop): Free SESE region.
3715 (build_scops_1, scopdet_bb_info): Work on edges, not on bbs.
3716 (split_difficult_bb): New, split from end_scop.
3717 (end_scop): Exit of a scop is an edge.
3718 (build_scop_bbs): Never check CDI_POST_DOMINATORS: this info is
3719 not automatically updated and thus is always wrong.
3720 * graphite.h (struct sese): New.
3723 (struct scop): New field for a SESE region. Remove entry, exit.
3724 (SCOP_ENTRY, SCOP_EXIT): Update definitions to match same
3725 semantics as before. Moved comment around.
3727 2008-08-25 Tobias Grosser <grosser@fim.uni-passau.de>
3728 Sebastian Pop <sebastian.pop@amd.com>
3730 * graphite.c (graphite_transform_loops): Always enable gloog
3731 and find_transform when ENABLE_CHECKING.
3733 2008-08-25 Sebastian Pop <sebastian.pop@amd.com>
3735 * graphite.c (graphite_transform_loops): Move pretty printer
3736 of SCOPs before doing any transform. Remove call to print_scops
3737 and dot_all_scops_1.
3739 2008-08-25 Sebastian Pop <sebastian.pop@amd.com>
3741 * graphite.c (dump_gbb_conditions): Don't try to print NULL pointers.
3742 (print_graphite_bb): Same.
3744 2008-08-25 Sebastian Pop <sebastian.pop@amd.com>
3746 * graphite.c (dot_all_scops_1): Cleanup.
3747 (move_scops): Fix comment.
3749 2008-08-25 Sebastian Pop <sebastian.pop@amd.com>
3751 * graphite.c (build_scop_bbs): Revert commit 139355:
3753 2008-08-20 Sebastian Pop <sebastian.pop@amd.com>
3754 Dwarakanath Rajagopal <dwarak.rajagopal@amd.com>
3756 * graphite.c (build_scop_bbs): Factor up code.
3758 2008-08-25 Tobias Grosser <grosser@fim.uni-passau.de>
3760 * graphite.c (gloog): Update dominator info.
3762 2008-08-25 Tobias Grosser <grosser@fim.uni-passau.de>
3764 * graphite.c (remove_cond_exprs): Do not fail on empty bbs.
3766 2008-08-24 Sebastian Pop <sebastian.pop@amd.com>
3768 * graphite.c (new_graphite_bb): Remove GBB_INDEX_TO_NUM_MAP
3770 (free_graphite_bb): Remove GBB_INDEX_TO_NUM_MAP free.
3771 (translate_clast): Correct formatting.
3772 * graphite.h (struct num_map): Removed.
3773 (struct graphite_bb): Remove num_map field.
3774 (GBB_INDEX_TO_NUM_MAP): Removed.
3776 2008-08-24 Sebastian Pop <sebastian.pop@amd.com>
3778 * graphite.c (build_access_matrix_with_af): Fix comments.
3779 (build_scop_data_accesses): Same.
3781 2008-08-24 Sebastian Pop <sebastian.pop@amd.com>
3783 * graphite.c (build_scop_data_accesses): Don't construct
3784 access matrices. Add a FIXME and an assert condition that
3785 should pass when the access matrices will be needed.
3787 2008-08-24 Sebastian Pop <sebastian.pop@amd.com>
3789 * tree-data-ref.c (stmt_simple_memref_p): Don't call
3791 * graphite.c (build_graphite_bb): Renamed new_graphite_bb.
3792 Moved close by free_graphite_bb.
3793 (free_graphite_bb): Call free_data_refs. Reset bb->aux.
3794 (new_scop): Move close by free_scop.
3795 (graphite_transform_loops): Avoid linear scan to reset bb->aux.
3797 2008-08-22 Jan Sjodin <jan.sjodin@amd.com>
3799 * cfgloopmanip.c (create_empty_if_region_on_edge): New.
3800 * graphite.c (clast_to_gcc_expression): Call gmp_cst_to_tree
3801 instead of recursive call.
3802 (graphite_translate_clast_equation): New.
3803 (graphite_create_guard_cond_expr): New.
3804 (graphite_create_new_guard): New.
3805 (get_stack_index_from_iv): Removed.
3806 (graphite_rename_ivs_stmt): Use gbb_loop_index.
3807 (get_true_edge_from_guard_bb): New.
3808 (translate_clast): Handle stmt_guard in clast.
3809 (get_construction_edge): Allow construction edge detection for
3810 a scope entry with multiple predecessors if one predecessor is
3811 the immediate dominator of scope entry.
3812 (can_generate_code_stmt): Enable code generation for clast_guard.
3813 (gloog): Use correct context loop. Removed check for post dominators.
3814 * cfgloop.h (create_empty_if_region_on_edge): Declared.
3816 2008-08-21 Sebastian Pop <sebastian.pop@amd.com>
3818 * graphite.c (remove_dead_loops): Document better which
3821 2008-08-21 Sebastian Pop <sebastian.pop@amd.com>
3823 * Makefile.in: Rename POLYLIBLIBS and POLYLIBINC to PPLLIBS
3825 (graphite.o): Also depends on pointer-set.h.
3827 2008-08-21 Sebastian Pop <sebastian.pop@amd.com>
3829 * graphite.c (scop_record_loop): Fix compile warning.
3831 2008-08-21 Harsha Jagasia <harsha.jagasia@amd.com>
3832 Sebastian Pop <sebastian.pop@amd.com>
3834 * graphite.c (scop_record_loop): DECL_NAME can be NULL.
3836 2008-08-21 Sebastian Pop <sebastian.pop@amd.com>
3838 * graphite.c (build_graphite_bb): Initialize bb->aux to
3839 point to the graphite_bb_p.
3840 (graphite_bb_from_bb): Renamed gbb_from_bb; returns the
3842 (add_bb_domains): Does not use the scop parameter.
3843 (graphite_transform_loops): Clean bb->aux at the end.
3845 2008-08-20 Dwarakanath Rajagopal <dwarak.rajagopal@amd.com>
3846 Sebastian Pop <sebastian.pop@amd.com>
3848 * testsuite/lib/target-supports.exp
3849 (check_effective_target_fgraphite): New.
3851 * testsuite/gcc.dg/graphite/graphite.exp: Early exit when
3852 check_effective_target_fgraphite returns false.
3853 Set dg-do-what-default to compile.
3854 (scan-graphite-dump-times): Removed.
3855 * testsuite/gfortran.dg/graphite/graphite.exp: Same.
3857 * testsuite/gcc.dg/graphite/scop-0.c: Do not use "dg-do compile".
3858 Use scan-tree-dump-times instead of scan-graphite-dump-times.
3859 * testsuite/gcc.dg/graphite/scop-1.c: Same.
3860 * testsuite/gcc.dg/graphite/scop-2.c: Same.
3861 * testsuite/gcc.dg/graphite/scop-3.c: Same.
3862 * testsuite/gcc.dg/graphite/scop-4.c: Same.
3863 * testsuite/gcc.dg/graphite/scop-5.c: Same.
3864 * testsuite/gcc.dg/graphite/scop-6.c: Same.
3865 * testsuite/gcc.dg/graphite/scop-7.c: Same.
3866 * testsuite/gcc.dg/graphite/scop-8.c: Same.
3867 * testsuite/gcc.dg/graphite/scop-9.c: Same.
3868 * testsuite/gcc.dg/graphite/scop-10.c: Same.
3869 * testsuite/gcc.dg/graphite/scop-11.c: Same.
3870 * testsuite/gcc.dg/graphite/scop-12.c: Same.
3871 * testsuite/gcc.dg/graphite/scop-13.c: Same.
3872 * testsuite/gcc.dg/graphite/scop-matmult.c: Same.
3873 * testsuite/gcc.dg/graphite/scop-14.c: Same.
3874 * testsuite/gcc.dg/graphite/scop-15.c: Same.
3875 * testsuite/gcc.dg/graphite/block-0.c: Same.
3876 * testsuite/gcc.dg/graphite/scop-16.c: Same.
3877 * testsuite/gcc.dg/graphite/block-1.c: Same.
3878 * testsuite/gcc.dg/graphite/scop-17.c: Same.
3879 * testsuite/gcc.dg/graphite/scop-18.c: Same.
3880 * testsuite/gfortran.dg/graphite/block-1.f90: Same.
3881 * testsuite/gfortran.dg/graphite/scop-1.f: Same.
3882 * testsuite/gfortran.dg/graphite/block-2.f: Same.
3884 2008-08-20 Sebastian Pop <sebastian.pop@amd.com>
3886 * graphite.c: Fix some XXX comments.
3887 (build_scop_dynamic_schedules): Removed.
3889 2008-08-20 Sebastian Pop <sebastian.pop@amd.com>
3891 * graphite.h (scop_max_loop_depth): Moved...
3892 * graphite.c (scop_max_loop_depth): ...here.
3893 (remove_all_edges_1): New.
3894 (remove_all_edges): Factored code.
3895 (remove_cond_exprs): Check only the last statement for
3896 a GIMPLE_COND expression.
3898 2008-08-20 Sebastian Pop <sebastian.pop@amd.com>
3900 * graphite.c (scan_tree_for_params): Early return when the
3901 expression is a chrec_dont_know. Handle case NEGATE_EXPR.
3902 (find_scop_parameters): Factor out code.
3903 (graphite_trans_bb_strip_mine): Remove dead code.
3905 2008-08-20 Sebastian Pop <sebastian.pop@amd.com>
3907 * graphite.c (clast_to_gcc_expression, graphite_create_new_loop,
3908 graphite_trans_bb_move_loop): Factor asserts.
3909 (gloog): Perform sanity checks only for ENABLE_CHECKING.
3910 Do not call calculate_dominance_info and estimate_bb_frequencies.
3912 2008-08-20 Jan Sjodin <jan.sjodin@amd.com>
3914 * graphite.c (create_loops_mapping, free_loops_mapping,
3915 create_loops_mapping_num, debug_loop_mapping_1,
3916 debug_loop_mapping, graphite_loops_mapping_max_loop_num,
3917 get_loop_mapping_for_num, graphite_loops_mapping_add_child,
3918 graphite_loops_mapping_add_child_num,
3919 graphite_loops_mapping_insert_child,
3920 graphite_loops_mapping_parent, get_loop_mapped_depth_for_num,
3921 get_loop_mapped_depth, split_loop_mapped_depth_for_num,
3922 loop_mapped_depth_split_loop, swap_loop_mapped_depth_for_num,
3923 create_num_from_index, get_num_from_index,
3924 swap_loop_mapped_depth): Removed.
3925 (new_scop): Do not initialize SCOP_LOOPS_MAPPING.
3926 (free_scop): Do not call free_loops_mapping.
3927 (graphite_get_new_iv_stack_index_from_old_iv): Renamed
3928 get_stack_index_from_iv. Use GBB_LOOPS instead of calling
3929 get_loop_mapped_depth.
3930 (graphite_trans_bb_move_loop): Do not update the loop mapping.
3931 (graphite_trans_bb_strip_mine): Same.
3932 * graphite.h (graphite_loops_mapping, graphite_loop_node): Removed.
3933 (struct scop): Remove field loops_mapping.
3935 2008-08-20 Sebastian Pop <sebastian.pop@amd.com>
3936 Dwarakanath Rajagopal <dwarak.rajagopal@amd.com>
3938 * graphite.c (scop_record_loop): Factor out one level of the
3939 condition by early return.
3940 (build_scop_loop_nests): Format following FSF coding style.
3941 (build_scop_dynamic_schedules): Factor out code.
3942 (scopdet_bb_info): Reindent. Default case should not be reachable.
3944 2008-08-20 Sebastian Pop <sebastian.pop@amd.com>
3945 Dwarakanath Rajagopal <dwarak.rajagopal@amd.com>
3947 * graphite.c (loop_affine_expr): Check for DECL_P or struct
3948 assignments that are not handled as simple operands for now.
3950 2008-08-20 Sebastian Pop <sebastian.pop@amd.com>
3951 Dwarakanath Rajagopal <dwarak.rajagopal@amd.com>
3953 * graphite.c (build_scop_bbs): Factor up code.
3955 2008-08-20 Sebastian Pop <sebastian.pop@amd.com>
3956 Dwarakanath Rajagopal <dwarak.rajagopal@amd.com>
3958 * graphite.c (stmt_simple_for_scop_p): Factor code out
3960 (enum gbb_type): New. Group all the GBB_* types under it.
3961 (is_loop_exit): Moved...
3962 (end_scop): Enable BB spliting.
3963 * cfgloop.c (is_loop_exit): ...here. Reimplemented.
3964 * cfgloop.h (is_loop_exit): Declared.
3966 2008-08-20 Sebastian Pop <sebastian.pop@amd.com>
3968 * doc/invoke.texi: Remove strides from examples containing
3969 DO loops when the strides are equal to 1.
3971 2008-08-20 Harsha Jagasia <harsha.jagasia@amd.com>
3972 Dwarakanath Rajagopal <dwarak.rajagopal@amd.com>
3974 * graphite.c (graphite_trans_scop_block): Or the result with
3975 the result from graphite_trans_loop_block.
3976 * testsuite/gcc.dg/graphite/block-1.c: New.
3977 * testsuite/gfortran.dg/graphite/block-1.f90: New.
3978 * testsuite/gfortran.dg/graphite/block-2.f: New.
3980 2008-08-20 Sebastian Pop <sebastian.pop@amd.com>
3982 * graphite.c (graphite_transform_loops): Call cloog_initialize
3985 2008-08-20 Sebastian Pop <sebastian.pop@amd.com>
3987 * tree-data-ref.c) (stmt_simple_memref_p): New.
3988 * tree-data-ref.h (stmt_simple_memref_p): Declared.
3989 * graphite.c (stmt_simple_memref_for_scop_p): Removed.
3990 (is_simple_operand): Call stmt_simple_memref_p.
3992 * testsuite/gcc.dg/graphite/scop-matmult.c: Updated for not
3993 using pointer arithmetic, as this is optimized by PRE and
3994 makes the code too difficult to analyze.
3996 * testsuite/gcc.dg/graphite/scop-18.c: Same.
3998 2008-08-20 Sebastian Pop <sebastian.pop@amd.com>
4000 * gdbinit.in (pgg): New.
4002 2008-08-15 Tobias Grosser <grosser@fim.uni-passau.de>
4004 * graphite.c (graphite_trans_loop_block): Fix warning.
4006 2008-08-15 Tobias Grosser <grosser@fim.uni-passau.de>
4008 * graphite.c (graphite_trans_loop_block): Fix my merge error.
4010 2008-08-15 Tobias Grosser <grosser@fim.uni-passau.de>
4012 * graphite.c (graphite_trans_bb_block): Remove check for
4013 flag_loop_strip_mine, flag_loop_block, flag_loop_interchange.
4014 Check if loop blocking is profitable for every loop, before applying
4016 (graphite_apply_transformations): Call graphite_trans_bb_block only,
4017 if flag_loop_block is set.
4019 2008-08-14 Sebastian Pop <sebastian.pop@amd.com>
4021 * graphite.c: Add some more documentation for the loop
4024 2008-08-14 Sebastian Pop <sebastian.pop@amd.com>
4026 * Makefile.in (tree-data-ref.o): Remove dependence on graphite.h.
4027 * graphite.c: Format on less than 80 columns.
4030 2008-08-14 Sebastian Pop <sebastian.pop@amd.com>
4032 * cfgloopmanip.c (loopify): Use update_dominators_in_loop.
4034 2008-08-14 Sebastian Pop <sebastian.pop@amd.com>
4036 * doc/invoke.texi (floop-block, floop-strip-mine,
4037 floop-interchange): Update documentation with examples.
4039 2008-08-13 Sebastian Pop <sebastian.pop@amd.com>
4041 * cfgloopmanip.c (create_empty_loop_on_edge): Don't call
4043 * graphite.c (graphite_create_new_loop): Call add_referenced_var.
4045 2008-08-13 Sebastian Pop <sebastian.pop@amd.com>
4047 * cfgloopmanip.c (create_empty_loop_on_edge): Improve documentation.
4048 Factor gcc_asserts into a single one. Use force_gimple_operand_gsi.
4049 * tree-scalar-evolution.c: Revert useless changes.
4050 * tree-phinodes.c: Same.
4053 * tree-vectorizer.h: Same.
4054 * tree-flow.h: Same.
4056 * common.opt (fgraphite): Update documentation.
4058 2008-08-12 Harsha Jagasia <harsha.jagasia@amd.com>
4060 * doc/invoke.texi (-floop-block, -floop-strip-mine,
4061 -floop-interchange): Add more text for explaining what each of these
4063 * tree-into-ssa.c (gimple_vec): Moved to...
4064 * graphite.c: Include gimple.h.
4065 (gimple_vec): Moved to...
4066 (del_loop_to_cloog_loop): Removed.
4067 (loop_affine_expr): Do not call create_data_ref when the
4068 operand is a constant.
4069 (new_scop): Use free instead of del_loop_to_cloog_loop.
4070 * Makefile.in (graphite.o): Depend on GIMPLE_H.
4071 * gimple.h (gimple_vec): ... here.
4073 2008-08-11 Tobias Grosser <grosser@fim.uni-passau.de>
4075 * graphite.c (scopdet_bb_info): Only allow loops with known number of
4077 (build_loop_iteration_domains): Fail, if latch executions unknown.
4079 2008-08-11 Tobias Grosser <grosser@fim.uni-passau.de>
4081 * graphite.c (add_conditions_to_domain): New.
4082 (build_scop_conditions_1): Call add_conditions_to_domain.
4083 (set_cloog_options): Allow to disable optimizations.
4085 2008-08-11 Tobias Grosser <grosser@fim.uni-passau.de>
4087 * graphite.c (find_params_in_bb): Look for parameters in conditions.
4088 Do not use walk_dominator_tree.
4089 (find_scop_parameters): Do not use walk_dominator_tree.
4091 2008-08-11 Tobias Grosser <grosser@fim.uni-passau.de>
4093 * graphite.c (scan_tree_for_params) Add / Subtract inequality.
4094 (idx_record_params): Adapt.
4095 * graphite.h (scop_gimple_loop_depth): New.
4097 2008-08-11 Tobias Grosser <grosser@fim.uni-passau.de>
4099 * graphite.c (build_scop_dynamic_schedules): Remove value_init.
4100 (scan_tree_for_params): Remove value_init.
4101 (build_scop_context): Remove value_init.
4102 (build_loop_iteration_domains): Remove value_init.
4103 (schedule_to_scattering): Remove value_init.
4104 (graphite_trans_bb_strip_mine): Remove value_init.
4106 2008-08-11 Tobias Grosser <grosser@fim.uni-passau.de>
4108 * gcc/graphite.c (limit_scops): New.
4109 (graphite_transform_loops): Add limit SCoPs.
4110 * gcc/testsuite/gcc.dg/graphite/scop-0.c: Update number of SCoPs.
4111 * gcc/testsuite/gcc.dg/graphite/scop-1.c: Update number of SCoPs.
4112 * gcc/testsuite/gcc.dg/graphite/scop-10.c: Update number of SCoPs.
4113 * gcc/testsuite/gcc.dg/graphite/scop-11.c: Update number of SCoPs.
4114 * gcc/testsuite/gcc.dg/graphite/scop-12.c: Update number of SCoPs.
4115 * gcc/testsuite/gcc.dg/graphite/scop-13.c: Update number of SCoPs.
4116 * gcc/testsuite/gcc.dg/graphite/scop-14.c: Update number of SCoPs.
4117 * gcc/testsuite/gcc.dg/graphite/scop-15.c: Update number of SCoPs.
4118 * gcc/testsuite/gcc.dg/graphite/scop-16.c: Update number of SCoPs.
4119 Change loop numbers.
4120 * gcc/testsuite/gcc.dg/graphite/scop-17.c: Update number of SCoPs.
4121 Change loop numbers.
4122 * gcc/testsuite/gcc.dg/graphite/scop-18.c: Update number of SCoPs.
4123 * gcc/testsuite/gcc.dg/graphite/scop-2.c: Update number of SCoPs.
4124 * gcc/testsuite/gcc.dg/graphite/scop-3.c: Update number of SCoPs.
4125 * gcc/testsuite/gcc.dg/graphite/scop-4.c: Update number of SCoPs.
4126 * gcc/testsuite/gcc.dg/graphite/scop-5.c: Update number of SCoPs.
4127 * gcc/testsuite/gcc.dg/graphite/scop-6.c: Update number of SCoPs.
4128 * gcc/testsuite/gcc.dg/graphite/scop-7.c: Update number of SCoPs.
4129 * gcc/testsuite/gcc.dg/graphite/scop-8.c: Update number of SCoPs.
4130 * gcc/testsuite/gcc.dg/graphite/scop-9.c: Update number of SCoPs.
4131 * gcc/testsuite/gcc.dg/graphite/scop-matmult.c: Update number of SCoPs.
4133 2008-08-11 Tobias Grosser <grosser@fim.uni-passau.de>
4135 * graphite.c (graphite_transform_loops): Call always find_transform.
4137 2008-08-08 Tobias Grosser <grosser@fim.uni-passau.de>
4139 * graphite.c (free_loops_mapping): New.
4140 (stmt_simple_for_scop_p): Fix typo.
4141 (stmt_simple_for_scop_p): Fix tuples functions, that
4143 (free_graphite_bb): Fix some memleaks.
4144 (free_scop): Fix some memleaks.
4145 (scopdet_bb_info): Do not forget some tmp SCoPs.
4146 (find_params_in_bb): Fix some memleaks.
4147 (clast_to_gcc_expression): Fix warning.
4149 2008-08-07 Tobias Grosser <grosser@fim.uni-passau.de>
4151 * testsuite/gcc.dg/graphite/scop-16.c: Fix for 32bit.
4152 * testsuite/gcc.dg/graphite/scop-17.c: Fix for 32bit.
4154 2008-08-04 Sebastian Pop <sebastian.pop@amd.com>
4156 * tree-ssa-loop.c (tree-ssa-loop.o): Do not include toplev.h.
4157 Move code ifdef-ed HAVE_cloog...
4158 * graphite.c: Include toplev.h.
4160 * Makefile.in (OBJS-common): Always build graphite.o.
4161 (BACKEND): Remove @GRAPHITE@.
4162 (tree-ssa-loop.o): Do not depend on TOPLEV_H.
4163 (graphite.o): Depend on TOPLEV_H.
4165 2008-08-04 Sebastian Pop <sebastian.pop@amd.com>
4167 * Makefile.in (tree-ssa-loop.o): Depend on TOPLEV_H.
4168 Remove typo left from polylib to ppl conversion.
4169 * graphite.c (graphite_transforms): Use sorry instead of fatal.
4171 2008-08-03 Sebastian Pop <sebastian.pop@amd.com>
4173 * toplev.c (process_options): Move the graphite loop optimization
4175 * tree-ssa-loop.c (graphite_transforms): ... here.
4176 When not configured with CLooG, print to dump_file that
4177 Graphite transforms were not performed.
4178 * testsuite/gcc.dg/graphite/graphite.exp (scan-graphite-dump-times):
4180 * testsuite/gcc.dg/graphite/*.c: Updated all testcases to use
4181 scan-graphite-dump-times.
4183 2008-08-03 Sebastian Pop <sebastian.pop@amd.com>
4185 * graphite.c (dot_scop, dot_all_scops): Do not call system.
4186 Do not open /tmp/scop.dot and /tmp/allscops.dot.
4188 2008-08-02 Sebastian Pop <sebastian.pop@amd.com>
4189 Jan Sjodin <jan.sjodin@amd.com>
4191 * configure: Regenerated.
4192 * omp-low.c (expand_omp_sections): Remove now unused code.
4193 * config.in (HAVE_polylib): Removed.
4194 * configure.ac (HAVE_polylib, POLYLIBLIBS, POLYLIBINC): Removed.
4195 (PPLLIBS, PPLINC): Added.
4196 * graphite.c: Replace unsigned with int wherever possible.
4197 Don't access Cloog's data structures, but use accessor functions.
4198 Clast's stmt->type is now implemented as a vtable: change the
4199 switches of stmt->type into ifs.
4200 (polylib/polylibgmp.h): Don't include.
4201 (initialize_dependence_polyhedron,
4202 initialize_data_dependence_polyhedron, is_empty_polyhedron,
4203 statement_precedes_p, test_dependence, build_rdg_all_levels,
4204 dump_dependence_graph): Removed until this code is cleaned up
4206 * Makefile.in (POLYLIBLIBS): Renamed PPLLIBS.
4207 (POLYLIBINC): Renamed PPLINC.
4209 2008-08-01 Harsha Jagasia <harsha.jagasia@amd.com>
4210 Dwarakanath Rajagopal <dwarak.rajagopal@amd.com>
4211 Jan Sjodin <jan.sjodin@amd.com>
4213 Finish the merge and tuplification of graphite.
4215 2008-07-24 Sebastian Pop <sebastian.pop@amd.com>
4216 Jan Sjodin <jan.sjodin@amd.com>
4218 Partial merge from mainline (138072:138275).
4219 * graphite.c still has to be tuplified.
4221 2008-07-29 Jan Sjodin <jan.sjodin@amd.com>
4223 * graphite.c (graphite_loops_mapping_max_loop_num): New.
4224 (create_num_from_index): New.
4225 (get_num_from_index): Also pass in the graphite BB.
4226 (free_graphite_bb): Free GBB_INDEX_TO_NUM_MAP.
4227 (build_graphite_bb): Initialize GBB_INDEX_TO_NUM_MAP.
4228 (graphite_trans_bb_strip_mine): Call create_num_from_index.
4229 (is_interchange_valid): Return false when failing.
4230 * graphite.h (struct num_map): New.
4231 (struct graphite_bb): New field num_map.
4232 (GBB_LOOPS_MAPPING): Renamed GBB_INDEX_TO_NUM_MAP.
4234 2008-07-29 Tobias Grosser <grosser@fim.uni-passau.de>
4236 * graphite.c (dump_gbb_conditions): Print also conditions like
4237 "if (a)". Remove dublicated code and use print_generic_expr ().
4238 (stmt_simple_for_scop_p): Only allow conditions we can handle
4241 2008-07-25 Jan Sjodin <jan.sjodin@amd.com>
4243 * graphite.h (struct scop): Removed new_ivs field.
4244 (SCOP_NEWIVS): Deleted.
4245 * graphite.c (new_scop, free_scop, clast_name_to_gcc,
4246 clast_to_gcc_expression, graphite_create_new_loop):
4247 Removed use of new_ivs.
4249 2008-07-25 Jan Sjodin <jan.sjodin@amd.com>
4251 * graphite.c (debug_oldivs, debug_loop_vec, create_loops_mapping,
4252 create_loops_mapping_num, debug_loop_mapping_1): New.
4253 (debug_loop_mapping): Call debug_loop_mapping_1.
4254 (get_loop_mapping_for_num,
4255 graphite_loops_mapping_add_child,
4256 graphite_loops_mapping_add_child_num,
4257 graphite_loops_mapping_insert_child,
4258 graphite_loops_mapping_parent,
4259 split_loop_mapped_depth_for_num,
4260 loop_mapped_depth_split_loop): New.
4261 (increment_loop_mapped_depths): Removed.
4262 (swap_loop_mapped_depth_for_num): Reimplemented.
4263 (new_scop): Call create_loops_mapping.
4264 (scop_record_loop): Call graphite_loops_mapping_insert_child.
4265 (translate_clast): Pass the old loop father in parameter, and pass
4266 it to get_old_iv_from_ssa_name.
4267 (remove_edges_around_useless_blocks, can_generate_code_stmt,
4268 can_generate_code, can_generate_for_scop): New.
4269 (graphite_trans_bb_block): Returns false when it fails to transform.
4270 * graphite.h (graphite_loop_node, graphite_loops_mapping): New.
4272 2008-07-25 Sebastian Pop <sebastian.pop@amd.com>
4274 Reverted all the changes related to the streamization and
4276 These changes are now tracked in the streamization branch.
4278 2008-07-25 Sebastian Pop <sebastian.pop@amd.com>
4279 Jan Sjodin <jan.sjodin@amd.com>
4281 * graphite.c (gbb_compare): Correctly constify.
4282 (gbb_can_be_ignored): Indent.
4283 (graphite_trans_scop_swap_1and2): Add legality check.
4286 2008-07-25 Sebastian Pop <sebastian.pop@amd.com>
4288 Remove fallouts from "Reverted the Condate changes".
4289 * tree.h: Remove unused decl.
4290 * testsuite/gcc.dg/tree-checker: Same.
4291 * timevar.def: Remove counter.
4293 2008-07-24 Sebastian Pop <sebastian.pop@amd.com>
4295 * Merge from mainline (135673:138072).
4297 Reverted the MIRO changes (from 2008-04-05) that are now
4298 tracked in the miro branch.
4299 * tree-bounds.c: Removed.
4300 * tree-bounds.h: Removed.
4302 Reverted the Condate changes (from 2006-07-04, 2007-03-20) that
4303 are now tracked in the condate branch.
4304 * tree-check.c: Removed.
4305 * tree-match.c: Removed.
4306 * condate.y: Removed.
4308 2008-07-24 Dwarakanath Rajagopal <dwarak.rajagopal@amd.com>
4310 * common.opt: New user flag -floop-block, -floop-strip-mine
4311 and -floop-interchange.
4312 * toplev.c (process_options): Enable -fgraphite pass if any one of the
4313 graphite loop optimization flags is turned on.
4314 * graphite.c (graphite_apply_transformations): Add flag_loop_block,
4315 flag_loop_strip_mine and flag_loop_interchange checks before
4317 * doc/invoke.texi: Remove -fgraphite and add -floop-block,
4318 -floop-strip-mine and -floop-interchange.
4319 * testsuite/gcc.dg/graphite/block-0.c: Add -floop-block and remove
4321 * testsuite/gcc.dg/graphite/scop-16.c: Ditto.
4322 * testsuite/gcc.dg/graphite/scop-17.c: Ditto.
4323 * testsuite/gcc.dg/graphite/scop-18.c: Ditto.
4325 2008-07-23 Jan Sjodin <jan.sjodin@amd.com>
4326 Sebastian Pop <sebastian.pop@amd.com>
4328 * cfgloopmanip.c (update_dominators_in_loop): Make it static.
4329 (create_empty_loop_on_edge): More fixes.
4330 * tree-phinodes.c (resize_phi_node): Extern.
4331 (unlink_phi_node, move_phi_node): New split from remove_phi_node.
4332 * cfghooks.c (update_dominator_information): New split from
4334 * tree-vectorizer.c (rename_variables_in_bb): Extern.
4335 * tree-dfa.c (collect_dfa_stats): Start walking the CFG on the
4336 successor of the function entry block.
4338 * graphite.c: Include pointer-set.h.
4339 (debug_loop_mapping, increment_loop_mapped_depths,
4340 get_loop_mapped_depth_for_num, get_loop_mapped_depth,
4341 set_loop_mapped_depth_for_num, set_loop_mapped_depth,
4342 swap_loop_mapped_depth_for_num, get_num_from_index,
4343 swap_loop_mapped_depth, loop_iv_stack_debug,
4344 loop_iv_stack_push, loop_iv_stack_pop, loop_iv_stack_get_iv,
4345 loop_iv_stack_get_iv_from_name, loop_iv_stack_debug,
4346 get_old_iv_from_ssa_name): New.
4347 (new_scop): Initialize SCOP_LOOPS_MAPPING.
4348 (free_scop): Free SCOP_LOOPS_MAPPING.
4349 (scop_record_loop): Record old ivs.
4350 (create_var_name): Removed.
4351 (initialize_cloog_names): Allocate double space in case strip mine
4352 applies to all loops once.
4353 (clast_name_to_gcc): Look up in the map ivstack passed in parameter.
4354 (clast_to_gcc_expression): Same. Implement more clast to gimple
4356 (graphite_create_new_loop): Pass in ivstack.
4357 (remove_all_edges): Pass in the construction_edge.
4358 (graphite_remove_iv): Removed.
4359 (graphite_rename_ivs, graphite_rename_ivs_stmt,
4360 remove_cond_exprs): Rewritten.
4361 (move_phi_nodes): New.
4362 (disconnect_virtual_phi_nodes, disconnect_cond_expr): Removed.
4363 (translate_clast): Pass in ivstack. Rewrite some cases.
4364 (set_cloog_options, debug_clast_stmt): New.
4365 (find_transform): Use set_cloog_options.
4366 (outermost_loop_layer): Removed.
4367 (get_construction_edge, collect_virtual_phis, find_vdef_for_var_in_bb,
4368 find_vdef_for_var_1, find_vdef_for_var, patch_phis_for_virtual_defs,
4369 mark_old_loops, remove_dead_loops): New.
4371 (graphite_trans_bb_move_loop): Call swap_loop_mapped_depth.
4372 (const_column_index, get_first_matching_sign_row_index,
4373 get_lower_bound_row, get_upper_bound_row, get_lower_bound,
4374 get_upper_bound): New.
4375 (graphite_trans_bb_strip_mine): Also update the iv map.
4377 * graphite.h (graphite_loops_mapping, GBB_LOOPS_MAPPING): New.
4378 (struct name_tree): Add a loop field.
4379 (struct scop): Add a graphite_loops_mapping field.
4380 (SCOP_LOOPS_MAPPING): New.
4381 (debug_clast_stmt): Declare.
4382 * lambda.h (find_induction_var_from_exit_cond): Declare.
4383 (lambda-code.c): (find_induction_var_from_exit_cond): Extern.
4384 * cfgloop.h (update_dominators_in_loop): Removed declaration.
4385 (create_empty_loop_on_edge): Updated.
4386 * tree-flow.h (remove_bb, resize_phi_node, move_phi_node,
4387 rename_variables_in_bb): Declare.
4388 * tree-cfg.c (remove_bb): Extern.
4390 * testsuite/gcc.dg/graphite/block-0.c: New.
4392 2008-07-21 Dwarakanath Rajagopal <dwarak.rajagopal@amd.com>
4393 Sebastian Pop <sebastian.pop@amd.com>
4395 * graphite.c (strip_mine_profitable_p): New.
4396 (graphite_trans_bb_block): Disable strip mining if not profitable.
4398 * testsuite/gcc.dg/graphite/scop-18.c: New.
4399 * testsuite/gcc.dg/graphite/scop-17.c: Fixed.
4400 * testsuite/gcc.dg/graphite/scop-16.c: Fixed.
4402 2008-07-17 Harsha Jagasia <harsha.jagasia@amd.com>
4403 Jan Sjodin <jan.sjodin@amd.com>
4404 Sebastian Pop <sebastian.pop@amd.com>
4406 * graphite.c (is_interchange_valid): New.
4407 (graphite_trans_bb_block): Check loop nest of basic block for legality
4410 * graphite.h (gbb_inner_most_loop_index, outer_most_loop_1,
4411 outer_most_loop, gbb_outer_most_loop_index): New.
4413 * tree-loop-linear.c (perfect_loop_nest_depth): Remove static.
4414 * tree-flow.h (perfect_loop_nest_depth): Declare as extern.
4415 * testsuite/gcc.dg/graphite/scop-16.c: New.
4416 * testsuite/gcc.dg/graphite/scop-17.c: New.
4418 2008-07-11 Tobias Grosser <grosser@fim.uni-passau.de>
4420 * graphite.c (scop_remove_ignoreable_gbbs): Also update bitmap.
4421 (graphite_trans_scop_block): Ignore SCoPs without bbs.
4423 2008-07-11 Tobias Grosser <grosser@fim.uni-passau.de>
4425 * graphite.c (new_scop): Initialize SCOP_EXIT.
4426 (scopdet_info): Add.
4427 (scopdet_bb_info): Rename from is_bb_addable. Cleanup, bugfixes.
4428 (build_scops_1): Cleanup, bugfixes.
4429 (build_scops): Cleanup.
4431 * testsuite/gcc.dg/graphite/scop-matmult.c: Remove duplicated code.
4432 * testsuite/gcc.dg/graphite/scop-15.c: Add SCoP numbers.
4434 2008-07-10 Harsha Jagasia <harsha.jagasia@amd.com>
4436 * testsuite/gfortran.dg/graphite/scop-1.f: Update to reduced test case.
4438 * testsuite/gfortran.dg/graphite/graphite.exp: Use
4439 DEFAULT_GRAPHITE_FLAGS.
4441 * testsuite/gcc.dg/graphite/scop-15.c: Update to reduced test case.
4443 2008-07-10 Harsha Jagasia <harsha.jagasia@amd.com>
4445 * graphite.c (scan_tree_for_params): Do not assert any more if
4446 MULT_EXPR parameter is negative.
4448 * testsuite/gfortran.dg/graphite/scop-1.f: New.
4450 * testsuite/gfortran.dg/graphite/graphite.exp: New.
4452 * testsuite/gcc.dg/graphite/scop-15.c: New.
4454 2008-07-10 Harsha Jagasia <harsha.jagasia@amd.com>
4456 * graphite.c (is_bb_addable): Fix segfault in spec gzip and reformat.
4458 2008-07-10 Tobias Grosser <grosser@fim.uni-passau.de>
4460 * graphite.c (graphite_trans_bb_swap_loops): Rename from
4461 graphite_swap_loops.
4462 (graphite_trans_bb_move_loop): New.
4463 (graphite_trans_bb_strip_mine): Rename from graphite_strip_mine_loop.
4464 (graphite_trans_bb_block): New.
4465 (graphite_trans_loop_block): New.
4466 (graphite_trans_scop_swap_1and2): Rename from
4467 graphite_trans_swap_1and2.
4468 (graphite_trans_scop_strip): Rename from graphite_trans_strip.
4469 (graphite_trans_scop_block): New.
4470 (graphite_apply_transformations): Rename from
4471 graphite_transformations.
4473 * testsuite/gcc.dg/graphite/scop-matmult.c: New.
4475 2008-07-10 Tobias Grosser <grosser@fim.uni-passau.de>
4477 * graphite.c (gbb_compare): New.
4478 (graphite_sort_gbbs): New.
4479 (gbb_can_be_ignored): New.
4480 (scop_remove_ignoreable_gbbs): New.
4481 (graphite_transformations): Cleanup and add
4482 scop_remove_ignoreable_gbbs.
4483 * lambda.h (lambda_vector_compare): New.
4485 2008-07-09 Tobias Grosser <grosser@fim.uni-passau.de>
4487 * graphite.c (print_graphite_bb): Correct printing of static schedule.
4488 (graphite_swap_loops): int -> unsigned
4489 (graphite_strip_mine_loop): int -> unsigned, Fix SCHEDULE
4490 (graphite_transformations): New.
4491 (graphite_transform_loops): Move to graphite_transformations.
4492 * graphite.h (gbb_nb_loops): Return unsigned.
4494 2008-07-04 Tobias Grosser <grosser@fim.uni-passau.de>
4496 * graphite.c (scan_tree_for_params): Fix insertion of parameters into
4497 the domain matrix. This makes scop-0.c work again.
4499 2008-06-20 Richard Guenther <rguenther@suse.de>
4501 * graphite.h: Adjust copyright to GPLv3.
4502 * graphite.c: Likewise.
4503 (stmt_simple_memref_for_scop_p): Split out from ...
4504 (stmt_simple_for_scop_p): ... here. Fix handling of calls
4506 (get_bb_type): Optimize.
4508 (is_bb_addable): Fix memleak, replace is_pred call with
4510 (build_scops): Use current_loops.
4511 (param_index): Fix memleak.
4513 2008-06-20 Konrad Trifunovic <konrad.trifunovic@inria.fr>
4515 * graphite.c: Fix formatting.
4517 2008-06-19 Konrad Trifunovic <konrad.trifunovic@inria.fr>
4519 * graphite.c (new_scop): Memory allocation for SCOP_{NEWIVS, OLDIVS}.
4520 (free_scop): Memory deallocation for SCOP_NEWIVS, SCOP_OLDIVS.
4521 (create_var_name, save_var_name): Newly defined functions.
4522 (initialize_cloog_names): Part of the code factored out to
4524 (clast_to_gcc_expression): Now handles the case of clast_red_sum
4525 in clast_reduction statement.
4526 (graphite_create_new_loop): Now takes a new parameter
4528 (translate_clast): Now also takes the context_loop and bb_exit
4529 parameters. Rewritten the code so that it creates a gimple code
4530 inside the given context.
4531 (outermost_loop_layer, graphite_remove_iv, graphite_rename_ivs,
4532 remove_cond_expr, disconnect_cond_expr,
4533 disconnect_virtual_phi_nodes): Newly defined functions.
4534 * graphite.h (struct scop): added old_ivs vector.
4535 SCOP_OLDIVS: New macro.
4537 2008-06-19 Sebastian Pop <sebastian.pop@amd.com>
4539 * cfgloopmanip.c: Add missing function comments, fix formatting.
4541 2008-06-18 Konrad Trifunovic <konrad.trifunovic@inria.fr>
4543 * cfgloopmanip.c (update_dominators_in_loop): Defined.
4544 (create_empty_loop_on_edge): Defined.
4545 * tree-parloops.c (canonicalize_loop_ivs): Returns tree
4547 * cfgloop.h (create_empty_loop_on_edge): Declared as extern.
4548 (update_dominators_in_loop): Declared as extern
4549 * tree-flow.h (canonicalize_loop_ivs): Declared as extern.
4551 2008-06-16 Tobias Grosser <grosser@fim.uni-passau.de>
4553 * graphite.c (print_graphite_bb): Allow changing number of loops
4555 (initialize_cloog_names): Allow changing number of loops.
4556 (build_cloog_prog): Simplify.
4557 (find_transform): Enable cloog option --strides.
4558 (graphite_swap_loops): New.
4559 (graphite_strip_mine_loop): New.
4560 (graphite_trans_swap_1and2): New.
4561 (graphite_trans_strip): New.
4562 (graphite_transform_loops): Add graphite_trans_strip.
4563 * graphite.h (scop_max_loop_depth): New.
4565 2008-06-15 Tobias Grosser <grosser@fim.uni-passau.de>
4567 * graphite.c (build_scop_iteration_domain): Remove forgotten
4568 line. (Fixes compile)
4570 2008-06-15 Tobias Grosser <grosser@fim.uni-passau.de>
4572 * graphite.c (print_graphite_bb): Add output of GBB_LOOPS.
4573 (build_graphite_bb): Add GBB_LOOPS and GBB_DOMAIN and reorder.
4574 (build_bb_loops): New.
4575 (graphite_transform_loops): Add build_bb_loops.
4576 (schedule_to_scattering): Use gbb_nb_loops to support changing loop
4578 * graphite.h (graphite_bb): Add loops.
4579 (gbb_nb_loops): New.
4580 (gbb_loop_at_index): New.
4581 (gbb_loop_index): New.
4582 (nb_params_in_scop): Renamed to scop_nb_params. Updated all functions
4583 using nb_params_in_scop.
4585 2008-06-14 Tobias Grosser <grosser@fim.uni-passau.de>
4587 * graphite.c (print_graphite_bb): Adapt to minimized schedule.
4588 (build_scop_canonical_schedules): Build minimized schedule.
4589 (schedule_to_scattering): Adapt to minimized schedule.
4590 * graphite.h (graphite_bb): Add/Update descriptions.
4592 2008-06-14 Adrien Eliche <aeliche@isty.uvsq.fr>
4593 Tobias Grosser <grosser@fim.uni-passau.de>
4595 * graphite.c (print_graphite_bb): Add condition printing.
4597 (dump_gbb_conditions): New.
4598 (build_scop_conditions_1): New.
4599 (build_scop_conditions): New.
4600 * graphite.h (graphite_bb): Add conditions.
4602 2008-06-14 Tobias Grosser <grosser@fim.uni-passau.de>
4604 * graphite.c (print_graphite_bb):
4605 (free_graphite_bb): New.
4606 (free_scop): Free bbs.
4607 (get_bb_type): Free doms.
4608 (build_scop_context): Free context matrix.
4609 (build_loop_iteration_domains): Remove unused code.
4610 (build_cloog_prog): Free scattering function and blocklist.
4611 (find_transform): Free options.
4613 2008-06-13 Tobias Grosser <grosser@fim.uni-passau.de>
4615 * graphite.c (loop_body_to_cloog_stmts): Rename to add_bb_domains.
4616 Remove unnecessery cloog data structures. Make a copy of the domain
4617 (setup_cloog_loop): Rename to build_loop_iteration_domains. Remove
4618 unnecessary cloog data structures. Fix memory leaks. Remove insert
4619 into SCOP_LOOP2CLOOG_LOOP as the inserted CloogLoops will never be
4621 (build_scop_iteration_domain): Remove unnecessary cloog
4622 data structures. Fix memory leaks.
4623 (graphite_transform_loops): Disable build_scop_dynamic_schedules as it
4624 uses SCOP_LOOP2CLOOG_LOOP, that is at the moment not working.
4626 2008-06-12 Tobias Grosser <grosser@fim.uni-passau.de>
4628 * graphite.c (find_scop_params): Remove initialize_cloog_names.
4630 2008-06-12 Tobias Grosser <grosser@fim.uni-passau.de>
4632 * graphite.c (end_scop): Style fix.
4633 (schedule_to_scattering): Style and comment fix.
4635 2008-06-12 Tobias Grosser <grosser@fim.uni-passau.de>
4636 * graphite.c (print_graphite_bb): Fix definiton of
4637 schedule_to_scattering.
4638 (initialize_cloog_names): Change nb_scattdims to max loop
4640 (schedule_to_scattering): Take parameter for number of scattering
4642 (build_cloog_prog): Only build as much scattering dimensions as
4645 2008-06-12 Tobias Grosser <grosser@fim.uni-passau.de>
4647 * graphite.c (end_scop): Disable bb splitting. Fixes SIGSEGV
4648 in polyhedron/aermod.f90.
4650 2008-06-11 Tobias Grosser <grosser@fim.uni-passau.de>
4651 Dwarak Rajagopal <dwarak.rajagopal@amd.com>
4652 Harsha Jagasia <harsha.jagasia@amd.com>
4654 * graphite.c (is_bb_addable): Fix segfault.
4656 2008-06-10 Tobias Grosser <grosser@fim.uni-passau.de>
4658 * graphite.c (is_bb_addable): Fix memory leak, handling of loops
4659 with multiple exits and conditional handling in edge cases.
4660 (is_loop_exit): Fix memory leak. (Forgotten in last commit)
4662 * testsuite/gcc.dg/graphite/scop-14.c: New.
4664 2008-06-06 Tobias Grosser <grosser@fim.uni-passau.de>
4665 Adrien Eliche <aeliche@isty.uvsq.fr>
4667 * graphite.c (is_bb_addable): Add more comments and enhance
4668 readablity of the source code. Fix memory leak.
4669 (is_loop_exit): Fix memory leak.
4671 2008-06-05 Tobias Grosser <grosser@fim.uni-passau.de>
4673 * graphite.c (first_loop_in_scop): Deleted.
4674 (setup_cloog_loop): Only walk the loop chain for inner loops.
4675 (build_scop_iteration_domain): Execute setup_cloog_loop for
4676 all loops in the first layer.
4678 2008-06-05 Tobias Grosser <grosser@fim.uni-passau.de>
4680 * graphite.c (scan_tree_for_params): Change the way params are
4681 added to be indepenent of the number of loops.
4682 (setup_cloog_loop): Revert to short matrix format. Fix parameter
4684 (build_cloog_prog): Revert to short matrix format.
4686 2008-06-05 Sebastian Pop <sebastian.pop@amd.com>
4687 Dwarak Rajagopal <dwarak.rajagopal@amd.com>
4689 * tree-loop-fusion.c (fuse_loops): Fix uninitialized variable
4692 2008-06-05 Sebastian Pop <sebastian.pop@amd.com>
4694 * graphite.c (nb_data_refs_in_scop): New.
4695 (graphite_transform_loops): Print more stats: number of
4696 loops, basic blocks and data references per scop.
4698 2008-06-04 Sebastian Pop <sebastian.pop@amd.com>
4699 Jan Sjodin <jan.sjodin@amd.com>
4701 * graphite.c (loop_affine_expr, idx_record_params,
4702 find_scop_parameters, setup_cloog_loop): Use instantiate_scev
4703 instead of instantiate_parameters.
4705 2008-06-04 Tobias Grosser <grosser@fim.uni-passau.de>
4707 * graphite.c (schedule_to_scattering): Fix scattering dimensions,
4708 add support for parameters, add STATIC_SCHEDULE at the right places,
4711 2008-06-04 Tobias Grosser <grosser@fim.uni-passau.de>
4713 * graphite.c (build_scop_loop_nests): Only add the loops, that
4714 are contained completely in the SCoP.
4715 (build_cloog_prog): Disable scattering, until schedule_to_scattering
4716 and the domains are fixed.
4717 (build_scop_canonical_schedules): Add support for bbs not contained
4720 2008-06-04 Tobias Grosser <grosser@fim.uni-passau.de>
4722 * graphite.h (scop_contains_loop): Update comments to match
4723 the actual behavior.
4724 (scop_contains_loop): New.
4725 * graphite.c (schedule_to_scattering): Use scop_contains_loop.
4727 2008-06-04 Sebastian Pop <sebastian.pop@amd.com>
4729 * graphite.c (get_bb_type): On function body, i.e. loop_0,
4730 don't mark blocks as GBB_LOOP_SING_EXIT_HEADER, mark them
4733 2008-06-04 Sebastian Pop <sebastian.pop@amd.com>
4734 Tobias Grosser <grosser@fim.uni-passau.de>
4736 * graphite.c (graphite_transform_loops): Early return when
4737 there are no loops in the function.
4739 2008-05-31 Sebastian Pop <sebastian.pop@amd.com>
4740 Jan Sjodin <jan.sjodin@amd.com>
4742 * graphite.c (scan_tree_for_params, setup_cloog_loop): Compute the
4743 offset of the last loop.
4744 (setup_cloog_loop): Copy the entire outer constraint matrix.
4746 2008-05-31 Sebastian Pop <sebastian.pop@amd.com>
4747 Jan Sjodin <jan.sjodin@amd.com>
4749 * graphite.c (stmt_in_scop_p, function_parameter_p,
4750 invariant_in_scop_p): Removed.
4751 (scan_tree_for_params): Can be used with no constraint
4752 matrix for gathering parameters.
4753 (idx_record_params): Don't use idx_record_param, instead use
4754 scan_tree_for_params.
4755 (find_scop_parameters): Same.
4756 (setup_cloog_loop, build_scop_iteration_domain, build_cloog_prog):
4757 Fix the size of loop domains.
4758 (schedule_to_scattering): Exit when the outer loop is not in scop.
4759 (find_transform): Enable build_cloog_prog.
4761 2008-05-31 Sebastian Pop <sebastian.pop@amd.com>
4762 Jan Sjodin <jan.sjodin@amd.com>
4764 * graphite.c (schedule_to_scattering): Make scattering domains
4765 uniformly of the same size, as required by CLooG 0.14.0 and before.
4767 2008-05-31 Sebastian Pop <sebastian.pop@amd.com>
4768 Jan Sjodin <jan.sjodin@amd.com>
4770 * graphite.c (schedule_to_scattering): Rewrite, correct the
4771 translation of the scheduling function to scattering.
4772 (build_cloog_prog): Call schedule_to_scattering only once.
4773 * graphite.h (scop_loop_index): Do not fail for loops not
4774 in the scop: return -1.
4776 2008-05-30 Tobias Grosser <grosser@fim.uni-passau.de>
4778 * graphite.c (build_graphite_bb): Initialize GBB_DOMAIN.
4779 (loop_body_to_cloog_stmts): Export GBB_DOMAIN.
4780 (setup_cloog_loop): Export GBB_DOMAIN.
4781 (build_cloog_prog): New. Create new CLOOG_PROG, which should be
4782 able to rebuild the original control flow.
4783 * graphite.h (graphite_bb): Add domain field and access macro.
4786 2008-05-30 Sebastian Pop <sebastian.pop@amd.com>
4788 * graphite.c (debug_gbb): New.
4789 (print_scop, build_graphite_bb): Use SCOP_BBS.
4790 (build_scop_bbs): Reimplemented.
4791 (dfs_bb_in_scop_p): Removed.
4792 (build_scop_loop_nests): Reorder loops inserted in
4793 SCOP_LOOP_NEST: outer loops should come first.
4794 (build_scop_canonical_schedules): Reinitialize at zero
4795 the components of the SCOP_STATIC_SCHEDULE for the loops
4796 that have already been parsed.
4798 * graphite.h (debug_gbb): Declared.
4800 2008-05-30 Sebastian Pop <sebastian.pop@amd.com>
4801 Jan Sjodin <jan.sjodin@amd.com>
4803 * graphite.c (create_empty_loop): Renamed graphite_create_new_loop.
4804 (graphite_loop_to_gcc_loop): Removed.
4805 (remove_all_edges): New.
4806 (graphite_stmt_to_gcc_stmt): Renamed translate_clast.
4807 (gloog): Remove useless code.
4809 2008-05-29 Tobias Grosser <grosser@fim.uni-passau.de>
4811 * graphite.c (get_bb_type): Reworked. We distinguish between
4812 loops with one or multiple exits.
4813 (is_loop_exit): New.
4815 (is_bb_addable): Rework condition handling, now support for case
4816 case statements and loops with multiple exits.
4818 * testsuite/gcc.dg/graphite/scop-11.c: New.
4819 * testsuite/gcc.dg/graphite/scop-12.c: New.
4820 * testsuite/gcc.dg/graphite/scop-13.c: New.
4822 2008-05-29 Tobias Grosser <grosser@fim.uni-passau.de>
4824 * graphite.c (dot_all_scops_1): Fix some colors. Reuse colors, if
4825 we have too many colors.
4827 2008-05-22 Sandeep Maram <smaram_b04@iiita.ac.in>
4829 * doc/invoke.texi (-ftree-loop-fusion): Document.
4830 * tree-pass.h (pass_loop_fusion): Declared.
4831 * tree-loop-fusion.c: New.
4832 * timevar.def (TV_TREE_LOOP_FUSION): Declared.
4833 * tree-data-ref.c (find_data_references_in_loop): Make extern.
4834 * tree-data-ref.h (find_data_references_in_loop): Declared.
4835 * common.opt (ftree-loop-fusion): Declared.
4836 * Makefile.in (tree-loop-fusion.o): Added rule and to OBJS-common.
4838 2008-05-21 Sebastian Pop <sebastian.pop@amd.com>
4840 * graphite.c (build_access_matrix): Fix typo from the merge.
4842 2008-05-20 Sebastian Pop <sebastian.pop@amd.com>
4844 * Merge from mainline (130800:135673).
4846 2008-05-07 Sebastian Pop <sebastian.pop@amd.com>
4848 * graphite.c (end_scop): The exit of the scop is not part of the scop.
4849 Update dominators after splitting.
4851 2008-05-07 Sebastian Pop <sebastian.pop@amd.com>
4853 * graphite.c (is_bb_addable): Return the harmful statement.
4854 Factor up some code.
4855 (end_scop): New. Splits end of scope bbs on a harmful statement.
4856 (build_scops_1): Call end_scop.
4858 2008-05-07 Sebastian Pop <sebastian.pop@amd.com>
4860 * graphite.c: (succs_at_same_depth, end_scop, all_preds_visited_p,
4861 all_succs_visited_p, start_new_scop_for_each_succ, start_new_scop,
4862 add_dominators_to_open_scops, stop_last_open_scop, scop_end_loop,
4863 build_scops_1): Removed.
4864 (build_scops_2): Renamed build_scops_1.
4866 2008-05-06 Sebastian Pop <sebastian.pop@amd.com>
4868 * graphite.c: Fix formatting.
4870 2008-05-06 Tobias Grosser <grosser@fim.uni-passau.de>
4872 * graphite.c (get_bb_type): New.
4874 (build_scops_2): New.
4875 (is_bb_addable): New.
4876 (build_scops): Switch the scop detection.
4877 (build_scop_bbs): Add entry bb to scop.
4878 * graphite.h (struct scop): Update comment.
4880 2008-05-06 Tobias Grosser <grosser@fim.uni-passau.de>
4882 * graphite.c (dot_all_scops_1): Fix some incorrect colors and add
4885 2008-05-06 Tobias Grosser <grosser@fim.uni-passau.de>
4887 * testsuite/gcc.dg/graphite/scop-1.c: Update.
4888 * testsuite/gcc.dg/graphite/scop-2.c: Update.
4889 * testsuite/gcc.dg/graphite/scop-4.c: Update.
4890 * testsuite/gcc.dg/graphite/scop-5.c: Add.
4891 * testsuite/gcc.dg/graphite/scop-6.c: Add.
4893 2008-05-06 Sebastian Pop <sebastian.pop@amd.com>
4895 * testsuite/gcc.dg/graphite/scop-0.c: Add.
4896 * testsuite/gcc.dg/graphite/scop-7.c: Add.
4897 * testsuite/gcc.dg/graphite/scop-8.c: Add.
4898 * testsuite/gcc.dg/graphite/scop-9.c: Add.
4899 * testsuite/gcc.dg/graphite/scop-10.c: Add.
4901 2008-05-06 Tobias Grosser <grosser@fim.uni-passau.de>
4903 * graphite.c (scop_affine_expr): Renamed to loop_affine_expr.
4904 Check affine expressions depending on the outermost loop
4906 (stmt_simple_for_scop_p): Same.
4907 (harmfule_stmt_in_scop): Same.
4909 2008-04-28 Tobias Grosser <grosser@fim.uni-passau.de>
4911 * graphite.c (dot_all_scops): Remove incorrect difficult bb coloring,
4912 mark entry and exit, that are not part of the SCoP and update HTML
4915 2008-04-25 Sebastian Pop <sebastian.pop@amd.com>
4917 * graphite.c (basic_block_simple_for_scop_p): Renamed
4919 (save_scop, preds_at_same_depth, test_for_scop_bound): Removed.
4920 (add_dominators_to_open_scops, build_scops_1): Reimplemented.
4921 (all_preds_visited_p, all_succs_visited_p,
4922 start_new_scop_for_each_succ, start_new_scop, stop_last_open_scop,
4923 scop_end_loop): New.
4924 (build_scops): Do not use dfs_enumerate_from.
4926 * testsuite/gcc.dg/graphite/scop-{1,2,4}.c: Updated.
4928 2008-04-23 Sebastian Pop <sebastian.pop@amd.com>
4930 * graphite.c: Add comments to functions that are missing a
4932 (graphite_create_iv): Removed. Merged in graphite_loop_to_gcc_loop.
4934 2008-04-23 Sebastian Pop <sebastian.pop@amd.com>
4936 * graphite.c (nb_params_in_scop): Moved...
4937 (graphite_bb_from_bb, loop_body_to_cloog_stmts): New.
4938 (setup_cloog_loop): Call loop_body_to_cloog_stmts.
4939 (clast_to_gcc_expression): Reduce column size to less than 80.
4940 (graphite_create_iv): Return the new name of the IV.
4941 (find_transform): Set options->esp and options->cpp.
4942 (gloog): Comment out the invalidation of the old loop code.
4943 (initialize_dependence_polyhedron): Replace scop_nb_params with
4946 * graphite.h (nb_params_in_scop): ... here.
4947 (scop_nb_params): Removed.
4948 (loop_domain_dim): Return something even when the loop was not
4949 found in the hash table: avoid ICEing on all the graphite.exp
4952 2008-04-14 Konrad Trifunovic <konrad.trifunovic@inria.fr>
4954 * tree-chrec.c (for_each_scev_op): SCEV can have 3 operands.
4956 * graphite.c (build_scop_dynamic_schedules): Schedule is built
4957 according to nesting level.
4958 (find_scop_parameters): Call instantiate_parameters.
4959 (scan_tree_for_params): Extend it to handle general affine bounds.
4960 Inner loop bound can depend on outer loop induction variable.
4961 (setup_cloog_loop): tmp variable is allocated on stack. Call
4962 instantiate_parameters with respect to outermost_loop_in_scop.
4963 (loop_domain_dim, ref_nb_loops, loop_iteration_vector_dim): moved to
4965 (create_empty_loop): Function loopify should be given edge
4966 probability, instead of edge frequency. Dominance relation from
4967 switch_bb to loop_header.
4968 (clast_to_gcc_expression): Added handling of clast_reduction node.
4969 (gloog): New functionality for removing old loop.
4970 (test_dependence): Factored out from build_rdg_all_levels.
4971 (build_rdg_all_levels): Dependence testing factored out to
4972 test_dependence function.
4974 * graphite.h (struct graphite_bb): Extended with dynamic_schedule.
4975 (loop_domain_dim, ref_nb_loops, loop_iteration_vector_dim): Moved
4978 2008-04-07 Sebastian Pop <sebastian.pop@amd.com>
4980 * graphite.c (free_scop, param_index, initialize_cloog_names,
4981 nb_params_in_scop): Use name_tree map instead of just a tree
4982 for keeping track of the variable name associated to that tree.
4983 (create_empty_loop, gmp_cst_to_tree, clast_name_to_gcc,
4984 clast_to_gcc_expression, graphite_create_iv,
4985 graphite_loop_to_gcc_loop, graphite_cond_to_gcc_cond,
4986 graphite_stmt_to_gcc_stmt): New.
4987 (gloog): Call these.
4988 * graphite.h (struct name_tree): New.
4989 (struct scop): Use name_tree instead of tree for params.
4990 Store a vector of name_tree for new_ivs.
4992 (scop_nb_params): Use name_tree instead of tree.
4994 2008-04-05 Alexander Lamaison <awl03@doc.ic.ac.uk>
4995 Sebastian Pop <sebastian.pop@amd.com>
4997 * tree-bounds.c: New.
4998 * tree-bounds.h: New.
4999 * tree-pass.h: Declare pass_bounds_early and pass_bounds_late.
5000 * passes.c: Schedule pass_bounds_early, pass_bounds_late.
5001 * builtins.c (expand_builtin_alloca): Add flag_bounds as for
5005 * c-cppbuiltin.c: Same.
5009 * tree-outof-ssa.c: Same.
5011 * Makefile.in: Same.
5013 2008-03-15 Antoniu Pop <antoniu.pop@gmail.com>
5014 Sebastian Pop <sebastian.pop@amd.com>
5016 * tree-loop-distribution.c (remaining_stmts,
5017 upstream_mem_writes): Removed static variables.
5018 (copy_loop_before, create_bb_after_loop,
5019 mark_nodes_having_upstream_mem_writes, free_rdg_components,
5020 rdg_build_components, rdg_build_partitions,
5021 dump_rdg_partitions): Extern.
5022 (generate_loops_for_partition, generate_code_for_partition): Do not
5024 (already_processed_vertex_p, predecessor_has_mem_write,
5025 mark_nodes_having_upstream_mem_writes, has_upstream_mem_writes,
5026 rdg_flag_all_uses, rdg_flag_uses, rdg_flag_vertex_and_dependent,
5027 rdg_flag_loop_exits, rdg_flag_similar_memory_accesses,
5028 build_rdg_partition_for_component, rdg_build_partitions, ldist_gen):
5029 Pass remaining_stmts and upstream_mem_writes as parameters.
5030 (rdg_component): Moved...
5031 (build_rdg_partition_for_component): Do not aggregate components when
5032 flag_streamize_loops is set.
5033 (gen_sequential_loops): New.
5034 (ldist_gen): Call gen_sequential_loops.
5036 * tree-pass.h (pass_loop_streamization): Declared.
5038 * omp-low.c (expand_omp_sections): Call add_bb_to_loop on created
5039 basic blocks when loops structures exist.
5041 * builtin-types.def (BT_FN_VOID_PTR_PTR_INT): New.
5043 * tree-ssa-loop-ivopts.c (expr_invariant_in_region_p): New.
5045 * tree-parloops.c (take_address_of, eliminate_local_variables_1,
5046 eliminate_local_variables_stmt, eliminate_local_variables,
5047 separate_decls_in_loop_name, separate_decls_in_loop_stmt,
5048 separate_decls_in_loop, gen_parallel_loop): Make them work on a region
5049 of code delimited by two edges in the CFG.
5050 (separate_decls_in_loop_name): Renamed separate_decls_in_region_name.
5051 (separate_decls_in_loop_stmt): Renamed separate_decls_in_region_stmt.
5052 (separate_decls_in_loop): Renamed separate_decls_in_region. Isolate
5053 the case of parallelisation of reductions.
5054 (create_loop_fn): Extern.
5055 (create_omp_parallel_region): New.
5057 * tree-data-ref.c (dump_data_dependence_relation): Don't call
5058 dump_data_reference for printing dra and drb.
5059 (create_rdg_edge_for_ddr, create_rdg_edges_for_scalar): Initialise
5061 (build_rdg): Don't call free_dependence_relations for the moment, as
5062 we attach dependence relations on each edge of the RDG.
5065 * tree-data-ref.h (rdg_component): ...here.
5066 (struct rdg_edge): New field ddr_p relation.
5067 (RDGE_RELATION): New.
5068 (create_bb_after_loop, copy_loop_before,
5069 mark_nodes_having_upstream_mem_writes, rdg_build_components,
5070 rdg_build_partitions, dump_rdg_partitions,
5071 free_rdg_components): Declared.
5073 * omp-builtins.def (BUILT_IN_GOMP_STREAM_ALIGN_PUSH,
5074 BUILT_IN_GOMP_STREAM_ALIGN_POP): New.
5076 * tree-loop-streamization.c: New.
5078 * tree-flow.h (gather_blocks_in_sese_region, create_loop_fn,
5079 create_omp_parallel_region, expr_invariant_in_region_p): Declared.
5081 * Makefile.in (tree-loop-streamization.o): Added to OBJS-common.
5083 * tree-cfg.c (gather_blocks_in_sese_region): Extern.
5085 * passes.c: Schedule pass_loop_streamization.
5087 2008-03-08 Tobias Grosser <grosser@fmi.uni-passau.de>
5089 * graphite.c (dot_all_scops_1): Fix formatting for difficult bbs and
5092 2008-03-07 Tobias Grosser <grosser@fim.uni-passau.de>
5094 * graphite.c (dot_all_scops): Update formatting.
5095 Bbs can now be part of more than one SCoP.
5097 2008-03-04 Sebastian Pop <sebastian.pop@amd.com>
5099 * graphite.c (new_loop_to_cloog_loop_str, setup_cloog_loop): Fix
5101 (loop_domain_dim): Check for unregistered toplev SCOP loop.
5102 * graphite.h (loop_to_cloog_loop): New.
5104 2008-03-04 Konrad Trifunovic <konrad.trifunovic@inria.fr>
5106 * graphite.c (loop_domain_dim, ref_nb_loops,
5107 loop_iteration_vector_dim): New.
5108 (build_access_matrix_with_af, build_access_matrix,
5109 initialize_dependence_polyhedron): Fixed for new matrix layout.
5110 No longer assume that all iteration domains are of the same
5113 2008-03-02 Sebastian Pop <sebastian.pop@amd.com>
5115 * tree-scalar-evolution.c (instantiate_parameters_1): An SSA_NAME
5116 defined in a loop at depth 0 is invariant.
5117 * tree-chrec.c (evolution_function_is_invariant_rec_p): Ditto.
5118 * tree-ssa-loop-ivopts.c (expr_invariant_in_loop_p): Should never
5119 be called at loop depth 0.
5121 * graphite.c (basic_block_simple_for_scop_p): Take the scop as
5123 (dot_all_scops_1): Update use of basic_block_simple_for_scop_p.
5124 (down_open_scop): Removed.
5125 (loop_in_scop_p): Redefined.
5126 (scop_affine_expr): New argument: scop.
5127 (stmt_simple_for_scop_p): New argument: scop. RETURN_EXPR is not
5128 a harmful statement ending a scop.
5129 (basic_block_simple_for_scop_p): New argument: scop.
5130 (get_loop_start): Removed.
5131 (new_scop): Initialize SCOP_LOOPS.
5132 (free_scop): Free SCOP_LOOPS.
5133 (succs_at_same_depth, preds_at_same_depth): New.
5134 (end_scop): Test the validity of a scop.
5135 (add_dominators_to_open_scops): New.
5136 (test_for_scop_bound): Call add_dominators_to_open_scops.
5137 Add cases for opening and closing multiple scops.
5138 (build_scops, build_scop_bbs): Iterate over basic blocks in
5140 (build_graphite_bb): Pass scop directly.
5141 (dfs_bb_in_scop_p): New.
5142 (scop_record_loop): Use SCOP_LOOPS for not recording the same loop
5144 (nb_loops_around_gb): Use loop_in_scop_p.
5145 (schedule_to_scattering): Disabled for the moment the code computing
5146 the "textual order for outer loop".
5148 * graphite.h (struct scop): New field loops.
5150 (scop_loop_index): Test that the given loop belongs to SCOP_LOOPS.
5152 * testsuite/gcc.dg/graphite/scop-{1,...,7}.c: Updated.
5154 2008-02-27 Antoniu Pop <antoniu.pop@gmail.com>
5155 Sebastian Pop <sebastian.pop@amd.com>
5157 * builtin-types.def (BT_FN_PTR_SIZE_UINT, BT_FN_BOOL_PTR): New.
5158 * common.opt (fstreamize-loops): New.
5159 * omp-builtins.def (BUILT_IN_GOMP_STREAM_CREATE,
5160 BUILT_IN_GOMP_STREAM_PUSH, BUILT_IN_GOMP_STREAM_HEAD,
5161 BUILT_IN_GOMP_STREAM_POP, BUILT_IN_GOMP_STREAM_EOS_P,
5162 BUILT_IN_GOMP_STREAM_SET_EOS, BUILT_IN_GOMP_STREAM_DESTROY): New.
5164 2008-02-22 Konrad Trifunovic <konrad.trifunovic@inria.fr>
5166 * tree-data-ref.c (build_empty_rdg): New.
5167 (build_rdg): Use it.
5168 * tree-data-ref.h (build_empty_rdg): Declared.
5169 * graphite.c (free_scop): Free SCOP_LOOP2CLOOG_LOOP.
5170 (find_vertex_for_stmt): Removed.
5171 (build_rdg_all_levels): Use build_empty_rdg and rdg_vertex_for_stmt.
5173 2008-02-21 Sebastian Pop <sebastian.pop@amd.com>
5175 * tree-loop-distribution.c (generate_builtin): After cancelling the
5176 loop tree, also delete basic blocks.
5177 (rdg_flag_uses): Stop recursion when a vertex has already been
5180 2008-02-15 Konrad Trifunovic <konrad.trifunovic@inria.fr>
5182 * graphite.c (build_scop_alpha): Removed.
5183 (graphite_transform_loops): Add a dummy call to build_all_rdg_levels
5184 and dump_dependence_graph to avoid compiler warnings.
5186 2008-02-14 Konrad Trifunovic <konrad.trifunovic@inria.fr>
5188 * tree-data-ref.c (dr_may_alias_p, create_rdg_vertices): Extern.
5189 * tree-data-ref.h (dr_may_alias_p, create_rdg_vertices): Declared.
5190 * graphite.c (new_loop_to_cloog_loop_str, hash_loop_to_cloog_loop,
5191 eq_loop_to_cloog_loop, del_loop_to_cloog_loop): New.
5192 (new_scop, setup_cloog_loop): Initialize SCOP_LOOP2CLOOG_LOOP.
5193 (initialize_dependence_polyhedron, find_vertex_for_stmt,
5194 initialize_data_dependence_polyhedron, is_empty_polyhedron,
5195 statement_precedes_p, build_rdg_all_levels, build_scop_alpha,
5196 dump_dependence_graph): New.
5197 * graphite.h (struct graphite_bb): New field compressed_alpha_matrix.
5199 (struct scop): New field loop2cloog_loop.
5200 (SCOP_LOOP2CLOOG_LOOP, struct data_dependence_polyhedron,
5201 RDGE_DDP, ddp_p, struct loop_to_cloog_loop_str): New.
5203 2008-02-10 Konrad Trifunovic <konrad.trifunovic@inria.fr>
5205 * graphite.c (build_graphite_bb): Fix initialization
5206 of the graphite basic block.
5208 2008-02-05 Sebastian Pop <sebastian.pop@amd.com>
5210 * graphite.c (scan_tree_for_params): Rewrite for the new layout of
5211 loop domain matrix. Pass in the number of loops contained in the
5213 (nb_loops_around_gb): Moved before setup_cloog_loop that uses it.
5214 (setup_cloog_loop): Rewrite for the new layout of loop domain matrix:
5215 loops that are not surrounding the current loop are not represented
5216 in the domain constraint matrix.
5217 (build_scop_iteration_domain): Initial domain constraint matrix
5218 contains only the eq/ineq, cst, and scop parameters columns.
5220 2008-01-29 Tobias Grosser <grosser@fim.uni-passau.de>
5222 * graphite.c (schedule_to_scattering, nb_loops_around_gb): New.
5223 (print_graphite_bb): Print scattering.
5225 2008-01-29 Tobias Grosser <grosser@fim.uni-passau.de>
5227 * graphite.c (initialize_cloog_names): Initialize names of
5228 scattering variables.
5230 2009-01-29 Tobias Grosser <grosser@fim.uni-passau.de>
5232 * graphite.c (dot_all_scops_1): Disable debug output while
5235 2008-01-29 Tobias Grosser <grosser@fim.uni-passau.de>
5237 * graphite.c (find_transform): Change cloog output language to C.
5239 2008-01-27 Sebastian Pop <sebastian.pop@amd.com>
5241 * tree-loop-distribution.c (generate_memset_zero,
5242 generate_builtin, generate_code_for_partition,
5243 rdg_flag_all_uses): New.
5244 (rdg_flag_uses): Gather in the same partition the statements defining
5245 the VUSES of the current statement.
5246 (rdg_flag_similar_stores): Renamed rdg_flag_similar_memory_accesses.
5247 Gather in the same partition not only the stores to the same memory
5248 access, but also the reads.
5249 (ldist_generate_loops): Renamed ldist_gen.
5251 2008-01-24 Sebastian Pop <sebastian.pop@amd.com>
5252 Tobias Grosser <grosser@fmi.uni-passau.de>
5254 * graphite.c (setup_cloog_loop): Chain all cloog loops with the
5255 next pointer, don't use the inner pointer.
5257 2008-01-20 Tobias Grosser <grosser@fmi.uni-passau.de>
5259 * graphite.c (dot_all_scops, dot_all_scops_1): New.
5260 (find_transform): Call dot_all_1.
5261 * graphite.h (dot_all_scops): Declared.
5263 2007-12-14 Sebastian Pop <sebastian.pop@amd.com>
5265 * tree-loop-distribution.c: Fix apsi.f ICE.
5266 (create_bb_after_loop): New.
5267 (generate_loops_for_partition): Use it.
5268 * testsuite/gfortran.dg/ldist-1.f90: New.
5270 * tree-data-ref.c (dot_rdg): Use /tmp/rdg.dot for dotty format.
5271 * graphite.c (dot_scop): Use /tmp/scop.dot for dotty format.
5273 2007-12-13 Tobias Grosser <grosser@fmi.uni-passau.de>
5275 * graphite.c (find_transform): Dump cloog program sent to cloog.
5277 2007-12-13 Tobias Grosser <grosser@fmi.uni-passau.de>
5279 * graphite.c (initialize_cloog_names): Initialize cloog
5282 2007-12-13 Tobias Grosser <grosser@fmi.uni-passau.de>
5284 * graphite.c (build_scop_context): Fix typo, for the matrix
5285 format: insert '0 >= 0' instead of '-1 >= 0'.
5287 2007-12-13 Sebastian Pop <sebastian.pop@amd.com>
5289 * Fix merge problems.
5291 2007-12-13 Sebastian Pop <sebastian.pop@amd.com>
5293 * graphite.c (setup_cloog_loop): Fix typo.
5295 2007-12-12 Sebastian Pop <sebastian.pop@amd.com>
5297 * doc/invoke.texi (-ftree-loop-distribution): Documented.
5298 * tree-loop-distribution.c: Reimplemented.
5299 * tree-pass.h (pass_loop_distribution): New.
5300 * tree-scalar-evolution.c (number_of_iterations_for_all_loops): Use
5302 * graphds.h (struct graph): New field indexes.
5303 * timevar.def (TV_TREE_LOOP_DISTRIBUTION): New.
5305 * tree-vect-analyze.c: Remove declaration of static functions when not
5307 * tree-vectorizer.c: Same.
5308 (rename_variables_in_loop): Now extern.
5309 (slpeel_tree_duplicate_loop_to_edge_cfg): Renamed
5310 tree_duplicate_loop_to_edge_cfg. Reset PENDING_STMT for edges after
5311 calling redirect_edge_and_branch_force.
5313 * tree-vectorizer.h (tree_duplicate_loop_on_edge): Declared.
5315 * tree-data-ref.c: Don't include tree-chrec.h.
5316 (debug_data_dependence_relations): New.
5317 (dump_data_dependence_relation): Call dump_data_reference on data refs
5319 (same_access_functions): Moved...
5320 (find_vertex_for_stmt): Renamed rdg_vertex_for_stmt.
5321 (dump_rdg_vertex, debug_rdg_vertex, dump_rdg_component,
5322 debug_rdg_component, dump_rdg, debug_rdg, dot_rdg_1, dot_rdg,
5323 struct rdg_vertex_info, ): New.
5324 (create_rdg_edge_for_ddr): Compute the dependence level before looking
5326 (create_rdg_vertices): Initialize the htab of graph->indexes.
5327 Initialize RDG_MEM_WRITE_STMT and RDG_MEM_READS_STMT.
5328 (stmts_from_loop): Don't save LABEL_EXPR.
5329 (hash_stmt_vertex_info, eq_stmt_vertex_info,
5330 hash_stmt_vertex_del): New.
5331 (build_rdg): Initialize rdg->indexes.
5332 (free_rdg, stores_from_loop, ref_base_address,
5333 rdg_defs_used_in_other_loops_p, have_similar_memory_accesses,
5334 have_similar_memory_accesses_1, ref_base_address_1,
5335 remove_similar_memory_refs): New.
5337 * tree-data-ref.h: Include tree-chrec.h.
5338 (debug_data_dependence_relations): Declared.
5339 (same_access_functions): ...here. Now static inline.
5340 (ddr_is_anti_dependent, ddrs_have_anti_deps,
5341 ddr_dependence_level): New.
5342 (struct rdg_vertex): New fields has_mem_write, has_mem_reads.
5343 (RDGV_HAS_MEM_WRITE, RDGV_HAS_MEM_READS, RDG_STMT, RDG_MEM_WRITE_STMT,
5344 RDG_MEM_READS_STMT): New.
5345 (dump_rdg_vertex, debug_rdg_vertex, dump_rdg_component,
5346 debug_rdg_component, dump_rdg, debug_rdg, dot_rdg,
5347 rdg_vertex_for_stmt): Declared.
5348 (struct rdg_edge): New field level.
5349 (RDGE_LEVEL, free_rdg): New.
5350 (stores_from_loop, remove_similar_memory_refs,
5351 rdg_defs_used_in_other_loops_p,
5352 have_similar_memory_accesses): Declared.
5353 (rdg_has_similar_memory_accesses): New.
5355 * lambda.h (dependence_level): New.
5356 * common.opt (ftree-loop-distribution): New.
5357 * tree-flow.h (debug_loop_ir): Renamed debug_loops.
5358 (print_loop_ir): Renamed print_loops.
5359 (debug_loop, debug_loop_num, print_loops_bb, mark_virtual_ops_in_bb,
5360 tree_duplicate_loop_to_edge_cfg, rename_variables_in_loop): Declared.
5361 * Makefile.in (TREE_DATA_REF_H): Depends on tree-chrec.h.
5362 (tree-loop-distribution.o): Added.
5363 * tree-cfg.c (mark_virtual_ops_in_region): Use mark_virtual_ops_in_bb.
5364 (mark_virtual_ops_in_bb): New.
5365 (print_loops_bb, debug_loop_num, debug_loop): New.
5366 * passes.c: Scheduled pass_loop_distribution.
5368 2007-12-12 Konrad Trifunovic <konrad.trifunovic@inria.fr>
5370 * graphite.c (scan_tree_for_params): Correct the number of columns
5372 (nb_flat_iterator): New.
5373 (setup_cloog_loop): Initialize to 1 the first column for inequalities.
5374 (build_scop_iteration_domain): Correct the number of columns for
5377 2007-12-12 Sebastian Pop <sebastian.pop@amd.com>
5379 * Merge from mainline (129697:130800).
5381 2007-10-30 Sebastian Pop <sebastian.pop@amd.com>
5383 * graphite.c (build_graphite_bb): SCoP's basic blocks are post
5384 dominated by SCoP's exit.
5385 (graphite_transform_loops): Compute post dominators.
5387 2007-10-28 Sebastian Pop <sebastian.pop@amd.com>
5389 * Merge from mainline (127169:129697).
5391 2007-10-28 Sebastian Pop <sebastian.pop@amd.com>
5393 * graphite.c (affine_expr): Renamed scop_affine_expr. Use an extra
5394 parameter for the basic block that contains the expression. Use
5395 outermost_loop_in_scop for evolution_function_is_affine_multivariate_p.
5396 (stmt_simple_for_scop_p): Pass to scop_affine_expr the basic block of
5398 * graphite.h (gbb_loop): New.
5399 (GBB_LOOP): Removed.
5401 2007-08-03 Sebastian Pop <sebpop@gmail.com>
5403 * Makefile.in: Fix merge problem.
5405 2007-08-03 Sebastian Pop <sebpop@gmail.com>
5407 * Merge from mainline (125309:127169).
5408 * tree-loop-distribution.c: Disabled.
5410 2007-06-05 Sebastian Pop <sebpop@gmail.com>
5412 * Merge from mainline (r123693:125309).
5414 2007-05-30 Sebastian Pop <sebpop@gmail.com>
5416 * tree-loop-distribution.c (correct_modify_expr_p): Renamed
5418 (correct_modify_p, check_statements, number_of_lvalue_uses,
5419 number_of_scalar_dependences, create_edges): Use GIMPLE_MODIFY_STMT
5420 instead of MODIFY_EXPR.
5421 (update_edge_with_ddv): Don't pass index_of_edge. Initialize
5424 2007-05-24 Sebastian Pop <sebpop@gmail.com>
5426 * tree-loop-distribution.c (struct rdg): Replace arrays by
5427 VECs for edges and vertices.
5428 (RDG_NBV, RDG_NBE, RDG_VERTEX, RDG_EDGE): Removed.
5429 (RDGV_NB_PARTITIONS): New.
5430 (PRDG_NBV, PRDG_NBE): Removed.
5431 (build_scc_graph, correct_partitions_p, mark_partitions, build_prdg,
5432 dump_rdg, find_vertex_with_stmt, create_vertices, free_rdg,
5433 number_of_scalar_dependences, create_edges, build_rdg): Use VECs.
5435 2007-05-17 Georges-Andre Silber <silber@cri.ensmp.fr>
5436 Sebastian Pop <sebpop@gmail.com>
5438 * doc/invoke.texi (-ftree-loop-distribution): Document.
5439 * tree-loop-distribution.c: New file.
5440 * tree-pass.h (pass_loop_distribution): Declared.
5441 * timevar.def (TV_TREE_LOOP_DISTRIBUTION): New.
5442 * tree-data-ref.c (initialize_data_dependence_relation): Initialize
5444 * tree-data-ref.h (data_dependence_relation): Add reversed_p.
5445 (DDR_REVERSED_P): New.
5446 * common.opt (-ftree-loop-distribution): New.
5447 * tree-flow.h (distribute_loops): Declared.
5448 * Makefile.in (OBJS-common): Depend on tree-loop-distribution.o.
5449 * passes.c (init_optimization_passes): Schedule loop distribution.
5451 2007-05-12 Sebastian Pop <sebastian.pop@inria.fr>
5453 * graphite.c (print_graphite_bb): Don't call dump_data_references.
5454 (print_scop): Don't print when scop is NULL.
5455 (build_scop_context, find_transform): Don't output to stderr.
5457 2007-05-09 Sebastian Pop <sebastian.pop@inria.fr>
5459 * tree-data-ref.c: Don't include graphite.h.
5460 Comment out the code for printing data reference's scop.
5461 (build_access_matrix_with_af): Moved...
5462 * tree-data-ref.h (build_access_matrix_with_af): Removed declaration.
5463 * graphite.c (build_access_matrix_with_af): ... here. Now static.
5464 (print_graphite_bb): Print basic block's schedule.
5465 (print_scop): Don't print the schedule, call cloog's pretty printer.
5466 (bb_in_scop_p): A basic block is in a scop only if it is both
5467 dominated and postdominated by the scop's entry and exit basic blocks.
5468 (function_parameter_p): New.
5469 (invariant_in_scop_p): Use function_parameter_p.
5470 (new_scop, save_scop): New.
5471 (end_scop, test_for_scop_bound, build_scops): Use new_scop, and
5473 (scan_tree_for_params): Directly build the constraint as CloogMatrix.
5474 (loop_in_scop_p): New.
5475 (scop_record_loop): Use loop_in_scop_p.
5476 (build_scop_domain): Renamed build_scop_iteration_domain.
5477 (setup_cloog_loop, initialize_cloog_names, find_scop_parameters,
5478 nb_params_in_scop, build_scop_context, first_loop_in_scop,
5479 setup_cloog_loop, dot_scop_1, dot_scop): New.
5480 * graphite.h (GBB_LOOP, SCOP_PROG, dot_scop): New.
5481 (struct scop): Add a pointer to cloog's representation of a program.
5483 2007-04-14 Sebastian Pop <sebastian.pop@inria.fr>
5485 * doc/invoke.texi (-ftree-check-verbose): Renamed
5486 -ftree-checks-verbose.
5487 * common.opt (flag_tree_check_verbose): Renamed
5488 flag_tree_checks_verbose.
5489 * tree-check.c (tree_check_warning): Use flag_tree_checks_verbose.
5491 2007-04-14 Sebastian Pop <sebastian.pop@inria.fr>
5493 * configure: Regenerated.
5494 * config.in: Regenerated.
5495 * tree-ssa-loop.c (graphite_transforms): Execute
5496 graphite_transform_loops only when HAVE_cloog.
5497 * configure.ac (HAVE_polylib, HAVE_cloog, GRAPHITE): Defined.
5498 * graphite.c: Include polylibgmp.h and cloog.h.
5499 (graphite_transform_loops): Removed loops parameter.
5500 * tree-flow.h (graphite_transform_loops): Update declaration.
5501 * Makefile.in (POLYLIBLIBS, POLYLIBINC, CLOOGLIBS, CLOOGINC): New.
5502 (LIBS): Depend on CLOOGLIBS and on POLYLIBLIBS.
5503 (INCLUDES): Depend on POLYLIBINC and on CLOOGINC.
5504 (OBJS-common): Remove dependence on graphite.o.
5505 (BACKEND): Depend on @GRAPHITE@.
5507 2007-04-13 Sebastian Pop <sebastian.pop@inria.fr>
5509 * doc/invoke.texi (-ftree-check-verbose): Documented.
5510 * testsuite/gcc.dg/tree-checker/tree-checks-1.c: New.
5511 * testsuite/gcc.dg/tree-checker/tree-checks-2.c: New.
5512 * testsuite/gcc.dg/tree-checker/tree-checks-3.c: New.
5513 * testsuite/gcc.dg/tree-checker/tree-checks-4.c: New.
5514 * testsuite/gcc.dg/tree-checker/tree-checks.exp: New.
5515 * testsuite/gcc.dg/tree-checker/condates.crp: New.
5516 * common.opt (ftree-checks-verbose): New.
5517 * tree-check.c (tree_check_warning): Move extra stderr output
5518 under control of flag_tree_check_verbose.
5520 2007-04-12 Sebastian Pop <sebastian.pop@inria.fr>
5522 * tree-match.c: Fix comments formatting.
5523 * tree-match.h: Fix comments formatting.
5524 * tree-check.c: Fix comments formatting.
5525 (tree_check_init): Restructure.
5527 2007-04-12 Nic Volanschi <nic.volanschi@free.fr>
5529 * doc/invoke.texi (-ftree-check, -ftree-checks): Documented.
5531 2007-04-10 Sebastian Pop <sebastian.pop@inria.fr>
5533 * Merge from mainline (r120733:123693).
5535 2007-03-20 Nic Volanschi <nic.volanschi@free.fr>
5537 * condate.y: New file.
5538 * tree-match.h (struct patt_info_s): New field sign.
5539 (struct condate_s): New field msg.
5540 (normalize_condate, name_condate, add_condate): New.
5541 (conds[], condate_parse): Made extern.
5542 * tree-check.c (tree_check_warning): First arg changed to cond;
5543 warning reformatted.
5544 (tree_check_init): Reset the TREE_VISITED bit on every CFG node.
5546 (tree_check): Process trivial condates.
5547 (read_delimited_string): Removed.
5548 (print_cond): Print name and msg.
5549 (conds[]): Made extern.
5550 (parse_tree_check_file_once): Rewritten to use the parser in
5552 Processing of option --tree_check_string moved to tree_scan().
5553 * Makefile.in: Added condate.y
5555 2007-03-12 Sebastian Pop <sebastian.pop@inria.fr>
5557 * tree-pretty-print.c (dump_generic_bb_buff, lazy_dump_generic_node):
5558 Use VECs instead of varrays.
5559 * diagnostic.h (lazy_dump_generic_node): Update declaration.
5560 * Makefile.in (pretty-print.o): Depend on vec.h.
5561 * pretty-print.c: Include tree.h and vec.h.
5562 (pp_clear_state, pp_write_list_to_stream, pp_base_format,
5563 pp_base_format, pp_construct, pp_base_string, pp_lazy_mode,
5564 new_tree_chunk, pp_add_tree, pp_add_string, pp_add_char, pp_write_list,
5565 pp_free_list): Use VECs instead of varrays.
5566 * pretty-print.h: Do not include varray.h.
5567 (struct tree_chunk_s): Declaration moved before its use.
5568 (output_buffer): Rename varray field to chunks.
5569 * tree-match.c (tree_equal, chunk_1st_char, chunks_lookahead,
5570 tree_1st_char, match_chunks_pattinfo, match_tree_pattinfo,
5571 save_global_holes): Use VECs instead of varrays.
5572 * tree-match.h: Declare VECs of cfg_node, and hole_p.
5573 * tree-check.c (scan_cfg_stmts, push_node,
5574 print_matching_stmt): Removed.
5575 (tree_check_instance, push_global_holes_if_new, tree_check,
5576 execute_tree_check): Use VECs instead of varrays.
5577 (gate_tree_check): Don't execute the CFG check when basic_block_info
5580 2007-01-12 Sebastian Pop <sebastian.pop@inria.fr>
5582 * Merge from mainline (r115016:120733).
5584 2007-01-12 Sebastian Pop <sebastian.pop@inria.fr>
5586 * Merge from mainline (r117632:117661).
5588 2007-01-12 Sebastian Pop <sebastian.pop@inria.fr>
5590 * tree-dump.c (dump_option_value_in): Add TDF_DEBUG.
5591 * tree-pass.h (TDF_DEBUG, debug_p): New.
5592 * tree-scalar-evolution.c (set_scalar_evolution, get_scalar_evolution,
5593 get_scalar_evolution, add_to_evolution, set_nb_iterations_in_loop,
5594 get_loop_exit_condition, analyze_evolution_in_loop,
5595 analyze_initial_condition, analyze_scalar_evolution,
5596 instantiate_parameters, number_of_latch_executions): Use debug_p.
5597 * tree-chrec.c (chrec_apply): Use debug_p.
5598 * tree-data-ref.c: Include graphite.h.
5599 (dump_data_reference): Print also the access matrix.
5600 (analyze_array, analyze_indirect_ref, init_data_ref,
5601 analyze_offset_expr, address_analysis, object_analysis,
5602 create_data_ref, finalize_ddr_dependent,
5603 non_affine_dependence_relation, analyze_ziv_subscript,
5604 analyze_siv_subscript_cst_affine,
5605 compute_overlap_steps_for_affine_1_2, analyze_subscript_affine_affine,
5606 can_use_analyze_subscript_affine_affine, analyze_siv_subscript,
5607 analyze_miv_subscript, analyze_overlapping_iterations,
5608 build_classic_dist_vector, subscript_dependence_tester,
5609 compute_affine_dependence, analyze_all_data_dependences): Use debug_p.
5610 (build_access_matrix_with_af): No longer static.
5611 * tree-data-ref.h (scop_p): ... declaration here.
5612 (data_reference.scop): New field.
5613 (DR_SCOP, DR_ACCESS_MATRIX): New.
5614 (build_access_matrix_with_af, dr_num_subscripts): Declared.
5615 * graphite.c (print_graphite_bb): Call dump_data_references.
5616 (print_scop): Use scop_nb_loops and scop_dim_domain.
5617 (test_for_scop_bound): Use debug_p.
5618 (scan_tree_for_params): Use scop_nb_loops, scop_nb_loops and
5620 (scop_loop_index): Moved...
5621 (scop_record_loop): New.
5622 (build_scop_loop_nests): Use scop_record_loop.
5623 (build_scop_domain): Use scop_dim_domain.
5624 (build_access_matrix): Implemented.
5625 (build_scop_canonical_schedules): Use scop_nb_loops.
5626 (build_graphite_bb): Initialize GBB_SCOP.
5627 * graphite.h (scop_p): Moved...
5628 (graphite_bb.scop): New field.
5629 (graphite_bb.iteration_domain, GBB_DOMAIN, scop.nb_params,
5630 scop.nb_loops, scop.dim_domain, SCOP_NB_LOOPS, SCOP_NB_PARAMS,
5631 SCOP_DIM_DOMAIN, SCOP_STMTS): Removed.
5632 (scop_nb_params, scop_nb_loops, scop_dim_domain, gbb_dim_domain,
5633 scop_loop_index): New.
5634 * Makefile.in (tree-data-ref.o): Depends on graphite.h.
5636 2007-01-05 Sebastian Pop <sebastian.pop@inria.fr>
5638 * Merge from mainline (r117661:120450).
5640 2006-10-12 Sebastian Pop <sebastian.pop@inria.fr>
5642 * tree-scalar-evolution.c (instantiate_parameters_1): Don't stop
5643 at the first declaration outside the varying loop, instantiate as
5645 * tree-chrec.c (for_each_scev_op): New.
5646 * tree-chrec.h (for_each_scev_op): Declared.
5647 * tree-ssa-loop.c (pass_graphite_trans): Don't dump the function.
5648 * tree-data-ref.c (get_references_in_stmt,
5649 find_data_references_in_stmt): New, from trunk.
5650 (find_data_references_in_loop): Use get_references_in_stmt
5651 and find_data_references_in_loop, modified as in trunk.
5652 (build_access_matrix_with_af): New.
5653 * tree-data-ref.h (data_reference): Add a field access_matrix.
5654 (data_ref_loc): New, as in trunk.
5655 * graphite.c (print_graphite_bb, bb_in_scop_p, stmt_in_scop_p,
5656 invariant_in_scop_p, param_index, scan_tree_for_params,
5657 scop_loop_index, build_scop_loop_nests, build_scop_domain, irp_data,
5658 idx_record_param, idx_record_params, build_access_matrix,
5659 build_scop_data_accesses, build_scop_canonical_schedules,
5660 build_graphite_bb, build_scop_bbs, find_params_in_bb,
5661 build_scop_params): New.
5662 * graphite.h (graphite_bb): New.
5663 (scop): Add fields static_schedule, params, loop_nest,
5665 * lambda.h: Declare vecs of lambda_matrix.
5666 * tree-flow.h (print_loop_ir_bb): Declared.
5667 * tree-cfg.c (print_loop_ir_bb): New.
5668 (print_loop): Use print_loop_ir_bb.
5670 2006-10-12 Sebastian Pop <pop@cri.ensmp.fr>
5672 * Merge from mainline (r115016:117632).
5674 2006-10-11 Sebastian Pop <pop@cri.ensmp.fr>
5676 * graphite.c (debug_scops): Adjust definition for avoiding a bootstrap
5677 break due to a warning.
5679 2006-10-10 Sebastian Pop <pop@cri.ensmp.fr>
5681 * graphite.c (print_scops, debug_scops): New.
5682 (graphite_transform): Renamed graphite_find_transform.
5683 * graphite.h (debug_scops): Declared.
5685 2006-08-17 Sebastian Pop <pop@cri.ensmp.fr>
5687 * tree-match.c: Reformat following the GNU style.
5688 * tree-match.h: Reformat following the GNU style.
5689 * tree-pattern.h: Removed empty file.
5690 * Makefile.in: Remove references to tree-pattern.h.
5691 * tree-check.c: Reformat following the GNU style.
5692 (execute_tree_check): Move gate condition code to...
5693 (gate_tree_check): ...here. New function.
5694 (pass_check): Use the gate function.
5696 2006-07-04 Nic Volanschi <nic.volanschi@free.fr>
5698 * tree-pattern.h: New. Tree pattern matching and checking using
5700 * tree-check.c: New. Tree/CFG checking pass.
5701 * tree-match.c: New. Library for tree pattern matching.
5702 * opts.c, common.opt: Add options --ftree-check & --ftree-checks.
5703 * toplev.c, flags.h: Add globals for tree-check pass.
5704 * Makefile.in: Integrate the files in tree-check pass.
5705 * timevar.def, tree-optimize.c, tree-pass.h: Register tree-check pass.
5706 * pretty-print.c, pretty-print.h, tree-pretty-print.c, diagnostic.h:
5707 Introduce a "lazy" pretty-print mode.
5708 * tree.c, tree.h: Add tree_name.
5710 2006-07-04 Sebastian Pop <pop@cri.ensmp.fr>
5712 * doc/invoke.texi (-fgraphite): Correct typo.
5713 * tree-scalar-evolution.c (number_of_iterations_for_all_loops): Update
5714 use of print_loop_ir.
5715 * testsuite/gcc.dg/graphite/scop-1.c: New.
5716 * testsuite/gcc.dg/graphite/scop-2.c: New.
5717 * testsuite/gcc.dg/graphite/graphite.exp: New.
5718 * graphite.c: Include domwalk.h.
5719 (print_scop): Print only the entry and exit blocks.
5720 (debug_scop): No longer static.
5721 (affine_expr): Fix formating. Return also true when the expression is
5723 (stmt_simple_for_scop_p): Fix formating.
5724 (build_scops): Use domwalk.
5725 (get_loop_start, end_scop, test_for_scop_bound): New.
5726 (graphite_transform_loops): Avoid printing on stderr.
5727 * graphite.h (debug_scop): Declared.
5728 * tree-flow.h (debug_loop_ir, print_loop_ir): Update declarations.
5729 * Makefile.in (graphite.o): Depend on domwalk.h.
5730 * tree-cfg.c (print_loop, print_pred_bbs, print_succ_bbs): Remove
5731 declarations for static functions.
5732 (print_loop, print_loop_ir, debug_loop_ir): Use an extra parameter for
5733 controlling output verbosity.
5735 2006-06-26 Sebastian Pop <pop@cri.ensmp.fr>
5736 Plesco Alexandru <shurikx@gmail.com>
5738 * doc/invoke.texi (-fgraphite): Document.
5739 * tree-pass.h (pass_graphite_transforms): Declared.
5740 * timevar.def (TV_GRAPHITE_TRANSFORMS): New.
5741 * tree-ssa-loop.c (graphite_transforms, gate_graphite_transforms): New.
5742 (pass_graphite_transforms): Defined.
5743 * tree-data-ref.c (free_data_ref, data_reference): Extern.
5744 * tree-data-ref.h (free_data_ref, data_reference): Declared.
5745 * graphite.c, graphite.h: New.
5746 * common.opt (fgraphite): Declared.
5747 * tree-flow.h (graphite_transform_loops): Declared.
5748 * Makefile.in (OBJS-common): Add graphite.o.
5749 (graphite.o): New rule.
5750 * passes.c (pass_graphite_transforms): Scheduled.