1 2009-08-18 Sebastian Pop <sebastian.pop@amd.com>
3 * graphite-dependences.c (graphite_legal_transform_dr): Fix formatting.
4 (graphite_legal_transform_bb): Same.
5 (poly_drs_may_alias_p): Same.
7 2009-08-15 Sebastian Pop <sebastian.pop@amd.com>
10 * graphite-ppl.c (ppl_max_for_le): Correct the use of
11 ppl_Pointset_Powerset_C_Polyhedron_maximize.
13 2009-08-13 Sebastian Pop <sebastian.pop@amd.com>
15 * graphite-poly.c (print_pbb): Print PBB index.
17 2009-08-13 Sebastian Pop <sebastian.pop@amd.com>
19 * Merge from mainline (r150672:150764).
21 2009-08-13 Sebastian Pop <sebastian.pop@amd.com>
23 * graphite-interchange.c (ppl_max_for_le): Moved...
24 * graphite-poly.c (pbb_number_of_iterations): Call ppl_max_for_le.
25 * graphite-ppl.c (ppl_max_for_le): ... here.
26 * graphite-ppl.h (ppl_max_for_le): Declared.
28 2009-08-12 Sebastian Pop <sebastian.pop@amd.com>
30 * Merge from mainline (r150372:150672).
32 2009-08-11 Sebastian Pop <sebastian.pop@amd.com>
35 * sese.c (convert_for_phi_arg): New.
36 (add_guard_exit_phis): Use convert_for_phi_arg.
38 * testsuite/gfortran.dg/graphite/id-17.f: New.
40 2009-08-11 Sebastian Pop <sebastian.pop@amd.com>
42 * graphite-sese-to-poly.c (pdr_add_data_dimensions): Dont add
43 unknown subscript upper bounds.
45 * testsuite/gcc.dg/graphite/interchange-6.c: Un-XFAIL.
47 2009-08-11 Sebastian Pop <sebastian.pop@amd.com>
48 Pranav Garg <pranav.garg2107@gmail.com>
50 * graphite-interchange.c (gather_access_strides): Removed.
51 (ppl_max_for_le): New.
52 (build_linearized_memory_access): New.
53 (memory_stride_in_loop): New.
54 (pbb_interchange_profitable_p): Reimplemented.
55 * graphite-ppl.h (ppl_new_id_map): New.
56 (ppl_interchange): New.
58 * testsuite/gcc.dg/graphite/interchange-6.c: XFAILed.
60 2009-08-11 Sebastian Pop <sebastian.pop@amd.com>
62 * graphite-interchange.c (compute_subscript): Removed.
63 (compute_array_size_cstr): Removed.
64 (compute_array_size_poly): Removed.
65 (compute_array_size): Removed.
66 (gather_access_strides_poly): Removed.
67 (gather_access_strides): Empty.
69 2009-08-11 Sebastian Pop <sebastian.pop@amd.com>
71 * graphite-dependences.c (dependence_polyhedron_1): Replace
72 pdr_nb_subscripts with PDR_NB_SUBSCRIPTS.
73 (graphite_legal_transform_dr): Same.
74 (graphite_carried_dependence_level_k): Same.
75 * graphite-poly.c (new_poly_dr): Add a parameter nb_subscripts.
76 Initialize PDR_NB_SUBSCRIPTS.
77 (print_pdr_access_layout): Replace pdr_nb_subscripts with
79 * graphite-poly.h (struct poly_dr): Add nb_subscripts field.
80 (PDR_NB_SUBSCRIPTS): New.
81 (pdr_nb_subscripts): Removed.
82 (pdr_dim): Simplified.
83 * graphite-sese-to-poly.c (build_poly_dr): Replace pdr_nb_subscripts
84 with PDR_NB_SUBSCRIPTS.
86 2009-08-11 Sebastian Pop <sebastian.pop@amd.com>
88 * graphite-interchange.c (compute_array_size): Remove use of
90 * graphite-poly.c (new_poly_dr): Remove argument data_container.
91 Do not initialize PDR_DATA_CONTAINER.
92 (print_pdr): Do not print PDR_DATA_CONTAINER.
93 * graphite-poly.h (struct poly_dr): Remove data_container field.
94 (PDR_DATA_CONTAINER): Removed.
95 * graphite-sese-to-poly.c (pdr_add_data_dimensions): Remove use of
97 (build_poly_dr): Same.
99 2009-08-11 Sebastian Pop <sebastian.pop@amd.com>
101 * testsuite/gcc.dg/graphite/interchange-9.c: New.
103 2009-08-05 Konrad Trifunovic <konrad.trifunovic@gmail.com>
104 Sebastian Pop <sebastian.pop@amd.com>
106 * graphite-dependences.c (graphite_legal_transform_dr): Work on a
107 copy of the dependence polyhedron. Free the temporary objects.
108 (graphite_carried_dependence_level_k): Free unused objects before
111 * testsuite/gcc.dg/graphite/interchange-1.c: XFAILed.
112 * testsuite/gcc.dg/graphite/interchange-2.c: XFAILed.
113 * testsuite/gcc.dg/graphite/interchange-3.c: XFAILed.
114 * testsuite/gcc.dg/graphite/interchange-4.c: XFAILed.
115 * testsuite/gcc.dg/graphite/interchange-7.c: XFAILed.
117 2009-08-05 Sebastian Pop <sebastian.pop@amd.com>
119 * graphite-blocking.c (scop_do_strip_mine): Call store_scattering.
120 Early return without analyzing the data dependences if no
121 transform has been done. Call restore_scattering if the transform
123 (graphite-interchange.c): Same.
124 * graphite-poly.c (print_scattering_function): Test for PBB_TRANSFORMED.
125 (graphite_read_transforms): Initialize PBB_TRANSFORMED.
126 (apply_poly_transforms): Do not gcc_assert that
127 the transform is legal.
128 (new_poly_bb): Initialize PBB_TRANSFORMED, PBB_SAVED, and PBB_ORIGINAL.
129 Do not initialize PBB_NB_SCATTERING_TRANSFORM, PBB_NB_LOCAL_VARIABLES,
130 PBB_TRANSFORMED_SCATTERING, and PBB_ORIGINAL_SCATTERING.
131 (free_poly_dr): Free PBB_TRANSFORMED, PBB_SAVED, and PBB_ORIGINAL.
132 * graphite-poly.h (struct poly_scattering): New.
133 (struct poly_bb): Add original, transformed, and saved fields.
134 Remove transformed_scattering, original_scattering, nb_local_variables,
135 and nb_scattering_transform fields.
136 (PBB_ORIGINAL, PBB_TRANSFORMED, PBB_SAVED): New.
137 (poly_scattering_new): New.
138 (poly_scattering_free): New.
139 (poly_scattering_copy): New.
140 (store_scattering_pbb): New.
141 (store_scattering): New.
142 (restore_scattering_pbb): New.
143 (restore_scattering): New.
144 * graphite-sese-to-poly.c (build_pbb_scattering_polyhedrons):
145 Initialize PBB_TRANSFORMED and PBB_ORIGINAL.
147 2009-08-05 Sebastian Pop <sebastian.pop@amd.com>
149 * graphite-poly.c (print_pbb): Add parentheses in the pretty print.
152 2009-08-05 Sebastian Pop <sebastian.pop@amd.com>
154 * Makefile.in (graphite.o): Depends on PREDICT_H.
155 * graphite.c: Include predict.h.
156 (graphite_finalize): Call tree_estimate_probability.
157 * predict.c (predict_loops): Do not call scev_initialize and
159 (tree_estimate_probability_bb): New.
160 (tree_estimate_probability): Do not initialize loops: move that
161 code to the driver. Call tree_estimate_probability_bb.
162 (tree_estimate_probability_driver): New.
163 (pass_profile): Use tree_estimate_probability_driver.
164 * predict.h (tree_estimate_probability): Declared.
166 2009-08-05 Sebastian Pop <sebastian.pop@amd.com>
168 * graphite-clast-to-gimple.c (gloog): Add time to TV_GRAPHITE_CODE_GEN.
169 * graphite-dependences.c (graphite_legal_transform): Add time to
170 TV_GRAPHITE_DATA_DEPS.
171 (dependency_between_pbbs_p): Same.
172 * timevar.def (TV_GRAPHITE_DATA_DEPS, TV_GRAPHITE_CODE_GEN): New.
174 2009-08-03 Sebastian Pop <sebastian.pop@amd.com>
176 * Merge from mainline (r149952:150372).
178 2009-07-28 Sebastian Pop <sebastian.pop@amd.com>
180 * ChangeLog.graphite: Fix indenting, white spaces and 80 columns.
181 * graphite-blocking.c: Same.
182 * graphite-clast-to-gimple.c: Same.
183 * graphite-dependences.c: Same.
184 * graphite-poly.c: Same.
185 * graphite-poly.h: Same.
186 * graphite-ppl.c: Same.
187 * graphite-scop-detection.c: Same.
188 * graphite-sese-to-poly.c: Same.
191 2009-07-28 Sebastian Pop <sebastian.pop@amd.com>
193 * graphite-sese-to-poly.c (loop_entry_phi_arg): New.
194 (remove_simple_copy_phi): New.
195 (remove_invariant_phi): New.
196 (simple_copy_phi_p): New.
197 (reduction_phi_p): New.
198 (gsi_for_ssa_name_def): New.
199 (insert_out_of_ssa_copy): New.
200 (insert_out_of_ssa_copy_on_edge): New.
201 (create_zero_dim_array): New.
202 (scalar_close_phi_node_p): New.
203 (rewrite_close_phi_out_of_ssa): New.
204 (rewrite_phi_out_of_ssa): New.
205 (rewrite_reductions_out_of_ssa): New.
206 (build_poly_scop): Call rewrite_reductions_out_of_ssa.
208 * testsuite/gcc.dg/graphite/id-11.c: New.
209 * testsuite/gcc.dg/graphite/id-15.c: New.
210 * testsuite/gcc.dg/graphite/interchange-1.c: Un-XFAIL.
211 * testsuite/gcc.dg/graphite/interchange-2.c: Un-XFAIL.
212 * testsuite/gcc.dg/graphite/interchange-3.c: Un-XFAIL.
213 * testsuite/gcc.dg/graphite/interchange-4.c: Un-XFAIL.
214 * testsuite/gcc.dg/graphite/interchange-7.c: Un-XFAIL.
215 * testsuite/gcc.dg/graphite/scop-matmult.c: Un-XFAIL.
216 * testsuite/gfortran.dg/graphite/id-13.f: New.
217 * testsuite/gfortran.dg/graphite/id-5.f: New.
219 2009-07-28 Sebastian Pop <sebastian.pop@amd.com>
221 * graphite-clast-to-gimple.c (graphite_loop_normal_form): Do not
222 check that nb_reductions_in_loop is zero.
223 * graphite-scop-detection.c (harmful_stmt_in_bb): Don't filter out
225 (nb_reductions_in_loop): Removed.
226 (graphite_can_represent_loop): Do not call nb_reductions_in_loop.
227 * graphite-sese-to-poly.c (phi_node_is_iv): Removed.
228 (bb_contains_non_iv_scalar_phi_nodes): Removed.
229 (scop_contains_non_iv_scalar_phi_nodes): Removed.
230 (build_poly_scop): Do not call scop_contains_non_iv_scalar_phi_nodes.
232 2009-07-28 Sebastian Pop <sebastian.pop@amd.com>
234 * graphite-clast-to-gimple.c (build_cloog_prog): Do not code generate
235 statements that have an empty iteration domain.
236 * testsuite/gfortran.dg/graphite/id-16.f: New.
238 2009-07-28 Sebastian Pop <sebastian.pop@amd.com>
240 * tree-scalar-evolution.c (instantiate_scev_1): Return
241 chrec_dont_know when the result is not above instantiate_below.
242 * graphite-scop-detection.c (scopdet_basic_block_info): Fix formatting.
243 * graphite-sese-to-poly.c (create_linear_expr_from_tree): Assert that
244 the tree has a known scalar evolution.
245 * testsuite/gfortran.dg/graphite/id-14.f: New.
246 * testsuite/gfortran.dg/graphite/id-15.f: New.
248 2009-07-28 Sebastian Pop <sebastian.pop@amd.com>
250 * sese.c (rename_variables_in_stmt): Pass in an extra parameter
252 (rename_variables): Keep inserting renames after the ones already
255 2009-07-28 Sebastian Pop <sebastian.pop@amd.com>
257 * graphite-sese-to-poly.c (compare_bb_depths): New.
258 (graphite_sort_dominated_info): New.
259 (build_scop_bbs_1): Call graphite_sort_dominated_info.
260 (build_scop_scattering): Fix comment.
262 2009-07-28 Sebastian Pop <sebastian.pop@amd.com>
264 * graphite.c (graphite_finalize): Call print_loops instead of
265 dump_function_to_file.
266 * testsuite/gcc.dg/graphite/graphite.exp: Fix formatting.
267 * testsuite/gcc.dg/graphite/pr35356-1.c: New. Look for the number of
268 loops generated in the graphite output file.
269 * testsuite/gcc.dg/graphite/pr35356-2.c: New.
270 * testsuite/gcc.dg/graphite/pr35356-3.c: New. XFAILed for now.
271 * testsuite/gfortran.dg/graphite/id-12.f: New.
273 2009-07-24 Li Feng <nemokingdom@gmail.com>
275 * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-8.c:
278 2009-07-24 Li Feng <nemokingdom@gmail.com>
279 Tobias Grosser <grosser@fim.uni-passau.de>
281 * graphite-sese-to-poly.c (pdr_add_alias_set): Use data reference's
282 alias set number build alias in ACCESSES polyhedron.
283 (build_alias_set_for_drs): New.
284 (build_pbb_drs): Added build_alias_set_for_drs.
285 * graphite-dependences.c (poly_drs_may_alias_p): New.
286 (graphite_carried_dependence_level_k): Check alias information
287 before building polyhedron.
289 2009-07-24 Tobias Grosser <grosser@fim.uni-passau.de>
291 * Makefile.in (lambda-code.o): Fix formatting.
293 2009-07-24 Tobias Grosser <grosser@fim.uni-passau.de>
295 * Merge from mainline (r149350-149952)
297 2009-07-18 Tobias Grosser <grosser@fim.uni-passau.de>
299 * graphite-poly.c (apply_poly_transforms): Move strip_mine
300 before interchange to prepare for loop blocking.
302 2009-07-18 Tobias Grosser <grosser@fim.uni-passau.de>
304 * graphite-poly.c (apply_poly_transforms): Add checks after every
306 * graphite-sese-to-poly.c (build_poly_scop): Remove check, as already
307 done in apply_poly_transforms.
309 2009-07-17 Konrad Trifunovic <konrad.trifunovic@gmail.com>
311 * graphite-dependences.c (build_lexicographically_gt_constraint):
312 Replace RES parameter with *RES.
313 (dependence_polyhedron_1): Pass an address of the parameter RES
314 instead of value of RES.
316 2009-07-16 Sebastian Pop <sebastian.pop@amd.com>
318 * graphite.c (graphite_finalize): Fix comment.
319 (graphite_transform_loops): Reset scev info after code generation
322 2009-07-16 Sebastian Pop <sebastian.pop@amd.com>
324 * graphite.c (graphite_finalize): Call scev_reset.
326 2009-07-16 Sebastian Pop <sebastian.pop@amd.com>
328 * graphite-clast-to-gimple.c (compute_cloog_iv_types): Do not create
329 GBB_CLOOG_IV_TYPES hash table twice.
330 * graphite-sese-to-poly.c (free_gimple_bb): Call free_data_refs.
331 (add_condition_to_domain): Clear GMP values.
333 2009-07-16 Sebastian Pop <sebastian.pop@amd.com>
335 * graphite-dependences.c: Fix formatting.
336 * graphite-poly.c (free_poly_dr): Also free PDR_DATA_CONTAINER.
337 (pbb_number_of_iterations): Free ppl_Linear_Expression.
338 * graphite-sese-to-poly.c: Fix formatting.
339 * graphite.c (graphite_transform_loops): Create the hash table
340 after the early return.
342 2009-07-16 Sebastian Pop <sebastian.pop@amd.com>
344 * testsuite/gcc.dg/graphite/id-14.c: New.
345 * testsuite/gcc.dg/graphite/pr40157.c: New.
346 * testsuite/gfortran.dg/graphite/id-11.f: New.
348 2009-07-16 Sebastian Pop <sebastian.pop@amd.com>
350 * graphite-sese-to-poly.c (nb_pbbs_in_loops): New.
351 (build_poly_scop): Return false when there are no pbbs within
352 loops to avoid to pass to cloog scops with no loops.
354 2009-07-16 Sebastian Pop <sebastian.pop@amd.com>
356 * graphite-sese-to-poly.c (build_pbb_scattering_polyhedrons): Avoid
357 useless test "i % 2".
358 (build_pbb_scattering_polyhedrons): Fix formatting.
359 (build_poly_dr): Same.
360 * graphite.c (graphite_transform_loops): Restructure.
362 2009-07-14 Razya Ladelsky <razya@il.ibm.com>
364 * tree-ssa-loop-manip.c (rewrite_phi_with_iv): Remove
365 reduction_list parameter.
366 (rewrite_all_phi_nodes_with_iv): Same.
367 (canonicalize_loop_ivs): Same.
368 * tree-parloops.c (struct brli): Removed.
369 (build_reduction_list_info): Removed.
370 (build_new_reduction): New.
371 (analyze_reduction_list): Removed.
372 (gather_scalar_reductions): Find reductions instead of phi
373 nodes that can't be canonicalized.
374 (try_create_reduction_list): Remove reduction_list parameter.
375 (gen_parallel_loop): Same.
376 (parallelize_loops): Remove analyze_reductions variable,
377 initialization and free.
378 Change reduction_list htab initialization to reduction_info
379 elements instead of ssa names.
380 Call try_create_reduction_list and gen_parallel_loop without
381 analyzed_reduction argument.
382 * graphite-clast-to-gimple (graphite_loop_normal_form): Call
383 canonicalize_loop_ivs with one less argument.
384 * tree-flow.h (canonicalize_loop_ivs): Remove one argument.
386 2009-07-14 Konrad Trifunovic <konrad.trifunovic@gmail.com>
388 * graphite-dependences.c (new_poly_dr_pair): New.
389 (dependence_polyhedron): Renamed into dependence_polyhedron_1.
390 (new_poly_dr_pair): New.
391 (eq_poly_dr_pair_p): New.
392 (hash_poly_dr_pair_p): New.
393 * graphite-dependences.h (struct poly_dr_pair): New.
394 (eq_poly_dr_pair_p): Declared.
395 (hash_poly_dr_pair_p): Declared.
396 * graphite-poly.c (new_scop): Initialize SCOP_ORIGINAL_PDR_PAIRS.
397 (free_scop): Free SCOP_ORIGINAL_PDR_PAIRS.
398 * graphite-poly.h (struct scop): Add original_pdr_pairs field.
399 * Makefile.in (graphite-poly.o): Add dependence on
400 graphite-dependences.h.
402 2009-07-14 Sebastian Pop <sebastian.pop@amd.com>
404 * graphite-scop-detection.c (graphite_can_represent_scev): Do not let
405 polynomials of degree > 1 pass to Graphite.
406 * tree-chrec.c (scev_is_linear_expression): Call
407 evolution_function_is_affine_multivariate_p.
408 * testsuite/gfortran.dg/graphite/id-10.f90: New.
410 2009-07-14 Sebastian Pop <sebastian.pop@amd.com>
412 * tree-scalar-evolution.c (compute_overall_effect_of_inner_loop):
413 Instantiate scevs varying in outer loops.
414 * testsuite/gfortran.dg/graphite/id-9.f: Correct testcase.
416 2009-07-14 Sebastian Pop <sebastian.pop@amd.com>
418 * graphite-sese-to-poly.c (build_loop_iteration_domains): Do not insert
419 redundant constraint.
421 2009-07-14 Sebastian Pop <sebastian.pop@amd.com>
423 * testsuite/gcc.dg/graphite/graphite.exp: Fix comments.
424 * testsuite/gfortran.dg/graphite/graphite.exp: Trigger actions
425 based on the file names as in the C testsuite.
426 * testsuite/gfortran.dg/graphite/block-1.f90: Fix patterns.
427 * testsuite/gfortran.dg/graphite/block-2.f: Same.
428 * testsuite/gfortran.dg/graphite/block-3.f90: Same.
429 * testsuite/gfortran.dg/graphite/block-4.f90: Same.
430 * testsuite/gfortran.dg/graphite/id-1.f90: Same.
431 * testsuite/gfortran.dg/graphite/id-2.f90: Same.
432 * testsuite/gfortran.dg/graphite/id-3.f90: Same.
433 * testsuite/gfortran.dg/graphite/id-4.f90: Same.
434 * testsuite/gfortran.dg/graphite/id-6.f: Same.
435 * testsuite/gfortran.dg/graphite/id-9.f: Same.
436 * testsuite/gfortran.dg/graphite/interchange-1.f: Same.
437 * testsuite/gfortran.dg/graphite/interchange-2.f: Same.
438 * testsuite/gfortran.dg/graphite/scop-1.f: Same.
440 2009-07-14 Sebastian Pop <sebastian.pop@amd.com>
442 * sese.c (expand_scalar_variables_call): New.
443 (expand_scalar_variables_ssa_name): Handle calls in expander.
445 2009-07-13 Sebastian Pop <sebastian.pop@amd.com>
447 * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-6.c:
448 Expect to see the pattern twice.
449 * testsuite/gcc.dg/graphite/interchange-0.c: Un-XFAIL.
450 * testsuite/gcc.dg/graphite/interchange-5.c: Same.
451 * testsuite/gcc.dg/graphite/interchange-6.c: Same.
453 2009-07-13 Sebastian Pop <sebastian.pop@amd.com>
455 * testsuite/gcc.dg/graphite/id-10.c: New.
456 * testsuite/gcc.dg/graphite/id-12.c: New.
457 * testsuite/gfortran.dg/graphite/id-7.f: New.
458 * testsuite/gfortran.dg/graphite/id-8.f: New.
460 2009-07-13 Sebastian Pop <sebastian.pop@amd.com>
462 * graphite-sese-to-poly.c (pdr_add_data_dimensions): Fix division by
465 2009-07-13 Sebastian Pop <sebastian.pop@amd.com>
467 * sese.c (rename_variables_in_stmt): Call fold_convert during renaming.
469 2009-07-13 Sebastian Pop <sebastian.pop@amd.com>
471 * sese.c (expand_scalar_variables_stmt): Avoid unnecessary expansion.
473 2009-07-10 Sebastian Pop <sebastian.pop@amd.com>
475 * graphite-sese-to-poly.c (pdr_add_memory_accesses): Fix order of
476 building PDR subscripts.
478 2009-07-10 Sebastian Pop <sebastian.pop@amd.com>
480 * graphite-sese-to-poly.c (pdr_add_data_dimensions): Fix the
481 computation of array sizes.
483 2009-07-10 Sebastian Pop <sebastian.pop@amd.com>
485 * graphite-sese-to-poly.c (add_param_constraints): Disabled.
487 2009-07-10 Tobias Grosser <grosser@fim.uni-passau.de>
489 * graphite-dependences.c (map_into_dep_poly, map_dr_into_dep_poly,
490 build_pairwise_constraint, dr_equality_constraints,
491 build_pairwise_scheduling_equality,
492 build_pairwise_scheduling_inequality, lexicographically_gt_p,
493 build_lexicographically_gt_constraint, dependence_polyhedron,
494 graphite_legal_transform_dr, graphite_carried_dependence_level_k):
495 Move from NNC_Polyhedron to C_Polyhedron.
496 * graphite-interchange.c (compute_array_size_poly,
497 gather_access_strides): Dito.
498 * graphite-poly.c (apply_poly_transforms, new_poly_dr, free_poly_bb,
499 free_scop, pbb_number_of_iterations): Dito.
500 * graphite-poly.h (struct poly_dr, pdr_nb_subscripts, struct poly_bb,
501 pbb_dim_iter_domain, struct scop): Dito.
502 * graphite-ppl.c (new_Constraint_System_from_Cloog_Matrix,
503 new_Cloog_Domain_from_ppl_Polyhedron,
504 new_Cloog_Domain_from_ppl_Pointset_Powerset, ppl_set_coef_gmp,
505 ppl_insert_dimensions_pointset, ppl_insert_dimensions_pointset,
506 ppl_strip_loop, ppl_strip_loop, ppl_print_polyhedron_matrix,
507 ppl_print_powerset_matrix, debug_ppl_polyhedron_matrix,
508 debug_ppl_powerset_matrix, ppl_read_polyhedron_matrix): Dito.
509 * graphite-ppl.h (ppl_Pointset_Powerset_C_Polyhedron_t,
510 new_C_Polyhedron_from_Cloog_Matrix, ppl_print_powerset_matrix,
511 debug_ppl_powerset_matrix, ppl_insert_dimensions_pointset): Dito.
512 * graphite-sese-to-poly.c (build_pbb_scattering_polyhedrons,
513 build_loop_iteration_domains, ppl_constraint_type_from_tree_code,
514 add_condition_to_domain, add_condition_to_pbb, build_scop_context,
515 build_scop_iteration_domain, build_poly_dr): Dito
517 2009-07-09 Sebastian Pop <sebastian.pop@amd.com>
519 * testsuite/gcc.dg/graphite/graphite.exp: Added a rule to execute
521 * testsuite/gcc.dg/graphite/run-id-1.c: New.
523 2009-07-09 Sebastian Pop <sebastian.pop@amd.com>
525 * graphite-sese-to-poly.c (build_loop_iteration_domains): Add the
526 positivity constraint on the symbolic number of iterations.
528 2009-07-09 Sebastian Pop <sebastian.pop@amd.com>
530 * graphite-sese-to-poly.c (build_loop_iteration_domains): Rewrite.
532 2009-07-09 Sebastian Pop <sebastian.pop@amd.com>
533 Tobias Grosser <grosser@fim.uni-passau.de>
535 * graphite-clast-to-gimple.c (build_scop_context): Removed.
536 (build_cloog_prog): Directly use SCOP_CONTEXT.
537 * graphite-poly.c (new_scop): Initialize SCOP_CONTEXT.
538 (free_scop): Free SCOP_CONTEXT.
539 (print_scop_context): New.
540 (print_scop): Call print_scop_context.
541 (debug_scop_context): New.
542 * graphite-poly.h (print_scop_context, debug_scop_context): Declared.
543 (struct scop): Added field context.
545 * graphite-sese-to-poly.c (add_param_constraints): New.
546 (build_scop_context): New.
547 (build_poly_scop): Call build_scop_context.
549 2009-07-09 Sebastian Pop <sebastian.pop@amd.com>
551 * graphite-clast-to-gimple.c (gmp_cst_to_tree): Moved...
552 * graphite-ppl.c (ppl_set_inhomogeneous_gmp, ppl_set_coef_gmp): New.
553 (ppl_set_inhomogeneous, ppl_set_coef): Moved...
554 * graphite-ppl.h: Include double-int.h and tree.h.
555 (ppl_set_inhomogeneous_gmp, ppl_set_coef_gmp): Declared.
556 (ppl_set_inhomogeneous, ppl_set_coef): ...here.
557 (gmp_cst_to_tree): ...here. Reimplemented using mpz_get_double_int.
558 (tree_int_to_gmp, ppl_set_inhomogeneous_tree, ppl_set_coef_tree): New.
560 2009-07-09 Sebastian Pop <sebastian.pop@amd.com>
562 * graphite-clast-to-gimple.c (clast_to_gcc_expression_red): Generate
563 POINTER_PLUS_EXPR for pointer types.
564 (clast_to_gcc_expression): Same.
566 2009-07-09 Sebastian Pop <sebastian.pop@amd.com>
568 * graphite-poly.c (print_scattering_function): Early return when
569 PBB_TRANSFORMED_SCATTERING is not initialized.
570 (print_pbb_domain): Early return when PBB_DOMAIN is not initialized.
572 2009-07-08 Sebastian Pop <sebastian.pop@amd.com>
574 * tree-parloops.c (analyze_reduction_list): Remove unused variable
577 2009-07-08 Razya Ladelsky <razya@il.ibm.com>
579 * tree-parloops.c (analyze_reduction_list): Change return
581 (try_create_reduction_list): Move the call to
582 analyze_reduction_list to the beginining.
583 Call reduction_phi with analyzed_reductions as argument
584 instead of reduction_list.
586 2009-07-08 Tobias Grosser <grosser@fim.uni-passau.de>
588 * Merge from mainline (r148296:149346)
590 2009-07-07 Sebastian Pop <sebastian.pop@amd.com>
592 * graphite-scop-detection.c (graphite_can_represent_init): New.
593 (graphite_can_represent_scev): Call graphite_can_represent_init:
594 check that the initial value does not contain multiplications of
596 (stmt_has_simple_data_refs_p): New.
597 (stmt_simple_for_scop_p): Call stmt_simple_for_scop_p.
598 (is_simple_operand): Fix formatting.
599 * graphite-sese-to-poly.c (try_generate_gimple_bb): Fix formatting.
601 2009-07-07 Sebastian Pop <sebastian.pop@amd.com>
603 * testsuite/gcc.dg/graphite/id-13.c: New.
604 * graphite-sese-to-poly.c (graphite_stmt_p): Do not call
605 analyze_scalar_evolution, use scalar_evolution_in_region.
606 (scan_tree_for_params_right_scev): Add extra assert.
607 (parameter_index_in_region_1): Split from parameter_index_in_region.
608 (idx_record_params): Use scalar_evolution_in_region.
609 (find_params_in_bb): Same.
610 (find_scop_parameters): Same.
611 (build_loop_iteration_domains): Same.
612 (create_linear_expr_from_tree): Same.
613 * sese.c (scalar_evolution_in_region): New.
614 * sese.h (scalar_evolution_in_region): Declared.
615 (defined_in_sese_p): New.
616 * tree-scalar-evolution.c (compute_overall_effect_of_inner_loop): Not
618 * tree-scalar-evolution.h (compute_overall_effect_of_inner_loop):
621 2009-07-07 Sebastian Pop <sebastian.pop@amd.com>
623 * Makefile.in: Replace dependences on tree-chrec.h with SCEV_H.
624 TREE_DATA_REF_H also implies SCEV_H.
626 2009-07-07 Sebastian Pop <sebastian.pop@amd.com>
628 * graphite-poly.c (print_scop_params): New.
629 (print_scop): Call print_scop_params.
630 (debug_scop_params): New.
631 * graphite-poly.h (print_scop_params, debug_scop_params): Declared.
633 2009-07-07 Li Feng <nemokingdom@gmail.com>
635 * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-4.c: New.
636 * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-5.c: New.
637 * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-6.c: New.
638 * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-7.c: New.
639 * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-8.c: New.
640 * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-9.c: New.
642 2009-07-07 Li Feng <nemokingdom@gmail.com>
644 * graphite-clast-to-gimple.c (mark_loops_parallel): Dump information
645 for dependency checking part.
646 * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-1.c: Add
647 tests for dependency checking.
648 * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-2.c: Ditto.
649 * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-3.c: Ditto.
650 * testsuite/gcc.dg/graphite/graphite_autopar/graphite_autopar.exp: Add
651 flag -fdump-tree-graphite-all for autopar testsuites.
653 2009-07-06 Sebastian Pop <sebastian.pop@amd.com>
655 * Makefile.in (tree-ssa-loop-manip.o): Depends on langhooks.h.
656 * tree-parloops.c (rewrite_phi_with_iv, rewrite_all_phi_nodes_with_iv,
657 canonicalize_loop_ivs): Moved...
658 * tree-ssa-loop-manip.c: ... here. Include langhooks.h.
660 2009-07-06 Sebastian Pop <sebastian.pop@amd.com>
662 * tree-parloops.c (try_create_reduction_list): Pass an extra
663 argument analyzed_reductions. Call analyze_reduction_list.
664 (gen_parallel_loop): Do not call analyze_reduction_list.
665 (parallelize_loops): Init and finalize analyzed_reductions.
667 2009-07-06 Li Feng <nemokingdom@gmail.com>
669 * testsuite/gcc.dg/graphite/graphite_autopar/graphite_autopar.exp:
670 Added flag -fno-loop-strip-mine for autopar testcase.
672 2009-07-04 Li Feng <nemokingdom@gmail.com>
674 * graphite-dependences.c (graphite_carried_dependence_level_k): Use
675 transformed scattering dimension instead of unmatch orignal when
676 calling dependence_polyhedron.
678 2009-06-30 Sebastian Pop <sebastian.pop@amd.com>
680 * opts.c (decode_options): Enable flag_loop_strip_mine at -O2.
682 2009-06-30 Sebastian Pop <sebastian.pop@amd.com>
684 * graphite-poly.c (pbb_number_of_iterations): Check for returned
685 value 1 from ppl_Pointset_Powerset_NNC_Polyhedron_maximize.
687 2009-06-30 Sebastian Pop <sebastian.pop@amd.com>
689 * graphite-blocking.c (pbb_strip_mine_profitable_p): New.
690 (pbb_do_strip_mine): Call pbb_strip_mine_profitable_p.
691 * graphite-poly.c (pbb_number_of_iterations): New.
692 * graphite-poly.h (pbb_number_of_iterations): Declared.
693 (pbb_iterator_dim, pbb_parameter_dim): New.
695 2009-06-29 Sebastian Pop <sebastian.pop@amd.com>
697 * graphite-clast-to-gimple.c (graphite_create_new_loop): Revert the
698 last commit on type of lower and upper bound of loops.
700 2009-06-29 Li Feng <nemokingdom@gmail.com>
702 * Makefile.in (graphite-clast-to-gimple.o): Added dependence on
703 graphite-dependences.h.
704 * graphite-clast-to-gimple.c (new_bb_pbb_def): New.
705 (mark_bb_with_pbb): New.
706 (get_stmtfor_depth): New.
707 (find_pbb_via_hash): New.
708 (dependency_in_loop_p): New.
709 (mark_loops_parallel): New.
710 (free_aux_in_new_loops): New.
711 (translate_clast): Add parameter BB_PBB_MAPPING. Mark newly created
712 bb with it's relevant pbb. Mark newly created loops. Remove mark
713 innermost loop parallel without checking.
714 (gloog): Add parameter BB_PBB_MAPPING.
715 * graphite-clast-to-gimple.h (struct bb_pbb_def): New.
716 (gloog): Change declaration.
717 (mark_loop_parallel): Make extern.
718 (free_aux_in_new_loops): Declare.
719 (bb_pbb_map_hash): New.
720 (eq_bb_pbb_map): New.
721 * graphite.c (graphite_transform_loops): Added BB_PBB_MAPPING. Trigger
722 auto parallelization when flag_graphite_force_parallel is set.
723 (graphite_finalize): Added free_aux_in_new_loops.
724 * tree-parloops.c (parallelize_loops): Only generate parallel code for
725 the innermost loop that marked parallel. Use
726 flag_graphite_force_parallel instead of loop->can_be_parallel.
727 (loop_parallel_p): Move inner most checking out of function.
729 2009-06-26 Sebastian Pop <sebastian.pop@amd.com>
731 * graphite-clast-to-gimple.c (graphite_create_new_loop): Make the
732 type of lower and upper bound of loops signed long int.
734 2009-06-26 Sebastian Pop <sebastian.pop@amd.com>
736 * cfgloopmanip.c (create_empty_loop_on_edge): Gimplify the loop exit
737 expression outside the loop.
739 2009-06-26 Sebastian Pop <sebastian.pop@amd.com>
741 * gcc.dg/graphite/interchange-8.c: New.
743 2009-06-26 Sebastian Pop <sebastian.pop@amd.com>
745 * gcc.dg/graphite/interchange-0.c: XFailed.
746 * gcc.dg/graphite/interchange-5.c: XFailed.
747 * gcc.dg/graphite/interchange-6.c: XFailed.
749 2009-06-26 Sebastian Pop <sebastian.pop@amd.com>
751 * graphite-interchange.c (compute_array_size_poly): The end of the
752 recursion should return 1.
754 2009-06-26 Sebastian Pop <sebastian.pop@amd.com>
756 * graphite-interchange.c (compute_array_size_cstr): Allow the
757 subscript multiplier to be -1.
758 (compute_array_size): Use PDR_DATA_CONTAINER and not PDR_ACCESSES.
759 * graphite-poly.c (new_poly_dr): Takes an extra argument for the
760 data_container. Initializes PDR_DATA_CONTAINER.
761 (print_pdr_access_layout): New.
762 (print_pdr): Call print_pdr_access_layout. Print PDR_DATA_CONTAINER.
763 * graphite-poly.h (struct poly_dr): Adjust comment. Add a new field
765 (PDR_DATA_CONTAINER): New.
766 (new_poly_dr): Update declaration.
767 * graphite-sese-to-poly.c (pdr_add_data_dimensions): New.
768 (build_poly_dr): Call pdr_add_data_dimensions.
770 2009-06-26 Sebastian Pop <sebastian.pop@amd.com>
772 * graphite-poly.h (struct poly_dr): Fix comment.
773 * graphite-sese-to-poly.c (pdr_add_alias_set): New.
774 (pdr_add_memory_accesses): New.
775 (build_poly_dr): Call pdr_add_memory_accesses and pdr_add_alias_set.
777 2009-06-26 Sebastian Pop <sebastian.pop@amd.com>
779 * graphite-poly.c (print_pdrs, debug_pdrs): New.
780 (print_pbb): Add call to print_pdrs.
781 * graphite-poly.h (print_pdrs, debug_pdrs): Declared.
783 2009-06-24 Konrad Trifunovic <konrad.trifunovic@gmail.com>
784 Li Feng <nemokingdom@gmail.com>
786 * graphite-dependences.c (graphite_carried_dependence_level_k): New.
787 (dependency_between_pbbs_p): New.
788 (lexicographically_gt_p): Assure !empty_p before polyhedron
790 (build_lexicographically_gt_constraint): Correct lexicographically
792 * graphite-dependences.h: New.
793 * Makefile.in (graphite-dependences.o): Add graphite-dependences.h.
795 2009-06-24 Sebastian Pop <sebastian.pop@amd.com>
797 * graphite-clast-to-gimple.c (print_clast_stmt): New.
798 (gloog): Print to dump_file the generated clast.
799 * graphite-clast-to-gimple.h (print_clast_stmt): Declared.
800 * graphite-interchange.c (pbb_do_interchange): Fix dump formatting.
802 2009-06-24 Sebastian Pop <sebastian.pop@amd.com>
804 * graphite-poly.c (extend_scattering): Increment
805 PBB_NB_LOCAL_VARIABLES by the number of added dimensions.
807 2009-06-24 Sebastian Pop <sebastian.pop@amd.com>
809 * graphite-interchange.c (compute_array_size_poly): Added exit of
810 recursion condition. Continue iterating even after the first equality.
811 (compute_array_size): Same.
813 2009-06-24 Li Feng <nemokingdom@gmail.com>
815 * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-1.c: Update
816 -fdump-tree-final_cleanup to -fdump-tree-optimized.
817 * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-2.c: Ditto.
818 * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-3.c: Ditto.
819 * testsuite/gcc.dg/graphite/graphite_autopar/graphite_autopar.exp: Ditto.
821 2009-06-23 Sebastian Pop <sebastian.pop@amd.com>
823 * sese.c (expand_scalar_variables_stmt): Expand scalar variables
824 only when the use verifies is_gimple_reg.
826 2009-06-23 Sebastian Pop <sebastian.pop@amd.com>
828 * graphite-clast-to-gimple.c (build_cloog_prog): Fix memory corruption.
829 Allocate scaldims after call to unify_scattering_dimensions.
831 2009-06-23 Sebastian Pop <sebastian.pop@amd.com>
833 * graphite-clast-to-gimple.c (translate_clast): Fix memory leak.
835 2009-06-23 Sebastian Pop <sebastian.pop@amd.com>
836 Albert Cohen <albert.cohen@inria.fr>
838 * graphite-blocking.c (pbb_strip_mine_loop_depth): Do not use local
839 variables for the strip mining.
841 2009-06-23 Sebastian Pop <sebastian.pop@amd.com>
842 Pranav Garg <pranav.garg2107@gmail.com>
844 * Makefile.in (OBJS-common): Added graphite-blocking.o.
845 (graphite-sese-to-poly.o): Moved down to be in lexicographical order.
846 (graphite-blocking.o): New rule.
847 (graphite-poly.o, graphite-ppl.o): Moved to be in lexicographical order.
848 * graphite-blocking.c: New.
849 * graphite-poly.c (apply_poly_transforms): Call scop_do_strip_mine for
850 flag_loop_strip_mine.
851 (psct_scattering_dim_for_loop_depth): New.
852 * graphite-poly.h (scop_do_strip_mine): Declared.
853 (psct_add_local_variable): Increment PBB_NB_LOCAL_VARIABLES.
854 * tree-ssa-loop.c (gate_graphite_transforms): Do not fail when using
855 flag_loop_strip_mine.
857 2009-06-23 Sebastian Pop <sebastian.pop@amd.com>
859 * graphite-poly.c (extend_scattering): Avoid initializing and freeing
860 a GMP value and a PPL coefficient at each iteration of a loop.
862 2009-06-23 Sebastian Pop <sebastian.pop@amd.com>
864 * graphite-dependences.c (dependence_polyhedron): Do not use
865 pbb_nb_scattering_dims anymore. Use pbb_nb_scattering_orig and
866 pbb_nb_scattering_transform.
867 (graphite_legal_transform_dr): Same.
868 * graphite-poly.c (extend_scattering): Same.
869 (unify_scattering_dimensions): Same.
870 (print_scattering_function): Same.
871 (new_poly_bb): Initialize PBB_NB_SCATTERING_TRANSFORM and
872 PBB_NB_LOCAL_VARIABLES.
873 * graphite-poly.h (pbb_nb_scattering): Removed declaration.
874 (struct poly_bb): Added nb_local_variables and nb_scattering_transform.
875 (PBB_NB_LOCAL_VARIABLES, PBB_NB_SCATTERING_TRANSFORM): New.
876 (pbb_nb_scattering_orig, pbb_nb_scattering_transform): New.
877 (pbb_nb_scattering_dims, pbb_nb_scattering): Removed.
878 (pbb_nb_scattering_transform): New.
879 (pbb_nb_local_vars): Return PBB_NB_LOCAL_VARIABLES.
880 (psco_scattering_dim): Add assert on parameters.
881 (psct_scattering_dim): Same.
882 (psct_scattering_dim_for_loop_depth): Declared.
883 (psct_local_var_dim): New.
884 (psco_iterator_dim, psco_parameter_dim): Add assert on parameters.
885 (psct_iterator_dim, psct_parameter_dim): Same. To maintain the
886 correct layout, call pbb_nb_local_vars.
887 (psct_add_local_variable, psct_add_scattering_dimension): New.
888 * graphite-sese-to-poly.c (build_pbb_scattering_polyhedrons):
889 Initialize PBB_NB_SCATTERING_TRANSFORM.
891 2009-06-23 Sebastian Pop <sebastian.pop@amd.com>
893 * graphite-ppl.c (set_inhomogeneous): Renamed ppl_set_inhomogeneous.
894 (set_coef): Renamed ppl_set_coef.
895 * graphite-ppl.h (ppl_set_inhomogeneous, ppl_set_coef): Declared.
897 2009-06-23 Sebastian Pop <sebastian.pop@amd.com>
899 * graphite-dependences.c (build_pairwise_scheduling_inequality): Don't
900 test a boolean against 1.
901 * graphite-interchange.c (pbb_interchange_loop_depths): Do not build
902 a new polyhedron for the PBB_TRANSFORMED_SCATTERING.
903 (pbb_do_interchange): Returns true when a transform has been performed.
904 (scop_do_interchange): Same.
905 * graphite-poly.c (apply_poly_transforms): Use the return value of
907 * graphite-poly.h (scop_do_interchange): Update declaration.
909 2009-06-23 Tobias Grosser <grosser@fim.uni-passau.de>
911 * graphite-clast-to-gimple.c (gloog): Reset loop->aux right
913 * sese.c (sese_reset_aux_in_loops): New.
914 * sese.h (sese_reset_aux_in_loops): New.
916 2009-06-19 Sebastian Pop <sebastian.pop@amd.com>
918 * graphite-sese-to-poly.c (scan_tree_for_params_int): Pass in the
919 multiplier and multiply the constant by the multiplier.
920 (scan_tree_for_params): Bound the multiplier to its MULT_EXPR.
921 (build_poly_dr): Do not use the multiplier to define the subscript.
923 2009-06-19 Sebastian Pop <sebastian.pop@amd.com>
925 * graphite-poly.c (new_poly_dr): Pass an extra argument for the
926 compiler's data reference. Initialize PDR_CDR.
927 (print_pdr): Call dump_data_reference.
928 * graphite-poly.h (struct poly_dr): Rename black_box into pbb.
929 Add compiler_dr field.
930 (PDR_BB): Renamed PDR_PBB.
932 * graphite-sese-to-poly.c (build_poly_dr): Pass to new_poly_dr
933 GCC's data reference representation.
934 * tree-data-ref.c (debug_data_references, debug_data_reference): New.
935 * tree-data-ref.h (debug_data_references, debug_data_reference): Decl.
937 2009-06-19 Sebastian Pop <sebastian.pop@amd.com>
939 * graphite-poly.c (print_scattering_function): Also print the layout.
940 * graphite-poly.h (pbb_nb_local_vars): New.
942 2009-06-19 Sebastian Pop <sebastian.pop@amd.com>
944 * graphite-poly.c (print_pbb_domain): Also print the layout names.
946 2009-06-19 Sebastian Pop <sebastian.pop@amd.com>
948 * graphite-poly.c (print_pdr, debug_pdr): New.
949 * graphite-poly.h (print_pdr, debug_pdr): Declared.
952 2009-06-18 Sebastian Pop <sebastian.pop@amd.com>
954 * gcc/testsuite/gcc.dg/graphite/interchange-{1..7}.c: New avatars of
957 2009-06-18 Sebastian Pop <sebastian.pop@amd.com>
959 * graphite-interchange.c (compute_subscript): Allow also -1 in the
960 subscript identification column.
961 (pbb_do_interchange): Print to dump_file that some loops "will be
962 interchanged". Rely on that chain of characters in the testcases.
963 * gcc.dg/graphite/interchange-0.c: New.
964 * gcc.dg/graphite/graphite.exp: Iterate over the testsuite
965 interchange-*.c files and compile them with -floop-interchange.
967 2009-06-18 Pranav Garg <pranav.garg2107@gmail.com>
969 * graphite-interchange.c (interchange_profitable_p): Renamed
970 pbb_interchange_profitable_p.
972 2009-06-18 Sebastian Pop <sebastian.pop@amd.com>
973 Harsha Jagasia <harsha.jagasia@amd.com>
974 Pranav Garg <pranav.garg2107@gmail.com>
976 * graphite-interchange.c (interchange_profitable_p): Make static.
977 (pbb_interchange_loop_depths, pbb_do_interchange,
978 scop_do_interchange): New.
979 * graphite-poly.c (apply_poly_transforms): Call scop_do_interchange
980 for flag_loop_interchange.
981 * graphite-poly.h (scop_do_interchange): Declared.
982 * tree-ssa-loop.c (gate_graphite_transforms): Do not fail when
983 flag_loop_interchange is used.
985 2009-06-18 Sebastian Pop <sebastian.pop@amd.com>
987 * graphite-dependences.c (dependence_polyhedron): Update use of
988 pbb_nb_scattering_dims.
989 * graphite-poly.h (pbb_nb_scattering_dims): Do not pass SCOP.
990 (pbb_nb_scattering): Update use of pbb_nb_scattering_dims.
991 (psco_scattering_dim, psct_scattering_dim, psco_iterator_dim,
992 psct_iterator_dim, psco_parameter_dim, psct_parameter_dim): New.
994 2009-06-16 Sebastian Pop <sebastian.pop@amd.com>
996 * graphite.c: Cleanup foo.
998 2009-06-16 Sebastian Pop <sebastian.pop@amd.com>
1000 * Merge from mainline (r143684:148293).
1001 * Disabled libpcp until it gets fixed.
1003 2009-06-05 Sebastian Pop <sebastian.pop@amd.com>
1004 Harsha Jagasia <harsha.jagasia@amd.com>
1006 * graphite-interchange.c: New.
1007 * Makefile.in (graphite-interchange.o): New.
1008 * graphite-poly.h (interchange_profitable_p): Declared.
1009 * graphite-ppl.h (value_max): New.
1011 2009-06-04 Sebastian Pop <sebastian.pop@amd.com>
1013 * graphite-dependences.c (dependence_polyhedron): Use pdr_dim.
1014 * graphite-poly.h: Fix some comments.
1018 2009-06-04 Sebastian Pop <sebastian.pop@amd.com>
1021 (pdr_accessp_nb_subscripts): Renamed pdr_nb_subscripts.
1022 (pdr_accessp_nb_iterators): Renamed pdr_dim_iter_domain.
1023 (pdr_accessp_nb_params): Renamed pdr_nb_params.
1024 (pdr_accessp_alias_set_dim): Renamed pdr_alias_set_dim.
1025 (pdr_accessp_subscript_dim): Renamed pdr_subscript_dim.
1026 (pdr_accessp_iterator_dim): Renamed pdr_iterator_dim.
1027 (pdr_accessp_param_dim): Renamed pdr_parameter_dim.
1028 (pbb_nb_loops): Renamed pbb_dim_iter_domain.
1029 * graphite-clast-to-gimple.c: Same.
1030 * graphite-dependences.c: Same.
1031 * graphite-poly.c: Same.
1032 * graphite-sese-to-poly.c: Same.
1034 2009-06-03 Sebastian Pop <sebastian.pop@amd.com>
1036 * graphite-clast-to-gimple.c (build_iv_mapping): Insert full
1037 expressions for an IV rename, as returned by clast_to_gcc_expression.
1038 (copy_renames): Rename new_name to expr.
1039 * sese.c (debug_rename_elt): Same.
1042 (sese_adjust_liveout_phis): Call force_gimple_operand before using
1043 the information from the rename map.
1044 (rename_variables_in_stmt): Same.
1045 (add_loop_exit_phis): Rename new_name to expr.
1046 (insert_loop_close_phis): Same.
1047 (add_guard_exit_phis): Same. Call force_gimple_operand.
1048 * sese.h (struct rename_map_elt): Rename new_name to expr.
1049 (new_rename_map_elt): Same.
1051 2009-06-03 Sebastian Pop <sebastian.pop@amd.com>
1053 * graphite-clast-to-gimple.c (build_iv_mapping): Use set_rename.
1054 * sese.c (set_rename): Make it extern.
1055 * sese.h (set_rename): Declared.
1057 2009-06-03 Sebastian Pop <sebastian.pop@amd.com>
1059 * graphite-poly.c (extend_scattering): Free values.
1060 * graphite-ppl.c (new_Cloog_Domain_from_ppl_Pointset_Powerset):
1062 (ppl_print_powerset_matrix): Same.
1063 * graphite-scop-detection.c (free_scops_1): New.
1064 (limit_scops): Call free_scops_1.
1065 * graphite-sese-to-poly.c (build_scop_bbs_1): Free dom.
1066 (build_poly_dr): Free PPL coefficients.
1067 * tree-parloops.c (rewrite_all_phi_nodes_with_iv): Free bbs.
1069 2009-06-02 Sebastian Pop <sebastian.pop@amd.com>
1071 * graphite-dependences.c: New.
1072 * graphite-data-ref.c: Removed.
1073 * graphite-data-ref.h: Removed.
1074 * Makefile.in (graphite-data-ref.o): Removed.
1075 (graphite-dependences.o): Added.
1076 * graphite-clast-to-gimple.c: Remove dependence on graphite-data-ref.h.
1077 * graphite-poly.c: Same.
1078 Move the data dependence testing to graphite-dependences.c.
1080 2009-05-19 Tobias Grosser <grosser@fim.uni-passau.de>
1082 * graphite-scop-detection.c (graphite_can_represent_loop): Renamed
1083 from graphite_cannot_represent_loop. Code refactored.
1084 (scopdet_basic_block_info): Call graphite_can_represent_loop.
1086 2009-05-17 Li Feng <nemokingdom@gmail.com>
1088 * testsuite/gcc.dg/graphite/graphite_autopar/graphite_autopar.exp:
1089 Cover all the testcases (not only the filtered ones).
1091 2009-05-17 Tobias Grosser <grosser@fim.uni-passau.de>
1093 * graphite-scop-detection.c (stmt_simple_for_scop_p): Remove
1094 unnecessary check. Update comments. Move check for REAL_TYPE here.
1095 (harmful_stmt_in_bb): Remove checks for conditions. This is already
1096 done in (stmt_simple_for_scop_p).
1098 2009-05-14 Tobias Grosser <grosser@fim.uni-passau.de>
1100 * graphite.c (print_global_statistics): New.
1101 (print_graphite_scop_statistic): New.
1102 (print_graphite_statistics): New.
1103 (graphite_initialize, graphite_transform_loops): Print statistics.
1104 * graphite-scop-detection (build_scops): Print statistics.
1105 (print_graphite_scop_statistics): New.
1106 (print_graphite_statistics): New.
1108 2009-05-13 Sebastian Pop <sebastian.pop@amd.com>
1110 * graphite-clast-to-gimple.c (struct clast_name_index): Removed.
1111 (debug_clast_name_index): Removed.
1112 (debug_clast_name_indexes_1): Removed.
1113 (debug_clast_name_indexes): Removed.
1114 (clast_name_index_elt_info): Removed.
1115 (eq_clast_name_indexes): Removed.
1116 (clast_name_to_index): Removed.
1117 (new_clast_name_index): Removed.
1118 (save_clast_name_index): Removed.
1119 (save_var_name): Moved...
1120 (init_sese_params_index): Removed.
1121 (clast_name_to_gcc): Remove use of name_tree.
1122 (initialize_cloog_names): Same.
1123 (gloog): Do not call init_sese_params_index.
1124 * graphite-sese-to-poly.c (save_var_name): ...here.
1125 (parameter_index_in_region): New.
1126 * sese.c (new_sese): Initialize SESE_PARAMS_NAMES.
1127 (parameter_index_in_region): Removed.
1128 (is_parameter): Remove use of name_tree.
1129 * sese.h (struct name_tree): Removed.
1130 (struct sese): Remove use of name_tree. New field params_names.
1131 (SESE_PARAMS_NAMES): New.
1132 (SESE_PARAMS): Remove duplicate.
1133 (parameter_index_in_region): Removed.
1134 (sese_nb_params): Remove use of name_tree.
1135 (struct clast_name_index): New.
1136 (new_clast_name_index): New.
1137 (clast_name_to_index): New.
1138 (save_clast_name_index): New.
1139 (debug_clast_name_index): New.
1140 (debug_clast_name_indexes_1): New.
1141 (debug_clast_name_indexes): New.
1142 (clast_name_index_elt_info): New.
1143 (eq_clast_name_indexes): New.
1145 2009-05-13 Sebastian Pop <sebastian.pop@amd.com>
1147 * graphite-clast-to-gimple.c (compute_cloog_iv_types_1): Call
1148 pbb_to_depth_to_oldiv. Remove call to oldiv_for_loop.
1149 (graphite_loop_normal_form): Do not pass region. Do not
1150 initialize SESE_OLDIVS.
1151 (build_graphite_loop_normal_form): Update call to
1152 graphite_loop_normal_form.
1153 * sese.c (debug_oldivs): Removed.
1154 (new_sese): Do not initialize SESE_OLDIVS.
1155 (free_sese): Do not free SESE_OLDIVS.
1156 (oldiv_for_loop): Removed.
1157 * sese.h (struct sese): Remove old_ivs.
1158 (SESE_OLDIVS): Removed.
1159 (oldiv_for_loop): Removed.
1161 2009-05-13 Sebastian Pop <sebastian.pop@amd.com>
1163 * graphite-clast-to-gimple.c (clast_name_to_gcc): Pass newivs,
1164 remove ivstack. Remove call to loop_iv_stack_get_iv_from_name,
1165 replaced by a call to newivs_to_depth_to_newiv.
1166 (clast_to_gcc_expression): Pass newivs, remove ivstack.
1167 (clast_to_gcc_expression_red): Same.
1168 (gcc_type_for_clast_expr): Same.
1169 (gcc_type_for_clast_eq): Same.
1170 (graphite_translate_clast_equation): Same.
1171 (graphite_create_guard_cond_expr): Same.
1172 (graphite_create_new_guard): Same.
1173 (graphite_create_new_loop): Same.
1174 (build_iv_mapping): Same.
1175 (translate_clast): Same.
1177 (loop_iv_stack_patch_for_consts): Removed. *
1178 sese.c (iv_stack_entry_is_constant): Removed.
1179 (iv_stack_entry_is_iv): Removed.
1180 (loop_iv_stack_push_iv): Removed.
1181 (loop_iv_stack_insert_constant): Removed.
1182 (loop_iv_stack_pop): Removed.
1183 (loop_iv_stack_get_iv): Removed.
1184 (loop_iv_stack_get_iv_from_name): Removed.
1185 (debug_loop_iv_stack): Removed.
1186 (free_loop_iv_stack): Removed.
1187 (loop_iv_stack_remove_constants): Removed. *
1188 sese.h (iv_stack_entry_kind): Removed.
1189 (iv_stack_entry_data_union): Removed.
1190 (iv_stack_entry_struct): Removed.
1191 (iv_stack_entry_p): Removed.
1192 (debug_oldivs, debug_loop_iv_stack, loop_iv_stack_insert_constant,
1193 loop_iv_stack_get_iv_from_name, loop_iv_stack_push_iv,
1194 loop_iv_stack_get_iv, loop_iv_stack_remove_constants,
1195 loop_iv_stack_pop, free_loop_iv_stack): Removed.
1196 (gbb_loop_at_index): Fix indenting.
1197 (gbb_loop_index): Removed.
1199 2009-05-13 Sebastian Pop <sebastian.pop@amd.com>
1201 * graphite-clast-to-gimple.c (clast_name_to_gcc): Do not use strcmp.
1202 Call clast_name_to_index.
1204 2009-05-13 Sebastian Pop <sebastian.pop@amd.com>
1206 * graphite-clast-to-gimple.c (clast_name_to_gcc): Pass region,
1207 do not pass params. Get params from SESE_PARAMS.
1208 (clast_to_gcc_expression): Same.
1209 (clast_to_gcc_expression_red): Same.
1210 (gcc_type_for_clast_eq): Same.
1211 (graphite_translate_clast_equation): Same.
1212 (graphite_create_new_loop): Same.
1213 * sese.c (rename_variables_in_stmt): Fix comment.
1215 2009-05-13 Sebastian Pop <sebastian.pop@amd.com>
1217 * graphite-clast-to-gimple.c (graphite_create_new_loop): Pass
1219 Call save_clast_name_index.
1220 (translate_clast): Pass newivs_index.
1221 (gloog): Create and free newivs_index.
1223 2009-05-13 Sebastian Pop <sebastian.pop@amd.com>
1225 * graphite-clast-to-gimple.c (clast_name_index): New structure.
1226 (clast_name_index_p): New type.
1227 (debug_clast_name_index): New.
1228 (debug_clast_name_indexes_1): New.
1229 (debug_clast_name_indexes): New.
1230 (clast_name_index_elt_info): New.
1231 (eq_clast_name_indexes): New.
1232 (clast_name_to_index): New.
1233 (new_clast_name_index): New.
1234 (save_clast_name_index): New.
1235 (init_sese_params_index): New.
1236 (gloog): Call init_sese_params_index.
1237 * graphite-clast-to-gimple.h (debug_clast_name_indexes): Declared.
1238 * sese.c (new_sese): Initialize SESE_PARAMS_INDEX.
1239 (free_sese): Free SESE_PARAMS_INDEX.
1240 * sese.h (struct sese): Add params_index.
1241 (SESE_PARAMS_INDEX): New.
1243 2009-05-13 Sebastian Pop <sebastian.pop@amd.com>
1245 * graphite-clast-to-gimple.c (newivs_to_depth_to_newiv): New.
1246 (graphite_create_new_loop): Pass the newivs vector. Push the
1247 newly created IV to newivs.
1248 (translate_clast): Pass the newivs vector.
1249 (gloog): Create and destroy the newivs vector.
1251 2009-05-13 Sebastian Pop <sebastian.pop@amd.com>
1253 * graphite-clast-to-gimple.c (pbb_to_depth_to_oldiv): New.
1254 (graphite_loop_normal_form): Initialize loop->aux with the unique
1255 IV that has been created.
1257 2009-05-13 Tobias Grosser <grosser@fim.uni-passau.de>
1259 * tree-chrec.c (evolution_function_right_is_integer_cst): Allow
1260 scev with parameters in the base part. They where forbidden
1263 2009-05-11 Li Feng <nemokingdom@gmail.com>
1265 * testsuite/gcc.dg/graphite/graphite.exp: Set different default
1266 compile options by file names.
1267 * testsuite/gcc.dg/graphite/block{0-6}.c: Remove dg-option line.
1268 * testsuite/gcc.dg/graphite/id-{1-9}.c: Ditto.
1269 * testsuite/gcc.dg/graphite/scop-{0-20}.c: Ditto.
1270 * testsuite/gcc.dg/graphite/scop-matmult.c: Ditto.
1272 2009-05-08 Li Feng <nemokingdom@gmail.com>
1274 * testsuite/gcc.dg/graphite/graphite_autopar/graphite_autopar.exp: New.
1275 * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-1.c: New.
1276 * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-2.c: New.
1277 * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-3.c: New.
1279 2009-05-07 Tobias Grosser <grosser@fim.uni-passau.de>
1281 * graphite-scop-detection (build_scops_1): Fix little bug introduced
1284 2009-05-07 Tobias Grosser <grosser@fim.uni-passau.de>
1286 * graphite-scop-detection.c (graphite_can_represent_scev): Only
1287 allow integer constant strides.
1288 (graphite_can_represent_expr): Depend on outermost_loop.
1289 (stmt_simple_memref_p, graphite_cannot_represent_loop,
1290 harmful_stmt_in_bb, is_simple_operand, stmt_simple_for_scop_p,
1291 build_scops_1): Same.
1292 (scopdet_basic_block_info): Same and insert layered SCoP
1294 (try_generate_gimple_bb): Cleanup.
1295 (build_scops): Enable data references.
1297 * testsuite/gcc.dg/graphite/id-5.c: New.
1298 * testsuite/gcc.dg/graphite/id-9.c: New.
1299 * tree-chrec.c (evolution_function_right_is_integer_cst): New.
1300 * tree-chrec.h (evolution_function_right_is_integer_cst): New.
1302 2009-05-06 Tobias Grosser <grosser@fim.uni-passau.de>
1304 * sese.c (expand_scalar_variables_ssa_name): Only build expressions,
1305 that we have not yet built for this SCoP.
1307 2009-05-06 Tobias Grosser <grosser@fim.uni-passau.de>
1309 * sese.c (expand_scalar_variables_expr): Fix expand_scalar_variables
1310 for complex numbers.
1312 2009-05-06 Tobias Grosser <grosser@fim.uni-passau.de>
1314 * graphite-ppl.c: Fix build if cloog is not available.
1316 2009-05-04 Li Feng <nemokingdom@gmail.com>
1318 * tree-parloops.c (loop_parallel_p): Remove construction of
1319 NITER and REDUCTION_LIST.
1320 (try_get_loop_niter): New.
1321 (try_create_reduction_list): New.
1322 (parallelize_loops): Bypass the failed checkings in autopar
1323 when can_be_parallel in loop structure is set to true.
1325 2009-05-01 Tobias Grosser <grosser@fim.uni-passau.de>
1327 * testsuite/gcc.dg/graphite/id-6.c: Update testcase.
1328 * testsuite/gcc.dg/graphite/scop-3.c: Dito.
1330 2009-05-01 Tobias Grosser <grosser@fim.uni-passau.de>
1332 * graphite-scop-detection.c (stmt_simple_for_scop_p):
1333 Enable EQ_EXPR and NE_EXPR again.
1335 2009-04-30 Tobias Grosser <grosser@fim.uni-passau.de>
1337 * graphite-scop-detection.c (graphite_can_represent_scev):
1338 Add check if scev is affine multivariate.
1339 (harmful_stmt_in_bb): Check if we can represent the conditions.
1340 (scopdet_basic_block_info (basic_block bb, VEC): Pass the loop to
1342 * testsuite/gcc.dg/graphite/id-7.c: New.
1344 2009-04-30 Tobias Grosser <grosser@fim.uni-passau.de>
1346 * graphite-sese-to-poly.c (bb_contains_non_iv_scalar_phi_nodes):
1347 Check all bbs in region, not only the bbs that are represented in
1349 (build_poly_scop): Add newline.
1350 * testsuite/gcc.dg/graphite/id-8.c: New.
1352 2009-04-30 Li Feng <nemokingdom@gmail.com>
1354 * cfgloop.c (alloc_loop): Initialize can_be_parallel to false
1355 when loop initialize.
1356 * cfgloop.h (struct loop): Introduce flag can_be_parallel.
1357 * common.opt: Declare flag_graphite_force_parallel.
1358 * graphite-clast-to-gimple.c (translate_clast): Mark the innermost
1360 * graphite-poly.c (apply_poly_transforms): Introduce
1361 flag_graphite_force_parallel.
1362 * tree-ssa-loop.c (gate_graphite_transforms): ditto.
1363 * toplev.c (process_options): ditto and replace a not correctly
1366 2009-04-30 Li Feng <nemokingdom@gmail.com>
1368 * graphite-clast-to-gimple.c (loop_iv_stack_patch_for_consts):
1369 Change the call of gbb_loop_at_index and/or gbb_loop_index due
1370 to the redefinition.
1371 (compute_cloog_iv_types_1): ditto.
1372 (build_iv_mapping): ditto.
1373 * graphite-sese-to-poly.c (new_gimple_bb): Remove GBB_LOOPS related
1375 (free_gimple_bb): Removed GBB_LOOPS related free part.
1376 (build_bb_loops): Removed.
1377 * sese.h (struct gimple_bb): Removed loops.
1378 (GBB_LOOPS): Removed.
1379 (gbb_loop_at_index): Instead of using GBB_LOOPS, we use sese instead.
1380 (gbb_loop_index): ditto.
1382 2009-04-24 Tobias Grosser <grosser@fim.uni-passau.de>
1384 * graphite-scop-detection.c (graphite_can_represent_scev): Do not
1385 allow non constant strides.
1386 * testsuite/gcc.dg/graphite/scop-20.c: New.
1388 2009-04-24 Sebastian Pop <sebastian.pop@amd.com>
1390 * graphite-scop-detection.c (dot_all_scops): Fix system call
1391 return value warning.
1394 2009-04-24 Sebastian Pop <sebastian.pop@amd.com>
1396 * testsuite/gcc.dg/graphite/id-6.c: Fix pattern.
1397 * testsuite/gcc.dg/graphite/scop-3.c: Same.
1399 2009-04-24 Sebastian Pop <sebastian.pop@amd.com>
1401 * graphite-poly.c (map_into_dep_poly, map_dr_into_dep_poly,
1402 build_pairwise_constraint, dr_equality_constraints,
1403 build_pairwise_scheduling_equality,
1404 build_pairwise_scheduling_inequality, lexicographically_gt_p,
1405 build_lexicographically_gt_constraint, dependence_polyhedron,
1406 graphite_legal_transform_dr, graphite_legal_transform_bb,
1407 graphite_legal_transform): New.
1408 * graphite-poly.h (graphite_legal_transform): Declared.
1409 * graphite-sese-to-poly.c (build_poly_scop): Call to
1410 graphite_legal_transform is disabled for the moment.
1412 2009-04-24 Sebastian Pop <sebastian.pop@amd.com>
1414 * graphite-poly.h (pbb_nb_scattering_dims): New.
1415 (pbb_nb_scattering): Use it.
1417 2009-04-24 Sebastian Pop <sebastian.pop@amd.com>
1419 * graphite-ppl.c (ppl_insert_dimensions_pointset): Add
1420 Pointset_Powerset version of ppl_insert_dimensions.
1421 * graphite-ppl.h (ppl_insert_dimensions_pointset): Declared.
1423 2009-04-24 Sebastian Pop <sebastian.pop@amd.com>
1425 * graphite-ppl.c (ppl_insert_dimensions): Fix formatting.
1427 2009-04-24 Sebastian Pop <sebastian.pop@amd.com>
1429 * graphite-poly.h: Fix comment.
1431 2009-04-24 Sebastian Pop <sebastian.pop@amd.com>
1433 * graphite-sese-to-poly.c (build_poly_dr): Fix data ref multiplier.
1435 2009-04-24 Tobias Grosser <grosser@fim.uni-passau.de>
1437 * sese.c (expand_scalar_variables_stmt): Only iterate over the old
1440 2009-04-24 Tobias Grosser <grosser@fim.uni-passau.de>
1442 * graphite-sese-to-poly.c (var_used_in_not_loop_header_phi_node): New.
1443 (graphite_stmt_p): Represent bbs necessary to build the phi nodes of
1446 2009-04-20 Sebastian Pop <sebastian.pop@amd.com>
1448 * graphite-scop-detection.c (stmt_simple_for_scop_p): Do not
1449 handle EQ_EXPR and NE_EXPR.
1451 2009-04-17 Tobias Grosser <grosser@fim.uni-passau.de>
1453 * graphite-poly.h (poly_dr): Fix comment.
1455 2009-04-09 Sebastian Pop <sebastian.pop@amd.com>
1456 Tobias Grosser <grosser@fim.uni-passau.de>
1458 * graphite-poly.c (new_poly_bb): Do not initialize PBB_DOMAIN
1459 with a zero dimension polyhedron.
1460 (find_scop_parameters): Move the call to scop_set_nb_params here.
1461 (build_loop_iteration_domains): Store in loop->aux the iteration
1463 (build_scop_iteration_domain): Fix PBB_DOMAIN for bbs not surrounded
1464 by any loop in scop.
1465 (build_poly_scop): Do not call scop_set_nb_params.
1467 2009-04-09 Sebastian Pop <sebastian.pop@amd.com>
1468 Tobias Grosser <grosser@fim.uni-passau.de>
1470 * graphite-sese-to-poly.c (add_condition_to_pbb): Pass code to
1471 add_condition_to_domain not GT_EXPR.
1473 2009-04-09 Tobias Grosser <grosser@fim.uni-passau.de>
1475 * graphite-ppl.c (debug_ppl_powerset_matrix): New.
1476 * graphite-ppl.h (debug_ppl_powerset_matrix): New.
1477 * graphite-sese-to-poly.c (add_condition_to_pbb): Use
1478 upper_bound_assign to calculate unions.
1479 * testsuite/gcc.dg/graphite/id-6.c: New.
1481 2009-04-09 Tobias Grosser <grosser@fim.uni-passau.de>
1483 * graphite-scop-detection.c (canonicalize_loop_closed_ssa): Do not
1484 handle abnormal edges.
1486 2009-04-09 Tobias Grosser <grosser@fim.uni-passau.de>
1488 * graphite-poly.c (new_poly_dr, free_poly_dr): New.
1489 (free_poly_bb): Also free poly_drs.
1490 * graphite-poly.h (new_poly_dr, free_poly_dr): New.
1491 (poly_dr): Polyhedron to Pointset_Powerset.
1492 (pdr_accessp_nb_subscripts): Same.
1493 * graphite-sese-to-poly.c (build_poly_dr): Same. And actually build
1496 2009-04-08 Sebastian Pop <sebastian.pop@amd.com>
1498 * graphite-clast-to-gimple.c (initialize_cloog_names): Change cloog
1499 names into more meaningful names.
1501 2009-04-08 Sebastian Pop <sebastian.pop@amd.com>
1503 * testsuite/gfortran.dg/graphite/interchange-1.c: New.
1504 * testsuite/gfortran.dg/graphite/interchange-2.c: New.
1506 2009-04-08 Sebastian Pop <sebastian.pop@amd.com>
1508 * graphite-clast-to-gimple.c (graphite_loop_normal_form): Do not build
1510 * tree-parloops.c (rewrite_phi_with_iv): New.
1511 (rewrite_all_phi_nodes_with_iv): New.
1512 (canonicalize_loop_ivs): Call them.
1514 2009-04-08 Sebastian Pop <sebastian.pop@amd.com>
1516 * graphite-sese-to-poly.c (try_generate_gimple_bb): Use
1517 graphite_find_data_references_in_stmt.
1518 * tree-data-ref.c (graphite_find_data_references_in_stmt): New.
1519 * tree-data-ref.h (graphite_find_data_references_in_stmt): Declared.
1521 2009-04-08 Sebastian Pop <sebastian.pop@amd.com>
1523 * sese.c (add_loop_exit_phis): Don't fail on non SSA_NAME renames.
1525 2009-04-08 Sebastian Pop <sebastian.pop@amd.com>
1527 * graphite-sese-to-poly.c (build_scop_bbs_1): Use bb_in_sese_p
1528 instead of bb_in_region.
1529 (flag_bb_in_region): Same. Renamed flag_bb_in_sese.
1530 (build_sese_conditions): Use flag_bb_in_sese.
1531 * sese.c (register_bb_in_sese): Removed.
1532 (new_sese): Remove initialization of SESE_REGION_BBS.
1533 (free_sese): Do not free SESE_REGION_BBS.
1534 * sese.h (struct sese): Remove field region_basic_blocks.
1535 (SESE_REGION_BBS): Removed.
1536 (bb_in_sese_p): Implement in function of bb_in_region.
1538 2009-04-08 Sebastian Pop <sebastian.pop@amd.com>
1540 * graphite-scop-detection.c (limit_scops): Deal only with single exit
1543 2009-04-08 Tobias Grosser <grosser@fim.uni-passau.de>
1545 * graphite-scop-detection.c (stmt_simple_for_scop_p): Allow NE_EXPR
1547 * graphite-sese-to-poly.c (create_linear_expr_from_tree): New.
1548 (add_condition_to_domain): New.
1549 (add_condition_to_pbb): New.
1550 (add_conditions_to_domain): Cleanup and handle of NE_EXPR and EQ_EXPR.
1551 * testsuite/gcc.dg/graphite/scop-3.c: Update number of detected SCoPs.
1553 2009-04-08 Tobias Grosser <grosser@fim.uni-passau.de>
1555 * graphite-clast-to-gimple.c (build_cloog_prog): ppl_Polyhedron ->
1556 ppl_Pointset_Powerset.
1557 * graphite-poly.c (new_poly_bb, free_poly_bb): Same.
1558 * graphite-poly.h (poly_bb): poly_bb.domain Same.
1559 (pbb_nb_loops): Same.
1560 * graphite-sese-to-poly.c (build_loop_iteration_domains,
1561 add_conditions_to_domain): Same.
1562 * graphite-ppl.c (new_Cloog_Domain_from_ppl_Pointset_Powerset): New.
1563 (ppl_print_polyhedron_matrix): ppl_Polyhedron_t ->
1564 ppl_const_Polyhedron_t.
1565 (ppl_print_powerset_matrix): New.
1566 * graphite-ppl.h (new_Cloog_Domain_from_ppl_Pointset_Powerset,
1567 ppl_print_powerset_matrix): New.
1568 (ppl_print_polyhedron_matrix): Updated.
1570 2009-04-07 Sebastian Pop <sebastian.pop@amd.com>
1572 * tree-scalar-evolution.c (analyze_scalar_evolution_1): Fix comment.
1574 2009-04-07 Sebastian Pop <sebastian.pop@amd.com>
1576 * graphite-poly.c (extend_scattering): Fix indenting. Free cstr.
1577 (print_iteration_domains, debug_iteration_domain,
1578 debug_iteration_domains): New.
1579 * graphite-poly.h (print_iteration_domains, debug_iteration_domain,
1580 debug_iteration_domains): Declared.
1581 * graphite-sese-to-poly.c (build_pbb_scattering_polyhedrons): Fix
1584 2009-04-03 Tobias Grosser <grosser@fim.uni-passau.de>
1585 Sebastian Pop <sebastian.pop@amd.com>
1587 * graphite-poly.h (print_iteration_domain): New.
1588 * graphite-sese-to-poly.c (add_conditions_to_domain): Fixed bug.
1589 (build_sese_conditions_1, build_sese_conditions_after,
1590 build_sese_conditions_before): New.
1591 (build_sese_conditions): Rewritten.
1593 2009-04-03 Sebastian Pop <sebastian.pop@amd.com>
1594 Tobias Grosser <grosser@fim.uni-passau.de>
1596 Cleanup of code generation liveouts.
1597 * graphite-clast-to-gimple.c (translate_clast): Use a single
1598 rename_map instead of one per translated statement.
1599 Do not use SESE_LIVEOUT_RENAMES.
1600 (graphite_loop_normal_form): Do not use SESE_REDUCTION_LIST.
1601 (gloog): Do not use SESE_LIVEOUT_RENAMES.
1602 * graphite-scop-detection.c (harmful_stmt_in_bb): Return the close
1603 phi node of a reduction: when a loop contains a reduction used outside
1604 the loop, there should be a scalar close phi node on the exit block.
1605 * sese.c (new_sese): Do not initialize SESE_LIVEOUT,
1606 SESE_LIVEOUT_RENAMES, and SESE_REDUCTION_LIST.
1607 (free_sese): Do not free them.
1608 (sese_build_liveouts_use): Do not use them.
1609 (sese_build_liveouts_bb): Same.
1610 (sese_build_liveouts): Same.
1611 (sese_insert_phis_for_liveouts): Same.
1612 (sese_adjust_phis_for_liveouts): Same. Renamed sese_adjust_liveout_phis.
1613 (defined_in_loop_p): New.
1614 (alive_after_loop): New.
1615 (close_phi_not_yet_inserted_p): New.
1616 (struct alep, alep_p): New.
1617 (add_loop_exit_phis): Remove from the rename_map all the names defined
1618 in the code generated loop.
1619 (insert_loop_close_phis): Traverse the rename_map passed to it.
1620 Don't use SESE_LIVEOUT_RENAMES.
1621 (default_liveout_before_guard): Renamed default_before_guard.
1622 (insert_guard_phis): Do not use SESE_LIVEOUT_RENAMES.
1623 (graphite_copy_stmts_from_block): Do not directly call set_rename.
1624 (register_sese_liveout_renames): Removed.
1625 (copy_bb_and_scalar_dependences): Do not call it.
1626 * sese.h (struct sese): Removed fields: liveout, liveout_renames, and
1628 (SESE_LIVEOUT): Removed.
1629 (SESE_LIVEOUT_RENAMES): Removed.
1630 (SESE_REDUCTION_LIST): Removed.
1631 (sese_build_liveouts): Removed.
1632 (sese_adjust_phis_for_liveouts): Renamed sese_adjust_liveout_phis.
1633 (insert_loop_close_phis): Pass a htab_t instead of a sese.
1634 (insert_guard_phis): Same.
1635 (rename_map_elt): Declare a VEC of them.
1636 * tree-parloops.c (canonicalize_loop_ivs): reduction_list contains
1637 trees not pointers to trees.
1639 Rewrite in canonical close SSA form:
1640 * graphite-scop-detection.c (contains_only_close_phi_nodes): New.
1641 (limit_scops): Close the scop after the block containing the close phi
1643 (canonicalize_loop_closed_ssa): New.
1644 (canonicalize_loop_closed_ssa_form): New.
1645 (build_scops): Call canonicalize_loop_closed_ssa_form.
1647 * graphite-sese-to-poly.c: Fix typos.
1649 2009-04-03 Sebastian Pop <sebastian.pop@amd.com>
1651 * graphite-poly.c (print_scattering_function, print_pbb_domain):
1653 (dump_gbb_conditions, dump_gbb_cases, print_iteration_domain): New.
1654 (print_pbb): Add conditions.
1656 2009-04-01 Tobias Grosser <grosser@fim.uni-passau.de>
1657 Sebastian Pop <sebastian.pop@amd.com>
1659 * graphite-scop-detection.c (bb_in_sd_region): Use bb_in_region.
1660 * graphite-sese-to-poly.c (all_non_dominated_preds_marked_p): New.
1661 (build_scop_bbs_1): New.
1662 (build_scop_bbs): Rewrite.
1663 * sese.h (bb_in_region): New.
1665 2009-03-29 Tobias Grosser <grosser@fim.uni-passau.de>
1667 * graphite-poly.c (new_poly_bb, free_poly_bb): Initialize/free
1669 (print_scop): Style.
1670 * graphite-poly.h (poly_bb): Add drs vector.
1671 (PBB_DRS): Add accessor.
1672 * graphite-sese-to-poly.c (build_poly_dr): New.
1673 (build_pbb_drs, build_scop_drs): New.
1674 (build_poly_scop): call build_scop_drs (Disabled at the moment).
1676 2009-03-29 Tobias Grosser <grosser@fim.uni-passau.de>
1678 * tree-ssa-loop.c: Include forgotten toplev.h
1680 2009-03-29 Tobias Grosser <grosser@fim.uni-passau.de>
1682 * graphite-poly.c: (apply_poly_transforms): sorry -> gcc_unreachable.
1683 * testsuite/gcc.dg/graphite/pr37883.c: Remove -floop-*
1684 * testsuite/gcc.dg/graphite/pr37928.c: Same
1685 * testsuite/gcc.dg/graphite/pr38409.c: Same
1686 * testsuite/gcc.dg/graphite/pr38498.c: Same
1687 * testsuite/gcc.dg/graphite/pr38559.c: Same
1688 * testsuite/gcc.dg/graphite/pr39335.c: Same
1689 * testsuite/gcc.dg/graphite/pr39335_1.c: Same
1690 * testsuite/gfortran.dg/graphite/block-2.f: Same
1691 * tree-ssa-loop.c (gate_graphite_transforms): Always fail if called
1694 2009-03-28 Tobias Grosser <grosser@fim.uni-passau.de>
1696 * graphite-sese-to-poly.c (ref_nb_loops, build_access_matrix_with_af,
1697 build_access_matrix, build_scop_data_accesses): Remove access function
1698 building. (We get a new version soon).
1699 (build_bb_loops, scan_tree_for_params_right_scev): Update.
1700 * sese.h (nb_loops_around_loop_in_sese): Remove.
1701 (sese_loop_depth): Do not use SESE_LOOP_NEST any more.
1703 2009-03-27 Tobias Grosser <grosser@fim.uni-passau.de>
1704 Sebastian Pop <sebastian.pop@amd.com>
1706 * graphite-scop-detection.c (struct scopdet_info): Rename last
1708 (scopdet_basic_block_info, build_scops_1): Don't use
1709 CDI_POST_DOMINATORS. CDI_POST_DOMINATORS should never be used.
1711 2009-03-26 Tobias Grosser <grosser@fim.uni-passau.de>
1712 Sebastian Pop <sebastian.pop@amd.com>
1714 * graphite-clast-to-gimple.c (gloog): Call sese_build_liveouts.
1715 * sese.c (sese_build_liveouts_use): Renamed from
1716 sese_build_livein_liveouts_use. Remove liveins.
1717 (sese_build_liveouts_bb): Renamed from sese_build_livein_liveouts_bb.
1718 Call sese_build_liveouts_use.
1719 (sese_build_liveouts): Renamed from sese_build_livein_liveouts.
1720 Call sese_build_liveouts_bb.
1721 (new_sese, free_sese): Remove liveins.
1722 (sese_add_exit_phis_var): Deleted.
1723 (sese_insert_phis_for_liveouts): Call sese_add_exit_phis_edge
1725 (graphite_copy_stmts_from_block): Remove SESE_NUM_VER.
1727 * sese.h (sese): Remove num_ver and livein.
1728 (SESE_LIVEIN, SESE_LIVEIN_VER, SESE_NUM_VER): Removed.
1730 2009-03-25 Tobias Grosser <grosser@fim.uni-passau.de>
1732 * graphite-sese-to-poly.c (build_scop_scattering): Fix compile.
1734 2009-03-25 Tobias Grosser <grosser@fim.uni-passau.de>
1736 * graphite-sese-to-poly.c (compare_prefix_loops): Removed.
1737 (build_scop_scattering): Do not use compare_prefix_loops any more.
1738 (nb_common_loops): New.
1740 2009-03-24 Sebastian Pop <sebastian.pop@amd.com>
1742 * sese.c (get_new_name_from_old_name): Renamed get_rename.
1743 (register_old_and_new_names): Renamed set_rename.
1745 2009-03-24 Sebastian Pop <sebastian.pop@amd.com>
1747 * graphite-scop-detection.h (nb_reductions_in_loop): Revert removal
1748 of the decl from the previous commit.
1750 2009-03-24 Sebastian Pop <sebastian.pop@amd.com>
1752 * graphite-scop-detection.c (dot_scop): New.
1753 * graphite-scop-detection.h (dot_scop): Declared.
1755 2009-03-24 Sebastian Pop <sebastian.pop@amd.com>
1757 * graphite-sese-to-poly.c (compare_prefix_loops): Fix compare.
1759 2009-03-24 Sebastian Pop <sebastian.pop@amd.com>
1761 * cfgloopmanip.c (create_empty_loop_on_edge): Generate the loop exit
1762 condition at the end of the loop.
1763 * graphite.c (graphite_initialize, graphite_finalize): Print to
1764 dump_file the compiled function.
1765 * graphite-clast-to-gimple.c (graphite_create_new_loop): Update use
1766 of create_empty_loop_on_edge.
1767 (translate_clast): Update the code generation of loops for the new
1769 * cfgloop.h (create_empty_loop_on_edge): Update declaration.
1771 2009-03-24 Sebastian Pop <sebastian.pop@amd.com>
1773 Reverted the patch from 2009-03-19.
1775 2009-03-19 Tobias Grosser <grosser@fim.uni-passau.de>
1777 * graphite-poly.c (new_poly_bb, free_poly_bb): Initialize/free
1779 (print_scop): Style.
1780 * graphite-poly.h (poly_bb): Add drs vector.
1781 (PBB_DRS): Add accessor.
1782 * graphite-sese-to-poly.c (ref_nb_loops): Remove.
1783 (build_access_matrix_with_af, build_access_matrix,
1784 build_scop_data_accesses): Delete.
1785 (build_poly_dr): New.
1786 (build_pbb_drs, build_scop_drs): New.
1787 (build_poly_scop): call build_scop_drs.
1789 2009-03-13 Sebastian Pop <sebastian.pop@amd.com>
1791 * graphite-scop-detection.c (dot_all_scops_1): Close the table
1792 once per basic block.
1794 2009-03-13 Tobias Grosser <grosser@fim.uni-passau.de>
1796 * graphite-scop-detection.c (graphite_can_represent_scev): New.
1797 (graphite_can_represent_expr): Renamed from loop_affine_expr
1799 (stmt_simple_for_scop_p): Call graphite_can_represent_expr.
1800 (graphite_cannot_represent_loop): Add scop_entry to parameters.
1801 (scopdet_basic_block_info): Actually define entry_block.
1802 (stmt_simple_memref_p): Moved here from ...
1804 * tree-data-ref.c (stmt_simple_memref_p): here.
1805 * tree-data-ref.h (stmt_simple_memref_p): Removed.
1807 2009-03-13 Tobias Grosser <grosser@fim.uni-passau.de>
1809 * testsuite/gcc.dg/graphite/id-4.c: New.
1811 2009-03-12 Sebastian Pop <sebastian.pop@amd.com>
1813 * sese.c (expand_scalar_variables_expr): Handle tcc_comparison.
1814 (register_old_and_new_names): Update the content of the map.
1815 When there was already a rename_map_elt in the map at that
1817 (copy_bb_and_scalar_dependences): Do rename_variables after
1818 expand_scalar_variables.
1819 * graphite-clast-to-gimple.c (build_iv_mapping): Update the content
1820 of the map. When there was already a rename_map_elt in the
1821 map at that location, free it.
1822 (translate_clast): Pass the rename_map. Do not initialize and free
1823 a rename_map per stmt_user.
1824 (gloog): Initialize and free one rename_map and pass it to
1827 2009-03-12 Sebastian Pop <sebastian.pop@amd.com>
1829 * sese.c (expand_scalar_variables_stmt,
1830 expand_scalar_variables_ssa_name): Add a gimple_stmt_iterator
1832 (expand_scalar_variables_expr): Handle REALPART_EXPR and IMAGPART_EXPR.
1833 (expand_scalar_variables): Pass to expand_scalar_variables_stmt
1834 the gimple_stmt_iterator of the statement to be expanded.
1835 * graphite-scop-detection.c (is_simple_operand): Do handle
1838 2009-03-11 Tobias Grosser <grosser@fim.uni-passau.de>
1840 * graphite-scop-detection.c (is_simple_operand): Do not handle
1842 * testsuite/gcc.dg/graphite/id-2.c: New.
1844 * graphite-sese-to-poly.c (build_bb_loops,
1845 add_value_to_dim, scan_tree_for_params_right_scev,
1846 scan_tree_for_params_int, scan_tree_for_params, idx_record_params,
1847 find_params_in_bb, build_loop_iteration_domains,
1848 add_conditions_to_domain): Remove subtract.
1850 2009-03-11 Tobias Grosser <grosser@fim.uni-passau.de>
1852 * graphite-clast-to-gimple.c (loop_iv_stack_patch_for_consts,
1853 build_iv_mapping, compute_cloog_iv_types_1, build_cloog_prog):
1854 pbb_loop_at_index -> gbb_loop_at_index.
1855 * graphite-poly.c (new_poly_bb, new_scop): New accessors.
1856 (debug_loop_vec): Delete.
1857 * graphite-poly.h (poly_bb, scop): Change black_box and region to void
1858 pointer. Move LOOPS to gimple_bb_p and insert nb_params.
1859 (PBB_LOOPS): Removed.
1860 (PBB_BLACK_BOX): Insert cast.
1861 (pbb_set_black_box): New setter.
1862 (pbb_loop_at_index, pbb_loop_index): Removed.
1863 (scop_set_region, scop_set_nb_params): New.
1864 * graphite-sese-to-poly.c (new_gimple_bb, free_gimple_bb,
1865 build_scop_scattering, build_bb_loops): Add GBB_LOOPS.
1866 (build_poly_scop): Use scop_set_nb_params.
1867 * sese.h (gimple_bb): Add LOOPS.
1868 (GBB_LOOPS, gbb_loop_index, gbb_loop_at_index): New.
1870 2009-03-11 Tobias Grosser <grosser@fim.uni-passau.de>
1872 Revert previous commit.
1874 2009-03-11 Sebastian Pop <sebastian.pop@amd.com>
1876 * sese.c (expand_scalar_variables_expr): Handle tcc_comparison.
1877 (register_old_and_new_names): Update the content of the map.
1878 When there was already a rename_map_elt in the map at that
1880 (copy_bb_and_scalar_dependences): Do rename_variables after
1881 expand_scalar_variables.
1882 * graphite-clast-to-gimple.c (build_iv_mapping): Update the content
1883 of the map. When there was already a rename_map_elt in the
1884 map at that location, free it.
1885 (translate_clast): Pass the rename_map. Do not initialize and free
1886 a rename_map per stmt_user.
1887 (gloog): Initialize and free one rename_map and pass it to
1890 2009-03-11 Tobias Grosser <grosser@fim.uni-passau.de>
1892 Remove forgotten line in revert.
1894 2009-03-11 Sebastian Pop <sebastian.pop@amd.com>
1896 Revert previous commit.
1898 2009-03-10 Sebastian Pop <sebastian.pop@amd.com>
1900 * sese.c (register_old_and_new_names): Update the content
1901 of the map. When there was already a rename_map_elt in the
1902 map at that location, free it.
1903 (copy_bb_and_scalar_dependences): Do rename_variables after
1904 expand_scalar_variables.
1905 * graphite-clast-to-gimple.c (build_iv_mapping): Update the content
1906 of the map. When there was already a rename_map_elt in the
1907 map at that location, free it.
1908 (translate_clast): Pass the rename_map. Do not initialize and free
1909 a rename_map per stmt_user.
1910 (gloog): Initialize and free one rename_map and pass it to
1913 2009-03-10 Sebastian Pop <sebastian.pop@amd.com>
1915 * graphite-clast-to-gimple.c (translate_clast): context_loop
1918 2009-03-10 Tobias Grosser <grosser@fim.uni-passau.de>
1919 Sebastian Pop <sebastian.pop@amd.com>
1921 * graphite-ppl.c (ppl_insert_dimensions): Fix stupid mistake
1922 of the use of ppl_Polyhedron_map_space_dimensions.
1924 2009-03-10 Tobias Grosser <grosser@fim.uni-passau.de>
1925 Sebastian Pop <sebastian.pop@amd.com>
1927 * graphite-poly.c (unify_scattering_dimensions): Fix types.
1928 * graphite-poly.h (poly_dr_p, poly_dr, POLY_DR_TYPE, PDR_BB,
1929 PDR_TYPE, PDR_ACCESSES, pdr_accessp_nb_subscripts,
1930 pdr_accessp_nb_iterators, pdr_accessp_nb_params,
1931 pdr_accessp_alias_set_dim, pdr_accessp_subscript_dim,
1932 pdr_accessp_iterator_dim, pdr_accessp_param_dim,
1933 pbb_nb_params): New.
1934 (pbb_nb_loops, pbb_nb_scattering, scop_nb_params,
1935 nb_loops_around_pbb): Adapt return types.
1937 2009-03-09 Tobias Grosser <grosser@fim.uni-passau.de>
1939 * Makefile.in (graphite.o, graphite-sese-to-poly.o,
1940 graphite-clast-to-gimple.o, graphite-data-ref.o,
1941 graphite-scop-detection.o, graphite-poly.o): Add
1944 2009-03-05 Tobias Grosser <grosser@fim.uni-passau.de>
1946 * Makefile.in (graphite.o, graphite-sese-to-poly.o,
1947 graphite-clast-to-gimple.o, graphite-data-ref.o,
1948 graphite-scop-detection.o, graphite-poly.o): Add graphite-poly.h.
1950 2009-03-04 Tobias Grosser <grosser@fim.uni-passau.de>
1952 * testsuite/gcc.dg/graphite/pr37485.c: Remove -floop-block
1953 * testsuite/gcc.dg/graphite/pr37828.c: Same.
1954 * testsuite/gcc.dg/graphite/pr37684.c: Same.
1955 * testsuite/gcc.dg/graphite/block-0.c: Same.
1956 * testsuite/gcc.dg/graphite/block-1.c: Same.
1957 * testsuite/gcc.dg/graphite/block-2.c: Same.
1958 * testsuite/gcc.dg/graphite/block-3.c: Same.
1959 * testsuite/gcc.dg/graphite/block-4.c: Same.
1960 * testsuite/gcc.dg/graphite/block-5.c: Same.
1961 * testsuite/gcc.dg/graphite/block-6.c: Same.
1962 * testsuite/gfortran.dg/graphite/pr38083.f90: Same.
1963 * testsuite/gfortran.dg/graphite/block-1.f90: Same.
1964 * testsuite/gfortran.dg/graphite/block-3.f90: Same.
1965 * testsuite/gfortran.dg/graphite/pr37852.f90: Same.
1966 * testsuite/gfortran.dg/graphite/block-4.f90: Same.
1967 * testsuite/gfortran.dg/graphite/pr37980.f90: Same.
1968 * testsuite/gfortran.dg/graphite/pr38953.f90: Same.
1969 * testsuite/gfortran.dg/graphite/pr37857.f90: Same.
1970 * opts.c: Remove -floop-block from -O2.
1971 * graphite-poly.c: Fail if -floop-block -floop-interchange or
1972 -floop-strip-mine are used.
1974 2009-03-04 Tobias Grosser <grosser@fim.uni-passau.de>
1975 Sebastian Pop <sebastian.pop@amd.com>
1977 * graphite-clast-to-gimple.c (build_cloog_prog): Unify scattering
1979 * graphite-poly.c (pbb_compare, graphite_sort_pbbs,
1980 graphite_trans_bb_move_loop, graphite_trans_bb_strip_mine,
1981 strip_mine_profitable_p, is_interchange_valid,
1982 graphite_trans_bb_block, graphite_trans_loop_block,
1983 graphite_trans_scop_block): Temporary removed.
1984 (extend_scattering, unify_scattering_dimensions): New.
1985 (print_scattering_function, graphite_read_transforms):
1986 PBB_SCATTERING -> PBB_TRANSFORMED_SCATTERING.
1987 (graphite_generate_scattering_fns): Removed.
1988 (apply_poly_transforms): Cleanup.
1989 (free_poly_bb): Add PBB_SCATTERING -> PBB_TRANSFORMED_SCATTERING.
1990 (schedule_to_scattering): Moved.
1991 (PBB_STATIC_SCHEDULE, PBB_SCATTERING): Removed.
1992 (PBB_ORIGINAL_SCATTERING, PBB_TRANSFORMED_SCATTERING): New.
1993 (pbb_nb_scattering): New.
1994 (SCOP_ENTRY, SCOP_EXIT, SCOP_REGION_BBS, SCOP_DEP_GRAPH, SCOP_PARAMS,
1995 SCOP_LOOP_NEST, SCOP_PARAMS, SCOP_OLDIVS, SCOP_LIVEOUT_RENAMES):
1997 * graphite-ppl.c (ppl_insert_dimensions): Extended and renamed from
1999 (ppl_strip_loop): PBB_SCATTERING -> PBB_TRANSFORMED_SCATTERING.
2000 * graphite-scop-detection.c (dot_all_scops_1): PBB_SCATTERING
2001 -> PBB_TRANSFORMED_SCATTERING.
2002 * graphite-sese-to-poly.c (build_scop_bbs): Remove region.
2003 (build_pbb_scattering_polyhedron): Moved from schedule_to_scattering.
2004 (build_scop_scattering): Renamed from build_scop_canonical_schedules.
2005 (check_poly_representation): Do not return bool.
2006 (graphite_transform_loops): Reformat.
2007 * sese.h (SESE_ENTRY_BB, SESE_EXIT_BB): New.
2009 2009-03-04 Sebastian Pop <sebastian.pop@amd.com>
2011 * graphite-poly.c (print_pbb_domain, print_pbb, print_scop,
2012 debug_pbb_domain, debug_pbb, debug_scop): New.
2013 * graphite-poly.h (print_pbb_domain, print_pbb, print_scop,
2014 debug_pbb_domain, debug_pbb, debug_scop): Declared.
2016 2009-03-02 Sebastian Pop <sebastian.pop@amd.com>
2019 * tree-parloops.c (canonicalize_loop_ivs): Call fold_convert
2020 when the type precision of the induction variable should be
2021 larger than the type precision of nit.
2022 (gen_parallel_loop): Update use of canonicalize_loop_ivs.
2023 * graphite-clast-to-gimple.c (graphite_loop_normal_form): Same.
2024 * tree-flow.h (canonicalize_loop_ivs): Update declaration.
2026 * testsuite/gcc.dg/graphite/pr39335_1.c: New.
2027 * testsuite/gcc.dg/graphite/pr39335.c: New.
2029 2009-03-02 Sebastian Pop <sebastian.pop@amd.com>
2031 * tree-parloops.c (canonicalize_loop_ivs): reduction_list contains
2032 SSA_NAMES not struct reduction_info.
2034 2009-03-02 Sebastian Pop <sebastian.pop@amd.com>
2036 * sese.c (expand_scalar_variables_expr): Handle ADDR_EXPR.
2038 2009-02-27 Sebastian Pop <sebastian.pop@amd.com>
2039 Tobias Grosser <grosser@fim.uni-passau.de>
2041 * sese.c (new_sese): Initialize SESE_REDUCTION_LIST.
2042 (free_sese): Free SESE_REDUCTION_LIST.
2043 * sese.h (struct sese): Add field reduction_list.
2044 (SESE_REDUCTION_LIST): New.
2045 * graphite-clast-to-gimple.c (graphite_loop_normal_form): Call
2046 canonicalize_loop_ivs on SESE_REDUCTION_LIST.
2048 2009-02-27 Sebastian Pop <sebastian.pop@amd.com>
2049 Tobias Grosser <grosser@fim.uni-passau.de>
2051 * tree-flow.h (gather_scalar_reductions): Use struct loop * instead
2054 2009-02-27 Sebastian Pop <sebastian.pop@amd.com>
2055 Tobias Grosser <grosser@fim.uni-passau.de>
2057 * tree-parloops.c (struct brli, build_reduction_list_info,
2058 analyze_reduction_list, gather_scalar_reductions): New.
2059 (loop_parallel_p): Build a reduction list containing only
2060 PHI_RESULT SSA_NAMEs: call gather_scalar_reductions.
2061 (gen_parallel_loop): Call the analysis analyze_reduction_list.
2062 (parallelize_loops): Now reduction_list is a htab_t of SSA_NAMEs.
2063 * tree-flow.h (gather_scalar_reductions): Declared.
2065 2009-02-26 Sebastian Pop <sebastian.pop@amd.com>
2068 * graphite-clast-to-gimple.c (graphite_loop_normal_form): Do not call
2069 number_of_iterations_exit from a gcc_assert.
2071 2009-02-25 Sebastian Pop <sebastian.pop@amd.com>
2072 Jan Sjodin <jan.sjodin@amd.com>
2074 * output.h (graphite_out_file, graphite_in_file): Declared.
2075 * toplev.c (graphite_out_file, graphite_in_file): New.
2076 (init_asm_output): Initialize graphite_in_file and graphite_out_file.
2077 * graphite-clast-to-gimple.c (build_cloog_prog): Read PBB_SCATTERING.
2078 Don't call schedule_to_scattering.
2079 * common.opt (fgraphite-write, fgraphite-read): New.
2080 * graphite-poly.c: Include output.h.
2081 (print_scattering_function, print_scattering_functions,
2082 debug_scattering_function, debug_scattering_functions,
2083 graphite_write_transforms, graphite_read_transforms,
2084 graphite_generate_scattering_fns): New.
2085 (apply_poly_transforms): Do not apply transform if flag_graphite_read.
2086 Call graphite_generate_scattering_fns, graphite_write_transforms,
2087 graphite_read_transforms.
2088 (new_poly_bb): Initialize PBB_SCATTERING.
2089 (free_poly_bb): Free PBB_SCATTERING.
2090 (schedule_to_scattering): Does not return, initialize PBB_SCATTERING.
2091 * graphite-poly.h (struct poly_bb): Add field scattering.
2092 (PBB_SCATTERING): New.
2093 (print_scattering_function, print_scattering_functions,
2094 debug_scattering_function, debug_scattering_functions): Declared.
2095 * graphite-ppl.c (cloog_matrix_to_ppl_constraint): Matrices contain
2096 GMP values, not integers!
2097 (ppl_print_polyhedron_matrix, debug_ppl_polyhedron_matrix,
2098 ppl_read_polyhedron_matrix): New.
2099 * graphite-ppl.h (ppl_print_polyhedron_matrix,
2100 debug_ppl_polyhedron_matrix,
2101 ppl_read_polyhedron_matrix): Declared.
2102 * Makefile.in (graphite-poly.o): Depends on output.h.
2104 2009-02-23 Sebastian Pop <sebastian.pop@amd.com>
2105 Tobias Grosser <grosser@fim.uni-passau.de>
2108 * graphite-scop-detection.c (stmt_simple_for_scop_p): Analyze
2109 scalar evolutions in the scop_entry->loop_father.
2111 2009-02-23 Sebastian Pop <sebastian.pop@amd.com>
2112 Tobias Grosser <grosser@fim.uni-passau.de>
2114 * graphite.h (ref_nb_loops): Remove declaration.
2115 (struct gimple_bb, gimple_bb_p, GBB_BB, GBB_DATA_REFS, GBB_CONDITIONS,
2116 GBB_CONDITION_CASES, GBB_CLOOG_IV_TYPES, gbb_loop, print_gimple_bb,
2117 debug_gbb): Moved to sese.h.
2120 2009-02-23 Sebastian Pop <sebastian.pop@amd.com>
2121 Tobias Grosser <grosser@fim.uni-passau.de>
2123 * graphite-data-ref.[ch]: Disable.
2125 2009-02-23 Sebastian Pop <sebastian.pop@amd.com>
2126 Tobias Grosser <grosser@fim.uni-passau.de>
2128 * graphite-scop-detection.c (stmt_simple_for_scop_p): Analyze
2129 scalar evolutions in the scop_entry->loop_father.
2131 2009-02-23 Sebastian Pop <sebastian.pop@amd.com>
2133 * graphite-scop-detection.c (nb_reductions_in_loop): Moved here...
2134 (graphite_cannot_represent_loop_niter): Renamed
2135 graphite_cannot_represent_loop. Call nb_reductions_in_loop.
2136 (limit_scops): build_sese_loop_nests does not return a bool.
2137 * graphite-scop-detection.h (nb_reductions_in_loop): Declared.
2138 * sese.c (nb_reductions_in_loop): ... from here.
2139 (graphite_loop_normal_form): ... from here.
2140 (sese_record_loop): Does not fail, so does not return a bool.
2141 (build_sese_loop_nests): Same.
2142 * sese.h (build_sese_loop_nests): Update declaration.
2143 * graphite-clast-to-gimple.c (graphite_loop_normal_form): Moved here...
2144 (build_graphite_loop_normal_form): New.
2145 (gloog): Call build_graphite_loop_normal_form.
2146 * graphite-sese-to-poly.c (build_poly_scop): Don't fail on
2147 build_sese_loop_nests.
2149 * testsuite/gcc.dg/graphite/id-1.c: New.
2151 2009-02-23 Sebastian Pop <sebastian.pop@amd.com>
2152 Tobias Grosser <grosser@fim.uni-passau.de>
2154 * graphite-sese-to-poly.c (scan_tree_for_params): Remove REAL_CST.
2155 The SCoP detection fix is sufficient.
2157 2009-02-21 Sebastian Pop <sebastian.pop@amd.com>
2159 PR tree-optimization/39260
2160 * graphite-scop-detection.c (harmful_stmt_in_bb): Stop a SCoP when
2161 the basic block contains a condition with a real type.
2162 * graphite-sese-to-poly.c (scan_tree_for_params): Handle REAL_CST.
2164 * gcc.dg/graphite/pr39260.c: New.
2166 2009-02-21 Sebastian Pop <sebastian.pop@amd.com>
2168 * graphite-poly.c: Inlcude params.h.
2169 (graphite_trans_loop_block): Use PARAM_LOOP_BLOCK_TILE_SIZE for
2171 * Makefile.in (graphite-poly.o): Depend on PARAMS_H.
2172 * params.def (PARAM_LOOP_BLOCK_TILE_SIZE): Define.
2174 2009-02-20 Sebastian Pop <sebastian.pop@amd.com>
2175 Tobias Grosser <grosser@fim.uni-passau.de>
2177 * graphite-scop-detection.c (dot_all_scops_1,
2178 dot_all_scops): Moved here.
2179 * graphite-scop-detection.h (dot_all_scops): Declared here.
2180 * graphite.c (graphite_initialize, graphite_finalize): New.
2181 (graphite_transform_loops): Cleaned up.
2182 * sese.c (debug_oldivs): Moved here.
2183 * graphite-poly.c (graphite_apply_transformations): Renamed
2184 apply_poly_transforms.
2185 (debug_loop_vec): Moved here.
2186 * graphite-sese-to-poly.c (build_bb_loops, build_sese_conditions_1,
2187 scop_contains_non_iv_scalar_phi_nodes, build_sese_conditions,
2188 find_scop_parameters, build_scop_iteration_domain,
2189 add_conditions_to_constraints, build_scop_canonical_schedules,
2190 build_scop_data_accesses): Now static.
2191 (build_poly_scop, check_poly_representation): New.
2193 2009-02-20 Sebastian Pop <sebastian.pop@amd.com>
2195 * graphite.c (graphite_stmt_p, new_gimple_bb, free_gimple_bb,
2196 remove_gbbs_in_scop, free_scops, try_generate_gimple_bb,
2197 build_scop_bbs, ref_nb_loops, compare_prefix_loops,
2198 build_scop_canonical_schedules, build_bb_loops, add_value_to_dim,
2199 scan_tree_for_params_right_scev, scan_tree_for_params_int,
2200 scan_tree_for_params, struct irp_data, dx_record_params,
2201 find_params_in_bb, find_scop_parameters, gbb_from_bb,
2202 build_loop_iteration_domains, add_conditions_to_domain,
2203 phi_node_is_iv, bb_contains_non_iv_scalar_phi_nodes,
2204 scop_contains_non_iv_scalar_phi_nodes, build_sese_conditions_1,
2205 build_sese_conditions, add_conditions_to_constraints,
2206 build_scop_iteration_domain, build_access_matrix_with_af,
2207 build_access_matrix,
2208 build_scop_data_accesses): Moved to graphite-sese-to-poly.c.
2210 * graphite-sese-to-poly.c: New.
2211 * graphite-sese-to-poly.h: New.
2213 * Makefile.in: Add new rule for graphite-sese-to-poly.o.
2215 2009-02-20 Sebastian Pop <sebastian.pop@amd.com>
2217 * graphite.c: Split graphite code generation to a new file.
2218 (graphite_verify, gmp_cst_to_tree, clast_name_to_gcc,
2219 max_precision_type, clast_to_gcc_expression_red,
2220 clast_to_gcc_expression, gcc_type_for_clast_expr,
2221 gcc_type_for_clast_eq, loop_iv_stack_patch_for_consts,
2222 graphite_translate_clast_equation, graphite_create_guard_cond_expr,
2223 graphite_create_new_guard, clast_get_body_of_loop,
2224 gcc_type_for_cloog_iv, gcc_type_for_iv_of_clast_loop,
2225 graphite_create_new_loop, build_iv_mapping, copy_renames,
2226 translate_clast, find_cloog_iv_in_expr, compute_cloog_iv_types_1,
2227 compute_cloog_iv_types, free_scattering, save_var_name,
2228 initialize_cloog_names, build_scop_context, build_cloog_prog,
2229 set_cloog_options, debug_clast_stmt, scop_to_clast,
2230 print_generated_program, debug_generated_program,
2231 gloog): Moved to graphite-clast-to-gimple.c.
2233 (struct cloog_prog_clast): Moved to graphite-clast-to-gimple.h.
2235 (iv_stack_entry_is_constant, iv_stack_entry_is_iv,
2236 loop_iv_stack_push_iv, loop_iv_stack_insert_constant,
2237 loop_iv_stack_pop, loop_iv_stack_get_iv,
2238 loop_iv_stack_get_iv_from_name, debug_loop_iv_stack,
2239 free_loop_iv_stack, loop_iv_stack_remove_constants,
2240 debug_rename_elt, debug_rename_map_1, debug_rename_map,
2241 rename_map_elt_info, eq_rename_map_elts, debug_ivtype_elt,
2242 debug_ivtype_map_1, debug_ivtype_map, ivtype_map_elt_info,
2243 eq_ivtype_map_elts, sese_add_exit_phis_edge,
2244 sese_add_exit_phis_var, sese_insert_phis_for_liveouts,
2245 get_vdef_before_sese, sese_adjust_vphi,
2246 get_new_name_from_old_name, sese_adjust_phis_for_liveouts,
2247 oldiv_for_loop, rename_variables_in_stmt, is_parameter,
2248 is_iv, expand_scalar_variables_ssa_name,
2249 expand_scalar_variables_expr, expand_scalar_variables_stmt,
2250 expand_scalar_variables, rename_variables, remove_condition,
2251 get_true_edge_from_guard_bb, get_false_edge_from_guard_bb,
2252 add_loop_exit_phis, insert_loop_close_phis, struct igp,
2253 default_liveout_before_guard, add_guard_exit_phis,
2254 insert_guard_phis, register_old_and_new_names,
2255 graphite_copy_stmts_from_block, register_sese_liveout_renames,
2256 copy_bb_and_scalar_dependences, outermost_loop_in_sese,
2257 if_region_set_false_region, create_if_region_on_edge,
2258 move_sese_in_condition): Moved to sese.c.
2260 (nb_loops_around_loop_in_sese, struct ifsese, if_region_entry,
2261 if_region_exit, if_region_get_condition_block,
2262 struct rename_map_elt, new_rename_map_elt, enum iv_stack_entry_kind,
2263 union iv_stack_entry_data_union, struct iv_stack_entry_struct,
2264 iv_stack_entry_p, loop_iv_stack, struct ivtype_map_elt,
2265 ivtype_map_elt, new_ivtype_map_elt,
2266 recompute_all_dominators): Moved to sese.h.
2268 * graphite-clast-to-gimple.c: New.
2269 * graphite-clast-to-gimple.h: New.
2270 * Makefile.in: Add new rule for graphite-clast-to-gimple.o.
2271 * sese.c: Modified as said above.
2274 2009-02-20 Sebastian Pop <sebastian.pop@amd.com>
2276 * graphite.c: Split scop detection to a new file.
2277 (enum gbb_type, gbb_type, get_bb_type, struct sd_region_p, sd_region,
2278 move_sd_regions, loop_affine_expr, exclude_component_ref,
2279 is_simple_operand, stmt_simple_for_scop_p, harmful_stmt_in_bb,
2280 graphite_cannot_represent_loop_niter, struct scopdet_info,
2281 scopdet_basic_block_info, build_scops_1, bb_in_sd_region,
2282 find_single_entry_edge, find_single_exit_edge,
2283 create_single_entry_edge, sd_region_without_exit,
2284 create_single_exit_edge, unmark_exit_edges, mark_exit_edges,
2285 create_sese_edges, build_graphite_scops, limit_scops, build_scops):
2286 Moved to graphite-scop-detection.c.
2288 * graphite-scop-detection.c: New.
2289 * graphite-scop-detection.h: New.
2290 * Makefile.in: Add new rule for graphite-scop-detection.o.
2292 * sese.c: Include tree-chrec.h, tree-data-ref.h, and
2293 tree-scalar-evolution.h.
2294 (nb_reductions_in_loop, graphite_loop_normal_form, sese_record_loop,
2295 build_sese_loop_nests): Moved here from graphite.c.
2296 (param_index): Renamed parameter_index_in_region.
2298 2009-02-18 Tobias Grosser <grosser@fim.uni-passau.de>
2299 Sebastian Pop <sebastian.pop@amd.com>
2301 * gcc.dg/graphite/block-0.c: Expected to fail now.
2302 * gcc.dg/graphite/block-1.c: Same.
2303 * gcc.dg/graphite/block-5.c: Same.
2304 * gcc.dg/graphite/block-6.c: Same.
2306 2009-02-18 Tobias Grosser <grosser@fim.uni-passau.de>
2307 Sebastian Pop <sebastian.pop@amd.com>
2309 * graphite.h: Separate from graphite_bb_p the polyhedral
2310 representation in poly_bb_p and the GCC specifics in gimple_bb_p.
2311 (struct data_dependence_polyhedron, RDGE_DDP, ddp_p): Moved to
2312 graphite-data-ref.h.
2313 (struct poly_bb, PBB_SCOP, PBB_STATIC_SCHEDULE, PBB_DOMAIN,
2314 PBB_BLACK_BOX, PBB_LOOPS, pbb_nb_loops, pbb_loop_at_index,
2315 pbb_loop_index, struct scop, SCOP_BBS, SCOP_REGION, SCOP_ENTRY,
2316 SCOP_EXIT, SCOP_REGION_BBS, SCOP_DEP_GRAPH, SCOP_PARAMS,
2317 SCOP_LOOP_NEST, SCOP_PARAMS, SCOP_OLDIVS, SCOP_LIVEOUT_RENAMES,
2318 scop_nb_params): Moved to graphite-poly.h.
2319 * graphite-data-ref.c: Same.
2320 * graphite-data-ref.h: New.
2322 (pbb_compare, graphite_sort_pbbs, graphite_trans_bb_move_loop,
2323 graphite_trans_bb_strip_mine, strip_mine_profitable_p,
2324 is_interchange_valid, graphite_trans_bb_block,
2325 graphite_trans_loop_block, scop_max_loop_depth,
2326 graphite_trans_scop_block, graphite_apply_transformations,
2327 new_poly_bb, free_poly_bb, new_scop, free_scop): Moved to
2329 * graphite-poly.h: New.
2330 * graphite-poly.c: New.
2331 * Makefile.in (OBJS-common): Add graphite-poly.o.
2332 (graphite-poly.o): New rule.
2333 * tree-data-ref.h (struct data_reference): Remove unused scop field.
2336 2009-02-18 Sebastian Pop <sebastian.pop@amd.com>
2337 Tobias Grosser <grosser@fim.uni-passau.de>
2339 * graphite.c: Replace gb -> gbb.
2341 * graphite-data-ref.c: Same.
2343 2009-02-18 Sebastian Pop <sebastian.pop@amd.com>
2344 Tobias Grosser <grosser@fim.uni-passau.de>
2346 * Makefile.in (OBJS-commmon): Add sese.o.
2348 (graphite.o): Add sese.h.
2349 * graphite.c (bb_in_ss_p, loop_in_sese_p,
2350 sese_build_livein_liveouts_use, sese_build_livein_liveouts_bb,
2351 sese_build_livein_liveouts, register_bb_in_sese, new_sese, free_sese):
2353 (block_before_scop): Add missing return.
2354 (new_scop, free_scop): Remove SESE data structures.
2355 (scop_record_loop, scan_tree_for_params, find_params_in_bb,
2356 find_scop_parameters, build_loop_iteration_domains,
2357 add_conditions_to_domain, register_scop_liveout_renames,
2358 copy_bb_and_scalar_dependences): Scop -> SESE.
2360 (add_conditions_to_domain): SCoP -> SESE and remove check
2361 (scop_contains_non_iv_scalar_phi_nodes): New.
2362 (build_scop_conditions_1, build_scop_conditions): Remove check for
2363 non iv scalar phi nodes.
2364 (print_scop_statistics): New.
2365 (graphite_transform_loops): Cleanup.
2367 * graphite.h: Move to sese & cleanup.
2371 2009-02-16 Sebastian Pop <sebastian.pop@amd.com>
2372 Tobias Grosser <grosser@fim.uni-passau.de>
2374 * graphite.c (build_scop_conditions_1): Conditions are only
2375 at the end of a basic block.
2377 2009-02-16 Sebastian Pop <sebastian.pop@amd.com>
2378 Tobias Grosser <grosser@fim.uni-passau>
2380 * graphite.h (struct graphite_bb): Remove compressed_alpha_matrix
2382 (GBB_ALPHA): Removed.
2384 2009-02-16 Sebastian Pop <sebastian.pop@amd.com>
2385 Tobias Grosser <grosser@fim.uni-passau.de>
2387 * graphite-data-ref.c (graphite_test_dependence): Don't use
2388 GBB_DYNAMIC_SCHEDULE.
2389 * graphite.c (new_graphite_bb): Same.
2390 (free_graphite_bb): Same.
2391 (build_scop_dynamic_schedules): Removed.
2392 (graphite_transform_loops): Don't call it.
2393 * graphite.h (struct graphite_bb): Remove dynamic_schedule field.
2394 (GBB_DYNAMIC_SCHEDULE): Removed.
2396 2009-02-16 Sebastian Pop <sebastian.pop@amd.com>
2397 Tobias Grosser <grosser@fim.uni-passau.de>
2399 * graphite.c (schedule_to_scattering): Don't use CloogMatrix.
2400 (print_graphite_bb): Same.
2401 (build_cloog_prog): Same.
2403 2009-02-16 Sebastian Pop <sebastian.pop@amd.com>
2404 Tobias Grosser <grosser@fim.uni-passau.de>
2406 * graphite.c (build_cloog_prog): Don't use CloogMatrix.
2408 2009-02-16 Sebastian Pop <sebastian.pop@amd.com>
2409 Tobias Grosser <grosser@fim.uni-passau.de>
2411 * graphite.c (build_scop_context): Don't use CloogMatrix.
2412 * graphite-ppl.c (new_Cloog_Domain_from_ppl_Polyhedron): New.
2413 * graphite-ppl.h (new_Cloog_Domain_from_ppl_Polyhedron): Declared.
2415 2009-02-16 Sebastian Pop <sebastian.pop@amd.com>
2416 Tobias Grosser <grosser@fim.uni-passau.de>
2418 * graphite.h (struct scop): Move params, old_ivs, loops, loop_nest,
2419 liveout_renames, add_params fields...
2420 (struct sese): ... here.
2421 (SESE_PARAMS, SESE_LOOPS, SESE_LOOP_NEST, SESE_ADD_PARAMS,
2422 SESE_PARAMS, SESE_OLDIVS, SESE_LIVEOUT_RENAMES): New.
2424 2009-02-16 Sebastian Pop <sebastian.pop@amd.com>
2425 Tobias Grosser <grosser@fim.uni-passau.de>
2427 * graphite.c (print_scop): Do not print the CLooG program.
2428 (new_scop, free_scop, initialize_cloog_names, build_scop_context,
2429 build_cloog_prog, gloog): Don't use SCOP_PROG.
2430 (find_transform): Renamed scop_to_clast.
2431 (print_generated_program, debug_generated_program): New.
2432 (graphite_transform_loops): Adapt to new interface.
2433 * graphite.h (struct scop): Remove program field.
2434 (SCOP_PROG): Removed.
2435 (print_generated_program, debug_generated_program): Declared.
2437 2009-02-16 Sebastian Pop <sebastian.pop@amd.com>
2439 * graphite-data-ref.c (schedule_precedes_p, schedule_same_p): New.
2440 (statement_precedes_p): Use schedule_same_p and schedule_precedes_p.
2441 * graphite.c (gbb_compare, schedule_to_scattering, print_graphite_bb,
2442 free_graphite_bb, build_scop_canonical_schedules,
2443 graphite_trans_bb_strip_mine, graphite_trans_scop_block): Static
2444 schedules are now represented using a ppl_Linear_Expression_t.
2445 * graphite.h (struct graphite_bb): Same.
2446 * graphite-ppl.c (ppl_lexico_compare_linear_expressions): New.
2447 * graphite-ppl.h (ppl_lexico_compare_linear_expressions): Declared.
2449 2009-02-15 Sebastian Pop <sebastian.pop@amd.com>
2451 * graphite.c: Free local memory.
2452 * graphite-ppl.c: Same.
2454 2009-02-15 Sebastian Pop <sebastian.pop@amd.com>
2456 * graphite.c (const_column_index, get_first_matching_sign_row_index,
2457 get_lower_bound_row, get_upper_bound_row, copy_constraint,
2458 swap_constraint_variables, scale_constraint_variable): Removed.
2459 (graphite_trans_bb_strip_mine): Remove pong.
2460 * graphite-ppl.c: Include missing header files.
2461 (set_inhomogeneous, set_coef, shift_poly, ppl_strip_loop): New.
2462 * graphite-ppl.h (ppl_strip_loop): Declared.
2463 * Makefile.in (graphite-ppl.o): Adjust dependences.
2465 2009-02-14 Sebastian Pop <sebastian.pop@amd.com>
2467 * graphite.c (build_loop_iteration_domains): Remove ping pong.
2468 (build_scop_iteration_domain): Same.
2470 2009-02-13 Sebastian Pop <sebastian.pop@amd.com>
2472 * graphite.c (scan_tree_for_params, add_conditions_to_domain): Remove
2474 (add_value_to_dim, scan_tree_for_params_right_scev,
2475 scan_tree_for_params_int): New.
2476 * graphite-ppl.c (oppose_constraint): New.
2477 (insert_constraint_into_matrix): Implement missing cases.
2478 * graphite-ppl.h (insert_constraint_into_matrix): Declared.
2480 2009-02-13 Sebastian Pop <sebastian.pop@amd.com>
2482 * graphite.c (graphite_trans_bb_move_loop): Remove ping pong,
2483 use ppl_move_dimension.
2485 2009-02-12 Sebastian Pop <sebastian.pop@amd.com>
2487 * graphite-data-ref.c: Domains are now ppl_Polyhedra_t.
2490 * graphite-ppl.c: Same.
2491 * graphite-ppl.h: Same.
2493 2009-02-12 Sebastian Pop <sebastian.pop@amd.com>
2495 Revert last 3 commits.
2497 2009-02-10 Sebastian Pop <sebastian.pop@amd.com>
2499 * graphite.c (scan_tree_for_params, add_conditions_to_domain): Remove
2501 (add_value_to_dim, scan_tree_for_params_right_scev,
2502 scan_tree_for_params_int): New.
2503 * graphite-ppl.c (oppose_constraint): New.
2504 (insert_constraint_into_matrix): Implement missing cases.
2505 * graphite-ppl.h (insert_constraint_into_matrix): Declared.
2507 2009-02-10 Sebastian Pop <sebastian.pop@amd.com>
2509 * graphite.c (graphite_trans_bb_move_loop): Remove unused variables.
2511 2009-02-10 Sebastian Pop <sebastian.pop@amd.com>
2512 Tobias Grosser <grosser@fim.uni-passau.de>
2514 * graphite.c (graphite_trans_bb_move_loop): Remove ping pong,
2515 use ppl_move_dimension.
2516 * graphite-ppl.c (ppl_move_dimension): New.
2517 * graphite-ppl.h (ppl_move_dimension): Declared.
2519 2009-02-10 Sebastian Pop <sebastian.pop@amd.com>
2521 * graphite.c: Do not include cloog/cloog.h.
2522 (print_graphite_bb): Remove ping pong, call PPL print function.
2524 2009-02-10 Tobias Grosser <grosser@fim.uni-passau.de>
2526 * Makefile.in (OBJS-common): Add graphite-ppl.o.
2527 (graphite.o): Add dependence on graphite-ppl.h.
2528 (graphite-ppl.o): New.
2529 (graphite-data-ref.c): Ping pong between PPL data structures
2531 * graphite-ppl.c: New.
2532 * graphite-ppl.h: New.
2533 * graphite.c: Include graphite-ppl.h.
2534 (print_graphite_bb, add_conditions_to_domain, build_cloog_prog,
2535 graphite_trans_bb_move_loop, graphite_trans_bb_strip_mine):
2536 Ping pong between PPL data structures and matrices.
2537 (new_graphite_bb): Create a PPL constraint system.
2538 Call ppl_delete_Constraint_System instead of cloog_matrix_free.
2539 (build_loop_iteration_domains): Use PPL functions.
2540 * graphite.h: Include graphite-ppl.h. Fix comments.
2541 (graphite_bb): Use a ppl_Constraint_System_t instead of
2542 CloogMatrix for representing the domain.
2543 (scop): Remove static_schedule.
2544 (gbb_nb_loops): Ping pong between PPL data structures and matrices.
2546 2009-02-06 Sebastian Pop <sebastian.pop@amd.com>
2548 * graphite.c: Fix some comments.
2550 2009-02-05 Sebastian Pop <sebastian.pop@amd.com>
2553 * graphite.c (if_region_set_false_region): After moving a region
2554 in the false branch of a condition, remove the empty dummy
2556 (gloog): Remove wrong fix for PR38953.
2558 2009-02-03 Tobias Grosser <grosser@fim.uni-passau.de>
2560 * graphite.c (bb_in_sese_p, sese_build_livein_liveouts_use,
2561 sese_build_livein_liveouts_bb, sese_build_livein_liveouts,
2562 register_bb_in_sese, new_sese, free_sese): Moved.
2563 (dot_scop_1, build_scop_loop_nests, build_loop_iteration_domains,
2564 outermost_loop_in_scop, build_scop_iteration_domain,
2565 expand_scalar_variables_ssa_name, get_vdef_before_scop,
2566 limit_scops): Use bb_in_sese_p instead of bb_in_scop_p.
2567 Use loop_in_sese_p instead of loop_in_scop_p.
2568 (new_graphite_bb, new_scop, gloog): Do not initialize SCOP_BBS_B.
2569 (free_scop): Do not free SCOP_BBS_B.
2570 (nb_loops_around_loop_in_scop, nb_loops_around_gb,
2571 ref_nb_loops): Moved here...
2572 * graphite.h (ref_nb_loops): ... from here.
2573 (struct scop): Remove bbs_b bitmap.
2574 (SCOP_BBS_B, bb_in_scop_p, loop_in_scop_p): Removed.
2575 * testsuite/gcc.dg/graphite/scop-19.c: New
2577 2009-02-03 Tobias Grosser <grosser@fim.uni-passau.de>
2579 * graphite.c (scopdet_basic_block_info): Fix bug in scop
2582 2009-01-30 Tobias Grosser <grosser@fim.uni-passau.de>
2584 * graphite.c (new_loop_to_cloog_loop_str, hash_loop_to_cloog_loop,
2585 eq_loop_to_cloog_loop): Remove.
2586 (new_scop, free_scop): Remove SCOP_LOOP2CLOOG_LOOP.
2587 * graphite.h (struct scop): Remove loop2cloog_loop.
2588 (loop_domain_dim, loop_iteration_vector_dim): Remove.
2590 2009-01-30 Tobias Grosser <grosser@fim.uni-passau.de>
2592 * opts.c (decode_options): Only add graphite options to O2
2593 if we compile with graphite enabled.
2595 2009-01-26 Sebastian Pop <sebastian.pop@amd.com>
2597 * Merge from mainline (r143163:143684).
2599 2009-01-26 Sebastian Pop <sebastian.pop@amd.com>
2601 * graphite.c (debug_value): Removed.
2602 * graphite.h (debug_value): Removed.
2604 2009-01-23 Sebastian Pop <sebastian.pop@amd.com>
2606 * passes.c (init_optimization_passes): Do not call pass_copy_prop
2607 after graphite: pass_copy_prop does not maintain a proper loop closed
2608 SSA form. pass_copy_prop should be fixed.
2610 2009-01-23 Sebastian Pop <sebastian.pop@amd.com>
2612 * graphite.c (scop_adjust_phis_for_liveouts): Fix warning.
2614 2009-01-23 Sebastian Pop <sebastian.pop@amd.com>
2616 * graphite.c (graphite_verify): Add a call to verify_loop_closed_ssa.
2617 (gloog): Split the exit of the scop when the scop exit is a loop exit.
2618 (graphite_transform_loops): Only call cleanup_tree_cfg if gloog
2621 2009-01-20 Sebastian Pop <sebastian.pop@amd.com>
2623 * graphite.c (gloog): Return true when code gen succeeded.
2624 (graphite_transform_loops): Do not call cleanup_tree_cfg if
2625 the code of the function did not changed. After cleanup_tree_cfg
2626 call rewrite_into_loop_closed_ssa to maintain the loop closed ssa
2629 2009-01-19 Sebastian Pop <sebastian.pop@amd.com>
2631 * graphite.c (stmt_simple_for_scop_p): Also handle cases when
2632 gimple_call_lhs is NULL.
2634 2009-01-16 Sebastian Pop <sebastian.pop@amd.com>
2635 Tobias Grosser <tobi.grosser@amd.com>
2637 * graphite.c (graphite_trans_scop_block): Do not block single
2640 2009-01-15 Sebastian Pop <sebastian.pop@amd.com>
2641 Tobias Grosser <tobi.grosser@amd.com>
2643 * graphite.c (build_scop_canonical_schedules): Start schedules at
2646 2009-01-15 Sebastian Pop <sebastian.pop@amd.com>
2647 Tobias Grosser <tobi.grosser@amd.com>
2649 * graphite.c (compare_prefix_loops): New.
2650 (build_scop_canonical_schedules): Rewritten.
2651 (graphite_transform_loops): Move build_scop_canonical_schedules
2652 after build_scop_iteration_domain.
2654 2009-01-14 Sebastian Pop <sebastian.pop@amd.com>
2655 Tobias Grosser <tobi.grosser@amd.com>
2657 * graphite.c (add_conditions_to_domain): Add the loops to
2658 the dimension of the iteration domain. Do copy the domain
2659 only when it exists.
2660 (build_scop_conditions_1): Do not call add_conditions_to_domain.
2661 (add_conditions_to_constraints): New.
2662 (can_generate_code_stmt, can_generate_code): Removed.
2663 (gloog): Do not call can_generate_code.
2664 (graphite_transform_loops): Call add_conditions_to_constraints
2665 after building the iteration domain.
2667 2009-01-14 Sebastian Pop <sebastian.pop@amd.com>
2668 Tobias Grosser <tobi.grosser@amd.com>
2669 Jan Sjodin <jan.sjodin@amd.com>
2671 * graphite.c (scan_tree_for_params): On substractions negate
2672 all the coefficients of the term.
2673 (clast_to_gcc_expression_red): New. Handle reduction expressions
2674 of more than two operands.
2675 (clast_to_gcc_expression): Call clast_to_gcc_expression_red.
2676 (get_vdef_before_scop): Handle also the case of default definitions.
2678 2009-01-14 Sebastian Pop <sebastian.pop@amd.com>
2681 * graphite.c (get_vdef_before_scop, scop_adjust_vphi): New.
2682 (scop_adjust_phis_for_liveouts): Call scop_adjust_vphi.
2683 (gloog): Do not call cleanup_tree_cfg.
2684 (graphite_transform_loops): Call cleanup_tree_cfg after all
2685 scops have been code generated.
2687 2009-01-13 Sebastian Pop <sebastian.pop@amd.com>
2689 * passes.c (init_optimization_passes): Schedule after
2690 graphite transforms pass_copy_prop, pass_dce_loop and pass_lim.
2692 2009-01-13 Sebastian Pop <sebastian.pop@amd.com>
2694 * graphite.c (expand_scalar_variables_stmt): Do not pass loop_p.
2696 (expand_scalar_variables_ssa_name): Do not pass loop_p. Fix comment.
2697 Set the type of an expression to the type of its assign statement.
2698 (expand_scalar_variables_expr): Do not pass loop_p.
2699 Fix comment. Stop recursion on tcc_constant or tcc_declaration.
2700 (copy_bb_and_scalar_dependences): Do not pass loop_p.
2701 (translate_clast): Update call to copy_bb_and_scalar_dependences.
2703 2009-01-11 Sebastian Pop <sebastian.pop@amd.com>
2705 * graphite.c (expand_scalar_variables_ssa_name): Set the type of
2706 an expression to the gimple_expr_type of its assign statement.
2707 (expand_scalar_variables_expr): Stop recursion on tcc_constant
2710 2009-01-11 Sebastian Pop <sebastian.pop@amd.com>
2712 PR tree-optimization/38786
2713 * testsuite/gcc.dg/graphite/pr38786.c: New.
2714 * graphite.c (expand_scalar_variables_ssa_name): New, outlined from
2715 the SSA_NAME case of expand_scalar_variables_expr.
2716 (expand_scalar_variables_expr): Also gather the scalar computation
2717 used to index the memory access.
2718 (expand_scalar_variables_stmt): Pass to expand_scalar_variables_expr
2719 the gimple_stmt_iterator where it inserts new code.
2721 2009-01-10 Sebastian Pop <sebastian.pop@amd.com>
2723 * testsuite/gcc.dg/graphite/block-3.c: Fix compile error on 32bit.
2725 2009-01-10 Sebastian Pop <sebastian.pop@amd.com>
2727 * opts.c (decode_options): Enable flag_graphite_identity and
2728 flag_loop_block in -O2 and above.
2730 2009-01-08 Sebastian Pop <sebastian.pop@amd.com>
2732 * libjava/classpath/lib/gnu/java/awt/peer/gtk/GtkMouseInfoPeer.class:
2733 Fix merge problem: replace with the file from trunk.
2735 2009-01-08 Sebastian Pop <sebastian.pop@amd.com>
2737 * Merge from mainline (r141727:143163).
2739 2009-01-07 Sebastian Pop <sebastian.pop@amd.com>
2740 Jan Sjodin <jan.sjodin@amd.com>
2742 PR tree-optimization/38559
2743 * testsuite/gcc.dg/graphite/pr38559.c: New.
2745 * graphite.c (debug_value, copy_constraint,
2746 swap_constraint_variables, scale_constraint_variable, ): New.
2747 (get_lower_bound, get_upper_bound): Removed.
2748 (graphite_trans_bb_strip_mine): Clean up this code that works
2749 only for constant number of iterations. Fully copy upper and
2750 lower bound constraints, not only the constant part of them.
2751 * graphite.h (debug_value): Declared.
2753 2009-01-06 Jan Sjodin <jan.sjodin@amd.com>
2755 PR tree-optimization/38492
2756 PR tree-optimization/38498
2757 * tree-check.c (operator_is_linear, scev_is_linear_expression): New.
2758 * tree-chrec.h (scev_is_linear_expression): Declared.
2759 * graphite.c (graphite_cannot_represent_loop_niter): New.
2760 (scopdet_basic_block_info): Call graphite_cannot_represent_loop_niter.
2761 (graphite_loop_normal_form): Use gcc_assert.
2762 (scan_tree_for_params): Use CASE_CONVERT.
2763 (phi_node_is_iv, bb_contains_non_iv_scalar_phi_nodes): New.
2764 (build_scop_conditions_1): Call bb_contains_non_iv_scalar_phi_nodes.
2765 Use gcc_assert. Discard scops that contain unhandled cases.
2766 (build_scop_conditions): Return a boolean status for unhandled cases.
2767 (strip_mine_profitable_p): Print the loop number, not its depth.
2768 (is_interchange_valid): Pass the depth of the loop nest, don't
2769 recompute it wrongly.
2770 (graphite_trans_bb_block): Same.
2771 (graphite_trans_bb_block): Print tentative of loop blocking.
2772 (graphite_trans_scop_block): Do not print that the loop has been
2774 (graphite_transform_loops): Do not handle scops that contain condition
2777 * testsuite/gcc.dg/graphite/pr38500.c: Fixed warning as committed
2779 * testsuite/gcc.dg/graphite/block-0.c: Update test.
2780 * testsuite/gcc.dg/graphite/block-1.c: Same.
2781 * testsuite/gcc.dg/graphite/block-2.c: Remove xfail and test for
2783 * testsuite/gcc.dg/graphite/block-4.c: Remove test for strip mine.
2784 * testsuite/gcc.dg/graphite/block-3.c: New.
2785 * testsuite/gcc.dg/graphite/pr38498.c: New.
2787 2008-12-22 Harsha Jagasia <harsha.jagasia@amd.com>
2789 PR tree-optimization/38510
2790 * gcc.dg/graphite/pr38510.c: New.
2791 * graphite.c (recompute_all_dominators): Call mark_irreducible_loops.
2792 (translate_clast): Call recompute_all_dominators before
2794 (gloog): Call recompute_all_dominators before graphite_verify.
2796 2008-12-12 Sebastian Pop <sebastian.pop@amd.com>
2798 PR tree-optimization/38492
2799 * graphite.c (rename_map_elt, debug_rename_elt,
2800 debug_rename_map_1, debug_rename_map, new_rename_map_elt,
2801 rename_map_elt_info, eq_rename_map_elts,
2802 get_new_name_from_old_name, bb_in_sese_p): Moved around.
2803 (sese_find_uses_to_rename_use): Renamed sese_build_livein_liveouts_use.
2804 (sese_find_uses_to_rename_bb): Renamed sese_build_livein_liveouts_bb.
2805 (sese_build_livein_liveouts): New.
2806 (new_sese, free_sese): New.
2807 (new_scop): Call new_sese.
2808 (free_scop): Call free_sese.
2809 (rename_variables_from_edge, rename_phis_end_scop): Removed.
2810 (register_old_new_names): Renamed register_old_and_new_names.
2811 (register_scop_liveout_renames, add_loop_exit_phis,
2812 insert_loop_close_phis, struct igp,
2813 default_liveout_before_guard, add_guard_exit_phis,
2814 insert_guard_phis, copy_renames): New.
2815 (translate_clast): Call insert_loop_close_phis and insert_guard_phis.
2816 (sese_add_exit_phis_edge): Renamed scop_add_exit_phis_edge.
2817 (rewrite_into_sese_closed_ssa): Renamed scop_insert_phis_for_liveouts.
2818 (scop_adjust_phis_for_liveouts): New.
2819 (gloog): Call scop_adjust_phis_for_liveouts.
2821 * graphite.h (struct sese): Documented. Added fields liveout,
2823 (SESE_LIVEOUT, SESE_LIVEIN, SESE_LIVEIN_VER, SESE_NUM_VER): New.
2824 (new_sese, free_sese, sese_build_livein_liveouts): Declared.
2825 (struct scop): Added field liveout_renames.
2826 (SCOP_LIVEOUT_RENAMES): New.
2828 2008-12-11 Sebastian Pop <sebastian.pop@amd.com>
2830 PR tree-optimization/38409
2831 * gcc.dg/graphite/pr38409.c: New.
2832 * graphite.c (nb_reductions_in_loop): Use simple_iv.
2834 2008-12-11 Sebastian Pop <sebastian.pop@amd.com>
2836 * graphite.c (gcc_type_for_cloog_iv): By default return
2838 (graphite_create_new_loop): Don't fold_convert the already
2839 fold_convert-ed expression.
2841 2008-12-11 Harsha Jagasia <harsha.jagasia@amd.com>
2843 PR tree-optimization/38446
2844 * gcc.dg/graphite/pr38446.c: New.
2845 * graphite.c (register_bb_in_sese): New.
2846 (bb_in_sese_p): Check if bb belongs to sese region by explicitly
2847 looking at the bbs in the region.
2848 * graphite.h (sese): Add region_basic_blocks pointer set to
2849 structure and initialize at the time of defining new scop.
2851 2008-12-11 Tobias Grosser <grosser@fim.uni-passau.de>
2853 * graphite.c (new_graphite_bb): Initialize GBB_STATIC_SCHEDULE.
2854 (find_params_in_bb): Do not free data refs.
2855 (free_graphite_bb): Add FIXME on disabled free_data_refs.
2857 2008-12-11 Sebastian Pop <sebastian.pop@amd.com>
2859 * testsuite/gcc.dg/graphite/scop-16.c: Test only scop specific info.
2860 * testsuite/gcc.dg/graphite/scop-17.c: Same.
2861 * testsuite/gcc.dg/graphite/block-5.c: New.
2862 * testsuite/gcc.dg/graphite/block-6.c: New.
2863 * testsuite/gcc.dg/graphite/pr37485.c: Clean dump file after.
2864 * testsuite/gcc.dg/graphite/pr37684.c: Same.
2865 * testsuite/gcc.dg/graphite/block-2.c: Same.
2867 * graphite.c (struct ivtype_map_elt): New.
2868 (debug_ivtype_elt, debug_ivtype_map_1, debug_ivtype_map,
2869 new_ivtype_map_elt, ivtype_map_elt_info, eq_ivtype_map_elts,
2870 gcc_type_for_cloog_iv): New.
2871 (loop_iv_stack_patch_for_consts): Use the type of the induction
2872 variable from the original loop, except for the automatically
2873 generated loops, i.e., in the case of a strip-mined loop, in
2874 which case there is no original loop: in that case just use
2876 (new_graphite_bb): Initialize GBB_CLOOG_IV_TYPES.
2877 (free_graphite_bb): Free GBB_CLOOG_IV_TYPES.
2878 (clast_name_to_gcc): Accept params to be NULL.
2879 (clast_to_gcc_expression): Take an extra parameter for the type.
2880 Convert to that type all the expressions built by this function.
2881 (gcc_type_for_clast_expr, gcc_type_for_clast_eq): New.
2882 (graphite_translate_clast_equation): Compute the type of the
2883 clast_equation before translating its LHS and RHS.
2884 (clast_get_body_of_loop, gcc_type_for_iv_of_clast_loop): New.
2885 (graphite_create_new_loop): Compute the type of the induction
2886 variable before translating the lower and upper bounds and before
2887 creating the induction variable.
2888 (rename_variables_from_edge, rename_phis_end_scop): New.
2889 (copy_bb_and_scalar_dependences): Call rename_phis_end_scop.
2890 (sese_add_exit_phis_edge): Do not use integer_zero_node.
2891 (find_cloog_iv_in_expr, compute_cloog_iv_types_1,
2892 compute_cloog_iv_types): New.
2893 (gloog): Call compute_cloog_iv_types before starting the
2894 translation of the clast.
2896 * graphite.h (struct graphite_bb): New field cloog_iv_types.
2897 (GBB_CLOOG_IV_TYPES): New.
2898 (debug_ivtype_map): Declared.
2899 (oldiv_for_loop): New.
2901 2008-12-10 Tobias Grosser <grosser@fim.uni-passau.de>
2904 * graphite.c (new_scop): Initialize SCOP_ADD_PARAMS.
2905 (param_index): Assert if parameter is not know after parameter
2907 (find_params_in_bb): Detect params directly in GBB_CONDITIONS.
2908 (find_scop_parameters): Mark, that we have finished parameter
2910 (graphite_transform_loops): Move condition detection before parameter
2912 * graphite.h (struct scop): Add SCOP_ADD_PARAMS.
2913 * testsuite/gfortran.dg/graphite/pr38459.f90: New.
2915 2008-12-09 Tobias Grosser <grosser@fim.uni-passau.de>
2917 * graphite.c (graphite_transform_loops): Always call find_transform ()
2918 in ENABLE_CHECKING. So we test these code paths, even if we do not
2921 2008-12-09 Tobias Grosser <grosser@fim.uni-passau.de>
2923 * graphite.c (print_graphite_bb): Fix printing to file != dump_file.
2924 (print_scop): Ditto.
2926 2008-12-08 Tobias Grosser <grosser@fim.uni-passau.de>
2929 Fix testsuite/gfortran.dg/graphite/id-3.f90.
2930 * graphite.c (scopdet_basic_block_info): Fix bug that found some
2931 regions more than once.
2933 2008-12-03 Sebastian Pop <sebastian.pop@amd.com>
2935 Fix testsuite/gfortran.dg/graphite/id-4.f90.
2936 * graphite.c (scan_tree_for_params): Do not compute the multiplicand
2939 2008-12-03 Sebastian Pop <sebastian.pop@amd.com>
2941 Fix testsuite/gfortran.dg/graphite/id-1.f90.
2942 * graphite.c (gmp_cst_to_tree): Pass the type in parameter.
2943 (loop_iv_stack_patch_for_consts): Update use of gmp_cst_to_tree.
2944 (max_precision_type): New.
2945 (value_clast): Removed.
2946 (clast_to_gcc_expression): Be more careful to types of expressions.
2947 Use max_precision_type and update use of gmp_cst_to_tree.
2948 (graphite_translate_clast_equation): Use max_precision_type.
2949 (graphite_create_guard_cond_expr): Do not use integer_type_node,
2950 use the type of the condition.
2951 (graphite_create_new_loop): Do not use integer_type_node, use the
2952 max_precision_type of lb and ub.
2954 2008-12-03 Sebastian Pop <sebastian.pop@amd.com>
2956 * graphite.c (build_scops_1): Initialize open_scop.exit
2959 2008-12-02 Sebastian Pop <sebastian.pop@amd.com>
2961 * testsuite/gcc.dg/graphite/pr38084.c: New.
2962 * testsuite/gfortran.dg/graphite/id-1.f90: New.
2963 * testsuite/gfortran.dg/graphite/id-2.f90: New.
2964 * testsuite/gfortran.dg/graphite/id-3.f90: New.
2965 * testsuite/gfortran.dg/graphite/id-4.f90: New.
2966 * testsuite/gfortran.dg/graphite/pr37857.f90: New.
2968 2008-12-02 Sebastian Pop <sebastian.pop@amd.com>
2969 Jan Sjodin <jan.sjodin@amd.com>
2970 Harsha Jagasia <harsha.jagasia@amd.com>
2982 * testsuite/gcc.dg/graphite/pr38073.c: New.
2983 * testsuite/gcc.dg/graphite/pr37928.c: New.
2984 * testsuite/gcc.dg/graphite/pr37883.c: New.
2985 * testsuite/gcc.dg/graphite/pr38125.c: New.
2986 * testsuite/gfortran.dg/graphite/pr38083.f90: New.
2987 * testsuite/gfortran.dg/graphite/pr37852.f90: New.
2988 * testsuite/gfortran.dg/graphite/pr37980.f90: New.
2990 * testsuite/gcc.dg/graphite/scop-18.c: Remove reduction, test for
2991 the number of detected scops. Copy exact same test for loop
2993 * testsuite/gcc.dg/graphite/block-1.c: Fix the number of expected
2994 loops to be blocked as reductions are not handled.
2995 * testsuite/gcc.dg/graphite/block-4.c: ...here. New.
2997 * tree-phinodes.c (remove_phi_nodes): New, extracted from...
2998 * tree-cfg.c (remove_phi_nodes_and_edges_for_unreachable_block):
3000 * tree-flow.h (remove_phi_nodes, canonicalize_loop_ivs): Declared.
3001 * Makefile.in (graphite.o): Depend on value-prof.h.
3002 (graphite.o-warn): Removed -Wno-error.
3003 * tree-parloops.c (canonicalize_loop_ivs): Allow reduction_list
3004 to be a NULL pointer. Call update_stmt. Return the newly created
3005 cannonical induction variable.
3007 * graphite.h (debug_rename_map): Declared. Fix some comments.
3009 * graphite.c: Reimplement the code generation from graphite to gimple.
3010 Include value-prof.h.
3011 (loop_iv_stack_get_iv): Do not return NULL for constant substitutions.
3012 (get_old_iv_from_ssa_name): Removed.
3013 (graphite_stmt_p): New.
3014 (new_graphite_bb): Test for useful statements before building a
3015 graphite statement for the basic block.
3016 (free_graphite_bb): Do not free GBB_DATA_REFS: this is a bug
3017 in free_data_ref that calls BITMAP_FREE (DR_VOPS (dr)) without
3019 (recompute_all_dominators, graphite_verify,
3020 nb_reductions_in_loop, graphite_loop_normal_form): New.
3021 (scop_record_loop): Call graphite_loop_normal_form.
3022 (build_scop_loop_nests): Iterate over all the blocks of the
3023 function instead of relying on the incomplete information from
3024 SCOP_BBS. Return the success of the operation.
3025 (find_params_in_bb): Use the data from GBB_DATA_REFS.
3026 (add_bb_domains): Removed.
3027 (build_loop_iteration_domains): Don't call add_bb_domains.
3028 Add the iteration domain only to the basic blocks that have been
3029 translated to graphite.
3030 (build_scop_conditions_1): Add constraints only if the basic
3031 block have been translated to graphite.
3032 (build_scop_data_accesses): Completely disabled until data
3033 dependence is correctly implemented.
3034 (debug_rename_elt, debug_rename_map_1, debug_rename_map): New.
3035 (remove_all_edges_1, remove_all_edges): Removed.
3036 (get_new_name_from_old_name): New.
3037 (graphite_rename_variables_in_stmt): Renamed
3038 rename_variables_in_stmt. Call get_new_name_from_old_name.
3039 Use replace_exp and update_stmt.
3040 (is_old_iv): Renamed is_iv.
3041 (expand_scalar_variables_stmt): Extra parameter for renaming map.
3042 Use replace_exp and update_stmt.
3043 (expand_scalar_variables_expr): Same. Use the map to get the
3044 new names for the renaming of induction variables and for the
3045 renaming of variables after a basic block has been copied.
3046 (expand_scalar_variables): Same.
3047 (graphite_rename_variables): Renamed rename_variables.
3048 (move_phi_nodes): Removed.
3049 (get_false_edge_from_guard_bb): New.
3050 (build_iv_mapping): Do not insert the induction variable of a
3051 loop in the renaming iv map if the basic block does not belong
3053 (register_old_new_names, graphite_copy_stmts_from_block,
3054 copy_bb_and_scalar_dependences): New.
3055 (translate_clast): Heavily reimplemented: copy basic blocks,
3056 do not move them. Finally, in call cleanup_tree_cfg in gloog.
3057 At each translation step call graphite_verify ensuring the
3058 consistency of the SSA, loops and dominators information.
3059 (collect_virtual_phis, find_vdef_for_var_in_bb,
3060 find_vdef_for_var_1, find_vdef_for_var,
3061 patch_phis_for_virtual_defs): Removed huge hack.
3062 (mark_old_loops, remove_dead_loops, skip_phi_defs,
3063 collect_scop_exit_phi_args, patch_scop_exit_phi_args,
3064 gbb_can_be_ignored, scop_remove_ignoreable_gbbs, ): Removed.
3065 (remove_sese_region, ifsese, if_region_entry, if_region_exit,
3066 if_region_get_condition_block, if_region_set_false_region,
3067 create_if_region_on_edge, move_sese_in_condition, bb_in_sese_p,
3068 sese_find_uses_to_rename_use, sese_find_uses_to_rename_bb,
3069 sese_add_exit_phis_edge, sese_add_exit_phis_var,
3070 rewrite_into_sese_closed_ssa): New.
3071 (gloog): Remove dead code. Early return if code cannot be
3072 generated. Call cleanup_tree_cfg once the scop has been code
3074 (graphite_trans_scop_block, graphite_trans_loop_block): Do not
3075 block loops with less than two loops.
3076 (graphite_apply_transformations): Remove the call to
3077 scop_remove_ignoreable_gbbs.
3078 (limit_scops): When build_scop_loop_nests fails, continue on
3079 the next scop. Fix open_scop.entry.
3080 (graphite_transform_loops): Call recompute_all_dominators: force the
3081 recomputation of correct CDI_DOMINATORS and CDI_POST_DOMINATORS.
3082 Call initialize_original_copy_tables and free_original_copy_tables
3083 to be able to copy basic blocks during code generation.
3084 When build_scop_loop_nests fails, continue on next scop.
3085 (value_clast): New union.
3086 (clast_to_gcc_expression): Fix type cast warning.
3088 2008-11-09 Sebastian Pop <sebastian.pop@amd.com>
3090 * Merge from mainline (r140838:141727).
3092 2008-11-05 Tobias Grosser <grosser@fim.uni-passau.de>
3096 * graphite.c (scan_tree_for_params): Add POINTER_PLUS_EXPR.
3098 2008-11-05 Tobias Grosser <grosser@fim.uni-passau.de>
3102 * graphite.c (scopdet_basic_block_info): Fix loops with multiple
3103 exits and conditions.
3104 * testsuite/gcc.dg/graphite/pr37943.c: New.
3106 2008-10-23 Tobias Grosser <grosser@fim.uni-passau.de>
3109 * graphite.c (gloog): Replace EXIT_BLOCK_PTR with scop exit.
3111 2008-10-23 Tobias Grosser <grosser@fim.uni-passau.de>
3113 * doc/invoke.texi: Fix spaces.
3115 2008-10-22 Sebastian Pop <sebastian.pop@amd.com>
3117 PR tree-optimization/37891
3118 Reverted last commit.
3119 * graphite.c (create_single_entry_edge): Set
3120 EDGE_IRREDUCIBLE_LOOP and BB_IRREDUCIBLE_LOOP.
3122 2008-10-21 Sebastian Pop <sebastian.pop@amd.com>
3123 Mitul Thakkar <mitul.thakkar@amd.com>
3125 * graphite.c (create_single_entry_edge): Set
3126 EDGE_IRREDUCIBLE_LOOP and BB_IRREDUCIBLE_LOOP.
3128 2008-10-16 Tobias Grosser <grosser@fim.uni-passau.de>
3130 * doc/invoke.texi: Add -fgraphite-identity.
3131 * graphite.c (graphite_apply_transformations): Check for
3132 -fgraphite-identity.
3133 * toplev.c (process_options): Add flag_graphite_identity.
3134 * tree-ssa-loop.c: Add flag_graphite_identity.
3136 2008-10-14 Sebastian Pop <sebastian.pop@amd.com>
3138 Undo changes from 2008-10-02:
3139 * tree-ssa-loop-ivopts.c (rewrite_use_nonlinear_expr): Convert
3140 operand type when copying the operand to a variable of different type.
3141 * cfgloopmanip.c (create_empty_loop_on_edge): Write exit condition
3142 with the IV name after increment.
3144 2008-10-14 Sebastian Pop <sebastian.pop@amd.com>
3145 Harsha Jagasia <harsha.jagasia@amd.com>
3147 PR tree-optimization/37828
3148 * testsuite/gcc.dg/graphite/pr37828.c: New.
3149 * graphite.c (graphite_trans_loop_block): Do not loop block
3150 single nested loops.
3152 2008-10-09 Harsha Jagasia <harsha.jagasia@amd.com>
3153 Sebastian Pop <sebastian.pop@amd.com>
3155 * graphite.c (struct rename_map_elt, new_rename_map_elt,
3156 rename_map_elt_info, eq_rename_map_elts): New.
3157 (graphite_rename_ivs_stmt): Renamed graphite_rename_variables_in_stmt.
3158 (expand_scalar_variables_expr): Change parameters.
3159 (expand_scalar_variables_stmt): Same.
3160 (expand_scalar_variables): Same.
3161 (graphite_rename_ivs): Rename graphite_rename_variables.
3162 (build_iv_mapping): New.
3163 (translate_clast): Call build_iv_mapping.
3164 * graphite.h (gbb_p): New name.
3166 2008-10-03 Harsha Jagasia <harsha.jagasia@amd.com>
3168 PR tree-optimization/37684
3169 * gcc.dg/graphite/pr37684.c: New.
3170 * graphite.c (exclude_component_ref): New.
3171 (is_simple_operand): Call exclude_component_ref.
3173 2008-10-02 Jan Sjodin <jan.sjodin@amd.com>
3174 Harsha Jagasia <harsha.jagasia@amd.com>
3176 PR tree-optimization/37485
3177 * gcc.dg/graphite/block-2.c: New
3178 * graphite.c (gmp_cst_to_tree): Moved.
3179 (iv_stack_entry_is_constant): New.
3180 (iv_stack_entry_is_iv): New.
3181 (loop_iv_stack_push): Renamed to loop_iv_stack_push_iv.
3182 (loop_iv_stack_insert_constant): New.
3183 (loop_iv_stack_pop): Use new datatpype.
3184 (loop_iv_stack_get_iv): Same.
3185 (loop_iv_stack_get_iv_from_name): Same.
3186 (loop_iv_stack_debug): Renamed to debug_loop_iv_stack.
3187 (loop_iv_stack_patch_for_consts): New.
3188 (loop_iv_stack_remove_constants): New.
3189 (graphite_create_new_loop): Use loop_iv_stack_push_iv.
3190 (translate_clast): Call loop_iv_stack_patch_for_consts and
3191 loop_iv_stack_remove_constants.
3192 (gloog): Use new datatype. Redirect construction edge to end
3193 block to avoid accidental deletion.
3194 * graphite.h (enum iv_stack_entry_kind): New. Tag for data in
3196 (union iv_stack_entry_data): New. Data in iv stack entry.
3197 (struct iv_stack_entry): New. Datatype for iv stack entries.
3199 2008-10-02 Sebastian Pop <sebastian.pop@amd.com>
3201 * tree-ssa-loop-ivopts.c (rewrite_use_nonlinear_expr): Convert
3202 operand type when copying the operand to a variable of different type.
3204 2008-10-02 Sebastian Pop <sebastian.pop@amd.com>
3206 * cfgloopmanip.c (create_empty_loop_on_edge): Write exit condition
3207 with the IV name after increment.
3209 2008-10-02 Sebastian Pop <sebastian.pop@amd.com>
3211 * Merge from mainline (r140164:140838).
3213 2008-09-10 Konrad Trifunovic <konrad.trifunovic@inria.fr>
3215 * graphite-data-ref.c: New.
3216 * graphite.c (print_scop): Also dump the dependence graph.
3217 (bb_in_scop_p, loop_in_scop_p, nb_loops_around_gb): Moved...
3218 (new_scop): Initialize SCOP_DEP_GRAPH.
3219 (build_scop_dynamic_schedules): New.
3220 (build_access_matrix_with_af): Fixed column numbering.
3221 (graphite_transform_loops): Call build_scop_dynamic_schedules.
3222 * graphite.h: Add ifndef/define guards against multiple inclusion.
3223 (struct scop): Add dep_graph field.
3224 (SCOP_DEP_GRAPH): Defined.
3225 (ref_nb_loops): Fixed and moved to other position.
3226 (bb_in_scop_p, loop_in_scop_p, nb_loops_around_gb): ... here.
3227 (nb_loops_around_loop_in_scop): New.
3228 (graphite_dump_dependence_graph): Declared.
3229 (graphite_build_rdg_all_levels): Declared.
3230 (graphite_test_dependence): Declared.
3231 * Makefile.in (graphite-data-ref.o): New target.
3233 2008-09-09 Sebastian Pop <sebastian.pop@amd.com>
3235 * Merge from mainline (139870:140164).
3237 2008-09-01 Sebastian Pop <sebastian.pop@amd.com>
3239 * Merge from mainline (138275:139870).
3240 * testsuite/gcc.dg/graphite/scop-matmult.c: XFailed as one of
3241 the commits from trunk broke the niter detection.
3243 2008-09-01 Sebastian Pop <sebastian.pop@amd.com>
3245 * graphite.c: Add more documentation. Fix formatting.
3246 (debug_loop_vec, debug_oldivs, loop_iv_stack,
3247 loop_iv_stack_debug): Moved...
3248 (schedule_to_scattering): Move before use.
3249 (dot_all_scops): Include in "#if 0" the code for system
3252 * graphite.h: (debug_loop_vec, debug_oldivs, loop_iv_stack,
3253 loop_iv_stack_debug): ...here.
3255 2008-08-29 Jan Sjodin <jan.sjodin@amd.com>
3257 * tree-phinodes.c (make_phi_node): Extern.
3258 (add_phi_node_to_bb): New.
3259 (create_phi_node): Call add_phi_node_to_bb.
3260 * tree-ssa-loop-ivopts.c (get_phi_with_result): New.
3261 (remove_statement): Handle case where stored phi was updated
3262 and is no longer the same.
3263 * graphite.c (is_parameter): New.
3265 (expand_scalar_variables_expr): New.
3266 (expand_scalar_variables_stmt): New.
3267 (expand_scalar_variables): New.
3268 (move_phi_nodes): Create new phi instead of moving old one.
3269 (translate_clast): Call expand_scalar_variables.
3270 (find_vdef_for_var_in_bb): Also scan regular definitions.
3271 (skip_phi_defs): New.
3272 (collect_scop_exit_phi_args): New.
3273 (patch_scop_exit_phi_args): New.
3274 (gloog): Patch phis after scop.
3275 * tree-flow.h: (add_phi_node_to_bb): Declared.
3276 (make_phi_node): Declared.
3278 2008-08-26 Sebastian Pop <sebastian.pop@amd.com>
3280 * graphite.c (end_scop): Split the entry of the scop when it
3281 is the header of the loop in which the scop is ending.
3282 (build_scops_1, limit_scops): Update uses of end_scop.
3284 2008-08-26 Sebastian Pop <sebastian.pop@amd.com>
3286 * graphite.c (dot_all_scops_1): Do not fail on uninitialized
3287 SCOP_ENTRY or SCOP_EXIT.
3289 2008-08-25 Sebastian Pop <sebastian.pop@amd.com>
3291 * graphite.c (get_construction_edge): Removed.
3292 (gloog): Construction edge is the scop entry edge.
3294 2008-08-25 Sebastian Pop <sebastian.pop@amd.com>
3296 * graphite.c (can_generate_for_scop): Removed.
3297 (gloog): Do not call it.
3299 2008-08-25 Sebastian Pop <sebastian.pop@amd.com>
3301 * graphite.c (new_scop): Entry of a scop is an edge.
3302 Initialize SESE region.
3303 (free_scop): Free SESE region.
3304 (build_scops_1, scopdet_bb_info): Work on edges, not on bbs.
3305 (split_difficult_bb): New, split from end_scop.
3306 (end_scop): Exit of a scop is an edge.
3307 (build_scop_bbs): Never check CDI_POST_DOMINATORS: this info is
3308 not automatically updated and thus is always wrong.
3309 * graphite.h (struct sese): New.
3312 (struct scop): New field for a SESE region. Remove entry, exit.
3313 (SCOP_ENTRY, SCOP_EXIT): Update definitions to match same
3314 semantics as before. Moved comment around.
3316 2008-08-25 Tobias Grosser <grosser@fim.uni-passau.de>
3317 Sebastian Pop <sebastian.pop@amd.com>
3319 * graphite.c (graphite_transform_loops): Always enable gloog
3320 and find_transform when ENABLE_CHECKING.
3322 2008-08-25 Sebastian Pop <sebastian.pop@amd.com>
3324 * graphite.c (graphite_transform_loops): Move pretty printer
3325 of SCOPs before doing any transform. Remove call to print_scops
3326 and dot_all_scops_1.
3328 2008-08-25 Sebastian Pop <sebastian.pop@amd.com>
3330 * graphite.c (dump_gbb_conditions): Don't try to print NULL pointers.
3331 (print_graphite_bb): Same.
3333 2008-08-25 Sebastian Pop <sebastian.pop@amd.com>
3335 * graphite.c (dot_all_scops_1): Cleanup.
3336 (move_scops): Fix comment.
3338 2008-08-25 Sebastian Pop <sebastian.pop@amd.com>
3340 * graphite.c (build_scop_bbs): Revert commit 139355:
3342 2008-08-20 Sebastian Pop <sebastian.pop@amd.com>
3343 Dwarakanath Rajagopal <dwarak.rajagopal@amd.com>
3345 * graphite.c (build_scop_bbs): Factor up code.
3347 2008-08-25 Tobias Grosser <grosser@fim.uni-passau.de>
3349 * graphite.c (gloog): Update dominator info.
3351 2008-08-25 Tobias Grosser <grosser@fim.uni-passau.de>
3353 * graphite.c (remove_cond_exprs): Do not fail on empty bbs.
3355 2008-08-24 Sebastian Pop <sebastian.pop@amd.com>
3357 * graphite.c (new_graphite_bb): Remove GBB_INDEX_TO_NUM_MAP
3359 (free_graphite_bb): Remove GBB_INDEX_TO_NUM_MAP free.
3360 (translate_clast): Correct formatting.
3361 * graphite.h (struct num_map): Removed.
3362 (struct graphite_bb): Remove num_map field.
3363 (GBB_INDEX_TO_NUM_MAP): Removed.
3365 2008-08-24 Sebastian Pop <sebastian.pop@amd.com>
3367 * graphite.c (build_access_matrix_with_af): Fix comments.
3368 (build_scop_data_accesses): Same.
3370 2008-08-24 Sebastian Pop <sebastian.pop@amd.com>
3372 * graphite.c (build_scop_data_accesses): Don't construct
3373 access matrices. Add a FIXME and an assert condition that
3374 should pass when the access matrices will be needed.
3376 2008-08-24 Sebastian Pop <sebastian.pop@amd.com>
3378 * tree-data-ref.c (stmt_simple_memref_p): Don't call
3380 * graphite.c (build_graphite_bb): Renamed new_graphite_bb.
3381 Moved close by free_graphite_bb.
3382 (free_graphite_bb): Call free_data_refs. Reset bb->aux.
3383 (new_scop): Move close by free_scop.
3384 (graphite_transform_loops): Avoid linear scan to reset bb->aux.
3386 2008-08-22 Jan Sjodin <jan.sjodin@amd.com>
3388 * cfgloopmanip.c (create_empty_if_region_on_edge): New.
3389 * graphite.c (clast_to_gcc_expression): Call gmp_cst_to_tree
3390 instead of recursive call.
3391 (graphite_translate_clast_equation): New.
3392 (graphite_create_guard_cond_expr): New.
3393 (graphite_create_new_guard): New.
3394 (get_stack_index_from_iv): Removed.
3395 (graphite_rename_ivs_stmt): Use gbb_loop_index.
3396 (get_true_edge_from_guard_bb): New.
3397 (translate_clast): Handle stmt_guard in clast.
3398 (get_construction_edge): Allow construction edge detection for
3399 a scope entry with multiple predecessors if one predecessor is
3400 the immediate dominator of scope entry.
3401 (can_generate_code_stmt): Enable code generation for clast_guard.
3402 (gloog): Use correct context loop. Removed check for post dominators.
3403 * cfgloop.h (create_empty_if_region_on_edge): Declared.
3405 2008-08-21 Sebastian Pop <sebastian.pop@amd.com>
3407 * graphite.c (remove_dead_loops): Document better which
3410 2008-08-21 Sebastian Pop <sebastian.pop@amd.com>
3412 * Makefile.in: Rename POLYLIBLIBS and POLYLIBINC to PPLLIBS
3414 (graphite.o): Also depends on pointer-set.h.
3416 2008-08-21 Sebastian Pop <sebastian.pop@amd.com>
3418 * graphite.c (scop_record_loop): Fix compile warning.
3420 2008-08-21 Harsha Jagasia <harsha.jagasia@amd.com>
3421 Sebastian Pop <sebastian.pop@amd.com>
3423 * graphite.c (scop_record_loop): DECL_NAME can be NULL.
3425 2008-08-21 Sebastian Pop <sebastian.pop@amd.com>
3427 * graphite.c (build_graphite_bb): Initialize bb->aux to
3428 point to the graphite_bb_p.
3429 (graphite_bb_from_bb): Renamed gbb_from_bb; returns the
3431 (add_bb_domains): Does not use the scop parameter.
3432 (graphite_transform_loops): Clean bb->aux at the end.
3434 2008-08-20 Dwarakanath Rajagopal <dwarak.rajagopal@amd.com>
3435 Sebastian Pop <sebastian.pop@amd.com>
3437 * testsuite/lib/target-supports.exp
3438 (check_effective_target_fgraphite): New.
3440 * testsuite/gcc.dg/graphite/graphite.exp: Early exit when
3441 check_effective_target_fgraphite returns false.
3442 Set dg-do-what-default to compile.
3443 (scan-graphite-dump-times): Removed.
3444 * testsuite/gfortran.dg/graphite/graphite.exp: Same.
3446 * testsuite/gcc.dg/graphite/scop-0.c: Do not use "dg-do compile".
3447 Use scan-tree-dump-times instead of scan-graphite-dump-times.
3448 * testsuite/gcc.dg/graphite/scop-1.c: Same.
3449 * testsuite/gcc.dg/graphite/scop-2.c: Same.
3450 * testsuite/gcc.dg/graphite/scop-3.c: Same.
3451 * testsuite/gcc.dg/graphite/scop-4.c: Same.
3452 * testsuite/gcc.dg/graphite/scop-5.c: Same.
3453 * testsuite/gcc.dg/graphite/scop-6.c: Same.
3454 * testsuite/gcc.dg/graphite/scop-7.c: Same.
3455 * testsuite/gcc.dg/graphite/scop-8.c: Same.
3456 * testsuite/gcc.dg/graphite/scop-9.c: Same.
3457 * testsuite/gcc.dg/graphite/scop-10.c: Same.
3458 * testsuite/gcc.dg/graphite/scop-11.c: Same.
3459 * testsuite/gcc.dg/graphite/scop-12.c: Same.
3460 * testsuite/gcc.dg/graphite/scop-13.c: Same.
3461 * testsuite/gcc.dg/graphite/scop-matmult.c: Same.
3462 * testsuite/gcc.dg/graphite/scop-14.c: Same.
3463 * testsuite/gcc.dg/graphite/scop-15.c: Same.
3464 * testsuite/gcc.dg/graphite/block-0.c: Same.
3465 * testsuite/gcc.dg/graphite/scop-16.c: Same.
3466 * testsuite/gcc.dg/graphite/block-1.c: Same.
3467 * testsuite/gcc.dg/graphite/scop-17.c: Same.
3468 * testsuite/gcc.dg/graphite/scop-18.c: Same.
3469 * testsuite/gfortran.dg/graphite/block-1.f90: Same.
3470 * testsuite/gfortran.dg/graphite/scop-1.f: Same.
3471 * testsuite/gfortran.dg/graphite/block-2.f: Same.
3473 2008-08-20 Sebastian Pop <sebastian.pop@amd.com>
3475 * graphite.c: Fix some XXX comments.
3476 (build_scop_dynamic_schedules): Removed.
3478 2008-08-20 Sebastian Pop <sebastian.pop@amd.com>
3480 * graphite.h (scop_max_loop_depth): Moved...
3481 * graphite.c (scop_max_loop_depth): ...here.
3482 (remove_all_edges_1): New.
3483 (remove_all_edges): Factored code.
3484 (remove_cond_exprs): Check only the last statement for
3485 a GIMPLE_COND expression.
3487 2008-08-20 Sebastian Pop <sebastian.pop@amd.com>
3489 * graphite.c (scan_tree_for_params): Early return when the
3490 expression is a chrec_dont_know. Handle case NEGATE_EXPR.
3491 (find_scop_parameters): Factor out code.
3492 (graphite_trans_bb_strip_mine): Remove dead code.
3494 2008-08-20 Sebastian Pop <sebastian.pop@amd.com>
3496 * graphite.c (clast_to_gcc_expression, graphite_create_new_loop,
3497 graphite_trans_bb_move_loop): Factor asserts.
3498 (gloog): Perform sanity checks only for ENABLE_CHECKING.
3499 Do not call calculate_dominance_info and estimate_bb_frequencies.
3501 2008-08-20 Jan Sjodin <jan.sjodin@amd.com>
3503 * graphite.c (create_loops_mapping, free_loops_mapping,
3504 create_loops_mapping_num, debug_loop_mapping_1,
3505 debug_loop_mapping, graphite_loops_mapping_max_loop_num,
3506 get_loop_mapping_for_num, graphite_loops_mapping_add_child,
3507 graphite_loops_mapping_add_child_num,
3508 graphite_loops_mapping_insert_child,
3509 graphite_loops_mapping_parent, get_loop_mapped_depth_for_num,
3510 get_loop_mapped_depth, split_loop_mapped_depth_for_num,
3511 loop_mapped_depth_split_loop, swap_loop_mapped_depth_for_num,
3512 create_num_from_index, get_num_from_index,
3513 swap_loop_mapped_depth): Removed.
3514 (new_scop): Do not initialize SCOP_LOOPS_MAPPING.
3515 (free_scop): Do not call free_loops_mapping.
3516 (graphite_get_new_iv_stack_index_from_old_iv): Renamed
3517 get_stack_index_from_iv. Use GBB_LOOPS instead of calling
3518 get_loop_mapped_depth.
3519 (graphite_trans_bb_move_loop): Do not update the loop mapping.
3520 (graphite_trans_bb_strip_mine): Same.
3521 * graphite.h (graphite_loops_mapping, graphite_loop_node): Removed.
3522 (struct scop): Remove field loops_mapping.
3524 2008-08-20 Sebastian Pop <sebastian.pop@amd.com>
3525 Dwarakanath Rajagopal <dwarak.rajagopal@amd.com>
3527 * graphite.c (scop_record_loop): Factor out one level of the
3528 condition by early return.
3529 (build_scop_loop_nests): Format following FSF coding style.
3530 (build_scop_dynamic_schedules): Factor out code.
3531 (scopdet_bb_info): Reindent. Default case should not be reachable.
3533 2008-08-20 Sebastian Pop <sebastian.pop@amd.com>
3534 Dwarakanath Rajagopal <dwarak.rajagopal@amd.com>
3536 * graphite.c (loop_affine_expr): Check for DECL_P or struct
3537 assignments that are not handled as simple operands for now.
3539 2008-08-20 Sebastian Pop <sebastian.pop@amd.com>
3540 Dwarakanath Rajagopal <dwarak.rajagopal@amd.com>
3542 * graphite.c (build_scop_bbs): Factor up code.
3544 2008-08-20 Sebastian Pop <sebastian.pop@amd.com>
3545 Dwarakanath Rajagopal <dwarak.rajagopal@amd.com>
3547 * graphite.c (stmt_simple_for_scop_p): Factor code out
3549 (enum gbb_type): New. Group all the GBB_* types under it.
3550 (is_loop_exit): Moved...
3551 (end_scop): Enable BB spliting.
3552 * cfgloop.c (is_loop_exit): ...here. Reimplemented.
3553 * cfgloop.h (is_loop_exit): Declared.
3555 2008-08-20 Sebastian Pop <sebastian.pop@amd.com>
3557 * doc/invoke.texi: Remove strides from examples containing
3558 DO loops when the strides are equal to 1.
3560 2008-08-20 Harsha Jagasia <harsha.jagasia@amd.com>
3561 Dwarakanath Rajagopal <dwarak.rajagopal@amd.com>
3563 * graphite.c (graphite_trans_scop_block): Or the result with
3564 the result from graphite_trans_loop_block.
3565 * testsuite/gcc.dg/graphite/block-1.c: New.
3566 * testsuite/gfortran.dg/graphite/block-1.f90: New.
3567 * testsuite/gfortran.dg/graphite/block-2.f: New.
3569 2008-08-20 Sebastian Pop <sebastian.pop@amd.com>
3571 * graphite.c (graphite_transform_loops): Call cloog_initialize
3574 2008-08-20 Sebastian Pop <sebastian.pop@amd.com>
3576 * tree-data-ref.c) (stmt_simple_memref_p): New.
3577 * tree-data-ref.h (stmt_simple_memref_p): Declared.
3578 * graphite.c (stmt_simple_memref_for_scop_p): Removed.
3579 (is_simple_operand): Call stmt_simple_memref_p.
3581 * testsuite/gcc.dg/graphite/scop-matmult.c: Updated for not
3582 using pointer arithmetic, as this is optimized by PRE and
3583 makes the code too difficult to analyze.
3585 * testsuite/gcc.dg/graphite/scop-18.c: Same.
3587 2008-08-20 Sebastian Pop <sebastian.pop@amd.com>
3589 * gdbinit.in (pgg): New.
3591 2008-08-15 Tobias Grosser <grosser@fim.uni-passau.de>
3593 * graphite.c (graphite_trans_loop_block): Fix warning.
3595 2008-08-15 Tobias Grosser <grosser@fim.uni-passau.de>
3597 * graphite.c (graphite_trans_loop_block): Fix my merge error.
3599 2008-08-15 Tobias Grosser <grosser@fim.uni-passau.de>
3601 * graphite.c (graphite_trans_bb_block): Remove check for
3602 flag_loop_strip_mine, flag_loop_block, flag_loop_interchange.
3603 Check if loop blocking is profitable for every loop, before applying
3605 (graphite_apply_transformations): Call graphite_trans_bb_block only,
3606 if flag_loop_block is set.
3608 2008-08-14 Sebastian Pop <sebastian.pop@amd.com>
3610 * graphite.c: Add some more documentation for the loop
3613 2008-08-14 Sebastian Pop <sebastian.pop@amd.com>
3615 * Makefile.in (tree-data-ref.o): Remove dependence on graphite.h.
3616 * graphite.c: Format on less than 80 columns.
3619 2008-08-14 Sebastian Pop <sebastian.pop@amd.com>
3621 * cfgloopmanip.c (loopify): Use update_dominators_in_loop.
3623 2008-08-14 Sebastian Pop <sebastian.pop@amd.com>
3625 * doc/invoke.texi (floop-block, floop-strip-mine,
3626 floop-interchange): Update documentation with examples.
3628 2008-08-13 Sebastian Pop <sebastian.pop@amd.com>
3630 * cfgloopmanip.c (create_empty_loop_on_edge): Don't call
3632 * graphite.c (graphite_create_new_loop): Call add_referenced_var.
3634 2008-08-13 Sebastian Pop <sebastian.pop@amd.com>
3636 * cfgloopmanip.c (create_empty_loop_on_edge): Improve documentation.
3637 Factor gcc_asserts into a single one. Use force_gimple_operand_gsi.
3638 * tree-scalar-evolution.c: Revert useless changes.
3639 * tree-phinodes.c: Same.
3642 * tree-vectorizer.h: Same.
3643 * tree-flow.h: Same.
3645 * common.opt (fgraphite): Update documentation.
3647 2008-08-12 Harsha Jagasia <harsha.jagasia@amd.com>
3649 * doc/invoke.texi (-floop-block, -floop-strip-mine,
3650 -floop-interchange): Add more text for explaining what each of these
3652 * tree-into-ssa.c (gimple_vec): Moved to...
3653 * graphite.c: Include gimple.h.
3654 (gimple_vec): Moved to...
3655 (del_loop_to_cloog_loop): Removed.
3656 (loop_affine_expr): Do not call create_data_ref when the
3657 operand is a constant.
3658 (new_scop): Use free instead of del_loop_to_cloog_loop.
3659 * Makefile.in (graphite.o): Depend on GIMPLE_H.
3660 * gimple.h (gimple_vec): ... here.
3662 2008-08-11 Tobias Grosser <grosser@fim.uni-passau.de>
3664 * graphite.c (scopdet_bb_info): Only allow loops with known number of
3666 (build_loop_iteration_domains): Fail, if latch executions unknown.
3668 2008-08-11 Tobias Grosser <grosser@fim.uni-passau.de>
3670 * graphite.c (add_conditions_to_domain): New.
3671 (build_scop_conditions_1): Call add_conditions_to_domain.
3672 (set_cloog_options): Allow to disable optimizations.
3674 2008-08-11 Tobias Grosser <grosser@fim.uni-passau.de>
3676 * graphite.c (find_params_in_bb): Look for parameters in conditions.
3677 Do not use walk_dominator_tree.
3678 (find_scop_parameters): Do not use walk_dominator_tree.
3680 2008-08-11 Tobias Grosser <grosser@fim.uni-passau.de>
3682 * graphite.c (scan_tree_for_params) Add / Subtract inequality.
3683 (idx_record_params): Adapt.
3684 * graphite.h (scop_gimple_loop_depth): New.
3686 2008-08-11 Tobias Grosser <grosser@fim.uni-passau.de>
3688 * graphite.c (build_scop_dynamic_schedules): Remove value_init.
3689 (scan_tree_for_params): Remove value_init.
3690 (build_scop_context): Remove value_init.
3691 (build_loop_iteration_domains): Remove value_init.
3692 (schedule_to_scattering): Remove value_init.
3693 (graphite_trans_bb_strip_mine): Remove value_init.
3695 2008-08-11 Tobias Grosser <grosser@fim.uni-passau.de>
3697 * gcc/graphite.c (limit_scops): New.
3698 (graphite_transform_loops): Add limit SCoPs.
3699 * gcc/testsuite/gcc.dg/graphite/scop-0.c: Update number of SCoPs.
3700 * gcc/testsuite/gcc.dg/graphite/scop-1.c: Update number of SCoPs.
3701 * gcc/testsuite/gcc.dg/graphite/scop-10.c: Update number of SCoPs.
3702 * gcc/testsuite/gcc.dg/graphite/scop-11.c: Update number of SCoPs.
3703 * gcc/testsuite/gcc.dg/graphite/scop-12.c: Update number of SCoPs.
3704 * gcc/testsuite/gcc.dg/graphite/scop-13.c: Update number of SCoPs.
3705 * gcc/testsuite/gcc.dg/graphite/scop-14.c: Update number of SCoPs.
3706 * gcc/testsuite/gcc.dg/graphite/scop-15.c: Update number of SCoPs.
3707 * gcc/testsuite/gcc.dg/graphite/scop-16.c: Update number of SCoPs.
3708 Change loop numbers.
3709 * gcc/testsuite/gcc.dg/graphite/scop-17.c: Update number of SCoPs.
3710 Change loop numbers.
3711 * gcc/testsuite/gcc.dg/graphite/scop-18.c: Update number of SCoPs.
3712 * gcc/testsuite/gcc.dg/graphite/scop-2.c: Update number of SCoPs.
3713 * gcc/testsuite/gcc.dg/graphite/scop-3.c: Update number of SCoPs.
3714 * gcc/testsuite/gcc.dg/graphite/scop-4.c: Update number of SCoPs.
3715 * gcc/testsuite/gcc.dg/graphite/scop-5.c: Update number of SCoPs.
3716 * gcc/testsuite/gcc.dg/graphite/scop-6.c: Update number of SCoPs.
3717 * gcc/testsuite/gcc.dg/graphite/scop-7.c: Update number of SCoPs.
3718 * gcc/testsuite/gcc.dg/graphite/scop-8.c: Update number of SCoPs.
3719 * gcc/testsuite/gcc.dg/graphite/scop-9.c: Update number of SCoPs.
3720 * gcc/testsuite/gcc.dg/graphite/scop-matmult.c: Update number of SCoPs.
3722 2008-08-11 Tobias Grosser <grosser@fim.uni-passau.de>
3724 * graphite.c (graphite_transform_loops): Call always find_transform.
3726 2008-08-08 Tobias Grosser <grosser@fim.uni-passau.de>
3728 * graphite.c (free_loops_mapping): New.
3729 (stmt_simple_for_scop_p): Fix typo.
3730 (stmt_simple_for_scop_p): Fix tuples functions, that
3732 (free_graphite_bb): Fix some memleaks.
3733 (free_scop): Fix some memleaks.
3734 (scopdet_bb_info): Do not forget some tmp SCoPs.
3735 (find_params_in_bb): Fix some memleaks.
3736 (clast_to_gcc_expression): Fix warning.
3738 2008-08-07 Tobias Grosser <grosser@fim.uni-passau.de>
3740 * testsuite/gcc.dg/graphite/scop-16.c: Fix for 32bit.
3741 * testsuite/gcc.dg/graphite/scop-17.c: Fix for 32bit.
3743 2008-08-04 Sebastian Pop <sebastian.pop@amd.com>
3745 * tree-ssa-loop.c (tree-ssa-loop.o): Do not include toplev.h.
3746 Move code ifdef-ed HAVE_cloog...
3747 * graphite.c: Include toplev.h.
3749 * Makefile.in (OBJS-common): Always build graphite.o.
3750 (BACKEND): Remove @GRAPHITE@.
3751 (tree-ssa-loop.o): Do not depend on TOPLEV_H.
3752 (graphite.o): Depend on TOPLEV_H.
3754 2008-08-04 Sebastian Pop <sebastian.pop@amd.com>
3756 * Makefile.in (tree-ssa-loop.o): Depend on TOPLEV_H.
3757 Remove typo left from polylib to ppl conversion.
3758 * graphite.c (graphite_transforms): Use sorry instead of fatal.
3760 2008-08-03 Sebastian Pop <sebastian.pop@amd.com>
3762 * toplev.c (process_options): Move the graphite loop optimization
3764 * tree-ssa-loop.c (graphite_transforms): ... here.
3765 When not configured with CLooG, print to dump_file that
3766 Graphite transforms were not performed.
3767 * testsuite/gcc.dg/graphite/graphite.exp (scan-graphite-dump-times):
3769 * testsuite/gcc.dg/graphite/*.c: Updated all testcases to use
3770 scan-graphite-dump-times.
3772 2008-08-03 Sebastian Pop <sebastian.pop@amd.com>
3774 * graphite.c (dot_scop, dot_all_scops): Do not call system.
3775 Do not open /tmp/scop.dot and /tmp/allscops.dot.
3777 2008-08-02 Sebastian Pop <sebastian.pop@amd.com>
3778 Jan Sjodin <jan.sjodin@amd.com>
3780 * configure: Regenerated.
3781 * omp-low.c (expand_omp_sections): Remove now unused code.
3782 * config.in (HAVE_polylib): Removed.
3783 * configure.ac (HAVE_polylib, POLYLIBLIBS, POLYLIBINC): Removed.
3784 (PPLLIBS, PPLINC): Added.
3785 * graphite.c: Replace unsigned with int wherever possible.
3786 Don't access Cloog's data structures, but use accessor functions.
3787 Clast's stmt->type is now implemented as a vtable: change the
3788 switches of stmt->type into ifs.
3789 (polylib/polylibgmp.h): Don't include.
3790 (initialize_dependence_polyhedron,
3791 initialize_data_dependence_polyhedron, is_empty_polyhedron,
3792 statement_precedes_p, test_dependence, build_rdg_all_levels,
3793 dump_dependence_graph): Removed until this code is cleaned up
3795 * Makefile.in (POLYLIBLIBS): Renamed PPLLIBS.
3796 (POLYLIBINC): Renamed PPLINC.
3798 2008-08-01 Harsha Jagasia <harsha.jagasia@amd.com>
3799 Dwarakanath Rajagopal <dwarak.rajagopal@amd.com>
3800 Jan Sjodin <jan.sjodin@amd.com>
3802 Finish the merge and tuplification of graphite.
3804 2008-07-24 Sebastian Pop <sebastian.pop@amd.com>
3805 Jan Sjodin <jan.sjodin@amd.com>
3807 Partial merge from mainline (138072:138275).
3808 * graphite.c still has to be tuplified.
3810 2008-07-29 Jan Sjodin <jan.sjodin@amd.com>
3812 * graphite.c (graphite_loops_mapping_max_loop_num): New.
3813 (create_num_from_index): New.
3814 (get_num_from_index): Also pass in the graphite BB.
3815 (free_graphite_bb): Free GBB_INDEX_TO_NUM_MAP.
3816 (build_graphite_bb): Initialize GBB_INDEX_TO_NUM_MAP.
3817 (graphite_trans_bb_strip_mine): Call create_num_from_index.
3818 (is_interchange_valid): Return false when failing.
3819 * graphite.h (struct num_map): New.
3820 (struct graphite_bb): New field num_map.
3821 (GBB_LOOPS_MAPPING): Renamed GBB_INDEX_TO_NUM_MAP.
3823 2008-07-29 Tobias Grosser <grosser@fim.uni-passau.de>
3825 * graphite.c (dump_gbb_conditions): Print also conditions like
3826 "if (a)". Remove dublicated code and use print_generic_expr ().
3827 (stmt_simple_for_scop_p): Only allow conditions we can handle
3830 2008-07-25 Jan Sjodin <jan.sjodin@amd.com>
3832 * graphite.h (struct scop): Removed new_ivs field.
3833 (SCOP_NEWIVS): Deleted.
3834 * graphite.c (new_scop, free_scop, clast_name_to_gcc,
3835 clast_to_gcc_expression, graphite_create_new_loop):
3836 Removed use of new_ivs.
3838 2008-07-25 Jan Sjodin <jan.sjodin@amd.com>
3840 * graphite.c (debug_oldivs, debug_loop_vec, create_loops_mapping,
3841 create_loops_mapping_num, debug_loop_mapping_1): New.
3842 (debug_loop_mapping): Call debug_loop_mapping_1.
3843 (get_loop_mapping_for_num,
3844 graphite_loops_mapping_add_child,
3845 graphite_loops_mapping_add_child_num,
3846 graphite_loops_mapping_insert_child,
3847 graphite_loops_mapping_parent,
3848 split_loop_mapped_depth_for_num,
3849 loop_mapped_depth_split_loop): New.
3850 (increment_loop_mapped_depths): Removed.
3851 (swap_loop_mapped_depth_for_num): Reimplemented.
3852 (new_scop): Call create_loops_mapping.
3853 (scop_record_loop): Call graphite_loops_mapping_insert_child.
3854 (translate_clast): Pass the old loop father in parameter, and pass
3855 it to get_old_iv_from_ssa_name.
3856 (remove_edges_around_useless_blocks, can_generate_code_stmt,
3857 can_generate_code, can_generate_for_scop): New.
3858 (graphite_trans_bb_block): Returns false when it fails to transform.
3859 * graphite.h (graphite_loop_node, graphite_loops_mapping): New.
3861 2008-07-25 Sebastian Pop <sebastian.pop@amd.com>
3863 Reverted all the changes related to the streamization and
3865 These changes are now tracked in the streamization branch.
3867 2008-07-25 Sebastian Pop <sebastian.pop@amd.com>
3868 Jan Sjodin <jan.sjodin@amd.com>
3870 * graphite.c (gbb_compare): Correctly constify.
3871 (gbb_can_be_ignored): Indent.
3872 (graphite_trans_scop_swap_1and2): Add legality check.
3875 2008-07-25 Sebastian Pop <sebastian.pop@amd.com>
3877 Remove fallouts from "Reverted the Condate changes".
3878 * tree.h: Remove unused decl.
3879 * testsuite/gcc.dg/tree-checker: Same.
3880 * timevar.def: Remove counter.
3882 2008-07-24 Sebastian Pop <sebastian.pop@amd.com>
3884 * Merge from mainline (135673:138072).
3886 Reverted the MIRO changes (from 2008-04-05) that are now
3887 tracked in the miro branch.
3888 * tree-bounds.c: Removed.
3889 * tree-bounds.h: Removed.
3891 Reverted the Condate changes (from 2006-07-04, 2007-03-20) that
3892 are now tracked in the condate branch.
3893 * tree-check.c: Removed.
3894 * tree-match.c: Removed.
3895 * condate.y: Removed.
3897 2008-07-24 Dwarakanath Rajagopal <dwarak.rajagopal@amd.com>
3899 * common.opt: New user flag -floop-block, -floop-strip-mine
3900 and -floop-interchange.
3901 * toplev.c (process_options): Enable -fgraphite pass if any one of the
3902 graphite loop optimization flags is turned on.
3903 * graphite.c (graphite_apply_transformations): Add flag_loop_block,
3904 flag_loop_strip_mine and flag_loop_interchange checks before
3906 * doc/invoke.texi: Remove -fgraphite and add -floop-block,
3907 -floop-strip-mine and -floop-interchange.
3908 * testsuite/gcc.dg/graphite/block-0.c: Add -floop-block and remove
3910 * testsuite/gcc.dg/graphite/scop-16.c: Ditto.
3911 * testsuite/gcc.dg/graphite/scop-17.c: Ditto.
3912 * testsuite/gcc.dg/graphite/scop-18.c: Ditto.
3914 2008-07-23 Jan Sjodin <jan.sjodin@amd.com>
3915 Sebastian Pop <sebastian.pop@amd.com>
3917 * cfgloopmanip.c (update_dominators_in_loop): Make it static.
3918 (create_empty_loop_on_edge): More fixes.
3919 * tree-phinodes.c (resize_phi_node): Extern.
3920 (unlink_phi_node, move_phi_node): New split from remove_phi_node.
3921 * cfghooks.c (update_dominator_information): New split from
3923 * tree-vectorizer.c (rename_variables_in_bb): Extern.
3924 * tree-dfa.c (collect_dfa_stats): Start walking the CFG on the
3925 successor of the function entry block.
3927 * graphite.c: Include pointer-set.h.
3928 (debug_loop_mapping, increment_loop_mapped_depths,
3929 get_loop_mapped_depth_for_num, get_loop_mapped_depth,
3930 set_loop_mapped_depth_for_num, set_loop_mapped_depth,
3931 swap_loop_mapped_depth_for_num, get_num_from_index,
3932 swap_loop_mapped_depth, loop_iv_stack_debug,
3933 loop_iv_stack_push, loop_iv_stack_pop, loop_iv_stack_get_iv,
3934 loop_iv_stack_get_iv_from_name, loop_iv_stack_debug,
3935 get_old_iv_from_ssa_name): New.
3936 (new_scop): Initialize SCOP_LOOPS_MAPPING.
3937 (free_scop): Free SCOP_LOOPS_MAPPING.
3938 (scop_record_loop): Record old ivs.
3939 (create_var_name): Removed.
3940 (initialize_cloog_names): Allocate double space in case strip mine
3941 applies to all loops once.
3942 (clast_name_to_gcc): Look up in the map ivstack passed in parameter.
3943 (clast_to_gcc_expression): Same. Implement more clast to gimple
3945 (graphite_create_new_loop): Pass in ivstack.
3946 (remove_all_edges): Pass in the construction_edge.
3947 (graphite_remove_iv): Removed.
3948 (graphite_rename_ivs, graphite_rename_ivs_stmt,
3949 remove_cond_exprs): Rewritten.
3950 (move_phi_nodes): New.
3951 (disconnect_virtual_phi_nodes, disconnect_cond_expr): Removed.
3952 (translate_clast): Pass in ivstack. Rewrite some cases.
3953 (set_cloog_options, debug_clast_stmt): New.
3954 (find_transform): Use set_cloog_options.
3955 (outermost_loop_layer): Removed.
3956 (get_construction_edge, collect_virtual_phis, find_vdef_for_var_in_bb,
3957 find_vdef_for_var_1, find_vdef_for_var, patch_phis_for_virtual_defs,
3958 mark_old_loops, remove_dead_loops): New.
3960 (graphite_trans_bb_move_loop): Call swap_loop_mapped_depth.
3961 (const_column_index, get_first_matching_sign_row_index,
3962 get_lower_bound_row, get_upper_bound_row, get_lower_bound,
3963 get_upper_bound): New.
3964 (graphite_trans_bb_strip_mine): Also update the iv map.
3966 * graphite.h (graphite_loops_mapping, GBB_LOOPS_MAPPING): New.
3967 (struct name_tree): Add a loop field.
3968 (struct scop): Add a graphite_loops_mapping field.
3969 (SCOP_LOOPS_MAPPING): New.
3970 (debug_clast_stmt): Declare.
3971 * lambda.h (find_induction_var_from_exit_cond): Declare.
3972 (lambda-code.c): (find_induction_var_from_exit_cond): Extern.
3973 * cfgloop.h (update_dominators_in_loop): Removed declaration.
3974 (create_empty_loop_on_edge): Updated.
3975 * tree-flow.h (remove_bb, resize_phi_node, move_phi_node,
3976 rename_variables_in_bb): Declare.
3977 * tree-cfg.c (remove_bb): Extern.
3979 * testsuite/gcc.dg/graphite/block-0.c: New.
3981 2008-07-21 Dwarakanath Rajagopal <dwarak.rajagopal@amd.com>
3982 Sebastian Pop <sebastian.pop@amd.com>
3984 * graphite.c (strip_mine_profitable_p): New.
3985 (graphite_trans_bb_block): Disable strip mining if not profitable.
3987 * testsuite/gcc.dg/graphite/scop-18.c: New.
3988 * testsuite/gcc.dg/graphite/scop-17.c: Fixed.
3989 * testsuite/gcc.dg/graphite/scop-16.c: Fixed.
3991 2008-07-17 Harsha Jagasia <harsha.jagasia@amd.com>
3992 Jan Sjodin <jan.sjodin@amd.com>
3993 Sebastian Pop <sebastian.pop@amd.com>
3995 * graphite.c (is_interchange_valid): New.
3996 (graphite_trans_bb_block): Check loop nest of basic block for legality
3999 * graphite.h (gbb_inner_most_loop_index, outer_most_loop_1,
4000 outer_most_loop, gbb_outer_most_loop_index): New.
4002 * tree-loop-linear.c (perfect_loop_nest_depth): Remove static.
4003 * tree-flow.h (perfect_loop_nest_depth): Declare as extern.
4004 * testsuite/gcc.dg/graphite/scop-16.c: New.
4005 * testsuite/gcc.dg/graphite/scop-17.c: New.
4007 2008-07-11 Tobias Grosser <grosser@fim.uni-passau.de>
4009 * graphite.c (scop_remove_ignoreable_gbbs): Also update bitmap.
4010 (graphite_trans_scop_block): Ignore SCoPs without bbs.
4012 2008-07-11 Tobias Grosser <grosser@fim.uni-passau.de>
4014 * graphite.c (new_scop): Initialize SCOP_EXIT.
4015 (scopdet_info): Add.
4016 (scopdet_bb_info): Rename from is_bb_addable. Cleanup, bugfixes.
4017 (build_scops_1): Cleanup, bugfixes.
4018 (build_scops): Cleanup.
4020 * testsuite/gcc.dg/graphite/scop-matmult.c: Remove duplicated code.
4021 * testsuite/gcc.dg/graphite/scop-15.c: Add SCoP numbers.
4023 2008-07-10 Harsha Jagasia <harsha.jagasia@amd.com>
4025 * testsuite/gfortran.dg/graphite/scop-1.f: Update to reduced test case.
4027 * testsuite/gfortran.dg/graphite/graphite.exp: Use
4028 DEFAULT_GRAPHITE_FLAGS.
4030 * testsuite/gcc.dg/graphite/scop-15.c: Update to reduced test case.
4032 2008-07-10 Harsha Jagasia <harsha.jagasia@amd.com>
4034 * graphite.c (scan_tree_for_params): Do not assert any more if
4035 MULT_EXPR parameter is negative.
4037 * testsuite/gfortran.dg/graphite/scop-1.f: New.
4039 * testsuite/gfortran.dg/graphite/graphite.exp: New.
4041 * testsuite/gcc.dg/graphite/scop-15.c: New.
4043 2008-07-10 Harsha Jagasia <harsha.jagasia@amd.com>
4045 * graphite.c (is_bb_addable): Fix segfault in spec gzip and reformat.
4047 2008-07-10 Tobias Grosser <grosser@fim.uni-passau.de>
4049 * graphite.c (graphite_trans_bb_swap_loops): Rename from
4050 graphite_swap_loops.
4051 (graphite_trans_bb_move_loop): New.
4052 (graphite_trans_bb_strip_mine): Rename from graphite_strip_mine_loop.
4053 (graphite_trans_bb_block): New.
4054 (graphite_trans_loop_block): New.
4055 (graphite_trans_scop_swap_1and2): Rename from
4056 graphite_trans_swap_1and2.
4057 (graphite_trans_scop_strip): Rename from graphite_trans_strip.
4058 (graphite_trans_scop_block): New.
4059 (graphite_apply_transformations): Rename from
4060 graphite_transformations.
4062 * testsuite/gcc.dg/graphite/scop-matmult.c: New.
4064 2008-07-10 Tobias Grosser <grosser@fim.uni-passau.de>
4066 * graphite.c (gbb_compare): New.
4067 (graphite_sort_gbbs): New.
4068 (gbb_can_be_ignored): New.
4069 (scop_remove_ignoreable_gbbs): New.
4070 (graphite_transformations): Cleanup and add
4071 scop_remove_ignoreable_gbbs.
4072 * lambda.h (lambda_vector_compare): New.
4074 2008-07-09 Tobias Grosser <grosser@fim.uni-passau.de>
4076 * graphite.c (print_graphite_bb): Correct printing of static schedule.
4077 (graphite_swap_loops): int -> unsigned
4078 (graphite_strip_mine_loop): int -> unsigned, Fix SCHEDULE
4079 (graphite_transformations): New.
4080 (graphite_transform_loops): Move to graphite_transformations.
4081 * graphite.h (gbb_nb_loops): Return unsigned.
4083 2008-07-04 Tobias Grosser <grosser@fim.uni-passau.de>
4085 * graphite.c (scan_tree_for_params): Fix insertion of parameters into
4086 the domain matrix. This makes scop-0.c work again.
4088 2008-06-20 Richard Guenther <rguenther@suse.de>
4090 * graphite.h: Adjust copyright to GPLv3.
4091 * graphite.c: Likewise.
4092 (stmt_simple_memref_for_scop_p): Split out from ...
4093 (stmt_simple_for_scop_p): ... here. Fix handling of calls
4095 (get_bb_type): Optimize.
4097 (is_bb_addable): Fix memleak, replace is_pred call with
4099 (build_scops): Use current_loops.
4100 (param_index): Fix memleak.
4102 2008-06-20 Konrad Trifunovic <konrad.trifunovic@inria.fr>
4104 * graphite.c: Fix formatting.
4106 2008-06-19 Konrad Trifunovic <konrad.trifunovic@inria.fr>
4108 * graphite.c (new_scop): Memory allocation for SCOP_{NEWIVS, OLDIVS}.
4109 (free_scop): Memory deallocation for SCOP_NEWIVS, SCOP_OLDIVS.
4110 (create_var_name, save_var_name): Newly defined functions.
4111 (initialize_cloog_names): Part of the code factored out to
4113 (clast_to_gcc_expression): Now handles the case of clast_red_sum
4114 in clast_reduction statement.
4115 (graphite_create_new_loop): Now takes a new parameter
4117 (translate_clast): Now also takes the context_loop and bb_exit
4118 parameters. Rewritten the code so that it creates a gimple code
4119 inside the given context.
4120 (outermost_loop_layer, graphite_remove_iv, graphite_rename_ivs,
4121 remove_cond_expr, disconnect_cond_expr,
4122 disconnect_virtual_phi_nodes): Newly defined functions.
4123 * graphite.h (struct scop): added old_ivs vector.
4124 SCOP_OLDIVS: New macro.
4126 2008-06-19 Sebastian Pop <sebastian.pop@amd.com>
4128 * cfgloopmanip.c: Add missing function comments, fix formatting.
4130 2008-06-18 Konrad Trifunovic <konrad.trifunovic@inria.fr>
4132 * cfgloopmanip.c (update_dominators_in_loop): Defined.
4133 (create_empty_loop_on_edge): Defined.
4134 * tree-parloops.c (canonicalize_loop_ivs): Returns tree
4136 * cfgloop.h (create_empty_loop_on_edge): Declared as extern.
4137 (update_dominators_in_loop): Declared as extern
4138 * tree-flow.h (canonicalize_loop_ivs): Declared as extern.
4140 2008-06-16 Tobias Grosser <grosser@fim.uni-passau.de>
4142 * graphite.c (print_graphite_bb): Allow changing number of loops
4144 (initialize_cloog_names): Allow changing number of loops.
4145 (build_cloog_prog): Simplify.
4146 (find_transform): Enable cloog option --strides.
4147 (graphite_swap_loops): New.
4148 (graphite_strip_mine_loop): New.
4149 (graphite_trans_swap_1and2): New.
4150 (graphite_trans_strip): New.
4151 (graphite_transform_loops): Add graphite_trans_strip.
4152 * graphite.h (scop_max_loop_depth): New.
4154 2008-06-15 Tobias Grosser <grosser@fim.uni-passau.de>
4156 * graphite.c (build_scop_iteration_domain): Remove forgotten
4157 line. (Fixes compile)
4159 2008-06-15 Tobias Grosser <grosser@fim.uni-passau.de>
4161 * graphite.c (print_graphite_bb): Add output of GBB_LOOPS.
4162 (build_graphite_bb): Add GBB_LOOPS and GBB_DOMAIN and reorder.
4163 (build_bb_loops): New.
4164 (graphite_transform_loops): Add build_bb_loops.
4165 (schedule_to_scattering): Use gbb_nb_loops to support changing loop
4167 * graphite.h (graphite_bb): Add loops.
4168 (gbb_nb_loops): New.
4169 (gbb_loop_at_index): New.
4170 (gbb_loop_index): New.
4171 (nb_params_in_scop): Renamed to scop_nb_params. Updated all functions
4172 using nb_params_in_scop.
4174 2008-06-14 Tobias Grosser <grosser@fim.uni-passau.de>
4176 * graphite.c (print_graphite_bb): Adapt to minimized schedule.
4177 (build_scop_canonical_schedules): Build minimized schedule.
4178 (schedule_to_scattering): Adapt to minimized schedule.
4179 * graphite.h (graphite_bb): Add/Update descriptions.
4181 2008-06-14 Adrien Eliche <aeliche@isty.uvsq.fr>
4182 Tobias Grosser <grosser@fim.uni-passau.de>
4184 * graphite.c (print_graphite_bb): Add condition printing.
4186 (dump_gbb_conditions): New.
4187 (build_scop_conditions_1): New.
4188 (build_scop_conditions): New.
4189 * graphite.h (graphite_bb): Add conditions.
4191 2008-06-14 Tobias Grosser <grosser@fim.uni-passau.de>
4193 * graphite.c (print_graphite_bb):
4194 (free_graphite_bb): New.
4195 (free_scop): Free bbs.
4196 (get_bb_type): Free doms.
4197 (build_scop_context): Free context matrix.
4198 (build_loop_iteration_domains): Remove unused code.
4199 (build_cloog_prog): Free scattering function and blocklist.
4200 (find_transform): Free options.
4202 2008-06-13 Tobias Grosser <grosser@fim.uni-passau.de>
4204 * graphite.c (loop_body_to_cloog_stmts): Rename to add_bb_domains.
4205 Remove unnecessery cloog data structures. Make a copy of the domain
4206 (setup_cloog_loop): Rename to build_loop_iteration_domains. Remove
4207 unnecessary cloog data structures. Fix memory leaks. Remove insert
4208 into SCOP_LOOP2CLOOG_LOOP as the inserted CloogLoops will never be
4210 (build_scop_iteration_domain): Remove unnecessary cloog
4211 data structures. Fix memory leaks.
4212 (graphite_transform_loops): Disable build_scop_dynamic_schedules as it
4213 uses SCOP_LOOP2CLOOG_LOOP, that is at the moment not working.
4215 2008-06-12 Tobias Grosser <grosser@fim.uni-passau.de>
4217 * graphite.c (find_scop_params): Remove initialize_cloog_names.
4219 2008-06-12 Tobias Grosser <grosser@fim.uni-passau.de>
4221 * graphite.c (end_scop): Style fix.
4222 (schedule_to_scattering): Style and comment fix.
4224 2008-06-12 Tobias Grosser <grosser@fim.uni-passau.de>
4225 * graphite.c (print_graphite_bb): Fix definiton of
4226 schedule_to_scattering.
4227 (initialize_cloog_names): Change nb_scattdims to max loop
4229 (schedule_to_scattering): Take parameter for number of scattering
4231 (build_cloog_prog): Only build as much scattering dimensions as
4234 2008-06-12 Tobias Grosser <grosser@fim.uni-passau.de>
4236 * graphite.c (end_scop): Disable bb splitting. Fixes SIGSEGV
4237 in polyhedron/aermod.f90.
4239 2008-06-11 Tobias Grosser <grosser@fim.uni-passau.de>
4240 Dwarak Rajagopal <dwarak.rajagopal@amd.com>
4241 Harsha Jagasia <harsha.jagasia@amd.com>
4243 * graphite.c (is_bb_addable): Fix segfault.
4245 2008-06-10 Tobias Grosser <grosser@fim.uni-passau.de>
4247 * graphite.c (is_bb_addable): Fix memory leak, handling of loops
4248 with multiple exits and conditional handling in edge cases.
4249 (is_loop_exit): Fix memory leak. (Forgotten in last commit)
4251 * testsuite/gcc.dg/graphite/scop-14.c: New.
4253 2008-06-06 Tobias Grosser <grosser@fim.uni-passau.de>
4254 Adrien Eliche <aeliche@isty.uvsq.fr>
4256 * graphite.c (is_bb_addable): Add more comments and enhance
4257 readablity of the source code. Fix memory leak.
4258 (is_loop_exit): Fix memory leak.
4260 2008-06-05 Tobias Grosser <grosser@fim.uni-passau.de>
4262 * graphite.c (first_loop_in_scop): Deleted.
4263 (setup_cloog_loop): Only walk the loop chain for inner loops.
4264 (build_scop_iteration_domain): Execute setup_cloog_loop for
4265 all loops in the first layer.
4267 2008-06-05 Tobias Grosser <grosser@fim.uni-passau.de>
4269 * graphite.c (scan_tree_for_params): Change the way params are
4270 added to be indepenent of the number of loops.
4271 (setup_cloog_loop): Revert to short matrix format. Fix parameter
4273 (build_cloog_prog): Revert to short matrix format.
4275 2008-06-05 Sebastian Pop <sebastian.pop@amd.com>
4276 Dwarak Rajagopal <dwarak.rajagopal@amd.com>
4278 * tree-loop-fusion.c (fuse_loops): Fix uninitialized variable
4281 2008-06-05 Sebastian Pop <sebastian.pop@amd.com>
4283 * graphite.c (nb_data_refs_in_scop): New.
4284 (graphite_transform_loops): Print more stats: number of
4285 loops, basic blocks and data references per scop.
4287 2008-06-04 Sebastian Pop <sebastian.pop@amd.com>
4288 Jan Sjodin <jan.sjodin@amd.com>
4290 * graphite.c (loop_affine_expr, idx_record_params,
4291 find_scop_parameters, setup_cloog_loop): Use instantiate_scev
4292 instead of instantiate_parameters.
4294 2008-06-04 Tobias Grosser <grosser@fim.uni-passau.de>
4296 * graphite.c (schedule_to_scattering): Fix scattering dimensions,
4297 add support for parameters, add STATIC_SCHEDULE at the right places,
4300 2008-06-04 Tobias Grosser <grosser@fim.uni-passau.de>
4302 * graphite.c (build_scop_loop_nests): Only add the loops, that
4303 are contained completely in the SCoP.
4304 (build_cloog_prog): Disable scattering, until schedule_to_scattering
4305 and the domains are fixed.
4306 (build_scop_canonical_schedules): Add support for bbs not contained
4309 2008-06-04 Tobias Grosser <grosser@fim.uni-passau.de>
4311 * graphite.h (scop_contains_loop): Update comments to match
4312 the actual behavior.
4313 (scop_contains_loop): New.
4314 * graphite.c (schedule_to_scattering): Use scop_contains_loop.
4316 2008-06-04 Sebastian Pop <sebastian.pop@amd.com>
4318 * graphite.c (get_bb_type): On function body, i.e. loop_0,
4319 don't mark blocks as GBB_LOOP_SING_EXIT_HEADER, mark them
4322 2008-06-04 Sebastian Pop <sebastian.pop@amd.com>
4323 Tobias Grosser <grosser@fim.uni-passau.de>
4325 * graphite.c (graphite_transform_loops): Early return when
4326 there are no loops in the function.
4328 2008-05-31 Sebastian Pop <sebastian.pop@amd.com>
4329 Jan Sjodin <jan.sjodin@amd.com>
4331 * graphite.c (scan_tree_for_params, setup_cloog_loop): Compute the
4332 offset of the last loop.
4333 (setup_cloog_loop): Copy the entire outer constraint matrix.
4335 2008-05-31 Sebastian Pop <sebastian.pop@amd.com>
4336 Jan Sjodin <jan.sjodin@amd.com>
4338 * graphite.c (stmt_in_scop_p, function_parameter_p,
4339 invariant_in_scop_p): Removed.
4340 (scan_tree_for_params): Can be used with no constraint
4341 matrix for gathering parameters.
4342 (idx_record_params): Don't use idx_record_param, instead use
4343 scan_tree_for_params.
4344 (find_scop_parameters): Same.
4345 (setup_cloog_loop, build_scop_iteration_domain, build_cloog_prog):
4346 Fix the size of loop domains.
4347 (schedule_to_scattering): Exit when the outer loop is not in scop.
4348 (find_transform): Enable build_cloog_prog.
4350 2008-05-31 Sebastian Pop <sebastian.pop@amd.com>
4351 Jan Sjodin <jan.sjodin@amd.com>
4353 * graphite.c (schedule_to_scattering): Make scattering domains
4354 uniformly of the same size, as required by CLooG 0.14.0 and before.
4356 2008-05-31 Sebastian Pop <sebastian.pop@amd.com>
4357 Jan Sjodin <jan.sjodin@amd.com>
4359 * graphite.c (schedule_to_scattering): Rewrite, correct the
4360 translation of the scheduling function to scattering.
4361 (build_cloog_prog): Call schedule_to_scattering only once.
4362 * graphite.h (scop_loop_index): Do not fail for loops not
4363 in the scop: return -1.
4365 2008-05-30 Tobias Grosser <grosser@fim.uni-passau.de>
4367 * graphite.c (build_graphite_bb): Initialize GBB_DOMAIN.
4368 (loop_body_to_cloog_stmts): Export GBB_DOMAIN.
4369 (setup_cloog_loop): Export GBB_DOMAIN.
4370 (build_cloog_prog): New. Create new CLOOG_PROG, which should be
4371 able to rebuild the original control flow.
4372 * graphite.h (graphite_bb): Add domain field and access macro.
4375 2008-05-30 Sebastian Pop <sebastian.pop@amd.com>
4377 * graphite.c (debug_gbb): New.
4378 (print_scop, build_graphite_bb): Use SCOP_BBS.
4379 (build_scop_bbs): Reimplemented.
4380 (dfs_bb_in_scop_p): Removed.
4381 (build_scop_loop_nests): Reorder loops inserted in
4382 SCOP_LOOP_NEST: outer loops should come first.
4383 (build_scop_canonical_schedules): Reinitialize at zero
4384 the components of the SCOP_STATIC_SCHEDULE for the loops
4385 that have already been parsed.
4387 * graphite.h (debug_gbb): Declared.
4389 2008-05-30 Sebastian Pop <sebastian.pop@amd.com>
4390 Jan Sjodin <jan.sjodin@amd.com>
4392 * graphite.c (create_empty_loop): Renamed graphite_create_new_loop.
4393 (graphite_loop_to_gcc_loop): Removed.
4394 (remove_all_edges): New.
4395 (graphite_stmt_to_gcc_stmt): Renamed translate_clast.
4396 (gloog): Remove useless code.
4398 2008-05-29 Tobias Grosser <grosser@fim.uni-passau.de>
4400 * graphite.c (get_bb_type): Reworked. We distinguish between
4401 loops with one or multiple exits.
4402 (is_loop_exit): New.
4404 (is_bb_addable): Rework condition handling, now support for case
4405 case statements and loops with multiple exits.
4407 * testsuite/gcc.dg/graphite/scop-11.c: New.
4408 * testsuite/gcc.dg/graphite/scop-12.c: New.
4409 * testsuite/gcc.dg/graphite/scop-13.c: New.
4411 2008-05-29 Tobias Grosser <grosser@fim.uni-passau.de>
4413 * graphite.c (dot_all_scops_1): Fix some colors. Reuse colors, if
4414 we have too many colors.
4416 2008-05-22 Sandeep Maram <smaram_b04@iiita.ac.in>
4418 * doc/invoke.texi (-ftree-loop-fusion): Document.
4419 * tree-pass.h (pass_loop_fusion): Declared.
4420 * tree-loop-fusion.c: New.
4421 * timevar.def (TV_TREE_LOOP_FUSION): Declared.
4422 * tree-data-ref.c (find_data_references_in_loop): Make extern.
4423 * tree-data-ref.h (find_data_references_in_loop): Declared.
4424 * common.opt (ftree-loop-fusion): Declared.
4425 * Makefile.in (tree-loop-fusion.o): Added rule and to OBJS-common.
4427 2008-05-21 Sebastian Pop <sebastian.pop@amd.com>
4429 * graphite.c (build_access_matrix): Fix typo from the merge.
4431 2008-05-20 Sebastian Pop <sebastian.pop@amd.com>
4433 * Merge from mainline (130800:135673).
4435 2008-05-07 Sebastian Pop <sebastian.pop@amd.com>
4437 * graphite.c (end_scop): The exit of the scop is not part of the scop.
4438 Update dominators after splitting.
4440 2008-05-07 Sebastian Pop <sebastian.pop@amd.com>
4442 * graphite.c (is_bb_addable): Return the harmful statement.
4443 Factor up some code.
4444 (end_scop): New. Splits end of scope bbs on a harmful statement.
4445 (build_scops_1): Call end_scop.
4447 2008-05-07 Sebastian Pop <sebastian.pop@amd.com>
4449 * graphite.c: (succs_at_same_depth, end_scop, all_preds_visited_p,
4450 all_succs_visited_p, start_new_scop_for_each_succ, start_new_scop,
4451 add_dominators_to_open_scops, stop_last_open_scop, scop_end_loop,
4452 build_scops_1): Removed.
4453 (build_scops_2): Renamed build_scops_1.
4455 2008-05-06 Sebastian Pop <sebastian.pop@amd.com>
4457 * graphite.c: Fix formatting.
4459 2008-05-06 Tobias Grosser <grosser@fim.uni-passau.de>
4461 * graphite.c (get_bb_type): New.
4463 (build_scops_2): New.
4464 (is_bb_addable): New.
4465 (build_scops): Switch the scop detection.
4466 (build_scop_bbs): Add entry bb to scop.
4467 * graphite.h (struct scop): Update comment.
4469 2008-05-06 Tobias Grosser <grosser@fim.uni-passau.de>
4471 * graphite.c (dot_all_scops_1): Fix some incorrect colors and add
4474 2008-05-06 Tobias Grosser <grosser@fim.uni-passau.de>
4476 * testsuite/gcc.dg/graphite/scop-1.c: Update.
4477 * testsuite/gcc.dg/graphite/scop-2.c: Update.
4478 * testsuite/gcc.dg/graphite/scop-4.c: Update.
4479 * testsuite/gcc.dg/graphite/scop-5.c: Add.
4480 * testsuite/gcc.dg/graphite/scop-6.c: Add.
4482 2008-05-06 Sebastian Pop <sebastian.pop@amd.com>
4484 * testsuite/gcc.dg/graphite/scop-0.c: Add.
4485 * testsuite/gcc.dg/graphite/scop-7.c: Add.
4486 * testsuite/gcc.dg/graphite/scop-8.c: Add.
4487 * testsuite/gcc.dg/graphite/scop-9.c: Add.
4488 * testsuite/gcc.dg/graphite/scop-10.c: Add.
4490 2008-05-06 Tobias Grosser <grosser@fim.uni-passau.de>
4492 * graphite.c (scop_affine_expr): Renamed to loop_affine_expr.
4493 Check affine expressions depending on the outermost loop
4495 (stmt_simple_for_scop_p): Same.
4496 (harmfule_stmt_in_scop): Same.
4498 2008-04-28 Tobias Grosser <grosser@fim.uni-passau.de>
4500 * graphite.c (dot_all_scops): Remove incorrect difficult bb coloring,
4501 mark entry and exit, that are not part of the SCoP and update HTML
4504 2008-04-25 Sebastian Pop <sebastian.pop@amd.com>
4506 * graphite.c (basic_block_simple_for_scop_p): Renamed
4508 (save_scop, preds_at_same_depth, test_for_scop_bound): Removed.
4509 (add_dominators_to_open_scops, build_scops_1): Reimplemented.
4510 (all_preds_visited_p, all_succs_visited_p,
4511 start_new_scop_for_each_succ, start_new_scop, stop_last_open_scop,
4512 scop_end_loop): New.
4513 (build_scops): Do not use dfs_enumerate_from.
4515 * testsuite/gcc.dg/graphite/scop-{1,2,4}.c: Updated.
4517 2008-04-23 Sebastian Pop <sebastian.pop@amd.com>
4519 * graphite.c: Add comments to functions that are missing a
4521 (graphite_create_iv): Removed. Merged in graphite_loop_to_gcc_loop.
4523 2008-04-23 Sebastian Pop <sebastian.pop@amd.com>
4525 * graphite.c (nb_params_in_scop): Moved...
4526 (graphite_bb_from_bb, loop_body_to_cloog_stmts): New.
4527 (setup_cloog_loop): Call loop_body_to_cloog_stmts.
4528 (clast_to_gcc_expression): Reduce column size to less than 80.
4529 (graphite_create_iv): Return the new name of the IV.
4530 (find_transform): Set options->esp and options->cpp.
4531 (gloog): Comment out the invalidation of the old loop code.
4532 (initialize_dependence_polyhedron): Replace scop_nb_params with
4535 * graphite.h (nb_params_in_scop): ... here.
4536 (scop_nb_params): Removed.
4537 (loop_domain_dim): Return something even when the loop was not
4538 found in the hash table: avoid ICEing on all the graphite.exp
4541 2008-04-14 Konrad Trifunovic <konrad.trifunovic@inria.fr>
4543 * tree-chrec.c (for_each_scev_op): SCEV can have 3 operands.
4545 * graphite.c (build_scop_dynamic_schedules): Schedule is built
4546 according to nesting level.
4547 (find_scop_parameters): Call instantiate_parameters.
4548 (scan_tree_for_params): Extend it to handle general affine bounds.
4549 Inner loop bound can depend on outer loop induction variable.
4550 (setup_cloog_loop): tmp variable is allocated on stack. Call
4551 instantiate_parameters with respect to outermost_loop_in_scop.
4552 (loop_domain_dim, ref_nb_loops, loop_iteration_vector_dim): moved to
4554 (create_empty_loop): Function loopify should be given edge
4555 probability, instead of edge frequency. Dominance relation from
4556 switch_bb to loop_header.
4557 (clast_to_gcc_expression): Added handling of clast_reduction node.
4558 (gloog): New functionality for removing old loop.
4559 (test_dependence): Factored out from build_rdg_all_levels.
4560 (build_rdg_all_levels): Dependence testing factored out to
4561 test_dependence function.
4563 * graphite.h (struct graphite_bb): Extended with dynamic_schedule.
4564 (loop_domain_dim, ref_nb_loops, loop_iteration_vector_dim): Moved
4567 2008-04-07 Sebastian Pop <sebastian.pop@amd.com>
4569 * graphite.c (free_scop, param_index, initialize_cloog_names,
4570 nb_params_in_scop): Use name_tree map instead of just a tree
4571 for keeping track of the variable name associated to that tree.
4572 (create_empty_loop, gmp_cst_to_tree, clast_name_to_gcc,
4573 clast_to_gcc_expression, graphite_create_iv,
4574 graphite_loop_to_gcc_loop, graphite_cond_to_gcc_cond,
4575 graphite_stmt_to_gcc_stmt): New.
4576 (gloog): Call these.
4577 * graphite.h (struct name_tree): New.
4578 (struct scop): Use name_tree instead of tree for params.
4579 Store a vector of name_tree for new_ivs.
4581 (scop_nb_params): Use name_tree instead of tree.
4583 2008-04-05 Alexander Lamaison <awl03@doc.ic.ac.uk>
4584 Sebastian Pop <sebastian.pop@amd.com>
4586 * tree-bounds.c: New.
4587 * tree-bounds.h: New.
4588 * tree-pass.h: Declare pass_bounds_early and pass_bounds_late.
4589 * passes.c: Schedule pass_bounds_early, pass_bounds_late.
4590 * builtins.c (expand_builtin_alloca): Add flag_bounds as for
4594 * c-cppbuiltin.c: Same.
4598 * tree-outof-ssa.c: Same.
4600 * Makefile.in: Same.
4602 2008-03-15 Antoniu Pop <antoniu.pop@gmail.com>
4603 Sebastian Pop <sebastian.pop@amd.com>
4605 * tree-loop-distribution.c (remaining_stmts,
4606 upstream_mem_writes): Removed static variables.
4607 (copy_loop_before, create_bb_after_loop,
4608 mark_nodes_having_upstream_mem_writes, free_rdg_components,
4609 rdg_build_components, rdg_build_partitions,
4610 dump_rdg_partitions): Extern.
4611 (generate_loops_for_partition, generate_code_for_partition): Do not
4613 (already_processed_vertex_p, predecessor_has_mem_write,
4614 mark_nodes_having_upstream_mem_writes, has_upstream_mem_writes,
4615 rdg_flag_all_uses, rdg_flag_uses, rdg_flag_vertex_and_dependent,
4616 rdg_flag_loop_exits, rdg_flag_similar_memory_accesses,
4617 build_rdg_partition_for_component, rdg_build_partitions, ldist_gen):
4618 Pass remaining_stmts and upstream_mem_writes as parameters.
4619 (rdg_component): Moved...
4620 (build_rdg_partition_for_component): Do not aggregate components when
4621 flag_streamize_loops is set.
4622 (gen_sequential_loops): New.
4623 (ldist_gen): Call gen_sequential_loops.
4625 * tree-pass.h (pass_loop_streamization): Declared.
4627 * omp-low.c (expand_omp_sections): Call add_bb_to_loop on created
4628 basic blocks when loops structures exist.
4630 * builtin-types.def (BT_FN_VOID_PTR_PTR_INT): New.
4632 * tree-ssa-loop-ivopts.c (expr_invariant_in_region_p): New.
4634 * tree-parloops.c (take_address_of, eliminate_local_variables_1,
4635 eliminate_local_variables_stmt, eliminate_local_variables,
4636 separate_decls_in_loop_name, separate_decls_in_loop_stmt,
4637 separate_decls_in_loop, gen_parallel_loop): Make them work on a region
4638 of code delimited by two edges in the CFG.
4639 (separate_decls_in_loop_name): Renamed separate_decls_in_region_name.
4640 (separate_decls_in_loop_stmt): Renamed separate_decls_in_region_stmt.
4641 (separate_decls_in_loop): Renamed separate_decls_in_region. Isolate
4642 the case of parallelisation of reductions.
4643 (create_loop_fn): Extern.
4644 (create_omp_parallel_region): New.
4646 * tree-data-ref.c (dump_data_dependence_relation): Don't call
4647 dump_data_reference for printing dra and drb.
4648 (create_rdg_edge_for_ddr, create_rdg_edges_for_scalar): Initialise
4650 (build_rdg): Don't call free_dependence_relations for the moment, as
4651 we attach dependence relations on each edge of the RDG.
4654 * tree-data-ref.h (rdg_component): ...here.
4655 (struct rdg_edge): New field ddr_p relation.
4656 (RDGE_RELATION): New.
4657 (create_bb_after_loop, copy_loop_before,
4658 mark_nodes_having_upstream_mem_writes, rdg_build_components,
4659 rdg_build_partitions, dump_rdg_partitions,
4660 free_rdg_components): Declared.
4662 * omp-builtins.def (BUILT_IN_GOMP_STREAM_ALIGN_PUSH,
4663 BUILT_IN_GOMP_STREAM_ALIGN_POP): New.
4665 * tree-loop-streamization.c: New.
4667 * tree-flow.h (gather_blocks_in_sese_region, create_loop_fn,
4668 create_omp_parallel_region, expr_invariant_in_region_p): Declared.
4670 * Makefile.in (tree-loop-streamization.o): Added to OBJS-common.
4672 * tree-cfg.c (gather_blocks_in_sese_region): Extern.
4674 * passes.c: Schedule pass_loop_streamization.
4676 2008-03-08 Tobias Grosser <grosser@fmi.uni-passau.de>
4678 * graphite.c (dot_all_scops_1): Fix formatting for difficult bbs and
4681 2008-03-07 Tobias Grosser <grosser@fim.uni-passau.de>
4683 * graphite.c (dot_all_scops): Update formatting.
4684 Bbs can now be part of more than one SCoP.
4686 2008-03-04 Sebastian Pop <sebastian.pop@amd.com>
4688 * graphite.c (new_loop_to_cloog_loop_str, setup_cloog_loop): Fix
4690 (loop_domain_dim): Check for unregistered toplev SCOP loop.
4691 * graphite.h (loop_to_cloog_loop): New.
4693 2008-03-04 Konrad Trifunovic <konrad.trifunovic@inria.fr>
4695 * graphite.c (loop_domain_dim, ref_nb_loops,
4696 loop_iteration_vector_dim): New.
4697 (build_access_matrix_with_af, build_access_matrix,
4698 initialize_dependence_polyhedron): Fixed for new matrix layout.
4699 No longer assume that all iteration domains are of the same
4702 2008-03-02 Sebastian Pop <sebastian.pop@amd.com>
4704 * tree-scalar-evolution.c (instantiate_parameters_1): An SSA_NAME
4705 defined in a loop at depth 0 is invariant.
4706 * tree-chrec.c (evolution_function_is_invariant_rec_p): Ditto.
4707 * tree-ssa-loop-ivopts.c (expr_invariant_in_loop_p): Should never
4708 be called at loop depth 0.
4710 * graphite.c (basic_block_simple_for_scop_p): Take the scop as
4712 (dot_all_scops_1): Update use of basic_block_simple_for_scop_p.
4713 (down_open_scop): Removed.
4714 (loop_in_scop_p): Redefined.
4715 (scop_affine_expr): New argument: scop.
4716 (stmt_simple_for_scop_p): New argument: scop. RETURN_EXPR is not
4717 a harmful statement ending a scop.
4718 (basic_block_simple_for_scop_p): New argument: scop.
4719 (get_loop_start): Removed.
4720 (new_scop): Initialize SCOP_LOOPS.
4721 (free_scop): Free SCOP_LOOPS.
4722 (succs_at_same_depth, preds_at_same_depth): New.
4723 (end_scop): Test the validity of a scop.
4724 (add_dominators_to_open_scops): New.
4725 (test_for_scop_bound): Call add_dominators_to_open_scops.
4726 Add cases for opening and closing multiple scops.
4727 (build_scops, build_scop_bbs): Iterate over basic blocks in
4729 (build_graphite_bb): Pass scop directly.
4730 (dfs_bb_in_scop_p): New.
4731 (scop_record_loop): Use SCOP_LOOPS for not recording the same loop
4733 (nb_loops_around_gb): Use loop_in_scop_p.
4734 (schedule_to_scattering): Disabled for the moment the code computing
4735 the "textual order for outer loop".
4737 * graphite.h (struct scop): New field loops.
4739 (scop_loop_index): Test that the given loop belongs to SCOP_LOOPS.
4741 * testsuite/gcc.dg/graphite/scop-{1,...,7}.c: Updated.
4743 2008-02-27 Antoniu Pop <antoniu.pop@gmail.com>
4744 Sebastian Pop <sebastian.pop@amd.com>
4746 * builtin-types.def (BT_FN_PTR_SIZE_UINT, BT_FN_BOOL_PTR): New.
4747 * common.opt (fstreamize-loops): New.
4748 * omp-builtins.def (BUILT_IN_GOMP_STREAM_CREATE,
4749 BUILT_IN_GOMP_STREAM_PUSH, BUILT_IN_GOMP_STREAM_HEAD,
4750 BUILT_IN_GOMP_STREAM_POP, BUILT_IN_GOMP_STREAM_EOS_P,
4751 BUILT_IN_GOMP_STREAM_SET_EOS, BUILT_IN_GOMP_STREAM_DESTROY): New.
4753 2008-02-22 Konrad Trifunovic <konrad.trifunovic@inria.fr>
4755 * tree-data-ref.c (build_empty_rdg): New.
4756 (build_rdg): Use it.
4757 * tree-data-ref.h (build_empty_rdg): Declared.
4758 * graphite.c (free_scop): Free SCOP_LOOP2CLOOG_LOOP.
4759 (find_vertex_for_stmt): Removed.
4760 (build_rdg_all_levels): Use build_empty_rdg and rdg_vertex_for_stmt.
4762 2008-02-21 Sebastian Pop <sebastian.pop@amd.com>
4764 * tree-loop-distribution.c (generate_builtin): After cancelling the
4765 loop tree, also delete basic blocks.
4766 (rdg_flag_uses): Stop recursion when a vertex has already been
4769 2008-02-15 Konrad Trifunovic <konrad.trifunovic@inria.fr>
4771 * graphite.c (build_scop_alpha): Removed.
4772 (graphite_transform_loops): Add a dummy call to build_all_rdg_levels
4773 and dump_dependence_graph to avoid compiler warnings.
4775 2008-02-14 Konrad Trifunovic <konrad.trifunovic@inria.fr>
4777 * tree-data-ref.c (dr_may_alias_p, create_rdg_vertices): Extern.
4778 * tree-data-ref.h (dr_may_alias_p, create_rdg_vertices): Declared.
4779 * graphite.c (new_loop_to_cloog_loop_str, hash_loop_to_cloog_loop,
4780 eq_loop_to_cloog_loop, del_loop_to_cloog_loop): New.
4781 (new_scop, setup_cloog_loop): Initialize SCOP_LOOP2CLOOG_LOOP.
4782 (initialize_dependence_polyhedron, find_vertex_for_stmt,
4783 initialize_data_dependence_polyhedron, is_empty_polyhedron,
4784 statement_precedes_p, build_rdg_all_levels, build_scop_alpha,
4785 dump_dependence_graph): New.
4786 * graphite.h (struct graphite_bb): New field compressed_alpha_matrix.
4788 (struct scop): New field loop2cloog_loop.
4789 (SCOP_LOOP2CLOOG_LOOP, struct data_dependence_polyhedron,
4790 RDGE_DDP, ddp_p, struct loop_to_cloog_loop_str): New.
4792 2008-02-10 Konrad Trifunovic <konrad.trifunovic@inria.fr>
4794 * graphite.c (build_graphite_bb): Fix initialization
4795 of the graphite basic block.
4797 2008-02-05 Sebastian Pop <sebastian.pop@amd.com>
4799 * graphite.c (scan_tree_for_params): Rewrite for the new layout of
4800 loop domain matrix. Pass in the number of loops contained in the
4802 (nb_loops_around_gb): Moved before setup_cloog_loop that uses it.
4803 (setup_cloog_loop): Rewrite for the new layout of loop domain matrix:
4804 loops that are not surrounding the current loop are not represented
4805 in the domain constraint matrix.
4806 (build_scop_iteration_domain): Initial domain constraint matrix
4807 contains only the eq/ineq, cst, and scop parameters columns.
4809 2008-01-29 Tobias Grosser <grosser@fim.uni-passau.de>
4811 * graphite.c (schedule_to_scattering, nb_loops_around_gb): New.
4812 (print_graphite_bb): Print scattering.
4814 2008-01-29 Tobias Grosser <grosser@fim.uni-passau.de>
4816 * graphite.c (initialize_cloog_names): Initialize names of
4817 scattering variables.
4819 2009-01-29 Tobias Grosser <grosser@fim.uni-passau.de>
4821 * graphite.c (dot_all_scops_1): Disable debug output while
4824 2008-01-29 Tobias Grosser <grosser@fim.uni-passau.de>
4826 * graphite.c (find_transform): Change cloog output language to C.
4828 2008-01-27 Sebastian Pop <sebastian.pop@amd.com>
4830 * tree-loop-distribution.c (generate_memset_zero,
4831 generate_builtin, generate_code_for_partition,
4832 rdg_flag_all_uses): New.
4833 (rdg_flag_uses): Gather in the same partition the statements defining
4834 the VUSES of the current statement.
4835 (rdg_flag_similar_stores): Renamed rdg_flag_similar_memory_accesses.
4836 Gather in the same partition not only the stores to the same memory
4837 access, but also the reads.
4838 (ldist_generate_loops): Renamed ldist_gen.
4840 2008-01-24 Sebastian Pop <sebastian.pop@amd.com>
4841 Tobias Grosser <grosser@fmi.uni-passau.de>
4843 * graphite.c (setup_cloog_loop): Chain all cloog loops with the
4844 next pointer, don't use the inner pointer.
4846 2008-01-20 Tobias Grosser <grosser@fmi.uni-passau.de>
4848 * graphite.c (dot_all_scops, dot_all_scops_1): New.
4849 (find_transform): Call dot_all_1.
4850 * graphite.h (dot_all_scops): Declared.
4852 2007-12-14 Sebastian Pop <sebastian.pop@amd.com>
4854 * tree-loop-distribution.c: Fix apsi.f ICE.
4855 (create_bb_after_loop): New.
4856 (generate_loops_for_partition): Use it.
4857 * testsuite/gfortran.dg/ldist-1.f90: New.
4859 * tree-data-ref.c (dot_rdg): Use /tmp/rdg.dot for dotty format.
4860 * graphite.c (dot_scop): Use /tmp/scop.dot for dotty format.
4862 2007-12-13 Tobias Grosser <grosser@fmi.uni-passau.de>
4864 * graphite.c (find_transform): Dump cloog program sent to cloog.
4866 2007-12-13 Tobias Grosser <grosser@fmi.uni-passau.de>
4868 * graphite.c (initialize_cloog_names): Initialize cloog
4871 2007-12-13 Tobias Grosser <grosser@fmi.uni-passau.de>
4873 * graphite.c (build_scop_context): Fix typo, for the matrix
4874 format: insert '0 >= 0' instead of '-1 >= 0'.
4876 2007-12-13 Sebastian Pop <sebastian.pop@amd.com>
4878 * Fix merge problems.
4880 2007-12-13 Sebastian Pop <sebastian.pop@amd.com>
4882 * graphite.c (setup_cloog_loop): Fix typo.
4884 2007-12-12 Sebastian Pop <sebastian.pop@amd.com>
4886 * doc/invoke.texi (-ftree-loop-distribution): Documented.
4887 * tree-loop-distribution.c: Reimplemented.
4888 * tree-pass.h (pass_loop_distribution): New.
4889 * tree-scalar-evolution.c (number_of_iterations_for_all_loops): Use
4891 * graphds.h (struct graph): New field indexes.
4892 * timevar.def (TV_TREE_LOOP_DISTRIBUTION): New.
4894 * tree-vect-analyze.c: Remove declaration of static functions when not
4896 * tree-vectorizer.c: Same.
4897 (rename_variables_in_loop): Now extern.
4898 (slpeel_tree_duplicate_loop_to_edge_cfg): Renamed
4899 tree_duplicate_loop_to_edge_cfg. Reset PENDING_STMT for edges after
4900 calling redirect_edge_and_branch_force.
4902 * tree-vectorizer.h (tree_duplicate_loop_on_edge): Declared.
4904 * tree-data-ref.c: Don't include tree-chrec.h.
4905 (debug_data_dependence_relations): New.
4906 (dump_data_dependence_relation): Call dump_data_reference on data refs
4908 (same_access_functions): Moved...
4909 (find_vertex_for_stmt): Renamed rdg_vertex_for_stmt.
4910 (dump_rdg_vertex, debug_rdg_vertex, dump_rdg_component,
4911 debug_rdg_component, dump_rdg, debug_rdg, dot_rdg_1, dot_rdg,
4912 struct rdg_vertex_info, ): New.
4913 (create_rdg_edge_for_ddr): Compute the dependence level before looking
4915 (create_rdg_vertices): Initialize the htab of graph->indexes.
4916 Initialize RDG_MEM_WRITE_STMT and RDG_MEM_READS_STMT.
4917 (stmts_from_loop): Don't save LABEL_EXPR.
4918 (hash_stmt_vertex_info, eq_stmt_vertex_info,
4919 hash_stmt_vertex_del): New.
4920 (build_rdg): Initialize rdg->indexes.
4921 (free_rdg, stores_from_loop, ref_base_address,
4922 rdg_defs_used_in_other_loops_p, have_similar_memory_accesses,
4923 have_similar_memory_accesses_1, ref_base_address_1,
4924 remove_similar_memory_refs): New.
4926 * tree-data-ref.h: Include tree-chrec.h.
4927 (debug_data_dependence_relations): Declared.
4928 (same_access_functions): ...here. Now static inline.
4929 (ddr_is_anti_dependent, ddrs_have_anti_deps,
4930 ddr_dependence_level): New.
4931 (struct rdg_vertex): New fields has_mem_write, has_mem_reads.
4932 (RDGV_HAS_MEM_WRITE, RDGV_HAS_MEM_READS, RDG_STMT, RDG_MEM_WRITE_STMT,
4933 RDG_MEM_READS_STMT): New.
4934 (dump_rdg_vertex, debug_rdg_vertex, dump_rdg_component,
4935 debug_rdg_component, dump_rdg, debug_rdg, dot_rdg,
4936 rdg_vertex_for_stmt): Declared.
4937 (struct rdg_edge): New field level.
4938 (RDGE_LEVEL, free_rdg): New.
4939 (stores_from_loop, remove_similar_memory_refs,
4940 rdg_defs_used_in_other_loops_p,
4941 have_similar_memory_accesses): Declared.
4942 (rdg_has_similar_memory_accesses): New.
4944 * lambda.h (dependence_level): New.
4945 * common.opt (ftree-loop-distribution): New.
4946 * tree-flow.h (debug_loop_ir): Renamed debug_loops.
4947 (print_loop_ir): Renamed print_loops.
4948 (debug_loop, debug_loop_num, print_loops_bb, mark_virtual_ops_in_bb,
4949 tree_duplicate_loop_to_edge_cfg, rename_variables_in_loop): Declared.
4950 * Makefile.in (TREE_DATA_REF_H): Depends on tree-chrec.h.
4951 (tree-loop-distribution.o): Added.
4952 * tree-cfg.c (mark_virtual_ops_in_region): Use mark_virtual_ops_in_bb.
4953 (mark_virtual_ops_in_bb): New.
4954 (print_loops_bb, debug_loop_num, debug_loop): New.
4955 * passes.c: Scheduled pass_loop_distribution.
4957 2007-12-12 Konrad Trifunovic <konrad.trifunovic@inria.fr>
4959 * graphite.c (scan_tree_for_params): Correct the number of columns
4961 (nb_flat_iterator): New.
4962 (setup_cloog_loop): Initialize to 1 the first column for inequalities.
4963 (build_scop_iteration_domain): Correct the number of columns for
4966 2007-12-12 Sebastian Pop <sebastian.pop@amd.com>
4968 * Merge from mainline (129697:130800).
4970 2007-10-30 Sebastian Pop <sebastian.pop@amd.com>
4972 * graphite.c (build_graphite_bb): SCoP's basic blocks are post
4973 dominated by SCoP's exit.
4974 (graphite_transform_loops): Compute post dominators.
4976 2007-10-28 Sebastian Pop <sebastian.pop@amd.com>
4978 * Merge from mainline (127169:129697).
4980 2007-10-28 Sebastian Pop <sebastian.pop@amd.com>
4982 * graphite.c (affine_expr): Renamed scop_affine_expr. Use an extra
4983 parameter for the basic block that contains the expression. Use
4984 outermost_loop_in_scop for evolution_function_is_affine_multivariate_p.
4985 (stmt_simple_for_scop_p): Pass to scop_affine_expr the basic block of
4987 * graphite.h (gbb_loop): New.
4988 (GBB_LOOP): Removed.
4990 2007-08-03 Sebastian Pop <sebpop@gmail.com>
4992 * Makefile.in: Fix merge problem.
4994 2007-08-03 Sebastian Pop <sebpop@gmail.com>
4996 * Merge from mainline (125309:127169).
4997 * tree-loop-distribution.c: Disabled.
4999 2007-06-05 Sebastian Pop <sebpop@gmail.com>
5001 * Merge from mainline (r123693:125309).
5003 2007-05-30 Sebastian Pop <sebpop@gmail.com>
5005 * tree-loop-distribution.c (correct_modify_expr_p): Renamed
5007 (correct_modify_p, check_statements, number_of_lvalue_uses,
5008 number_of_scalar_dependences, create_edges): Use GIMPLE_MODIFY_STMT
5009 instead of MODIFY_EXPR.
5010 (update_edge_with_ddv): Don't pass index_of_edge. Initialize
5013 2007-05-24 Sebastian Pop <sebpop@gmail.com>
5015 * tree-loop-distribution.c (struct rdg): Replace arrays by
5016 VECs for edges and vertices.
5017 (RDG_NBV, RDG_NBE, RDG_VERTEX, RDG_EDGE): Removed.
5018 (RDGV_NB_PARTITIONS): New.
5019 (PRDG_NBV, PRDG_NBE): Removed.
5020 (build_scc_graph, correct_partitions_p, mark_partitions, build_prdg,
5021 dump_rdg, find_vertex_with_stmt, create_vertices, free_rdg,
5022 number_of_scalar_dependences, create_edges, build_rdg): Use VECs.
5024 2007-05-17 Georges-Andre Silber <silber@cri.ensmp.fr>
5025 Sebastian Pop <sebpop@gmail.com>
5027 * doc/invoke.texi (-ftree-loop-distribution): Document.
5028 * tree-loop-distribution.c: New file.
5029 * tree-pass.h (pass_loop_distribution): Declared.
5030 * timevar.def (TV_TREE_LOOP_DISTRIBUTION): New.
5031 * tree-data-ref.c (initialize_data_dependence_relation): Initialize
5033 * tree-data-ref.h (data_dependence_relation): Add reversed_p.
5034 (DDR_REVERSED_P): New.
5035 * common.opt (-ftree-loop-distribution): New.
5036 * tree-flow.h (distribute_loops): Declared.
5037 * Makefile.in (OBJS-common): Depend on tree-loop-distribution.o.
5038 * passes.c (init_optimization_passes): Schedule loop distribution.
5040 2007-05-12 Sebastian Pop <sebastian.pop@inria.fr>
5042 * graphite.c (print_graphite_bb): Don't call dump_data_references.
5043 (print_scop): Don't print when scop is NULL.
5044 (build_scop_context, find_transform): Don't output to stderr.
5046 2007-05-09 Sebastian Pop <sebastian.pop@inria.fr>
5048 * tree-data-ref.c: Don't include graphite.h.
5049 Comment out the code for printing data reference's scop.
5050 (build_access_matrix_with_af): Moved...
5051 * tree-data-ref.h (build_access_matrix_with_af): Removed declaration.
5052 * graphite.c (build_access_matrix_with_af): ... here. Now static.
5053 (print_graphite_bb): Print basic block's schedule.
5054 (print_scop): Don't print the schedule, call cloog's pretty printer.
5055 (bb_in_scop_p): A basic block is in a scop only if it is both
5056 dominated and postdominated by the scop's entry and exit basic blocks.
5057 (function_parameter_p): New.
5058 (invariant_in_scop_p): Use function_parameter_p.
5059 (new_scop, save_scop): New.
5060 (end_scop, test_for_scop_bound, build_scops): Use new_scop, and
5062 (scan_tree_for_params): Directly build the constraint as CloogMatrix.
5063 (loop_in_scop_p): New.
5064 (scop_record_loop): Use loop_in_scop_p.
5065 (build_scop_domain): Renamed build_scop_iteration_domain.
5066 (setup_cloog_loop, initialize_cloog_names, find_scop_parameters,
5067 nb_params_in_scop, build_scop_context, first_loop_in_scop,
5068 setup_cloog_loop, dot_scop_1, dot_scop): New.
5069 * graphite.h (GBB_LOOP, SCOP_PROG, dot_scop): New.
5070 (struct scop): Add a pointer to cloog's representation of a program.
5072 2007-04-14 Sebastian Pop <sebastian.pop@inria.fr>
5074 * doc/invoke.texi (-ftree-check-verbose): Renamed
5075 -ftree-checks-verbose.
5076 * common.opt (flag_tree_check_verbose): Renamed
5077 flag_tree_checks_verbose.
5078 * tree-check.c (tree_check_warning): Use flag_tree_checks_verbose.
5080 2007-04-14 Sebastian Pop <sebastian.pop@inria.fr>
5082 * configure: Regenerated.
5083 * config.in: Regenerated.
5084 * tree-ssa-loop.c (graphite_transforms): Execute
5085 graphite_transform_loops only when HAVE_cloog.
5086 * configure.ac (HAVE_polylib, HAVE_cloog, GRAPHITE): Defined.
5087 * graphite.c: Include polylibgmp.h and cloog.h.
5088 (graphite_transform_loops): Removed loops parameter.
5089 * tree-flow.h (graphite_transform_loops): Update declaration.
5090 * Makefile.in (POLYLIBLIBS, POLYLIBINC, CLOOGLIBS, CLOOGINC): New.
5091 (LIBS): Depend on CLOOGLIBS and on POLYLIBLIBS.
5092 (INCLUDES): Depend on POLYLIBINC and on CLOOGINC.
5093 (OBJS-common): Remove dependence on graphite.o.
5094 (BACKEND): Depend on @GRAPHITE@.
5096 2007-04-13 Sebastian Pop <sebastian.pop@inria.fr>
5098 * doc/invoke.texi (-ftree-check-verbose): Documented.
5099 * testsuite/gcc.dg/tree-checker/tree-checks-1.c: New.
5100 * testsuite/gcc.dg/tree-checker/tree-checks-2.c: New.
5101 * testsuite/gcc.dg/tree-checker/tree-checks-3.c: New.
5102 * testsuite/gcc.dg/tree-checker/tree-checks-4.c: New.
5103 * testsuite/gcc.dg/tree-checker/tree-checks.exp: New.
5104 * testsuite/gcc.dg/tree-checker/condates.crp: New.
5105 * common.opt (ftree-checks-verbose): New.
5106 * tree-check.c (tree_check_warning): Move extra stderr output
5107 under control of flag_tree_check_verbose.
5109 2007-04-12 Sebastian Pop <sebastian.pop@inria.fr>
5111 * tree-match.c: Fix comments formatting.
5112 * tree-match.h: Fix comments formatting.
5113 * tree-check.c: Fix comments formatting.
5114 (tree_check_init): Restructure.
5116 2007-04-12 Nic Volanschi <nic.volanschi@free.fr>
5118 * doc/invoke.texi (-ftree-check, -ftree-checks): Documented.
5120 2007-04-10 Sebastian Pop <sebastian.pop@inria.fr>
5122 * Merge from mainline (r120733:123693).
5124 2007-03-20 Nic Volanschi <nic.volanschi@free.fr>
5126 * condate.y: New file.
5127 * tree-match.h (struct patt_info_s): New field sign.
5128 (struct condate_s): New field msg.
5129 (normalize_condate, name_condate, add_condate): New.
5130 (conds[], condate_parse): Made extern.
5131 * tree-check.c (tree_check_warning): First arg changed to cond;
5132 warning reformatted.
5133 (tree_check_init): Reset the TREE_VISITED bit on every CFG node.
5135 (tree_check): Process trivial condates.
5136 (read_delimited_string): Removed.
5137 (print_cond): Print name and msg.
5138 (conds[]): Made extern.
5139 (parse_tree_check_file_once): Rewritten to use the parser in
5141 Processing of option --tree_check_string moved to tree_scan().
5142 * Makefile.in: Added condate.y
5144 2007-03-12 Sebastian Pop <sebastian.pop@inria.fr>
5146 * tree-pretty-print.c (dump_generic_bb_buff, lazy_dump_generic_node):
5147 Use VECs instead of varrays.
5148 * diagnostic.h (lazy_dump_generic_node): Update declaration.
5149 * Makefile.in (pretty-print.o): Depend on vec.h.
5150 * pretty-print.c: Include tree.h and vec.h.
5151 (pp_clear_state, pp_write_list_to_stream, pp_base_format,
5152 pp_base_format, pp_construct, pp_base_string, pp_lazy_mode,
5153 new_tree_chunk, pp_add_tree, pp_add_string, pp_add_char, pp_write_list,
5154 pp_free_list): Use VECs instead of varrays.
5155 * pretty-print.h: Do not include varray.h.
5156 (struct tree_chunk_s): Declaration moved before its use.
5157 (output_buffer): Rename varray field to chunks.
5158 * tree-match.c (tree_equal, chunk_1st_char, chunks_lookahead,
5159 tree_1st_char, match_chunks_pattinfo, match_tree_pattinfo,
5160 save_global_holes): Use VECs instead of varrays.
5161 * tree-match.h: Declare VECs of cfg_node, and hole_p.
5162 * tree-check.c (scan_cfg_stmts, push_node,
5163 print_matching_stmt): Removed.
5164 (tree_check_instance, push_global_holes_if_new, tree_check,
5165 execute_tree_check): Use VECs instead of varrays.
5166 (gate_tree_check): Don't execute the CFG check when basic_block_info
5169 2007-01-12 Sebastian Pop <sebastian.pop@inria.fr>
5171 * Merge from mainline (r115016:120733).
5173 2007-01-12 Sebastian Pop <sebastian.pop@inria.fr>
5175 * Merge from mainline (r117632:117661).
5177 2007-01-12 Sebastian Pop <sebastian.pop@inria.fr>
5179 * tree-dump.c (dump_option_value_in): Add TDF_DEBUG.
5180 * tree-pass.h (TDF_DEBUG, debug_p): New.
5181 * tree-scalar-evolution.c (set_scalar_evolution, get_scalar_evolution,
5182 get_scalar_evolution, add_to_evolution, set_nb_iterations_in_loop,
5183 get_loop_exit_condition, analyze_evolution_in_loop,
5184 analyze_initial_condition, analyze_scalar_evolution,
5185 instantiate_parameters, number_of_latch_executions): Use debug_p.
5186 * tree-chrec.c (chrec_apply): Use debug_p.
5187 * tree-data-ref.c: Include graphite.h.
5188 (dump_data_reference): Print also the access matrix.
5189 (analyze_array, analyze_indirect_ref, init_data_ref,
5190 analyze_offset_expr, address_analysis, object_analysis,
5191 create_data_ref, finalize_ddr_dependent,
5192 non_affine_dependence_relation, analyze_ziv_subscript,
5193 analyze_siv_subscript_cst_affine,
5194 compute_overlap_steps_for_affine_1_2, analyze_subscript_affine_affine,
5195 can_use_analyze_subscript_affine_affine, analyze_siv_subscript,
5196 analyze_miv_subscript, analyze_overlapping_iterations,
5197 build_classic_dist_vector, subscript_dependence_tester,
5198 compute_affine_dependence, analyze_all_data_dependences): Use debug_p.
5199 (build_access_matrix_with_af): No longer static.
5200 * tree-data-ref.h (scop_p): ... declaration here.
5201 (data_reference.scop): New field.
5202 (DR_SCOP, DR_ACCESS_MATRIX): New.
5203 (build_access_matrix_with_af, dr_num_subscripts): Declared.
5204 * graphite.c (print_graphite_bb): Call dump_data_references.
5205 (print_scop): Use scop_nb_loops and scop_dim_domain.
5206 (test_for_scop_bound): Use debug_p.
5207 (scan_tree_for_params): Use scop_nb_loops, scop_nb_loops and
5209 (scop_loop_index): Moved...
5210 (scop_record_loop): New.
5211 (build_scop_loop_nests): Use scop_record_loop.
5212 (build_scop_domain): Use scop_dim_domain.
5213 (build_access_matrix): Implemented.
5214 (build_scop_canonical_schedules): Use scop_nb_loops.
5215 (build_graphite_bb): Initialize GBB_SCOP.
5216 * graphite.h (scop_p): Moved...
5217 (graphite_bb.scop): New field.
5218 (graphite_bb.iteration_domain, GBB_DOMAIN, scop.nb_params,
5219 scop.nb_loops, scop.dim_domain, SCOP_NB_LOOPS, SCOP_NB_PARAMS,
5220 SCOP_DIM_DOMAIN, SCOP_STMTS): Removed.
5221 (scop_nb_params, scop_nb_loops, scop_dim_domain, gbb_dim_domain,
5222 scop_loop_index): New.
5223 * Makefile.in (tree-data-ref.o): Depends on graphite.h.
5225 2007-01-05 Sebastian Pop <sebastian.pop@inria.fr>
5227 * Merge from mainline (r117661:120450).
5229 2006-10-12 Sebastian Pop <sebastian.pop@inria.fr>
5231 * tree-scalar-evolution.c (instantiate_parameters_1): Don't stop
5232 at the first declaration outside the varying loop, instantiate as
5234 * tree-chrec.c (for_each_scev_op): New.
5235 * tree-chrec.h (for_each_scev_op): Declared.
5236 * tree-ssa-loop.c (pass_graphite_trans): Don't dump the function.
5237 * tree-data-ref.c (get_references_in_stmt,
5238 find_data_references_in_stmt): New, from trunk.
5239 (find_data_references_in_loop): Use get_references_in_stmt
5240 and find_data_references_in_loop, modified as in trunk.
5241 (build_access_matrix_with_af): New.
5242 * tree-data-ref.h (data_reference): Add a field access_matrix.
5243 (data_ref_loc): New, as in trunk.
5244 * graphite.c (print_graphite_bb, bb_in_scop_p, stmt_in_scop_p,
5245 invariant_in_scop_p, param_index, scan_tree_for_params,
5246 scop_loop_index, build_scop_loop_nests, build_scop_domain, irp_data,
5247 idx_record_param, idx_record_params, build_access_matrix,
5248 build_scop_data_accesses, build_scop_canonical_schedules,
5249 build_graphite_bb, build_scop_bbs, find_params_in_bb,
5250 build_scop_params): New.
5251 * graphite.h (graphite_bb): New.
5252 (scop): Add fields static_schedule, params, loop_nest,
5254 * lambda.h: Declare vecs of lambda_matrix.
5255 * tree-flow.h (print_loop_ir_bb): Declared.
5256 * tree-cfg.c (print_loop_ir_bb): New.
5257 (print_loop): Use print_loop_ir_bb.
5259 2006-10-12 Sebastian Pop <pop@cri.ensmp.fr>
5261 * Merge from mainline (r115016:117632).
5263 2006-10-11 Sebastian Pop <pop@cri.ensmp.fr>
5265 * graphite.c (debug_scops): Adjust definition for avoiding a bootstrap
5266 break due to a warning.
5268 2006-10-10 Sebastian Pop <pop@cri.ensmp.fr>
5270 * graphite.c (print_scops, debug_scops): New.
5271 (graphite_transform): Renamed graphite_find_transform.
5272 * graphite.h (debug_scops): Declared.
5274 2006-08-17 Sebastian Pop <pop@cri.ensmp.fr>
5276 * tree-match.c: Reformat following the GNU style.
5277 * tree-match.h: Reformat following the GNU style.
5278 * tree-pattern.h: Removed empty file.
5279 * Makefile.in: Remove references to tree-pattern.h.
5280 * tree-check.c: Reformat following the GNU style.
5281 (execute_tree_check): Move gate condition code to...
5282 (gate_tree_check): ...here. New function.
5283 (pass_check): Use the gate function.
5285 2006-07-04 Nic Volanschi <nic.volanschi@free.fr>
5287 * tree-pattern.h: New. Tree pattern matching and checking using
5289 * tree-check.c: New. Tree/CFG checking pass.
5290 * tree-match.c: New. Library for tree pattern matching.
5291 * opts.c, common.opt: Add options --ftree-check & --ftree-checks.
5292 * toplev.c, flags.h: Add globals for tree-check pass.
5293 * Makefile.in: Integrate the files in tree-check pass.
5294 * timevar.def, tree-optimize.c, tree-pass.h: Register tree-check pass.
5295 * pretty-print.c, pretty-print.h, tree-pretty-print.c, diagnostic.h:
5296 Introduce a "lazy" pretty-print mode.
5297 * tree.c, tree.h: Add tree_name.
5299 2006-07-04 Sebastian Pop <pop@cri.ensmp.fr>
5301 * doc/invoke.texi (-fgraphite): Correct typo.
5302 * tree-scalar-evolution.c (number_of_iterations_for_all_loops): Update
5303 use of print_loop_ir.
5304 * testsuite/gcc.dg/graphite/scop-1.c: New.
5305 * testsuite/gcc.dg/graphite/scop-2.c: New.
5306 * testsuite/gcc.dg/graphite/graphite.exp: New.
5307 * graphite.c: Include domwalk.h.
5308 (print_scop): Print only the entry and exit blocks.
5309 (debug_scop): No longer static.
5310 (affine_expr): Fix formating. Return also true when the expression is
5312 (stmt_simple_for_scop_p): Fix formating.
5313 (build_scops): Use domwalk.
5314 (get_loop_start, end_scop, test_for_scop_bound): New.
5315 (graphite_transform_loops): Avoid printing on stderr.
5316 * graphite.h (debug_scop): Declared.
5317 * tree-flow.h (debug_loop_ir, print_loop_ir): Update declarations.
5318 * Makefile.in (graphite.o): Depend on domwalk.h.
5319 * tree-cfg.c (print_loop, print_pred_bbs, print_succ_bbs): Remove
5320 declarations for static functions.
5321 (print_loop, print_loop_ir, debug_loop_ir): Use an extra parameter for
5322 controlling output verbosity.
5324 2006-06-26 Sebastian Pop <pop@cri.ensmp.fr>
5325 Plesco Alexandru <shurikx@gmail.com>
5327 * doc/invoke.texi (-fgraphite): Document.
5328 * tree-pass.h (pass_graphite_transforms): Declared.
5329 * timevar.def (TV_GRAPHITE_TRANSFORMS): New.
5330 * tree-ssa-loop.c (graphite_transforms, gate_graphite_transforms): New.
5331 (pass_graphite_transforms): Defined.
5332 * tree-data-ref.c (free_data_ref, data_reference): Extern.
5333 * tree-data-ref.h (free_data_ref, data_reference): Declared.
5334 * graphite.c, graphite.h: New.
5335 * common.opt (fgraphite): Declared.
5336 * tree-flow.h (graphite_transform_loops): Declared.
5337 * Makefile.in (OBJS-common): Add graphite.o.
5338 (graphite.o): New rule.
5339 * passes.c (pass_graphite_transforms): Scheduled.