1 2009-09-17 Li Feng <nemokingdom@gmail.com>
4 * graphite-dependences.c (poly_drs_may_alias_p): Adjust definition.
5 (pddr_original_scattering): Make sure 2 pdr2 in the same base object set.
6 (graphite_carried_dependence_level_k): Ditto.
7 * graphite-poly.c (new_poly_dr): Add init of PDR_BASE_OBJECT_SET.
8 * graphite-poly.h (struct poly_dr): Add member dr_base_object_set.
9 (new_poly_dr): Adjust declaration.
10 * graphite-sese-to-poly.c (free_data_refs_aux): New.
11 (free_gimple_bb): Added free_data_refs_aux.
12 (build_poly_dr): Add dr_base_object_set.
13 (partition_drs_to_sets): New.
14 (dr_same_base_object_p): New.
15 (build_alias_set_for_drs): New.
16 (build_base_object_set_for_drs): New.
17 (build_scop_drs): Add build_base_obj_set_for_drs.
18 * graphite-sese-to-poly.h: Added #define for alias set number index and
19 base object set index.
20 * libgomp/testsuite/libgomp.graphite/force-parallel-6.c: Refine tests.
21 * libgomp/testsuite/libgomp.graphite/pr4118.c: New.
23 2009-09-16 Alexander Monakov <amonakov@ispras.ru>
25 * graphite-sese-to-poly.c (pdr_add_data_dimensions): Add bounds only
26 for ARRAY_REFs. Use array_ref_{low,up}_bound to determine bounds.
28 2009-09-14 Sebastian Pop <sebastian.pop@amd.com>
30 * graphite-sese-to-poly.c (struct irp_data): Removed.
31 (idx_record_params): Removed.
32 (find_params_in_bb): Scan for parameters the access functions; don't
33 parse the tree representation.
35 2009-09-14 Sebastian Pop <sebastian.pop@amd.com>
37 * tree-ssa-loop.c (gate_graphite_transforms): Disable Graphite
38 passes at -O1 and below.
40 2009-09-14 Sebastian Pop <sebastian.pop@amd.com>
42 * graphite-blocking.c: Fix order of includes: tree-chrec.h, then
43 tree-scalar-evolution.h, and then tree-data-ref.h.
44 * graphite-clast-to-gimple.c: Same.
45 * graphite-dependences.c: Same.
46 * graphite-interchange.c: Same.
47 * graphite-poly.c: Same.
48 * graphite-scop-detection.c: Same.
49 * graphite-sese-to-poly.c: Same.
51 * lambda-code.c: Same.
52 * matrix-reorg.c: Same.
53 * tree-data-ref.c: Same.
54 * tree-if-conv.c: Same.
55 * tree-loop-distribu: Same.: Same.
56 * tree-loop-linear.c: Same.
57 * tree-parloops.c: Same.
58 * tree-predcom.c: Same.
59 * tree-vect-patterns.c: Same.
61 2009-09-02 Sebastian Pop <sebastian.pop@amd.com>
63 Partially revert the previous patch, except the following.
64 * tree-scalar-evolution.c (instantiate_scev_not): Adapted to pass
65 as parameters the operands of the not expression.
67 2009-09-01 Sebastian Pop <sebastian.pop@amd.com>
69 * tree-scalar-evolution.c (instantiate_scev_assign): New.
70 Do not call analyze_scalar_evolution on assignments.
71 (instantiate_scev_phi): Call analyze_scalar_evolution.
72 (instantiate_scev_name): Call instantiate_scev_assign and
74 (instantiate_scev_not): Adapted to pass as parameters the operands
75 of the not expression.
77 2009-09-01 Sebastian Pop <sebastian.pop@amd.com>
79 * tree-scalar-evolution.c (instantiate_scev_binary): Adapted
80 to pass as parameters the operands of the binary expression.
82 2009-09-01 Sebastian Pop <sebastian.pop@amd.com>
84 * tree-scalar-evolution.c (instantiate_scev_bitnot): Renamed
85 instantiate_scev_not. Handle NEGATE_EXPR.
86 (instantiate_scev_r): Handle NEGATE_EXPR.
88 2009-09-01 Sebastian Pop <sebastian.pop@amd.com>
90 * tree-scalar-evolution.c (instantiate_scev_1): Renamed
92 (instantiate_scev_r): Move code in instantiate_scev_2
93 and instantiate_scev_1.
95 2009-09-01 Sebastian Pop <sebastian.pop@amd.com>
97 * tree-scalar-evolution.c (instantiate_scev_3): New.
98 (instantiate_scev_1): Move code in instantiate_scev_3.
100 2009-09-01 Sebastian Pop <sebastian.pop@amd.com>
102 * tree-scalar-evolution.c (instantiate_scev_poly): New.
103 (instantiate_scev_1): Move code in instantiate_scev_poly.
105 2009-09-01 Sebastian Pop <sebastian.pop@amd.com>
107 * tree-scalar-evolution.c (instantiate_scev_bitnot): New.
108 (instantiate_scev_1): Move code in instantiate_scev_bitnot.
110 2009-09-01 Sebastian Pop <sebastian.pop@amd.com>
112 * tree-scalar-evolution.c (instantiate_scev_convert): New.
113 (instantiate_scev_1): Move code in instantiate_scev_convert.
115 2009-09-01 Sebastian Pop <sebastian.pop@amd.com>
117 * tree-scalar-evolution.c (instantiate_scev_binary): New.
118 (instantiate_scev_1): Move code in instantiate_scev_binary.
120 2009-09-01 Sebastian Pop <sebastian.pop@amd.com>
122 * tree-scalar-evolution.c (instantiate_scev_name): New.
123 (instantiate_scev_1): Move code in instantiate_scev_name.
125 2009-08-28 Sebastian Pop <sebastian.pop@amd.com>
127 * Merge from mainline (150992:151171).
129 2009-08-25 Sebastian Pop <sebastian.pop@amd.com>
131 * graphite-dependences.c (graphite_legal_transform_bb): Call
132 pbb_remove_duplicate_pdrs.
133 * graphite-poly.c (can_collapse_pdr): Removed.
134 (pdr_find_duplicate): Removed.
135 (can_collapse_pdrs): New.
136 (pbb_remove_duplicate_pdrs): New.
137 (new_poly_dr): Do not look for duplicates.
138 * graphite-poly.h (struct poly_bb): New field pdr_duplicates_removed.
139 (PBB_PDR_DUPLICATES_REMOVED): New.
140 (pbb_remove_duplicate_pdrs): Declared.
142 2009-08-25 Sebastian Pop <sebastian.pop@amd.com>
144 * graphite-interchange.c (pbb_interchange_profitable_p): Adjust
145 the strides by multiplying by PDR_NB_REFS.
146 * graphite-poly.c (can_collapse_pdr): New.
147 (pdr_find_duplicate): New.
148 (new_poly_dr): Call pdr_find_duplicate. Collapse duplicate PDRs.
149 Initialize PDR_NB_REFS.
150 * graphite-poly.h (struct poly_dr): Add field nb_refs.
152 (new_poly_dr): Number of subscripts is a graphite_dim_t.
154 2009-08-25 Sebastian Pop <sebastian.pop@amd.com>
156 Revert one of the previous commits:
157 * graphite-dependences.c (graphite_legal_transform_bb): Avoid
158 the computation of symmetric data dependence relations.
159 (dependency_between_pbbs_p): Same.
161 2009-08-25 Sebastian Pop <sebastian.pop@amd.com>
164 * graphite-poly.c (apply_poly_transforms): Remove legality test before
167 2009-08-25 Sebastian Pop <sebastian.pop@amd.com>
169 * graphite-dependences.c (pddr_original_scattering): Return NULL
170 for read-read dependence relations.
171 * graphite-poly.h (enum poly_dr_type): Fix comment.
174 (pdr_may_write_p): New.
176 2009-08-25 Sebastian Pop <sebastian.pop@amd.com>
178 * graphite-poly.h (enum POLY_DR_TYPE): Renamed poly_dr_type.
179 (struct poly_dr): Same.
181 * graphite-poly.c (new_poly_dr): Same.
183 2009-08-25 Konrad Trifunovic <konrad.trifunovic@gmail.com>
184 Sebastian Pop <sebastian.pop@amd.com>
186 * graphite-blocking.c (pbb_strip_mine_loop_depth): Renamed
187 pbb_strip_mine_time_depth. Changed the implementation so that
188 transformation is expressed as a transformation on
189 time (scatttering) dimensions. Also, ensures that the 2d+1
190 scheduling format is preserved.
191 (pbb_strip_mine_profitable_p): Profitability is based on the
192 iteration number of a given time (scattering) dimension,
193 and not on a original loop depth dimension.
194 (pbb_strip_mine): Call pbb_number_of_iterations_at_time.
195 (pbb_do_strip_mine): Call psct_dynamic_dim.
196 * graphite-poly.c (pbb_number_of_iterations_at_time): New.
197 * graphite-poly.h (pbb_number_of_iterations_at_time): Declared.
198 (pbb_nb_dynamic_scattering_transform): New.
199 (psct_dynamic_dim): New.
201 2009-08-25 Konrad Trifunovic <konrad.trifunovic@gmail.com>
203 * graphite-ppl.c (ppl_max_for_le): Renamed ppl_max_for_le_pointset.
204 * graphite-ppl.h (ppl_max_for_le): Renamed ppl_max_for_le_pointset.
205 * graphite-poly.c (pbb_number_of_iterations): Rename ppl_max_for_le.
206 * graphite-interchange.c (build_linearized_memory_access): Same.
207 (memory_stride_in_loop): Same.
209 2009-08-25 Sebastian Pop <sebastian.pop@amd.com>
211 * graphite-dependences.c (pddr_original_scattering): New.
212 (graphite_legal_transform_dr): Call pddr_original_scattering.
215 * graphite-dependences.h (dot_deps): Declared.
216 * graphite-poly.c (new_poly_dr): Initialize PDR_ID.
217 (print_pdr): Print PDR_ID.
218 * graphite-poly.h (struct poly_dr): Add field id.
221 * graphite-scop-detection.c (dot_all_scops_1): Cleanup comment.
223 2009-08-22 Sebastian Pop <sebastian.pop@amd.com>
225 * graphite-dependences.c (graphite_carried_dependence_level_k): Do
226 not delete the original dependence relation.
228 2009-08-21 Sebastian Pop <sebastian.pop@amd.com>
230 * graphite-dependences.c (graphite_legal_transform_bb): Avoid
231 the computation of symmetric data dependence relations.
232 (dependency_between_pbbs_p): Same.
234 2009-08-21 Sebastian Pop <sebastian.pop@amd.com>
236 * graphite-dependences.c (new_poly_dr_pair): Renamed new_poly_ddr.
237 (eq_poly_dr_pair_p): Renamed eq_poly_ddr_p.
238 (hash_poly_dr_pair_p): Renamed hash_poly_ddr_p.
239 (free_poly_ddr): New.
240 (pddr_is_empty): New.
241 (dependence_polyhedron_1): Now returns a poly_ddr_p.
242 (dependence_polyhedron): Same. Remove useless gcc_assert.
244 (graphite_legal_transform_dr): Call pddr_is_empty and free_poly_ddr.
245 (graphite_carried_dependence_level_k): Call pddr_is_empty.
246 * graphite-dependences.h (enum poly_dependence_kind): New.
247 (poly_dr_pair): Renamed poly_ddr. Added a field kind.
248 (PDRP_SOURCE): Renamed PDDR_SOURCE.
249 (PDRP_SINK): Renamed PDDR_SINK.
250 (PDRP_DDP): Renamed PDDR_DDP.
252 (free_poly_ddr): Declared.
253 * graphite-poly.c (new_scop): Use the new hash function names.
254 * graphite-poly.h (struct scop): Renamed field original_pdr_pairs
256 (SCOP_ORIGINAL_PDR_PAIRS): Renamed SCOP_ORIGINAL_PDDRS.
258 2009-08-21 Sebastian Pop <sebastian.pop@amd.com>
260 * Merge from mainline (150764:150992).
262 2009-08-18 Sebastian Pop <sebastian.pop@amd.com>
264 * cfgloopmanip.c (create_empty_loop_on_edge): Generate upper
265 bounds with LT_EXPR to make niter analysis more precise on code
266 generated by Graphite.
268 2009-08-18 Sebastian Pop <sebastian.pop@amd.com>
270 * graphite-dependences.c (graphite_legal_transform_dr): Fix formatting.
271 (graphite_legal_transform_bb): Same.
272 (poly_drs_may_alias_p): Same.
274 2009-08-15 Sebastian Pop <sebastian.pop@amd.com>
277 * graphite-ppl.c (ppl_max_for_le): Correct the use of
278 ppl_Pointset_Powerset_C_Polyhedron_maximize.
280 2009-08-13 Sebastian Pop <sebastian.pop@amd.com>
282 * graphite-poly.c (print_pbb): Print PBB index.
284 2009-08-13 Sebastian Pop <sebastian.pop@amd.com>
286 * Merge from mainline (r150672:150764).
288 2009-08-13 Sebastian Pop <sebastian.pop@amd.com>
290 * graphite-interchange.c (ppl_max_for_le): Moved...
291 * graphite-poly.c (pbb_number_of_iterations): Call ppl_max_for_le.
292 * graphite-ppl.c (ppl_max_for_le): ... here.
293 * graphite-ppl.h (ppl_max_for_le): Declared.
295 2009-08-12 Sebastian Pop <sebastian.pop@amd.com>
297 * Merge from mainline (r150372:150672).
299 2009-08-11 Sebastian Pop <sebastian.pop@amd.com>
302 * sese.c (convert_for_phi_arg): New.
303 (add_guard_exit_phis): Use convert_for_phi_arg.
305 * testsuite/gfortran.dg/graphite/id-17.f: New.
307 2009-08-11 Sebastian Pop <sebastian.pop@amd.com>
309 * graphite-sese-to-poly.c (pdr_add_data_dimensions): Dont add
310 unknown subscript upper bounds.
312 * testsuite/gcc.dg/graphite/interchange-6.c: Un-XFAIL.
314 2009-08-11 Sebastian Pop <sebastian.pop@amd.com>
315 Pranav Garg <pranav.garg2107@gmail.com>
317 * graphite-interchange.c (gather_access_strides): Removed.
318 (ppl_max_for_le): New.
319 (build_linearized_memory_access): New.
320 (memory_stride_in_loop): New.
321 (pbb_interchange_profitable_p): Reimplemented.
322 * graphite-ppl.h (ppl_new_id_map): New.
323 (ppl_interchange): New.
325 * testsuite/gcc.dg/graphite/interchange-6.c: XFAILed.
327 2009-08-11 Sebastian Pop <sebastian.pop@amd.com>
329 * graphite-interchange.c (compute_subscript): Removed.
330 (compute_array_size_cstr): Removed.
331 (compute_array_size_poly): Removed.
332 (compute_array_size): Removed.
333 (gather_access_strides_poly): Removed.
334 (gather_access_strides): Empty.
336 2009-08-11 Sebastian Pop <sebastian.pop@amd.com>
338 * graphite-dependences.c (dependence_polyhedron_1): Replace
339 pdr_nb_subscripts with PDR_NB_SUBSCRIPTS.
340 (graphite_legal_transform_dr): Same.
341 (graphite_carried_dependence_level_k): Same.
342 * graphite-poly.c (new_poly_dr): Add a parameter nb_subscripts.
343 Initialize PDR_NB_SUBSCRIPTS.
344 (print_pdr_access_layout): Replace pdr_nb_subscripts with
346 * graphite-poly.h (struct poly_dr): Add nb_subscripts field.
347 (PDR_NB_SUBSCRIPTS): New.
348 (pdr_nb_subscripts): Removed.
349 (pdr_dim): Simplified.
350 * graphite-sese-to-poly.c (build_poly_dr): Replace pdr_nb_subscripts
351 with PDR_NB_SUBSCRIPTS.
353 2009-08-11 Sebastian Pop <sebastian.pop@amd.com>
355 * graphite-interchange.c (compute_array_size): Remove use of
357 * graphite-poly.c (new_poly_dr): Remove argument data_container.
358 Do not initialize PDR_DATA_CONTAINER.
359 (print_pdr): Do not print PDR_DATA_CONTAINER.
360 * graphite-poly.h (struct poly_dr): Remove data_container field.
361 (PDR_DATA_CONTAINER): Removed.
362 * graphite-sese-to-poly.c (pdr_add_data_dimensions): Remove use of
364 (build_poly_dr): Same.
366 2009-08-11 Sebastian Pop <sebastian.pop@amd.com>
368 * testsuite/gcc.dg/graphite/interchange-9.c: New.
370 2009-08-05 Konrad Trifunovic <konrad.trifunovic@gmail.com>
371 Sebastian Pop <sebastian.pop@amd.com>
373 * graphite-dependences.c (graphite_legal_transform_dr): Work on a
374 copy of the dependence polyhedron. Free the temporary objects.
375 (graphite_carried_dependence_level_k): Free unused objects before
378 * testsuite/gcc.dg/graphite/interchange-1.c: XFAILed.
379 * testsuite/gcc.dg/graphite/interchange-2.c: XFAILed.
380 * testsuite/gcc.dg/graphite/interchange-3.c: XFAILed.
381 * testsuite/gcc.dg/graphite/interchange-4.c: XFAILed.
382 * testsuite/gcc.dg/graphite/interchange-7.c: XFAILed.
384 2009-08-05 Sebastian Pop <sebastian.pop@amd.com>
386 * graphite-blocking.c (scop_do_strip_mine): Call store_scattering.
387 Early return without analyzing the data dependences if no
388 transform has been done. Call restore_scattering if the transform
390 (graphite-interchange.c): Same.
391 * graphite-poly.c (print_scattering_function): Test for PBB_TRANSFORMED.
392 (graphite_read_transforms): Initialize PBB_TRANSFORMED.
393 (apply_poly_transforms): Do not gcc_assert that
394 the transform is legal.
395 (new_poly_bb): Initialize PBB_TRANSFORMED, PBB_SAVED, and PBB_ORIGINAL.
396 Do not initialize PBB_NB_SCATTERING_TRANSFORM, PBB_NB_LOCAL_VARIABLES,
397 PBB_TRANSFORMED_SCATTERING, and PBB_ORIGINAL_SCATTERING.
398 (free_poly_dr): Free PBB_TRANSFORMED, PBB_SAVED, and PBB_ORIGINAL.
399 * graphite-poly.h (struct poly_scattering): New.
400 (struct poly_bb): Add original, transformed, and saved fields.
401 Remove transformed_scattering, original_scattering, nb_local_variables,
402 and nb_scattering_transform fields.
403 (PBB_ORIGINAL, PBB_TRANSFORMED, PBB_SAVED): New.
404 (poly_scattering_new): New.
405 (poly_scattering_free): New.
406 (poly_scattering_copy): New.
407 (store_scattering_pbb): New.
408 (store_scattering): New.
409 (restore_scattering_pbb): New.
410 (restore_scattering): New.
411 * graphite-sese-to-poly.c (build_pbb_scattering_polyhedrons):
412 Initialize PBB_TRANSFORMED and PBB_ORIGINAL.
414 2009-08-05 Sebastian Pop <sebastian.pop@amd.com>
416 * graphite-poly.c (print_pbb): Add parentheses in the pretty print.
419 2009-08-05 Sebastian Pop <sebastian.pop@amd.com>
421 * Makefile.in (graphite.o): Depends on PREDICT_H.
422 * graphite.c: Include predict.h.
423 (graphite_finalize): Call tree_estimate_probability.
424 * predict.c (predict_loops): Do not call scev_initialize and
426 (tree_estimate_probability_bb): New.
427 (tree_estimate_probability): Do not initialize loops: move that
428 code to the driver. Call tree_estimate_probability_bb.
429 (tree_estimate_probability_driver): New.
430 (pass_profile): Use tree_estimate_probability_driver.
431 * predict.h (tree_estimate_probability): Declared.
433 2009-08-05 Sebastian Pop <sebastian.pop@amd.com>
435 * graphite-clast-to-gimple.c (gloog): Add time to TV_GRAPHITE_CODE_GEN.
436 * graphite-dependences.c (graphite_legal_transform): Add time to
437 TV_GRAPHITE_DATA_DEPS.
438 (dependency_between_pbbs_p): Same.
439 * timevar.def (TV_GRAPHITE_DATA_DEPS, TV_GRAPHITE_CODE_GEN): New.
441 2009-08-03 Sebastian Pop <sebastian.pop@amd.com>
443 * Merge from mainline (r149952:150372).
445 2009-07-28 Sebastian Pop <sebastian.pop@amd.com>
447 * ChangeLog.graphite: Fix indenting, white spaces and 80 columns.
448 * graphite-blocking.c: Same.
449 * graphite-clast-to-gimple.c: Same.
450 * graphite-dependences.c: Same.
451 * graphite-poly.c: Same.
452 * graphite-poly.h: Same.
453 * graphite-ppl.c: Same.
454 * graphite-scop-detection.c: Same.
455 * graphite-sese-to-poly.c: Same.
458 2009-07-28 Sebastian Pop <sebastian.pop@amd.com>
460 * graphite-sese-to-poly.c (loop_entry_phi_arg): New.
461 (remove_simple_copy_phi): New.
462 (remove_invariant_phi): New.
463 (simple_copy_phi_p): New.
464 (reduction_phi_p): New.
465 (gsi_for_ssa_name_def): New.
466 (insert_out_of_ssa_copy): New.
467 (insert_out_of_ssa_copy_on_edge): New.
468 (create_zero_dim_array): New.
469 (scalar_close_phi_node_p): New.
470 (rewrite_close_phi_out_of_ssa): New.
471 (rewrite_phi_out_of_ssa): New.
472 (rewrite_reductions_out_of_ssa): New.
473 (build_poly_scop): Call rewrite_reductions_out_of_ssa.
475 * testsuite/gcc.dg/graphite/id-11.c: New.
476 * testsuite/gcc.dg/graphite/id-15.c: New.
477 * testsuite/gcc.dg/graphite/interchange-1.c: Un-XFAIL.
478 * testsuite/gcc.dg/graphite/interchange-2.c: Un-XFAIL.
479 * testsuite/gcc.dg/graphite/interchange-3.c: Un-XFAIL.
480 * testsuite/gcc.dg/graphite/interchange-4.c: Un-XFAIL.
481 * testsuite/gcc.dg/graphite/interchange-7.c: Un-XFAIL.
482 * testsuite/gcc.dg/graphite/scop-matmult.c: Un-XFAIL.
483 * testsuite/gfortran.dg/graphite/id-13.f: New.
484 * testsuite/gfortran.dg/graphite/id-5.f: New.
486 2009-07-28 Sebastian Pop <sebastian.pop@amd.com>
488 * graphite-clast-to-gimple.c (graphite_loop_normal_form): Do not
489 check that nb_reductions_in_loop is zero.
490 * graphite-scop-detection.c (harmful_stmt_in_bb): Don't filter out
492 (nb_reductions_in_loop): Removed.
493 (graphite_can_represent_loop): Do not call nb_reductions_in_loop.
494 * graphite-sese-to-poly.c (phi_node_is_iv): Removed.
495 (bb_contains_non_iv_scalar_phi_nodes): Removed.
496 (scop_contains_non_iv_scalar_phi_nodes): Removed.
497 (build_poly_scop): Do not call scop_contains_non_iv_scalar_phi_nodes.
499 2009-07-28 Sebastian Pop <sebastian.pop@amd.com>
501 * graphite-clast-to-gimple.c (build_cloog_prog): Do not code generate
502 statements that have an empty iteration domain.
503 * testsuite/gfortran.dg/graphite/id-16.f: New.
505 2009-07-28 Sebastian Pop <sebastian.pop@amd.com>
507 * tree-scalar-evolution.c (instantiate_scev_1): Return
508 chrec_dont_know when the result is not above instantiate_below.
509 * graphite-scop-detection.c (scopdet_basic_block_info): Fix formatting.
510 * graphite-sese-to-poly.c (create_linear_expr_from_tree): Assert that
511 the tree has a known scalar evolution.
512 * testsuite/gfortran.dg/graphite/id-14.f: New.
513 * testsuite/gfortran.dg/graphite/id-15.f: New.
515 2009-07-28 Sebastian Pop <sebastian.pop@amd.com>
517 * sese.c (rename_variables_in_stmt): Pass in an extra parameter
519 (rename_variables): Keep inserting renames after the ones already
522 2009-07-28 Sebastian Pop <sebastian.pop@amd.com>
524 * graphite-sese-to-poly.c (compare_bb_depths): New.
525 (graphite_sort_dominated_info): New.
526 (build_scop_bbs_1): Call graphite_sort_dominated_info.
527 (build_scop_scattering): Fix comment.
529 2009-07-28 Sebastian Pop <sebastian.pop@amd.com>
531 * graphite.c (graphite_finalize): Call print_loops instead of
532 dump_function_to_file.
533 * testsuite/gcc.dg/graphite/graphite.exp: Fix formatting.
534 * testsuite/gcc.dg/graphite/pr35356-1.c: New. Look for the number of
535 loops generated in the graphite output file.
536 * testsuite/gcc.dg/graphite/pr35356-2.c: New.
537 * testsuite/gcc.dg/graphite/pr35356-3.c: New. XFAILed for now.
538 * testsuite/gfortran.dg/graphite/id-12.f: New.
540 2009-07-24 Li Feng <nemokingdom@gmail.com>
542 * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-8.c:
545 2009-07-24 Li Feng <nemokingdom@gmail.com>
546 Tobias Grosser <grosser@fim.uni-passau.de>
548 * graphite-sese-to-poly.c (pdr_add_alias_set): Use data reference's
549 alias set number build alias in ACCESSES polyhedron.
550 (build_alias_set_for_drs): New.
551 (build_pbb_drs): Added build_alias_set_for_drs.
552 * graphite-dependences.c (poly_drs_may_alias_p): New.
553 (graphite_carried_dependence_level_k): Check alias information
554 before building polyhedron.
556 2009-07-24 Tobias Grosser <grosser@fim.uni-passau.de>
558 * Makefile.in (lambda-code.o): Fix formatting.
560 2009-07-24 Tobias Grosser <grosser@fim.uni-passau.de>
562 * Merge from mainline (r149350-149952)
564 2009-07-18 Tobias Grosser <grosser@fim.uni-passau.de>
566 * graphite-poly.c (apply_poly_transforms): Move strip_mine
567 before interchange to prepare for loop blocking.
569 2009-07-18 Tobias Grosser <grosser@fim.uni-passau.de>
571 * graphite-poly.c (apply_poly_transforms): Add checks after every
573 * graphite-sese-to-poly.c (build_poly_scop): Remove check, as already
574 done in apply_poly_transforms.
576 2009-07-17 Konrad Trifunovic <konrad.trifunovic@gmail.com>
578 * graphite-dependences.c (build_lexicographically_gt_constraint):
579 Replace RES parameter with *RES.
580 (dependence_polyhedron_1): Pass an address of the parameter RES
581 instead of value of RES.
583 2009-07-16 Sebastian Pop <sebastian.pop@amd.com>
585 * graphite.c (graphite_finalize): Fix comment.
586 (graphite_transform_loops): Reset scev info after code generation
589 2009-07-16 Sebastian Pop <sebastian.pop@amd.com>
591 * graphite.c (graphite_finalize): Call scev_reset.
593 2009-07-16 Sebastian Pop <sebastian.pop@amd.com>
595 * graphite-clast-to-gimple.c (compute_cloog_iv_types): Do not create
596 GBB_CLOOG_IV_TYPES hash table twice.
597 * graphite-sese-to-poly.c (free_gimple_bb): Call free_data_refs.
598 (add_condition_to_domain): Clear GMP values.
600 2009-07-16 Sebastian Pop <sebastian.pop@amd.com>
602 * graphite-dependences.c: Fix formatting.
603 * graphite-poly.c (free_poly_dr): Also free PDR_DATA_CONTAINER.
604 (pbb_number_of_iterations): Free ppl_Linear_Expression.
605 * graphite-sese-to-poly.c: Fix formatting.
606 * graphite.c (graphite_transform_loops): Create the hash table
607 after the early return.
609 2009-07-16 Sebastian Pop <sebastian.pop@amd.com>
611 * testsuite/gcc.dg/graphite/id-14.c: New.
612 * testsuite/gcc.dg/graphite/pr40157.c: New.
613 * testsuite/gfortran.dg/graphite/id-11.f: New.
615 2009-07-16 Sebastian Pop <sebastian.pop@amd.com>
617 * graphite-sese-to-poly.c (nb_pbbs_in_loops): New.
618 (build_poly_scop): Return false when there are no pbbs within
619 loops to avoid to pass to cloog scops with no loops.
621 2009-07-16 Sebastian Pop <sebastian.pop@amd.com>
623 * graphite-sese-to-poly.c (build_pbb_scattering_polyhedrons): Avoid
624 useless test "i % 2".
625 (build_pbb_scattering_polyhedrons): Fix formatting.
626 (build_poly_dr): Same.
627 * graphite.c (graphite_transform_loops): Restructure.
629 2009-07-14 Razya Ladelsky <razya@il.ibm.com>
631 * tree-ssa-loop-manip.c (rewrite_phi_with_iv): Remove
632 reduction_list parameter.
633 (rewrite_all_phi_nodes_with_iv): Same.
634 (canonicalize_loop_ivs): Same.
635 * tree-parloops.c (struct brli): Removed.
636 (build_reduction_list_info): Removed.
637 (build_new_reduction): New.
638 (analyze_reduction_list): Removed.
639 (gather_scalar_reductions): Find reductions instead of phi
640 nodes that can't be canonicalized.
641 (try_create_reduction_list): Remove reduction_list parameter.
642 (gen_parallel_loop): Same.
643 (parallelize_loops): Remove analyze_reductions variable,
644 initialization and free.
645 Change reduction_list htab initialization to reduction_info
646 elements instead of ssa names.
647 Call try_create_reduction_list and gen_parallel_loop without
648 analyzed_reduction argument.
649 * graphite-clast-to-gimple (graphite_loop_normal_form): Call
650 canonicalize_loop_ivs with one less argument.
651 * tree-flow.h (canonicalize_loop_ivs): Remove one argument.
653 2009-07-14 Konrad Trifunovic <konrad.trifunovic@gmail.com>
655 * graphite-dependences.c (new_poly_dr_pair): New.
656 (dependence_polyhedron): Renamed into dependence_polyhedron_1.
657 (new_poly_dr_pair): New.
658 (eq_poly_dr_pair_p): New.
659 (hash_poly_dr_pair_p): New.
660 * graphite-dependences.h (struct poly_dr_pair): New.
661 (eq_poly_dr_pair_p): Declared.
662 (hash_poly_dr_pair_p): Declared.
663 * graphite-poly.c (new_scop): Initialize SCOP_ORIGINAL_PDR_PAIRS.
664 (free_scop): Free SCOP_ORIGINAL_PDR_PAIRS.
665 * graphite-poly.h (struct scop): Add original_pdr_pairs field.
666 * Makefile.in (graphite-poly.o): Add dependence on
667 graphite-dependences.h.
669 2009-07-14 Sebastian Pop <sebastian.pop@amd.com>
671 * graphite-scop-detection.c (graphite_can_represent_scev): Do not let
672 polynomials of degree > 1 pass to Graphite.
673 * tree-chrec.c (scev_is_linear_expression): Call
674 evolution_function_is_affine_multivariate_p.
675 * testsuite/gfortran.dg/graphite/id-10.f90: New.
677 2009-07-14 Sebastian Pop <sebastian.pop@amd.com>
679 * tree-scalar-evolution.c (compute_overall_effect_of_inner_loop):
680 Instantiate scevs varying in outer loops.
681 * testsuite/gfortran.dg/graphite/id-9.f: Correct testcase.
683 2009-07-14 Sebastian Pop <sebastian.pop@amd.com>
685 * graphite-sese-to-poly.c (build_loop_iteration_domains): Do not insert
686 redundant constraint.
688 2009-07-14 Sebastian Pop <sebastian.pop@amd.com>
690 * testsuite/gcc.dg/graphite/graphite.exp: Fix comments.
691 * testsuite/gfortran.dg/graphite/graphite.exp: Trigger actions
692 based on the file names as in the C testsuite.
693 * testsuite/gfortran.dg/graphite/block-1.f90: Fix patterns.
694 * testsuite/gfortran.dg/graphite/block-2.f: Same.
695 * testsuite/gfortran.dg/graphite/block-3.f90: Same.
696 * testsuite/gfortran.dg/graphite/block-4.f90: Same.
697 * testsuite/gfortran.dg/graphite/id-1.f90: Same.
698 * testsuite/gfortran.dg/graphite/id-2.f90: Same.
699 * testsuite/gfortran.dg/graphite/id-3.f90: Same.
700 * testsuite/gfortran.dg/graphite/id-4.f90: Same.
701 * testsuite/gfortran.dg/graphite/id-6.f: Same.
702 * testsuite/gfortran.dg/graphite/id-9.f: Same.
703 * testsuite/gfortran.dg/graphite/interchange-1.f: Same.
704 * testsuite/gfortran.dg/graphite/interchange-2.f: Same.
705 * testsuite/gfortran.dg/graphite/scop-1.f: Same.
707 2009-07-14 Sebastian Pop <sebastian.pop@amd.com>
709 * sese.c (expand_scalar_variables_call): New.
710 (expand_scalar_variables_ssa_name): Handle calls in expander.
712 2009-07-13 Sebastian Pop <sebastian.pop@amd.com>
714 * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-6.c:
715 Expect to see the pattern twice.
716 * testsuite/gcc.dg/graphite/interchange-0.c: Un-XFAIL.
717 * testsuite/gcc.dg/graphite/interchange-5.c: Same.
718 * testsuite/gcc.dg/graphite/interchange-6.c: Same.
720 2009-07-13 Sebastian Pop <sebastian.pop@amd.com>
722 * testsuite/gcc.dg/graphite/id-10.c: New.
723 * testsuite/gcc.dg/graphite/id-12.c: New.
724 * testsuite/gfortran.dg/graphite/id-7.f: New.
725 * testsuite/gfortran.dg/graphite/id-8.f: New.
727 2009-07-13 Sebastian Pop <sebastian.pop@amd.com>
729 * graphite-sese-to-poly.c (pdr_add_data_dimensions): Fix division by
732 2009-07-13 Sebastian Pop <sebastian.pop@amd.com>
734 * sese.c (rename_variables_in_stmt): Call fold_convert during renaming.
736 2009-07-13 Sebastian Pop <sebastian.pop@amd.com>
738 * sese.c (expand_scalar_variables_stmt): Avoid unnecessary expansion.
740 2009-07-10 Sebastian Pop <sebastian.pop@amd.com>
742 * graphite-sese-to-poly.c (pdr_add_memory_accesses): Fix order of
743 building PDR subscripts.
745 2009-07-10 Sebastian Pop <sebastian.pop@amd.com>
747 * graphite-sese-to-poly.c (pdr_add_data_dimensions): Fix the
748 computation of array sizes.
750 2009-07-10 Sebastian Pop <sebastian.pop@amd.com>
752 * graphite-sese-to-poly.c (add_param_constraints): Disabled.
754 2009-07-10 Tobias Grosser <grosser@fim.uni-passau.de>
756 * graphite-dependences.c (map_into_dep_poly, map_dr_into_dep_poly,
757 build_pairwise_constraint, dr_equality_constraints,
758 build_pairwise_scheduling_equality,
759 build_pairwise_scheduling_inequality, lexicographically_gt_p,
760 build_lexicographically_gt_constraint, dependence_polyhedron,
761 graphite_legal_transform_dr, graphite_carried_dependence_level_k):
762 Move from NNC_Polyhedron to C_Polyhedron.
763 * graphite-interchange.c (compute_array_size_poly,
764 gather_access_strides): Dito.
765 * graphite-poly.c (apply_poly_transforms, new_poly_dr, free_poly_bb,
766 free_scop, pbb_number_of_iterations): Dito.
767 * graphite-poly.h (struct poly_dr, pdr_nb_subscripts, struct poly_bb,
768 pbb_dim_iter_domain, struct scop): Dito.
769 * graphite-ppl.c (new_Constraint_System_from_Cloog_Matrix,
770 new_Cloog_Domain_from_ppl_Polyhedron,
771 new_Cloog_Domain_from_ppl_Pointset_Powerset, ppl_set_coef_gmp,
772 ppl_insert_dimensions_pointset, ppl_insert_dimensions_pointset,
773 ppl_strip_loop, ppl_strip_loop, ppl_print_polyhedron_matrix,
774 ppl_print_powerset_matrix, debug_ppl_polyhedron_matrix,
775 debug_ppl_powerset_matrix, ppl_read_polyhedron_matrix): Dito.
776 * graphite-ppl.h (ppl_Pointset_Powerset_C_Polyhedron_t,
777 new_C_Polyhedron_from_Cloog_Matrix, ppl_print_powerset_matrix,
778 debug_ppl_powerset_matrix, ppl_insert_dimensions_pointset): Dito.
779 * graphite-sese-to-poly.c (build_pbb_scattering_polyhedrons,
780 build_loop_iteration_domains, ppl_constraint_type_from_tree_code,
781 add_condition_to_domain, add_condition_to_pbb, build_scop_context,
782 build_scop_iteration_domain, build_poly_dr): Dito
784 2009-07-09 Sebastian Pop <sebastian.pop@amd.com>
786 * testsuite/gcc.dg/graphite/graphite.exp: Added a rule to execute
788 * testsuite/gcc.dg/graphite/run-id-1.c: New.
790 2009-07-09 Sebastian Pop <sebastian.pop@amd.com>
792 * graphite-sese-to-poly.c (build_loop_iteration_domains): Add the
793 positivity constraint on the symbolic number of iterations.
795 2009-07-09 Sebastian Pop <sebastian.pop@amd.com>
797 * graphite-sese-to-poly.c (build_loop_iteration_domains): Rewrite.
799 2009-07-09 Sebastian Pop <sebastian.pop@amd.com>
800 Tobias Grosser <grosser@fim.uni-passau.de>
802 * graphite-clast-to-gimple.c (build_scop_context): Removed.
803 (build_cloog_prog): Directly use SCOP_CONTEXT.
804 * graphite-poly.c (new_scop): Initialize SCOP_CONTEXT.
805 (free_scop): Free SCOP_CONTEXT.
806 (print_scop_context): New.
807 (print_scop): Call print_scop_context.
808 (debug_scop_context): New.
809 * graphite-poly.h (print_scop_context, debug_scop_context): Declared.
810 (struct scop): Added field context.
812 * graphite-sese-to-poly.c (add_param_constraints): New.
813 (build_scop_context): New.
814 (build_poly_scop): Call build_scop_context.
816 2009-07-09 Sebastian Pop <sebastian.pop@amd.com>
818 * graphite-clast-to-gimple.c (gmp_cst_to_tree): Moved...
819 * graphite-ppl.c (ppl_set_inhomogeneous_gmp, ppl_set_coef_gmp): New.
820 (ppl_set_inhomogeneous, ppl_set_coef): Moved...
821 * graphite-ppl.h: Include double-int.h and tree.h.
822 (ppl_set_inhomogeneous_gmp, ppl_set_coef_gmp): Declared.
823 (ppl_set_inhomogeneous, ppl_set_coef): ...here.
824 (gmp_cst_to_tree): ...here. Reimplemented using mpz_get_double_int.
825 (tree_int_to_gmp, ppl_set_inhomogeneous_tree, ppl_set_coef_tree): New.
827 2009-07-09 Sebastian Pop <sebastian.pop@amd.com>
829 * graphite-clast-to-gimple.c (clast_to_gcc_expression_red): Generate
830 POINTER_PLUS_EXPR for pointer types.
831 (clast_to_gcc_expression): Same.
833 2009-07-09 Sebastian Pop <sebastian.pop@amd.com>
835 * graphite-poly.c (print_scattering_function): Early return when
836 PBB_TRANSFORMED_SCATTERING is not initialized.
837 (print_pbb_domain): Early return when PBB_DOMAIN is not initialized.
839 2009-07-08 Sebastian Pop <sebastian.pop@amd.com>
841 * tree-parloops.c (analyze_reduction_list): Remove unused variable
844 2009-07-08 Razya Ladelsky <razya@il.ibm.com>
846 * tree-parloops.c (analyze_reduction_list): Change return
848 (try_create_reduction_list): Move the call to
849 analyze_reduction_list to the beginining.
850 Call reduction_phi with analyzed_reductions as argument
851 instead of reduction_list.
853 2009-07-08 Tobias Grosser <grosser@fim.uni-passau.de>
855 * Merge from mainline (r148296:149346)
857 2009-07-07 Sebastian Pop <sebastian.pop@amd.com>
859 * graphite-scop-detection.c (graphite_can_represent_init): New.
860 (graphite_can_represent_scev): Call graphite_can_represent_init:
861 check that the initial value does not contain multiplications of
863 (stmt_has_simple_data_refs_p): New.
864 (stmt_simple_for_scop_p): Call stmt_simple_for_scop_p.
865 (is_simple_operand): Fix formatting.
866 * graphite-sese-to-poly.c (try_generate_gimple_bb): Fix formatting.
868 2009-07-07 Sebastian Pop <sebastian.pop@amd.com>
870 * testsuite/gcc.dg/graphite/id-13.c: New.
871 * graphite-sese-to-poly.c (graphite_stmt_p): Do not call
872 analyze_scalar_evolution, use scalar_evolution_in_region.
873 (scan_tree_for_params_right_scev): Add extra assert.
874 (parameter_index_in_region_1): Split from parameter_index_in_region.
875 (idx_record_params): Use scalar_evolution_in_region.
876 (find_params_in_bb): Same.
877 (find_scop_parameters): Same.
878 (build_loop_iteration_domains): Same.
879 (create_linear_expr_from_tree): Same.
880 * sese.c (scalar_evolution_in_region): New.
881 * sese.h (scalar_evolution_in_region): Declared.
882 (defined_in_sese_p): New.
883 * tree-scalar-evolution.c (compute_overall_effect_of_inner_loop): Not
885 * tree-scalar-evolution.h (compute_overall_effect_of_inner_loop):
888 2009-07-07 Sebastian Pop <sebastian.pop@amd.com>
890 * Makefile.in: Replace dependences on tree-chrec.h with SCEV_H.
891 TREE_DATA_REF_H also implies SCEV_H.
893 2009-07-07 Sebastian Pop <sebastian.pop@amd.com>
895 * graphite-poly.c (print_scop_params): New.
896 (print_scop): Call print_scop_params.
897 (debug_scop_params): New.
898 * graphite-poly.h (print_scop_params, debug_scop_params): Declared.
900 2009-07-07 Li Feng <nemokingdom@gmail.com>
902 * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-4.c: New.
903 * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-5.c: New.
904 * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-6.c: New.
905 * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-7.c: New.
906 * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-8.c: New.
907 * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-9.c: New.
909 2009-07-07 Li Feng <nemokingdom@gmail.com>
911 * graphite-clast-to-gimple.c (mark_loops_parallel): Dump information
912 for dependency checking part.
913 * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-1.c: Add
914 tests for dependency checking.
915 * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-2.c: Ditto.
916 * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-3.c: Ditto.
917 * testsuite/gcc.dg/graphite/graphite_autopar/graphite_autopar.exp: Add
918 flag -fdump-tree-graphite-all for autopar testsuites.
920 2009-07-06 Sebastian Pop <sebastian.pop@amd.com>
922 * Makefile.in (tree-ssa-loop-manip.o): Depends on langhooks.h.
923 * tree-parloops.c (rewrite_phi_with_iv, rewrite_all_phi_nodes_with_iv,
924 canonicalize_loop_ivs): Moved...
925 * tree-ssa-loop-manip.c: ... here. Include langhooks.h.
927 2009-07-06 Sebastian Pop <sebastian.pop@amd.com>
929 * tree-parloops.c (try_create_reduction_list): Pass an extra
930 argument analyzed_reductions. Call analyze_reduction_list.
931 (gen_parallel_loop): Do not call analyze_reduction_list.
932 (parallelize_loops): Init and finalize analyzed_reductions.
934 2009-07-06 Li Feng <nemokingdom@gmail.com>
936 * testsuite/gcc.dg/graphite/graphite_autopar/graphite_autopar.exp:
937 Added flag -fno-loop-strip-mine for autopar testcase.
939 2009-07-04 Li Feng <nemokingdom@gmail.com>
941 * graphite-dependences.c (graphite_carried_dependence_level_k): Use
942 transformed scattering dimension instead of unmatch orignal when
943 calling dependence_polyhedron.
945 2009-06-30 Sebastian Pop <sebastian.pop@amd.com>
947 * opts.c (decode_options): Enable flag_loop_strip_mine at -O2.
949 2009-06-30 Sebastian Pop <sebastian.pop@amd.com>
951 * graphite-poly.c (pbb_number_of_iterations): Check for returned
952 value 1 from ppl_Pointset_Powerset_NNC_Polyhedron_maximize.
954 2009-06-30 Sebastian Pop <sebastian.pop@amd.com>
956 * graphite-blocking.c (pbb_strip_mine_profitable_p): New.
957 (pbb_do_strip_mine): Call pbb_strip_mine_profitable_p.
958 * graphite-poly.c (pbb_number_of_iterations): New.
959 * graphite-poly.h (pbb_number_of_iterations): Declared.
960 (pbb_iterator_dim, pbb_parameter_dim): New.
962 2009-06-29 Sebastian Pop <sebastian.pop@amd.com>
964 * graphite-clast-to-gimple.c (graphite_create_new_loop): Revert the
965 last commit on type of lower and upper bound of loops.
967 2009-06-29 Li Feng <nemokingdom@gmail.com>
969 * Makefile.in (graphite-clast-to-gimple.o): Added dependence on
970 graphite-dependences.h.
971 * graphite-clast-to-gimple.c (new_bb_pbb_def): New.
972 (mark_bb_with_pbb): New.
973 (get_stmtfor_depth): New.
974 (find_pbb_via_hash): New.
975 (dependency_in_loop_p): New.
976 (mark_loops_parallel): New.
977 (free_aux_in_new_loops): New.
978 (translate_clast): Add parameter BB_PBB_MAPPING. Mark newly created
979 bb with it's relevant pbb. Mark newly created loops. Remove mark
980 innermost loop parallel without checking.
981 (gloog): Add parameter BB_PBB_MAPPING.
982 * graphite-clast-to-gimple.h (struct bb_pbb_def): New.
983 (gloog): Change declaration.
984 (mark_loop_parallel): Make extern.
985 (free_aux_in_new_loops): Declare.
986 (bb_pbb_map_hash): New.
987 (eq_bb_pbb_map): New.
988 * graphite.c (graphite_transform_loops): Added BB_PBB_MAPPING. Trigger
989 auto parallelization when flag_graphite_force_parallel is set.
990 (graphite_finalize): Added free_aux_in_new_loops.
991 * tree-parloops.c (parallelize_loops): Only generate parallel code for
992 the innermost loop that marked parallel. Use
993 flag_graphite_force_parallel instead of loop->can_be_parallel.
994 (loop_parallel_p): Move inner most checking out of function.
996 2009-06-26 Sebastian Pop <sebastian.pop@amd.com>
998 * graphite-clast-to-gimple.c (graphite_create_new_loop): Make the
999 type of lower and upper bound of loops signed long int.
1001 2009-06-26 Sebastian Pop <sebastian.pop@amd.com>
1003 * cfgloopmanip.c (create_empty_loop_on_edge): Gimplify the loop exit
1004 expression outside the loop.
1006 2009-06-26 Sebastian Pop <sebastian.pop@amd.com>
1008 * gcc.dg/graphite/interchange-8.c: New.
1010 2009-06-26 Sebastian Pop <sebastian.pop@amd.com>
1012 * gcc.dg/graphite/interchange-0.c: XFailed.
1013 * gcc.dg/graphite/interchange-5.c: XFailed.
1014 * gcc.dg/graphite/interchange-6.c: XFailed.
1016 2009-06-26 Sebastian Pop <sebastian.pop@amd.com>
1018 * graphite-interchange.c (compute_array_size_poly): The end of the
1019 recursion should return 1.
1021 2009-06-26 Sebastian Pop <sebastian.pop@amd.com>
1023 * graphite-interchange.c (compute_array_size_cstr): Allow the
1024 subscript multiplier to be -1.
1025 (compute_array_size): Use PDR_DATA_CONTAINER and not PDR_ACCESSES.
1026 * graphite-poly.c (new_poly_dr): Takes an extra argument for the
1027 data_container. Initializes PDR_DATA_CONTAINER.
1028 (print_pdr_access_layout): New.
1029 (print_pdr): Call print_pdr_access_layout. Print PDR_DATA_CONTAINER.
1030 * graphite-poly.h (struct poly_dr): Adjust comment. Add a new field
1032 (PDR_DATA_CONTAINER): New.
1033 (new_poly_dr): Update declaration.
1034 * graphite-sese-to-poly.c (pdr_add_data_dimensions): New.
1035 (build_poly_dr): Call pdr_add_data_dimensions.
1037 2009-06-26 Sebastian Pop <sebastian.pop@amd.com>
1039 * graphite-poly.h (struct poly_dr): Fix comment.
1040 * graphite-sese-to-poly.c (pdr_add_alias_set): New.
1041 (pdr_add_memory_accesses): New.
1042 (build_poly_dr): Call pdr_add_memory_accesses and pdr_add_alias_set.
1044 2009-06-26 Sebastian Pop <sebastian.pop@amd.com>
1046 * graphite-poly.c (print_pdrs, debug_pdrs): New.
1047 (print_pbb): Add call to print_pdrs.
1048 * graphite-poly.h (print_pdrs, debug_pdrs): Declared.
1050 2009-06-24 Konrad Trifunovic <konrad.trifunovic@gmail.com>
1051 Li Feng <nemokingdom@gmail.com>
1053 * graphite-dependences.c (graphite_carried_dependence_level_k): New.
1054 (dependency_between_pbbs_p): New.
1055 (lexicographically_gt_p): Assure !empty_p before polyhedron
1056 intersection assign.
1057 (build_lexicographically_gt_constraint): Correct lexicographically
1059 * graphite-dependences.h: New.
1060 * Makefile.in (graphite-dependences.o): Add graphite-dependences.h.
1062 2009-06-24 Sebastian Pop <sebastian.pop@amd.com>
1064 * graphite-clast-to-gimple.c (print_clast_stmt): New.
1065 (gloog): Print to dump_file the generated clast.
1066 * graphite-clast-to-gimple.h (print_clast_stmt): Declared.
1067 * graphite-interchange.c (pbb_do_interchange): Fix dump formatting.
1069 2009-06-24 Sebastian Pop <sebastian.pop@amd.com>
1071 * graphite-poly.c (extend_scattering): Increment
1072 PBB_NB_LOCAL_VARIABLES by the number of added dimensions.
1074 2009-06-24 Sebastian Pop <sebastian.pop@amd.com>
1076 * graphite-interchange.c (compute_array_size_poly): Added exit of
1077 recursion condition. Continue iterating even after the first equality.
1078 (compute_array_size): Same.
1080 2009-06-24 Li Feng <nemokingdom@gmail.com>
1082 * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-1.c: Update
1083 -fdump-tree-final_cleanup to -fdump-tree-optimized.
1084 * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-2.c: Ditto.
1085 * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-3.c: Ditto.
1086 * testsuite/gcc.dg/graphite/graphite_autopar/graphite_autopar.exp: Ditto.
1088 2009-06-23 Sebastian Pop <sebastian.pop@amd.com>
1090 * sese.c (expand_scalar_variables_stmt): Expand scalar variables
1091 only when the use verifies is_gimple_reg.
1093 2009-06-23 Sebastian Pop <sebastian.pop@amd.com>
1095 * graphite-clast-to-gimple.c (build_cloog_prog): Fix memory corruption.
1096 Allocate scaldims after call to unify_scattering_dimensions.
1098 2009-06-23 Sebastian Pop <sebastian.pop@amd.com>
1100 * graphite-clast-to-gimple.c (translate_clast): Fix memory leak.
1102 2009-06-23 Sebastian Pop <sebastian.pop@amd.com>
1103 Albert Cohen <albert.cohen@inria.fr>
1105 * graphite-blocking.c (pbb_strip_mine_loop_depth): Do not use local
1106 variables for the strip mining.
1108 2009-06-23 Sebastian Pop <sebastian.pop@amd.com>
1109 Pranav Garg <pranav.garg2107@gmail.com>
1111 * Makefile.in (OBJS-common): Added graphite-blocking.o.
1112 (graphite-sese-to-poly.o): Moved down to be in lexicographical order.
1113 (graphite-blocking.o): New rule.
1114 (graphite-poly.o, graphite-ppl.o): Moved to be in lexicographical order.
1115 * graphite-blocking.c: New.
1116 * graphite-poly.c (apply_poly_transforms): Call scop_do_strip_mine for
1117 flag_loop_strip_mine.
1118 (psct_scattering_dim_for_loop_depth): New.
1119 * graphite-poly.h (scop_do_strip_mine): Declared.
1120 (psct_add_local_variable): Increment PBB_NB_LOCAL_VARIABLES.
1121 * tree-ssa-loop.c (gate_graphite_transforms): Do not fail when using
1122 flag_loop_strip_mine.
1124 2009-06-23 Sebastian Pop <sebastian.pop@amd.com>
1126 * graphite-poly.c (extend_scattering): Avoid initializing and freeing
1127 a GMP value and a PPL coefficient at each iteration of a loop.
1129 2009-06-23 Sebastian Pop <sebastian.pop@amd.com>
1131 * graphite-dependences.c (dependence_polyhedron): Do not use
1132 pbb_nb_scattering_dims anymore. Use pbb_nb_scattering_orig and
1133 pbb_nb_scattering_transform.
1134 (graphite_legal_transform_dr): Same.
1135 * graphite-poly.c (extend_scattering): Same.
1136 (unify_scattering_dimensions): Same.
1137 (print_scattering_function): Same.
1138 (new_poly_bb): Initialize PBB_NB_SCATTERING_TRANSFORM and
1139 PBB_NB_LOCAL_VARIABLES.
1140 * graphite-poly.h (pbb_nb_scattering): Removed declaration.
1141 (struct poly_bb): Added nb_local_variables and nb_scattering_transform.
1142 (PBB_NB_LOCAL_VARIABLES, PBB_NB_SCATTERING_TRANSFORM): New.
1143 (pbb_nb_scattering_orig, pbb_nb_scattering_transform): New.
1144 (pbb_nb_scattering_dims, pbb_nb_scattering): Removed.
1145 (pbb_nb_scattering_transform): New.
1146 (pbb_nb_local_vars): Return PBB_NB_LOCAL_VARIABLES.
1147 (psco_scattering_dim): Add assert on parameters.
1148 (psct_scattering_dim): Same.
1149 (psct_scattering_dim_for_loop_depth): Declared.
1150 (psct_local_var_dim): New.
1151 (psco_iterator_dim, psco_parameter_dim): Add assert on parameters.
1152 (psct_iterator_dim, psct_parameter_dim): Same. To maintain the
1153 correct layout, call pbb_nb_local_vars.
1154 (psct_add_local_variable, psct_add_scattering_dimension): New.
1155 * graphite-sese-to-poly.c (build_pbb_scattering_polyhedrons):
1156 Initialize PBB_NB_SCATTERING_TRANSFORM.
1158 2009-06-23 Sebastian Pop <sebastian.pop@amd.com>
1160 * graphite-ppl.c (set_inhomogeneous): Renamed ppl_set_inhomogeneous.
1161 (set_coef): Renamed ppl_set_coef.
1162 * graphite-ppl.h (ppl_set_inhomogeneous, ppl_set_coef): Declared.
1164 2009-06-23 Sebastian Pop <sebastian.pop@amd.com>
1166 * graphite-dependences.c (build_pairwise_scheduling_inequality): Don't
1167 test a boolean against 1.
1168 * graphite-interchange.c (pbb_interchange_loop_depths): Do not build
1169 a new polyhedron for the PBB_TRANSFORMED_SCATTERING.
1170 (pbb_do_interchange): Returns true when a transform has been performed.
1171 (scop_do_interchange): Same.
1172 * graphite-poly.c (apply_poly_transforms): Use the return value of
1173 scop_do_interchange.
1174 * graphite-poly.h (scop_do_interchange): Update declaration.
1176 2009-06-23 Tobias Grosser <grosser@fim.uni-passau.de>
1178 * graphite-clast-to-gimple.c (gloog): Reset loop->aux right
1180 * sese.c (sese_reset_aux_in_loops): New.
1181 * sese.h (sese_reset_aux_in_loops): New.
1183 2009-06-19 Sebastian Pop <sebastian.pop@amd.com>
1185 * graphite-sese-to-poly.c (scan_tree_for_params_int): Pass in the
1186 multiplier and multiply the constant by the multiplier.
1187 (scan_tree_for_params): Bound the multiplier to its MULT_EXPR.
1188 (build_poly_dr): Do not use the multiplier to define the subscript.
1190 2009-06-19 Sebastian Pop <sebastian.pop@amd.com>
1192 * graphite-poly.c (new_poly_dr): Pass an extra argument for the
1193 compiler's data reference. Initialize PDR_CDR.
1194 (print_pdr): Call dump_data_reference.
1195 * graphite-poly.h (struct poly_dr): Rename black_box into pbb.
1196 Add compiler_dr field.
1197 (PDR_BB): Renamed PDR_PBB.
1199 * graphite-sese-to-poly.c (build_poly_dr): Pass to new_poly_dr
1200 GCC's data reference representation.
1201 * tree-data-ref.c (debug_data_references, debug_data_reference): New.
1202 * tree-data-ref.h (debug_data_references, debug_data_reference): Decl.
1204 2009-06-19 Sebastian Pop <sebastian.pop@amd.com>
1206 * graphite-poly.c (print_scattering_function): Also print the layout.
1207 * graphite-poly.h (pbb_nb_local_vars): New.
1209 2009-06-19 Sebastian Pop <sebastian.pop@amd.com>
1211 * graphite-poly.c (print_pbb_domain): Also print the layout names.
1213 2009-06-19 Sebastian Pop <sebastian.pop@amd.com>
1215 * graphite-poly.c (print_pdr, debug_pdr): New.
1216 * graphite-poly.h (print_pdr, debug_pdr): Declared.
1217 (PDR_BASE): Removed.
1219 2009-06-18 Sebastian Pop <sebastian.pop@amd.com>
1221 * gcc/testsuite/gcc.dg/graphite/interchange-{1..7}.c: New avatars of
1224 2009-06-18 Sebastian Pop <sebastian.pop@amd.com>
1226 * graphite-interchange.c (compute_subscript): Allow also -1 in the
1227 subscript identification column.
1228 (pbb_do_interchange): Print to dump_file that some loops "will be
1229 interchanged". Rely on that chain of characters in the testcases.
1230 * gcc.dg/graphite/interchange-0.c: New.
1231 * gcc.dg/graphite/graphite.exp: Iterate over the testsuite
1232 interchange-*.c files and compile them with -floop-interchange.
1234 2009-06-18 Pranav Garg <pranav.garg2107@gmail.com>
1236 * graphite-interchange.c (interchange_profitable_p): Renamed
1237 pbb_interchange_profitable_p.
1239 2009-06-18 Sebastian Pop <sebastian.pop@amd.com>
1240 Harsha Jagasia <harsha.jagasia@amd.com>
1241 Pranav Garg <pranav.garg2107@gmail.com>
1243 * graphite-interchange.c (interchange_profitable_p): Make static.
1244 (pbb_interchange_loop_depths, pbb_do_interchange,
1245 scop_do_interchange): New.
1246 * graphite-poly.c (apply_poly_transforms): Call scop_do_interchange
1247 for flag_loop_interchange.
1248 * graphite-poly.h (scop_do_interchange): Declared.
1249 * tree-ssa-loop.c (gate_graphite_transforms): Do not fail when
1250 flag_loop_interchange is used.
1252 2009-06-18 Sebastian Pop <sebastian.pop@amd.com>
1254 * graphite-dependences.c (dependence_polyhedron): Update use of
1255 pbb_nb_scattering_dims.
1256 * graphite-poly.h (pbb_nb_scattering_dims): Do not pass SCOP.
1257 (pbb_nb_scattering): Update use of pbb_nb_scattering_dims.
1258 (psco_scattering_dim, psct_scattering_dim, psco_iterator_dim,
1259 psct_iterator_dim, psco_parameter_dim, psct_parameter_dim): New.
1261 2009-06-16 Sebastian Pop <sebastian.pop@amd.com>
1263 * graphite.c: Cleanup foo.
1265 2009-06-16 Sebastian Pop <sebastian.pop@amd.com>
1267 * Merge from mainline (r143684:148293).
1268 * Disabled libpcp until it gets fixed.
1270 2009-06-05 Sebastian Pop <sebastian.pop@amd.com>
1271 Harsha Jagasia <harsha.jagasia@amd.com>
1273 * graphite-interchange.c: New.
1274 * Makefile.in (graphite-interchange.o): New.
1275 * graphite-poly.h (interchange_profitable_p): Declared.
1276 * graphite-ppl.h (value_max): New.
1278 2009-06-04 Sebastian Pop <sebastian.pop@amd.com>
1280 * graphite-dependences.c (dependence_polyhedron): Use pdr_dim.
1281 * graphite-poly.h: Fix some comments.
1285 2009-06-04 Sebastian Pop <sebastian.pop@amd.com>
1288 (pdr_accessp_nb_subscripts): Renamed pdr_nb_subscripts.
1289 (pdr_accessp_nb_iterators): Renamed pdr_dim_iter_domain.
1290 (pdr_accessp_nb_params): Renamed pdr_nb_params.
1291 (pdr_accessp_alias_set_dim): Renamed pdr_alias_set_dim.
1292 (pdr_accessp_subscript_dim): Renamed pdr_subscript_dim.
1293 (pdr_accessp_iterator_dim): Renamed pdr_iterator_dim.
1294 (pdr_accessp_param_dim): Renamed pdr_parameter_dim.
1295 (pbb_nb_loops): Renamed pbb_dim_iter_domain.
1296 * graphite-clast-to-gimple.c: Same.
1297 * graphite-dependences.c: Same.
1298 * graphite-poly.c: Same.
1299 * graphite-sese-to-poly.c: Same.
1301 2009-06-03 Sebastian Pop <sebastian.pop@amd.com>
1303 * graphite-clast-to-gimple.c (build_iv_mapping): Insert full
1304 expressions for an IV rename, as returned by clast_to_gcc_expression.
1305 (copy_renames): Rename new_name to expr.
1306 * sese.c (debug_rename_elt): Same.
1309 (sese_adjust_liveout_phis): Call force_gimple_operand before using
1310 the information from the rename map.
1311 (rename_variables_in_stmt): Same.
1312 (add_loop_exit_phis): Rename new_name to expr.
1313 (insert_loop_close_phis): Same.
1314 (add_guard_exit_phis): Same. Call force_gimple_operand.
1315 * sese.h (struct rename_map_elt): Rename new_name to expr.
1316 (new_rename_map_elt): Same.
1318 2009-06-03 Sebastian Pop <sebastian.pop@amd.com>
1320 * graphite-clast-to-gimple.c (build_iv_mapping): Use set_rename.
1321 * sese.c (set_rename): Make it extern.
1322 * sese.h (set_rename): Declared.
1324 2009-06-03 Sebastian Pop <sebastian.pop@amd.com>
1326 * graphite-poly.c (extend_scattering): Free values.
1327 * graphite-ppl.c (new_Cloog_Domain_from_ppl_Pointset_Powerset):
1329 (ppl_print_powerset_matrix): Same.
1330 * graphite-scop-detection.c (free_scops_1): New.
1331 (limit_scops): Call free_scops_1.
1332 * graphite-sese-to-poly.c (build_scop_bbs_1): Free dom.
1333 (build_poly_dr): Free PPL coefficients.
1334 * tree-parloops.c (rewrite_all_phi_nodes_with_iv): Free bbs.
1336 2009-06-02 Sebastian Pop <sebastian.pop@amd.com>
1338 * graphite-dependences.c: New.
1339 * graphite-data-ref.c: Removed.
1340 * graphite-data-ref.h: Removed.
1341 * Makefile.in (graphite-data-ref.o): Removed.
1342 (graphite-dependences.o): Added.
1343 * graphite-clast-to-gimple.c: Remove dependence on graphite-data-ref.h.
1344 * graphite-poly.c: Same.
1345 Move the data dependence testing to graphite-dependences.c.
1347 2009-05-19 Tobias Grosser <grosser@fim.uni-passau.de>
1349 * graphite-scop-detection.c (graphite_can_represent_loop): Renamed
1350 from graphite_cannot_represent_loop. Code refactored.
1351 (scopdet_basic_block_info): Call graphite_can_represent_loop.
1353 2009-05-17 Li Feng <nemokingdom@gmail.com>
1355 * testsuite/gcc.dg/graphite/graphite_autopar/graphite_autopar.exp:
1356 Cover all the testcases (not only the filtered ones).
1358 2009-05-17 Tobias Grosser <grosser@fim.uni-passau.de>
1360 * graphite-scop-detection.c (stmt_simple_for_scop_p): Remove
1361 unnecessary check. Update comments. Move check for REAL_TYPE here.
1362 (harmful_stmt_in_bb): Remove checks for conditions. This is already
1363 done in (stmt_simple_for_scop_p).
1365 2009-05-14 Tobias Grosser <grosser@fim.uni-passau.de>
1367 * graphite.c (print_global_statistics): New.
1368 (print_graphite_scop_statistic): New.
1369 (print_graphite_statistics): New.
1370 (graphite_initialize, graphite_transform_loops): Print statistics.
1371 * graphite-scop-detection (build_scops): Print statistics.
1372 (print_graphite_scop_statistics): New.
1373 (print_graphite_statistics): New.
1375 2009-05-13 Sebastian Pop <sebastian.pop@amd.com>
1377 * graphite-clast-to-gimple.c (struct clast_name_index): Removed.
1378 (debug_clast_name_index): Removed.
1379 (debug_clast_name_indexes_1): Removed.
1380 (debug_clast_name_indexes): Removed.
1381 (clast_name_index_elt_info): Removed.
1382 (eq_clast_name_indexes): Removed.
1383 (clast_name_to_index): Removed.
1384 (new_clast_name_index): Removed.
1385 (save_clast_name_index): Removed.
1386 (save_var_name): Moved...
1387 (init_sese_params_index): Removed.
1388 (clast_name_to_gcc): Remove use of name_tree.
1389 (initialize_cloog_names): Same.
1390 (gloog): Do not call init_sese_params_index.
1391 * graphite-sese-to-poly.c (save_var_name): ...here.
1392 (parameter_index_in_region): New.
1393 * sese.c (new_sese): Initialize SESE_PARAMS_NAMES.
1394 (parameter_index_in_region): Removed.
1395 (is_parameter): Remove use of name_tree.
1396 * sese.h (struct name_tree): Removed.
1397 (struct sese): Remove use of name_tree. New field params_names.
1398 (SESE_PARAMS_NAMES): New.
1399 (SESE_PARAMS): Remove duplicate.
1400 (parameter_index_in_region): Removed.
1401 (sese_nb_params): Remove use of name_tree.
1402 (struct clast_name_index): New.
1403 (new_clast_name_index): New.
1404 (clast_name_to_index): New.
1405 (save_clast_name_index): New.
1406 (debug_clast_name_index): New.
1407 (debug_clast_name_indexes_1): New.
1408 (debug_clast_name_indexes): New.
1409 (clast_name_index_elt_info): New.
1410 (eq_clast_name_indexes): New.
1412 2009-05-13 Sebastian Pop <sebastian.pop@amd.com>
1414 * graphite-clast-to-gimple.c (compute_cloog_iv_types_1): Call
1415 pbb_to_depth_to_oldiv. Remove call to oldiv_for_loop.
1416 (graphite_loop_normal_form): Do not pass region. Do not
1417 initialize SESE_OLDIVS.
1418 (build_graphite_loop_normal_form): Update call to
1419 graphite_loop_normal_form.
1420 * sese.c (debug_oldivs): Removed.
1421 (new_sese): Do not initialize SESE_OLDIVS.
1422 (free_sese): Do not free SESE_OLDIVS.
1423 (oldiv_for_loop): Removed.
1424 * sese.h (struct sese): Remove old_ivs.
1425 (SESE_OLDIVS): Removed.
1426 (oldiv_for_loop): Removed.
1428 2009-05-13 Sebastian Pop <sebastian.pop@amd.com>
1430 * graphite-clast-to-gimple.c (clast_name_to_gcc): Pass newivs,
1431 remove ivstack. Remove call to loop_iv_stack_get_iv_from_name,
1432 replaced by a call to newivs_to_depth_to_newiv.
1433 (clast_to_gcc_expression): Pass newivs, remove ivstack.
1434 (clast_to_gcc_expression_red): Same.
1435 (gcc_type_for_clast_expr): Same.
1436 (gcc_type_for_clast_eq): Same.
1437 (graphite_translate_clast_equation): Same.
1438 (graphite_create_guard_cond_expr): Same.
1439 (graphite_create_new_guard): Same.
1440 (graphite_create_new_loop): Same.
1441 (build_iv_mapping): Same.
1442 (translate_clast): Same.
1444 (loop_iv_stack_patch_for_consts): Removed. *
1445 sese.c (iv_stack_entry_is_constant): Removed.
1446 (iv_stack_entry_is_iv): Removed.
1447 (loop_iv_stack_push_iv): Removed.
1448 (loop_iv_stack_insert_constant): Removed.
1449 (loop_iv_stack_pop): Removed.
1450 (loop_iv_stack_get_iv): Removed.
1451 (loop_iv_stack_get_iv_from_name): Removed.
1452 (debug_loop_iv_stack): Removed.
1453 (free_loop_iv_stack): Removed.
1454 (loop_iv_stack_remove_constants): Removed. *
1455 sese.h (iv_stack_entry_kind): Removed.
1456 (iv_stack_entry_data_union): Removed.
1457 (iv_stack_entry_struct): Removed.
1458 (iv_stack_entry_p): Removed.
1459 (debug_oldivs, debug_loop_iv_stack, loop_iv_stack_insert_constant,
1460 loop_iv_stack_get_iv_from_name, loop_iv_stack_push_iv,
1461 loop_iv_stack_get_iv, loop_iv_stack_remove_constants,
1462 loop_iv_stack_pop, free_loop_iv_stack): Removed.
1463 (gbb_loop_at_index): Fix indenting.
1464 (gbb_loop_index): Removed.
1466 2009-05-13 Sebastian Pop <sebastian.pop@amd.com>
1468 * graphite-clast-to-gimple.c (clast_name_to_gcc): Do not use strcmp.
1469 Call clast_name_to_index.
1471 2009-05-13 Sebastian Pop <sebastian.pop@amd.com>
1473 * graphite-clast-to-gimple.c (clast_name_to_gcc): Pass region,
1474 do not pass params. Get params from SESE_PARAMS.
1475 (clast_to_gcc_expression): Same.
1476 (clast_to_gcc_expression_red): Same.
1477 (gcc_type_for_clast_eq): Same.
1478 (graphite_translate_clast_equation): Same.
1479 (graphite_create_new_loop): Same.
1480 * sese.c (rename_variables_in_stmt): Fix comment.
1482 2009-05-13 Sebastian Pop <sebastian.pop@amd.com>
1484 * graphite-clast-to-gimple.c (graphite_create_new_loop): Pass
1486 Call save_clast_name_index.
1487 (translate_clast): Pass newivs_index.
1488 (gloog): Create and free newivs_index.
1490 2009-05-13 Sebastian Pop <sebastian.pop@amd.com>
1492 * graphite-clast-to-gimple.c (clast_name_index): New structure.
1493 (clast_name_index_p): New type.
1494 (debug_clast_name_index): New.
1495 (debug_clast_name_indexes_1): New.
1496 (debug_clast_name_indexes): New.
1497 (clast_name_index_elt_info): New.
1498 (eq_clast_name_indexes): New.
1499 (clast_name_to_index): New.
1500 (new_clast_name_index): New.
1501 (save_clast_name_index): New.
1502 (init_sese_params_index): New.
1503 (gloog): Call init_sese_params_index.
1504 * graphite-clast-to-gimple.h (debug_clast_name_indexes): Declared.
1505 * sese.c (new_sese): Initialize SESE_PARAMS_INDEX.
1506 (free_sese): Free SESE_PARAMS_INDEX.
1507 * sese.h (struct sese): Add params_index.
1508 (SESE_PARAMS_INDEX): New.
1510 2009-05-13 Sebastian Pop <sebastian.pop@amd.com>
1512 * graphite-clast-to-gimple.c (newivs_to_depth_to_newiv): New.
1513 (graphite_create_new_loop): Pass the newivs vector. Push the
1514 newly created IV to newivs.
1515 (translate_clast): Pass the newivs vector.
1516 (gloog): Create and destroy the newivs vector.
1518 2009-05-13 Sebastian Pop <sebastian.pop@amd.com>
1520 * graphite-clast-to-gimple.c (pbb_to_depth_to_oldiv): New.
1521 (graphite_loop_normal_form): Initialize loop->aux with the unique
1522 IV that has been created.
1524 2009-05-13 Tobias Grosser <grosser@fim.uni-passau.de>
1526 * tree-chrec.c (evolution_function_right_is_integer_cst): Allow
1527 scev with parameters in the base part. They where forbidden
1530 2009-05-11 Li Feng <nemokingdom@gmail.com>
1532 * testsuite/gcc.dg/graphite/graphite.exp: Set different default
1533 compile options by file names.
1534 * testsuite/gcc.dg/graphite/block{0-6}.c: Remove dg-option line.
1535 * testsuite/gcc.dg/graphite/id-{1-9}.c: Ditto.
1536 * testsuite/gcc.dg/graphite/scop-{0-20}.c: Ditto.
1537 * testsuite/gcc.dg/graphite/scop-matmult.c: Ditto.
1539 2009-05-08 Li Feng <nemokingdom@gmail.com>
1541 * testsuite/gcc.dg/graphite/graphite_autopar/graphite_autopar.exp: New.
1542 * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-1.c: New.
1543 * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-2.c: New.
1544 * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-3.c: New.
1546 2009-05-07 Tobias Grosser <grosser@fim.uni-passau.de>
1548 * graphite-scop-detection (build_scops_1): Fix little bug introduced
1551 2009-05-07 Tobias Grosser <grosser@fim.uni-passau.de>
1553 * graphite-scop-detection.c (graphite_can_represent_scev): Only
1554 allow integer constant strides.
1555 (graphite_can_represent_expr): Depend on outermost_loop.
1556 (stmt_simple_memref_p, graphite_cannot_represent_loop,
1557 harmful_stmt_in_bb, is_simple_operand, stmt_simple_for_scop_p,
1558 build_scops_1): Same.
1559 (scopdet_basic_block_info): Same and insert layered SCoP
1561 (try_generate_gimple_bb): Cleanup.
1562 (build_scops): Enable data references.
1564 * testsuite/gcc.dg/graphite/id-5.c: New.
1565 * testsuite/gcc.dg/graphite/id-9.c: New.
1566 * tree-chrec.c (evolution_function_right_is_integer_cst): New.
1567 * tree-chrec.h (evolution_function_right_is_integer_cst): New.
1569 2009-05-06 Tobias Grosser <grosser@fim.uni-passau.de>
1571 * sese.c (expand_scalar_variables_ssa_name): Only build expressions,
1572 that we have not yet built for this SCoP.
1574 2009-05-06 Tobias Grosser <grosser@fim.uni-passau.de>
1576 * sese.c (expand_scalar_variables_expr): Fix expand_scalar_variables
1577 for complex numbers.
1579 2009-05-06 Tobias Grosser <grosser@fim.uni-passau.de>
1581 * graphite-ppl.c: Fix build if cloog is not available.
1583 2009-05-04 Li Feng <nemokingdom@gmail.com>
1585 * tree-parloops.c (loop_parallel_p): Remove construction of
1586 NITER and REDUCTION_LIST.
1587 (try_get_loop_niter): New.
1588 (try_create_reduction_list): New.
1589 (parallelize_loops): Bypass the failed checkings in autopar
1590 when can_be_parallel in loop structure is set to true.
1592 2009-05-01 Tobias Grosser <grosser@fim.uni-passau.de>
1594 * testsuite/gcc.dg/graphite/id-6.c: Update testcase.
1595 * testsuite/gcc.dg/graphite/scop-3.c: Dito.
1597 2009-05-01 Tobias Grosser <grosser@fim.uni-passau.de>
1599 * graphite-scop-detection.c (stmt_simple_for_scop_p):
1600 Enable EQ_EXPR and NE_EXPR again.
1602 2009-04-30 Tobias Grosser <grosser@fim.uni-passau.de>
1604 * graphite-scop-detection.c (graphite_can_represent_scev):
1605 Add check if scev is affine multivariate.
1606 (harmful_stmt_in_bb): Check if we can represent the conditions.
1607 (scopdet_basic_block_info (basic_block bb, VEC): Pass the loop to
1609 * testsuite/gcc.dg/graphite/id-7.c: New.
1611 2009-04-30 Tobias Grosser <grosser@fim.uni-passau.de>
1613 * graphite-sese-to-poly.c (bb_contains_non_iv_scalar_phi_nodes):
1614 Check all bbs in region, not only the bbs that are represented in
1616 (build_poly_scop): Add newline.
1617 * testsuite/gcc.dg/graphite/id-8.c: New.
1619 2009-04-30 Li Feng <nemokingdom@gmail.com>
1621 * cfgloop.c (alloc_loop): Initialize can_be_parallel to false
1622 when loop initialize.
1623 * cfgloop.h (struct loop): Introduce flag can_be_parallel.
1624 * common.opt: Declare flag_graphite_force_parallel.
1625 * graphite-clast-to-gimple.c (translate_clast): Mark the innermost
1627 * graphite-poly.c (apply_poly_transforms): Introduce
1628 flag_graphite_force_parallel.
1629 * tree-ssa-loop.c (gate_graphite_transforms): ditto.
1630 * toplev.c (process_options): ditto and replace a not correctly
1633 2009-04-30 Li Feng <nemokingdom@gmail.com>
1635 * graphite-clast-to-gimple.c (loop_iv_stack_patch_for_consts):
1636 Change the call of gbb_loop_at_index and/or gbb_loop_index due
1637 to the redefinition.
1638 (compute_cloog_iv_types_1): ditto.
1639 (build_iv_mapping): ditto.
1640 * graphite-sese-to-poly.c (new_gimple_bb): Remove GBB_LOOPS related
1642 (free_gimple_bb): Removed GBB_LOOPS related free part.
1643 (build_bb_loops): Removed.
1644 * sese.h (struct gimple_bb): Removed loops.
1645 (GBB_LOOPS): Removed.
1646 (gbb_loop_at_index): Instead of using GBB_LOOPS, we use sese instead.
1647 (gbb_loop_index): ditto.
1649 2009-04-24 Tobias Grosser <grosser@fim.uni-passau.de>
1651 * graphite-scop-detection.c (graphite_can_represent_scev): Do not
1652 allow non constant strides.
1653 * testsuite/gcc.dg/graphite/scop-20.c: New.
1655 2009-04-24 Sebastian Pop <sebastian.pop@amd.com>
1657 * graphite-scop-detection.c (dot_all_scops): Fix system call
1658 return value warning.
1661 2009-04-24 Sebastian Pop <sebastian.pop@amd.com>
1663 * testsuite/gcc.dg/graphite/id-6.c: Fix pattern.
1664 * testsuite/gcc.dg/graphite/scop-3.c: Same.
1666 2009-04-24 Sebastian Pop <sebastian.pop@amd.com>
1668 * graphite-poly.c (map_into_dep_poly, map_dr_into_dep_poly,
1669 build_pairwise_constraint, dr_equality_constraints,
1670 build_pairwise_scheduling_equality,
1671 build_pairwise_scheduling_inequality, lexicographically_gt_p,
1672 build_lexicographically_gt_constraint, dependence_polyhedron,
1673 graphite_legal_transform_dr, graphite_legal_transform_bb,
1674 graphite_legal_transform): New.
1675 * graphite-poly.h (graphite_legal_transform): Declared.
1676 * graphite-sese-to-poly.c (build_poly_scop): Call to
1677 graphite_legal_transform is disabled for the moment.
1679 2009-04-24 Sebastian Pop <sebastian.pop@amd.com>
1681 * graphite-poly.h (pbb_nb_scattering_dims): New.
1682 (pbb_nb_scattering): Use it.
1684 2009-04-24 Sebastian Pop <sebastian.pop@amd.com>
1686 * graphite-ppl.c (ppl_insert_dimensions_pointset): Add
1687 Pointset_Powerset version of ppl_insert_dimensions.
1688 * graphite-ppl.h (ppl_insert_dimensions_pointset): Declared.
1690 2009-04-24 Sebastian Pop <sebastian.pop@amd.com>
1692 * graphite-ppl.c (ppl_insert_dimensions): Fix formatting.
1694 2009-04-24 Sebastian Pop <sebastian.pop@amd.com>
1696 * graphite-poly.h: Fix comment.
1698 2009-04-24 Sebastian Pop <sebastian.pop@amd.com>
1700 * graphite-sese-to-poly.c (build_poly_dr): Fix data ref multiplier.
1702 2009-04-24 Tobias Grosser <grosser@fim.uni-passau.de>
1704 * sese.c (expand_scalar_variables_stmt): Only iterate over the old
1707 2009-04-24 Tobias Grosser <grosser@fim.uni-passau.de>
1709 * graphite-sese-to-poly.c (var_used_in_not_loop_header_phi_node): New.
1710 (graphite_stmt_p): Represent bbs necessary to build the phi nodes of
1713 2009-04-20 Sebastian Pop <sebastian.pop@amd.com>
1715 * graphite-scop-detection.c (stmt_simple_for_scop_p): Do not
1716 handle EQ_EXPR and NE_EXPR.
1718 2009-04-17 Tobias Grosser <grosser@fim.uni-passau.de>
1720 * graphite-poly.h (poly_dr): Fix comment.
1722 2009-04-09 Sebastian Pop <sebastian.pop@amd.com>
1723 Tobias Grosser <grosser@fim.uni-passau.de>
1725 * graphite-poly.c (new_poly_bb): Do not initialize PBB_DOMAIN
1726 with a zero dimension polyhedron.
1727 (find_scop_parameters): Move the call to scop_set_nb_params here.
1728 (build_loop_iteration_domains): Store in loop->aux the iteration
1730 (build_scop_iteration_domain): Fix PBB_DOMAIN for bbs not surrounded
1731 by any loop in scop.
1732 (build_poly_scop): Do not call scop_set_nb_params.
1734 2009-04-09 Sebastian Pop <sebastian.pop@amd.com>
1735 Tobias Grosser <grosser@fim.uni-passau.de>
1737 * graphite-sese-to-poly.c (add_condition_to_pbb): Pass code to
1738 add_condition_to_domain not GT_EXPR.
1740 2009-04-09 Tobias Grosser <grosser@fim.uni-passau.de>
1742 * graphite-ppl.c (debug_ppl_powerset_matrix): New.
1743 * graphite-ppl.h (debug_ppl_powerset_matrix): New.
1744 * graphite-sese-to-poly.c (add_condition_to_pbb): Use
1745 upper_bound_assign to calculate unions.
1746 * testsuite/gcc.dg/graphite/id-6.c: New.
1748 2009-04-09 Tobias Grosser <grosser@fim.uni-passau.de>
1750 * graphite-scop-detection.c (canonicalize_loop_closed_ssa): Do not
1751 handle abnormal edges.
1753 2009-04-09 Tobias Grosser <grosser@fim.uni-passau.de>
1755 * graphite-poly.c (new_poly_dr, free_poly_dr): New.
1756 (free_poly_bb): Also free poly_drs.
1757 * graphite-poly.h (new_poly_dr, free_poly_dr): New.
1758 (poly_dr): Polyhedron to Pointset_Powerset.
1759 (pdr_accessp_nb_subscripts): Same.
1760 * graphite-sese-to-poly.c (build_poly_dr): Same. And actually build
1763 2009-04-08 Sebastian Pop <sebastian.pop@amd.com>
1765 * graphite-clast-to-gimple.c (initialize_cloog_names): Change cloog
1766 names into more meaningful names.
1768 2009-04-08 Sebastian Pop <sebastian.pop@amd.com>
1770 * testsuite/gfortran.dg/graphite/interchange-1.c: New.
1771 * testsuite/gfortran.dg/graphite/interchange-2.c: New.
1773 2009-04-08 Sebastian Pop <sebastian.pop@amd.com>
1775 * graphite-clast-to-gimple.c (graphite_loop_normal_form): Do not build
1777 * tree-parloops.c (rewrite_phi_with_iv): New.
1778 (rewrite_all_phi_nodes_with_iv): New.
1779 (canonicalize_loop_ivs): Call them.
1781 2009-04-08 Sebastian Pop <sebastian.pop@amd.com>
1783 * graphite-sese-to-poly.c (try_generate_gimple_bb): Use
1784 graphite_find_data_references_in_stmt.
1785 * tree-data-ref.c (graphite_find_data_references_in_stmt): New.
1786 * tree-data-ref.h (graphite_find_data_references_in_stmt): Declared.
1788 2009-04-08 Sebastian Pop <sebastian.pop@amd.com>
1790 * sese.c (add_loop_exit_phis): Don't fail on non SSA_NAME renames.
1792 2009-04-08 Sebastian Pop <sebastian.pop@amd.com>
1794 * graphite-sese-to-poly.c (build_scop_bbs_1): Use bb_in_sese_p
1795 instead of bb_in_region.
1796 (flag_bb_in_region): Same. Renamed flag_bb_in_sese.
1797 (build_sese_conditions): Use flag_bb_in_sese.
1798 * sese.c (register_bb_in_sese): Removed.
1799 (new_sese): Remove initialization of SESE_REGION_BBS.
1800 (free_sese): Do not free SESE_REGION_BBS.
1801 * sese.h (struct sese): Remove field region_basic_blocks.
1802 (SESE_REGION_BBS): Removed.
1803 (bb_in_sese_p): Implement in function of bb_in_region.
1805 2009-04-08 Sebastian Pop <sebastian.pop@amd.com>
1807 * graphite-scop-detection.c (limit_scops): Deal only with single exit
1810 2009-04-08 Tobias Grosser <grosser@fim.uni-passau.de>
1812 * graphite-scop-detection.c (stmt_simple_for_scop_p): Allow NE_EXPR
1814 * graphite-sese-to-poly.c (create_linear_expr_from_tree): New.
1815 (add_condition_to_domain): New.
1816 (add_condition_to_pbb): New.
1817 (add_conditions_to_domain): Cleanup and handle of NE_EXPR and EQ_EXPR.
1818 * testsuite/gcc.dg/graphite/scop-3.c: Update number of detected SCoPs.
1820 2009-04-08 Tobias Grosser <grosser@fim.uni-passau.de>
1822 * graphite-clast-to-gimple.c (build_cloog_prog): ppl_Polyhedron ->
1823 ppl_Pointset_Powerset.
1824 * graphite-poly.c (new_poly_bb, free_poly_bb): Same.
1825 * graphite-poly.h (poly_bb): poly_bb.domain Same.
1826 (pbb_nb_loops): Same.
1827 * graphite-sese-to-poly.c (build_loop_iteration_domains,
1828 add_conditions_to_domain): Same.
1829 * graphite-ppl.c (new_Cloog_Domain_from_ppl_Pointset_Powerset): New.
1830 (ppl_print_polyhedron_matrix): ppl_Polyhedron_t ->
1831 ppl_const_Polyhedron_t.
1832 (ppl_print_powerset_matrix): New.
1833 * graphite-ppl.h (new_Cloog_Domain_from_ppl_Pointset_Powerset,
1834 ppl_print_powerset_matrix): New.
1835 (ppl_print_polyhedron_matrix): Updated.
1837 2009-04-07 Sebastian Pop <sebastian.pop@amd.com>
1839 * tree-scalar-evolution.c (analyze_scalar_evolution_1): Fix comment.
1841 2009-04-07 Sebastian Pop <sebastian.pop@amd.com>
1843 * graphite-poly.c (extend_scattering): Fix indenting. Free cstr.
1844 (print_iteration_domains, debug_iteration_domain,
1845 debug_iteration_domains): New.
1846 * graphite-poly.h (print_iteration_domains, debug_iteration_domain,
1847 debug_iteration_domains): Declared.
1848 * graphite-sese-to-poly.c (build_pbb_scattering_polyhedrons): Fix
1851 2009-04-03 Tobias Grosser <grosser@fim.uni-passau.de>
1852 Sebastian Pop <sebastian.pop@amd.com>
1854 * graphite-poly.h (print_iteration_domain): New.
1855 * graphite-sese-to-poly.c (add_conditions_to_domain): Fixed bug.
1856 (build_sese_conditions_1, build_sese_conditions_after,
1857 build_sese_conditions_before): New.
1858 (build_sese_conditions): Rewritten.
1860 2009-04-03 Sebastian Pop <sebastian.pop@amd.com>
1861 Tobias Grosser <grosser@fim.uni-passau.de>
1863 Cleanup of code generation liveouts.
1864 * graphite-clast-to-gimple.c (translate_clast): Use a single
1865 rename_map instead of one per translated statement.
1866 Do not use SESE_LIVEOUT_RENAMES.
1867 (graphite_loop_normal_form): Do not use SESE_REDUCTION_LIST.
1868 (gloog): Do not use SESE_LIVEOUT_RENAMES.
1869 * graphite-scop-detection.c (harmful_stmt_in_bb): Return the close
1870 phi node of a reduction: when a loop contains a reduction used outside
1871 the loop, there should be a scalar close phi node on the exit block.
1872 * sese.c (new_sese): Do not initialize SESE_LIVEOUT,
1873 SESE_LIVEOUT_RENAMES, and SESE_REDUCTION_LIST.
1874 (free_sese): Do not free them.
1875 (sese_build_liveouts_use): Do not use them.
1876 (sese_build_liveouts_bb): Same.
1877 (sese_build_liveouts): Same.
1878 (sese_insert_phis_for_liveouts): Same.
1879 (sese_adjust_phis_for_liveouts): Same. Renamed sese_adjust_liveout_phis.
1880 (defined_in_loop_p): New.
1881 (alive_after_loop): New.
1882 (close_phi_not_yet_inserted_p): New.
1883 (struct alep, alep_p): New.
1884 (add_loop_exit_phis): Remove from the rename_map all the names defined
1885 in the code generated loop.
1886 (insert_loop_close_phis): Traverse the rename_map passed to it.
1887 Don't use SESE_LIVEOUT_RENAMES.
1888 (default_liveout_before_guard): Renamed default_before_guard.
1889 (insert_guard_phis): Do not use SESE_LIVEOUT_RENAMES.
1890 (graphite_copy_stmts_from_block): Do not directly call set_rename.
1891 (register_sese_liveout_renames): Removed.
1892 (copy_bb_and_scalar_dependences): Do not call it.
1893 * sese.h (struct sese): Removed fields: liveout, liveout_renames, and
1895 (SESE_LIVEOUT): Removed.
1896 (SESE_LIVEOUT_RENAMES): Removed.
1897 (SESE_REDUCTION_LIST): Removed.
1898 (sese_build_liveouts): Removed.
1899 (sese_adjust_phis_for_liveouts): Renamed sese_adjust_liveout_phis.
1900 (insert_loop_close_phis): Pass a htab_t instead of a sese.
1901 (insert_guard_phis): Same.
1902 (rename_map_elt): Declare a VEC of them.
1903 * tree-parloops.c (canonicalize_loop_ivs): reduction_list contains
1904 trees not pointers to trees.
1906 Rewrite in canonical close SSA form:
1907 * graphite-scop-detection.c (contains_only_close_phi_nodes): New.
1908 (limit_scops): Close the scop after the block containing the close phi
1910 (canonicalize_loop_closed_ssa): New.
1911 (canonicalize_loop_closed_ssa_form): New.
1912 (build_scops): Call canonicalize_loop_closed_ssa_form.
1914 * graphite-sese-to-poly.c: Fix typos.
1916 2009-04-03 Sebastian Pop <sebastian.pop@amd.com>
1918 * graphite-poly.c (print_scattering_function, print_pbb_domain):
1920 (dump_gbb_conditions, dump_gbb_cases, print_iteration_domain): New.
1921 (print_pbb): Add conditions.
1923 2009-04-01 Tobias Grosser <grosser@fim.uni-passau.de>
1924 Sebastian Pop <sebastian.pop@amd.com>
1926 * graphite-scop-detection.c (bb_in_sd_region): Use bb_in_region.
1927 * graphite-sese-to-poly.c (all_non_dominated_preds_marked_p): New.
1928 (build_scop_bbs_1): New.
1929 (build_scop_bbs): Rewrite.
1930 * sese.h (bb_in_region): New.
1932 2009-03-29 Tobias Grosser <grosser@fim.uni-passau.de>
1934 * graphite-poly.c (new_poly_bb, free_poly_bb): Initialize/free
1936 (print_scop): Style.
1937 * graphite-poly.h (poly_bb): Add drs vector.
1938 (PBB_DRS): Add accessor.
1939 * graphite-sese-to-poly.c (build_poly_dr): New.
1940 (build_pbb_drs, build_scop_drs): New.
1941 (build_poly_scop): call build_scop_drs (Disabled at the moment).
1943 2009-03-29 Tobias Grosser <grosser@fim.uni-passau.de>
1945 * tree-ssa-loop.c: Include forgotten toplev.h
1947 2009-03-29 Tobias Grosser <grosser@fim.uni-passau.de>
1949 * graphite-poly.c: (apply_poly_transforms): sorry -> gcc_unreachable.
1950 * testsuite/gcc.dg/graphite/pr37883.c: Remove -floop-*
1951 * testsuite/gcc.dg/graphite/pr37928.c: Same
1952 * testsuite/gcc.dg/graphite/pr38409.c: Same
1953 * testsuite/gcc.dg/graphite/pr38498.c: Same
1954 * testsuite/gcc.dg/graphite/pr38559.c: Same
1955 * testsuite/gcc.dg/graphite/pr39335.c: Same
1956 * testsuite/gcc.dg/graphite/pr39335_1.c: Same
1957 * testsuite/gfortran.dg/graphite/block-2.f: Same
1958 * tree-ssa-loop.c (gate_graphite_transforms): Always fail if called
1961 2009-03-28 Tobias Grosser <grosser@fim.uni-passau.de>
1963 * graphite-sese-to-poly.c (ref_nb_loops, build_access_matrix_with_af,
1964 build_access_matrix, build_scop_data_accesses): Remove access function
1965 building. (We get a new version soon).
1966 (build_bb_loops, scan_tree_for_params_right_scev): Update.
1967 * sese.h (nb_loops_around_loop_in_sese): Remove.
1968 (sese_loop_depth): Do not use SESE_LOOP_NEST any more.
1970 2009-03-27 Tobias Grosser <grosser@fim.uni-passau.de>
1971 Sebastian Pop <sebastian.pop@amd.com>
1973 * graphite-scop-detection.c (struct scopdet_info): Rename last
1975 (scopdet_basic_block_info, build_scops_1): Don't use
1976 CDI_POST_DOMINATORS. CDI_POST_DOMINATORS should never be used.
1978 2009-03-26 Tobias Grosser <grosser@fim.uni-passau.de>
1979 Sebastian Pop <sebastian.pop@amd.com>
1981 * graphite-clast-to-gimple.c (gloog): Call sese_build_liveouts.
1982 * sese.c (sese_build_liveouts_use): Renamed from
1983 sese_build_livein_liveouts_use. Remove liveins.
1984 (sese_build_liveouts_bb): Renamed from sese_build_livein_liveouts_bb.
1985 Call sese_build_liveouts_use.
1986 (sese_build_liveouts): Renamed from sese_build_livein_liveouts.
1987 Call sese_build_liveouts_bb.
1988 (new_sese, free_sese): Remove liveins.
1989 (sese_add_exit_phis_var): Deleted.
1990 (sese_insert_phis_for_liveouts): Call sese_add_exit_phis_edge
1992 (graphite_copy_stmts_from_block): Remove SESE_NUM_VER.
1994 * sese.h (sese): Remove num_ver and livein.
1995 (SESE_LIVEIN, SESE_LIVEIN_VER, SESE_NUM_VER): Removed.
1997 2009-03-25 Tobias Grosser <grosser@fim.uni-passau.de>
1999 * graphite-sese-to-poly.c (build_scop_scattering): Fix compile.
2001 2009-03-25 Tobias Grosser <grosser@fim.uni-passau.de>
2003 * graphite-sese-to-poly.c (compare_prefix_loops): Removed.
2004 (build_scop_scattering): Do not use compare_prefix_loops any more.
2005 (nb_common_loops): New.
2007 2009-03-24 Sebastian Pop <sebastian.pop@amd.com>
2009 * sese.c (get_new_name_from_old_name): Renamed get_rename.
2010 (register_old_and_new_names): Renamed set_rename.
2012 2009-03-24 Sebastian Pop <sebastian.pop@amd.com>
2014 * graphite-scop-detection.h (nb_reductions_in_loop): Revert removal
2015 of the decl from the previous commit.
2017 2009-03-24 Sebastian Pop <sebastian.pop@amd.com>
2019 * graphite-scop-detection.c (dot_scop): New.
2020 * graphite-scop-detection.h (dot_scop): Declared.
2022 2009-03-24 Sebastian Pop <sebastian.pop@amd.com>
2024 * graphite-sese-to-poly.c (compare_prefix_loops): Fix compare.
2026 2009-03-24 Sebastian Pop <sebastian.pop@amd.com>
2028 * cfgloopmanip.c (create_empty_loop_on_edge): Generate the loop exit
2029 condition at the end of the loop.
2030 * graphite.c (graphite_initialize, graphite_finalize): Print to
2031 dump_file the compiled function.
2032 * graphite-clast-to-gimple.c (graphite_create_new_loop): Update use
2033 of create_empty_loop_on_edge.
2034 (translate_clast): Update the code generation of loops for the new
2036 * cfgloop.h (create_empty_loop_on_edge): Update declaration.
2038 2009-03-24 Sebastian Pop <sebastian.pop@amd.com>
2040 Reverted the patch from 2009-03-19.
2042 2009-03-19 Tobias Grosser <grosser@fim.uni-passau.de>
2044 * graphite-poly.c (new_poly_bb, free_poly_bb): Initialize/free
2046 (print_scop): Style.
2047 * graphite-poly.h (poly_bb): Add drs vector.
2048 (PBB_DRS): Add accessor.
2049 * graphite-sese-to-poly.c (ref_nb_loops): Remove.
2050 (build_access_matrix_with_af, build_access_matrix,
2051 build_scop_data_accesses): Delete.
2052 (build_poly_dr): New.
2053 (build_pbb_drs, build_scop_drs): New.
2054 (build_poly_scop): call build_scop_drs.
2056 2009-03-13 Sebastian Pop <sebastian.pop@amd.com>
2058 * graphite-scop-detection.c (dot_all_scops_1): Close the table
2059 once per basic block.
2061 2009-03-13 Tobias Grosser <grosser@fim.uni-passau.de>
2063 * graphite-scop-detection.c (graphite_can_represent_scev): New.
2064 (graphite_can_represent_expr): Renamed from loop_affine_expr
2066 (stmt_simple_for_scop_p): Call graphite_can_represent_expr.
2067 (graphite_cannot_represent_loop): Add scop_entry to parameters.
2068 (scopdet_basic_block_info): Actually define entry_block.
2069 (stmt_simple_memref_p): Moved here from ...
2071 * tree-data-ref.c (stmt_simple_memref_p): here.
2072 * tree-data-ref.h (stmt_simple_memref_p): Removed.
2074 2009-03-13 Tobias Grosser <grosser@fim.uni-passau.de>
2076 * testsuite/gcc.dg/graphite/id-4.c: New.
2078 2009-03-12 Sebastian Pop <sebastian.pop@amd.com>
2080 * sese.c (expand_scalar_variables_expr): Handle tcc_comparison.
2081 (register_old_and_new_names): Update the content of the map.
2082 When there was already a rename_map_elt in the map at that
2084 (copy_bb_and_scalar_dependences): Do rename_variables after
2085 expand_scalar_variables.
2086 * graphite-clast-to-gimple.c (build_iv_mapping): Update the content
2087 of the map. When there was already a rename_map_elt in the
2088 map at that location, free it.
2089 (translate_clast): Pass the rename_map. Do not initialize and free
2090 a rename_map per stmt_user.
2091 (gloog): Initialize and free one rename_map and pass it to
2094 2009-03-12 Sebastian Pop <sebastian.pop@amd.com>
2096 * sese.c (expand_scalar_variables_stmt,
2097 expand_scalar_variables_ssa_name): Add a gimple_stmt_iterator
2099 (expand_scalar_variables_expr): Handle REALPART_EXPR and IMAGPART_EXPR.
2100 (expand_scalar_variables): Pass to expand_scalar_variables_stmt
2101 the gimple_stmt_iterator of the statement to be expanded.
2102 * graphite-scop-detection.c (is_simple_operand): Do handle
2105 2009-03-11 Tobias Grosser <grosser@fim.uni-passau.de>
2107 * graphite-scop-detection.c (is_simple_operand): Do not handle
2109 * testsuite/gcc.dg/graphite/id-2.c: New.
2111 * graphite-sese-to-poly.c (build_bb_loops,
2112 add_value_to_dim, scan_tree_for_params_right_scev,
2113 scan_tree_for_params_int, scan_tree_for_params, idx_record_params,
2114 find_params_in_bb, build_loop_iteration_domains,
2115 add_conditions_to_domain): Remove subtract.
2117 2009-03-11 Tobias Grosser <grosser@fim.uni-passau.de>
2119 * graphite-clast-to-gimple.c (loop_iv_stack_patch_for_consts,
2120 build_iv_mapping, compute_cloog_iv_types_1, build_cloog_prog):
2121 pbb_loop_at_index -> gbb_loop_at_index.
2122 * graphite-poly.c (new_poly_bb, new_scop): New accessors.
2123 (debug_loop_vec): Delete.
2124 * graphite-poly.h (poly_bb, scop): Change black_box and region to void
2125 pointer. Move LOOPS to gimple_bb_p and insert nb_params.
2126 (PBB_LOOPS): Removed.
2127 (PBB_BLACK_BOX): Insert cast.
2128 (pbb_set_black_box): New setter.
2129 (pbb_loop_at_index, pbb_loop_index): Removed.
2130 (scop_set_region, scop_set_nb_params): New.
2131 * graphite-sese-to-poly.c (new_gimple_bb, free_gimple_bb,
2132 build_scop_scattering, build_bb_loops): Add GBB_LOOPS.
2133 (build_poly_scop): Use scop_set_nb_params.
2134 * sese.h (gimple_bb): Add LOOPS.
2135 (GBB_LOOPS, gbb_loop_index, gbb_loop_at_index): New.
2137 2009-03-11 Tobias Grosser <grosser@fim.uni-passau.de>
2139 Revert previous commit.
2141 2009-03-11 Sebastian Pop <sebastian.pop@amd.com>
2143 * sese.c (expand_scalar_variables_expr): Handle tcc_comparison.
2144 (register_old_and_new_names): Update the content of the map.
2145 When there was already a rename_map_elt in the map at that
2147 (copy_bb_and_scalar_dependences): Do rename_variables after
2148 expand_scalar_variables.
2149 * graphite-clast-to-gimple.c (build_iv_mapping): Update the content
2150 of the map. When there was already a rename_map_elt in the
2151 map at that location, free it.
2152 (translate_clast): Pass the rename_map. Do not initialize and free
2153 a rename_map per stmt_user.
2154 (gloog): Initialize and free one rename_map and pass it to
2157 2009-03-11 Tobias Grosser <grosser@fim.uni-passau.de>
2159 Remove forgotten line in revert.
2161 2009-03-11 Sebastian Pop <sebastian.pop@amd.com>
2163 Revert previous commit.
2165 2009-03-10 Sebastian Pop <sebastian.pop@amd.com>
2167 * sese.c (register_old_and_new_names): Update the content
2168 of the map. When there was already a rename_map_elt in the
2169 map at that location, free it.
2170 (copy_bb_and_scalar_dependences): Do rename_variables after
2171 expand_scalar_variables.
2172 * graphite-clast-to-gimple.c (build_iv_mapping): Update the content
2173 of the map. When there was already a rename_map_elt in the
2174 map at that location, free it.
2175 (translate_clast): Pass the rename_map. Do not initialize and free
2176 a rename_map per stmt_user.
2177 (gloog): Initialize and free one rename_map and pass it to
2180 2009-03-10 Sebastian Pop <sebastian.pop@amd.com>
2182 * graphite-clast-to-gimple.c (translate_clast): context_loop
2185 2009-03-10 Tobias Grosser <grosser@fim.uni-passau.de>
2186 Sebastian Pop <sebastian.pop@amd.com>
2188 * graphite-ppl.c (ppl_insert_dimensions): Fix stupid mistake
2189 of the use of ppl_Polyhedron_map_space_dimensions.
2191 2009-03-10 Tobias Grosser <grosser@fim.uni-passau.de>
2192 Sebastian Pop <sebastian.pop@amd.com>
2194 * graphite-poly.c (unify_scattering_dimensions): Fix types.
2195 * graphite-poly.h (poly_dr_p, poly_dr, POLY_DR_TYPE, PDR_BB,
2196 PDR_TYPE, PDR_ACCESSES, pdr_accessp_nb_subscripts,
2197 pdr_accessp_nb_iterators, pdr_accessp_nb_params,
2198 pdr_accessp_alias_set_dim, pdr_accessp_subscript_dim,
2199 pdr_accessp_iterator_dim, pdr_accessp_param_dim,
2200 pbb_nb_params): New.
2201 (pbb_nb_loops, pbb_nb_scattering, scop_nb_params,
2202 nb_loops_around_pbb): Adapt return types.
2204 2009-03-09 Tobias Grosser <grosser@fim.uni-passau.de>
2206 * Makefile.in (graphite.o, graphite-sese-to-poly.o,
2207 graphite-clast-to-gimple.o, graphite-data-ref.o,
2208 graphite-scop-detection.o, graphite-poly.o): Add
2211 2009-03-05 Tobias Grosser <grosser@fim.uni-passau.de>
2213 * Makefile.in (graphite.o, graphite-sese-to-poly.o,
2214 graphite-clast-to-gimple.o, graphite-data-ref.o,
2215 graphite-scop-detection.o, graphite-poly.o): Add graphite-poly.h.
2217 2009-03-04 Tobias Grosser <grosser@fim.uni-passau.de>
2219 * testsuite/gcc.dg/graphite/pr37485.c: Remove -floop-block
2220 * testsuite/gcc.dg/graphite/pr37828.c: Same.
2221 * testsuite/gcc.dg/graphite/pr37684.c: Same.
2222 * testsuite/gcc.dg/graphite/block-0.c: Same.
2223 * testsuite/gcc.dg/graphite/block-1.c: Same.
2224 * testsuite/gcc.dg/graphite/block-2.c: Same.
2225 * testsuite/gcc.dg/graphite/block-3.c: Same.
2226 * testsuite/gcc.dg/graphite/block-4.c: Same.
2227 * testsuite/gcc.dg/graphite/block-5.c: Same.
2228 * testsuite/gcc.dg/graphite/block-6.c: Same.
2229 * testsuite/gfortran.dg/graphite/pr38083.f90: Same.
2230 * testsuite/gfortran.dg/graphite/block-1.f90: Same.
2231 * testsuite/gfortran.dg/graphite/block-3.f90: Same.
2232 * testsuite/gfortran.dg/graphite/pr37852.f90: Same.
2233 * testsuite/gfortran.dg/graphite/block-4.f90: Same.
2234 * testsuite/gfortran.dg/graphite/pr37980.f90: Same.
2235 * testsuite/gfortran.dg/graphite/pr38953.f90: Same.
2236 * testsuite/gfortran.dg/graphite/pr37857.f90: Same.
2237 * opts.c: Remove -floop-block from -O2.
2238 * graphite-poly.c: Fail if -floop-block -floop-interchange or
2239 -floop-strip-mine are used.
2241 2009-03-04 Tobias Grosser <grosser@fim.uni-passau.de>
2242 Sebastian Pop <sebastian.pop@amd.com>
2244 * graphite-clast-to-gimple.c (build_cloog_prog): Unify scattering
2246 * graphite-poly.c (pbb_compare, graphite_sort_pbbs,
2247 graphite_trans_bb_move_loop, graphite_trans_bb_strip_mine,
2248 strip_mine_profitable_p, is_interchange_valid,
2249 graphite_trans_bb_block, graphite_trans_loop_block,
2250 graphite_trans_scop_block): Temporary removed.
2251 (extend_scattering, unify_scattering_dimensions): New.
2252 (print_scattering_function, graphite_read_transforms):
2253 PBB_SCATTERING -> PBB_TRANSFORMED_SCATTERING.
2254 (graphite_generate_scattering_fns): Removed.
2255 (apply_poly_transforms): Cleanup.
2256 (free_poly_bb): Add PBB_SCATTERING -> PBB_TRANSFORMED_SCATTERING.
2257 (schedule_to_scattering): Moved.
2258 (PBB_STATIC_SCHEDULE, PBB_SCATTERING): Removed.
2259 (PBB_ORIGINAL_SCATTERING, PBB_TRANSFORMED_SCATTERING): New.
2260 (pbb_nb_scattering): New.
2261 (SCOP_ENTRY, SCOP_EXIT, SCOP_REGION_BBS, SCOP_DEP_GRAPH, SCOP_PARAMS,
2262 SCOP_LOOP_NEST, SCOP_PARAMS, SCOP_OLDIVS, SCOP_LIVEOUT_RENAMES):
2264 * graphite-ppl.c (ppl_insert_dimensions): Extended and renamed from
2266 (ppl_strip_loop): PBB_SCATTERING -> PBB_TRANSFORMED_SCATTERING.
2267 * graphite-scop-detection.c (dot_all_scops_1): PBB_SCATTERING
2268 -> PBB_TRANSFORMED_SCATTERING.
2269 * graphite-sese-to-poly.c (build_scop_bbs): Remove region.
2270 (build_pbb_scattering_polyhedron): Moved from schedule_to_scattering.
2271 (build_scop_scattering): Renamed from build_scop_canonical_schedules.
2272 (check_poly_representation): Do not return bool.
2273 (graphite_transform_loops): Reformat.
2274 * sese.h (SESE_ENTRY_BB, SESE_EXIT_BB): New.
2276 2009-03-04 Sebastian Pop <sebastian.pop@amd.com>
2278 * graphite-poly.c (print_pbb_domain, print_pbb, print_scop,
2279 debug_pbb_domain, debug_pbb, debug_scop): New.
2280 * graphite-poly.h (print_pbb_domain, print_pbb, print_scop,
2281 debug_pbb_domain, debug_pbb, debug_scop): Declared.
2283 2009-03-02 Sebastian Pop <sebastian.pop@amd.com>
2286 * tree-parloops.c (canonicalize_loop_ivs): Call fold_convert
2287 when the type precision of the induction variable should be
2288 larger than the type precision of nit.
2289 (gen_parallel_loop): Update use of canonicalize_loop_ivs.
2290 * graphite-clast-to-gimple.c (graphite_loop_normal_form): Same.
2291 * tree-flow.h (canonicalize_loop_ivs): Update declaration.
2293 * testsuite/gcc.dg/graphite/pr39335_1.c: New.
2294 * testsuite/gcc.dg/graphite/pr39335.c: New.
2296 2009-03-02 Sebastian Pop <sebastian.pop@amd.com>
2298 * tree-parloops.c (canonicalize_loop_ivs): reduction_list contains
2299 SSA_NAMES not struct reduction_info.
2301 2009-03-02 Sebastian Pop <sebastian.pop@amd.com>
2303 * sese.c (expand_scalar_variables_expr): Handle ADDR_EXPR.
2305 2009-02-27 Sebastian Pop <sebastian.pop@amd.com>
2306 Tobias Grosser <grosser@fim.uni-passau.de>
2308 * sese.c (new_sese): Initialize SESE_REDUCTION_LIST.
2309 (free_sese): Free SESE_REDUCTION_LIST.
2310 * sese.h (struct sese): Add field reduction_list.
2311 (SESE_REDUCTION_LIST): New.
2312 * graphite-clast-to-gimple.c (graphite_loop_normal_form): Call
2313 canonicalize_loop_ivs on SESE_REDUCTION_LIST.
2315 2009-02-27 Sebastian Pop <sebastian.pop@amd.com>
2316 Tobias Grosser <grosser@fim.uni-passau.de>
2318 * tree-flow.h (gather_scalar_reductions): Use struct loop * instead
2321 2009-02-27 Sebastian Pop <sebastian.pop@amd.com>
2322 Tobias Grosser <grosser@fim.uni-passau.de>
2324 * tree-parloops.c (struct brli, build_reduction_list_info,
2325 analyze_reduction_list, gather_scalar_reductions): New.
2326 (loop_parallel_p): Build a reduction list containing only
2327 PHI_RESULT SSA_NAMEs: call gather_scalar_reductions.
2328 (gen_parallel_loop): Call the analysis analyze_reduction_list.
2329 (parallelize_loops): Now reduction_list is a htab_t of SSA_NAMEs.
2330 * tree-flow.h (gather_scalar_reductions): Declared.
2332 2009-02-26 Sebastian Pop <sebastian.pop@amd.com>
2335 * graphite-clast-to-gimple.c (graphite_loop_normal_form): Do not call
2336 number_of_iterations_exit from a gcc_assert.
2338 2009-02-25 Sebastian Pop <sebastian.pop@amd.com>
2339 Jan Sjodin <jan.sjodin@amd.com>
2341 * output.h (graphite_out_file, graphite_in_file): Declared.
2342 * toplev.c (graphite_out_file, graphite_in_file): New.
2343 (init_asm_output): Initialize graphite_in_file and graphite_out_file.
2344 * graphite-clast-to-gimple.c (build_cloog_prog): Read PBB_SCATTERING.
2345 Don't call schedule_to_scattering.
2346 * common.opt (fgraphite-write, fgraphite-read): New.
2347 * graphite-poly.c: Include output.h.
2348 (print_scattering_function, print_scattering_functions,
2349 debug_scattering_function, debug_scattering_functions,
2350 graphite_write_transforms, graphite_read_transforms,
2351 graphite_generate_scattering_fns): New.
2352 (apply_poly_transforms): Do not apply transform if flag_graphite_read.
2353 Call graphite_generate_scattering_fns, graphite_write_transforms,
2354 graphite_read_transforms.
2355 (new_poly_bb): Initialize PBB_SCATTERING.
2356 (free_poly_bb): Free PBB_SCATTERING.
2357 (schedule_to_scattering): Does not return, initialize PBB_SCATTERING.
2358 * graphite-poly.h (struct poly_bb): Add field scattering.
2359 (PBB_SCATTERING): New.
2360 (print_scattering_function, print_scattering_functions,
2361 debug_scattering_function, debug_scattering_functions): Declared.
2362 * graphite-ppl.c (cloog_matrix_to_ppl_constraint): Matrices contain
2363 GMP values, not integers!
2364 (ppl_print_polyhedron_matrix, debug_ppl_polyhedron_matrix,
2365 ppl_read_polyhedron_matrix): New.
2366 * graphite-ppl.h (ppl_print_polyhedron_matrix,
2367 debug_ppl_polyhedron_matrix,
2368 ppl_read_polyhedron_matrix): Declared.
2369 * Makefile.in (graphite-poly.o): Depends on output.h.
2371 2009-02-23 Sebastian Pop <sebastian.pop@amd.com>
2372 Tobias Grosser <grosser@fim.uni-passau.de>
2375 * graphite-scop-detection.c (stmt_simple_for_scop_p): Analyze
2376 scalar evolutions in the scop_entry->loop_father.
2378 2009-02-23 Sebastian Pop <sebastian.pop@amd.com>
2379 Tobias Grosser <grosser@fim.uni-passau.de>
2381 * graphite.h (ref_nb_loops): Remove declaration.
2382 (struct gimple_bb, gimple_bb_p, GBB_BB, GBB_DATA_REFS, GBB_CONDITIONS,
2383 GBB_CONDITION_CASES, GBB_CLOOG_IV_TYPES, gbb_loop, print_gimple_bb,
2384 debug_gbb): Moved to sese.h.
2387 2009-02-23 Sebastian Pop <sebastian.pop@amd.com>
2388 Tobias Grosser <grosser@fim.uni-passau.de>
2390 * graphite-data-ref.[ch]: Disable.
2392 2009-02-23 Sebastian Pop <sebastian.pop@amd.com>
2393 Tobias Grosser <grosser@fim.uni-passau.de>
2395 * graphite-scop-detection.c (stmt_simple_for_scop_p): Analyze
2396 scalar evolutions in the scop_entry->loop_father.
2398 2009-02-23 Sebastian Pop <sebastian.pop@amd.com>
2400 * graphite-scop-detection.c (nb_reductions_in_loop): Moved here...
2401 (graphite_cannot_represent_loop_niter): Renamed
2402 graphite_cannot_represent_loop. Call nb_reductions_in_loop.
2403 (limit_scops): build_sese_loop_nests does not return a bool.
2404 * graphite-scop-detection.h (nb_reductions_in_loop): Declared.
2405 * sese.c (nb_reductions_in_loop): ... from here.
2406 (graphite_loop_normal_form): ... from here.
2407 (sese_record_loop): Does not fail, so does not return a bool.
2408 (build_sese_loop_nests): Same.
2409 * sese.h (build_sese_loop_nests): Update declaration.
2410 * graphite-clast-to-gimple.c (graphite_loop_normal_form): Moved here...
2411 (build_graphite_loop_normal_form): New.
2412 (gloog): Call build_graphite_loop_normal_form.
2413 * graphite-sese-to-poly.c (build_poly_scop): Don't fail on
2414 build_sese_loop_nests.
2416 * testsuite/gcc.dg/graphite/id-1.c: New.
2418 2009-02-23 Sebastian Pop <sebastian.pop@amd.com>
2419 Tobias Grosser <grosser@fim.uni-passau.de>
2421 * graphite-sese-to-poly.c (scan_tree_for_params): Remove REAL_CST.
2422 The SCoP detection fix is sufficient.
2424 2009-02-21 Sebastian Pop <sebastian.pop@amd.com>
2426 PR tree-optimization/39260
2427 * graphite-scop-detection.c (harmful_stmt_in_bb): Stop a SCoP when
2428 the basic block contains a condition with a real type.
2429 * graphite-sese-to-poly.c (scan_tree_for_params): Handle REAL_CST.
2431 * gcc.dg/graphite/pr39260.c: New.
2433 2009-02-21 Sebastian Pop <sebastian.pop@amd.com>
2435 * graphite-poly.c: Inlcude params.h.
2436 (graphite_trans_loop_block): Use PARAM_LOOP_BLOCK_TILE_SIZE for
2438 * Makefile.in (graphite-poly.o): Depend on PARAMS_H.
2439 * params.def (PARAM_LOOP_BLOCK_TILE_SIZE): Define.
2441 2009-02-20 Sebastian Pop <sebastian.pop@amd.com>
2442 Tobias Grosser <grosser@fim.uni-passau.de>
2444 * graphite-scop-detection.c (dot_all_scops_1,
2445 dot_all_scops): Moved here.
2446 * graphite-scop-detection.h (dot_all_scops): Declared here.
2447 * graphite.c (graphite_initialize, graphite_finalize): New.
2448 (graphite_transform_loops): Cleaned up.
2449 * sese.c (debug_oldivs): Moved here.
2450 * graphite-poly.c (graphite_apply_transformations): Renamed
2451 apply_poly_transforms.
2452 (debug_loop_vec): Moved here.
2453 * graphite-sese-to-poly.c (build_bb_loops, build_sese_conditions_1,
2454 scop_contains_non_iv_scalar_phi_nodes, build_sese_conditions,
2455 find_scop_parameters, build_scop_iteration_domain,
2456 add_conditions_to_constraints, build_scop_canonical_schedules,
2457 build_scop_data_accesses): Now static.
2458 (build_poly_scop, check_poly_representation): New.
2460 2009-02-20 Sebastian Pop <sebastian.pop@amd.com>
2462 * graphite.c (graphite_stmt_p, new_gimple_bb, free_gimple_bb,
2463 remove_gbbs_in_scop, free_scops, try_generate_gimple_bb,
2464 build_scop_bbs, ref_nb_loops, compare_prefix_loops,
2465 build_scop_canonical_schedules, build_bb_loops, add_value_to_dim,
2466 scan_tree_for_params_right_scev, scan_tree_for_params_int,
2467 scan_tree_for_params, struct irp_data, dx_record_params,
2468 find_params_in_bb, find_scop_parameters, gbb_from_bb,
2469 build_loop_iteration_domains, add_conditions_to_domain,
2470 phi_node_is_iv, bb_contains_non_iv_scalar_phi_nodes,
2471 scop_contains_non_iv_scalar_phi_nodes, build_sese_conditions_1,
2472 build_sese_conditions, add_conditions_to_constraints,
2473 build_scop_iteration_domain, build_access_matrix_with_af,
2474 build_access_matrix,
2475 build_scop_data_accesses): Moved to graphite-sese-to-poly.c.
2477 * graphite-sese-to-poly.c: New.
2478 * graphite-sese-to-poly.h: New.
2480 * Makefile.in: Add new rule for graphite-sese-to-poly.o.
2482 2009-02-20 Sebastian Pop <sebastian.pop@amd.com>
2484 * graphite.c: Split graphite code generation to a new file.
2485 (graphite_verify, gmp_cst_to_tree, clast_name_to_gcc,
2486 max_precision_type, clast_to_gcc_expression_red,
2487 clast_to_gcc_expression, gcc_type_for_clast_expr,
2488 gcc_type_for_clast_eq, loop_iv_stack_patch_for_consts,
2489 graphite_translate_clast_equation, graphite_create_guard_cond_expr,
2490 graphite_create_new_guard, clast_get_body_of_loop,
2491 gcc_type_for_cloog_iv, gcc_type_for_iv_of_clast_loop,
2492 graphite_create_new_loop, build_iv_mapping, copy_renames,
2493 translate_clast, find_cloog_iv_in_expr, compute_cloog_iv_types_1,
2494 compute_cloog_iv_types, free_scattering, save_var_name,
2495 initialize_cloog_names, build_scop_context, build_cloog_prog,
2496 set_cloog_options, debug_clast_stmt, scop_to_clast,
2497 print_generated_program, debug_generated_program,
2498 gloog): Moved to graphite-clast-to-gimple.c.
2500 (struct cloog_prog_clast): Moved to graphite-clast-to-gimple.h.
2502 (iv_stack_entry_is_constant, iv_stack_entry_is_iv,
2503 loop_iv_stack_push_iv, loop_iv_stack_insert_constant,
2504 loop_iv_stack_pop, loop_iv_stack_get_iv,
2505 loop_iv_stack_get_iv_from_name, debug_loop_iv_stack,
2506 free_loop_iv_stack, loop_iv_stack_remove_constants,
2507 debug_rename_elt, debug_rename_map_1, debug_rename_map,
2508 rename_map_elt_info, eq_rename_map_elts, debug_ivtype_elt,
2509 debug_ivtype_map_1, debug_ivtype_map, ivtype_map_elt_info,
2510 eq_ivtype_map_elts, sese_add_exit_phis_edge,
2511 sese_add_exit_phis_var, sese_insert_phis_for_liveouts,
2512 get_vdef_before_sese, sese_adjust_vphi,
2513 get_new_name_from_old_name, sese_adjust_phis_for_liveouts,
2514 oldiv_for_loop, rename_variables_in_stmt, is_parameter,
2515 is_iv, expand_scalar_variables_ssa_name,
2516 expand_scalar_variables_expr, expand_scalar_variables_stmt,
2517 expand_scalar_variables, rename_variables, remove_condition,
2518 get_true_edge_from_guard_bb, get_false_edge_from_guard_bb,
2519 add_loop_exit_phis, insert_loop_close_phis, struct igp,
2520 default_liveout_before_guard, add_guard_exit_phis,
2521 insert_guard_phis, register_old_and_new_names,
2522 graphite_copy_stmts_from_block, register_sese_liveout_renames,
2523 copy_bb_and_scalar_dependences, outermost_loop_in_sese,
2524 if_region_set_false_region, create_if_region_on_edge,
2525 move_sese_in_condition): Moved to sese.c.
2527 (nb_loops_around_loop_in_sese, struct ifsese, if_region_entry,
2528 if_region_exit, if_region_get_condition_block,
2529 struct rename_map_elt, new_rename_map_elt, enum iv_stack_entry_kind,
2530 union iv_stack_entry_data_union, struct iv_stack_entry_struct,
2531 iv_stack_entry_p, loop_iv_stack, struct ivtype_map_elt,
2532 ivtype_map_elt, new_ivtype_map_elt,
2533 recompute_all_dominators): Moved to sese.h.
2535 * graphite-clast-to-gimple.c: New.
2536 * graphite-clast-to-gimple.h: New.
2537 * Makefile.in: Add new rule for graphite-clast-to-gimple.o.
2538 * sese.c: Modified as said above.
2541 2009-02-20 Sebastian Pop <sebastian.pop@amd.com>
2543 * graphite.c: Split scop detection to a new file.
2544 (enum gbb_type, gbb_type, get_bb_type, struct sd_region_p, sd_region,
2545 move_sd_regions, loop_affine_expr, exclude_component_ref,
2546 is_simple_operand, stmt_simple_for_scop_p, harmful_stmt_in_bb,
2547 graphite_cannot_represent_loop_niter, struct scopdet_info,
2548 scopdet_basic_block_info, build_scops_1, bb_in_sd_region,
2549 find_single_entry_edge, find_single_exit_edge,
2550 create_single_entry_edge, sd_region_without_exit,
2551 create_single_exit_edge, unmark_exit_edges, mark_exit_edges,
2552 create_sese_edges, build_graphite_scops, limit_scops, build_scops):
2553 Moved to graphite-scop-detection.c.
2555 * graphite-scop-detection.c: New.
2556 * graphite-scop-detection.h: New.
2557 * Makefile.in: Add new rule for graphite-scop-detection.o.
2559 * sese.c: Include tree-chrec.h, tree-data-ref.h, and
2560 tree-scalar-evolution.h.
2561 (nb_reductions_in_loop, graphite_loop_normal_form, sese_record_loop,
2562 build_sese_loop_nests): Moved here from graphite.c.
2563 (param_index): Renamed parameter_index_in_region.
2565 2009-02-18 Tobias Grosser <grosser@fim.uni-passau.de>
2566 Sebastian Pop <sebastian.pop@amd.com>
2568 * gcc.dg/graphite/block-0.c: Expected to fail now.
2569 * gcc.dg/graphite/block-1.c: Same.
2570 * gcc.dg/graphite/block-5.c: Same.
2571 * gcc.dg/graphite/block-6.c: Same.
2573 2009-02-18 Tobias Grosser <grosser@fim.uni-passau.de>
2574 Sebastian Pop <sebastian.pop@amd.com>
2576 * graphite.h: Separate from graphite_bb_p the polyhedral
2577 representation in poly_bb_p and the GCC specifics in gimple_bb_p.
2578 (struct data_dependence_polyhedron, RDGE_DDP, ddp_p): Moved to
2579 graphite-data-ref.h.
2580 (struct poly_bb, PBB_SCOP, PBB_STATIC_SCHEDULE, PBB_DOMAIN,
2581 PBB_BLACK_BOX, PBB_LOOPS, pbb_nb_loops, pbb_loop_at_index,
2582 pbb_loop_index, struct scop, SCOP_BBS, SCOP_REGION, SCOP_ENTRY,
2583 SCOP_EXIT, SCOP_REGION_BBS, SCOP_DEP_GRAPH, SCOP_PARAMS,
2584 SCOP_LOOP_NEST, SCOP_PARAMS, SCOP_OLDIVS, SCOP_LIVEOUT_RENAMES,
2585 scop_nb_params): Moved to graphite-poly.h.
2586 * graphite-data-ref.c: Same.
2587 * graphite-data-ref.h: New.
2589 (pbb_compare, graphite_sort_pbbs, graphite_trans_bb_move_loop,
2590 graphite_trans_bb_strip_mine, strip_mine_profitable_p,
2591 is_interchange_valid, graphite_trans_bb_block,
2592 graphite_trans_loop_block, scop_max_loop_depth,
2593 graphite_trans_scop_block, graphite_apply_transformations,
2594 new_poly_bb, free_poly_bb, new_scop, free_scop): Moved to
2596 * graphite-poly.h: New.
2597 * graphite-poly.c: New.
2598 * Makefile.in (OBJS-common): Add graphite-poly.o.
2599 (graphite-poly.o): New rule.
2600 * tree-data-ref.h (struct data_reference): Remove unused scop field.
2603 2009-02-18 Sebastian Pop <sebastian.pop@amd.com>
2604 Tobias Grosser <grosser@fim.uni-passau.de>
2606 * graphite.c: Replace gb -> gbb.
2608 * graphite-data-ref.c: Same.
2610 2009-02-18 Sebastian Pop <sebastian.pop@amd.com>
2611 Tobias Grosser <grosser@fim.uni-passau.de>
2613 * Makefile.in (OBJS-commmon): Add sese.o.
2615 (graphite.o): Add sese.h.
2616 * graphite.c (bb_in_ss_p, loop_in_sese_p,
2617 sese_build_livein_liveouts_use, sese_build_livein_liveouts_bb,
2618 sese_build_livein_liveouts, register_bb_in_sese, new_sese, free_sese):
2620 (block_before_scop): Add missing return.
2621 (new_scop, free_scop): Remove SESE data structures.
2622 (scop_record_loop, scan_tree_for_params, find_params_in_bb,
2623 find_scop_parameters, build_loop_iteration_domains,
2624 add_conditions_to_domain, register_scop_liveout_renames,
2625 copy_bb_and_scalar_dependences): Scop -> SESE.
2627 (add_conditions_to_domain): SCoP -> SESE and remove check
2628 (scop_contains_non_iv_scalar_phi_nodes): New.
2629 (build_scop_conditions_1, build_scop_conditions): Remove check for
2630 non iv scalar phi nodes.
2631 (print_scop_statistics): New.
2632 (graphite_transform_loops): Cleanup.
2634 * graphite.h: Move to sese & cleanup.
2638 2009-02-16 Sebastian Pop <sebastian.pop@amd.com>
2639 Tobias Grosser <grosser@fim.uni-passau.de>
2641 * graphite.c (build_scop_conditions_1): Conditions are only
2642 at the end of a basic block.
2644 2009-02-16 Sebastian Pop <sebastian.pop@amd.com>
2645 Tobias Grosser <grosser@fim.uni-passau>
2647 * graphite.h (struct graphite_bb): Remove compressed_alpha_matrix
2649 (GBB_ALPHA): Removed.
2651 2009-02-16 Sebastian Pop <sebastian.pop@amd.com>
2652 Tobias Grosser <grosser@fim.uni-passau.de>
2654 * graphite-data-ref.c (graphite_test_dependence): Don't use
2655 GBB_DYNAMIC_SCHEDULE.
2656 * graphite.c (new_graphite_bb): Same.
2657 (free_graphite_bb): Same.
2658 (build_scop_dynamic_schedules): Removed.
2659 (graphite_transform_loops): Don't call it.
2660 * graphite.h (struct graphite_bb): Remove dynamic_schedule field.
2661 (GBB_DYNAMIC_SCHEDULE): Removed.
2663 2009-02-16 Sebastian Pop <sebastian.pop@amd.com>
2664 Tobias Grosser <grosser@fim.uni-passau.de>
2666 * graphite.c (schedule_to_scattering): Don't use CloogMatrix.
2667 (print_graphite_bb): Same.
2668 (build_cloog_prog): Same.
2670 2009-02-16 Sebastian Pop <sebastian.pop@amd.com>
2671 Tobias Grosser <grosser@fim.uni-passau.de>
2673 * graphite.c (build_cloog_prog): Don't use CloogMatrix.
2675 2009-02-16 Sebastian Pop <sebastian.pop@amd.com>
2676 Tobias Grosser <grosser@fim.uni-passau.de>
2678 * graphite.c (build_scop_context): Don't use CloogMatrix.
2679 * graphite-ppl.c (new_Cloog_Domain_from_ppl_Polyhedron): New.
2680 * graphite-ppl.h (new_Cloog_Domain_from_ppl_Polyhedron): Declared.
2682 2009-02-16 Sebastian Pop <sebastian.pop@amd.com>
2683 Tobias Grosser <grosser@fim.uni-passau.de>
2685 * graphite.h (struct scop): Move params, old_ivs, loops, loop_nest,
2686 liveout_renames, add_params fields...
2687 (struct sese): ... here.
2688 (SESE_PARAMS, SESE_LOOPS, SESE_LOOP_NEST, SESE_ADD_PARAMS,
2689 SESE_PARAMS, SESE_OLDIVS, SESE_LIVEOUT_RENAMES): New.
2691 2009-02-16 Sebastian Pop <sebastian.pop@amd.com>
2692 Tobias Grosser <grosser@fim.uni-passau.de>
2694 * graphite.c (print_scop): Do not print the CLooG program.
2695 (new_scop, free_scop, initialize_cloog_names, build_scop_context,
2696 build_cloog_prog, gloog): Don't use SCOP_PROG.
2697 (find_transform): Renamed scop_to_clast.
2698 (print_generated_program, debug_generated_program): New.
2699 (graphite_transform_loops): Adapt to new interface.
2700 * graphite.h (struct scop): Remove program field.
2701 (SCOP_PROG): Removed.
2702 (print_generated_program, debug_generated_program): Declared.
2704 2009-02-16 Sebastian Pop <sebastian.pop@amd.com>
2706 * graphite-data-ref.c (schedule_precedes_p, schedule_same_p): New.
2707 (statement_precedes_p): Use schedule_same_p and schedule_precedes_p.
2708 * graphite.c (gbb_compare, schedule_to_scattering, print_graphite_bb,
2709 free_graphite_bb, build_scop_canonical_schedules,
2710 graphite_trans_bb_strip_mine, graphite_trans_scop_block): Static
2711 schedules are now represented using a ppl_Linear_Expression_t.
2712 * graphite.h (struct graphite_bb): Same.
2713 * graphite-ppl.c (ppl_lexico_compare_linear_expressions): New.
2714 * graphite-ppl.h (ppl_lexico_compare_linear_expressions): Declared.
2716 2009-02-15 Sebastian Pop <sebastian.pop@amd.com>
2718 * graphite.c: Free local memory.
2719 * graphite-ppl.c: Same.
2721 2009-02-15 Sebastian Pop <sebastian.pop@amd.com>
2723 * graphite.c (const_column_index, get_first_matching_sign_row_index,
2724 get_lower_bound_row, get_upper_bound_row, copy_constraint,
2725 swap_constraint_variables, scale_constraint_variable): Removed.
2726 (graphite_trans_bb_strip_mine): Remove pong.
2727 * graphite-ppl.c: Include missing header files.
2728 (set_inhomogeneous, set_coef, shift_poly, ppl_strip_loop): New.
2729 * graphite-ppl.h (ppl_strip_loop): Declared.
2730 * Makefile.in (graphite-ppl.o): Adjust dependences.
2732 2009-02-14 Sebastian Pop <sebastian.pop@amd.com>
2734 * graphite.c (build_loop_iteration_domains): Remove ping pong.
2735 (build_scop_iteration_domain): Same.
2737 2009-02-13 Sebastian Pop <sebastian.pop@amd.com>
2739 * graphite.c (scan_tree_for_params, add_conditions_to_domain): Remove
2741 (add_value_to_dim, scan_tree_for_params_right_scev,
2742 scan_tree_for_params_int): New.
2743 * graphite-ppl.c (oppose_constraint): New.
2744 (insert_constraint_into_matrix): Implement missing cases.
2745 * graphite-ppl.h (insert_constraint_into_matrix): Declared.
2747 2009-02-13 Sebastian Pop <sebastian.pop@amd.com>
2749 * graphite.c (graphite_trans_bb_move_loop): Remove ping pong,
2750 use ppl_move_dimension.
2752 2009-02-12 Sebastian Pop <sebastian.pop@amd.com>
2754 * graphite-data-ref.c: Domains are now ppl_Polyhedra_t.
2757 * graphite-ppl.c: Same.
2758 * graphite-ppl.h: Same.
2760 2009-02-12 Sebastian Pop <sebastian.pop@amd.com>
2762 Revert last 3 commits.
2764 2009-02-10 Sebastian Pop <sebastian.pop@amd.com>
2766 * graphite.c (scan_tree_for_params, add_conditions_to_domain): Remove
2768 (add_value_to_dim, scan_tree_for_params_right_scev,
2769 scan_tree_for_params_int): New.
2770 * graphite-ppl.c (oppose_constraint): New.
2771 (insert_constraint_into_matrix): Implement missing cases.
2772 * graphite-ppl.h (insert_constraint_into_matrix): Declared.
2774 2009-02-10 Sebastian Pop <sebastian.pop@amd.com>
2776 * graphite.c (graphite_trans_bb_move_loop): Remove unused variables.
2778 2009-02-10 Sebastian Pop <sebastian.pop@amd.com>
2779 Tobias Grosser <grosser@fim.uni-passau.de>
2781 * graphite.c (graphite_trans_bb_move_loop): Remove ping pong,
2782 use ppl_move_dimension.
2783 * graphite-ppl.c (ppl_move_dimension): New.
2784 * graphite-ppl.h (ppl_move_dimension): Declared.
2786 2009-02-10 Sebastian Pop <sebastian.pop@amd.com>
2788 * graphite.c: Do not include cloog/cloog.h.
2789 (print_graphite_bb): Remove ping pong, call PPL print function.
2791 2009-02-10 Tobias Grosser <grosser@fim.uni-passau.de>
2793 * Makefile.in (OBJS-common): Add graphite-ppl.o.
2794 (graphite.o): Add dependence on graphite-ppl.h.
2795 (graphite-ppl.o): New.
2796 (graphite-data-ref.c): Ping pong between PPL data structures
2798 * graphite-ppl.c: New.
2799 * graphite-ppl.h: New.
2800 * graphite.c: Include graphite-ppl.h.
2801 (print_graphite_bb, add_conditions_to_domain, build_cloog_prog,
2802 graphite_trans_bb_move_loop, graphite_trans_bb_strip_mine):
2803 Ping pong between PPL data structures and matrices.
2804 (new_graphite_bb): Create a PPL constraint system.
2805 Call ppl_delete_Constraint_System instead of cloog_matrix_free.
2806 (build_loop_iteration_domains): Use PPL functions.
2807 * graphite.h: Include graphite-ppl.h. Fix comments.
2808 (graphite_bb): Use a ppl_Constraint_System_t instead of
2809 CloogMatrix for representing the domain.
2810 (scop): Remove static_schedule.
2811 (gbb_nb_loops): Ping pong between PPL data structures and matrices.
2813 2009-02-06 Sebastian Pop <sebastian.pop@amd.com>
2815 * graphite.c: Fix some comments.
2817 2009-02-05 Sebastian Pop <sebastian.pop@amd.com>
2820 * graphite.c (if_region_set_false_region): After moving a region
2821 in the false branch of a condition, remove the empty dummy
2823 (gloog): Remove wrong fix for PR38953.
2825 2009-02-03 Tobias Grosser <grosser@fim.uni-passau.de>
2827 * graphite.c (bb_in_sese_p, sese_build_livein_liveouts_use,
2828 sese_build_livein_liveouts_bb, sese_build_livein_liveouts,
2829 register_bb_in_sese, new_sese, free_sese): Moved.
2830 (dot_scop_1, build_scop_loop_nests, build_loop_iteration_domains,
2831 outermost_loop_in_scop, build_scop_iteration_domain,
2832 expand_scalar_variables_ssa_name, get_vdef_before_scop,
2833 limit_scops): Use bb_in_sese_p instead of bb_in_scop_p.
2834 Use loop_in_sese_p instead of loop_in_scop_p.
2835 (new_graphite_bb, new_scop, gloog): Do not initialize SCOP_BBS_B.
2836 (free_scop): Do not free SCOP_BBS_B.
2837 (nb_loops_around_loop_in_scop, nb_loops_around_gb,
2838 ref_nb_loops): Moved here...
2839 * graphite.h (ref_nb_loops): ... from here.
2840 (struct scop): Remove bbs_b bitmap.
2841 (SCOP_BBS_B, bb_in_scop_p, loop_in_scop_p): Removed.
2842 * testsuite/gcc.dg/graphite/scop-19.c: New
2844 2009-02-03 Tobias Grosser <grosser@fim.uni-passau.de>
2846 * graphite.c (scopdet_basic_block_info): Fix bug in scop
2849 2009-01-30 Tobias Grosser <grosser@fim.uni-passau.de>
2851 * graphite.c (new_loop_to_cloog_loop_str, hash_loop_to_cloog_loop,
2852 eq_loop_to_cloog_loop): Remove.
2853 (new_scop, free_scop): Remove SCOP_LOOP2CLOOG_LOOP.
2854 * graphite.h (struct scop): Remove loop2cloog_loop.
2855 (loop_domain_dim, loop_iteration_vector_dim): Remove.
2857 2009-01-30 Tobias Grosser <grosser@fim.uni-passau.de>
2859 * opts.c (decode_options): Only add graphite options to O2
2860 if we compile with graphite enabled.
2862 2009-01-26 Sebastian Pop <sebastian.pop@amd.com>
2864 * Merge from mainline (r143163:143684).
2866 2009-01-26 Sebastian Pop <sebastian.pop@amd.com>
2868 * graphite.c (debug_value): Removed.
2869 * graphite.h (debug_value): Removed.
2871 2009-01-23 Sebastian Pop <sebastian.pop@amd.com>
2873 * passes.c (init_optimization_passes): Do not call pass_copy_prop
2874 after graphite: pass_copy_prop does not maintain a proper loop closed
2875 SSA form. pass_copy_prop should be fixed.
2877 2009-01-23 Sebastian Pop <sebastian.pop@amd.com>
2879 * graphite.c (scop_adjust_phis_for_liveouts): Fix warning.
2881 2009-01-23 Sebastian Pop <sebastian.pop@amd.com>
2883 * graphite.c (graphite_verify): Add a call to verify_loop_closed_ssa.
2884 (gloog): Split the exit of the scop when the scop exit is a loop exit.
2885 (graphite_transform_loops): Only call cleanup_tree_cfg if gloog
2888 2009-01-20 Sebastian Pop <sebastian.pop@amd.com>
2890 * graphite.c (gloog): Return true when code gen succeeded.
2891 (graphite_transform_loops): Do not call cleanup_tree_cfg if
2892 the code of the function did not changed. After cleanup_tree_cfg
2893 call rewrite_into_loop_closed_ssa to maintain the loop closed ssa
2896 2009-01-19 Sebastian Pop <sebastian.pop@amd.com>
2898 * graphite.c (stmt_simple_for_scop_p): Also handle cases when
2899 gimple_call_lhs is NULL.
2901 2009-01-16 Sebastian Pop <sebastian.pop@amd.com>
2902 Tobias Grosser <tobi.grosser@amd.com>
2904 * graphite.c (graphite_trans_scop_block): Do not block single
2907 2009-01-15 Sebastian Pop <sebastian.pop@amd.com>
2908 Tobias Grosser <tobi.grosser@amd.com>
2910 * graphite.c (build_scop_canonical_schedules): Start schedules at
2913 2009-01-15 Sebastian Pop <sebastian.pop@amd.com>
2914 Tobias Grosser <tobi.grosser@amd.com>
2916 * graphite.c (compare_prefix_loops): New.
2917 (build_scop_canonical_schedules): Rewritten.
2918 (graphite_transform_loops): Move build_scop_canonical_schedules
2919 after build_scop_iteration_domain.
2921 2009-01-14 Sebastian Pop <sebastian.pop@amd.com>
2922 Tobias Grosser <tobi.grosser@amd.com>
2924 * graphite.c (add_conditions_to_domain): Add the loops to
2925 the dimension of the iteration domain. Do copy the domain
2926 only when it exists.
2927 (build_scop_conditions_1): Do not call add_conditions_to_domain.
2928 (add_conditions_to_constraints): New.
2929 (can_generate_code_stmt, can_generate_code): Removed.
2930 (gloog): Do not call can_generate_code.
2931 (graphite_transform_loops): Call add_conditions_to_constraints
2932 after building the iteration domain.
2934 2009-01-14 Sebastian Pop <sebastian.pop@amd.com>
2935 Tobias Grosser <tobi.grosser@amd.com>
2936 Jan Sjodin <jan.sjodin@amd.com>
2938 * graphite.c (scan_tree_for_params): On substractions negate
2939 all the coefficients of the term.
2940 (clast_to_gcc_expression_red): New. Handle reduction expressions
2941 of more than two operands.
2942 (clast_to_gcc_expression): Call clast_to_gcc_expression_red.
2943 (get_vdef_before_scop): Handle also the case of default definitions.
2945 2009-01-14 Sebastian Pop <sebastian.pop@amd.com>
2948 * graphite.c (get_vdef_before_scop, scop_adjust_vphi): New.
2949 (scop_adjust_phis_for_liveouts): Call scop_adjust_vphi.
2950 (gloog): Do not call cleanup_tree_cfg.
2951 (graphite_transform_loops): Call cleanup_tree_cfg after all
2952 scops have been code generated.
2954 2009-01-13 Sebastian Pop <sebastian.pop@amd.com>
2956 * passes.c (init_optimization_passes): Schedule after
2957 graphite transforms pass_copy_prop, pass_dce_loop and pass_lim.
2959 2009-01-13 Sebastian Pop <sebastian.pop@amd.com>
2961 * graphite.c (expand_scalar_variables_stmt): Do not pass loop_p.
2963 (expand_scalar_variables_ssa_name): Do not pass loop_p. Fix comment.
2964 Set the type of an expression to the type of its assign statement.
2965 (expand_scalar_variables_expr): Do not pass loop_p.
2966 Fix comment. Stop recursion on tcc_constant or tcc_declaration.
2967 (copy_bb_and_scalar_dependences): Do not pass loop_p.
2968 (translate_clast): Update call to copy_bb_and_scalar_dependences.
2970 2009-01-11 Sebastian Pop <sebastian.pop@amd.com>
2972 * graphite.c (expand_scalar_variables_ssa_name): Set the type of
2973 an expression to the gimple_expr_type of its assign statement.
2974 (expand_scalar_variables_expr): Stop recursion on tcc_constant
2977 2009-01-11 Sebastian Pop <sebastian.pop@amd.com>
2979 PR tree-optimization/38786
2980 * testsuite/gcc.dg/graphite/pr38786.c: New.
2981 * graphite.c (expand_scalar_variables_ssa_name): New, outlined from
2982 the SSA_NAME case of expand_scalar_variables_expr.
2983 (expand_scalar_variables_expr): Also gather the scalar computation
2984 used to index the memory access.
2985 (expand_scalar_variables_stmt): Pass to expand_scalar_variables_expr
2986 the gimple_stmt_iterator where it inserts new code.
2988 2009-01-10 Sebastian Pop <sebastian.pop@amd.com>
2990 * testsuite/gcc.dg/graphite/block-3.c: Fix compile error on 32bit.
2992 2009-01-10 Sebastian Pop <sebastian.pop@amd.com>
2994 * opts.c (decode_options): Enable flag_graphite_identity and
2995 flag_loop_block in -O2 and above.
2997 2009-01-08 Sebastian Pop <sebastian.pop@amd.com>
2999 * libjava/classpath/lib/gnu/java/awt/peer/gtk/GtkMouseInfoPeer.class:
3000 Fix merge problem: replace with the file from trunk.
3002 2009-01-08 Sebastian Pop <sebastian.pop@amd.com>
3004 * Merge from mainline (r141727:143163).
3006 2009-01-07 Sebastian Pop <sebastian.pop@amd.com>
3007 Jan Sjodin <jan.sjodin@amd.com>
3009 PR tree-optimization/38559
3010 * testsuite/gcc.dg/graphite/pr38559.c: New.
3012 * graphite.c (debug_value, copy_constraint,
3013 swap_constraint_variables, scale_constraint_variable, ): New.
3014 (get_lower_bound, get_upper_bound): Removed.
3015 (graphite_trans_bb_strip_mine): Clean up this code that works
3016 only for constant number of iterations. Fully copy upper and
3017 lower bound constraints, not only the constant part of them.
3018 * graphite.h (debug_value): Declared.
3020 2009-01-06 Jan Sjodin <jan.sjodin@amd.com>
3022 PR tree-optimization/38492
3023 PR tree-optimization/38498
3024 * tree-check.c (operator_is_linear, scev_is_linear_expression): New.
3025 * tree-chrec.h (scev_is_linear_expression): Declared.
3026 * graphite.c (graphite_cannot_represent_loop_niter): New.
3027 (scopdet_basic_block_info): Call graphite_cannot_represent_loop_niter.
3028 (graphite_loop_normal_form): Use gcc_assert.
3029 (scan_tree_for_params): Use CASE_CONVERT.
3030 (phi_node_is_iv, bb_contains_non_iv_scalar_phi_nodes): New.
3031 (build_scop_conditions_1): Call bb_contains_non_iv_scalar_phi_nodes.
3032 Use gcc_assert. Discard scops that contain unhandled cases.
3033 (build_scop_conditions): Return a boolean status for unhandled cases.
3034 (strip_mine_profitable_p): Print the loop number, not its depth.
3035 (is_interchange_valid): Pass the depth of the loop nest, don't
3036 recompute it wrongly.
3037 (graphite_trans_bb_block): Same.
3038 (graphite_trans_bb_block): Print tentative of loop blocking.
3039 (graphite_trans_scop_block): Do not print that the loop has been
3041 (graphite_transform_loops): Do not handle scops that contain condition
3044 * testsuite/gcc.dg/graphite/pr38500.c: Fixed warning as committed
3046 * testsuite/gcc.dg/graphite/block-0.c: Update test.
3047 * testsuite/gcc.dg/graphite/block-1.c: Same.
3048 * testsuite/gcc.dg/graphite/block-2.c: Remove xfail and test for
3050 * testsuite/gcc.dg/graphite/block-4.c: Remove test for strip mine.
3051 * testsuite/gcc.dg/graphite/block-3.c: New.
3052 * testsuite/gcc.dg/graphite/pr38498.c: New.
3054 2008-12-22 Harsha Jagasia <harsha.jagasia@amd.com>
3056 PR tree-optimization/38510
3057 * gcc.dg/graphite/pr38510.c: New.
3058 * graphite.c (recompute_all_dominators): Call mark_irreducible_loops.
3059 (translate_clast): Call recompute_all_dominators before
3061 (gloog): Call recompute_all_dominators before graphite_verify.
3063 2008-12-12 Sebastian Pop <sebastian.pop@amd.com>
3065 PR tree-optimization/38492
3066 * graphite.c (rename_map_elt, debug_rename_elt,
3067 debug_rename_map_1, debug_rename_map, new_rename_map_elt,
3068 rename_map_elt_info, eq_rename_map_elts,
3069 get_new_name_from_old_name, bb_in_sese_p): Moved around.
3070 (sese_find_uses_to_rename_use): Renamed sese_build_livein_liveouts_use.
3071 (sese_find_uses_to_rename_bb): Renamed sese_build_livein_liveouts_bb.
3072 (sese_build_livein_liveouts): New.
3073 (new_sese, free_sese): New.
3074 (new_scop): Call new_sese.
3075 (free_scop): Call free_sese.
3076 (rename_variables_from_edge, rename_phis_end_scop): Removed.
3077 (register_old_new_names): Renamed register_old_and_new_names.
3078 (register_scop_liveout_renames, add_loop_exit_phis,
3079 insert_loop_close_phis, struct igp,
3080 default_liveout_before_guard, add_guard_exit_phis,
3081 insert_guard_phis, copy_renames): New.
3082 (translate_clast): Call insert_loop_close_phis and insert_guard_phis.
3083 (sese_add_exit_phis_edge): Renamed scop_add_exit_phis_edge.
3084 (rewrite_into_sese_closed_ssa): Renamed scop_insert_phis_for_liveouts.
3085 (scop_adjust_phis_for_liveouts): New.
3086 (gloog): Call scop_adjust_phis_for_liveouts.
3088 * graphite.h (struct sese): Documented. Added fields liveout,
3090 (SESE_LIVEOUT, SESE_LIVEIN, SESE_LIVEIN_VER, SESE_NUM_VER): New.
3091 (new_sese, free_sese, sese_build_livein_liveouts): Declared.
3092 (struct scop): Added field liveout_renames.
3093 (SCOP_LIVEOUT_RENAMES): New.
3095 2008-12-11 Sebastian Pop <sebastian.pop@amd.com>
3097 PR tree-optimization/38409
3098 * gcc.dg/graphite/pr38409.c: New.
3099 * graphite.c (nb_reductions_in_loop): Use simple_iv.
3101 2008-12-11 Sebastian Pop <sebastian.pop@amd.com>
3103 * graphite.c (gcc_type_for_cloog_iv): By default return
3105 (graphite_create_new_loop): Don't fold_convert the already
3106 fold_convert-ed expression.
3108 2008-12-11 Harsha Jagasia <harsha.jagasia@amd.com>
3110 PR tree-optimization/38446
3111 * gcc.dg/graphite/pr38446.c: New.
3112 * graphite.c (register_bb_in_sese): New.
3113 (bb_in_sese_p): Check if bb belongs to sese region by explicitly
3114 looking at the bbs in the region.
3115 * graphite.h (sese): Add region_basic_blocks pointer set to
3116 structure and initialize at the time of defining new scop.
3118 2008-12-11 Tobias Grosser <grosser@fim.uni-passau.de>
3120 * graphite.c (new_graphite_bb): Initialize GBB_STATIC_SCHEDULE.
3121 (find_params_in_bb): Do not free data refs.
3122 (free_graphite_bb): Add FIXME on disabled free_data_refs.
3124 2008-12-11 Sebastian Pop <sebastian.pop@amd.com>
3126 * testsuite/gcc.dg/graphite/scop-16.c: Test only scop specific info.
3127 * testsuite/gcc.dg/graphite/scop-17.c: Same.
3128 * testsuite/gcc.dg/graphite/block-5.c: New.
3129 * testsuite/gcc.dg/graphite/block-6.c: New.
3130 * testsuite/gcc.dg/graphite/pr37485.c: Clean dump file after.
3131 * testsuite/gcc.dg/graphite/pr37684.c: Same.
3132 * testsuite/gcc.dg/graphite/block-2.c: Same.
3134 * graphite.c (struct ivtype_map_elt): New.
3135 (debug_ivtype_elt, debug_ivtype_map_1, debug_ivtype_map,
3136 new_ivtype_map_elt, ivtype_map_elt_info, eq_ivtype_map_elts,
3137 gcc_type_for_cloog_iv): New.
3138 (loop_iv_stack_patch_for_consts): Use the type of the induction
3139 variable from the original loop, except for the automatically
3140 generated loops, i.e., in the case of a strip-mined loop, in
3141 which case there is no original loop: in that case just use
3143 (new_graphite_bb): Initialize GBB_CLOOG_IV_TYPES.
3144 (free_graphite_bb): Free GBB_CLOOG_IV_TYPES.
3145 (clast_name_to_gcc): Accept params to be NULL.
3146 (clast_to_gcc_expression): Take an extra parameter for the type.
3147 Convert to that type all the expressions built by this function.
3148 (gcc_type_for_clast_expr, gcc_type_for_clast_eq): New.
3149 (graphite_translate_clast_equation): Compute the type of the
3150 clast_equation before translating its LHS and RHS.
3151 (clast_get_body_of_loop, gcc_type_for_iv_of_clast_loop): New.
3152 (graphite_create_new_loop): Compute the type of the induction
3153 variable before translating the lower and upper bounds and before
3154 creating the induction variable.
3155 (rename_variables_from_edge, rename_phis_end_scop): New.
3156 (copy_bb_and_scalar_dependences): Call rename_phis_end_scop.
3157 (sese_add_exit_phis_edge): Do not use integer_zero_node.
3158 (find_cloog_iv_in_expr, compute_cloog_iv_types_1,
3159 compute_cloog_iv_types): New.
3160 (gloog): Call compute_cloog_iv_types before starting the
3161 translation of the clast.
3163 * graphite.h (struct graphite_bb): New field cloog_iv_types.
3164 (GBB_CLOOG_IV_TYPES): New.
3165 (debug_ivtype_map): Declared.
3166 (oldiv_for_loop): New.
3168 2008-12-10 Tobias Grosser <grosser@fim.uni-passau.de>
3171 * graphite.c (new_scop): Initialize SCOP_ADD_PARAMS.
3172 (param_index): Assert if parameter is not know after parameter
3174 (find_params_in_bb): Detect params directly in GBB_CONDITIONS.
3175 (find_scop_parameters): Mark, that we have finished parameter
3177 (graphite_transform_loops): Move condition detection before parameter
3179 * graphite.h (struct scop): Add SCOP_ADD_PARAMS.
3180 * testsuite/gfortran.dg/graphite/pr38459.f90: New.
3182 2008-12-09 Tobias Grosser <grosser@fim.uni-passau.de>
3184 * graphite.c (graphite_transform_loops): Always call find_transform ()
3185 in ENABLE_CHECKING. So we test these code paths, even if we do not
3188 2008-12-09 Tobias Grosser <grosser@fim.uni-passau.de>
3190 * graphite.c (print_graphite_bb): Fix printing to file != dump_file.
3191 (print_scop): Ditto.
3193 2008-12-08 Tobias Grosser <grosser@fim.uni-passau.de>
3196 Fix testsuite/gfortran.dg/graphite/id-3.f90.
3197 * graphite.c (scopdet_basic_block_info): Fix bug that found some
3198 regions more than once.
3200 2008-12-03 Sebastian Pop <sebastian.pop@amd.com>
3202 Fix testsuite/gfortran.dg/graphite/id-4.f90.
3203 * graphite.c (scan_tree_for_params): Do not compute the multiplicand
3206 2008-12-03 Sebastian Pop <sebastian.pop@amd.com>
3208 Fix testsuite/gfortran.dg/graphite/id-1.f90.
3209 * graphite.c (gmp_cst_to_tree): Pass the type in parameter.
3210 (loop_iv_stack_patch_for_consts): Update use of gmp_cst_to_tree.
3211 (max_precision_type): New.
3212 (value_clast): Removed.
3213 (clast_to_gcc_expression): Be more careful to types of expressions.
3214 Use max_precision_type and update use of gmp_cst_to_tree.
3215 (graphite_translate_clast_equation): Use max_precision_type.
3216 (graphite_create_guard_cond_expr): Do not use integer_type_node,
3217 use the type of the condition.
3218 (graphite_create_new_loop): Do not use integer_type_node, use the
3219 max_precision_type of lb and ub.
3221 2008-12-03 Sebastian Pop <sebastian.pop@amd.com>
3223 * graphite.c (build_scops_1): Initialize open_scop.exit
3226 2008-12-02 Sebastian Pop <sebastian.pop@amd.com>
3228 * testsuite/gcc.dg/graphite/pr38084.c: New.
3229 * testsuite/gfortran.dg/graphite/id-1.f90: New.
3230 * testsuite/gfortran.dg/graphite/id-2.f90: New.
3231 * testsuite/gfortran.dg/graphite/id-3.f90: New.
3232 * testsuite/gfortran.dg/graphite/id-4.f90: New.
3233 * testsuite/gfortran.dg/graphite/pr37857.f90: New.
3235 2008-12-02 Sebastian Pop <sebastian.pop@amd.com>
3236 Jan Sjodin <jan.sjodin@amd.com>
3237 Harsha Jagasia <harsha.jagasia@amd.com>
3249 * testsuite/gcc.dg/graphite/pr38073.c: New.
3250 * testsuite/gcc.dg/graphite/pr37928.c: New.
3251 * testsuite/gcc.dg/graphite/pr37883.c: New.
3252 * testsuite/gcc.dg/graphite/pr38125.c: New.
3253 * testsuite/gfortran.dg/graphite/pr38083.f90: New.
3254 * testsuite/gfortran.dg/graphite/pr37852.f90: New.
3255 * testsuite/gfortran.dg/graphite/pr37980.f90: New.
3257 * testsuite/gcc.dg/graphite/scop-18.c: Remove reduction, test for
3258 the number of detected scops. Copy exact same test for loop
3260 * testsuite/gcc.dg/graphite/block-1.c: Fix the number of expected
3261 loops to be blocked as reductions are not handled.
3262 * testsuite/gcc.dg/graphite/block-4.c: ...here. New.
3264 * tree-phinodes.c (remove_phi_nodes): New, extracted from...
3265 * tree-cfg.c (remove_phi_nodes_and_edges_for_unreachable_block):
3267 * tree-flow.h (remove_phi_nodes, canonicalize_loop_ivs): Declared.
3268 * Makefile.in (graphite.o): Depend on value-prof.h.
3269 (graphite.o-warn): Removed -Wno-error.
3270 * tree-parloops.c (canonicalize_loop_ivs): Allow reduction_list
3271 to be a NULL pointer. Call update_stmt. Return the newly created
3272 cannonical induction variable.
3274 * graphite.h (debug_rename_map): Declared. Fix some comments.
3276 * graphite.c: Reimplement the code generation from graphite to gimple.
3277 Include value-prof.h.
3278 (loop_iv_stack_get_iv): Do not return NULL for constant substitutions.
3279 (get_old_iv_from_ssa_name): Removed.
3280 (graphite_stmt_p): New.
3281 (new_graphite_bb): Test for useful statements before building a
3282 graphite statement for the basic block.
3283 (free_graphite_bb): Do not free GBB_DATA_REFS: this is a bug
3284 in free_data_ref that calls BITMAP_FREE (DR_VOPS (dr)) without
3286 (recompute_all_dominators, graphite_verify,
3287 nb_reductions_in_loop, graphite_loop_normal_form): New.
3288 (scop_record_loop): Call graphite_loop_normal_form.
3289 (build_scop_loop_nests): Iterate over all the blocks of the
3290 function instead of relying on the incomplete information from
3291 SCOP_BBS. Return the success of the operation.
3292 (find_params_in_bb): Use the data from GBB_DATA_REFS.
3293 (add_bb_domains): Removed.
3294 (build_loop_iteration_domains): Don't call add_bb_domains.
3295 Add the iteration domain only to the basic blocks that have been
3296 translated to graphite.
3297 (build_scop_conditions_1): Add constraints only if the basic
3298 block have been translated to graphite.
3299 (build_scop_data_accesses): Completely disabled until data
3300 dependence is correctly implemented.
3301 (debug_rename_elt, debug_rename_map_1, debug_rename_map): New.
3302 (remove_all_edges_1, remove_all_edges): Removed.
3303 (get_new_name_from_old_name): New.
3304 (graphite_rename_variables_in_stmt): Renamed
3305 rename_variables_in_stmt. Call get_new_name_from_old_name.
3306 Use replace_exp and update_stmt.
3307 (is_old_iv): Renamed is_iv.
3308 (expand_scalar_variables_stmt): Extra parameter for renaming map.
3309 Use replace_exp and update_stmt.
3310 (expand_scalar_variables_expr): Same. Use the map to get the
3311 new names for the renaming of induction variables and for the
3312 renaming of variables after a basic block has been copied.
3313 (expand_scalar_variables): Same.
3314 (graphite_rename_variables): Renamed rename_variables.
3315 (move_phi_nodes): Removed.
3316 (get_false_edge_from_guard_bb): New.
3317 (build_iv_mapping): Do not insert the induction variable of a
3318 loop in the renaming iv map if the basic block does not belong
3320 (register_old_new_names, graphite_copy_stmts_from_block,
3321 copy_bb_and_scalar_dependences): New.
3322 (translate_clast): Heavily reimplemented: copy basic blocks,
3323 do not move them. Finally, in call cleanup_tree_cfg in gloog.
3324 At each translation step call graphite_verify ensuring the
3325 consistency of the SSA, loops and dominators information.
3326 (collect_virtual_phis, find_vdef_for_var_in_bb,
3327 find_vdef_for_var_1, find_vdef_for_var,
3328 patch_phis_for_virtual_defs): Removed huge hack.
3329 (mark_old_loops, remove_dead_loops, skip_phi_defs,
3330 collect_scop_exit_phi_args, patch_scop_exit_phi_args,
3331 gbb_can_be_ignored, scop_remove_ignoreable_gbbs, ): Removed.
3332 (remove_sese_region, ifsese, if_region_entry, if_region_exit,
3333 if_region_get_condition_block, if_region_set_false_region,
3334 create_if_region_on_edge, move_sese_in_condition, bb_in_sese_p,
3335 sese_find_uses_to_rename_use, sese_find_uses_to_rename_bb,
3336 sese_add_exit_phis_edge, sese_add_exit_phis_var,
3337 rewrite_into_sese_closed_ssa): New.
3338 (gloog): Remove dead code. Early return if code cannot be
3339 generated. Call cleanup_tree_cfg once the scop has been code
3341 (graphite_trans_scop_block, graphite_trans_loop_block): Do not
3342 block loops with less than two loops.
3343 (graphite_apply_transformations): Remove the call to
3344 scop_remove_ignoreable_gbbs.
3345 (limit_scops): When build_scop_loop_nests fails, continue on
3346 the next scop. Fix open_scop.entry.
3347 (graphite_transform_loops): Call recompute_all_dominators: force the
3348 recomputation of correct CDI_DOMINATORS and CDI_POST_DOMINATORS.
3349 Call initialize_original_copy_tables and free_original_copy_tables
3350 to be able to copy basic blocks during code generation.
3351 When build_scop_loop_nests fails, continue on next scop.
3352 (value_clast): New union.
3353 (clast_to_gcc_expression): Fix type cast warning.
3355 2008-11-09 Sebastian Pop <sebastian.pop@amd.com>
3357 * Merge from mainline (r140838:141727).
3359 2008-11-05 Tobias Grosser <grosser@fim.uni-passau.de>
3363 * graphite.c (scan_tree_for_params): Add POINTER_PLUS_EXPR.
3365 2008-11-05 Tobias Grosser <grosser@fim.uni-passau.de>
3369 * graphite.c (scopdet_basic_block_info): Fix loops with multiple
3370 exits and conditions.
3371 * testsuite/gcc.dg/graphite/pr37943.c: New.
3373 2008-10-23 Tobias Grosser <grosser@fim.uni-passau.de>
3376 * graphite.c (gloog): Replace EXIT_BLOCK_PTR with scop exit.
3378 2008-10-23 Tobias Grosser <grosser@fim.uni-passau.de>
3380 * doc/invoke.texi: Fix spaces.
3382 2008-10-22 Sebastian Pop <sebastian.pop@amd.com>
3384 PR tree-optimization/37891
3385 Reverted last commit.
3386 * graphite.c (create_single_entry_edge): Set
3387 EDGE_IRREDUCIBLE_LOOP and BB_IRREDUCIBLE_LOOP.
3389 2008-10-21 Sebastian Pop <sebastian.pop@amd.com>
3390 Mitul Thakkar <mitul.thakkar@amd.com>
3392 * graphite.c (create_single_entry_edge): Set
3393 EDGE_IRREDUCIBLE_LOOP and BB_IRREDUCIBLE_LOOP.
3395 2008-10-16 Tobias Grosser <grosser@fim.uni-passau.de>
3397 * doc/invoke.texi: Add -fgraphite-identity.
3398 * graphite.c (graphite_apply_transformations): Check for
3399 -fgraphite-identity.
3400 * toplev.c (process_options): Add flag_graphite_identity.
3401 * tree-ssa-loop.c: Add flag_graphite_identity.
3403 2008-10-14 Sebastian Pop <sebastian.pop@amd.com>
3405 Undo changes from 2008-10-02:
3406 * tree-ssa-loop-ivopts.c (rewrite_use_nonlinear_expr): Convert
3407 operand type when copying the operand to a variable of different type.
3408 * cfgloopmanip.c (create_empty_loop_on_edge): Write exit condition
3409 with the IV name after increment.
3411 2008-10-14 Sebastian Pop <sebastian.pop@amd.com>
3412 Harsha Jagasia <harsha.jagasia@amd.com>
3414 PR tree-optimization/37828
3415 * testsuite/gcc.dg/graphite/pr37828.c: New.
3416 * graphite.c (graphite_trans_loop_block): Do not loop block
3417 single nested loops.
3419 2008-10-09 Harsha Jagasia <harsha.jagasia@amd.com>
3420 Sebastian Pop <sebastian.pop@amd.com>
3422 * graphite.c (struct rename_map_elt, new_rename_map_elt,
3423 rename_map_elt_info, eq_rename_map_elts): New.
3424 (graphite_rename_ivs_stmt): Renamed graphite_rename_variables_in_stmt.
3425 (expand_scalar_variables_expr): Change parameters.
3426 (expand_scalar_variables_stmt): Same.
3427 (expand_scalar_variables): Same.
3428 (graphite_rename_ivs): Rename graphite_rename_variables.
3429 (build_iv_mapping): New.
3430 (translate_clast): Call build_iv_mapping.
3431 * graphite.h (gbb_p): New name.
3433 2008-10-03 Harsha Jagasia <harsha.jagasia@amd.com>
3435 PR tree-optimization/37684
3436 * gcc.dg/graphite/pr37684.c: New.
3437 * graphite.c (exclude_component_ref): New.
3438 (is_simple_operand): Call exclude_component_ref.
3440 2008-10-02 Jan Sjodin <jan.sjodin@amd.com>
3441 Harsha Jagasia <harsha.jagasia@amd.com>
3443 PR tree-optimization/37485
3444 * gcc.dg/graphite/block-2.c: New
3445 * graphite.c (gmp_cst_to_tree): Moved.
3446 (iv_stack_entry_is_constant): New.
3447 (iv_stack_entry_is_iv): New.
3448 (loop_iv_stack_push): Renamed to loop_iv_stack_push_iv.
3449 (loop_iv_stack_insert_constant): New.
3450 (loop_iv_stack_pop): Use new datatpype.
3451 (loop_iv_stack_get_iv): Same.
3452 (loop_iv_stack_get_iv_from_name): Same.
3453 (loop_iv_stack_debug): Renamed to debug_loop_iv_stack.
3454 (loop_iv_stack_patch_for_consts): New.
3455 (loop_iv_stack_remove_constants): New.
3456 (graphite_create_new_loop): Use loop_iv_stack_push_iv.
3457 (translate_clast): Call loop_iv_stack_patch_for_consts and
3458 loop_iv_stack_remove_constants.
3459 (gloog): Use new datatype. Redirect construction edge to end
3460 block to avoid accidental deletion.
3461 * graphite.h (enum iv_stack_entry_kind): New. Tag for data in
3463 (union iv_stack_entry_data): New. Data in iv stack entry.
3464 (struct iv_stack_entry): New. Datatype for iv stack entries.
3466 2008-10-02 Sebastian Pop <sebastian.pop@amd.com>
3468 * tree-ssa-loop-ivopts.c (rewrite_use_nonlinear_expr): Convert
3469 operand type when copying the operand to a variable of different type.
3471 2008-10-02 Sebastian Pop <sebastian.pop@amd.com>
3473 * cfgloopmanip.c (create_empty_loop_on_edge): Write exit condition
3474 with the IV name after increment.
3476 2008-10-02 Sebastian Pop <sebastian.pop@amd.com>
3478 * Merge from mainline (r140164:140838).
3480 2008-09-10 Konrad Trifunovic <konrad.trifunovic@inria.fr>
3482 * graphite-data-ref.c: New.
3483 * graphite.c (print_scop): Also dump the dependence graph.
3484 (bb_in_scop_p, loop_in_scop_p, nb_loops_around_gb): Moved...
3485 (new_scop): Initialize SCOP_DEP_GRAPH.
3486 (build_scop_dynamic_schedules): New.
3487 (build_access_matrix_with_af): Fixed column numbering.
3488 (graphite_transform_loops): Call build_scop_dynamic_schedules.
3489 * graphite.h: Add ifndef/define guards against multiple inclusion.
3490 (struct scop): Add dep_graph field.
3491 (SCOP_DEP_GRAPH): Defined.
3492 (ref_nb_loops): Fixed and moved to other position.
3493 (bb_in_scop_p, loop_in_scop_p, nb_loops_around_gb): ... here.
3494 (nb_loops_around_loop_in_scop): New.
3495 (graphite_dump_dependence_graph): Declared.
3496 (graphite_build_rdg_all_levels): Declared.
3497 (graphite_test_dependence): Declared.
3498 * Makefile.in (graphite-data-ref.o): New target.
3500 2008-09-09 Sebastian Pop <sebastian.pop@amd.com>
3502 * Merge from mainline (139870:140164).
3504 2008-09-01 Sebastian Pop <sebastian.pop@amd.com>
3506 * Merge from mainline (138275:139870).
3507 * testsuite/gcc.dg/graphite/scop-matmult.c: XFailed as one of
3508 the commits from trunk broke the niter detection.
3510 2008-09-01 Sebastian Pop <sebastian.pop@amd.com>
3512 * graphite.c: Add more documentation. Fix formatting.
3513 (debug_loop_vec, debug_oldivs, loop_iv_stack,
3514 loop_iv_stack_debug): Moved...
3515 (schedule_to_scattering): Move before use.
3516 (dot_all_scops): Include in "#if 0" the code for system
3519 * graphite.h: (debug_loop_vec, debug_oldivs, loop_iv_stack,
3520 loop_iv_stack_debug): ...here.
3522 2008-08-29 Jan Sjodin <jan.sjodin@amd.com>
3524 * tree-phinodes.c (make_phi_node): Extern.
3525 (add_phi_node_to_bb): New.
3526 (create_phi_node): Call add_phi_node_to_bb.
3527 * tree-ssa-loop-ivopts.c (get_phi_with_result): New.
3528 (remove_statement): Handle case where stored phi was updated
3529 and is no longer the same.
3530 * graphite.c (is_parameter): New.
3532 (expand_scalar_variables_expr): New.
3533 (expand_scalar_variables_stmt): New.
3534 (expand_scalar_variables): New.
3535 (move_phi_nodes): Create new phi instead of moving old one.
3536 (translate_clast): Call expand_scalar_variables.
3537 (find_vdef_for_var_in_bb): Also scan regular definitions.
3538 (skip_phi_defs): New.
3539 (collect_scop_exit_phi_args): New.
3540 (patch_scop_exit_phi_args): New.
3541 (gloog): Patch phis after scop.
3542 * tree-flow.h: (add_phi_node_to_bb): Declared.
3543 (make_phi_node): Declared.
3545 2008-08-26 Sebastian Pop <sebastian.pop@amd.com>
3547 * graphite.c (end_scop): Split the entry of the scop when it
3548 is the header of the loop in which the scop is ending.
3549 (build_scops_1, limit_scops): Update uses of end_scop.
3551 2008-08-26 Sebastian Pop <sebastian.pop@amd.com>
3553 * graphite.c (dot_all_scops_1): Do not fail on uninitialized
3554 SCOP_ENTRY or SCOP_EXIT.
3556 2008-08-25 Sebastian Pop <sebastian.pop@amd.com>
3558 * graphite.c (get_construction_edge): Removed.
3559 (gloog): Construction edge is the scop entry edge.
3561 2008-08-25 Sebastian Pop <sebastian.pop@amd.com>
3563 * graphite.c (can_generate_for_scop): Removed.
3564 (gloog): Do not call it.
3566 2008-08-25 Sebastian Pop <sebastian.pop@amd.com>
3568 * graphite.c (new_scop): Entry of a scop is an edge.
3569 Initialize SESE region.
3570 (free_scop): Free SESE region.
3571 (build_scops_1, scopdet_bb_info): Work on edges, not on bbs.
3572 (split_difficult_bb): New, split from end_scop.
3573 (end_scop): Exit of a scop is an edge.
3574 (build_scop_bbs): Never check CDI_POST_DOMINATORS: this info is
3575 not automatically updated and thus is always wrong.
3576 * graphite.h (struct sese): New.
3579 (struct scop): New field for a SESE region. Remove entry, exit.
3580 (SCOP_ENTRY, SCOP_EXIT): Update definitions to match same
3581 semantics as before. Moved comment around.
3583 2008-08-25 Tobias Grosser <grosser@fim.uni-passau.de>
3584 Sebastian Pop <sebastian.pop@amd.com>
3586 * graphite.c (graphite_transform_loops): Always enable gloog
3587 and find_transform when ENABLE_CHECKING.
3589 2008-08-25 Sebastian Pop <sebastian.pop@amd.com>
3591 * graphite.c (graphite_transform_loops): Move pretty printer
3592 of SCOPs before doing any transform. Remove call to print_scops
3593 and dot_all_scops_1.
3595 2008-08-25 Sebastian Pop <sebastian.pop@amd.com>
3597 * graphite.c (dump_gbb_conditions): Don't try to print NULL pointers.
3598 (print_graphite_bb): Same.
3600 2008-08-25 Sebastian Pop <sebastian.pop@amd.com>
3602 * graphite.c (dot_all_scops_1): Cleanup.
3603 (move_scops): Fix comment.
3605 2008-08-25 Sebastian Pop <sebastian.pop@amd.com>
3607 * graphite.c (build_scop_bbs): Revert commit 139355:
3609 2008-08-20 Sebastian Pop <sebastian.pop@amd.com>
3610 Dwarakanath Rajagopal <dwarak.rajagopal@amd.com>
3612 * graphite.c (build_scop_bbs): Factor up code.
3614 2008-08-25 Tobias Grosser <grosser@fim.uni-passau.de>
3616 * graphite.c (gloog): Update dominator info.
3618 2008-08-25 Tobias Grosser <grosser@fim.uni-passau.de>
3620 * graphite.c (remove_cond_exprs): Do not fail on empty bbs.
3622 2008-08-24 Sebastian Pop <sebastian.pop@amd.com>
3624 * graphite.c (new_graphite_bb): Remove GBB_INDEX_TO_NUM_MAP
3626 (free_graphite_bb): Remove GBB_INDEX_TO_NUM_MAP free.
3627 (translate_clast): Correct formatting.
3628 * graphite.h (struct num_map): Removed.
3629 (struct graphite_bb): Remove num_map field.
3630 (GBB_INDEX_TO_NUM_MAP): Removed.
3632 2008-08-24 Sebastian Pop <sebastian.pop@amd.com>
3634 * graphite.c (build_access_matrix_with_af): Fix comments.
3635 (build_scop_data_accesses): Same.
3637 2008-08-24 Sebastian Pop <sebastian.pop@amd.com>
3639 * graphite.c (build_scop_data_accesses): Don't construct
3640 access matrices. Add a FIXME and an assert condition that
3641 should pass when the access matrices will be needed.
3643 2008-08-24 Sebastian Pop <sebastian.pop@amd.com>
3645 * tree-data-ref.c (stmt_simple_memref_p): Don't call
3647 * graphite.c (build_graphite_bb): Renamed new_graphite_bb.
3648 Moved close by free_graphite_bb.
3649 (free_graphite_bb): Call free_data_refs. Reset bb->aux.
3650 (new_scop): Move close by free_scop.
3651 (graphite_transform_loops): Avoid linear scan to reset bb->aux.
3653 2008-08-22 Jan Sjodin <jan.sjodin@amd.com>
3655 * cfgloopmanip.c (create_empty_if_region_on_edge): New.
3656 * graphite.c (clast_to_gcc_expression): Call gmp_cst_to_tree
3657 instead of recursive call.
3658 (graphite_translate_clast_equation): New.
3659 (graphite_create_guard_cond_expr): New.
3660 (graphite_create_new_guard): New.
3661 (get_stack_index_from_iv): Removed.
3662 (graphite_rename_ivs_stmt): Use gbb_loop_index.
3663 (get_true_edge_from_guard_bb): New.
3664 (translate_clast): Handle stmt_guard in clast.
3665 (get_construction_edge): Allow construction edge detection for
3666 a scope entry with multiple predecessors if one predecessor is
3667 the immediate dominator of scope entry.
3668 (can_generate_code_stmt): Enable code generation for clast_guard.
3669 (gloog): Use correct context loop. Removed check for post dominators.
3670 * cfgloop.h (create_empty_if_region_on_edge): Declared.
3672 2008-08-21 Sebastian Pop <sebastian.pop@amd.com>
3674 * graphite.c (remove_dead_loops): Document better which
3677 2008-08-21 Sebastian Pop <sebastian.pop@amd.com>
3679 * Makefile.in: Rename POLYLIBLIBS and POLYLIBINC to PPLLIBS
3681 (graphite.o): Also depends on pointer-set.h.
3683 2008-08-21 Sebastian Pop <sebastian.pop@amd.com>
3685 * graphite.c (scop_record_loop): Fix compile warning.
3687 2008-08-21 Harsha Jagasia <harsha.jagasia@amd.com>
3688 Sebastian Pop <sebastian.pop@amd.com>
3690 * graphite.c (scop_record_loop): DECL_NAME can be NULL.
3692 2008-08-21 Sebastian Pop <sebastian.pop@amd.com>
3694 * graphite.c (build_graphite_bb): Initialize bb->aux to
3695 point to the graphite_bb_p.
3696 (graphite_bb_from_bb): Renamed gbb_from_bb; returns the
3698 (add_bb_domains): Does not use the scop parameter.
3699 (graphite_transform_loops): Clean bb->aux at the end.
3701 2008-08-20 Dwarakanath Rajagopal <dwarak.rajagopal@amd.com>
3702 Sebastian Pop <sebastian.pop@amd.com>
3704 * testsuite/lib/target-supports.exp
3705 (check_effective_target_fgraphite): New.
3707 * testsuite/gcc.dg/graphite/graphite.exp: Early exit when
3708 check_effective_target_fgraphite returns false.
3709 Set dg-do-what-default to compile.
3710 (scan-graphite-dump-times): Removed.
3711 * testsuite/gfortran.dg/graphite/graphite.exp: Same.
3713 * testsuite/gcc.dg/graphite/scop-0.c: Do not use "dg-do compile".
3714 Use scan-tree-dump-times instead of scan-graphite-dump-times.
3715 * testsuite/gcc.dg/graphite/scop-1.c: Same.
3716 * testsuite/gcc.dg/graphite/scop-2.c: Same.
3717 * testsuite/gcc.dg/graphite/scop-3.c: Same.
3718 * testsuite/gcc.dg/graphite/scop-4.c: Same.
3719 * testsuite/gcc.dg/graphite/scop-5.c: Same.
3720 * testsuite/gcc.dg/graphite/scop-6.c: Same.
3721 * testsuite/gcc.dg/graphite/scop-7.c: Same.
3722 * testsuite/gcc.dg/graphite/scop-8.c: Same.
3723 * testsuite/gcc.dg/graphite/scop-9.c: Same.
3724 * testsuite/gcc.dg/graphite/scop-10.c: Same.
3725 * testsuite/gcc.dg/graphite/scop-11.c: Same.
3726 * testsuite/gcc.dg/graphite/scop-12.c: Same.
3727 * testsuite/gcc.dg/graphite/scop-13.c: Same.
3728 * testsuite/gcc.dg/graphite/scop-matmult.c: Same.
3729 * testsuite/gcc.dg/graphite/scop-14.c: Same.
3730 * testsuite/gcc.dg/graphite/scop-15.c: Same.
3731 * testsuite/gcc.dg/graphite/block-0.c: Same.
3732 * testsuite/gcc.dg/graphite/scop-16.c: Same.
3733 * testsuite/gcc.dg/graphite/block-1.c: Same.
3734 * testsuite/gcc.dg/graphite/scop-17.c: Same.
3735 * testsuite/gcc.dg/graphite/scop-18.c: Same.
3736 * testsuite/gfortran.dg/graphite/block-1.f90: Same.
3737 * testsuite/gfortran.dg/graphite/scop-1.f: Same.
3738 * testsuite/gfortran.dg/graphite/block-2.f: Same.
3740 2008-08-20 Sebastian Pop <sebastian.pop@amd.com>
3742 * graphite.c: Fix some XXX comments.
3743 (build_scop_dynamic_schedules): Removed.
3745 2008-08-20 Sebastian Pop <sebastian.pop@amd.com>
3747 * graphite.h (scop_max_loop_depth): Moved...
3748 * graphite.c (scop_max_loop_depth): ...here.
3749 (remove_all_edges_1): New.
3750 (remove_all_edges): Factored code.
3751 (remove_cond_exprs): Check only the last statement for
3752 a GIMPLE_COND expression.
3754 2008-08-20 Sebastian Pop <sebastian.pop@amd.com>
3756 * graphite.c (scan_tree_for_params): Early return when the
3757 expression is a chrec_dont_know. Handle case NEGATE_EXPR.
3758 (find_scop_parameters): Factor out code.
3759 (graphite_trans_bb_strip_mine): Remove dead code.
3761 2008-08-20 Sebastian Pop <sebastian.pop@amd.com>
3763 * graphite.c (clast_to_gcc_expression, graphite_create_new_loop,
3764 graphite_trans_bb_move_loop): Factor asserts.
3765 (gloog): Perform sanity checks only for ENABLE_CHECKING.
3766 Do not call calculate_dominance_info and estimate_bb_frequencies.
3768 2008-08-20 Jan Sjodin <jan.sjodin@amd.com>
3770 * graphite.c (create_loops_mapping, free_loops_mapping,
3771 create_loops_mapping_num, debug_loop_mapping_1,
3772 debug_loop_mapping, graphite_loops_mapping_max_loop_num,
3773 get_loop_mapping_for_num, graphite_loops_mapping_add_child,
3774 graphite_loops_mapping_add_child_num,
3775 graphite_loops_mapping_insert_child,
3776 graphite_loops_mapping_parent, get_loop_mapped_depth_for_num,
3777 get_loop_mapped_depth, split_loop_mapped_depth_for_num,
3778 loop_mapped_depth_split_loop, swap_loop_mapped_depth_for_num,
3779 create_num_from_index, get_num_from_index,
3780 swap_loop_mapped_depth): Removed.
3781 (new_scop): Do not initialize SCOP_LOOPS_MAPPING.
3782 (free_scop): Do not call free_loops_mapping.
3783 (graphite_get_new_iv_stack_index_from_old_iv): Renamed
3784 get_stack_index_from_iv. Use GBB_LOOPS instead of calling
3785 get_loop_mapped_depth.
3786 (graphite_trans_bb_move_loop): Do not update the loop mapping.
3787 (graphite_trans_bb_strip_mine): Same.
3788 * graphite.h (graphite_loops_mapping, graphite_loop_node): Removed.
3789 (struct scop): Remove field loops_mapping.
3791 2008-08-20 Sebastian Pop <sebastian.pop@amd.com>
3792 Dwarakanath Rajagopal <dwarak.rajagopal@amd.com>
3794 * graphite.c (scop_record_loop): Factor out one level of the
3795 condition by early return.
3796 (build_scop_loop_nests): Format following FSF coding style.
3797 (build_scop_dynamic_schedules): Factor out code.
3798 (scopdet_bb_info): Reindent. Default case should not be reachable.
3800 2008-08-20 Sebastian Pop <sebastian.pop@amd.com>
3801 Dwarakanath Rajagopal <dwarak.rajagopal@amd.com>
3803 * graphite.c (loop_affine_expr): Check for DECL_P or struct
3804 assignments that are not handled as simple operands for now.
3806 2008-08-20 Sebastian Pop <sebastian.pop@amd.com>
3807 Dwarakanath Rajagopal <dwarak.rajagopal@amd.com>
3809 * graphite.c (build_scop_bbs): Factor up code.
3811 2008-08-20 Sebastian Pop <sebastian.pop@amd.com>
3812 Dwarakanath Rajagopal <dwarak.rajagopal@amd.com>
3814 * graphite.c (stmt_simple_for_scop_p): Factor code out
3816 (enum gbb_type): New. Group all the GBB_* types under it.
3817 (is_loop_exit): Moved...
3818 (end_scop): Enable BB spliting.
3819 * cfgloop.c (is_loop_exit): ...here. Reimplemented.
3820 * cfgloop.h (is_loop_exit): Declared.
3822 2008-08-20 Sebastian Pop <sebastian.pop@amd.com>
3824 * doc/invoke.texi: Remove strides from examples containing
3825 DO loops when the strides are equal to 1.
3827 2008-08-20 Harsha Jagasia <harsha.jagasia@amd.com>
3828 Dwarakanath Rajagopal <dwarak.rajagopal@amd.com>
3830 * graphite.c (graphite_trans_scop_block): Or the result with
3831 the result from graphite_trans_loop_block.
3832 * testsuite/gcc.dg/graphite/block-1.c: New.
3833 * testsuite/gfortran.dg/graphite/block-1.f90: New.
3834 * testsuite/gfortran.dg/graphite/block-2.f: New.
3836 2008-08-20 Sebastian Pop <sebastian.pop@amd.com>
3838 * graphite.c (graphite_transform_loops): Call cloog_initialize
3841 2008-08-20 Sebastian Pop <sebastian.pop@amd.com>
3843 * tree-data-ref.c) (stmt_simple_memref_p): New.
3844 * tree-data-ref.h (stmt_simple_memref_p): Declared.
3845 * graphite.c (stmt_simple_memref_for_scop_p): Removed.
3846 (is_simple_operand): Call stmt_simple_memref_p.
3848 * testsuite/gcc.dg/graphite/scop-matmult.c: Updated for not
3849 using pointer arithmetic, as this is optimized by PRE and
3850 makes the code too difficult to analyze.
3852 * testsuite/gcc.dg/graphite/scop-18.c: Same.
3854 2008-08-20 Sebastian Pop <sebastian.pop@amd.com>
3856 * gdbinit.in (pgg): New.
3858 2008-08-15 Tobias Grosser <grosser@fim.uni-passau.de>
3860 * graphite.c (graphite_trans_loop_block): Fix warning.
3862 2008-08-15 Tobias Grosser <grosser@fim.uni-passau.de>
3864 * graphite.c (graphite_trans_loop_block): Fix my merge error.
3866 2008-08-15 Tobias Grosser <grosser@fim.uni-passau.de>
3868 * graphite.c (graphite_trans_bb_block): Remove check for
3869 flag_loop_strip_mine, flag_loop_block, flag_loop_interchange.
3870 Check if loop blocking is profitable for every loop, before applying
3872 (graphite_apply_transformations): Call graphite_trans_bb_block only,
3873 if flag_loop_block is set.
3875 2008-08-14 Sebastian Pop <sebastian.pop@amd.com>
3877 * graphite.c: Add some more documentation for the loop
3880 2008-08-14 Sebastian Pop <sebastian.pop@amd.com>
3882 * Makefile.in (tree-data-ref.o): Remove dependence on graphite.h.
3883 * graphite.c: Format on less than 80 columns.
3886 2008-08-14 Sebastian Pop <sebastian.pop@amd.com>
3888 * cfgloopmanip.c (loopify): Use update_dominators_in_loop.
3890 2008-08-14 Sebastian Pop <sebastian.pop@amd.com>
3892 * doc/invoke.texi (floop-block, floop-strip-mine,
3893 floop-interchange): Update documentation with examples.
3895 2008-08-13 Sebastian Pop <sebastian.pop@amd.com>
3897 * cfgloopmanip.c (create_empty_loop_on_edge): Don't call
3899 * graphite.c (graphite_create_new_loop): Call add_referenced_var.
3901 2008-08-13 Sebastian Pop <sebastian.pop@amd.com>
3903 * cfgloopmanip.c (create_empty_loop_on_edge): Improve documentation.
3904 Factor gcc_asserts into a single one. Use force_gimple_operand_gsi.
3905 * tree-scalar-evolution.c: Revert useless changes.
3906 * tree-phinodes.c: Same.
3909 * tree-vectorizer.h: Same.
3910 * tree-flow.h: Same.
3912 * common.opt (fgraphite): Update documentation.
3914 2008-08-12 Harsha Jagasia <harsha.jagasia@amd.com>
3916 * doc/invoke.texi (-floop-block, -floop-strip-mine,
3917 -floop-interchange): Add more text for explaining what each of these
3919 * tree-into-ssa.c (gimple_vec): Moved to...
3920 * graphite.c: Include gimple.h.
3921 (gimple_vec): Moved to...
3922 (del_loop_to_cloog_loop): Removed.
3923 (loop_affine_expr): Do not call create_data_ref when the
3924 operand is a constant.
3925 (new_scop): Use free instead of del_loop_to_cloog_loop.
3926 * Makefile.in (graphite.o): Depend on GIMPLE_H.
3927 * gimple.h (gimple_vec): ... here.
3929 2008-08-11 Tobias Grosser <grosser@fim.uni-passau.de>
3931 * graphite.c (scopdet_bb_info): Only allow loops with known number of
3933 (build_loop_iteration_domains): Fail, if latch executions unknown.
3935 2008-08-11 Tobias Grosser <grosser@fim.uni-passau.de>
3937 * graphite.c (add_conditions_to_domain): New.
3938 (build_scop_conditions_1): Call add_conditions_to_domain.
3939 (set_cloog_options): Allow to disable optimizations.
3941 2008-08-11 Tobias Grosser <grosser@fim.uni-passau.de>
3943 * graphite.c (find_params_in_bb): Look for parameters in conditions.
3944 Do not use walk_dominator_tree.
3945 (find_scop_parameters): Do not use walk_dominator_tree.
3947 2008-08-11 Tobias Grosser <grosser@fim.uni-passau.de>
3949 * graphite.c (scan_tree_for_params) Add / Subtract inequality.
3950 (idx_record_params): Adapt.
3951 * graphite.h (scop_gimple_loop_depth): New.
3953 2008-08-11 Tobias Grosser <grosser@fim.uni-passau.de>
3955 * graphite.c (build_scop_dynamic_schedules): Remove value_init.
3956 (scan_tree_for_params): Remove value_init.
3957 (build_scop_context): Remove value_init.
3958 (build_loop_iteration_domains): Remove value_init.
3959 (schedule_to_scattering): Remove value_init.
3960 (graphite_trans_bb_strip_mine): Remove value_init.
3962 2008-08-11 Tobias Grosser <grosser@fim.uni-passau.de>
3964 * gcc/graphite.c (limit_scops): New.
3965 (graphite_transform_loops): Add limit SCoPs.
3966 * gcc/testsuite/gcc.dg/graphite/scop-0.c: Update number of SCoPs.
3967 * gcc/testsuite/gcc.dg/graphite/scop-1.c: Update number of SCoPs.
3968 * gcc/testsuite/gcc.dg/graphite/scop-10.c: Update number of SCoPs.
3969 * gcc/testsuite/gcc.dg/graphite/scop-11.c: Update number of SCoPs.
3970 * gcc/testsuite/gcc.dg/graphite/scop-12.c: Update number of SCoPs.
3971 * gcc/testsuite/gcc.dg/graphite/scop-13.c: Update number of SCoPs.
3972 * gcc/testsuite/gcc.dg/graphite/scop-14.c: Update number of SCoPs.
3973 * gcc/testsuite/gcc.dg/graphite/scop-15.c: Update number of SCoPs.
3974 * gcc/testsuite/gcc.dg/graphite/scop-16.c: Update number of SCoPs.
3975 Change loop numbers.
3976 * gcc/testsuite/gcc.dg/graphite/scop-17.c: Update number of SCoPs.
3977 Change loop numbers.
3978 * gcc/testsuite/gcc.dg/graphite/scop-18.c: Update number of SCoPs.
3979 * gcc/testsuite/gcc.dg/graphite/scop-2.c: Update number of SCoPs.
3980 * gcc/testsuite/gcc.dg/graphite/scop-3.c: Update number of SCoPs.
3981 * gcc/testsuite/gcc.dg/graphite/scop-4.c: Update number of SCoPs.
3982 * gcc/testsuite/gcc.dg/graphite/scop-5.c: Update number of SCoPs.
3983 * gcc/testsuite/gcc.dg/graphite/scop-6.c: Update number of SCoPs.
3984 * gcc/testsuite/gcc.dg/graphite/scop-7.c: Update number of SCoPs.
3985 * gcc/testsuite/gcc.dg/graphite/scop-8.c: Update number of SCoPs.
3986 * gcc/testsuite/gcc.dg/graphite/scop-9.c: Update number of SCoPs.
3987 * gcc/testsuite/gcc.dg/graphite/scop-matmult.c: Update number of SCoPs.
3989 2008-08-11 Tobias Grosser <grosser@fim.uni-passau.de>
3991 * graphite.c (graphite_transform_loops): Call always find_transform.
3993 2008-08-08 Tobias Grosser <grosser@fim.uni-passau.de>
3995 * graphite.c (free_loops_mapping): New.
3996 (stmt_simple_for_scop_p): Fix typo.
3997 (stmt_simple_for_scop_p): Fix tuples functions, that
3999 (free_graphite_bb): Fix some memleaks.
4000 (free_scop): Fix some memleaks.
4001 (scopdet_bb_info): Do not forget some tmp SCoPs.
4002 (find_params_in_bb): Fix some memleaks.
4003 (clast_to_gcc_expression): Fix warning.
4005 2008-08-07 Tobias Grosser <grosser@fim.uni-passau.de>
4007 * testsuite/gcc.dg/graphite/scop-16.c: Fix for 32bit.
4008 * testsuite/gcc.dg/graphite/scop-17.c: Fix for 32bit.
4010 2008-08-04 Sebastian Pop <sebastian.pop@amd.com>
4012 * tree-ssa-loop.c (tree-ssa-loop.o): Do not include toplev.h.
4013 Move code ifdef-ed HAVE_cloog...
4014 * graphite.c: Include toplev.h.
4016 * Makefile.in (OBJS-common): Always build graphite.o.
4017 (BACKEND): Remove @GRAPHITE@.
4018 (tree-ssa-loop.o): Do not depend on TOPLEV_H.
4019 (graphite.o): Depend on TOPLEV_H.
4021 2008-08-04 Sebastian Pop <sebastian.pop@amd.com>
4023 * Makefile.in (tree-ssa-loop.o): Depend on TOPLEV_H.
4024 Remove typo left from polylib to ppl conversion.
4025 * graphite.c (graphite_transforms): Use sorry instead of fatal.
4027 2008-08-03 Sebastian Pop <sebastian.pop@amd.com>
4029 * toplev.c (process_options): Move the graphite loop optimization
4031 * tree-ssa-loop.c (graphite_transforms): ... here.
4032 When not configured with CLooG, print to dump_file that
4033 Graphite transforms were not performed.
4034 * testsuite/gcc.dg/graphite/graphite.exp (scan-graphite-dump-times):
4036 * testsuite/gcc.dg/graphite/*.c: Updated all testcases to use
4037 scan-graphite-dump-times.
4039 2008-08-03 Sebastian Pop <sebastian.pop@amd.com>
4041 * graphite.c (dot_scop, dot_all_scops): Do not call system.
4042 Do not open /tmp/scop.dot and /tmp/allscops.dot.
4044 2008-08-02 Sebastian Pop <sebastian.pop@amd.com>
4045 Jan Sjodin <jan.sjodin@amd.com>
4047 * configure: Regenerated.
4048 * omp-low.c (expand_omp_sections): Remove now unused code.
4049 * config.in (HAVE_polylib): Removed.
4050 * configure.ac (HAVE_polylib, POLYLIBLIBS, POLYLIBINC): Removed.
4051 (PPLLIBS, PPLINC): Added.
4052 * graphite.c: Replace unsigned with int wherever possible.
4053 Don't access Cloog's data structures, but use accessor functions.
4054 Clast's stmt->type is now implemented as a vtable: change the
4055 switches of stmt->type into ifs.
4056 (polylib/polylibgmp.h): Don't include.
4057 (initialize_dependence_polyhedron,
4058 initialize_data_dependence_polyhedron, is_empty_polyhedron,
4059 statement_precedes_p, test_dependence, build_rdg_all_levels,
4060 dump_dependence_graph): Removed until this code is cleaned up
4062 * Makefile.in (POLYLIBLIBS): Renamed PPLLIBS.
4063 (POLYLIBINC): Renamed PPLINC.
4065 2008-08-01 Harsha Jagasia <harsha.jagasia@amd.com>
4066 Dwarakanath Rajagopal <dwarak.rajagopal@amd.com>
4067 Jan Sjodin <jan.sjodin@amd.com>
4069 Finish the merge and tuplification of graphite.
4071 2008-07-24 Sebastian Pop <sebastian.pop@amd.com>
4072 Jan Sjodin <jan.sjodin@amd.com>
4074 Partial merge from mainline (138072:138275).
4075 * graphite.c still has to be tuplified.
4077 2008-07-29 Jan Sjodin <jan.sjodin@amd.com>
4079 * graphite.c (graphite_loops_mapping_max_loop_num): New.
4080 (create_num_from_index): New.
4081 (get_num_from_index): Also pass in the graphite BB.
4082 (free_graphite_bb): Free GBB_INDEX_TO_NUM_MAP.
4083 (build_graphite_bb): Initialize GBB_INDEX_TO_NUM_MAP.
4084 (graphite_trans_bb_strip_mine): Call create_num_from_index.
4085 (is_interchange_valid): Return false when failing.
4086 * graphite.h (struct num_map): New.
4087 (struct graphite_bb): New field num_map.
4088 (GBB_LOOPS_MAPPING): Renamed GBB_INDEX_TO_NUM_MAP.
4090 2008-07-29 Tobias Grosser <grosser@fim.uni-passau.de>
4092 * graphite.c (dump_gbb_conditions): Print also conditions like
4093 "if (a)". Remove dublicated code and use print_generic_expr ().
4094 (stmt_simple_for_scop_p): Only allow conditions we can handle
4097 2008-07-25 Jan Sjodin <jan.sjodin@amd.com>
4099 * graphite.h (struct scop): Removed new_ivs field.
4100 (SCOP_NEWIVS): Deleted.
4101 * graphite.c (new_scop, free_scop, clast_name_to_gcc,
4102 clast_to_gcc_expression, graphite_create_new_loop):
4103 Removed use of new_ivs.
4105 2008-07-25 Jan Sjodin <jan.sjodin@amd.com>
4107 * graphite.c (debug_oldivs, debug_loop_vec, create_loops_mapping,
4108 create_loops_mapping_num, debug_loop_mapping_1): New.
4109 (debug_loop_mapping): Call debug_loop_mapping_1.
4110 (get_loop_mapping_for_num,
4111 graphite_loops_mapping_add_child,
4112 graphite_loops_mapping_add_child_num,
4113 graphite_loops_mapping_insert_child,
4114 graphite_loops_mapping_parent,
4115 split_loop_mapped_depth_for_num,
4116 loop_mapped_depth_split_loop): New.
4117 (increment_loop_mapped_depths): Removed.
4118 (swap_loop_mapped_depth_for_num): Reimplemented.
4119 (new_scop): Call create_loops_mapping.
4120 (scop_record_loop): Call graphite_loops_mapping_insert_child.
4121 (translate_clast): Pass the old loop father in parameter, and pass
4122 it to get_old_iv_from_ssa_name.
4123 (remove_edges_around_useless_blocks, can_generate_code_stmt,
4124 can_generate_code, can_generate_for_scop): New.
4125 (graphite_trans_bb_block): Returns false when it fails to transform.
4126 * graphite.h (graphite_loop_node, graphite_loops_mapping): New.
4128 2008-07-25 Sebastian Pop <sebastian.pop@amd.com>
4130 Reverted all the changes related to the streamization and
4132 These changes are now tracked in the streamization branch.
4134 2008-07-25 Sebastian Pop <sebastian.pop@amd.com>
4135 Jan Sjodin <jan.sjodin@amd.com>
4137 * graphite.c (gbb_compare): Correctly constify.
4138 (gbb_can_be_ignored): Indent.
4139 (graphite_trans_scop_swap_1and2): Add legality check.
4142 2008-07-25 Sebastian Pop <sebastian.pop@amd.com>
4144 Remove fallouts from "Reverted the Condate changes".
4145 * tree.h: Remove unused decl.
4146 * testsuite/gcc.dg/tree-checker: Same.
4147 * timevar.def: Remove counter.
4149 2008-07-24 Sebastian Pop <sebastian.pop@amd.com>
4151 * Merge from mainline (135673:138072).
4153 Reverted the MIRO changes (from 2008-04-05) that are now
4154 tracked in the miro branch.
4155 * tree-bounds.c: Removed.
4156 * tree-bounds.h: Removed.
4158 Reverted the Condate changes (from 2006-07-04, 2007-03-20) that
4159 are now tracked in the condate branch.
4160 * tree-check.c: Removed.
4161 * tree-match.c: Removed.
4162 * condate.y: Removed.
4164 2008-07-24 Dwarakanath Rajagopal <dwarak.rajagopal@amd.com>
4166 * common.opt: New user flag -floop-block, -floop-strip-mine
4167 and -floop-interchange.
4168 * toplev.c (process_options): Enable -fgraphite pass if any one of the
4169 graphite loop optimization flags is turned on.
4170 * graphite.c (graphite_apply_transformations): Add flag_loop_block,
4171 flag_loop_strip_mine and flag_loop_interchange checks before
4173 * doc/invoke.texi: Remove -fgraphite and add -floop-block,
4174 -floop-strip-mine and -floop-interchange.
4175 * testsuite/gcc.dg/graphite/block-0.c: Add -floop-block and remove
4177 * testsuite/gcc.dg/graphite/scop-16.c: Ditto.
4178 * testsuite/gcc.dg/graphite/scop-17.c: Ditto.
4179 * testsuite/gcc.dg/graphite/scop-18.c: Ditto.
4181 2008-07-23 Jan Sjodin <jan.sjodin@amd.com>
4182 Sebastian Pop <sebastian.pop@amd.com>
4184 * cfgloopmanip.c (update_dominators_in_loop): Make it static.
4185 (create_empty_loop_on_edge): More fixes.
4186 * tree-phinodes.c (resize_phi_node): Extern.
4187 (unlink_phi_node, move_phi_node): New split from remove_phi_node.
4188 * cfghooks.c (update_dominator_information): New split from
4190 * tree-vectorizer.c (rename_variables_in_bb): Extern.
4191 * tree-dfa.c (collect_dfa_stats): Start walking the CFG on the
4192 successor of the function entry block.
4194 * graphite.c: Include pointer-set.h.
4195 (debug_loop_mapping, increment_loop_mapped_depths,
4196 get_loop_mapped_depth_for_num, get_loop_mapped_depth,
4197 set_loop_mapped_depth_for_num, set_loop_mapped_depth,
4198 swap_loop_mapped_depth_for_num, get_num_from_index,
4199 swap_loop_mapped_depth, loop_iv_stack_debug,
4200 loop_iv_stack_push, loop_iv_stack_pop, loop_iv_stack_get_iv,
4201 loop_iv_stack_get_iv_from_name, loop_iv_stack_debug,
4202 get_old_iv_from_ssa_name): New.
4203 (new_scop): Initialize SCOP_LOOPS_MAPPING.
4204 (free_scop): Free SCOP_LOOPS_MAPPING.
4205 (scop_record_loop): Record old ivs.
4206 (create_var_name): Removed.
4207 (initialize_cloog_names): Allocate double space in case strip mine
4208 applies to all loops once.
4209 (clast_name_to_gcc): Look up in the map ivstack passed in parameter.
4210 (clast_to_gcc_expression): Same. Implement more clast to gimple
4212 (graphite_create_new_loop): Pass in ivstack.
4213 (remove_all_edges): Pass in the construction_edge.
4214 (graphite_remove_iv): Removed.
4215 (graphite_rename_ivs, graphite_rename_ivs_stmt,
4216 remove_cond_exprs): Rewritten.
4217 (move_phi_nodes): New.
4218 (disconnect_virtual_phi_nodes, disconnect_cond_expr): Removed.
4219 (translate_clast): Pass in ivstack. Rewrite some cases.
4220 (set_cloog_options, debug_clast_stmt): New.
4221 (find_transform): Use set_cloog_options.
4222 (outermost_loop_layer): Removed.
4223 (get_construction_edge, collect_virtual_phis, find_vdef_for_var_in_bb,
4224 find_vdef_for_var_1, find_vdef_for_var, patch_phis_for_virtual_defs,
4225 mark_old_loops, remove_dead_loops): New.
4227 (graphite_trans_bb_move_loop): Call swap_loop_mapped_depth.
4228 (const_column_index, get_first_matching_sign_row_index,
4229 get_lower_bound_row, get_upper_bound_row, get_lower_bound,
4230 get_upper_bound): New.
4231 (graphite_trans_bb_strip_mine): Also update the iv map.
4233 * graphite.h (graphite_loops_mapping, GBB_LOOPS_MAPPING): New.
4234 (struct name_tree): Add a loop field.
4235 (struct scop): Add a graphite_loops_mapping field.
4236 (SCOP_LOOPS_MAPPING): New.
4237 (debug_clast_stmt): Declare.
4238 * lambda.h (find_induction_var_from_exit_cond): Declare.
4239 (lambda-code.c): (find_induction_var_from_exit_cond): Extern.
4240 * cfgloop.h (update_dominators_in_loop): Removed declaration.
4241 (create_empty_loop_on_edge): Updated.
4242 * tree-flow.h (remove_bb, resize_phi_node, move_phi_node,
4243 rename_variables_in_bb): Declare.
4244 * tree-cfg.c (remove_bb): Extern.
4246 * testsuite/gcc.dg/graphite/block-0.c: New.
4248 2008-07-21 Dwarakanath Rajagopal <dwarak.rajagopal@amd.com>
4249 Sebastian Pop <sebastian.pop@amd.com>
4251 * graphite.c (strip_mine_profitable_p): New.
4252 (graphite_trans_bb_block): Disable strip mining if not profitable.
4254 * testsuite/gcc.dg/graphite/scop-18.c: New.
4255 * testsuite/gcc.dg/graphite/scop-17.c: Fixed.
4256 * testsuite/gcc.dg/graphite/scop-16.c: Fixed.
4258 2008-07-17 Harsha Jagasia <harsha.jagasia@amd.com>
4259 Jan Sjodin <jan.sjodin@amd.com>
4260 Sebastian Pop <sebastian.pop@amd.com>
4262 * graphite.c (is_interchange_valid): New.
4263 (graphite_trans_bb_block): Check loop nest of basic block for legality
4266 * graphite.h (gbb_inner_most_loop_index, outer_most_loop_1,
4267 outer_most_loop, gbb_outer_most_loop_index): New.
4269 * tree-loop-linear.c (perfect_loop_nest_depth): Remove static.
4270 * tree-flow.h (perfect_loop_nest_depth): Declare as extern.
4271 * testsuite/gcc.dg/graphite/scop-16.c: New.
4272 * testsuite/gcc.dg/graphite/scop-17.c: New.
4274 2008-07-11 Tobias Grosser <grosser@fim.uni-passau.de>
4276 * graphite.c (scop_remove_ignoreable_gbbs): Also update bitmap.
4277 (graphite_trans_scop_block): Ignore SCoPs without bbs.
4279 2008-07-11 Tobias Grosser <grosser@fim.uni-passau.de>
4281 * graphite.c (new_scop): Initialize SCOP_EXIT.
4282 (scopdet_info): Add.
4283 (scopdet_bb_info): Rename from is_bb_addable. Cleanup, bugfixes.
4284 (build_scops_1): Cleanup, bugfixes.
4285 (build_scops): Cleanup.
4287 * testsuite/gcc.dg/graphite/scop-matmult.c: Remove duplicated code.
4288 * testsuite/gcc.dg/graphite/scop-15.c: Add SCoP numbers.
4290 2008-07-10 Harsha Jagasia <harsha.jagasia@amd.com>
4292 * testsuite/gfortran.dg/graphite/scop-1.f: Update to reduced test case.
4294 * testsuite/gfortran.dg/graphite/graphite.exp: Use
4295 DEFAULT_GRAPHITE_FLAGS.
4297 * testsuite/gcc.dg/graphite/scop-15.c: Update to reduced test case.
4299 2008-07-10 Harsha Jagasia <harsha.jagasia@amd.com>
4301 * graphite.c (scan_tree_for_params): Do not assert any more if
4302 MULT_EXPR parameter is negative.
4304 * testsuite/gfortran.dg/graphite/scop-1.f: New.
4306 * testsuite/gfortran.dg/graphite/graphite.exp: New.
4308 * testsuite/gcc.dg/graphite/scop-15.c: New.
4310 2008-07-10 Harsha Jagasia <harsha.jagasia@amd.com>
4312 * graphite.c (is_bb_addable): Fix segfault in spec gzip and reformat.
4314 2008-07-10 Tobias Grosser <grosser@fim.uni-passau.de>
4316 * graphite.c (graphite_trans_bb_swap_loops): Rename from
4317 graphite_swap_loops.
4318 (graphite_trans_bb_move_loop): New.
4319 (graphite_trans_bb_strip_mine): Rename from graphite_strip_mine_loop.
4320 (graphite_trans_bb_block): New.
4321 (graphite_trans_loop_block): New.
4322 (graphite_trans_scop_swap_1and2): Rename from
4323 graphite_trans_swap_1and2.
4324 (graphite_trans_scop_strip): Rename from graphite_trans_strip.
4325 (graphite_trans_scop_block): New.
4326 (graphite_apply_transformations): Rename from
4327 graphite_transformations.
4329 * testsuite/gcc.dg/graphite/scop-matmult.c: New.
4331 2008-07-10 Tobias Grosser <grosser@fim.uni-passau.de>
4333 * graphite.c (gbb_compare): New.
4334 (graphite_sort_gbbs): New.
4335 (gbb_can_be_ignored): New.
4336 (scop_remove_ignoreable_gbbs): New.
4337 (graphite_transformations): Cleanup and add
4338 scop_remove_ignoreable_gbbs.
4339 * lambda.h (lambda_vector_compare): New.
4341 2008-07-09 Tobias Grosser <grosser@fim.uni-passau.de>
4343 * graphite.c (print_graphite_bb): Correct printing of static schedule.
4344 (graphite_swap_loops): int -> unsigned
4345 (graphite_strip_mine_loop): int -> unsigned, Fix SCHEDULE
4346 (graphite_transformations): New.
4347 (graphite_transform_loops): Move to graphite_transformations.
4348 * graphite.h (gbb_nb_loops): Return unsigned.
4350 2008-07-04 Tobias Grosser <grosser@fim.uni-passau.de>
4352 * graphite.c (scan_tree_for_params): Fix insertion of parameters into
4353 the domain matrix. This makes scop-0.c work again.
4355 2008-06-20 Richard Guenther <rguenther@suse.de>
4357 * graphite.h: Adjust copyright to GPLv3.
4358 * graphite.c: Likewise.
4359 (stmt_simple_memref_for_scop_p): Split out from ...
4360 (stmt_simple_for_scop_p): ... here. Fix handling of calls
4362 (get_bb_type): Optimize.
4364 (is_bb_addable): Fix memleak, replace is_pred call with
4366 (build_scops): Use current_loops.
4367 (param_index): Fix memleak.
4369 2008-06-20 Konrad Trifunovic <konrad.trifunovic@inria.fr>
4371 * graphite.c: Fix formatting.
4373 2008-06-19 Konrad Trifunovic <konrad.trifunovic@inria.fr>
4375 * graphite.c (new_scop): Memory allocation for SCOP_{NEWIVS, OLDIVS}.
4376 (free_scop): Memory deallocation for SCOP_NEWIVS, SCOP_OLDIVS.
4377 (create_var_name, save_var_name): Newly defined functions.
4378 (initialize_cloog_names): Part of the code factored out to
4380 (clast_to_gcc_expression): Now handles the case of clast_red_sum
4381 in clast_reduction statement.
4382 (graphite_create_new_loop): Now takes a new parameter
4384 (translate_clast): Now also takes the context_loop and bb_exit
4385 parameters. Rewritten the code so that it creates a gimple code
4386 inside the given context.
4387 (outermost_loop_layer, graphite_remove_iv, graphite_rename_ivs,
4388 remove_cond_expr, disconnect_cond_expr,
4389 disconnect_virtual_phi_nodes): Newly defined functions.
4390 * graphite.h (struct scop): added old_ivs vector.
4391 SCOP_OLDIVS: New macro.
4393 2008-06-19 Sebastian Pop <sebastian.pop@amd.com>
4395 * cfgloopmanip.c: Add missing function comments, fix formatting.
4397 2008-06-18 Konrad Trifunovic <konrad.trifunovic@inria.fr>
4399 * cfgloopmanip.c (update_dominators_in_loop): Defined.
4400 (create_empty_loop_on_edge): Defined.
4401 * tree-parloops.c (canonicalize_loop_ivs): Returns tree
4403 * cfgloop.h (create_empty_loop_on_edge): Declared as extern.
4404 (update_dominators_in_loop): Declared as extern
4405 * tree-flow.h (canonicalize_loop_ivs): Declared as extern.
4407 2008-06-16 Tobias Grosser <grosser@fim.uni-passau.de>
4409 * graphite.c (print_graphite_bb): Allow changing number of loops
4411 (initialize_cloog_names): Allow changing number of loops.
4412 (build_cloog_prog): Simplify.
4413 (find_transform): Enable cloog option --strides.
4414 (graphite_swap_loops): New.
4415 (graphite_strip_mine_loop): New.
4416 (graphite_trans_swap_1and2): New.
4417 (graphite_trans_strip): New.
4418 (graphite_transform_loops): Add graphite_trans_strip.
4419 * graphite.h (scop_max_loop_depth): New.
4421 2008-06-15 Tobias Grosser <grosser@fim.uni-passau.de>
4423 * graphite.c (build_scop_iteration_domain): Remove forgotten
4424 line. (Fixes compile)
4426 2008-06-15 Tobias Grosser <grosser@fim.uni-passau.de>
4428 * graphite.c (print_graphite_bb): Add output of GBB_LOOPS.
4429 (build_graphite_bb): Add GBB_LOOPS and GBB_DOMAIN and reorder.
4430 (build_bb_loops): New.
4431 (graphite_transform_loops): Add build_bb_loops.
4432 (schedule_to_scattering): Use gbb_nb_loops to support changing loop
4434 * graphite.h (graphite_bb): Add loops.
4435 (gbb_nb_loops): New.
4436 (gbb_loop_at_index): New.
4437 (gbb_loop_index): New.
4438 (nb_params_in_scop): Renamed to scop_nb_params. Updated all functions
4439 using nb_params_in_scop.
4441 2008-06-14 Tobias Grosser <grosser@fim.uni-passau.de>
4443 * graphite.c (print_graphite_bb): Adapt to minimized schedule.
4444 (build_scop_canonical_schedules): Build minimized schedule.
4445 (schedule_to_scattering): Adapt to minimized schedule.
4446 * graphite.h (graphite_bb): Add/Update descriptions.
4448 2008-06-14 Adrien Eliche <aeliche@isty.uvsq.fr>
4449 Tobias Grosser <grosser@fim.uni-passau.de>
4451 * graphite.c (print_graphite_bb): Add condition printing.
4453 (dump_gbb_conditions): New.
4454 (build_scop_conditions_1): New.
4455 (build_scop_conditions): New.
4456 * graphite.h (graphite_bb): Add conditions.
4458 2008-06-14 Tobias Grosser <grosser@fim.uni-passau.de>
4460 * graphite.c (print_graphite_bb):
4461 (free_graphite_bb): New.
4462 (free_scop): Free bbs.
4463 (get_bb_type): Free doms.
4464 (build_scop_context): Free context matrix.
4465 (build_loop_iteration_domains): Remove unused code.
4466 (build_cloog_prog): Free scattering function and blocklist.
4467 (find_transform): Free options.
4469 2008-06-13 Tobias Grosser <grosser@fim.uni-passau.de>
4471 * graphite.c (loop_body_to_cloog_stmts): Rename to add_bb_domains.
4472 Remove unnecessery cloog data structures. Make a copy of the domain
4473 (setup_cloog_loop): Rename to build_loop_iteration_domains. Remove
4474 unnecessary cloog data structures. Fix memory leaks. Remove insert
4475 into SCOP_LOOP2CLOOG_LOOP as the inserted CloogLoops will never be
4477 (build_scop_iteration_domain): Remove unnecessary cloog
4478 data structures. Fix memory leaks.
4479 (graphite_transform_loops): Disable build_scop_dynamic_schedules as it
4480 uses SCOP_LOOP2CLOOG_LOOP, that is at the moment not working.
4482 2008-06-12 Tobias Grosser <grosser@fim.uni-passau.de>
4484 * graphite.c (find_scop_params): Remove initialize_cloog_names.
4486 2008-06-12 Tobias Grosser <grosser@fim.uni-passau.de>
4488 * graphite.c (end_scop): Style fix.
4489 (schedule_to_scattering): Style and comment fix.
4491 2008-06-12 Tobias Grosser <grosser@fim.uni-passau.de>
4492 * graphite.c (print_graphite_bb): Fix definiton of
4493 schedule_to_scattering.
4494 (initialize_cloog_names): Change nb_scattdims to max loop
4496 (schedule_to_scattering): Take parameter for number of scattering
4498 (build_cloog_prog): Only build as much scattering dimensions as
4501 2008-06-12 Tobias Grosser <grosser@fim.uni-passau.de>
4503 * graphite.c (end_scop): Disable bb splitting. Fixes SIGSEGV
4504 in polyhedron/aermod.f90.
4506 2008-06-11 Tobias Grosser <grosser@fim.uni-passau.de>
4507 Dwarak Rajagopal <dwarak.rajagopal@amd.com>
4508 Harsha Jagasia <harsha.jagasia@amd.com>
4510 * graphite.c (is_bb_addable): Fix segfault.
4512 2008-06-10 Tobias Grosser <grosser@fim.uni-passau.de>
4514 * graphite.c (is_bb_addable): Fix memory leak, handling of loops
4515 with multiple exits and conditional handling in edge cases.
4516 (is_loop_exit): Fix memory leak. (Forgotten in last commit)
4518 * testsuite/gcc.dg/graphite/scop-14.c: New.
4520 2008-06-06 Tobias Grosser <grosser@fim.uni-passau.de>
4521 Adrien Eliche <aeliche@isty.uvsq.fr>
4523 * graphite.c (is_bb_addable): Add more comments and enhance
4524 readablity of the source code. Fix memory leak.
4525 (is_loop_exit): Fix memory leak.
4527 2008-06-05 Tobias Grosser <grosser@fim.uni-passau.de>
4529 * graphite.c (first_loop_in_scop): Deleted.
4530 (setup_cloog_loop): Only walk the loop chain for inner loops.
4531 (build_scop_iteration_domain): Execute setup_cloog_loop for
4532 all loops in the first layer.
4534 2008-06-05 Tobias Grosser <grosser@fim.uni-passau.de>
4536 * graphite.c (scan_tree_for_params): Change the way params are
4537 added to be indepenent of the number of loops.
4538 (setup_cloog_loop): Revert to short matrix format. Fix parameter
4540 (build_cloog_prog): Revert to short matrix format.
4542 2008-06-05 Sebastian Pop <sebastian.pop@amd.com>
4543 Dwarak Rajagopal <dwarak.rajagopal@amd.com>
4545 * tree-loop-fusion.c (fuse_loops): Fix uninitialized variable
4548 2008-06-05 Sebastian Pop <sebastian.pop@amd.com>
4550 * graphite.c (nb_data_refs_in_scop): New.
4551 (graphite_transform_loops): Print more stats: number of
4552 loops, basic blocks and data references per scop.
4554 2008-06-04 Sebastian Pop <sebastian.pop@amd.com>
4555 Jan Sjodin <jan.sjodin@amd.com>
4557 * graphite.c (loop_affine_expr, idx_record_params,
4558 find_scop_parameters, setup_cloog_loop): Use instantiate_scev
4559 instead of instantiate_parameters.
4561 2008-06-04 Tobias Grosser <grosser@fim.uni-passau.de>
4563 * graphite.c (schedule_to_scattering): Fix scattering dimensions,
4564 add support for parameters, add STATIC_SCHEDULE at the right places,
4567 2008-06-04 Tobias Grosser <grosser@fim.uni-passau.de>
4569 * graphite.c (build_scop_loop_nests): Only add the loops, that
4570 are contained completely in the SCoP.
4571 (build_cloog_prog): Disable scattering, until schedule_to_scattering
4572 and the domains are fixed.
4573 (build_scop_canonical_schedules): Add support for bbs not contained
4576 2008-06-04 Tobias Grosser <grosser@fim.uni-passau.de>
4578 * graphite.h (scop_contains_loop): Update comments to match
4579 the actual behavior.
4580 (scop_contains_loop): New.
4581 * graphite.c (schedule_to_scattering): Use scop_contains_loop.
4583 2008-06-04 Sebastian Pop <sebastian.pop@amd.com>
4585 * graphite.c (get_bb_type): On function body, i.e. loop_0,
4586 don't mark blocks as GBB_LOOP_SING_EXIT_HEADER, mark them
4589 2008-06-04 Sebastian Pop <sebastian.pop@amd.com>
4590 Tobias Grosser <grosser@fim.uni-passau.de>
4592 * graphite.c (graphite_transform_loops): Early return when
4593 there are no loops in the function.
4595 2008-05-31 Sebastian Pop <sebastian.pop@amd.com>
4596 Jan Sjodin <jan.sjodin@amd.com>
4598 * graphite.c (scan_tree_for_params, setup_cloog_loop): Compute the
4599 offset of the last loop.
4600 (setup_cloog_loop): Copy the entire outer constraint matrix.
4602 2008-05-31 Sebastian Pop <sebastian.pop@amd.com>
4603 Jan Sjodin <jan.sjodin@amd.com>
4605 * graphite.c (stmt_in_scop_p, function_parameter_p,
4606 invariant_in_scop_p): Removed.
4607 (scan_tree_for_params): Can be used with no constraint
4608 matrix for gathering parameters.
4609 (idx_record_params): Don't use idx_record_param, instead use
4610 scan_tree_for_params.
4611 (find_scop_parameters): Same.
4612 (setup_cloog_loop, build_scop_iteration_domain, build_cloog_prog):
4613 Fix the size of loop domains.
4614 (schedule_to_scattering): Exit when the outer loop is not in scop.
4615 (find_transform): Enable build_cloog_prog.
4617 2008-05-31 Sebastian Pop <sebastian.pop@amd.com>
4618 Jan Sjodin <jan.sjodin@amd.com>
4620 * graphite.c (schedule_to_scattering): Make scattering domains
4621 uniformly of the same size, as required by CLooG 0.14.0 and before.
4623 2008-05-31 Sebastian Pop <sebastian.pop@amd.com>
4624 Jan Sjodin <jan.sjodin@amd.com>
4626 * graphite.c (schedule_to_scattering): Rewrite, correct the
4627 translation of the scheduling function to scattering.
4628 (build_cloog_prog): Call schedule_to_scattering only once.
4629 * graphite.h (scop_loop_index): Do not fail for loops not
4630 in the scop: return -1.
4632 2008-05-30 Tobias Grosser <grosser@fim.uni-passau.de>
4634 * graphite.c (build_graphite_bb): Initialize GBB_DOMAIN.
4635 (loop_body_to_cloog_stmts): Export GBB_DOMAIN.
4636 (setup_cloog_loop): Export GBB_DOMAIN.
4637 (build_cloog_prog): New. Create new CLOOG_PROG, which should be
4638 able to rebuild the original control flow.
4639 * graphite.h (graphite_bb): Add domain field and access macro.
4642 2008-05-30 Sebastian Pop <sebastian.pop@amd.com>
4644 * graphite.c (debug_gbb): New.
4645 (print_scop, build_graphite_bb): Use SCOP_BBS.
4646 (build_scop_bbs): Reimplemented.
4647 (dfs_bb_in_scop_p): Removed.
4648 (build_scop_loop_nests): Reorder loops inserted in
4649 SCOP_LOOP_NEST: outer loops should come first.
4650 (build_scop_canonical_schedules): Reinitialize at zero
4651 the components of the SCOP_STATIC_SCHEDULE for the loops
4652 that have already been parsed.
4654 * graphite.h (debug_gbb): Declared.
4656 2008-05-30 Sebastian Pop <sebastian.pop@amd.com>
4657 Jan Sjodin <jan.sjodin@amd.com>
4659 * graphite.c (create_empty_loop): Renamed graphite_create_new_loop.
4660 (graphite_loop_to_gcc_loop): Removed.
4661 (remove_all_edges): New.
4662 (graphite_stmt_to_gcc_stmt): Renamed translate_clast.
4663 (gloog): Remove useless code.
4665 2008-05-29 Tobias Grosser <grosser@fim.uni-passau.de>
4667 * graphite.c (get_bb_type): Reworked. We distinguish between
4668 loops with one or multiple exits.
4669 (is_loop_exit): New.
4671 (is_bb_addable): Rework condition handling, now support for case
4672 case statements and loops with multiple exits.
4674 * testsuite/gcc.dg/graphite/scop-11.c: New.
4675 * testsuite/gcc.dg/graphite/scop-12.c: New.
4676 * testsuite/gcc.dg/graphite/scop-13.c: New.
4678 2008-05-29 Tobias Grosser <grosser@fim.uni-passau.de>
4680 * graphite.c (dot_all_scops_1): Fix some colors. Reuse colors, if
4681 we have too many colors.
4683 2008-05-22 Sandeep Maram <smaram_b04@iiita.ac.in>
4685 * doc/invoke.texi (-ftree-loop-fusion): Document.
4686 * tree-pass.h (pass_loop_fusion): Declared.
4687 * tree-loop-fusion.c: New.
4688 * timevar.def (TV_TREE_LOOP_FUSION): Declared.
4689 * tree-data-ref.c (find_data_references_in_loop): Make extern.
4690 * tree-data-ref.h (find_data_references_in_loop): Declared.
4691 * common.opt (ftree-loop-fusion): Declared.
4692 * Makefile.in (tree-loop-fusion.o): Added rule and to OBJS-common.
4694 2008-05-21 Sebastian Pop <sebastian.pop@amd.com>
4696 * graphite.c (build_access_matrix): Fix typo from the merge.
4698 2008-05-20 Sebastian Pop <sebastian.pop@amd.com>
4700 * Merge from mainline (130800:135673).
4702 2008-05-07 Sebastian Pop <sebastian.pop@amd.com>
4704 * graphite.c (end_scop): The exit of the scop is not part of the scop.
4705 Update dominators after splitting.
4707 2008-05-07 Sebastian Pop <sebastian.pop@amd.com>
4709 * graphite.c (is_bb_addable): Return the harmful statement.
4710 Factor up some code.
4711 (end_scop): New. Splits end of scope bbs on a harmful statement.
4712 (build_scops_1): Call end_scop.
4714 2008-05-07 Sebastian Pop <sebastian.pop@amd.com>
4716 * graphite.c: (succs_at_same_depth, end_scop, all_preds_visited_p,
4717 all_succs_visited_p, start_new_scop_for_each_succ, start_new_scop,
4718 add_dominators_to_open_scops, stop_last_open_scop, scop_end_loop,
4719 build_scops_1): Removed.
4720 (build_scops_2): Renamed build_scops_1.
4722 2008-05-06 Sebastian Pop <sebastian.pop@amd.com>
4724 * graphite.c: Fix formatting.
4726 2008-05-06 Tobias Grosser <grosser@fim.uni-passau.de>
4728 * graphite.c (get_bb_type): New.
4730 (build_scops_2): New.
4731 (is_bb_addable): New.
4732 (build_scops): Switch the scop detection.
4733 (build_scop_bbs): Add entry bb to scop.
4734 * graphite.h (struct scop): Update comment.
4736 2008-05-06 Tobias Grosser <grosser@fim.uni-passau.de>
4738 * graphite.c (dot_all_scops_1): Fix some incorrect colors and add
4741 2008-05-06 Tobias Grosser <grosser@fim.uni-passau.de>
4743 * testsuite/gcc.dg/graphite/scop-1.c: Update.
4744 * testsuite/gcc.dg/graphite/scop-2.c: Update.
4745 * testsuite/gcc.dg/graphite/scop-4.c: Update.
4746 * testsuite/gcc.dg/graphite/scop-5.c: Add.
4747 * testsuite/gcc.dg/graphite/scop-6.c: Add.
4749 2008-05-06 Sebastian Pop <sebastian.pop@amd.com>
4751 * testsuite/gcc.dg/graphite/scop-0.c: Add.
4752 * testsuite/gcc.dg/graphite/scop-7.c: Add.
4753 * testsuite/gcc.dg/graphite/scop-8.c: Add.
4754 * testsuite/gcc.dg/graphite/scop-9.c: Add.
4755 * testsuite/gcc.dg/graphite/scop-10.c: Add.
4757 2008-05-06 Tobias Grosser <grosser@fim.uni-passau.de>
4759 * graphite.c (scop_affine_expr): Renamed to loop_affine_expr.
4760 Check affine expressions depending on the outermost loop
4762 (stmt_simple_for_scop_p): Same.
4763 (harmfule_stmt_in_scop): Same.
4765 2008-04-28 Tobias Grosser <grosser@fim.uni-passau.de>
4767 * graphite.c (dot_all_scops): Remove incorrect difficult bb coloring,
4768 mark entry and exit, that are not part of the SCoP and update HTML
4771 2008-04-25 Sebastian Pop <sebastian.pop@amd.com>
4773 * graphite.c (basic_block_simple_for_scop_p): Renamed
4775 (save_scop, preds_at_same_depth, test_for_scop_bound): Removed.
4776 (add_dominators_to_open_scops, build_scops_1): Reimplemented.
4777 (all_preds_visited_p, all_succs_visited_p,
4778 start_new_scop_for_each_succ, start_new_scop, stop_last_open_scop,
4779 scop_end_loop): New.
4780 (build_scops): Do not use dfs_enumerate_from.
4782 * testsuite/gcc.dg/graphite/scop-{1,2,4}.c: Updated.
4784 2008-04-23 Sebastian Pop <sebastian.pop@amd.com>
4786 * graphite.c: Add comments to functions that are missing a
4788 (graphite_create_iv): Removed. Merged in graphite_loop_to_gcc_loop.
4790 2008-04-23 Sebastian Pop <sebastian.pop@amd.com>
4792 * graphite.c (nb_params_in_scop): Moved...
4793 (graphite_bb_from_bb, loop_body_to_cloog_stmts): New.
4794 (setup_cloog_loop): Call loop_body_to_cloog_stmts.
4795 (clast_to_gcc_expression): Reduce column size to less than 80.
4796 (graphite_create_iv): Return the new name of the IV.
4797 (find_transform): Set options->esp and options->cpp.
4798 (gloog): Comment out the invalidation of the old loop code.
4799 (initialize_dependence_polyhedron): Replace scop_nb_params with
4802 * graphite.h (nb_params_in_scop): ... here.
4803 (scop_nb_params): Removed.
4804 (loop_domain_dim): Return something even when the loop was not
4805 found in the hash table: avoid ICEing on all the graphite.exp
4808 2008-04-14 Konrad Trifunovic <konrad.trifunovic@inria.fr>
4810 * tree-chrec.c (for_each_scev_op): SCEV can have 3 operands.
4812 * graphite.c (build_scop_dynamic_schedules): Schedule is built
4813 according to nesting level.
4814 (find_scop_parameters): Call instantiate_parameters.
4815 (scan_tree_for_params): Extend it to handle general affine bounds.
4816 Inner loop bound can depend on outer loop induction variable.
4817 (setup_cloog_loop): tmp variable is allocated on stack. Call
4818 instantiate_parameters with respect to outermost_loop_in_scop.
4819 (loop_domain_dim, ref_nb_loops, loop_iteration_vector_dim): moved to
4821 (create_empty_loop): Function loopify should be given edge
4822 probability, instead of edge frequency. Dominance relation from
4823 switch_bb to loop_header.
4824 (clast_to_gcc_expression): Added handling of clast_reduction node.
4825 (gloog): New functionality for removing old loop.
4826 (test_dependence): Factored out from build_rdg_all_levels.
4827 (build_rdg_all_levels): Dependence testing factored out to
4828 test_dependence function.
4830 * graphite.h (struct graphite_bb): Extended with dynamic_schedule.
4831 (loop_domain_dim, ref_nb_loops, loop_iteration_vector_dim): Moved
4834 2008-04-07 Sebastian Pop <sebastian.pop@amd.com>
4836 * graphite.c (free_scop, param_index, initialize_cloog_names,
4837 nb_params_in_scop): Use name_tree map instead of just a tree
4838 for keeping track of the variable name associated to that tree.
4839 (create_empty_loop, gmp_cst_to_tree, clast_name_to_gcc,
4840 clast_to_gcc_expression, graphite_create_iv,
4841 graphite_loop_to_gcc_loop, graphite_cond_to_gcc_cond,
4842 graphite_stmt_to_gcc_stmt): New.
4843 (gloog): Call these.
4844 * graphite.h (struct name_tree): New.
4845 (struct scop): Use name_tree instead of tree for params.
4846 Store a vector of name_tree for new_ivs.
4848 (scop_nb_params): Use name_tree instead of tree.
4850 2008-04-05 Alexander Lamaison <awl03@doc.ic.ac.uk>
4851 Sebastian Pop <sebastian.pop@amd.com>
4853 * tree-bounds.c: New.
4854 * tree-bounds.h: New.
4855 * tree-pass.h: Declare pass_bounds_early and pass_bounds_late.
4856 * passes.c: Schedule pass_bounds_early, pass_bounds_late.
4857 * builtins.c (expand_builtin_alloca): Add flag_bounds as for
4861 * c-cppbuiltin.c: Same.
4865 * tree-outof-ssa.c: Same.
4867 * Makefile.in: Same.
4869 2008-03-15 Antoniu Pop <antoniu.pop@gmail.com>
4870 Sebastian Pop <sebastian.pop@amd.com>
4872 * tree-loop-distribution.c (remaining_stmts,
4873 upstream_mem_writes): Removed static variables.
4874 (copy_loop_before, create_bb_after_loop,
4875 mark_nodes_having_upstream_mem_writes, free_rdg_components,
4876 rdg_build_components, rdg_build_partitions,
4877 dump_rdg_partitions): Extern.
4878 (generate_loops_for_partition, generate_code_for_partition): Do not
4880 (already_processed_vertex_p, predecessor_has_mem_write,
4881 mark_nodes_having_upstream_mem_writes, has_upstream_mem_writes,
4882 rdg_flag_all_uses, rdg_flag_uses, rdg_flag_vertex_and_dependent,
4883 rdg_flag_loop_exits, rdg_flag_similar_memory_accesses,
4884 build_rdg_partition_for_component, rdg_build_partitions, ldist_gen):
4885 Pass remaining_stmts and upstream_mem_writes as parameters.
4886 (rdg_component): Moved...
4887 (build_rdg_partition_for_component): Do not aggregate components when
4888 flag_streamize_loops is set.
4889 (gen_sequential_loops): New.
4890 (ldist_gen): Call gen_sequential_loops.
4892 * tree-pass.h (pass_loop_streamization): Declared.
4894 * omp-low.c (expand_omp_sections): Call add_bb_to_loop on created
4895 basic blocks when loops structures exist.
4897 * builtin-types.def (BT_FN_VOID_PTR_PTR_INT): New.
4899 * tree-ssa-loop-ivopts.c (expr_invariant_in_region_p): New.
4901 * tree-parloops.c (take_address_of, eliminate_local_variables_1,
4902 eliminate_local_variables_stmt, eliminate_local_variables,
4903 separate_decls_in_loop_name, separate_decls_in_loop_stmt,
4904 separate_decls_in_loop, gen_parallel_loop): Make them work on a region
4905 of code delimited by two edges in the CFG.
4906 (separate_decls_in_loop_name): Renamed separate_decls_in_region_name.
4907 (separate_decls_in_loop_stmt): Renamed separate_decls_in_region_stmt.
4908 (separate_decls_in_loop): Renamed separate_decls_in_region. Isolate
4909 the case of parallelisation of reductions.
4910 (create_loop_fn): Extern.
4911 (create_omp_parallel_region): New.
4913 * tree-data-ref.c (dump_data_dependence_relation): Don't call
4914 dump_data_reference for printing dra and drb.
4915 (create_rdg_edge_for_ddr, create_rdg_edges_for_scalar): Initialise
4917 (build_rdg): Don't call free_dependence_relations for the moment, as
4918 we attach dependence relations on each edge of the RDG.
4921 * tree-data-ref.h (rdg_component): ...here.
4922 (struct rdg_edge): New field ddr_p relation.
4923 (RDGE_RELATION): New.
4924 (create_bb_after_loop, copy_loop_before,
4925 mark_nodes_having_upstream_mem_writes, rdg_build_components,
4926 rdg_build_partitions, dump_rdg_partitions,
4927 free_rdg_components): Declared.
4929 * omp-builtins.def (BUILT_IN_GOMP_STREAM_ALIGN_PUSH,
4930 BUILT_IN_GOMP_STREAM_ALIGN_POP): New.
4932 * tree-loop-streamization.c: New.
4934 * tree-flow.h (gather_blocks_in_sese_region, create_loop_fn,
4935 create_omp_parallel_region, expr_invariant_in_region_p): Declared.
4937 * Makefile.in (tree-loop-streamization.o): Added to OBJS-common.
4939 * tree-cfg.c (gather_blocks_in_sese_region): Extern.
4941 * passes.c: Schedule pass_loop_streamization.
4943 2008-03-08 Tobias Grosser <grosser@fmi.uni-passau.de>
4945 * graphite.c (dot_all_scops_1): Fix formatting for difficult bbs and
4948 2008-03-07 Tobias Grosser <grosser@fim.uni-passau.de>
4950 * graphite.c (dot_all_scops): Update formatting.
4951 Bbs can now be part of more than one SCoP.
4953 2008-03-04 Sebastian Pop <sebastian.pop@amd.com>
4955 * graphite.c (new_loop_to_cloog_loop_str, setup_cloog_loop): Fix
4957 (loop_domain_dim): Check for unregistered toplev SCOP loop.
4958 * graphite.h (loop_to_cloog_loop): New.
4960 2008-03-04 Konrad Trifunovic <konrad.trifunovic@inria.fr>
4962 * graphite.c (loop_domain_dim, ref_nb_loops,
4963 loop_iteration_vector_dim): New.
4964 (build_access_matrix_with_af, build_access_matrix,
4965 initialize_dependence_polyhedron): Fixed for new matrix layout.
4966 No longer assume that all iteration domains are of the same
4969 2008-03-02 Sebastian Pop <sebastian.pop@amd.com>
4971 * tree-scalar-evolution.c (instantiate_parameters_1): An SSA_NAME
4972 defined in a loop at depth 0 is invariant.
4973 * tree-chrec.c (evolution_function_is_invariant_rec_p): Ditto.
4974 * tree-ssa-loop-ivopts.c (expr_invariant_in_loop_p): Should never
4975 be called at loop depth 0.
4977 * graphite.c (basic_block_simple_for_scop_p): Take the scop as
4979 (dot_all_scops_1): Update use of basic_block_simple_for_scop_p.
4980 (down_open_scop): Removed.
4981 (loop_in_scop_p): Redefined.
4982 (scop_affine_expr): New argument: scop.
4983 (stmt_simple_for_scop_p): New argument: scop. RETURN_EXPR is not
4984 a harmful statement ending a scop.
4985 (basic_block_simple_for_scop_p): New argument: scop.
4986 (get_loop_start): Removed.
4987 (new_scop): Initialize SCOP_LOOPS.
4988 (free_scop): Free SCOP_LOOPS.
4989 (succs_at_same_depth, preds_at_same_depth): New.
4990 (end_scop): Test the validity of a scop.
4991 (add_dominators_to_open_scops): New.
4992 (test_for_scop_bound): Call add_dominators_to_open_scops.
4993 Add cases for opening and closing multiple scops.
4994 (build_scops, build_scop_bbs): Iterate over basic blocks in
4996 (build_graphite_bb): Pass scop directly.
4997 (dfs_bb_in_scop_p): New.
4998 (scop_record_loop): Use SCOP_LOOPS for not recording the same loop
5000 (nb_loops_around_gb): Use loop_in_scop_p.
5001 (schedule_to_scattering): Disabled for the moment the code computing
5002 the "textual order for outer loop".
5004 * graphite.h (struct scop): New field loops.
5006 (scop_loop_index): Test that the given loop belongs to SCOP_LOOPS.
5008 * testsuite/gcc.dg/graphite/scop-{1,...,7}.c: Updated.
5010 2008-02-27 Antoniu Pop <antoniu.pop@gmail.com>
5011 Sebastian Pop <sebastian.pop@amd.com>
5013 * builtin-types.def (BT_FN_PTR_SIZE_UINT, BT_FN_BOOL_PTR): New.
5014 * common.opt (fstreamize-loops): New.
5015 * omp-builtins.def (BUILT_IN_GOMP_STREAM_CREATE,
5016 BUILT_IN_GOMP_STREAM_PUSH, BUILT_IN_GOMP_STREAM_HEAD,
5017 BUILT_IN_GOMP_STREAM_POP, BUILT_IN_GOMP_STREAM_EOS_P,
5018 BUILT_IN_GOMP_STREAM_SET_EOS, BUILT_IN_GOMP_STREAM_DESTROY): New.
5020 2008-02-22 Konrad Trifunovic <konrad.trifunovic@inria.fr>
5022 * tree-data-ref.c (build_empty_rdg): New.
5023 (build_rdg): Use it.
5024 * tree-data-ref.h (build_empty_rdg): Declared.
5025 * graphite.c (free_scop): Free SCOP_LOOP2CLOOG_LOOP.
5026 (find_vertex_for_stmt): Removed.
5027 (build_rdg_all_levels): Use build_empty_rdg and rdg_vertex_for_stmt.
5029 2008-02-21 Sebastian Pop <sebastian.pop@amd.com>
5031 * tree-loop-distribution.c (generate_builtin): After cancelling the
5032 loop tree, also delete basic blocks.
5033 (rdg_flag_uses): Stop recursion when a vertex has already been
5036 2008-02-15 Konrad Trifunovic <konrad.trifunovic@inria.fr>
5038 * graphite.c (build_scop_alpha): Removed.
5039 (graphite_transform_loops): Add a dummy call to build_all_rdg_levels
5040 and dump_dependence_graph to avoid compiler warnings.
5042 2008-02-14 Konrad Trifunovic <konrad.trifunovic@inria.fr>
5044 * tree-data-ref.c (dr_may_alias_p, create_rdg_vertices): Extern.
5045 * tree-data-ref.h (dr_may_alias_p, create_rdg_vertices): Declared.
5046 * graphite.c (new_loop_to_cloog_loop_str, hash_loop_to_cloog_loop,
5047 eq_loop_to_cloog_loop, del_loop_to_cloog_loop): New.
5048 (new_scop, setup_cloog_loop): Initialize SCOP_LOOP2CLOOG_LOOP.
5049 (initialize_dependence_polyhedron, find_vertex_for_stmt,
5050 initialize_data_dependence_polyhedron, is_empty_polyhedron,
5051 statement_precedes_p, build_rdg_all_levels, build_scop_alpha,
5052 dump_dependence_graph): New.
5053 * graphite.h (struct graphite_bb): New field compressed_alpha_matrix.
5055 (struct scop): New field loop2cloog_loop.
5056 (SCOP_LOOP2CLOOG_LOOP, struct data_dependence_polyhedron,
5057 RDGE_DDP, ddp_p, struct loop_to_cloog_loop_str): New.
5059 2008-02-10 Konrad Trifunovic <konrad.trifunovic@inria.fr>
5061 * graphite.c (build_graphite_bb): Fix initialization
5062 of the graphite basic block.
5064 2008-02-05 Sebastian Pop <sebastian.pop@amd.com>
5066 * graphite.c (scan_tree_for_params): Rewrite for the new layout of
5067 loop domain matrix. Pass in the number of loops contained in the
5069 (nb_loops_around_gb): Moved before setup_cloog_loop that uses it.
5070 (setup_cloog_loop): Rewrite for the new layout of loop domain matrix:
5071 loops that are not surrounding the current loop are not represented
5072 in the domain constraint matrix.
5073 (build_scop_iteration_domain): Initial domain constraint matrix
5074 contains only the eq/ineq, cst, and scop parameters columns.
5076 2008-01-29 Tobias Grosser <grosser@fim.uni-passau.de>
5078 * graphite.c (schedule_to_scattering, nb_loops_around_gb): New.
5079 (print_graphite_bb): Print scattering.
5081 2008-01-29 Tobias Grosser <grosser@fim.uni-passau.de>
5083 * graphite.c (initialize_cloog_names): Initialize names of
5084 scattering variables.
5086 2009-01-29 Tobias Grosser <grosser@fim.uni-passau.de>
5088 * graphite.c (dot_all_scops_1): Disable debug output while
5091 2008-01-29 Tobias Grosser <grosser@fim.uni-passau.de>
5093 * graphite.c (find_transform): Change cloog output language to C.
5095 2008-01-27 Sebastian Pop <sebastian.pop@amd.com>
5097 * tree-loop-distribution.c (generate_memset_zero,
5098 generate_builtin, generate_code_for_partition,
5099 rdg_flag_all_uses): New.
5100 (rdg_flag_uses): Gather in the same partition the statements defining
5101 the VUSES of the current statement.
5102 (rdg_flag_similar_stores): Renamed rdg_flag_similar_memory_accesses.
5103 Gather in the same partition not only the stores to the same memory
5104 access, but also the reads.
5105 (ldist_generate_loops): Renamed ldist_gen.
5107 2008-01-24 Sebastian Pop <sebastian.pop@amd.com>
5108 Tobias Grosser <grosser@fmi.uni-passau.de>
5110 * graphite.c (setup_cloog_loop): Chain all cloog loops with the
5111 next pointer, don't use the inner pointer.
5113 2008-01-20 Tobias Grosser <grosser@fmi.uni-passau.de>
5115 * graphite.c (dot_all_scops, dot_all_scops_1): New.
5116 (find_transform): Call dot_all_1.
5117 * graphite.h (dot_all_scops): Declared.
5119 2007-12-14 Sebastian Pop <sebastian.pop@amd.com>
5121 * tree-loop-distribution.c: Fix apsi.f ICE.
5122 (create_bb_after_loop): New.
5123 (generate_loops_for_partition): Use it.
5124 * testsuite/gfortran.dg/ldist-1.f90: New.
5126 * tree-data-ref.c (dot_rdg): Use /tmp/rdg.dot for dotty format.
5127 * graphite.c (dot_scop): Use /tmp/scop.dot for dotty format.
5129 2007-12-13 Tobias Grosser <grosser@fmi.uni-passau.de>
5131 * graphite.c (find_transform): Dump cloog program sent to cloog.
5133 2007-12-13 Tobias Grosser <grosser@fmi.uni-passau.de>
5135 * graphite.c (initialize_cloog_names): Initialize cloog
5138 2007-12-13 Tobias Grosser <grosser@fmi.uni-passau.de>
5140 * graphite.c (build_scop_context): Fix typo, for the matrix
5141 format: insert '0 >= 0' instead of '-1 >= 0'.
5143 2007-12-13 Sebastian Pop <sebastian.pop@amd.com>
5145 * Fix merge problems.
5147 2007-12-13 Sebastian Pop <sebastian.pop@amd.com>
5149 * graphite.c (setup_cloog_loop): Fix typo.
5151 2007-12-12 Sebastian Pop <sebastian.pop@amd.com>
5153 * doc/invoke.texi (-ftree-loop-distribution): Documented.
5154 * tree-loop-distribution.c: Reimplemented.
5155 * tree-pass.h (pass_loop_distribution): New.
5156 * tree-scalar-evolution.c (number_of_iterations_for_all_loops): Use
5158 * graphds.h (struct graph): New field indexes.
5159 * timevar.def (TV_TREE_LOOP_DISTRIBUTION): New.
5161 * tree-vect-analyze.c: Remove declaration of static functions when not
5163 * tree-vectorizer.c: Same.
5164 (rename_variables_in_loop): Now extern.
5165 (slpeel_tree_duplicate_loop_to_edge_cfg): Renamed
5166 tree_duplicate_loop_to_edge_cfg. Reset PENDING_STMT for edges after
5167 calling redirect_edge_and_branch_force.
5169 * tree-vectorizer.h (tree_duplicate_loop_on_edge): Declared.
5171 * tree-data-ref.c: Don't include tree-chrec.h.
5172 (debug_data_dependence_relations): New.
5173 (dump_data_dependence_relation): Call dump_data_reference on data refs
5175 (same_access_functions): Moved...
5176 (find_vertex_for_stmt): Renamed rdg_vertex_for_stmt.
5177 (dump_rdg_vertex, debug_rdg_vertex, dump_rdg_component,
5178 debug_rdg_component, dump_rdg, debug_rdg, dot_rdg_1, dot_rdg,
5179 struct rdg_vertex_info, ): New.
5180 (create_rdg_edge_for_ddr): Compute the dependence level before looking
5182 (create_rdg_vertices): Initialize the htab of graph->indexes.
5183 Initialize RDG_MEM_WRITE_STMT and RDG_MEM_READS_STMT.
5184 (stmts_from_loop): Don't save LABEL_EXPR.
5185 (hash_stmt_vertex_info, eq_stmt_vertex_info,
5186 hash_stmt_vertex_del): New.
5187 (build_rdg): Initialize rdg->indexes.
5188 (free_rdg, stores_from_loop, ref_base_address,
5189 rdg_defs_used_in_other_loops_p, have_similar_memory_accesses,
5190 have_similar_memory_accesses_1, ref_base_address_1,
5191 remove_similar_memory_refs): New.
5193 * tree-data-ref.h: Include tree-chrec.h.
5194 (debug_data_dependence_relations): Declared.
5195 (same_access_functions): ...here. Now static inline.
5196 (ddr_is_anti_dependent, ddrs_have_anti_deps,
5197 ddr_dependence_level): New.
5198 (struct rdg_vertex): New fields has_mem_write, has_mem_reads.
5199 (RDGV_HAS_MEM_WRITE, RDGV_HAS_MEM_READS, RDG_STMT, RDG_MEM_WRITE_STMT,
5200 RDG_MEM_READS_STMT): New.
5201 (dump_rdg_vertex, debug_rdg_vertex, dump_rdg_component,
5202 debug_rdg_component, dump_rdg, debug_rdg, dot_rdg,
5203 rdg_vertex_for_stmt): Declared.
5204 (struct rdg_edge): New field level.
5205 (RDGE_LEVEL, free_rdg): New.
5206 (stores_from_loop, remove_similar_memory_refs,
5207 rdg_defs_used_in_other_loops_p,
5208 have_similar_memory_accesses): Declared.
5209 (rdg_has_similar_memory_accesses): New.
5211 * lambda.h (dependence_level): New.
5212 * common.opt (ftree-loop-distribution): New.
5213 * tree-flow.h (debug_loop_ir): Renamed debug_loops.
5214 (print_loop_ir): Renamed print_loops.
5215 (debug_loop, debug_loop_num, print_loops_bb, mark_virtual_ops_in_bb,
5216 tree_duplicate_loop_to_edge_cfg, rename_variables_in_loop): Declared.
5217 * Makefile.in (TREE_DATA_REF_H): Depends on tree-chrec.h.
5218 (tree-loop-distribution.o): Added.
5219 * tree-cfg.c (mark_virtual_ops_in_region): Use mark_virtual_ops_in_bb.
5220 (mark_virtual_ops_in_bb): New.
5221 (print_loops_bb, debug_loop_num, debug_loop): New.
5222 * passes.c: Scheduled pass_loop_distribution.
5224 2007-12-12 Konrad Trifunovic <konrad.trifunovic@inria.fr>
5226 * graphite.c (scan_tree_for_params): Correct the number of columns
5228 (nb_flat_iterator): New.
5229 (setup_cloog_loop): Initialize to 1 the first column for inequalities.
5230 (build_scop_iteration_domain): Correct the number of columns for
5233 2007-12-12 Sebastian Pop <sebastian.pop@amd.com>
5235 * Merge from mainline (129697:130800).
5237 2007-10-30 Sebastian Pop <sebastian.pop@amd.com>
5239 * graphite.c (build_graphite_bb): SCoP's basic blocks are post
5240 dominated by SCoP's exit.
5241 (graphite_transform_loops): Compute post dominators.
5243 2007-10-28 Sebastian Pop <sebastian.pop@amd.com>
5245 * Merge from mainline (127169:129697).
5247 2007-10-28 Sebastian Pop <sebastian.pop@amd.com>
5249 * graphite.c (affine_expr): Renamed scop_affine_expr. Use an extra
5250 parameter for the basic block that contains the expression. Use
5251 outermost_loop_in_scop for evolution_function_is_affine_multivariate_p.
5252 (stmt_simple_for_scop_p): Pass to scop_affine_expr the basic block of
5254 * graphite.h (gbb_loop): New.
5255 (GBB_LOOP): Removed.
5257 2007-08-03 Sebastian Pop <sebpop@gmail.com>
5259 * Makefile.in: Fix merge problem.
5261 2007-08-03 Sebastian Pop <sebpop@gmail.com>
5263 * Merge from mainline (125309:127169).
5264 * tree-loop-distribution.c: Disabled.
5266 2007-06-05 Sebastian Pop <sebpop@gmail.com>
5268 * Merge from mainline (r123693:125309).
5270 2007-05-30 Sebastian Pop <sebpop@gmail.com>
5272 * tree-loop-distribution.c (correct_modify_expr_p): Renamed
5274 (correct_modify_p, check_statements, number_of_lvalue_uses,
5275 number_of_scalar_dependences, create_edges): Use GIMPLE_MODIFY_STMT
5276 instead of MODIFY_EXPR.
5277 (update_edge_with_ddv): Don't pass index_of_edge. Initialize
5280 2007-05-24 Sebastian Pop <sebpop@gmail.com>
5282 * tree-loop-distribution.c (struct rdg): Replace arrays by
5283 VECs for edges and vertices.
5284 (RDG_NBV, RDG_NBE, RDG_VERTEX, RDG_EDGE): Removed.
5285 (RDGV_NB_PARTITIONS): New.
5286 (PRDG_NBV, PRDG_NBE): Removed.
5287 (build_scc_graph, correct_partitions_p, mark_partitions, build_prdg,
5288 dump_rdg, find_vertex_with_stmt, create_vertices, free_rdg,
5289 number_of_scalar_dependences, create_edges, build_rdg): Use VECs.
5291 2007-05-17 Georges-Andre Silber <silber@cri.ensmp.fr>
5292 Sebastian Pop <sebpop@gmail.com>
5294 * doc/invoke.texi (-ftree-loop-distribution): Document.
5295 * tree-loop-distribution.c: New file.
5296 * tree-pass.h (pass_loop_distribution): Declared.
5297 * timevar.def (TV_TREE_LOOP_DISTRIBUTION): New.
5298 * tree-data-ref.c (initialize_data_dependence_relation): Initialize
5300 * tree-data-ref.h (data_dependence_relation): Add reversed_p.
5301 (DDR_REVERSED_P): New.
5302 * common.opt (-ftree-loop-distribution): New.
5303 * tree-flow.h (distribute_loops): Declared.
5304 * Makefile.in (OBJS-common): Depend on tree-loop-distribution.o.
5305 * passes.c (init_optimization_passes): Schedule loop distribution.
5307 2007-05-12 Sebastian Pop <sebastian.pop@inria.fr>
5309 * graphite.c (print_graphite_bb): Don't call dump_data_references.
5310 (print_scop): Don't print when scop is NULL.
5311 (build_scop_context, find_transform): Don't output to stderr.
5313 2007-05-09 Sebastian Pop <sebastian.pop@inria.fr>
5315 * tree-data-ref.c: Don't include graphite.h.
5316 Comment out the code for printing data reference's scop.
5317 (build_access_matrix_with_af): Moved...
5318 * tree-data-ref.h (build_access_matrix_with_af): Removed declaration.
5319 * graphite.c (build_access_matrix_with_af): ... here. Now static.
5320 (print_graphite_bb): Print basic block's schedule.
5321 (print_scop): Don't print the schedule, call cloog's pretty printer.
5322 (bb_in_scop_p): A basic block is in a scop only if it is both
5323 dominated and postdominated by the scop's entry and exit basic blocks.
5324 (function_parameter_p): New.
5325 (invariant_in_scop_p): Use function_parameter_p.
5326 (new_scop, save_scop): New.
5327 (end_scop, test_for_scop_bound, build_scops): Use new_scop, and
5329 (scan_tree_for_params): Directly build the constraint as CloogMatrix.
5330 (loop_in_scop_p): New.
5331 (scop_record_loop): Use loop_in_scop_p.
5332 (build_scop_domain): Renamed build_scop_iteration_domain.
5333 (setup_cloog_loop, initialize_cloog_names, find_scop_parameters,
5334 nb_params_in_scop, build_scop_context, first_loop_in_scop,
5335 setup_cloog_loop, dot_scop_1, dot_scop): New.
5336 * graphite.h (GBB_LOOP, SCOP_PROG, dot_scop): New.
5337 (struct scop): Add a pointer to cloog's representation of a program.
5339 2007-04-14 Sebastian Pop <sebastian.pop@inria.fr>
5341 * doc/invoke.texi (-ftree-check-verbose): Renamed
5342 -ftree-checks-verbose.
5343 * common.opt (flag_tree_check_verbose): Renamed
5344 flag_tree_checks_verbose.
5345 * tree-check.c (tree_check_warning): Use flag_tree_checks_verbose.
5347 2007-04-14 Sebastian Pop <sebastian.pop@inria.fr>
5349 * configure: Regenerated.
5350 * config.in: Regenerated.
5351 * tree-ssa-loop.c (graphite_transforms): Execute
5352 graphite_transform_loops only when HAVE_cloog.
5353 * configure.ac (HAVE_polylib, HAVE_cloog, GRAPHITE): Defined.
5354 * graphite.c: Include polylibgmp.h and cloog.h.
5355 (graphite_transform_loops): Removed loops parameter.
5356 * tree-flow.h (graphite_transform_loops): Update declaration.
5357 * Makefile.in (POLYLIBLIBS, POLYLIBINC, CLOOGLIBS, CLOOGINC): New.
5358 (LIBS): Depend on CLOOGLIBS and on POLYLIBLIBS.
5359 (INCLUDES): Depend on POLYLIBINC and on CLOOGINC.
5360 (OBJS-common): Remove dependence on graphite.o.
5361 (BACKEND): Depend on @GRAPHITE@.
5363 2007-04-13 Sebastian Pop <sebastian.pop@inria.fr>
5365 * doc/invoke.texi (-ftree-check-verbose): Documented.
5366 * testsuite/gcc.dg/tree-checker/tree-checks-1.c: New.
5367 * testsuite/gcc.dg/tree-checker/tree-checks-2.c: New.
5368 * testsuite/gcc.dg/tree-checker/tree-checks-3.c: New.
5369 * testsuite/gcc.dg/tree-checker/tree-checks-4.c: New.
5370 * testsuite/gcc.dg/tree-checker/tree-checks.exp: New.
5371 * testsuite/gcc.dg/tree-checker/condates.crp: New.
5372 * common.opt (ftree-checks-verbose): New.
5373 * tree-check.c (tree_check_warning): Move extra stderr output
5374 under control of flag_tree_check_verbose.
5376 2007-04-12 Sebastian Pop <sebastian.pop@inria.fr>
5378 * tree-match.c: Fix comments formatting.
5379 * tree-match.h: Fix comments formatting.
5380 * tree-check.c: Fix comments formatting.
5381 (tree_check_init): Restructure.
5383 2007-04-12 Nic Volanschi <nic.volanschi@free.fr>
5385 * doc/invoke.texi (-ftree-check, -ftree-checks): Documented.
5387 2007-04-10 Sebastian Pop <sebastian.pop@inria.fr>
5389 * Merge from mainline (r120733:123693).
5391 2007-03-20 Nic Volanschi <nic.volanschi@free.fr>
5393 * condate.y: New file.
5394 * tree-match.h (struct patt_info_s): New field sign.
5395 (struct condate_s): New field msg.
5396 (normalize_condate, name_condate, add_condate): New.
5397 (conds[], condate_parse): Made extern.
5398 * tree-check.c (tree_check_warning): First arg changed to cond;
5399 warning reformatted.
5400 (tree_check_init): Reset the TREE_VISITED bit on every CFG node.
5402 (tree_check): Process trivial condates.
5403 (read_delimited_string): Removed.
5404 (print_cond): Print name and msg.
5405 (conds[]): Made extern.
5406 (parse_tree_check_file_once): Rewritten to use the parser in
5408 Processing of option --tree_check_string moved to tree_scan().
5409 * Makefile.in: Added condate.y
5411 2007-03-12 Sebastian Pop <sebastian.pop@inria.fr>
5413 * tree-pretty-print.c (dump_generic_bb_buff, lazy_dump_generic_node):
5414 Use VECs instead of varrays.
5415 * diagnostic.h (lazy_dump_generic_node): Update declaration.
5416 * Makefile.in (pretty-print.o): Depend on vec.h.
5417 * pretty-print.c: Include tree.h and vec.h.
5418 (pp_clear_state, pp_write_list_to_stream, pp_base_format,
5419 pp_base_format, pp_construct, pp_base_string, pp_lazy_mode,
5420 new_tree_chunk, pp_add_tree, pp_add_string, pp_add_char, pp_write_list,
5421 pp_free_list): Use VECs instead of varrays.
5422 * pretty-print.h: Do not include varray.h.
5423 (struct tree_chunk_s): Declaration moved before its use.
5424 (output_buffer): Rename varray field to chunks.
5425 * tree-match.c (tree_equal, chunk_1st_char, chunks_lookahead,
5426 tree_1st_char, match_chunks_pattinfo, match_tree_pattinfo,
5427 save_global_holes): Use VECs instead of varrays.
5428 * tree-match.h: Declare VECs of cfg_node, and hole_p.
5429 * tree-check.c (scan_cfg_stmts, push_node,
5430 print_matching_stmt): Removed.
5431 (tree_check_instance, push_global_holes_if_new, tree_check,
5432 execute_tree_check): Use VECs instead of varrays.
5433 (gate_tree_check): Don't execute the CFG check when basic_block_info
5436 2007-01-12 Sebastian Pop <sebastian.pop@inria.fr>
5438 * Merge from mainline (r115016:120733).
5440 2007-01-12 Sebastian Pop <sebastian.pop@inria.fr>
5442 * Merge from mainline (r117632:117661).
5444 2007-01-12 Sebastian Pop <sebastian.pop@inria.fr>
5446 * tree-dump.c (dump_option_value_in): Add TDF_DEBUG.
5447 * tree-pass.h (TDF_DEBUG, debug_p): New.
5448 * tree-scalar-evolution.c (set_scalar_evolution, get_scalar_evolution,
5449 get_scalar_evolution, add_to_evolution, set_nb_iterations_in_loop,
5450 get_loop_exit_condition, analyze_evolution_in_loop,
5451 analyze_initial_condition, analyze_scalar_evolution,
5452 instantiate_parameters, number_of_latch_executions): Use debug_p.
5453 * tree-chrec.c (chrec_apply): Use debug_p.
5454 * tree-data-ref.c: Include graphite.h.
5455 (dump_data_reference): Print also the access matrix.
5456 (analyze_array, analyze_indirect_ref, init_data_ref,
5457 analyze_offset_expr, address_analysis, object_analysis,
5458 create_data_ref, finalize_ddr_dependent,
5459 non_affine_dependence_relation, analyze_ziv_subscript,
5460 analyze_siv_subscript_cst_affine,
5461 compute_overlap_steps_for_affine_1_2, analyze_subscript_affine_affine,
5462 can_use_analyze_subscript_affine_affine, analyze_siv_subscript,
5463 analyze_miv_subscript, analyze_overlapping_iterations,
5464 build_classic_dist_vector, subscript_dependence_tester,
5465 compute_affine_dependence, analyze_all_data_dependences): Use debug_p.
5466 (build_access_matrix_with_af): No longer static.
5467 * tree-data-ref.h (scop_p): ... declaration here.
5468 (data_reference.scop): New field.
5469 (DR_SCOP, DR_ACCESS_MATRIX): New.
5470 (build_access_matrix_with_af, dr_num_subscripts): Declared.
5471 * graphite.c (print_graphite_bb): Call dump_data_references.
5472 (print_scop): Use scop_nb_loops and scop_dim_domain.
5473 (test_for_scop_bound): Use debug_p.
5474 (scan_tree_for_params): Use scop_nb_loops, scop_nb_loops and
5476 (scop_loop_index): Moved...
5477 (scop_record_loop): New.
5478 (build_scop_loop_nests): Use scop_record_loop.
5479 (build_scop_domain): Use scop_dim_domain.
5480 (build_access_matrix): Implemented.
5481 (build_scop_canonical_schedules): Use scop_nb_loops.
5482 (build_graphite_bb): Initialize GBB_SCOP.
5483 * graphite.h (scop_p): Moved...
5484 (graphite_bb.scop): New field.
5485 (graphite_bb.iteration_domain, GBB_DOMAIN, scop.nb_params,
5486 scop.nb_loops, scop.dim_domain, SCOP_NB_LOOPS, SCOP_NB_PARAMS,
5487 SCOP_DIM_DOMAIN, SCOP_STMTS): Removed.
5488 (scop_nb_params, scop_nb_loops, scop_dim_domain, gbb_dim_domain,
5489 scop_loop_index): New.
5490 * Makefile.in (tree-data-ref.o): Depends on graphite.h.
5492 2007-01-05 Sebastian Pop <sebastian.pop@inria.fr>
5494 * Merge from mainline (r117661:120450).
5496 2006-10-12 Sebastian Pop <sebastian.pop@inria.fr>
5498 * tree-scalar-evolution.c (instantiate_parameters_1): Don't stop
5499 at the first declaration outside the varying loop, instantiate as
5501 * tree-chrec.c (for_each_scev_op): New.
5502 * tree-chrec.h (for_each_scev_op): Declared.
5503 * tree-ssa-loop.c (pass_graphite_trans): Don't dump the function.
5504 * tree-data-ref.c (get_references_in_stmt,
5505 find_data_references_in_stmt): New, from trunk.
5506 (find_data_references_in_loop): Use get_references_in_stmt
5507 and find_data_references_in_loop, modified as in trunk.
5508 (build_access_matrix_with_af): New.
5509 * tree-data-ref.h (data_reference): Add a field access_matrix.
5510 (data_ref_loc): New, as in trunk.
5511 * graphite.c (print_graphite_bb, bb_in_scop_p, stmt_in_scop_p,
5512 invariant_in_scop_p, param_index, scan_tree_for_params,
5513 scop_loop_index, build_scop_loop_nests, build_scop_domain, irp_data,
5514 idx_record_param, idx_record_params, build_access_matrix,
5515 build_scop_data_accesses, build_scop_canonical_schedules,
5516 build_graphite_bb, build_scop_bbs, find_params_in_bb,
5517 build_scop_params): New.
5518 * graphite.h (graphite_bb): New.
5519 (scop): Add fields static_schedule, params, loop_nest,
5521 * lambda.h: Declare vecs of lambda_matrix.
5522 * tree-flow.h (print_loop_ir_bb): Declared.
5523 * tree-cfg.c (print_loop_ir_bb): New.
5524 (print_loop): Use print_loop_ir_bb.
5526 2006-10-12 Sebastian Pop <pop@cri.ensmp.fr>
5528 * Merge from mainline (r115016:117632).
5530 2006-10-11 Sebastian Pop <pop@cri.ensmp.fr>
5532 * graphite.c (debug_scops): Adjust definition for avoiding a bootstrap
5533 break due to a warning.
5535 2006-10-10 Sebastian Pop <pop@cri.ensmp.fr>
5537 * graphite.c (print_scops, debug_scops): New.
5538 (graphite_transform): Renamed graphite_find_transform.
5539 * graphite.h (debug_scops): Declared.
5541 2006-08-17 Sebastian Pop <pop@cri.ensmp.fr>
5543 * tree-match.c: Reformat following the GNU style.
5544 * tree-match.h: Reformat following the GNU style.
5545 * tree-pattern.h: Removed empty file.
5546 * Makefile.in: Remove references to tree-pattern.h.
5547 * tree-check.c: Reformat following the GNU style.
5548 (execute_tree_check): Move gate condition code to...
5549 (gate_tree_check): ...here. New function.
5550 (pass_check): Use the gate function.
5552 2006-07-04 Nic Volanschi <nic.volanschi@free.fr>
5554 * tree-pattern.h: New. Tree pattern matching and checking using
5556 * tree-check.c: New. Tree/CFG checking pass.
5557 * tree-match.c: New. Library for tree pattern matching.
5558 * opts.c, common.opt: Add options --ftree-check & --ftree-checks.
5559 * toplev.c, flags.h: Add globals for tree-check pass.
5560 * Makefile.in: Integrate the files in tree-check pass.
5561 * timevar.def, tree-optimize.c, tree-pass.h: Register tree-check pass.
5562 * pretty-print.c, pretty-print.h, tree-pretty-print.c, diagnostic.h:
5563 Introduce a "lazy" pretty-print mode.
5564 * tree.c, tree.h: Add tree_name.
5566 2006-07-04 Sebastian Pop <pop@cri.ensmp.fr>
5568 * doc/invoke.texi (-fgraphite): Correct typo.
5569 * tree-scalar-evolution.c (number_of_iterations_for_all_loops): Update
5570 use of print_loop_ir.
5571 * testsuite/gcc.dg/graphite/scop-1.c: New.
5572 * testsuite/gcc.dg/graphite/scop-2.c: New.
5573 * testsuite/gcc.dg/graphite/graphite.exp: New.
5574 * graphite.c: Include domwalk.h.
5575 (print_scop): Print only the entry and exit blocks.
5576 (debug_scop): No longer static.
5577 (affine_expr): Fix formating. Return also true when the expression is
5579 (stmt_simple_for_scop_p): Fix formating.
5580 (build_scops): Use domwalk.
5581 (get_loop_start, end_scop, test_for_scop_bound): New.
5582 (graphite_transform_loops): Avoid printing on stderr.
5583 * graphite.h (debug_scop): Declared.
5584 * tree-flow.h (debug_loop_ir, print_loop_ir): Update declarations.
5585 * Makefile.in (graphite.o): Depend on domwalk.h.
5586 * tree-cfg.c (print_loop, print_pred_bbs, print_succ_bbs): Remove
5587 declarations for static functions.
5588 (print_loop, print_loop_ir, debug_loop_ir): Use an extra parameter for
5589 controlling output verbosity.
5591 2006-06-26 Sebastian Pop <pop@cri.ensmp.fr>
5592 Plesco Alexandru <shurikx@gmail.com>
5594 * doc/invoke.texi (-fgraphite): Document.
5595 * tree-pass.h (pass_graphite_transforms): Declared.
5596 * timevar.def (TV_GRAPHITE_TRANSFORMS): New.
5597 * tree-ssa-loop.c (graphite_transforms, gate_graphite_transforms): New.
5598 (pass_graphite_transforms): Defined.
5599 * tree-data-ref.c (free_data_ref, data_reference): Extern.
5600 * tree-data-ref.h (free_data_ref, data_reference): Declared.
5601 * graphite.c, graphite.h: New.
5602 * common.opt (fgraphite): Declared.
5603 * tree-flow.h (graphite_transform_loops): Declared.
5604 * Makefile.in (OBJS-common): Add graphite.o.
5605 (graphite.o): New rule.
5606 * passes.c (pass_graphite_transforms): Scheduled.