1 2009-09-17 David Edelsohn <edelsohn@gnu.org>
3 * testsuite/gcc.dg/graphite/interchange-mvt.c: New File.
4 * testsuite/gcc.dg/graphite/scop-dsyrk.c: New File.
5 * testsuite/gcc.dg/graphite/scop-dsyr2k.c: New File.
6 * testsuite/gcc.dg/graphite/scop-mvt.c: New File.
7 * testsuite/gcc.dg/graphite/scop-sor.c: New File.
9 2009-09-17 Li Feng <nemokingdom@gmail.com>
12 * graphite-dependences.c (poly_drs_may_alias_p): Adjust definition.
13 (pddr_original_scattering): Make sure 2 pdr2 in the same base object set.
14 (graphite_carried_dependence_level_k): Ditto.
15 * graphite-poly.c (new_poly_dr): Add init of PDR_BASE_OBJECT_SET.
16 * graphite-poly.h (struct poly_dr): Add member dr_base_object_set.
17 (new_poly_dr): Adjust declaration.
18 * graphite-sese-to-poly.c (free_data_refs_aux): New.
19 (free_gimple_bb): Added free_data_refs_aux.
20 (build_poly_dr): Add dr_base_object_set.
21 (partition_drs_to_sets): New.
22 (dr_same_base_object_p): New.
23 (build_alias_set_for_drs): New.
24 (build_base_object_set_for_drs): New.
25 (build_scop_drs): Add build_base_obj_set_for_drs.
26 * graphite-sese-to-poly.h: Added #define for alias set number index and
27 base object set index.
28 * libgomp/testsuite/libgomp.graphite/force-parallel-6.c: Refine tests.
29 * libgomp/testsuite/libgomp.graphite/pr4118.c: New.
31 2009-09-16 Alexander Monakov <amonakov@ispras.ru>
33 * graphite-sese-to-poly.c (pdr_add_data_dimensions): Add bounds only
34 for ARRAY_REFs. Use array_ref_{low,up}_bound to determine bounds.
36 2009-09-14 Sebastian Pop <sebastian.pop@amd.com>
38 * graphite-sese-to-poly.c (struct irp_data): Removed.
39 (idx_record_params): Removed.
40 (find_params_in_bb): Scan for parameters the access functions; don't
41 parse the tree representation.
43 2009-09-14 Sebastian Pop <sebastian.pop@amd.com>
45 * tree-ssa-loop.c (gate_graphite_transforms): Disable Graphite
46 passes at -O1 and below.
48 2009-09-14 Sebastian Pop <sebastian.pop@amd.com>
50 * graphite-blocking.c: Fix order of includes: tree-chrec.h, then
51 tree-scalar-evolution.h, and then tree-data-ref.h.
52 * graphite-clast-to-gimple.c: Same.
53 * graphite-dependences.c: Same.
54 * graphite-interchange.c: Same.
55 * graphite-poly.c: Same.
56 * graphite-scop-detection.c: Same.
57 * graphite-sese-to-poly.c: Same.
59 * lambda-code.c: Same.
60 * matrix-reorg.c: Same.
61 * tree-data-ref.c: Same.
62 * tree-if-conv.c: Same.
63 * tree-loop-distribu: Same.: Same.
64 * tree-loop-linear.c: Same.
65 * tree-parloops.c: Same.
66 * tree-predcom.c: Same.
67 * tree-vect-patterns.c: Same.
69 2009-09-02 Sebastian Pop <sebastian.pop@amd.com>
71 Partially revert the previous patch, except the following.
72 * tree-scalar-evolution.c (instantiate_scev_not): Adapted to pass
73 as parameters the operands of the not expression.
75 2009-09-01 Sebastian Pop <sebastian.pop@amd.com>
77 * tree-scalar-evolution.c (instantiate_scev_assign): New.
78 Do not call analyze_scalar_evolution on assignments.
79 (instantiate_scev_phi): Call analyze_scalar_evolution.
80 (instantiate_scev_name): Call instantiate_scev_assign and
82 (instantiate_scev_not): Adapted to pass as parameters the operands
83 of the not expression.
85 2009-09-01 Sebastian Pop <sebastian.pop@amd.com>
87 * tree-scalar-evolution.c (instantiate_scev_binary): Adapted
88 to pass as parameters the operands of the binary expression.
90 2009-09-01 Sebastian Pop <sebastian.pop@amd.com>
92 * tree-scalar-evolution.c (instantiate_scev_bitnot): Renamed
93 instantiate_scev_not. Handle NEGATE_EXPR.
94 (instantiate_scev_r): Handle NEGATE_EXPR.
96 2009-09-01 Sebastian Pop <sebastian.pop@amd.com>
98 * tree-scalar-evolution.c (instantiate_scev_1): Renamed
100 (instantiate_scev_r): Move code in instantiate_scev_2
101 and instantiate_scev_1.
103 2009-09-01 Sebastian Pop <sebastian.pop@amd.com>
105 * tree-scalar-evolution.c (instantiate_scev_3): New.
106 (instantiate_scev_1): Move code in instantiate_scev_3.
108 2009-09-01 Sebastian Pop <sebastian.pop@amd.com>
110 * tree-scalar-evolution.c (instantiate_scev_poly): New.
111 (instantiate_scev_1): Move code in instantiate_scev_poly.
113 2009-09-01 Sebastian Pop <sebastian.pop@amd.com>
115 * tree-scalar-evolution.c (instantiate_scev_bitnot): New.
116 (instantiate_scev_1): Move code in instantiate_scev_bitnot.
118 2009-09-01 Sebastian Pop <sebastian.pop@amd.com>
120 * tree-scalar-evolution.c (instantiate_scev_convert): New.
121 (instantiate_scev_1): Move code in instantiate_scev_convert.
123 2009-09-01 Sebastian Pop <sebastian.pop@amd.com>
125 * tree-scalar-evolution.c (instantiate_scev_binary): New.
126 (instantiate_scev_1): Move code in instantiate_scev_binary.
128 2009-09-01 Sebastian Pop <sebastian.pop@amd.com>
130 * tree-scalar-evolution.c (instantiate_scev_name): New.
131 (instantiate_scev_1): Move code in instantiate_scev_name.
133 2009-08-28 Sebastian Pop <sebastian.pop@amd.com>
135 * Merge from mainline (150992:151171).
137 2009-08-25 Sebastian Pop <sebastian.pop@amd.com>
139 * graphite-dependences.c (graphite_legal_transform_bb): Call
140 pbb_remove_duplicate_pdrs.
141 * graphite-poly.c (can_collapse_pdr): Removed.
142 (pdr_find_duplicate): Removed.
143 (can_collapse_pdrs): New.
144 (pbb_remove_duplicate_pdrs): New.
145 (new_poly_dr): Do not look for duplicates.
146 * graphite-poly.h (struct poly_bb): New field pdr_duplicates_removed.
147 (PBB_PDR_DUPLICATES_REMOVED): New.
148 (pbb_remove_duplicate_pdrs): Declared.
150 2009-08-25 Sebastian Pop <sebastian.pop@amd.com>
152 * graphite-interchange.c (pbb_interchange_profitable_p): Adjust
153 the strides by multiplying by PDR_NB_REFS.
154 * graphite-poly.c (can_collapse_pdr): New.
155 (pdr_find_duplicate): New.
156 (new_poly_dr): Call pdr_find_duplicate. Collapse duplicate PDRs.
157 Initialize PDR_NB_REFS.
158 * graphite-poly.h (struct poly_dr): Add field nb_refs.
160 (new_poly_dr): Number of subscripts is a graphite_dim_t.
162 2009-08-25 Sebastian Pop <sebastian.pop@amd.com>
164 Revert one of the previous commits:
165 * graphite-dependences.c (graphite_legal_transform_bb): Avoid
166 the computation of symmetric data dependence relations.
167 (dependency_between_pbbs_p): Same.
169 2009-08-25 Sebastian Pop <sebastian.pop@amd.com>
172 * graphite-poly.c (apply_poly_transforms): Remove legality test before
175 2009-08-25 Sebastian Pop <sebastian.pop@amd.com>
177 * graphite-dependences.c (pddr_original_scattering): Return NULL
178 for read-read dependence relations.
179 * graphite-poly.h (enum poly_dr_type): Fix comment.
182 (pdr_may_write_p): New.
184 2009-08-25 Sebastian Pop <sebastian.pop@amd.com>
186 * graphite-poly.h (enum POLY_DR_TYPE): Renamed poly_dr_type.
187 (struct poly_dr): Same.
189 * graphite-poly.c (new_poly_dr): Same.
191 2009-08-25 Konrad Trifunovic <konrad.trifunovic@gmail.com>
192 Sebastian Pop <sebastian.pop@amd.com>
194 * graphite-blocking.c (pbb_strip_mine_loop_depth): Renamed
195 pbb_strip_mine_time_depth. Changed the implementation so that
196 transformation is expressed as a transformation on
197 time (scatttering) dimensions. Also, ensures that the 2d+1
198 scheduling format is preserved.
199 (pbb_strip_mine_profitable_p): Profitability is based on the
200 iteration number of a given time (scattering) dimension,
201 and not on a original loop depth dimension.
202 (pbb_strip_mine): Call pbb_number_of_iterations_at_time.
203 (pbb_do_strip_mine): Call psct_dynamic_dim.
204 * graphite-poly.c (pbb_number_of_iterations_at_time): New.
205 * graphite-poly.h (pbb_number_of_iterations_at_time): Declared.
206 (pbb_nb_dynamic_scattering_transform): New.
207 (psct_dynamic_dim): New.
209 2009-08-25 Konrad Trifunovic <konrad.trifunovic@gmail.com>
211 * graphite-ppl.c (ppl_max_for_le): Renamed ppl_max_for_le_pointset.
212 * graphite-ppl.h (ppl_max_for_le): Renamed ppl_max_for_le_pointset.
213 * graphite-poly.c (pbb_number_of_iterations): Rename ppl_max_for_le.
214 * graphite-interchange.c (build_linearized_memory_access): Same.
215 (memory_stride_in_loop): Same.
217 2009-08-25 Sebastian Pop <sebastian.pop@amd.com>
219 * graphite-dependences.c (pddr_original_scattering): New.
220 (graphite_legal_transform_dr): Call pddr_original_scattering.
223 * graphite-dependences.h (dot_deps): Declared.
224 * graphite-poly.c (new_poly_dr): Initialize PDR_ID.
225 (print_pdr): Print PDR_ID.
226 * graphite-poly.h (struct poly_dr): Add field id.
229 * graphite-scop-detection.c (dot_all_scops_1): Cleanup comment.
231 2009-08-22 Sebastian Pop <sebastian.pop@amd.com>
233 * graphite-dependences.c (graphite_carried_dependence_level_k): Do
234 not delete the original dependence relation.
236 2009-08-21 Sebastian Pop <sebastian.pop@amd.com>
238 * graphite-dependences.c (graphite_legal_transform_bb): Avoid
239 the computation of symmetric data dependence relations.
240 (dependency_between_pbbs_p): Same.
242 2009-08-21 Sebastian Pop <sebastian.pop@amd.com>
244 * graphite-dependences.c (new_poly_dr_pair): Renamed new_poly_ddr.
245 (eq_poly_dr_pair_p): Renamed eq_poly_ddr_p.
246 (hash_poly_dr_pair_p): Renamed hash_poly_ddr_p.
247 (free_poly_ddr): New.
248 (pddr_is_empty): New.
249 (dependence_polyhedron_1): Now returns a poly_ddr_p.
250 (dependence_polyhedron): Same. Remove useless gcc_assert.
252 (graphite_legal_transform_dr): Call pddr_is_empty and free_poly_ddr.
253 (graphite_carried_dependence_level_k): Call pddr_is_empty.
254 * graphite-dependences.h (enum poly_dependence_kind): New.
255 (poly_dr_pair): Renamed poly_ddr. Added a field kind.
256 (PDRP_SOURCE): Renamed PDDR_SOURCE.
257 (PDRP_SINK): Renamed PDDR_SINK.
258 (PDRP_DDP): Renamed PDDR_DDP.
260 (free_poly_ddr): Declared.
261 * graphite-poly.c (new_scop): Use the new hash function names.
262 * graphite-poly.h (struct scop): Renamed field original_pdr_pairs
264 (SCOP_ORIGINAL_PDR_PAIRS): Renamed SCOP_ORIGINAL_PDDRS.
266 2009-08-21 Sebastian Pop <sebastian.pop@amd.com>
268 * Merge from mainline (150764:150992).
270 2009-08-18 Sebastian Pop <sebastian.pop@amd.com>
272 * cfgloopmanip.c (create_empty_loop_on_edge): Generate upper
273 bounds with LT_EXPR to make niter analysis more precise on code
274 generated by Graphite.
276 2009-08-18 Sebastian Pop <sebastian.pop@amd.com>
278 * graphite-dependences.c (graphite_legal_transform_dr): Fix formatting.
279 (graphite_legal_transform_bb): Same.
280 (poly_drs_may_alias_p): Same.
282 2009-08-15 Sebastian Pop <sebastian.pop@amd.com>
285 * graphite-ppl.c (ppl_max_for_le): Correct the use of
286 ppl_Pointset_Powerset_C_Polyhedron_maximize.
288 2009-08-13 Sebastian Pop <sebastian.pop@amd.com>
290 * graphite-poly.c (print_pbb): Print PBB index.
292 2009-08-13 Sebastian Pop <sebastian.pop@amd.com>
294 * Merge from mainline (r150672:150764).
296 2009-08-13 Sebastian Pop <sebastian.pop@amd.com>
298 * graphite-interchange.c (ppl_max_for_le): Moved...
299 * graphite-poly.c (pbb_number_of_iterations): Call ppl_max_for_le.
300 * graphite-ppl.c (ppl_max_for_le): ... here.
301 * graphite-ppl.h (ppl_max_for_le): Declared.
303 2009-08-12 Sebastian Pop <sebastian.pop@amd.com>
305 * Merge from mainline (r150372:150672).
307 2009-08-11 Sebastian Pop <sebastian.pop@amd.com>
310 * sese.c (convert_for_phi_arg): New.
311 (add_guard_exit_phis): Use convert_for_phi_arg.
313 * testsuite/gfortran.dg/graphite/id-17.f: New.
315 2009-08-11 Sebastian Pop <sebastian.pop@amd.com>
317 * graphite-sese-to-poly.c (pdr_add_data_dimensions): Dont add
318 unknown subscript upper bounds.
320 * testsuite/gcc.dg/graphite/interchange-6.c: Un-XFAIL.
322 2009-08-11 Sebastian Pop <sebastian.pop@amd.com>
323 Pranav Garg <pranav.garg2107@gmail.com>
325 * graphite-interchange.c (gather_access_strides): Removed.
326 (ppl_max_for_le): New.
327 (build_linearized_memory_access): New.
328 (memory_stride_in_loop): New.
329 (pbb_interchange_profitable_p): Reimplemented.
330 * graphite-ppl.h (ppl_new_id_map): New.
331 (ppl_interchange): New.
333 * testsuite/gcc.dg/graphite/interchange-6.c: XFAILed.
335 2009-08-11 Sebastian Pop <sebastian.pop@amd.com>
337 * graphite-interchange.c (compute_subscript): Removed.
338 (compute_array_size_cstr): Removed.
339 (compute_array_size_poly): Removed.
340 (compute_array_size): Removed.
341 (gather_access_strides_poly): Removed.
342 (gather_access_strides): Empty.
344 2009-08-11 Sebastian Pop <sebastian.pop@amd.com>
346 * graphite-dependences.c (dependence_polyhedron_1): Replace
347 pdr_nb_subscripts with PDR_NB_SUBSCRIPTS.
348 (graphite_legal_transform_dr): Same.
349 (graphite_carried_dependence_level_k): Same.
350 * graphite-poly.c (new_poly_dr): Add a parameter nb_subscripts.
351 Initialize PDR_NB_SUBSCRIPTS.
352 (print_pdr_access_layout): Replace pdr_nb_subscripts with
354 * graphite-poly.h (struct poly_dr): Add nb_subscripts field.
355 (PDR_NB_SUBSCRIPTS): New.
356 (pdr_nb_subscripts): Removed.
357 (pdr_dim): Simplified.
358 * graphite-sese-to-poly.c (build_poly_dr): Replace pdr_nb_subscripts
359 with PDR_NB_SUBSCRIPTS.
361 2009-08-11 Sebastian Pop <sebastian.pop@amd.com>
363 * graphite-interchange.c (compute_array_size): Remove use of
365 * graphite-poly.c (new_poly_dr): Remove argument data_container.
366 Do not initialize PDR_DATA_CONTAINER.
367 (print_pdr): Do not print PDR_DATA_CONTAINER.
368 * graphite-poly.h (struct poly_dr): Remove data_container field.
369 (PDR_DATA_CONTAINER): Removed.
370 * graphite-sese-to-poly.c (pdr_add_data_dimensions): Remove use of
372 (build_poly_dr): Same.
374 2009-08-11 Sebastian Pop <sebastian.pop@amd.com>
376 * testsuite/gcc.dg/graphite/interchange-9.c: New.
378 2009-08-05 Konrad Trifunovic <konrad.trifunovic@gmail.com>
379 Sebastian Pop <sebastian.pop@amd.com>
381 * graphite-dependences.c (graphite_legal_transform_dr): Work on a
382 copy of the dependence polyhedron. Free the temporary objects.
383 (graphite_carried_dependence_level_k): Free unused objects before
386 * testsuite/gcc.dg/graphite/interchange-1.c: XFAILed.
387 * testsuite/gcc.dg/graphite/interchange-2.c: XFAILed.
388 * testsuite/gcc.dg/graphite/interchange-3.c: XFAILed.
389 * testsuite/gcc.dg/graphite/interchange-4.c: XFAILed.
390 * testsuite/gcc.dg/graphite/interchange-7.c: XFAILed.
392 2009-08-05 Sebastian Pop <sebastian.pop@amd.com>
394 * graphite-blocking.c (scop_do_strip_mine): Call store_scattering.
395 Early return without analyzing the data dependences if no
396 transform has been done. Call restore_scattering if the transform
398 (graphite-interchange.c): Same.
399 * graphite-poly.c (print_scattering_function): Test for PBB_TRANSFORMED.
400 (graphite_read_transforms): Initialize PBB_TRANSFORMED.
401 (apply_poly_transforms): Do not gcc_assert that
402 the transform is legal.
403 (new_poly_bb): Initialize PBB_TRANSFORMED, PBB_SAVED, and PBB_ORIGINAL.
404 Do not initialize PBB_NB_SCATTERING_TRANSFORM, PBB_NB_LOCAL_VARIABLES,
405 PBB_TRANSFORMED_SCATTERING, and PBB_ORIGINAL_SCATTERING.
406 (free_poly_dr): Free PBB_TRANSFORMED, PBB_SAVED, and PBB_ORIGINAL.
407 * graphite-poly.h (struct poly_scattering): New.
408 (struct poly_bb): Add original, transformed, and saved fields.
409 Remove transformed_scattering, original_scattering, nb_local_variables,
410 and nb_scattering_transform fields.
411 (PBB_ORIGINAL, PBB_TRANSFORMED, PBB_SAVED): New.
412 (poly_scattering_new): New.
413 (poly_scattering_free): New.
414 (poly_scattering_copy): New.
415 (store_scattering_pbb): New.
416 (store_scattering): New.
417 (restore_scattering_pbb): New.
418 (restore_scattering): New.
419 * graphite-sese-to-poly.c (build_pbb_scattering_polyhedrons):
420 Initialize PBB_TRANSFORMED and PBB_ORIGINAL.
422 2009-08-05 Sebastian Pop <sebastian.pop@amd.com>
424 * graphite-poly.c (print_pbb): Add parentheses in the pretty print.
427 2009-08-05 Sebastian Pop <sebastian.pop@amd.com>
429 * Makefile.in (graphite.o): Depends on PREDICT_H.
430 * graphite.c: Include predict.h.
431 (graphite_finalize): Call tree_estimate_probability.
432 * predict.c (predict_loops): Do not call scev_initialize and
434 (tree_estimate_probability_bb): New.
435 (tree_estimate_probability): Do not initialize loops: move that
436 code to the driver. Call tree_estimate_probability_bb.
437 (tree_estimate_probability_driver): New.
438 (pass_profile): Use tree_estimate_probability_driver.
439 * predict.h (tree_estimate_probability): Declared.
441 2009-08-05 Sebastian Pop <sebastian.pop@amd.com>
443 * graphite-clast-to-gimple.c (gloog): Add time to TV_GRAPHITE_CODE_GEN.
444 * graphite-dependences.c (graphite_legal_transform): Add time to
445 TV_GRAPHITE_DATA_DEPS.
446 (dependency_between_pbbs_p): Same.
447 * timevar.def (TV_GRAPHITE_DATA_DEPS, TV_GRAPHITE_CODE_GEN): New.
449 2009-08-03 Sebastian Pop <sebastian.pop@amd.com>
451 * Merge from mainline (r149952:150372).
453 2009-07-28 Sebastian Pop <sebastian.pop@amd.com>
455 * ChangeLog.graphite: Fix indenting, white spaces and 80 columns.
456 * graphite-blocking.c: Same.
457 * graphite-clast-to-gimple.c: Same.
458 * graphite-dependences.c: Same.
459 * graphite-poly.c: Same.
460 * graphite-poly.h: Same.
461 * graphite-ppl.c: Same.
462 * graphite-scop-detection.c: Same.
463 * graphite-sese-to-poly.c: Same.
466 2009-07-28 Sebastian Pop <sebastian.pop@amd.com>
468 * graphite-sese-to-poly.c (loop_entry_phi_arg): New.
469 (remove_simple_copy_phi): New.
470 (remove_invariant_phi): New.
471 (simple_copy_phi_p): New.
472 (reduction_phi_p): New.
473 (gsi_for_ssa_name_def): New.
474 (insert_out_of_ssa_copy): New.
475 (insert_out_of_ssa_copy_on_edge): New.
476 (create_zero_dim_array): New.
477 (scalar_close_phi_node_p): New.
478 (rewrite_close_phi_out_of_ssa): New.
479 (rewrite_phi_out_of_ssa): New.
480 (rewrite_reductions_out_of_ssa): New.
481 (build_poly_scop): Call rewrite_reductions_out_of_ssa.
483 * testsuite/gcc.dg/graphite/id-11.c: New.
484 * testsuite/gcc.dg/graphite/id-15.c: New.
485 * testsuite/gcc.dg/graphite/interchange-1.c: Un-XFAIL.
486 * testsuite/gcc.dg/graphite/interchange-2.c: Un-XFAIL.
487 * testsuite/gcc.dg/graphite/interchange-3.c: Un-XFAIL.
488 * testsuite/gcc.dg/graphite/interchange-4.c: Un-XFAIL.
489 * testsuite/gcc.dg/graphite/interchange-7.c: Un-XFAIL.
490 * testsuite/gcc.dg/graphite/scop-matmult.c: Un-XFAIL.
491 * testsuite/gfortran.dg/graphite/id-13.f: New.
492 * testsuite/gfortran.dg/graphite/id-5.f: New.
494 2009-07-28 Sebastian Pop <sebastian.pop@amd.com>
496 * graphite-clast-to-gimple.c (graphite_loop_normal_form): Do not
497 check that nb_reductions_in_loop is zero.
498 * graphite-scop-detection.c (harmful_stmt_in_bb): Don't filter out
500 (nb_reductions_in_loop): Removed.
501 (graphite_can_represent_loop): Do not call nb_reductions_in_loop.
502 * graphite-sese-to-poly.c (phi_node_is_iv): Removed.
503 (bb_contains_non_iv_scalar_phi_nodes): Removed.
504 (scop_contains_non_iv_scalar_phi_nodes): Removed.
505 (build_poly_scop): Do not call scop_contains_non_iv_scalar_phi_nodes.
507 2009-07-28 Sebastian Pop <sebastian.pop@amd.com>
509 * graphite-clast-to-gimple.c (build_cloog_prog): Do not code generate
510 statements that have an empty iteration domain.
511 * testsuite/gfortran.dg/graphite/id-16.f: New.
513 2009-07-28 Sebastian Pop <sebastian.pop@amd.com>
515 * tree-scalar-evolution.c (instantiate_scev_1): Return
516 chrec_dont_know when the result is not above instantiate_below.
517 * graphite-scop-detection.c (scopdet_basic_block_info): Fix formatting.
518 * graphite-sese-to-poly.c (create_linear_expr_from_tree): Assert that
519 the tree has a known scalar evolution.
520 * testsuite/gfortran.dg/graphite/id-14.f: New.
521 * testsuite/gfortran.dg/graphite/id-15.f: New.
523 2009-07-28 Sebastian Pop <sebastian.pop@amd.com>
525 * sese.c (rename_variables_in_stmt): Pass in an extra parameter
527 (rename_variables): Keep inserting renames after the ones already
530 2009-07-28 Sebastian Pop <sebastian.pop@amd.com>
532 * graphite-sese-to-poly.c (compare_bb_depths): New.
533 (graphite_sort_dominated_info): New.
534 (build_scop_bbs_1): Call graphite_sort_dominated_info.
535 (build_scop_scattering): Fix comment.
537 2009-07-28 Sebastian Pop <sebastian.pop@amd.com>
539 * graphite.c (graphite_finalize): Call print_loops instead of
540 dump_function_to_file.
541 * testsuite/gcc.dg/graphite/graphite.exp: Fix formatting.
542 * testsuite/gcc.dg/graphite/pr35356-1.c: New. Look for the number of
543 loops generated in the graphite output file.
544 * testsuite/gcc.dg/graphite/pr35356-2.c: New.
545 * testsuite/gcc.dg/graphite/pr35356-3.c: New. XFAILed for now.
546 * testsuite/gfortran.dg/graphite/id-12.f: New.
548 2009-07-24 Li Feng <nemokingdom@gmail.com>
550 * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-8.c:
553 2009-07-24 Li Feng <nemokingdom@gmail.com>
554 Tobias Grosser <grosser@fim.uni-passau.de>
556 * graphite-sese-to-poly.c (pdr_add_alias_set): Use data reference's
557 alias set number build alias in ACCESSES polyhedron.
558 (build_alias_set_for_drs): New.
559 (build_pbb_drs): Added build_alias_set_for_drs.
560 * graphite-dependences.c (poly_drs_may_alias_p): New.
561 (graphite_carried_dependence_level_k): Check alias information
562 before building polyhedron.
564 2009-07-24 Tobias Grosser <grosser@fim.uni-passau.de>
566 * Makefile.in (lambda-code.o): Fix formatting.
568 2009-07-24 Tobias Grosser <grosser@fim.uni-passau.de>
570 * Merge from mainline (r149350-149952)
572 2009-07-18 Tobias Grosser <grosser@fim.uni-passau.de>
574 * graphite-poly.c (apply_poly_transforms): Move strip_mine
575 before interchange to prepare for loop blocking.
577 2009-07-18 Tobias Grosser <grosser@fim.uni-passau.de>
579 * graphite-poly.c (apply_poly_transforms): Add checks after every
581 * graphite-sese-to-poly.c (build_poly_scop): Remove check, as already
582 done in apply_poly_transforms.
584 2009-07-17 Konrad Trifunovic <konrad.trifunovic@gmail.com>
586 * graphite-dependences.c (build_lexicographically_gt_constraint):
587 Replace RES parameter with *RES.
588 (dependence_polyhedron_1): Pass an address of the parameter RES
589 instead of value of RES.
591 2009-07-16 Sebastian Pop <sebastian.pop@amd.com>
593 * graphite.c (graphite_finalize): Fix comment.
594 (graphite_transform_loops): Reset scev info after code generation
597 2009-07-16 Sebastian Pop <sebastian.pop@amd.com>
599 * graphite.c (graphite_finalize): Call scev_reset.
601 2009-07-16 Sebastian Pop <sebastian.pop@amd.com>
603 * graphite-clast-to-gimple.c (compute_cloog_iv_types): Do not create
604 GBB_CLOOG_IV_TYPES hash table twice.
605 * graphite-sese-to-poly.c (free_gimple_bb): Call free_data_refs.
606 (add_condition_to_domain): Clear GMP values.
608 2009-07-16 Sebastian Pop <sebastian.pop@amd.com>
610 * graphite-dependences.c: Fix formatting.
611 * graphite-poly.c (free_poly_dr): Also free PDR_DATA_CONTAINER.
612 (pbb_number_of_iterations): Free ppl_Linear_Expression.
613 * graphite-sese-to-poly.c: Fix formatting.
614 * graphite.c (graphite_transform_loops): Create the hash table
615 after the early return.
617 2009-07-16 Sebastian Pop <sebastian.pop@amd.com>
619 * testsuite/gcc.dg/graphite/id-14.c: New.
620 * testsuite/gcc.dg/graphite/pr40157.c: New.
621 * testsuite/gfortran.dg/graphite/id-11.f: New.
623 2009-07-16 Sebastian Pop <sebastian.pop@amd.com>
625 * graphite-sese-to-poly.c (nb_pbbs_in_loops): New.
626 (build_poly_scop): Return false when there are no pbbs within
627 loops to avoid to pass to cloog scops with no loops.
629 2009-07-16 Sebastian Pop <sebastian.pop@amd.com>
631 * graphite-sese-to-poly.c (build_pbb_scattering_polyhedrons): Avoid
632 useless test "i % 2".
633 (build_pbb_scattering_polyhedrons): Fix formatting.
634 (build_poly_dr): Same.
635 * graphite.c (graphite_transform_loops): Restructure.
637 2009-07-14 Razya Ladelsky <razya@il.ibm.com>
639 * tree-ssa-loop-manip.c (rewrite_phi_with_iv): Remove
640 reduction_list parameter.
641 (rewrite_all_phi_nodes_with_iv): Same.
642 (canonicalize_loop_ivs): Same.
643 * tree-parloops.c (struct brli): Removed.
644 (build_reduction_list_info): Removed.
645 (build_new_reduction): New.
646 (analyze_reduction_list): Removed.
647 (gather_scalar_reductions): Find reductions instead of phi
648 nodes that can't be canonicalized.
649 (try_create_reduction_list): Remove reduction_list parameter.
650 (gen_parallel_loop): Same.
651 (parallelize_loops): Remove analyze_reductions variable,
652 initialization and free.
653 Change reduction_list htab initialization to reduction_info
654 elements instead of ssa names.
655 Call try_create_reduction_list and gen_parallel_loop without
656 analyzed_reduction argument.
657 * graphite-clast-to-gimple (graphite_loop_normal_form): Call
658 canonicalize_loop_ivs with one less argument.
659 * tree-flow.h (canonicalize_loop_ivs): Remove one argument.
661 2009-07-14 Konrad Trifunovic <konrad.trifunovic@gmail.com>
663 * graphite-dependences.c (new_poly_dr_pair): New.
664 (dependence_polyhedron): Renamed into dependence_polyhedron_1.
665 (new_poly_dr_pair): New.
666 (eq_poly_dr_pair_p): New.
667 (hash_poly_dr_pair_p): New.
668 * graphite-dependences.h (struct poly_dr_pair): New.
669 (eq_poly_dr_pair_p): Declared.
670 (hash_poly_dr_pair_p): Declared.
671 * graphite-poly.c (new_scop): Initialize SCOP_ORIGINAL_PDR_PAIRS.
672 (free_scop): Free SCOP_ORIGINAL_PDR_PAIRS.
673 * graphite-poly.h (struct scop): Add original_pdr_pairs field.
674 * Makefile.in (graphite-poly.o): Add dependence on
675 graphite-dependences.h.
677 2009-07-14 Sebastian Pop <sebastian.pop@amd.com>
679 * graphite-scop-detection.c (graphite_can_represent_scev): Do not let
680 polynomials of degree > 1 pass to Graphite.
681 * tree-chrec.c (scev_is_linear_expression): Call
682 evolution_function_is_affine_multivariate_p.
683 * testsuite/gfortran.dg/graphite/id-10.f90: New.
685 2009-07-14 Sebastian Pop <sebastian.pop@amd.com>
687 * tree-scalar-evolution.c (compute_overall_effect_of_inner_loop):
688 Instantiate scevs varying in outer loops.
689 * testsuite/gfortran.dg/graphite/id-9.f: Correct testcase.
691 2009-07-14 Sebastian Pop <sebastian.pop@amd.com>
693 * graphite-sese-to-poly.c (build_loop_iteration_domains): Do not insert
694 redundant constraint.
696 2009-07-14 Sebastian Pop <sebastian.pop@amd.com>
698 * testsuite/gcc.dg/graphite/graphite.exp: Fix comments.
699 * testsuite/gfortran.dg/graphite/graphite.exp: Trigger actions
700 based on the file names as in the C testsuite.
701 * testsuite/gfortran.dg/graphite/block-1.f90: Fix patterns.
702 * testsuite/gfortran.dg/graphite/block-2.f: Same.
703 * testsuite/gfortran.dg/graphite/block-3.f90: Same.
704 * testsuite/gfortran.dg/graphite/block-4.f90: Same.
705 * testsuite/gfortran.dg/graphite/id-1.f90: Same.
706 * testsuite/gfortran.dg/graphite/id-2.f90: Same.
707 * testsuite/gfortran.dg/graphite/id-3.f90: Same.
708 * testsuite/gfortran.dg/graphite/id-4.f90: Same.
709 * testsuite/gfortran.dg/graphite/id-6.f: Same.
710 * testsuite/gfortran.dg/graphite/id-9.f: Same.
711 * testsuite/gfortran.dg/graphite/interchange-1.f: Same.
712 * testsuite/gfortran.dg/graphite/interchange-2.f: Same.
713 * testsuite/gfortran.dg/graphite/scop-1.f: Same.
715 2009-07-14 Sebastian Pop <sebastian.pop@amd.com>
717 * sese.c (expand_scalar_variables_call): New.
718 (expand_scalar_variables_ssa_name): Handle calls in expander.
720 2009-07-13 Sebastian Pop <sebastian.pop@amd.com>
722 * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-6.c:
723 Expect to see the pattern twice.
724 * testsuite/gcc.dg/graphite/interchange-0.c: Un-XFAIL.
725 * testsuite/gcc.dg/graphite/interchange-5.c: Same.
726 * testsuite/gcc.dg/graphite/interchange-6.c: Same.
728 2009-07-13 Sebastian Pop <sebastian.pop@amd.com>
730 * testsuite/gcc.dg/graphite/id-10.c: New.
731 * testsuite/gcc.dg/graphite/id-12.c: New.
732 * testsuite/gfortran.dg/graphite/id-7.f: New.
733 * testsuite/gfortran.dg/graphite/id-8.f: New.
735 2009-07-13 Sebastian Pop <sebastian.pop@amd.com>
737 * graphite-sese-to-poly.c (pdr_add_data_dimensions): Fix division by
740 2009-07-13 Sebastian Pop <sebastian.pop@amd.com>
742 * sese.c (rename_variables_in_stmt): Call fold_convert during renaming.
744 2009-07-13 Sebastian Pop <sebastian.pop@amd.com>
746 * sese.c (expand_scalar_variables_stmt): Avoid unnecessary expansion.
748 2009-07-10 Sebastian Pop <sebastian.pop@amd.com>
750 * graphite-sese-to-poly.c (pdr_add_memory_accesses): Fix order of
751 building PDR subscripts.
753 2009-07-10 Sebastian Pop <sebastian.pop@amd.com>
755 * graphite-sese-to-poly.c (pdr_add_data_dimensions): Fix the
756 computation of array sizes.
758 2009-07-10 Sebastian Pop <sebastian.pop@amd.com>
760 * graphite-sese-to-poly.c (add_param_constraints): Disabled.
762 2009-07-10 Tobias Grosser <grosser@fim.uni-passau.de>
764 * graphite-dependences.c (map_into_dep_poly, map_dr_into_dep_poly,
765 build_pairwise_constraint, dr_equality_constraints,
766 build_pairwise_scheduling_equality,
767 build_pairwise_scheduling_inequality, lexicographically_gt_p,
768 build_lexicographically_gt_constraint, dependence_polyhedron,
769 graphite_legal_transform_dr, graphite_carried_dependence_level_k):
770 Move from NNC_Polyhedron to C_Polyhedron.
771 * graphite-interchange.c (compute_array_size_poly,
772 gather_access_strides): Dito.
773 * graphite-poly.c (apply_poly_transforms, new_poly_dr, free_poly_bb,
774 free_scop, pbb_number_of_iterations): Dito.
775 * graphite-poly.h (struct poly_dr, pdr_nb_subscripts, struct poly_bb,
776 pbb_dim_iter_domain, struct scop): Dito.
777 * graphite-ppl.c (new_Constraint_System_from_Cloog_Matrix,
778 new_Cloog_Domain_from_ppl_Polyhedron,
779 new_Cloog_Domain_from_ppl_Pointset_Powerset, ppl_set_coef_gmp,
780 ppl_insert_dimensions_pointset, ppl_insert_dimensions_pointset,
781 ppl_strip_loop, ppl_strip_loop, ppl_print_polyhedron_matrix,
782 ppl_print_powerset_matrix, debug_ppl_polyhedron_matrix,
783 debug_ppl_powerset_matrix, ppl_read_polyhedron_matrix): Dito.
784 * graphite-ppl.h (ppl_Pointset_Powerset_C_Polyhedron_t,
785 new_C_Polyhedron_from_Cloog_Matrix, ppl_print_powerset_matrix,
786 debug_ppl_powerset_matrix, ppl_insert_dimensions_pointset): Dito.
787 * graphite-sese-to-poly.c (build_pbb_scattering_polyhedrons,
788 build_loop_iteration_domains, ppl_constraint_type_from_tree_code,
789 add_condition_to_domain, add_condition_to_pbb, build_scop_context,
790 build_scop_iteration_domain, build_poly_dr): Dito
792 2009-07-09 Sebastian Pop <sebastian.pop@amd.com>
794 * testsuite/gcc.dg/graphite/graphite.exp: Added a rule to execute
796 * testsuite/gcc.dg/graphite/run-id-1.c: New.
798 2009-07-09 Sebastian Pop <sebastian.pop@amd.com>
800 * graphite-sese-to-poly.c (build_loop_iteration_domains): Add the
801 positivity constraint on the symbolic number of iterations.
803 2009-07-09 Sebastian Pop <sebastian.pop@amd.com>
805 * graphite-sese-to-poly.c (build_loop_iteration_domains): Rewrite.
807 2009-07-09 Sebastian Pop <sebastian.pop@amd.com>
808 Tobias Grosser <grosser@fim.uni-passau.de>
810 * graphite-clast-to-gimple.c (build_scop_context): Removed.
811 (build_cloog_prog): Directly use SCOP_CONTEXT.
812 * graphite-poly.c (new_scop): Initialize SCOP_CONTEXT.
813 (free_scop): Free SCOP_CONTEXT.
814 (print_scop_context): New.
815 (print_scop): Call print_scop_context.
816 (debug_scop_context): New.
817 * graphite-poly.h (print_scop_context, debug_scop_context): Declared.
818 (struct scop): Added field context.
820 * graphite-sese-to-poly.c (add_param_constraints): New.
821 (build_scop_context): New.
822 (build_poly_scop): Call build_scop_context.
824 2009-07-09 Sebastian Pop <sebastian.pop@amd.com>
826 * graphite-clast-to-gimple.c (gmp_cst_to_tree): Moved...
827 * graphite-ppl.c (ppl_set_inhomogeneous_gmp, ppl_set_coef_gmp): New.
828 (ppl_set_inhomogeneous, ppl_set_coef): Moved...
829 * graphite-ppl.h: Include double-int.h and tree.h.
830 (ppl_set_inhomogeneous_gmp, ppl_set_coef_gmp): Declared.
831 (ppl_set_inhomogeneous, ppl_set_coef): ...here.
832 (gmp_cst_to_tree): ...here. Reimplemented using mpz_get_double_int.
833 (tree_int_to_gmp, ppl_set_inhomogeneous_tree, ppl_set_coef_tree): New.
835 2009-07-09 Sebastian Pop <sebastian.pop@amd.com>
837 * graphite-clast-to-gimple.c (clast_to_gcc_expression_red): Generate
838 POINTER_PLUS_EXPR for pointer types.
839 (clast_to_gcc_expression): Same.
841 2009-07-09 Sebastian Pop <sebastian.pop@amd.com>
843 * graphite-poly.c (print_scattering_function): Early return when
844 PBB_TRANSFORMED_SCATTERING is not initialized.
845 (print_pbb_domain): Early return when PBB_DOMAIN is not initialized.
847 2009-07-08 Sebastian Pop <sebastian.pop@amd.com>
849 * tree-parloops.c (analyze_reduction_list): Remove unused variable
852 2009-07-08 Razya Ladelsky <razya@il.ibm.com>
854 * tree-parloops.c (analyze_reduction_list): Change return
856 (try_create_reduction_list): Move the call to
857 analyze_reduction_list to the beginining.
858 Call reduction_phi with analyzed_reductions as argument
859 instead of reduction_list.
861 2009-07-08 Tobias Grosser <grosser@fim.uni-passau.de>
863 * Merge from mainline (r148296:149346)
865 2009-07-07 Sebastian Pop <sebastian.pop@amd.com>
867 * graphite-scop-detection.c (graphite_can_represent_init): New.
868 (graphite_can_represent_scev): Call graphite_can_represent_init:
869 check that the initial value does not contain multiplications of
871 (stmt_has_simple_data_refs_p): New.
872 (stmt_simple_for_scop_p): Call stmt_simple_for_scop_p.
873 (is_simple_operand): Fix formatting.
874 * graphite-sese-to-poly.c (try_generate_gimple_bb): Fix formatting.
876 2009-07-07 Sebastian Pop <sebastian.pop@amd.com>
878 * testsuite/gcc.dg/graphite/id-13.c: New.
879 * graphite-sese-to-poly.c (graphite_stmt_p): Do not call
880 analyze_scalar_evolution, use scalar_evolution_in_region.
881 (scan_tree_for_params_right_scev): Add extra assert.
882 (parameter_index_in_region_1): Split from parameter_index_in_region.
883 (idx_record_params): Use scalar_evolution_in_region.
884 (find_params_in_bb): Same.
885 (find_scop_parameters): Same.
886 (build_loop_iteration_domains): Same.
887 (create_linear_expr_from_tree): Same.
888 * sese.c (scalar_evolution_in_region): New.
889 * sese.h (scalar_evolution_in_region): Declared.
890 (defined_in_sese_p): New.
891 * tree-scalar-evolution.c (compute_overall_effect_of_inner_loop): Not
893 * tree-scalar-evolution.h (compute_overall_effect_of_inner_loop):
896 2009-07-07 Sebastian Pop <sebastian.pop@amd.com>
898 * Makefile.in: Replace dependences on tree-chrec.h with SCEV_H.
899 TREE_DATA_REF_H also implies SCEV_H.
901 2009-07-07 Sebastian Pop <sebastian.pop@amd.com>
903 * graphite-poly.c (print_scop_params): New.
904 (print_scop): Call print_scop_params.
905 (debug_scop_params): New.
906 * graphite-poly.h (print_scop_params, debug_scop_params): Declared.
908 2009-07-07 Li Feng <nemokingdom@gmail.com>
910 * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-4.c: New.
911 * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-5.c: New.
912 * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-6.c: New.
913 * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-7.c: New.
914 * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-8.c: New.
915 * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-9.c: New.
917 2009-07-07 Li Feng <nemokingdom@gmail.com>
919 * graphite-clast-to-gimple.c (mark_loops_parallel): Dump information
920 for dependency checking part.
921 * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-1.c: Add
922 tests for dependency checking.
923 * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-2.c: Ditto.
924 * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-3.c: Ditto.
925 * testsuite/gcc.dg/graphite/graphite_autopar/graphite_autopar.exp: Add
926 flag -fdump-tree-graphite-all for autopar testsuites.
928 2009-07-06 Sebastian Pop <sebastian.pop@amd.com>
930 * Makefile.in (tree-ssa-loop-manip.o): Depends on langhooks.h.
931 * tree-parloops.c (rewrite_phi_with_iv, rewrite_all_phi_nodes_with_iv,
932 canonicalize_loop_ivs): Moved...
933 * tree-ssa-loop-manip.c: ... here. Include langhooks.h.
935 2009-07-06 Sebastian Pop <sebastian.pop@amd.com>
937 * tree-parloops.c (try_create_reduction_list): Pass an extra
938 argument analyzed_reductions. Call analyze_reduction_list.
939 (gen_parallel_loop): Do not call analyze_reduction_list.
940 (parallelize_loops): Init and finalize analyzed_reductions.
942 2009-07-06 Li Feng <nemokingdom@gmail.com>
944 * testsuite/gcc.dg/graphite/graphite_autopar/graphite_autopar.exp:
945 Added flag -fno-loop-strip-mine for autopar testcase.
947 2009-07-04 Li Feng <nemokingdom@gmail.com>
949 * graphite-dependences.c (graphite_carried_dependence_level_k): Use
950 transformed scattering dimension instead of unmatch orignal when
951 calling dependence_polyhedron.
953 2009-06-30 Sebastian Pop <sebastian.pop@amd.com>
955 * opts.c (decode_options): Enable flag_loop_strip_mine at -O2.
957 2009-06-30 Sebastian Pop <sebastian.pop@amd.com>
959 * graphite-poly.c (pbb_number_of_iterations): Check for returned
960 value 1 from ppl_Pointset_Powerset_NNC_Polyhedron_maximize.
962 2009-06-30 Sebastian Pop <sebastian.pop@amd.com>
964 * graphite-blocking.c (pbb_strip_mine_profitable_p): New.
965 (pbb_do_strip_mine): Call pbb_strip_mine_profitable_p.
966 * graphite-poly.c (pbb_number_of_iterations): New.
967 * graphite-poly.h (pbb_number_of_iterations): Declared.
968 (pbb_iterator_dim, pbb_parameter_dim): New.
970 2009-06-29 Sebastian Pop <sebastian.pop@amd.com>
972 * graphite-clast-to-gimple.c (graphite_create_new_loop): Revert the
973 last commit on type of lower and upper bound of loops.
975 2009-06-29 Li Feng <nemokingdom@gmail.com>
977 * Makefile.in (graphite-clast-to-gimple.o): Added dependence on
978 graphite-dependences.h.
979 * graphite-clast-to-gimple.c (new_bb_pbb_def): New.
980 (mark_bb_with_pbb): New.
981 (get_stmtfor_depth): New.
982 (find_pbb_via_hash): New.
983 (dependency_in_loop_p): New.
984 (mark_loops_parallel): New.
985 (free_aux_in_new_loops): New.
986 (translate_clast): Add parameter BB_PBB_MAPPING. Mark newly created
987 bb with it's relevant pbb. Mark newly created loops. Remove mark
988 innermost loop parallel without checking.
989 (gloog): Add parameter BB_PBB_MAPPING.
990 * graphite-clast-to-gimple.h (struct bb_pbb_def): New.
991 (gloog): Change declaration.
992 (mark_loop_parallel): Make extern.
993 (free_aux_in_new_loops): Declare.
994 (bb_pbb_map_hash): New.
995 (eq_bb_pbb_map): New.
996 * graphite.c (graphite_transform_loops): Added BB_PBB_MAPPING. Trigger
997 auto parallelization when flag_graphite_force_parallel is set.
998 (graphite_finalize): Added free_aux_in_new_loops.
999 * tree-parloops.c (parallelize_loops): Only generate parallel code for
1000 the innermost loop that marked parallel. Use
1001 flag_graphite_force_parallel instead of loop->can_be_parallel.
1002 (loop_parallel_p): Move inner most checking out of function.
1004 2009-06-26 Sebastian Pop <sebastian.pop@amd.com>
1006 * graphite-clast-to-gimple.c (graphite_create_new_loop): Make the
1007 type of lower and upper bound of loops signed long int.
1009 2009-06-26 Sebastian Pop <sebastian.pop@amd.com>
1011 * cfgloopmanip.c (create_empty_loop_on_edge): Gimplify the loop exit
1012 expression outside the loop.
1014 2009-06-26 Sebastian Pop <sebastian.pop@amd.com>
1016 * gcc.dg/graphite/interchange-8.c: New.
1018 2009-06-26 Sebastian Pop <sebastian.pop@amd.com>
1020 * gcc.dg/graphite/interchange-0.c: XFailed.
1021 * gcc.dg/graphite/interchange-5.c: XFailed.
1022 * gcc.dg/graphite/interchange-6.c: XFailed.
1024 2009-06-26 Sebastian Pop <sebastian.pop@amd.com>
1026 * graphite-interchange.c (compute_array_size_poly): The end of the
1027 recursion should return 1.
1029 2009-06-26 Sebastian Pop <sebastian.pop@amd.com>
1031 * graphite-interchange.c (compute_array_size_cstr): Allow the
1032 subscript multiplier to be -1.
1033 (compute_array_size): Use PDR_DATA_CONTAINER and not PDR_ACCESSES.
1034 * graphite-poly.c (new_poly_dr): Takes an extra argument for the
1035 data_container. Initializes PDR_DATA_CONTAINER.
1036 (print_pdr_access_layout): New.
1037 (print_pdr): Call print_pdr_access_layout. Print PDR_DATA_CONTAINER.
1038 * graphite-poly.h (struct poly_dr): Adjust comment. Add a new field
1040 (PDR_DATA_CONTAINER): New.
1041 (new_poly_dr): Update declaration.
1042 * graphite-sese-to-poly.c (pdr_add_data_dimensions): New.
1043 (build_poly_dr): Call pdr_add_data_dimensions.
1045 2009-06-26 Sebastian Pop <sebastian.pop@amd.com>
1047 * graphite-poly.h (struct poly_dr): Fix comment.
1048 * graphite-sese-to-poly.c (pdr_add_alias_set): New.
1049 (pdr_add_memory_accesses): New.
1050 (build_poly_dr): Call pdr_add_memory_accesses and pdr_add_alias_set.
1052 2009-06-26 Sebastian Pop <sebastian.pop@amd.com>
1054 * graphite-poly.c (print_pdrs, debug_pdrs): New.
1055 (print_pbb): Add call to print_pdrs.
1056 * graphite-poly.h (print_pdrs, debug_pdrs): Declared.
1058 2009-06-24 Konrad Trifunovic <konrad.trifunovic@gmail.com>
1059 Li Feng <nemokingdom@gmail.com>
1061 * graphite-dependences.c (graphite_carried_dependence_level_k): New.
1062 (dependency_between_pbbs_p): New.
1063 (lexicographically_gt_p): Assure !empty_p before polyhedron
1064 intersection assign.
1065 (build_lexicographically_gt_constraint): Correct lexicographically
1067 * graphite-dependences.h: New.
1068 * Makefile.in (graphite-dependences.o): Add graphite-dependences.h.
1070 2009-06-24 Sebastian Pop <sebastian.pop@amd.com>
1072 * graphite-clast-to-gimple.c (print_clast_stmt): New.
1073 (gloog): Print to dump_file the generated clast.
1074 * graphite-clast-to-gimple.h (print_clast_stmt): Declared.
1075 * graphite-interchange.c (pbb_do_interchange): Fix dump formatting.
1077 2009-06-24 Sebastian Pop <sebastian.pop@amd.com>
1079 * graphite-poly.c (extend_scattering): Increment
1080 PBB_NB_LOCAL_VARIABLES by the number of added dimensions.
1082 2009-06-24 Sebastian Pop <sebastian.pop@amd.com>
1084 * graphite-interchange.c (compute_array_size_poly): Added exit of
1085 recursion condition. Continue iterating even after the first equality.
1086 (compute_array_size): Same.
1088 2009-06-24 Li Feng <nemokingdom@gmail.com>
1090 * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-1.c: Update
1091 -fdump-tree-final_cleanup to -fdump-tree-optimized.
1092 * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-2.c: Ditto.
1093 * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-3.c: Ditto.
1094 * testsuite/gcc.dg/graphite/graphite_autopar/graphite_autopar.exp: Ditto.
1096 2009-06-23 Sebastian Pop <sebastian.pop@amd.com>
1098 * sese.c (expand_scalar_variables_stmt): Expand scalar variables
1099 only when the use verifies is_gimple_reg.
1101 2009-06-23 Sebastian Pop <sebastian.pop@amd.com>
1103 * graphite-clast-to-gimple.c (build_cloog_prog): Fix memory corruption.
1104 Allocate scaldims after call to unify_scattering_dimensions.
1106 2009-06-23 Sebastian Pop <sebastian.pop@amd.com>
1108 * graphite-clast-to-gimple.c (translate_clast): Fix memory leak.
1110 2009-06-23 Sebastian Pop <sebastian.pop@amd.com>
1111 Albert Cohen <albert.cohen@inria.fr>
1113 * graphite-blocking.c (pbb_strip_mine_loop_depth): Do not use local
1114 variables for the strip mining.
1116 2009-06-23 Sebastian Pop <sebastian.pop@amd.com>
1117 Pranav Garg <pranav.garg2107@gmail.com>
1119 * Makefile.in (OBJS-common): Added graphite-blocking.o.
1120 (graphite-sese-to-poly.o): Moved down to be in lexicographical order.
1121 (graphite-blocking.o): New rule.
1122 (graphite-poly.o, graphite-ppl.o): Moved to be in lexicographical order.
1123 * graphite-blocking.c: New.
1124 * graphite-poly.c (apply_poly_transforms): Call scop_do_strip_mine for
1125 flag_loop_strip_mine.
1126 (psct_scattering_dim_for_loop_depth): New.
1127 * graphite-poly.h (scop_do_strip_mine): Declared.
1128 (psct_add_local_variable): Increment PBB_NB_LOCAL_VARIABLES.
1129 * tree-ssa-loop.c (gate_graphite_transforms): Do not fail when using
1130 flag_loop_strip_mine.
1132 2009-06-23 Sebastian Pop <sebastian.pop@amd.com>
1134 * graphite-poly.c (extend_scattering): Avoid initializing and freeing
1135 a GMP value and a PPL coefficient at each iteration of a loop.
1137 2009-06-23 Sebastian Pop <sebastian.pop@amd.com>
1139 * graphite-dependences.c (dependence_polyhedron): Do not use
1140 pbb_nb_scattering_dims anymore. Use pbb_nb_scattering_orig and
1141 pbb_nb_scattering_transform.
1142 (graphite_legal_transform_dr): Same.
1143 * graphite-poly.c (extend_scattering): Same.
1144 (unify_scattering_dimensions): Same.
1145 (print_scattering_function): Same.
1146 (new_poly_bb): Initialize PBB_NB_SCATTERING_TRANSFORM and
1147 PBB_NB_LOCAL_VARIABLES.
1148 * graphite-poly.h (pbb_nb_scattering): Removed declaration.
1149 (struct poly_bb): Added nb_local_variables and nb_scattering_transform.
1150 (PBB_NB_LOCAL_VARIABLES, PBB_NB_SCATTERING_TRANSFORM): New.
1151 (pbb_nb_scattering_orig, pbb_nb_scattering_transform): New.
1152 (pbb_nb_scattering_dims, pbb_nb_scattering): Removed.
1153 (pbb_nb_scattering_transform): New.
1154 (pbb_nb_local_vars): Return PBB_NB_LOCAL_VARIABLES.
1155 (psco_scattering_dim): Add assert on parameters.
1156 (psct_scattering_dim): Same.
1157 (psct_scattering_dim_for_loop_depth): Declared.
1158 (psct_local_var_dim): New.
1159 (psco_iterator_dim, psco_parameter_dim): Add assert on parameters.
1160 (psct_iterator_dim, psct_parameter_dim): Same. To maintain the
1161 correct layout, call pbb_nb_local_vars.
1162 (psct_add_local_variable, psct_add_scattering_dimension): New.
1163 * graphite-sese-to-poly.c (build_pbb_scattering_polyhedrons):
1164 Initialize PBB_NB_SCATTERING_TRANSFORM.
1166 2009-06-23 Sebastian Pop <sebastian.pop@amd.com>
1168 * graphite-ppl.c (set_inhomogeneous): Renamed ppl_set_inhomogeneous.
1169 (set_coef): Renamed ppl_set_coef.
1170 * graphite-ppl.h (ppl_set_inhomogeneous, ppl_set_coef): Declared.
1172 2009-06-23 Sebastian Pop <sebastian.pop@amd.com>
1174 * graphite-dependences.c (build_pairwise_scheduling_inequality): Don't
1175 test a boolean against 1.
1176 * graphite-interchange.c (pbb_interchange_loop_depths): Do not build
1177 a new polyhedron for the PBB_TRANSFORMED_SCATTERING.
1178 (pbb_do_interchange): Returns true when a transform has been performed.
1179 (scop_do_interchange): Same.
1180 * graphite-poly.c (apply_poly_transforms): Use the return value of
1181 scop_do_interchange.
1182 * graphite-poly.h (scop_do_interchange): Update declaration.
1184 2009-06-23 Tobias Grosser <grosser@fim.uni-passau.de>
1186 * graphite-clast-to-gimple.c (gloog): Reset loop->aux right
1188 * sese.c (sese_reset_aux_in_loops): New.
1189 * sese.h (sese_reset_aux_in_loops): New.
1191 2009-06-19 Sebastian Pop <sebastian.pop@amd.com>
1193 * graphite-sese-to-poly.c (scan_tree_for_params_int): Pass in the
1194 multiplier and multiply the constant by the multiplier.
1195 (scan_tree_for_params): Bound the multiplier to its MULT_EXPR.
1196 (build_poly_dr): Do not use the multiplier to define the subscript.
1198 2009-06-19 Sebastian Pop <sebastian.pop@amd.com>
1200 * graphite-poly.c (new_poly_dr): Pass an extra argument for the
1201 compiler's data reference. Initialize PDR_CDR.
1202 (print_pdr): Call dump_data_reference.
1203 * graphite-poly.h (struct poly_dr): Rename black_box into pbb.
1204 Add compiler_dr field.
1205 (PDR_BB): Renamed PDR_PBB.
1207 * graphite-sese-to-poly.c (build_poly_dr): Pass to new_poly_dr
1208 GCC's data reference representation.
1209 * tree-data-ref.c (debug_data_references, debug_data_reference): New.
1210 * tree-data-ref.h (debug_data_references, debug_data_reference): Decl.
1212 2009-06-19 Sebastian Pop <sebastian.pop@amd.com>
1214 * graphite-poly.c (print_scattering_function): Also print the layout.
1215 * graphite-poly.h (pbb_nb_local_vars): New.
1217 2009-06-19 Sebastian Pop <sebastian.pop@amd.com>
1219 * graphite-poly.c (print_pbb_domain): Also print the layout names.
1221 2009-06-19 Sebastian Pop <sebastian.pop@amd.com>
1223 * graphite-poly.c (print_pdr, debug_pdr): New.
1224 * graphite-poly.h (print_pdr, debug_pdr): Declared.
1225 (PDR_BASE): Removed.
1227 2009-06-18 Sebastian Pop <sebastian.pop@amd.com>
1229 * gcc/testsuite/gcc.dg/graphite/interchange-{1..7}.c: New avatars of
1232 2009-06-18 Sebastian Pop <sebastian.pop@amd.com>
1234 * graphite-interchange.c (compute_subscript): Allow also -1 in the
1235 subscript identification column.
1236 (pbb_do_interchange): Print to dump_file that some loops "will be
1237 interchanged". Rely on that chain of characters in the testcases.
1238 * gcc.dg/graphite/interchange-0.c: New.
1239 * gcc.dg/graphite/graphite.exp: Iterate over the testsuite
1240 interchange-*.c files and compile them with -floop-interchange.
1242 2009-06-18 Pranav Garg <pranav.garg2107@gmail.com>
1244 * graphite-interchange.c (interchange_profitable_p): Renamed
1245 pbb_interchange_profitable_p.
1247 2009-06-18 Sebastian Pop <sebastian.pop@amd.com>
1248 Harsha Jagasia <harsha.jagasia@amd.com>
1249 Pranav Garg <pranav.garg2107@gmail.com>
1251 * graphite-interchange.c (interchange_profitable_p): Make static.
1252 (pbb_interchange_loop_depths, pbb_do_interchange,
1253 scop_do_interchange): New.
1254 * graphite-poly.c (apply_poly_transforms): Call scop_do_interchange
1255 for flag_loop_interchange.
1256 * graphite-poly.h (scop_do_interchange): Declared.
1257 * tree-ssa-loop.c (gate_graphite_transforms): Do not fail when
1258 flag_loop_interchange is used.
1260 2009-06-18 Sebastian Pop <sebastian.pop@amd.com>
1262 * graphite-dependences.c (dependence_polyhedron): Update use of
1263 pbb_nb_scattering_dims.
1264 * graphite-poly.h (pbb_nb_scattering_dims): Do not pass SCOP.
1265 (pbb_nb_scattering): Update use of pbb_nb_scattering_dims.
1266 (psco_scattering_dim, psct_scattering_dim, psco_iterator_dim,
1267 psct_iterator_dim, psco_parameter_dim, psct_parameter_dim): New.
1269 2009-06-16 Sebastian Pop <sebastian.pop@amd.com>
1271 * graphite.c: Cleanup foo.
1273 2009-06-16 Sebastian Pop <sebastian.pop@amd.com>
1275 * Merge from mainline (r143684:148293).
1276 * Disabled libpcp until it gets fixed.
1278 2009-06-05 Sebastian Pop <sebastian.pop@amd.com>
1279 Harsha Jagasia <harsha.jagasia@amd.com>
1281 * graphite-interchange.c: New.
1282 * Makefile.in (graphite-interchange.o): New.
1283 * graphite-poly.h (interchange_profitable_p): Declared.
1284 * graphite-ppl.h (value_max): New.
1286 2009-06-04 Sebastian Pop <sebastian.pop@amd.com>
1288 * graphite-dependences.c (dependence_polyhedron): Use pdr_dim.
1289 * graphite-poly.h: Fix some comments.
1293 2009-06-04 Sebastian Pop <sebastian.pop@amd.com>
1296 (pdr_accessp_nb_subscripts): Renamed pdr_nb_subscripts.
1297 (pdr_accessp_nb_iterators): Renamed pdr_dim_iter_domain.
1298 (pdr_accessp_nb_params): Renamed pdr_nb_params.
1299 (pdr_accessp_alias_set_dim): Renamed pdr_alias_set_dim.
1300 (pdr_accessp_subscript_dim): Renamed pdr_subscript_dim.
1301 (pdr_accessp_iterator_dim): Renamed pdr_iterator_dim.
1302 (pdr_accessp_param_dim): Renamed pdr_parameter_dim.
1303 (pbb_nb_loops): Renamed pbb_dim_iter_domain.
1304 * graphite-clast-to-gimple.c: Same.
1305 * graphite-dependences.c: Same.
1306 * graphite-poly.c: Same.
1307 * graphite-sese-to-poly.c: Same.
1309 2009-06-03 Sebastian Pop <sebastian.pop@amd.com>
1311 * graphite-clast-to-gimple.c (build_iv_mapping): Insert full
1312 expressions for an IV rename, as returned by clast_to_gcc_expression.
1313 (copy_renames): Rename new_name to expr.
1314 * sese.c (debug_rename_elt): Same.
1317 (sese_adjust_liveout_phis): Call force_gimple_operand before using
1318 the information from the rename map.
1319 (rename_variables_in_stmt): Same.
1320 (add_loop_exit_phis): Rename new_name to expr.
1321 (insert_loop_close_phis): Same.
1322 (add_guard_exit_phis): Same. Call force_gimple_operand.
1323 * sese.h (struct rename_map_elt): Rename new_name to expr.
1324 (new_rename_map_elt): Same.
1326 2009-06-03 Sebastian Pop <sebastian.pop@amd.com>
1328 * graphite-clast-to-gimple.c (build_iv_mapping): Use set_rename.
1329 * sese.c (set_rename): Make it extern.
1330 * sese.h (set_rename): Declared.
1332 2009-06-03 Sebastian Pop <sebastian.pop@amd.com>
1334 * graphite-poly.c (extend_scattering): Free values.
1335 * graphite-ppl.c (new_Cloog_Domain_from_ppl_Pointset_Powerset):
1337 (ppl_print_powerset_matrix): Same.
1338 * graphite-scop-detection.c (free_scops_1): New.
1339 (limit_scops): Call free_scops_1.
1340 * graphite-sese-to-poly.c (build_scop_bbs_1): Free dom.
1341 (build_poly_dr): Free PPL coefficients.
1342 * tree-parloops.c (rewrite_all_phi_nodes_with_iv): Free bbs.
1344 2009-06-02 Sebastian Pop <sebastian.pop@amd.com>
1346 * graphite-dependences.c: New.
1347 * graphite-data-ref.c: Removed.
1348 * graphite-data-ref.h: Removed.
1349 * Makefile.in (graphite-data-ref.o): Removed.
1350 (graphite-dependences.o): Added.
1351 * graphite-clast-to-gimple.c: Remove dependence on graphite-data-ref.h.
1352 * graphite-poly.c: Same.
1353 Move the data dependence testing to graphite-dependences.c.
1355 2009-05-19 Tobias Grosser <grosser@fim.uni-passau.de>
1357 * graphite-scop-detection.c (graphite_can_represent_loop): Renamed
1358 from graphite_cannot_represent_loop. Code refactored.
1359 (scopdet_basic_block_info): Call graphite_can_represent_loop.
1361 2009-05-17 Li Feng <nemokingdom@gmail.com>
1363 * testsuite/gcc.dg/graphite/graphite_autopar/graphite_autopar.exp:
1364 Cover all the testcases (not only the filtered ones).
1366 2009-05-17 Tobias Grosser <grosser@fim.uni-passau.de>
1368 * graphite-scop-detection.c (stmt_simple_for_scop_p): Remove
1369 unnecessary check. Update comments. Move check for REAL_TYPE here.
1370 (harmful_stmt_in_bb): Remove checks for conditions. This is already
1371 done in (stmt_simple_for_scop_p).
1373 2009-05-14 Tobias Grosser <grosser@fim.uni-passau.de>
1375 * graphite.c (print_global_statistics): New.
1376 (print_graphite_scop_statistic): New.
1377 (print_graphite_statistics): New.
1378 (graphite_initialize, graphite_transform_loops): Print statistics.
1379 * graphite-scop-detection (build_scops): Print statistics.
1380 (print_graphite_scop_statistics): New.
1381 (print_graphite_statistics): New.
1383 2009-05-13 Sebastian Pop <sebastian.pop@amd.com>
1385 * graphite-clast-to-gimple.c (struct clast_name_index): Removed.
1386 (debug_clast_name_index): Removed.
1387 (debug_clast_name_indexes_1): Removed.
1388 (debug_clast_name_indexes): Removed.
1389 (clast_name_index_elt_info): Removed.
1390 (eq_clast_name_indexes): Removed.
1391 (clast_name_to_index): Removed.
1392 (new_clast_name_index): Removed.
1393 (save_clast_name_index): Removed.
1394 (save_var_name): Moved...
1395 (init_sese_params_index): Removed.
1396 (clast_name_to_gcc): Remove use of name_tree.
1397 (initialize_cloog_names): Same.
1398 (gloog): Do not call init_sese_params_index.
1399 * graphite-sese-to-poly.c (save_var_name): ...here.
1400 (parameter_index_in_region): New.
1401 * sese.c (new_sese): Initialize SESE_PARAMS_NAMES.
1402 (parameter_index_in_region): Removed.
1403 (is_parameter): Remove use of name_tree.
1404 * sese.h (struct name_tree): Removed.
1405 (struct sese): Remove use of name_tree. New field params_names.
1406 (SESE_PARAMS_NAMES): New.
1407 (SESE_PARAMS): Remove duplicate.
1408 (parameter_index_in_region): Removed.
1409 (sese_nb_params): Remove use of name_tree.
1410 (struct clast_name_index): New.
1411 (new_clast_name_index): New.
1412 (clast_name_to_index): New.
1413 (save_clast_name_index): New.
1414 (debug_clast_name_index): New.
1415 (debug_clast_name_indexes_1): New.
1416 (debug_clast_name_indexes): New.
1417 (clast_name_index_elt_info): New.
1418 (eq_clast_name_indexes): New.
1420 2009-05-13 Sebastian Pop <sebastian.pop@amd.com>
1422 * graphite-clast-to-gimple.c (compute_cloog_iv_types_1): Call
1423 pbb_to_depth_to_oldiv. Remove call to oldiv_for_loop.
1424 (graphite_loop_normal_form): Do not pass region. Do not
1425 initialize SESE_OLDIVS.
1426 (build_graphite_loop_normal_form): Update call to
1427 graphite_loop_normal_form.
1428 * sese.c (debug_oldivs): Removed.
1429 (new_sese): Do not initialize SESE_OLDIVS.
1430 (free_sese): Do not free SESE_OLDIVS.
1431 (oldiv_for_loop): Removed.
1432 * sese.h (struct sese): Remove old_ivs.
1433 (SESE_OLDIVS): Removed.
1434 (oldiv_for_loop): Removed.
1436 2009-05-13 Sebastian Pop <sebastian.pop@amd.com>
1438 * graphite-clast-to-gimple.c (clast_name_to_gcc): Pass newivs,
1439 remove ivstack. Remove call to loop_iv_stack_get_iv_from_name,
1440 replaced by a call to newivs_to_depth_to_newiv.
1441 (clast_to_gcc_expression): Pass newivs, remove ivstack.
1442 (clast_to_gcc_expression_red): Same.
1443 (gcc_type_for_clast_expr): Same.
1444 (gcc_type_for_clast_eq): Same.
1445 (graphite_translate_clast_equation): Same.
1446 (graphite_create_guard_cond_expr): Same.
1447 (graphite_create_new_guard): Same.
1448 (graphite_create_new_loop): Same.
1449 (build_iv_mapping): Same.
1450 (translate_clast): Same.
1452 (loop_iv_stack_patch_for_consts): Removed. *
1453 sese.c (iv_stack_entry_is_constant): Removed.
1454 (iv_stack_entry_is_iv): Removed.
1455 (loop_iv_stack_push_iv): Removed.
1456 (loop_iv_stack_insert_constant): Removed.
1457 (loop_iv_stack_pop): Removed.
1458 (loop_iv_stack_get_iv): Removed.
1459 (loop_iv_stack_get_iv_from_name): Removed.
1460 (debug_loop_iv_stack): Removed.
1461 (free_loop_iv_stack): Removed.
1462 (loop_iv_stack_remove_constants): Removed. *
1463 sese.h (iv_stack_entry_kind): Removed.
1464 (iv_stack_entry_data_union): Removed.
1465 (iv_stack_entry_struct): Removed.
1466 (iv_stack_entry_p): Removed.
1467 (debug_oldivs, debug_loop_iv_stack, loop_iv_stack_insert_constant,
1468 loop_iv_stack_get_iv_from_name, loop_iv_stack_push_iv,
1469 loop_iv_stack_get_iv, loop_iv_stack_remove_constants,
1470 loop_iv_stack_pop, free_loop_iv_stack): Removed.
1471 (gbb_loop_at_index): Fix indenting.
1472 (gbb_loop_index): Removed.
1474 2009-05-13 Sebastian Pop <sebastian.pop@amd.com>
1476 * graphite-clast-to-gimple.c (clast_name_to_gcc): Do not use strcmp.
1477 Call clast_name_to_index.
1479 2009-05-13 Sebastian Pop <sebastian.pop@amd.com>
1481 * graphite-clast-to-gimple.c (clast_name_to_gcc): Pass region,
1482 do not pass params. Get params from SESE_PARAMS.
1483 (clast_to_gcc_expression): Same.
1484 (clast_to_gcc_expression_red): Same.
1485 (gcc_type_for_clast_eq): Same.
1486 (graphite_translate_clast_equation): Same.
1487 (graphite_create_new_loop): Same.
1488 * sese.c (rename_variables_in_stmt): Fix comment.
1490 2009-05-13 Sebastian Pop <sebastian.pop@amd.com>
1492 * graphite-clast-to-gimple.c (graphite_create_new_loop): Pass
1494 Call save_clast_name_index.
1495 (translate_clast): Pass newivs_index.
1496 (gloog): Create and free newivs_index.
1498 2009-05-13 Sebastian Pop <sebastian.pop@amd.com>
1500 * graphite-clast-to-gimple.c (clast_name_index): New structure.
1501 (clast_name_index_p): New type.
1502 (debug_clast_name_index): New.
1503 (debug_clast_name_indexes_1): New.
1504 (debug_clast_name_indexes): New.
1505 (clast_name_index_elt_info): New.
1506 (eq_clast_name_indexes): New.
1507 (clast_name_to_index): New.
1508 (new_clast_name_index): New.
1509 (save_clast_name_index): New.
1510 (init_sese_params_index): New.
1511 (gloog): Call init_sese_params_index.
1512 * graphite-clast-to-gimple.h (debug_clast_name_indexes): Declared.
1513 * sese.c (new_sese): Initialize SESE_PARAMS_INDEX.
1514 (free_sese): Free SESE_PARAMS_INDEX.
1515 * sese.h (struct sese): Add params_index.
1516 (SESE_PARAMS_INDEX): New.
1518 2009-05-13 Sebastian Pop <sebastian.pop@amd.com>
1520 * graphite-clast-to-gimple.c (newivs_to_depth_to_newiv): New.
1521 (graphite_create_new_loop): Pass the newivs vector. Push the
1522 newly created IV to newivs.
1523 (translate_clast): Pass the newivs vector.
1524 (gloog): Create and destroy the newivs vector.
1526 2009-05-13 Sebastian Pop <sebastian.pop@amd.com>
1528 * graphite-clast-to-gimple.c (pbb_to_depth_to_oldiv): New.
1529 (graphite_loop_normal_form): Initialize loop->aux with the unique
1530 IV that has been created.
1532 2009-05-13 Tobias Grosser <grosser@fim.uni-passau.de>
1534 * tree-chrec.c (evolution_function_right_is_integer_cst): Allow
1535 scev with parameters in the base part. They where forbidden
1538 2009-05-11 Li Feng <nemokingdom@gmail.com>
1540 * testsuite/gcc.dg/graphite/graphite.exp: Set different default
1541 compile options by file names.
1542 * testsuite/gcc.dg/graphite/block{0-6}.c: Remove dg-option line.
1543 * testsuite/gcc.dg/graphite/id-{1-9}.c: Ditto.
1544 * testsuite/gcc.dg/graphite/scop-{0-20}.c: Ditto.
1545 * testsuite/gcc.dg/graphite/scop-matmult.c: Ditto.
1547 2009-05-08 Li Feng <nemokingdom@gmail.com>
1549 * testsuite/gcc.dg/graphite/graphite_autopar/graphite_autopar.exp: New.
1550 * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-1.c: New.
1551 * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-2.c: New.
1552 * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-3.c: New.
1554 2009-05-07 Tobias Grosser <grosser@fim.uni-passau.de>
1556 * graphite-scop-detection (build_scops_1): Fix little bug introduced
1559 2009-05-07 Tobias Grosser <grosser@fim.uni-passau.de>
1561 * graphite-scop-detection.c (graphite_can_represent_scev): Only
1562 allow integer constant strides.
1563 (graphite_can_represent_expr): Depend on outermost_loop.
1564 (stmt_simple_memref_p, graphite_cannot_represent_loop,
1565 harmful_stmt_in_bb, is_simple_operand, stmt_simple_for_scop_p,
1566 build_scops_1): Same.
1567 (scopdet_basic_block_info): Same and insert layered SCoP
1569 (try_generate_gimple_bb): Cleanup.
1570 (build_scops): Enable data references.
1572 * testsuite/gcc.dg/graphite/id-5.c: New.
1573 * testsuite/gcc.dg/graphite/id-9.c: New.
1574 * tree-chrec.c (evolution_function_right_is_integer_cst): New.
1575 * tree-chrec.h (evolution_function_right_is_integer_cst): New.
1577 2009-05-06 Tobias Grosser <grosser@fim.uni-passau.de>
1579 * sese.c (expand_scalar_variables_ssa_name): Only build expressions,
1580 that we have not yet built for this SCoP.
1582 2009-05-06 Tobias Grosser <grosser@fim.uni-passau.de>
1584 * sese.c (expand_scalar_variables_expr): Fix expand_scalar_variables
1585 for complex numbers.
1587 2009-05-06 Tobias Grosser <grosser@fim.uni-passau.de>
1589 * graphite-ppl.c: Fix build if cloog is not available.
1591 2009-05-04 Li Feng <nemokingdom@gmail.com>
1593 * tree-parloops.c (loop_parallel_p): Remove construction of
1594 NITER and REDUCTION_LIST.
1595 (try_get_loop_niter): New.
1596 (try_create_reduction_list): New.
1597 (parallelize_loops): Bypass the failed checkings in autopar
1598 when can_be_parallel in loop structure is set to true.
1600 2009-05-01 Tobias Grosser <grosser@fim.uni-passau.de>
1602 * testsuite/gcc.dg/graphite/id-6.c: Update testcase.
1603 * testsuite/gcc.dg/graphite/scop-3.c: Dito.
1605 2009-05-01 Tobias Grosser <grosser@fim.uni-passau.de>
1607 * graphite-scop-detection.c (stmt_simple_for_scop_p):
1608 Enable EQ_EXPR and NE_EXPR again.
1610 2009-04-30 Tobias Grosser <grosser@fim.uni-passau.de>
1612 * graphite-scop-detection.c (graphite_can_represent_scev):
1613 Add check if scev is affine multivariate.
1614 (harmful_stmt_in_bb): Check if we can represent the conditions.
1615 (scopdet_basic_block_info (basic_block bb, VEC): Pass the loop to
1617 * testsuite/gcc.dg/graphite/id-7.c: New.
1619 2009-04-30 Tobias Grosser <grosser@fim.uni-passau.de>
1621 * graphite-sese-to-poly.c (bb_contains_non_iv_scalar_phi_nodes):
1622 Check all bbs in region, not only the bbs that are represented in
1624 (build_poly_scop): Add newline.
1625 * testsuite/gcc.dg/graphite/id-8.c: New.
1627 2009-04-30 Li Feng <nemokingdom@gmail.com>
1629 * cfgloop.c (alloc_loop): Initialize can_be_parallel to false
1630 when loop initialize.
1631 * cfgloop.h (struct loop): Introduce flag can_be_parallel.
1632 * common.opt: Declare flag_graphite_force_parallel.
1633 * graphite-clast-to-gimple.c (translate_clast): Mark the innermost
1635 * graphite-poly.c (apply_poly_transforms): Introduce
1636 flag_graphite_force_parallel.
1637 * tree-ssa-loop.c (gate_graphite_transforms): ditto.
1638 * toplev.c (process_options): ditto and replace a not correctly
1641 2009-04-30 Li Feng <nemokingdom@gmail.com>
1643 * graphite-clast-to-gimple.c (loop_iv_stack_patch_for_consts):
1644 Change the call of gbb_loop_at_index and/or gbb_loop_index due
1645 to the redefinition.
1646 (compute_cloog_iv_types_1): ditto.
1647 (build_iv_mapping): ditto.
1648 * graphite-sese-to-poly.c (new_gimple_bb): Remove GBB_LOOPS related
1650 (free_gimple_bb): Removed GBB_LOOPS related free part.
1651 (build_bb_loops): Removed.
1652 * sese.h (struct gimple_bb): Removed loops.
1653 (GBB_LOOPS): Removed.
1654 (gbb_loop_at_index): Instead of using GBB_LOOPS, we use sese instead.
1655 (gbb_loop_index): ditto.
1657 2009-04-24 Tobias Grosser <grosser@fim.uni-passau.de>
1659 * graphite-scop-detection.c (graphite_can_represent_scev): Do not
1660 allow non constant strides.
1661 * testsuite/gcc.dg/graphite/scop-20.c: New.
1663 2009-04-24 Sebastian Pop <sebastian.pop@amd.com>
1665 * graphite-scop-detection.c (dot_all_scops): Fix system call
1666 return value warning.
1669 2009-04-24 Sebastian Pop <sebastian.pop@amd.com>
1671 * testsuite/gcc.dg/graphite/id-6.c: Fix pattern.
1672 * testsuite/gcc.dg/graphite/scop-3.c: Same.
1674 2009-04-24 Sebastian Pop <sebastian.pop@amd.com>
1676 * graphite-poly.c (map_into_dep_poly, map_dr_into_dep_poly,
1677 build_pairwise_constraint, dr_equality_constraints,
1678 build_pairwise_scheduling_equality,
1679 build_pairwise_scheduling_inequality, lexicographically_gt_p,
1680 build_lexicographically_gt_constraint, dependence_polyhedron,
1681 graphite_legal_transform_dr, graphite_legal_transform_bb,
1682 graphite_legal_transform): New.
1683 * graphite-poly.h (graphite_legal_transform): Declared.
1684 * graphite-sese-to-poly.c (build_poly_scop): Call to
1685 graphite_legal_transform is disabled for the moment.
1687 2009-04-24 Sebastian Pop <sebastian.pop@amd.com>
1689 * graphite-poly.h (pbb_nb_scattering_dims): New.
1690 (pbb_nb_scattering): Use it.
1692 2009-04-24 Sebastian Pop <sebastian.pop@amd.com>
1694 * graphite-ppl.c (ppl_insert_dimensions_pointset): Add
1695 Pointset_Powerset version of ppl_insert_dimensions.
1696 * graphite-ppl.h (ppl_insert_dimensions_pointset): Declared.
1698 2009-04-24 Sebastian Pop <sebastian.pop@amd.com>
1700 * graphite-ppl.c (ppl_insert_dimensions): Fix formatting.
1702 2009-04-24 Sebastian Pop <sebastian.pop@amd.com>
1704 * graphite-poly.h: Fix comment.
1706 2009-04-24 Sebastian Pop <sebastian.pop@amd.com>
1708 * graphite-sese-to-poly.c (build_poly_dr): Fix data ref multiplier.
1710 2009-04-24 Tobias Grosser <grosser@fim.uni-passau.de>
1712 * sese.c (expand_scalar_variables_stmt): Only iterate over the old
1715 2009-04-24 Tobias Grosser <grosser@fim.uni-passau.de>
1717 * graphite-sese-to-poly.c (var_used_in_not_loop_header_phi_node): New.
1718 (graphite_stmt_p): Represent bbs necessary to build the phi nodes of
1721 2009-04-20 Sebastian Pop <sebastian.pop@amd.com>
1723 * graphite-scop-detection.c (stmt_simple_for_scop_p): Do not
1724 handle EQ_EXPR and NE_EXPR.
1726 2009-04-17 Tobias Grosser <grosser@fim.uni-passau.de>
1728 * graphite-poly.h (poly_dr): Fix comment.
1730 2009-04-09 Sebastian Pop <sebastian.pop@amd.com>
1731 Tobias Grosser <grosser@fim.uni-passau.de>
1733 * graphite-poly.c (new_poly_bb): Do not initialize PBB_DOMAIN
1734 with a zero dimension polyhedron.
1735 (find_scop_parameters): Move the call to scop_set_nb_params here.
1736 (build_loop_iteration_domains): Store in loop->aux the iteration
1738 (build_scop_iteration_domain): Fix PBB_DOMAIN for bbs not surrounded
1739 by any loop in scop.
1740 (build_poly_scop): Do not call scop_set_nb_params.
1742 2009-04-09 Sebastian Pop <sebastian.pop@amd.com>
1743 Tobias Grosser <grosser@fim.uni-passau.de>
1745 * graphite-sese-to-poly.c (add_condition_to_pbb): Pass code to
1746 add_condition_to_domain not GT_EXPR.
1748 2009-04-09 Tobias Grosser <grosser@fim.uni-passau.de>
1750 * graphite-ppl.c (debug_ppl_powerset_matrix): New.
1751 * graphite-ppl.h (debug_ppl_powerset_matrix): New.
1752 * graphite-sese-to-poly.c (add_condition_to_pbb): Use
1753 upper_bound_assign to calculate unions.
1754 * testsuite/gcc.dg/graphite/id-6.c: New.
1756 2009-04-09 Tobias Grosser <grosser@fim.uni-passau.de>
1758 * graphite-scop-detection.c (canonicalize_loop_closed_ssa): Do not
1759 handle abnormal edges.
1761 2009-04-09 Tobias Grosser <grosser@fim.uni-passau.de>
1763 * graphite-poly.c (new_poly_dr, free_poly_dr): New.
1764 (free_poly_bb): Also free poly_drs.
1765 * graphite-poly.h (new_poly_dr, free_poly_dr): New.
1766 (poly_dr): Polyhedron to Pointset_Powerset.
1767 (pdr_accessp_nb_subscripts): Same.
1768 * graphite-sese-to-poly.c (build_poly_dr): Same. And actually build
1771 2009-04-08 Sebastian Pop <sebastian.pop@amd.com>
1773 * graphite-clast-to-gimple.c (initialize_cloog_names): Change cloog
1774 names into more meaningful names.
1776 2009-04-08 Sebastian Pop <sebastian.pop@amd.com>
1778 * testsuite/gfortran.dg/graphite/interchange-1.c: New.
1779 * testsuite/gfortran.dg/graphite/interchange-2.c: New.
1781 2009-04-08 Sebastian Pop <sebastian.pop@amd.com>
1783 * graphite-clast-to-gimple.c (graphite_loop_normal_form): Do not build
1785 * tree-parloops.c (rewrite_phi_with_iv): New.
1786 (rewrite_all_phi_nodes_with_iv): New.
1787 (canonicalize_loop_ivs): Call them.
1789 2009-04-08 Sebastian Pop <sebastian.pop@amd.com>
1791 * graphite-sese-to-poly.c (try_generate_gimple_bb): Use
1792 graphite_find_data_references_in_stmt.
1793 * tree-data-ref.c (graphite_find_data_references_in_stmt): New.
1794 * tree-data-ref.h (graphite_find_data_references_in_stmt): Declared.
1796 2009-04-08 Sebastian Pop <sebastian.pop@amd.com>
1798 * sese.c (add_loop_exit_phis): Don't fail on non SSA_NAME renames.
1800 2009-04-08 Sebastian Pop <sebastian.pop@amd.com>
1802 * graphite-sese-to-poly.c (build_scop_bbs_1): Use bb_in_sese_p
1803 instead of bb_in_region.
1804 (flag_bb_in_region): Same. Renamed flag_bb_in_sese.
1805 (build_sese_conditions): Use flag_bb_in_sese.
1806 * sese.c (register_bb_in_sese): Removed.
1807 (new_sese): Remove initialization of SESE_REGION_BBS.
1808 (free_sese): Do not free SESE_REGION_BBS.
1809 * sese.h (struct sese): Remove field region_basic_blocks.
1810 (SESE_REGION_BBS): Removed.
1811 (bb_in_sese_p): Implement in function of bb_in_region.
1813 2009-04-08 Sebastian Pop <sebastian.pop@amd.com>
1815 * graphite-scop-detection.c (limit_scops): Deal only with single exit
1818 2009-04-08 Tobias Grosser <grosser@fim.uni-passau.de>
1820 * graphite-scop-detection.c (stmt_simple_for_scop_p): Allow NE_EXPR
1822 * graphite-sese-to-poly.c (create_linear_expr_from_tree): New.
1823 (add_condition_to_domain): New.
1824 (add_condition_to_pbb): New.
1825 (add_conditions_to_domain): Cleanup and handle of NE_EXPR and EQ_EXPR.
1826 * testsuite/gcc.dg/graphite/scop-3.c: Update number of detected SCoPs.
1828 2009-04-08 Tobias Grosser <grosser@fim.uni-passau.de>
1830 * graphite-clast-to-gimple.c (build_cloog_prog): ppl_Polyhedron ->
1831 ppl_Pointset_Powerset.
1832 * graphite-poly.c (new_poly_bb, free_poly_bb): Same.
1833 * graphite-poly.h (poly_bb): poly_bb.domain Same.
1834 (pbb_nb_loops): Same.
1835 * graphite-sese-to-poly.c (build_loop_iteration_domains,
1836 add_conditions_to_domain): Same.
1837 * graphite-ppl.c (new_Cloog_Domain_from_ppl_Pointset_Powerset): New.
1838 (ppl_print_polyhedron_matrix): ppl_Polyhedron_t ->
1839 ppl_const_Polyhedron_t.
1840 (ppl_print_powerset_matrix): New.
1841 * graphite-ppl.h (new_Cloog_Domain_from_ppl_Pointset_Powerset,
1842 ppl_print_powerset_matrix): New.
1843 (ppl_print_polyhedron_matrix): Updated.
1845 2009-04-07 Sebastian Pop <sebastian.pop@amd.com>
1847 * tree-scalar-evolution.c (analyze_scalar_evolution_1): Fix comment.
1849 2009-04-07 Sebastian Pop <sebastian.pop@amd.com>
1851 * graphite-poly.c (extend_scattering): Fix indenting. Free cstr.
1852 (print_iteration_domains, debug_iteration_domain,
1853 debug_iteration_domains): New.
1854 * graphite-poly.h (print_iteration_domains, debug_iteration_domain,
1855 debug_iteration_domains): Declared.
1856 * graphite-sese-to-poly.c (build_pbb_scattering_polyhedrons): Fix
1859 2009-04-03 Tobias Grosser <grosser@fim.uni-passau.de>
1860 Sebastian Pop <sebastian.pop@amd.com>
1862 * graphite-poly.h (print_iteration_domain): New.
1863 * graphite-sese-to-poly.c (add_conditions_to_domain): Fixed bug.
1864 (build_sese_conditions_1, build_sese_conditions_after,
1865 build_sese_conditions_before): New.
1866 (build_sese_conditions): Rewritten.
1868 2009-04-03 Sebastian Pop <sebastian.pop@amd.com>
1869 Tobias Grosser <grosser@fim.uni-passau.de>
1871 Cleanup of code generation liveouts.
1872 * graphite-clast-to-gimple.c (translate_clast): Use a single
1873 rename_map instead of one per translated statement.
1874 Do not use SESE_LIVEOUT_RENAMES.
1875 (graphite_loop_normal_form): Do not use SESE_REDUCTION_LIST.
1876 (gloog): Do not use SESE_LIVEOUT_RENAMES.
1877 * graphite-scop-detection.c (harmful_stmt_in_bb): Return the close
1878 phi node of a reduction: when a loop contains a reduction used outside
1879 the loop, there should be a scalar close phi node on the exit block.
1880 * sese.c (new_sese): Do not initialize SESE_LIVEOUT,
1881 SESE_LIVEOUT_RENAMES, and SESE_REDUCTION_LIST.
1882 (free_sese): Do not free them.
1883 (sese_build_liveouts_use): Do not use them.
1884 (sese_build_liveouts_bb): Same.
1885 (sese_build_liveouts): Same.
1886 (sese_insert_phis_for_liveouts): Same.
1887 (sese_adjust_phis_for_liveouts): Same. Renamed sese_adjust_liveout_phis.
1888 (defined_in_loop_p): New.
1889 (alive_after_loop): New.
1890 (close_phi_not_yet_inserted_p): New.
1891 (struct alep, alep_p): New.
1892 (add_loop_exit_phis): Remove from the rename_map all the names defined
1893 in the code generated loop.
1894 (insert_loop_close_phis): Traverse the rename_map passed to it.
1895 Don't use SESE_LIVEOUT_RENAMES.
1896 (default_liveout_before_guard): Renamed default_before_guard.
1897 (insert_guard_phis): Do not use SESE_LIVEOUT_RENAMES.
1898 (graphite_copy_stmts_from_block): Do not directly call set_rename.
1899 (register_sese_liveout_renames): Removed.
1900 (copy_bb_and_scalar_dependences): Do not call it.
1901 * sese.h (struct sese): Removed fields: liveout, liveout_renames, and
1903 (SESE_LIVEOUT): Removed.
1904 (SESE_LIVEOUT_RENAMES): Removed.
1905 (SESE_REDUCTION_LIST): Removed.
1906 (sese_build_liveouts): Removed.
1907 (sese_adjust_phis_for_liveouts): Renamed sese_adjust_liveout_phis.
1908 (insert_loop_close_phis): Pass a htab_t instead of a sese.
1909 (insert_guard_phis): Same.
1910 (rename_map_elt): Declare a VEC of them.
1911 * tree-parloops.c (canonicalize_loop_ivs): reduction_list contains
1912 trees not pointers to trees.
1914 Rewrite in canonical close SSA form:
1915 * graphite-scop-detection.c (contains_only_close_phi_nodes): New.
1916 (limit_scops): Close the scop after the block containing the close phi
1918 (canonicalize_loop_closed_ssa): New.
1919 (canonicalize_loop_closed_ssa_form): New.
1920 (build_scops): Call canonicalize_loop_closed_ssa_form.
1922 * graphite-sese-to-poly.c: Fix typos.
1924 2009-04-03 Sebastian Pop <sebastian.pop@amd.com>
1926 * graphite-poly.c (print_scattering_function, print_pbb_domain):
1928 (dump_gbb_conditions, dump_gbb_cases, print_iteration_domain): New.
1929 (print_pbb): Add conditions.
1931 2009-04-01 Tobias Grosser <grosser@fim.uni-passau.de>
1932 Sebastian Pop <sebastian.pop@amd.com>
1934 * graphite-scop-detection.c (bb_in_sd_region): Use bb_in_region.
1935 * graphite-sese-to-poly.c (all_non_dominated_preds_marked_p): New.
1936 (build_scop_bbs_1): New.
1937 (build_scop_bbs): Rewrite.
1938 * sese.h (bb_in_region): New.
1940 2009-03-29 Tobias Grosser <grosser@fim.uni-passau.de>
1942 * graphite-poly.c (new_poly_bb, free_poly_bb): Initialize/free
1944 (print_scop): Style.
1945 * graphite-poly.h (poly_bb): Add drs vector.
1946 (PBB_DRS): Add accessor.
1947 * graphite-sese-to-poly.c (build_poly_dr): New.
1948 (build_pbb_drs, build_scop_drs): New.
1949 (build_poly_scop): call build_scop_drs (Disabled at the moment).
1951 2009-03-29 Tobias Grosser <grosser@fim.uni-passau.de>
1953 * tree-ssa-loop.c: Include forgotten toplev.h
1955 2009-03-29 Tobias Grosser <grosser@fim.uni-passau.de>
1957 * graphite-poly.c: (apply_poly_transforms): sorry -> gcc_unreachable.
1958 * testsuite/gcc.dg/graphite/pr37883.c: Remove -floop-*
1959 * testsuite/gcc.dg/graphite/pr37928.c: Same
1960 * testsuite/gcc.dg/graphite/pr38409.c: Same
1961 * testsuite/gcc.dg/graphite/pr38498.c: Same
1962 * testsuite/gcc.dg/graphite/pr38559.c: Same
1963 * testsuite/gcc.dg/graphite/pr39335.c: Same
1964 * testsuite/gcc.dg/graphite/pr39335_1.c: Same
1965 * testsuite/gfortran.dg/graphite/block-2.f: Same
1966 * tree-ssa-loop.c (gate_graphite_transforms): Always fail if called
1969 2009-03-28 Tobias Grosser <grosser@fim.uni-passau.de>
1971 * graphite-sese-to-poly.c (ref_nb_loops, build_access_matrix_with_af,
1972 build_access_matrix, build_scop_data_accesses): Remove access function
1973 building. (We get a new version soon).
1974 (build_bb_loops, scan_tree_for_params_right_scev): Update.
1975 * sese.h (nb_loops_around_loop_in_sese): Remove.
1976 (sese_loop_depth): Do not use SESE_LOOP_NEST any more.
1978 2009-03-27 Tobias Grosser <grosser@fim.uni-passau.de>
1979 Sebastian Pop <sebastian.pop@amd.com>
1981 * graphite-scop-detection.c (struct scopdet_info): Rename last
1983 (scopdet_basic_block_info, build_scops_1): Don't use
1984 CDI_POST_DOMINATORS. CDI_POST_DOMINATORS should never be used.
1986 2009-03-26 Tobias Grosser <grosser@fim.uni-passau.de>
1987 Sebastian Pop <sebastian.pop@amd.com>
1989 * graphite-clast-to-gimple.c (gloog): Call sese_build_liveouts.
1990 * sese.c (sese_build_liveouts_use): Renamed from
1991 sese_build_livein_liveouts_use. Remove liveins.
1992 (sese_build_liveouts_bb): Renamed from sese_build_livein_liveouts_bb.
1993 Call sese_build_liveouts_use.
1994 (sese_build_liveouts): Renamed from sese_build_livein_liveouts.
1995 Call sese_build_liveouts_bb.
1996 (new_sese, free_sese): Remove liveins.
1997 (sese_add_exit_phis_var): Deleted.
1998 (sese_insert_phis_for_liveouts): Call sese_add_exit_phis_edge
2000 (graphite_copy_stmts_from_block): Remove SESE_NUM_VER.
2002 * sese.h (sese): Remove num_ver and livein.
2003 (SESE_LIVEIN, SESE_LIVEIN_VER, SESE_NUM_VER): Removed.
2005 2009-03-25 Tobias Grosser <grosser@fim.uni-passau.de>
2007 * graphite-sese-to-poly.c (build_scop_scattering): Fix compile.
2009 2009-03-25 Tobias Grosser <grosser@fim.uni-passau.de>
2011 * graphite-sese-to-poly.c (compare_prefix_loops): Removed.
2012 (build_scop_scattering): Do not use compare_prefix_loops any more.
2013 (nb_common_loops): New.
2015 2009-03-24 Sebastian Pop <sebastian.pop@amd.com>
2017 * sese.c (get_new_name_from_old_name): Renamed get_rename.
2018 (register_old_and_new_names): Renamed set_rename.
2020 2009-03-24 Sebastian Pop <sebastian.pop@amd.com>
2022 * graphite-scop-detection.h (nb_reductions_in_loop): Revert removal
2023 of the decl from the previous commit.
2025 2009-03-24 Sebastian Pop <sebastian.pop@amd.com>
2027 * graphite-scop-detection.c (dot_scop): New.
2028 * graphite-scop-detection.h (dot_scop): Declared.
2030 2009-03-24 Sebastian Pop <sebastian.pop@amd.com>
2032 * graphite-sese-to-poly.c (compare_prefix_loops): Fix compare.
2034 2009-03-24 Sebastian Pop <sebastian.pop@amd.com>
2036 * cfgloopmanip.c (create_empty_loop_on_edge): Generate the loop exit
2037 condition at the end of the loop.
2038 * graphite.c (graphite_initialize, graphite_finalize): Print to
2039 dump_file the compiled function.
2040 * graphite-clast-to-gimple.c (graphite_create_new_loop): Update use
2041 of create_empty_loop_on_edge.
2042 (translate_clast): Update the code generation of loops for the new
2044 * cfgloop.h (create_empty_loop_on_edge): Update declaration.
2046 2009-03-24 Sebastian Pop <sebastian.pop@amd.com>
2048 Reverted the patch from 2009-03-19.
2050 2009-03-19 Tobias Grosser <grosser@fim.uni-passau.de>
2052 * graphite-poly.c (new_poly_bb, free_poly_bb): Initialize/free
2054 (print_scop): Style.
2055 * graphite-poly.h (poly_bb): Add drs vector.
2056 (PBB_DRS): Add accessor.
2057 * graphite-sese-to-poly.c (ref_nb_loops): Remove.
2058 (build_access_matrix_with_af, build_access_matrix,
2059 build_scop_data_accesses): Delete.
2060 (build_poly_dr): New.
2061 (build_pbb_drs, build_scop_drs): New.
2062 (build_poly_scop): call build_scop_drs.
2064 2009-03-13 Sebastian Pop <sebastian.pop@amd.com>
2066 * graphite-scop-detection.c (dot_all_scops_1): Close the table
2067 once per basic block.
2069 2009-03-13 Tobias Grosser <grosser@fim.uni-passau.de>
2071 * graphite-scop-detection.c (graphite_can_represent_scev): New.
2072 (graphite_can_represent_expr): Renamed from loop_affine_expr
2074 (stmt_simple_for_scop_p): Call graphite_can_represent_expr.
2075 (graphite_cannot_represent_loop): Add scop_entry to parameters.
2076 (scopdet_basic_block_info): Actually define entry_block.
2077 (stmt_simple_memref_p): Moved here from ...
2079 * tree-data-ref.c (stmt_simple_memref_p): here.
2080 * tree-data-ref.h (stmt_simple_memref_p): Removed.
2082 2009-03-13 Tobias Grosser <grosser@fim.uni-passau.de>
2084 * testsuite/gcc.dg/graphite/id-4.c: New.
2086 2009-03-12 Sebastian Pop <sebastian.pop@amd.com>
2088 * sese.c (expand_scalar_variables_expr): Handle tcc_comparison.
2089 (register_old_and_new_names): Update the content of the map.
2090 When there was already a rename_map_elt in the map at that
2092 (copy_bb_and_scalar_dependences): Do rename_variables after
2093 expand_scalar_variables.
2094 * graphite-clast-to-gimple.c (build_iv_mapping): Update the content
2095 of the map. When there was already a rename_map_elt in the
2096 map at that location, free it.
2097 (translate_clast): Pass the rename_map. Do not initialize and free
2098 a rename_map per stmt_user.
2099 (gloog): Initialize and free one rename_map and pass it to
2102 2009-03-12 Sebastian Pop <sebastian.pop@amd.com>
2104 * sese.c (expand_scalar_variables_stmt,
2105 expand_scalar_variables_ssa_name): Add a gimple_stmt_iterator
2107 (expand_scalar_variables_expr): Handle REALPART_EXPR and IMAGPART_EXPR.
2108 (expand_scalar_variables): Pass to expand_scalar_variables_stmt
2109 the gimple_stmt_iterator of the statement to be expanded.
2110 * graphite-scop-detection.c (is_simple_operand): Do handle
2113 2009-03-11 Tobias Grosser <grosser@fim.uni-passau.de>
2115 * graphite-scop-detection.c (is_simple_operand): Do not handle
2117 * testsuite/gcc.dg/graphite/id-2.c: New.
2119 * graphite-sese-to-poly.c (build_bb_loops,
2120 add_value_to_dim, scan_tree_for_params_right_scev,
2121 scan_tree_for_params_int, scan_tree_for_params, idx_record_params,
2122 find_params_in_bb, build_loop_iteration_domains,
2123 add_conditions_to_domain): Remove subtract.
2125 2009-03-11 Tobias Grosser <grosser@fim.uni-passau.de>
2127 * graphite-clast-to-gimple.c (loop_iv_stack_patch_for_consts,
2128 build_iv_mapping, compute_cloog_iv_types_1, build_cloog_prog):
2129 pbb_loop_at_index -> gbb_loop_at_index.
2130 * graphite-poly.c (new_poly_bb, new_scop): New accessors.
2131 (debug_loop_vec): Delete.
2132 * graphite-poly.h (poly_bb, scop): Change black_box and region to void
2133 pointer. Move LOOPS to gimple_bb_p and insert nb_params.
2134 (PBB_LOOPS): Removed.
2135 (PBB_BLACK_BOX): Insert cast.
2136 (pbb_set_black_box): New setter.
2137 (pbb_loop_at_index, pbb_loop_index): Removed.
2138 (scop_set_region, scop_set_nb_params): New.
2139 * graphite-sese-to-poly.c (new_gimple_bb, free_gimple_bb,
2140 build_scop_scattering, build_bb_loops): Add GBB_LOOPS.
2141 (build_poly_scop): Use scop_set_nb_params.
2142 * sese.h (gimple_bb): Add LOOPS.
2143 (GBB_LOOPS, gbb_loop_index, gbb_loop_at_index): New.
2145 2009-03-11 Tobias Grosser <grosser@fim.uni-passau.de>
2147 Revert previous commit.
2149 2009-03-11 Sebastian Pop <sebastian.pop@amd.com>
2151 * sese.c (expand_scalar_variables_expr): Handle tcc_comparison.
2152 (register_old_and_new_names): Update the content of the map.
2153 When there was already a rename_map_elt in the map at that
2155 (copy_bb_and_scalar_dependences): Do rename_variables after
2156 expand_scalar_variables.
2157 * graphite-clast-to-gimple.c (build_iv_mapping): Update the content
2158 of the map. When there was already a rename_map_elt in the
2159 map at that location, free it.
2160 (translate_clast): Pass the rename_map. Do not initialize and free
2161 a rename_map per stmt_user.
2162 (gloog): Initialize and free one rename_map and pass it to
2165 2009-03-11 Tobias Grosser <grosser@fim.uni-passau.de>
2167 Remove forgotten line in revert.
2169 2009-03-11 Sebastian Pop <sebastian.pop@amd.com>
2171 Revert previous commit.
2173 2009-03-10 Sebastian Pop <sebastian.pop@amd.com>
2175 * sese.c (register_old_and_new_names): Update the content
2176 of the map. When there was already a rename_map_elt in the
2177 map at that location, free it.
2178 (copy_bb_and_scalar_dependences): Do rename_variables after
2179 expand_scalar_variables.
2180 * graphite-clast-to-gimple.c (build_iv_mapping): Update the content
2181 of the map. When there was already a rename_map_elt in the
2182 map at that location, free it.
2183 (translate_clast): Pass the rename_map. Do not initialize and free
2184 a rename_map per stmt_user.
2185 (gloog): Initialize and free one rename_map and pass it to
2188 2009-03-10 Sebastian Pop <sebastian.pop@amd.com>
2190 * graphite-clast-to-gimple.c (translate_clast): context_loop
2193 2009-03-10 Tobias Grosser <grosser@fim.uni-passau.de>
2194 Sebastian Pop <sebastian.pop@amd.com>
2196 * graphite-ppl.c (ppl_insert_dimensions): Fix stupid mistake
2197 of the use of ppl_Polyhedron_map_space_dimensions.
2199 2009-03-10 Tobias Grosser <grosser@fim.uni-passau.de>
2200 Sebastian Pop <sebastian.pop@amd.com>
2202 * graphite-poly.c (unify_scattering_dimensions): Fix types.
2203 * graphite-poly.h (poly_dr_p, poly_dr, POLY_DR_TYPE, PDR_BB,
2204 PDR_TYPE, PDR_ACCESSES, pdr_accessp_nb_subscripts,
2205 pdr_accessp_nb_iterators, pdr_accessp_nb_params,
2206 pdr_accessp_alias_set_dim, pdr_accessp_subscript_dim,
2207 pdr_accessp_iterator_dim, pdr_accessp_param_dim,
2208 pbb_nb_params): New.
2209 (pbb_nb_loops, pbb_nb_scattering, scop_nb_params,
2210 nb_loops_around_pbb): Adapt return types.
2212 2009-03-09 Tobias Grosser <grosser@fim.uni-passau.de>
2214 * Makefile.in (graphite.o, graphite-sese-to-poly.o,
2215 graphite-clast-to-gimple.o, graphite-data-ref.o,
2216 graphite-scop-detection.o, graphite-poly.o): Add
2219 2009-03-05 Tobias Grosser <grosser@fim.uni-passau.de>
2221 * Makefile.in (graphite.o, graphite-sese-to-poly.o,
2222 graphite-clast-to-gimple.o, graphite-data-ref.o,
2223 graphite-scop-detection.o, graphite-poly.o): Add graphite-poly.h.
2225 2009-03-04 Tobias Grosser <grosser@fim.uni-passau.de>
2227 * testsuite/gcc.dg/graphite/pr37485.c: Remove -floop-block
2228 * testsuite/gcc.dg/graphite/pr37828.c: Same.
2229 * testsuite/gcc.dg/graphite/pr37684.c: Same.
2230 * testsuite/gcc.dg/graphite/block-0.c: Same.
2231 * testsuite/gcc.dg/graphite/block-1.c: Same.
2232 * testsuite/gcc.dg/graphite/block-2.c: Same.
2233 * testsuite/gcc.dg/graphite/block-3.c: Same.
2234 * testsuite/gcc.dg/graphite/block-4.c: Same.
2235 * testsuite/gcc.dg/graphite/block-5.c: Same.
2236 * testsuite/gcc.dg/graphite/block-6.c: Same.
2237 * testsuite/gfortran.dg/graphite/pr38083.f90: Same.
2238 * testsuite/gfortran.dg/graphite/block-1.f90: Same.
2239 * testsuite/gfortran.dg/graphite/block-3.f90: Same.
2240 * testsuite/gfortran.dg/graphite/pr37852.f90: Same.
2241 * testsuite/gfortran.dg/graphite/block-4.f90: Same.
2242 * testsuite/gfortran.dg/graphite/pr37980.f90: Same.
2243 * testsuite/gfortran.dg/graphite/pr38953.f90: Same.
2244 * testsuite/gfortran.dg/graphite/pr37857.f90: Same.
2245 * opts.c: Remove -floop-block from -O2.
2246 * graphite-poly.c: Fail if -floop-block -floop-interchange or
2247 -floop-strip-mine are used.
2249 2009-03-04 Tobias Grosser <grosser@fim.uni-passau.de>
2250 Sebastian Pop <sebastian.pop@amd.com>
2252 * graphite-clast-to-gimple.c (build_cloog_prog): Unify scattering
2254 * graphite-poly.c (pbb_compare, graphite_sort_pbbs,
2255 graphite_trans_bb_move_loop, graphite_trans_bb_strip_mine,
2256 strip_mine_profitable_p, is_interchange_valid,
2257 graphite_trans_bb_block, graphite_trans_loop_block,
2258 graphite_trans_scop_block): Temporary removed.
2259 (extend_scattering, unify_scattering_dimensions): New.
2260 (print_scattering_function, graphite_read_transforms):
2261 PBB_SCATTERING -> PBB_TRANSFORMED_SCATTERING.
2262 (graphite_generate_scattering_fns): Removed.
2263 (apply_poly_transforms): Cleanup.
2264 (free_poly_bb): Add PBB_SCATTERING -> PBB_TRANSFORMED_SCATTERING.
2265 (schedule_to_scattering): Moved.
2266 (PBB_STATIC_SCHEDULE, PBB_SCATTERING): Removed.
2267 (PBB_ORIGINAL_SCATTERING, PBB_TRANSFORMED_SCATTERING): New.
2268 (pbb_nb_scattering): New.
2269 (SCOP_ENTRY, SCOP_EXIT, SCOP_REGION_BBS, SCOP_DEP_GRAPH, SCOP_PARAMS,
2270 SCOP_LOOP_NEST, SCOP_PARAMS, SCOP_OLDIVS, SCOP_LIVEOUT_RENAMES):
2272 * graphite-ppl.c (ppl_insert_dimensions): Extended and renamed from
2274 (ppl_strip_loop): PBB_SCATTERING -> PBB_TRANSFORMED_SCATTERING.
2275 * graphite-scop-detection.c (dot_all_scops_1): PBB_SCATTERING
2276 -> PBB_TRANSFORMED_SCATTERING.
2277 * graphite-sese-to-poly.c (build_scop_bbs): Remove region.
2278 (build_pbb_scattering_polyhedron): Moved from schedule_to_scattering.
2279 (build_scop_scattering): Renamed from build_scop_canonical_schedules.
2280 (check_poly_representation): Do not return bool.
2281 (graphite_transform_loops): Reformat.
2282 * sese.h (SESE_ENTRY_BB, SESE_EXIT_BB): New.
2284 2009-03-04 Sebastian Pop <sebastian.pop@amd.com>
2286 * graphite-poly.c (print_pbb_domain, print_pbb, print_scop,
2287 debug_pbb_domain, debug_pbb, debug_scop): New.
2288 * graphite-poly.h (print_pbb_domain, print_pbb, print_scop,
2289 debug_pbb_domain, debug_pbb, debug_scop): Declared.
2291 2009-03-02 Sebastian Pop <sebastian.pop@amd.com>
2294 * tree-parloops.c (canonicalize_loop_ivs): Call fold_convert
2295 when the type precision of the induction variable should be
2296 larger than the type precision of nit.
2297 (gen_parallel_loop): Update use of canonicalize_loop_ivs.
2298 * graphite-clast-to-gimple.c (graphite_loop_normal_form): Same.
2299 * tree-flow.h (canonicalize_loop_ivs): Update declaration.
2301 * testsuite/gcc.dg/graphite/pr39335_1.c: New.
2302 * testsuite/gcc.dg/graphite/pr39335.c: New.
2304 2009-03-02 Sebastian Pop <sebastian.pop@amd.com>
2306 * tree-parloops.c (canonicalize_loop_ivs): reduction_list contains
2307 SSA_NAMES not struct reduction_info.
2309 2009-03-02 Sebastian Pop <sebastian.pop@amd.com>
2311 * sese.c (expand_scalar_variables_expr): Handle ADDR_EXPR.
2313 2009-02-27 Sebastian Pop <sebastian.pop@amd.com>
2314 Tobias Grosser <grosser@fim.uni-passau.de>
2316 * sese.c (new_sese): Initialize SESE_REDUCTION_LIST.
2317 (free_sese): Free SESE_REDUCTION_LIST.
2318 * sese.h (struct sese): Add field reduction_list.
2319 (SESE_REDUCTION_LIST): New.
2320 * graphite-clast-to-gimple.c (graphite_loop_normal_form): Call
2321 canonicalize_loop_ivs on SESE_REDUCTION_LIST.
2323 2009-02-27 Sebastian Pop <sebastian.pop@amd.com>
2324 Tobias Grosser <grosser@fim.uni-passau.de>
2326 * tree-flow.h (gather_scalar_reductions): Use struct loop * instead
2329 2009-02-27 Sebastian Pop <sebastian.pop@amd.com>
2330 Tobias Grosser <grosser@fim.uni-passau.de>
2332 * tree-parloops.c (struct brli, build_reduction_list_info,
2333 analyze_reduction_list, gather_scalar_reductions): New.
2334 (loop_parallel_p): Build a reduction list containing only
2335 PHI_RESULT SSA_NAMEs: call gather_scalar_reductions.
2336 (gen_parallel_loop): Call the analysis analyze_reduction_list.
2337 (parallelize_loops): Now reduction_list is a htab_t of SSA_NAMEs.
2338 * tree-flow.h (gather_scalar_reductions): Declared.
2340 2009-02-26 Sebastian Pop <sebastian.pop@amd.com>
2343 * graphite-clast-to-gimple.c (graphite_loop_normal_form): Do not call
2344 number_of_iterations_exit from a gcc_assert.
2346 2009-02-25 Sebastian Pop <sebastian.pop@amd.com>
2347 Jan Sjodin <jan.sjodin@amd.com>
2349 * output.h (graphite_out_file, graphite_in_file): Declared.
2350 * toplev.c (graphite_out_file, graphite_in_file): New.
2351 (init_asm_output): Initialize graphite_in_file and graphite_out_file.
2352 * graphite-clast-to-gimple.c (build_cloog_prog): Read PBB_SCATTERING.
2353 Don't call schedule_to_scattering.
2354 * common.opt (fgraphite-write, fgraphite-read): New.
2355 * graphite-poly.c: Include output.h.
2356 (print_scattering_function, print_scattering_functions,
2357 debug_scattering_function, debug_scattering_functions,
2358 graphite_write_transforms, graphite_read_transforms,
2359 graphite_generate_scattering_fns): New.
2360 (apply_poly_transforms): Do not apply transform if flag_graphite_read.
2361 Call graphite_generate_scattering_fns, graphite_write_transforms,
2362 graphite_read_transforms.
2363 (new_poly_bb): Initialize PBB_SCATTERING.
2364 (free_poly_bb): Free PBB_SCATTERING.
2365 (schedule_to_scattering): Does not return, initialize PBB_SCATTERING.
2366 * graphite-poly.h (struct poly_bb): Add field scattering.
2367 (PBB_SCATTERING): New.
2368 (print_scattering_function, print_scattering_functions,
2369 debug_scattering_function, debug_scattering_functions): Declared.
2370 * graphite-ppl.c (cloog_matrix_to_ppl_constraint): Matrices contain
2371 GMP values, not integers!
2372 (ppl_print_polyhedron_matrix, debug_ppl_polyhedron_matrix,
2373 ppl_read_polyhedron_matrix): New.
2374 * graphite-ppl.h (ppl_print_polyhedron_matrix,
2375 debug_ppl_polyhedron_matrix,
2376 ppl_read_polyhedron_matrix): Declared.
2377 * Makefile.in (graphite-poly.o): Depends on output.h.
2379 2009-02-23 Sebastian Pop <sebastian.pop@amd.com>
2380 Tobias Grosser <grosser@fim.uni-passau.de>
2383 * graphite-scop-detection.c (stmt_simple_for_scop_p): Analyze
2384 scalar evolutions in the scop_entry->loop_father.
2386 2009-02-23 Sebastian Pop <sebastian.pop@amd.com>
2387 Tobias Grosser <grosser@fim.uni-passau.de>
2389 * graphite.h (ref_nb_loops): Remove declaration.
2390 (struct gimple_bb, gimple_bb_p, GBB_BB, GBB_DATA_REFS, GBB_CONDITIONS,
2391 GBB_CONDITION_CASES, GBB_CLOOG_IV_TYPES, gbb_loop, print_gimple_bb,
2392 debug_gbb): Moved to sese.h.
2395 2009-02-23 Sebastian Pop <sebastian.pop@amd.com>
2396 Tobias Grosser <grosser@fim.uni-passau.de>
2398 * graphite-data-ref.[ch]: Disable.
2400 2009-02-23 Sebastian Pop <sebastian.pop@amd.com>
2401 Tobias Grosser <grosser@fim.uni-passau.de>
2403 * graphite-scop-detection.c (stmt_simple_for_scop_p): Analyze
2404 scalar evolutions in the scop_entry->loop_father.
2406 2009-02-23 Sebastian Pop <sebastian.pop@amd.com>
2408 * graphite-scop-detection.c (nb_reductions_in_loop): Moved here...
2409 (graphite_cannot_represent_loop_niter): Renamed
2410 graphite_cannot_represent_loop. Call nb_reductions_in_loop.
2411 (limit_scops): build_sese_loop_nests does not return a bool.
2412 * graphite-scop-detection.h (nb_reductions_in_loop): Declared.
2413 * sese.c (nb_reductions_in_loop): ... from here.
2414 (graphite_loop_normal_form): ... from here.
2415 (sese_record_loop): Does not fail, so does not return a bool.
2416 (build_sese_loop_nests): Same.
2417 * sese.h (build_sese_loop_nests): Update declaration.
2418 * graphite-clast-to-gimple.c (graphite_loop_normal_form): Moved here...
2419 (build_graphite_loop_normal_form): New.
2420 (gloog): Call build_graphite_loop_normal_form.
2421 * graphite-sese-to-poly.c (build_poly_scop): Don't fail on
2422 build_sese_loop_nests.
2424 * testsuite/gcc.dg/graphite/id-1.c: New.
2426 2009-02-23 Sebastian Pop <sebastian.pop@amd.com>
2427 Tobias Grosser <grosser@fim.uni-passau.de>
2429 * graphite-sese-to-poly.c (scan_tree_for_params): Remove REAL_CST.
2430 The SCoP detection fix is sufficient.
2432 2009-02-21 Sebastian Pop <sebastian.pop@amd.com>
2434 PR tree-optimization/39260
2435 * graphite-scop-detection.c (harmful_stmt_in_bb): Stop a SCoP when
2436 the basic block contains a condition with a real type.
2437 * graphite-sese-to-poly.c (scan_tree_for_params): Handle REAL_CST.
2439 * gcc.dg/graphite/pr39260.c: New.
2441 2009-02-21 Sebastian Pop <sebastian.pop@amd.com>
2443 * graphite-poly.c: Inlcude params.h.
2444 (graphite_trans_loop_block): Use PARAM_LOOP_BLOCK_TILE_SIZE for
2446 * Makefile.in (graphite-poly.o): Depend on PARAMS_H.
2447 * params.def (PARAM_LOOP_BLOCK_TILE_SIZE): Define.
2449 2009-02-20 Sebastian Pop <sebastian.pop@amd.com>
2450 Tobias Grosser <grosser@fim.uni-passau.de>
2452 * graphite-scop-detection.c (dot_all_scops_1,
2453 dot_all_scops): Moved here.
2454 * graphite-scop-detection.h (dot_all_scops): Declared here.
2455 * graphite.c (graphite_initialize, graphite_finalize): New.
2456 (graphite_transform_loops): Cleaned up.
2457 * sese.c (debug_oldivs): Moved here.
2458 * graphite-poly.c (graphite_apply_transformations): Renamed
2459 apply_poly_transforms.
2460 (debug_loop_vec): Moved here.
2461 * graphite-sese-to-poly.c (build_bb_loops, build_sese_conditions_1,
2462 scop_contains_non_iv_scalar_phi_nodes, build_sese_conditions,
2463 find_scop_parameters, build_scop_iteration_domain,
2464 add_conditions_to_constraints, build_scop_canonical_schedules,
2465 build_scop_data_accesses): Now static.
2466 (build_poly_scop, check_poly_representation): New.
2468 2009-02-20 Sebastian Pop <sebastian.pop@amd.com>
2470 * graphite.c (graphite_stmt_p, new_gimple_bb, free_gimple_bb,
2471 remove_gbbs_in_scop, free_scops, try_generate_gimple_bb,
2472 build_scop_bbs, ref_nb_loops, compare_prefix_loops,
2473 build_scop_canonical_schedules, build_bb_loops, add_value_to_dim,
2474 scan_tree_for_params_right_scev, scan_tree_for_params_int,
2475 scan_tree_for_params, struct irp_data, dx_record_params,
2476 find_params_in_bb, find_scop_parameters, gbb_from_bb,
2477 build_loop_iteration_domains, add_conditions_to_domain,
2478 phi_node_is_iv, bb_contains_non_iv_scalar_phi_nodes,
2479 scop_contains_non_iv_scalar_phi_nodes, build_sese_conditions_1,
2480 build_sese_conditions, add_conditions_to_constraints,
2481 build_scop_iteration_domain, build_access_matrix_with_af,
2482 build_access_matrix,
2483 build_scop_data_accesses): Moved to graphite-sese-to-poly.c.
2485 * graphite-sese-to-poly.c: New.
2486 * graphite-sese-to-poly.h: New.
2488 * Makefile.in: Add new rule for graphite-sese-to-poly.o.
2490 2009-02-20 Sebastian Pop <sebastian.pop@amd.com>
2492 * graphite.c: Split graphite code generation to a new file.
2493 (graphite_verify, gmp_cst_to_tree, clast_name_to_gcc,
2494 max_precision_type, clast_to_gcc_expression_red,
2495 clast_to_gcc_expression, gcc_type_for_clast_expr,
2496 gcc_type_for_clast_eq, loop_iv_stack_patch_for_consts,
2497 graphite_translate_clast_equation, graphite_create_guard_cond_expr,
2498 graphite_create_new_guard, clast_get_body_of_loop,
2499 gcc_type_for_cloog_iv, gcc_type_for_iv_of_clast_loop,
2500 graphite_create_new_loop, build_iv_mapping, copy_renames,
2501 translate_clast, find_cloog_iv_in_expr, compute_cloog_iv_types_1,
2502 compute_cloog_iv_types, free_scattering, save_var_name,
2503 initialize_cloog_names, build_scop_context, build_cloog_prog,
2504 set_cloog_options, debug_clast_stmt, scop_to_clast,
2505 print_generated_program, debug_generated_program,
2506 gloog): Moved to graphite-clast-to-gimple.c.
2508 (struct cloog_prog_clast): Moved to graphite-clast-to-gimple.h.
2510 (iv_stack_entry_is_constant, iv_stack_entry_is_iv,
2511 loop_iv_stack_push_iv, loop_iv_stack_insert_constant,
2512 loop_iv_stack_pop, loop_iv_stack_get_iv,
2513 loop_iv_stack_get_iv_from_name, debug_loop_iv_stack,
2514 free_loop_iv_stack, loop_iv_stack_remove_constants,
2515 debug_rename_elt, debug_rename_map_1, debug_rename_map,
2516 rename_map_elt_info, eq_rename_map_elts, debug_ivtype_elt,
2517 debug_ivtype_map_1, debug_ivtype_map, ivtype_map_elt_info,
2518 eq_ivtype_map_elts, sese_add_exit_phis_edge,
2519 sese_add_exit_phis_var, sese_insert_phis_for_liveouts,
2520 get_vdef_before_sese, sese_adjust_vphi,
2521 get_new_name_from_old_name, sese_adjust_phis_for_liveouts,
2522 oldiv_for_loop, rename_variables_in_stmt, is_parameter,
2523 is_iv, expand_scalar_variables_ssa_name,
2524 expand_scalar_variables_expr, expand_scalar_variables_stmt,
2525 expand_scalar_variables, rename_variables, remove_condition,
2526 get_true_edge_from_guard_bb, get_false_edge_from_guard_bb,
2527 add_loop_exit_phis, insert_loop_close_phis, struct igp,
2528 default_liveout_before_guard, add_guard_exit_phis,
2529 insert_guard_phis, register_old_and_new_names,
2530 graphite_copy_stmts_from_block, register_sese_liveout_renames,
2531 copy_bb_and_scalar_dependences, outermost_loop_in_sese,
2532 if_region_set_false_region, create_if_region_on_edge,
2533 move_sese_in_condition): Moved to sese.c.
2535 (nb_loops_around_loop_in_sese, struct ifsese, if_region_entry,
2536 if_region_exit, if_region_get_condition_block,
2537 struct rename_map_elt, new_rename_map_elt, enum iv_stack_entry_kind,
2538 union iv_stack_entry_data_union, struct iv_stack_entry_struct,
2539 iv_stack_entry_p, loop_iv_stack, struct ivtype_map_elt,
2540 ivtype_map_elt, new_ivtype_map_elt,
2541 recompute_all_dominators): Moved to sese.h.
2543 * graphite-clast-to-gimple.c: New.
2544 * graphite-clast-to-gimple.h: New.
2545 * Makefile.in: Add new rule for graphite-clast-to-gimple.o.
2546 * sese.c: Modified as said above.
2549 2009-02-20 Sebastian Pop <sebastian.pop@amd.com>
2551 * graphite.c: Split scop detection to a new file.
2552 (enum gbb_type, gbb_type, get_bb_type, struct sd_region_p, sd_region,
2553 move_sd_regions, loop_affine_expr, exclude_component_ref,
2554 is_simple_operand, stmt_simple_for_scop_p, harmful_stmt_in_bb,
2555 graphite_cannot_represent_loop_niter, struct scopdet_info,
2556 scopdet_basic_block_info, build_scops_1, bb_in_sd_region,
2557 find_single_entry_edge, find_single_exit_edge,
2558 create_single_entry_edge, sd_region_without_exit,
2559 create_single_exit_edge, unmark_exit_edges, mark_exit_edges,
2560 create_sese_edges, build_graphite_scops, limit_scops, build_scops):
2561 Moved to graphite-scop-detection.c.
2563 * graphite-scop-detection.c: New.
2564 * graphite-scop-detection.h: New.
2565 * Makefile.in: Add new rule for graphite-scop-detection.o.
2567 * sese.c: Include tree-chrec.h, tree-data-ref.h, and
2568 tree-scalar-evolution.h.
2569 (nb_reductions_in_loop, graphite_loop_normal_form, sese_record_loop,
2570 build_sese_loop_nests): Moved here from graphite.c.
2571 (param_index): Renamed parameter_index_in_region.
2573 2009-02-18 Tobias Grosser <grosser@fim.uni-passau.de>
2574 Sebastian Pop <sebastian.pop@amd.com>
2576 * gcc.dg/graphite/block-0.c: Expected to fail now.
2577 * gcc.dg/graphite/block-1.c: Same.
2578 * gcc.dg/graphite/block-5.c: Same.
2579 * gcc.dg/graphite/block-6.c: Same.
2581 2009-02-18 Tobias Grosser <grosser@fim.uni-passau.de>
2582 Sebastian Pop <sebastian.pop@amd.com>
2584 * graphite.h: Separate from graphite_bb_p the polyhedral
2585 representation in poly_bb_p and the GCC specifics in gimple_bb_p.
2586 (struct data_dependence_polyhedron, RDGE_DDP, ddp_p): Moved to
2587 graphite-data-ref.h.
2588 (struct poly_bb, PBB_SCOP, PBB_STATIC_SCHEDULE, PBB_DOMAIN,
2589 PBB_BLACK_BOX, PBB_LOOPS, pbb_nb_loops, pbb_loop_at_index,
2590 pbb_loop_index, struct scop, SCOP_BBS, SCOP_REGION, SCOP_ENTRY,
2591 SCOP_EXIT, SCOP_REGION_BBS, SCOP_DEP_GRAPH, SCOP_PARAMS,
2592 SCOP_LOOP_NEST, SCOP_PARAMS, SCOP_OLDIVS, SCOP_LIVEOUT_RENAMES,
2593 scop_nb_params): Moved to graphite-poly.h.
2594 * graphite-data-ref.c: Same.
2595 * graphite-data-ref.h: New.
2597 (pbb_compare, graphite_sort_pbbs, graphite_trans_bb_move_loop,
2598 graphite_trans_bb_strip_mine, strip_mine_profitable_p,
2599 is_interchange_valid, graphite_trans_bb_block,
2600 graphite_trans_loop_block, scop_max_loop_depth,
2601 graphite_trans_scop_block, graphite_apply_transformations,
2602 new_poly_bb, free_poly_bb, new_scop, free_scop): Moved to
2604 * graphite-poly.h: New.
2605 * graphite-poly.c: New.
2606 * Makefile.in (OBJS-common): Add graphite-poly.o.
2607 (graphite-poly.o): New rule.
2608 * tree-data-ref.h (struct data_reference): Remove unused scop field.
2611 2009-02-18 Sebastian Pop <sebastian.pop@amd.com>
2612 Tobias Grosser <grosser@fim.uni-passau.de>
2614 * graphite.c: Replace gb -> gbb.
2616 * graphite-data-ref.c: Same.
2618 2009-02-18 Sebastian Pop <sebastian.pop@amd.com>
2619 Tobias Grosser <grosser@fim.uni-passau.de>
2621 * Makefile.in (OBJS-commmon): Add sese.o.
2623 (graphite.o): Add sese.h.
2624 * graphite.c (bb_in_ss_p, loop_in_sese_p,
2625 sese_build_livein_liveouts_use, sese_build_livein_liveouts_bb,
2626 sese_build_livein_liveouts, register_bb_in_sese, new_sese, free_sese):
2628 (block_before_scop): Add missing return.
2629 (new_scop, free_scop): Remove SESE data structures.
2630 (scop_record_loop, scan_tree_for_params, find_params_in_bb,
2631 find_scop_parameters, build_loop_iteration_domains,
2632 add_conditions_to_domain, register_scop_liveout_renames,
2633 copy_bb_and_scalar_dependences): Scop -> SESE.
2635 (add_conditions_to_domain): SCoP -> SESE and remove check
2636 (scop_contains_non_iv_scalar_phi_nodes): New.
2637 (build_scop_conditions_1, build_scop_conditions): Remove check for
2638 non iv scalar phi nodes.
2639 (print_scop_statistics): New.
2640 (graphite_transform_loops): Cleanup.
2642 * graphite.h: Move to sese & cleanup.
2646 2009-02-16 Sebastian Pop <sebastian.pop@amd.com>
2647 Tobias Grosser <grosser@fim.uni-passau.de>
2649 * graphite.c (build_scop_conditions_1): Conditions are only
2650 at the end of a basic block.
2652 2009-02-16 Sebastian Pop <sebastian.pop@amd.com>
2653 Tobias Grosser <grosser@fim.uni-passau>
2655 * graphite.h (struct graphite_bb): Remove compressed_alpha_matrix
2657 (GBB_ALPHA): Removed.
2659 2009-02-16 Sebastian Pop <sebastian.pop@amd.com>
2660 Tobias Grosser <grosser@fim.uni-passau.de>
2662 * graphite-data-ref.c (graphite_test_dependence): Don't use
2663 GBB_DYNAMIC_SCHEDULE.
2664 * graphite.c (new_graphite_bb): Same.
2665 (free_graphite_bb): Same.
2666 (build_scop_dynamic_schedules): Removed.
2667 (graphite_transform_loops): Don't call it.
2668 * graphite.h (struct graphite_bb): Remove dynamic_schedule field.
2669 (GBB_DYNAMIC_SCHEDULE): Removed.
2671 2009-02-16 Sebastian Pop <sebastian.pop@amd.com>
2672 Tobias Grosser <grosser@fim.uni-passau.de>
2674 * graphite.c (schedule_to_scattering): Don't use CloogMatrix.
2675 (print_graphite_bb): Same.
2676 (build_cloog_prog): Same.
2678 2009-02-16 Sebastian Pop <sebastian.pop@amd.com>
2679 Tobias Grosser <grosser@fim.uni-passau.de>
2681 * graphite.c (build_cloog_prog): Don't use CloogMatrix.
2683 2009-02-16 Sebastian Pop <sebastian.pop@amd.com>
2684 Tobias Grosser <grosser@fim.uni-passau.de>
2686 * graphite.c (build_scop_context): Don't use CloogMatrix.
2687 * graphite-ppl.c (new_Cloog_Domain_from_ppl_Polyhedron): New.
2688 * graphite-ppl.h (new_Cloog_Domain_from_ppl_Polyhedron): Declared.
2690 2009-02-16 Sebastian Pop <sebastian.pop@amd.com>
2691 Tobias Grosser <grosser@fim.uni-passau.de>
2693 * graphite.h (struct scop): Move params, old_ivs, loops, loop_nest,
2694 liveout_renames, add_params fields...
2695 (struct sese): ... here.
2696 (SESE_PARAMS, SESE_LOOPS, SESE_LOOP_NEST, SESE_ADD_PARAMS,
2697 SESE_PARAMS, SESE_OLDIVS, SESE_LIVEOUT_RENAMES): New.
2699 2009-02-16 Sebastian Pop <sebastian.pop@amd.com>
2700 Tobias Grosser <grosser@fim.uni-passau.de>
2702 * graphite.c (print_scop): Do not print the CLooG program.
2703 (new_scop, free_scop, initialize_cloog_names, build_scop_context,
2704 build_cloog_prog, gloog): Don't use SCOP_PROG.
2705 (find_transform): Renamed scop_to_clast.
2706 (print_generated_program, debug_generated_program): New.
2707 (graphite_transform_loops): Adapt to new interface.
2708 * graphite.h (struct scop): Remove program field.
2709 (SCOP_PROG): Removed.
2710 (print_generated_program, debug_generated_program): Declared.
2712 2009-02-16 Sebastian Pop <sebastian.pop@amd.com>
2714 * graphite-data-ref.c (schedule_precedes_p, schedule_same_p): New.
2715 (statement_precedes_p): Use schedule_same_p and schedule_precedes_p.
2716 * graphite.c (gbb_compare, schedule_to_scattering, print_graphite_bb,
2717 free_graphite_bb, build_scop_canonical_schedules,
2718 graphite_trans_bb_strip_mine, graphite_trans_scop_block): Static
2719 schedules are now represented using a ppl_Linear_Expression_t.
2720 * graphite.h (struct graphite_bb): Same.
2721 * graphite-ppl.c (ppl_lexico_compare_linear_expressions): New.
2722 * graphite-ppl.h (ppl_lexico_compare_linear_expressions): Declared.
2724 2009-02-15 Sebastian Pop <sebastian.pop@amd.com>
2726 * graphite.c: Free local memory.
2727 * graphite-ppl.c: Same.
2729 2009-02-15 Sebastian Pop <sebastian.pop@amd.com>
2731 * graphite.c (const_column_index, get_first_matching_sign_row_index,
2732 get_lower_bound_row, get_upper_bound_row, copy_constraint,
2733 swap_constraint_variables, scale_constraint_variable): Removed.
2734 (graphite_trans_bb_strip_mine): Remove pong.
2735 * graphite-ppl.c: Include missing header files.
2736 (set_inhomogeneous, set_coef, shift_poly, ppl_strip_loop): New.
2737 * graphite-ppl.h (ppl_strip_loop): Declared.
2738 * Makefile.in (graphite-ppl.o): Adjust dependences.
2740 2009-02-14 Sebastian Pop <sebastian.pop@amd.com>
2742 * graphite.c (build_loop_iteration_domains): Remove ping pong.
2743 (build_scop_iteration_domain): Same.
2745 2009-02-13 Sebastian Pop <sebastian.pop@amd.com>
2747 * graphite.c (scan_tree_for_params, add_conditions_to_domain): Remove
2749 (add_value_to_dim, scan_tree_for_params_right_scev,
2750 scan_tree_for_params_int): New.
2751 * graphite-ppl.c (oppose_constraint): New.
2752 (insert_constraint_into_matrix): Implement missing cases.
2753 * graphite-ppl.h (insert_constraint_into_matrix): Declared.
2755 2009-02-13 Sebastian Pop <sebastian.pop@amd.com>
2757 * graphite.c (graphite_trans_bb_move_loop): Remove ping pong,
2758 use ppl_move_dimension.
2760 2009-02-12 Sebastian Pop <sebastian.pop@amd.com>
2762 * graphite-data-ref.c: Domains are now ppl_Polyhedra_t.
2765 * graphite-ppl.c: Same.
2766 * graphite-ppl.h: Same.
2768 2009-02-12 Sebastian Pop <sebastian.pop@amd.com>
2770 Revert last 3 commits.
2772 2009-02-10 Sebastian Pop <sebastian.pop@amd.com>
2774 * graphite.c (scan_tree_for_params, add_conditions_to_domain): Remove
2776 (add_value_to_dim, scan_tree_for_params_right_scev,
2777 scan_tree_for_params_int): New.
2778 * graphite-ppl.c (oppose_constraint): New.
2779 (insert_constraint_into_matrix): Implement missing cases.
2780 * graphite-ppl.h (insert_constraint_into_matrix): Declared.
2782 2009-02-10 Sebastian Pop <sebastian.pop@amd.com>
2784 * graphite.c (graphite_trans_bb_move_loop): Remove unused variables.
2786 2009-02-10 Sebastian Pop <sebastian.pop@amd.com>
2787 Tobias Grosser <grosser@fim.uni-passau.de>
2789 * graphite.c (graphite_trans_bb_move_loop): Remove ping pong,
2790 use ppl_move_dimension.
2791 * graphite-ppl.c (ppl_move_dimension): New.
2792 * graphite-ppl.h (ppl_move_dimension): Declared.
2794 2009-02-10 Sebastian Pop <sebastian.pop@amd.com>
2796 * graphite.c: Do not include cloog/cloog.h.
2797 (print_graphite_bb): Remove ping pong, call PPL print function.
2799 2009-02-10 Tobias Grosser <grosser@fim.uni-passau.de>
2801 * Makefile.in (OBJS-common): Add graphite-ppl.o.
2802 (graphite.o): Add dependence on graphite-ppl.h.
2803 (graphite-ppl.o): New.
2804 (graphite-data-ref.c): Ping pong between PPL data structures
2806 * graphite-ppl.c: New.
2807 * graphite-ppl.h: New.
2808 * graphite.c: Include graphite-ppl.h.
2809 (print_graphite_bb, add_conditions_to_domain, build_cloog_prog,
2810 graphite_trans_bb_move_loop, graphite_trans_bb_strip_mine):
2811 Ping pong between PPL data structures and matrices.
2812 (new_graphite_bb): Create a PPL constraint system.
2813 Call ppl_delete_Constraint_System instead of cloog_matrix_free.
2814 (build_loop_iteration_domains): Use PPL functions.
2815 * graphite.h: Include graphite-ppl.h. Fix comments.
2816 (graphite_bb): Use a ppl_Constraint_System_t instead of
2817 CloogMatrix for representing the domain.
2818 (scop): Remove static_schedule.
2819 (gbb_nb_loops): Ping pong between PPL data structures and matrices.
2821 2009-02-06 Sebastian Pop <sebastian.pop@amd.com>
2823 * graphite.c: Fix some comments.
2825 2009-02-05 Sebastian Pop <sebastian.pop@amd.com>
2828 * graphite.c (if_region_set_false_region): After moving a region
2829 in the false branch of a condition, remove the empty dummy
2831 (gloog): Remove wrong fix for PR38953.
2833 2009-02-03 Tobias Grosser <grosser@fim.uni-passau.de>
2835 * graphite.c (bb_in_sese_p, sese_build_livein_liveouts_use,
2836 sese_build_livein_liveouts_bb, sese_build_livein_liveouts,
2837 register_bb_in_sese, new_sese, free_sese): Moved.
2838 (dot_scop_1, build_scop_loop_nests, build_loop_iteration_domains,
2839 outermost_loop_in_scop, build_scop_iteration_domain,
2840 expand_scalar_variables_ssa_name, get_vdef_before_scop,
2841 limit_scops): Use bb_in_sese_p instead of bb_in_scop_p.
2842 Use loop_in_sese_p instead of loop_in_scop_p.
2843 (new_graphite_bb, new_scop, gloog): Do not initialize SCOP_BBS_B.
2844 (free_scop): Do not free SCOP_BBS_B.
2845 (nb_loops_around_loop_in_scop, nb_loops_around_gb,
2846 ref_nb_loops): Moved here...
2847 * graphite.h (ref_nb_loops): ... from here.
2848 (struct scop): Remove bbs_b bitmap.
2849 (SCOP_BBS_B, bb_in_scop_p, loop_in_scop_p): Removed.
2850 * testsuite/gcc.dg/graphite/scop-19.c: New
2852 2009-02-03 Tobias Grosser <grosser@fim.uni-passau.de>
2854 * graphite.c (scopdet_basic_block_info): Fix bug in scop
2857 2009-01-30 Tobias Grosser <grosser@fim.uni-passau.de>
2859 * graphite.c (new_loop_to_cloog_loop_str, hash_loop_to_cloog_loop,
2860 eq_loop_to_cloog_loop): Remove.
2861 (new_scop, free_scop): Remove SCOP_LOOP2CLOOG_LOOP.
2862 * graphite.h (struct scop): Remove loop2cloog_loop.
2863 (loop_domain_dim, loop_iteration_vector_dim): Remove.
2865 2009-01-30 Tobias Grosser <grosser@fim.uni-passau.de>
2867 * opts.c (decode_options): Only add graphite options to O2
2868 if we compile with graphite enabled.
2870 2009-01-26 Sebastian Pop <sebastian.pop@amd.com>
2872 * Merge from mainline (r143163:143684).
2874 2009-01-26 Sebastian Pop <sebastian.pop@amd.com>
2876 * graphite.c (debug_value): Removed.
2877 * graphite.h (debug_value): Removed.
2879 2009-01-23 Sebastian Pop <sebastian.pop@amd.com>
2881 * passes.c (init_optimization_passes): Do not call pass_copy_prop
2882 after graphite: pass_copy_prop does not maintain a proper loop closed
2883 SSA form. pass_copy_prop should be fixed.
2885 2009-01-23 Sebastian Pop <sebastian.pop@amd.com>
2887 * graphite.c (scop_adjust_phis_for_liveouts): Fix warning.
2889 2009-01-23 Sebastian Pop <sebastian.pop@amd.com>
2891 * graphite.c (graphite_verify): Add a call to verify_loop_closed_ssa.
2892 (gloog): Split the exit of the scop when the scop exit is a loop exit.
2893 (graphite_transform_loops): Only call cleanup_tree_cfg if gloog
2896 2009-01-20 Sebastian Pop <sebastian.pop@amd.com>
2898 * graphite.c (gloog): Return true when code gen succeeded.
2899 (graphite_transform_loops): Do not call cleanup_tree_cfg if
2900 the code of the function did not changed. After cleanup_tree_cfg
2901 call rewrite_into_loop_closed_ssa to maintain the loop closed ssa
2904 2009-01-19 Sebastian Pop <sebastian.pop@amd.com>
2906 * graphite.c (stmt_simple_for_scop_p): Also handle cases when
2907 gimple_call_lhs is NULL.
2909 2009-01-16 Sebastian Pop <sebastian.pop@amd.com>
2910 Tobias Grosser <tobi.grosser@amd.com>
2912 * graphite.c (graphite_trans_scop_block): Do not block single
2915 2009-01-15 Sebastian Pop <sebastian.pop@amd.com>
2916 Tobias Grosser <tobi.grosser@amd.com>
2918 * graphite.c (build_scop_canonical_schedules): Start schedules at
2921 2009-01-15 Sebastian Pop <sebastian.pop@amd.com>
2922 Tobias Grosser <tobi.grosser@amd.com>
2924 * graphite.c (compare_prefix_loops): New.
2925 (build_scop_canonical_schedules): Rewritten.
2926 (graphite_transform_loops): Move build_scop_canonical_schedules
2927 after build_scop_iteration_domain.
2929 2009-01-14 Sebastian Pop <sebastian.pop@amd.com>
2930 Tobias Grosser <tobi.grosser@amd.com>
2932 * graphite.c (add_conditions_to_domain): Add the loops to
2933 the dimension of the iteration domain. Do copy the domain
2934 only when it exists.
2935 (build_scop_conditions_1): Do not call add_conditions_to_domain.
2936 (add_conditions_to_constraints): New.
2937 (can_generate_code_stmt, can_generate_code): Removed.
2938 (gloog): Do not call can_generate_code.
2939 (graphite_transform_loops): Call add_conditions_to_constraints
2940 after building the iteration domain.
2942 2009-01-14 Sebastian Pop <sebastian.pop@amd.com>
2943 Tobias Grosser <tobi.grosser@amd.com>
2944 Jan Sjodin <jan.sjodin@amd.com>
2946 * graphite.c (scan_tree_for_params): On substractions negate
2947 all the coefficients of the term.
2948 (clast_to_gcc_expression_red): New. Handle reduction expressions
2949 of more than two operands.
2950 (clast_to_gcc_expression): Call clast_to_gcc_expression_red.
2951 (get_vdef_before_scop): Handle also the case of default definitions.
2953 2009-01-14 Sebastian Pop <sebastian.pop@amd.com>
2956 * graphite.c (get_vdef_before_scop, scop_adjust_vphi): New.
2957 (scop_adjust_phis_for_liveouts): Call scop_adjust_vphi.
2958 (gloog): Do not call cleanup_tree_cfg.
2959 (graphite_transform_loops): Call cleanup_tree_cfg after all
2960 scops have been code generated.
2962 2009-01-13 Sebastian Pop <sebastian.pop@amd.com>
2964 * passes.c (init_optimization_passes): Schedule after
2965 graphite transforms pass_copy_prop, pass_dce_loop and pass_lim.
2967 2009-01-13 Sebastian Pop <sebastian.pop@amd.com>
2969 * graphite.c (expand_scalar_variables_stmt): Do not pass loop_p.
2971 (expand_scalar_variables_ssa_name): Do not pass loop_p. Fix comment.
2972 Set the type of an expression to the type of its assign statement.
2973 (expand_scalar_variables_expr): Do not pass loop_p.
2974 Fix comment. Stop recursion on tcc_constant or tcc_declaration.
2975 (copy_bb_and_scalar_dependences): Do not pass loop_p.
2976 (translate_clast): Update call to copy_bb_and_scalar_dependences.
2978 2009-01-11 Sebastian Pop <sebastian.pop@amd.com>
2980 * graphite.c (expand_scalar_variables_ssa_name): Set the type of
2981 an expression to the gimple_expr_type of its assign statement.
2982 (expand_scalar_variables_expr): Stop recursion on tcc_constant
2985 2009-01-11 Sebastian Pop <sebastian.pop@amd.com>
2987 PR tree-optimization/38786
2988 * testsuite/gcc.dg/graphite/pr38786.c: New.
2989 * graphite.c (expand_scalar_variables_ssa_name): New, outlined from
2990 the SSA_NAME case of expand_scalar_variables_expr.
2991 (expand_scalar_variables_expr): Also gather the scalar computation
2992 used to index the memory access.
2993 (expand_scalar_variables_stmt): Pass to expand_scalar_variables_expr
2994 the gimple_stmt_iterator where it inserts new code.
2996 2009-01-10 Sebastian Pop <sebastian.pop@amd.com>
2998 * testsuite/gcc.dg/graphite/block-3.c: Fix compile error on 32bit.
3000 2009-01-10 Sebastian Pop <sebastian.pop@amd.com>
3002 * opts.c (decode_options): Enable flag_graphite_identity and
3003 flag_loop_block in -O2 and above.
3005 2009-01-08 Sebastian Pop <sebastian.pop@amd.com>
3007 * libjava/classpath/lib/gnu/java/awt/peer/gtk/GtkMouseInfoPeer.class:
3008 Fix merge problem: replace with the file from trunk.
3010 2009-01-08 Sebastian Pop <sebastian.pop@amd.com>
3012 * Merge from mainline (r141727:143163).
3014 2009-01-07 Sebastian Pop <sebastian.pop@amd.com>
3015 Jan Sjodin <jan.sjodin@amd.com>
3017 PR tree-optimization/38559
3018 * testsuite/gcc.dg/graphite/pr38559.c: New.
3020 * graphite.c (debug_value, copy_constraint,
3021 swap_constraint_variables, scale_constraint_variable, ): New.
3022 (get_lower_bound, get_upper_bound): Removed.
3023 (graphite_trans_bb_strip_mine): Clean up this code that works
3024 only for constant number of iterations. Fully copy upper and
3025 lower bound constraints, not only the constant part of them.
3026 * graphite.h (debug_value): Declared.
3028 2009-01-06 Jan Sjodin <jan.sjodin@amd.com>
3030 PR tree-optimization/38492
3031 PR tree-optimization/38498
3032 * tree-check.c (operator_is_linear, scev_is_linear_expression): New.
3033 * tree-chrec.h (scev_is_linear_expression): Declared.
3034 * graphite.c (graphite_cannot_represent_loop_niter): New.
3035 (scopdet_basic_block_info): Call graphite_cannot_represent_loop_niter.
3036 (graphite_loop_normal_form): Use gcc_assert.
3037 (scan_tree_for_params): Use CASE_CONVERT.
3038 (phi_node_is_iv, bb_contains_non_iv_scalar_phi_nodes): New.
3039 (build_scop_conditions_1): Call bb_contains_non_iv_scalar_phi_nodes.
3040 Use gcc_assert. Discard scops that contain unhandled cases.
3041 (build_scop_conditions): Return a boolean status for unhandled cases.
3042 (strip_mine_profitable_p): Print the loop number, not its depth.
3043 (is_interchange_valid): Pass the depth of the loop nest, don't
3044 recompute it wrongly.
3045 (graphite_trans_bb_block): Same.
3046 (graphite_trans_bb_block): Print tentative of loop blocking.
3047 (graphite_trans_scop_block): Do not print that the loop has been
3049 (graphite_transform_loops): Do not handle scops that contain condition
3052 * testsuite/gcc.dg/graphite/pr38500.c: Fixed warning as committed
3054 * testsuite/gcc.dg/graphite/block-0.c: Update test.
3055 * testsuite/gcc.dg/graphite/block-1.c: Same.
3056 * testsuite/gcc.dg/graphite/block-2.c: Remove xfail and test for
3058 * testsuite/gcc.dg/graphite/block-4.c: Remove test for strip mine.
3059 * testsuite/gcc.dg/graphite/block-3.c: New.
3060 * testsuite/gcc.dg/graphite/pr38498.c: New.
3062 2008-12-22 Harsha Jagasia <harsha.jagasia@amd.com>
3064 PR tree-optimization/38510
3065 * gcc.dg/graphite/pr38510.c: New.
3066 * graphite.c (recompute_all_dominators): Call mark_irreducible_loops.
3067 (translate_clast): Call recompute_all_dominators before
3069 (gloog): Call recompute_all_dominators before graphite_verify.
3071 2008-12-12 Sebastian Pop <sebastian.pop@amd.com>
3073 PR tree-optimization/38492
3074 * graphite.c (rename_map_elt, debug_rename_elt,
3075 debug_rename_map_1, debug_rename_map, new_rename_map_elt,
3076 rename_map_elt_info, eq_rename_map_elts,
3077 get_new_name_from_old_name, bb_in_sese_p): Moved around.
3078 (sese_find_uses_to_rename_use): Renamed sese_build_livein_liveouts_use.
3079 (sese_find_uses_to_rename_bb): Renamed sese_build_livein_liveouts_bb.
3080 (sese_build_livein_liveouts): New.
3081 (new_sese, free_sese): New.
3082 (new_scop): Call new_sese.
3083 (free_scop): Call free_sese.
3084 (rename_variables_from_edge, rename_phis_end_scop): Removed.
3085 (register_old_new_names): Renamed register_old_and_new_names.
3086 (register_scop_liveout_renames, add_loop_exit_phis,
3087 insert_loop_close_phis, struct igp,
3088 default_liveout_before_guard, add_guard_exit_phis,
3089 insert_guard_phis, copy_renames): New.
3090 (translate_clast): Call insert_loop_close_phis and insert_guard_phis.
3091 (sese_add_exit_phis_edge): Renamed scop_add_exit_phis_edge.
3092 (rewrite_into_sese_closed_ssa): Renamed scop_insert_phis_for_liveouts.
3093 (scop_adjust_phis_for_liveouts): New.
3094 (gloog): Call scop_adjust_phis_for_liveouts.
3096 * graphite.h (struct sese): Documented. Added fields liveout,
3098 (SESE_LIVEOUT, SESE_LIVEIN, SESE_LIVEIN_VER, SESE_NUM_VER): New.
3099 (new_sese, free_sese, sese_build_livein_liveouts): Declared.
3100 (struct scop): Added field liveout_renames.
3101 (SCOP_LIVEOUT_RENAMES): New.
3103 2008-12-11 Sebastian Pop <sebastian.pop@amd.com>
3105 PR tree-optimization/38409
3106 * gcc.dg/graphite/pr38409.c: New.
3107 * graphite.c (nb_reductions_in_loop): Use simple_iv.
3109 2008-12-11 Sebastian Pop <sebastian.pop@amd.com>
3111 * graphite.c (gcc_type_for_cloog_iv): By default return
3113 (graphite_create_new_loop): Don't fold_convert the already
3114 fold_convert-ed expression.
3116 2008-12-11 Harsha Jagasia <harsha.jagasia@amd.com>
3118 PR tree-optimization/38446
3119 * gcc.dg/graphite/pr38446.c: New.
3120 * graphite.c (register_bb_in_sese): New.
3121 (bb_in_sese_p): Check if bb belongs to sese region by explicitly
3122 looking at the bbs in the region.
3123 * graphite.h (sese): Add region_basic_blocks pointer set to
3124 structure and initialize at the time of defining new scop.
3126 2008-12-11 Tobias Grosser <grosser@fim.uni-passau.de>
3128 * graphite.c (new_graphite_bb): Initialize GBB_STATIC_SCHEDULE.
3129 (find_params_in_bb): Do not free data refs.
3130 (free_graphite_bb): Add FIXME on disabled free_data_refs.
3132 2008-12-11 Sebastian Pop <sebastian.pop@amd.com>
3134 * testsuite/gcc.dg/graphite/scop-16.c: Test only scop specific info.
3135 * testsuite/gcc.dg/graphite/scop-17.c: Same.
3136 * testsuite/gcc.dg/graphite/block-5.c: New.
3137 * testsuite/gcc.dg/graphite/block-6.c: New.
3138 * testsuite/gcc.dg/graphite/pr37485.c: Clean dump file after.
3139 * testsuite/gcc.dg/graphite/pr37684.c: Same.
3140 * testsuite/gcc.dg/graphite/block-2.c: Same.
3142 * graphite.c (struct ivtype_map_elt): New.
3143 (debug_ivtype_elt, debug_ivtype_map_1, debug_ivtype_map,
3144 new_ivtype_map_elt, ivtype_map_elt_info, eq_ivtype_map_elts,
3145 gcc_type_for_cloog_iv): New.
3146 (loop_iv_stack_patch_for_consts): Use the type of the induction
3147 variable from the original loop, except for the automatically
3148 generated loops, i.e., in the case of a strip-mined loop, in
3149 which case there is no original loop: in that case just use
3151 (new_graphite_bb): Initialize GBB_CLOOG_IV_TYPES.
3152 (free_graphite_bb): Free GBB_CLOOG_IV_TYPES.
3153 (clast_name_to_gcc): Accept params to be NULL.
3154 (clast_to_gcc_expression): Take an extra parameter for the type.
3155 Convert to that type all the expressions built by this function.
3156 (gcc_type_for_clast_expr, gcc_type_for_clast_eq): New.
3157 (graphite_translate_clast_equation): Compute the type of the
3158 clast_equation before translating its LHS and RHS.
3159 (clast_get_body_of_loop, gcc_type_for_iv_of_clast_loop): New.
3160 (graphite_create_new_loop): Compute the type of the induction
3161 variable before translating the lower and upper bounds and before
3162 creating the induction variable.
3163 (rename_variables_from_edge, rename_phis_end_scop): New.
3164 (copy_bb_and_scalar_dependences): Call rename_phis_end_scop.
3165 (sese_add_exit_phis_edge): Do not use integer_zero_node.
3166 (find_cloog_iv_in_expr, compute_cloog_iv_types_1,
3167 compute_cloog_iv_types): New.
3168 (gloog): Call compute_cloog_iv_types before starting the
3169 translation of the clast.
3171 * graphite.h (struct graphite_bb): New field cloog_iv_types.
3172 (GBB_CLOOG_IV_TYPES): New.
3173 (debug_ivtype_map): Declared.
3174 (oldiv_for_loop): New.
3176 2008-12-10 Tobias Grosser <grosser@fim.uni-passau.de>
3179 * graphite.c (new_scop): Initialize SCOP_ADD_PARAMS.
3180 (param_index): Assert if parameter is not know after parameter
3182 (find_params_in_bb): Detect params directly in GBB_CONDITIONS.
3183 (find_scop_parameters): Mark, that we have finished parameter
3185 (graphite_transform_loops): Move condition detection before parameter
3187 * graphite.h (struct scop): Add SCOP_ADD_PARAMS.
3188 * testsuite/gfortran.dg/graphite/pr38459.f90: New.
3190 2008-12-09 Tobias Grosser <grosser@fim.uni-passau.de>
3192 * graphite.c (graphite_transform_loops): Always call find_transform ()
3193 in ENABLE_CHECKING. So we test these code paths, even if we do not
3196 2008-12-09 Tobias Grosser <grosser@fim.uni-passau.de>
3198 * graphite.c (print_graphite_bb): Fix printing to file != dump_file.
3199 (print_scop): Ditto.
3201 2008-12-08 Tobias Grosser <grosser@fim.uni-passau.de>
3204 Fix testsuite/gfortran.dg/graphite/id-3.f90.
3205 * graphite.c (scopdet_basic_block_info): Fix bug that found some
3206 regions more than once.
3208 2008-12-03 Sebastian Pop <sebastian.pop@amd.com>
3210 Fix testsuite/gfortran.dg/graphite/id-4.f90.
3211 * graphite.c (scan_tree_for_params): Do not compute the multiplicand
3214 2008-12-03 Sebastian Pop <sebastian.pop@amd.com>
3216 Fix testsuite/gfortran.dg/graphite/id-1.f90.
3217 * graphite.c (gmp_cst_to_tree): Pass the type in parameter.
3218 (loop_iv_stack_patch_for_consts): Update use of gmp_cst_to_tree.
3219 (max_precision_type): New.
3220 (value_clast): Removed.
3221 (clast_to_gcc_expression): Be more careful to types of expressions.
3222 Use max_precision_type and update use of gmp_cst_to_tree.
3223 (graphite_translate_clast_equation): Use max_precision_type.
3224 (graphite_create_guard_cond_expr): Do not use integer_type_node,
3225 use the type of the condition.
3226 (graphite_create_new_loop): Do not use integer_type_node, use the
3227 max_precision_type of lb and ub.
3229 2008-12-03 Sebastian Pop <sebastian.pop@amd.com>
3231 * graphite.c (build_scops_1): Initialize open_scop.exit
3234 2008-12-02 Sebastian Pop <sebastian.pop@amd.com>
3236 * testsuite/gcc.dg/graphite/pr38084.c: New.
3237 * testsuite/gfortran.dg/graphite/id-1.f90: New.
3238 * testsuite/gfortran.dg/graphite/id-2.f90: New.
3239 * testsuite/gfortran.dg/graphite/id-3.f90: New.
3240 * testsuite/gfortran.dg/graphite/id-4.f90: New.
3241 * testsuite/gfortran.dg/graphite/pr37857.f90: New.
3243 2008-12-02 Sebastian Pop <sebastian.pop@amd.com>
3244 Jan Sjodin <jan.sjodin@amd.com>
3245 Harsha Jagasia <harsha.jagasia@amd.com>
3257 * testsuite/gcc.dg/graphite/pr38073.c: New.
3258 * testsuite/gcc.dg/graphite/pr37928.c: New.
3259 * testsuite/gcc.dg/graphite/pr37883.c: New.
3260 * testsuite/gcc.dg/graphite/pr38125.c: New.
3261 * testsuite/gfortran.dg/graphite/pr38083.f90: New.
3262 * testsuite/gfortran.dg/graphite/pr37852.f90: New.
3263 * testsuite/gfortran.dg/graphite/pr37980.f90: New.
3265 * testsuite/gcc.dg/graphite/scop-18.c: Remove reduction, test for
3266 the number of detected scops. Copy exact same test for loop
3268 * testsuite/gcc.dg/graphite/block-1.c: Fix the number of expected
3269 loops to be blocked as reductions are not handled.
3270 * testsuite/gcc.dg/graphite/block-4.c: ...here. New.
3272 * tree-phinodes.c (remove_phi_nodes): New, extracted from...
3273 * tree-cfg.c (remove_phi_nodes_and_edges_for_unreachable_block):
3275 * tree-flow.h (remove_phi_nodes, canonicalize_loop_ivs): Declared.
3276 * Makefile.in (graphite.o): Depend on value-prof.h.
3277 (graphite.o-warn): Removed -Wno-error.
3278 * tree-parloops.c (canonicalize_loop_ivs): Allow reduction_list
3279 to be a NULL pointer. Call update_stmt. Return the newly created
3280 cannonical induction variable.
3282 * graphite.h (debug_rename_map): Declared. Fix some comments.
3284 * graphite.c: Reimplement the code generation from graphite to gimple.
3285 Include value-prof.h.
3286 (loop_iv_stack_get_iv): Do not return NULL for constant substitutions.
3287 (get_old_iv_from_ssa_name): Removed.
3288 (graphite_stmt_p): New.
3289 (new_graphite_bb): Test for useful statements before building a
3290 graphite statement for the basic block.
3291 (free_graphite_bb): Do not free GBB_DATA_REFS: this is a bug
3292 in free_data_ref that calls BITMAP_FREE (DR_VOPS (dr)) without
3294 (recompute_all_dominators, graphite_verify,
3295 nb_reductions_in_loop, graphite_loop_normal_form): New.
3296 (scop_record_loop): Call graphite_loop_normal_form.
3297 (build_scop_loop_nests): Iterate over all the blocks of the
3298 function instead of relying on the incomplete information from
3299 SCOP_BBS. Return the success of the operation.
3300 (find_params_in_bb): Use the data from GBB_DATA_REFS.
3301 (add_bb_domains): Removed.
3302 (build_loop_iteration_domains): Don't call add_bb_domains.
3303 Add the iteration domain only to the basic blocks that have been
3304 translated to graphite.
3305 (build_scop_conditions_1): Add constraints only if the basic
3306 block have been translated to graphite.
3307 (build_scop_data_accesses): Completely disabled until data
3308 dependence is correctly implemented.
3309 (debug_rename_elt, debug_rename_map_1, debug_rename_map): New.
3310 (remove_all_edges_1, remove_all_edges): Removed.
3311 (get_new_name_from_old_name): New.
3312 (graphite_rename_variables_in_stmt): Renamed
3313 rename_variables_in_stmt. Call get_new_name_from_old_name.
3314 Use replace_exp and update_stmt.
3315 (is_old_iv): Renamed is_iv.
3316 (expand_scalar_variables_stmt): Extra parameter for renaming map.
3317 Use replace_exp and update_stmt.
3318 (expand_scalar_variables_expr): Same. Use the map to get the
3319 new names for the renaming of induction variables and for the
3320 renaming of variables after a basic block has been copied.
3321 (expand_scalar_variables): Same.
3322 (graphite_rename_variables): Renamed rename_variables.
3323 (move_phi_nodes): Removed.
3324 (get_false_edge_from_guard_bb): New.
3325 (build_iv_mapping): Do not insert the induction variable of a
3326 loop in the renaming iv map if the basic block does not belong
3328 (register_old_new_names, graphite_copy_stmts_from_block,
3329 copy_bb_and_scalar_dependences): New.
3330 (translate_clast): Heavily reimplemented: copy basic blocks,
3331 do not move them. Finally, in call cleanup_tree_cfg in gloog.
3332 At each translation step call graphite_verify ensuring the
3333 consistency of the SSA, loops and dominators information.
3334 (collect_virtual_phis, find_vdef_for_var_in_bb,
3335 find_vdef_for_var_1, find_vdef_for_var,
3336 patch_phis_for_virtual_defs): Removed huge hack.
3337 (mark_old_loops, remove_dead_loops, skip_phi_defs,
3338 collect_scop_exit_phi_args, patch_scop_exit_phi_args,
3339 gbb_can_be_ignored, scop_remove_ignoreable_gbbs, ): Removed.
3340 (remove_sese_region, ifsese, if_region_entry, if_region_exit,
3341 if_region_get_condition_block, if_region_set_false_region,
3342 create_if_region_on_edge, move_sese_in_condition, bb_in_sese_p,
3343 sese_find_uses_to_rename_use, sese_find_uses_to_rename_bb,
3344 sese_add_exit_phis_edge, sese_add_exit_phis_var,
3345 rewrite_into_sese_closed_ssa): New.
3346 (gloog): Remove dead code. Early return if code cannot be
3347 generated. Call cleanup_tree_cfg once the scop has been code
3349 (graphite_trans_scop_block, graphite_trans_loop_block): Do not
3350 block loops with less than two loops.
3351 (graphite_apply_transformations): Remove the call to
3352 scop_remove_ignoreable_gbbs.
3353 (limit_scops): When build_scop_loop_nests fails, continue on
3354 the next scop. Fix open_scop.entry.
3355 (graphite_transform_loops): Call recompute_all_dominators: force the
3356 recomputation of correct CDI_DOMINATORS and CDI_POST_DOMINATORS.
3357 Call initialize_original_copy_tables and free_original_copy_tables
3358 to be able to copy basic blocks during code generation.
3359 When build_scop_loop_nests fails, continue on next scop.
3360 (value_clast): New union.
3361 (clast_to_gcc_expression): Fix type cast warning.
3363 2008-11-09 Sebastian Pop <sebastian.pop@amd.com>
3365 * Merge from mainline (r140838:141727).
3367 2008-11-05 Tobias Grosser <grosser@fim.uni-passau.de>
3371 * graphite.c (scan_tree_for_params): Add POINTER_PLUS_EXPR.
3373 2008-11-05 Tobias Grosser <grosser@fim.uni-passau.de>
3377 * graphite.c (scopdet_basic_block_info): Fix loops with multiple
3378 exits and conditions.
3379 * testsuite/gcc.dg/graphite/pr37943.c: New.
3381 2008-10-23 Tobias Grosser <grosser@fim.uni-passau.de>
3384 * graphite.c (gloog): Replace EXIT_BLOCK_PTR with scop exit.
3386 2008-10-23 Tobias Grosser <grosser@fim.uni-passau.de>
3388 * doc/invoke.texi: Fix spaces.
3390 2008-10-22 Sebastian Pop <sebastian.pop@amd.com>
3392 PR tree-optimization/37891
3393 Reverted last commit.
3394 * graphite.c (create_single_entry_edge): Set
3395 EDGE_IRREDUCIBLE_LOOP and BB_IRREDUCIBLE_LOOP.
3397 2008-10-21 Sebastian Pop <sebastian.pop@amd.com>
3398 Mitul Thakkar <mitul.thakkar@amd.com>
3400 * graphite.c (create_single_entry_edge): Set
3401 EDGE_IRREDUCIBLE_LOOP and BB_IRREDUCIBLE_LOOP.
3403 2008-10-16 Tobias Grosser <grosser@fim.uni-passau.de>
3405 * doc/invoke.texi: Add -fgraphite-identity.
3406 * graphite.c (graphite_apply_transformations): Check for
3407 -fgraphite-identity.
3408 * toplev.c (process_options): Add flag_graphite_identity.
3409 * tree-ssa-loop.c: Add flag_graphite_identity.
3411 2008-10-14 Sebastian Pop <sebastian.pop@amd.com>
3413 Undo changes from 2008-10-02:
3414 * tree-ssa-loop-ivopts.c (rewrite_use_nonlinear_expr): Convert
3415 operand type when copying the operand to a variable of different type.
3416 * cfgloopmanip.c (create_empty_loop_on_edge): Write exit condition
3417 with the IV name after increment.
3419 2008-10-14 Sebastian Pop <sebastian.pop@amd.com>
3420 Harsha Jagasia <harsha.jagasia@amd.com>
3422 PR tree-optimization/37828
3423 * testsuite/gcc.dg/graphite/pr37828.c: New.
3424 * graphite.c (graphite_trans_loop_block): Do not loop block
3425 single nested loops.
3427 2008-10-09 Harsha Jagasia <harsha.jagasia@amd.com>
3428 Sebastian Pop <sebastian.pop@amd.com>
3430 * graphite.c (struct rename_map_elt, new_rename_map_elt,
3431 rename_map_elt_info, eq_rename_map_elts): New.
3432 (graphite_rename_ivs_stmt): Renamed graphite_rename_variables_in_stmt.
3433 (expand_scalar_variables_expr): Change parameters.
3434 (expand_scalar_variables_stmt): Same.
3435 (expand_scalar_variables): Same.
3436 (graphite_rename_ivs): Rename graphite_rename_variables.
3437 (build_iv_mapping): New.
3438 (translate_clast): Call build_iv_mapping.
3439 * graphite.h (gbb_p): New name.
3441 2008-10-03 Harsha Jagasia <harsha.jagasia@amd.com>
3443 PR tree-optimization/37684
3444 * gcc.dg/graphite/pr37684.c: New.
3445 * graphite.c (exclude_component_ref): New.
3446 (is_simple_operand): Call exclude_component_ref.
3448 2008-10-02 Jan Sjodin <jan.sjodin@amd.com>
3449 Harsha Jagasia <harsha.jagasia@amd.com>
3451 PR tree-optimization/37485
3452 * gcc.dg/graphite/block-2.c: New
3453 * graphite.c (gmp_cst_to_tree): Moved.
3454 (iv_stack_entry_is_constant): New.
3455 (iv_stack_entry_is_iv): New.
3456 (loop_iv_stack_push): Renamed to loop_iv_stack_push_iv.
3457 (loop_iv_stack_insert_constant): New.
3458 (loop_iv_stack_pop): Use new datatpype.
3459 (loop_iv_stack_get_iv): Same.
3460 (loop_iv_stack_get_iv_from_name): Same.
3461 (loop_iv_stack_debug): Renamed to debug_loop_iv_stack.
3462 (loop_iv_stack_patch_for_consts): New.
3463 (loop_iv_stack_remove_constants): New.
3464 (graphite_create_new_loop): Use loop_iv_stack_push_iv.
3465 (translate_clast): Call loop_iv_stack_patch_for_consts and
3466 loop_iv_stack_remove_constants.
3467 (gloog): Use new datatype. Redirect construction edge to end
3468 block to avoid accidental deletion.
3469 * graphite.h (enum iv_stack_entry_kind): New. Tag for data in
3471 (union iv_stack_entry_data): New. Data in iv stack entry.
3472 (struct iv_stack_entry): New. Datatype for iv stack entries.
3474 2008-10-02 Sebastian Pop <sebastian.pop@amd.com>
3476 * tree-ssa-loop-ivopts.c (rewrite_use_nonlinear_expr): Convert
3477 operand type when copying the operand to a variable of different type.
3479 2008-10-02 Sebastian Pop <sebastian.pop@amd.com>
3481 * cfgloopmanip.c (create_empty_loop_on_edge): Write exit condition
3482 with the IV name after increment.
3484 2008-10-02 Sebastian Pop <sebastian.pop@amd.com>
3486 * Merge from mainline (r140164:140838).
3488 2008-09-10 Konrad Trifunovic <konrad.trifunovic@inria.fr>
3490 * graphite-data-ref.c: New.
3491 * graphite.c (print_scop): Also dump the dependence graph.
3492 (bb_in_scop_p, loop_in_scop_p, nb_loops_around_gb): Moved...
3493 (new_scop): Initialize SCOP_DEP_GRAPH.
3494 (build_scop_dynamic_schedules): New.
3495 (build_access_matrix_with_af): Fixed column numbering.
3496 (graphite_transform_loops): Call build_scop_dynamic_schedules.
3497 * graphite.h: Add ifndef/define guards against multiple inclusion.
3498 (struct scop): Add dep_graph field.
3499 (SCOP_DEP_GRAPH): Defined.
3500 (ref_nb_loops): Fixed and moved to other position.
3501 (bb_in_scop_p, loop_in_scop_p, nb_loops_around_gb): ... here.
3502 (nb_loops_around_loop_in_scop): New.
3503 (graphite_dump_dependence_graph): Declared.
3504 (graphite_build_rdg_all_levels): Declared.
3505 (graphite_test_dependence): Declared.
3506 * Makefile.in (graphite-data-ref.o): New target.
3508 2008-09-09 Sebastian Pop <sebastian.pop@amd.com>
3510 * Merge from mainline (139870:140164).
3512 2008-09-01 Sebastian Pop <sebastian.pop@amd.com>
3514 * Merge from mainline (138275:139870).
3515 * testsuite/gcc.dg/graphite/scop-matmult.c: XFailed as one of
3516 the commits from trunk broke the niter detection.
3518 2008-09-01 Sebastian Pop <sebastian.pop@amd.com>
3520 * graphite.c: Add more documentation. Fix formatting.
3521 (debug_loop_vec, debug_oldivs, loop_iv_stack,
3522 loop_iv_stack_debug): Moved...
3523 (schedule_to_scattering): Move before use.
3524 (dot_all_scops): Include in "#if 0" the code for system
3527 * graphite.h: (debug_loop_vec, debug_oldivs, loop_iv_stack,
3528 loop_iv_stack_debug): ...here.
3530 2008-08-29 Jan Sjodin <jan.sjodin@amd.com>
3532 * tree-phinodes.c (make_phi_node): Extern.
3533 (add_phi_node_to_bb): New.
3534 (create_phi_node): Call add_phi_node_to_bb.
3535 * tree-ssa-loop-ivopts.c (get_phi_with_result): New.
3536 (remove_statement): Handle case where stored phi was updated
3537 and is no longer the same.
3538 * graphite.c (is_parameter): New.
3540 (expand_scalar_variables_expr): New.
3541 (expand_scalar_variables_stmt): New.
3542 (expand_scalar_variables): New.
3543 (move_phi_nodes): Create new phi instead of moving old one.
3544 (translate_clast): Call expand_scalar_variables.
3545 (find_vdef_for_var_in_bb): Also scan regular definitions.
3546 (skip_phi_defs): New.
3547 (collect_scop_exit_phi_args): New.
3548 (patch_scop_exit_phi_args): New.
3549 (gloog): Patch phis after scop.
3550 * tree-flow.h: (add_phi_node_to_bb): Declared.
3551 (make_phi_node): Declared.
3553 2008-08-26 Sebastian Pop <sebastian.pop@amd.com>
3555 * graphite.c (end_scop): Split the entry of the scop when it
3556 is the header of the loop in which the scop is ending.
3557 (build_scops_1, limit_scops): Update uses of end_scop.
3559 2008-08-26 Sebastian Pop <sebastian.pop@amd.com>
3561 * graphite.c (dot_all_scops_1): Do not fail on uninitialized
3562 SCOP_ENTRY or SCOP_EXIT.
3564 2008-08-25 Sebastian Pop <sebastian.pop@amd.com>
3566 * graphite.c (get_construction_edge): Removed.
3567 (gloog): Construction edge is the scop entry edge.
3569 2008-08-25 Sebastian Pop <sebastian.pop@amd.com>
3571 * graphite.c (can_generate_for_scop): Removed.
3572 (gloog): Do not call it.
3574 2008-08-25 Sebastian Pop <sebastian.pop@amd.com>
3576 * graphite.c (new_scop): Entry of a scop is an edge.
3577 Initialize SESE region.
3578 (free_scop): Free SESE region.
3579 (build_scops_1, scopdet_bb_info): Work on edges, not on bbs.
3580 (split_difficult_bb): New, split from end_scop.
3581 (end_scop): Exit of a scop is an edge.
3582 (build_scop_bbs): Never check CDI_POST_DOMINATORS: this info is
3583 not automatically updated and thus is always wrong.
3584 * graphite.h (struct sese): New.
3587 (struct scop): New field for a SESE region. Remove entry, exit.
3588 (SCOP_ENTRY, SCOP_EXIT): Update definitions to match same
3589 semantics as before. Moved comment around.
3591 2008-08-25 Tobias Grosser <grosser@fim.uni-passau.de>
3592 Sebastian Pop <sebastian.pop@amd.com>
3594 * graphite.c (graphite_transform_loops): Always enable gloog
3595 and find_transform when ENABLE_CHECKING.
3597 2008-08-25 Sebastian Pop <sebastian.pop@amd.com>
3599 * graphite.c (graphite_transform_loops): Move pretty printer
3600 of SCOPs before doing any transform. Remove call to print_scops
3601 and dot_all_scops_1.
3603 2008-08-25 Sebastian Pop <sebastian.pop@amd.com>
3605 * graphite.c (dump_gbb_conditions): Don't try to print NULL pointers.
3606 (print_graphite_bb): Same.
3608 2008-08-25 Sebastian Pop <sebastian.pop@amd.com>
3610 * graphite.c (dot_all_scops_1): Cleanup.
3611 (move_scops): Fix comment.
3613 2008-08-25 Sebastian Pop <sebastian.pop@amd.com>
3615 * graphite.c (build_scop_bbs): Revert commit 139355:
3617 2008-08-20 Sebastian Pop <sebastian.pop@amd.com>
3618 Dwarakanath Rajagopal <dwarak.rajagopal@amd.com>
3620 * graphite.c (build_scop_bbs): Factor up code.
3622 2008-08-25 Tobias Grosser <grosser@fim.uni-passau.de>
3624 * graphite.c (gloog): Update dominator info.
3626 2008-08-25 Tobias Grosser <grosser@fim.uni-passau.de>
3628 * graphite.c (remove_cond_exprs): Do not fail on empty bbs.
3630 2008-08-24 Sebastian Pop <sebastian.pop@amd.com>
3632 * graphite.c (new_graphite_bb): Remove GBB_INDEX_TO_NUM_MAP
3634 (free_graphite_bb): Remove GBB_INDEX_TO_NUM_MAP free.
3635 (translate_clast): Correct formatting.
3636 * graphite.h (struct num_map): Removed.
3637 (struct graphite_bb): Remove num_map field.
3638 (GBB_INDEX_TO_NUM_MAP): Removed.
3640 2008-08-24 Sebastian Pop <sebastian.pop@amd.com>
3642 * graphite.c (build_access_matrix_with_af): Fix comments.
3643 (build_scop_data_accesses): Same.
3645 2008-08-24 Sebastian Pop <sebastian.pop@amd.com>
3647 * graphite.c (build_scop_data_accesses): Don't construct
3648 access matrices. Add a FIXME and an assert condition that
3649 should pass when the access matrices will be needed.
3651 2008-08-24 Sebastian Pop <sebastian.pop@amd.com>
3653 * tree-data-ref.c (stmt_simple_memref_p): Don't call
3655 * graphite.c (build_graphite_bb): Renamed new_graphite_bb.
3656 Moved close by free_graphite_bb.
3657 (free_graphite_bb): Call free_data_refs. Reset bb->aux.
3658 (new_scop): Move close by free_scop.
3659 (graphite_transform_loops): Avoid linear scan to reset bb->aux.
3661 2008-08-22 Jan Sjodin <jan.sjodin@amd.com>
3663 * cfgloopmanip.c (create_empty_if_region_on_edge): New.
3664 * graphite.c (clast_to_gcc_expression): Call gmp_cst_to_tree
3665 instead of recursive call.
3666 (graphite_translate_clast_equation): New.
3667 (graphite_create_guard_cond_expr): New.
3668 (graphite_create_new_guard): New.
3669 (get_stack_index_from_iv): Removed.
3670 (graphite_rename_ivs_stmt): Use gbb_loop_index.
3671 (get_true_edge_from_guard_bb): New.
3672 (translate_clast): Handle stmt_guard in clast.
3673 (get_construction_edge): Allow construction edge detection for
3674 a scope entry with multiple predecessors if one predecessor is
3675 the immediate dominator of scope entry.
3676 (can_generate_code_stmt): Enable code generation for clast_guard.
3677 (gloog): Use correct context loop. Removed check for post dominators.
3678 * cfgloop.h (create_empty_if_region_on_edge): Declared.
3680 2008-08-21 Sebastian Pop <sebastian.pop@amd.com>
3682 * graphite.c (remove_dead_loops): Document better which
3685 2008-08-21 Sebastian Pop <sebastian.pop@amd.com>
3687 * Makefile.in: Rename POLYLIBLIBS and POLYLIBINC to PPLLIBS
3689 (graphite.o): Also depends on pointer-set.h.
3691 2008-08-21 Sebastian Pop <sebastian.pop@amd.com>
3693 * graphite.c (scop_record_loop): Fix compile warning.
3695 2008-08-21 Harsha Jagasia <harsha.jagasia@amd.com>
3696 Sebastian Pop <sebastian.pop@amd.com>
3698 * graphite.c (scop_record_loop): DECL_NAME can be NULL.
3700 2008-08-21 Sebastian Pop <sebastian.pop@amd.com>
3702 * graphite.c (build_graphite_bb): Initialize bb->aux to
3703 point to the graphite_bb_p.
3704 (graphite_bb_from_bb): Renamed gbb_from_bb; returns the
3706 (add_bb_domains): Does not use the scop parameter.
3707 (graphite_transform_loops): Clean bb->aux at the end.
3709 2008-08-20 Dwarakanath Rajagopal <dwarak.rajagopal@amd.com>
3710 Sebastian Pop <sebastian.pop@amd.com>
3712 * testsuite/lib/target-supports.exp
3713 (check_effective_target_fgraphite): New.
3715 * testsuite/gcc.dg/graphite/graphite.exp: Early exit when
3716 check_effective_target_fgraphite returns false.
3717 Set dg-do-what-default to compile.
3718 (scan-graphite-dump-times): Removed.
3719 * testsuite/gfortran.dg/graphite/graphite.exp: Same.
3721 * testsuite/gcc.dg/graphite/scop-0.c: Do not use "dg-do compile".
3722 Use scan-tree-dump-times instead of scan-graphite-dump-times.
3723 * testsuite/gcc.dg/graphite/scop-1.c: Same.
3724 * testsuite/gcc.dg/graphite/scop-2.c: Same.
3725 * testsuite/gcc.dg/graphite/scop-3.c: Same.
3726 * testsuite/gcc.dg/graphite/scop-4.c: Same.
3727 * testsuite/gcc.dg/graphite/scop-5.c: Same.
3728 * testsuite/gcc.dg/graphite/scop-6.c: Same.
3729 * testsuite/gcc.dg/graphite/scop-7.c: Same.
3730 * testsuite/gcc.dg/graphite/scop-8.c: Same.
3731 * testsuite/gcc.dg/graphite/scop-9.c: Same.
3732 * testsuite/gcc.dg/graphite/scop-10.c: Same.
3733 * testsuite/gcc.dg/graphite/scop-11.c: Same.
3734 * testsuite/gcc.dg/graphite/scop-12.c: Same.
3735 * testsuite/gcc.dg/graphite/scop-13.c: Same.
3736 * testsuite/gcc.dg/graphite/scop-matmult.c: Same.
3737 * testsuite/gcc.dg/graphite/scop-14.c: Same.
3738 * testsuite/gcc.dg/graphite/scop-15.c: Same.
3739 * testsuite/gcc.dg/graphite/block-0.c: Same.
3740 * testsuite/gcc.dg/graphite/scop-16.c: Same.
3741 * testsuite/gcc.dg/graphite/block-1.c: Same.
3742 * testsuite/gcc.dg/graphite/scop-17.c: Same.
3743 * testsuite/gcc.dg/graphite/scop-18.c: Same.
3744 * testsuite/gfortran.dg/graphite/block-1.f90: Same.
3745 * testsuite/gfortran.dg/graphite/scop-1.f: Same.
3746 * testsuite/gfortran.dg/graphite/block-2.f: Same.
3748 2008-08-20 Sebastian Pop <sebastian.pop@amd.com>
3750 * graphite.c: Fix some XXX comments.
3751 (build_scop_dynamic_schedules): Removed.
3753 2008-08-20 Sebastian Pop <sebastian.pop@amd.com>
3755 * graphite.h (scop_max_loop_depth): Moved...
3756 * graphite.c (scop_max_loop_depth): ...here.
3757 (remove_all_edges_1): New.
3758 (remove_all_edges): Factored code.
3759 (remove_cond_exprs): Check only the last statement for
3760 a GIMPLE_COND expression.
3762 2008-08-20 Sebastian Pop <sebastian.pop@amd.com>
3764 * graphite.c (scan_tree_for_params): Early return when the
3765 expression is a chrec_dont_know. Handle case NEGATE_EXPR.
3766 (find_scop_parameters): Factor out code.
3767 (graphite_trans_bb_strip_mine): Remove dead code.
3769 2008-08-20 Sebastian Pop <sebastian.pop@amd.com>
3771 * graphite.c (clast_to_gcc_expression, graphite_create_new_loop,
3772 graphite_trans_bb_move_loop): Factor asserts.
3773 (gloog): Perform sanity checks only for ENABLE_CHECKING.
3774 Do not call calculate_dominance_info and estimate_bb_frequencies.
3776 2008-08-20 Jan Sjodin <jan.sjodin@amd.com>
3778 * graphite.c (create_loops_mapping, free_loops_mapping,
3779 create_loops_mapping_num, debug_loop_mapping_1,
3780 debug_loop_mapping, graphite_loops_mapping_max_loop_num,
3781 get_loop_mapping_for_num, graphite_loops_mapping_add_child,
3782 graphite_loops_mapping_add_child_num,
3783 graphite_loops_mapping_insert_child,
3784 graphite_loops_mapping_parent, get_loop_mapped_depth_for_num,
3785 get_loop_mapped_depth, split_loop_mapped_depth_for_num,
3786 loop_mapped_depth_split_loop, swap_loop_mapped_depth_for_num,
3787 create_num_from_index, get_num_from_index,
3788 swap_loop_mapped_depth): Removed.
3789 (new_scop): Do not initialize SCOP_LOOPS_MAPPING.
3790 (free_scop): Do not call free_loops_mapping.
3791 (graphite_get_new_iv_stack_index_from_old_iv): Renamed
3792 get_stack_index_from_iv. Use GBB_LOOPS instead of calling
3793 get_loop_mapped_depth.
3794 (graphite_trans_bb_move_loop): Do not update the loop mapping.
3795 (graphite_trans_bb_strip_mine): Same.
3796 * graphite.h (graphite_loops_mapping, graphite_loop_node): Removed.
3797 (struct scop): Remove field loops_mapping.
3799 2008-08-20 Sebastian Pop <sebastian.pop@amd.com>
3800 Dwarakanath Rajagopal <dwarak.rajagopal@amd.com>
3802 * graphite.c (scop_record_loop): Factor out one level of the
3803 condition by early return.
3804 (build_scop_loop_nests): Format following FSF coding style.
3805 (build_scop_dynamic_schedules): Factor out code.
3806 (scopdet_bb_info): Reindent. Default case should not be reachable.
3808 2008-08-20 Sebastian Pop <sebastian.pop@amd.com>
3809 Dwarakanath Rajagopal <dwarak.rajagopal@amd.com>
3811 * graphite.c (loop_affine_expr): Check for DECL_P or struct
3812 assignments that are not handled as simple operands for now.
3814 2008-08-20 Sebastian Pop <sebastian.pop@amd.com>
3815 Dwarakanath Rajagopal <dwarak.rajagopal@amd.com>
3817 * graphite.c (build_scop_bbs): Factor up code.
3819 2008-08-20 Sebastian Pop <sebastian.pop@amd.com>
3820 Dwarakanath Rajagopal <dwarak.rajagopal@amd.com>
3822 * graphite.c (stmt_simple_for_scop_p): Factor code out
3824 (enum gbb_type): New. Group all the GBB_* types under it.
3825 (is_loop_exit): Moved...
3826 (end_scop): Enable BB spliting.
3827 * cfgloop.c (is_loop_exit): ...here. Reimplemented.
3828 * cfgloop.h (is_loop_exit): Declared.
3830 2008-08-20 Sebastian Pop <sebastian.pop@amd.com>
3832 * doc/invoke.texi: Remove strides from examples containing
3833 DO loops when the strides are equal to 1.
3835 2008-08-20 Harsha Jagasia <harsha.jagasia@amd.com>
3836 Dwarakanath Rajagopal <dwarak.rajagopal@amd.com>
3838 * graphite.c (graphite_trans_scop_block): Or the result with
3839 the result from graphite_trans_loop_block.
3840 * testsuite/gcc.dg/graphite/block-1.c: New.
3841 * testsuite/gfortran.dg/graphite/block-1.f90: New.
3842 * testsuite/gfortran.dg/graphite/block-2.f: New.
3844 2008-08-20 Sebastian Pop <sebastian.pop@amd.com>
3846 * graphite.c (graphite_transform_loops): Call cloog_initialize
3849 2008-08-20 Sebastian Pop <sebastian.pop@amd.com>
3851 * tree-data-ref.c) (stmt_simple_memref_p): New.
3852 * tree-data-ref.h (stmt_simple_memref_p): Declared.
3853 * graphite.c (stmt_simple_memref_for_scop_p): Removed.
3854 (is_simple_operand): Call stmt_simple_memref_p.
3856 * testsuite/gcc.dg/graphite/scop-matmult.c: Updated for not
3857 using pointer arithmetic, as this is optimized by PRE and
3858 makes the code too difficult to analyze.
3860 * testsuite/gcc.dg/graphite/scop-18.c: Same.
3862 2008-08-20 Sebastian Pop <sebastian.pop@amd.com>
3864 * gdbinit.in (pgg): New.
3866 2008-08-15 Tobias Grosser <grosser@fim.uni-passau.de>
3868 * graphite.c (graphite_trans_loop_block): Fix warning.
3870 2008-08-15 Tobias Grosser <grosser@fim.uni-passau.de>
3872 * graphite.c (graphite_trans_loop_block): Fix my merge error.
3874 2008-08-15 Tobias Grosser <grosser@fim.uni-passau.de>
3876 * graphite.c (graphite_trans_bb_block): Remove check for
3877 flag_loop_strip_mine, flag_loop_block, flag_loop_interchange.
3878 Check if loop blocking is profitable for every loop, before applying
3880 (graphite_apply_transformations): Call graphite_trans_bb_block only,
3881 if flag_loop_block is set.
3883 2008-08-14 Sebastian Pop <sebastian.pop@amd.com>
3885 * graphite.c: Add some more documentation for the loop
3888 2008-08-14 Sebastian Pop <sebastian.pop@amd.com>
3890 * Makefile.in (tree-data-ref.o): Remove dependence on graphite.h.
3891 * graphite.c: Format on less than 80 columns.
3894 2008-08-14 Sebastian Pop <sebastian.pop@amd.com>
3896 * cfgloopmanip.c (loopify): Use update_dominators_in_loop.