1 2009-08-25 Sebastian Pop <sebastian.pop@amd.com>
3 * graphite-dependences.c (pddr_original_scattering): New.
4 (graphite_legal_transform_dr): Call pddr_original_scattering.
7 * graphite-dependences.h (dot_deps): Declared.
8 * graphite-poly.c (new_poly_dr): Initialize PDR_ID.
9 (print_pdr): Print PDR_ID.
10 * graphite-poly.h (struct poly_dr): Add field id.
13 * graphite-scop-detection.c (dot_all_scops_1): Cleanup comment.
15 2009-08-22 Sebastian Pop <sebastian.pop@amd.com>
17 * graphite-dependences.c (graphite_carried_dependence_level_k): Do
18 not delete the original dependence relation.
20 2009-08-21 Sebastian Pop <sebastian.pop@amd.com>
22 * graphite-dependences.c (graphite_legal_transform_bb): Avoid
23 the computation of symmetric data dependence relations.
24 (dependency_between_pbbs_p): Same.
26 2009-08-21 Sebastian Pop <sebastian.pop@amd.com>
28 * graphite-dependences.c (new_poly_dr_pair): Renamed new_poly_ddr.
29 (eq_poly_dr_pair_p): Renamed eq_poly_ddr_p.
30 (hash_poly_dr_pair_p): Renamed hash_poly_ddr_p.
33 (dependence_polyhedron_1): Now returns a poly_ddr_p.
34 (dependence_polyhedron): Same. Remove useless gcc_assert.
36 (graphite_legal_transform_dr): Call pddr_is_empty and free_poly_ddr.
37 (graphite_carried_dependence_level_k): Call pddr_is_empty.
38 * graphite-dependences.h (enum poly_dependence_kind): New.
39 (poly_dr_pair): Renamed poly_ddr. Added a field kind.
40 (PDRP_SOURCE): Renamed PDDR_SOURCE.
41 (PDRP_SINK): Renamed PDDR_SINK.
42 (PDRP_DDP): Renamed PDDR_DDP.
44 (free_poly_ddr): Declared.
45 * graphite-poly.c (new_scop): Use the new hash function names.
46 * graphite-poly.h (struct scop): Renamed field original_pdr_pairs
48 (SCOP_ORIGINAL_PDR_PAIRS): Renamed SCOP_ORIGINAL_PDDRS.
50 2009-08-21 Sebastian Pop <sebastian.pop@amd.com>
52 * Merge from mainline (150764:150992).
54 2009-08-18 Sebastian Pop <sebastian.pop@amd.com>
56 * cfgloopmanip.c (create_empty_loop_on_edge): Generate upper
57 bounds with LT_EXPR to make niter analysis more precise on code
58 generated by Graphite.
60 2009-08-18 Sebastian Pop <sebastian.pop@amd.com>
62 * graphite-dependences.c (graphite_legal_transform_dr): Fix formatting.
63 (graphite_legal_transform_bb): Same.
64 (poly_drs_may_alias_p): Same.
66 2009-08-15 Sebastian Pop <sebastian.pop@amd.com>
69 * graphite-ppl.c (ppl_max_for_le): Correct the use of
70 ppl_Pointset_Powerset_C_Polyhedron_maximize.
72 2009-08-13 Sebastian Pop <sebastian.pop@amd.com>
74 * graphite-poly.c (print_pbb): Print PBB index.
76 2009-08-13 Sebastian Pop <sebastian.pop@amd.com>
78 * Merge from mainline (r150672:150764).
80 2009-08-13 Sebastian Pop <sebastian.pop@amd.com>
82 * graphite-interchange.c (ppl_max_for_le): Moved...
83 * graphite-poly.c (pbb_number_of_iterations): Call ppl_max_for_le.
84 * graphite-ppl.c (ppl_max_for_le): ... here.
85 * graphite-ppl.h (ppl_max_for_le): Declared.
87 2009-08-12 Sebastian Pop <sebastian.pop@amd.com>
89 * Merge from mainline (r150372:150672).
91 2009-08-11 Sebastian Pop <sebastian.pop@amd.com>
94 * sese.c (convert_for_phi_arg): New.
95 (add_guard_exit_phis): Use convert_for_phi_arg.
97 * testsuite/gfortran.dg/graphite/id-17.f: New.
99 2009-08-11 Sebastian Pop <sebastian.pop@amd.com>
101 * graphite-sese-to-poly.c (pdr_add_data_dimensions): Dont add
102 unknown subscript upper bounds.
104 * testsuite/gcc.dg/graphite/interchange-6.c: Un-XFAIL.
106 2009-08-11 Sebastian Pop <sebastian.pop@amd.com>
107 Pranav Garg <pranav.garg2107@gmail.com>
109 * graphite-interchange.c (gather_access_strides): Removed.
110 (ppl_max_for_le): New.
111 (build_linearized_memory_access): New.
112 (memory_stride_in_loop): New.
113 (pbb_interchange_profitable_p): Reimplemented.
114 * graphite-ppl.h (ppl_new_id_map): New.
115 (ppl_interchange): New.
117 * testsuite/gcc.dg/graphite/interchange-6.c: XFAILed.
119 2009-08-11 Sebastian Pop <sebastian.pop@amd.com>
121 * graphite-interchange.c (compute_subscript): Removed.
122 (compute_array_size_cstr): Removed.
123 (compute_array_size_poly): Removed.
124 (compute_array_size): Removed.
125 (gather_access_strides_poly): Removed.
126 (gather_access_strides): Empty.
128 2009-08-11 Sebastian Pop <sebastian.pop@amd.com>
130 * graphite-dependences.c (dependence_polyhedron_1): Replace
131 pdr_nb_subscripts with PDR_NB_SUBSCRIPTS.
132 (graphite_legal_transform_dr): Same.
133 (graphite_carried_dependence_level_k): Same.
134 * graphite-poly.c (new_poly_dr): Add a parameter nb_subscripts.
135 Initialize PDR_NB_SUBSCRIPTS.
136 (print_pdr_access_layout): Replace pdr_nb_subscripts with
138 * graphite-poly.h (struct poly_dr): Add nb_subscripts field.
139 (PDR_NB_SUBSCRIPTS): New.
140 (pdr_nb_subscripts): Removed.
141 (pdr_dim): Simplified.
142 * graphite-sese-to-poly.c (build_poly_dr): Replace pdr_nb_subscripts
143 with PDR_NB_SUBSCRIPTS.
145 2009-08-11 Sebastian Pop <sebastian.pop@amd.com>
147 * graphite-interchange.c (compute_array_size): Remove use of
149 * graphite-poly.c (new_poly_dr): Remove argument data_container.
150 Do not initialize PDR_DATA_CONTAINER.
151 (print_pdr): Do not print PDR_DATA_CONTAINER.
152 * graphite-poly.h (struct poly_dr): Remove data_container field.
153 (PDR_DATA_CONTAINER): Removed.
154 * graphite-sese-to-poly.c (pdr_add_data_dimensions): Remove use of
156 (build_poly_dr): Same.
158 2009-08-11 Sebastian Pop <sebastian.pop@amd.com>
160 * testsuite/gcc.dg/graphite/interchange-9.c: New.
162 2009-08-05 Konrad Trifunovic <konrad.trifunovic@gmail.com>
163 Sebastian Pop <sebastian.pop@amd.com>
165 * graphite-dependences.c (graphite_legal_transform_dr): Work on a
166 copy of the dependence polyhedron. Free the temporary objects.
167 (graphite_carried_dependence_level_k): Free unused objects before
170 * testsuite/gcc.dg/graphite/interchange-1.c: XFAILed.
171 * testsuite/gcc.dg/graphite/interchange-2.c: XFAILed.
172 * testsuite/gcc.dg/graphite/interchange-3.c: XFAILed.
173 * testsuite/gcc.dg/graphite/interchange-4.c: XFAILed.
174 * testsuite/gcc.dg/graphite/interchange-7.c: XFAILed.
176 2009-08-05 Sebastian Pop <sebastian.pop@amd.com>
178 * graphite-blocking.c (scop_do_strip_mine): Call store_scattering.
179 Early return without analyzing the data dependences if no
180 transform has been done. Call restore_scattering if the transform
182 (graphite-interchange.c): Same.
183 * graphite-poly.c (print_scattering_function): Test for PBB_TRANSFORMED.
184 (graphite_read_transforms): Initialize PBB_TRANSFORMED.
185 (apply_poly_transforms): Do not gcc_assert that
186 the transform is legal.
187 (new_poly_bb): Initialize PBB_TRANSFORMED, PBB_SAVED, and PBB_ORIGINAL.
188 Do not initialize PBB_NB_SCATTERING_TRANSFORM, PBB_NB_LOCAL_VARIABLES,
189 PBB_TRANSFORMED_SCATTERING, and PBB_ORIGINAL_SCATTERING.
190 (free_poly_dr): Free PBB_TRANSFORMED, PBB_SAVED, and PBB_ORIGINAL.
191 * graphite-poly.h (struct poly_scattering): New.
192 (struct poly_bb): Add original, transformed, and saved fields.
193 Remove transformed_scattering, original_scattering, nb_local_variables,
194 and nb_scattering_transform fields.
195 (PBB_ORIGINAL, PBB_TRANSFORMED, PBB_SAVED): New.
196 (poly_scattering_new): New.
197 (poly_scattering_free): New.
198 (poly_scattering_copy): New.
199 (store_scattering_pbb): New.
200 (store_scattering): New.
201 (restore_scattering_pbb): New.
202 (restore_scattering): New.
203 * graphite-sese-to-poly.c (build_pbb_scattering_polyhedrons):
204 Initialize PBB_TRANSFORMED and PBB_ORIGINAL.
206 2009-08-05 Sebastian Pop <sebastian.pop@amd.com>
208 * graphite-poly.c (print_pbb): Add parentheses in the pretty print.
211 2009-08-05 Sebastian Pop <sebastian.pop@amd.com>
213 * Makefile.in (graphite.o): Depends on PREDICT_H.
214 * graphite.c: Include predict.h.
215 (graphite_finalize): Call tree_estimate_probability.
216 * predict.c (predict_loops): Do not call scev_initialize and
218 (tree_estimate_probability_bb): New.
219 (tree_estimate_probability): Do not initialize loops: move that
220 code to the driver. Call tree_estimate_probability_bb.
221 (tree_estimate_probability_driver): New.
222 (pass_profile): Use tree_estimate_probability_driver.
223 * predict.h (tree_estimate_probability): Declared.
225 2009-08-05 Sebastian Pop <sebastian.pop@amd.com>
227 * graphite-clast-to-gimple.c (gloog): Add time to TV_GRAPHITE_CODE_GEN.
228 * graphite-dependences.c (graphite_legal_transform): Add time to
229 TV_GRAPHITE_DATA_DEPS.
230 (dependency_between_pbbs_p): Same.
231 * timevar.def (TV_GRAPHITE_DATA_DEPS, TV_GRAPHITE_CODE_GEN): New.
233 2009-08-03 Sebastian Pop <sebastian.pop@amd.com>
235 * Merge from mainline (r149952:150372).
237 2009-07-28 Sebastian Pop <sebastian.pop@amd.com>
239 * ChangeLog.graphite: Fix indenting, white spaces and 80 columns.
240 * graphite-blocking.c: Same.
241 * graphite-clast-to-gimple.c: Same.
242 * graphite-dependences.c: Same.
243 * graphite-poly.c: Same.
244 * graphite-poly.h: Same.
245 * graphite-ppl.c: Same.
246 * graphite-scop-detection.c: Same.
247 * graphite-sese-to-poly.c: Same.
250 2009-07-28 Sebastian Pop <sebastian.pop@amd.com>
252 * graphite-sese-to-poly.c (loop_entry_phi_arg): New.
253 (remove_simple_copy_phi): New.
254 (remove_invariant_phi): New.
255 (simple_copy_phi_p): New.
256 (reduction_phi_p): New.
257 (gsi_for_ssa_name_def): New.
258 (insert_out_of_ssa_copy): New.
259 (insert_out_of_ssa_copy_on_edge): New.
260 (create_zero_dim_array): New.
261 (scalar_close_phi_node_p): New.
262 (rewrite_close_phi_out_of_ssa): New.
263 (rewrite_phi_out_of_ssa): New.
264 (rewrite_reductions_out_of_ssa): New.
265 (build_poly_scop): Call rewrite_reductions_out_of_ssa.
267 * testsuite/gcc.dg/graphite/id-11.c: New.
268 * testsuite/gcc.dg/graphite/id-15.c: New.
269 * testsuite/gcc.dg/graphite/interchange-1.c: Un-XFAIL.
270 * testsuite/gcc.dg/graphite/interchange-2.c: Un-XFAIL.
271 * testsuite/gcc.dg/graphite/interchange-3.c: Un-XFAIL.
272 * testsuite/gcc.dg/graphite/interchange-4.c: Un-XFAIL.
273 * testsuite/gcc.dg/graphite/interchange-7.c: Un-XFAIL.
274 * testsuite/gcc.dg/graphite/scop-matmult.c: Un-XFAIL.
275 * testsuite/gfortran.dg/graphite/id-13.f: New.
276 * testsuite/gfortran.dg/graphite/id-5.f: New.
278 2009-07-28 Sebastian Pop <sebastian.pop@amd.com>
280 * graphite-clast-to-gimple.c (graphite_loop_normal_form): Do not
281 check that nb_reductions_in_loop is zero.
282 * graphite-scop-detection.c (harmful_stmt_in_bb): Don't filter out
284 (nb_reductions_in_loop): Removed.
285 (graphite_can_represent_loop): Do not call nb_reductions_in_loop.
286 * graphite-sese-to-poly.c (phi_node_is_iv): Removed.
287 (bb_contains_non_iv_scalar_phi_nodes): Removed.
288 (scop_contains_non_iv_scalar_phi_nodes): Removed.
289 (build_poly_scop): Do not call scop_contains_non_iv_scalar_phi_nodes.
291 2009-07-28 Sebastian Pop <sebastian.pop@amd.com>
293 * graphite-clast-to-gimple.c (build_cloog_prog): Do not code generate
294 statements that have an empty iteration domain.
295 * testsuite/gfortran.dg/graphite/id-16.f: New.
297 2009-07-28 Sebastian Pop <sebastian.pop@amd.com>
299 * tree-scalar-evolution.c (instantiate_scev_1): Return
300 chrec_dont_know when the result is not above instantiate_below.
301 * graphite-scop-detection.c (scopdet_basic_block_info): Fix formatting.
302 * graphite-sese-to-poly.c (create_linear_expr_from_tree): Assert that
303 the tree has a known scalar evolution.
304 * testsuite/gfortran.dg/graphite/id-14.f: New.
305 * testsuite/gfortran.dg/graphite/id-15.f: New.
307 2009-07-28 Sebastian Pop <sebastian.pop@amd.com>
309 * sese.c (rename_variables_in_stmt): Pass in an extra parameter
311 (rename_variables): Keep inserting renames after the ones already
314 2009-07-28 Sebastian Pop <sebastian.pop@amd.com>
316 * graphite-sese-to-poly.c (compare_bb_depths): New.
317 (graphite_sort_dominated_info): New.
318 (build_scop_bbs_1): Call graphite_sort_dominated_info.
319 (build_scop_scattering): Fix comment.
321 2009-07-28 Sebastian Pop <sebastian.pop@amd.com>
323 * graphite.c (graphite_finalize): Call print_loops instead of
324 dump_function_to_file.
325 * testsuite/gcc.dg/graphite/graphite.exp: Fix formatting.
326 * testsuite/gcc.dg/graphite/pr35356-1.c: New. Look for the number of
327 loops generated in the graphite output file.
328 * testsuite/gcc.dg/graphite/pr35356-2.c: New.
329 * testsuite/gcc.dg/graphite/pr35356-3.c: New. XFAILed for now.
330 * testsuite/gfortran.dg/graphite/id-12.f: New.
332 2009-07-24 Li Feng <nemokingdom@gmail.com>
334 * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-8.c:
337 2009-07-24 Li Feng <nemokingdom@gmail.com>
338 Tobias Grosser <grosser@fim.uni-passau.de>
340 * graphite-sese-to-poly.c (pdr_add_alias_set): Use data reference's
341 alias set number build alias in ACCESSES polyhedron.
342 (build_alias_set_for_drs): New.
343 (build_pbb_drs): Added build_alias_set_for_drs.
344 * graphite-dependences.c (poly_drs_may_alias_p): New.
345 (graphite_carried_dependence_level_k): Check alias information
346 before building polyhedron.
348 2009-07-24 Tobias Grosser <grosser@fim.uni-passau.de>
350 * Makefile.in (lambda-code.o): Fix formatting.
352 2009-07-24 Tobias Grosser <grosser@fim.uni-passau.de>
354 * Merge from mainline (r149350-149952)
356 2009-07-18 Tobias Grosser <grosser@fim.uni-passau.de>
358 * graphite-poly.c (apply_poly_transforms): Move strip_mine
359 before interchange to prepare for loop blocking.
361 2009-07-18 Tobias Grosser <grosser@fim.uni-passau.de>
363 * graphite-poly.c (apply_poly_transforms): Add checks after every
365 * graphite-sese-to-poly.c (build_poly_scop): Remove check, as already
366 done in apply_poly_transforms.
368 2009-07-17 Konrad Trifunovic <konrad.trifunovic@gmail.com>
370 * graphite-dependences.c (build_lexicographically_gt_constraint):
371 Replace RES parameter with *RES.
372 (dependence_polyhedron_1): Pass an address of the parameter RES
373 instead of value of RES.
375 2009-07-16 Sebastian Pop <sebastian.pop@amd.com>
377 * graphite.c (graphite_finalize): Fix comment.
378 (graphite_transform_loops): Reset scev info after code generation
381 2009-07-16 Sebastian Pop <sebastian.pop@amd.com>
383 * graphite.c (graphite_finalize): Call scev_reset.
385 2009-07-16 Sebastian Pop <sebastian.pop@amd.com>
387 * graphite-clast-to-gimple.c (compute_cloog_iv_types): Do not create
388 GBB_CLOOG_IV_TYPES hash table twice.
389 * graphite-sese-to-poly.c (free_gimple_bb): Call free_data_refs.
390 (add_condition_to_domain): Clear GMP values.
392 2009-07-16 Sebastian Pop <sebastian.pop@amd.com>
394 * graphite-dependences.c: Fix formatting.
395 * graphite-poly.c (free_poly_dr): Also free PDR_DATA_CONTAINER.
396 (pbb_number_of_iterations): Free ppl_Linear_Expression.
397 * graphite-sese-to-poly.c: Fix formatting.
398 * graphite.c (graphite_transform_loops): Create the hash table
399 after the early return.
401 2009-07-16 Sebastian Pop <sebastian.pop@amd.com>
403 * testsuite/gcc.dg/graphite/id-14.c: New.
404 * testsuite/gcc.dg/graphite/pr40157.c: New.
405 * testsuite/gfortran.dg/graphite/id-11.f: New.
407 2009-07-16 Sebastian Pop <sebastian.pop@amd.com>
409 * graphite-sese-to-poly.c (nb_pbbs_in_loops): New.
410 (build_poly_scop): Return false when there are no pbbs within
411 loops to avoid to pass to cloog scops with no loops.
413 2009-07-16 Sebastian Pop <sebastian.pop@amd.com>
415 * graphite-sese-to-poly.c (build_pbb_scattering_polyhedrons): Avoid
416 useless test "i % 2".
417 (build_pbb_scattering_polyhedrons): Fix formatting.
418 (build_poly_dr): Same.
419 * graphite.c (graphite_transform_loops): Restructure.
421 2009-07-14 Razya Ladelsky <razya@il.ibm.com>
423 * tree-ssa-loop-manip.c (rewrite_phi_with_iv): Remove
424 reduction_list parameter.
425 (rewrite_all_phi_nodes_with_iv): Same.
426 (canonicalize_loop_ivs): Same.
427 * tree-parloops.c (struct brli): Removed.
428 (build_reduction_list_info): Removed.
429 (build_new_reduction): New.
430 (analyze_reduction_list): Removed.
431 (gather_scalar_reductions): Find reductions instead of phi
432 nodes that can't be canonicalized.
433 (try_create_reduction_list): Remove reduction_list parameter.
434 (gen_parallel_loop): Same.
435 (parallelize_loops): Remove analyze_reductions variable,
436 initialization and free.
437 Change reduction_list htab initialization to reduction_info
438 elements instead of ssa names.
439 Call try_create_reduction_list and gen_parallel_loop without
440 analyzed_reduction argument.
441 * graphite-clast-to-gimple (graphite_loop_normal_form): Call
442 canonicalize_loop_ivs with one less argument.
443 * tree-flow.h (canonicalize_loop_ivs): Remove one argument.
445 2009-07-14 Konrad Trifunovic <konrad.trifunovic@gmail.com>
447 * graphite-dependences.c (new_poly_dr_pair): New.
448 (dependence_polyhedron): Renamed into dependence_polyhedron_1.
449 (new_poly_dr_pair): New.
450 (eq_poly_dr_pair_p): New.
451 (hash_poly_dr_pair_p): New.
452 * graphite-dependences.h (struct poly_dr_pair): New.
453 (eq_poly_dr_pair_p): Declared.
454 (hash_poly_dr_pair_p): Declared.
455 * graphite-poly.c (new_scop): Initialize SCOP_ORIGINAL_PDR_PAIRS.
456 (free_scop): Free SCOP_ORIGINAL_PDR_PAIRS.
457 * graphite-poly.h (struct scop): Add original_pdr_pairs field.
458 * Makefile.in (graphite-poly.o): Add dependence on
459 graphite-dependences.h.
461 2009-07-14 Sebastian Pop <sebastian.pop@amd.com>
463 * graphite-scop-detection.c (graphite_can_represent_scev): Do not let
464 polynomials of degree > 1 pass to Graphite.
465 * tree-chrec.c (scev_is_linear_expression): Call
466 evolution_function_is_affine_multivariate_p.
467 * testsuite/gfortran.dg/graphite/id-10.f90: New.
469 2009-07-14 Sebastian Pop <sebastian.pop@amd.com>
471 * tree-scalar-evolution.c (compute_overall_effect_of_inner_loop):
472 Instantiate scevs varying in outer loops.
473 * testsuite/gfortran.dg/graphite/id-9.f: Correct testcase.
475 2009-07-14 Sebastian Pop <sebastian.pop@amd.com>
477 * graphite-sese-to-poly.c (build_loop_iteration_domains): Do not insert
478 redundant constraint.
480 2009-07-14 Sebastian Pop <sebastian.pop@amd.com>
482 * testsuite/gcc.dg/graphite/graphite.exp: Fix comments.
483 * testsuite/gfortran.dg/graphite/graphite.exp: Trigger actions
484 based on the file names as in the C testsuite.
485 * testsuite/gfortran.dg/graphite/block-1.f90: Fix patterns.
486 * testsuite/gfortran.dg/graphite/block-2.f: Same.
487 * testsuite/gfortran.dg/graphite/block-3.f90: Same.
488 * testsuite/gfortran.dg/graphite/block-4.f90: Same.
489 * testsuite/gfortran.dg/graphite/id-1.f90: Same.
490 * testsuite/gfortran.dg/graphite/id-2.f90: Same.
491 * testsuite/gfortran.dg/graphite/id-3.f90: Same.
492 * testsuite/gfortran.dg/graphite/id-4.f90: Same.
493 * testsuite/gfortran.dg/graphite/id-6.f: Same.
494 * testsuite/gfortran.dg/graphite/id-9.f: Same.
495 * testsuite/gfortran.dg/graphite/interchange-1.f: Same.
496 * testsuite/gfortran.dg/graphite/interchange-2.f: Same.
497 * testsuite/gfortran.dg/graphite/scop-1.f: Same.
499 2009-07-14 Sebastian Pop <sebastian.pop@amd.com>
501 * sese.c (expand_scalar_variables_call): New.
502 (expand_scalar_variables_ssa_name): Handle calls in expander.
504 2009-07-13 Sebastian Pop <sebastian.pop@amd.com>
506 * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-6.c:
507 Expect to see the pattern twice.
508 * testsuite/gcc.dg/graphite/interchange-0.c: Un-XFAIL.
509 * testsuite/gcc.dg/graphite/interchange-5.c: Same.
510 * testsuite/gcc.dg/graphite/interchange-6.c: Same.
512 2009-07-13 Sebastian Pop <sebastian.pop@amd.com>
514 * testsuite/gcc.dg/graphite/id-10.c: New.
515 * testsuite/gcc.dg/graphite/id-12.c: New.
516 * testsuite/gfortran.dg/graphite/id-7.f: New.
517 * testsuite/gfortran.dg/graphite/id-8.f: New.
519 2009-07-13 Sebastian Pop <sebastian.pop@amd.com>
521 * graphite-sese-to-poly.c (pdr_add_data_dimensions): Fix division by
524 2009-07-13 Sebastian Pop <sebastian.pop@amd.com>
526 * sese.c (rename_variables_in_stmt): Call fold_convert during renaming.
528 2009-07-13 Sebastian Pop <sebastian.pop@amd.com>
530 * sese.c (expand_scalar_variables_stmt): Avoid unnecessary expansion.
532 2009-07-10 Sebastian Pop <sebastian.pop@amd.com>
534 * graphite-sese-to-poly.c (pdr_add_memory_accesses): Fix order of
535 building PDR subscripts.
537 2009-07-10 Sebastian Pop <sebastian.pop@amd.com>
539 * graphite-sese-to-poly.c (pdr_add_data_dimensions): Fix the
540 computation of array sizes.
542 2009-07-10 Sebastian Pop <sebastian.pop@amd.com>
544 * graphite-sese-to-poly.c (add_param_constraints): Disabled.
546 2009-07-10 Tobias Grosser <grosser@fim.uni-passau.de>
548 * graphite-dependences.c (map_into_dep_poly, map_dr_into_dep_poly,
549 build_pairwise_constraint, dr_equality_constraints,
550 build_pairwise_scheduling_equality,
551 build_pairwise_scheduling_inequality, lexicographically_gt_p,
552 build_lexicographically_gt_constraint, dependence_polyhedron,
553 graphite_legal_transform_dr, graphite_carried_dependence_level_k):
554 Move from NNC_Polyhedron to C_Polyhedron.
555 * graphite-interchange.c (compute_array_size_poly,
556 gather_access_strides): Dito.
557 * graphite-poly.c (apply_poly_transforms, new_poly_dr, free_poly_bb,
558 free_scop, pbb_number_of_iterations): Dito.
559 * graphite-poly.h (struct poly_dr, pdr_nb_subscripts, struct poly_bb,
560 pbb_dim_iter_domain, struct scop): Dito.
561 * graphite-ppl.c (new_Constraint_System_from_Cloog_Matrix,
562 new_Cloog_Domain_from_ppl_Polyhedron,
563 new_Cloog_Domain_from_ppl_Pointset_Powerset, ppl_set_coef_gmp,
564 ppl_insert_dimensions_pointset, ppl_insert_dimensions_pointset,
565 ppl_strip_loop, ppl_strip_loop, ppl_print_polyhedron_matrix,
566 ppl_print_powerset_matrix, debug_ppl_polyhedron_matrix,
567 debug_ppl_powerset_matrix, ppl_read_polyhedron_matrix): Dito.
568 * graphite-ppl.h (ppl_Pointset_Powerset_C_Polyhedron_t,
569 new_C_Polyhedron_from_Cloog_Matrix, ppl_print_powerset_matrix,
570 debug_ppl_powerset_matrix, ppl_insert_dimensions_pointset): Dito.
571 * graphite-sese-to-poly.c (build_pbb_scattering_polyhedrons,
572 build_loop_iteration_domains, ppl_constraint_type_from_tree_code,
573 add_condition_to_domain, add_condition_to_pbb, build_scop_context,
574 build_scop_iteration_domain, build_poly_dr): Dito
576 2009-07-09 Sebastian Pop <sebastian.pop@amd.com>
578 * testsuite/gcc.dg/graphite/graphite.exp: Added a rule to execute
580 * testsuite/gcc.dg/graphite/run-id-1.c: New.
582 2009-07-09 Sebastian Pop <sebastian.pop@amd.com>
584 * graphite-sese-to-poly.c (build_loop_iteration_domains): Add the
585 positivity constraint on the symbolic number of iterations.
587 2009-07-09 Sebastian Pop <sebastian.pop@amd.com>
589 * graphite-sese-to-poly.c (build_loop_iteration_domains): Rewrite.
591 2009-07-09 Sebastian Pop <sebastian.pop@amd.com>
592 Tobias Grosser <grosser@fim.uni-passau.de>
594 * graphite-clast-to-gimple.c (build_scop_context): Removed.
595 (build_cloog_prog): Directly use SCOP_CONTEXT.
596 * graphite-poly.c (new_scop): Initialize SCOP_CONTEXT.
597 (free_scop): Free SCOP_CONTEXT.
598 (print_scop_context): New.
599 (print_scop): Call print_scop_context.
600 (debug_scop_context): New.
601 * graphite-poly.h (print_scop_context, debug_scop_context): Declared.
602 (struct scop): Added field context.
604 * graphite-sese-to-poly.c (add_param_constraints): New.
605 (build_scop_context): New.
606 (build_poly_scop): Call build_scop_context.
608 2009-07-09 Sebastian Pop <sebastian.pop@amd.com>
610 * graphite-clast-to-gimple.c (gmp_cst_to_tree): Moved...
611 * graphite-ppl.c (ppl_set_inhomogeneous_gmp, ppl_set_coef_gmp): New.
612 (ppl_set_inhomogeneous, ppl_set_coef): Moved...
613 * graphite-ppl.h: Include double-int.h and tree.h.
614 (ppl_set_inhomogeneous_gmp, ppl_set_coef_gmp): Declared.
615 (ppl_set_inhomogeneous, ppl_set_coef): ...here.
616 (gmp_cst_to_tree): ...here. Reimplemented using mpz_get_double_int.
617 (tree_int_to_gmp, ppl_set_inhomogeneous_tree, ppl_set_coef_tree): New.
619 2009-07-09 Sebastian Pop <sebastian.pop@amd.com>
621 * graphite-clast-to-gimple.c (clast_to_gcc_expression_red): Generate
622 POINTER_PLUS_EXPR for pointer types.
623 (clast_to_gcc_expression): Same.
625 2009-07-09 Sebastian Pop <sebastian.pop@amd.com>
627 * graphite-poly.c (print_scattering_function): Early return when
628 PBB_TRANSFORMED_SCATTERING is not initialized.
629 (print_pbb_domain): Early return when PBB_DOMAIN is not initialized.
631 2009-07-08 Sebastian Pop <sebastian.pop@amd.com>
633 * tree-parloops.c (analyze_reduction_list): Remove unused variable
636 2009-07-08 Razya Ladelsky <razya@il.ibm.com>
638 * tree-parloops.c (analyze_reduction_list): Change return
640 (try_create_reduction_list): Move the call to
641 analyze_reduction_list to the beginining.
642 Call reduction_phi with analyzed_reductions as argument
643 instead of reduction_list.
645 2009-07-08 Tobias Grosser <grosser@fim.uni-passau.de>
647 * Merge from mainline (r148296:149346)
649 2009-07-07 Sebastian Pop <sebastian.pop@amd.com>
651 * graphite-scop-detection.c (graphite_can_represent_init): New.
652 (graphite_can_represent_scev): Call graphite_can_represent_init:
653 check that the initial value does not contain multiplications of
655 (stmt_has_simple_data_refs_p): New.
656 (stmt_simple_for_scop_p): Call stmt_simple_for_scop_p.
657 (is_simple_operand): Fix formatting.
658 * graphite-sese-to-poly.c (try_generate_gimple_bb): Fix formatting.
660 2009-07-07 Sebastian Pop <sebastian.pop@amd.com>
662 * testsuite/gcc.dg/graphite/id-13.c: New.
663 * graphite-sese-to-poly.c (graphite_stmt_p): Do not call
664 analyze_scalar_evolution, use scalar_evolution_in_region.
665 (scan_tree_for_params_right_scev): Add extra assert.
666 (parameter_index_in_region_1): Split from parameter_index_in_region.
667 (idx_record_params): Use scalar_evolution_in_region.
668 (find_params_in_bb): Same.
669 (find_scop_parameters): Same.
670 (build_loop_iteration_domains): Same.
671 (create_linear_expr_from_tree): Same.
672 * sese.c (scalar_evolution_in_region): New.
673 * sese.h (scalar_evolution_in_region): Declared.
674 (defined_in_sese_p): New.
675 * tree-scalar-evolution.c (compute_overall_effect_of_inner_loop): Not
677 * tree-scalar-evolution.h (compute_overall_effect_of_inner_loop):
680 2009-07-07 Sebastian Pop <sebastian.pop@amd.com>
682 * Makefile.in: Replace dependences on tree-chrec.h with SCEV_H.
683 TREE_DATA_REF_H also implies SCEV_H.
685 2009-07-07 Sebastian Pop <sebastian.pop@amd.com>
687 * graphite-poly.c (print_scop_params): New.
688 (print_scop): Call print_scop_params.
689 (debug_scop_params): New.
690 * graphite-poly.h (print_scop_params, debug_scop_params): Declared.
692 2009-07-07 Li Feng <nemokingdom@gmail.com>
694 * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-4.c: New.
695 * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-5.c: New.
696 * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-6.c: New.
697 * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-7.c: New.
698 * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-8.c: New.
699 * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-9.c: New.
701 2009-07-07 Li Feng <nemokingdom@gmail.com>
703 * graphite-clast-to-gimple.c (mark_loops_parallel): Dump information
704 for dependency checking part.
705 * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-1.c: Add
706 tests for dependency checking.
707 * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-2.c: Ditto.
708 * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-3.c: Ditto.
709 * testsuite/gcc.dg/graphite/graphite_autopar/graphite_autopar.exp: Add
710 flag -fdump-tree-graphite-all for autopar testsuites.
712 2009-07-06 Sebastian Pop <sebastian.pop@amd.com>
714 * Makefile.in (tree-ssa-loop-manip.o): Depends on langhooks.h.
715 * tree-parloops.c (rewrite_phi_with_iv, rewrite_all_phi_nodes_with_iv,
716 canonicalize_loop_ivs): Moved...
717 * tree-ssa-loop-manip.c: ... here. Include langhooks.h.
719 2009-07-06 Sebastian Pop <sebastian.pop@amd.com>
721 * tree-parloops.c (try_create_reduction_list): Pass an extra
722 argument analyzed_reductions. Call analyze_reduction_list.
723 (gen_parallel_loop): Do not call analyze_reduction_list.
724 (parallelize_loops): Init and finalize analyzed_reductions.
726 2009-07-06 Li Feng <nemokingdom@gmail.com>
728 * testsuite/gcc.dg/graphite/graphite_autopar/graphite_autopar.exp:
729 Added flag -fno-loop-strip-mine for autopar testcase.
731 2009-07-04 Li Feng <nemokingdom@gmail.com>
733 * graphite-dependences.c (graphite_carried_dependence_level_k): Use
734 transformed scattering dimension instead of unmatch orignal when
735 calling dependence_polyhedron.
737 2009-06-30 Sebastian Pop <sebastian.pop@amd.com>
739 * opts.c (decode_options): Enable flag_loop_strip_mine at -O2.
741 2009-06-30 Sebastian Pop <sebastian.pop@amd.com>
743 * graphite-poly.c (pbb_number_of_iterations): Check for returned
744 value 1 from ppl_Pointset_Powerset_NNC_Polyhedron_maximize.
746 2009-06-30 Sebastian Pop <sebastian.pop@amd.com>
748 * graphite-blocking.c (pbb_strip_mine_profitable_p): New.
749 (pbb_do_strip_mine): Call pbb_strip_mine_profitable_p.
750 * graphite-poly.c (pbb_number_of_iterations): New.
751 * graphite-poly.h (pbb_number_of_iterations): Declared.
752 (pbb_iterator_dim, pbb_parameter_dim): New.
754 2009-06-29 Sebastian Pop <sebastian.pop@amd.com>
756 * graphite-clast-to-gimple.c (graphite_create_new_loop): Revert the
757 last commit on type of lower and upper bound of loops.
759 2009-06-29 Li Feng <nemokingdom@gmail.com>
761 * Makefile.in (graphite-clast-to-gimple.o): Added dependence on
762 graphite-dependences.h.
763 * graphite-clast-to-gimple.c (new_bb_pbb_def): New.
764 (mark_bb_with_pbb): New.
765 (get_stmtfor_depth): New.
766 (find_pbb_via_hash): New.
767 (dependency_in_loop_p): New.
768 (mark_loops_parallel): New.
769 (free_aux_in_new_loops): New.
770 (translate_clast): Add parameter BB_PBB_MAPPING. Mark newly created
771 bb with it's relevant pbb. Mark newly created loops. Remove mark
772 innermost loop parallel without checking.
773 (gloog): Add parameter BB_PBB_MAPPING.
774 * graphite-clast-to-gimple.h (struct bb_pbb_def): New.
775 (gloog): Change declaration.
776 (mark_loop_parallel): Make extern.
777 (free_aux_in_new_loops): Declare.
778 (bb_pbb_map_hash): New.
779 (eq_bb_pbb_map): New.
780 * graphite.c (graphite_transform_loops): Added BB_PBB_MAPPING. Trigger
781 auto parallelization when flag_graphite_force_parallel is set.
782 (graphite_finalize): Added free_aux_in_new_loops.
783 * tree-parloops.c (parallelize_loops): Only generate parallel code for
784 the innermost loop that marked parallel. Use
785 flag_graphite_force_parallel instead of loop->can_be_parallel.
786 (loop_parallel_p): Move inner most checking out of function.
788 2009-06-26 Sebastian Pop <sebastian.pop@amd.com>
790 * graphite-clast-to-gimple.c (graphite_create_new_loop): Make the
791 type of lower and upper bound of loops signed long int.
793 2009-06-26 Sebastian Pop <sebastian.pop@amd.com>
795 * cfgloopmanip.c (create_empty_loop_on_edge): Gimplify the loop exit
796 expression outside the loop.
798 2009-06-26 Sebastian Pop <sebastian.pop@amd.com>
800 * gcc.dg/graphite/interchange-8.c: New.
802 2009-06-26 Sebastian Pop <sebastian.pop@amd.com>
804 * gcc.dg/graphite/interchange-0.c: XFailed.
805 * gcc.dg/graphite/interchange-5.c: XFailed.
806 * gcc.dg/graphite/interchange-6.c: XFailed.
808 2009-06-26 Sebastian Pop <sebastian.pop@amd.com>
810 * graphite-interchange.c (compute_array_size_poly): The end of the
811 recursion should return 1.
813 2009-06-26 Sebastian Pop <sebastian.pop@amd.com>
815 * graphite-interchange.c (compute_array_size_cstr): Allow the
816 subscript multiplier to be -1.
817 (compute_array_size): Use PDR_DATA_CONTAINER and not PDR_ACCESSES.
818 * graphite-poly.c (new_poly_dr): Takes an extra argument for the
819 data_container. Initializes PDR_DATA_CONTAINER.
820 (print_pdr_access_layout): New.
821 (print_pdr): Call print_pdr_access_layout. Print PDR_DATA_CONTAINER.
822 * graphite-poly.h (struct poly_dr): Adjust comment. Add a new field
824 (PDR_DATA_CONTAINER): New.
825 (new_poly_dr): Update declaration.
826 * graphite-sese-to-poly.c (pdr_add_data_dimensions): New.
827 (build_poly_dr): Call pdr_add_data_dimensions.
829 2009-06-26 Sebastian Pop <sebastian.pop@amd.com>
831 * graphite-poly.h (struct poly_dr): Fix comment.
832 * graphite-sese-to-poly.c (pdr_add_alias_set): New.
833 (pdr_add_memory_accesses): New.
834 (build_poly_dr): Call pdr_add_memory_accesses and pdr_add_alias_set.
836 2009-06-26 Sebastian Pop <sebastian.pop@amd.com>
838 * graphite-poly.c (print_pdrs, debug_pdrs): New.
839 (print_pbb): Add call to print_pdrs.
840 * graphite-poly.h (print_pdrs, debug_pdrs): Declared.
842 2009-06-24 Konrad Trifunovic <konrad.trifunovic@gmail.com>
843 Li Feng <nemokingdom@gmail.com>
845 * graphite-dependences.c (graphite_carried_dependence_level_k): New.
846 (dependency_between_pbbs_p): New.
847 (lexicographically_gt_p): Assure !empty_p before polyhedron
849 (build_lexicographically_gt_constraint): Correct lexicographically
851 * graphite-dependences.h: New.
852 * Makefile.in (graphite-dependences.o): Add graphite-dependences.h.
854 2009-06-24 Sebastian Pop <sebastian.pop@amd.com>
856 * graphite-clast-to-gimple.c (print_clast_stmt): New.
857 (gloog): Print to dump_file the generated clast.
858 * graphite-clast-to-gimple.h (print_clast_stmt): Declared.
859 * graphite-interchange.c (pbb_do_interchange): Fix dump formatting.
861 2009-06-24 Sebastian Pop <sebastian.pop@amd.com>
863 * graphite-poly.c (extend_scattering): Increment
864 PBB_NB_LOCAL_VARIABLES by the number of added dimensions.
866 2009-06-24 Sebastian Pop <sebastian.pop@amd.com>
868 * graphite-interchange.c (compute_array_size_poly): Added exit of
869 recursion condition. Continue iterating even after the first equality.
870 (compute_array_size): Same.
872 2009-06-24 Li Feng <nemokingdom@gmail.com>
874 * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-1.c: Update
875 -fdump-tree-final_cleanup to -fdump-tree-optimized.
876 * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-2.c: Ditto.
877 * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-3.c: Ditto.
878 * testsuite/gcc.dg/graphite/graphite_autopar/graphite_autopar.exp: Ditto.
880 2009-06-23 Sebastian Pop <sebastian.pop@amd.com>
882 * sese.c (expand_scalar_variables_stmt): Expand scalar variables
883 only when the use verifies is_gimple_reg.
885 2009-06-23 Sebastian Pop <sebastian.pop@amd.com>
887 * graphite-clast-to-gimple.c (build_cloog_prog): Fix memory corruption.
888 Allocate scaldims after call to unify_scattering_dimensions.
890 2009-06-23 Sebastian Pop <sebastian.pop@amd.com>
892 * graphite-clast-to-gimple.c (translate_clast): Fix memory leak.
894 2009-06-23 Sebastian Pop <sebastian.pop@amd.com>
895 Albert Cohen <albert.cohen@inria.fr>
897 * graphite-blocking.c (pbb_strip_mine_loop_depth): Do not use local
898 variables for the strip mining.
900 2009-06-23 Sebastian Pop <sebastian.pop@amd.com>
901 Pranav Garg <pranav.garg2107@gmail.com>
903 * Makefile.in (OBJS-common): Added graphite-blocking.o.
904 (graphite-sese-to-poly.o): Moved down to be in lexicographical order.
905 (graphite-blocking.o): New rule.
906 (graphite-poly.o, graphite-ppl.o): Moved to be in lexicographical order.
907 * graphite-blocking.c: New.
908 * graphite-poly.c (apply_poly_transforms): Call scop_do_strip_mine for
909 flag_loop_strip_mine.
910 (psct_scattering_dim_for_loop_depth): New.
911 * graphite-poly.h (scop_do_strip_mine): Declared.
912 (psct_add_local_variable): Increment PBB_NB_LOCAL_VARIABLES.
913 * tree-ssa-loop.c (gate_graphite_transforms): Do not fail when using
914 flag_loop_strip_mine.
916 2009-06-23 Sebastian Pop <sebastian.pop@amd.com>
918 * graphite-poly.c (extend_scattering): Avoid initializing and freeing
919 a GMP value and a PPL coefficient at each iteration of a loop.
921 2009-06-23 Sebastian Pop <sebastian.pop@amd.com>
923 * graphite-dependences.c (dependence_polyhedron): Do not use
924 pbb_nb_scattering_dims anymore. Use pbb_nb_scattering_orig and
925 pbb_nb_scattering_transform.
926 (graphite_legal_transform_dr): Same.
927 * graphite-poly.c (extend_scattering): Same.
928 (unify_scattering_dimensions): Same.
929 (print_scattering_function): Same.
930 (new_poly_bb): Initialize PBB_NB_SCATTERING_TRANSFORM and
931 PBB_NB_LOCAL_VARIABLES.
932 * graphite-poly.h (pbb_nb_scattering): Removed declaration.
933 (struct poly_bb): Added nb_local_variables and nb_scattering_transform.
934 (PBB_NB_LOCAL_VARIABLES, PBB_NB_SCATTERING_TRANSFORM): New.
935 (pbb_nb_scattering_orig, pbb_nb_scattering_transform): New.
936 (pbb_nb_scattering_dims, pbb_nb_scattering): Removed.
937 (pbb_nb_scattering_transform): New.
938 (pbb_nb_local_vars): Return PBB_NB_LOCAL_VARIABLES.
939 (psco_scattering_dim): Add assert on parameters.
940 (psct_scattering_dim): Same.
941 (psct_scattering_dim_for_loop_depth): Declared.
942 (psct_local_var_dim): New.
943 (psco_iterator_dim, psco_parameter_dim): Add assert on parameters.
944 (psct_iterator_dim, psct_parameter_dim): Same. To maintain the
945 correct layout, call pbb_nb_local_vars.
946 (psct_add_local_variable, psct_add_scattering_dimension): New.
947 * graphite-sese-to-poly.c (build_pbb_scattering_polyhedrons):
948 Initialize PBB_NB_SCATTERING_TRANSFORM.
950 2009-06-23 Sebastian Pop <sebastian.pop@amd.com>
952 * graphite-ppl.c (set_inhomogeneous): Renamed ppl_set_inhomogeneous.
953 (set_coef): Renamed ppl_set_coef.
954 * graphite-ppl.h (ppl_set_inhomogeneous, ppl_set_coef): Declared.
956 2009-06-23 Sebastian Pop <sebastian.pop@amd.com>
958 * graphite-dependences.c (build_pairwise_scheduling_inequality): Don't
959 test a boolean against 1.
960 * graphite-interchange.c (pbb_interchange_loop_depths): Do not build
961 a new polyhedron for the PBB_TRANSFORMED_SCATTERING.
962 (pbb_do_interchange): Returns true when a transform has been performed.
963 (scop_do_interchange): Same.
964 * graphite-poly.c (apply_poly_transforms): Use the return value of
966 * graphite-poly.h (scop_do_interchange): Update declaration.
968 2009-06-23 Tobias Grosser <grosser@fim.uni-passau.de>
970 * graphite-clast-to-gimple.c (gloog): Reset loop->aux right
972 * sese.c (sese_reset_aux_in_loops): New.
973 * sese.h (sese_reset_aux_in_loops): New.
975 2009-06-19 Sebastian Pop <sebastian.pop@amd.com>
977 * graphite-sese-to-poly.c (scan_tree_for_params_int): Pass in the
978 multiplier and multiply the constant by the multiplier.
979 (scan_tree_for_params): Bound the multiplier to its MULT_EXPR.
980 (build_poly_dr): Do not use the multiplier to define the subscript.
982 2009-06-19 Sebastian Pop <sebastian.pop@amd.com>
984 * graphite-poly.c (new_poly_dr): Pass an extra argument for the
985 compiler's data reference. Initialize PDR_CDR.
986 (print_pdr): Call dump_data_reference.
987 * graphite-poly.h (struct poly_dr): Rename black_box into pbb.
988 Add compiler_dr field.
989 (PDR_BB): Renamed PDR_PBB.
991 * graphite-sese-to-poly.c (build_poly_dr): Pass to new_poly_dr
992 GCC's data reference representation.
993 * tree-data-ref.c (debug_data_references, debug_data_reference): New.
994 * tree-data-ref.h (debug_data_references, debug_data_reference): Decl.
996 2009-06-19 Sebastian Pop <sebastian.pop@amd.com>
998 * graphite-poly.c (print_scattering_function): Also print the layout.
999 * graphite-poly.h (pbb_nb_local_vars): New.
1001 2009-06-19 Sebastian Pop <sebastian.pop@amd.com>
1003 * graphite-poly.c (print_pbb_domain): Also print the layout names.
1005 2009-06-19 Sebastian Pop <sebastian.pop@amd.com>
1007 * graphite-poly.c (print_pdr, debug_pdr): New.
1008 * graphite-poly.h (print_pdr, debug_pdr): Declared.
1009 (PDR_BASE): Removed.
1011 2009-06-18 Sebastian Pop <sebastian.pop@amd.com>
1013 * gcc/testsuite/gcc.dg/graphite/interchange-{1..7}.c: New avatars of
1016 2009-06-18 Sebastian Pop <sebastian.pop@amd.com>
1018 * graphite-interchange.c (compute_subscript): Allow also -1 in the
1019 subscript identification column.
1020 (pbb_do_interchange): Print to dump_file that some loops "will be
1021 interchanged". Rely on that chain of characters in the testcases.
1022 * gcc.dg/graphite/interchange-0.c: New.
1023 * gcc.dg/graphite/graphite.exp: Iterate over the testsuite
1024 interchange-*.c files and compile them with -floop-interchange.
1026 2009-06-18 Pranav Garg <pranav.garg2107@gmail.com>
1028 * graphite-interchange.c (interchange_profitable_p): Renamed
1029 pbb_interchange_profitable_p.
1031 2009-06-18 Sebastian Pop <sebastian.pop@amd.com>
1032 Harsha Jagasia <harsha.jagasia@amd.com>
1033 Pranav Garg <pranav.garg2107@gmail.com>
1035 * graphite-interchange.c (interchange_profitable_p): Make static.
1036 (pbb_interchange_loop_depths, pbb_do_interchange,
1037 scop_do_interchange): New.
1038 * graphite-poly.c (apply_poly_transforms): Call scop_do_interchange
1039 for flag_loop_interchange.
1040 * graphite-poly.h (scop_do_interchange): Declared.
1041 * tree-ssa-loop.c (gate_graphite_transforms): Do not fail when
1042 flag_loop_interchange is used.
1044 2009-06-18 Sebastian Pop <sebastian.pop@amd.com>
1046 * graphite-dependences.c (dependence_polyhedron): Update use of
1047 pbb_nb_scattering_dims.
1048 * graphite-poly.h (pbb_nb_scattering_dims): Do not pass SCOP.
1049 (pbb_nb_scattering): Update use of pbb_nb_scattering_dims.
1050 (psco_scattering_dim, psct_scattering_dim, psco_iterator_dim,
1051 psct_iterator_dim, psco_parameter_dim, psct_parameter_dim): New.
1053 2009-06-16 Sebastian Pop <sebastian.pop@amd.com>
1055 * graphite.c: Cleanup foo.
1057 2009-06-16 Sebastian Pop <sebastian.pop@amd.com>
1059 * Merge from mainline (r143684:148293).
1060 * Disabled libpcp until it gets fixed.
1062 2009-06-05 Sebastian Pop <sebastian.pop@amd.com>
1063 Harsha Jagasia <harsha.jagasia@amd.com>
1065 * graphite-interchange.c: New.
1066 * Makefile.in (graphite-interchange.o): New.
1067 * graphite-poly.h (interchange_profitable_p): Declared.
1068 * graphite-ppl.h (value_max): New.
1070 2009-06-04 Sebastian Pop <sebastian.pop@amd.com>
1072 * graphite-dependences.c (dependence_polyhedron): Use pdr_dim.
1073 * graphite-poly.h: Fix some comments.
1077 2009-06-04 Sebastian Pop <sebastian.pop@amd.com>
1080 (pdr_accessp_nb_subscripts): Renamed pdr_nb_subscripts.
1081 (pdr_accessp_nb_iterators): Renamed pdr_dim_iter_domain.
1082 (pdr_accessp_nb_params): Renamed pdr_nb_params.
1083 (pdr_accessp_alias_set_dim): Renamed pdr_alias_set_dim.
1084 (pdr_accessp_subscript_dim): Renamed pdr_subscript_dim.
1085 (pdr_accessp_iterator_dim): Renamed pdr_iterator_dim.
1086 (pdr_accessp_param_dim): Renamed pdr_parameter_dim.
1087 (pbb_nb_loops): Renamed pbb_dim_iter_domain.
1088 * graphite-clast-to-gimple.c: Same.
1089 * graphite-dependences.c: Same.
1090 * graphite-poly.c: Same.
1091 * graphite-sese-to-poly.c: Same.
1093 2009-06-03 Sebastian Pop <sebastian.pop@amd.com>
1095 * graphite-clast-to-gimple.c (build_iv_mapping): Insert full
1096 expressions for an IV rename, as returned by clast_to_gcc_expression.
1097 (copy_renames): Rename new_name to expr.
1098 * sese.c (debug_rename_elt): Same.
1101 (sese_adjust_liveout_phis): Call force_gimple_operand before using
1102 the information from the rename map.
1103 (rename_variables_in_stmt): Same.
1104 (add_loop_exit_phis): Rename new_name to expr.
1105 (insert_loop_close_phis): Same.
1106 (add_guard_exit_phis): Same. Call force_gimple_operand.
1107 * sese.h (struct rename_map_elt): Rename new_name to expr.
1108 (new_rename_map_elt): Same.
1110 2009-06-03 Sebastian Pop <sebastian.pop@amd.com>
1112 * graphite-clast-to-gimple.c (build_iv_mapping): Use set_rename.
1113 * sese.c (set_rename): Make it extern.
1114 * sese.h (set_rename): Declared.
1116 2009-06-03 Sebastian Pop <sebastian.pop@amd.com>
1118 * graphite-poly.c (extend_scattering): Free values.
1119 * graphite-ppl.c (new_Cloog_Domain_from_ppl_Pointset_Powerset):
1121 (ppl_print_powerset_matrix): Same.
1122 * graphite-scop-detection.c (free_scops_1): New.
1123 (limit_scops): Call free_scops_1.
1124 * graphite-sese-to-poly.c (build_scop_bbs_1): Free dom.
1125 (build_poly_dr): Free PPL coefficients.
1126 * tree-parloops.c (rewrite_all_phi_nodes_with_iv): Free bbs.
1128 2009-06-02 Sebastian Pop <sebastian.pop@amd.com>
1130 * graphite-dependences.c: New.
1131 * graphite-data-ref.c: Removed.
1132 * graphite-data-ref.h: Removed.
1133 * Makefile.in (graphite-data-ref.o): Removed.
1134 (graphite-dependences.o): Added.
1135 * graphite-clast-to-gimple.c: Remove dependence on graphite-data-ref.h.
1136 * graphite-poly.c: Same.
1137 Move the data dependence testing to graphite-dependences.c.
1139 2009-05-19 Tobias Grosser <grosser@fim.uni-passau.de>
1141 * graphite-scop-detection.c (graphite_can_represent_loop): Renamed
1142 from graphite_cannot_represent_loop. Code refactored.
1143 (scopdet_basic_block_info): Call graphite_can_represent_loop.
1145 2009-05-17 Li Feng <nemokingdom@gmail.com>
1147 * testsuite/gcc.dg/graphite/graphite_autopar/graphite_autopar.exp:
1148 Cover all the testcases (not only the filtered ones).
1150 2009-05-17 Tobias Grosser <grosser@fim.uni-passau.de>
1152 * graphite-scop-detection.c (stmt_simple_for_scop_p): Remove
1153 unnecessary check. Update comments. Move check for REAL_TYPE here.
1154 (harmful_stmt_in_bb): Remove checks for conditions. This is already
1155 done in (stmt_simple_for_scop_p).
1157 2009-05-14 Tobias Grosser <grosser@fim.uni-passau.de>
1159 * graphite.c (print_global_statistics): New.
1160 (print_graphite_scop_statistic): New.
1161 (print_graphite_statistics): New.
1162 (graphite_initialize, graphite_transform_loops): Print statistics.
1163 * graphite-scop-detection (build_scops): Print statistics.
1164 (print_graphite_scop_statistics): New.
1165 (print_graphite_statistics): New.
1167 2009-05-13 Sebastian Pop <sebastian.pop@amd.com>
1169 * graphite-clast-to-gimple.c (struct clast_name_index): Removed.
1170 (debug_clast_name_index): Removed.
1171 (debug_clast_name_indexes_1): Removed.
1172 (debug_clast_name_indexes): Removed.
1173 (clast_name_index_elt_info): Removed.
1174 (eq_clast_name_indexes): Removed.
1175 (clast_name_to_index): Removed.
1176 (new_clast_name_index): Removed.
1177 (save_clast_name_index): Removed.
1178 (save_var_name): Moved...
1179 (init_sese_params_index): Removed.
1180 (clast_name_to_gcc): Remove use of name_tree.
1181 (initialize_cloog_names): Same.
1182 (gloog): Do not call init_sese_params_index.
1183 * graphite-sese-to-poly.c (save_var_name): ...here.
1184 (parameter_index_in_region): New.
1185 * sese.c (new_sese): Initialize SESE_PARAMS_NAMES.
1186 (parameter_index_in_region): Removed.
1187 (is_parameter): Remove use of name_tree.
1188 * sese.h (struct name_tree): Removed.
1189 (struct sese): Remove use of name_tree. New field params_names.
1190 (SESE_PARAMS_NAMES): New.
1191 (SESE_PARAMS): Remove duplicate.
1192 (parameter_index_in_region): Removed.
1193 (sese_nb_params): Remove use of name_tree.
1194 (struct clast_name_index): New.
1195 (new_clast_name_index): New.
1196 (clast_name_to_index): New.
1197 (save_clast_name_index): New.
1198 (debug_clast_name_index): New.
1199 (debug_clast_name_indexes_1): New.
1200 (debug_clast_name_indexes): New.
1201 (clast_name_index_elt_info): New.
1202 (eq_clast_name_indexes): New.
1204 2009-05-13 Sebastian Pop <sebastian.pop@amd.com>
1206 * graphite-clast-to-gimple.c (compute_cloog_iv_types_1): Call
1207 pbb_to_depth_to_oldiv. Remove call to oldiv_for_loop.
1208 (graphite_loop_normal_form): Do not pass region. Do not
1209 initialize SESE_OLDIVS.
1210 (build_graphite_loop_normal_form): Update call to
1211 graphite_loop_normal_form.
1212 * sese.c (debug_oldivs): Removed.
1213 (new_sese): Do not initialize SESE_OLDIVS.
1214 (free_sese): Do not free SESE_OLDIVS.
1215 (oldiv_for_loop): Removed.
1216 * sese.h (struct sese): Remove old_ivs.
1217 (SESE_OLDIVS): Removed.
1218 (oldiv_for_loop): Removed.
1220 2009-05-13 Sebastian Pop <sebastian.pop@amd.com>
1222 * graphite-clast-to-gimple.c (clast_name_to_gcc): Pass newivs,
1223 remove ivstack. Remove call to loop_iv_stack_get_iv_from_name,
1224 replaced by a call to newivs_to_depth_to_newiv.
1225 (clast_to_gcc_expression): Pass newivs, remove ivstack.
1226 (clast_to_gcc_expression_red): Same.
1227 (gcc_type_for_clast_expr): Same.
1228 (gcc_type_for_clast_eq): Same.
1229 (graphite_translate_clast_equation): Same.
1230 (graphite_create_guard_cond_expr): Same.
1231 (graphite_create_new_guard): Same.
1232 (graphite_create_new_loop): Same.
1233 (build_iv_mapping): Same.
1234 (translate_clast): Same.
1236 (loop_iv_stack_patch_for_consts): Removed. *
1237 sese.c (iv_stack_entry_is_constant): Removed.
1238 (iv_stack_entry_is_iv): Removed.
1239 (loop_iv_stack_push_iv): Removed.
1240 (loop_iv_stack_insert_constant): Removed.
1241 (loop_iv_stack_pop): Removed.
1242 (loop_iv_stack_get_iv): Removed.
1243 (loop_iv_stack_get_iv_from_name): Removed.
1244 (debug_loop_iv_stack): Removed.
1245 (free_loop_iv_stack): Removed.
1246 (loop_iv_stack_remove_constants): Removed. *
1247 sese.h (iv_stack_entry_kind): Removed.
1248 (iv_stack_entry_data_union): Removed.
1249 (iv_stack_entry_struct): Removed.
1250 (iv_stack_entry_p): Removed.
1251 (debug_oldivs, debug_loop_iv_stack, loop_iv_stack_insert_constant,
1252 loop_iv_stack_get_iv_from_name, loop_iv_stack_push_iv,
1253 loop_iv_stack_get_iv, loop_iv_stack_remove_constants,
1254 loop_iv_stack_pop, free_loop_iv_stack): Removed.
1255 (gbb_loop_at_index): Fix indenting.
1256 (gbb_loop_index): Removed.
1258 2009-05-13 Sebastian Pop <sebastian.pop@amd.com>
1260 * graphite-clast-to-gimple.c (clast_name_to_gcc): Do not use strcmp.
1261 Call clast_name_to_index.
1263 2009-05-13 Sebastian Pop <sebastian.pop@amd.com>
1265 * graphite-clast-to-gimple.c (clast_name_to_gcc): Pass region,
1266 do not pass params. Get params from SESE_PARAMS.
1267 (clast_to_gcc_expression): Same.
1268 (clast_to_gcc_expression_red): Same.
1269 (gcc_type_for_clast_eq): Same.
1270 (graphite_translate_clast_equation): Same.
1271 (graphite_create_new_loop): Same.
1272 * sese.c (rename_variables_in_stmt): Fix comment.
1274 2009-05-13 Sebastian Pop <sebastian.pop@amd.com>
1276 * graphite-clast-to-gimple.c (graphite_create_new_loop): Pass
1278 Call save_clast_name_index.
1279 (translate_clast): Pass newivs_index.
1280 (gloog): Create and free newivs_index.
1282 2009-05-13 Sebastian Pop <sebastian.pop@amd.com>
1284 * graphite-clast-to-gimple.c (clast_name_index): New structure.
1285 (clast_name_index_p): New type.
1286 (debug_clast_name_index): New.
1287 (debug_clast_name_indexes_1): New.
1288 (debug_clast_name_indexes): New.
1289 (clast_name_index_elt_info): New.
1290 (eq_clast_name_indexes): New.
1291 (clast_name_to_index): New.
1292 (new_clast_name_index): New.
1293 (save_clast_name_index): New.
1294 (init_sese_params_index): New.
1295 (gloog): Call init_sese_params_index.
1296 * graphite-clast-to-gimple.h (debug_clast_name_indexes): Declared.
1297 * sese.c (new_sese): Initialize SESE_PARAMS_INDEX.
1298 (free_sese): Free SESE_PARAMS_INDEX.
1299 * sese.h (struct sese): Add params_index.
1300 (SESE_PARAMS_INDEX): New.
1302 2009-05-13 Sebastian Pop <sebastian.pop@amd.com>
1304 * graphite-clast-to-gimple.c (newivs_to_depth_to_newiv): New.
1305 (graphite_create_new_loop): Pass the newivs vector. Push the
1306 newly created IV to newivs.
1307 (translate_clast): Pass the newivs vector.
1308 (gloog): Create and destroy the newivs vector.
1310 2009-05-13 Sebastian Pop <sebastian.pop@amd.com>
1312 * graphite-clast-to-gimple.c (pbb_to_depth_to_oldiv): New.
1313 (graphite_loop_normal_form): Initialize loop->aux with the unique
1314 IV that has been created.
1316 2009-05-13 Tobias Grosser <grosser@fim.uni-passau.de>
1318 * tree-chrec.c (evolution_function_right_is_integer_cst): Allow
1319 scev with parameters in the base part. They where forbidden
1322 2009-05-11 Li Feng <nemokingdom@gmail.com>
1324 * testsuite/gcc.dg/graphite/graphite.exp: Set different default
1325 compile options by file names.
1326 * testsuite/gcc.dg/graphite/block{0-6}.c: Remove dg-option line.
1327 * testsuite/gcc.dg/graphite/id-{1-9}.c: Ditto.
1328 * testsuite/gcc.dg/graphite/scop-{0-20}.c: Ditto.
1329 * testsuite/gcc.dg/graphite/scop-matmult.c: Ditto.
1331 2009-05-08 Li Feng <nemokingdom@gmail.com>
1333 * testsuite/gcc.dg/graphite/graphite_autopar/graphite_autopar.exp: New.
1334 * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-1.c: New.
1335 * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-2.c: New.
1336 * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-3.c: New.
1338 2009-05-07 Tobias Grosser <grosser@fim.uni-passau.de>
1340 * graphite-scop-detection (build_scops_1): Fix little bug introduced
1343 2009-05-07 Tobias Grosser <grosser@fim.uni-passau.de>
1345 * graphite-scop-detection.c (graphite_can_represent_scev): Only
1346 allow integer constant strides.
1347 (graphite_can_represent_expr): Depend on outermost_loop.
1348 (stmt_simple_memref_p, graphite_cannot_represent_loop,
1349 harmful_stmt_in_bb, is_simple_operand, stmt_simple_for_scop_p,
1350 build_scops_1): Same.
1351 (scopdet_basic_block_info): Same and insert layered SCoP
1353 (try_generate_gimple_bb): Cleanup.
1354 (build_scops): Enable data references.
1356 * testsuite/gcc.dg/graphite/id-5.c: New.
1357 * testsuite/gcc.dg/graphite/id-9.c: New.
1358 * tree-chrec.c (evolution_function_right_is_integer_cst): New.
1359 * tree-chrec.h (evolution_function_right_is_integer_cst): New.
1361 2009-05-06 Tobias Grosser <grosser@fim.uni-passau.de>
1363 * sese.c (expand_scalar_variables_ssa_name): Only build expressions,
1364 that we have not yet built for this SCoP.
1366 2009-05-06 Tobias Grosser <grosser@fim.uni-passau.de>
1368 * sese.c (expand_scalar_variables_expr): Fix expand_scalar_variables
1369 for complex numbers.
1371 2009-05-06 Tobias Grosser <grosser@fim.uni-passau.de>
1373 * graphite-ppl.c: Fix build if cloog is not available.
1375 2009-05-04 Li Feng <nemokingdom@gmail.com>
1377 * tree-parloops.c (loop_parallel_p): Remove construction of
1378 NITER and REDUCTION_LIST.
1379 (try_get_loop_niter): New.
1380 (try_create_reduction_list): New.
1381 (parallelize_loops): Bypass the failed checkings in autopar
1382 when can_be_parallel in loop structure is set to true.
1384 2009-05-01 Tobias Grosser <grosser@fim.uni-passau.de>
1386 * testsuite/gcc.dg/graphite/id-6.c: Update testcase.
1387 * testsuite/gcc.dg/graphite/scop-3.c: Dito.
1389 2009-05-01 Tobias Grosser <grosser@fim.uni-passau.de>
1391 * graphite-scop-detection.c (stmt_simple_for_scop_p):
1392 Enable EQ_EXPR and NE_EXPR again.
1394 2009-04-30 Tobias Grosser <grosser@fim.uni-passau.de>
1396 * graphite-scop-detection.c (graphite_can_represent_scev):
1397 Add check if scev is affine multivariate.
1398 (harmful_stmt_in_bb): Check if we can represent the conditions.
1399 (scopdet_basic_block_info (basic_block bb, VEC): Pass the loop to
1401 * testsuite/gcc.dg/graphite/id-7.c: New.
1403 2009-04-30 Tobias Grosser <grosser@fim.uni-passau.de>
1405 * graphite-sese-to-poly.c (bb_contains_non_iv_scalar_phi_nodes):
1406 Check all bbs in region, not only the bbs that are represented in
1408 (build_poly_scop): Add newline.
1409 * testsuite/gcc.dg/graphite/id-8.c: New.
1411 2009-04-30 Li Feng <nemokingdom@gmail.com>
1413 * cfgloop.c (alloc_loop): Initialize can_be_parallel to false
1414 when loop initialize.
1415 * cfgloop.h (struct loop): Introduce flag can_be_parallel.
1416 * common.opt: Declare flag_graphite_force_parallel.
1417 * graphite-clast-to-gimple.c (translate_clast): Mark the innermost
1419 * graphite-poly.c (apply_poly_transforms): Introduce
1420 flag_graphite_force_parallel.
1421 * tree-ssa-loop.c (gate_graphite_transforms): ditto.
1422 * toplev.c (process_options): ditto and replace a not correctly
1425 2009-04-30 Li Feng <nemokingdom@gmail.com>
1427 * graphite-clast-to-gimple.c (loop_iv_stack_patch_for_consts):
1428 Change the call of gbb_loop_at_index and/or gbb_loop_index due
1429 to the redefinition.
1430 (compute_cloog_iv_types_1): ditto.
1431 (build_iv_mapping): ditto.
1432 * graphite-sese-to-poly.c (new_gimple_bb): Remove GBB_LOOPS related
1434 (free_gimple_bb): Removed GBB_LOOPS related free part.
1435 (build_bb_loops): Removed.
1436 * sese.h (struct gimple_bb): Removed loops.
1437 (GBB_LOOPS): Removed.
1438 (gbb_loop_at_index): Instead of using GBB_LOOPS, we use sese instead.
1439 (gbb_loop_index): ditto.
1441 2009-04-24 Tobias Grosser <grosser@fim.uni-passau.de>
1443 * graphite-scop-detection.c (graphite_can_represent_scev): Do not
1444 allow non constant strides.
1445 * testsuite/gcc.dg/graphite/scop-20.c: New.
1447 2009-04-24 Sebastian Pop <sebastian.pop@amd.com>
1449 * graphite-scop-detection.c (dot_all_scops): Fix system call
1450 return value warning.
1453 2009-04-24 Sebastian Pop <sebastian.pop@amd.com>
1455 * testsuite/gcc.dg/graphite/id-6.c: Fix pattern.
1456 * testsuite/gcc.dg/graphite/scop-3.c: Same.
1458 2009-04-24 Sebastian Pop <sebastian.pop@amd.com>
1460 * graphite-poly.c (map_into_dep_poly, map_dr_into_dep_poly,
1461 build_pairwise_constraint, dr_equality_constraints,
1462 build_pairwise_scheduling_equality,
1463 build_pairwise_scheduling_inequality, lexicographically_gt_p,
1464 build_lexicographically_gt_constraint, dependence_polyhedron,
1465 graphite_legal_transform_dr, graphite_legal_transform_bb,
1466 graphite_legal_transform): New.
1467 * graphite-poly.h (graphite_legal_transform): Declared.
1468 * graphite-sese-to-poly.c (build_poly_scop): Call to
1469 graphite_legal_transform is disabled for the moment.
1471 2009-04-24 Sebastian Pop <sebastian.pop@amd.com>
1473 * graphite-poly.h (pbb_nb_scattering_dims): New.
1474 (pbb_nb_scattering): Use it.
1476 2009-04-24 Sebastian Pop <sebastian.pop@amd.com>
1478 * graphite-ppl.c (ppl_insert_dimensions_pointset): Add
1479 Pointset_Powerset version of ppl_insert_dimensions.
1480 * graphite-ppl.h (ppl_insert_dimensions_pointset): Declared.
1482 2009-04-24 Sebastian Pop <sebastian.pop@amd.com>
1484 * graphite-ppl.c (ppl_insert_dimensions): Fix formatting.
1486 2009-04-24 Sebastian Pop <sebastian.pop@amd.com>
1488 * graphite-poly.h: Fix comment.
1490 2009-04-24 Sebastian Pop <sebastian.pop@amd.com>
1492 * graphite-sese-to-poly.c (build_poly_dr): Fix data ref multiplier.
1494 2009-04-24 Tobias Grosser <grosser@fim.uni-passau.de>
1496 * sese.c (expand_scalar_variables_stmt): Only iterate over the old
1499 2009-04-24 Tobias Grosser <grosser@fim.uni-passau.de>
1501 * graphite-sese-to-poly.c (var_used_in_not_loop_header_phi_node): New.
1502 (graphite_stmt_p): Represent bbs necessary to build the phi nodes of
1505 2009-04-20 Sebastian Pop <sebastian.pop@amd.com>
1507 * graphite-scop-detection.c (stmt_simple_for_scop_p): Do not
1508 handle EQ_EXPR and NE_EXPR.
1510 2009-04-17 Tobias Grosser <grosser@fim.uni-passau.de>
1512 * graphite-poly.h (poly_dr): Fix comment.
1514 2009-04-09 Sebastian Pop <sebastian.pop@amd.com>
1515 Tobias Grosser <grosser@fim.uni-passau.de>
1517 * graphite-poly.c (new_poly_bb): Do not initialize PBB_DOMAIN
1518 with a zero dimension polyhedron.
1519 (find_scop_parameters): Move the call to scop_set_nb_params here.
1520 (build_loop_iteration_domains): Store in loop->aux the iteration
1522 (build_scop_iteration_domain): Fix PBB_DOMAIN for bbs not surrounded
1523 by any loop in scop.
1524 (build_poly_scop): Do not call scop_set_nb_params.
1526 2009-04-09 Sebastian Pop <sebastian.pop@amd.com>
1527 Tobias Grosser <grosser@fim.uni-passau.de>
1529 * graphite-sese-to-poly.c (add_condition_to_pbb): Pass code to
1530 add_condition_to_domain not GT_EXPR.
1532 2009-04-09 Tobias Grosser <grosser@fim.uni-passau.de>
1534 * graphite-ppl.c (debug_ppl_powerset_matrix): New.
1535 * graphite-ppl.h (debug_ppl_powerset_matrix): New.
1536 * graphite-sese-to-poly.c (add_condition_to_pbb): Use
1537 upper_bound_assign to calculate unions.
1538 * testsuite/gcc.dg/graphite/id-6.c: New.
1540 2009-04-09 Tobias Grosser <grosser@fim.uni-passau.de>
1542 * graphite-scop-detection.c (canonicalize_loop_closed_ssa): Do not
1543 handle abnormal edges.
1545 2009-04-09 Tobias Grosser <grosser@fim.uni-passau.de>
1547 * graphite-poly.c (new_poly_dr, free_poly_dr): New.
1548 (free_poly_bb): Also free poly_drs.
1549 * graphite-poly.h (new_poly_dr, free_poly_dr): New.
1550 (poly_dr): Polyhedron to Pointset_Powerset.
1551 (pdr_accessp_nb_subscripts): Same.
1552 * graphite-sese-to-poly.c (build_poly_dr): Same. And actually build
1555 2009-04-08 Sebastian Pop <sebastian.pop@amd.com>
1557 * graphite-clast-to-gimple.c (initialize_cloog_names): Change cloog
1558 names into more meaningful names.
1560 2009-04-08 Sebastian Pop <sebastian.pop@amd.com>
1562 * testsuite/gfortran.dg/graphite/interchange-1.c: New.
1563 * testsuite/gfortran.dg/graphite/interchange-2.c: New.
1565 2009-04-08 Sebastian Pop <sebastian.pop@amd.com>
1567 * graphite-clast-to-gimple.c (graphite_loop_normal_form): Do not build
1569 * tree-parloops.c (rewrite_phi_with_iv): New.
1570 (rewrite_all_phi_nodes_with_iv): New.
1571 (canonicalize_loop_ivs): Call them.
1573 2009-04-08 Sebastian Pop <sebastian.pop@amd.com>
1575 * graphite-sese-to-poly.c (try_generate_gimple_bb): Use
1576 graphite_find_data_references_in_stmt.
1577 * tree-data-ref.c (graphite_find_data_references_in_stmt): New.
1578 * tree-data-ref.h (graphite_find_data_references_in_stmt): Declared.
1580 2009-04-08 Sebastian Pop <sebastian.pop@amd.com>
1582 * sese.c (add_loop_exit_phis): Don't fail on non SSA_NAME renames.
1584 2009-04-08 Sebastian Pop <sebastian.pop@amd.com>
1586 * graphite-sese-to-poly.c (build_scop_bbs_1): Use bb_in_sese_p
1587 instead of bb_in_region.
1588 (flag_bb_in_region): Same. Renamed flag_bb_in_sese.
1589 (build_sese_conditions): Use flag_bb_in_sese.
1590 * sese.c (register_bb_in_sese): Removed.
1591 (new_sese): Remove initialization of SESE_REGION_BBS.
1592 (free_sese): Do not free SESE_REGION_BBS.
1593 * sese.h (struct sese): Remove field region_basic_blocks.
1594 (SESE_REGION_BBS): Removed.
1595 (bb_in_sese_p): Implement in function of bb_in_region.
1597 2009-04-08 Sebastian Pop <sebastian.pop@amd.com>
1599 * graphite-scop-detection.c (limit_scops): Deal only with single exit
1602 2009-04-08 Tobias Grosser <grosser@fim.uni-passau.de>
1604 * graphite-scop-detection.c (stmt_simple_for_scop_p): Allow NE_EXPR
1606 * graphite-sese-to-poly.c (create_linear_expr_from_tree): New.
1607 (add_condition_to_domain): New.
1608 (add_condition_to_pbb): New.
1609 (add_conditions_to_domain): Cleanup and handle of NE_EXPR and EQ_EXPR.
1610 * testsuite/gcc.dg/graphite/scop-3.c: Update number of detected SCoPs.
1612 2009-04-08 Tobias Grosser <grosser@fim.uni-passau.de>
1614 * graphite-clast-to-gimple.c (build_cloog_prog): ppl_Polyhedron ->
1615 ppl_Pointset_Powerset.
1616 * graphite-poly.c (new_poly_bb, free_poly_bb): Same.
1617 * graphite-poly.h (poly_bb): poly_bb.domain Same.
1618 (pbb_nb_loops): Same.
1619 * graphite-sese-to-poly.c (build_loop_iteration_domains,
1620 add_conditions_to_domain): Same.
1621 * graphite-ppl.c (new_Cloog_Domain_from_ppl_Pointset_Powerset): New.
1622 (ppl_print_polyhedron_matrix): ppl_Polyhedron_t ->
1623 ppl_const_Polyhedron_t.
1624 (ppl_print_powerset_matrix): New.
1625 * graphite-ppl.h (new_Cloog_Domain_from_ppl_Pointset_Powerset,
1626 ppl_print_powerset_matrix): New.
1627 (ppl_print_polyhedron_matrix): Updated.
1629 2009-04-07 Sebastian Pop <sebastian.pop@amd.com>
1631 * tree-scalar-evolution.c (analyze_scalar_evolution_1): Fix comment.
1633 2009-04-07 Sebastian Pop <sebastian.pop@amd.com>
1635 * graphite-poly.c (extend_scattering): Fix indenting. Free cstr.
1636 (print_iteration_domains, debug_iteration_domain,
1637 debug_iteration_domains): New.
1638 * graphite-poly.h (print_iteration_domains, debug_iteration_domain,
1639 debug_iteration_domains): Declared.
1640 * graphite-sese-to-poly.c (build_pbb_scattering_polyhedrons): Fix
1643 2009-04-03 Tobias Grosser <grosser@fim.uni-passau.de>
1644 Sebastian Pop <sebastian.pop@amd.com>
1646 * graphite-poly.h (print_iteration_domain): New.
1647 * graphite-sese-to-poly.c (add_conditions_to_domain): Fixed bug.
1648 (build_sese_conditions_1, build_sese_conditions_after,
1649 build_sese_conditions_before): New.
1650 (build_sese_conditions): Rewritten.
1652 2009-04-03 Sebastian Pop <sebastian.pop@amd.com>
1653 Tobias Grosser <grosser@fim.uni-passau.de>
1655 Cleanup of code generation liveouts.
1656 * graphite-clast-to-gimple.c (translate_clast): Use a single
1657 rename_map instead of one per translated statement.
1658 Do not use SESE_LIVEOUT_RENAMES.
1659 (graphite_loop_normal_form): Do not use SESE_REDUCTION_LIST.
1660 (gloog): Do not use SESE_LIVEOUT_RENAMES.
1661 * graphite-scop-detection.c (harmful_stmt_in_bb): Return the close
1662 phi node of a reduction: when a loop contains a reduction used outside
1663 the loop, there should be a scalar close phi node on the exit block.
1664 * sese.c (new_sese): Do not initialize SESE_LIVEOUT,
1665 SESE_LIVEOUT_RENAMES, and SESE_REDUCTION_LIST.
1666 (free_sese): Do not free them.
1667 (sese_build_liveouts_use): Do not use them.
1668 (sese_build_liveouts_bb): Same.
1669 (sese_build_liveouts): Same.
1670 (sese_insert_phis_for_liveouts): Same.
1671 (sese_adjust_phis_for_liveouts): Same. Renamed sese_adjust_liveout_phis.
1672 (defined_in_loop_p): New.
1673 (alive_after_loop): New.
1674 (close_phi_not_yet_inserted_p): New.
1675 (struct alep, alep_p): New.
1676 (add_loop_exit_phis): Remove from the rename_map all the names defined
1677 in the code generated loop.
1678 (insert_loop_close_phis): Traverse the rename_map passed to it.
1679 Don't use SESE_LIVEOUT_RENAMES.
1680 (default_liveout_before_guard): Renamed default_before_guard.
1681 (insert_guard_phis): Do not use SESE_LIVEOUT_RENAMES.
1682 (graphite_copy_stmts_from_block): Do not directly call set_rename.
1683 (register_sese_liveout_renames): Removed.
1684 (copy_bb_and_scalar_dependences): Do not call it.
1685 * sese.h (struct sese): Removed fields: liveout, liveout_renames, and
1687 (SESE_LIVEOUT): Removed.
1688 (SESE_LIVEOUT_RENAMES): Removed.
1689 (SESE_REDUCTION_LIST): Removed.
1690 (sese_build_liveouts): Removed.
1691 (sese_adjust_phis_for_liveouts): Renamed sese_adjust_liveout_phis.
1692 (insert_loop_close_phis): Pass a htab_t instead of a sese.
1693 (insert_guard_phis): Same.
1694 (rename_map_elt): Declare a VEC of them.
1695 * tree-parloops.c (canonicalize_loop_ivs): reduction_list contains
1696 trees not pointers to trees.
1698 Rewrite in canonical close SSA form:
1699 * graphite-scop-detection.c (contains_only_close_phi_nodes): New.
1700 (limit_scops): Close the scop after the block containing the close phi
1702 (canonicalize_loop_closed_ssa): New.
1703 (canonicalize_loop_closed_ssa_form): New.
1704 (build_scops): Call canonicalize_loop_closed_ssa_form.
1706 * graphite-sese-to-poly.c: Fix typos.
1708 2009-04-03 Sebastian Pop <sebastian.pop@amd.com>
1710 * graphite-poly.c (print_scattering_function, print_pbb_domain):
1712 (dump_gbb_conditions, dump_gbb_cases, print_iteration_domain): New.
1713 (print_pbb): Add conditions.
1715 2009-04-01 Tobias Grosser <grosser@fim.uni-passau.de>
1716 Sebastian Pop <sebastian.pop@amd.com>
1718 * graphite-scop-detection.c (bb_in_sd_region): Use bb_in_region.
1719 * graphite-sese-to-poly.c (all_non_dominated_preds_marked_p): New.
1720 (build_scop_bbs_1): New.
1721 (build_scop_bbs): Rewrite.
1722 * sese.h (bb_in_region): New.
1724 2009-03-29 Tobias Grosser <grosser@fim.uni-passau.de>
1726 * graphite-poly.c (new_poly_bb, free_poly_bb): Initialize/free
1728 (print_scop): Style.
1729 * graphite-poly.h (poly_bb): Add drs vector.
1730 (PBB_DRS): Add accessor.
1731 * graphite-sese-to-poly.c (build_poly_dr): New.
1732 (build_pbb_drs, build_scop_drs): New.
1733 (build_poly_scop): call build_scop_drs (Disabled at the moment).
1735 2009-03-29 Tobias Grosser <grosser@fim.uni-passau.de>
1737 * tree-ssa-loop.c: Include forgotten toplev.h
1739 2009-03-29 Tobias Grosser <grosser@fim.uni-passau.de>
1741 * graphite-poly.c: (apply_poly_transforms): sorry -> gcc_unreachable.
1742 * testsuite/gcc.dg/graphite/pr37883.c: Remove -floop-*
1743 * testsuite/gcc.dg/graphite/pr37928.c: Same
1744 * testsuite/gcc.dg/graphite/pr38409.c: Same
1745 * testsuite/gcc.dg/graphite/pr38498.c: Same
1746 * testsuite/gcc.dg/graphite/pr38559.c: Same
1747 * testsuite/gcc.dg/graphite/pr39335.c: Same
1748 * testsuite/gcc.dg/graphite/pr39335_1.c: Same
1749 * testsuite/gfortran.dg/graphite/block-2.f: Same
1750 * tree-ssa-loop.c (gate_graphite_transforms): Always fail if called
1753 2009-03-28 Tobias Grosser <grosser@fim.uni-passau.de>
1755 * graphite-sese-to-poly.c (ref_nb_loops, build_access_matrix_with_af,
1756 build_access_matrix, build_scop_data_accesses): Remove access function
1757 building. (We get a new version soon).
1758 (build_bb_loops, scan_tree_for_params_right_scev): Update.
1759 * sese.h (nb_loops_around_loop_in_sese): Remove.
1760 (sese_loop_depth): Do not use SESE_LOOP_NEST any more.
1762 2009-03-27 Tobias Grosser <grosser@fim.uni-passau.de>
1763 Sebastian Pop <sebastian.pop@amd.com>
1765 * graphite-scop-detection.c (struct scopdet_info): Rename last
1767 (scopdet_basic_block_info, build_scops_1): Don't use
1768 CDI_POST_DOMINATORS. CDI_POST_DOMINATORS should never be used.
1770 2009-03-26 Tobias Grosser <grosser@fim.uni-passau.de>
1771 Sebastian Pop <sebastian.pop@amd.com>
1773 * graphite-clast-to-gimple.c (gloog): Call sese_build_liveouts.
1774 * sese.c (sese_build_liveouts_use): Renamed from
1775 sese_build_livein_liveouts_use. Remove liveins.
1776 (sese_build_liveouts_bb): Renamed from sese_build_livein_liveouts_bb.
1777 Call sese_build_liveouts_use.
1778 (sese_build_liveouts): Renamed from sese_build_livein_liveouts.
1779 Call sese_build_liveouts_bb.
1780 (new_sese, free_sese): Remove liveins.
1781 (sese_add_exit_phis_var): Deleted.
1782 (sese_insert_phis_for_liveouts): Call sese_add_exit_phis_edge
1784 (graphite_copy_stmts_from_block): Remove SESE_NUM_VER.
1786 * sese.h (sese): Remove num_ver and livein.
1787 (SESE_LIVEIN, SESE_LIVEIN_VER, SESE_NUM_VER): Removed.
1789 2009-03-25 Tobias Grosser <grosser@fim.uni-passau.de>
1791 * graphite-sese-to-poly.c (build_scop_scattering): Fix compile.
1793 2009-03-25 Tobias Grosser <grosser@fim.uni-passau.de>
1795 * graphite-sese-to-poly.c (compare_prefix_loops): Removed.
1796 (build_scop_scattering): Do not use compare_prefix_loops any more.
1797 (nb_common_loops): New.
1799 2009-03-24 Sebastian Pop <sebastian.pop@amd.com>
1801 * sese.c (get_new_name_from_old_name): Renamed get_rename.
1802 (register_old_and_new_names): Renamed set_rename.
1804 2009-03-24 Sebastian Pop <sebastian.pop@amd.com>
1806 * graphite-scop-detection.h (nb_reductions_in_loop): Revert removal
1807 of the decl from the previous commit.
1809 2009-03-24 Sebastian Pop <sebastian.pop@amd.com>
1811 * graphite-scop-detection.c (dot_scop): New.
1812 * graphite-scop-detection.h (dot_scop): Declared.
1814 2009-03-24 Sebastian Pop <sebastian.pop@amd.com>
1816 * graphite-sese-to-poly.c (compare_prefix_loops): Fix compare.
1818 2009-03-24 Sebastian Pop <sebastian.pop@amd.com>
1820 * cfgloopmanip.c (create_empty_loop_on_edge): Generate the loop exit
1821 condition at the end of the loop.
1822 * graphite.c (graphite_initialize, graphite_finalize): Print to
1823 dump_file the compiled function.
1824 * graphite-clast-to-gimple.c (graphite_create_new_loop): Update use
1825 of create_empty_loop_on_edge.
1826 (translate_clast): Update the code generation of loops for the new
1828 * cfgloop.h (create_empty_loop_on_edge): Update declaration.
1830 2009-03-24 Sebastian Pop <sebastian.pop@amd.com>
1832 Reverted the patch from 2009-03-19.
1834 2009-03-19 Tobias Grosser <grosser@fim.uni-passau.de>
1836 * graphite-poly.c (new_poly_bb, free_poly_bb): Initialize/free
1838 (print_scop): Style.
1839 * graphite-poly.h (poly_bb): Add drs vector.
1840 (PBB_DRS): Add accessor.
1841 * graphite-sese-to-poly.c (ref_nb_loops): Remove.
1842 (build_access_matrix_with_af, build_access_matrix,
1843 build_scop_data_accesses): Delete.
1844 (build_poly_dr): New.
1845 (build_pbb_drs, build_scop_drs): New.
1846 (build_poly_scop): call build_scop_drs.
1848 2009-03-13 Sebastian Pop <sebastian.pop@amd.com>
1850 * graphite-scop-detection.c (dot_all_scops_1): Close the table
1851 once per basic block.
1853 2009-03-13 Tobias Grosser <grosser@fim.uni-passau.de>
1855 * graphite-scop-detection.c (graphite_can_represent_scev): New.
1856 (graphite_can_represent_expr): Renamed from loop_affine_expr
1858 (stmt_simple_for_scop_p): Call graphite_can_represent_expr.
1859 (graphite_cannot_represent_loop): Add scop_entry to parameters.
1860 (scopdet_basic_block_info): Actually define entry_block.
1861 (stmt_simple_memref_p): Moved here from ...
1863 * tree-data-ref.c (stmt_simple_memref_p): here.
1864 * tree-data-ref.h (stmt_simple_memref_p): Removed.
1866 2009-03-13 Tobias Grosser <grosser@fim.uni-passau.de>
1868 * testsuite/gcc.dg/graphite/id-4.c: New.
1870 2009-03-12 Sebastian Pop <sebastian.pop@amd.com>
1872 * sese.c (expand_scalar_variables_expr): Handle tcc_comparison.
1873 (register_old_and_new_names): Update the content of the map.
1874 When there was already a rename_map_elt in the map at that
1876 (copy_bb_and_scalar_dependences): Do rename_variables after
1877 expand_scalar_variables.
1878 * graphite-clast-to-gimple.c (build_iv_mapping): Update the content
1879 of the map. When there was already a rename_map_elt in the
1880 map at that location, free it.
1881 (translate_clast): Pass the rename_map. Do not initialize and free
1882 a rename_map per stmt_user.
1883 (gloog): Initialize and free one rename_map and pass it to
1886 2009-03-12 Sebastian Pop <sebastian.pop@amd.com>
1888 * sese.c (expand_scalar_variables_stmt,
1889 expand_scalar_variables_ssa_name): Add a gimple_stmt_iterator
1891 (expand_scalar_variables_expr): Handle REALPART_EXPR and IMAGPART_EXPR.
1892 (expand_scalar_variables): Pass to expand_scalar_variables_stmt
1893 the gimple_stmt_iterator of the statement to be expanded.
1894 * graphite-scop-detection.c (is_simple_operand): Do handle
1897 2009-03-11 Tobias Grosser <grosser@fim.uni-passau.de>
1899 * graphite-scop-detection.c (is_simple_operand): Do not handle
1901 * testsuite/gcc.dg/graphite/id-2.c: New.
1903 * graphite-sese-to-poly.c (build_bb_loops,
1904 add_value_to_dim, scan_tree_for_params_right_scev,
1905 scan_tree_for_params_int, scan_tree_for_params, idx_record_params,
1906 find_params_in_bb, build_loop_iteration_domains,
1907 add_conditions_to_domain): Remove subtract.
1909 2009-03-11 Tobias Grosser <grosser@fim.uni-passau.de>
1911 * graphite-clast-to-gimple.c (loop_iv_stack_patch_for_consts,
1912 build_iv_mapping, compute_cloog_iv_types_1, build_cloog_prog):
1913 pbb_loop_at_index -> gbb_loop_at_index.
1914 * graphite-poly.c (new_poly_bb, new_scop): New accessors.
1915 (debug_loop_vec): Delete.
1916 * graphite-poly.h (poly_bb, scop): Change black_box and region to void
1917 pointer. Move LOOPS to gimple_bb_p and insert nb_params.
1918 (PBB_LOOPS): Removed.
1919 (PBB_BLACK_BOX): Insert cast.
1920 (pbb_set_black_box): New setter.
1921 (pbb_loop_at_index, pbb_loop_index): Removed.
1922 (scop_set_region, scop_set_nb_params): New.
1923 * graphite-sese-to-poly.c (new_gimple_bb, free_gimple_bb,
1924 build_scop_scattering, build_bb_loops): Add GBB_LOOPS.
1925 (build_poly_scop): Use scop_set_nb_params.
1926 * sese.h (gimple_bb): Add LOOPS.
1927 (GBB_LOOPS, gbb_loop_index, gbb_loop_at_index): New.
1929 2009-03-11 Tobias Grosser <grosser@fim.uni-passau.de>
1931 Revert previous commit.
1933 2009-03-11 Sebastian Pop <sebastian.pop@amd.com>
1935 * sese.c (expand_scalar_variables_expr): Handle tcc_comparison.
1936 (register_old_and_new_names): Update the content of the map.
1937 When there was already a rename_map_elt in the map at that
1939 (copy_bb_and_scalar_dependences): Do rename_variables after
1940 expand_scalar_variables.
1941 * graphite-clast-to-gimple.c (build_iv_mapping): Update the content
1942 of the map. When there was already a rename_map_elt in the
1943 map at that location, free it.
1944 (translate_clast): Pass the rename_map. Do not initialize and free
1945 a rename_map per stmt_user.
1946 (gloog): Initialize and free one rename_map and pass it to
1949 2009-03-11 Tobias Grosser <grosser@fim.uni-passau.de>
1951 Remove forgotten line in revert.
1953 2009-03-11 Sebastian Pop <sebastian.pop@amd.com>
1955 Revert previous commit.
1957 2009-03-10 Sebastian Pop <sebastian.pop@amd.com>
1959 * sese.c (register_old_and_new_names): Update the content
1960 of the map. When there was already a rename_map_elt in the
1961 map at that location, free it.
1962 (copy_bb_and_scalar_dependences): Do rename_variables after
1963 expand_scalar_variables.
1964 * graphite-clast-to-gimple.c (build_iv_mapping): Update the content
1965 of the map. When there was already a rename_map_elt in the
1966 map at that location, free it.
1967 (translate_clast): Pass the rename_map. Do not initialize and free
1968 a rename_map per stmt_user.
1969 (gloog): Initialize and free one rename_map and pass it to
1972 2009-03-10 Sebastian Pop <sebastian.pop@amd.com>
1974 * graphite-clast-to-gimple.c (translate_clast): context_loop
1977 2009-03-10 Tobias Grosser <grosser@fim.uni-passau.de>
1978 Sebastian Pop <sebastian.pop@amd.com>
1980 * graphite-ppl.c (ppl_insert_dimensions): Fix stupid mistake
1981 of the use of ppl_Polyhedron_map_space_dimensions.
1983 2009-03-10 Tobias Grosser <grosser@fim.uni-passau.de>
1984 Sebastian Pop <sebastian.pop@amd.com>
1986 * graphite-poly.c (unify_scattering_dimensions): Fix types.
1987 * graphite-poly.h (poly_dr_p, poly_dr, POLY_DR_TYPE, PDR_BB,
1988 PDR_TYPE, PDR_ACCESSES, pdr_accessp_nb_subscripts,
1989 pdr_accessp_nb_iterators, pdr_accessp_nb_params,
1990 pdr_accessp_alias_set_dim, pdr_accessp_subscript_dim,
1991 pdr_accessp_iterator_dim, pdr_accessp_param_dim,
1992 pbb_nb_params): New.
1993 (pbb_nb_loops, pbb_nb_scattering, scop_nb_params,
1994 nb_loops_around_pbb): Adapt return types.
1996 2009-03-09 Tobias Grosser <grosser@fim.uni-passau.de>
1998 * Makefile.in (graphite.o, graphite-sese-to-poly.o,
1999 graphite-clast-to-gimple.o, graphite-data-ref.o,
2000 graphite-scop-detection.o, graphite-poly.o): Add
2003 2009-03-05 Tobias Grosser <grosser@fim.uni-passau.de>
2005 * Makefile.in (graphite.o, graphite-sese-to-poly.o,
2006 graphite-clast-to-gimple.o, graphite-data-ref.o,
2007 graphite-scop-detection.o, graphite-poly.o): Add graphite-poly.h.
2009 2009-03-04 Tobias Grosser <grosser@fim.uni-passau.de>
2011 * testsuite/gcc.dg/graphite/pr37485.c: Remove -floop-block
2012 * testsuite/gcc.dg/graphite/pr37828.c: Same.
2013 * testsuite/gcc.dg/graphite/pr37684.c: Same.
2014 * testsuite/gcc.dg/graphite/block-0.c: Same.
2015 * testsuite/gcc.dg/graphite/block-1.c: Same.
2016 * testsuite/gcc.dg/graphite/block-2.c: Same.
2017 * testsuite/gcc.dg/graphite/block-3.c: Same.
2018 * testsuite/gcc.dg/graphite/block-4.c: Same.
2019 * testsuite/gcc.dg/graphite/block-5.c: Same.
2020 * testsuite/gcc.dg/graphite/block-6.c: Same.
2021 * testsuite/gfortran.dg/graphite/pr38083.f90: Same.
2022 * testsuite/gfortran.dg/graphite/block-1.f90: Same.
2023 * testsuite/gfortran.dg/graphite/block-3.f90: Same.
2024 * testsuite/gfortran.dg/graphite/pr37852.f90: Same.
2025 * testsuite/gfortran.dg/graphite/block-4.f90: Same.
2026 * testsuite/gfortran.dg/graphite/pr37980.f90: Same.
2027 * testsuite/gfortran.dg/graphite/pr38953.f90: Same.
2028 * testsuite/gfortran.dg/graphite/pr37857.f90: Same.
2029 * opts.c: Remove -floop-block from -O2.
2030 * graphite-poly.c: Fail if -floop-block -floop-interchange or
2031 -floop-strip-mine are used.
2033 2009-03-04 Tobias Grosser <grosser@fim.uni-passau.de>
2034 Sebastian Pop <sebastian.pop@amd.com>
2036 * graphite-clast-to-gimple.c (build_cloog_prog): Unify scattering
2038 * graphite-poly.c (pbb_compare, graphite_sort_pbbs,
2039 graphite_trans_bb_move_loop, graphite_trans_bb_strip_mine,
2040 strip_mine_profitable_p, is_interchange_valid,
2041 graphite_trans_bb_block, graphite_trans_loop_block,
2042 graphite_trans_scop_block): Temporary removed.
2043 (extend_scattering, unify_scattering_dimensions): New.
2044 (print_scattering_function, graphite_read_transforms):
2045 PBB_SCATTERING -> PBB_TRANSFORMED_SCATTERING.
2046 (graphite_generate_scattering_fns): Removed.
2047 (apply_poly_transforms): Cleanup.
2048 (free_poly_bb): Add PBB_SCATTERING -> PBB_TRANSFORMED_SCATTERING.
2049 (schedule_to_scattering): Moved.
2050 (PBB_STATIC_SCHEDULE, PBB_SCATTERING): Removed.
2051 (PBB_ORIGINAL_SCATTERING, PBB_TRANSFORMED_SCATTERING): New.
2052 (pbb_nb_scattering): New.
2053 (SCOP_ENTRY, SCOP_EXIT, SCOP_REGION_BBS, SCOP_DEP_GRAPH, SCOP_PARAMS,
2054 SCOP_LOOP_NEST, SCOP_PARAMS, SCOP_OLDIVS, SCOP_LIVEOUT_RENAMES):
2056 * graphite-ppl.c (ppl_insert_dimensions): Extended and renamed from
2058 (ppl_strip_loop): PBB_SCATTERING -> PBB_TRANSFORMED_SCATTERING.
2059 * graphite-scop-detection.c (dot_all_scops_1): PBB_SCATTERING
2060 -> PBB_TRANSFORMED_SCATTERING.
2061 * graphite-sese-to-poly.c (build_scop_bbs): Remove region.
2062 (build_pbb_scattering_polyhedron): Moved from schedule_to_scattering.
2063 (build_scop_scattering): Renamed from build_scop_canonical_schedules.
2064 (check_poly_representation): Do not return bool.
2065 (graphite_transform_loops): Reformat.
2066 * sese.h (SESE_ENTRY_BB, SESE_EXIT_BB): New.
2068 2009-03-04 Sebastian Pop <sebastian.pop@amd.com>
2070 * graphite-poly.c (print_pbb_domain, print_pbb, print_scop,
2071 debug_pbb_domain, debug_pbb, debug_scop): New.
2072 * graphite-poly.h (print_pbb_domain, print_pbb, print_scop,
2073 debug_pbb_domain, debug_pbb, debug_scop): Declared.
2075 2009-03-02 Sebastian Pop <sebastian.pop@amd.com>
2078 * tree-parloops.c (canonicalize_loop_ivs): Call fold_convert
2079 when the type precision of the induction variable should be
2080 larger than the type precision of nit.
2081 (gen_parallel_loop): Update use of canonicalize_loop_ivs.
2082 * graphite-clast-to-gimple.c (graphite_loop_normal_form): Same.
2083 * tree-flow.h (canonicalize_loop_ivs): Update declaration.
2085 * testsuite/gcc.dg/graphite/pr39335_1.c: New.
2086 * testsuite/gcc.dg/graphite/pr39335.c: New.
2088 2009-03-02 Sebastian Pop <sebastian.pop@amd.com>
2090 * tree-parloops.c (canonicalize_loop_ivs): reduction_list contains
2091 SSA_NAMES not struct reduction_info.
2093 2009-03-02 Sebastian Pop <sebastian.pop@amd.com>
2095 * sese.c (expand_scalar_variables_expr): Handle ADDR_EXPR.
2097 2009-02-27 Sebastian Pop <sebastian.pop@amd.com>
2098 Tobias Grosser <grosser@fim.uni-passau.de>
2100 * sese.c (new_sese): Initialize SESE_REDUCTION_LIST.
2101 (free_sese): Free SESE_REDUCTION_LIST.
2102 * sese.h (struct sese): Add field reduction_list.
2103 (SESE_REDUCTION_LIST): New.
2104 * graphite-clast-to-gimple.c (graphite_loop_normal_form): Call
2105 canonicalize_loop_ivs on SESE_REDUCTION_LIST.
2107 2009-02-27 Sebastian Pop <sebastian.pop@amd.com>
2108 Tobias Grosser <grosser@fim.uni-passau.de>
2110 * tree-flow.h (gather_scalar_reductions): Use struct loop * instead
2113 2009-02-27 Sebastian Pop <sebastian.pop@amd.com>
2114 Tobias Grosser <grosser@fim.uni-passau.de>
2116 * tree-parloops.c (struct brli, build_reduction_list_info,
2117 analyze_reduction_list, gather_scalar_reductions): New.
2118 (loop_parallel_p): Build a reduction list containing only
2119 PHI_RESULT SSA_NAMEs: call gather_scalar_reductions.
2120 (gen_parallel_loop): Call the analysis analyze_reduction_list.
2121 (parallelize_loops): Now reduction_list is a htab_t of SSA_NAMEs.
2122 * tree-flow.h (gather_scalar_reductions): Declared.
2124 2009-02-26 Sebastian Pop <sebastian.pop@amd.com>
2127 * graphite-clast-to-gimple.c (graphite_loop_normal_form): Do not call
2128 number_of_iterations_exit from a gcc_assert.
2130 2009-02-25 Sebastian Pop <sebastian.pop@amd.com>
2131 Jan Sjodin <jan.sjodin@amd.com>
2133 * output.h (graphite_out_file, graphite_in_file): Declared.
2134 * toplev.c (graphite_out_file, graphite_in_file): New.
2135 (init_asm_output): Initialize graphite_in_file and graphite_out_file.
2136 * graphite-clast-to-gimple.c (build_cloog_prog): Read PBB_SCATTERING.
2137 Don't call schedule_to_scattering.
2138 * common.opt (fgraphite-write, fgraphite-read): New.
2139 * graphite-poly.c: Include output.h.
2140 (print_scattering_function, print_scattering_functions,
2141 debug_scattering_function, debug_scattering_functions,
2142 graphite_write_transforms, graphite_read_transforms,
2143 graphite_generate_scattering_fns): New.
2144 (apply_poly_transforms): Do not apply transform if flag_graphite_read.
2145 Call graphite_generate_scattering_fns, graphite_write_transforms,
2146 graphite_read_transforms.
2147 (new_poly_bb): Initialize PBB_SCATTERING.
2148 (free_poly_bb): Free PBB_SCATTERING.
2149 (schedule_to_scattering): Does not return, initialize PBB_SCATTERING.
2150 * graphite-poly.h (struct poly_bb): Add field scattering.
2151 (PBB_SCATTERING): New.
2152 (print_scattering_function, print_scattering_functions,
2153 debug_scattering_function, debug_scattering_functions): Declared.
2154 * graphite-ppl.c (cloog_matrix_to_ppl_constraint): Matrices contain
2155 GMP values, not integers!
2156 (ppl_print_polyhedron_matrix, debug_ppl_polyhedron_matrix,
2157 ppl_read_polyhedron_matrix): New.
2158 * graphite-ppl.h (ppl_print_polyhedron_matrix,
2159 debug_ppl_polyhedron_matrix,
2160 ppl_read_polyhedron_matrix): Declared.
2161 * Makefile.in (graphite-poly.o): Depends on output.h.
2163 2009-02-23 Sebastian Pop <sebastian.pop@amd.com>
2164 Tobias Grosser <grosser@fim.uni-passau.de>
2167 * graphite-scop-detection.c (stmt_simple_for_scop_p): Analyze
2168 scalar evolutions in the scop_entry->loop_father.
2170 2009-02-23 Sebastian Pop <sebastian.pop@amd.com>
2171 Tobias Grosser <grosser@fim.uni-passau.de>
2173 * graphite.h (ref_nb_loops): Remove declaration.
2174 (struct gimple_bb, gimple_bb_p, GBB_BB, GBB_DATA_REFS, GBB_CONDITIONS,
2175 GBB_CONDITION_CASES, GBB_CLOOG_IV_TYPES, gbb_loop, print_gimple_bb,
2176 debug_gbb): Moved to sese.h.
2179 2009-02-23 Sebastian Pop <sebastian.pop@amd.com>
2180 Tobias Grosser <grosser@fim.uni-passau.de>
2182 * graphite-data-ref.[ch]: Disable.
2184 2009-02-23 Sebastian Pop <sebastian.pop@amd.com>
2185 Tobias Grosser <grosser@fim.uni-passau.de>
2187 * graphite-scop-detection.c (stmt_simple_for_scop_p): Analyze
2188 scalar evolutions in the scop_entry->loop_father.
2190 2009-02-23 Sebastian Pop <sebastian.pop@amd.com>
2192 * graphite-scop-detection.c (nb_reductions_in_loop): Moved here...
2193 (graphite_cannot_represent_loop_niter): Renamed
2194 graphite_cannot_represent_loop. Call nb_reductions_in_loop.
2195 (limit_scops): build_sese_loop_nests does not return a bool.
2196 * graphite-scop-detection.h (nb_reductions_in_loop): Declared.
2197 * sese.c (nb_reductions_in_loop): ... from here.
2198 (graphite_loop_normal_form): ... from here.
2199 (sese_record_loop): Does not fail, so does not return a bool.
2200 (build_sese_loop_nests): Same.
2201 * sese.h (build_sese_loop_nests): Update declaration.
2202 * graphite-clast-to-gimple.c (graphite_loop_normal_form): Moved here...
2203 (build_graphite_loop_normal_form): New.
2204 (gloog): Call build_graphite_loop_normal_form.
2205 * graphite-sese-to-poly.c (build_poly_scop): Don't fail on
2206 build_sese_loop_nests.
2208 * testsuite/gcc.dg/graphite/id-1.c: New.
2210 2009-02-23 Sebastian Pop <sebastian.pop@amd.com>
2211 Tobias Grosser <grosser@fim.uni-passau.de>
2213 * graphite-sese-to-poly.c (scan_tree_for_params): Remove REAL_CST.
2214 The SCoP detection fix is sufficient.
2216 2009-02-21 Sebastian Pop <sebastian.pop@amd.com>
2218 PR tree-optimization/39260
2219 * graphite-scop-detection.c (harmful_stmt_in_bb): Stop a SCoP when
2220 the basic block contains a condition with a real type.
2221 * graphite-sese-to-poly.c (scan_tree_for_params): Handle REAL_CST.
2223 * gcc.dg/graphite/pr39260.c: New.
2225 2009-02-21 Sebastian Pop <sebastian.pop@amd.com>
2227 * graphite-poly.c: Inlcude params.h.
2228 (graphite_trans_loop_block): Use PARAM_LOOP_BLOCK_TILE_SIZE for
2230 * Makefile.in (graphite-poly.o): Depend on PARAMS_H.
2231 * params.def (PARAM_LOOP_BLOCK_TILE_SIZE): Define.
2233 2009-02-20 Sebastian Pop <sebastian.pop@amd.com>
2234 Tobias Grosser <grosser@fim.uni-passau.de>
2236 * graphite-scop-detection.c (dot_all_scops_1,
2237 dot_all_scops): Moved here.
2238 * graphite-scop-detection.h (dot_all_scops): Declared here.
2239 * graphite.c (graphite_initialize, graphite_finalize): New.
2240 (graphite_transform_loops): Cleaned up.
2241 * sese.c (debug_oldivs): Moved here.
2242 * graphite-poly.c (graphite_apply_transformations): Renamed
2243 apply_poly_transforms.
2244 (debug_loop_vec): Moved here.
2245 * graphite-sese-to-poly.c (build_bb_loops, build_sese_conditions_1,
2246 scop_contains_non_iv_scalar_phi_nodes, build_sese_conditions,
2247 find_scop_parameters, build_scop_iteration_domain,
2248 add_conditions_to_constraints, build_scop_canonical_schedules,
2249 build_scop_data_accesses): Now static.
2250 (build_poly_scop, check_poly_representation): New.
2252 2009-02-20 Sebastian Pop <sebastian.pop@amd.com>
2254 * graphite.c (graphite_stmt_p, new_gimple_bb, free_gimple_bb,
2255 remove_gbbs_in_scop, free_scops, try_generate_gimple_bb,
2256 build_scop_bbs, ref_nb_loops, compare_prefix_loops,
2257 build_scop_canonical_schedules, build_bb_loops, add_value_to_dim,
2258 scan_tree_for_params_right_scev, scan_tree_for_params_int,
2259 scan_tree_for_params, struct irp_data, dx_record_params,
2260 find_params_in_bb, find_scop_parameters, gbb_from_bb,
2261 build_loop_iteration_domains, add_conditions_to_domain,
2262 phi_node_is_iv, bb_contains_non_iv_scalar_phi_nodes,
2263 scop_contains_non_iv_scalar_phi_nodes, build_sese_conditions_1,
2264 build_sese_conditions, add_conditions_to_constraints,
2265 build_scop_iteration_domain, build_access_matrix_with_af,
2266 build_access_matrix,
2267 build_scop_data_accesses): Moved to graphite-sese-to-poly.c.
2269 * graphite-sese-to-poly.c: New.
2270 * graphite-sese-to-poly.h: New.
2272 * Makefile.in: Add new rule for graphite-sese-to-poly.o.
2274 2009-02-20 Sebastian Pop <sebastian.pop@amd.com>
2276 * graphite.c: Split graphite code generation to a new file.
2277 (graphite_verify, gmp_cst_to_tree, clast_name_to_gcc,
2278 max_precision_type, clast_to_gcc_expression_red,
2279 clast_to_gcc_expression, gcc_type_for_clast_expr,
2280 gcc_type_for_clast_eq, loop_iv_stack_patch_for_consts,
2281 graphite_translate_clast_equation, graphite_create_guard_cond_expr,
2282 graphite_create_new_guard, clast_get_body_of_loop,
2283 gcc_type_for_cloog_iv, gcc_type_for_iv_of_clast_loop,
2284 graphite_create_new_loop, build_iv_mapping, copy_renames,
2285 translate_clast, find_cloog_iv_in_expr, compute_cloog_iv_types_1,
2286 compute_cloog_iv_types, free_scattering, save_var_name,
2287 initialize_cloog_names, build_scop_context, build_cloog_prog,
2288 set_cloog_options, debug_clast_stmt, scop_to_clast,
2289 print_generated_program, debug_generated_program,
2290 gloog): Moved to graphite-clast-to-gimple.c.
2292 (struct cloog_prog_clast): Moved to graphite-clast-to-gimple.h.
2294 (iv_stack_entry_is_constant, iv_stack_entry_is_iv,
2295 loop_iv_stack_push_iv, loop_iv_stack_insert_constant,
2296 loop_iv_stack_pop, loop_iv_stack_get_iv,
2297 loop_iv_stack_get_iv_from_name, debug_loop_iv_stack,
2298 free_loop_iv_stack, loop_iv_stack_remove_constants,
2299 debug_rename_elt, debug_rename_map_1, debug_rename_map,
2300 rename_map_elt_info, eq_rename_map_elts, debug_ivtype_elt,
2301 debug_ivtype_map_1, debug_ivtype_map, ivtype_map_elt_info,
2302 eq_ivtype_map_elts, sese_add_exit_phis_edge,
2303 sese_add_exit_phis_var, sese_insert_phis_for_liveouts,
2304 get_vdef_before_sese, sese_adjust_vphi,
2305 get_new_name_from_old_name, sese_adjust_phis_for_liveouts,
2306 oldiv_for_loop, rename_variables_in_stmt, is_parameter,
2307 is_iv, expand_scalar_variables_ssa_name,
2308 expand_scalar_variables_expr, expand_scalar_variables_stmt,
2309 expand_scalar_variables, rename_variables, remove_condition,
2310 get_true_edge_from_guard_bb, get_false_edge_from_guard_bb,
2311 add_loop_exit_phis, insert_loop_close_phis, struct igp,
2312 default_liveout_before_guard, add_guard_exit_phis,
2313 insert_guard_phis, register_old_and_new_names,
2314 graphite_copy_stmts_from_block, register_sese_liveout_renames,
2315 copy_bb_and_scalar_dependences, outermost_loop_in_sese,
2316 if_region_set_false_region, create_if_region_on_edge,
2317 move_sese_in_condition): Moved to sese.c.
2319 (nb_loops_around_loop_in_sese, struct ifsese, if_region_entry,
2320 if_region_exit, if_region_get_condition_block,
2321 struct rename_map_elt, new_rename_map_elt, enum iv_stack_entry_kind,
2322 union iv_stack_entry_data_union, struct iv_stack_entry_struct,
2323 iv_stack_entry_p, loop_iv_stack, struct ivtype_map_elt,
2324 ivtype_map_elt, new_ivtype_map_elt,
2325 recompute_all_dominators): Moved to sese.h.
2327 * graphite-clast-to-gimple.c: New.
2328 * graphite-clast-to-gimple.h: New.
2329 * Makefile.in: Add new rule for graphite-clast-to-gimple.o.
2330 * sese.c: Modified as said above.
2333 2009-02-20 Sebastian Pop <sebastian.pop@amd.com>
2335 * graphite.c: Split scop detection to a new file.
2336 (enum gbb_type, gbb_type, get_bb_type, struct sd_region_p, sd_region,
2337 move_sd_regions, loop_affine_expr, exclude_component_ref,
2338 is_simple_operand, stmt_simple_for_scop_p, harmful_stmt_in_bb,
2339 graphite_cannot_represent_loop_niter, struct scopdet_info,
2340 scopdet_basic_block_info, build_scops_1, bb_in_sd_region,
2341 find_single_entry_edge, find_single_exit_edge,
2342 create_single_entry_edge, sd_region_without_exit,
2343 create_single_exit_edge, unmark_exit_edges, mark_exit_edges,
2344 create_sese_edges, build_graphite_scops, limit_scops, build_scops):
2345 Moved to graphite-scop-detection.c.
2347 * graphite-scop-detection.c: New.
2348 * graphite-scop-detection.h: New.
2349 * Makefile.in: Add new rule for graphite-scop-detection.o.
2351 * sese.c: Include tree-chrec.h, tree-data-ref.h, and
2352 tree-scalar-evolution.h.
2353 (nb_reductions_in_loop, graphite_loop_normal_form, sese_record_loop,
2354 build_sese_loop_nests): Moved here from graphite.c.
2355 (param_index): Renamed parameter_index_in_region.
2357 2009-02-18 Tobias Grosser <grosser@fim.uni-passau.de>
2358 Sebastian Pop <sebastian.pop@amd.com>
2360 * gcc.dg/graphite/block-0.c: Expected to fail now.
2361 * gcc.dg/graphite/block-1.c: Same.
2362 * gcc.dg/graphite/block-5.c: Same.
2363 * gcc.dg/graphite/block-6.c: Same.
2365 2009-02-18 Tobias Grosser <grosser@fim.uni-passau.de>
2366 Sebastian Pop <sebastian.pop@amd.com>
2368 * graphite.h: Separate from graphite_bb_p the polyhedral
2369 representation in poly_bb_p and the GCC specifics in gimple_bb_p.
2370 (struct data_dependence_polyhedron, RDGE_DDP, ddp_p): Moved to
2371 graphite-data-ref.h.
2372 (struct poly_bb, PBB_SCOP, PBB_STATIC_SCHEDULE, PBB_DOMAIN,
2373 PBB_BLACK_BOX, PBB_LOOPS, pbb_nb_loops, pbb_loop_at_index,
2374 pbb_loop_index, struct scop, SCOP_BBS, SCOP_REGION, SCOP_ENTRY,
2375 SCOP_EXIT, SCOP_REGION_BBS, SCOP_DEP_GRAPH, SCOP_PARAMS,
2376 SCOP_LOOP_NEST, SCOP_PARAMS, SCOP_OLDIVS, SCOP_LIVEOUT_RENAMES,
2377 scop_nb_params): Moved to graphite-poly.h.
2378 * graphite-data-ref.c: Same.
2379 * graphite-data-ref.h: New.
2381 (pbb_compare, graphite_sort_pbbs, graphite_trans_bb_move_loop,
2382 graphite_trans_bb_strip_mine, strip_mine_profitable_p,
2383 is_interchange_valid, graphite_trans_bb_block,
2384 graphite_trans_loop_block, scop_max_loop_depth,
2385 graphite_trans_scop_block, graphite_apply_transformations,
2386 new_poly_bb, free_poly_bb, new_scop, free_scop): Moved to
2388 * graphite-poly.h: New.
2389 * graphite-poly.c: New.
2390 * Makefile.in (OBJS-common): Add graphite-poly.o.
2391 (graphite-poly.o): New rule.
2392 * tree-data-ref.h (struct data_reference): Remove unused scop field.
2395 2009-02-18 Sebastian Pop <sebastian.pop@amd.com>
2396 Tobias Grosser <grosser@fim.uni-passau.de>
2398 * graphite.c: Replace gb -> gbb.
2400 * graphite-data-ref.c: Same.
2402 2009-02-18 Sebastian Pop <sebastian.pop@amd.com>
2403 Tobias Grosser <grosser@fim.uni-passau.de>
2405 * Makefile.in (OBJS-commmon): Add sese.o.
2407 (graphite.o): Add sese.h.
2408 * graphite.c (bb_in_ss_p, loop_in_sese_p,
2409 sese_build_livein_liveouts_use, sese_build_livein_liveouts_bb,
2410 sese_build_livein_liveouts, register_bb_in_sese, new_sese, free_sese):
2412 (block_before_scop): Add missing return.
2413 (new_scop, free_scop): Remove SESE data structures.
2414 (scop_record_loop, scan_tree_for_params, find_params_in_bb,
2415 find_scop_parameters, build_loop_iteration_domains,
2416 add_conditions_to_domain, register_scop_liveout_renames,
2417 copy_bb_and_scalar_dependences): Scop -> SESE.
2419 (add_conditions_to_domain): SCoP -> SESE and remove check
2420 (scop_contains_non_iv_scalar_phi_nodes): New.
2421 (build_scop_conditions_1, build_scop_conditions): Remove check for
2422 non iv scalar phi nodes.
2423 (print_scop_statistics): New.
2424 (graphite_transform_loops): Cleanup.
2426 * graphite.h: Move to sese & cleanup.
2430 2009-02-16 Sebastian Pop <sebastian.pop@amd.com>
2431 Tobias Grosser <grosser@fim.uni-passau.de>
2433 * graphite.c (build_scop_conditions_1): Conditions are only
2434 at the end of a basic block.
2436 2009-02-16 Sebastian Pop <sebastian.pop@amd.com>
2437 Tobias Grosser <grosser@fim.uni-passau>
2439 * graphite.h (struct graphite_bb): Remove compressed_alpha_matrix
2441 (GBB_ALPHA): Removed.
2443 2009-02-16 Sebastian Pop <sebastian.pop@amd.com>
2444 Tobias Grosser <grosser@fim.uni-passau.de>
2446 * graphite-data-ref.c (graphite_test_dependence): Don't use
2447 GBB_DYNAMIC_SCHEDULE.
2448 * graphite.c (new_graphite_bb): Same.
2449 (free_graphite_bb): Same.
2450 (build_scop_dynamic_schedules): Removed.
2451 (graphite_transform_loops): Don't call it.
2452 * graphite.h (struct graphite_bb): Remove dynamic_schedule field.
2453 (GBB_DYNAMIC_SCHEDULE): Removed.
2455 2009-02-16 Sebastian Pop <sebastian.pop@amd.com>
2456 Tobias Grosser <grosser@fim.uni-passau.de>
2458 * graphite.c (schedule_to_scattering): Don't use CloogMatrix.
2459 (print_graphite_bb): Same.
2460 (build_cloog_prog): Same.
2462 2009-02-16 Sebastian Pop <sebastian.pop@amd.com>
2463 Tobias Grosser <grosser@fim.uni-passau.de>
2465 * graphite.c (build_cloog_prog): Don't use CloogMatrix.
2467 2009-02-16 Sebastian Pop <sebastian.pop@amd.com>
2468 Tobias Grosser <grosser@fim.uni-passau.de>
2470 * graphite.c (build_scop_context): Don't use CloogMatrix.
2471 * graphite-ppl.c (new_Cloog_Domain_from_ppl_Polyhedron): New.
2472 * graphite-ppl.h (new_Cloog_Domain_from_ppl_Polyhedron): Declared.
2474 2009-02-16 Sebastian Pop <sebastian.pop@amd.com>
2475 Tobias Grosser <grosser@fim.uni-passau.de>
2477 * graphite.h (struct scop): Move params, old_ivs, loops, loop_nest,
2478 liveout_renames, add_params fields...
2479 (struct sese): ... here.
2480 (SESE_PARAMS, SESE_LOOPS, SESE_LOOP_NEST, SESE_ADD_PARAMS,
2481 SESE_PARAMS, SESE_OLDIVS, SESE_LIVEOUT_RENAMES): New.
2483 2009-02-16 Sebastian Pop <sebastian.pop@amd.com>
2484 Tobias Grosser <grosser@fim.uni-passau.de>
2486 * graphite.c (print_scop): Do not print the CLooG program.
2487 (new_scop, free_scop, initialize_cloog_names, build_scop_context,
2488 build_cloog_prog, gloog): Don't use SCOP_PROG.
2489 (find_transform): Renamed scop_to_clast.
2490 (print_generated_program, debug_generated_program): New.
2491 (graphite_transform_loops): Adapt to new interface.
2492 * graphite.h (struct scop): Remove program field.
2493 (SCOP_PROG): Removed.
2494 (print_generated_program, debug_generated_program): Declared.
2496 2009-02-16 Sebastian Pop <sebastian.pop@amd.com>
2498 * graphite-data-ref.c (schedule_precedes_p, schedule_same_p): New.
2499 (statement_precedes_p): Use schedule_same_p and schedule_precedes_p.
2500 * graphite.c (gbb_compare, schedule_to_scattering, print_graphite_bb,
2501 free_graphite_bb, build_scop_canonical_schedules,
2502 graphite_trans_bb_strip_mine, graphite_trans_scop_block): Static
2503 schedules are now represented using a ppl_Linear_Expression_t.
2504 * graphite.h (struct graphite_bb): Same.
2505 * graphite-ppl.c (ppl_lexico_compare_linear_expressions): New.
2506 * graphite-ppl.h (ppl_lexico_compare_linear_expressions): Declared.
2508 2009-02-15 Sebastian Pop <sebastian.pop@amd.com>
2510 * graphite.c: Free local memory.
2511 * graphite-ppl.c: Same.
2513 2009-02-15 Sebastian Pop <sebastian.pop@amd.com>
2515 * graphite.c (const_column_index, get_first_matching_sign_row_index,
2516 get_lower_bound_row, get_upper_bound_row, copy_constraint,
2517 swap_constraint_variables, scale_constraint_variable): Removed.
2518 (graphite_trans_bb_strip_mine): Remove pong.
2519 * graphite-ppl.c: Include missing header files.
2520 (set_inhomogeneous, set_coef, shift_poly, ppl_strip_loop): New.
2521 * graphite-ppl.h (ppl_strip_loop): Declared.
2522 * Makefile.in (graphite-ppl.o): Adjust dependences.
2524 2009-02-14 Sebastian Pop <sebastian.pop@amd.com>
2526 * graphite.c (build_loop_iteration_domains): Remove ping pong.
2527 (build_scop_iteration_domain): Same.
2529 2009-02-13 Sebastian Pop <sebastian.pop@amd.com>
2531 * graphite.c (scan_tree_for_params, add_conditions_to_domain): Remove
2533 (add_value_to_dim, scan_tree_for_params_right_scev,
2534 scan_tree_for_params_int): New.
2535 * graphite-ppl.c (oppose_constraint): New.
2536 (insert_constraint_into_matrix): Implement missing cases.
2537 * graphite-ppl.h (insert_constraint_into_matrix): Declared.
2539 2009-02-13 Sebastian Pop <sebastian.pop@amd.com>
2541 * graphite.c (graphite_trans_bb_move_loop): Remove ping pong,
2542 use ppl_move_dimension.
2544 2009-02-12 Sebastian Pop <sebastian.pop@amd.com>
2546 * graphite-data-ref.c: Domains are now ppl_Polyhedra_t.
2549 * graphite-ppl.c: Same.
2550 * graphite-ppl.h: Same.
2552 2009-02-12 Sebastian Pop <sebastian.pop@amd.com>
2554 Revert last 3 commits.
2556 2009-02-10 Sebastian Pop <sebastian.pop@amd.com>
2558 * graphite.c (scan_tree_for_params, add_conditions_to_domain): Remove
2560 (add_value_to_dim, scan_tree_for_params_right_scev,
2561 scan_tree_for_params_int): New.
2562 * graphite-ppl.c (oppose_constraint): New.
2563 (insert_constraint_into_matrix): Implement missing cases.
2564 * graphite-ppl.h (insert_constraint_into_matrix): Declared.
2566 2009-02-10 Sebastian Pop <sebastian.pop@amd.com>
2568 * graphite.c (graphite_trans_bb_move_loop): Remove unused variables.
2570 2009-02-10 Sebastian Pop <sebastian.pop@amd.com>
2571 Tobias Grosser <grosser@fim.uni-passau.de>
2573 * graphite.c (graphite_trans_bb_move_loop): Remove ping pong,
2574 use ppl_move_dimension.
2575 * graphite-ppl.c (ppl_move_dimension): New.
2576 * graphite-ppl.h (ppl_move_dimension): Declared.
2578 2009-02-10 Sebastian Pop <sebastian.pop@amd.com>
2580 * graphite.c: Do not include cloog/cloog.h.
2581 (print_graphite_bb): Remove ping pong, call PPL print function.
2583 2009-02-10 Tobias Grosser <grosser@fim.uni-passau.de>
2585 * Makefile.in (OBJS-common): Add graphite-ppl.o.
2586 (graphite.o): Add dependence on graphite-ppl.h.
2587 (graphite-ppl.o): New.
2588 (graphite-data-ref.c): Ping pong between PPL data structures
2590 * graphite-ppl.c: New.
2591 * graphite-ppl.h: New.
2592 * graphite.c: Include graphite-ppl.h.
2593 (print_graphite_bb, add_conditions_to_domain, build_cloog_prog,
2594 graphite_trans_bb_move_loop, graphite_trans_bb_strip_mine):
2595 Ping pong between PPL data structures and matrices.
2596 (new_graphite_bb): Create a PPL constraint system.
2597 Call ppl_delete_Constraint_System instead of cloog_matrix_free.
2598 (build_loop_iteration_domains): Use PPL functions.
2599 * graphite.h: Include graphite-ppl.h. Fix comments.
2600 (graphite_bb): Use a ppl_Constraint_System_t instead of
2601 CloogMatrix for representing the domain.
2602 (scop): Remove static_schedule.
2603 (gbb_nb_loops): Ping pong between PPL data structures and matrices.
2605 2009-02-06 Sebastian Pop <sebastian.pop@amd.com>
2607 * graphite.c: Fix some comments.
2609 2009-02-05 Sebastian Pop <sebastian.pop@amd.com>
2612 * graphite.c (if_region_set_false_region): After moving a region
2613 in the false branch of a condition, remove the empty dummy
2615 (gloog): Remove wrong fix for PR38953.
2617 2009-02-03 Tobias Grosser <grosser@fim.uni-passau.de>
2619 * graphite.c (bb_in_sese_p, sese_build_livein_liveouts_use,
2620 sese_build_livein_liveouts_bb, sese_build_livein_liveouts,
2621 register_bb_in_sese, new_sese, free_sese): Moved.
2622 (dot_scop_1, build_scop_loop_nests, build_loop_iteration_domains,
2623 outermost_loop_in_scop, build_scop_iteration_domain,
2624 expand_scalar_variables_ssa_name, get_vdef_before_scop,
2625 limit_scops): Use bb_in_sese_p instead of bb_in_scop_p.
2626 Use loop_in_sese_p instead of loop_in_scop_p.
2627 (new_graphite_bb, new_scop, gloog): Do not initialize SCOP_BBS_B.
2628 (free_scop): Do not free SCOP_BBS_B.
2629 (nb_loops_around_loop_in_scop, nb_loops_around_gb,
2630 ref_nb_loops): Moved here...
2631 * graphite.h (ref_nb_loops): ... from here.
2632 (struct scop): Remove bbs_b bitmap.
2633 (SCOP_BBS_B, bb_in_scop_p, loop_in_scop_p): Removed.
2634 * testsuite/gcc.dg/graphite/scop-19.c: New
2636 2009-02-03 Tobias Grosser <grosser@fim.uni-passau.de>
2638 * graphite.c (scopdet_basic_block_info): Fix bug in scop
2641 2009-01-30 Tobias Grosser <grosser@fim.uni-passau.de>
2643 * graphite.c (new_loop_to_cloog_loop_str, hash_loop_to_cloog_loop,
2644 eq_loop_to_cloog_loop): Remove.
2645 (new_scop, free_scop): Remove SCOP_LOOP2CLOOG_LOOP.
2646 * graphite.h (struct scop): Remove loop2cloog_loop.
2647 (loop_domain_dim, loop_iteration_vector_dim): Remove.
2649 2009-01-30 Tobias Grosser <grosser@fim.uni-passau.de>
2651 * opts.c (decode_options): Only add graphite options to O2
2652 if we compile with graphite enabled.
2654 2009-01-26 Sebastian Pop <sebastian.pop@amd.com>
2656 * Merge from mainline (r143163:143684).
2658 2009-01-26 Sebastian Pop <sebastian.pop@amd.com>
2660 * graphite.c (debug_value): Removed.
2661 * graphite.h (debug_value): Removed.
2663 2009-01-23 Sebastian Pop <sebastian.pop@amd.com>
2665 * passes.c (init_optimization_passes): Do not call pass_copy_prop
2666 after graphite: pass_copy_prop does not maintain a proper loop closed
2667 SSA form. pass_copy_prop should be fixed.
2669 2009-01-23 Sebastian Pop <sebastian.pop@amd.com>
2671 * graphite.c (scop_adjust_phis_for_liveouts): Fix warning.
2673 2009-01-23 Sebastian Pop <sebastian.pop@amd.com>
2675 * graphite.c (graphite_verify): Add a call to verify_loop_closed_ssa.
2676 (gloog): Split the exit of the scop when the scop exit is a loop exit.
2677 (graphite_transform_loops): Only call cleanup_tree_cfg if gloog
2680 2009-01-20 Sebastian Pop <sebastian.pop@amd.com>
2682 * graphite.c (gloog): Return true when code gen succeeded.
2683 (graphite_transform_loops): Do not call cleanup_tree_cfg if
2684 the code of the function did not changed. After cleanup_tree_cfg
2685 call rewrite_into_loop_closed_ssa to maintain the loop closed ssa
2688 2009-01-19 Sebastian Pop <sebastian.pop@amd.com>
2690 * graphite.c (stmt_simple_for_scop_p): Also handle cases when
2691 gimple_call_lhs is NULL.
2693 2009-01-16 Sebastian Pop <sebastian.pop@amd.com>
2694 Tobias Grosser <tobi.grosser@amd.com>
2696 * graphite.c (graphite_trans_scop_block): Do not block single
2699 2009-01-15 Sebastian Pop <sebastian.pop@amd.com>
2700 Tobias Grosser <tobi.grosser@amd.com>
2702 * graphite.c (build_scop_canonical_schedules): Start schedules at
2705 2009-01-15 Sebastian Pop <sebastian.pop@amd.com>
2706 Tobias Grosser <tobi.grosser@amd.com>
2708 * graphite.c (compare_prefix_loops): New.
2709 (build_scop_canonical_schedules): Rewritten.
2710 (graphite_transform_loops): Move build_scop_canonical_schedules
2711 after build_scop_iteration_domain.
2713 2009-01-14 Sebastian Pop <sebastian.pop@amd.com>
2714 Tobias Grosser <tobi.grosser@amd.com>
2716 * graphite.c (add_conditions_to_domain): Add the loops to
2717 the dimension of the iteration domain. Do copy the domain
2718 only when it exists.
2719 (build_scop_conditions_1): Do not call add_conditions_to_domain.
2720 (add_conditions_to_constraints): New.
2721 (can_generate_code_stmt, can_generate_code): Removed.
2722 (gloog): Do not call can_generate_code.
2723 (graphite_transform_loops): Call add_conditions_to_constraints
2724 after building the iteration domain.
2726 2009-01-14 Sebastian Pop <sebastian.pop@amd.com>
2727 Tobias Grosser <tobi.grosser@amd.com>
2728 Jan Sjodin <jan.sjodin@amd.com>
2730 * graphite.c (scan_tree_for_params): On substractions negate
2731 all the coefficients of the term.
2732 (clast_to_gcc_expression_red): New. Handle reduction expressions
2733 of more than two operands.
2734 (clast_to_gcc_expression): Call clast_to_gcc_expression_red.
2735 (get_vdef_before_scop): Handle also the case of default definitions.
2737 2009-01-14 Sebastian Pop <sebastian.pop@amd.com>
2740 * graphite.c (get_vdef_before_scop, scop_adjust_vphi): New.
2741 (scop_adjust_phis_for_liveouts): Call scop_adjust_vphi.
2742 (gloog): Do not call cleanup_tree_cfg.
2743 (graphite_transform_loops): Call cleanup_tree_cfg after all
2744 scops have been code generated.
2746 2009-01-13 Sebastian Pop <sebastian.pop@amd.com>
2748 * passes.c (init_optimization_passes): Schedule after
2749 graphite transforms pass_copy_prop, pass_dce_loop and pass_lim.
2751 2009-01-13 Sebastian Pop <sebastian.pop@amd.com>
2753 * graphite.c (expand_scalar_variables_stmt): Do not pass loop_p.
2755 (expand_scalar_variables_ssa_name): Do not pass loop_p. Fix comment.
2756 Set the type of an expression to the type of its assign statement.
2757 (expand_scalar_variables_expr): Do not pass loop_p.
2758 Fix comment. Stop recursion on tcc_constant or tcc_declaration.
2759 (copy_bb_and_scalar_dependences): Do not pass loop_p.
2760 (translate_clast): Update call to copy_bb_and_scalar_dependences.
2762 2009-01-11 Sebastian Pop <sebastian.pop@amd.com>
2764 * graphite.c (expand_scalar_variables_ssa_name): Set the type of
2765 an expression to the gimple_expr_type of its assign statement.
2766 (expand_scalar_variables_expr): Stop recursion on tcc_constant
2769 2009-01-11 Sebastian Pop <sebastian.pop@amd.com>
2771 PR tree-optimization/38786
2772 * testsuite/gcc.dg/graphite/pr38786.c: New.
2773 * graphite.c (expand_scalar_variables_ssa_name): New, outlined from
2774 the SSA_NAME case of expand_scalar_variables_expr.
2775 (expand_scalar_variables_expr): Also gather the scalar computation
2776 used to index the memory access.
2777 (expand_scalar_variables_stmt): Pass to expand_scalar_variables_expr
2778 the gimple_stmt_iterator where it inserts new code.
2780 2009-01-10 Sebastian Pop <sebastian.pop@amd.com>
2782 * testsuite/gcc.dg/graphite/block-3.c: Fix compile error on 32bit.
2784 2009-01-10 Sebastian Pop <sebastian.pop@amd.com>
2786 * opts.c (decode_options): Enable flag_graphite_identity and
2787 flag_loop_block in -O2 and above.
2789 2009-01-08 Sebastian Pop <sebastian.pop@amd.com>
2791 * libjava/classpath/lib/gnu/java/awt/peer/gtk/GtkMouseInfoPeer.class:
2792 Fix merge problem: replace with the file from trunk.
2794 2009-01-08 Sebastian Pop <sebastian.pop@amd.com>
2796 * Merge from mainline (r141727:143163).
2798 2009-01-07 Sebastian Pop <sebastian.pop@amd.com>
2799 Jan Sjodin <jan.sjodin@amd.com>
2801 PR tree-optimization/38559
2802 * testsuite/gcc.dg/graphite/pr38559.c: New.
2804 * graphite.c (debug_value, copy_constraint,
2805 swap_constraint_variables, scale_constraint_variable, ): New.
2806 (get_lower_bound, get_upper_bound): Removed.
2807 (graphite_trans_bb_strip_mine): Clean up this code that works
2808 only for constant number of iterations. Fully copy upper and
2809 lower bound constraints, not only the constant part of them.
2810 * graphite.h (debug_value): Declared.
2812 2009-01-06 Jan Sjodin <jan.sjodin@amd.com>
2814 PR tree-optimization/38492
2815 PR tree-optimization/38498
2816 * tree-check.c (operator_is_linear, scev_is_linear_expression): New.
2817 * tree-chrec.h (scev_is_linear_expression): Declared.
2818 * graphite.c (graphite_cannot_represent_loop_niter): New.
2819 (scopdet_basic_block_info): Call graphite_cannot_represent_loop_niter.
2820 (graphite_loop_normal_form): Use gcc_assert.
2821 (scan_tree_for_params): Use CASE_CONVERT.
2822 (phi_node_is_iv, bb_contains_non_iv_scalar_phi_nodes): New.
2823 (build_scop_conditions_1): Call bb_contains_non_iv_scalar_phi_nodes.
2824 Use gcc_assert. Discard scops that contain unhandled cases.
2825 (build_scop_conditions): Return a boolean status for unhandled cases.
2826 (strip_mine_profitable_p): Print the loop number, not its depth.
2827 (is_interchange_valid): Pass the depth of the loop nest, don't
2828 recompute it wrongly.
2829 (graphite_trans_bb_block): Same.
2830 (graphite_trans_bb_block): Print tentative of loop blocking.
2831 (graphite_trans_scop_block): Do not print that the loop has been
2833 (graphite_transform_loops): Do not handle scops that contain condition
2836 * testsuite/gcc.dg/graphite/pr38500.c: Fixed warning as committed
2838 * testsuite/gcc.dg/graphite/block-0.c: Update test.
2839 * testsuite/gcc.dg/graphite/block-1.c: Same.
2840 * testsuite/gcc.dg/graphite/block-2.c: Remove xfail and test for
2842 * testsuite/gcc.dg/graphite/block-4.c: Remove test for strip mine.
2843 * testsuite/gcc.dg/graphite/block-3.c: New.
2844 * testsuite/gcc.dg/graphite/pr38498.c: New.
2846 2008-12-22 Harsha Jagasia <harsha.jagasia@amd.com>
2848 PR tree-optimization/38510
2849 * gcc.dg/graphite/pr38510.c: New.
2850 * graphite.c (recompute_all_dominators): Call mark_irreducible_loops.
2851 (translate_clast): Call recompute_all_dominators before
2853 (gloog): Call recompute_all_dominators before graphite_verify.
2855 2008-12-12 Sebastian Pop <sebastian.pop@amd.com>
2857 PR tree-optimization/38492
2858 * graphite.c (rename_map_elt, debug_rename_elt,
2859 debug_rename_map_1, debug_rename_map, new_rename_map_elt,
2860 rename_map_elt_info, eq_rename_map_elts,
2861 get_new_name_from_old_name, bb_in_sese_p): Moved around.
2862 (sese_find_uses_to_rename_use): Renamed sese_build_livein_liveouts_use.
2863 (sese_find_uses_to_rename_bb): Renamed sese_build_livein_liveouts_bb.
2864 (sese_build_livein_liveouts): New.
2865 (new_sese, free_sese): New.
2866 (new_scop): Call new_sese.
2867 (free_scop): Call free_sese.
2868 (rename_variables_from_edge, rename_phis_end_scop): Removed.
2869 (register_old_new_names): Renamed register_old_and_new_names.
2870 (register_scop_liveout_renames, add_loop_exit_phis,
2871 insert_loop_close_phis, struct igp,
2872 default_liveout_before_guard, add_guard_exit_phis,
2873 insert_guard_phis, copy_renames): New.
2874 (translate_clast): Call insert_loop_close_phis and insert_guard_phis.
2875 (sese_add_exit_phis_edge): Renamed scop_add_exit_phis_edge.
2876 (rewrite_into_sese_closed_ssa): Renamed scop_insert_phis_for_liveouts.
2877 (scop_adjust_phis_for_liveouts): New.
2878 (gloog): Call scop_adjust_phis_for_liveouts.
2880 * graphite.h (struct sese): Documented. Added fields liveout,
2882 (SESE_LIVEOUT, SESE_LIVEIN, SESE_LIVEIN_VER, SESE_NUM_VER): New.
2883 (new_sese, free_sese, sese_build_livein_liveouts): Declared.
2884 (struct scop): Added field liveout_renames.
2885 (SCOP_LIVEOUT_RENAMES): New.
2887 2008-12-11 Sebastian Pop <sebastian.pop@amd.com>
2889 PR tree-optimization/38409
2890 * gcc.dg/graphite/pr38409.c: New.
2891 * graphite.c (nb_reductions_in_loop): Use simple_iv.
2893 2008-12-11 Sebastian Pop <sebastian.pop@amd.com>
2895 * graphite.c (gcc_type_for_cloog_iv): By default return
2897 (graphite_create_new_loop): Don't fold_convert the already
2898 fold_convert-ed expression.
2900 2008-12-11 Harsha Jagasia <harsha.jagasia@amd.com>
2902 PR tree-optimization/38446
2903 * gcc.dg/graphite/pr38446.c: New.
2904 * graphite.c (register_bb_in_sese): New.
2905 (bb_in_sese_p): Check if bb belongs to sese region by explicitly
2906 looking at the bbs in the region.
2907 * graphite.h (sese): Add region_basic_blocks pointer set to
2908 structure and initialize at the time of defining new scop.
2910 2008-12-11 Tobias Grosser <grosser@fim.uni-passau.de>
2912 * graphite.c (new_graphite_bb): Initialize GBB_STATIC_SCHEDULE.
2913 (find_params_in_bb): Do not free data refs.
2914 (free_graphite_bb): Add FIXME on disabled free_data_refs.
2916 2008-12-11 Sebastian Pop <sebastian.pop@amd.com>
2918 * testsuite/gcc.dg/graphite/scop-16.c: Test only scop specific info.
2919 * testsuite/gcc.dg/graphite/scop-17.c: Same.
2920 * testsuite/gcc.dg/graphite/block-5.c: New.
2921 * testsuite/gcc.dg/graphite/block-6.c: New.
2922 * testsuite/gcc.dg/graphite/pr37485.c: Clean dump file after.
2923 * testsuite/gcc.dg/graphite/pr37684.c: Same.
2924 * testsuite/gcc.dg/graphite/block-2.c: Same.
2926 * graphite.c (struct ivtype_map_elt): New.
2927 (debug_ivtype_elt, debug_ivtype_map_1, debug_ivtype_map,
2928 new_ivtype_map_elt, ivtype_map_elt_info, eq_ivtype_map_elts,
2929 gcc_type_for_cloog_iv): New.
2930 (loop_iv_stack_patch_for_consts): Use the type of the induction
2931 variable from the original loop, except for the automatically
2932 generated loops, i.e., in the case of a strip-mined loop, in
2933 which case there is no original loop: in that case just use
2935 (new_graphite_bb): Initialize GBB_CLOOG_IV_TYPES.
2936 (free_graphite_bb): Free GBB_CLOOG_IV_TYPES.
2937 (clast_name_to_gcc): Accept params to be NULL.
2938 (clast_to_gcc_expression): Take an extra parameter for the type.
2939 Convert to that type all the expressions built by this function.
2940 (gcc_type_for_clast_expr, gcc_type_for_clast_eq): New.
2941 (graphite_translate_clast_equation): Compute the type of the
2942 clast_equation before translating its LHS and RHS.
2943 (clast_get_body_of_loop, gcc_type_for_iv_of_clast_loop): New.
2944 (graphite_create_new_loop): Compute the type of the induction
2945 variable before translating the lower and upper bounds and before
2946 creating the induction variable.
2947 (rename_variables_from_edge, rename_phis_end_scop): New.
2948 (copy_bb_and_scalar_dependences): Call rename_phis_end_scop.
2949 (sese_add_exit_phis_edge): Do not use integer_zero_node.
2950 (find_cloog_iv_in_expr, compute_cloog_iv_types_1,
2951 compute_cloog_iv_types): New.
2952 (gloog): Call compute_cloog_iv_types before starting the
2953 translation of the clast.
2955 * graphite.h (struct graphite_bb): New field cloog_iv_types.
2956 (GBB_CLOOG_IV_TYPES): New.
2957 (debug_ivtype_map): Declared.
2958 (oldiv_for_loop): New.
2960 2008-12-10 Tobias Grosser <grosser@fim.uni-passau.de>
2963 * graphite.c (new_scop): Initialize SCOP_ADD_PARAMS.
2964 (param_index): Assert if parameter is not know after parameter
2966 (find_params_in_bb): Detect params directly in GBB_CONDITIONS.
2967 (find_scop_parameters): Mark, that we have finished parameter
2969 (graphite_transform_loops): Move condition detection before parameter
2971 * graphite.h (struct scop): Add SCOP_ADD_PARAMS.
2972 * testsuite/gfortran.dg/graphite/pr38459.f90: New.
2974 2008-12-09 Tobias Grosser <grosser@fim.uni-passau.de>
2976 * graphite.c (graphite_transform_loops): Always call find_transform ()
2977 in ENABLE_CHECKING. So we test these code paths, even if we do not
2980 2008-12-09 Tobias Grosser <grosser@fim.uni-passau.de>
2982 * graphite.c (print_graphite_bb): Fix printing to file != dump_file.
2983 (print_scop): Ditto.
2985 2008-12-08 Tobias Grosser <grosser@fim.uni-passau.de>
2988 Fix testsuite/gfortran.dg/graphite/id-3.f90.
2989 * graphite.c (scopdet_basic_block_info): Fix bug that found some
2990 regions more than once.
2992 2008-12-03 Sebastian Pop <sebastian.pop@amd.com>
2994 Fix testsuite/gfortran.dg/graphite/id-4.f90.
2995 * graphite.c (scan_tree_for_params): Do not compute the multiplicand
2998 2008-12-03 Sebastian Pop <sebastian.pop@amd.com>
3000 Fix testsuite/gfortran.dg/graphite/id-1.f90.
3001 * graphite.c (gmp_cst_to_tree): Pass the type in parameter.
3002 (loop_iv_stack_patch_for_consts): Update use of gmp_cst_to_tree.
3003 (max_precision_type): New.
3004 (value_clast): Removed.
3005 (clast_to_gcc_expression): Be more careful to types of expressions.
3006 Use max_precision_type and update use of gmp_cst_to_tree.
3007 (graphite_translate_clast_equation): Use max_precision_type.
3008 (graphite_create_guard_cond_expr): Do not use integer_type_node,
3009 use the type of the condition.
3010 (graphite_create_new_loop): Do not use integer_type_node, use the
3011 max_precision_type of lb and ub.
3013 2008-12-03 Sebastian Pop <sebastian.pop@amd.com>
3015 * graphite.c (build_scops_1): Initialize open_scop.exit
3018 2008-12-02 Sebastian Pop <sebastian.pop@amd.com>
3020 * testsuite/gcc.dg/graphite/pr38084.c: New.
3021 * testsuite/gfortran.dg/graphite/id-1.f90: New.
3022 * testsuite/gfortran.dg/graphite/id-2.f90: New.
3023 * testsuite/gfortran.dg/graphite/id-3.f90: New.
3024 * testsuite/gfortran.dg/graphite/id-4.f90: New.
3025 * testsuite/gfortran.dg/graphite/pr37857.f90: New.
3027 2008-12-02 Sebastian Pop <sebastian.pop@amd.com>
3028 Jan Sjodin <jan.sjodin@amd.com>
3029 Harsha Jagasia <harsha.jagasia@amd.com>
3041 * testsuite/gcc.dg/graphite/pr38073.c: New.
3042 * testsuite/gcc.dg/graphite/pr37928.c: New.
3043 * testsuite/gcc.dg/graphite/pr37883.c: New.
3044 * testsuite/gcc.dg/graphite/pr38125.c: New.
3045 * testsuite/gfortran.dg/graphite/pr38083.f90: New.
3046 * testsuite/gfortran.dg/graphite/pr37852.f90: New.
3047 * testsuite/gfortran.dg/graphite/pr37980.f90: New.
3049 * testsuite/gcc.dg/graphite/scop-18.c: Remove reduction, test for
3050 the number of detected scops. Copy exact same test for loop
3052 * testsuite/gcc.dg/graphite/block-1.c: Fix the number of expected
3053 loops to be blocked as reductions are not handled.
3054 * testsuite/gcc.dg/graphite/block-4.c: ...here. New.
3056 * tree-phinodes.c (remove_phi_nodes): New, extracted from...
3057 * tree-cfg.c (remove_phi_nodes_and_edges_for_unreachable_block):
3059 * tree-flow.h (remove_phi_nodes, canonicalize_loop_ivs): Declared.
3060 * Makefile.in (graphite.o): Depend on value-prof.h.
3061 (graphite.o-warn): Removed -Wno-error.
3062 * tree-parloops.c (canonicalize_loop_ivs): Allow reduction_list
3063 to be a NULL pointer. Call update_stmt. Return the newly created
3064 cannonical induction variable.
3066 * graphite.h (debug_rename_map): Declared. Fix some comments.
3068 * graphite.c: Reimplement the code generation from graphite to gimple.
3069 Include value-prof.h.
3070 (loop_iv_stack_get_iv): Do not return NULL for constant substitutions.
3071 (get_old_iv_from_ssa_name): Removed.
3072 (graphite_stmt_p): New.
3073 (new_graphite_bb): Test for useful statements before building a
3074 graphite statement for the basic block.
3075 (free_graphite_bb): Do not free GBB_DATA_REFS: this is a bug
3076 in free_data_ref that calls BITMAP_FREE (DR_VOPS (dr)) without
3078 (recompute_all_dominators, graphite_verify,
3079 nb_reductions_in_loop, graphite_loop_normal_form): New.
3080 (scop_record_loop): Call graphite_loop_normal_form.
3081 (build_scop_loop_nests): Iterate over all the blocks of the
3082 function instead of relying on the incomplete information from
3083 SCOP_BBS. Return the success of the operation.
3084 (find_params_in_bb): Use the data from GBB_DATA_REFS.
3085 (add_bb_domains): Removed.
3086 (build_loop_iteration_domains): Don't call add_bb_domains.
3087 Add the iteration domain only to the basic blocks that have been
3088 translated to graphite.
3089 (build_scop_conditions_1): Add constraints only if the basic
3090 block have been translated to graphite.
3091 (build_scop_data_accesses): Completely disabled until data
3092 dependence is correctly implemented.
3093 (debug_rename_elt, debug_rename_map_1, debug_rename_map): New.
3094 (remove_all_edges_1, remove_all_edges): Removed.
3095 (get_new_name_from_old_name): New.
3096 (graphite_rename_variables_in_stmt): Renamed
3097 rename_variables_in_stmt. Call get_new_name_from_old_name.
3098 Use replace_exp and update_stmt.
3099 (is_old_iv): Renamed is_iv.
3100 (expand_scalar_variables_stmt): Extra parameter for renaming map.
3101 Use replace_exp and update_stmt.
3102 (expand_scalar_variables_expr): Same. Use the map to get the
3103 new names for the renaming of induction variables and for the
3104 renaming of variables after a basic block has been copied.
3105 (expand_scalar_variables): Same.
3106 (graphite_rename_variables): Renamed rename_variables.
3107 (move_phi_nodes): Removed.
3108 (get_false_edge_from_guard_bb): New.
3109 (build_iv_mapping): Do not insert the induction variable of a
3110 loop in the renaming iv map if the basic block does not belong
3112 (register_old_new_names, graphite_copy_stmts_from_block,
3113 copy_bb_and_scalar_dependences): New.
3114 (translate_clast): Heavily reimplemented: copy basic blocks,
3115 do not move them. Finally, in call cleanup_tree_cfg in gloog.
3116 At each translation step call graphite_verify ensuring the
3117 consistency of the SSA, loops and dominators information.
3118 (collect_virtual_phis, find_vdef_for_var_in_bb,
3119 find_vdef_for_var_1, find_vdef_for_var,
3120 patch_phis_for_virtual_defs): Removed huge hack.
3121 (mark_old_loops, remove_dead_loops, skip_phi_defs,
3122 collect_scop_exit_phi_args, patch_scop_exit_phi_args,
3123 gbb_can_be_ignored, scop_remove_ignoreable_gbbs, ): Removed.
3124 (remove_sese_region, ifsese, if_region_entry, if_region_exit,
3125 if_region_get_condition_block, if_region_set_false_region,
3126 create_if_region_on_edge, move_sese_in_condition, bb_in_sese_p,
3127 sese_find_uses_to_rename_use, sese_find_uses_to_rename_bb,
3128 sese_add_exit_phis_edge, sese_add_exit_phis_var,
3129 rewrite_into_sese_closed_ssa): New.
3130 (gloog): Remove dead code. Early return if code cannot be
3131 generated. Call cleanup_tree_cfg once the scop has been code
3133 (graphite_trans_scop_block, graphite_trans_loop_block): Do not
3134 block loops with less than two loops.
3135 (graphite_apply_transformations): Remove the call to
3136 scop_remove_ignoreable_gbbs.
3137 (limit_scops): When build_scop_loop_nests fails, continue on
3138 the next scop. Fix open_scop.entry.
3139 (graphite_transform_loops): Call recompute_all_dominators: force the
3140 recomputation of correct CDI_DOMINATORS and CDI_POST_DOMINATORS.
3141 Call initialize_original_copy_tables and free_original_copy_tables
3142 to be able to copy basic blocks during code generation.
3143 When build_scop_loop_nests fails, continue on next scop.
3144 (value_clast): New union.
3145 (clast_to_gcc_expression): Fix type cast warning.
3147 2008-11-09 Sebastian Pop <sebastian.pop@amd.com>
3149 * Merge from mainline (r140838:141727).
3151 2008-11-05 Tobias Grosser <grosser@fim.uni-passau.de>
3155 * graphite.c (scan_tree_for_params): Add POINTER_PLUS_EXPR.
3157 2008-11-05 Tobias Grosser <grosser@fim.uni-passau.de>
3161 * graphite.c (scopdet_basic_block_info): Fix loops with multiple
3162 exits and conditions.
3163 * testsuite/gcc.dg/graphite/pr37943.c: New.
3165 2008-10-23 Tobias Grosser <grosser@fim.uni-passau.de>
3168 * graphite.c (gloog): Replace EXIT_BLOCK_PTR with scop exit.
3170 2008-10-23 Tobias Grosser <grosser@fim.uni-passau.de>
3172 * doc/invoke.texi: Fix spaces.
3174 2008-10-22 Sebastian Pop <sebastian.pop@amd.com>
3176 PR tree-optimization/37891
3177 Reverted last commit.
3178 * graphite.c (create_single_entry_edge): Set
3179 EDGE_IRREDUCIBLE_LOOP and BB_IRREDUCIBLE_LOOP.
3181 2008-10-21 Sebastian Pop <sebastian.pop@amd.com>
3182 Mitul Thakkar <mitul.thakkar@amd.com>
3184 * graphite.c (create_single_entry_edge): Set
3185 EDGE_IRREDUCIBLE_LOOP and BB_IRREDUCIBLE_LOOP.
3187 2008-10-16 Tobias Grosser <grosser@fim.uni-passau.de>
3189 * doc/invoke.texi: Add -fgraphite-identity.
3190 * graphite.c (graphite_apply_transformations): Check for
3191 -fgraphite-identity.
3192 * toplev.c (process_options): Add flag_graphite_identity.
3193 * tree-ssa-loop.c: Add flag_graphite_identity.
3195 2008-10-14 Sebastian Pop <sebastian.pop@amd.com>
3197 Undo changes from 2008-10-02:
3198 * tree-ssa-loop-ivopts.c (rewrite_use_nonlinear_expr): Convert
3199 operand type when copying the operand to a variable of different type.
3200 * cfgloopmanip.c (create_empty_loop_on_edge): Write exit condition
3201 with the IV name after increment.
3203 2008-10-14 Sebastian Pop <sebastian.pop@amd.com>
3204 Harsha Jagasia <harsha.jagasia@amd.com>
3206 PR tree-optimization/37828
3207 * testsuite/gcc.dg/graphite/pr37828.c: New.
3208 * graphite.c (graphite_trans_loop_block): Do not loop block
3209 single nested loops.
3211 2008-10-09 Harsha Jagasia <harsha.jagasia@amd.com>
3212 Sebastian Pop <sebastian.pop@amd.com>
3214 * graphite.c (struct rename_map_elt, new_rename_map_elt,
3215 rename_map_elt_info, eq_rename_map_elts): New.
3216 (graphite_rename_ivs_stmt): Renamed graphite_rename_variables_in_stmt.
3217 (expand_scalar_variables_expr): Change parameters.
3218 (expand_scalar_variables_stmt): Same.
3219 (expand_scalar_variables): Same.
3220 (graphite_rename_ivs): Rename graphite_rename_variables.
3221 (build_iv_mapping): New.
3222 (translate_clast): Call build_iv_mapping.
3223 * graphite.h (gbb_p): New name.
3225 2008-10-03 Harsha Jagasia <harsha.jagasia@amd.com>
3227 PR tree-optimization/37684
3228 * gcc.dg/graphite/pr37684.c: New.
3229 * graphite.c (exclude_component_ref): New.
3230 (is_simple_operand): Call exclude_component_ref.
3232 2008-10-02 Jan Sjodin <jan.sjodin@amd.com>
3233 Harsha Jagasia <harsha.jagasia@amd.com>
3235 PR tree-optimization/37485
3236 * gcc.dg/graphite/block-2.c: New
3237 * graphite.c (gmp_cst_to_tree): Moved.
3238 (iv_stack_entry_is_constant): New.
3239 (iv_stack_entry_is_iv): New.
3240 (loop_iv_stack_push): Renamed to loop_iv_stack_push_iv.
3241 (loop_iv_stack_insert_constant): New.
3242 (loop_iv_stack_pop): Use new datatpype.
3243 (loop_iv_stack_get_iv): Same.
3244 (loop_iv_stack_get_iv_from_name): Same.
3245 (loop_iv_stack_debug): Renamed to debug_loop_iv_stack.
3246 (loop_iv_stack_patch_for_consts): New.
3247 (loop_iv_stack_remove_constants): New.
3248 (graphite_create_new_loop): Use loop_iv_stack_push_iv.
3249 (translate_clast): Call loop_iv_stack_patch_for_consts and
3250 loop_iv_stack_remove_constants.
3251 (gloog): Use new datatype. Redirect construction edge to end
3252 block to avoid accidental deletion.
3253 * graphite.h (enum iv_stack_entry_kind): New. Tag for data in
3255 (union iv_stack_entry_data): New. Data in iv stack entry.
3256 (struct iv_stack_entry): New. Datatype for iv stack entries.
3258 2008-10-02 Sebastian Pop <sebastian.pop@amd.com>
3260 * tree-ssa-loop-ivopts.c (rewrite_use_nonlinear_expr): Convert
3261 operand type when copying the operand to a variable of different type.
3263 2008-10-02 Sebastian Pop <sebastian.pop@amd.com>
3265 * cfgloopmanip.c (create_empty_loop_on_edge): Write exit condition
3266 with the IV name after increment.
3268 2008-10-02 Sebastian Pop <sebastian.pop@amd.com>
3270 * Merge from mainline (r140164:140838).
3272 2008-09-10 Konrad Trifunovic <konrad.trifunovic@inria.fr>
3274 * graphite-data-ref.c: New.
3275 * graphite.c (print_scop): Also dump the dependence graph.
3276 (bb_in_scop_p, loop_in_scop_p, nb_loops_around_gb): Moved...
3277 (new_scop): Initialize SCOP_DEP_GRAPH.
3278 (build_scop_dynamic_schedules): New.
3279 (build_access_matrix_with_af): Fixed column numbering.
3280 (graphite_transform_loops): Call build_scop_dynamic_schedules.
3281 * graphite.h: Add ifndef/define guards against multiple inclusion.
3282 (struct scop): Add dep_graph field.
3283 (SCOP_DEP_GRAPH): Defined.
3284 (ref_nb_loops): Fixed and moved to other position.
3285 (bb_in_scop_p, loop_in_scop_p, nb_loops_around_gb): ... here.
3286 (nb_loops_around_loop_in_scop): New.
3287 (graphite_dump_dependence_graph): Declared.
3288 (graphite_build_rdg_all_levels): Declared.
3289 (graphite_test_dependence): Declared.
3290 * Makefile.in (graphite-data-ref.o): New target.
3292 2008-09-09 Sebastian Pop <sebastian.pop@amd.com>
3294 * Merge from mainline (139870:140164).
3296 2008-09-01 Sebastian Pop <sebastian.pop@amd.com>
3298 * Merge from mainline (138275:139870).
3299 * testsuite/gcc.dg/graphite/scop-matmult.c: XFailed as one of
3300 the commits from trunk broke the niter detection.
3302 2008-09-01 Sebastian Pop <sebastian.pop@amd.com>
3304 * graphite.c: Add more documentation. Fix formatting.
3305 (debug_loop_vec, debug_oldivs, loop_iv_stack,
3306 loop_iv_stack_debug): Moved...
3307 (schedule_to_scattering): Move before use.
3308 (dot_all_scops): Include in "#if 0" the code for system
3311 * graphite.h: (debug_loop_vec, debug_oldivs, loop_iv_stack,
3312 loop_iv_stack_debug): ...here.
3314 2008-08-29 Jan Sjodin <jan.sjodin@amd.com>
3316 * tree-phinodes.c (make_phi_node): Extern.
3317 (add_phi_node_to_bb): New.
3318 (create_phi_node): Call add_phi_node_to_bb.
3319 * tree-ssa-loop-ivopts.c (get_phi_with_result): New.
3320 (remove_statement): Handle case where stored phi was updated
3321 and is no longer the same.
3322 * graphite.c (is_parameter): New.
3324 (expand_scalar_variables_expr): New.
3325 (expand_scalar_variables_stmt): New.
3326 (expand_scalar_variables): New.
3327 (move_phi_nodes): Create new phi instead of moving old one.
3328 (translate_clast): Call expand_scalar_variables.
3329 (find_vdef_for_var_in_bb): Also scan regular definitions.
3330 (skip_phi_defs): New.
3331 (collect_scop_exit_phi_args): New.
3332 (patch_scop_exit_phi_args): New.
3333 (gloog): Patch phis after scop.
3334 * tree-flow.h: (add_phi_node_to_bb): Declared.
3335 (make_phi_node): Declared.
3337 2008-08-26 Sebastian Pop <sebastian.pop@amd.com>
3339 * graphite.c (end_scop): Split the entry of the scop when it
3340 is the header of the loop in which the scop is ending.
3341 (build_scops_1, limit_scops): Update uses of end_scop.
3343 2008-08-26 Sebastian Pop <sebastian.pop@amd.com>
3345 * graphite.c (dot_all_scops_1): Do not fail on uninitialized
3346 SCOP_ENTRY or SCOP_EXIT.
3348 2008-08-25 Sebastian Pop <sebastian.pop@amd.com>
3350 * graphite.c (get_construction_edge): Removed.
3351 (gloog): Construction edge is the scop entry edge.
3353 2008-08-25 Sebastian Pop <sebastian.pop@amd.com>
3355 * graphite.c (can_generate_for_scop): Removed.
3356 (gloog): Do not call it.
3358 2008-08-25 Sebastian Pop <sebastian.pop@amd.com>
3360 * graphite.c (new_scop): Entry of a scop is an edge.
3361 Initialize SESE region.
3362 (free_scop): Free SESE region.
3363 (build_scops_1, scopdet_bb_info): Work on edges, not on bbs.
3364 (split_difficult_bb): New, split from end_scop.
3365 (end_scop): Exit of a scop is an edge.
3366 (build_scop_bbs): Never check CDI_POST_DOMINATORS: this info is
3367 not automatically updated and thus is always wrong.
3368 * graphite.h (struct sese): New.
3371 (struct scop): New field for a SESE region. Remove entry, exit.
3372 (SCOP_ENTRY, SCOP_EXIT): Update definitions to match same
3373 semantics as before. Moved comment around.
3375 2008-08-25 Tobias Grosser <grosser@fim.uni-passau.de>
3376 Sebastian Pop <sebastian.pop@amd.com>
3378 * graphite.c (graphite_transform_loops): Always enable gloog
3379 and find_transform when ENABLE_CHECKING.
3381 2008-08-25 Sebastian Pop <sebastian.pop@amd.com>
3383 * graphite.c (graphite_transform_loops): Move pretty printer
3384 of SCOPs before doing any transform. Remove call to print_scops
3385 and dot_all_scops_1.
3387 2008-08-25 Sebastian Pop <sebastian.pop@amd.com>
3389 * graphite.c (dump_gbb_conditions): Don't try to print NULL pointers.
3390 (print_graphite_bb): Same.
3392 2008-08-25 Sebastian Pop <sebastian.pop@amd.com>
3394 * graphite.c (dot_all_scops_1): Cleanup.
3395 (move_scops): Fix comment.
3397 2008-08-25 Sebastian Pop <sebastian.pop@amd.com>
3399 * graphite.c (build_scop_bbs): Revert commit 139355:
3401 2008-08-20 Sebastian Pop <sebastian.pop@amd.com>
3402 Dwarakanath Rajagopal <dwarak.rajagopal@amd.com>
3404 * graphite.c (build_scop_bbs): Factor up code.
3406 2008-08-25 Tobias Grosser <grosser@fim.uni-passau.de>
3408 * graphite.c (gloog): Update dominator info.
3410 2008-08-25 Tobias Grosser <grosser@fim.uni-passau.de>
3412 * graphite.c (remove_cond_exprs): Do not fail on empty bbs.
3414 2008-08-24 Sebastian Pop <sebastian.pop@amd.com>
3416 * graphite.c (new_graphite_bb): Remove GBB_INDEX_TO_NUM_MAP
3418 (free_graphite_bb): Remove GBB_INDEX_TO_NUM_MAP free.
3419 (translate_clast): Correct formatting.
3420 * graphite.h (struct num_map): Removed.
3421 (struct graphite_bb): Remove num_map field.
3422 (GBB_INDEX_TO_NUM_MAP): Removed.
3424 2008-08-24 Sebastian Pop <sebastian.pop@amd.com>
3426 * graphite.c (build_access_matrix_with_af): Fix comments.
3427 (build_scop_data_accesses): Same.
3429 2008-08-24 Sebastian Pop <sebastian.pop@amd.com>
3431 * graphite.c (build_scop_data_accesses): Don't construct
3432 access matrices. Add a FIXME and an assert condition that
3433 should pass when the access matrices will be needed.
3435 2008-08-24 Sebastian Pop <sebastian.pop@amd.com>
3437 * tree-data-ref.c (stmt_simple_memref_p): Don't call
3439 * graphite.c (build_graphite_bb): Renamed new_graphite_bb.
3440 Moved close by free_graphite_bb.
3441 (free_graphite_bb): Call free_data_refs. Reset bb->aux.
3442 (new_scop): Move close by free_scop.
3443 (graphite_transform_loops): Avoid linear scan to reset bb->aux.
3445 2008-08-22 Jan Sjodin <jan.sjodin@amd.com>
3447 * cfgloopmanip.c (create_empty_if_region_on_edge): New.
3448 * graphite.c (clast_to_gcc_expression): Call gmp_cst_to_tree
3449 instead of recursive call.
3450 (graphite_translate_clast_equation): New.
3451 (graphite_create_guard_cond_expr): New.
3452 (graphite_create_new_guard): New.
3453 (get_stack_index_from_iv): Removed.
3454 (graphite_rename_ivs_stmt): Use gbb_loop_index.
3455 (get_true_edge_from_guard_bb): New.
3456 (translate_clast): Handle stmt_guard in clast.
3457 (get_construction_edge): Allow construction edge detection for
3458 a scope entry with multiple predecessors if one predecessor is
3459 the immediate dominator of scope entry.
3460 (can_generate_code_stmt): Enable code generation for clast_guard.
3461 (gloog): Use correct context loop. Removed check for post dominators.
3462 * cfgloop.h (create_empty_if_region_on_edge): Declared.
3464 2008-08-21 Sebastian Pop <sebastian.pop@amd.com>
3466 * graphite.c (remove_dead_loops): Document better which
3469 2008-08-21 Sebastian Pop <sebastian.pop@amd.com>
3471 * Makefile.in: Rename POLYLIBLIBS and POLYLIBINC to PPLLIBS
3473 (graphite.o): Also depends on pointer-set.h.
3475 2008-08-21 Sebastian Pop <sebastian.pop@amd.com>
3477 * graphite.c (scop_record_loop): Fix compile warning.
3479 2008-08-21 Harsha Jagasia <harsha.jagasia@amd.com>
3480 Sebastian Pop <sebastian.pop@amd.com>
3482 * graphite.c (scop_record_loop): DECL_NAME can be NULL.
3484 2008-08-21 Sebastian Pop <sebastian.pop@amd.com>
3486 * graphite.c (build_graphite_bb): Initialize bb->aux to
3487 point to the graphite_bb_p.
3488 (graphite_bb_from_bb): Renamed gbb_from_bb; returns the
3490 (add_bb_domains): Does not use the scop parameter.
3491 (graphite_transform_loops): Clean bb->aux at the end.
3493 2008-08-20 Dwarakanath Rajagopal <dwarak.rajagopal@amd.com>
3494 Sebastian Pop <sebastian.pop@amd.com>
3496 * testsuite/lib/target-supports.exp
3497 (check_effective_target_fgraphite): New.
3499 * testsuite/gcc.dg/graphite/graphite.exp: Early exit when
3500 check_effective_target_fgraphite returns false.
3501 Set dg-do-what-default to compile.
3502 (scan-graphite-dump-times): Removed.
3503 * testsuite/gfortran.dg/graphite/graphite.exp: Same.
3505 * testsuite/gcc.dg/graphite/scop-0.c: Do not use "dg-do compile".
3506 Use scan-tree-dump-times instead of scan-graphite-dump-times.
3507 * testsuite/gcc.dg/graphite/scop-1.c: Same.
3508 * testsuite/gcc.dg/graphite/scop-2.c: Same.
3509 * testsuite/gcc.dg/graphite/scop-3.c: Same.
3510 * testsuite/gcc.dg/graphite/scop-4.c: Same.
3511 * testsuite/gcc.dg/graphite/scop-5.c: Same.
3512 * testsuite/gcc.dg/graphite/scop-6.c: Same.
3513 * testsuite/gcc.dg/graphite/scop-7.c: Same.
3514 * testsuite/gcc.dg/graphite/scop-8.c: Same.
3515 * testsuite/gcc.dg/graphite/scop-9.c: Same.
3516 * testsuite/gcc.dg/graphite/scop-10.c: Same.
3517 * testsuite/gcc.dg/graphite/scop-11.c: Same.
3518 * testsuite/gcc.dg/graphite/scop-12.c: Same.
3519 * testsuite/gcc.dg/graphite/scop-13.c: Same.
3520 * testsuite/gcc.dg/graphite/scop-matmult.c: Same.
3521 * testsuite/gcc.dg/graphite/scop-14.c: Same.
3522 * testsuite/gcc.dg/graphite/scop-15.c: Same.
3523 * testsuite/gcc.dg/graphite/block-0.c: Same.
3524 * testsuite/gcc.dg/graphite/scop-16.c: Same.
3525 * testsuite/gcc.dg/graphite/block-1.c: Same.
3526 * testsuite/gcc.dg/graphite/scop-17.c: Same.
3527 * testsuite/gcc.dg/graphite/scop-18.c: Same.
3528 * testsuite/gfortran.dg/graphite/block-1.f90: Same.
3529 * testsuite/gfortran.dg/graphite/scop-1.f: Same.
3530 * testsuite/gfortran.dg/graphite/block-2.f: Same.
3532 2008-08-20 Sebastian Pop <sebastian.pop@amd.com>
3534 * graphite.c: Fix some XXX comments.
3535 (build_scop_dynamic_schedules): Removed.
3537 2008-08-20 Sebastian Pop <sebastian.pop@amd.com>
3539 * graphite.h (scop_max_loop_depth): Moved...
3540 * graphite.c (scop_max_loop_depth): ...here.
3541 (remove_all_edges_1): New.
3542 (remove_all_edges): Factored code.
3543 (remove_cond_exprs): Check only the last statement for
3544 a GIMPLE_COND expression.
3546 2008-08-20 Sebastian Pop <sebastian.pop@amd.com>
3548 * graphite.c (scan_tree_for_params): Early return when the
3549 expression is a chrec_dont_know. Handle case NEGATE_EXPR.
3550 (find_scop_parameters): Factor out code.
3551 (graphite_trans_bb_strip_mine): Remove dead code.
3553 2008-08-20 Sebastian Pop <sebastian.pop@amd.com>
3555 * graphite.c (clast_to_gcc_expression, graphite_create_new_loop,
3556 graphite_trans_bb_move_loop): Factor asserts.
3557 (gloog): Perform sanity checks only for ENABLE_CHECKING.
3558 Do not call calculate_dominance_info and estimate_bb_frequencies.
3560 2008-08-20 Jan Sjodin <jan.sjodin@amd.com>
3562 * graphite.c (create_loops_mapping, free_loops_mapping,
3563 create_loops_mapping_num, debug_loop_mapping_1,
3564 debug_loop_mapping, graphite_loops_mapping_max_loop_num,
3565 get_loop_mapping_for_num, graphite_loops_mapping_add_child,
3566 graphite_loops_mapping_add_child_num,
3567 graphite_loops_mapping_insert_child,
3568 graphite_loops_mapping_parent, get_loop_mapped_depth_for_num,
3569 get_loop_mapped_depth, split_loop_mapped_depth_for_num,
3570 loop_mapped_depth_split_loop, swap_loop_mapped_depth_for_num,
3571 create_num_from_index, get_num_from_index,
3572 swap_loop_mapped_depth): Removed.
3573 (new_scop): Do not initialize SCOP_LOOPS_MAPPING.
3574 (free_scop): Do not call free_loops_mapping.
3575 (graphite_get_new_iv_stack_index_from_old_iv): Renamed
3576 get_stack_index_from_iv. Use GBB_LOOPS instead of calling
3577 get_loop_mapped_depth.
3578 (graphite_trans_bb_move_loop): Do not update the loop mapping.
3579 (graphite_trans_bb_strip_mine): Same.
3580 * graphite.h (graphite_loops_mapping, graphite_loop_node): Removed.
3581 (struct scop): Remove field loops_mapping.
3583 2008-08-20 Sebastian Pop <sebastian.pop@amd.com>
3584 Dwarakanath Rajagopal <dwarak.rajagopal@amd.com>
3586 * graphite.c (scop_record_loop): Factor out one level of the
3587 condition by early return.
3588 (build_scop_loop_nests): Format following FSF coding style.
3589 (build_scop_dynamic_schedules): Factor out code.
3590 (scopdet_bb_info): Reindent. Default case should not be reachable.
3592 2008-08-20 Sebastian Pop <sebastian.pop@amd.com>
3593 Dwarakanath Rajagopal <dwarak.rajagopal@amd.com>
3595 * graphite.c (loop_affine_expr): Check for DECL_P or struct
3596 assignments that are not handled as simple operands for now.
3598 2008-08-20 Sebastian Pop <sebastian.pop@amd.com>
3599 Dwarakanath Rajagopal <dwarak.rajagopal@amd.com>
3601 * graphite.c (build_scop_bbs): Factor up code.
3603 2008-08-20 Sebastian Pop <sebastian.pop@amd.com>
3604 Dwarakanath Rajagopal <dwarak.rajagopal@amd.com>
3606 * graphite.c (stmt_simple_for_scop_p): Factor code out
3608 (enum gbb_type): New. Group all the GBB_* types under it.
3609 (is_loop_exit): Moved...
3610 (end_scop): Enable BB spliting.
3611 * cfgloop.c (is_loop_exit): ...here. Reimplemented.
3612 * cfgloop.h (is_loop_exit): Declared.
3614 2008-08-20 Sebastian Pop <sebastian.pop@amd.com>
3616 * doc/invoke.texi: Remove strides from examples containing
3617 DO loops when the strides are equal to 1.
3619 2008-08-20 Harsha Jagasia <harsha.jagasia@amd.com>
3620 Dwarakanath Rajagopal <dwarak.rajagopal@amd.com>
3622 * graphite.c (graphite_trans_scop_block): Or the result with
3623 the result from graphite_trans_loop_block.
3624 * testsuite/gcc.dg/graphite/block-1.c: New.
3625 * testsuite/gfortran.dg/graphite/block-1.f90: New.
3626 * testsuite/gfortran.dg/graphite/block-2.f: New.
3628 2008-08-20 Sebastian Pop <sebastian.pop@amd.com>
3630 * graphite.c (graphite_transform_loops): Call cloog_initialize
3633 2008-08-20 Sebastian Pop <sebastian.pop@amd.com>
3635 * tree-data-ref.c) (stmt_simple_memref_p): New.
3636 * tree-data-ref.h (stmt_simple_memref_p): Declared.
3637 * graphite.c (stmt_simple_memref_for_scop_p): Removed.
3638 (is_simple_operand): Call stmt_simple_memref_p.
3640 * testsuite/gcc.dg/graphite/scop-matmult.c: Updated for not
3641 using pointer arithmetic, as this is optimized by PRE and
3642 makes the code too difficult to analyze.
3644 * testsuite/gcc.dg/graphite/scop-18.c: Same.
3646 2008-08-20 Sebastian Pop <sebastian.pop@amd.com>
3648 * gdbinit.in (pgg): New.
3650 2008-08-15 Tobias Grosser <grosser@fim.uni-passau.de>
3652 * graphite.c (graphite_trans_loop_block): Fix warning.
3654 2008-08-15 Tobias Grosser <grosser@fim.uni-passau.de>
3656 * graphite.c (graphite_trans_loop_block): Fix my merge error.
3658 2008-08-15 Tobias Grosser <grosser@fim.uni-passau.de>
3660 * graphite.c (graphite_trans_bb_block): Remove check for
3661 flag_loop_strip_mine, flag_loop_block, flag_loop_interchange.
3662 Check if loop blocking is profitable for every loop, before applying
3664 (graphite_apply_transformations): Call graphite_trans_bb_block only,
3665 if flag_loop_block is set.
3667 2008-08-14 Sebastian Pop <sebastian.pop@amd.com>
3669 * graphite.c: Add some more documentation for the loop
3672 2008-08-14 Sebastian Pop <sebastian.pop@amd.com>
3674 * Makefile.in (tree-data-ref.o): Remove dependence on graphite.h.
3675 * graphite.c: Format on less than 80 columns.
3678 2008-08-14 Sebastian Pop <sebastian.pop@amd.com>
3680 * cfgloopmanip.c (loopify): Use update_dominators_in_loop.
3682 2008-08-14 Sebastian Pop <sebastian.pop@amd.com>
3684 * doc/invoke.texi (floop-block, floop-strip-mine,
3685 floop-interchange): Update documentation with examples.
3687 2008-08-13 Sebastian Pop <sebastian.pop@amd.com>
3689 * cfgloopmanip.c (create_empty_loop_on_edge): Don't call
3691 * graphite.c (graphite_create_new_loop): Call add_referenced_var.
3693 2008-08-13 Sebastian Pop <sebastian.pop@amd.com>
3695 * cfgloopmanip.c (create_empty_loop_on_edge): Improve documentation.
3696 Factor gcc_asserts into a single one. Use force_gimple_operand_gsi.
3697 * tree-scalar-evolution.c: Revert useless changes.
3698 * tree-phinodes.c: Same.
3701 * tree-vectorizer.h: Same.
3702 * tree-flow.h: Same.
3704 * common.opt (fgraphite): Update documentation.
3706 2008-08-12 Harsha Jagasia <harsha.jagasia@amd.com>
3708 * doc/invoke.texi (-floop-block, -floop-strip-mine,
3709 -floop-interchange): Add more text for explaining what each of these
3711 * tree-into-ssa.c (gimple_vec): Moved to...
3712 * graphite.c: Include gimple.h.
3713 (gimple_vec): Moved to...
3714 (del_loop_to_cloog_loop): Removed.
3715 (loop_affine_expr): Do not call create_data_ref when the
3716 operand is a constant.
3717 (new_scop): Use free instead of del_loop_to_cloog_loop.
3718 * Makefile.in (graphite.o): Depend on GIMPLE_H.
3719 * gimple.h (gimple_vec): ... here.
3721 2008-08-11 Tobias Grosser <grosser@fim.uni-passau.de>
3723 * graphite.c (scopdet_bb_info): Only allow loops with known number of
3725 (build_loop_iteration_domains): Fail, if latch executions unknown.
3727 2008-08-11 Tobias Grosser <grosser@fim.uni-passau.de>
3729 * graphite.c (add_conditions_to_domain): New.
3730 (build_scop_conditions_1): Call add_conditions_to_domain.
3731 (set_cloog_options): Allow to disable optimizations.
3733 2008-08-11 Tobias Grosser <grosser@fim.uni-passau.de>
3735 * graphite.c (find_params_in_bb): Look for parameters in conditions.
3736 Do not use walk_dominator_tree.
3737 (find_scop_parameters): Do not use walk_dominator_tree.
3739 2008-08-11 Tobias Grosser <grosser@fim.uni-passau.de>
3741 * graphite.c (scan_tree_for_params) Add / Subtract inequality.
3742 (idx_record_params): Adapt.
3743 * graphite.h (scop_gimple_loop_depth): New.
3745 2008-08-11 Tobias Grosser <grosser@fim.uni-passau.de>
3747 * graphite.c (build_scop_dynamic_schedules): Remove value_init.
3748 (scan_tree_for_params): Remove value_init.
3749 (build_scop_context): Remove value_init.
3750 (build_loop_iteration_domains): Remove value_init.
3751 (schedule_to_scattering): Remove value_init.
3752 (graphite_trans_bb_strip_mine): Remove value_init.
3754 2008-08-11 Tobias Grosser <grosser@fim.uni-passau.de>
3756 * gcc/graphite.c (limit_scops): New.
3757 (graphite_transform_loops): Add limit SCoPs.
3758 * gcc/testsuite/gcc.dg/graphite/scop-0.c: Update number of SCoPs.
3759 * gcc/testsuite/gcc.dg/graphite/scop-1.c: Update number of SCoPs.
3760 * gcc/testsuite/gcc.dg/graphite/scop-10.c: Update number of SCoPs.
3761 * gcc/testsuite/gcc.dg/graphite/scop-11.c: Update number of SCoPs.
3762 * gcc/testsuite/gcc.dg/graphite/scop-12.c: Update number of SCoPs.
3763 * gcc/testsuite/gcc.dg/graphite/scop-13.c: Update number of SCoPs.
3764 * gcc/testsuite/gcc.dg/graphite/scop-14.c: Update number of SCoPs.
3765 * gcc/testsuite/gcc.dg/graphite/scop-15.c: Update number of SCoPs.
3766 * gcc/testsuite/gcc.dg/graphite/scop-16.c: Update number of SCoPs.
3767 Change loop numbers.
3768 * gcc/testsuite/gcc.dg/graphite/scop-17.c: Update number of SCoPs.
3769 Change loop numbers.
3770 * gcc/testsuite/gcc.dg/graphite/scop-18.c: Update number of SCoPs.
3771 * gcc/testsuite/gcc.dg/graphite/scop-2.c: Update number of SCoPs.
3772 * gcc/testsuite/gcc.dg/graphite/scop-3.c: Update number of SCoPs.
3773 * gcc/testsuite/gcc.dg/graphite/scop-4.c: Update number of SCoPs.
3774 * gcc/testsuite/gcc.dg/graphite/scop-5.c: Update number of SCoPs.
3775 * gcc/testsuite/gcc.dg/graphite/scop-6.c: Update number of SCoPs.
3776 * gcc/testsuite/gcc.dg/graphite/scop-7.c: Update number of SCoPs.
3777 * gcc/testsuite/gcc.dg/graphite/scop-8.c: Update number of SCoPs.
3778 * gcc/testsuite/gcc.dg/graphite/scop-9.c: Update number of SCoPs.
3779 * gcc/testsuite/gcc.dg/graphite/scop-matmult.c: Update number of SCoPs.
3781 2008-08-11 Tobias Grosser <grosser@fim.uni-passau.de>
3783 * graphite.c (graphite_transform_loops): Call always find_transform.
3785 2008-08-08 Tobias Grosser <grosser@fim.uni-passau.de>
3787 * graphite.c (free_loops_mapping): New.
3788 (stmt_simple_for_scop_p): Fix typo.
3789 (stmt_simple_for_scop_p): Fix tuples functions, that
3791 (free_graphite_bb): Fix some memleaks.
3792 (free_scop): Fix some memleaks.
3793 (scopdet_bb_info): Do not forget some tmp SCoPs.
3794 (find_params_in_bb): Fix some memleaks.
3795 (clast_to_gcc_expression): Fix warning.
3797 2008-08-07 Tobias Grosser <grosser@fim.uni-passau.de>
3799 * testsuite/gcc.dg/graphite/scop-16.c: Fix for 32bit.
3800 * testsuite/gcc.dg/graphite/scop-17.c: Fix for 32bit.
3802 2008-08-04 Sebastian Pop <sebastian.pop@amd.com>
3804 * tree-ssa-loop.c (tree-ssa-loop.o): Do not include toplev.h.
3805 Move code ifdef-ed HAVE_cloog...
3806 * graphite.c: Include toplev.h.
3808 * Makefile.in (OBJS-common): Always build graphite.o.
3809 (BACKEND): Remove @GRAPHITE@.
3810 (tree-ssa-loop.o): Do not depend on TOPLEV_H.
3811 (graphite.o): Depend on TOPLEV_H.
3813 2008-08-04 Sebastian Pop <sebastian.pop@amd.com>
3815 * Makefile.in (tree-ssa-loop.o): Depend on TOPLEV_H.
3816 Remove typo left from polylib to ppl conversion.
3817 * graphite.c (graphite_transforms): Use sorry instead of fatal.
3819 2008-08-03 Sebastian Pop <sebastian.pop@amd.com>
3821 * toplev.c (process_options): Move the graphite loop optimization
3823 * tree-ssa-loop.c (graphite_transforms): ... here.
3824 When not configured with CLooG, print to dump_file that
3825 Graphite transforms were not performed.
3826 * testsuite/gcc.dg/graphite/graphite.exp (scan-graphite-dump-times):
3828 * testsuite/gcc.dg/graphite/*.c: Updated all testcases to use
3829 scan-graphite-dump-times.
3831 2008-08-03 Sebastian Pop <sebastian.pop@amd.com>
3833 * graphite.c (dot_scop, dot_all_scops): Do not call system.
3834 Do not open /tmp/scop.dot and /tmp/allscops.dot.
3836 2008-08-02 Sebastian Pop <sebastian.pop@amd.com>
3837 Jan Sjodin <jan.sjodin@amd.com>
3839 * configure: Regenerated.
3840 * omp-low.c (expand_omp_sections): Remove now unused code.
3841 * config.in (HAVE_polylib): Removed.
3842 * configure.ac (HAVE_polylib, POLYLIBLIBS, POLYLIBINC): Removed.
3843 (PPLLIBS, PPLINC): Added.
3844 * graphite.c: Replace unsigned with int wherever possible.
3845 Don't access Cloog's data structures, but use accessor functions.
3846 Clast's stmt->type is now implemented as a vtable: change the
3847 switches of stmt->type into ifs.
3848 (polylib/polylibgmp.h): Don't include.
3849 (initialize_dependence_polyhedron,
3850 initialize_data_dependence_polyhedron, is_empty_polyhedron,
3851 statement_precedes_p, test_dependence, build_rdg_all_levels,
3852 dump_dependence_graph): Removed until this code is cleaned up
3854 * Makefile.in (POLYLIBLIBS): Renamed PPLLIBS.
3855 (POLYLIBINC): Renamed PPLINC.
3857 2008-08-01 Harsha Jagasia <harsha.jagasia@amd.com>
3858 Dwarakanath Rajagopal <dwarak.rajagopal@amd.com>
3859 Jan Sjodin <jan.sjodin@amd.com>
3861 Finish the merge and tuplification of graphite.
3863 2008-07-24 Sebastian Pop <sebastian.pop@amd.com>
3864 Jan Sjodin <jan.sjodin@amd.com>
3866 Partial merge from mainline (138072:138275).
3867 * graphite.c still has to be tuplified.
3869 2008-07-29 Jan Sjodin <jan.sjodin@amd.com>
3871 * graphite.c (graphite_loops_mapping_max_loop_num): New.
3872 (create_num_from_index): New.
3873 (get_num_from_index): Also pass in the graphite BB.
3874 (free_graphite_bb): Free GBB_INDEX_TO_NUM_MAP.
3875 (build_graphite_bb): Initialize GBB_INDEX_TO_NUM_MAP.
3876 (graphite_trans_bb_strip_mine): Call create_num_from_index.
3877 (is_interchange_valid): Return false when failing.
3878 * graphite.h (struct num_map): New.
3879 (struct graphite_bb): New field num_map.
3880 (GBB_LOOPS_MAPPING): Renamed GBB_INDEX_TO_NUM_MAP.
3882 2008-07-29 Tobias Grosser <grosser@fim.uni-passau.de>
3884 * graphite.c (dump_gbb_conditions): Print also conditions like
3885 "if (a)". Remove dublicated code and use print_generic_expr ().
3886 (stmt_simple_for_scop_p): Only allow conditions we can handle
3889 2008-07-25 Jan Sjodin <jan.sjodin@amd.com>
3891 * graphite.h (struct scop): Removed new_ivs field.
3892 (SCOP_NEWIVS): Deleted.
3893 * graphite.c (new_scop, free_scop, clast_name_to_gcc,
3894 clast_to_gcc_expression, graphite_create_new_loop):
3895 Removed use of new_ivs.
3897 2008-07-25 Jan Sjodin <jan.sjodin@amd.com>
3899 * graphite.c (debug_oldivs, debug_loop_vec, create_loops_mapping,
3900 create_loops_mapping_num, debug_loop_mapping_1): New.
3901 (debug_loop_mapping): Call debug_loop_mapping_1.
3902 (get_loop_mapping_for_num,
3903 graphite_loops_mapping_add_child,
3904 graphite_loops_mapping_add_child_num,
3905 graphite_loops_mapping_insert_child,
3906 graphite_loops_mapping_parent,
3907 split_loop_mapped_depth_for_num,
3908 loop_mapped_depth_split_loop): New.
3909 (increment_loop_mapped_depths): Removed.
3910 (swap_loop_mapped_depth_for_num): Reimplemented.
3911 (new_scop): Call create_loops_mapping.
3912 (scop_record_loop): Call graphite_loops_mapping_insert_child.
3913 (translate_clast): Pass the old loop father in parameter, and pass
3914 it to get_old_iv_from_ssa_name.
3915 (remove_edges_around_useless_blocks, can_generate_code_stmt,
3916 can_generate_code, can_generate_for_scop): New.
3917 (graphite_trans_bb_block): Returns false when it fails to transform.
3918 * graphite.h (graphite_loop_node, graphite_loops_mapping): New.
3920 2008-07-25 Sebastian Pop <sebastian.pop@amd.com>
3922 Reverted all the changes related to the streamization and
3924 These changes are now tracked in the streamization branch.
3926 2008-07-25 Sebastian Pop <sebastian.pop@amd.com>
3927 Jan Sjodin <jan.sjodin@amd.com>
3929 * graphite.c (gbb_compare): Correctly constify.
3930 (gbb_can_be_ignored): Indent.
3931 (graphite_trans_scop_swap_1and2): Add legality check.
3934 2008-07-25 Sebastian Pop <sebastian.pop@amd.com>
3936 Remove fallouts from "Reverted the Condate changes".
3937 * tree.h: Remove unused decl.
3938 * testsuite/gcc.dg/tree-checker: Same.
3939 * timevar.def: Remove counter.
3941 2008-07-24 Sebastian Pop <sebastian.pop@amd.com>
3943 * Merge from mainline (135673:138072).
3945 Reverted the MIRO changes (from 2008-04-05) that are now
3946 tracked in the miro branch.
3947 * tree-bounds.c: Removed.
3948 * tree-bounds.h: Removed.
3950 Reverted the Condate changes (from 2006-07-04, 2007-03-20) that
3951 are now tracked in the condate branch.
3952 * tree-check.c: Removed.
3953 * tree-match.c: Removed.
3954 * condate.y: Removed.
3956 2008-07-24 Dwarakanath Rajagopal <dwarak.rajagopal@amd.com>
3958 * common.opt: New user flag -floop-block, -floop-strip-mine
3959 and -floop-interchange.
3960 * toplev.c (process_options): Enable -fgraphite pass if any one of the
3961 graphite loop optimization flags is turned on.
3962 * graphite.c (graphite_apply_transformations): Add flag_loop_block,
3963 flag_loop_strip_mine and flag_loop_interchange checks before
3965 * doc/invoke.texi: Remove -fgraphite and add -floop-block,
3966 -floop-strip-mine and -floop-interchange.
3967 * testsuite/gcc.dg/graphite/block-0.c: Add -floop-block and remove
3969 * testsuite/gcc.dg/graphite/scop-16.c: Ditto.
3970 * testsuite/gcc.dg/graphite/scop-17.c: Ditto.
3971 * testsuite/gcc.dg/graphite/scop-18.c: Ditto.
3973 2008-07-23 Jan Sjodin <jan.sjodin@amd.com>
3974 Sebastian Pop <sebastian.pop@amd.com>
3976 * cfgloopmanip.c (update_dominators_in_loop): Make it static.
3977 (create_empty_loop_on_edge): More fixes.
3978 * tree-phinodes.c (resize_phi_node): Extern.
3979 (unlink_phi_node, move_phi_node): New split from remove_phi_node.
3980 * cfghooks.c (update_dominator_information): New split from
3982 * tree-vectorizer.c (rename_variables_in_bb): Extern.
3983 * tree-dfa.c (collect_dfa_stats): Start walking the CFG on the
3984 successor of the function entry block.
3986 * graphite.c: Include pointer-set.h.
3987 (debug_loop_mapping, increment_loop_mapped_depths,
3988 get_loop_mapped_depth_for_num, get_loop_mapped_depth,
3989 set_loop_mapped_depth_for_num, set_loop_mapped_depth,
3990 swap_loop_mapped_depth_for_num, get_num_from_index,
3991 swap_loop_mapped_depth, loop_iv_stack_debug,
3992 loop_iv_stack_push, loop_iv_stack_pop, loop_iv_stack_get_iv,
3993 loop_iv_stack_get_iv_from_name, loop_iv_stack_debug,
3994 get_old_iv_from_ssa_name): New.
3995 (new_scop): Initialize SCOP_LOOPS_MAPPING.
3996 (free_scop): Free SCOP_LOOPS_MAPPING.
3997 (scop_record_loop): Record old ivs.
3998 (create_var_name): Removed.
3999 (initialize_cloog_names): Allocate double space in case strip mine
4000 applies to all loops once.
4001 (clast_name_to_gcc): Look up in the map ivstack passed in parameter.
4002 (clast_to_gcc_expression): Same. Implement more clast to gimple
4004 (graphite_create_new_loop): Pass in ivstack.
4005 (remove_all_edges): Pass in the construction_edge.
4006 (graphite_remove_iv): Removed.
4007 (graphite_rename_ivs, graphite_rename_ivs_stmt,
4008 remove_cond_exprs): Rewritten.
4009 (move_phi_nodes): New.
4010 (disconnect_virtual_phi_nodes, disconnect_cond_expr): Removed.
4011 (translate_clast): Pass in ivstack. Rewrite some cases.
4012 (set_cloog_options, debug_clast_stmt): New.
4013 (find_transform): Use set_cloog_options.
4014 (outermost_loop_layer): Removed.
4015 (get_construction_edge, collect_virtual_phis, find_vdef_for_var_in_bb,
4016 find_vdef_for_var_1, find_vdef_for_var, patch_phis_for_virtual_defs,
4017 mark_old_loops, remove_dead_loops): New.
4019 (graphite_trans_bb_move_loop): Call swap_loop_mapped_depth.
4020 (const_column_index, get_first_matching_sign_row_index,
4021 get_lower_bound_row, get_upper_bound_row, get_lower_bound,
4022 get_upper_bound): New.
4023 (graphite_trans_bb_strip_mine): Also update the iv map.
4025 * graphite.h (graphite_loops_mapping, GBB_LOOPS_MAPPING): New.
4026 (struct name_tree): Add a loop field.
4027 (struct scop): Add a graphite_loops_mapping field.
4028 (SCOP_LOOPS_MAPPING): New.
4029 (debug_clast_stmt): Declare.
4030 * lambda.h (find_induction_var_from_exit_cond): Declare.
4031 (lambda-code.c): (find_induction_var_from_exit_cond): Extern.
4032 * cfgloop.h (update_dominators_in_loop): Removed declaration.
4033 (create_empty_loop_on_edge): Updated.
4034 * tree-flow.h (remove_bb, resize_phi_node, move_phi_node,
4035 rename_variables_in_bb): Declare.
4036 * tree-cfg.c (remove_bb): Extern.
4038 * testsuite/gcc.dg/graphite/block-0.c: New.
4040 2008-07-21 Dwarakanath Rajagopal <dwarak.rajagopal@amd.com>
4041 Sebastian Pop <sebastian.pop@amd.com>
4043 * graphite.c (strip_mine_profitable_p): New.
4044 (graphite_trans_bb_block): Disable strip mining if not profitable.
4046 * testsuite/gcc.dg/graphite/scop-18.c: New.
4047 * testsuite/gcc.dg/graphite/scop-17.c: Fixed.
4048 * testsuite/gcc.dg/graphite/scop-16.c: Fixed.
4050 2008-07-17 Harsha Jagasia <harsha.jagasia@amd.com>
4051 Jan Sjodin <jan.sjodin@amd.com>
4052 Sebastian Pop <sebastian.pop@amd.com>
4054 * graphite.c (is_interchange_valid): New.
4055 (graphite_trans_bb_block): Check loop nest of basic block for legality
4058 * graphite.h (gbb_inner_most_loop_index, outer_most_loop_1,
4059 outer_most_loop, gbb_outer_most_loop_index): New.
4061 * tree-loop-linear.c (perfect_loop_nest_depth): Remove static.
4062 * tree-flow.h (perfect_loop_nest_depth): Declare as extern.
4063 * testsuite/gcc.dg/graphite/scop-16.c: New.
4064 * testsuite/gcc.dg/graphite/scop-17.c: New.
4066 2008-07-11 Tobias Grosser <grosser@fim.uni-passau.de>
4068 * graphite.c (scop_remove_ignoreable_gbbs): Also update bitmap.
4069 (graphite_trans_scop_block): Ignore SCoPs without bbs.
4071 2008-07-11 Tobias Grosser <grosser@fim.uni-passau.de>
4073 * graphite.c (new_scop): Initialize SCOP_EXIT.
4074 (scopdet_info): Add.
4075 (scopdet_bb_info): Rename from is_bb_addable. Cleanup, bugfixes.
4076 (build_scops_1): Cleanup, bugfixes.
4077 (build_scops): Cleanup.
4079 * testsuite/gcc.dg/graphite/scop-matmult.c: Remove duplicated code.
4080 * testsuite/gcc.dg/graphite/scop-15.c: Add SCoP numbers.
4082 2008-07-10 Harsha Jagasia <harsha.jagasia@amd.com>
4084 * testsuite/gfortran.dg/graphite/scop-1.f: Update to reduced test case.
4086 * testsuite/gfortran.dg/graphite/graphite.exp: Use
4087 DEFAULT_GRAPHITE_FLAGS.
4089 * testsuite/gcc.dg/graphite/scop-15.c: Update to reduced test case.
4091 2008-07-10 Harsha Jagasia <harsha.jagasia@amd.com>
4093 * graphite.c (scan_tree_for_params): Do not assert any more if
4094 MULT_EXPR parameter is negative.
4096 * testsuite/gfortran.dg/graphite/scop-1.f: New.
4098 * testsuite/gfortran.dg/graphite/graphite.exp: New.
4100 * testsuite/gcc.dg/graphite/scop-15.c: New.
4102 2008-07-10 Harsha Jagasia <harsha.jagasia@amd.com>
4104 * graphite.c (is_bb_addable): Fix segfault in spec gzip and reformat.
4106 2008-07-10 Tobias Grosser <grosser@fim.uni-passau.de>
4108 * graphite.c (graphite_trans_bb_swap_loops): Rename from
4109 graphite_swap_loops.
4110 (graphite_trans_bb_move_loop): New.
4111 (graphite_trans_bb_strip_mine): Rename from graphite_strip_mine_loop.
4112 (graphite_trans_bb_block): New.
4113 (graphite_trans_loop_block): New.
4114 (graphite_trans_scop_swap_1and2): Rename from
4115 graphite_trans_swap_1and2.
4116 (graphite_trans_scop_strip): Rename from graphite_trans_strip.
4117 (graphite_trans_scop_block): New.
4118 (graphite_apply_transformations): Rename from
4119 graphite_transformations.
4121 * testsuite/gcc.dg/graphite/scop-matmult.c: New.
4123 2008-07-10 Tobias Grosser <grosser@fim.uni-passau.de>
4125 * graphite.c (gbb_compare): New.
4126 (graphite_sort_gbbs): New.
4127 (gbb_can_be_ignored): New.
4128 (scop_remove_ignoreable_gbbs): New.
4129 (graphite_transformations): Cleanup and add
4130 scop_remove_ignoreable_gbbs.
4131 * lambda.h (lambda_vector_compare): New.
4133 2008-07-09 Tobias Grosser <grosser@fim.uni-passau.de>
4135 * graphite.c (print_graphite_bb): Correct printing of static schedule.
4136 (graphite_swap_loops): int -> unsigned
4137 (graphite_strip_mine_loop): int -> unsigned, Fix SCHEDULE
4138 (graphite_transformations): New.
4139 (graphite_transform_loops): Move to graphite_transformations.
4140 * graphite.h (gbb_nb_loops): Return unsigned.
4142 2008-07-04 Tobias Grosser <grosser@fim.uni-passau.de>
4144 * graphite.c (scan_tree_for_params): Fix insertion of parameters into
4145 the domain matrix. This makes scop-0.c work again.
4147 2008-06-20 Richard Guenther <rguenther@suse.de>
4149 * graphite.h: Adjust copyright to GPLv3.
4150 * graphite.c: Likewise.
4151 (stmt_simple_memref_for_scop_p): Split out from ...
4152 (stmt_simple_for_scop_p): ... here. Fix handling of calls
4154 (get_bb_type): Optimize.
4156 (is_bb_addable): Fix memleak, replace is_pred call with
4158 (build_scops): Use current_loops.
4159 (param_index): Fix memleak.
4161 2008-06-20 Konrad Trifunovic <konrad.trifunovic@inria.fr>
4163 * graphite.c: Fix formatting.
4165 2008-06-19 Konrad Trifunovic <konrad.trifunovic@inria.fr>
4167 * graphite.c (new_scop): Memory allocation for SCOP_{NEWIVS, OLDIVS}.
4168 (free_scop): Memory deallocation for SCOP_NEWIVS, SCOP_OLDIVS.
4169 (create_var_name, save_var_name): Newly defined functions.
4170 (initialize_cloog_names): Part of the code factored out to
4172 (clast_to_gcc_expression): Now handles the case of clast_red_sum
4173 in clast_reduction statement.
4174 (graphite_create_new_loop): Now takes a new parameter
4176 (translate_clast): Now also takes the context_loop and bb_exit
4177 parameters. Rewritten the code so that it creates a gimple code
4178 inside the given context.
4179 (outermost_loop_layer, graphite_remove_iv, graphite_rename_ivs,
4180 remove_cond_expr, disconnect_cond_expr,
4181 disconnect_virtual_phi_nodes): Newly defined functions.
4182 * graphite.h (struct scop): added old_ivs vector.
4183 SCOP_OLDIVS: New macro.
4185 2008-06-19 Sebastian Pop <sebastian.pop@amd.com>
4187 * cfgloopmanip.c: Add missing function comments, fix formatting.
4189 2008-06-18 Konrad Trifunovic <konrad.trifunovic@inria.fr>
4191 * cfgloopmanip.c (update_dominators_in_loop): Defined.
4192 (create_empty_loop_on_edge): Defined.
4193 * tree-parloops.c (canonicalize_loop_ivs): Returns tree
4195 * cfgloop.h (create_empty_loop_on_edge): Declared as extern.
4196 (update_dominators_in_loop): Declared as extern
4197 * tree-flow.h (canonicalize_loop_ivs): Declared as extern.
4199 2008-06-16 Tobias Grosser <grosser@fim.uni-passau.de>
4201 * graphite.c (print_graphite_bb): Allow changing number of loops
4203 (initialize_cloog_names): Allow changing number of loops.
4204 (build_cloog_prog): Simplify.
4205 (find_transform): Enable cloog option --strides.
4206 (graphite_swap_loops): New.
4207 (graphite_strip_mine_loop): New.
4208 (graphite_trans_swap_1and2): New.
4209 (graphite_trans_strip): New.
4210 (graphite_transform_loops): Add graphite_trans_strip.
4211 * graphite.h (scop_max_loop_depth): New.
4213 2008-06-15 Tobias Grosser <grosser@fim.uni-passau.de>
4215 * graphite.c (build_scop_iteration_domain): Remove forgotten
4216 line. (Fixes compile)
4218 2008-06-15 Tobias Grosser <grosser@fim.uni-passau.de>
4220 * graphite.c (print_graphite_bb): Add output of GBB_LOOPS.
4221 (build_graphite_bb): Add GBB_LOOPS and GBB_DOMAIN and reorder.
4222 (build_bb_loops): New.
4223 (graphite_transform_loops): Add build_bb_loops.
4224 (schedule_to_scattering): Use gbb_nb_loops to support changing loop
4226 * graphite.h (graphite_bb): Add loops.
4227 (gbb_nb_loops): New.
4228 (gbb_loop_at_index): New.
4229 (gbb_loop_index): New.
4230 (nb_params_in_scop): Renamed to scop_nb_params. Updated all functions
4231 using nb_params_in_scop.
4233 2008-06-14 Tobias Grosser <grosser@fim.uni-passau.de>
4235 * graphite.c (print_graphite_bb): Adapt to minimized schedule.
4236 (build_scop_canonical_schedules): Build minimized schedule.
4237 (schedule_to_scattering): Adapt to minimized schedule.
4238 * graphite.h (graphite_bb): Add/Update descriptions.
4240 2008-06-14 Adrien Eliche <aeliche@isty.uvsq.fr>
4241 Tobias Grosser <grosser@fim.uni-passau.de>
4243 * graphite.c (print_graphite_bb): Add condition printing.
4245 (dump_gbb_conditions): New.
4246 (build_scop_conditions_1): New.
4247 (build_scop_conditions): New.
4248 * graphite.h (graphite_bb): Add conditions.
4250 2008-06-14 Tobias Grosser <grosser@fim.uni-passau.de>
4252 * graphite.c (print_graphite_bb):
4253 (free_graphite_bb): New.
4254 (free_scop): Free bbs.
4255 (get_bb_type): Free doms.
4256 (build_scop_context): Free context matrix.
4257 (build_loop_iteration_domains): Remove unused code.
4258 (build_cloog_prog): Free scattering function and blocklist.
4259 (find_transform): Free options.
4261 2008-06-13 Tobias Grosser <grosser@fim.uni-passau.de>
4263 * graphite.c (loop_body_to_cloog_stmts): Rename to add_bb_domains.
4264 Remove unnecessery cloog data structures. Make a copy of the domain
4265 (setup_cloog_loop): Rename to build_loop_iteration_domains. Remove
4266 unnecessary cloog data structures. Fix memory leaks. Remove insert
4267 into SCOP_LOOP2CLOOG_LOOP as the inserted CloogLoops will never be
4269 (build_scop_iteration_domain): Remove unnecessary cloog
4270 data structures. Fix memory leaks.
4271 (graphite_transform_loops): Disable build_scop_dynamic_schedules as it
4272 uses SCOP_LOOP2CLOOG_LOOP, that is at the moment not working.
4274 2008-06-12 Tobias Grosser <grosser@fim.uni-passau.de>
4276 * graphite.c (find_scop_params): Remove initialize_cloog_names.
4278 2008-06-12 Tobias Grosser <grosser@fim.uni-passau.de>
4280 * graphite.c (end_scop): Style fix.
4281 (schedule_to_scattering): Style and comment fix.
4283 2008-06-12 Tobias Grosser <grosser@fim.uni-passau.de>
4284 * graphite.c (print_graphite_bb): Fix definiton of
4285 schedule_to_scattering.
4286 (initialize_cloog_names): Change nb_scattdims to max loop
4288 (schedule_to_scattering): Take parameter for number of scattering
4290 (build_cloog_prog): Only build as much scattering dimensions as
4293 2008-06-12 Tobias Grosser <grosser@fim.uni-passau.de>
4295 * graphite.c (end_scop): Disable bb splitting. Fixes SIGSEGV
4296 in polyhedron/aermod.f90.
4298 2008-06-11 Tobias Grosser <grosser@fim.uni-passau.de>
4299 Dwarak Rajagopal <dwarak.rajagopal@amd.com>
4300 Harsha Jagasia <harsha.jagasia@amd.com>
4302 * graphite.c (is_bb_addable): Fix segfault.
4304 2008-06-10 Tobias Grosser <grosser@fim.uni-passau.de>
4306 * graphite.c (is_bb_addable): Fix memory leak, handling of loops
4307 with multiple exits and conditional handling in edge cases.
4308 (is_loop_exit): Fix memory leak. (Forgotten in last commit)
4310 * testsuite/gcc.dg/graphite/scop-14.c: New.
4312 2008-06-06 Tobias Grosser <grosser@fim.uni-passau.de>
4313 Adrien Eliche <aeliche@isty.uvsq.fr>
4315 * graphite.c (is_bb_addable): Add more comments and enhance
4316 readablity of the source code. Fix memory leak.
4317 (is_loop_exit): Fix memory leak.
4319 2008-06-05 Tobias Grosser <grosser@fim.uni-passau.de>
4321 * graphite.c (first_loop_in_scop): Deleted.
4322 (setup_cloog_loop): Only walk the loop chain for inner loops.
4323 (build_scop_iteration_domain): Execute setup_cloog_loop for
4324 all loops in the first layer.
4326 2008-06-05 Tobias Grosser <grosser@fim.uni-passau.de>
4328 * graphite.c (scan_tree_for_params): Change the way params are
4329 added to be indepenent of the number of loops.
4330 (setup_cloog_loop): Revert to short matrix format. Fix parameter
4332 (build_cloog_prog): Revert to short matrix format.
4334 2008-06-05 Sebastian Pop <sebastian.pop@amd.com>
4335 Dwarak Rajagopal <dwarak.rajagopal@amd.com>
4337 * tree-loop-fusion.c (fuse_loops): Fix uninitialized variable
4340 2008-06-05 Sebastian Pop <sebastian.pop@amd.com>
4342 * graphite.c (nb_data_refs_in_scop): New.
4343 (graphite_transform_loops): Print more stats: number of
4344 loops, basic blocks and data references per scop.
4346 2008-06-04 Sebastian Pop <sebastian.pop@amd.com>
4347 Jan Sjodin <jan.sjodin@amd.com>
4349 * graphite.c (loop_affine_expr, idx_record_params,
4350 find_scop_parameters, setup_cloog_loop): Use instantiate_scev
4351 instead of instantiate_parameters.
4353 2008-06-04 Tobias Grosser <grosser@fim.uni-passau.de>
4355 * graphite.c (schedule_to_scattering): Fix scattering dimensions,
4356 add support for parameters, add STATIC_SCHEDULE at the right places,
4359 2008-06-04 Tobias Grosser <grosser@fim.uni-passau.de>
4361 * graphite.c (build_scop_loop_nests): Only add the loops, that
4362 are contained completely in the SCoP.
4363 (build_cloog_prog): Disable scattering, until schedule_to_scattering
4364 and the domains are fixed.
4365 (build_scop_canonical_schedules): Add support for bbs not contained
4368 2008-06-04 Tobias Grosser <grosser@fim.uni-passau.de>
4370 * graphite.h (scop_contains_loop): Update comments to match
4371 the actual behavior.
4372 (scop_contains_loop): New.
4373 * graphite.c (schedule_to_scattering): Use scop_contains_loop.
4375 2008-06-04 Sebastian Pop <sebastian.pop@amd.com>
4377 * graphite.c (get_bb_type): On function body, i.e. loop_0,
4378 don't mark blocks as GBB_LOOP_SING_EXIT_HEADER, mark them
4381 2008-06-04 Sebastian Pop <sebastian.pop@amd.com>
4382 Tobias Grosser <grosser@fim.uni-passau.de>
4384 * graphite.c (graphite_transform_loops): Early return when
4385 there are no loops in the function.
4387 2008-05-31 Sebastian Pop <sebastian.pop@amd.com>
4388 Jan Sjodin <jan.sjodin@amd.com>
4390 * graphite.c (scan_tree_for_params, setup_cloog_loop): Compute the
4391 offset of the last loop.
4392 (setup_cloog_loop): Copy the entire outer constraint matrix.
4394 2008-05-31 Sebastian Pop <sebastian.pop@amd.com>
4395 Jan Sjodin <jan.sjodin@amd.com>
4397 * graphite.c (stmt_in_scop_p, function_parameter_p,
4398 invariant_in_scop_p): Removed.
4399 (scan_tree_for_params): Can be used with no constraint
4400 matrix for gathering parameters.
4401 (idx_record_params): Don't use idx_record_param, instead use
4402 scan_tree_for_params.
4403 (find_scop_parameters): Same.
4404 (setup_cloog_loop, build_scop_iteration_domain, build_cloog_prog):
4405 Fix the size of loop domains.
4406 (schedule_to_scattering): Exit when the outer loop is not in scop.
4407 (find_transform): Enable build_cloog_prog.
4409 2008-05-31 Sebastian Pop <sebastian.pop@amd.com>
4410 Jan Sjodin <jan.sjodin@amd.com>
4412 * graphite.c (schedule_to_scattering): Make scattering domains
4413 uniformly of the same size, as required by CLooG 0.14.0 and before.
4415 2008-05-31 Sebastian Pop <sebastian.pop@amd.com>
4416 Jan Sjodin <jan.sjodin@amd.com>
4418 * graphite.c (schedule_to_scattering): Rewrite, correct the
4419 translation of the scheduling function to scattering.
4420 (build_cloog_prog): Call schedule_to_scattering only once.
4421 * graphite.h (scop_loop_index): Do not fail for loops not
4422 in the scop: return -1.
4424 2008-05-30 Tobias Grosser <grosser@fim.uni-passau.de>
4426 * graphite.c (build_graphite_bb): Initialize GBB_DOMAIN.
4427 (loop_body_to_cloog_stmts): Export GBB_DOMAIN.
4428 (setup_cloog_loop): Export GBB_DOMAIN.
4429 (build_cloog_prog): New. Create new CLOOG_PROG, which should be
4430 able to rebuild the original control flow.
4431 * graphite.h (graphite_bb): Add domain field and access macro.
4434 2008-05-30 Sebastian Pop <sebastian.pop@amd.com>
4436 * graphite.c (debug_gbb): New.
4437 (print_scop, build_graphite_bb): Use SCOP_BBS.
4438 (build_scop_bbs): Reimplemented.
4439 (dfs_bb_in_scop_p): Removed.
4440 (build_scop_loop_nests): Reorder loops inserted in
4441 SCOP_LOOP_NEST: outer loops should come first.
4442 (build_scop_canonical_schedules): Reinitialize at zero
4443 the components of the SCOP_STATIC_SCHEDULE for the loops
4444 that have already been parsed.
4446 * graphite.h (debug_gbb): Declared.
4448 2008-05-30 Sebastian Pop <sebastian.pop@amd.com>
4449 Jan Sjodin <jan.sjodin@amd.com>
4451 * graphite.c (create_empty_loop): Renamed graphite_create_new_loop.
4452 (graphite_loop_to_gcc_loop): Removed.
4453 (remove_all_edges): New.
4454 (graphite_stmt_to_gcc_stmt): Renamed translate_clast.
4455 (gloog): Remove useless code.
4457 2008-05-29 Tobias Grosser <grosser@fim.uni-passau.de>
4459 * graphite.c (get_bb_type): Reworked. We distinguish between
4460 loops with one or multiple exits.
4461 (is_loop_exit): New.
4463 (is_bb_addable): Rework condition handling, now support for case
4464 case statements and loops with multiple exits.
4466 * testsuite/gcc.dg/graphite/scop-11.c: New.
4467 * testsuite/gcc.dg/graphite/scop-12.c: New.
4468 * testsuite/gcc.dg/graphite/scop-13.c: New.
4470 2008-05-29 Tobias Grosser <grosser@fim.uni-passau.de>
4472 * graphite.c (dot_all_scops_1): Fix some colors. Reuse colors, if
4473 we have too many colors.
4475 2008-05-22 Sandeep Maram <smaram_b04@iiita.ac.in>
4477 * doc/invoke.texi (-ftree-loop-fusion): Document.
4478 * tree-pass.h (pass_loop_fusion): Declared.
4479 * tree-loop-fusion.c: New.
4480 * timevar.def (TV_TREE_LOOP_FUSION): Declared.
4481 * tree-data-ref.c (find_data_references_in_loop): Make extern.
4482 * tree-data-ref.h (find_data_references_in_loop): Declared.
4483 * common.opt (ftree-loop-fusion): Declared.
4484 * Makefile.in (tree-loop-fusion.o): Added rule and to OBJS-common.
4486 2008-05-21 Sebastian Pop <sebastian.pop@amd.com>
4488 * graphite.c (build_access_matrix): Fix typo from the merge.
4490 2008-05-20 Sebastian Pop <sebastian.pop@amd.com>
4492 * Merge from mainline (130800:135673).
4494 2008-05-07 Sebastian Pop <sebastian.pop@amd.com>
4496 * graphite.c (end_scop): The exit of the scop is not part of the scop.
4497 Update dominators after splitting.
4499 2008-05-07 Sebastian Pop <sebastian.pop@amd.com>
4501 * graphite.c (is_bb_addable): Return the harmful statement.
4502 Factor up some code.
4503 (end_scop): New. Splits end of scope bbs on a harmful statement.
4504 (build_scops_1): Call end_scop.
4506 2008-05-07 Sebastian Pop <sebastian.pop@amd.com>
4508 * graphite.c: (succs_at_same_depth, end_scop, all_preds_visited_p,
4509 all_succs_visited_p, start_new_scop_for_each_succ, start_new_scop,
4510 add_dominators_to_open_scops, stop_last_open_scop, scop_end_loop,
4511 build_scops_1): Removed.
4512 (build_scops_2): Renamed build_scops_1.
4514 2008-05-06 Sebastian Pop <sebastian.pop@amd.com>
4516 * graphite.c: Fix formatting.
4518 2008-05-06 Tobias Grosser <grosser@fim.uni-passau.de>
4520 * graphite.c (get_bb_type): New.
4522 (build_scops_2): New.
4523 (is_bb_addable): New.
4524 (build_scops): Switch the scop detection.
4525 (build_scop_bbs): Add entry bb to scop.
4526 * graphite.h (struct scop): Update comment.
4528 2008-05-06 Tobias Grosser <grosser@fim.uni-passau.de>
4530 * graphite.c (dot_all_scops_1): Fix some incorrect colors and add
4533 2008-05-06 Tobias Grosser <grosser@fim.uni-passau.de>
4535 * testsuite/gcc.dg/graphite/scop-1.c: Update.
4536 * testsuite/gcc.dg/graphite/scop-2.c: Update.
4537 * testsuite/gcc.dg/graphite/scop-4.c: Update.
4538 * testsuite/gcc.dg/graphite/scop-5.c: Add.
4539 * testsuite/gcc.dg/graphite/scop-6.c: Add.
4541 2008-05-06 Sebastian Pop <sebastian.pop@amd.com>
4543 * testsuite/gcc.dg/graphite/scop-0.c: Add.
4544 * testsuite/gcc.dg/graphite/scop-7.c: Add.
4545 * testsuite/gcc.dg/graphite/scop-8.c: Add.
4546 * testsuite/gcc.dg/graphite/scop-9.c: Add.
4547 * testsuite/gcc.dg/graphite/scop-10.c: Add.
4549 2008-05-06 Tobias Grosser <grosser@fim.uni-passau.de>
4551 * graphite.c (scop_affine_expr): Renamed to loop_affine_expr.
4552 Check affine expressions depending on the outermost loop
4554 (stmt_simple_for_scop_p): Same.
4555 (harmfule_stmt_in_scop): Same.
4557 2008-04-28 Tobias Grosser <grosser@fim.uni-passau.de>
4559 * graphite.c (dot_all_scops): Remove incorrect difficult bb coloring,
4560 mark entry and exit, that are not part of the SCoP and update HTML
4563 2008-04-25 Sebastian Pop <sebastian.pop@amd.com>
4565 * graphite.c (basic_block_simple_for_scop_p): Renamed
4567 (save_scop, preds_at_same_depth, test_for_scop_bound): Removed.
4568 (add_dominators_to_open_scops, build_scops_1): Reimplemented.
4569 (all_preds_visited_p, all_succs_visited_p,
4570 start_new_scop_for_each_succ, start_new_scop, stop_last_open_scop,
4571 scop_end_loop): New.
4572 (build_scops): Do not use dfs_enumerate_from.
4574 * testsuite/gcc.dg/graphite/scop-{1,2,4}.c: Updated.
4576 2008-04-23 Sebastian Pop <sebastian.pop@amd.com>
4578 * graphite.c: Add comments to functions that are missing a
4580 (graphite_create_iv): Removed. Merged in graphite_loop_to_gcc_loop.
4582 2008-04-23 Sebastian Pop <sebastian.pop@amd.com>
4584 * graphite.c (nb_params_in_scop): Moved...
4585 (graphite_bb_from_bb, loop_body_to_cloog_stmts): New.
4586 (setup_cloog_loop): Call loop_body_to_cloog_stmts.
4587 (clast_to_gcc_expression): Reduce column size to less than 80.
4588 (graphite_create_iv): Return the new name of the IV.
4589 (find_transform): Set options->esp and options->cpp.
4590 (gloog): Comment out the invalidation of the old loop code.
4591 (initialize_dependence_polyhedron): Replace scop_nb_params with
4594 * graphite.h (nb_params_in_scop): ... here.
4595 (scop_nb_params): Removed.
4596 (loop_domain_dim): Return something even when the loop was not
4597 found in the hash table: avoid ICEing on all the graphite.exp
4600 2008-04-14 Konrad Trifunovic <konrad.trifunovic@inria.fr>
4602 * tree-chrec.c (for_each_scev_op): SCEV can have 3 operands.
4604 * graphite.c (build_scop_dynamic_schedules): Schedule is built
4605 according to nesting level.
4606 (find_scop_parameters): Call instantiate_parameters.
4607 (scan_tree_for_params): Extend it to handle general affine bounds.
4608 Inner loop bound can depend on outer loop induction variable.
4609 (setup_cloog_loop): tmp variable is allocated on stack. Call
4610 instantiate_parameters with respect to outermost_loop_in_scop.
4611 (loop_domain_dim, ref_nb_loops, loop_iteration_vector_dim): moved to
4613 (create_empty_loop): Function loopify should be given edge
4614 probability, instead of edge frequency. Dominance relation from
4615 switch_bb to loop_header.
4616 (clast_to_gcc_expression): Added handling of clast_reduction node.
4617 (gloog): New functionality for removing old loop.
4618 (test_dependence): Factored out from build_rdg_all_levels.
4619 (build_rdg_all_levels): Dependence testing factored out to
4620 test_dependence function.
4622 * graphite.h (struct graphite_bb): Extended with dynamic_schedule.
4623 (loop_domain_dim, ref_nb_loops, loop_iteration_vector_dim): Moved
4626 2008-04-07 Sebastian Pop <sebastian.pop@amd.com>
4628 * graphite.c (free_scop, param_index, initialize_cloog_names,
4629 nb_params_in_scop): Use name_tree map instead of just a tree
4630 for keeping track of the variable name associated to that tree.
4631 (create_empty_loop, gmp_cst_to_tree, clast_name_to_gcc,
4632 clast_to_gcc_expression, graphite_create_iv,
4633 graphite_loop_to_gcc_loop, graphite_cond_to_gcc_cond,
4634 graphite_stmt_to_gcc_stmt): New.
4635 (gloog): Call these.
4636 * graphite.h (struct name_tree): New.
4637 (struct scop): Use name_tree instead of tree for params.
4638 Store a vector of name_tree for new_ivs.
4640 (scop_nb_params): Use name_tree instead of tree.
4642 2008-04-05 Alexander Lamaison <awl03@doc.ic.ac.uk>
4643 Sebastian Pop <sebastian.pop@amd.com>
4645 * tree-bounds.c: New.
4646 * tree-bounds.h: New.
4647 * tree-pass.h: Declare pass_bounds_early and pass_bounds_late.
4648 * passes.c: Schedule pass_bounds_early, pass_bounds_late.
4649 * builtins.c (expand_builtin_alloca): Add flag_bounds as for
4653 * c-cppbuiltin.c: Same.
4657 * tree-outof-ssa.c: Same.
4659 * Makefile.in: Same.
4661 2008-03-15 Antoniu Pop <antoniu.pop@gmail.com>
4662 Sebastian Pop <sebastian.pop@amd.com>
4664 * tree-loop-distribution.c (remaining_stmts,
4665 upstream_mem_writes): Removed static variables.
4666 (copy_loop_before, create_bb_after_loop,
4667 mark_nodes_having_upstream_mem_writes, free_rdg_components,
4668 rdg_build_components, rdg_build_partitions,
4669 dump_rdg_partitions): Extern.
4670 (generate_loops_for_partition, generate_code_for_partition): Do not
4672 (already_processed_vertex_p, predecessor_has_mem_write,
4673 mark_nodes_having_upstream_mem_writes, has_upstream_mem_writes,
4674 rdg_flag_all_uses, rdg_flag_uses, rdg_flag_vertex_and_dependent,
4675 rdg_flag_loop_exits, rdg_flag_similar_memory_accesses,
4676 build_rdg_partition_for_component, rdg_build_partitions, ldist_gen):
4677 Pass remaining_stmts and upstream_mem_writes as parameters.
4678 (rdg_component): Moved...
4679 (build_rdg_partition_for_component): Do not aggregate components when
4680 flag_streamize_loops is set.
4681 (gen_sequential_loops): New.
4682 (ldist_gen): Call gen_sequential_loops.
4684 * tree-pass.h (pass_loop_streamization): Declared.
4686 * omp-low.c (expand_omp_sections): Call add_bb_to_loop on created
4687 basic blocks when loops structures exist.
4689 * builtin-types.def (BT_FN_VOID_PTR_PTR_INT): New.
4691 * tree-ssa-loop-ivopts.c (expr_invariant_in_region_p): New.
4693 * tree-parloops.c (take_address_of, eliminate_local_variables_1,
4694 eliminate_local_variables_stmt, eliminate_local_variables,
4695 separate_decls_in_loop_name, separate_decls_in_loop_stmt,
4696 separate_decls_in_loop, gen_parallel_loop): Make them work on a region
4697 of code delimited by two edges in the CFG.
4698 (separate_decls_in_loop_name): Renamed separate_decls_in_region_name.
4699 (separate_decls_in_loop_stmt): Renamed separate_decls_in_region_stmt.
4700 (separate_decls_in_loop): Renamed separate_decls_in_region. Isolate
4701 the case of parallelisation of reductions.
4702 (create_loop_fn): Extern.
4703 (create_omp_parallel_region): New.
4705 * tree-data-ref.c (dump_data_dependence_relation): Don't call
4706 dump_data_reference for printing dra and drb.
4707 (create_rdg_edge_for_ddr, create_rdg_edges_for_scalar): Initialise
4709 (build_rdg): Don't call free_dependence_relations for the moment, as
4710 we attach dependence relations on each edge of the RDG.
4713 * tree-data-ref.h (rdg_component): ...here.
4714 (struct rdg_edge): New field ddr_p relation.
4715 (RDGE_RELATION): New.
4716 (create_bb_after_loop, copy_loop_before,
4717 mark_nodes_having_upstream_mem_writes, rdg_build_components,
4718 rdg_build_partitions, dump_rdg_partitions,
4719 free_rdg_components): Declared.
4721 * omp-builtins.def (BUILT_IN_GOMP_STREAM_ALIGN_PUSH,
4722 BUILT_IN_GOMP_STREAM_ALIGN_POP): New.
4724 * tree-loop-streamization.c: New.
4726 * tree-flow.h (gather_blocks_in_sese_region, create_loop_fn,
4727 create_omp_parallel_region, expr_invariant_in_region_p): Declared.
4729 * Makefile.in (tree-loop-streamization.o): Added to OBJS-common.
4731 * tree-cfg.c (gather_blocks_in_sese_region): Extern.
4733 * passes.c: Schedule pass_loop_streamization.
4735 2008-03-08 Tobias Grosser <grosser@fmi.uni-passau.de>
4737 * graphite.c (dot_all_scops_1): Fix formatting for difficult bbs and
4740 2008-03-07 Tobias Grosser <grosser@fim.uni-passau.de>
4742 * graphite.c (dot_all_scops): Update formatting.
4743 Bbs can now be part of more than one SCoP.
4745 2008-03-04 Sebastian Pop <sebastian.pop@amd.com>
4747 * graphite.c (new_loop_to_cloog_loop_str, setup_cloog_loop): Fix
4749 (loop_domain_dim): Check for unregistered toplev SCOP loop.
4750 * graphite.h (loop_to_cloog_loop): New.
4752 2008-03-04 Konrad Trifunovic <konrad.trifunovic@inria.fr>
4754 * graphite.c (loop_domain_dim, ref_nb_loops,
4755 loop_iteration_vector_dim): New.
4756 (build_access_matrix_with_af, build_access_matrix,
4757 initialize_dependence_polyhedron): Fixed for new matrix layout.
4758 No longer assume that all iteration domains are of the same
4761 2008-03-02 Sebastian Pop <sebastian.pop@amd.com>
4763 * tree-scalar-evolution.c (instantiate_parameters_1): An SSA_NAME
4764 defined in a loop at depth 0 is invariant.
4765 * tree-chrec.c (evolution_function_is_invariant_rec_p): Ditto.
4766 * tree-ssa-loop-ivopts.c (expr_invariant_in_loop_p): Should never
4767 be called at loop depth 0.
4769 * graphite.c (basic_block_simple_for_scop_p): Take the scop as
4771 (dot_all_scops_1): Update use of basic_block_simple_for_scop_p.
4772 (down_open_scop): Removed.
4773 (loop_in_scop_p): Redefined.
4774 (scop_affine_expr): New argument: scop.
4775 (stmt_simple_for_scop_p): New argument: scop. RETURN_EXPR is not
4776 a harmful statement ending a scop.
4777 (basic_block_simple_for_scop_p): New argument: scop.
4778 (get_loop_start): Removed.
4779 (new_scop): Initialize SCOP_LOOPS.
4780 (free_scop): Free SCOP_LOOPS.
4781 (succs_at_same_depth, preds_at_same_depth): New.
4782 (end_scop): Test the validity of a scop.
4783 (add_dominators_to_open_scops): New.
4784 (test_for_scop_bound): Call add_dominators_to_open_scops.
4785 Add cases for opening and closing multiple scops.
4786 (build_scops, build_scop_bbs): Iterate over basic blocks in
4788 (build_graphite_bb): Pass scop directly.
4789 (dfs_bb_in_scop_p): New.
4790 (scop_record_loop): Use SCOP_LOOPS for not recording the same loop
4792 (nb_loops_around_gb): Use loop_in_scop_p.
4793 (schedule_to_scattering): Disabled for the moment the code computing
4794 the "textual order for outer loop".
4796 * graphite.h (struct scop): New field loops.
4798 (scop_loop_index): Test that the given loop belongs to SCOP_LOOPS.
4800 * testsuite/gcc.dg/graphite/scop-{1,...,7}.c: Updated.
4802 2008-02-27 Antoniu Pop <antoniu.pop@gmail.com>
4803 Sebastian Pop <sebastian.pop@amd.com>
4805 * builtin-types.def (BT_FN_PTR_SIZE_UINT, BT_FN_BOOL_PTR): New.
4806 * common.opt (fstreamize-loops): New.
4807 * omp-builtins.def (BUILT_IN_GOMP_STREAM_CREATE,
4808 BUILT_IN_GOMP_STREAM_PUSH, BUILT_IN_GOMP_STREAM_HEAD,
4809 BUILT_IN_GOMP_STREAM_POP, BUILT_IN_GOMP_STREAM_EOS_P,
4810 BUILT_IN_GOMP_STREAM_SET_EOS, BUILT_IN_GOMP_STREAM_DESTROY): New.
4812 2008-02-22 Konrad Trifunovic <konrad.trifunovic@inria.fr>
4814 * tree-data-ref.c (build_empty_rdg): New.
4815 (build_rdg): Use it.
4816 * tree-data-ref.h (build_empty_rdg): Declared.
4817 * graphite.c (free_scop): Free SCOP_LOOP2CLOOG_LOOP.
4818 (find_vertex_for_stmt): Removed.
4819 (build_rdg_all_levels): Use build_empty_rdg and rdg_vertex_for_stmt.
4821 2008-02-21 Sebastian Pop <sebastian.pop@amd.com>
4823 * tree-loop-distribution.c (generate_builtin): After cancelling the
4824 loop tree, also delete basic blocks.
4825 (rdg_flag_uses): Stop recursion when a vertex has already been
4828 2008-02-15 Konrad Trifunovic <konrad.trifunovic@inria.fr>
4830 * graphite.c (build_scop_alpha): Removed.
4831 (graphite_transform_loops): Add a dummy call to build_all_rdg_levels
4832 and dump_dependence_graph to avoid compiler warnings.
4834 2008-02-14 Konrad Trifunovic <konrad.trifunovic@inria.fr>
4836 * tree-data-ref.c (dr_may_alias_p, create_rdg_vertices): Extern.
4837 * tree-data-ref.h (dr_may_alias_p, create_rdg_vertices): Declared.
4838 * graphite.c (new_loop_to_cloog_loop_str, hash_loop_to_cloog_loop,
4839 eq_loop_to_cloog_loop, del_loop_to_cloog_loop): New.
4840 (new_scop, setup_cloog_loop): Initialize SCOP_LOOP2CLOOG_LOOP.
4841 (initialize_dependence_polyhedron, find_vertex_for_stmt,
4842 initialize_data_dependence_polyhedron, is_empty_polyhedron,
4843 statement_precedes_p, build_rdg_all_levels, build_scop_alpha,
4844 dump_dependence_graph): New.
4845 * graphite.h (struct graphite_bb): New field compressed_alpha_matrix.
4847 (struct scop): New field loop2cloog_loop.
4848 (SCOP_LOOP2CLOOG_LOOP, struct data_dependence_polyhedron,
4849 RDGE_DDP, ddp_p, struct loop_to_cloog_loop_str): New.
4851 2008-02-10 Konrad Trifunovic <konrad.trifunovic@inria.fr>
4853 * graphite.c (build_graphite_bb): Fix initialization
4854 of the graphite basic block.
4856 2008-02-05 Sebastian Pop <sebastian.pop@amd.com>
4858 * graphite.c (scan_tree_for_params): Rewrite for the new layout of
4859 loop domain matrix. Pass in the number of loops contained in the
4861 (nb_loops_around_gb): Moved before setup_cloog_loop that uses it.
4862 (setup_cloog_loop): Rewrite for the new layout of loop domain matrix:
4863 loops that are not surrounding the current loop are not represented
4864 in the domain constraint matrix.
4865 (build_scop_iteration_domain): Initial domain constraint matrix
4866 contains only the eq/ineq, cst, and scop parameters columns.
4868 2008-01-29 Tobias Grosser <grosser@fim.uni-passau.de>
4870 * graphite.c (schedule_to_scattering, nb_loops_around_gb): New.
4871 (print_graphite_bb): Print scattering.
4873 2008-01-29 Tobias Grosser <grosser@fim.uni-passau.de>
4875 * graphite.c (initialize_cloog_names): Initialize names of
4876 scattering variables.
4878 2009-01-29 Tobias Grosser <grosser@fim.uni-passau.de>
4880 * graphite.c (dot_all_scops_1): Disable debug output while
4883 2008-01-29 Tobias Grosser <grosser@fim.uni-passau.de>
4885 * graphite.c (find_transform): Change cloog output language to C.
4887 2008-01-27 Sebastian Pop <sebastian.pop@amd.com>
4889 * tree-loop-distribution.c (generate_memset_zero,
4890 generate_builtin, generate_code_for_partition,
4891 rdg_flag_all_uses): New.
4892 (rdg_flag_uses): Gather in the same partition the statements defining
4893 the VUSES of the current statement.
4894 (rdg_flag_similar_stores): Renamed rdg_flag_similar_memory_accesses.
4895 Gather in the same partition not only the stores to the same memory
4896 access, but also the reads.
4897 (ldist_generate_loops): Renamed ldist_gen.
4899 2008-01-24 Sebastian Pop <sebastian.pop@amd.com>
4900 Tobias Grosser <grosser@fmi.uni-passau.de>
4902 * graphite.c (setup_cloog_loop): Chain all cloog loops with the
4903 next pointer, don't use the inner pointer.
4905 2008-01-20 Tobias Grosser <grosser@fmi.uni-passau.de>
4907 * graphite.c (dot_all_scops, dot_all_scops_1): New.
4908 (find_transform): Call dot_all_1.
4909 * graphite.h (dot_all_scops): Declared.
4911 2007-12-14 Sebastian Pop <sebastian.pop@amd.com>
4913 * tree-loop-distribution.c: Fix apsi.f ICE.
4914 (create_bb_after_loop): New.
4915 (generate_loops_for_partition): Use it.
4916 * testsuite/gfortran.dg/ldist-1.f90: New.
4918 * tree-data-ref.c (dot_rdg): Use /tmp/rdg.dot for dotty format.
4919 * graphite.c (dot_scop): Use /tmp/scop.dot for dotty format.
4921 2007-12-13 Tobias Grosser <grosser@fmi.uni-passau.de>
4923 * graphite.c (find_transform): Dump cloog program sent to cloog.
4925 2007-12-13 Tobias Grosser <grosser@fmi.uni-passau.de>
4927 * graphite.c (initialize_cloog_names): Initialize cloog
4930 2007-12-13 Tobias Grosser <grosser@fmi.uni-passau.de>
4932 * graphite.c (build_scop_context): Fix typo, for the matrix
4933 format: insert '0 >= 0' instead of '-1 >= 0'.
4935 2007-12-13 Sebastian Pop <sebastian.pop@amd.com>
4937 * Fix merge problems.
4939 2007-12-13 Sebastian Pop <sebastian.pop@amd.com>
4941 * graphite.c (setup_cloog_loop): Fix typo.
4943 2007-12-12 Sebastian Pop <sebastian.pop@amd.com>
4945 * doc/invoke.texi (-ftree-loop-distribution): Documented.
4946 * tree-loop-distribution.c: Reimplemented.
4947 * tree-pass.h (pass_loop_distribution): New.
4948 * tree-scalar-evolution.c (number_of_iterations_for_all_loops): Use
4950 * graphds.h (struct graph): New field indexes.
4951 * timevar.def (TV_TREE_LOOP_DISTRIBUTION): New.
4953 * tree-vect-analyze.c: Remove declaration of static functions when not
4955 * tree-vectorizer.c: Same.
4956 (rename_variables_in_loop): Now extern.
4957 (slpeel_tree_duplicate_loop_to_edge_cfg): Renamed
4958 tree_duplicate_loop_to_edge_cfg. Reset PENDING_STMT for edges after
4959 calling redirect_edge_and_branch_force.
4961 * tree-vectorizer.h (tree_duplicate_loop_on_edge): Declared.
4963 * tree-data-ref.c: Don't include tree-chrec.h.
4964 (debug_data_dependence_relations): New.
4965 (dump_data_dependence_relation): Call dump_data_reference on data refs
4967 (same_access_functions): Moved...
4968 (find_vertex_for_stmt): Renamed rdg_vertex_for_stmt.
4969 (dump_rdg_vertex, debug_rdg_vertex, dump_rdg_component,
4970 debug_rdg_component, dump_rdg, debug_rdg, dot_rdg_1, dot_rdg,
4971 struct rdg_vertex_info, ): New.
4972 (create_rdg_edge_for_ddr): Compute the dependence level before looking
4974 (create_rdg_vertices): Initialize the htab of graph->indexes.
4975 Initialize RDG_MEM_WRITE_STMT and RDG_MEM_READS_STMT.
4976 (stmts_from_loop): Don't save LABEL_EXPR.
4977 (hash_stmt_vertex_info, eq_stmt_vertex_info,
4978 hash_stmt_vertex_del): New.
4979 (build_rdg): Initialize rdg->indexes.
4980 (free_rdg, stores_from_loop, ref_base_address,
4981 rdg_defs_used_in_other_loops_p, have_similar_memory_accesses,
4982 have_similar_memory_accesses_1, ref_base_address_1,
4983 remove_similar_memory_refs): New.
4985 * tree-data-ref.h: Include tree-chrec.h.
4986 (debug_data_dependence_relations): Declared.
4987 (same_access_functions): ...here. Now static inline.
4988 (ddr_is_anti_dependent, ddrs_have_anti_deps,
4989 ddr_dependence_level): New.
4990 (struct rdg_vertex): New fields has_mem_write, has_mem_reads.
4991 (RDGV_HAS_MEM_WRITE, RDGV_HAS_MEM_READS, RDG_STMT, RDG_MEM_WRITE_STMT,
4992 RDG_MEM_READS_STMT): New.
4993 (dump_rdg_vertex, debug_rdg_vertex, dump_rdg_component,
4994 debug_rdg_component, dump_rdg, debug_rdg, dot_rdg,
4995 rdg_vertex_for_stmt): Declared.
4996 (struct rdg_edge): New field level.
4997 (RDGE_LEVEL, free_rdg): New.
4998 (stores_from_loop, remove_similar_memory_refs,
4999 rdg_defs_used_in_other_loops_p,
5000 have_similar_memory_accesses): Declared.
5001 (rdg_has_similar_memory_accesses): New.
5003 * lambda.h (dependence_level): New.
5004 * common.opt (ftree-loop-distribution): New.
5005 * tree-flow.h (debug_loop_ir): Renamed debug_loops.
5006 (print_loop_ir): Renamed print_loops.
5007 (debug_loop, debug_loop_num, print_loops_bb, mark_virtual_ops_in_bb,
5008 tree_duplicate_loop_to_edge_cfg, rename_variables_in_loop): Declared.
5009 * Makefile.in (TREE_DATA_REF_H): Depends on tree-chrec.h.
5010 (tree-loop-distribution.o): Added.
5011 * tree-cfg.c (mark_virtual_ops_in_region): Use mark_virtual_ops_in_bb.
5012 (mark_virtual_ops_in_bb): New.
5013 (print_loops_bb, debug_loop_num, debug_loop): New.
5014 * passes.c: Scheduled pass_loop_distribution.
5016 2007-12-12 Konrad Trifunovic <konrad.trifunovic@inria.fr>
5018 * graphite.c (scan_tree_for_params): Correct the number of columns
5020 (nb_flat_iterator): New.
5021 (setup_cloog_loop): Initialize to 1 the first column for inequalities.
5022 (build_scop_iteration_domain): Correct the number of columns for
5025 2007-12-12 Sebastian Pop <sebastian.pop@amd.com>
5027 * Merge from mainline (129697:130800).
5029 2007-10-30 Sebastian Pop <sebastian.pop@amd.com>
5031 * graphite.c (build_graphite_bb): SCoP's basic blocks are post
5032 dominated by SCoP's exit.
5033 (graphite_transform_loops): Compute post dominators.
5035 2007-10-28 Sebastian Pop <sebastian.pop@amd.com>
5037 * Merge from mainline (127169:129697).
5039 2007-10-28 Sebastian Pop <sebastian.pop@amd.com>
5041 * graphite.c (affine_expr): Renamed scop_affine_expr. Use an extra
5042 parameter for the basic block that contains the expression. Use
5043 outermost_loop_in_scop for evolution_function_is_affine_multivariate_p.
5044 (stmt_simple_for_scop_p): Pass to scop_affine_expr the basic block of
5046 * graphite.h (gbb_loop): New.
5047 (GBB_LOOP): Removed.
5049 2007-08-03 Sebastian Pop <sebpop@gmail.com>
5051 * Makefile.in: Fix merge problem.
5053 2007-08-03 Sebastian Pop <sebpop@gmail.com>
5055 * Merge from mainline (125309:127169).
5056 * tree-loop-distribution.c: Disabled.
5058 2007-06-05 Sebastian Pop <sebpop@gmail.com>
5060 * Merge from mainline (r123693:125309).
5062 2007-05-30 Sebastian Pop <sebpop@gmail.com>
5064 * tree-loop-distribution.c (correct_modify_expr_p): Renamed
5066 (correct_modify_p, check_statements, number_of_lvalue_uses,
5067 number_of_scalar_dependences, create_edges): Use GIMPLE_MODIFY_STMT
5068 instead of MODIFY_EXPR.
5069 (update_edge_with_ddv): Don't pass index_of_edge. Initialize
5072 2007-05-24 Sebastian Pop <sebpop@gmail.com>
5074 * tree-loop-distribution.c (struct rdg): Replace arrays by
5075 VECs for edges and vertices.
5076 (RDG_NBV, RDG_NBE, RDG_VERTEX, RDG_EDGE): Removed.
5077 (RDGV_NB_PARTITIONS): New.
5078 (PRDG_NBV, PRDG_NBE): Removed.
5079 (build_scc_graph, correct_partitions_p, mark_partitions, build_prdg,
5080 dump_rdg, find_vertex_with_stmt, create_vertices, free_rdg,
5081 number_of_scalar_dependences, create_edges, build_rdg): Use VECs.
5083 2007-05-17 Georges-Andre Silber <silber@cri.ensmp.fr>
5084 Sebastian Pop <sebpop@gmail.com>
5086 * doc/invoke.texi (-ftree-loop-distribution): Document.
5087 * tree-loop-distribution.c: New file.
5088 * tree-pass.h (pass_loop_distribution): Declared.
5089 * timevar.def (TV_TREE_LOOP_DISTRIBUTION): New.
5090 * tree-data-ref.c (initialize_data_dependence_relation): Initialize
5092 * tree-data-ref.h (data_dependence_relation): Add reversed_p.
5093 (DDR_REVERSED_P): New.
5094 * common.opt (-ftree-loop-distribution): New.
5095 * tree-flow.h (distribute_loops): Declared.
5096 * Makefile.in (OBJS-common): Depend on tree-loop-distribution.o.
5097 * passes.c (init_optimization_passes): Schedule loop distribution.
5099 2007-05-12 Sebastian Pop <sebastian.pop@inria.fr>
5101 * graphite.c (print_graphite_bb): Don't call dump_data_references.
5102 (print_scop): Don't print when scop is NULL.
5103 (build_scop_context, find_transform): Don't output to stderr.
5105 2007-05-09 Sebastian Pop <sebastian.pop@inria.fr>
5107 * tree-data-ref.c: Don't include graphite.h.
5108 Comment out the code for printing data reference's scop.
5109 (build_access_matrix_with_af): Moved...
5110 * tree-data-ref.h (build_access_matrix_with_af): Removed declaration.
5111 * graphite.c (build_access_matrix_with_af): ... here. Now static.
5112 (print_graphite_bb): Print basic block's schedule.
5113 (print_scop): Don't print the schedule, call cloog's pretty printer.
5114 (bb_in_scop_p): A basic block is in a scop only if it is both
5115 dominated and postdominated by the scop's entry and exit basic blocks.
5116 (function_parameter_p): New.
5117 (invariant_in_scop_p): Use function_parameter_p.
5118 (new_scop, save_scop): New.
5119 (end_scop, test_for_scop_bound, build_scops): Use new_scop, and
5121 (scan_tree_for_params): Directly build the constraint as CloogMatrix.
5122 (loop_in_scop_p): New.
5123 (scop_record_loop): Use loop_in_scop_p.
5124 (build_scop_domain): Renamed build_scop_iteration_domain.
5125 (setup_cloog_loop, initialize_cloog_names, find_scop_parameters,
5126 nb_params_in_scop, build_scop_context, first_loop_in_scop,
5127 setup_cloog_loop, dot_scop_1, dot_scop): New.
5128 * graphite.h (GBB_LOOP, SCOP_PROG, dot_scop): New.
5129 (struct scop): Add a pointer to cloog's representation of a program.
5131 2007-04-14 Sebastian Pop <sebastian.pop@inria.fr>
5133 * doc/invoke.texi (-ftree-check-verbose): Renamed
5134 -ftree-checks-verbose.
5135 * common.opt (flag_tree_check_verbose): Renamed
5136 flag_tree_checks_verbose.
5137 * tree-check.c (tree_check_warning): Use flag_tree_checks_verbose.
5139 2007-04-14 Sebastian Pop <sebastian.pop@inria.fr>
5141 * configure: Regenerated.
5142 * config.in: Regenerated.
5143 * tree-ssa-loop.c (graphite_transforms): Execute
5144 graphite_transform_loops only when HAVE_cloog.
5145 * configure.ac (HAVE_polylib, HAVE_cloog, GRAPHITE): Defined.
5146 * graphite.c: Include polylibgmp.h and cloog.h.
5147 (graphite_transform_loops): Removed loops parameter.
5148 * tree-flow.h (graphite_transform_loops): Update declaration.
5149 * Makefile.in (POLYLIBLIBS, POLYLIBINC, CLOOGLIBS, CLOOGINC): New.
5150 (LIBS): Depend on CLOOGLIBS and on POLYLIBLIBS.
5151 (INCLUDES): Depend on POLYLIBINC and on CLOOGINC.
5152 (OBJS-common): Remove dependence on graphite.o.
5153 (BACKEND): Depend on @GRAPHITE@.
5155 2007-04-13 Sebastian Pop <sebastian.pop@inria.fr>
5157 * doc/invoke.texi (-ftree-check-verbose): Documented.
5158 * testsuite/gcc.dg/tree-checker/tree-checks-1.c: New.
5159 * testsuite/gcc.dg/tree-checker/tree-checks-2.c: New.
5160 * testsuite/gcc.dg/tree-checker/tree-checks-3.c: New.
5161 * testsuite/gcc.dg/tree-checker/tree-checks-4.c: New.
5162 * testsuite/gcc.dg/tree-checker/tree-checks.exp: New.
5163 * testsuite/gcc.dg/tree-checker/condates.crp: New.
5164 * common.opt (ftree-checks-verbose): New.
5165 * tree-check.c (tree_check_warning): Move extra stderr output
5166 under control of flag_tree_check_verbose.
5168 2007-04-12 Sebastian Pop <sebastian.pop@inria.fr>
5170 * tree-match.c: Fix comments formatting.
5171 * tree-match.h: Fix comments formatting.
5172 * tree-check.c: Fix comments formatting.
5173 (tree_check_init): Restructure.
5175 2007-04-12 Nic Volanschi <nic.volanschi@free.fr>
5177 * doc/invoke.texi (-ftree-check, -ftree-checks): Documented.
5179 2007-04-10 Sebastian Pop <sebastian.pop@inria.fr>
5181 * Merge from mainline (r120733:123693).
5183 2007-03-20 Nic Volanschi <nic.volanschi@free.fr>
5185 * condate.y: New file.
5186 * tree-match.h (struct patt_info_s): New field sign.
5187 (struct condate_s): New field msg.
5188 (normalize_condate, name_condate, add_condate): New.
5189 (conds[], condate_parse): Made extern.
5190 * tree-check.c (tree_check_warning): First arg changed to cond;
5191 warning reformatted.
5192 (tree_check_init): Reset the TREE_VISITED bit on every CFG node.
5194 (tree_check): Process trivial condates.
5195 (read_delimited_string): Removed.
5196 (print_cond): Print name and msg.
5197 (conds[]): Made extern.
5198 (parse_tree_check_file_once): Rewritten to use the parser in
5200 Processing of option --tree_check_string moved to tree_scan().
5201 * Makefile.in: Added condate.y
5203 2007-03-12 Sebastian Pop <sebastian.pop@inria.fr>
5205 * tree-pretty-print.c (dump_generic_bb_buff, lazy_dump_generic_node):
5206 Use VECs instead of varrays.
5207 * diagnostic.h (lazy_dump_generic_node): Update declaration.
5208 * Makefile.in (pretty-print.o): Depend on vec.h.
5209 * pretty-print.c: Include tree.h and vec.h.
5210 (pp_clear_state, pp_write_list_to_stream, pp_base_format,
5211 pp_base_format, pp_construct, pp_base_string, pp_lazy_mode,
5212 new_tree_chunk, pp_add_tree, pp_add_string, pp_add_char, pp_write_list,
5213 pp_free_list): Use VECs instead of varrays.
5214 * pretty-print.h: Do not include varray.h.
5215 (struct tree_chunk_s): Declaration moved before its use.
5216 (output_buffer): Rename varray field to chunks.
5217 * tree-match.c (tree_equal, chunk_1st_char, chunks_lookahead,
5218 tree_1st_char, match_chunks_pattinfo, match_tree_pattinfo,
5219 save_global_holes): Use VECs instead of varrays.
5220 * tree-match.h: Declare VECs of cfg_node, and hole_p.
5221 * tree-check.c (scan_cfg_stmts, push_node,
5222 print_matching_stmt): Removed.
5223 (tree_check_instance, push_global_holes_if_new, tree_check,
5224 execute_tree_check): Use VECs instead of varrays.
5225 (gate_tree_check): Don't execute the CFG check when basic_block_info
5228 2007-01-12 Sebastian Pop <sebastian.pop@inria.fr>
5230 * Merge from mainline (r115016:120733).
5232 2007-01-12 Sebastian Pop <sebastian.pop@inria.fr>
5234 * Merge from mainline (r117632:117661).
5236 2007-01-12 Sebastian Pop <sebastian.pop@inria.fr>
5238 * tree-dump.c (dump_option_value_in): Add TDF_DEBUG.
5239 * tree-pass.h (TDF_DEBUG, debug_p): New.
5240 * tree-scalar-evolution.c (set_scalar_evolution, get_scalar_evolution,
5241 get_scalar_evolution, add_to_evolution, set_nb_iterations_in_loop,
5242 get_loop_exit_condition, analyze_evolution_in_loop,
5243 analyze_initial_condition, analyze_scalar_evolution,
5244 instantiate_parameters, number_of_latch_executions): Use debug_p.
5245 * tree-chrec.c (chrec_apply): Use debug_p.
5246 * tree-data-ref.c: Include graphite.h.
5247 (dump_data_reference): Print also the access matrix.
5248 (analyze_array, analyze_indirect_ref, init_data_ref,
5249 analyze_offset_expr, address_analysis, object_analysis,
5250 create_data_ref, finalize_ddr_dependent,
5251 non_affine_dependence_relation, analyze_ziv_subscript,
5252 analyze_siv_subscript_cst_affine,
5253 compute_overlap_steps_for_affine_1_2, analyze_subscript_affine_affine,
5254 can_use_analyze_subscript_affine_affine, analyze_siv_subscript,
5255 analyze_miv_subscript, analyze_overlapping_iterations,
5256 build_classic_dist_vector, subscript_dependence_tester,
5257 compute_affine_dependence, analyze_all_data_dependences): Use debug_p.
5258 (build_access_matrix_with_af): No longer static.
5259 * tree-data-ref.h (scop_p): ... declaration here.
5260 (data_reference.scop): New field.
5261 (DR_SCOP, DR_ACCESS_MATRIX): New.
5262 (build_access_matrix_with_af, dr_num_subscripts): Declared.
5263 * graphite.c (print_graphite_bb): Call dump_data_references.
5264 (print_scop): Use scop_nb_loops and scop_dim_domain.
5265 (test_for_scop_bound): Use debug_p.
5266 (scan_tree_for_params): Use scop_nb_loops, scop_nb_loops and
5268 (scop_loop_index): Moved...
5269 (scop_record_loop): New.
5270 (build_scop_loop_nests): Use scop_record_loop.
5271 (build_scop_domain): Use scop_dim_domain.
5272 (build_access_matrix): Implemented.
5273 (build_scop_canonical_schedules): Use scop_nb_loops.
5274 (build_graphite_bb): Initialize GBB_SCOP.
5275 * graphite.h (scop_p): Moved...
5276 (graphite_bb.scop): New field.
5277 (graphite_bb.iteration_domain, GBB_DOMAIN, scop.nb_params,
5278 scop.nb_loops, scop.dim_domain, SCOP_NB_LOOPS, SCOP_NB_PARAMS,
5279 SCOP_DIM_DOMAIN, SCOP_STMTS): Removed.
5280 (scop_nb_params, scop_nb_loops, scop_dim_domain, gbb_dim_domain,
5281 scop_loop_index): New.
5282 * Makefile.in (tree-data-ref.o): Depends on graphite.h.
5284 2007-01-05 Sebastian Pop <sebastian.pop@inria.fr>
5286 * Merge from mainline (r117661:120450).
5288 2006-10-12 Sebastian Pop <sebastian.pop@inria.fr>
5290 * tree-scalar-evolution.c (instantiate_parameters_1): Don't stop
5291 at the first declaration outside the varying loop, instantiate as
5293 * tree-chrec.c (for_each_scev_op): New.
5294 * tree-chrec.h (for_each_scev_op): Declared.
5295 * tree-ssa-loop.c (pass_graphite_trans): Don't dump the function.
5296 * tree-data-ref.c (get_references_in_stmt,
5297 find_data_references_in_stmt): New, from trunk.
5298 (find_data_references_in_loop): Use get_references_in_stmt
5299 and find_data_references_in_loop, modified as in trunk.
5300 (build_access_matrix_with_af): New.
5301 * tree-data-ref.h (data_reference): Add a field access_matrix.
5302 (data_ref_loc): New, as in trunk.
5303 * graphite.c (print_graphite_bb, bb_in_scop_p, stmt_in_scop_p,
5304 invariant_in_scop_p, param_index, scan_tree_for_params,
5305 scop_loop_index, build_scop_loop_nests, build_scop_domain, irp_data,
5306 idx_record_param, idx_record_params, build_access_matrix,
5307 build_scop_data_accesses, build_scop_canonical_schedules,
5308 build_graphite_bb, build_scop_bbs, find_params_in_bb,
5309 build_scop_params): New.
5310 * graphite.h (graphite_bb): New.
5311 (scop): Add fields static_schedule, params, loop_nest,
5313 * lambda.h: Declare vecs of lambda_matrix.
5314 * tree-flow.h (print_loop_ir_bb): Declared.
5315 * tree-cfg.c (print_loop_ir_bb): New.
5316 (print_loop): Use print_loop_ir_bb.
5318 2006-10-12 Sebastian Pop <pop@cri.ensmp.fr>
5320 * Merge from mainline (r115016:117632).
5322 2006-10-11 Sebastian Pop <pop@cri.ensmp.fr>
5324 * graphite.c (debug_scops): Adjust definition for avoiding a bootstrap
5325 break due to a warning.
5327 2006-10-10 Sebastian Pop <pop@cri.ensmp.fr>
5329 * graphite.c (print_scops, debug_scops): New.
5330 (graphite_transform): Renamed graphite_find_transform.
5331 * graphite.h (debug_scops): Declared.
5333 2006-08-17 Sebastian Pop <pop@cri.ensmp.fr>
5335 * tree-match.c: Reformat following the GNU style.
5336 * tree-match.h: Reformat following the GNU style.
5337 * tree-pattern.h: Removed empty file.
5338 * Makefile.in: Remove references to tree-pattern.h.
5339 * tree-check.c: Reformat following the GNU style.
5340 (execute_tree_check): Move gate condition code to...
5341 (gate_tree_check): ...here. New function.
5342 (pass_check): Use the gate function.
5344 2006-07-04 Nic Volanschi <nic.volanschi@free.fr>
5346 * tree-pattern.h: New. Tree pattern matching and checking using
5348 * tree-check.c: New. Tree/CFG checking pass.
5349 * tree-match.c: New. Library for tree pattern matching.
5350 * opts.c, common.opt: Add options --ftree-check & --ftree-checks.
5351 * toplev.c, flags.h: Add globals for tree-check pass.
5352 * Makefile.in: Integrate the files in tree-check pass.
5353 * timevar.def, tree-optimize.c, tree-pass.h: Register tree-check pass.
5354 * pretty-print.c, pretty-print.h, tree-pretty-print.c, diagnostic.h:
5355 Introduce a "lazy" pretty-print mode.
5356 * tree.c, tree.h: Add tree_name.
5358 2006-07-04 Sebastian Pop <pop@cri.ensmp.fr>
5360 * doc/invoke.texi (-fgraphite): Correct typo.
5361 * tree-scalar-evolution.c (number_of_iterations_for_all_loops): Update
5362 use of print_loop_ir.
5363 * testsuite/gcc.dg/graphite/scop-1.c: New.
5364 * testsuite/gcc.dg/graphite/scop-2.c: New.
5365 * testsuite/gcc.dg/graphite/graphite.exp: New.
5366 * graphite.c: Include domwalk.h.
5367 (print_scop): Print only the entry and exit blocks.
5368 (debug_scop): No longer static.
5369 (affine_expr): Fix formating. Return also true when the expression is
5371 (stmt_simple_for_scop_p): Fix formating.
5372 (build_scops): Use domwalk.
5373 (get_loop_start, end_scop, test_for_scop_bound): New.
5374 (graphite_transform_loops): Avoid printing on stderr.
5375 * graphite.h (debug_scop): Declared.
5376 * tree-flow.h (debug_loop_ir, print_loop_ir): Update declarations.
5377 * Makefile.in (graphite.o): Depend on domwalk.h.
5378 * tree-cfg.c (print_loop, print_pred_bbs, print_succ_bbs): Remove
5379 declarations for static functions.
5380 (print_loop, print_loop_ir, debug_loop_ir): Use an extra parameter for
5381 controlling output verbosity.
5383 2006-06-26 Sebastian Pop <pop@cri.ensmp.fr>
5384 Plesco Alexandru <shurikx@gmail.com>
5386 * doc/invoke.texi (-fgraphite): Document.
5387 * tree-pass.h (pass_graphite_transforms): Declared.
5388 * timevar.def (TV_GRAPHITE_TRANSFORMS): New.
5389 * tree-ssa-loop.c (graphite_transforms, gate_graphite_transforms): New.
5390 (pass_graphite_transforms): Defined.
5391 * tree-data-ref.c (free_data_ref, data_reference): Extern.
5392 * tree-data-ref.h (free_data_ref, data_reference): Declared.
5393 * graphite.c, graphite.h: New.
5394 * common.opt (fgraphite): Declared.
5395 * tree-flow.h (graphite_transform_loops): Declared.
5396 * Makefile.in (OBJS-common): Add graphite.o.
5397 (graphite.o): New rule.
5398 * passes.c (pass_graphite_transforms): Scheduled.