1 2009-09-17 David Edelsohn <edelsohn@gnu.org>
3 * testsuite/gcc.dg/graphite/scop-dsyrk.c: New File.
4 * testsuite/gcc.dg/graphite/scop-dsyr2k.c: New File.
5 * testsuite/gcc.dg/graphite/scop-mvt.c: New File.
6 * testsuite/gcc.dg/graphite/scop-sor.c: New File.
8 2009-09-17 Li Feng <nemokingdom@gmail.com>
11 * graphite-dependences.c (poly_drs_may_alias_p): Adjust definition.
12 (pddr_original_scattering): Make sure 2 pdr2 in the same base object set.
13 (graphite_carried_dependence_level_k): Ditto.
14 * graphite-poly.c (new_poly_dr): Add init of PDR_BASE_OBJECT_SET.
15 * graphite-poly.h (struct poly_dr): Add member dr_base_object_set.
16 (new_poly_dr): Adjust declaration.
17 * graphite-sese-to-poly.c (free_data_refs_aux): New.
18 (free_gimple_bb): Added free_data_refs_aux.
19 (build_poly_dr): Add dr_base_object_set.
20 (partition_drs_to_sets): New.
21 (dr_same_base_object_p): New.
22 (build_alias_set_for_drs): New.
23 (build_base_object_set_for_drs): New.
24 (build_scop_drs): Add build_base_obj_set_for_drs.
25 * graphite-sese-to-poly.h: Added #define for alias set number index and
26 base object set index.
27 * libgomp/testsuite/libgomp.graphite/force-parallel-6.c: Refine tests.
28 * libgomp/testsuite/libgomp.graphite/pr4118.c: New.
30 2009-09-16 Alexander Monakov <amonakov@ispras.ru>
32 * graphite-sese-to-poly.c (pdr_add_data_dimensions): Add bounds only
33 for ARRAY_REFs. Use array_ref_{low,up}_bound to determine bounds.
35 2009-09-14 Sebastian Pop <sebastian.pop@amd.com>
37 * graphite-sese-to-poly.c (struct irp_data): Removed.
38 (idx_record_params): Removed.
39 (find_params_in_bb): Scan for parameters the access functions; don't
40 parse the tree representation.
42 2009-09-14 Sebastian Pop <sebastian.pop@amd.com>
44 * tree-ssa-loop.c (gate_graphite_transforms): Disable Graphite
45 passes at -O1 and below.
47 2009-09-14 Sebastian Pop <sebastian.pop@amd.com>
49 * graphite-blocking.c: Fix order of includes: tree-chrec.h, then
50 tree-scalar-evolution.h, and then tree-data-ref.h.
51 * graphite-clast-to-gimple.c: Same.
52 * graphite-dependences.c: Same.
53 * graphite-interchange.c: Same.
54 * graphite-poly.c: Same.
55 * graphite-scop-detection.c: Same.
56 * graphite-sese-to-poly.c: Same.
58 * lambda-code.c: Same.
59 * matrix-reorg.c: Same.
60 * tree-data-ref.c: Same.
61 * tree-if-conv.c: Same.
62 * tree-loop-distribu: Same.: Same.
63 * tree-loop-linear.c: Same.
64 * tree-parloops.c: Same.
65 * tree-predcom.c: Same.
66 * tree-vect-patterns.c: Same.
68 2009-09-02 Sebastian Pop <sebastian.pop@amd.com>
70 Partially revert the previous patch, except the following.
71 * tree-scalar-evolution.c (instantiate_scev_not): Adapted to pass
72 as parameters the operands of the not expression.
74 2009-09-01 Sebastian Pop <sebastian.pop@amd.com>
76 * tree-scalar-evolution.c (instantiate_scev_assign): New.
77 Do not call analyze_scalar_evolution on assignments.
78 (instantiate_scev_phi): Call analyze_scalar_evolution.
79 (instantiate_scev_name): Call instantiate_scev_assign and
81 (instantiate_scev_not): Adapted to pass as parameters the operands
82 of the not expression.
84 2009-09-01 Sebastian Pop <sebastian.pop@amd.com>
86 * tree-scalar-evolution.c (instantiate_scev_binary): Adapted
87 to pass as parameters the operands of the binary expression.
89 2009-09-01 Sebastian Pop <sebastian.pop@amd.com>
91 * tree-scalar-evolution.c (instantiate_scev_bitnot): Renamed
92 instantiate_scev_not. Handle NEGATE_EXPR.
93 (instantiate_scev_r): Handle NEGATE_EXPR.
95 2009-09-01 Sebastian Pop <sebastian.pop@amd.com>
97 * tree-scalar-evolution.c (instantiate_scev_1): Renamed
99 (instantiate_scev_r): Move code in instantiate_scev_2
100 and instantiate_scev_1.
102 2009-09-01 Sebastian Pop <sebastian.pop@amd.com>
104 * tree-scalar-evolution.c (instantiate_scev_3): New.
105 (instantiate_scev_1): Move code in instantiate_scev_3.
107 2009-09-01 Sebastian Pop <sebastian.pop@amd.com>
109 * tree-scalar-evolution.c (instantiate_scev_poly): New.
110 (instantiate_scev_1): Move code in instantiate_scev_poly.
112 2009-09-01 Sebastian Pop <sebastian.pop@amd.com>
114 * tree-scalar-evolution.c (instantiate_scev_bitnot): New.
115 (instantiate_scev_1): Move code in instantiate_scev_bitnot.
117 2009-09-01 Sebastian Pop <sebastian.pop@amd.com>
119 * tree-scalar-evolution.c (instantiate_scev_convert): New.
120 (instantiate_scev_1): Move code in instantiate_scev_convert.
122 2009-09-01 Sebastian Pop <sebastian.pop@amd.com>
124 * tree-scalar-evolution.c (instantiate_scev_binary): New.
125 (instantiate_scev_1): Move code in instantiate_scev_binary.
127 2009-09-01 Sebastian Pop <sebastian.pop@amd.com>
129 * tree-scalar-evolution.c (instantiate_scev_name): New.
130 (instantiate_scev_1): Move code in instantiate_scev_name.
132 2009-08-28 Sebastian Pop <sebastian.pop@amd.com>
134 * Merge from mainline (150992:151171).
136 2009-08-25 Sebastian Pop <sebastian.pop@amd.com>
138 * graphite-dependences.c (graphite_legal_transform_bb): Call
139 pbb_remove_duplicate_pdrs.
140 * graphite-poly.c (can_collapse_pdr): Removed.
141 (pdr_find_duplicate): Removed.
142 (can_collapse_pdrs): New.
143 (pbb_remove_duplicate_pdrs): New.
144 (new_poly_dr): Do not look for duplicates.
145 * graphite-poly.h (struct poly_bb): New field pdr_duplicates_removed.
146 (PBB_PDR_DUPLICATES_REMOVED): New.
147 (pbb_remove_duplicate_pdrs): Declared.
149 2009-08-25 Sebastian Pop <sebastian.pop@amd.com>
151 * graphite-interchange.c (pbb_interchange_profitable_p): Adjust
152 the strides by multiplying by PDR_NB_REFS.
153 * graphite-poly.c (can_collapse_pdr): New.
154 (pdr_find_duplicate): New.
155 (new_poly_dr): Call pdr_find_duplicate. Collapse duplicate PDRs.
156 Initialize PDR_NB_REFS.
157 * graphite-poly.h (struct poly_dr): Add field nb_refs.
159 (new_poly_dr): Number of subscripts is a graphite_dim_t.
161 2009-08-25 Sebastian Pop <sebastian.pop@amd.com>
163 Revert one of the previous commits:
164 * graphite-dependences.c (graphite_legal_transform_bb): Avoid
165 the computation of symmetric data dependence relations.
166 (dependency_between_pbbs_p): Same.
168 2009-08-25 Sebastian Pop <sebastian.pop@amd.com>
171 * graphite-poly.c (apply_poly_transforms): Remove legality test before
174 2009-08-25 Sebastian Pop <sebastian.pop@amd.com>
176 * graphite-dependences.c (pddr_original_scattering): Return NULL
177 for read-read dependence relations.
178 * graphite-poly.h (enum poly_dr_type): Fix comment.
181 (pdr_may_write_p): New.
183 2009-08-25 Sebastian Pop <sebastian.pop@amd.com>
185 * graphite-poly.h (enum POLY_DR_TYPE): Renamed poly_dr_type.
186 (struct poly_dr): Same.
188 * graphite-poly.c (new_poly_dr): Same.
190 2009-08-25 Konrad Trifunovic <konrad.trifunovic@gmail.com>
191 Sebastian Pop <sebastian.pop@amd.com>
193 * graphite-blocking.c (pbb_strip_mine_loop_depth): Renamed
194 pbb_strip_mine_time_depth. Changed the implementation so that
195 transformation is expressed as a transformation on
196 time (scatttering) dimensions. Also, ensures that the 2d+1
197 scheduling format is preserved.
198 (pbb_strip_mine_profitable_p): Profitability is based on the
199 iteration number of a given time (scattering) dimension,
200 and not on a original loop depth dimension.
201 (pbb_strip_mine): Call pbb_number_of_iterations_at_time.
202 (pbb_do_strip_mine): Call psct_dynamic_dim.
203 * graphite-poly.c (pbb_number_of_iterations_at_time): New.
204 * graphite-poly.h (pbb_number_of_iterations_at_time): Declared.
205 (pbb_nb_dynamic_scattering_transform): New.
206 (psct_dynamic_dim): New.
208 2009-08-25 Konrad Trifunovic <konrad.trifunovic@gmail.com>
210 * graphite-ppl.c (ppl_max_for_le): Renamed ppl_max_for_le_pointset.
211 * graphite-ppl.h (ppl_max_for_le): Renamed ppl_max_for_le_pointset.
212 * graphite-poly.c (pbb_number_of_iterations): Rename ppl_max_for_le.
213 * graphite-interchange.c (build_linearized_memory_access): Same.
214 (memory_stride_in_loop): Same.
216 2009-08-25 Sebastian Pop <sebastian.pop@amd.com>
218 * graphite-dependences.c (pddr_original_scattering): New.
219 (graphite_legal_transform_dr): Call pddr_original_scattering.
222 * graphite-dependences.h (dot_deps): Declared.
223 * graphite-poly.c (new_poly_dr): Initialize PDR_ID.
224 (print_pdr): Print PDR_ID.
225 * graphite-poly.h (struct poly_dr): Add field id.
228 * graphite-scop-detection.c (dot_all_scops_1): Cleanup comment.
230 2009-08-22 Sebastian Pop <sebastian.pop@amd.com>
232 * graphite-dependences.c (graphite_carried_dependence_level_k): Do
233 not delete the original dependence relation.
235 2009-08-21 Sebastian Pop <sebastian.pop@amd.com>
237 * graphite-dependences.c (graphite_legal_transform_bb): Avoid
238 the computation of symmetric data dependence relations.
239 (dependency_between_pbbs_p): Same.
241 2009-08-21 Sebastian Pop <sebastian.pop@amd.com>
243 * graphite-dependences.c (new_poly_dr_pair): Renamed new_poly_ddr.
244 (eq_poly_dr_pair_p): Renamed eq_poly_ddr_p.
245 (hash_poly_dr_pair_p): Renamed hash_poly_ddr_p.
246 (free_poly_ddr): New.
247 (pddr_is_empty): New.
248 (dependence_polyhedron_1): Now returns a poly_ddr_p.
249 (dependence_polyhedron): Same. Remove useless gcc_assert.
251 (graphite_legal_transform_dr): Call pddr_is_empty and free_poly_ddr.
252 (graphite_carried_dependence_level_k): Call pddr_is_empty.
253 * graphite-dependences.h (enum poly_dependence_kind): New.
254 (poly_dr_pair): Renamed poly_ddr. Added a field kind.
255 (PDRP_SOURCE): Renamed PDDR_SOURCE.
256 (PDRP_SINK): Renamed PDDR_SINK.
257 (PDRP_DDP): Renamed PDDR_DDP.
259 (free_poly_ddr): Declared.
260 * graphite-poly.c (new_scop): Use the new hash function names.
261 * graphite-poly.h (struct scop): Renamed field original_pdr_pairs
263 (SCOP_ORIGINAL_PDR_PAIRS): Renamed SCOP_ORIGINAL_PDDRS.
265 2009-08-21 Sebastian Pop <sebastian.pop@amd.com>
267 * Merge from mainline (150764:150992).
269 2009-08-18 Sebastian Pop <sebastian.pop@amd.com>
271 * cfgloopmanip.c (create_empty_loop_on_edge): Generate upper
272 bounds with LT_EXPR to make niter analysis more precise on code
273 generated by Graphite.
275 2009-08-18 Sebastian Pop <sebastian.pop@amd.com>
277 * graphite-dependences.c (graphite_legal_transform_dr): Fix formatting.
278 (graphite_legal_transform_bb): Same.
279 (poly_drs_may_alias_p): Same.
281 2009-08-15 Sebastian Pop <sebastian.pop@amd.com>
284 * graphite-ppl.c (ppl_max_for_le): Correct the use of
285 ppl_Pointset_Powerset_C_Polyhedron_maximize.
287 2009-08-13 Sebastian Pop <sebastian.pop@amd.com>
289 * graphite-poly.c (print_pbb): Print PBB index.
291 2009-08-13 Sebastian Pop <sebastian.pop@amd.com>
293 * Merge from mainline (r150672:150764).
295 2009-08-13 Sebastian Pop <sebastian.pop@amd.com>
297 * graphite-interchange.c (ppl_max_for_le): Moved...
298 * graphite-poly.c (pbb_number_of_iterations): Call ppl_max_for_le.
299 * graphite-ppl.c (ppl_max_for_le): ... here.
300 * graphite-ppl.h (ppl_max_for_le): Declared.
302 2009-08-12 Sebastian Pop <sebastian.pop@amd.com>
304 * Merge from mainline (r150372:150672).
306 2009-08-11 Sebastian Pop <sebastian.pop@amd.com>
309 * sese.c (convert_for_phi_arg): New.
310 (add_guard_exit_phis): Use convert_for_phi_arg.
312 * testsuite/gfortran.dg/graphite/id-17.f: New.
314 2009-08-11 Sebastian Pop <sebastian.pop@amd.com>
316 * graphite-sese-to-poly.c (pdr_add_data_dimensions): Dont add
317 unknown subscript upper bounds.
319 * testsuite/gcc.dg/graphite/interchange-6.c: Un-XFAIL.
321 2009-08-11 Sebastian Pop <sebastian.pop@amd.com>
322 Pranav Garg <pranav.garg2107@gmail.com>
324 * graphite-interchange.c (gather_access_strides): Removed.
325 (ppl_max_for_le): New.
326 (build_linearized_memory_access): New.
327 (memory_stride_in_loop): New.
328 (pbb_interchange_profitable_p): Reimplemented.
329 * graphite-ppl.h (ppl_new_id_map): New.
330 (ppl_interchange): New.
332 * testsuite/gcc.dg/graphite/interchange-6.c: XFAILed.
334 2009-08-11 Sebastian Pop <sebastian.pop@amd.com>
336 * graphite-interchange.c (compute_subscript): Removed.
337 (compute_array_size_cstr): Removed.
338 (compute_array_size_poly): Removed.
339 (compute_array_size): Removed.
340 (gather_access_strides_poly): Removed.
341 (gather_access_strides): Empty.
343 2009-08-11 Sebastian Pop <sebastian.pop@amd.com>
345 * graphite-dependences.c (dependence_polyhedron_1): Replace
346 pdr_nb_subscripts with PDR_NB_SUBSCRIPTS.
347 (graphite_legal_transform_dr): Same.
348 (graphite_carried_dependence_level_k): Same.
349 * graphite-poly.c (new_poly_dr): Add a parameter nb_subscripts.
350 Initialize PDR_NB_SUBSCRIPTS.
351 (print_pdr_access_layout): Replace pdr_nb_subscripts with
353 * graphite-poly.h (struct poly_dr): Add nb_subscripts field.
354 (PDR_NB_SUBSCRIPTS): New.
355 (pdr_nb_subscripts): Removed.
356 (pdr_dim): Simplified.
357 * graphite-sese-to-poly.c (build_poly_dr): Replace pdr_nb_subscripts
358 with PDR_NB_SUBSCRIPTS.
360 2009-08-11 Sebastian Pop <sebastian.pop@amd.com>
362 * graphite-interchange.c (compute_array_size): Remove use of
364 * graphite-poly.c (new_poly_dr): Remove argument data_container.
365 Do not initialize PDR_DATA_CONTAINER.
366 (print_pdr): Do not print PDR_DATA_CONTAINER.
367 * graphite-poly.h (struct poly_dr): Remove data_container field.
368 (PDR_DATA_CONTAINER): Removed.
369 * graphite-sese-to-poly.c (pdr_add_data_dimensions): Remove use of
371 (build_poly_dr): Same.
373 2009-08-11 Sebastian Pop <sebastian.pop@amd.com>
375 * testsuite/gcc.dg/graphite/interchange-9.c: New.
377 2009-08-05 Konrad Trifunovic <konrad.trifunovic@gmail.com>
378 Sebastian Pop <sebastian.pop@amd.com>
380 * graphite-dependences.c (graphite_legal_transform_dr): Work on a
381 copy of the dependence polyhedron. Free the temporary objects.
382 (graphite_carried_dependence_level_k): Free unused objects before
385 * testsuite/gcc.dg/graphite/interchange-1.c: XFAILed.
386 * testsuite/gcc.dg/graphite/interchange-2.c: XFAILed.
387 * testsuite/gcc.dg/graphite/interchange-3.c: XFAILed.
388 * testsuite/gcc.dg/graphite/interchange-4.c: XFAILed.
389 * testsuite/gcc.dg/graphite/interchange-7.c: XFAILed.
391 2009-08-05 Sebastian Pop <sebastian.pop@amd.com>
393 * graphite-blocking.c (scop_do_strip_mine): Call store_scattering.
394 Early return without analyzing the data dependences if no
395 transform has been done. Call restore_scattering if the transform
397 (graphite-interchange.c): Same.
398 * graphite-poly.c (print_scattering_function): Test for PBB_TRANSFORMED.
399 (graphite_read_transforms): Initialize PBB_TRANSFORMED.
400 (apply_poly_transforms): Do not gcc_assert that
401 the transform is legal.
402 (new_poly_bb): Initialize PBB_TRANSFORMED, PBB_SAVED, and PBB_ORIGINAL.
403 Do not initialize PBB_NB_SCATTERING_TRANSFORM, PBB_NB_LOCAL_VARIABLES,
404 PBB_TRANSFORMED_SCATTERING, and PBB_ORIGINAL_SCATTERING.
405 (free_poly_dr): Free PBB_TRANSFORMED, PBB_SAVED, and PBB_ORIGINAL.
406 * graphite-poly.h (struct poly_scattering): New.
407 (struct poly_bb): Add original, transformed, and saved fields.
408 Remove transformed_scattering, original_scattering, nb_local_variables,
409 and nb_scattering_transform fields.
410 (PBB_ORIGINAL, PBB_TRANSFORMED, PBB_SAVED): New.
411 (poly_scattering_new): New.
412 (poly_scattering_free): New.
413 (poly_scattering_copy): New.
414 (store_scattering_pbb): New.
415 (store_scattering): New.
416 (restore_scattering_pbb): New.
417 (restore_scattering): New.
418 * graphite-sese-to-poly.c (build_pbb_scattering_polyhedrons):
419 Initialize PBB_TRANSFORMED and PBB_ORIGINAL.
421 2009-08-05 Sebastian Pop <sebastian.pop@amd.com>
423 * graphite-poly.c (print_pbb): Add parentheses in the pretty print.
426 2009-08-05 Sebastian Pop <sebastian.pop@amd.com>
428 * Makefile.in (graphite.o): Depends on PREDICT_H.
429 * graphite.c: Include predict.h.
430 (graphite_finalize): Call tree_estimate_probability.
431 * predict.c (predict_loops): Do not call scev_initialize and
433 (tree_estimate_probability_bb): New.
434 (tree_estimate_probability): Do not initialize loops: move that
435 code to the driver. Call tree_estimate_probability_bb.
436 (tree_estimate_probability_driver): New.
437 (pass_profile): Use tree_estimate_probability_driver.
438 * predict.h (tree_estimate_probability): Declared.
440 2009-08-05 Sebastian Pop <sebastian.pop@amd.com>
442 * graphite-clast-to-gimple.c (gloog): Add time to TV_GRAPHITE_CODE_GEN.
443 * graphite-dependences.c (graphite_legal_transform): Add time to
444 TV_GRAPHITE_DATA_DEPS.
445 (dependency_between_pbbs_p): Same.
446 * timevar.def (TV_GRAPHITE_DATA_DEPS, TV_GRAPHITE_CODE_GEN): New.
448 2009-08-03 Sebastian Pop <sebastian.pop@amd.com>
450 * Merge from mainline (r149952:150372).
452 2009-07-28 Sebastian Pop <sebastian.pop@amd.com>
454 * ChangeLog.graphite: Fix indenting, white spaces and 80 columns.
455 * graphite-blocking.c: Same.
456 * graphite-clast-to-gimple.c: Same.
457 * graphite-dependences.c: Same.
458 * graphite-poly.c: Same.
459 * graphite-poly.h: Same.
460 * graphite-ppl.c: Same.
461 * graphite-scop-detection.c: Same.
462 * graphite-sese-to-poly.c: Same.
465 2009-07-28 Sebastian Pop <sebastian.pop@amd.com>
467 * graphite-sese-to-poly.c (loop_entry_phi_arg): New.
468 (remove_simple_copy_phi): New.
469 (remove_invariant_phi): New.
470 (simple_copy_phi_p): New.
471 (reduction_phi_p): New.
472 (gsi_for_ssa_name_def): New.
473 (insert_out_of_ssa_copy): New.
474 (insert_out_of_ssa_copy_on_edge): New.
475 (create_zero_dim_array): New.
476 (scalar_close_phi_node_p): New.
477 (rewrite_close_phi_out_of_ssa): New.
478 (rewrite_phi_out_of_ssa): New.
479 (rewrite_reductions_out_of_ssa): New.
480 (build_poly_scop): Call rewrite_reductions_out_of_ssa.
482 * testsuite/gcc.dg/graphite/id-11.c: New.
483 * testsuite/gcc.dg/graphite/id-15.c: New.
484 * testsuite/gcc.dg/graphite/interchange-1.c: Un-XFAIL.
485 * testsuite/gcc.dg/graphite/interchange-2.c: Un-XFAIL.
486 * testsuite/gcc.dg/graphite/interchange-3.c: Un-XFAIL.
487 * testsuite/gcc.dg/graphite/interchange-4.c: Un-XFAIL.
488 * testsuite/gcc.dg/graphite/interchange-7.c: Un-XFAIL.
489 * testsuite/gcc.dg/graphite/scop-matmult.c: Un-XFAIL.
490 * testsuite/gfortran.dg/graphite/id-13.f: New.
491 * testsuite/gfortran.dg/graphite/id-5.f: New.
493 2009-07-28 Sebastian Pop <sebastian.pop@amd.com>
495 * graphite-clast-to-gimple.c (graphite_loop_normal_form): Do not
496 check that nb_reductions_in_loop is zero.
497 * graphite-scop-detection.c (harmful_stmt_in_bb): Don't filter out
499 (nb_reductions_in_loop): Removed.
500 (graphite_can_represent_loop): Do not call nb_reductions_in_loop.
501 * graphite-sese-to-poly.c (phi_node_is_iv): Removed.
502 (bb_contains_non_iv_scalar_phi_nodes): Removed.
503 (scop_contains_non_iv_scalar_phi_nodes): Removed.
504 (build_poly_scop): Do not call scop_contains_non_iv_scalar_phi_nodes.
506 2009-07-28 Sebastian Pop <sebastian.pop@amd.com>
508 * graphite-clast-to-gimple.c (build_cloog_prog): Do not code generate
509 statements that have an empty iteration domain.
510 * testsuite/gfortran.dg/graphite/id-16.f: New.
512 2009-07-28 Sebastian Pop <sebastian.pop@amd.com>
514 * tree-scalar-evolution.c (instantiate_scev_1): Return
515 chrec_dont_know when the result is not above instantiate_below.
516 * graphite-scop-detection.c (scopdet_basic_block_info): Fix formatting.
517 * graphite-sese-to-poly.c (create_linear_expr_from_tree): Assert that
518 the tree has a known scalar evolution.
519 * testsuite/gfortran.dg/graphite/id-14.f: New.
520 * testsuite/gfortran.dg/graphite/id-15.f: New.
522 2009-07-28 Sebastian Pop <sebastian.pop@amd.com>
524 * sese.c (rename_variables_in_stmt): Pass in an extra parameter
526 (rename_variables): Keep inserting renames after the ones already
529 2009-07-28 Sebastian Pop <sebastian.pop@amd.com>
531 * graphite-sese-to-poly.c (compare_bb_depths): New.
532 (graphite_sort_dominated_info): New.
533 (build_scop_bbs_1): Call graphite_sort_dominated_info.
534 (build_scop_scattering): Fix comment.
536 2009-07-28 Sebastian Pop <sebastian.pop@amd.com>
538 * graphite.c (graphite_finalize): Call print_loops instead of
539 dump_function_to_file.
540 * testsuite/gcc.dg/graphite/graphite.exp: Fix formatting.
541 * testsuite/gcc.dg/graphite/pr35356-1.c: New. Look for the number of
542 loops generated in the graphite output file.
543 * testsuite/gcc.dg/graphite/pr35356-2.c: New.
544 * testsuite/gcc.dg/graphite/pr35356-3.c: New. XFAILed for now.
545 * testsuite/gfortran.dg/graphite/id-12.f: New.
547 2009-07-24 Li Feng <nemokingdom@gmail.com>
549 * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-8.c:
552 2009-07-24 Li Feng <nemokingdom@gmail.com>
553 Tobias Grosser <grosser@fim.uni-passau.de>
555 * graphite-sese-to-poly.c (pdr_add_alias_set): Use data reference's
556 alias set number build alias in ACCESSES polyhedron.
557 (build_alias_set_for_drs): New.
558 (build_pbb_drs): Added build_alias_set_for_drs.
559 * graphite-dependences.c (poly_drs_may_alias_p): New.
560 (graphite_carried_dependence_level_k): Check alias information
561 before building polyhedron.
563 2009-07-24 Tobias Grosser <grosser@fim.uni-passau.de>
565 * Makefile.in (lambda-code.o): Fix formatting.
567 2009-07-24 Tobias Grosser <grosser@fim.uni-passau.de>
569 * Merge from mainline (r149350-149952)
571 2009-07-18 Tobias Grosser <grosser@fim.uni-passau.de>
573 * graphite-poly.c (apply_poly_transforms): Move strip_mine
574 before interchange to prepare for loop blocking.
576 2009-07-18 Tobias Grosser <grosser@fim.uni-passau.de>
578 * graphite-poly.c (apply_poly_transforms): Add checks after every
580 * graphite-sese-to-poly.c (build_poly_scop): Remove check, as already
581 done in apply_poly_transforms.
583 2009-07-17 Konrad Trifunovic <konrad.trifunovic@gmail.com>
585 * graphite-dependences.c (build_lexicographically_gt_constraint):
586 Replace RES parameter with *RES.
587 (dependence_polyhedron_1): Pass an address of the parameter RES
588 instead of value of RES.
590 2009-07-16 Sebastian Pop <sebastian.pop@amd.com>
592 * graphite.c (graphite_finalize): Fix comment.
593 (graphite_transform_loops): Reset scev info after code generation
596 2009-07-16 Sebastian Pop <sebastian.pop@amd.com>
598 * graphite.c (graphite_finalize): Call scev_reset.
600 2009-07-16 Sebastian Pop <sebastian.pop@amd.com>
602 * graphite-clast-to-gimple.c (compute_cloog_iv_types): Do not create
603 GBB_CLOOG_IV_TYPES hash table twice.
604 * graphite-sese-to-poly.c (free_gimple_bb): Call free_data_refs.
605 (add_condition_to_domain): Clear GMP values.
607 2009-07-16 Sebastian Pop <sebastian.pop@amd.com>
609 * graphite-dependences.c: Fix formatting.
610 * graphite-poly.c (free_poly_dr): Also free PDR_DATA_CONTAINER.
611 (pbb_number_of_iterations): Free ppl_Linear_Expression.
612 * graphite-sese-to-poly.c: Fix formatting.
613 * graphite.c (graphite_transform_loops): Create the hash table
614 after the early return.
616 2009-07-16 Sebastian Pop <sebastian.pop@amd.com>
618 * testsuite/gcc.dg/graphite/id-14.c: New.
619 * testsuite/gcc.dg/graphite/pr40157.c: New.
620 * testsuite/gfortran.dg/graphite/id-11.f: New.
622 2009-07-16 Sebastian Pop <sebastian.pop@amd.com>
624 * graphite-sese-to-poly.c (nb_pbbs_in_loops): New.
625 (build_poly_scop): Return false when there are no pbbs within
626 loops to avoid to pass to cloog scops with no loops.
628 2009-07-16 Sebastian Pop <sebastian.pop@amd.com>
630 * graphite-sese-to-poly.c (build_pbb_scattering_polyhedrons): Avoid
631 useless test "i % 2".
632 (build_pbb_scattering_polyhedrons): Fix formatting.
633 (build_poly_dr): Same.
634 * graphite.c (graphite_transform_loops): Restructure.
636 2009-07-14 Razya Ladelsky <razya@il.ibm.com>
638 * tree-ssa-loop-manip.c (rewrite_phi_with_iv): Remove
639 reduction_list parameter.
640 (rewrite_all_phi_nodes_with_iv): Same.
641 (canonicalize_loop_ivs): Same.
642 * tree-parloops.c (struct brli): Removed.
643 (build_reduction_list_info): Removed.
644 (build_new_reduction): New.
645 (analyze_reduction_list): Removed.
646 (gather_scalar_reductions): Find reductions instead of phi
647 nodes that can't be canonicalized.
648 (try_create_reduction_list): Remove reduction_list parameter.
649 (gen_parallel_loop): Same.
650 (parallelize_loops): Remove analyze_reductions variable,
651 initialization and free.
652 Change reduction_list htab initialization to reduction_info
653 elements instead of ssa names.
654 Call try_create_reduction_list and gen_parallel_loop without
655 analyzed_reduction argument.
656 * graphite-clast-to-gimple (graphite_loop_normal_form): Call
657 canonicalize_loop_ivs with one less argument.
658 * tree-flow.h (canonicalize_loop_ivs): Remove one argument.
660 2009-07-14 Konrad Trifunovic <konrad.trifunovic@gmail.com>
662 * graphite-dependences.c (new_poly_dr_pair): New.
663 (dependence_polyhedron): Renamed into dependence_polyhedron_1.
664 (new_poly_dr_pair): New.
665 (eq_poly_dr_pair_p): New.
666 (hash_poly_dr_pair_p): New.
667 * graphite-dependences.h (struct poly_dr_pair): New.
668 (eq_poly_dr_pair_p): Declared.
669 (hash_poly_dr_pair_p): Declared.
670 * graphite-poly.c (new_scop): Initialize SCOP_ORIGINAL_PDR_PAIRS.
671 (free_scop): Free SCOP_ORIGINAL_PDR_PAIRS.
672 * graphite-poly.h (struct scop): Add original_pdr_pairs field.
673 * Makefile.in (graphite-poly.o): Add dependence on
674 graphite-dependences.h.
676 2009-07-14 Sebastian Pop <sebastian.pop@amd.com>
678 * graphite-scop-detection.c (graphite_can_represent_scev): Do not let
679 polynomials of degree > 1 pass to Graphite.
680 * tree-chrec.c (scev_is_linear_expression): Call
681 evolution_function_is_affine_multivariate_p.
682 * testsuite/gfortran.dg/graphite/id-10.f90: New.
684 2009-07-14 Sebastian Pop <sebastian.pop@amd.com>
686 * tree-scalar-evolution.c (compute_overall_effect_of_inner_loop):
687 Instantiate scevs varying in outer loops.
688 * testsuite/gfortran.dg/graphite/id-9.f: Correct testcase.
690 2009-07-14 Sebastian Pop <sebastian.pop@amd.com>
692 * graphite-sese-to-poly.c (build_loop_iteration_domains): Do not insert
693 redundant constraint.
695 2009-07-14 Sebastian Pop <sebastian.pop@amd.com>
697 * testsuite/gcc.dg/graphite/graphite.exp: Fix comments.
698 * testsuite/gfortran.dg/graphite/graphite.exp: Trigger actions
699 based on the file names as in the C testsuite.
700 * testsuite/gfortran.dg/graphite/block-1.f90: Fix patterns.
701 * testsuite/gfortran.dg/graphite/block-2.f: Same.
702 * testsuite/gfortran.dg/graphite/block-3.f90: Same.
703 * testsuite/gfortran.dg/graphite/block-4.f90: Same.
704 * testsuite/gfortran.dg/graphite/id-1.f90: Same.
705 * testsuite/gfortran.dg/graphite/id-2.f90: Same.
706 * testsuite/gfortran.dg/graphite/id-3.f90: Same.
707 * testsuite/gfortran.dg/graphite/id-4.f90: Same.
708 * testsuite/gfortran.dg/graphite/id-6.f: Same.
709 * testsuite/gfortran.dg/graphite/id-9.f: Same.
710 * testsuite/gfortran.dg/graphite/interchange-1.f: Same.
711 * testsuite/gfortran.dg/graphite/interchange-2.f: Same.
712 * testsuite/gfortran.dg/graphite/scop-1.f: Same.
714 2009-07-14 Sebastian Pop <sebastian.pop@amd.com>
716 * sese.c (expand_scalar_variables_call): New.
717 (expand_scalar_variables_ssa_name): Handle calls in expander.
719 2009-07-13 Sebastian Pop <sebastian.pop@amd.com>
721 * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-6.c:
722 Expect to see the pattern twice.
723 * testsuite/gcc.dg/graphite/interchange-0.c: Un-XFAIL.
724 * testsuite/gcc.dg/graphite/interchange-5.c: Same.
725 * testsuite/gcc.dg/graphite/interchange-6.c: Same.
727 2009-07-13 Sebastian Pop <sebastian.pop@amd.com>
729 * testsuite/gcc.dg/graphite/id-10.c: New.
730 * testsuite/gcc.dg/graphite/id-12.c: New.
731 * testsuite/gfortran.dg/graphite/id-7.f: New.
732 * testsuite/gfortran.dg/graphite/id-8.f: New.
734 2009-07-13 Sebastian Pop <sebastian.pop@amd.com>
736 * graphite-sese-to-poly.c (pdr_add_data_dimensions): Fix division by
739 2009-07-13 Sebastian Pop <sebastian.pop@amd.com>
741 * sese.c (rename_variables_in_stmt): Call fold_convert during renaming.
743 2009-07-13 Sebastian Pop <sebastian.pop@amd.com>
745 * sese.c (expand_scalar_variables_stmt): Avoid unnecessary expansion.
747 2009-07-10 Sebastian Pop <sebastian.pop@amd.com>
749 * graphite-sese-to-poly.c (pdr_add_memory_accesses): Fix order of
750 building PDR subscripts.
752 2009-07-10 Sebastian Pop <sebastian.pop@amd.com>
754 * graphite-sese-to-poly.c (pdr_add_data_dimensions): Fix the
755 computation of array sizes.
757 2009-07-10 Sebastian Pop <sebastian.pop@amd.com>
759 * graphite-sese-to-poly.c (add_param_constraints): Disabled.
761 2009-07-10 Tobias Grosser <grosser@fim.uni-passau.de>
763 * graphite-dependences.c (map_into_dep_poly, map_dr_into_dep_poly,
764 build_pairwise_constraint, dr_equality_constraints,
765 build_pairwise_scheduling_equality,
766 build_pairwise_scheduling_inequality, lexicographically_gt_p,
767 build_lexicographically_gt_constraint, dependence_polyhedron,
768 graphite_legal_transform_dr, graphite_carried_dependence_level_k):
769 Move from NNC_Polyhedron to C_Polyhedron.
770 * graphite-interchange.c (compute_array_size_poly,
771 gather_access_strides): Dito.
772 * graphite-poly.c (apply_poly_transforms, new_poly_dr, free_poly_bb,
773 free_scop, pbb_number_of_iterations): Dito.
774 * graphite-poly.h (struct poly_dr, pdr_nb_subscripts, struct poly_bb,
775 pbb_dim_iter_domain, struct scop): Dito.
776 * graphite-ppl.c (new_Constraint_System_from_Cloog_Matrix,
777 new_Cloog_Domain_from_ppl_Polyhedron,
778 new_Cloog_Domain_from_ppl_Pointset_Powerset, ppl_set_coef_gmp,
779 ppl_insert_dimensions_pointset, ppl_insert_dimensions_pointset,
780 ppl_strip_loop, ppl_strip_loop, ppl_print_polyhedron_matrix,
781 ppl_print_powerset_matrix, debug_ppl_polyhedron_matrix,
782 debug_ppl_powerset_matrix, ppl_read_polyhedron_matrix): Dito.
783 * graphite-ppl.h (ppl_Pointset_Powerset_C_Polyhedron_t,
784 new_C_Polyhedron_from_Cloog_Matrix, ppl_print_powerset_matrix,
785 debug_ppl_powerset_matrix, ppl_insert_dimensions_pointset): Dito.
786 * graphite-sese-to-poly.c (build_pbb_scattering_polyhedrons,
787 build_loop_iteration_domains, ppl_constraint_type_from_tree_code,
788 add_condition_to_domain, add_condition_to_pbb, build_scop_context,
789 build_scop_iteration_domain, build_poly_dr): Dito
791 2009-07-09 Sebastian Pop <sebastian.pop@amd.com>
793 * testsuite/gcc.dg/graphite/graphite.exp: Added a rule to execute
795 * testsuite/gcc.dg/graphite/run-id-1.c: New.
797 2009-07-09 Sebastian Pop <sebastian.pop@amd.com>
799 * graphite-sese-to-poly.c (build_loop_iteration_domains): Add the
800 positivity constraint on the symbolic number of iterations.
802 2009-07-09 Sebastian Pop <sebastian.pop@amd.com>
804 * graphite-sese-to-poly.c (build_loop_iteration_domains): Rewrite.
806 2009-07-09 Sebastian Pop <sebastian.pop@amd.com>
807 Tobias Grosser <grosser@fim.uni-passau.de>
809 * graphite-clast-to-gimple.c (build_scop_context): Removed.
810 (build_cloog_prog): Directly use SCOP_CONTEXT.
811 * graphite-poly.c (new_scop): Initialize SCOP_CONTEXT.
812 (free_scop): Free SCOP_CONTEXT.
813 (print_scop_context): New.
814 (print_scop): Call print_scop_context.
815 (debug_scop_context): New.
816 * graphite-poly.h (print_scop_context, debug_scop_context): Declared.
817 (struct scop): Added field context.
819 * graphite-sese-to-poly.c (add_param_constraints): New.
820 (build_scop_context): New.
821 (build_poly_scop): Call build_scop_context.
823 2009-07-09 Sebastian Pop <sebastian.pop@amd.com>
825 * graphite-clast-to-gimple.c (gmp_cst_to_tree): Moved...
826 * graphite-ppl.c (ppl_set_inhomogeneous_gmp, ppl_set_coef_gmp): New.
827 (ppl_set_inhomogeneous, ppl_set_coef): Moved...
828 * graphite-ppl.h: Include double-int.h and tree.h.
829 (ppl_set_inhomogeneous_gmp, ppl_set_coef_gmp): Declared.
830 (ppl_set_inhomogeneous, ppl_set_coef): ...here.
831 (gmp_cst_to_tree): ...here. Reimplemented using mpz_get_double_int.
832 (tree_int_to_gmp, ppl_set_inhomogeneous_tree, ppl_set_coef_tree): New.
834 2009-07-09 Sebastian Pop <sebastian.pop@amd.com>
836 * graphite-clast-to-gimple.c (clast_to_gcc_expression_red): Generate
837 POINTER_PLUS_EXPR for pointer types.
838 (clast_to_gcc_expression): Same.
840 2009-07-09 Sebastian Pop <sebastian.pop@amd.com>
842 * graphite-poly.c (print_scattering_function): Early return when
843 PBB_TRANSFORMED_SCATTERING is not initialized.
844 (print_pbb_domain): Early return when PBB_DOMAIN is not initialized.
846 2009-07-08 Sebastian Pop <sebastian.pop@amd.com>
848 * tree-parloops.c (analyze_reduction_list): Remove unused variable
851 2009-07-08 Razya Ladelsky <razya@il.ibm.com>
853 * tree-parloops.c (analyze_reduction_list): Change return
855 (try_create_reduction_list): Move the call to
856 analyze_reduction_list to the beginining.
857 Call reduction_phi with analyzed_reductions as argument
858 instead of reduction_list.
860 2009-07-08 Tobias Grosser <grosser@fim.uni-passau.de>
862 * Merge from mainline (r148296:149346)
864 2009-07-07 Sebastian Pop <sebastian.pop@amd.com>
866 * graphite-scop-detection.c (graphite_can_represent_init): New.
867 (graphite_can_represent_scev): Call graphite_can_represent_init:
868 check that the initial value does not contain multiplications of
870 (stmt_has_simple_data_refs_p): New.
871 (stmt_simple_for_scop_p): Call stmt_simple_for_scop_p.
872 (is_simple_operand): Fix formatting.
873 * graphite-sese-to-poly.c (try_generate_gimple_bb): Fix formatting.
875 2009-07-07 Sebastian Pop <sebastian.pop@amd.com>
877 * testsuite/gcc.dg/graphite/id-13.c: New.
878 * graphite-sese-to-poly.c (graphite_stmt_p): Do not call
879 analyze_scalar_evolution, use scalar_evolution_in_region.
880 (scan_tree_for_params_right_scev): Add extra assert.
881 (parameter_index_in_region_1): Split from parameter_index_in_region.
882 (idx_record_params): Use scalar_evolution_in_region.
883 (find_params_in_bb): Same.
884 (find_scop_parameters): Same.
885 (build_loop_iteration_domains): Same.
886 (create_linear_expr_from_tree): Same.
887 * sese.c (scalar_evolution_in_region): New.
888 * sese.h (scalar_evolution_in_region): Declared.
889 (defined_in_sese_p): New.
890 * tree-scalar-evolution.c (compute_overall_effect_of_inner_loop): Not
892 * tree-scalar-evolution.h (compute_overall_effect_of_inner_loop):
895 2009-07-07 Sebastian Pop <sebastian.pop@amd.com>
897 * Makefile.in: Replace dependences on tree-chrec.h with SCEV_H.
898 TREE_DATA_REF_H also implies SCEV_H.
900 2009-07-07 Sebastian Pop <sebastian.pop@amd.com>
902 * graphite-poly.c (print_scop_params): New.
903 (print_scop): Call print_scop_params.
904 (debug_scop_params): New.
905 * graphite-poly.h (print_scop_params, debug_scop_params): Declared.
907 2009-07-07 Li Feng <nemokingdom@gmail.com>
909 * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-4.c: New.
910 * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-5.c: New.
911 * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-6.c: New.
912 * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-7.c: New.
913 * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-8.c: New.
914 * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-9.c: New.
916 2009-07-07 Li Feng <nemokingdom@gmail.com>
918 * graphite-clast-to-gimple.c (mark_loops_parallel): Dump information
919 for dependency checking part.
920 * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-1.c: Add
921 tests for dependency checking.
922 * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-2.c: Ditto.
923 * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-3.c: Ditto.
924 * testsuite/gcc.dg/graphite/graphite_autopar/graphite_autopar.exp: Add
925 flag -fdump-tree-graphite-all for autopar testsuites.
927 2009-07-06 Sebastian Pop <sebastian.pop@amd.com>
929 * Makefile.in (tree-ssa-loop-manip.o): Depends on langhooks.h.
930 * tree-parloops.c (rewrite_phi_with_iv, rewrite_all_phi_nodes_with_iv,
931 canonicalize_loop_ivs): Moved...
932 * tree-ssa-loop-manip.c: ... here. Include langhooks.h.
934 2009-07-06 Sebastian Pop <sebastian.pop@amd.com>
936 * tree-parloops.c (try_create_reduction_list): Pass an extra
937 argument analyzed_reductions. Call analyze_reduction_list.
938 (gen_parallel_loop): Do not call analyze_reduction_list.
939 (parallelize_loops): Init and finalize analyzed_reductions.
941 2009-07-06 Li Feng <nemokingdom@gmail.com>
943 * testsuite/gcc.dg/graphite/graphite_autopar/graphite_autopar.exp:
944 Added flag -fno-loop-strip-mine for autopar testcase.
946 2009-07-04 Li Feng <nemokingdom@gmail.com>
948 * graphite-dependences.c (graphite_carried_dependence_level_k): Use
949 transformed scattering dimension instead of unmatch orignal when
950 calling dependence_polyhedron.
952 2009-06-30 Sebastian Pop <sebastian.pop@amd.com>
954 * opts.c (decode_options): Enable flag_loop_strip_mine at -O2.
956 2009-06-30 Sebastian Pop <sebastian.pop@amd.com>
958 * graphite-poly.c (pbb_number_of_iterations): Check for returned
959 value 1 from ppl_Pointset_Powerset_NNC_Polyhedron_maximize.
961 2009-06-30 Sebastian Pop <sebastian.pop@amd.com>
963 * graphite-blocking.c (pbb_strip_mine_profitable_p): New.
964 (pbb_do_strip_mine): Call pbb_strip_mine_profitable_p.
965 * graphite-poly.c (pbb_number_of_iterations): New.
966 * graphite-poly.h (pbb_number_of_iterations): Declared.
967 (pbb_iterator_dim, pbb_parameter_dim): New.
969 2009-06-29 Sebastian Pop <sebastian.pop@amd.com>
971 * graphite-clast-to-gimple.c (graphite_create_new_loop): Revert the
972 last commit on type of lower and upper bound of loops.
974 2009-06-29 Li Feng <nemokingdom@gmail.com>
976 * Makefile.in (graphite-clast-to-gimple.o): Added dependence on
977 graphite-dependences.h.
978 * graphite-clast-to-gimple.c (new_bb_pbb_def): New.
979 (mark_bb_with_pbb): New.
980 (get_stmtfor_depth): New.
981 (find_pbb_via_hash): New.
982 (dependency_in_loop_p): New.
983 (mark_loops_parallel): New.
984 (free_aux_in_new_loops): New.
985 (translate_clast): Add parameter BB_PBB_MAPPING. Mark newly created
986 bb with it's relevant pbb. Mark newly created loops. Remove mark
987 innermost loop parallel without checking.
988 (gloog): Add parameter BB_PBB_MAPPING.
989 * graphite-clast-to-gimple.h (struct bb_pbb_def): New.
990 (gloog): Change declaration.
991 (mark_loop_parallel): Make extern.
992 (free_aux_in_new_loops): Declare.
993 (bb_pbb_map_hash): New.
994 (eq_bb_pbb_map): New.
995 * graphite.c (graphite_transform_loops): Added BB_PBB_MAPPING. Trigger
996 auto parallelization when flag_graphite_force_parallel is set.
997 (graphite_finalize): Added free_aux_in_new_loops.
998 * tree-parloops.c (parallelize_loops): Only generate parallel code for
999 the innermost loop that marked parallel. Use
1000 flag_graphite_force_parallel instead of loop->can_be_parallel.
1001 (loop_parallel_p): Move inner most checking out of function.
1003 2009-06-26 Sebastian Pop <sebastian.pop@amd.com>
1005 * graphite-clast-to-gimple.c (graphite_create_new_loop): Make the
1006 type of lower and upper bound of loops signed long int.
1008 2009-06-26 Sebastian Pop <sebastian.pop@amd.com>
1010 * cfgloopmanip.c (create_empty_loop_on_edge): Gimplify the loop exit
1011 expression outside the loop.
1013 2009-06-26 Sebastian Pop <sebastian.pop@amd.com>
1015 * gcc.dg/graphite/interchange-8.c: New.
1017 2009-06-26 Sebastian Pop <sebastian.pop@amd.com>
1019 * gcc.dg/graphite/interchange-0.c: XFailed.
1020 * gcc.dg/graphite/interchange-5.c: XFailed.
1021 * gcc.dg/graphite/interchange-6.c: XFailed.
1023 2009-06-26 Sebastian Pop <sebastian.pop@amd.com>
1025 * graphite-interchange.c (compute_array_size_poly): The end of the
1026 recursion should return 1.
1028 2009-06-26 Sebastian Pop <sebastian.pop@amd.com>
1030 * graphite-interchange.c (compute_array_size_cstr): Allow the
1031 subscript multiplier to be -1.
1032 (compute_array_size): Use PDR_DATA_CONTAINER and not PDR_ACCESSES.
1033 * graphite-poly.c (new_poly_dr): Takes an extra argument for the
1034 data_container. Initializes PDR_DATA_CONTAINER.
1035 (print_pdr_access_layout): New.
1036 (print_pdr): Call print_pdr_access_layout. Print PDR_DATA_CONTAINER.
1037 * graphite-poly.h (struct poly_dr): Adjust comment. Add a new field
1039 (PDR_DATA_CONTAINER): New.
1040 (new_poly_dr): Update declaration.
1041 * graphite-sese-to-poly.c (pdr_add_data_dimensions): New.
1042 (build_poly_dr): Call pdr_add_data_dimensions.
1044 2009-06-26 Sebastian Pop <sebastian.pop@amd.com>
1046 * graphite-poly.h (struct poly_dr): Fix comment.
1047 * graphite-sese-to-poly.c (pdr_add_alias_set): New.
1048 (pdr_add_memory_accesses): New.
1049 (build_poly_dr): Call pdr_add_memory_accesses and pdr_add_alias_set.
1051 2009-06-26 Sebastian Pop <sebastian.pop@amd.com>
1053 * graphite-poly.c (print_pdrs, debug_pdrs): New.
1054 (print_pbb): Add call to print_pdrs.
1055 * graphite-poly.h (print_pdrs, debug_pdrs): Declared.
1057 2009-06-24 Konrad Trifunovic <konrad.trifunovic@gmail.com>
1058 Li Feng <nemokingdom@gmail.com>
1060 * graphite-dependences.c (graphite_carried_dependence_level_k): New.
1061 (dependency_between_pbbs_p): New.
1062 (lexicographically_gt_p): Assure !empty_p before polyhedron
1063 intersection assign.
1064 (build_lexicographically_gt_constraint): Correct lexicographically
1066 * graphite-dependences.h: New.
1067 * Makefile.in (graphite-dependences.o): Add graphite-dependences.h.
1069 2009-06-24 Sebastian Pop <sebastian.pop@amd.com>
1071 * graphite-clast-to-gimple.c (print_clast_stmt): New.
1072 (gloog): Print to dump_file the generated clast.
1073 * graphite-clast-to-gimple.h (print_clast_stmt): Declared.
1074 * graphite-interchange.c (pbb_do_interchange): Fix dump formatting.
1076 2009-06-24 Sebastian Pop <sebastian.pop@amd.com>
1078 * graphite-poly.c (extend_scattering): Increment
1079 PBB_NB_LOCAL_VARIABLES by the number of added dimensions.
1081 2009-06-24 Sebastian Pop <sebastian.pop@amd.com>
1083 * graphite-interchange.c (compute_array_size_poly): Added exit of
1084 recursion condition. Continue iterating even after the first equality.
1085 (compute_array_size): Same.
1087 2009-06-24 Li Feng <nemokingdom@gmail.com>
1089 * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-1.c: Update
1090 -fdump-tree-final_cleanup to -fdump-tree-optimized.
1091 * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-2.c: Ditto.
1092 * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-3.c: Ditto.
1093 * testsuite/gcc.dg/graphite/graphite_autopar/graphite_autopar.exp: Ditto.
1095 2009-06-23 Sebastian Pop <sebastian.pop@amd.com>
1097 * sese.c (expand_scalar_variables_stmt): Expand scalar variables
1098 only when the use verifies is_gimple_reg.
1100 2009-06-23 Sebastian Pop <sebastian.pop@amd.com>
1102 * graphite-clast-to-gimple.c (build_cloog_prog): Fix memory corruption.
1103 Allocate scaldims after call to unify_scattering_dimensions.
1105 2009-06-23 Sebastian Pop <sebastian.pop@amd.com>
1107 * graphite-clast-to-gimple.c (translate_clast): Fix memory leak.
1109 2009-06-23 Sebastian Pop <sebastian.pop@amd.com>
1110 Albert Cohen <albert.cohen@inria.fr>
1112 * graphite-blocking.c (pbb_strip_mine_loop_depth): Do not use local
1113 variables for the strip mining.
1115 2009-06-23 Sebastian Pop <sebastian.pop@amd.com>
1116 Pranav Garg <pranav.garg2107@gmail.com>
1118 * Makefile.in (OBJS-common): Added graphite-blocking.o.
1119 (graphite-sese-to-poly.o): Moved down to be in lexicographical order.
1120 (graphite-blocking.o): New rule.
1121 (graphite-poly.o, graphite-ppl.o): Moved to be in lexicographical order.
1122 * graphite-blocking.c: New.
1123 * graphite-poly.c (apply_poly_transforms): Call scop_do_strip_mine for
1124 flag_loop_strip_mine.
1125 (psct_scattering_dim_for_loop_depth): New.
1126 * graphite-poly.h (scop_do_strip_mine): Declared.
1127 (psct_add_local_variable): Increment PBB_NB_LOCAL_VARIABLES.
1128 * tree-ssa-loop.c (gate_graphite_transforms): Do not fail when using
1129 flag_loop_strip_mine.
1131 2009-06-23 Sebastian Pop <sebastian.pop@amd.com>
1133 * graphite-poly.c (extend_scattering): Avoid initializing and freeing
1134 a GMP value and a PPL coefficient at each iteration of a loop.
1136 2009-06-23 Sebastian Pop <sebastian.pop@amd.com>
1138 * graphite-dependences.c (dependence_polyhedron): Do not use
1139 pbb_nb_scattering_dims anymore. Use pbb_nb_scattering_orig and
1140 pbb_nb_scattering_transform.
1141 (graphite_legal_transform_dr): Same.
1142 * graphite-poly.c (extend_scattering): Same.
1143 (unify_scattering_dimensions): Same.
1144 (print_scattering_function): Same.
1145 (new_poly_bb): Initialize PBB_NB_SCATTERING_TRANSFORM and
1146 PBB_NB_LOCAL_VARIABLES.
1147 * graphite-poly.h (pbb_nb_scattering): Removed declaration.
1148 (struct poly_bb): Added nb_local_variables and nb_scattering_transform.
1149 (PBB_NB_LOCAL_VARIABLES, PBB_NB_SCATTERING_TRANSFORM): New.
1150 (pbb_nb_scattering_orig, pbb_nb_scattering_transform): New.
1151 (pbb_nb_scattering_dims, pbb_nb_scattering): Removed.
1152 (pbb_nb_scattering_transform): New.
1153 (pbb_nb_local_vars): Return PBB_NB_LOCAL_VARIABLES.
1154 (psco_scattering_dim): Add assert on parameters.
1155 (psct_scattering_dim): Same.
1156 (psct_scattering_dim_for_loop_depth): Declared.
1157 (psct_local_var_dim): New.
1158 (psco_iterator_dim, psco_parameter_dim): Add assert on parameters.
1159 (psct_iterator_dim, psct_parameter_dim): Same. To maintain the
1160 correct layout, call pbb_nb_local_vars.
1161 (psct_add_local_variable, psct_add_scattering_dimension): New.
1162 * graphite-sese-to-poly.c (build_pbb_scattering_polyhedrons):
1163 Initialize PBB_NB_SCATTERING_TRANSFORM.
1165 2009-06-23 Sebastian Pop <sebastian.pop@amd.com>
1167 * graphite-ppl.c (set_inhomogeneous): Renamed ppl_set_inhomogeneous.
1168 (set_coef): Renamed ppl_set_coef.
1169 * graphite-ppl.h (ppl_set_inhomogeneous, ppl_set_coef): Declared.
1171 2009-06-23 Sebastian Pop <sebastian.pop@amd.com>
1173 * graphite-dependences.c (build_pairwise_scheduling_inequality): Don't
1174 test a boolean against 1.
1175 * graphite-interchange.c (pbb_interchange_loop_depths): Do not build
1176 a new polyhedron for the PBB_TRANSFORMED_SCATTERING.
1177 (pbb_do_interchange): Returns true when a transform has been performed.
1178 (scop_do_interchange): Same.
1179 * graphite-poly.c (apply_poly_transforms): Use the return value of
1180 scop_do_interchange.
1181 * graphite-poly.h (scop_do_interchange): Update declaration.
1183 2009-06-23 Tobias Grosser <grosser@fim.uni-passau.de>
1185 * graphite-clast-to-gimple.c (gloog): Reset loop->aux right
1187 * sese.c (sese_reset_aux_in_loops): New.
1188 * sese.h (sese_reset_aux_in_loops): New.
1190 2009-06-19 Sebastian Pop <sebastian.pop@amd.com>
1192 * graphite-sese-to-poly.c (scan_tree_for_params_int): Pass in the
1193 multiplier and multiply the constant by the multiplier.
1194 (scan_tree_for_params): Bound the multiplier to its MULT_EXPR.
1195 (build_poly_dr): Do not use the multiplier to define the subscript.
1197 2009-06-19 Sebastian Pop <sebastian.pop@amd.com>
1199 * graphite-poly.c (new_poly_dr): Pass an extra argument for the
1200 compiler's data reference. Initialize PDR_CDR.
1201 (print_pdr): Call dump_data_reference.
1202 * graphite-poly.h (struct poly_dr): Rename black_box into pbb.
1203 Add compiler_dr field.
1204 (PDR_BB): Renamed PDR_PBB.
1206 * graphite-sese-to-poly.c (build_poly_dr): Pass to new_poly_dr
1207 GCC's data reference representation.
1208 * tree-data-ref.c (debug_data_references, debug_data_reference): New.
1209 * tree-data-ref.h (debug_data_references, debug_data_reference): Decl.
1211 2009-06-19 Sebastian Pop <sebastian.pop@amd.com>
1213 * graphite-poly.c (print_scattering_function): Also print the layout.
1214 * graphite-poly.h (pbb_nb_local_vars): New.
1216 2009-06-19 Sebastian Pop <sebastian.pop@amd.com>
1218 * graphite-poly.c (print_pbb_domain): Also print the layout names.
1220 2009-06-19 Sebastian Pop <sebastian.pop@amd.com>
1222 * graphite-poly.c (print_pdr, debug_pdr): New.
1223 * graphite-poly.h (print_pdr, debug_pdr): Declared.
1224 (PDR_BASE): Removed.
1226 2009-06-18 Sebastian Pop <sebastian.pop@amd.com>
1228 * gcc/testsuite/gcc.dg/graphite/interchange-{1..7}.c: New avatars of
1231 2009-06-18 Sebastian Pop <sebastian.pop@amd.com>
1233 * graphite-interchange.c (compute_subscript): Allow also -1 in the
1234 subscript identification column.
1235 (pbb_do_interchange): Print to dump_file that some loops "will be
1236 interchanged". Rely on that chain of characters in the testcases.
1237 * gcc.dg/graphite/interchange-0.c: New.
1238 * gcc.dg/graphite/graphite.exp: Iterate over the testsuite
1239 interchange-*.c files and compile them with -floop-interchange.
1241 2009-06-18 Pranav Garg <pranav.garg2107@gmail.com>
1243 * graphite-interchange.c (interchange_profitable_p): Renamed
1244 pbb_interchange_profitable_p.
1246 2009-06-18 Sebastian Pop <sebastian.pop@amd.com>
1247 Harsha Jagasia <harsha.jagasia@amd.com>
1248 Pranav Garg <pranav.garg2107@gmail.com>
1250 * graphite-interchange.c (interchange_profitable_p): Make static.
1251 (pbb_interchange_loop_depths, pbb_do_interchange,
1252 scop_do_interchange): New.
1253 * graphite-poly.c (apply_poly_transforms): Call scop_do_interchange
1254 for flag_loop_interchange.
1255 * graphite-poly.h (scop_do_interchange): Declared.
1256 * tree-ssa-loop.c (gate_graphite_transforms): Do not fail when
1257 flag_loop_interchange is used.
1259 2009-06-18 Sebastian Pop <sebastian.pop@amd.com>
1261 * graphite-dependences.c (dependence_polyhedron): Update use of
1262 pbb_nb_scattering_dims.
1263 * graphite-poly.h (pbb_nb_scattering_dims): Do not pass SCOP.
1264 (pbb_nb_scattering): Update use of pbb_nb_scattering_dims.
1265 (psco_scattering_dim, psct_scattering_dim, psco_iterator_dim,
1266 psct_iterator_dim, psco_parameter_dim, psct_parameter_dim): New.
1268 2009-06-16 Sebastian Pop <sebastian.pop@amd.com>
1270 * graphite.c: Cleanup foo.
1272 2009-06-16 Sebastian Pop <sebastian.pop@amd.com>
1274 * Merge from mainline (r143684:148293).
1275 * Disabled libpcp until it gets fixed.
1277 2009-06-05 Sebastian Pop <sebastian.pop@amd.com>
1278 Harsha Jagasia <harsha.jagasia@amd.com>
1280 * graphite-interchange.c: New.
1281 * Makefile.in (graphite-interchange.o): New.
1282 * graphite-poly.h (interchange_profitable_p): Declared.
1283 * graphite-ppl.h (value_max): New.
1285 2009-06-04 Sebastian Pop <sebastian.pop@amd.com>
1287 * graphite-dependences.c (dependence_polyhedron): Use pdr_dim.
1288 * graphite-poly.h: Fix some comments.
1292 2009-06-04 Sebastian Pop <sebastian.pop@amd.com>
1295 (pdr_accessp_nb_subscripts): Renamed pdr_nb_subscripts.
1296 (pdr_accessp_nb_iterators): Renamed pdr_dim_iter_domain.
1297 (pdr_accessp_nb_params): Renamed pdr_nb_params.
1298 (pdr_accessp_alias_set_dim): Renamed pdr_alias_set_dim.
1299 (pdr_accessp_subscript_dim): Renamed pdr_subscript_dim.
1300 (pdr_accessp_iterator_dim): Renamed pdr_iterator_dim.
1301 (pdr_accessp_param_dim): Renamed pdr_parameter_dim.
1302 (pbb_nb_loops): Renamed pbb_dim_iter_domain.
1303 * graphite-clast-to-gimple.c: Same.
1304 * graphite-dependences.c: Same.
1305 * graphite-poly.c: Same.
1306 * graphite-sese-to-poly.c: Same.
1308 2009-06-03 Sebastian Pop <sebastian.pop@amd.com>
1310 * graphite-clast-to-gimple.c (build_iv_mapping): Insert full
1311 expressions for an IV rename, as returned by clast_to_gcc_expression.
1312 (copy_renames): Rename new_name to expr.
1313 * sese.c (debug_rename_elt): Same.
1316 (sese_adjust_liveout_phis): Call force_gimple_operand before using
1317 the information from the rename map.
1318 (rename_variables_in_stmt): Same.
1319 (add_loop_exit_phis): Rename new_name to expr.
1320 (insert_loop_close_phis): Same.
1321 (add_guard_exit_phis): Same. Call force_gimple_operand.
1322 * sese.h (struct rename_map_elt): Rename new_name to expr.
1323 (new_rename_map_elt): Same.
1325 2009-06-03 Sebastian Pop <sebastian.pop@amd.com>
1327 * graphite-clast-to-gimple.c (build_iv_mapping): Use set_rename.
1328 * sese.c (set_rename): Make it extern.
1329 * sese.h (set_rename): Declared.
1331 2009-06-03 Sebastian Pop <sebastian.pop@amd.com>
1333 * graphite-poly.c (extend_scattering): Free values.
1334 * graphite-ppl.c (new_Cloog_Domain_from_ppl_Pointset_Powerset):
1336 (ppl_print_powerset_matrix): Same.
1337 * graphite-scop-detection.c (free_scops_1): New.
1338 (limit_scops): Call free_scops_1.
1339 * graphite-sese-to-poly.c (build_scop_bbs_1): Free dom.
1340 (build_poly_dr): Free PPL coefficients.
1341 * tree-parloops.c (rewrite_all_phi_nodes_with_iv): Free bbs.
1343 2009-06-02 Sebastian Pop <sebastian.pop@amd.com>
1345 * graphite-dependences.c: New.
1346 * graphite-data-ref.c: Removed.
1347 * graphite-data-ref.h: Removed.
1348 * Makefile.in (graphite-data-ref.o): Removed.
1349 (graphite-dependences.o): Added.
1350 * graphite-clast-to-gimple.c: Remove dependence on graphite-data-ref.h.
1351 * graphite-poly.c: Same.
1352 Move the data dependence testing to graphite-dependences.c.
1354 2009-05-19 Tobias Grosser <grosser@fim.uni-passau.de>
1356 * graphite-scop-detection.c (graphite_can_represent_loop): Renamed
1357 from graphite_cannot_represent_loop. Code refactored.
1358 (scopdet_basic_block_info): Call graphite_can_represent_loop.
1360 2009-05-17 Li Feng <nemokingdom@gmail.com>
1362 * testsuite/gcc.dg/graphite/graphite_autopar/graphite_autopar.exp:
1363 Cover all the testcases (not only the filtered ones).
1365 2009-05-17 Tobias Grosser <grosser@fim.uni-passau.de>
1367 * graphite-scop-detection.c (stmt_simple_for_scop_p): Remove
1368 unnecessary check. Update comments. Move check for REAL_TYPE here.
1369 (harmful_stmt_in_bb): Remove checks for conditions. This is already
1370 done in (stmt_simple_for_scop_p).
1372 2009-05-14 Tobias Grosser <grosser@fim.uni-passau.de>
1374 * graphite.c (print_global_statistics): New.
1375 (print_graphite_scop_statistic): New.
1376 (print_graphite_statistics): New.
1377 (graphite_initialize, graphite_transform_loops): Print statistics.
1378 * graphite-scop-detection (build_scops): Print statistics.
1379 (print_graphite_scop_statistics): New.
1380 (print_graphite_statistics): New.
1382 2009-05-13 Sebastian Pop <sebastian.pop@amd.com>
1384 * graphite-clast-to-gimple.c (struct clast_name_index): Removed.
1385 (debug_clast_name_index): Removed.
1386 (debug_clast_name_indexes_1): Removed.
1387 (debug_clast_name_indexes): Removed.
1388 (clast_name_index_elt_info): Removed.
1389 (eq_clast_name_indexes): Removed.
1390 (clast_name_to_index): Removed.
1391 (new_clast_name_index): Removed.
1392 (save_clast_name_index): Removed.
1393 (save_var_name): Moved...
1394 (init_sese_params_index): Removed.
1395 (clast_name_to_gcc): Remove use of name_tree.
1396 (initialize_cloog_names): Same.
1397 (gloog): Do not call init_sese_params_index.
1398 * graphite-sese-to-poly.c (save_var_name): ...here.
1399 (parameter_index_in_region): New.
1400 * sese.c (new_sese): Initialize SESE_PARAMS_NAMES.
1401 (parameter_index_in_region): Removed.
1402 (is_parameter): Remove use of name_tree.
1403 * sese.h (struct name_tree): Removed.
1404 (struct sese): Remove use of name_tree. New field params_names.
1405 (SESE_PARAMS_NAMES): New.
1406 (SESE_PARAMS): Remove duplicate.
1407 (parameter_index_in_region): Removed.
1408 (sese_nb_params): Remove use of name_tree.
1409 (struct clast_name_index): New.
1410 (new_clast_name_index): New.
1411 (clast_name_to_index): New.
1412 (save_clast_name_index): New.
1413 (debug_clast_name_index): New.
1414 (debug_clast_name_indexes_1): New.
1415 (debug_clast_name_indexes): New.
1416 (clast_name_index_elt_info): New.
1417 (eq_clast_name_indexes): New.
1419 2009-05-13 Sebastian Pop <sebastian.pop@amd.com>
1421 * graphite-clast-to-gimple.c (compute_cloog_iv_types_1): Call
1422 pbb_to_depth_to_oldiv. Remove call to oldiv_for_loop.
1423 (graphite_loop_normal_form): Do not pass region. Do not
1424 initialize SESE_OLDIVS.
1425 (build_graphite_loop_normal_form): Update call to
1426 graphite_loop_normal_form.
1427 * sese.c (debug_oldivs): Removed.
1428 (new_sese): Do not initialize SESE_OLDIVS.
1429 (free_sese): Do not free SESE_OLDIVS.
1430 (oldiv_for_loop): Removed.
1431 * sese.h (struct sese): Remove old_ivs.
1432 (SESE_OLDIVS): Removed.
1433 (oldiv_for_loop): Removed.
1435 2009-05-13 Sebastian Pop <sebastian.pop@amd.com>
1437 * graphite-clast-to-gimple.c (clast_name_to_gcc): Pass newivs,
1438 remove ivstack. Remove call to loop_iv_stack_get_iv_from_name,
1439 replaced by a call to newivs_to_depth_to_newiv.
1440 (clast_to_gcc_expression): Pass newivs, remove ivstack.
1441 (clast_to_gcc_expression_red): Same.
1442 (gcc_type_for_clast_expr): Same.
1443 (gcc_type_for_clast_eq): Same.
1444 (graphite_translate_clast_equation): Same.
1445 (graphite_create_guard_cond_expr): Same.
1446 (graphite_create_new_guard): Same.
1447 (graphite_create_new_loop): Same.
1448 (build_iv_mapping): Same.
1449 (translate_clast): Same.
1451 (loop_iv_stack_patch_for_consts): Removed. *
1452 sese.c (iv_stack_entry_is_constant): Removed.
1453 (iv_stack_entry_is_iv): Removed.
1454 (loop_iv_stack_push_iv): Removed.
1455 (loop_iv_stack_insert_constant): Removed.
1456 (loop_iv_stack_pop): Removed.
1457 (loop_iv_stack_get_iv): Removed.
1458 (loop_iv_stack_get_iv_from_name): Removed.
1459 (debug_loop_iv_stack): Removed.
1460 (free_loop_iv_stack): Removed.
1461 (loop_iv_stack_remove_constants): Removed. *
1462 sese.h (iv_stack_entry_kind): Removed.
1463 (iv_stack_entry_data_union): Removed.
1464 (iv_stack_entry_struct): Removed.
1465 (iv_stack_entry_p): Removed.
1466 (debug_oldivs, debug_loop_iv_stack, loop_iv_stack_insert_constant,
1467 loop_iv_stack_get_iv_from_name, loop_iv_stack_push_iv,
1468 loop_iv_stack_get_iv, loop_iv_stack_remove_constants,
1469 loop_iv_stack_pop, free_loop_iv_stack): Removed.
1470 (gbb_loop_at_index): Fix indenting.
1471 (gbb_loop_index): Removed.
1473 2009-05-13 Sebastian Pop <sebastian.pop@amd.com>
1475 * graphite-clast-to-gimple.c (clast_name_to_gcc): Do not use strcmp.
1476 Call clast_name_to_index.
1478 2009-05-13 Sebastian Pop <sebastian.pop@amd.com>
1480 * graphite-clast-to-gimple.c (clast_name_to_gcc): Pass region,
1481 do not pass params. Get params from SESE_PARAMS.
1482 (clast_to_gcc_expression): Same.
1483 (clast_to_gcc_expression_red): Same.
1484 (gcc_type_for_clast_eq): Same.
1485 (graphite_translate_clast_equation): Same.
1486 (graphite_create_new_loop): Same.
1487 * sese.c (rename_variables_in_stmt): Fix comment.
1489 2009-05-13 Sebastian Pop <sebastian.pop@amd.com>
1491 * graphite-clast-to-gimple.c (graphite_create_new_loop): Pass
1493 Call save_clast_name_index.
1494 (translate_clast): Pass newivs_index.
1495 (gloog): Create and free newivs_index.
1497 2009-05-13 Sebastian Pop <sebastian.pop@amd.com>
1499 * graphite-clast-to-gimple.c (clast_name_index): New structure.
1500 (clast_name_index_p): New type.
1501 (debug_clast_name_index): New.
1502 (debug_clast_name_indexes_1): New.
1503 (debug_clast_name_indexes): New.
1504 (clast_name_index_elt_info): New.
1505 (eq_clast_name_indexes): New.
1506 (clast_name_to_index): New.
1507 (new_clast_name_index): New.
1508 (save_clast_name_index): New.
1509 (init_sese_params_index): New.
1510 (gloog): Call init_sese_params_index.
1511 * graphite-clast-to-gimple.h (debug_clast_name_indexes): Declared.
1512 * sese.c (new_sese): Initialize SESE_PARAMS_INDEX.
1513 (free_sese): Free SESE_PARAMS_INDEX.
1514 * sese.h (struct sese): Add params_index.
1515 (SESE_PARAMS_INDEX): New.
1517 2009-05-13 Sebastian Pop <sebastian.pop@amd.com>
1519 * graphite-clast-to-gimple.c (newivs_to_depth_to_newiv): New.
1520 (graphite_create_new_loop): Pass the newivs vector. Push the
1521 newly created IV to newivs.
1522 (translate_clast): Pass the newivs vector.
1523 (gloog): Create and destroy the newivs vector.
1525 2009-05-13 Sebastian Pop <sebastian.pop@amd.com>
1527 * graphite-clast-to-gimple.c (pbb_to_depth_to_oldiv): New.
1528 (graphite_loop_normal_form): Initialize loop->aux with the unique
1529 IV that has been created.
1531 2009-05-13 Tobias Grosser <grosser@fim.uni-passau.de>
1533 * tree-chrec.c (evolution_function_right_is_integer_cst): Allow
1534 scev with parameters in the base part. They where forbidden
1537 2009-05-11 Li Feng <nemokingdom@gmail.com>
1539 * testsuite/gcc.dg/graphite/graphite.exp: Set different default
1540 compile options by file names.
1541 * testsuite/gcc.dg/graphite/block{0-6}.c: Remove dg-option line.
1542 * testsuite/gcc.dg/graphite/id-{1-9}.c: Ditto.
1543 * testsuite/gcc.dg/graphite/scop-{0-20}.c: Ditto.
1544 * testsuite/gcc.dg/graphite/scop-matmult.c: Ditto.
1546 2009-05-08 Li Feng <nemokingdom@gmail.com>
1548 * testsuite/gcc.dg/graphite/graphite_autopar/graphite_autopar.exp: New.
1549 * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-1.c: New.
1550 * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-2.c: New.
1551 * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-3.c: New.
1553 2009-05-07 Tobias Grosser <grosser@fim.uni-passau.de>
1555 * graphite-scop-detection (build_scops_1): Fix little bug introduced
1558 2009-05-07 Tobias Grosser <grosser@fim.uni-passau.de>
1560 * graphite-scop-detection.c (graphite_can_represent_scev): Only
1561 allow integer constant strides.
1562 (graphite_can_represent_expr): Depend on outermost_loop.
1563 (stmt_simple_memref_p, graphite_cannot_represent_loop,
1564 harmful_stmt_in_bb, is_simple_operand, stmt_simple_for_scop_p,
1565 build_scops_1): Same.
1566 (scopdet_basic_block_info): Same and insert layered SCoP
1568 (try_generate_gimple_bb): Cleanup.
1569 (build_scops): Enable data references.
1571 * testsuite/gcc.dg/graphite/id-5.c: New.
1572 * testsuite/gcc.dg/graphite/id-9.c: New.
1573 * tree-chrec.c (evolution_function_right_is_integer_cst): New.
1574 * tree-chrec.h (evolution_function_right_is_integer_cst): New.
1576 2009-05-06 Tobias Grosser <grosser@fim.uni-passau.de>
1578 * sese.c (expand_scalar_variables_ssa_name): Only build expressions,
1579 that we have not yet built for this SCoP.
1581 2009-05-06 Tobias Grosser <grosser@fim.uni-passau.de>
1583 * sese.c (expand_scalar_variables_expr): Fix expand_scalar_variables
1584 for complex numbers.
1586 2009-05-06 Tobias Grosser <grosser@fim.uni-passau.de>
1588 * graphite-ppl.c: Fix build if cloog is not available.
1590 2009-05-04 Li Feng <nemokingdom@gmail.com>
1592 * tree-parloops.c (loop_parallel_p): Remove construction of
1593 NITER and REDUCTION_LIST.
1594 (try_get_loop_niter): New.
1595 (try_create_reduction_list): New.
1596 (parallelize_loops): Bypass the failed checkings in autopar
1597 when can_be_parallel in loop structure is set to true.
1599 2009-05-01 Tobias Grosser <grosser@fim.uni-passau.de>
1601 * testsuite/gcc.dg/graphite/id-6.c: Update testcase.
1602 * testsuite/gcc.dg/graphite/scop-3.c: Dito.
1604 2009-05-01 Tobias Grosser <grosser@fim.uni-passau.de>
1606 * graphite-scop-detection.c (stmt_simple_for_scop_p):
1607 Enable EQ_EXPR and NE_EXPR again.
1609 2009-04-30 Tobias Grosser <grosser@fim.uni-passau.de>
1611 * graphite-scop-detection.c (graphite_can_represent_scev):
1612 Add check if scev is affine multivariate.
1613 (harmful_stmt_in_bb): Check if we can represent the conditions.
1614 (scopdet_basic_block_info (basic_block bb, VEC): Pass the loop to
1616 * testsuite/gcc.dg/graphite/id-7.c: New.
1618 2009-04-30 Tobias Grosser <grosser@fim.uni-passau.de>
1620 * graphite-sese-to-poly.c (bb_contains_non_iv_scalar_phi_nodes):
1621 Check all bbs in region, not only the bbs that are represented in
1623 (build_poly_scop): Add newline.
1624 * testsuite/gcc.dg/graphite/id-8.c: New.
1626 2009-04-30 Li Feng <nemokingdom@gmail.com>
1628 * cfgloop.c (alloc_loop): Initialize can_be_parallel to false
1629 when loop initialize.
1630 * cfgloop.h (struct loop): Introduce flag can_be_parallel.
1631 * common.opt: Declare flag_graphite_force_parallel.
1632 * graphite-clast-to-gimple.c (translate_clast): Mark the innermost
1634 * graphite-poly.c (apply_poly_transforms): Introduce
1635 flag_graphite_force_parallel.
1636 * tree-ssa-loop.c (gate_graphite_transforms): ditto.
1637 * toplev.c (process_options): ditto and replace a not correctly
1640 2009-04-30 Li Feng <nemokingdom@gmail.com>
1642 * graphite-clast-to-gimple.c (loop_iv_stack_patch_for_consts):
1643 Change the call of gbb_loop_at_index and/or gbb_loop_index due
1644 to the redefinition.
1645 (compute_cloog_iv_types_1): ditto.
1646 (build_iv_mapping): ditto.
1647 * graphite-sese-to-poly.c (new_gimple_bb): Remove GBB_LOOPS related
1649 (free_gimple_bb): Removed GBB_LOOPS related free part.
1650 (build_bb_loops): Removed.
1651 * sese.h (struct gimple_bb): Removed loops.
1652 (GBB_LOOPS): Removed.
1653 (gbb_loop_at_index): Instead of using GBB_LOOPS, we use sese instead.
1654 (gbb_loop_index): ditto.
1656 2009-04-24 Tobias Grosser <grosser@fim.uni-passau.de>
1658 * graphite-scop-detection.c (graphite_can_represent_scev): Do not
1659 allow non constant strides.
1660 * testsuite/gcc.dg/graphite/scop-20.c: New.
1662 2009-04-24 Sebastian Pop <sebastian.pop@amd.com>
1664 * graphite-scop-detection.c (dot_all_scops): Fix system call
1665 return value warning.
1668 2009-04-24 Sebastian Pop <sebastian.pop@amd.com>
1670 * testsuite/gcc.dg/graphite/id-6.c: Fix pattern.
1671 * testsuite/gcc.dg/graphite/scop-3.c: Same.
1673 2009-04-24 Sebastian Pop <sebastian.pop@amd.com>
1675 * graphite-poly.c (map_into_dep_poly, map_dr_into_dep_poly,
1676 build_pairwise_constraint, dr_equality_constraints,
1677 build_pairwise_scheduling_equality,
1678 build_pairwise_scheduling_inequality, lexicographically_gt_p,
1679 build_lexicographically_gt_constraint, dependence_polyhedron,
1680 graphite_legal_transform_dr, graphite_legal_transform_bb,
1681 graphite_legal_transform): New.
1682 * graphite-poly.h (graphite_legal_transform): Declared.
1683 * graphite-sese-to-poly.c (build_poly_scop): Call to
1684 graphite_legal_transform is disabled for the moment.
1686 2009-04-24 Sebastian Pop <sebastian.pop@amd.com>
1688 * graphite-poly.h (pbb_nb_scattering_dims): New.
1689 (pbb_nb_scattering): Use it.
1691 2009-04-24 Sebastian Pop <sebastian.pop@amd.com>
1693 * graphite-ppl.c (ppl_insert_dimensions_pointset): Add
1694 Pointset_Powerset version of ppl_insert_dimensions.
1695 * graphite-ppl.h (ppl_insert_dimensions_pointset): Declared.
1697 2009-04-24 Sebastian Pop <sebastian.pop@amd.com>
1699 * graphite-ppl.c (ppl_insert_dimensions): Fix formatting.
1701 2009-04-24 Sebastian Pop <sebastian.pop@amd.com>
1703 * graphite-poly.h: Fix comment.
1705 2009-04-24 Sebastian Pop <sebastian.pop@amd.com>
1707 * graphite-sese-to-poly.c (build_poly_dr): Fix data ref multiplier.
1709 2009-04-24 Tobias Grosser <grosser@fim.uni-passau.de>
1711 * sese.c (expand_scalar_variables_stmt): Only iterate over the old
1714 2009-04-24 Tobias Grosser <grosser@fim.uni-passau.de>
1716 * graphite-sese-to-poly.c (var_used_in_not_loop_header_phi_node): New.
1717 (graphite_stmt_p): Represent bbs necessary to build the phi nodes of
1720 2009-04-20 Sebastian Pop <sebastian.pop@amd.com>
1722 * graphite-scop-detection.c (stmt_simple_for_scop_p): Do not
1723 handle EQ_EXPR and NE_EXPR.
1725 2009-04-17 Tobias Grosser <grosser@fim.uni-passau.de>
1727 * graphite-poly.h (poly_dr): Fix comment.
1729 2009-04-09 Sebastian Pop <sebastian.pop@amd.com>
1730 Tobias Grosser <grosser@fim.uni-passau.de>
1732 * graphite-poly.c (new_poly_bb): Do not initialize PBB_DOMAIN
1733 with a zero dimension polyhedron.
1734 (find_scop_parameters): Move the call to scop_set_nb_params here.
1735 (build_loop_iteration_domains): Store in loop->aux the iteration
1737 (build_scop_iteration_domain): Fix PBB_DOMAIN for bbs not surrounded
1738 by any loop in scop.
1739 (build_poly_scop): Do not call scop_set_nb_params.
1741 2009-04-09 Sebastian Pop <sebastian.pop@amd.com>
1742 Tobias Grosser <grosser@fim.uni-passau.de>
1744 * graphite-sese-to-poly.c (add_condition_to_pbb): Pass code to
1745 add_condition_to_domain not GT_EXPR.
1747 2009-04-09 Tobias Grosser <grosser@fim.uni-passau.de>
1749 * graphite-ppl.c (debug_ppl_powerset_matrix): New.
1750 * graphite-ppl.h (debug_ppl_powerset_matrix): New.
1751 * graphite-sese-to-poly.c (add_condition_to_pbb): Use
1752 upper_bound_assign to calculate unions.
1753 * testsuite/gcc.dg/graphite/id-6.c: New.
1755 2009-04-09 Tobias Grosser <grosser@fim.uni-passau.de>
1757 * graphite-scop-detection.c (canonicalize_loop_closed_ssa): Do not
1758 handle abnormal edges.
1760 2009-04-09 Tobias Grosser <grosser@fim.uni-passau.de>
1762 * graphite-poly.c (new_poly_dr, free_poly_dr): New.
1763 (free_poly_bb): Also free poly_drs.
1764 * graphite-poly.h (new_poly_dr, free_poly_dr): New.
1765 (poly_dr): Polyhedron to Pointset_Powerset.
1766 (pdr_accessp_nb_subscripts): Same.
1767 * graphite-sese-to-poly.c (build_poly_dr): Same. And actually build
1770 2009-04-08 Sebastian Pop <sebastian.pop@amd.com>
1772 * graphite-clast-to-gimple.c (initialize_cloog_names): Change cloog
1773 names into more meaningful names.
1775 2009-04-08 Sebastian Pop <sebastian.pop@amd.com>
1777 * testsuite/gfortran.dg/graphite/interchange-1.c: New.
1778 * testsuite/gfortran.dg/graphite/interchange-2.c: New.
1780 2009-04-08 Sebastian Pop <sebastian.pop@amd.com>
1782 * graphite-clast-to-gimple.c (graphite_loop_normal_form): Do not build
1784 * tree-parloops.c (rewrite_phi_with_iv): New.
1785 (rewrite_all_phi_nodes_with_iv): New.
1786 (canonicalize_loop_ivs): Call them.
1788 2009-04-08 Sebastian Pop <sebastian.pop@amd.com>
1790 * graphite-sese-to-poly.c (try_generate_gimple_bb): Use
1791 graphite_find_data_references_in_stmt.
1792 * tree-data-ref.c (graphite_find_data_references_in_stmt): New.
1793 * tree-data-ref.h (graphite_find_data_references_in_stmt): Declared.
1795 2009-04-08 Sebastian Pop <sebastian.pop@amd.com>
1797 * sese.c (add_loop_exit_phis): Don't fail on non SSA_NAME renames.
1799 2009-04-08 Sebastian Pop <sebastian.pop@amd.com>
1801 * graphite-sese-to-poly.c (build_scop_bbs_1): Use bb_in_sese_p
1802 instead of bb_in_region.
1803 (flag_bb_in_region): Same. Renamed flag_bb_in_sese.
1804 (build_sese_conditions): Use flag_bb_in_sese.
1805 * sese.c (register_bb_in_sese): Removed.
1806 (new_sese): Remove initialization of SESE_REGION_BBS.
1807 (free_sese): Do not free SESE_REGION_BBS.
1808 * sese.h (struct sese): Remove field region_basic_blocks.
1809 (SESE_REGION_BBS): Removed.
1810 (bb_in_sese_p): Implement in function of bb_in_region.
1812 2009-04-08 Sebastian Pop <sebastian.pop@amd.com>
1814 * graphite-scop-detection.c (limit_scops): Deal only with single exit
1817 2009-04-08 Tobias Grosser <grosser@fim.uni-passau.de>
1819 * graphite-scop-detection.c (stmt_simple_for_scop_p): Allow NE_EXPR
1821 * graphite-sese-to-poly.c (create_linear_expr_from_tree): New.
1822 (add_condition_to_domain): New.
1823 (add_condition_to_pbb): New.
1824 (add_conditions_to_domain): Cleanup and handle of NE_EXPR and EQ_EXPR.
1825 * testsuite/gcc.dg/graphite/scop-3.c: Update number of detected SCoPs.
1827 2009-04-08 Tobias Grosser <grosser@fim.uni-passau.de>
1829 * graphite-clast-to-gimple.c (build_cloog_prog): ppl_Polyhedron ->
1830 ppl_Pointset_Powerset.
1831 * graphite-poly.c (new_poly_bb, free_poly_bb): Same.
1832 * graphite-poly.h (poly_bb): poly_bb.domain Same.
1833 (pbb_nb_loops): Same.
1834 * graphite-sese-to-poly.c (build_loop_iteration_domains,
1835 add_conditions_to_domain): Same.
1836 * graphite-ppl.c (new_Cloog_Domain_from_ppl_Pointset_Powerset): New.
1837 (ppl_print_polyhedron_matrix): ppl_Polyhedron_t ->
1838 ppl_const_Polyhedron_t.
1839 (ppl_print_powerset_matrix): New.
1840 * graphite-ppl.h (new_Cloog_Domain_from_ppl_Pointset_Powerset,
1841 ppl_print_powerset_matrix): New.
1842 (ppl_print_polyhedron_matrix): Updated.
1844 2009-04-07 Sebastian Pop <sebastian.pop@amd.com>
1846 * tree-scalar-evolution.c (analyze_scalar_evolution_1): Fix comment.
1848 2009-04-07 Sebastian Pop <sebastian.pop@amd.com>
1850 * graphite-poly.c (extend_scattering): Fix indenting. Free cstr.
1851 (print_iteration_domains, debug_iteration_domain,
1852 debug_iteration_domains): New.
1853 * graphite-poly.h (print_iteration_domains, debug_iteration_domain,
1854 debug_iteration_domains): Declared.
1855 * graphite-sese-to-poly.c (build_pbb_scattering_polyhedrons): Fix
1858 2009-04-03 Tobias Grosser <grosser@fim.uni-passau.de>
1859 Sebastian Pop <sebastian.pop@amd.com>
1861 * graphite-poly.h (print_iteration_domain): New.
1862 * graphite-sese-to-poly.c (add_conditions_to_domain): Fixed bug.
1863 (build_sese_conditions_1, build_sese_conditions_after,
1864 build_sese_conditions_before): New.
1865 (build_sese_conditions): Rewritten.
1867 2009-04-03 Sebastian Pop <sebastian.pop@amd.com>
1868 Tobias Grosser <grosser@fim.uni-passau.de>
1870 Cleanup of code generation liveouts.
1871 * graphite-clast-to-gimple.c (translate_clast): Use a single
1872 rename_map instead of one per translated statement.
1873 Do not use SESE_LIVEOUT_RENAMES.
1874 (graphite_loop_normal_form): Do not use SESE_REDUCTION_LIST.
1875 (gloog): Do not use SESE_LIVEOUT_RENAMES.
1876 * graphite-scop-detection.c (harmful_stmt_in_bb): Return the close
1877 phi node of a reduction: when a loop contains a reduction used outside
1878 the loop, there should be a scalar close phi node on the exit block.
1879 * sese.c (new_sese): Do not initialize SESE_LIVEOUT,
1880 SESE_LIVEOUT_RENAMES, and SESE_REDUCTION_LIST.
1881 (free_sese): Do not free them.
1882 (sese_build_liveouts_use): Do not use them.
1883 (sese_build_liveouts_bb): Same.
1884 (sese_build_liveouts): Same.
1885 (sese_insert_phis_for_liveouts): Same.
1886 (sese_adjust_phis_for_liveouts): Same. Renamed sese_adjust_liveout_phis.
1887 (defined_in_loop_p): New.
1888 (alive_after_loop): New.
1889 (close_phi_not_yet_inserted_p): New.
1890 (struct alep, alep_p): New.
1891 (add_loop_exit_phis): Remove from the rename_map all the names defined
1892 in the code generated loop.
1893 (insert_loop_close_phis): Traverse the rename_map passed to it.
1894 Don't use SESE_LIVEOUT_RENAMES.
1895 (default_liveout_before_guard): Renamed default_before_guard.
1896 (insert_guard_phis): Do not use SESE_LIVEOUT_RENAMES.
1897 (graphite_copy_stmts_from_block): Do not directly call set_rename.
1898 (register_sese_liveout_renames): Removed.
1899 (copy_bb_and_scalar_dependences): Do not call it.
1900 * sese.h (struct sese): Removed fields: liveout, liveout_renames, and
1902 (SESE_LIVEOUT): Removed.
1903 (SESE_LIVEOUT_RENAMES): Removed.
1904 (SESE_REDUCTION_LIST): Removed.
1905 (sese_build_liveouts): Removed.
1906 (sese_adjust_phis_for_liveouts): Renamed sese_adjust_liveout_phis.
1907 (insert_loop_close_phis): Pass a htab_t instead of a sese.
1908 (insert_guard_phis): Same.
1909 (rename_map_elt): Declare a VEC of them.
1910 * tree-parloops.c (canonicalize_loop_ivs): reduction_list contains
1911 trees not pointers to trees.
1913 Rewrite in canonical close SSA form:
1914 * graphite-scop-detection.c (contains_only_close_phi_nodes): New.
1915 (limit_scops): Close the scop after the block containing the close phi
1917 (canonicalize_loop_closed_ssa): New.
1918 (canonicalize_loop_closed_ssa_form): New.
1919 (build_scops): Call canonicalize_loop_closed_ssa_form.
1921 * graphite-sese-to-poly.c: Fix typos.
1923 2009-04-03 Sebastian Pop <sebastian.pop@amd.com>
1925 * graphite-poly.c (print_scattering_function, print_pbb_domain):
1927 (dump_gbb_conditions, dump_gbb_cases, print_iteration_domain): New.
1928 (print_pbb): Add conditions.
1930 2009-04-01 Tobias Grosser <grosser@fim.uni-passau.de>
1931 Sebastian Pop <sebastian.pop@amd.com>
1933 * graphite-scop-detection.c (bb_in_sd_region): Use bb_in_region.
1934 * graphite-sese-to-poly.c (all_non_dominated_preds_marked_p): New.
1935 (build_scop_bbs_1): New.
1936 (build_scop_bbs): Rewrite.
1937 * sese.h (bb_in_region): New.
1939 2009-03-29 Tobias Grosser <grosser@fim.uni-passau.de>
1941 * graphite-poly.c (new_poly_bb, free_poly_bb): Initialize/free
1943 (print_scop): Style.
1944 * graphite-poly.h (poly_bb): Add drs vector.
1945 (PBB_DRS): Add accessor.
1946 * graphite-sese-to-poly.c (build_poly_dr): New.
1947 (build_pbb_drs, build_scop_drs): New.
1948 (build_poly_scop): call build_scop_drs (Disabled at the moment).
1950 2009-03-29 Tobias Grosser <grosser@fim.uni-passau.de>
1952 * tree-ssa-loop.c: Include forgotten toplev.h
1954 2009-03-29 Tobias Grosser <grosser@fim.uni-passau.de>
1956 * graphite-poly.c: (apply_poly_transforms): sorry -> gcc_unreachable.
1957 * testsuite/gcc.dg/graphite/pr37883.c: Remove -floop-*
1958 * testsuite/gcc.dg/graphite/pr37928.c: Same
1959 * testsuite/gcc.dg/graphite/pr38409.c: Same
1960 * testsuite/gcc.dg/graphite/pr38498.c: Same
1961 * testsuite/gcc.dg/graphite/pr38559.c: Same
1962 * testsuite/gcc.dg/graphite/pr39335.c: Same
1963 * testsuite/gcc.dg/graphite/pr39335_1.c: Same
1964 * testsuite/gfortran.dg/graphite/block-2.f: Same
1965 * tree-ssa-loop.c (gate_graphite_transforms): Always fail if called
1968 2009-03-28 Tobias Grosser <grosser@fim.uni-passau.de>
1970 * graphite-sese-to-poly.c (ref_nb_loops, build_access_matrix_with_af,
1971 build_access_matrix, build_scop_data_accesses): Remove access function
1972 building. (We get a new version soon).
1973 (build_bb_loops, scan_tree_for_params_right_scev): Update.
1974 * sese.h (nb_loops_around_loop_in_sese): Remove.
1975 (sese_loop_depth): Do not use SESE_LOOP_NEST any more.
1977 2009-03-27 Tobias Grosser <grosser@fim.uni-passau.de>
1978 Sebastian Pop <sebastian.pop@amd.com>
1980 * graphite-scop-detection.c (struct scopdet_info): Rename last
1982 (scopdet_basic_block_info, build_scops_1): Don't use
1983 CDI_POST_DOMINATORS. CDI_POST_DOMINATORS should never be used.
1985 2009-03-26 Tobias Grosser <grosser@fim.uni-passau.de>
1986 Sebastian Pop <sebastian.pop@amd.com>
1988 * graphite-clast-to-gimple.c (gloog): Call sese_build_liveouts.
1989 * sese.c (sese_build_liveouts_use): Renamed from
1990 sese_build_livein_liveouts_use. Remove liveins.
1991 (sese_build_liveouts_bb): Renamed from sese_build_livein_liveouts_bb.
1992 Call sese_build_liveouts_use.
1993 (sese_build_liveouts): Renamed from sese_build_livein_liveouts.
1994 Call sese_build_liveouts_bb.
1995 (new_sese, free_sese): Remove liveins.
1996 (sese_add_exit_phis_var): Deleted.
1997 (sese_insert_phis_for_liveouts): Call sese_add_exit_phis_edge
1999 (graphite_copy_stmts_from_block): Remove SESE_NUM_VER.
2001 * sese.h (sese): Remove num_ver and livein.
2002 (SESE_LIVEIN, SESE_LIVEIN_VER, SESE_NUM_VER): Removed.
2004 2009-03-25 Tobias Grosser <grosser@fim.uni-passau.de>
2006 * graphite-sese-to-poly.c (build_scop_scattering): Fix compile.
2008 2009-03-25 Tobias Grosser <grosser@fim.uni-passau.de>
2010 * graphite-sese-to-poly.c (compare_prefix_loops): Removed.
2011 (build_scop_scattering): Do not use compare_prefix_loops any more.
2012 (nb_common_loops): New.
2014 2009-03-24 Sebastian Pop <sebastian.pop@amd.com>
2016 * sese.c (get_new_name_from_old_name): Renamed get_rename.
2017 (register_old_and_new_names): Renamed set_rename.
2019 2009-03-24 Sebastian Pop <sebastian.pop@amd.com>
2021 * graphite-scop-detection.h (nb_reductions_in_loop): Revert removal
2022 of the decl from the previous commit.
2024 2009-03-24 Sebastian Pop <sebastian.pop@amd.com>
2026 * graphite-scop-detection.c (dot_scop): New.
2027 * graphite-scop-detection.h (dot_scop): Declared.
2029 2009-03-24 Sebastian Pop <sebastian.pop@amd.com>
2031 * graphite-sese-to-poly.c (compare_prefix_loops): Fix compare.
2033 2009-03-24 Sebastian Pop <sebastian.pop@amd.com>
2035 * cfgloopmanip.c (create_empty_loop_on_edge): Generate the loop exit
2036 condition at the end of the loop.
2037 * graphite.c (graphite_initialize, graphite_finalize): Print to
2038 dump_file the compiled function.
2039 * graphite-clast-to-gimple.c (graphite_create_new_loop): Update use
2040 of create_empty_loop_on_edge.
2041 (translate_clast): Update the code generation of loops for the new
2043 * cfgloop.h (create_empty_loop_on_edge): Update declaration.
2045 2009-03-24 Sebastian Pop <sebastian.pop@amd.com>
2047 Reverted the patch from 2009-03-19.
2049 2009-03-19 Tobias Grosser <grosser@fim.uni-passau.de>
2051 * graphite-poly.c (new_poly_bb, free_poly_bb): Initialize/free
2053 (print_scop): Style.
2054 * graphite-poly.h (poly_bb): Add drs vector.
2055 (PBB_DRS): Add accessor.
2056 * graphite-sese-to-poly.c (ref_nb_loops): Remove.
2057 (build_access_matrix_with_af, build_access_matrix,
2058 build_scop_data_accesses): Delete.
2059 (build_poly_dr): New.
2060 (build_pbb_drs, build_scop_drs): New.
2061 (build_poly_scop): call build_scop_drs.
2063 2009-03-13 Sebastian Pop <sebastian.pop@amd.com>
2065 * graphite-scop-detection.c (dot_all_scops_1): Close the table
2066 once per basic block.
2068 2009-03-13 Tobias Grosser <grosser@fim.uni-passau.de>
2070 * graphite-scop-detection.c (graphite_can_represent_scev): New.
2071 (graphite_can_represent_expr): Renamed from loop_affine_expr
2073 (stmt_simple_for_scop_p): Call graphite_can_represent_expr.
2074 (graphite_cannot_represent_loop): Add scop_entry to parameters.
2075 (scopdet_basic_block_info): Actually define entry_block.
2076 (stmt_simple_memref_p): Moved here from ...
2078 * tree-data-ref.c (stmt_simple_memref_p): here.
2079 * tree-data-ref.h (stmt_simple_memref_p): Removed.
2081 2009-03-13 Tobias Grosser <grosser@fim.uni-passau.de>
2083 * testsuite/gcc.dg/graphite/id-4.c: New.
2085 2009-03-12 Sebastian Pop <sebastian.pop@amd.com>
2087 * sese.c (expand_scalar_variables_expr): Handle tcc_comparison.
2088 (register_old_and_new_names): Update the content of the map.
2089 When there was already a rename_map_elt in the map at that
2091 (copy_bb_and_scalar_dependences): Do rename_variables after
2092 expand_scalar_variables.
2093 * graphite-clast-to-gimple.c (build_iv_mapping): Update the content
2094 of the map. When there was already a rename_map_elt in the
2095 map at that location, free it.
2096 (translate_clast): Pass the rename_map. Do not initialize and free
2097 a rename_map per stmt_user.
2098 (gloog): Initialize and free one rename_map and pass it to
2101 2009-03-12 Sebastian Pop <sebastian.pop@amd.com>
2103 * sese.c (expand_scalar_variables_stmt,
2104 expand_scalar_variables_ssa_name): Add a gimple_stmt_iterator
2106 (expand_scalar_variables_expr): Handle REALPART_EXPR and IMAGPART_EXPR.
2107 (expand_scalar_variables): Pass to expand_scalar_variables_stmt
2108 the gimple_stmt_iterator of the statement to be expanded.
2109 * graphite-scop-detection.c (is_simple_operand): Do handle
2112 2009-03-11 Tobias Grosser <grosser@fim.uni-passau.de>
2114 * graphite-scop-detection.c (is_simple_operand): Do not handle
2116 * testsuite/gcc.dg/graphite/id-2.c: New.
2118 * graphite-sese-to-poly.c (build_bb_loops,
2119 add_value_to_dim, scan_tree_for_params_right_scev,
2120 scan_tree_for_params_int, scan_tree_for_params, idx_record_params,
2121 find_params_in_bb, build_loop_iteration_domains,
2122 add_conditions_to_domain): Remove subtract.
2124 2009-03-11 Tobias Grosser <grosser@fim.uni-passau.de>
2126 * graphite-clast-to-gimple.c (loop_iv_stack_patch_for_consts,
2127 build_iv_mapping, compute_cloog_iv_types_1, build_cloog_prog):
2128 pbb_loop_at_index -> gbb_loop_at_index.
2129 * graphite-poly.c (new_poly_bb, new_scop): New accessors.
2130 (debug_loop_vec): Delete.
2131 * graphite-poly.h (poly_bb, scop): Change black_box and region to void
2132 pointer. Move LOOPS to gimple_bb_p and insert nb_params.
2133 (PBB_LOOPS): Removed.
2134 (PBB_BLACK_BOX): Insert cast.
2135 (pbb_set_black_box): New setter.
2136 (pbb_loop_at_index, pbb_loop_index): Removed.
2137 (scop_set_region, scop_set_nb_params): New.
2138 * graphite-sese-to-poly.c (new_gimple_bb, free_gimple_bb,
2139 build_scop_scattering, build_bb_loops): Add GBB_LOOPS.
2140 (build_poly_scop): Use scop_set_nb_params.
2141 * sese.h (gimple_bb): Add LOOPS.
2142 (GBB_LOOPS, gbb_loop_index, gbb_loop_at_index): New.
2144 2009-03-11 Tobias Grosser <grosser@fim.uni-passau.de>
2146 Revert previous commit.
2148 2009-03-11 Sebastian Pop <sebastian.pop@amd.com>
2150 * sese.c (expand_scalar_variables_expr): Handle tcc_comparison.
2151 (register_old_and_new_names): Update the content of the map.
2152 When there was already a rename_map_elt in the map at that
2154 (copy_bb_and_scalar_dependences): Do rename_variables after
2155 expand_scalar_variables.
2156 * graphite-clast-to-gimple.c (build_iv_mapping): Update the content
2157 of the map. When there was already a rename_map_elt in the
2158 map at that location, free it.
2159 (translate_clast): Pass the rename_map. Do not initialize and free
2160 a rename_map per stmt_user.
2161 (gloog): Initialize and free one rename_map and pass it to
2164 2009-03-11 Tobias Grosser <grosser@fim.uni-passau.de>
2166 Remove forgotten line in revert.
2168 2009-03-11 Sebastian Pop <sebastian.pop@amd.com>
2170 Revert previous commit.
2172 2009-03-10 Sebastian Pop <sebastian.pop@amd.com>
2174 * sese.c (register_old_and_new_names): Update the content
2175 of the map. When there was already a rename_map_elt in the
2176 map at that location, free it.
2177 (copy_bb_and_scalar_dependences): Do rename_variables after
2178 expand_scalar_variables.
2179 * graphite-clast-to-gimple.c (build_iv_mapping): Update the content
2180 of the map. When there was already a rename_map_elt in the
2181 map at that location, free it.
2182 (translate_clast): Pass the rename_map. Do not initialize and free
2183 a rename_map per stmt_user.
2184 (gloog): Initialize and free one rename_map and pass it to
2187 2009-03-10 Sebastian Pop <sebastian.pop@amd.com>
2189 * graphite-clast-to-gimple.c (translate_clast): context_loop
2192 2009-03-10 Tobias Grosser <grosser@fim.uni-passau.de>
2193 Sebastian Pop <sebastian.pop@amd.com>
2195 * graphite-ppl.c (ppl_insert_dimensions): Fix stupid mistake
2196 of the use of ppl_Polyhedron_map_space_dimensions.
2198 2009-03-10 Tobias Grosser <grosser@fim.uni-passau.de>
2199 Sebastian Pop <sebastian.pop@amd.com>
2201 * graphite-poly.c (unify_scattering_dimensions): Fix types.
2202 * graphite-poly.h (poly_dr_p, poly_dr, POLY_DR_TYPE, PDR_BB,
2203 PDR_TYPE, PDR_ACCESSES, pdr_accessp_nb_subscripts,
2204 pdr_accessp_nb_iterators, pdr_accessp_nb_params,
2205 pdr_accessp_alias_set_dim, pdr_accessp_subscript_dim,
2206 pdr_accessp_iterator_dim, pdr_accessp_param_dim,
2207 pbb_nb_params): New.
2208 (pbb_nb_loops, pbb_nb_scattering, scop_nb_params,
2209 nb_loops_around_pbb): Adapt return types.
2211 2009-03-09 Tobias Grosser <grosser@fim.uni-passau.de>
2213 * Makefile.in (graphite.o, graphite-sese-to-poly.o,
2214 graphite-clast-to-gimple.o, graphite-data-ref.o,
2215 graphite-scop-detection.o, graphite-poly.o): Add
2218 2009-03-05 Tobias Grosser <grosser@fim.uni-passau.de>
2220 * Makefile.in (graphite.o, graphite-sese-to-poly.o,
2221 graphite-clast-to-gimple.o, graphite-data-ref.o,
2222 graphite-scop-detection.o, graphite-poly.o): Add graphite-poly.h.
2224 2009-03-04 Tobias Grosser <grosser@fim.uni-passau.de>
2226 * testsuite/gcc.dg/graphite/pr37485.c: Remove -floop-block
2227 * testsuite/gcc.dg/graphite/pr37828.c: Same.
2228 * testsuite/gcc.dg/graphite/pr37684.c: Same.
2229 * testsuite/gcc.dg/graphite/block-0.c: Same.
2230 * testsuite/gcc.dg/graphite/block-1.c: Same.
2231 * testsuite/gcc.dg/graphite/block-2.c: Same.
2232 * testsuite/gcc.dg/graphite/block-3.c: Same.
2233 * testsuite/gcc.dg/graphite/block-4.c: Same.
2234 * testsuite/gcc.dg/graphite/block-5.c: Same.
2235 * testsuite/gcc.dg/graphite/block-6.c: Same.
2236 * testsuite/gfortran.dg/graphite/pr38083.f90: Same.
2237 * testsuite/gfortran.dg/graphite/block-1.f90: Same.
2238 * testsuite/gfortran.dg/graphite/block-3.f90: Same.
2239 * testsuite/gfortran.dg/graphite/pr37852.f90: Same.
2240 * testsuite/gfortran.dg/graphite/block-4.f90: Same.
2241 * testsuite/gfortran.dg/graphite/pr37980.f90: Same.
2242 * testsuite/gfortran.dg/graphite/pr38953.f90: Same.
2243 * testsuite/gfortran.dg/graphite/pr37857.f90: Same.
2244 * opts.c: Remove -floop-block from -O2.
2245 * graphite-poly.c: Fail if -floop-block -floop-interchange or
2246 -floop-strip-mine are used.
2248 2009-03-04 Tobias Grosser <grosser@fim.uni-passau.de>
2249 Sebastian Pop <sebastian.pop@amd.com>
2251 * graphite-clast-to-gimple.c (build_cloog_prog): Unify scattering
2253 * graphite-poly.c (pbb_compare, graphite_sort_pbbs,
2254 graphite_trans_bb_move_loop, graphite_trans_bb_strip_mine,
2255 strip_mine_profitable_p, is_interchange_valid,
2256 graphite_trans_bb_block, graphite_trans_loop_block,
2257 graphite_trans_scop_block): Temporary removed.
2258 (extend_scattering, unify_scattering_dimensions): New.
2259 (print_scattering_function, graphite_read_transforms):
2260 PBB_SCATTERING -> PBB_TRANSFORMED_SCATTERING.
2261 (graphite_generate_scattering_fns): Removed.
2262 (apply_poly_transforms): Cleanup.
2263 (free_poly_bb): Add PBB_SCATTERING -> PBB_TRANSFORMED_SCATTERING.
2264 (schedule_to_scattering): Moved.
2265 (PBB_STATIC_SCHEDULE, PBB_SCATTERING): Removed.
2266 (PBB_ORIGINAL_SCATTERING, PBB_TRANSFORMED_SCATTERING): New.
2267 (pbb_nb_scattering): New.
2268 (SCOP_ENTRY, SCOP_EXIT, SCOP_REGION_BBS, SCOP_DEP_GRAPH, SCOP_PARAMS,
2269 SCOP_LOOP_NEST, SCOP_PARAMS, SCOP_OLDIVS, SCOP_LIVEOUT_RENAMES):
2271 * graphite-ppl.c (ppl_insert_dimensions): Extended and renamed from
2273 (ppl_strip_loop): PBB_SCATTERING -> PBB_TRANSFORMED_SCATTERING.
2274 * graphite-scop-detection.c (dot_all_scops_1): PBB_SCATTERING
2275 -> PBB_TRANSFORMED_SCATTERING.
2276 * graphite-sese-to-poly.c (build_scop_bbs): Remove region.
2277 (build_pbb_scattering_polyhedron): Moved from schedule_to_scattering.
2278 (build_scop_scattering): Renamed from build_scop_canonical_schedules.
2279 (check_poly_representation): Do not return bool.
2280 (graphite_transform_loops): Reformat.
2281 * sese.h (SESE_ENTRY_BB, SESE_EXIT_BB): New.
2283 2009-03-04 Sebastian Pop <sebastian.pop@amd.com>
2285 * graphite-poly.c (print_pbb_domain, print_pbb, print_scop,
2286 debug_pbb_domain, debug_pbb, debug_scop): New.
2287 * graphite-poly.h (print_pbb_domain, print_pbb, print_scop,
2288 debug_pbb_domain, debug_pbb, debug_scop): Declared.
2290 2009-03-02 Sebastian Pop <sebastian.pop@amd.com>
2293 * tree-parloops.c (canonicalize_loop_ivs): Call fold_convert
2294 when the type precision of the induction variable should be
2295 larger than the type precision of nit.
2296 (gen_parallel_loop): Update use of canonicalize_loop_ivs.
2297 * graphite-clast-to-gimple.c (graphite_loop_normal_form): Same.
2298 * tree-flow.h (canonicalize_loop_ivs): Update declaration.
2300 * testsuite/gcc.dg/graphite/pr39335_1.c: New.
2301 * testsuite/gcc.dg/graphite/pr39335.c: New.
2303 2009-03-02 Sebastian Pop <sebastian.pop@amd.com>
2305 * tree-parloops.c (canonicalize_loop_ivs): reduction_list contains
2306 SSA_NAMES not struct reduction_info.
2308 2009-03-02 Sebastian Pop <sebastian.pop@amd.com>
2310 * sese.c (expand_scalar_variables_expr): Handle ADDR_EXPR.
2312 2009-02-27 Sebastian Pop <sebastian.pop@amd.com>
2313 Tobias Grosser <grosser@fim.uni-passau.de>
2315 * sese.c (new_sese): Initialize SESE_REDUCTION_LIST.
2316 (free_sese): Free SESE_REDUCTION_LIST.
2317 * sese.h (struct sese): Add field reduction_list.
2318 (SESE_REDUCTION_LIST): New.
2319 * graphite-clast-to-gimple.c (graphite_loop_normal_form): Call
2320 canonicalize_loop_ivs on SESE_REDUCTION_LIST.
2322 2009-02-27 Sebastian Pop <sebastian.pop@amd.com>
2323 Tobias Grosser <grosser@fim.uni-passau.de>
2325 * tree-flow.h (gather_scalar_reductions): Use struct loop * instead
2328 2009-02-27 Sebastian Pop <sebastian.pop@amd.com>
2329 Tobias Grosser <grosser@fim.uni-passau.de>
2331 * tree-parloops.c (struct brli, build_reduction_list_info,
2332 analyze_reduction_list, gather_scalar_reductions): New.
2333 (loop_parallel_p): Build a reduction list containing only
2334 PHI_RESULT SSA_NAMEs: call gather_scalar_reductions.
2335 (gen_parallel_loop): Call the analysis analyze_reduction_list.
2336 (parallelize_loops): Now reduction_list is a htab_t of SSA_NAMEs.
2337 * tree-flow.h (gather_scalar_reductions): Declared.
2339 2009-02-26 Sebastian Pop <sebastian.pop@amd.com>
2342 * graphite-clast-to-gimple.c (graphite_loop_normal_form): Do not call
2343 number_of_iterations_exit from a gcc_assert.
2345 2009-02-25 Sebastian Pop <sebastian.pop@amd.com>
2346 Jan Sjodin <jan.sjodin@amd.com>
2348 * output.h (graphite_out_file, graphite_in_file): Declared.
2349 * toplev.c (graphite_out_file, graphite_in_file): New.
2350 (init_asm_output): Initialize graphite_in_file and graphite_out_file.
2351 * graphite-clast-to-gimple.c (build_cloog_prog): Read PBB_SCATTERING.
2352 Don't call schedule_to_scattering.
2353 * common.opt (fgraphite-write, fgraphite-read): New.
2354 * graphite-poly.c: Include output.h.
2355 (print_scattering_function, print_scattering_functions,
2356 debug_scattering_function, debug_scattering_functions,
2357 graphite_write_transforms, graphite_read_transforms,
2358 graphite_generate_scattering_fns): New.
2359 (apply_poly_transforms): Do not apply transform if flag_graphite_read.
2360 Call graphite_generate_scattering_fns, graphite_write_transforms,
2361 graphite_read_transforms.
2362 (new_poly_bb): Initialize PBB_SCATTERING.
2363 (free_poly_bb): Free PBB_SCATTERING.
2364 (schedule_to_scattering): Does not return, initialize PBB_SCATTERING.
2365 * graphite-poly.h (struct poly_bb): Add field scattering.
2366 (PBB_SCATTERING): New.
2367 (print_scattering_function, print_scattering_functions,
2368 debug_scattering_function, debug_scattering_functions): Declared.
2369 * graphite-ppl.c (cloog_matrix_to_ppl_constraint): Matrices contain
2370 GMP values, not integers!
2371 (ppl_print_polyhedron_matrix, debug_ppl_polyhedron_matrix,
2372 ppl_read_polyhedron_matrix): New.
2373 * graphite-ppl.h (ppl_print_polyhedron_matrix,
2374 debug_ppl_polyhedron_matrix,
2375 ppl_read_polyhedron_matrix): Declared.
2376 * Makefile.in (graphite-poly.o): Depends on output.h.
2378 2009-02-23 Sebastian Pop <sebastian.pop@amd.com>
2379 Tobias Grosser <grosser@fim.uni-passau.de>
2382 * graphite-scop-detection.c (stmt_simple_for_scop_p): Analyze
2383 scalar evolutions in the scop_entry->loop_father.
2385 2009-02-23 Sebastian Pop <sebastian.pop@amd.com>
2386 Tobias Grosser <grosser@fim.uni-passau.de>
2388 * graphite.h (ref_nb_loops): Remove declaration.
2389 (struct gimple_bb, gimple_bb_p, GBB_BB, GBB_DATA_REFS, GBB_CONDITIONS,
2390 GBB_CONDITION_CASES, GBB_CLOOG_IV_TYPES, gbb_loop, print_gimple_bb,
2391 debug_gbb): Moved to sese.h.
2394 2009-02-23 Sebastian Pop <sebastian.pop@amd.com>
2395 Tobias Grosser <grosser@fim.uni-passau.de>
2397 * graphite-data-ref.[ch]: Disable.
2399 2009-02-23 Sebastian Pop <sebastian.pop@amd.com>
2400 Tobias Grosser <grosser@fim.uni-passau.de>
2402 * graphite-scop-detection.c (stmt_simple_for_scop_p): Analyze
2403 scalar evolutions in the scop_entry->loop_father.
2405 2009-02-23 Sebastian Pop <sebastian.pop@amd.com>
2407 * graphite-scop-detection.c (nb_reductions_in_loop): Moved here...
2408 (graphite_cannot_represent_loop_niter): Renamed
2409 graphite_cannot_represent_loop. Call nb_reductions_in_loop.
2410 (limit_scops): build_sese_loop_nests does not return a bool.
2411 * graphite-scop-detection.h (nb_reductions_in_loop): Declared.
2412 * sese.c (nb_reductions_in_loop): ... from here.
2413 (graphite_loop_normal_form): ... from here.
2414 (sese_record_loop): Does not fail, so does not return a bool.
2415 (build_sese_loop_nests): Same.
2416 * sese.h (build_sese_loop_nests): Update declaration.
2417 * graphite-clast-to-gimple.c (graphite_loop_normal_form): Moved here...
2418 (build_graphite_loop_normal_form): New.
2419 (gloog): Call build_graphite_loop_normal_form.
2420 * graphite-sese-to-poly.c (build_poly_scop): Don't fail on
2421 build_sese_loop_nests.
2423 * testsuite/gcc.dg/graphite/id-1.c: New.
2425 2009-02-23 Sebastian Pop <sebastian.pop@amd.com>
2426 Tobias Grosser <grosser@fim.uni-passau.de>
2428 * graphite-sese-to-poly.c (scan_tree_for_params): Remove REAL_CST.
2429 The SCoP detection fix is sufficient.
2431 2009-02-21 Sebastian Pop <sebastian.pop@amd.com>
2433 PR tree-optimization/39260
2434 * graphite-scop-detection.c (harmful_stmt_in_bb): Stop a SCoP when
2435 the basic block contains a condition with a real type.
2436 * graphite-sese-to-poly.c (scan_tree_for_params): Handle REAL_CST.
2438 * gcc.dg/graphite/pr39260.c: New.
2440 2009-02-21 Sebastian Pop <sebastian.pop@amd.com>
2442 * graphite-poly.c: Inlcude params.h.
2443 (graphite_trans_loop_block): Use PARAM_LOOP_BLOCK_TILE_SIZE for
2445 * Makefile.in (graphite-poly.o): Depend on PARAMS_H.
2446 * params.def (PARAM_LOOP_BLOCK_TILE_SIZE): Define.
2448 2009-02-20 Sebastian Pop <sebastian.pop@amd.com>
2449 Tobias Grosser <grosser@fim.uni-passau.de>
2451 * graphite-scop-detection.c (dot_all_scops_1,
2452 dot_all_scops): Moved here.
2453 * graphite-scop-detection.h (dot_all_scops): Declared here.
2454 * graphite.c (graphite_initialize, graphite_finalize): New.
2455 (graphite_transform_loops): Cleaned up.
2456 * sese.c (debug_oldivs): Moved here.
2457 * graphite-poly.c (graphite_apply_transformations): Renamed
2458 apply_poly_transforms.
2459 (debug_loop_vec): Moved here.
2460 * graphite-sese-to-poly.c (build_bb_loops, build_sese_conditions_1,
2461 scop_contains_non_iv_scalar_phi_nodes, build_sese_conditions,
2462 find_scop_parameters, build_scop_iteration_domain,
2463 add_conditions_to_constraints, build_scop_canonical_schedules,
2464 build_scop_data_accesses): Now static.
2465 (build_poly_scop, check_poly_representation): New.
2467 2009-02-20 Sebastian Pop <sebastian.pop@amd.com>
2469 * graphite.c (graphite_stmt_p, new_gimple_bb, free_gimple_bb,
2470 remove_gbbs_in_scop, free_scops, try_generate_gimple_bb,
2471 build_scop_bbs, ref_nb_loops, compare_prefix_loops,
2472 build_scop_canonical_schedules, build_bb_loops, add_value_to_dim,
2473 scan_tree_for_params_right_scev, scan_tree_for_params_int,
2474 scan_tree_for_params, struct irp_data, dx_record_params,
2475 find_params_in_bb, find_scop_parameters, gbb_from_bb,
2476 build_loop_iteration_domains, add_conditions_to_domain,
2477 phi_node_is_iv, bb_contains_non_iv_scalar_phi_nodes,
2478 scop_contains_non_iv_scalar_phi_nodes, build_sese_conditions_1,
2479 build_sese_conditions, add_conditions_to_constraints,
2480 build_scop_iteration_domain, build_access_matrix_with_af,
2481 build_access_matrix,
2482 build_scop_data_accesses): Moved to graphite-sese-to-poly.c.
2484 * graphite-sese-to-poly.c: New.
2485 * graphite-sese-to-poly.h: New.
2487 * Makefile.in: Add new rule for graphite-sese-to-poly.o.
2489 2009-02-20 Sebastian Pop <sebastian.pop@amd.com>
2491 * graphite.c: Split graphite code generation to a new file.
2492 (graphite_verify, gmp_cst_to_tree, clast_name_to_gcc,
2493 max_precision_type, clast_to_gcc_expression_red,
2494 clast_to_gcc_expression, gcc_type_for_clast_expr,
2495 gcc_type_for_clast_eq, loop_iv_stack_patch_for_consts,
2496 graphite_translate_clast_equation, graphite_create_guard_cond_expr,
2497 graphite_create_new_guard, clast_get_body_of_loop,
2498 gcc_type_for_cloog_iv, gcc_type_for_iv_of_clast_loop,
2499 graphite_create_new_loop, build_iv_mapping, copy_renames,
2500 translate_clast, find_cloog_iv_in_expr, compute_cloog_iv_types_1,
2501 compute_cloog_iv_types, free_scattering, save_var_name,
2502 initialize_cloog_names, build_scop_context, build_cloog_prog,
2503 set_cloog_options, debug_clast_stmt, scop_to_clast,
2504 print_generated_program, debug_generated_program,
2505 gloog): Moved to graphite-clast-to-gimple.c.
2507 (struct cloog_prog_clast): Moved to graphite-clast-to-gimple.h.
2509 (iv_stack_entry_is_constant, iv_stack_entry_is_iv,
2510 loop_iv_stack_push_iv, loop_iv_stack_insert_constant,
2511 loop_iv_stack_pop, loop_iv_stack_get_iv,
2512 loop_iv_stack_get_iv_from_name, debug_loop_iv_stack,
2513 free_loop_iv_stack, loop_iv_stack_remove_constants,
2514 debug_rename_elt, debug_rename_map_1, debug_rename_map,
2515 rename_map_elt_info, eq_rename_map_elts, debug_ivtype_elt,
2516 debug_ivtype_map_1, debug_ivtype_map, ivtype_map_elt_info,
2517 eq_ivtype_map_elts, sese_add_exit_phis_edge,
2518 sese_add_exit_phis_var, sese_insert_phis_for_liveouts,
2519 get_vdef_before_sese, sese_adjust_vphi,
2520 get_new_name_from_old_name, sese_adjust_phis_for_liveouts,
2521 oldiv_for_loop, rename_variables_in_stmt, is_parameter,
2522 is_iv, expand_scalar_variables_ssa_name,
2523 expand_scalar_variables_expr, expand_scalar_variables_stmt,
2524 expand_scalar_variables, rename_variables, remove_condition,
2525 get_true_edge_from_guard_bb, get_false_edge_from_guard_bb,
2526 add_loop_exit_phis, insert_loop_close_phis, struct igp,
2527 default_liveout_before_guard, add_guard_exit_phis,
2528 insert_guard_phis, register_old_and_new_names,
2529 graphite_copy_stmts_from_block, register_sese_liveout_renames,
2530 copy_bb_and_scalar_dependences, outermost_loop_in_sese,
2531 if_region_set_false_region, create_if_region_on_edge,
2532 move_sese_in_condition): Moved to sese.c.
2534 (nb_loops_around_loop_in_sese, struct ifsese, if_region_entry,
2535 if_region_exit, if_region_get_condition_block,
2536 struct rename_map_elt, new_rename_map_elt, enum iv_stack_entry_kind,
2537 union iv_stack_entry_data_union, struct iv_stack_entry_struct,
2538 iv_stack_entry_p, loop_iv_stack, struct ivtype_map_elt,
2539 ivtype_map_elt, new_ivtype_map_elt,
2540 recompute_all_dominators): Moved to sese.h.
2542 * graphite-clast-to-gimple.c: New.
2543 * graphite-clast-to-gimple.h: New.
2544 * Makefile.in: Add new rule for graphite-clast-to-gimple.o.
2545 * sese.c: Modified as said above.
2548 2009-02-20 Sebastian Pop <sebastian.pop@amd.com>
2550 * graphite.c: Split scop detection to a new file.
2551 (enum gbb_type, gbb_type, get_bb_type, struct sd_region_p, sd_region,
2552 move_sd_regions, loop_affine_expr, exclude_component_ref,
2553 is_simple_operand, stmt_simple_for_scop_p, harmful_stmt_in_bb,
2554 graphite_cannot_represent_loop_niter, struct scopdet_info,
2555 scopdet_basic_block_info, build_scops_1, bb_in_sd_region,
2556 find_single_entry_edge, find_single_exit_edge,
2557 create_single_entry_edge, sd_region_without_exit,
2558 create_single_exit_edge, unmark_exit_edges, mark_exit_edges,
2559 create_sese_edges, build_graphite_scops, limit_scops, build_scops):
2560 Moved to graphite-scop-detection.c.
2562 * graphite-scop-detection.c: New.
2563 * graphite-scop-detection.h: New.
2564 * Makefile.in: Add new rule for graphite-scop-detection.o.
2566 * sese.c: Include tree-chrec.h, tree-data-ref.h, and
2567 tree-scalar-evolution.h.
2568 (nb_reductions_in_loop, graphite_loop_normal_form, sese_record_loop,
2569 build_sese_loop_nests): Moved here from graphite.c.
2570 (param_index): Renamed parameter_index_in_region.
2572 2009-02-18 Tobias Grosser <grosser@fim.uni-passau.de>
2573 Sebastian Pop <sebastian.pop@amd.com>
2575 * gcc.dg/graphite/block-0.c: Expected to fail now.
2576 * gcc.dg/graphite/block-1.c: Same.
2577 * gcc.dg/graphite/block-5.c: Same.
2578 * gcc.dg/graphite/block-6.c: Same.
2580 2009-02-18 Tobias Grosser <grosser@fim.uni-passau.de>
2581 Sebastian Pop <sebastian.pop@amd.com>
2583 * graphite.h: Separate from graphite_bb_p the polyhedral
2584 representation in poly_bb_p and the GCC specifics in gimple_bb_p.
2585 (struct data_dependence_polyhedron, RDGE_DDP, ddp_p): Moved to
2586 graphite-data-ref.h.
2587 (struct poly_bb, PBB_SCOP, PBB_STATIC_SCHEDULE, PBB_DOMAIN,
2588 PBB_BLACK_BOX, PBB_LOOPS, pbb_nb_loops, pbb_loop_at_index,
2589 pbb_loop_index, struct scop, SCOP_BBS, SCOP_REGION, SCOP_ENTRY,
2590 SCOP_EXIT, SCOP_REGION_BBS, SCOP_DEP_GRAPH, SCOP_PARAMS,
2591 SCOP_LOOP_NEST, SCOP_PARAMS, SCOP_OLDIVS, SCOP_LIVEOUT_RENAMES,
2592 scop_nb_params): Moved to graphite-poly.h.
2593 * graphite-data-ref.c: Same.
2594 * graphite-data-ref.h: New.
2596 (pbb_compare, graphite_sort_pbbs, graphite_trans_bb_move_loop,
2597 graphite_trans_bb_strip_mine, strip_mine_profitable_p,
2598 is_interchange_valid, graphite_trans_bb_block,
2599 graphite_trans_loop_block, scop_max_loop_depth,
2600 graphite_trans_scop_block, graphite_apply_transformations,
2601 new_poly_bb, free_poly_bb, new_scop, free_scop): Moved to
2603 * graphite-poly.h: New.
2604 * graphite-poly.c: New.
2605 * Makefile.in (OBJS-common): Add graphite-poly.o.
2606 (graphite-poly.o): New rule.
2607 * tree-data-ref.h (struct data_reference): Remove unused scop field.
2610 2009-02-18 Sebastian Pop <sebastian.pop@amd.com>
2611 Tobias Grosser <grosser@fim.uni-passau.de>
2613 * graphite.c: Replace gb -> gbb.
2615 * graphite-data-ref.c: Same.
2617 2009-02-18 Sebastian Pop <sebastian.pop@amd.com>
2618 Tobias Grosser <grosser@fim.uni-passau.de>
2620 * Makefile.in (OBJS-commmon): Add sese.o.
2622 (graphite.o): Add sese.h.
2623 * graphite.c (bb_in_ss_p, loop_in_sese_p,
2624 sese_build_livein_liveouts_use, sese_build_livein_liveouts_bb,
2625 sese_build_livein_liveouts, register_bb_in_sese, new_sese, free_sese):
2627 (block_before_scop): Add missing return.
2628 (new_scop, free_scop): Remove SESE data structures.
2629 (scop_record_loop, scan_tree_for_params, find_params_in_bb,
2630 find_scop_parameters, build_loop_iteration_domains,
2631 add_conditions_to_domain, register_scop_liveout_renames,
2632 copy_bb_and_scalar_dependences): Scop -> SESE.
2634 (add_conditions_to_domain): SCoP -> SESE and remove check
2635 (scop_contains_non_iv_scalar_phi_nodes): New.
2636 (build_scop_conditions_1, build_scop_conditions): Remove check for
2637 non iv scalar phi nodes.
2638 (print_scop_statistics): New.
2639 (graphite_transform_loops): Cleanup.
2641 * graphite.h: Move to sese & cleanup.
2645 2009-02-16 Sebastian Pop <sebastian.pop@amd.com>
2646 Tobias Grosser <grosser@fim.uni-passau.de>
2648 * graphite.c (build_scop_conditions_1): Conditions are only
2649 at the end of a basic block.
2651 2009-02-16 Sebastian Pop <sebastian.pop@amd.com>
2652 Tobias Grosser <grosser@fim.uni-passau>
2654 * graphite.h (struct graphite_bb): Remove compressed_alpha_matrix
2656 (GBB_ALPHA): Removed.
2658 2009-02-16 Sebastian Pop <sebastian.pop@amd.com>
2659 Tobias Grosser <grosser@fim.uni-passau.de>
2661 * graphite-data-ref.c (graphite_test_dependence): Don't use
2662 GBB_DYNAMIC_SCHEDULE.
2663 * graphite.c (new_graphite_bb): Same.
2664 (free_graphite_bb): Same.
2665 (build_scop_dynamic_schedules): Removed.
2666 (graphite_transform_loops): Don't call it.
2667 * graphite.h (struct graphite_bb): Remove dynamic_schedule field.
2668 (GBB_DYNAMIC_SCHEDULE): Removed.
2670 2009-02-16 Sebastian Pop <sebastian.pop@amd.com>
2671 Tobias Grosser <grosser@fim.uni-passau.de>
2673 * graphite.c (schedule_to_scattering): Don't use CloogMatrix.
2674 (print_graphite_bb): Same.
2675 (build_cloog_prog): Same.
2677 2009-02-16 Sebastian Pop <sebastian.pop@amd.com>
2678 Tobias Grosser <grosser@fim.uni-passau.de>
2680 * graphite.c (build_cloog_prog): Don't use CloogMatrix.
2682 2009-02-16 Sebastian Pop <sebastian.pop@amd.com>
2683 Tobias Grosser <grosser@fim.uni-passau.de>
2685 * graphite.c (build_scop_context): Don't use CloogMatrix.
2686 * graphite-ppl.c (new_Cloog_Domain_from_ppl_Polyhedron): New.
2687 * graphite-ppl.h (new_Cloog_Domain_from_ppl_Polyhedron): Declared.
2689 2009-02-16 Sebastian Pop <sebastian.pop@amd.com>
2690 Tobias Grosser <grosser@fim.uni-passau.de>
2692 * graphite.h (struct scop): Move params, old_ivs, loops, loop_nest,
2693 liveout_renames, add_params fields...
2694 (struct sese): ... here.
2695 (SESE_PARAMS, SESE_LOOPS, SESE_LOOP_NEST, SESE_ADD_PARAMS,
2696 SESE_PARAMS, SESE_OLDIVS, SESE_LIVEOUT_RENAMES): New.
2698 2009-02-16 Sebastian Pop <sebastian.pop@amd.com>
2699 Tobias Grosser <grosser@fim.uni-passau.de>
2701 * graphite.c (print_scop): Do not print the CLooG program.
2702 (new_scop, free_scop, initialize_cloog_names, build_scop_context,
2703 build_cloog_prog, gloog): Don't use SCOP_PROG.
2704 (find_transform): Renamed scop_to_clast.
2705 (print_generated_program, debug_generated_program): New.
2706 (graphite_transform_loops): Adapt to new interface.
2707 * graphite.h (struct scop): Remove program field.
2708 (SCOP_PROG): Removed.
2709 (print_generated_program, debug_generated_program): Declared.
2711 2009-02-16 Sebastian Pop <sebastian.pop@amd.com>
2713 * graphite-data-ref.c (schedule_precedes_p, schedule_same_p): New.
2714 (statement_precedes_p): Use schedule_same_p and schedule_precedes_p.
2715 * graphite.c (gbb_compare, schedule_to_scattering, print_graphite_bb,
2716 free_graphite_bb, build_scop_canonical_schedules,
2717 graphite_trans_bb_strip_mine, graphite_trans_scop_block): Static
2718 schedules are now represented using a ppl_Linear_Expression_t.
2719 * graphite.h (struct graphite_bb): Same.
2720 * graphite-ppl.c (ppl_lexico_compare_linear_expressions): New.
2721 * graphite-ppl.h (ppl_lexico_compare_linear_expressions): Declared.
2723 2009-02-15 Sebastian Pop <sebastian.pop@amd.com>
2725 * graphite.c: Free local memory.
2726 * graphite-ppl.c: Same.
2728 2009-02-15 Sebastian Pop <sebastian.pop@amd.com>
2730 * graphite.c (const_column_index, get_first_matching_sign_row_index,
2731 get_lower_bound_row, get_upper_bound_row, copy_constraint,
2732 swap_constraint_variables, scale_constraint_variable): Removed.
2733 (graphite_trans_bb_strip_mine): Remove pong.
2734 * graphite-ppl.c: Include missing header files.
2735 (set_inhomogeneous, set_coef, shift_poly, ppl_strip_loop): New.
2736 * graphite-ppl.h (ppl_strip_loop): Declared.
2737 * Makefile.in (graphite-ppl.o): Adjust dependences.
2739 2009-02-14 Sebastian Pop <sebastian.pop@amd.com>
2741 * graphite.c (build_loop_iteration_domains): Remove ping pong.
2742 (build_scop_iteration_domain): Same.
2744 2009-02-13 Sebastian Pop <sebastian.pop@amd.com>
2746 * graphite.c (scan_tree_for_params, add_conditions_to_domain): Remove
2748 (add_value_to_dim, scan_tree_for_params_right_scev,
2749 scan_tree_for_params_int): New.
2750 * graphite-ppl.c (oppose_constraint): New.
2751 (insert_constraint_into_matrix): Implement missing cases.
2752 * graphite-ppl.h (insert_constraint_into_matrix): Declared.
2754 2009-02-13 Sebastian Pop <sebastian.pop@amd.com>
2756 * graphite.c (graphite_trans_bb_move_loop): Remove ping pong,
2757 use ppl_move_dimension.
2759 2009-02-12 Sebastian Pop <sebastian.pop@amd.com>
2761 * graphite-data-ref.c: Domains are now ppl_Polyhedra_t.
2764 * graphite-ppl.c: Same.
2765 * graphite-ppl.h: Same.
2767 2009-02-12 Sebastian Pop <sebastian.pop@amd.com>
2769 Revert last 3 commits.
2771 2009-02-10 Sebastian Pop <sebastian.pop@amd.com>
2773 * graphite.c (scan_tree_for_params, add_conditions_to_domain): Remove
2775 (add_value_to_dim, scan_tree_for_params_right_scev,
2776 scan_tree_for_params_int): New.
2777 * graphite-ppl.c (oppose_constraint): New.
2778 (insert_constraint_into_matrix): Implement missing cases.
2779 * graphite-ppl.h (insert_constraint_into_matrix): Declared.
2781 2009-02-10 Sebastian Pop <sebastian.pop@amd.com>
2783 * graphite.c (graphite_trans_bb_move_loop): Remove unused variables.
2785 2009-02-10 Sebastian Pop <sebastian.pop@amd.com>
2786 Tobias Grosser <grosser@fim.uni-passau.de>
2788 * graphite.c (graphite_trans_bb_move_loop): Remove ping pong,
2789 use ppl_move_dimension.
2790 * graphite-ppl.c (ppl_move_dimension): New.
2791 * graphite-ppl.h (ppl_move_dimension): Declared.
2793 2009-02-10 Sebastian Pop <sebastian.pop@amd.com>
2795 * graphite.c: Do not include cloog/cloog.h.
2796 (print_graphite_bb): Remove ping pong, call PPL print function.
2798 2009-02-10 Tobias Grosser <grosser@fim.uni-passau.de>
2800 * Makefile.in (OBJS-common): Add graphite-ppl.o.
2801 (graphite.o): Add dependence on graphite-ppl.h.
2802 (graphite-ppl.o): New.
2803 (graphite-data-ref.c): Ping pong between PPL data structures
2805 * graphite-ppl.c: New.
2806 * graphite-ppl.h: New.
2807 * graphite.c: Include graphite-ppl.h.
2808 (print_graphite_bb, add_conditions_to_domain, build_cloog_prog,
2809 graphite_trans_bb_move_loop, graphite_trans_bb_strip_mine):
2810 Ping pong between PPL data structures and matrices.
2811 (new_graphite_bb): Create a PPL constraint system.
2812 Call ppl_delete_Constraint_System instead of cloog_matrix_free.
2813 (build_loop_iteration_domains): Use PPL functions.
2814 * graphite.h: Include graphite-ppl.h. Fix comments.
2815 (graphite_bb): Use a ppl_Constraint_System_t instead of
2816 CloogMatrix for representing the domain.
2817 (scop): Remove static_schedule.
2818 (gbb_nb_loops): Ping pong between PPL data structures and matrices.
2820 2009-02-06 Sebastian Pop <sebastian.pop@amd.com>
2822 * graphite.c: Fix some comments.
2824 2009-02-05 Sebastian Pop <sebastian.pop@amd.com>
2827 * graphite.c (if_region_set_false_region): After moving a region
2828 in the false branch of a condition, remove the empty dummy
2830 (gloog): Remove wrong fix for PR38953.
2832 2009-02-03 Tobias Grosser <grosser@fim.uni-passau.de>
2834 * graphite.c (bb_in_sese_p, sese_build_livein_liveouts_use,
2835 sese_build_livein_liveouts_bb, sese_build_livein_liveouts,
2836 register_bb_in_sese, new_sese, free_sese): Moved.
2837 (dot_scop_1, build_scop_loop_nests, build_loop_iteration_domains,
2838 outermost_loop_in_scop, build_scop_iteration_domain,
2839 expand_scalar_variables_ssa_name, get_vdef_before_scop,
2840 limit_scops): Use bb_in_sese_p instead of bb_in_scop_p.
2841 Use loop_in_sese_p instead of loop_in_scop_p.
2842 (new_graphite_bb, new_scop, gloog): Do not initialize SCOP_BBS_B.
2843 (free_scop): Do not free SCOP_BBS_B.
2844 (nb_loops_around_loop_in_scop, nb_loops_around_gb,
2845 ref_nb_loops): Moved here...
2846 * graphite.h (ref_nb_loops): ... from here.
2847 (struct scop): Remove bbs_b bitmap.
2848 (SCOP_BBS_B, bb_in_scop_p, loop_in_scop_p): Removed.
2849 * testsuite/gcc.dg/graphite/scop-19.c: New
2851 2009-02-03 Tobias Grosser <grosser@fim.uni-passau.de>
2853 * graphite.c (scopdet_basic_block_info): Fix bug in scop
2856 2009-01-30 Tobias Grosser <grosser@fim.uni-passau.de>
2858 * graphite.c (new_loop_to_cloog_loop_str, hash_loop_to_cloog_loop,
2859 eq_loop_to_cloog_loop): Remove.
2860 (new_scop, free_scop): Remove SCOP_LOOP2CLOOG_LOOP.
2861 * graphite.h (struct scop): Remove loop2cloog_loop.
2862 (loop_domain_dim, loop_iteration_vector_dim): Remove.
2864 2009-01-30 Tobias Grosser <grosser@fim.uni-passau.de>
2866 * opts.c (decode_options): Only add graphite options to O2
2867 if we compile with graphite enabled.
2869 2009-01-26 Sebastian Pop <sebastian.pop@amd.com>
2871 * Merge from mainline (r143163:143684).
2873 2009-01-26 Sebastian Pop <sebastian.pop@amd.com>
2875 * graphite.c (debug_value): Removed.
2876 * graphite.h (debug_value): Removed.
2878 2009-01-23 Sebastian Pop <sebastian.pop@amd.com>
2880 * passes.c (init_optimization_passes): Do not call pass_copy_prop
2881 after graphite: pass_copy_prop does not maintain a proper loop closed
2882 SSA form. pass_copy_prop should be fixed.
2884 2009-01-23 Sebastian Pop <sebastian.pop@amd.com>
2886 * graphite.c (scop_adjust_phis_for_liveouts): Fix warning.
2888 2009-01-23 Sebastian Pop <sebastian.pop@amd.com>
2890 * graphite.c (graphite_verify): Add a call to verify_loop_closed_ssa.
2891 (gloog): Split the exit of the scop when the scop exit is a loop exit.
2892 (graphite_transform_loops): Only call cleanup_tree_cfg if gloog
2895 2009-01-20 Sebastian Pop <sebastian.pop@amd.com>
2897 * graphite.c (gloog): Return true when code gen succeeded.
2898 (graphite_transform_loops): Do not call cleanup_tree_cfg if
2899 the code of the function did not changed. After cleanup_tree_cfg
2900 call rewrite_into_loop_closed_ssa to maintain the loop closed ssa
2903 2009-01-19 Sebastian Pop <sebastian.pop@amd.com>
2905 * graphite.c (stmt_simple_for_scop_p): Also handle cases when
2906 gimple_call_lhs is NULL.
2908 2009-01-16 Sebastian Pop <sebastian.pop@amd.com>
2909 Tobias Grosser <tobi.grosser@amd.com>
2911 * graphite.c (graphite_trans_scop_block): Do not block single
2914 2009-01-15 Sebastian Pop <sebastian.pop@amd.com>
2915 Tobias Grosser <tobi.grosser@amd.com>
2917 * graphite.c (build_scop_canonical_schedules): Start schedules at
2920 2009-01-15 Sebastian Pop <sebastian.pop@amd.com>
2921 Tobias Grosser <tobi.grosser@amd.com>
2923 * graphite.c (compare_prefix_loops): New.
2924 (build_scop_canonical_schedules): Rewritten.
2925 (graphite_transform_loops): Move build_scop_canonical_schedules
2926 after build_scop_iteration_domain.
2928 2009-01-14 Sebastian Pop <sebastian.pop@amd.com>
2929 Tobias Grosser <tobi.grosser@amd.com>
2931 * graphite.c (add_conditions_to_domain): Add the loops to
2932 the dimension of the iteration domain. Do copy the domain
2933 only when it exists.
2934 (build_scop_conditions_1): Do not call add_conditions_to_domain.
2935 (add_conditions_to_constraints): New.
2936 (can_generate_code_stmt, can_generate_code): Removed.
2937 (gloog): Do not call can_generate_code.
2938 (graphite_transform_loops): Call add_conditions_to_constraints
2939 after building the iteration domain.
2941 2009-01-14 Sebastian Pop <sebastian.pop@amd.com>
2942 Tobias Grosser <tobi.grosser@amd.com>
2943 Jan Sjodin <jan.sjodin@amd.com>
2945 * graphite.c (scan_tree_for_params): On substractions negate
2946 all the coefficients of the term.
2947 (clast_to_gcc_expression_red): New. Handle reduction expressions
2948 of more than two operands.
2949 (clast_to_gcc_expression): Call clast_to_gcc_expression_red.
2950 (get_vdef_before_scop): Handle also the case of default definitions.
2952 2009-01-14 Sebastian Pop <sebastian.pop@amd.com>
2955 * graphite.c (get_vdef_before_scop, scop_adjust_vphi): New.
2956 (scop_adjust_phis_for_liveouts): Call scop_adjust_vphi.
2957 (gloog): Do not call cleanup_tree_cfg.
2958 (graphite_transform_loops): Call cleanup_tree_cfg after all
2959 scops have been code generated.
2961 2009-01-13 Sebastian Pop <sebastian.pop@amd.com>
2963 * passes.c (init_optimization_passes): Schedule after
2964 graphite transforms pass_copy_prop, pass_dce_loop and pass_lim.
2966 2009-01-13 Sebastian Pop <sebastian.pop@amd.com>
2968 * graphite.c (expand_scalar_variables_stmt): Do not pass loop_p.
2970 (expand_scalar_variables_ssa_name): Do not pass loop_p. Fix comment.
2971 Set the type of an expression to the type of its assign statement.
2972 (expand_scalar_variables_expr): Do not pass loop_p.
2973 Fix comment. Stop recursion on tcc_constant or tcc_declaration.
2974 (copy_bb_and_scalar_dependences): Do not pass loop_p.
2975 (translate_clast): Update call to copy_bb_and_scalar_dependences.
2977 2009-01-11 Sebastian Pop <sebastian.pop@amd.com>
2979 * graphite.c (expand_scalar_variables_ssa_name): Set the type of
2980 an expression to the gimple_expr_type of its assign statement.
2981 (expand_scalar_variables_expr): Stop recursion on tcc_constant
2984 2009-01-11 Sebastian Pop <sebastian.pop@amd.com>
2986 PR tree-optimization/38786
2987 * testsuite/gcc.dg/graphite/pr38786.c: New.
2988 * graphite.c (expand_scalar_variables_ssa_name): New, outlined from
2989 the SSA_NAME case of expand_scalar_variables_expr.
2990 (expand_scalar_variables_expr): Also gather the scalar computation
2991 used to index the memory access.
2992 (expand_scalar_variables_stmt): Pass to expand_scalar_variables_expr
2993 the gimple_stmt_iterator where it inserts new code.
2995 2009-01-10 Sebastian Pop <sebastian.pop@amd.com>
2997 * testsuite/gcc.dg/graphite/block-3.c: Fix compile error on 32bit.
2999 2009-01-10 Sebastian Pop <sebastian.pop@amd.com>
3001 * opts.c (decode_options): Enable flag_graphite_identity and
3002 flag_loop_block in -O2 and above.
3004 2009-01-08 Sebastian Pop <sebastian.pop@amd.com>
3006 * libjava/classpath/lib/gnu/java/awt/peer/gtk/GtkMouseInfoPeer.class:
3007 Fix merge problem: replace with the file from trunk.
3009 2009-01-08 Sebastian Pop <sebastian.pop@amd.com>
3011 * Merge from mainline (r141727:143163).
3013 2009-01-07 Sebastian Pop <sebastian.pop@amd.com>
3014 Jan Sjodin <jan.sjodin@amd.com>
3016 PR tree-optimization/38559
3017 * testsuite/gcc.dg/graphite/pr38559.c: New.
3019 * graphite.c (debug_value, copy_constraint,
3020 swap_constraint_variables, scale_constraint_variable, ): New.
3021 (get_lower_bound, get_upper_bound): Removed.
3022 (graphite_trans_bb_strip_mine): Clean up this code that works
3023 only for constant number of iterations. Fully copy upper and
3024 lower bound constraints, not only the constant part of them.
3025 * graphite.h (debug_value): Declared.
3027 2009-01-06 Jan Sjodin <jan.sjodin@amd.com>
3029 PR tree-optimization/38492
3030 PR tree-optimization/38498
3031 * tree-check.c (operator_is_linear, scev_is_linear_expression): New.
3032 * tree-chrec.h (scev_is_linear_expression): Declared.
3033 * graphite.c (graphite_cannot_represent_loop_niter): New.
3034 (scopdet_basic_block_info): Call graphite_cannot_represent_loop_niter.
3035 (graphite_loop_normal_form): Use gcc_assert.
3036 (scan_tree_for_params): Use CASE_CONVERT.
3037 (phi_node_is_iv, bb_contains_non_iv_scalar_phi_nodes): New.
3038 (build_scop_conditions_1): Call bb_contains_non_iv_scalar_phi_nodes.
3039 Use gcc_assert. Discard scops that contain unhandled cases.
3040 (build_scop_conditions): Return a boolean status for unhandled cases.
3041 (strip_mine_profitable_p): Print the loop number, not its depth.
3042 (is_interchange_valid): Pass the depth of the loop nest, don't
3043 recompute it wrongly.
3044 (graphite_trans_bb_block): Same.
3045 (graphite_trans_bb_block): Print tentative of loop blocking.
3046 (graphite_trans_scop_block): Do not print that the loop has been
3048 (graphite_transform_loops): Do not handle scops that contain condition
3051 * testsuite/gcc.dg/graphite/pr38500.c: Fixed warning as committed
3053 * testsuite/gcc.dg/graphite/block-0.c: Update test.
3054 * testsuite/gcc.dg/graphite/block-1.c: Same.
3055 * testsuite/gcc.dg/graphite/block-2.c: Remove xfail and test for
3057 * testsuite/gcc.dg/graphite/block-4.c: Remove test for strip mine.
3058 * testsuite/gcc.dg/graphite/block-3.c: New.
3059 * testsuite/gcc.dg/graphite/pr38498.c: New.
3061 2008-12-22 Harsha Jagasia <harsha.jagasia@amd.com>
3063 PR tree-optimization/38510
3064 * gcc.dg/graphite/pr38510.c: New.
3065 * graphite.c (recompute_all_dominators): Call mark_irreducible_loops.
3066 (translate_clast): Call recompute_all_dominators before
3068 (gloog): Call recompute_all_dominators before graphite_verify.
3070 2008-12-12 Sebastian Pop <sebastian.pop@amd.com>
3072 PR tree-optimization/38492
3073 * graphite.c (rename_map_elt, debug_rename_elt,
3074 debug_rename_map_1, debug_rename_map, new_rename_map_elt,
3075 rename_map_elt_info, eq_rename_map_elts,
3076 get_new_name_from_old_name, bb_in_sese_p): Moved around.
3077 (sese_find_uses_to_rename_use): Renamed sese_build_livein_liveouts_use.
3078 (sese_find_uses_to_rename_bb): Renamed sese_build_livein_liveouts_bb.
3079 (sese_build_livein_liveouts): New.
3080 (new_sese, free_sese): New.
3081 (new_scop): Call new_sese.
3082 (free_scop): Call free_sese.
3083 (rename_variables_from_edge, rename_phis_end_scop): Removed.
3084 (register_old_new_names): Renamed register_old_and_new_names.
3085 (register_scop_liveout_renames, add_loop_exit_phis,
3086 insert_loop_close_phis, struct igp,
3087 default_liveout_before_guard, add_guard_exit_phis,
3088 insert_guard_phis, copy_renames): New.
3089 (translate_clast): Call insert_loop_close_phis and insert_guard_phis.
3090 (sese_add_exit_phis_edge): Renamed scop_add_exit_phis_edge.
3091 (rewrite_into_sese_closed_ssa): Renamed scop_insert_phis_for_liveouts.
3092 (scop_adjust_phis_for_liveouts): New.
3093 (gloog): Call scop_adjust_phis_for_liveouts.
3095 * graphite.h (struct sese): Documented. Added fields liveout,
3097 (SESE_LIVEOUT, SESE_LIVEIN, SESE_LIVEIN_VER, SESE_NUM_VER): New.
3098 (new_sese, free_sese, sese_build_livein_liveouts): Declared.
3099 (struct scop): Added field liveout_renames.
3100 (SCOP_LIVEOUT_RENAMES): New.
3102 2008-12-11 Sebastian Pop <sebastian.pop@amd.com>
3104 PR tree-optimization/38409
3105 * gcc.dg/graphite/pr38409.c: New.
3106 * graphite.c (nb_reductions_in_loop): Use simple_iv.
3108 2008-12-11 Sebastian Pop <sebastian.pop@amd.com>
3110 * graphite.c (gcc_type_for_cloog_iv): By default return
3112 (graphite_create_new_loop): Don't fold_convert the already
3113 fold_convert-ed expression.
3115 2008-12-11 Harsha Jagasia <harsha.jagasia@amd.com>
3117 PR tree-optimization/38446
3118 * gcc.dg/graphite/pr38446.c: New.
3119 * graphite.c (register_bb_in_sese): New.
3120 (bb_in_sese_p): Check if bb belongs to sese region by explicitly
3121 looking at the bbs in the region.
3122 * graphite.h (sese): Add region_basic_blocks pointer set to
3123 structure and initialize at the time of defining new scop.
3125 2008-12-11 Tobias Grosser <grosser@fim.uni-passau.de>
3127 * graphite.c (new_graphite_bb): Initialize GBB_STATIC_SCHEDULE.
3128 (find_params_in_bb): Do not free data refs.
3129 (free_graphite_bb): Add FIXME on disabled free_data_refs.
3131 2008-12-11 Sebastian Pop <sebastian.pop@amd.com>
3133 * testsuite/gcc.dg/graphite/scop-16.c: Test only scop specific info.
3134 * testsuite/gcc.dg/graphite/scop-17.c: Same.
3135 * testsuite/gcc.dg/graphite/block-5.c: New.
3136 * testsuite/gcc.dg/graphite/block-6.c: New.
3137 * testsuite/gcc.dg/graphite/pr37485.c: Clean dump file after.
3138 * testsuite/gcc.dg/graphite/pr37684.c: Same.
3139 * testsuite/gcc.dg/graphite/block-2.c: Same.
3141 * graphite.c (struct ivtype_map_elt): New.
3142 (debug_ivtype_elt, debug_ivtype_map_1, debug_ivtype_map,
3143 new_ivtype_map_elt, ivtype_map_elt_info, eq_ivtype_map_elts,
3144 gcc_type_for_cloog_iv): New.
3145 (loop_iv_stack_patch_for_consts): Use the type of the induction
3146 variable from the original loop, except for the automatically
3147 generated loops, i.e., in the case of a strip-mined loop, in
3148 which case there is no original loop: in that case just use
3150 (new_graphite_bb): Initialize GBB_CLOOG_IV_TYPES.
3151 (free_graphite_bb): Free GBB_CLOOG_IV_TYPES.
3152 (clast_name_to_gcc): Accept params to be NULL.
3153 (clast_to_gcc_expression): Take an extra parameter for the type.
3154 Convert to that type all the expressions built by this function.
3155 (gcc_type_for_clast_expr, gcc_type_for_clast_eq): New.
3156 (graphite_translate_clast_equation): Compute the type of the
3157 clast_equation before translating its LHS and RHS.
3158 (clast_get_body_of_loop, gcc_type_for_iv_of_clast_loop): New.
3159 (graphite_create_new_loop): Compute the type of the induction
3160 variable before translating the lower and upper bounds and before
3161 creating the induction variable.
3162 (rename_variables_from_edge, rename_phis_end_scop): New.
3163 (copy_bb_and_scalar_dependences): Call rename_phis_end_scop.
3164 (sese_add_exit_phis_edge): Do not use integer_zero_node.
3165 (find_cloog_iv_in_expr, compute_cloog_iv_types_1,
3166 compute_cloog_iv_types): New.
3167 (gloog): Call compute_cloog_iv_types before starting the
3168 translation of the clast.
3170 * graphite.h (struct graphite_bb): New field cloog_iv_types.
3171 (GBB_CLOOG_IV_TYPES): New.
3172 (debug_ivtype_map): Declared.
3173 (oldiv_for_loop): New.
3175 2008-12-10 Tobias Grosser <grosser@fim.uni-passau.de>
3178 * graphite.c (new_scop): Initialize SCOP_ADD_PARAMS.
3179 (param_index): Assert if parameter is not know after parameter
3181 (find_params_in_bb): Detect params directly in GBB_CONDITIONS.
3182 (find_scop_parameters): Mark, that we have finished parameter
3184 (graphite_transform_loops): Move condition detection before parameter
3186 * graphite.h (struct scop): Add SCOP_ADD_PARAMS.
3187 * testsuite/gfortran.dg/graphite/pr38459.f90: New.
3189 2008-12-09 Tobias Grosser <grosser@fim.uni-passau.de>
3191 * graphite.c (graphite_transform_loops): Always call find_transform ()
3192 in ENABLE_CHECKING. So we test these code paths, even if we do not
3195 2008-12-09 Tobias Grosser <grosser@fim.uni-passau.de>
3197 * graphite.c (print_graphite_bb): Fix printing to file != dump_file.
3198 (print_scop): Ditto.
3200 2008-12-08 Tobias Grosser <grosser@fim.uni-passau.de>
3203 Fix testsuite/gfortran.dg/graphite/id-3.f90.
3204 * graphite.c (scopdet_basic_block_info): Fix bug that found some
3205 regions more than once.
3207 2008-12-03 Sebastian Pop <sebastian.pop@amd.com>
3209 Fix testsuite/gfortran.dg/graphite/id-4.f90.
3210 * graphite.c (scan_tree_for_params): Do not compute the multiplicand
3213 2008-12-03 Sebastian Pop <sebastian.pop@amd.com>
3215 Fix testsuite/gfortran.dg/graphite/id-1.f90.
3216 * graphite.c (gmp_cst_to_tree): Pass the type in parameter.
3217 (loop_iv_stack_patch_for_consts): Update use of gmp_cst_to_tree.
3218 (max_precision_type): New.
3219 (value_clast): Removed.
3220 (clast_to_gcc_expression): Be more careful to types of expressions.
3221 Use max_precision_type and update use of gmp_cst_to_tree.
3222 (graphite_translate_clast_equation): Use max_precision_type.
3223 (graphite_create_guard_cond_expr): Do not use integer_type_node,
3224 use the type of the condition.
3225 (graphite_create_new_loop): Do not use integer_type_node, use the
3226 max_precision_type of lb and ub.
3228 2008-12-03 Sebastian Pop <sebastian.pop@amd.com>
3230 * graphite.c (build_scops_1): Initialize open_scop.exit
3233 2008-12-02 Sebastian Pop <sebastian.pop@amd.com>
3235 * testsuite/gcc.dg/graphite/pr38084.c: New.
3236 * testsuite/gfortran.dg/graphite/id-1.f90: New.
3237 * testsuite/gfortran.dg/graphite/id-2.f90: New.
3238 * testsuite/gfortran.dg/graphite/id-3.f90: New.
3239 * testsuite/gfortran.dg/graphite/id-4.f90: New.
3240 * testsuite/gfortran.dg/graphite/pr37857.f90: New.
3242 2008-12-02 Sebastian Pop <sebastian.pop@amd.com>
3243 Jan Sjodin <jan.sjodin@amd.com>
3244 Harsha Jagasia <harsha.jagasia@amd.com>
3256 * testsuite/gcc.dg/graphite/pr38073.c: New.
3257 * testsuite/gcc.dg/graphite/pr37928.c: New.
3258 * testsuite/gcc.dg/graphite/pr37883.c: New.
3259 * testsuite/gcc.dg/graphite/pr38125.c: New.
3260 * testsuite/gfortran.dg/graphite/pr38083.f90: New.
3261 * testsuite/gfortran.dg/graphite/pr37852.f90: New.
3262 * testsuite/gfortran.dg/graphite/pr37980.f90: New.
3264 * testsuite/gcc.dg/graphite/scop-18.c: Remove reduction, test for
3265 the number of detected scops. Copy exact same test for loop
3267 * testsuite/gcc.dg/graphite/block-1.c: Fix the number of expected
3268 loops to be blocked as reductions are not handled.
3269 * testsuite/gcc.dg/graphite/block-4.c: ...here. New.
3271 * tree-phinodes.c (remove_phi_nodes): New, extracted from...
3272 * tree-cfg.c (remove_phi_nodes_and_edges_for_unreachable_block):
3274 * tree-flow.h (remove_phi_nodes, canonicalize_loop_ivs): Declared.
3275 * Makefile.in (graphite.o): Depend on value-prof.h.
3276 (graphite.o-warn): Removed -Wno-error.
3277 * tree-parloops.c (canonicalize_loop_ivs): Allow reduction_list
3278 to be a NULL pointer. Call update_stmt. Return the newly created
3279 cannonical induction variable.
3281 * graphite.h (debug_rename_map): Declared. Fix some comments.
3283 * graphite.c: Reimplement the code generation from graphite to gimple.
3284 Include value-prof.h.
3285 (loop_iv_stack_get_iv): Do not return NULL for constant substitutions.
3286 (get_old_iv_from_ssa_name): Removed.
3287 (graphite_stmt_p): New.
3288 (new_graphite_bb): Test for useful statements before building a
3289 graphite statement for the basic block.
3290 (free_graphite_bb): Do not free GBB_DATA_REFS: this is a bug
3291 in free_data_ref that calls BITMAP_FREE (DR_VOPS (dr)) without
3293 (recompute_all_dominators, graphite_verify,
3294 nb_reductions_in_loop, graphite_loop_normal_form): New.
3295 (scop_record_loop): Call graphite_loop_normal_form.
3296 (build_scop_loop_nests): Iterate over all the blocks of the
3297 function instead of relying on the incomplete information from
3298 SCOP_BBS. Return the success of the operation.
3299 (find_params_in_bb): Use the data from GBB_DATA_REFS.
3300 (add_bb_domains): Removed.
3301 (build_loop_iteration_domains): Don't call add_bb_domains.
3302 Add the iteration domain only to the basic blocks that have been
3303 translated to graphite.
3304 (build_scop_conditions_1): Add constraints only if the basic
3305 block have been translated to graphite.
3306 (build_scop_data_accesses): Completely disabled until data
3307 dependence is correctly implemented.
3308 (debug_rename_elt, debug_rename_map_1, debug_rename_map): New.
3309 (remove_all_edges_1, remove_all_edges): Removed.
3310 (get_new_name_from_old_name): New.
3311 (graphite_rename_variables_in_stmt): Renamed
3312 rename_variables_in_stmt. Call get_new_name_from_old_name.
3313 Use replace_exp and update_stmt.
3314 (is_old_iv): Renamed is_iv.
3315 (expand_scalar_variables_stmt): Extra parameter for renaming map.
3316 Use replace_exp and update_stmt.
3317 (expand_scalar_variables_expr): Same. Use the map to get the
3318 new names for the renaming of induction variables and for the
3319 renaming of variables after a basic block has been copied.
3320 (expand_scalar_variables): Same.
3321 (graphite_rename_variables): Renamed rename_variables.
3322 (move_phi_nodes): Removed.
3323 (get_false_edge_from_guard_bb): New.
3324 (build_iv_mapping): Do not insert the induction variable of a
3325 loop in the renaming iv map if the basic block does not belong
3327 (register_old_new_names, graphite_copy_stmts_from_block,
3328 copy_bb_and_scalar_dependences): New.
3329 (translate_clast): Heavily reimplemented: copy basic blocks,
3330 do not move them. Finally, in call cleanup_tree_cfg in gloog.
3331 At each translation step call graphite_verify ensuring the
3332 consistency of the SSA, loops and dominators information.
3333 (collect_virtual_phis, find_vdef_for_var_in_bb,
3334 find_vdef_for_var_1, find_vdef_for_var,
3335 patch_phis_for_virtual_defs): Removed huge hack.
3336 (mark_old_loops, remove_dead_loops, skip_phi_defs,
3337 collect_scop_exit_phi_args, patch_scop_exit_phi_args,
3338 gbb_can_be_ignored, scop_remove_ignoreable_gbbs, ): Removed.
3339 (remove_sese_region, ifsese, if_region_entry, if_region_exit,
3340 if_region_get_condition_block, if_region_set_false_region,
3341 create_if_region_on_edge, move_sese_in_condition, bb_in_sese_p,
3342 sese_find_uses_to_rename_use, sese_find_uses_to_rename_bb,
3343 sese_add_exit_phis_edge, sese_add_exit_phis_var,
3344 rewrite_into_sese_closed_ssa): New.
3345 (gloog): Remove dead code. Early return if code cannot be
3346 generated. Call cleanup_tree_cfg once the scop has been code
3348 (graphite_trans_scop_block, graphite_trans_loop_block): Do not
3349 block loops with less than two loops.
3350 (graphite_apply_transformations): Remove the call to
3351 scop_remove_ignoreable_gbbs.
3352 (limit_scops): When build_scop_loop_nests fails, continue on
3353 the next scop. Fix open_scop.entry.
3354 (graphite_transform_loops): Call recompute_all_dominators: force the
3355 recomputation of correct CDI_DOMINATORS and CDI_POST_DOMINATORS.
3356 Call initialize_original_copy_tables and free_original_copy_tables
3357 to be able to copy basic blocks during code generation.
3358 When build_scop_loop_nests fails, continue on next scop.
3359 (value_clast): New union.
3360 (clast_to_gcc_expression): Fix type cast warning.
3362 2008-11-09 Sebastian Pop <sebastian.pop@amd.com>
3364 * Merge from mainline (r140838:141727).
3366 2008-11-05 Tobias Grosser <grosser@fim.uni-passau.de>
3370 * graphite.c (scan_tree_for_params): Add POINTER_PLUS_EXPR.
3372 2008-11-05 Tobias Grosser <grosser@fim.uni-passau.de>
3376 * graphite.c (scopdet_basic_block_info): Fix loops with multiple
3377 exits and conditions.
3378 * testsuite/gcc.dg/graphite/pr37943.c: New.
3380 2008-10-23 Tobias Grosser <grosser@fim.uni-passau.de>
3383 * graphite.c (gloog): Replace EXIT_BLOCK_PTR with scop exit.
3385 2008-10-23 Tobias Grosser <grosser@fim.uni-passau.de>
3387 * doc/invoke.texi: Fix spaces.
3389 2008-10-22 Sebastian Pop <sebastian.pop@amd.com>
3391 PR tree-optimization/37891
3392 Reverted last commit.
3393 * graphite.c (create_single_entry_edge): Set
3394 EDGE_IRREDUCIBLE_LOOP and BB_IRREDUCIBLE_LOOP.
3396 2008-10-21 Sebastian Pop <sebastian.pop@amd.com>
3397 Mitul Thakkar <mitul.thakkar@amd.com>
3399 * graphite.c (create_single_entry_edge): Set
3400 EDGE_IRREDUCIBLE_LOOP and BB_IRREDUCIBLE_LOOP.
3402 2008-10-16 Tobias Grosser <grosser@fim.uni-passau.de>
3404 * doc/invoke.texi: Add -fgraphite-identity.
3405 * graphite.c (graphite_apply_transformations): Check for
3406 -fgraphite-identity.
3407 * toplev.c (process_options): Add flag_graphite_identity.
3408 * tree-ssa-loop.c: Add flag_graphite_identity.
3410 2008-10-14 Sebastian Pop <sebastian.pop@amd.com>
3412 Undo changes from 2008-10-02:
3413 * tree-ssa-loop-ivopts.c (rewrite_use_nonlinear_expr): Convert
3414 operand type when copying the operand to a variable of different type.
3415 * cfgloopmanip.c (create_empty_loop_on_edge): Write exit condition
3416 with the IV name after increment.
3418 2008-10-14 Sebastian Pop <sebastian.pop@amd.com>
3419 Harsha Jagasia <harsha.jagasia@amd.com>
3421 PR tree-optimization/37828
3422 * testsuite/gcc.dg/graphite/pr37828.c: New.
3423 * graphite.c (graphite_trans_loop_block): Do not loop block
3424 single nested loops.
3426 2008-10-09 Harsha Jagasia <harsha.jagasia@amd.com>
3427 Sebastian Pop <sebastian.pop@amd.com>
3429 * graphite.c (struct rename_map_elt, new_rename_map_elt,
3430 rename_map_elt_info, eq_rename_map_elts): New.
3431 (graphite_rename_ivs_stmt): Renamed graphite_rename_variables_in_stmt.
3432 (expand_scalar_variables_expr): Change parameters.
3433 (expand_scalar_variables_stmt): Same.
3434 (expand_scalar_variables): Same.
3435 (graphite_rename_ivs): Rename graphite_rename_variables.
3436 (build_iv_mapping): New.
3437 (translate_clast): Call build_iv_mapping.
3438 * graphite.h (gbb_p): New name.
3440 2008-10-03 Harsha Jagasia <harsha.jagasia@amd.com>
3442 PR tree-optimization/37684
3443 * gcc.dg/graphite/pr37684.c: New.
3444 * graphite.c (exclude_component_ref): New.
3445 (is_simple_operand): Call exclude_component_ref.
3447 2008-10-02 Jan Sjodin <jan.sjodin@amd.com>
3448 Harsha Jagasia <harsha.jagasia@amd.com>
3450 PR tree-optimization/37485
3451 * gcc.dg/graphite/block-2.c: New
3452 * graphite.c (gmp_cst_to_tree): Moved.
3453 (iv_stack_entry_is_constant): New.
3454 (iv_stack_entry_is_iv): New.
3455 (loop_iv_stack_push): Renamed to loop_iv_stack_push_iv.
3456 (loop_iv_stack_insert_constant): New.
3457 (loop_iv_stack_pop): Use new datatpype.
3458 (loop_iv_stack_get_iv): Same.
3459 (loop_iv_stack_get_iv_from_name): Same.
3460 (loop_iv_stack_debug): Renamed to debug_loop_iv_stack.
3461 (loop_iv_stack_patch_for_consts): New.
3462 (loop_iv_stack_remove_constants): New.
3463 (graphite_create_new_loop): Use loop_iv_stack_push_iv.
3464 (translate_clast): Call loop_iv_stack_patch_for_consts and
3465 loop_iv_stack_remove_constants.
3466 (gloog): Use new datatype. Redirect construction edge to end
3467 block to avoid accidental deletion.
3468 * graphite.h (enum iv_stack_entry_kind): New. Tag for data in
3470 (union iv_stack_entry_data): New. Data in iv stack entry.
3471 (struct iv_stack_entry): New. Datatype for iv stack entries.
3473 2008-10-02 Sebastian Pop <sebastian.pop@amd.com>
3475 * tree-ssa-loop-ivopts.c (rewrite_use_nonlinear_expr): Convert
3476 operand type when copying the operand to a variable of different type.
3478 2008-10-02 Sebastian Pop <sebastian.pop@amd.com>
3480 * cfgloopmanip.c (create_empty_loop_on_edge): Write exit condition
3481 with the IV name after increment.
3483 2008-10-02 Sebastian Pop <sebastian.pop@amd.com>
3485 * Merge from mainline (r140164:140838).
3487 2008-09-10 Konrad Trifunovic <konrad.trifunovic@inria.fr>
3489 * graphite-data-ref.c: New.
3490 * graphite.c (print_scop): Also dump the dependence graph.
3491 (bb_in_scop_p, loop_in_scop_p, nb_loops_around_gb): Moved...
3492 (new_scop): Initialize SCOP_DEP_GRAPH.
3493 (build_scop_dynamic_schedules): New.
3494 (build_access_matrix_with_af): Fixed column numbering.
3495 (graphite_transform_loops): Call build_scop_dynamic_schedules.
3496 * graphite.h: Add ifndef/define guards against multiple inclusion.
3497 (struct scop): Add dep_graph field.
3498 (SCOP_DEP_GRAPH): Defined.
3499 (ref_nb_loops): Fixed and moved to other position.
3500 (bb_in_scop_p, loop_in_scop_p, nb_loops_around_gb): ... here.
3501 (nb_loops_around_loop_in_scop): New.
3502 (graphite_dump_dependence_graph): Declared.
3503 (graphite_build_rdg_all_levels): Declared.
3504 (graphite_test_dependence): Declared.
3505 * Makefile.in (graphite-data-ref.o): New target.
3507 2008-09-09 Sebastian Pop <sebastian.pop@amd.com>
3509 * Merge from mainline (139870:140164).
3511 2008-09-01 Sebastian Pop <sebastian.pop@amd.com>
3513 * Merge from mainline (138275:139870).
3514 * testsuite/gcc.dg/graphite/scop-matmult.c: XFailed as one of
3515 the commits from trunk broke the niter detection.
3517 2008-09-01 Sebastian Pop <sebastian.pop@amd.com>
3519 * graphite.c: Add more documentation. Fix formatting.
3520 (debug_loop_vec, debug_oldivs, loop_iv_stack,
3521 loop_iv_stack_debug): Moved...
3522 (schedule_to_scattering): Move before use.
3523 (dot_all_scops): Include in "#if 0" the code for system
3526 * graphite.h: (debug_loop_vec, debug_oldivs, loop_iv_stack,
3527 loop_iv_stack_debug): ...here.
3529 2008-08-29 Jan Sjodin <jan.sjodin@amd.com>
3531 * tree-phinodes.c (make_phi_node): Extern.
3532 (add_phi_node_to_bb): New.
3533 (create_phi_node): Call add_phi_node_to_bb.
3534 * tree-ssa-loop-ivopts.c (get_phi_with_result): New.
3535 (remove_statement): Handle case where stored phi was updated
3536 and is no longer the same.
3537 * graphite.c (is_parameter): New.
3539 (expand_scalar_variables_expr): New.
3540 (expand_scalar_variables_stmt): New.
3541 (expand_scalar_variables): New.
3542 (move_phi_nodes): Create new phi instead of moving old one.
3543 (translate_clast): Call expand_scalar_variables.
3544 (find_vdef_for_var_in_bb): Also scan regular definitions.
3545 (skip_phi_defs): New.
3546 (collect_scop_exit_phi_args): New.
3547 (patch_scop_exit_phi_args): New.
3548 (gloog): Patch phis after scop.
3549 * tree-flow.h: (add_phi_node_to_bb): Declared.
3550 (make_phi_node): Declared.
3552 2008-08-26 Sebastian Pop <sebastian.pop@amd.com>
3554 * graphite.c (end_scop): Split the entry of the scop when it
3555 is the header of the loop in which the scop is ending.
3556 (build_scops_1, limit_scops): Update uses of end_scop.
3558 2008-08-26 Sebastian Pop <sebastian.pop@amd.com>
3560 * graphite.c (dot_all_scops_1): Do not fail on uninitialized
3561 SCOP_ENTRY or SCOP_EXIT.
3563 2008-08-25 Sebastian Pop <sebastian.pop@amd.com>
3565 * graphite.c (get_construction_edge): Removed.
3566 (gloog): Construction edge is the scop entry edge.
3568 2008-08-25 Sebastian Pop <sebastian.pop@amd.com>
3570 * graphite.c (can_generate_for_scop): Removed.
3571 (gloog): Do not call it.
3573 2008-08-25 Sebastian Pop <sebastian.pop@amd.com>
3575 * graphite.c (new_scop): Entry of a scop is an edge.
3576 Initialize SESE region.
3577 (free_scop): Free SESE region.
3578 (build_scops_1, scopdet_bb_info): Work on edges, not on bbs.
3579 (split_difficult_bb): New, split from end_scop.
3580 (end_scop): Exit of a scop is an edge.
3581 (build_scop_bbs): Never check CDI_POST_DOMINATORS: this info is
3582 not automatically updated and thus is always wrong.
3583 * graphite.h (struct sese): New.
3586 (struct scop): New field for a SESE region. Remove entry, exit.
3587 (SCOP_ENTRY, SCOP_EXIT): Update definitions to match same
3588 semantics as before. Moved comment around.
3590 2008-08-25 Tobias Grosser <grosser@fim.uni-passau.de>
3591 Sebastian Pop <sebastian.pop@amd.com>
3593 * graphite.c (graphite_transform_loops): Always enable gloog
3594 and find_transform when ENABLE_CHECKING.
3596 2008-08-25 Sebastian Pop <sebastian.pop@amd.com>
3598 * graphite.c (graphite_transform_loops): Move pretty printer
3599 of SCOPs before doing any transform. Remove call to print_scops
3600 and dot_all_scops_1.
3602 2008-08-25 Sebastian Pop <sebastian.pop@amd.com>
3604 * graphite.c (dump_gbb_conditions): Don't try to print NULL pointers.
3605 (print_graphite_bb): Same.
3607 2008-08-25 Sebastian Pop <sebastian.pop@amd.com>
3609 * graphite.c (dot_all_scops_1): Cleanup.
3610 (move_scops): Fix comment.
3612 2008-08-25 Sebastian Pop <sebastian.pop@amd.com>
3614 * graphite.c (build_scop_bbs): Revert commit 139355:
3616 2008-08-20 Sebastian Pop <sebastian.pop@amd.com>
3617 Dwarakanath Rajagopal <dwarak.rajagopal@amd.com>
3619 * graphite.c (build_scop_bbs): Factor up code.
3621 2008-08-25 Tobias Grosser <grosser@fim.uni-passau.de>
3623 * graphite.c (gloog): Update dominator info.
3625 2008-08-25 Tobias Grosser <grosser@fim.uni-passau.de>
3627 * graphite.c (remove_cond_exprs): Do not fail on empty bbs.
3629 2008-08-24 Sebastian Pop <sebastian.pop@amd.com>
3631 * graphite.c (new_graphite_bb): Remove GBB_INDEX_TO_NUM_MAP
3633 (free_graphite_bb): Remove GBB_INDEX_TO_NUM_MAP free.
3634 (translate_clast): Correct formatting.
3635 * graphite.h (struct num_map): Removed.
3636 (struct graphite_bb): Remove num_map field.
3637 (GBB_INDEX_TO_NUM_MAP): Removed.
3639 2008-08-24 Sebastian Pop <sebastian.pop@amd.com>
3641 * graphite.c (build_access_matrix_with_af): Fix comments.
3642 (build_scop_data_accesses): Same.
3644 2008-08-24 Sebastian Pop <sebastian.pop@amd.com>
3646 * graphite.c (build_scop_data_accesses): Don't construct
3647 access matrices. Add a FIXME and an assert condition that
3648 should pass when the access matrices will be needed.
3650 2008-08-24 Sebastian Pop <sebastian.pop@amd.com>
3652 * tree-data-ref.c (stmt_simple_memref_p): Don't call
3654 * graphite.c (build_graphite_bb): Renamed new_graphite_bb.
3655 Moved close by free_graphite_bb.
3656 (free_graphite_bb): Call free_data_refs. Reset bb->aux.
3657 (new_scop): Move close by free_scop.
3658 (graphite_transform_loops): Avoid linear scan to reset bb->aux.
3660 2008-08-22 Jan Sjodin <jan.sjodin@amd.com>
3662 * cfgloopmanip.c (create_empty_if_region_on_edge): New.
3663 * graphite.c (clast_to_gcc_expression): Call gmp_cst_to_tree
3664 instead of recursive call.
3665 (graphite_translate_clast_equation): New.
3666 (graphite_create_guard_cond_expr): New.
3667 (graphite_create_new_guard): New.
3668 (get_stack_index_from_iv): Removed.
3669 (graphite_rename_ivs_stmt): Use gbb_loop_index.
3670 (get_true_edge_from_guard_bb): New.
3671 (translate_clast): Handle stmt_guard in clast.
3672 (get_construction_edge): Allow construction edge detection for
3673 a scope entry with multiple predecessors if one predecessor is
3674 the immediate dominator of scope entry.
3675 (can_generate_code_stmt): Enable code generation for clast_guard.
3676 (gloog): Use correct context loop. Removed check for post dominators.
3677 * cfgloop.h (create_empty_if_region_on_edge): Declared.
3679 2008-08-21 Sebastian Pop <sebastian.pop@amd.com>
3681 * graphite.c (remove_dead_loops): Document better which
3684 2008-08-21 Sebastian Pop <sebastian.pop@amd.com>
3686 * Makefile.in: Rename POLYLIBLIBS and POLYLIBINC to PPLLIBS
3688 (graphite.o): Also depends on pointer-set.h.
3690 2008-08-21 Sebastian Pop <sebastian.pop@amd.com>
3692 * graphite.c (scop_record_loop): Fix compile warning.
3694 2008-08-21 Harsha Jagasia <harsha.jagasia@amd.com>
3695 Sebastian Pop <sebastian.pop@amd.com>
3697 * graphite.c (scop_record_loop): DECL_NAME can be NULL.
3699 2008-08-21 Sebastian Pop <sebastian.pop@amd.com>
3701 * graphite.c (build_graphite_bb): Initialize bb->aux to
3702 point to the graphite_bb_p.
3703 (graphite_bb_from_bb): Renamed gbb_from_bb; returns the
3705 (add_bb_domains): Does not use the scop parameter.
3706 (graphite_transform_loops): Clean bb->aux at the end.
3708 2008-08-20 Dwarakanath Rajagopal <dwarak.rajagopal@amd.com>
3709 Sebastian Pop <sebastian.pop@amd.com>
3711 * testsuite/lib/target-supports.exp
3712 (check_effective_target_fgraphite): New.
3714 * testsuite/gcc.dg/graphite/graphite.exp: Early exit when
3715 check_effective_target_fgraphite returns false.
3716 Set dg-do-what-default to compile.
3717 (scan-graphite-dump-times): Removed.
3718 * testsuite/gfortran.dg/graphite/graphite.exp: Same.
3720 * testsuite/gcc.dg/graphite/scop-0.c: Do not use "dg-do compile".
3721 Use scan-tree-dump-times instead of scan-graphite-dump-times.
3722 * testsuite/gcc.dg/graphite/scop-1.c: Same.
3723 * testsuite/gcc.dg/graphite/scop-2.c: Same.
3724 * testsuite/gcc.dg/graphite/scop-3.c: Same.
3725 * testsuite/gcc.dg/graphite/scop-4.c: Same.
3726 * testsuite/gcc.dg/graphite/scop-5.c: Same.
3727 * testsuite/gcc.dg/graphite/scop-6.c: Same.
3728 * testsuite/gcc.dg/graphite/scop-7.c: Same.
3729 * testsuite/gcc.dg/graphite/scop-8.c: Same.
3730 * testsuite/gcc.dg/graphite/scop-9.c: Same.
3731 * testsuite/gcc.dg/graphite/scop-10.c: Same.
3732 * testsuite/gcc.dg/graphite/scop-11.c: Same.
3733 * testsuite/gcc.dg/graphite/scop-12.c: Same.
3734 * testsuite/gcc.dg/graphite/scop-13.c: Same.
3735 * testsuite/gcc.dg/graphite/scop-matmult.c: Same.
3736 * testsuite/gcc.dg/graphite/scop-14.c: Same.
3737 * testsuite/gcc.dg/graphite/scop-15.c: Same.
3738 * testsuite/gcc.dg/graphite/block-0.c: Same.
3739 * testsuite/gcc.dg/graphite/scop-16.c: Same.
3740 * testsuite/gcc.dg/graphite/block-1.c: Same.
3741 * testsuite/gcc.dg/graphite/scop-17.c: Same.
3742 * testsuite/gcc.dg/graphite/scop-18.c: Same.
3743 * testsuite/gfortran.dg/graphite/block-1.f90: Same.
3744 * testsuite/gfortran.dg/graphite/scop-1.f: Same.
3745 * testsuite/gfortran.dg/graphite/block-2.f: Same.
3747 2008-08-20 Sebastian Pop <sebastian.pop@amd.com>
3749 * graphite.c: Fix some XXX comments.
3750 (build_scop_dynamic_schedules): Removed.
3752 2008-08-20 Sebastian Pop <sebastian.pop@amd.com>
3754 * graphite.h (scop_max_loop_depth): Moved...
3755 * graphite.c (scop_max_loop_depth): ...here.
3756 (remove_all_edges_1): New.
3757 (remove_all_edges): Factored code.
3758 (remove_cond_exprs): Check only the last statement for
3759 a GIMPLE_COND expression.
3761 2008-08-20 Sebastian Pop <sebastian.pop@amd.com>
3763 * graphite.c (scan_tree_for_params): Early return when the
3764 expression is a chrec_dont_know. Handle case NEGATE_EXPR.
3765 (find_scop_parameters): Factor out code.
3766 (graphite_trans_bb_strip_mine): Remove dead code.
3768 2008-08-20 Sebastian Pop <sebastian.pop@amd.com>
3770 * graphite.c (clast_to_gcc_expression, graphite_create_new_loop,
3771 graphite_trans_bb_move_loop): Factor asserts.
3772 (gloog): Perform sanity checks only for ENABLE_CHECKING.
3773 Do not call calculate_dominance_info and estimate_bb_frequencies.
3775 2008-08-20 Jan Sjodin <jan.sjodin@amd.com>
3777 * graphite.c (create_loops_mapping, free_loops_mapping,
3778 create_loops_mapping_num, debug_loop_mapping_1,
3779 debug_loop_mapping, graphite_loops_mapping_max_loop_num,
3780 get_loop_mapping_for_num, graphite_loops_mapping_add_child,
3781 graphite_loops_mapping_add_child_num,
3782 graphite_loops_mapping_insert_child,
3783 graphite_loops_mapping_parent, get_loop_mapped_depth_for_num,
3784 get_loop_mapped_depth, split_loop_mapped_depth_for_num,
3785 loop_mapped_depth_split_loop, swap_loop_mapped_depth_for_num,
3786 create_num_from_index, get_num_from_index,
3787 swap_loop_mapped_depth): Removed.
3788 (new_scop): Do not initialize SCOP_LOOPS_MAPPING.
3789 (free_scop): Do not call free_loops_mapping.
3790 (graphite_get_new_iv_stack_index_from_old_iv): Renamed
3791 get_stack_index_from_iv. Use GBB_LOOPS instead of calling
3792 get_loop_mapped_depth.
3793 (graphite_trans_bb_move_loop): Do not update the loop mapping.
3794 (graphite_trans_bb_strip_mine): Same.
3795 * graphite.h (graphite_loops_mapping, graphite_loop_node): Removed.
3796 (struct scop): Remove field loops_mapping.
3798 2008-08-20 Sebastian Pop <sebastian.pop@amd.com>
3799 Dwarakanath Rajagopal <dwarak.rajagopal@amd.com>
3801 * graphite.c (scop_record_loop): Factor out one level of the
3802 condition by early return.
3803 (build_scop_loop_nests): Format following FSF coding style.
3804 (build_scop_dynamic_schedules): Factor out code.
3805 (scopdet_bb_info): Reindent. Default case should not be reachable.
3807 2008-08-20 Sebastian Pop <sebastian.pop@amd.com>
3808 Dwarakanath Rajagopal <dwarak.rajagopal@amd.com>
3810 * graphite.c (loop_affine_expr): Check for DECL_P or struct
3811 assignments that are not handled as simple operands for now.
3813 2008-08-20 Sebastian Pop <sebastian.pop@amd.com>
3814 Dwarakanath Rajagopal <dwarak.rajagopal@amd.com>
3816 * graphite.c (build_scop_bbs): Factor up code.
3818 2008-08-20 Sebastian Pop <sebastian.pop@amd.com>
3819 Dwarakanath Rajagopal <dwarak.rajagopal@amd.com>
3821 * graphite.c (stmt_simple_for_scop_p): Factor code out
3823 (enum gbb_type): New. Group all the GBB_* types under it.
3824 (is_loop_exit): Moved...
3825 (end_scop): Enable BB spliting.
3826 * cfgloop.c (is_loop_exit): ...here. Reimplemented.
3827 * cfgloop.h (is_loop_exit): Declared.
3829 2008-08-20 Sebastian Pop <sebastian.pop@amd.com>
3831 * doc/invoke.texi: Remove strides from examples containing
3832 DO loops when the strides are equal to 1.
3834 2008-08-20 Harsha Jagasia <harsha.jagasia@amd.com>
3835 Dwarakanath Rajagopal <dwarak.rajagopal@amd.com>
3837 * graphite.c (graphite_trans_scop_block): Or the result with
3838 the result from graphite_trans_loop_block.
3839 * testsuite/gcc.dg/graphite/block-1.c: New.
3840 * testsuite/gfortran.dg/graphite/block-1.f90: New.
3841 * testsuite/gfortran.dg/graphite/block-2.f: New.
3843 2008-08-20 Sebastian Pop <sebastian.pop@amd.com>
3845 * graphite.c (graphite_transform_loops): Call cloog_initialize
3848 2008-08-20 Sebastian Pop <sebastian.pop@amd.com>
3850 * tree-data-ref.c) (stmt_simple_memref_p): New.
3851 * tree-data-ref.h (stmt_simple_memref_p): Declared.
3852 * graphite.c (stmt_simple_memref_for_scop_p): Removed.
3853 (is_simple_operand): Call stmt_simple_memref_p.
3855 * testsuite/gcc.dg/graphite/scop-matmult.c: Updated for not
3856 using pointer arithmetic, as this is optimized by PRE and
3857 makes the code too difficult to analyze.
3859 * testsuite/gcc.dg/graphite/scop-18.c: Same.
3861 2008-08-20 Sebastian Pop <sebastian.pop@amd.com>
3863 * gdbinit.in (pgg): New.
3865 2008-08-15 Tobias Grosser <grosser@fim.uni-passau.de>
3867 * graphite.c (graphite_trans_loop_block): Fix warning.
3869 2008-08-15 Tobias Grosser <grosser@fim.uni-passau.de>
3871 * graphite.c (graphite_trans_loop_block): Fix my merge error.
3873 2008-08-15 Tobias Grosser <grosser@fim.uni-passau.de>
3875 * graphite.c (graphite_trans_bb_block): Remove check for
3876 flag_loop_strip_mine, flag_loop_block, flag_loop_interchange.
3877 Check if loop blocking is profitable for every loop, before applying
3879 (graphite_apply_transformations): Call graphite_trans_bb_block only,
3880 if flag_loop_block is set.
3882 2008-08-14 Sebastian Pop <sebastian.pop@amd.com>
3884 * graphite.c: Add some more documentation for the loop
3887 2008-08-14 Sebastian Pop <sebastian.pop@amd.com>
3889 * Makefile.in (tree-data-ref.o): Remove dependence on graphite.h.
3890 * graphite.c: Format on less than 80 columns.
3893 2008-08-14 Sebastian Pop <sebastian.pop@amd.com>
3895 * cfgloopmanip.c (loopify): Use update_dominators_in_loop.