1 2009-08-22 Sebastian Pop <sebastian.pop@amd.com>
3 * graphite-dependences.c (graphite_carried_dependence_level_k): Do
4 not delete the original dependence relation.
6 2009-08-21 Sebastian Pop <sebastian.pop@amd.com>
8 * graphite-dependences.c (graphite_legal_transform_bb): Avoid
9 the computation of symmetric data dependence relations.
10 (dependency_between_pbbs_p): Same.
12 2009-08-21 Sebastian Pop <sebastian.pop@amd.com>
14 * graphite-dependences.c (new_poly_dr_pair): Renamed new_poly_ddr.
15 (eq_poly_dr_pair_p): Renamed eq_poly_ddr_p.
16 (hash_poly_dr_pair_p): Renamed hash_poly_ddr_p.
19 (dependence_polyhedron_1): Now returns a poly_ddr_p.
20 (dependence_polyhedron): Same. Remove useless gcc_assert.
22 (graphite_legal_transform_dr): Call pddr_is_empty and free_poly_ddr.
23 (graphite_carried_dependence_level_k): Call pddr_is_empty.
24 * graphite-dependences.h (enum poly_dependence_kind): New.
25 (poly_dr_pair): Renamed poly_ddr. Added a field kind.
26 (PDRP_SOURCE): Renamed PDDR_SOURCE.
27 (PDRP_SINK): Renamed PDDR_SINK.
28 (PDRP_DDP): Renamed PDDR_DDP.
30 (free_poly_ddr): Declared.
31 * graphite-poly.c (new_scop): Use the new hash function names.
32 * graphite-poly.h (struct scop): Renamed field original_pdr_pairs
34 (SCOP_ORIGINAL_PDR_PAIRS): Renamed SCOP_ORIGINAL_PDDRS.
36 2009-08-21 Sebastian Pop <sebastian.pop@amd.com>
38 * Merge from mainline (150764:150992).
40 2009-08-18 Sebastian Pop <sebastian.pop@amd.com>
42 * cfgloopmanip.c (create_empty_loop_on_edge): Generate upper
43 bounds with LT_EXPR to make niter analysis more precise on code
44 generated by Graphite.
46 2009-08-18 Sebastian Pop <sebastian.pop@amd.com>
48 * graphite-dependences.c (graphite_legal_transform_dr): Fix formatting.
49 (graphite_legal_transform_bb): Same.
50 (poly_drs_may_alias_p): Same.
52 2009-08-15 Sebastian Pop <sebastian.pop@amd.com>
55 * graphite-ppl.c (ppl_max_for_le): Correct the use of
56 ppl_Pointset_Powerset_C_Polyhedron_maximize.
58 2009-08-13 Sebastian Pop <sebastian.pop@amd.com>
60 * graphite-poly.c (print_pbb): Print PBB index.
62 2009-08-13 Sebastian Pop <sebastian.pop@amd.com>
64 * Merge from mainline (r150672:150764).
66 2009-08-13 Sebastian Pop <sebastian.pop@amd.com>
68 * graphite-interchange.c (ppl_max_for_le): Moved...
69 * graphite-poly.c (pbb_number_of_iterations): Call ppl_max_for_le.
70 * graphite-ppl.c (ppl_max_for_le): ... here.
71 * graphite-ppl.h (ppl_max_for_le): Declared.
73 2009-08-12 Sebastian Pop <sebastian.pop@amd.com>
75 * Merge from mainline (r150372:150672).
77 2009-08-11 Sebastian Pop <sebastian.pop@amd.com>
80 * sese.c (convert_for_phi_arg): New.
81 (add_guard_exit_phis): Use convert_for_phi_arg.
83 * testsuite/gfortran.dg/graphite/id-17.f: New.
85 2009-08-11 Sebastian Pop <sebastian.pop@amd.com>
87 * graphite-sese-to-poly.c (pdr_add_data_dimensions): Dont add
88 unknown subscript upper bounds.
90 * testsuite/gcc.dg/graphite/interchange-6.c: Un-XFAIL.
92 2009-08-11 Sebastian Pop <sebastian.pop@amd.com>
93 Pranav Garg <pranav.garg2107@gmail.com>
95 * graphite-interchange.c (gather_access_strides): Removed.
96 (ppl_max_for_le): New.
97 (build_linearized_memory_access): New.
98 (memory_stride_in_loop): New.
99 (pbb_interchange_profitable_p): Reimplemented.
100 * graphite-ppl.h (ppl_new_id_map): New.
101 (ppl_interchange): New.
103 * testsuite/gcc.dg/graphite/interchange-6.c: XFAILed.
105 2009-08-11 Sebastian Pop <sebastian.pop@amd.com>
107 * graphite-interchange.c (compute_subscript): Removed.
108 (compute_array_size_cstr): Removed.
109 (compute_array_size_poly): Removed.
110 (compute_array_size): Removed.
111 (gather_access_strides_poly): Removed.
112 (gather_access_strides): Empty.
114 2009-08-11 Sebastian Pop <sebastian.pop@amd.com>
116 * graphite-dependences.c (dependence_polyhedron_1): Replace
117 pdr_nb_subscripts with PDR_NB_SUBSCRIPTS.
118 (graphite_legal_transform_dr): Same.
119 (graphite_carried_dependence_level_k): Same.
120 * graphite-poly.c (new_poly_dr): Add a parameter nb_subscripts.
121 Initialize PDR_NB_SUBSCRIPTS.
122 (print_pdr_access_layout): Replace pdr_nb_subscripts with
124 * graphite-poly.h (struct poly_dr): Add nb_subscripts field.
125 (PDR_NB_SUBSCRIPTS): New.
126 (pdr_nb_subscripts): Removed.
127 (pdr_dim): Simplified.
128 * graphite-sese-to-poly.c (build_poly_dr): Replace pdr_nb_subscripts
129 with PDR_NB_SUBSCRIPTS.
131 2009-08-11 Sebastian Pop <sebastian.pop@amd.com>
133 * graphite-interchange.c (compute_array_size): Remove use of
135 * graphite-poly.c (new_poly_dr): Remove argument data_container.
136 Do not initialize PDR_DATA_CONTAINER.
137 (print_pdr): Do not print PDR_DATA_CONTAINER.
138 * graphite-poly.h (struct poly_dr): Remove data_container field.
139 (PDR_DATA_CONTAINER): Removed.
140 * graphite-sese-to-poly.c (pdr_add_data_dimensions): Remove use of
142 (build_poly_dr): Same.
144 2009-08-11 Sebastian Pop <sebastian.pop@amd.com>
146 * testsuite/gcc.dg/graphite/interchange-9.c: New.
148 2009-08-05 Konrad Trifunovic <konrad.trifunovic@gmail.com>
149 Sebastian Pop <sebastian.pop@amd.com>
151 * graphite-dependences.c (graphite_legal_transform_dr): Work on a
152 copy of the dependence polyhedron. Free the temporary objects.
153 (graphite_carried_dependence_level_k): Free unused objects before
156 * testsuite/gcc.dg/graphite/interchange-1.c: XFAILed.
157 * testsuite/gcc.dg/graphite/interchange-2.c: XFAILed.
158 * testsuite/gcc.dg/graphite/interchange-3.c: XFAILed.
159 * testsuite/gcc.dg/graphite/interchange-4.c: XFAILed.
160 * testsuite/gcc.dg/graphite/interchange-7.c: XFAILed.
162 2009-08-05 Sebastian Pop <sebastian.pop@amd.com>
164 * graphite-blocking.c (scop_do_strip_mine): Call store_scattering.
165 Early return without analyzing the data dependences if no
166 transform has been done. Call restore_scattering if the transform
168 (graphite-interchange.c): Same.
169 * graphite-poly.c (print_scattering_function): Test for PBB_TRANSFORMED.
170 (graphite_read_transforms): Initialize PBB_TRANSFORMED.
171 (apply_poly_transforms): Do not gcc_assert that
172 the transform is legal.
173 (new_poly_bb): Initialize PBB_TRANSFORMED, PBB_SAVED, and PBB_ORIGINAL.
174 Do not initialize PBB_NB_SCATTERING_TRANSFORM, PBB_NB_LOCAL_VARIABLES,
175 PBB_TRANSFORMED_SCATTERING, and PBB_ORIGINAL_SCATTERING.
176 (free_poly_dr): Free PBB_TRANSFORMED, PBB_SAVED, and PBB_ORIGINAL.
177 * graphite-poly.h (struct poly_scattering): New.
178 (struct poly_bb): Add original, transformed, and saved fields.
179 Remove transformed_scattering, original_scattering, nb_local_variables,
180 and nb_scattering_transform fields.
181 (PBB_ORIGINAL, PBB_TRANSFORMED, PBB_SAVED): New.
182 (poly_scattering_new): New.
183 (poly_scattering_free): New.
184 (poly_scattering_copy): New.
185 (store_scattering_pbb): New.
186 (store_scattering): New.
187 (restore_scattering_pbb): New.
188 (restore_scattering): New.
189 * graphite-sese-to-poly.c (build_pbb_scattering_polyhedrons):
190 Initialize PBB_TRANSFORMED and PBB_ORIGINAL.
192 2009-08-05 Sebastian Pop <sebastian.pop@amd.com>
194 * graphite-poly.c (print_pbb): Add parentheses in the pretty print.
197 2009-08-05 Sebastian Pop <sebastian.pop@amd.com>
199 * Makefile.in (graphite.o): Depends on PREDICT_H.
200 * graphite.c: Include predict.h.
201 (graphite_finalize): Call tree_estimate_probability.
202 * predict.c (predict_loops): Do not call scev_initialize and
204 (tree_estimate_probability_bb): New.
205 (tree_estimate_probability): Do not initialize loops: move that
206 code to the driver. Call tree_estimate_probability_bb.
207 (tree_estimate_probability_driver): New.
208 (pass_profile): Use tree_estimate_probability_driver.
209 * predict.h (tree_estimate_probability): Declared.
211 2009-08-05 Sebastian Pop <sebastian.pop@amd.com>
213 * graphite-clast-to-gimple.c (gloog): Add time to TV_GRAPHITE_CODE_GEN.
214 * graphite-dependences.c (graphite_legal_transform): Add time to
215 TV_GRAPHITE_DATA_DEPS.
216 (dependency_between_pbbs_p): Same.
217 * timevar.def (TV_GRAPHITE_DATA_DEPS, TV_GRAPHITE_CODE_GEN): New.
219 2009-08-03 Sebastian Pop <sebastian.pop@amd.com>
221 * Merge from mainline (r149952:150372).
223 2009-07-28 Sebastian Pop <sebastian.pop@amd.com>
225 * ChangeLog.graphite: Fix indenting, white spaces and 80 columns.
226 * graphite-blocking.c: Same.
227 * graphite-clast-to-gimple.c: Same.
228 * graphite-dependences.c: Same.
229 * graphite-poly.c: Same.
230 * graphite-poly.h: Same.
231 * graphite-ppl.c: Same.
232 * graphite-scop-detection.c: Same.
233 * graphite-sese-to-poly.c: Same.
236 2009-07-28 Sebastian Pop <sebastian.pop@amd.com>
238 * graphite-sese-to-poly.c (loop_entry_phi_arg): New.
239 (remove_simple_copy_phi): New.
240 (remove_invariant_phi): New.
241 (simple_copy_phi_p): New.
242 (reduction_phi_p): New.
243 (gsi_for_ssa_name_def): New.
244 (insert_out_of_ssa_copy): New.
245 (insert_out_of_ssa_copy_on_edge): New.
246 (create_zero_dim_array): New.
247 (scalar_close_phi_node_p): New.
248 (rewrite_close_phi_out_of_ssa): New.
249 (rewrite_phi_out_of_ssa): New.
250 (rewrite_reductions_out_of_ssa): New.
251 (build_poly_scop): Call rewrite_reductions_out_of_ssa.
253 * testsuite/gcc.dg/graphite/id-11.c: New.
254 * testsuite/gcc.dg/graphite/id-15.c: New.
255 * testsuite/gcc.dg/graphite/interchange-1.c: Un-XFAIL.
256 * testsuite/gcc.dg/graphite/interchange-2.c: Un-XFAIL.
257 * testsuite/gcc.dg/graphite/interchange-3.c: Un-XFAIL.
258 * testsuite/gcc.dg/graphite/interchange-4.c: Un-XFAIL.
259 * testsuite/gcc.dg/graphite/interchange-7.c: Un-XFAIL.
260 * testsuite/gcc.dg/graphite/scop-matmult.c: Un-XFAIL.
261 * testsuite/gfortran.dg/graphite/id-13.f: New.
262 * testsuite/gfortran.dg/graphite/id-5.f: New.
264 2009-07-28 Sebastian Pop <sebastian.pop@amd.com>
266 * graphite-clast-to-gimple.c (graphite_loop_normal_form): Do not
267 check that nb_reductions_in_loop is zero.
268 * graphite-scop-detection.c (harmful_stmt_in_bb): Don't filter out
270 (nb_reductions_in_loop): Removed.
271 (graphite_can_represent_loop): Do not call nb_reductions_in_loop.
272 * graphite-sese-to-poly.c (phi_node_is_iv): Removed.
273 (bb_contains_non_iv_scalar_phi_nodes): Removed.
274 (scop_contains_non_iv_scalar_phi_nodes): Removed.
275 (build_poly_scop): Do not call scop_contains_non_iv_scalar_phi_nodes.
277 2009-07-28 Sebastian Pop <sebastian.pop@amd.com>
279 * graphite-clast-to-gimple.c (build_cloog_prog): Do not code generate
280 statements that have an empty iteration domain.
281 * testsuite/gfortran.dg/graphite/id-16.f: New.
283 2009-07-28 Sebastian Pop <sebastian.pop@amd.com>
285 * tree-scalar-evolution.c (instantiate_scev_1): Return
286 chrec_dont_know when the result is not above instantiate_below.
287 * graphite-scop-detection.c (scopdet_basic_block_info): Fix formatting.
288 * graphite-sese-to-poly.c (create_linear_expr_from_tree): Assert that
289 the tree has a known scalar evolution.
290 * testsuite/gfortran.dg/graphite/id-14.f: New.
291 * testsuite/gfortran.dg/graphite/id-15.f: New.
293 2009-07-28 Sebastian Pop <sebastian.pop@amd.com>
295 * sese.c (rename_variables_in_stmt): Pass in an extra parameter
297 (rename_variables): Keep inserting renames after the ones already
300 2009-07-28 Sebastian Pop <sebastian.pop@amd.com>
302 * graphite-sese-to-poly.c (compare_bb_depths): New.
303 (graphite_sort_dominated_info): New.
304 (build_scop_bbs_1): Call graphite_sort_dominated_info.
305 (build_scop_scattering): Fix comment.
307 2009-07-28 Sebastian Pop <sebastian.pop@amd.com>
309 * graphite.c (graphite_finalize): Call print_loops instead of
310 dump_function_to_file.
311 * testsuite/gcc.dg/graphite/graphite.exp: Fix formatting.
312 * testsuite/gcc.dg/graphite/pr35356-1.c: New. Look for the number of
313 loops generated in the graphite output file.
314 * testsuite/gcc.dg/graphite/pr35356-2.c: New.
315 * testsuite/gcc.dg/graphite/pr35356-3.c: New. XFAILed for now.
316 * testsuite/gfortran.dg/graphite/id-12.f: New.
318 2009-07-24 Li Feng <nemokingdom@gmail.com>
320 * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-8.c:
323 2009-07-24 Li Feng <nemokingdom@gmail.com>
324 Tobias Grosser <grosser@fim.uni-passau.de>
326 * graphite-sese-to-poly.c (pdr_add_alias_set): Use data reference's
327 alias set number build alias in ACCESSES polyhedron.
328 (build_alias_set_for_drs): New.
329 (build_pbb_drs): Added build_alias_set_for_drs.
330 * graphite-dependences.c (poly_drs_may_alias_p): New.
331 (graphite_carried_dependence_level_k): Check alias information
332 before building polyhedron.
334 2009-07-24 Tobias Grosser <grosser@fim.uni-passau.de>
336 * Makefile.in (lambda-code.o): Fix formatting.
338 2009-07-24 Tobias Grosser <grosser@fim.uni-passau.de>
340 * Merge from mainline (r149350-149952)
342 2009-07-18 Tobias Grosser <grosser@fim.uni-passau.de>
344 * graphite-poly.c (apply_poly_transforms): Move strip_mine
345 before interchange to prepare for loop blocking.
347 2009-07-18 Tobias Grosser <grosser@fim.uni-passau.de>
349 * graphite-poly.c (apply_poly_transforms): Add checks after every
351 * graphite-sese-to-poly.c (build_poly_scop): Remove check, as already
352 done in apply_poly_transforms.
354 2009-07-17 Konrad Trifunovic <konrad.trifunovic@gmail.com>
356 * graphite-dependences.c (build_lexicographically_gt_constraint):
357 Replace RES parameter with *RES.
358 (dependence_polyhedron_1): Pass an address of the parameter RES
359 instead of value of RES.
361 2009-07-16 Sebastian Pop <sebastian.pop@amd.com>
363 * graphite.c (graphite_finalize): Fix comment.
364 (graphite_transform_loops): Reset scev info after code generation
367 2009-07-16 Sebastian Pop <sebastian.pop@amd.com>
369 * graphite.c (graphite_finalize): Call scev_reset.
371 2009-07-16 Sebastian Pop <sebastian.pop@amd.com>
373 * graphite-clast-to-gimple.c (compute_cloog_iv_types): Do not create
374 GBB_CLOOG_IV_TYPES hash table twice.
375 * graphite-sese-to-poly.c (free_gimple_bb): Call free_data_refs.
376 (add_condition_to_domain): Clear GMP values.
378 2009-07-16 Sebastian Pop <sebastian.pop@amd.com>
380 * graphite-dependences.c: Fix formatting.
381 * graphite-poly.c (free_poly_dr): Also free PDR_DATA_CONTAINER.
382 (pbb_number_of_iterations): Free ppl_Linear_Expression.
383 * graphite-sese-to-poly.c: Fix formatting.
384 * graphite.c (graphite_transform_loops): Create the hash table
385 after the early return.
387 2009-07-16 Sebastian Pop <sebastian.pop@amd.com>
389 * testsuite/gcc.dg/graphite/id-14.c: New.
390 * testsuite/gcc.dg/graphite/pr40157.c: New.
391 * testsuite/gfortran.dg/graphite/id-11.f: New.
393 2009-07-16 Sebastian Pop <sebastian.pop@amd.com>
395 * graphite-sese-to-poly.c (nb_pbbs_in_loops): New.
396 (build_poly_scop): Return false when there are no pbbs within
397 loops to avoid to pass to cloog scops with no loops.
399 2009-07-16 Sebastian Pop <sebastian.pop@amd.com>
401 * graphite-sese-to-poly.c (build_pbb_scattering_polyhedrons): Avoid
402 useless test "i % 2".
403 (build_pbb_scattering_polyhedrons): Fix formatting.
404 (build_poly_dr): Same.
405 * graphite.c (graphite_transform_loops): Restructure.
407 2009-07-14 Razya Ladelsky <razya@il.ibm.com>
409 * tree-ssa-loop-manip.c (rewrite_phi_with_iv): Remove
410 reduction_list parameter.
411 (rewrite_all_phi_nodes_with_iv): Same.
412 (canonicalize_loop_ivs): Same.
413 * tree-parloops.c (struct brli): Removed.
414 (build_reduction_list_info): Removed.
415 (build_new_reduction): New.
416 (analyze_reduction_list): Removed.
417 (gather_scalar_reductions): Find reductions instead of phi
418 nodes that can't be canonicalized.
419 (try_create_reduction_list): Remove reduction_list parameter.
420 (gen_parallel_loop): Same.
421 (parallelize_loops): Remove analyze_reductions variable,
422 initialization and free.
423 Change reduction_list htab initialization to reduction_info
424 elements instead of ssa names.
425 Call try_create_reduction_list and gen_parallel_loop without
426 analyzed_reduction argument.
427 * graphite-clast-to-gimple (graphite_loop_normal_form): Call
428 canonicalize_loop_ivs with one less argument.
429 * tree-flow.h (canonicalize_loop_ivs): Remove one argument.
431 2009-07-14 Konrad Trifunovic <konrad.trifunovic@gmail.com>
433 * graphite-dependences.c (new_poly_dr_pair): New.
434 (dependence_polyhedron): Renamed into dependence_polyhedron_1.
435 (new_poly_dr_pair): New.
436 (eq_poly_dr_pair_p): New.
437 (hash_poly_dr_pair_p): New.
438 * graphite-dependences.h (struct poly_dr_pair): New.
439 (eq_poly_dr_pair_p): Declared.
440 (hash_poly_dr_pair_p): Declared.
441 * graphite-poly.c (new_scop): Initialize SCOP_ORIGINAL_PDR_PAIRS.
442 (free_scop): Free SCOP_ORIGINAL_PDR_PAIRS.
443 * graphite-poly.h (struct scop): Add original_pdr_pairs field.
444 * Makefile.in (graphite-poly.o): Add dependence on
445 graphite-dependences.h.
447 2009-07-14 Sebastian Pop <sebastian.pop@amd.com>
449 * graphite-scop-detection.c (graphite_can_represent_scev): Do not let
450 polynomials of degree > 1 pass to Graphite.
451 * tree-chrec.c (scev_is_linear_expression): Call
452 evolution_function_is_affine_multivariate_p.
453 * testsuite/gfortran.dg/graphite/id-10.f90: New.
455 2009-07-14 Sebastian Pop <sebastian.pop@amd.com>
457 * tree-scalar-evolution.c (compute_overall_effect_of_inner_loop):
458 Instantiate scevs varying in outer loops.
459 * testsuite/gfortran.dg/graphite/id-9.f: Correct testcase.
461 2009-07-14 Sebastian Pop <sebastian.pop@amd.com>
463 * graphite-sese-to-poly.c (build_loop_iteration_domains): Do not insert
464 redundant constraint.
466 2009-07-14 Sebastian Pop <sebastian.pop@amd.com>
468 * testsuite/gcc.dg/graphite/graphite.exp: Fix comments.
469 * testsuite/gfortran.dg/graphite/graphite.exp: Trigger actions
470 based on the file names as in the C testsuite.
471 * testsuite/gfortran.dg/graphite/block-1.f90: Fix patterns.
472 * testsuite/gfortran.dg/graphite/block-2.f: Same.
473 * testsuite/gfortran.dg/graphite/block-3.f90: Same.
474 * testsuite/gfortran.dg/graphite/block-4.f90: Same.
475 * testsuite/gfortran.dg/graphite/id-1.f90: Same.
476 * testsuite/gfortran.dg/graphite/id-2.f90: Same.
477 * testsuite/gfortran.dg/graphite/id-3.f90: Same.
478 * testsuite/gfortran.dg/graphite/id-4.f90: Same.
479 * testsuite/gfortran.dg/graphite/id-6.f: Same.
480 * testsuite/gfortran.dg/graphite/id-9.f: Same.
481 * testsuite/gfortran.dg/graphite/interchange-1.f: Same.
482 * testsuite/gfortran.dg/graphite/interchange-2.f: Same.
483 * testsuite/gfortran.dg/graphite/scop-1.f: Same.
485 2009-07-14 Sebastian Pop <sebastian.pop@amd.com>
487 * sese.c (expand_scalar_variables_call): New.
488 (expand_scalar_variables_ssa_name): Handle calls in expander.
490 2009-07-13 Sebastian Pop <sebastian.pop@amd.com>
492 * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-6.c:
493 Expect to see the pattern twice.
494 * testsuite/gcc.dg/graphite/interchange-0.c: Un-XFAIL.
495 * testsuite/gcc.dg/graphite/interchange-5.c: Same.
496 * testsuite/gcc.dg/graphite/interchange-6.c: Same.
498 2009-07-13 Sebastian Pop <sebastian.pop@amd.com>
500 * testsuite/gcc.dg/graphite/id-10.c: New.
501 * testsuite/gcc.dg/graphite/id-12.c: New.
502 * testsuite/gfortran.dg/graphite/id-7.f: New.
503 * testsuite/gfortran.dg/graphite/id-8.f: New.
505 2009-07-13 Sebastian Pop <sebastian.pop@amd.com>
507 * graphite-sese-to-poly.c (pdr_add_data_dimensions): Fix division by
510 2009-07-13 Sebastian Pop <sebastian.pop@amd.com>
512 * sese.c (rename_variables_in_stmt): Call fold_convert during renaming.
514 2009-07-13 Sebastian Pop <sebastian.pop@amd.com>
516 * sese.c (expand_scalar_variables_stmt): Avoid unnecessary expansion.
518 2009-07-10 Sebastian Pop <sebastian.pop@amd.com>
520 * graphite-sese-to-poly.c (pdr_add_memory_accesses): Fix order of
521 building PDR subscripts.
523 2009-07-10 Sebastian Pop <sebastian.pop@amd.com>
525 * graphite-sese-to-poly.c (pdr_add_data_dimensions): Fix the
526 computation of array sizes.
528 2009-07-10 Sebastian Pop <sebastian.pop@amd.com>
530 * graphite-sese-to-poly.c (add_param_constraints): Disabled.
532 2009-07-10 Tobias Grosser <grosser@fim.uni-passau.de>
534 * graphite-dependences.c (map_into_dep_poly, map_dr_into_dep_poly,
535 build_pairwise_constraint, dr_equality_constraints,
536 build_pairwise_scheduling_equality,
537 build_pairwise_scheduling_inequality, lexicographically_gt_p,
538 build_lexicographically_gt_constraint, dependence_polyhedron,
539 graphite_legal_transform_dr, graphite_carried_dependence_level_k):
540 Move from NNC_Polyhedron to C_Polyhedron.
541 * graphite-interchange.c (compute_array_size_poly,
542 gather_access_strides): Dito.
543 * graphite-poly.c (apply_poly_transforms, new_poly_dr, free_poly_bb,
544 free_scop, pbb_number_of_iterations): Dito.
545 * graphite-poly.h (struct poly_dr, pdr_nb_subscripts, struct poly_bb,
546 pbb_dim_iter_domain, struct scop): Dito.
547 * graphite-ppl.c (new_Constraint_System_from_Cloog_Matrix,
548 new_Cloog_Domain_from_ppl_Polyhedron,
549 new_Cloog_Domain_from_ppl_Pointset_Powerset, ppl_set_coef_gmp,
550 ppl_insert_dimensions_pointset, ppl_insert_dimensions_pointset,
551 ppl_strip_loop, ppl_strip_loop, ppl_print_polyhedron_matrix,
552 ppl_print_powerset_matrix, debug_ppl_polyhedron_matrix,
553 debug_ppl_powerset_matrix, ppl_read_polyhedron_matrix): Dito.
554 * graphite-ppl.h (ppl_Pointset_Powerset_C_Polyhedron_t,
555 new_C_Polyhedron_from_Cloog_Matrix, ppl_print_powerset_matrix,
556 debug_ppl_powerset_matrix, ppl_insert_dimensions_pointset): Dito.
557 * graphite-sese-to-poly.c (build_pbb_scattering_polyhedrons,
558 build_loop_iteration_domains, ppl_constraint_type_from_tree_code,
559 add_condition_to_domain, add_condition_to_pbb, build_scop_context,
560 build_scop_iteration_domain, build_poly_dr): Dito
562 2009-07-09 Sebastian Pop <sebastian.pop@amd.com>
564 * testsuite/gcc.dg/graphite/graphite.exp: Added a rule to execute
566 * testsuite/gcc.dg/graphite/run-id-1.c: New.
568 2009-07-09 Sebastian Pop <sebastian.pop@amd.com>
570 * graphite-sese-to-poly.c (build_loop_iteration_domains): Add the
571 positivity constraint on the symbolic number of iterations.
573 2009-07-09 Sebastian Pop <sebastian.pop@amd.com>
575 * graphite-sese-to-poly.c (build_loop_iteration_domains): Rewrite.
577 2009-07-09 Sebastian Pop <sebastian.pop@amd.com>
578 Tobias Grosser <grosser@fim.uni-passau.de>
580 * graphite-clast-to-gimple.c (build_scop_context): Removed.
581 (build_cloog_prog): Directly use SCOP_CONTEXT.
582 * graphite-poly.c (new_scop): Initialize SCOP_CONTEXT.
583 (free_scop): Free SCOP_CONTEXT.
584 (print_scop_context): New.
585 (print_scop): Call print_scop_context.
586 (debug_scop_context): New.
587 * graphite-poly.h (print_scop_context, debug_scop_context): Declared.
588 (struct scop): Added field context.
590 * graphite-sese-to-poly.c (add_param_constraints): New.
591 (build_scop_context): New.
592 (build_poly_scop): Call build_scop_context.
594 2009-07-09 Sebastian Pop <sebastian.pop@amd.com>
596 * graphite-clast-to-gimple.c (gmp_cst_to_tree): Moved...
597 * graphite-ppl.c (ppl_set_inhomogeneous_gmp, ppl_set_coef_gmp): New.
598 (ppl_set_inhomogeneous, ppl_set_coef): Moved...
599 * graphite-ppl.h: Include double-int.h and tree.h.
600 (ppl_set_inhomogeneous_gmp, ppl_set_coef_gmp): Declared.
601 (ppl_set_inhomogeneous, ppl_set_coef): ...here.
602 (gmp_cst_to_tree): ...here. Reimplemented using mpz_get_double_int.
603 (tree_int_to_gmp, ppl_set_inhomogeneous_tree, ppl_set_coef_tree): New.
605 2009-07-09 Sebastian Pop <sebastian.pop@amd.com>
607 * graphite-clast-to-gimple.c (clast_to_gcc_expression_red): Generate
608 POINTER_PLUS_EXPR for pointer types.
609 (clast_to_gcc_expression): Same.
611 2009-07-09 Sebastian Pop <sebastian.pop@amd.com>
613 * graphite-poly.c (print_scattering_function): Early return when
614 PBB_TRANSFORMED_SCATTERING is not initialized.
615 (print_pbb_domain): Early return when PBB_DOMAIN is not initialized.
617 2009-07-08 Sebastian Pop <sebastian.pop@amd.com>
619 * tree-parloops.c (analyze_reduction_list): Remove unused variable
622 2009-07-08 Razya Ladelsky <razya@il.ibm.com>
624 * tree-parloops.c (analyze_reduction_list): Change return
626 (try_create_reduction_list): Move the call to
627 analyze_reduction_list to the beginining.
628 Call reduction_phi with analyzed_reductions as argument
629 instead of reduction_list.
631 2009-07-08 Tobias Grosser <grosser@fim.uni-passau.de>
633 * Merge from mainline (r148296:149346)
635 2009-07-07 Sebastian Pop <sebastian.pop@amd.com>
637 * graphite-scop-detection.c (graphite_can_represent_init): New.
638 (graphite_can_represent_scev): Call graphite_can_represent_init:
639 check that the initial value does not contain multiplications of
641 (stmt_has_simple_data_refs_p): New.
642 (stmt_simple_for_scop_p): Call stmt_simple_for_scop_p.
643 (is_simple_operand): Fix formatting.
644 * graphite-sese-to-poly.c (try_generate_gimple_bb): Fix formatting.
646 2009-07-07 Sebastian Pop <sebastian.pop@amd.com>
648 * testsuite/gcc.dg/graphite/id-13.c: New.
649 * graphite-sese-to-poly.c (graphite_stmt_p): Do not call
650 analyze_scalar_evolution, use scalar_evolution_in_region.
651 (scan_tree_for_params_right_scev): Add extra assert.
652 (parameter_index_in_region_1): Split from parameter_index_in_region.
653 (idx_record_params): Use scalar_evolution_in_region.
654 (find_params_in_bb): Same.
655 (find_scop_parameters): Same.
656 (build_loop_iteration_domains): Same.
657 (create_linear_expr_from_tree): Same.
658 * sese.c (scalar_evolution_in_region): New.
659 * sese.h (scalar_evolution_in_region): Declared.
660 (defined_in_sese_p): New.
661 * tree-scalar-evolution.c (compute_overall_effect_of_inner_loop): Not
663 * tree-scalar-evolution.h (compute_overall_effect_of_inner_loop):
666 2009-07-07 Sebastian Pop <sebastian.pop@amd.com>
668 * Makefile.in: Replace dependences on tree-chrec.h with SCEV_H.
669 TREE_DATA_REF_H also implies SCEV_H.
671 2009-07-07 Sebastian Pop <sebastian.pop@amd.com>
673 * graphite-poly.c (print_scop_params): New.
674 (print_scop): Call print_scop_params.
675 (debug_scop_params): New.
676 * graphite-poly.h (print_scop_params, debug_scop_params): Declared.
678 2009-07-07 Li Feng <nemokingdom@gmail.com>
680 * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-4.c: New.
681 * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-5.c: New.
682 * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-6.c: New.
683 * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-7.c: New.
684 * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-8.c: New.
685 * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-9.c: New.
687 2009-07-07 Li Feng <nemokingdom@gmail.com>
689 * graphite-clast-to-gimple.c (mark_loops_parallel): Dump information
690 for dependency checking part.
691 * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-1.c: Add
692 tests for dependency checking.
693 * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-2.c: Ditto.
694 * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-3.c: Ditto.
695 * testsuite/gcc.dg/graphite/graphite_autopar/graphite_autopar.exp: Add
696 flag -fdump-tree-graphite-all for autopar testsuites.
698 2009-07-06 Sebastian Pop <sebastian.pop@amd.com>
700 * Makefile.in (tree-ssa-loop-manip.o): Depends on langhooks.h.
701 * tree-parloops.c (rewrite_phi_with_iv, rewrite_all_phi_nodes_with_iv,
702 canonicalize_loop_ivs): Moved...
703 * tree-ssa-loop-manip.c: ... here. Include langhooks.h.
705 2009-07-06 Sebastian Pop <sebastian.pop@amd.com>
707 * tree-parloops.c (try_create_reduction_list): Pass an extra
708 argument analyzed_reductions. Call analyze_reduction_list.
709 (gen_parallel_loop): Do not call analyze_reduction_list.
710 (parallelize_loops): Init and finalize analyzed_reductions.
712 2009-07-06 Li Feng <nemokingdom@gmail.com>
714 * testsuite/gcc.dg/graphite/graphite_autopar/graphite_autopar.exp:
715 Added flag -fno-loop-strip-mine for autopar testcase.
717 2009-07-04 Li Feng <nemokingdom@gmail.com>
719 * graphite-dependences.c (graphite_carried_dependence_level_k): Use
720 transformed scattering dimension instead of unmatch orignal when
721 calling dependence_polyhedron.
723 2009-06-30 Sebastian Pop <sebastian.pop@amd.com>
725 * opts.c (decode_options): Enable flag_loop_strip_mine at -O2.
727 2009-06-30 Sebastian Pop <sebastian.pop@amd.com>
729 * graphite-poly.c (pbb_number_of_iterations): Check for returned
730 value 1 from ppl_Pointset_Powerset_NNC_Polyhedron_maximize.
732 2009-06-30 Sebastian Pop <sebastian.pop@amd.com>
734 * graphite-blocking.c (pbb_strip_mine_profitable_p): New.
735 (pbb_do_strip_mine): Call pbb_strip_mine_profitable_p.
736 * graphite-poly.c (pbb_number_of_iterations): New.
737 * graphite-poly.h (pbb_number_of_iterations): Declared.
738 (pbb_iterator_dim, pbb_parameter_dim): New.
740 2009-06-29 Sebastian Pop <sebastian.pop@amd.com>
742 * graphite-clast-to-gimple.c (graphite_create_new_loop): Revert the
743 last commit on type of lower and upper bound of loops.
745 2009-06-29 Li Feng <nemokingdom@gmail.com>
747 * Makefile.in (graphite-clast-to-gimple.o): Added dependence on
748 graphite-dependences.h.
749 * graphite-clast-to-gimple.c (new_bb_pbb_def): New.
750 (mark_bb_with_pbb): New.
751 (get_stmtfor_depth): New.
752 (find_pbb_via_hash): New.
753 (dependency_in_loop_p): New.
754 (mark_loops_parallel): New.
755 (free_aux_in_new_loops): New.
756 (translate_clast): Add parameter BB_PBB_MAPPING. Mark newly created
757 bb with it's relevant pbb. Mark newly created loops. Remove mark
758 innermost loop parallel without checking.
759 (gloog): Add parameter BB_PBB_MAPPING.
760 * graphite-clast-to-gimple.h (struct bb_pbb_def): New.
761 (gloog): Change declaration.
762 (mark_loop_parallel): Make extern.
763 (free_aux_in_new_loops): Declare.
764 (bb_pbb_map_hash): New.
765 (eq_bb_pbb_map): New.
766 * graphite.c (graphite_transform_loops): Added BB_PBB_MAPPING. Trigger
767 auto parallelization when flag_graphite_force_parallel is set.
768 (graphite_finalize): Added free_aux_in_new_loops.
769 * tree-parloops.c (parallelize_loops): Only generate parallel code for
770 the innermost loop that marked parallel. Use
771 flag_graphite_force_parallel instead of loop->can_be_parallel.
772 (loop_parallel_p): Move inner most checking out of function.
774 2009-06-26 Sebastian Pop <sebastian.pop@amd.com>
776 * graphite-clast-to-gimple.c (graphite_create_new_loop): Make the
777 type of lower and upper bound of loops signed long int.
779 2009-06-26 Sebastian Pop <sebastian.pop@amd.com>
781 * cfgloopmanip.c (create_empty_loop_on_edge): Gimplify the loop exit
782 expression outside the loop.
784 2009-06-26 Sebastian Pop <sebastian.pop@amd.com>
786 * gcc.dg/graphite/interchange-8.c: New.
788 2009-06-26 Sebastian Pop <sebastian.pop@amd.com>
790 * gcc.dg/graphite/interchange-0.c: XFailed.
791 * gcc.dg/graphite/interchange-5.c: XFailed.
792 * gcc.dg/graphite/interchange-6.c: XFailed.
794 2009-06-26 Sebastian Pop <sebastian.pop@amd.com>
796 * graphite-interchange.c (compute_array_size_poly): The end of the
797 recursion should return 1.
799 2009-06-26 Sebastian Pop <sebastian.pop@amd.com>
801 * graphite-interchange.c (compute_array_size_cstr): Allow the
802 subscript multiplier to be -1.
803 (compute_array_size): Use PDR_DATA_CONTAINER and not PDR_ACCESSES.
804 * graphite-poly.c (new_poly_dr): Takes an extra argument for the
805 data_container. Initializes PDR_DATA_CONTAINER.
806 (print_pdr_access_layout): New.
807 (print_pdr): Call print_pdr_access_layout. Print PDR_DATA_CONTAINER.
808 * graphite-poly.h (struct poly_dr): Adjust comment. Add a new field
810 (PDR_DATA_CONTAINER): New.
811 (new_poly_dr): Update declaration.
812 * graphite-sese-to-poly.c (pdr_add_data_dimensions): New.
813 (build_poly_dr): Call pdr_add_data_dimensions.
815 2009-06-26 Sebastian Pop <sebastian.pop@amd.com>
817 * graphite-poly.h (struct poly_dr): Fix comment.
818 * graphite-sese-to-poly.c (pdr_add_alias_set): New.
819 (pdr_add_memory_accesses): New.
820 (build_poly_dr): Call pdr_add_memory_accesses and pdr_add_alias_set.
822 2009-06-26 Sebastian Pop <sebastian.pop@amd.com>
824 * graphite-poly.c (print_pdrs, debug_pdrs): New.
825 (print_pbb): Add call to print_pdrs.
826 * graphite-poly.h (print_pdrs, debug_pdrs): Declared.
828 2009-06-24 Konrad Trifunovic <konrad.trifunovic@gmail.com>
829 Li Feng <nemokingdom@gmail.com>
831 * graphite-dependences.c (graphite_carried_dependence_level_k): New.
832 (dependency_between_pbbs_p): New.
833 (lexicographically_gt_p): Assure !empty_p before polyhedron
835 (build_lexicographically_gt_constraint): Correct lexicographically
837 * graphite-dependences.h: New.
838 * Makefile.in (graphite-dependences.o): Add graphite-dependences.h.
840 2009-06-24 Sebastian Pop <sebastian.pop@amd.com>
842 * graphite-clast-to-gimple.c (print_clast_stmt): New.
843 (gloog): Print to dump_file the generated clast.
844 * graphite-clast-to-gimple.h (print_clast_stmt): Declared.
845 * graphite-interchange.c (pbb_do_interchange): Fix dump formatting.
847 2009-06-24 Sebastian Pop <sebastian.pop@amd.com>
849 * graphite-poly.c (extend_scattering): Increment
850 PBB_NB_LOCAL_VARIABLES by the number of added dimensions.
852 2009-06-24 Sebastian Pop <sebastian.pop@amd.com>
854 * graphite-interchange.c (compute_array_size_poly): Added exit of
855 recursion condition. Continue iterating even after the first equality.
856 (compute_array_size): Same.
858 2009-06-24 Li Feng <nemokingdom@gmail.com>
860 * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-1.c: Update
861 -fdump-tree-final_cleanup to -fdump-tree-optimized.
862 * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-2.c: Ditto.
863 * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-3.c: Ditto.
864 * testsuite/gcc.dg/graphite/graphite_autopar/graphite_autopar.exp: Ditto.
866 2009-06-23 Sebastian Pop <sebastian.pop@amd.com>
868 * sese.c (expand_scalar_variables_stmt): Expand scalar variables
869 only when the use verifies is_gimple_reg.
871 2009-06-23 Sebastian Pop <sebastian.pop@amd.com>
873 * graphite-clast-to-gimple.c (build_cloog_prog): Fix memory corruption.
874 Allocate scaldims after call to unify_scattering_dimensions.
876 2009-06-23 Sebastian Pop <sebastian.pop@amd.com>
878 * graphite-clast-to-gimple.c (translate_clast): Fix memory leak.
880 2009-06-23 Sebastian Pop <sebastian.pop@amd.com>
881 Albert Cohen <albert.cohen@inria.fr>
883 * graphite-blocking.c (pbb_strip_mine_loop_depth): Do not use local
884 variables for the strip mining.
886 2009-06-23 Sebastian Pop <sebastian.pop@amd.com>
887 Pranav Garg <pranav.garg2107@gmail.com>
889 * Makefile.in (OBJS-common): Added graphite-blocking.o.
890 (graphite-sese-to-poly.o): Moved down to be in lexicographical order.
891 (graphite-blocking.o): New rule.
892 (graphite-poly.o, graphite-ppl.o): Moved to be in lexicographical order.
893 * graphite-blocking.c: New.
894 * graphite-poly.c (apply_poly_transforms): Call scop_do_strip_mine for
895 flag_loop_strip_mine.
896 (psct_scattering_dim_for_loop_depth): New.
897 * graphite-poly.h (scop_do_strip_mine): Declared.
898 (psct_add_local_variable): Increment PBB_NB_LOCAL_VARIABLES.
899 * tree-ssa-loop.c (gate_graphite_transforms): Do not fail when using
900 flag_loop_strip_mine.
902 2009-06-23 Sebastian Pop <sebastian.pop@amd.com>
904 * graphite-poly.c (extend_scattering): Avoid initializing and freeing
905 a GMP value and a PPL coefficient at each iteration of a loop.
907 2009-06-23 Sebastian Pop <sebastian.pop@amd.com>
909 * graphite-dependences.c (dependence_polyhedron): Do not use
910 pbb_nb_scattering_dims anymore. Use pbb_nb_scattering_orig and
911 pbb_nb_scattering_transform.
912 (graphite_legal_transform_dr): Same.
913 * graphite-poly.c (extend_scattering): Same.
914 (unify_scattering_dimensions): Same.
915 (print_scattering_function): Same.
916 (new_poly_bb): Initialize PBB_NB_SCATTERING_TRANSFORM and
917 PBB_NB_LOCAL_VARIABLES.
918 * graphite-poly.h (pbb_nb_scattering): Removed declaration.
919 (struct poly_bb): Added nb_local_variables and nb_scattering_transform.
920 (PBB_NB_LOCAL_VARIABLES, PBB_NB_SCATTERING_TRANSFORM): New.
921 (pbb_nb_scattering_orig, pbb_nb_scattering_transform): New.
922 (pbb_nb_scattering_dims, pbb_nb_scattering): Removed.
923 (pbb_nb_scattering_transform): New.
924 (pbb_nb_local_vars): Return PBB_NB_LOCAL_VARIABLES.
925 (psco_scattering_dim): Add assert on parameters.
926 (psct_scattering_dim): Same.
927 (psct_scattering_dim_for_loop_depth): Declared.
928 (psct_local_var_dim): New.
929 (psco_iterator_dim, psco_parameter_dim): Add assert on parameters.
930 (psct_iterator_dim, psct_parameter_dim): Same. To maintain the
931 correct layout, call pbb_nb_local_vars.
932 (psct_add_local_variable, psct_add_scattering_dimension): New.
933 * graphite-sese-to-poly.c (build_pbb_scattering_polyhedrons):
934 Initialize PBB_NB_SCATTERING_TRANSFORM.
936 2009-06-23 Sebastian Pop <sebastian.pop@amd.com>
938 * graphite-ppl.c (set_inhomogeneous): Renamed ppl_set_inhomogeneous.
939 (set_coef): Renamed ppl_set_coef.
940 * graphite-ppl.h (ppl_set_inhomogeneous, ppl_set_coef): Declared.
942 2009-06-23 Sebastian Pop <sebastian.pop@amd.com>
944 * graphite-dependences.c (build_pairwise_scheduling_inequality): Don't
945 test a boolean against 1.
946 * graphite-interchange.c (pbb_interchange_loop_depths): Do not build
947 a new polyhedron for the PBB_TRANSFORMED_SCATTERING.
948 (pbb_do_interchange): Returns true when a transform has been performed.
949 (scop_do_interchange): Same.
950 * graphite-poly.c (apply_poly_transforms): Use the return value of
952 * graphite-poly.h (scop_do_interchange): Update declaration.
954 2009-06-23 Tobias Grosser <grosser@fim.uni-passau.de>
956 * graphite-clast-to-gimple.c (gloog): Reset loop->aux right
958 * sese.c (sese_reset_aux_in_loops): New.
959 * sese.h (sese_reset_aux_in_loops): New.
961 2009-06-19 Sebastian Pop <sebastian.pop@amd.com>
963 * graphite-sese-to-poly.c (scan_tree_for_params_int): Pass in the
964 multiplier and multiply the constant by the multiplier.
965 (scan_tree_for_params): Bound the multiplier to its MULT_EXPR.
966 (build_poly_dr): Do not use the multiplier to define the subscript.
968 2009-06-19 Sebastian Pop <sebastian.pop@amd.com>
970 * graphite-poly.c (new_poly_dr): Pass an extra argument for the
971 compiler's data reference. Initialize PDR_CDR.
972 (print_pdr): Call dump_data_reference.
973 * graphite-poly.h (struct poly_dr): Rename black_box into pbb.
974 Add compiler_dr field.
975 (PDR_BB): Renamed PDR_PBB.
977 * graphite-sese-to-poly.c (build_poly_dr): Pass to new_poly_dr
978 GCC's data reference representation.
979 * tree-data-ref.c (debug_data_references, debug_data_reference): New.
980 * tree-data-ref.h (debug_data_references, debug_data_reference): Decl.
982 2009-06-19 Sebastian Pop <sebastian.pop@amd.com>
984 * graphite-poly.c (print_scattering_function): Also print the layout.
985 * graphite-poly.h (pbb_nb_local_vars): New.
987 2009-06-19 Sebastian Pop <sebastian.pop@amd.com>
989 * graphite-poly.c (print_pbb_domain): Also print the layout names.
991 2009-06-19 Sebastian Pop <sebastian.pop@amd.com>
993 * graphite-poly.c (print_pdr, debug_pdr): New.
994 * graphite-poly.h (print_pdr, debug_pdr): Declared.
997 2009-06-18 Sebastian Pop <sebastian.pop@amd.com>
999 * gcc/testsuite/gcc.dg/graphite/interchange-{1..7}.c: New avatars of
1002 2009-06-18 Sebastian Pop <sebastian.pop@amd.com>
1004 * graphite-interchange.c (compute_subscript): Allow also -1 in the
1005 subscript identification column.
1006 (pbb_do_interchange): Print to dump_file that some loops "will be
1007 interchanged". Rely on that chain of characters in the testcases.
1008 * gcc.dg/graphite/interchange-0.c: New.
1009 * gcc.dg/graphite/graphite.exp: Iterate over the testsuite
1010 interchange-*.c files and compile them with -floop-interchange.
1012 2009-06-18 Pranav Garg <pranav.garg2107@gmail.com>
1014 * graphite-interchange.c (interchange_profitable_p): Renamed
1015 pbb_interchange_profitable_p.
1017 2009-06-18 Sebastian Pop <sebastian.pop@amd.com>
1018 Harsha Jagasia <harsha.jagasia@amd.com>
1019 Pranav Garg <pranav.garg2107@gmail.com>
1021 * graphite-interchange.c (interchange_profitable_p): Make static.
1022 (pbb_interchange_loop_depths, pbb_do_interchange,
1023 scop_do_interchange): New.
1024 * graphite-poly.c (apply_poly_transforms): Call scop_do_interchange
1025 for flag_loop_interchange.
1026 * graphite-poly.h (scop_do_interchange): Declared.
1027 * tree-ssa-loop.c (gate_graphite_transforms): Do not fail when
1028 flag_loop_interchange is used.
1030 2009-06-18 Sebastian Pop <sebastian.pop@amd.com>
1032 * graphite-dependences.c (dependence_polyhedron): Update use of
1033 pbb_nb_scattering_dims.
1034 * graphite-poly.h (pbb_nb_scattering_dims): Do not pass SCOP.
1035 (pbb_nb_scattering): Update use of pbb_nb_scattering_dims.
1036 (psco_scattering_dim, psct_scattering_dim, psco_iterator_dim,
1037 psct_iterator_dim, psco_parameter_dim, psct_parameter_dim): New.
1039 2009-06-16 Sebastian Pop <sebastian.pop@amd.com>
1041 * graphite.c: Cleanup foo.
1043 2009-06-16 Sebastian Pop <sebastian.pop@amd.com>
1045 * Merge from mainline (r143684:148293).
1046 * Disabled libpcp until it gets fixed.
1048 2009-06-05 Sebastian Pop <sebastian.pop@amd.com>
1049 Harsha Jagasia <harsha.jagasia@amd.com>
1051 * graphite-interchange.c: New.
1052 * Makefile.in (graphite-interchange.o): New.
1053 * graphite-poly.h (interchange_profitable_p): Declared.
1054 * graphite-ppl.h (value_max): New.
1056 2009-06-04 Sebastian Pop <sebastian.pop@amd.com>
1058 * graphite-dependences.c (dependence_polyhedron): Use pdr_dim.
1059 * graphite-poly.h: Fix some comments.
1063 2009-06-04 Sebastian Pop <sebastian.pop@amd.com>
1066 (pdr_accessp_nb_subscripts): Renamed pdr_nb_subscripts.
1067 (pdr_accessp_nb_iterators): Renamed pdr_dim_iter_domain.
1068 (pdr_accessp_nb_params): Renamed pdr_nb_params.
1069 (pdr_accessp_alias_set_dim): Renamed pdr_alias_set_dim.
1070 (pdr_accessp_subscript_dim): Renamed pdr_subscript_dim.
1071 (pdr_accessp_iterator_dim): Renamed pdr_iterator_dim.
1072 (pdr_accessp_param_dim): Renamed pdr_parameter_dim.
1073 (pbb_nb_loops): Renamed pbb_dim_iter_domain.
1074 * graphite-clast-to-gimple.c: Same.
1075 * graphite-dependences.c: Same.
1076 * graphite-poly.c: Same.
1077 * graphite-sese-to-poly.c: Same.
1079 2009-06-03 Sebastian Pop <sebastian.pop@amd.com>
1081 * graphite-clast-to-gimple.c (build_iv_mapping): Insert full
1082 expressions for an IV rename, as returned by clast_to_gcc_expression.
1083 (copy_renames): Rename new_name to expr.
1084 * sese.c (debug_rename_elt): Same.
1087 (sese_adjust_liveout_phis): Call force_gimple_operand before using
1088 the information from the rename map.
1089 (rename_variables_in_stmt): Same.
1090 (add_loop_exit_phis): Rename new_name to expr.
1091 (insert_loop_close_phis): Same.
1092 (add_guard_exit_phis): Same. Call force_gimple_operand.
1093 * sese.h (struct rename_map_elt): Rename new_name to expr.
1094 (new_rename_map_elt): Same.
1096 2009-06-03 Sebastian Pop <sebastian.pop@amd.com>
1098 * graphite-clast-to-gimple.c (build_iv_mapping): Use set_rename.
1099 * sese.c (set_rename): Make it extern.
1100 * sese.h (set_rename): Declared.
1102 2009-06-03 Sebastian Pop <sebastian.pop@amd.com>
1104 * graphite-poly.c (extend_scattering): Free values.
1105 * graphite-ppl.c (new_Cloog_Domain_from_ppl_Pointset_Powerset):
1107 (ppl_print_powerset_matrix): Same.
1108 * graphite-scop-detection.c (free_scops_1): New.
1109 (limit_scops): Call free_scops_1.
1110 * graphite-sese-to-poly.c (build_scop_bbs_1): Free dom.
1111 (build_poly_dr): Free PPL coefficients.
1112 * tree-parloops.c (rewrite_all_phi_nodes_with_iv): Free bbs.
1114 2009-06-02 Sebastian Pop <sebastian.pop@amd.com>
1116 * graphite-dependences.c: New.
1117 * graphite-data-ref.c: Removed.
1118 * graphite-data-ref.h: Removed.
1119 * Makefile.in (graphite-data-ref.o): Removed.
1120 (graphite-dependences.o): Added.
1121 * graphite-clast-to-gimple.c: Remove dependence on graphite-data-ref.h.
1122 * graphite-poly.c: Same.
1123 Move the data dependence testing to graphite-dependences.c.
1125 2009-05-19 Tobias Grosser <grosser@fim.uni-passau.de>
1127 * graphite-scop-detection.c (graphite_can_represent_loop): Renamed
1128 from graphite_cannot_represent_loop. Code refactored.
1129 (scopdet_basic_block_info): Call graphite_can_represent_loop.
1131 2009-05-17 Li Feng <nemokingdom@gmail.com>
1133 * testsuite/gcc.dg/graphite/graphite_autopar/graphite_autopar.exp:
1134 Cover all the testcases (not only the filtered ones).
1136 2009-05-17 Tobias Grosser <grosser@fim.uni-passau.de>
1138 * graphite-scop-detection.c (stmt_simple_for_scop_p): Remove
1139 unnecessary check. Update comments. Move check for REAL_TYPE here.
1140 (harmful_stmt_in_bb): Remove checks for conditions. This is already
1141 done in (stmt_simple_for_scop_p).
1143 2009-05-14 Tobias Grosser <grosser@fim.uni-passau.de>
1145 * graphite.c (print_global_statistics): New.
1146 (print_graphite_scop_statistic): New.
1147 (print_graphite_statistics): New.
1148 (graphite_initialize, graphite_transform_loops): Print statistics.
1149 * graphite-scop-detection (build_scops): Print statistics.
1150 (print_graphite_scop_statistics): New.
1151 (print_graphite_statistics): New.
1153 2009-05-13 Sebastian Pop <sebastian.pop@amd.com>
1155 * graphite-clast-to-gimple.c (struct clast_name_index): Removed.
1156 (debug_clast_name_index): Removed.
1157 (debug_clast_name_indexes_1): Removed.
1158 (debug_clast_name_indexes): Removed.
1159 (clast_name_index_elt_info): Removed.
1160 (eq_clast_name_indexes): Removed.
1161 (clast_name_to_index): Removed.
1162 (new_clast_name_index): Removed.
1163 (save_clast_name_index): Removed.
1164 (save_var_name): Moved...
1165 (init_sese_params_index): Removed.
1166 (clast_name_to_gcc): Remove use of name_tree.
1167 (initialize_cloog_names): Same.
1168 (gloog): Do not call init_sese_params_index.
1169 * graphite-sese-to-poly.c (save_var_name): ...here.
1170 (parameter_index_in_region): New.
1171 * sese.c (new_sese): Initialize SESE_PARAMS_NAMES.
1172 (parameter_index_in_region): Removed.
1173 (is_parameter): Remove use of name_tree.
1174 * sese.h (struct name_tree): Removed.
1175 (struct sese): Remove use of name_tree. New field params_names.
1176 (SESE_PARAMS_NAMES): New.
1177 (SESE_PARAMS): Remove duplicate.
1178 (parameter_index_in_region): Removed.
1179 (sese_nb_params): Remove use of name_tree.
1180 (struct clast_name_index): New.
1181 (new_clast_name_index): New.
1182 (clast_name_to_index): New.
1183 (save_clast_name_index): New.
1184 (debug_clast_name_index): New.
1185 (debug_clast_name_indexes_1): New.
1186 (debug_clast_name_indexes): New.
1187 (clast_name_index_elt_info): New.
1188 (eq_clast_name_indexes): New.
1190 2009-05-13 Sebastian Pop <sebastian.pop@amd.com>
1192 * graphite-clast-to-gimple.c (compute_cloog_iv_types_1): Call
1193 pbb_to_depth_to_oldiv. Remove call to oldiv_for_loop.
1194 (graphite_loop_normal_form): Do not pass region. Do not
1195 initialize SESE_OLDIVS.
1196 (build_graphite_loop_normal_form): Update call to
1197 graphite_loop_normal_form.
1198 * sese.c (debug_oldivs): Removed.
1199 (new_sese): Do not initialize SESE_OLDIVS.
1200 (free_sese): Do not free SESE_OLDIVS.
1201 (oldiv_for_loop): Removed.
1202 * sese.h (struct sese): Remove old_ivs.
1203 (SESE_OLDIVS): Removed.
1204 (oldiv_for_loop): Removed.
1206 2009-05-13 Sebastian Pop <sebastian.pop@amd.com>
1208 * graphite-clast-to-gimple.c (clast_name_to_gcc): Pass newivs,
1209 remove ivstack. Remove call to loop_iv_stack_get_iv_from_name,
1210 replaced by a call to newivs_to_depth_to_newiv.
1211 (clast_to_gcc_expression): Pass newivs, remove ivstack.
1212 (clast_to_gcc_expression_red): Same.
1213 (gcc_type_for_clast_expr): Same.
1214 (gcc_type_for_clast_eq): Same.
1215 (graphite_translate_clast_equation): Same.
1216 (graphite_create_guard_cond_expr): Same.
1217 (graphite_create_new_guard): Same.
1218 (graphite_create_new_loop): Same.
1219 (build_iv_mapping): Same.
1220 (translate_clast): Same.
1222 (loop_iv_stack_patch_for_consts): Removed. *
1223 sese.c (iv_stack_entry_is_constant): Removed.
1224 (iv_stack_entry_is_iv): Removed.
1225 (loop_iv_stack_push_iv): Removed.
1226 (loop_iv_stack_insert_constant): Removed.
1227 (loop_iv_stack_pop): Removed.
1228 (loop_iv_stack_get_iv): Removed.
1229 (loop_iv_stack_get_iv_from_name): Removed.
1230 (debug_loop_iv_stack): Removed.
1231 (free_loop_iv_stack): Removed.
1232 (loop_iv_stack_remove_constants): Removed. *
1233 sese.h (iv_stack_entry_kind): Removed.
1234 (iv_stack_entry_data_union): Removed.
1235 (iv_stack_entry_struct): Removed.
1236 (iv_stack_entry_p): Removed.
1237 (debug_oldivs, debug_loop_iv_stack, loop_iv_stack_insert_constant,
1238 loop_iv_stack_get_iv_from_name, loop_iv_stack_push_iv,
1239 loop_iv_stack_get_iv, loop_iv_stack_remove_constants,
1240 loop_iv_stack_pop, free_loop_iv_stack): Removed.
1241 (gbb_loop_at_index): Fix indenting.
1242 (gbb_loop_index): Removed.
1244 2009-05-13 Sebastian Pop <sebastian.pop@amd.com>
1246 * graphite-clast-to-gimple.c (clast_name_to_gcc): Do not use strcmp.
1247 Call clast_name_to_index.
1249 2009-05-13 Sebastian Pop <sebastian.pop@amd.com>
1251 * graphite-clast-to-gimple.c (clast_name_to_gcc): Pass region,
1252 do not pass params. Get params from SESE_PARAMS.
1253 (clast_to_gcc_expression): Same.
1254 (clast_to_gcc_expression_red): Same.
1255 (gcc_type_for_clast_eq): Same.
1256 (graphite_translate_clast_equation): Same.
1257 (graphite_create_new_loop): Same.
1258 * sese.c (rename_variables_in_stmt): Fix comment.
1260 2009-05-13 Sebastian Pop <sebastian.pop@amd.com>
1262 * graphite-clast-to-gimple.c (graphite_create_new_loop): Pass
1264 Call save_clast_name_index.
1265 (translate_clast): Pass newivs_index.
1266 (gloog): Create and free newivs_index.
1268 2009-05-13 Sebastian Pop <sebastian.pop@amd.com>
1270 * graphite-clast-to-gimple.c (clast_name_index): New structure.
1271 (clast_name_index_p): New type.
1272 (debug_clast_name_index): New.
1273 (debug_clast_name_indexes_1): New.
1274 (debug_clast_name_indexes): New.
1275 (clast_name_index_elt_info): New.
1276 (eq_clast_name_indexes): New.
1277 (clast_name_to_index): New.
1278 (new_clast_name_index): New.
1279 (save_clast_name_index): New.
1280 (init_sese_params_index): New.
1281 (gloog): Call init_sese_params_index.
1282 * graphite-clast-to-gimple.h (debug_clast_name_indexes): Declared.
1283 * sese.c (new_sese): Initialize SESE_PARAMS_INDEX.
1284 (free_sese): Free SESE_PARAMS_INDEX.
1285 * sese.h (struct sese): Add params_index.
1286 (SESE_PARAMS_INDEX): New.
1288 2009-05-13 Sebastian Pop <sebastian.pop@amd.com>
1290 * graphite-clast-to-gimple.c (newivs_to_depth_to_newiv): New.
1291 (graphite_create_new_loop): Pass the newivs vector. Push the
1292 newly created IV to newivs.
1293 (translate_clast): Pass the newivs vector.
1294 (gloog): Create and destroy the newivs vector.
1296 2009-05-13 Sebastian Pop <sebastian.pop@amd.com>
1298 * graphite-clast-to-gimple.c (pbb_to_depth_to_oldiv): New.
1299 (graphite_loop_normal_form): Initialize loop->aux with the unique
1300 IV that has been created.
1302 2009-05-13 Tobias Grosser <grosser@fim.uni-passau.de>
1304 * tree-chrec.c (evolution_function_right_is_integer_cst): Allow
1305 scev with parameters in the base part. They where forbidden
1308 2009-05-11 Li Feng <nemokingdom@gmail.com>
1310 * testsuite/gcc.dg/graphite/graphite.exp: Set different default
1311 compile options by file names.
1312 * testsuite/gcc.dg/graphite/block{0-6}.c: Remove dg-option line.
1313 * testsuite/gcc.dg/graphite/id-{1-9}.c: Ditto.
1314 * testsuite/gcc.dg/graphite/scop-{0-20}.c: Ditto.
1315 * testsuite/gcc.dg/graphite/scop-matmult.c: Ditto.
1317 2009-05-08 Li Feng <nemokingdom@gmail.com>
1319 * testsuite/gcc.dg/graphite/graphite_autopar/graphite_autopar.exp: New.
1320 * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-1.c: New.
1321 * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-2.c: New.
1322 * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-3.c: New.
1324 2009-05-07 Tobias Grosser <grosser@fim.uni-passau.de>
1326 * graphite-scop-detection (build_scops_1): Fix little bug introduced
1329 2009-05-07 Tobias Grosser <grosser@fim.uni-passau.de>
1331 * graphite-scop-detection.c (graphite_can_represent_scev): Only
1332 allow integer constant strides.
1333 (graphite_can_represent_expr): Depend on outermost_loop.
1334 (stmt_simple_memref_p, graphite_cannot_represent_loop,
1335 harmful_stmt_in_bb, is_simple_operand, stmt_simple_for_scop_p,
1336 build_scops_1): Same.
1337 (scopdet_basic_block_info): Same and insert layered SCoP
1339 (try_generate_gimple_bb): Cleanup.
1340 (build_scops): Enable data references.
1342 * testsuite/gcc.dg/graphite/id-5.c: New.
1343 * testsuite/gcc.dg/graphite/id-9.c: New.
1344 * tree-chrec.c (evolution_function_right_is_integer_cst): New.
1345 * tree-chrec.h (evolution_function_right_is_integer_cst): New.
1347 2009-05-06 Tobias Grosser <grosser@fim.uni-passau.de>
1349 * sese.c (expand_scalar_variables_ssa_name): Only build expressions,
1350 that we have not yet built for this SCoP.
1352 2009-05-06 Tobias Grosser <grosser@fim.uni-passau.de>
1354 * sese.c (expand_scalar_variables_expr): Fix expand_scalar_variables
1355 for complex numbers.
1357 2009-05-06 Tobias Grosser <grosser@fim.uni-passau.de>
1359 * graphite-ppl.c: Fix build if cloog is not available.
1361 2009-05-04 Li Feng <nemokingdom@gmail.com>
1363 * tree-parloops.c (loop_parallel_p): Remove construction of
1364 NITER and REDUCTION_LIST.
1365 (try_get_loop_niter): New.
1366 (try_create_reduction_list): New.
1367 (parallelize_loops): Bypass the failed checkings in autopar
1368 when can_be_parallel in loop structure is set to true.
1370 2009-05-01 Tobias Grosser <grosser@fim.uni-passau.de>
1372 * testsuite/gcc.dg/graphite/id-6.c: Update testcase.
1373 * testsuite/gcc.dg/graphite/scop-3.c: Dito.
1375 2009-05-01 Tobias Grosser <grosser@fim.uni-passau.de>
1377 * graphite-scop-detection.c (stmt_simple_for_scop_p):
1378 Enable EQ_EXPR and NE_EXPR again.
1380 2009-04-30 Tobias Grosser <grosser@fim.uni-passau.de>
1382 * graphite-scop-detection.c (graphite_can_represent_scev):
1383 Add check if scev is affine multivariate.
1384 (harmful_stmt_in_bb): Check if we can represent the conditions.
1385 (scopdet_basic_block_info (basic_block bb, VEC): Pass the loop to
1387 * testsuite/gcc.dg/graphite/id-7.c: New.
1389 2009-04-30 Tobias Grosser <grosser@fim.uni-passau.de>
1391 * graphite-sese-to-poly.c (bb_contains_non_iv_scalar_phi_nodes):
1392 Check all bbs in region, not only the bbs that are represented in
1394 (build_poly_scop): Add newline.
1395 * testsuite/gcc.dg/graphite/id-8.c: New.
1397 2009-04-30 Li Feng <nemokingdom@gmail.com>
1399 * cfgloop.c (alloc_loop): Initialize can_be_parallel to false
1400 when loop initialize.
1401 * cfgloop.h (struct loop): Introduce flag can_be_parallel.
1402 * common.opt: Declare flag_graphite_force_parallel.
1403 * graphite-clast-to-gimple.c (translate_clast): Mark the innermost
1405 * graphite-poly.c (apply_poly_transforms): Introduce
1406 flag_graphite_force_parallel.
1407 * tree-ssa-loop.c (gate_graphite_transforms): ditto.
1408 * toplev.c (process_options): ditto and replace a not correctly
1411 2009-04-30 Li Feng <nemokingdom@gmail.com>
1413 * graphite-clast-to-gimple.c (loop_iv_stack_patch_for_consts):
1414 Change the call of gbb_loop_at_index and/or gbb_loop_index due
1415 to the redefinition.
1416 (compute_cloog_iv_types_1): ditto.
1417 (build_iv_mapping): ditto.
1418 * graphite-sese-to-poly.c (new_gimple_bb): Remove GBB_LOOPS related
1420 (free_gimple_bb): Removed GBB_LOOPS related free part.
1421 (build_bb_loops): Removed.
1422 * sese.h (struct gimple_bb): Removed loops.
1423 (GBB_LOOPS): Removed.
1424 (gbb_loop_at_index): Instead of using GBB_LOOPS, we use sese instead.
1425 (gbb_loop_index): ditto.
1427 2009-04-24 Tobias Grosser <grosser@fim.uni-passau.de>
1429 * graphite-scop-detection.c (graphite_can_represent_scev): Do not
1430 allow non constant strides.
1431 * testsuite/gcc.dg/graphite/scop-20.c: New.
1433 2009-04-24 Sebastian Pop <sebastian.pop@amd.com>
1435 * graphite-scop-detection.c (dot_all_scops): Fix system call
1436 return value warning.
1439 2009-04-24 Sebastian Pop <sebastian.pop@amd.com>
1441 * testsuite/gcc.dg/graphite/id-6.c: Fix pattern.
1442 * testsuite/gcc.dg/graphite/scop-3.c: Same.
1444 2009-04-24 Sebastian Pop <sebastian.pop@amd.com>
1446 * graphite-poly.c (map_into_dep_poly, map_dr_into_dep_poly,
1447 build_pairwise_constraint, dr_equality_constraints,
1448 build_pairwise_scheduling_equality,
1449 build_pairwise_scheduling_inequality, lexicographically_gt_p,
1450 build_lexicographically_gt_constraint, dependence_polyhedron,
1451 graphite_legal_transform_dr, graphite_legal_transform_bb,
1452 graphite_legal_transform): New.
1453 * graphite-poly.h (graphite_legal_transform): Declared.
1454 * graphite-sese-to-poly.c (build_poly_scop): Call to
1455 graphite_legal_transform is disabled for the moment.
1457 2009-04-24 Sebastian Pop <sebastian.pop@amd.com>
1459 * graphite-poly.h (pbb_nb_scattering_dims): New.
1460 (pbb_nb_scattering): Use it.
1462 2009-04-24 Sebastian Pop <sebastian.pop@amd.com>
1464 * graphite-ppl.c (ppl_insert_dimensions_pointset): Add
1465 Pointset_Powerset version of ppl_insert_dimensions.
1466 * graphite-ppl.h (ppl_insert_dimensions_pointset): Declared.
1468 2009-04-24 Sebastian Pop <sebastian.pop@amd.com>
1470 * graphite-ppl.c (ppl_insert_dimensions): Fix formatting.
1472 2009-04-24 Sebastian Pop <sebastian.pop@amd.com>
1474 * graphite-poly.h: Fix comment.
1476 2009-04-24 Sebastian Pop <sebastian.pop@amd.com>
1478 * graphite-sese-to-poly.c (build_poly_dr): Fix data ref multiplier.
1480 2009-04-24 Tobias Grosser <grosser@fim.uni-passau.de>
1482 * sese.c (expand_scalar_variables_stmt): Only iterate over the old
1485 2009-04-24 Tobias Grosser <grosser@fim.uni-passau.de>
1487 * graphite-sese-to-poly.c (var_used_in_not_loop_header_phi_node): New.
1488 (graphite_stmt_p): Represent bbs necessary to build the phi nodes of
1491 2009-04-20 Sebastian Pop <sebastian.pop@amd.com>
1493 * graphite-scop-detection.c (stmt_simple_for_scop_p): Do not
1494 handle EQ_EXPR and NE_EXPR.
1496 2009-04-17 Tobias Grosser <grosser@fim.uni-passau.de>
1498 * graphite-poly.h (poly_dr): Fix comment.
1500 2009-04-09 Sebastian Pop <sebastian.pop@amd.com>
1501 Tobias Grosser <grosser@fim.uni-passau.de>
1503 * graphite-poly.c (new_poly_bb): Do not initialize PBB_DOMAIN
1504 with a zero dimension polyhedron.
1505 (find_scop_parameters): Move the call to scop_set_nb_params here.
1506 (build_loop_iteration_domains): Store in loop->aux the iteration
1508 (build_scop_iteration_domain): Fix PBB_DOMAIN for bbs not surrounded
1509 by any loop in scop.
1510 (build_poly_scop): Do not call scop_set_nb_params.
1512 2009-04-09 Sebastian Pop <sebastian.pop@amd.com>
1513 Tobias Grosser <grosser@fim.uni-passau.de>
1515 * graphite-sese-to-poly.c (add_condition_to_pbb): Pass code to
1516 add_condition_to_domain not GT_EXPR.
1518 2009-04-09 Tobias Grosser <grosser@fim.uni-passau.de>
1520 * graphite-ppl.c (debug_ppl_powerset_matrix): New.
1521 * graphite-ppl.h (debug_ppl_powerset_matrix): New.
1522 * graphite-sese-to-poly.c (add_condition_to_pbb): Use
1523 upper_bound_assign to calculate unions.
1524 * testsuite/gcc.dg/graphite/id-6.c: New.
1526 2009-04-09 Tobias Grosser <grosser@fim.uni-passau.de>
1528 * graphite-scop-detection.c (canonicalize_loop_closed_ssa): Do not
1529 handle abnormal edges.
1531 2009-04-09 Tobias Grosser <grosser@fim.uni-passau.de>
1533 * graphite-poly.c (new_poly_dr, free_poly_dr): New.
1534 (free_poly_bb): Also free poly_drs.
1535 * graphite-poly.h (new_poly_dr, free_poly_dr): New.
1536 (poly_dr): Polyhedron to Pointset_Powerset.
1537 (pdr_accessp_nb_subscripts): Same.
1538 * graphite-sese-to-poly.c (build_poly_dr): Same. And actually build
1541 2009-04-08 Sebastian Pop <sebastian.pop@amd.com>
1543 * graphite-clast-to-gimple.c (initialize_cloog_names): Change cloog
1544 names into more meaningful names.
1546 2009-04-08 Sebastian Pop <sebastian.pop@amd.com>
1548 * testsuite/gfortran.dg/graphite/interchange-1.c: New.
1549 * testsuite/gfortran.dg/graphite/interchange-2.c: New.
1551 2009-04-08 Sebastian Pop <sebastian.pop@amd.com>
1553 * graphite-clast-to-gimple.c (graphite_loop_normal_form): Do not build
1555 * tree-parloops.c (rewrite_phi_with_iv): New.
1556 (rewrite_all_phi_nodes_with_iv): New.
1557 (canonicalize_loop_ivs): Call them.
1559 2009-04-08 Sebastian Pop <sebastian.pop@amd.com>
1561 * graphite-sese-to-poly.c (try_generate_gimple_bb): Use
1562 graphite_find_data_references_in_stmt.
1563 * tree-data-ref.c (graphite_find_data_references_in_stmt): New.
1564 * tree-data-ref.h (graphite_find_data_references_in_stmt): Declared.
1566 2009-04-08 Sebastian Pop <sebastian.pop@amd.com>
1568 * sese.c (add_loop_exit_phis): Don't fail on non SSA_NAME renames.
1570 2009-04-08 Sebastian Pop <sebastian.pop@amd.com>
1572 * graphite-sese-to-poly.c (build_scop_bbs_1): Use bb_in_sese_p
1573 instead of bb_in_region.
1574 (flag_bb_in_region): Same. Renamed flag_bb_in_sese.
1575 (build_sese_conditions): Use flag_bb_in_sese.
1576 * sese.c (register_bb_in_sese): Removed.
1577 (new_sese): Remove initialization of SESE_REGION_BBS.
1578 (free_sese): Do not free SESE_REGION_BBS.
1579 * sese.h (struct sese): Remove field region_basic_blocks.
1580 (SESE_REGION_BBS): Removed.
1581 (bb_in_sese_p): Implement in function of bb_in_region.
1583 2009-04-08 Sebastian Pop <sebastian.pop@amd.com>
1585 * graphite-scop-detection.c (limit_scops): Deal only with single exit
1588 2009-04-08 Tobias Grosser <grosser@fim.uni-passau.de>
1590 * graphite-scop-detection.c (stmt_simple_for_scop_p): Allow NE_EXPR
1592 * graphite-sese-to-poly.c (create_linear_expr_from_tree): New.
1593 (add_condition_to_domain): New.
1594 (add_condition_to_pbb): New.
1595 (add_conditions_to_domain): Cleanup and handle of NE_EXPR and EQ_EXPR.
1596 * testsuite/gcc.dg/graphite/scop-3.c: Update number of detected SCoPs.
1598 2009-04-08 Tobias Grosser <grosser@fim.uni-passau.de>
1600 * graphite-clast-to-gimple.c (build_cloog_prog): ppl_Polyhedron ->
1601 ppl_Pointset_Powerset.
1602 * graphite-poly.c (new_poly_bb, free_poly_bb): Same.
1603 * graphite-poly.h (poly_bb): poly_bb.domain Same.
1604 (pbb_nb_loops): Same.
1605 * graphite-sese-to-poly.c (build_loop_iteration_domains,
1606 add_conditions_to_domain): Same.
1607 * graphite-ppl.c (new_Cloog_Domain_from_ppl_Pointset_Powerset): New.
1608 (ppl_print_polyhedron_matrix): ppl_Polyhedron_t ->
1609 ppl_const_Polyhedron_t.
1610 (ppl_print_powerset_matrix): New.
1611 * graphite-ppl.h (new_Cloog_Domain_from_ppl_Pointset_Powerset,
1612 ppl_print_powerset_matrix): New.
1613 (ppl_print_polyhedron_matrix): Updated.
1615 2009-04-07 Sebastian Pop <sebastian.pop@amd.com>
1617 * tree-scalar-evolution.c (analyze_scalar_evolution_1): Fix comment.
1619 2009-04-07 Sebastian Pop <sebastian.pop@amd.com>
1621 * graphite-poly.c (extend_scattering): Fix indenting. Free cstr.
1622 (print_iteration_domains, debug_iteration_domain,
1623 debug_iteration_domains): New.
1624 * graphite-poly.h (print_iteration_domains, debug_iteration_domain,
1625 debug_iteration_domains): Declared.
1626 * graphite-sese-to-poly.c (build_pbb_scattering_polyhedrons): Fix
1629 2009-04-03 Tobias Grosser <grosser@fim.uni-passau.de>
1630 Sebastian Pop <sebastian.pop@amd.com>
1632 * graphite-poly.h (print_iteration_domain): New.
1633 * graphite-sese-to-poly.c (add_conditions_to_domain): Fixed bug.
1634 (build_sese_conditions_1, build_sese_conditions_after,
1635 build_sese_conditions_before): New.
1636 (build_sese_conditions): Rewritten.
1638 2009-04-03 Sebastian Pop <sebastian.pop@amd.com>
1639 Tobias Grosser <grosser@fim.uni-passau.de>
1641 Cleanup of code generation liveouts.
1642 * graphite-clast-to-gimple.c (translate_clast): Use a single
1643 rename_map instead of one per translated statement.
1644 Do not use SESE_LIVEOUT_RENAMES.
1645 (graphite_loop_normal_form): Do not use SESE_REDUCTION_LIST.
1646 (gloog): Do not use SESE_LIVEOUT_RENAMES.
1647 * graphite-scop-detection.c (harmful_stmt_in_bb): Return the close
1648 phi node of a reduction: when a loop contains a reduction used outside
1649 the loop, there should be a scalar close phi node on the exit block.
1650 * sese.c (new_sese): Do not initialize SESE_LIVEOUT,
1651 SESE_LIVEOUT_RENAMES, and SESE_REDUCTION_LIST.
1652 (free_sese): Do not free them.
1653 (sese_build_liveouts_use): Do not use them.
1654 (sese_build_liveouts_bb): Same.
1655 (sese_build_liveouts): Same.
1656 (sese_insert_phis_for_liveouts): Same.
1657 (sese_adjust_phis_for_liveouts): Same. Renamed sese_adjust_liveout_phis.
1658 (defined_in_loop_p): New.
1659 (alive_after_loop): New.
1660 (close_phi_not_yet_inserted_p): New.
1661 (struct alep, alep_p): New.
1662 (add_loop_exit_phis): Remove from the rename_map all the names defined
1663 in the code generated loop.
1664 (insert_loop_close_phis): Traverse the rename_map passed to it.
1665 Don't use SESE_LIVEOUT_RENAMES.
1666 (default_liveout_before_guard): Renamed default_before_guard.
1667 (insert_guard_phis): Do not use SESE_LIVEOUT_RENAMES.
1668 (graphite_copy_stmts_from_block): Do not directly call set_rename.
1669 (register_sese_liveout_renames): Removed.
1670 (copy_bb_and_scalar_dependences): Do not call it.
1671 * sese.h (struct sese): Removed fields: liveout, liveout_renames, and
1673 (SESE_LIVEOUT): Removed.
1674 (SESE_LIVEOUT_RENAMES): Removed.
1675 (SESE_REDUCTION_LIST): Removed.
1676 (sese_build_liveouts): Removed.
1677 (sese_adjust_phis_for_liveouts): Renamed sese_adjust_liveout_phis.
1678 (insert_loop_close_phis): Pass a htab_t instead of a sese.
1679 (insert_guard_phis): Same.
1680 (rename_map_elt): Declare a VEC of them.
1681 * tree-parloops.c (canonicalize_loop_ivs): reduction_list contains
1682 trees not pointers to trees.
1684 Rewrite in canonical close SSA form:
1685 * graphite-scop-detection.c (contains_only_close_phi_nodes): New.
1686 (limit_scops): Close the scop after the block containing the close phi
1688 (canonicalize_loop_closed_ssa): New.
1689 (canonicalize_loop_closed_ssa_form): New.
1690 (build_scops): Call canonicalize_loop_closed_ssa_form.
1692 * graphite-sese-to-poly.c: Fix typos.
1694 2009-04-03 Sebastian Pop <sebastian.pop@amd.com>
1696 * graphite-poly.c (print_scattering_function, print_pbb_domain):
1698 (dump_gbb_conditions, dump_gbb_cases, print_iteration_domain): New.
1699 (print_pbb): Add conditions.
1701 2009-04-01 Tobias Grosser <grosser@fim.uni-passau.de>
1702 Sebastian Pop <sebastian.pop@amd.com>
1704 * graphite-scop-detection.c (bb_in_sd_region): Use bb_in_region.
1705 * graphite-sese-to-poly.c (all_non_dominated_preds_marked_p): New.
1706 (build_scop_bbs_1): New.
1707 (build_scop_bbs): Rewrite.
1708 * sese.h (bb_in_region): New.
1710 2009-03-29 Tobias Grosser <grosser@fim.uni-passau.de>
1712 * graphite-poly.c (new_poly_bb, free_poly_bb): Initialize/free
1714 (print_scop): Style.
1715 * graphite-poly.h (poly_bb): Add drs vector.
1716 (PBB_DRS): Add accessor.
1717 * graphite-sese-to-poly.c (build_poly_dr): New.
1718 (build_pbb_drs, build_scop_drs): New.
1719 (build_poly_scop): call build_scop_drs (Disabled at the moment).
1721 2009-03-29 Tobias Grosser <grosser@fim.uni-passau.de>
1723 * tree-ssa-loop.c: Include forgotten toplev.h
1725 2009-03-29 Tobias Grosser <grosser@fim.uni-passau.de>
1727 * graphite-poly.c: (apply_poly_transforms): sorry -> gcc_unreachable.
1728 * testsuite/gcc.dg/graphite/pr37883.c: Remove -floop-*
1729 * testsuite/gcc.dg/graphite/pr37928.c: Same
1730 * testsuite/gcc.dg/graphite/pr38409.c: Same
1731 * testsuite/gcc.dg/graphite/pr38498.c: Same
1732 * testsuite/gcc.dg/graphite/pr38559.c: Same
1733 * testsuite/gcc.dg/graphite/pr39335.c: Same
1734 * testsuite/gcc.dg/graphite/pr39335_1.c: Same
1735 * testsuite/gfortran.dg/graphite/block-2.f: Same
1736 * tree-ssa-loop.c (gate_graphite_transforms): Always fail if called
1739 2009-03-28 Tobias Grosser <grosser@fim.uni-passau.de>
1741 * graphite-sese-to-poly.c (ref_nb_loops, build_access_matrix_with_af,
1742 build_access_matrix, build_scop_data_accesses): Remove access function
1743 building. (We get a new version soon).
1744 (build_bb_loops, scan_tree_for_params_right_scev): Update.
1745 * sese.h (nb_loops_around_loop_in_sese): Remove.
1746 (sese_loop_depth): Do not use SESE_LOOP_NEST any more.
1748 2009-03-27 Tobias Grosser <grosser@fim.uni-passau.de>
1749 Sebastian Pop <sebastian.pop@amd.com>
1751 * graphite-scop-detection.c (struct scopdet_info): Rename last
1753 (scopdet_basic_block_info, build_scops_1): Don't use
1754 CDI_POST_DOMINATORS. CDI_POST_DOMINATORS should never be used.
1756 2009-03-26 Tobias Grosser <grosser@fim.uni-passau.de>
1757 Sebastian Pop <sebastian.pop@amd.com>
1759 * graphite-clast-to-gimple.c (gloog): Call sese_build_liveouts.
1760 * sese.c (sese_build_liveouts_use): Renamed from
1761 sese_build_livein_liveouts_use. Remove liveins.
1762 (sese_build_liveouts_bb): Renamed from sese_build_livein_liveouts_bb.
1763 Call sese_build_liveouts_use.
1764 (sese_build_liveouts): Renamed from sese_build_livein_liveouts.
1765 Call sese_build_liveouts_bb.
1766 (new_sese, free_sese): Remove liveins.
1767 (sese_add_exit_phis_var): Deleted.
1768 (sese_insert_phis_for_liveouts): Call sese_add_exit_phis_edge
1770 (graphite_copy_stmts_from_block): Remove SESE_NUM_VER.
1772 * sese.h (sese): Remove num_ver and livein.
1773 (SESE_LIVEIN, SESE_LIVEIN_VER, SESE_NUM_VER): Removed.
1775 2009-03-25 Tobias Grosser <grosser@fim.uni-passau.de>
1777 * graphite-sese-to-poly.c (build_scop_scattering): Fix compile.
1779 2009-03-25 Tobias Grosser <grosser@fim.uni-passau.de>
1781 * graphite-sese-to-poly.c (compare_prefix_loops): Removed.
1782 (build_scop_scattering): Do not use compare_prefix_loops any more.
1783 (nb_common_loops): New.
1785 2009-03-24 Sebastian Pop <sebastian.pop@amd.com>
1787 * sese.c (get_new_name_from_old_name): Renamed get_rename.
1788 (register_old_and_new_names): Renamed set_rename.
1790 2009-03-24 Sebastian Pop <sebastian.pop@amd.com>
1792 * graphite-scop-detection.h (nb_reductions_in_loop): Revert removal
1793 of the decl from the previous commit.
1795 2009-03-24 Sebastian Pop <sebastian.pop@amd.com>
1797 * graphite-scop-detection.c (dot_scop): New.
1798 * graphite-scop-detection.h (dot_scop): Declared.
1800 2009-03-24 Sebastian Pop <sebastian.pop@amd.com>
1802 * graphite-sese-to-poly.c (compare_prefix_loops): Fix compare.
1804 2009-03-24 Sebastian Pop <sebastian.pop@amd.com>
1806 * cfgloopmanip.c (create_empty_loop_on_edge): Generate the loop exit
1807 condition at the end of the loop.
1808 * graphite.c (graphite_initialize, graphite_finalize): Print to
1809 dump_file the compiled function.
1810 * graphite-clast-to-gimple.c (graphite_create_new_loop): Update use
1811 of create_empty_loop_on_edge.
1812 (translate_clast): Update the code generation of loops for the new
1814 * cfgloop.h (create_empty_loop_on_edge): Update declaration.
1816 2009-03-24 Sebastian Pop <sebastian.pop@amd.com>
1818 Reverted the patch from 2009-03-19.
1820 2009-03-19 Tobias Grosser <grosser@fim.uni-passau.de>
1822 * graphite-poly.c (new_poly_bb, free_poly_bb): Initialize/free
1824 (print_scop): Style.
1825 * graphite-poly.h (poly_bb): Add drs vector.
1826 (PBB_DRS): Add accessor.
1827 * graphite-sese-to-poly.c (ref_nb_loops): Remove.
1828 (build_access_matrix_with_af, build_access_matrix,
1829 build_scop_data_accesses): Delete.
1830 (build_poly_dr): New.
1831 (build_pbb_drs, build_scop_drs): New.
1832 (build_poly_scop): call build_scop_drs.
1834 2009-03-13 Sebastian Pop <sebastian.pop@amd.com>
1836 * graphite-scop-detection.c (dot_all_scops_1): Close the table
1837 once per basic block.
1839 2009-03-13 Tobias Grosser <grosser@fim.uni-passau.de>
1841 * graphite-scop-detection.c (graphite_can_represent_scev): New.
1842 (graphite_can_represent_expr): Renamed from loop_affine_expr
1844 (stmt_simple_for_scop_p): Call graphite_can_represent_expr.
1845 (graphite_cannot_represent_loop): Add scop_entry to parameters.
1846 (scopdet_basic_block_info): Actually define entry_block.
1847 (stmt_simple_memref_p): Moved here from ...
1849 * tree-data-ref.c (stmt_simple_memref_p): here.
1850 * tree-data-ref.h (stmt_simple_memref_p): Removed.
1852 2009-03-13 Tobias Grosser <grosser@fim.uni-passau.de>
1854 * testsuite/gcc.dg/graphite/id-4.c: New.
1856 2009-03-12 Sebastian Pop <sebastian.pop@amd.com>
1858 * sese.c (expand_scalar_variables_expr): Handle tcc_comparison.
1859 (register_old_and_new_names): Update the content of the map.
1860 When there was already a rename_map_elt in the map at that
1862 (copy_bb_and_scalar_dependences): Do rename_variables after
1863 expand_scalar_variables.
1864 * graphite-clast-to-gimple.c (build_iv_mapping): Update the content
1865 of the map. When there was already a rename_map_elt in the
1866 map at that location, free it.
1867 (translate_clast): Pass the rename_map. Do not initialize and free
1868 a rename_map per stmt_user.
1869 (gloog): Initialize and free one rename_map and pass it to
1872 2009-03-12 Sebastian Pop <sebastian.pop@amd.com>
1874 * sese.c (expand_scalar_variables_stmt,
1875 expand_scalar_variables_ssa_name): Add a gimple_stmt_iterator
1877 (expand_scalar_variables_expr): Handle REALPART_EXPR and IMAGPART_EXPR.
1878 (expand_scalar_variables): Pass to expand_scalar_variables_stmt
1879 the gimple_stmt_iterator of the statement to be expanded.
1880 * graphite-scop-detection.c (is_simple_operand): Do handle
1883 2009-03-11 Tobias Grosser <grosser@fim.uni-passau.de>
1885 * graphite-scop-detection.c (is_simple_operand): Do not handle
1887 * testsuite/gcc.dg/graphite/id-2.c: New.
1889 * graphite-sese-to-poly.c (build_bb_loops,
1890 add_value_to_dim, scan_tree_for_params_right_scev,
1891 scan_tree_for_params_int, scan_tree_for_params, idx_record_params,
1892 find_params_in_bb, build_loop_iteration_domains,
1893 add_conditions_to_domain): Remove subtract.
1895 2009-03-11 Tobias Grosser <grosser@fim.uni-passau.de>
1897 * graphite-clast-to-gimple.c (loop_iv_stack_patch_for_consts,
1898 build_iv_mapping, compute_cloog_iv_types_1, build_cloog_prog):
1899 pbb_loop_at_index -> gbb_loop_at_index.
1900 * graphite-poly.c (new_poly_bb, new_scop): New accessors.
1901 (debug_loop_vec): Delete.
1902 * graphite-poly.h (poly_bb, scop): Change black_box and region to void
1903 pointer. Move LOOPS to gimple_bb_p and insert nb_params.
1904 (PBB_LOOPS): Removed.
1905 (PBB_BLACK_BOX): Insert cast.
1906 (pbb_set_black_box): New setter.
1907 (pbb_loop_at_index, pbb_loop_index): Removed.
1908 (scop_set_region, scop_set_nb_params): New.
1909 * graphite-sese-to-poly.c (new_gimple_bb, free_gimple_bb,
1910 build_scop_scattering, build_bb_loops): Add GBB_LOOPS.
1911 (build_poly_scop): Use scop_set_nb_params.
1912 * sese.h (gimple_bb): Add LOOPS.
1913 (GBB_LOOPS, gbb_loop_index, gbb_loop_at_index): New.
1915 2009-03-11 Tobias Grosser <grosser@fim.uni-passau.de>
1917 Revert previous commit.
1919 2009-03-11 Sebastian Pop <sebastian.pop@amd.com>
1921 * sese.c (expand_scalar_variables_expr): Handle tcc_comparison.
1922 (register_old_and_new_names): Update the content of the map.
1923 When there was already a rename_map_elt in the map at that
1925 (copy_bb_and_scalar_dependences): Do rename_variables after
1926 expand_scalar_variables.
1927 * graphite-clast-to-gimple.c (build_iv_mapping): Update the content
1928 of the map. When there was already a rename_map_elt in the
1929 map at that location, free it.
1930 (translate_clast): Pass the rename_map. Do not initialize and free
1931 a rename_map per stmt_user.
1932 (gloog): Initialize and free one rename_map and pass it to
1935 2009-03-11 Tobias Grosser <grosser@fim.uni-passau.de>
1937 Remove forgotten line in revert.
1939 2009-03-11 Sebastian Pop <sebastian.pop@amd.com>
1941 Revert previous commit.
1943 2009-03-10 Sebastian Pop <sebastian.pop@amd.com>
1945 * sese.c (register_old_and_new_names): Update the content
1946 of the map. When there was already a rename_map_elt in the
1947 map at that location, free it.
1948 (copy_bb_and_scalar_dependences): Do rename_variables after
1949 expand_scalar_variables.
1950 * graphite-clast-to-gimple.c (build_iv_mapping): Update the content
1951 of the map. When there was already a rename_map_elt in the
1952 map at that location, free it.
1953 (translate_clast): Pass the rename_map. Do not initialize and free
1954 a rename_map per stmt_user.
1955 (gloog): Initialize and free one rename_map and pass it to
1958 2009-03-10 Sebastian Pop <sebastian.pop@amd.com>
1960 * graphite-clast-to-gimple.c (translate_clast): context_loop
1963 2009-03-10 Tobias Grosser <grosser@fim.uni-passau.de>
1964 Sebastian Pop <sebastian.pop@amd.com>
1966 * graphite-ppl.c (ppl_insert_dimensions): Fix stupid mistake
1967 of the use of ppl_Polyhedron_map_space_dimensions.
1969 2009-03-10 Tobias Grosser <grosser@fim.uni-passau.de>
1970 Sebastian Pop <sebastian.pop@amd.com>
1972 * graphite-poly.c (unify_scattering_dimensions): Fix types.
1973 * graphite-poly.h (poly_dr_p, poly_dr, POLY_DR_TYPE, PDR_BB,
1974 PDR_TYPE, PDR_ACCESSES, pdr_accessp_nb_subscripts,
1975 pdr_accessp_nb_iterators, pdr_accessp_nb_params,
1976 pdr_accessp_alias_set_dim, pdr_accessp_subscript_dim,
1977 pdr_accessp_iterator_dim, pdr_accessp_param_dim,
1978 pbb_nb_params): New.
1979 (pbb_nb_loops, pbb_nb_scattering, scop_nb_params,
1980 nb_loops_around_pbb): Adapt return types.
1982 2009-03-09 Tobias Grosser <grosser@fim.uni-passau.de>
1984 * Makefile.in (graphite.o, graphite-sese-to-poly.o,
1985 graphite-clast-to-gimple.o, graphite-data-ref.o,
1986 graphite-scop-detection.o, graphite-poly.o): Add
1989 2009-03-05 Tobias Grosser <grosser@fim.uni-passau.de>
1991 * Makefile.in (graphite.o, graphite-sese-to-poly.o,
1992 graphite-clast-to-gimple.o, graphite-data-ref.o,
1993 graphite-scop-detection.o, graphite-poly.o): Add graphite-poly.h.
1995 2009-03-04 Tobias Grosser <grosser@fim.uni-passau.de>
1997 * testsuite/gcc.dg/graphite/pr37485.c: Remove -floop-block
1998 * testsuite/gcc.dg/graphite/pr37828.c: Same.
1999 * testsuite/gcc.dg/graphite/pr37684.c: Same.
2000 * testsuite/gcc.dg/graphite/block-0.c: Same.
2001 * testsuite/gcc.dg/graphite/block-1.c: Same.
2002 * testsuite/gcc.dg/graphite/block-2.c: Same.
2003 * testsuite/gcc.dg/graphite/block-3.c: Same.
2004 * testsuite/gcc.dg/graphite/block-4.c: Same.
2005 * testsuite/gcc.dg/graphite/block-5.c: Same.
2006 * testsuite/gcc.dg/graphite/block-6.c: Same.
2007 * testsuite/gfortran.dg/graphite/pr38083.f90: Same.
2008 * testsuite/gfortran.dg/graphite/block-1.f90: Same.
2009 * testsuite/gfortran.dg/graphite/block-3.f90: Same.
2010 * testsuite/gfortran.dg/graphite/pr37852.f90: Same.
2011 * testsuite/gfortran.dg/graphite/block-4.f90: Same.
2012 * testsuite/gfortran.dg/graphite/pr37980.f90: Same.
2013 * testsuite/gfortran.dg/graphite/pr38953.f90: Same.
2014 * testsuite/gfortran.dg/graphite/pr37857.f90: Same.
2015 * opts.c: Remove -floop-block from -O2.
2016 * graphite-poly.c: Fail if -floop-block -floop-interchange or
2017 -floop-strip-mine are used.
2019 2009-03-04 Tobias Grosser <grosser@fim.uni-passau.de>
2020 Sebastian Pop <sebastian.pop@amd.com>
2022 * graphite-clast-to-gimple.c (build_cloog_prog): Unify scattering
2024 * graphite-poly.c (pbb_compare, graphite_sort_pbbs,
2025 graphite_trans_bb_move_loop, graphite_trans_bb_strip_mine,
2026 strip_mine_profitable_p, is_interchange_valid,
2027 graphite_trans_bb_block, graphite_trans_loop_block,
2028 graphite_trans_scop_block): Temporary removed.
2029 (extend_scattering, unify_scattering_dimensions): New.
2030 (print_scattering_function, graphite_read_transforms):
2031 PBB_SCATTERING -> PBB_TRANSFORMED_SCATTERING.
2032 (graphite_generate_scattering_fns): Removed.
2033 (apply_poly_transforms): Cleanup.
2034 (free_poly_bb): Add PBB_SCATTERING -> PBB_TRANSFORMED_SCATTERING.
2035 (schedule_to_scattering): Moved.
2036 (PBB_STATIC_SCHEDULE, PBB_SCATTERING): Removed.
2037 (PBB_ORIGINAL_SCATTERING, PBB_TRANSFORMED_SCATTERING): New.
2038 (pbb_nb_scattering): New.
2039 (SCOP_ENTRY, SCOP_EXIT, SCOP_REGION_BBS, SCOP_DEP_GRAPH, SCOP_PARAMS,
2040 SCOP_LOOP_NEST, SCOP_PARAMS, SCOP_OLDIVS, SCOP_LIVEOUT_RENAMES):
2042 * graphite-ppl.c (ppl_insert_dimensions): Extended and renamed from
2044 (ppl_strip_loop): PBB_SCATTERING -> PBB_TRANSFORMED_SCATTERING.
2045 * graphite-scop-detection.c (dot_all_scops_1): PBB_SCATTERING
2046 -> PBB_TRANSFORMED_SCATTERING.
2047 * graphite-sese-to-poly.c (build_scop_bbs): Remove region.
2048 (build_pbb_scattering_polyhedron): Moved from schedule_to_scattering.
2049 (build_scop_scattering): Renamed from build_scop_canonical_schedules.
2050 (check_poly_representation): Do not return bool.
2051 (graphite_transform_loops): Reformat.
2052 * sese.h (SESE_ENTRY_BB, SESE_EXIT_BB): New.
2054 2009-03-04 Sebastian Pop <sebastian.pop@amd.com>
2056 * graphite-poly.c (print_pbb_domain, print_pbb, print_scop,
2057 debug_pbb_domain, debug_pbb, debug_scop): New.
2058 * graphite-poly.h (print_pbb_domain, print_pbb, print_scop,
2059 debug_pbb_domain, debug_pbb, debug_scop): Declared.
2061 2009-03-02 Sebastian Pop <sebastian.pop@amd.com>
2064 * tree-parloops.c (canonicalize_loop_ivs): Call fold_convert
2065 when the type precision of the induction variable should be
2066 larger than the type precision of nit.
2067 (gen_parallel_loop): Update use of canonicalize_loop_ivs.
2068 * graphite-clast-to-gimple.c (graphite_loop_normal_form): Same.
2069 * tree-flow.h (canonicalize_loop_ivs): Update declaration.
2071 * testsuite/gcc.dg/graphite/pr39335_1.c: New.
2072 * testsuite/gcc.dg/graphite/pr39335.c: New.
2074 2009-03-02 Sebastian Pop <sebastian.pop@amd.com>
2076 * tree-parloops.c (canonicalize_loop_ivs): reduction_list contains
2077 SSA_NAMES not struct reduction_info.
2079 2009-03-02 Sebastian Pop <sebastian.pop@amd.com>
2081 * sese.c (expand_scalar_variables_expr): Handle ADDR_EXPR.
2083 2009-02-27 Sebastian Pop <sebastian.pop@amd.com>
2084 Tobias Grosser <grosser@fim.uni-passau.de>
2086 * sese.c (new_sese): Initialize SESE_REDUCTION_LIST.
2087 (free_sese): Free SESE_REDUCTION_LIST.
2088 * sese.h (struct sese): Add field reduction_list.
2089 (SESE_REDUCTION_LIST): New.
2090 * graphite-clast-to-gimple.c (graphite_loop_normal_form): Call
2091 canonicalize_loop_ivs on SESE_REDUCTION_LIST.
2093 2009-02-27 Sebastian Pop <sebastian.pop@amd.com>
2094 Tobias Grosser <grosser@fim.uni-passau.de>
2096 * tree-flow.h (gather_scalar_reductions): Use struct loop * instead
2099 2009-02-27 Sebastian Pop <sebastian.pop@amd.com>
2100 Tobias Grosser <grosser@fim.uni-passau.de>
2102 * tree-parloops.c (struct brli, build_reduction_list_info,
2103 analyze_reduction_list, gather_scalar_reductions): New.
2104 (loop_parallel_p): Build a reduction list containing only
2105 PHI_RESULT SSA_NAMEs: call gather_scalar_reductions.
2106 (gen_parallel_loop): Call the analysis analyze_reduction_list.
2107 (parallelize_loops): Now reduction_list is a htab_t of SSA_NAMEs.
2108 * tree-flow.h (gather_scalar_reductions): Declared.
2110 2009-02-26 Sebastian Pop <sebastian.pop@amd.com>
2113 * graphite-clast-to-gimple.c (graphite_loop_normal_form): Do not call
2114 number_of_iterations_exit from a gcc_assert.
2116 2009-02-25 Sebastian Pop <sebastian.pop@amd.com>
2117 Jan Sjodin <jan.sjodin@amd.com>
2119 * output.h (graphite_out_file, graphite_in_file): Declared.
2120 * toplev.c (graphite_out_file, graphite_in_file): New.
2121 (init_asm_output): Initialize graphite_in_file and graphite_out_file.
2122 * graphite-clast-to-gimple.c (build_cloog_prog): Read PBB_SCATTERING.
2123 Don't call schedule_to_scattering.
2124 * common.opt (fgraphite-write, fgraphite-read): New.
2125 * graphite-poly.c: Include output.h.
2126 (print_scattering_function, print_scattering_functions,
2127 debug_scattering_function, debug_scattering_functions,
2128 graphite_write_transforms, graphite_read_transforms,
2129 graphite_generate_scattering_fns): New.
2130 (apply_poly_transforms): Do not apply transform if flag_graphite_read.
2131 Call graphite_generate_scattering_fns, graphite_write_transforms,
2132 graphite_read_transforms.
2133 (new_poly_bb): Initialize PBB_SCATTERING.
2134 (free_poly_bb): Free PBB_SCATTERING.
2135 (schedule_to_scattering): Does not return, initialize PBB_SCATTERING.
2136 * graphite-poly.h (struct poly_bb): Add field scattering.
2137 (PBB_SCATTERING): New.
2138 (print_scattering_function, print_scattering_functions,
2139 debug_scattering_function, debug_scattering_functions): Declared.
2140 * graphite-ppl.c (cloog_matrix_to_ppl_constraint): Matrices contain
2141 GMP values, not integers!
2142 (ppl_print_polyhedron_matrix, debug_ppl_polyhedron_matrix,
2143 ppl_read_polyhedron_matrix): New.
2144 * graphite-ppl.h (ppl_print_polyhedron_matrix,
2145 debug_ppl_polyhedron_matrix,
2146 ppl_read_polyhedron_matrix): Declared.
2147 * Makefile.in (graphite-poly.o): Depends on output.h.
2149 2009-02-23 Sebastian Pop <sebastian.pop@amd.com>
2150 Tobias Grosser <grosser@fim.uni-passau.de>
2153 * graphite-scop-detection.c (stmt_simple_for_scop_p): Analyze
2154 scalar evolutions in the scop_entry->loop_father.
2156 2009-02-23 Sebastian Pop <sebastian.pop@amd.com>
2157 Tobias Grosser <grosser@fim.uni-passau.de>
2159 * graphite.h (ref_nb_loops): Remove declaration.
2160 (struct gimple_bb, gimple_bb_p, GBB_BB, GBB_DATA_REFS, GBB_CONDITIONS,
2161 GBB_CONDITION_CASES, GBB_CLOOG_IV_TYPES, gbb_loop, print_gimple_bb,
2162 debug_gbb): Moved to sese.h.
2165 2009-02-23 Sebastian Pop <sebastian.pop@amd.com>
2166 Tobias Grosser <grosser@fim.uni-passau.de>
2168 * graphite-data-ref.[ch]: Disable.
2170 2009-02-23 Sebastian Pop <sebastian.pop@amd.com>
2171 Tobias Grosser <grosser@fim.uni-passau.de>
2173 * graphite-scop-detection.c (stmt_simple_for_scop_p): Analyze
2174 scalar evolutions in the scop_entry->loop_father.
2176 2009-02-23 Sebastian Pop <sebastian.pop@amd.com>
2178 * graphite-scop-detection.c (nb_reductions_in_loop): Moved here...
2179 (graphite_cannot_represent_loop_niter): Renamed
2180 graphite_cannot_represent_loop. Call nb_reductions_in_loop.
2181 (limit_scops): build_sese_loop_nests does not return a bool.
2182 * graphite-scop-detection.h (nb_reductions_in_loop): Declared.
2183 * sese.c (nb_reductions_in_loop): ... from here.
2184 (graphite_loop_normal_form): ... from here.
2185 (sese_record_loop): Does not fail, so does not return a bool.
2186 (build_sese_loop_nests): Same.
2187 * sese.h (build_sese_loop_nests): Update declaration.
2188 * graphite-clast-to-gimple.c (graphite_loop_normal_form): Moved here...
2189 (build_graphite_loop_normal_form): New.
2190 (gloog): Call build_graphite_loop_normal_form.
2191 * graphite-sese-to-poly.c (build_poly_scop): Don't fail on
2192 build_sese_loop_nests.
2194 * testsuite/gcc.dg/graphite/id-1.c: New.
2196 2009-02-23 Sebastian Pop <sebastian.pop@amd.com>
2197 Tobias Grosser <grosser@fim.uni-passau.de>
2199 * graphite-sese-to-poly.c (scan_tree_for_params): Remove REAL_CST.
2200 The SCoP detection fix is sufficient.
2202 2009-02-21 Sebastian Pop <sebastian.pop@amd.com>
2204 PR tree-optimization/39260
2205 * graphite-scop-detection.c (harmful_stmt_in_bb): Stop a SCoP when
2206 the basic block contains a condition with a real type.
2207 * graphite-sese-to-poly.c (scan_tree_for_params): Handle REAL_CST.
2209 * gcc.dg/graphite/pr39260.c: New.
2211 2009-02-21 Sebastian Pop <sebastian.pop@amd.com>
2213 * graphite-poly.c: Inlcude params.h.
2214 (graphite_trans_loop_block): Use PARAM_LOOP_BLOCK_TILE_SIZE for
2216 * Makefile.in (graphite-poly.o): Depend on PARAMS_H.
2217 * params.def (PARAM_LOOP_BLOCK_TILE_SIZE): Define.
2219 2009-02-20 Sebastian Pop <sebastian.pop@amd.com>
2220 Tobias Grosser <grosser@fim.uni-passau.de>
2222 * graphite-scop-detection.c (dot_all_scops_1,
2223 dot_all_scops): Moved here.
2224 * graphite-scop-detection.h (dot_all_scops): Declared here.
2225 * graphite.c (graphite_initialize, graphite_finalize): New.
2226 (graphite_transform_loops): Cleaned up.
2227 * sese.c (debug_oldivs): Moved here.
2228 * graphite-poly.c (graphite_apply_transformations): Renamed
2229 apply_poly_transforms.
2230 (debug_loop_vec): Moved here.
2231 * graphite-sese-to-poly.c (build_bb_loops, build_sese_conditions_1,
2232 scop_contains_non_iv_scalar_phi_nodes, build_sese_conditions,
2233 find_scop_parameters, build_scop_iteration_domain,
2234 add_conditions_to_constraints, build_scop_canonical_schedules,
2235 build_scop_data_accesses): Now static.
2236 (build_poly_scop, check_poly_representation): New.
2238 2009-02-20 Sebastian Pop <sebastian.pop@amd.com>
2240 * graphite.c (graphite_stmt_p, new_gimple_bb, free_gimple_bb,
2241 remove_gbbs_in_scop, free_scops, try_generate_gimple_bb,
2242 build_scop_bbs, ref_nb_loops, compare_prefix_loops,
2243 build_scop_canonical_schedules, build_bb_loops, add_value_to_dim,
2244 scan_tree_for_params_right_scev, scan_tree_for_params_int,
2245 scan_tree_for_params, struct irp_data, dx_record_params,
2246 find_params_in_bb, find_scop_parameters, gbb_from_bb,
2247 build_loop_iteration_domains, add_conditions_to_domain,
2248 phi_node_is_iv, bb_contains_non_iv_scalar_phi_nodes,
2249 scop_contains_non_iv_scalar_phi_nodes, build_sese_conditions_1,
2250 build_sese_conditions, add_conditions_to_constraints,
2251 build_scop_iteration_domain, build_access_matrix_with_af,
2252 build_access_matrix,
2253 build_scop_data_accesses): Moved to graphite-sese-to-poly.c.
2255 * graphite-sese-to-poly.c: New.
2256 * graphite-sese-to-poly.h: New.
2258 * Makefile.in: Add new rule for graphite-sese-to-poly.o.
2260 2009-02-20 Sebastian Pop <sebastian.pop@amd.com>
2262 * graphite.c: Split graphite code generation to a new file.
2263 (graphite_verify, gmp_cst_to_tree, clast_name_to_gcc,
2264 max_precision_type, clast_to_gcc_expression_red,
2265 clast_to_gcc_expression, gcc_type_for_clast_expr,
2266 gcc_type_for_clast_eq, loop_iv_stack_patch_for_consts,
2267 graphite_translate_clast_equation, graphite_create_guard_cond_expr,
2268 graphite_create_new_guard, clast_get_body_of_loop,
2269 gcc_type_for_cloog_iv, gcc_type_for_iv_of_clast_loop,
2270 graphite_create_new_loop, build_iv_mapping, copy_renames,
2271 translate_clast, find_cloog_iv_in_expr, compute_cloog_iv_types_1,
2272 compute_cloog_iv_types, free_scattering, save_var_name,
2273 initialize_cloog_names, build_scop_context, build_cloog_prog,
2274 set_cloog_options, debug_clast_stmt, scop_to_clast,
2275 print_generated_program, debug_generated_program,
2276 gloog): Moved to graphite-clast-to-gimple.c.
2278 (struct cloog_prog_clast): Moved to graphite-clast-to-gimple.h.
2280 (iv_stack_entry_is_constant, iv_stack_entry_is_iv,
2281 loop_iv_stack_push_iv, loop_iv_stack_insert_constant,
2282 loop_iv_stack_pop, loop_iv_stack_get_iv,
2283 loop_iv_stack_get_iv_from_name, debug_loop_iv_stack,
2284 free_loop_iv_stack, loop_iv_stack_remove_constants,
2285 debug_rename_elt, debug_rename_map_1, debug_rename_map,
2286 rename_map_elt_info, eq_rename_map_elts, debug_ivtype_elt,
2287 debug_ivtype_map_1, debug_ivtype_map, ivtype_map_elt_info,
2288 eq_ivtype_map_elts, sese_add_exit_phis_edge,
2289 sese_add_exit_phis_var, sese_insert_phis_for_liveouts,
2290 get_vdef_before_sese, sese_adjust_vphi,
2291 get_new_name_from_old_name, sese_adjust_phis_for_liveouts,
2292 oldiv_for_loop, rename_variables_in_stmt, is_parameter,
2293 is_iv, expand_scalar_variables_ssa_name,
2294 expand_scalar_variables_expr, expand_scalar_variables_stmt,
2295 expand_scalar_variables, rename_variables, remove_condition,
2296 get_true_edge_from_guard_bb, get_false_edge_from_guard_bb,
2297 add_loop_exit_phis, insert_loop_close_phis, struct igp,
2298 default_liveout_before_guard, add_guard_exit_phis,
2299 insert_guard_phis, register_old_and_new_names,
2300 graphite_copy_stmts_from_block, register_sese_liveout_renames,
2301 copy_bb_and_scalar_dependences, outermost_loop_in_sese,
2302 if_region_set_false_region, create_if_region_on_edge,
2303 move_sese_in_condition): Moved to sese.c.
2305 (nb_loops_around_loop_in_sese, struct ifsese, if_region_entry,
2306 if_region_exit, if_region_get_condition_block,
2307 struct rename_map_elt, new_rename_map_elt, enum iv_stack_entry_kind,
2308 union iv_stack_entry_data_union, struct iv_stack_entry_struct,
2309 iv_stack_entry_p, loop_iv_stack, struct ivtype_map_elt,
2310 ivtype_map_elt, new_ivtype_map_elt,
2311 recompute_all_dominators): Moved to sese.h.
2313 * graphite-clast-to-gimple.c: New.
2314 * graphite-clast-to-gimple.h: New.
2315 * Makefile.in: Add new rule for graphite-clast-to-gimple.o.
2316 * sese.c: Modified as said above.
2319 2009-02-20 Sebastian Pop <sebastian.pop@amd.com>
2321 * graphite.c: Split scop detection to a new file.
2322 (enum gbb_type, gbb_type, get_bb_type, struct sd_region_p, sd_region,
2323 move_sd_regions, loop_affine_expr, exclude_component_ref,
2324 is_simple_operand, stmt_simple_for_scop_p, harmful_stmt_in_bb,
2325 graphite_cannot_represent_loop_niter, struct scopdet_info,
2326 scopdet_basic_block_info, build_scops_1, bb_in_sd_region,
2327 find_single_entry_edge, find_single_exit_edge,
2328 create_single_entry_edge, sd_region_without_exit,
2329 create_single_exit_edge, unmark_exit_edges, mark_exit_edges,
2330 create_sese_edges, build_graphite_scops, limit_scops, build_scops):
2331 Moved to graphite-scop-detection.c.
2333 * graphite-scop-detection.c: New.
2334 * graphite-scop-detection.h: New.
2335 * Makefile.in: Add new rule for graphite-scop-detection.o.
2337 * sese.c: Include tree-chrec.h, tree-data-ref.h, and
2338 tree-scalar-evolution.h.
2339 (nb_reductions_in_loop, graphite_loop_normal_form, sese_record_loop,
2340 build_sese_loop_nests): Moved here from graphite.c.
2341 (param_index): Renamed parameter_index_in_region.
2343 2009-02-18 Tobias Grosser <grosser@fim.uni-passau.de>
2344 Sebastian Pop <sebastian.pop@amd.com>
2346 * gcc.dg/graphite/block-0.c: Expected to fail now.
2347 * gcc.dg/graphite/block-1.c: Same.
2348 * gcc.dg/graphite/block-5.c: Same.
2349 * gcc.dg/graphite/block-6.c: Same.
2351 2009-02-18 Tobias Grosser <grosser@fim.uni-passau.de>
2352 Sebastian Pop <sebastian.pop@amd.com>
2354 * graphite.h: Separate from graphite_bb_p the polyhedral
2355 representation in poly_bb_p and the GCC specifics in gimple_bb_p.
2356 (struct data_dependence_polyhedron, RDGE_DDP, ddp_p): Moved to
2357 graphite-data-ref.h.
2358 (struct poly_bb, PBB_SCOP, PBB_STATIC_SCHEDULE, PBB_DOMAIN,
2359 PBB_BLACK_BOX, PBB_LOOPS, pbb_nb_loops, pbb_loop_at_index,
2360 pbb_loop_index, struct scop, SCOP_BBS, SCOP_REGION, SCOP_ENTRY,
2361 SCOP_EXIT, SCOP_REGION_BBS, SCOP_DEP_GRAPH, SCOP_PARAMS,
2362 SCOP_LOOP_NEST, SCOP_PARAMS, SCOP_OLDIVS, SCOP_LIVEOUT_RENAMES,
2363 scop_nb_params): Moved to graphite-poly.h.
2364 * graphite-data-ref.c: Same.
2365 * graphite-data-ref.h: New.
2367 (pbb_compare, graphite_sort_pbbs, graphite_trans_bb_move_loop,
2368 graphite_trans_bb_strip_mine, strip_mine_profitable_p,
2369 is_interchange_valid, graphite_trans_bb_block,
2370 graphite_trans_loop_block, scop_max_loop_depth,
2371 graphite_trans_scop_block, graphite_apply_transformations,
2372 new_poly_bb, free_poly_bb, new_scop, free_scop): Moved to
2374 * graphite-poly.h: New.
2375 * graphite-poly.c: New.
2376 * Makefile.in (OBJS-common): Add graphite-poly.o.
2377 (graphite-poly.o): New rule.
2378 * tree-data-ref.h (struct data_reference): Remove unused scop field.
2381 2009-02-18 Sebastian Pop <sebastian.pop@amd.com>
2382 Tobias Grosser <grosser@fim.uni-passau.de>
2384 * graphite.c: Replace gb -> gbb.
2386 * graphite-data-ref.c: Same.
2388 2009-02-18 Sebastian Pop <sebastian.pop@amd.com>
2389 Tobias Grosser <grosser@fim.uni-passau.de>
2391 * Makefile.in (OBJS-commmon): Add sese.o.
2393 (graphite.o): Add sese.h.
2394 * graphite.c (bb_in_ss_p, loop_in_sese_p,
2395 sese_build_livein_liveouts_use, sese_build_livein_liveouts_bb,
2396 sese_build_livein_liveouts, register_bb_in_sese, new_sese, free_sese):
2398 (block_before_scop): Add missing return.
2399 (new_scop, free_scop): Remove SESE data structures.
2400 (scop_record_loop, scan_tree_for_params, find_params_in_bb,
2401 find_scop_parameters, build_loop_iteration_domains,
2402 add_conditions_to_domain, register_scop_liveout_renames,
2403 copy_bb_and_scalar_dependences): Scop -> SESE.
2405 (add_conditions_to_domain): SCoP -> SESE and remove check
2406 (scop_contains_non_iv_scalar_phi_nodes): New.
2407 (build_scop_conditions_1, build_scop_conditions): Remove check for
2408 non iv scalar phi nodes.
2409 (print_scop_statistics): New.
2410 (graphite_transform_loops): Cleanup.
2412 * graphite.h: Move to sese & cleanup.
2416 2009-02-16 Sebastian Pop <sebastian.pop@amd.com>
2417 Tobias Grosser <grosser@fim.uni-passau.de>
2419 * graphite.c (build_scop_conditions_1): Conditions are only
2420 at the end of a basic block.
2422 2009-02-16 Sebastian Pop <sebastian.pop@amd.com>
2423 Tobias Grosser <grosser@fim.uni-passau>
2425 * graphite.h (struct graphite_bb): Remove compressed_alpha_matrix
2427 (GBB_ALPHA): Removed.
2429 2009-02-16 Sebastian Pop <sebastian.pop@amd.com>
2430 Tobias Grosser <grosser@fim.uni-passau.de>
2432 * graphite-data-ref.c (graphite_test_dependence): Don't use
2433 GBB_DYNAMIC_SCHEDULE.
2434 * graphite.c (new_graphite_bb): Same.
2435 (free_graphite_bb): Same.
2436 (build_scop_dynamic_schedules): Removed.
2437 (graphite_transform_loops): Don't call it.
2438 * graphite.h (struct graphite_bb): Remove dynamic_schedule field.
2439 (GBB_DYNAMIC_SCHEDULE): Removed.
2441 2009-02-16 Sebastian Pop <sebastian.pop@amd.com>
2442 Tobias Grosser <grosser@fim.uni-passau.de>
2444 * graphite.c (schedule_to_scattering): Don't use CloogMatrix.
2445 (print_graphite_bb): Same.
2446 (build_cloog_prog): Same.
2448 2009-02-16 Sebastian Pop <sebastian.pop@amd.com>
2449 Tobias Grosser <grosser@fim.uni-passau.de>
2451 * graphite.c (build_cloog_prog): Don't use CloogMatrix.
2453 2009-02-16 Sebastian Pop <sebastian.pop@amd.com>
2454 Tobias Grosser <grosser@fim.uni-passau.de>
2456 * graphite.c (build_scop_context): Don't use CloogMatrix.
2457 * graphite-ppl.c (new_Cloog_Domain_from_ppl_Polyhedron): New.
2458 * graphite-ppl.h (new_Cloog_Domain_from_ppl_Polyhedron): Declared.
2460 2009-02-16 Sebastian Pop <sebastian.pop@amd.com>
2461 Tobias Grosser <grosser@fim.uni-passau.de>
2463 * graphite.h (struct scop): Move params, old_ivs, loops, loop_nest,
2464 liveout_renames, add_params fields...
2465 (struct sese): ... here.
2466 (SESE_PARAMS, SESE_LOOPS, SESE_LOOP_NEST, SESE_ADD_PARAMS,
2467 SESE_PARAMS, SESE_OLDIVS, SESE_LIVEOUT_RENAMES): New.
2469 2009-02-16 Sebastian Pop <sebastian.pop@amd.com>
2470 Tobias Grosser <grosser@fim.uni-passau.de>
2472 * graphite.c (print_scop): Do not print the CLooG program.
2473 (new_scop, free_scop, initialize_cloog_names, build_scop_context,
2474 build_cloog_prog, gloog): Don't use SCOP_PROG.
2475 (find_transform): Renamed scop_to_clast.
2476 (print_generated_program, debug_generated_program): New.
2477 (graphite_transform_loops): Adapt to new interface.
2478 * graphite.h (struct scop): Remove program field.
2479 (SCOP_PROG): Removed.
2480 (print_generated_program, debug_generated_program): Declared.
2482 2009-02-16 Sebastian Pop <sebastian.pop@amd.com>
2484 * graphite-data-ref.c (schedule_precedes_p, schedule_same_p): New.
2485 (statement_precedes_p): Use schedule_same_p and schedule_precedes_p.
2486 * graphite.c (gbb_compare, schedule_to_scattering, print_graphite_bb,
2487 free_graphite_bb, build_scop_canonical_schedules,
2488 graphite_trans_bb_strip_mine, graphite_trans_scop_block): Static
2489 schedules are now represented using a ppl_Linear_Expression_t.
2490 * graphite.h (struct graphite_bb): Same.
2491 * graphite-ppl.c (ppl_lexico_compare_linear_expressions): New.
2492 * graphite-ppl.h (ppl_lexico_compare_linear_expressions): Declared.
2494 2009-02-15 Sebastian Pop <sebastian.pop@amd.com>
2496 * graphite.c: Free local memory.
2497 * graphite-ppl.c: Same.
2499 2009-02-15 Sebastian Pop <sebastian.pop@amd.com>
2501 * graphite.c (const_column_index, get_first_matching_sign_row_index,
2502 get_lower_bound_row, get_upper_bound_row, copy_constraint,
2503 swap_constraint_variables, scale_constraint_variable): Removed.
2504 (graphite_trans_bb_strip_mine): Remove pong.
2505 * graphite-ppl.c: Include missing header files.
2506 (set_inhomogeneous, set_coef, shift_poly, ppl_strip_loop): New.
2507 * graphite-ppl.h (ppl_strip_loop): Declared.
2508 * Makefile.in (graphite-ppl.o): Adjust dependences.
2510 2009-02-14 Sebastian Pop <sebastian.pop@amd.com>
2512 * graphite.c (build_loop_iteration_domains): Remove ping pong.
2513 (build_scop_iteration_domain): Same.
2515 2009-02-13 Sebastian Pop <sebastian.pop@amd.com>
2517 * graphite.c (scan_tree_for_params, add_conditions_to_domain): Remove
2519 (add_value_to_dim, scan_tree_for_params_right_scev,
2520 scan_tree_for_params_int): New.
2521 * graphite-ppl.c (oppose_constraint): New.
2522 (insert_constraint_into_matrix): Implement missing cases.
2523 * graphite-ppl.h (insert_constraint_into_matrix): Declared.
2525 2009-02-13 Sebastian Pop <sebastian.pop@amd.com>
2527 * graphite.c (graphite_trans_bb_move_loop): Remove ping pong,
2528 use ppl_move_dimension.
2530 2009-02-12 Sebastian Pop <sebastian.pop@amd.com>
2532 * graphite-data-ref.c: Domains are now ppl_Polyhedra_t.
2535 * graphite-ppl.c: Same.
2536 * graphite-ppl.h: Same.
2538 2009-02-12 Sebastian Pop <sebastian.pop@amd.com>
2540 Revert last 3 commits.
2542 2009-02-10 Sebastian Pop <sebastian.pop@amd.com>
2544 * graphite.c (scan_tree_for_params, add_conditions_to_domain): Remove
2546 (add_value_to_dim, scan_tree_for_params_right_scev,
2547 scan_tree_for_params_int): New.
2548 * graphite-ppl.c (oppose_constraint): New.
2549 (insert_constraint_into_matrix): Implement missing cases.
2550 * graphite-ppl.h (insert_constraint_into_matrix): Declared.
2552 2009-02-10 Sebastian Pop <sebastian.pop@amd.com>
2554 * graphite.c (graphite_trans_bb_move_loop): Remove unused variables.
2556 2009-02-10 Sebastian Pop <sebastian.pop@amd.com>
2557 Tobias Grosser <grosser@fim.uni-passau.de>
2559 * graphite.c (graphite_trans_bb_move_loop): Remove ping pong,
2560 use ppl_move_dimension.
2561 * graphite-ppl.c (ppl_move_dimension): New.
2562 * graphite-ppl.h (ppl_move_dimension): Declared.
2564 2009-02-10 Sebastian Pop <sebastian.pop@amd.com>
2566 * graphite.c: Do not include cloog/cloog.h.
2567 (print_graphite_bb): Remove ping pong, call PPL print function.
2569 2009-02-10 Tobias Grosser <grosser@fim.uni-passau.de>
2571 * Makefile.in (OBJS-common): Add graphite-ppl.o.
2572 (graphite.o): Add dependence on graphite-ppl.h.
2573 (graphite-ppl.o): New.
2574 (graphite-data-ref.c): Ping pong between PPL data structures
2576 * graphite-ppl.c: New.
2577 * graphite-ppl.h: New.
2578 * graphite.c: Include graphite-ppl.h.
2579 (print_graphite_bb, add_conditions_to_domain, build_cloog_prog,
2580 graphite_trans_bb_move_loop, graphite_trans_bb_strip_mine):
2581 Ping pong between PPL data structures and matrices.
2582 (new_graphite_bb): Create a PPL constraint system.
2583 Call ppl_delete_Constraint_System instead of cloog_matrix_free.
2584 (build_loop_iteration_domains): Use PPL functions.
2585 * graphite.h: Include graphite-ppl.h. Fix comments.
2586 (graphite_bb): Use a ppl_Constraint_System_t instead of
2587 CloogMatrix for representing the domain.
2588 (scop): Remove static_schedule.
2589 (gbb_nb_loops): Ping pong between PPL data structures and matrices.
2591 2009-02-06 Sebastian Pop <sebastian.pop@amd.com>
2593 * graphite.c: Fix some comments.
2595 2009-02-05 Sebastian Pop <sebastian.pop@amd.com>
2598 * graphite.c (if_region_set_false_region): After moving a region
2599 in the false branch of a condition, remove the empty dummy
2601 (gloog): Remove wrong fix for PR38953.
2603 2009-02-03 Tobias Grosser <grosser@fim.uni-passau.de>
2605 * graphite.c (bb_in_sese_p, sese_build_livein_liveouts_use,
2606 sese_build_livein_liveouts_bb, sese_build_livein_liveouts,
2607 register_bb_in_sese, new_sese, free_sese): Moved.
2608 (dot_scop_1, build_scop_loop_nests, build_loop_iteration_domains,
2609 outermost_loop_in_scop, build_scop_iteration_domain,
2610 expand_scalar_variables_ssa_name, get_vdef_before_scop,
2611 limit_scops): Use bb_in_sese_p instead of bb_in_scop_p.
2612 Use loop_in_sese_p instead of loop_in_scop_p.
2613 (new_graphite_bb, new_scop, gloog): Do not initialize SCOP_BBS_B.
2614 (free_scop): Do not free SCOP_BBS_B.
2615 (nb_loops_around_loop_in_scop, nb_loops_around_gb,
2616 ref_nb_loops): Moved here...
2617 * graphite.h (ref_nb_loops): ... from here.
2618 (struct scop): Remove bbs_b bitmap.
2619 (SCOP_BBS_B, bb_in_scop_p, loop_in_scop_p): Removed.
2620 * testsuite/gcc.dg/graphite/scop-19.c: New
2622 2009-02-03 Tobias Grosser <grosser@fim.uni-passau.de>
2624 * graphite.c (scopdet_basic_block_info): Fix bug in scop
2627 2009-01-30 Tobias Grosser <grosser@fim.uni-passau.de>
2629 * graphite.c (new_loop_to_cloog_loop_str, hash_loop_to_cloog_loop,
2630 eq_loop_to_cloog_loop): Remove.
2631 (new_scop, free_scop): Remove SCOP_LOOP2CLOOG_LOOP.
2632 * graphite.h (struct scop): Remove loop2cloog_loop.
2633 (loop_domain_dim, loop_iteration_vector_dim): Remove.
2635 2009-01-30 Tobias Grosser <grosser@fim.uni-passau.de>
2637 * opts.c (decode_options): Only add graphite options to O2
2638 if we compile with graphite enabled.
2640 2009-01-26 Sebastian Pop <sebastian.pop@amd.com>
2642 * Merge from mainline (r143163:143684).
2644 2009-01-26 Sebastian Pop <sebastian.pop@amd.com>
2646 * graphite.c (debug_value): Removed.
2647 * graphite.h (debug_value): Removed.
2649 2009-01-23 Sebastian Pop <sebastian.pop@amd.com>
2651 * passes.c (init_optimization_passes): Do not call pass_copy_prop
2652 after graphite: pass_copy_prop does not maintain a proper loop closed
2653 SSA form. pass_copy_prop should be fixed.
2655 2009-01-23 Sebastian Pop <sebastian.pop@amd.com>
2657 * graphite.c (scop_adjust_phis_for_liveouts): Fix warning.
2659 2009-01-23 Sebastian Pop <sebastian.pop@amd.com>
2661 * graphite.c (graphite_verify): Add a call to verify_loop_closed_ssa.
2662 (gloog): Split the exit of the scop when the scop exit is a loop exit.
2663 (graphite_transform_loops): Only call cleanup_tree_cfg if gloog
2666 2009-01-20 Sebastian Pop <sebastian.pop@amd.com>
2668 * graphite.c (gloog): Return true when code gen succeeded.
2669 (graphite_transform_loops): Do not call cleanup_tree_cfg if
2670 the code of the function did not changed. After cleanup_tree_cfg
2671 call rewrite_into_loop_closed_ssa to maintain the loop closed ssa
2674 2009-01-19 Sebastian Pop <sebastian.pop@amd.com>
2676 * graphite.c (stmt_simple_for_scop_p): Also handle cases when
2677 gimple_call_lhs is NULL.
2679 2009-01-16 Sebastian Pop <sebastian.pop@amd.com>
2680 Tobias Grosser <tobi.grosser@amd.com>
2682 * graphite.c (graphite_trans_scop_block): Do not block single
2685 2009-01-15 Sebastian Pop <sebastian.pop@amd.com>
2686 Tobias Grosser <tobi.grosser@amd.com>
2688 * graphite.c (build_scop_canonical_schedules): Start schedules at
2691 2009-01-15 Sebastian Pop <sebastian.pop@amd.com>
2692 Tobias Grosser <tobi.grosser@amd.com>
2694 * graphite.c (compare_prefix_loops): New.
2695 (build_scop_canonical_schedules): Rewritten.
2696 (graphite_transform_loops): Move build_scop_canonical_schedules
2697 after build_scop_iteration_domain.
2699 2009-01-14 Sebastian Pop <sebastian.pop@amd.com>
2700 Tobias Grosser <tobi.grosser@amd.com>
2702 * graphite.c (add_conditions_to_domain): Add the loops to
2703 the dimension of the iteration domain. Do copy the domain
2704 only when it exists.
2705 (build_scop_conditions_1): Do not call add_conditions_to_domain.
2706 (add_conditions_to_constraints): New.
2707 (can_generate_code_stmt, can_generate_code): Removed.
2708 (gloog): Do not call can_generate_code.
2709 (graphite_transform_loops): Call add_conditions_to_constraints
2710 after building the iteration domain.
2712 2009-01-14 Sebastian Pop <sebastian.pop@amd.com>
2713 Tobias Grosser <tobi.grosser@amd.com>
2714 Jan Sjodin <jan.sjodin@amd.com>
2716 * graphite.c (scan_tree_for_params): On substractions negate
2717 all the coefficients of the term.
2718 (clast_to_gcc_expression_red): New. Handle reduction expressions
2719 of more than two operands.
2720 (clast_to_gcc_expression): Call clast_to_gcc_expression_red.
2721 (get_vdef_before_scop): Handle also the case of default definitions.
2723 2009-01-14 Sebastian Pop <sebastian.pop@amd.com>
2726 * graphite.c (get_vdef_before_scop, scop_adjust_vphi): New.
2727 (scop_adjust_phis_for_liveouts): Call scop_adjust_vphi.
2728 (gloog): Do not call cleanup_tree_cfg.
2729 (graphite_transform_loops): Call cleanup_tree_cfg after all
2730 scops have been code generated.
2732 2009-01-13 Sebastian Pop <sebastian.pop@amd.com>
2734 * passes.c (init_optimization_passes): Schedule after
2735 graphite transforms pass_copy_prop, pass_dce_loop and pass_lim.
2737 2009-01-13 Sebastian Pop <sebastian.pop@amd.com>
2739 * graphite.c (expand_scalar_variables_stmt): Do not pass loop_p.
2741 (expand_scalar_variables_ssa_name): Do not pass loop_p. Fix comment.
2742 Set the type of an expression to the type of its assign statement.
2743 (expand_scalar_variables_expr): Do not pass loop_p.
2744 Fix comment. Stop recursion on tcc_constant or tcc_declaration.
2745 (copy_bb_and_scalar_dependences): Do not pass loop_p.
2746 (translate_clast): Update call to copy_bb_and_scalar_dependences.
2748 2009-01-11 Sebastian Pop <sebastian.pop@amd.com>
2750 * graphite.c (expand_scalar_variables_ssa_name): Set the type of
2751 an expression to the gimple_expr_type of its assign statement.
2752 (expand_scalar_variables_expr): Stop recursion on tcc_constant
2755 2009-01-11 Sebastian Pop <sebastian.pop@amd.com>
2757 PR tree-optimization/38786
2758 * testsuite/gcc.dg/graphite/pr38786.c: New.
2759 * graphite.c (expand_scalar_variables_ssa_name): New, outlined from
2760 the SSA_NAME case of expand_scalar_variables_expr.
2761 (expand_scalar_variables_expr): Also gather the scalar computation
2762 used to index the memory access.
2763 (expand_scalar_variables_stmt): Pass to expand_scalar_variables_expr
2764 the gimple_stmt_iterator where it inserts new code.
2766 2009-01-10 Sebastian Pop <sebastian.pop@amd.com>
2768 * testsuite/gcc.dg/graphite/block-3.c: Fix compile error on 32bit.
2770 2009-01-10 Sebastian Pop <sebastian.pop@amd.com>
2772 * opts.c (decode_options): Enable flag_graphite_identity and
2773 flag_loop_block in -O2 and above.
2775 2009-01-08 Sebastian Pop <sebastian.pop@amd.com>
2777 * libjava/classpath/lib/gnu/java/awt/peer/gtk/GtkMouseInfoPeer.class:
2778 Fix merge problem: replace with the file from trunk.
2780 2009-01-08 Sebastian Pop <sebastian.pop@amd.com>
2782 * Merge from mainline (r141727:143163).
2784 2009-01-07 Sebastian Pop <sebastian.pop@amd.com>
2785 Jan Sjodin <jan.sjodin@amd.com>
2787 PR tree-optimization/38559
2788 * testsuite/gcc.dg/graphite/pr38559.c: New.
2790 * graphite.c (debug_value, copy_constraint,
2791 swap_constraint_variables, scale_constraint_variable, ): New.
2792 (get_lower_bound, get_upper_bound): Removed.
2793 (graphite_trans_bb_strip_mine): Clean up this code that works
2794 only for constant number of iterations. Fully copy upper and
2795 lower bound constraints, not only the constant part of them.
2796 * graphite.h (debug_value): Declared.
2798 2009-01-06 Jan Sjodin <jan.sjodin@amd.com>
2800 PR tree-optimization/38492
2801 PR tree-optimization/38498
2802 * tree-check.c (operator_is_linear, scev_is_linear_expression): New.
2803 * tree-chrec.h (scev_is_linear_expression): Declared.
2804 * graphite.c (graphite_cannot_represent_loop_niter): New.
2805 (scopdet_basic_block_info): Call graphite_cannot_represent_loop_niter.
2806 (graphite_loop_normal_form): Use gcc_assert.
2807 (scan_tree_for_params): Use CASE_CONVERT.
2808 (phi_node_is_iv, bb_contains_non_iv_scalar_phi_nodes): New.
2809 (build_scop_conditions_1): Call bb_contains_non_iv_scalar_phi_nodes.
2810 Use gcc_assert. Discard scops that contain unhandled cases.
2811 (build_scop_conditions): Return a boolean status for unhandled cases.
2812 (strip_mine_profitable_p): Print the loop number, not its depth.
2813 (is_interchange_valid): Pass the depth of the loop nest, don't
2814 recompute it wrongly.
2815 (graphite_trans_bb_block): Same.
2816 (graphite_trans_bb_block): Print tentative of loop blocking.
2817 (graphite_trans_scop_block): Do not print that the loop has been
2819 (graphite_transform_loops): Do not handle scops that contain condition
2822 * testsuite/gcc.dg/graphite/pr38500.c: Fixed warning as committed
2824 * testsuite/gcc.dg/graphite/block-0.c: Update test.
2825 * testsuite/gcc.dg/graphite/block-1.c: Same.
2826 * testsuite/gcc.dg/graphite/block-2.c: Remove xfail and test for
2828 * testsuite/gcc.dg/graphite/block-4.c: Remove test for strip mine.
2829 * testsuite/gcc.dg/graphite/block-3.c: New.
2830 * testsuite/gcc.dg/graphite/pr38498.c: New.
2832 2008-12-22 Harsha Jagasia <harsha.jagasia@amd.com>
2834 PR tree-optimization/38510
2835 * gcc.dg/graphite/pr38510.c: New.
2836 * graphite.c (recompute_all_dominators): Call mark_irreducible_loops.
2837 (translate_clast): Call recompute_all_dominators before
2839 (gloog): Call recompute_all_dominators before graphite_verify.
2841 2008-12-12 Sebastian Pop <sebastian.pop@amd.com>
2843 PR tree-optimization/38492
2844 * graphite.c (rename_map_elt, debug_rename_elt,
2845 debug_rename_map_1, debug_rename_map, new_rename_map_elt,
2846 rename_map_elt_info, eq_rename_map_elts,
2847 get_new_name_from_old_name, bb_in_sese_p): Moved around.
2848 (sese_find_uses_to_rename_use): Renamed sese_build_livein_liveouts_use.
2849 (sese_find_uses_to_rename_bb): Renamed sese_build_livein_liveouts_bb.
2850 (sese_build_livein_liveouts): New.
2851 (new_sese, free_sese): New.
2852 (new_scop): Call new_sese.
2853 (free_scop): Call free_sese.
2854 (rename_variables_from_edge, rename_phis_end_scop): Removed.
2855 (register_old_new_names): Renamed register_old_and_new_names.
2856 (register_scop_liveout_renames, add_loop_exit_phis,
2857 insert_loop_close_phis, struct igp,
2858 default_liveout_before_guard, add_guard_exit_phis,
2859 insert_guard_phis, copy_renames): New.
2860 (translate_clast): Call insert_loop_close_phis and insert_guard_phis.
2861 (sese_add_exit_phis_edge): Renamed scop_add_exit_phis_edge.
2862 (rewrite_into_sese_closed_ssa): Renamed scop_insert_phis_for_liveouts.
2863 (scop_adjust_phis_for_liveouts): New.
2864 (gloog): Call scop_adjust_phis_for_liveouts.
2866 * graphite.h (struct sese): Documented. Added fields liveout,
2868 (SESE_LIVEOUT, SESE_LIVEIN, SESE_LIVEIN_VER, SESE_NUM_VER): New.
2869 (new_sese, free_sese, sese_build_livein_liveouts): Declared.
2870 (struct scop): Added field liveout_renames.
2871 (SCOP_LIVEOUT_RENAMES): New.
2873 2008-12-11 Sebastian Pop <sebastian.pop@amd.com>
2875 PR tree-optimization/38409
2876 * gcc.dg/graphite/pr38409.c: New.
2877 * graphite.c (nb_reductions_in_loop): Use simple_iv.
2879 2008-12-11 Sebastian Pop <sebastian.pop@amd.com>
2881 * graphite.c (gcc_type_for_cloog_iv): By default return
2883 (graphite_create_new_loop): Don't fold_convert the already
2884 fold_convert-ed expression.
2886 2008-12-11 Harsha Jagasia <harsha.jagasia@amd.com>
2888 PR tree-optimization/38446
2889 * gcc.dg/graphite/pr38446.c: New.
2890 * graphite.c (register_bb_in_sese): New.
2891 (bb_in_sese_p): Check if bb belongs to sese region by explicitly
2892 looking at the bbs in the region.
2893 * graphite.h (sese): Add region_basic_blocks pointer set to
2894 structure and initialize at the time of defining new scop.
2896 2008-12-11 Tobias Grosser <grosser@fim.uni-passau.de>
2898 * graphite.c (new_graphite_bb): Initialize GBB_STATIC_SCHEDULE.
2899 (find_params_in_bb): Do not free data refs.
2900 (free_graphite_bb): Add FIXME on disabled free_data_refs.
2902 2008-12-11 Sebastian Pop <sebastian.pop@amd.com>
2904 * testsuite/gcc.dg/graphite/scop-16.c: Test only scop specific info.
2905 * testsuite/gcc.dg/graphite/scop-17.c: Same.
2906 * testsuite/gcc.dg/graphite/block-5.c: New.
2907 * testsuite/gcc.dg/graphite/block-6.c: New.
2908 * testsuite/gcc.dg/graphite/pr37485.c: Clean dump file after.
2909 * testsuite/gcc.dg/graphite/pr37684.c: Same.
2910 * testsuite/gcc.dg/graphite/block-2.c: Same.
2912 * graphite.c (struct ivtype_map_elt): New.
2913 (debug_ivtype_elt, debug_ivtype_map_1, debug_ivtype_map,
2914 new_ivtype_map_elt, ivtype_map_elt_info, eq_ivtype_map_elts,
2915 gcc_type_for_cloog_iv): New.
2916 (loop_iv_stack_patch_for_consts): Use the type of the induction
2917 variable from the original loop, except for the automatically
2918 generated loops, i.e., in the case of a strip-mined loop, in
2919 which case there is no original loop: in that case just use
2921 (new_graphite_bb): Initialize GBB_CLOOG_IV_TYPES.
2922 (free_graphite_bb): Free GBB_CLOOG_IV_TYPES.
2923 (clast_name_to_gcc): Accept params to be NULL.
2924 (clast_to_gcc_expression): Take an extra parameter for the type.
2925 Convert to that type all the expressions built by this function.
2926 (gcc_type_for_clast_expr, gcc_type_for_clast_eq): New.
2927 (graphite_translate_clast_equation): Compute the type of the
2928 clast_equation before translating its LHS and RHS.
2929 (clast_get_body_of_loop, gcc_type_for_iv_of_clast_loop): New.
2930 (graphite_create_new_loop): Compute the type of the induction
2931 variable before translating the lower and upper bounds and before
2932 creating the induction variable.
2933 (rename_variables_from_edge, rename_phis_end_scop): New.
2934 (copy_bb_and_scalar_dependences): Call rename_phis_end_scop.
2935 (sese_add_exit_phis_edge): Do not use integer_zero_node.
2936 (find_cloog_iv_in_expr, compute_cloog_iv_types_1,
2937 compute_cloog_iv_types): New.
2938 (gloog): Call compute_cloog_iv_types before starting the
2939 translation of the clast.
2941 * graphite.h (struct graphite_bb): New field cloog_iv_types.
2942 (GBB_CLOOG_IV_TYPES): New.
2943 (debug_ivtype_map): Declared.
2944 (oldiv_for_loop): New.
2946 2008-12-10 Tobias Grosser <grosser@fim.uni-passau.de>
2949 * graphite.c (new_scop): Initialize SCOP_ADD_PARAMS.
2950 (param_index): Assert if parameter is not know after parameter
2952 (find_params_in_bb): Detect params directly in GBB_CONDITIONS.
2953 (find_scop_parameters): Mark, that we have finished parameter
2955 (graphite_transform_loops): Move condition detection before parameter
2957 * graphite.h (struct scop): Add SCOP_ADD_PARAMS.
2958 * testsuite/gfortran.dg/graphite/pr38459.f90: New.
2960 2008-12-09 Tobias Grosser <grosser@fim.uni-passau.de>
2962 * graphite.c (graphite_transform_loops): Always call find_transform ()
2963 in ENABLE_CHECKING. So we test these code paths, even if we do not
2966 2008-12-09 Tobias Grosser <grosser@fim.uni-passau.de>
2968 * graphite.c (print_graphite_bb): Fix printing to file != dump_file.
2969 (print_scop): Ditto.
2971 2008-12-08 Tobias Grosser <grosser@fim.uni-passau.de>
2974 Fix testsuite/gfortran.dg/graphite/id-3.f90.
2975 * graphite.c (scopdet_basic_block_info): Fix bug that found some
2976 regions more than once.
2978 2008-12-03 Sebastian Pop <sebastian.pop@amd.com>
2980 Fix testsuite/gfortran.dg/graphite/id-4.f90.
2981 * graphite.c (scan_tree_for_params): Do not compute the multiplicand
2984 2008-12-03 Sebastian Pop <sebastian.pop@amd.com>
2986 Fix testsuite/gfortran.dg/graphite/id-1.f90.
2987 * graphite.c (gmp_cst_to_tree): Pass the type in parameter.
2988 (loop_iv_stack_patch_for_consts): Update use of gmp_cst_to_tree.
2989 (max_precision_type): New.
2990 (value_clast): Removed.
2991 (clast_to_gcc_expression): Be more careful to types of expressions.
2992 Use max_precision_type and update use of gmp_cst_to_tree.
2993 (graphite_translate_clast_equation): Use max_precision_type.
2994 (graphite_create_guard_cond_expr): Do not use integer_type_node,
2995 use the type of the condition.
2996 (graphite_create_new_loop): Do not use integer_type_node, use the
2997 max_precision_type of lb and ub.
2999 2008-12-03 Sebastian Pop <sebastian.pop@amd.com>
3001 * graphite.c (build_scops_1): Initialize open_scop.exit
3004 2008-12-02 Sebastian Pop <sebastian.pop@amd.com>
3006 * testsuite/gcc.dg/graphite/pr38084.c: New.
3007 * testsuite/gfortran.dg/graphite/id-1.f90: New.
3008 * testsuite/gfortran.dg/graphite/id-2.f90: New.
3009 * testsuite/gfortran.dg/graphite/id-3.f90: New.
3010 * testsuite/gfortran.dg/graphite/id-4.f90: New.
3011 * testsuite/gfortran.dg/graphite/pr37857.f90: New.
3013 2008-12-02 Sebastian Pop <sebastian.pop@amd.com>
3014 Jan Sjodin <jan.sjodin@amd.com>
3015 Harsha Jagasia <harsha.jagasia@amd.com>
3027 * testsuite/gcc.dg/graphite/pr38073.c: New.
3028 * testsuite/gcc.dg/graphite/pr37928.c: New.
3029 * testsuite/gcc.dg/graphite/pr37883.c: New.
3030 * testsuite/gcc.dg/graphite/pr38125.c: New.
3031 * testsuite/gfortran.dg/graphite/pr38083.f90: New.
3032 * testsuite/gfortran.dg/graphite/pr37852.f90: New.
3033 * testsuite/gfortran.dg/graphite/pr37980.f90: New.
3035 * testsuite/gcc.dg/graphite/scop-18.c: Remove reduction, test for
3036 the number of detected scops. Copy exact same test for loop
3038 * testsuite/gcc.dg/graphite/block-1.c: Fix the number of expected
3039 loops to be blocked as reductions are not handled.
3040 * testsuite/gcc.dg/graphite/block-4.c: ...here. New.
3042 * tree-phinodes.c (remove_phi_nodes): New, extracted from...
3043 * tree-cfg.c (remove_phi_nodes_and_edges_for_unreachable_block):
3045 * tree-flow.h (remove_phi_nodes, canonicalize_loop_ivs): Declared.
3046 * Makefile.in (graphite.o): Depend on value-prof.h.
3047 (graphite.o-warn): Removed -Wno-error.
3048 * tree-parloops.c (canonicalize_loop_ivs): Allow reduction_list
3049 to be a NULL pointer. Call update_stmt. Return the newly created
3050 cannonical induction variable.
3052 * graphite.h (debug_rename_map): Declared. Fix some comments.
3054 * graphite.c: Reimplement the code generation from graphite to gimple.
3055 Include value-prof.h.
3056 (loop_iv_stack_get_iv): Do not return NULL for constant substitutions.
3057 (get_old_iv_from_ssa_name): Removed.
3058 (graphite_stmt_p): New.
3059 (new_graphite_bb): Test for useful statements before building a
3060 graphite statement for the basic block.
3061 (free_graphite_bb): Do not free GBB_DATA_REFS: this is a bug
3062 in free_data_ref that calls BITMAP_FREE (DR_VOPS (dr)) without
3064 (recompute_all_dominators, graphite_verify,
3065 nb_reductions_in_loop, graphite_loop_normal_form): New.
3066 (scop_record_loop): Call graphite_loop_normal_form.
3067 (build_scop_loop_nests): Iterate over all the blocks of the
3068 function instead of relying on the incomplete information from
3069 SCOP_BBS. Return the success of the operation.
3070 (find_params_in_bb): Use the data from GBB_DATA_REFS.
3071 (add_bb_domains): Removed.
3072 (build_loop_iteration_domains): Don't call add_bb_domains.
3073 Add the iteration domain only to the basic blocks that have been
3074 translated to graphite.
3075 (build_scop_conditions_1): Add constraints only if the basic
3076 block have been translated to graphite.
3077 (build_scop_data_accesses): Completely disabled until data
3078 dependence is correctly implemented.
3079 (debug_rename_elt, debug_rename_map_1, debug_rename_map): New.
3080 (remove_all_edges_1, remove_all_edges): Removed.
3081 (get_new_name_from_old_name): New.
3082 (graphite_rename_variables_in_stmt): Renamed
3083 rename_variables_in_stmt. Call get_new_name_from_old_name.
3084 Use replace_exp and update_stmt.
3085 (is_old_iv): Renamed is_iv.
3086 (expand_scalar_variables_stmt): Extra parameter for renaming map.
3087 Use replace_exp and update_stmt.
3088 (expand_scalar_variables_expr): Same. Use the map to get the
3089 new names for the renaming of induction variables and for the
3090 renaming of variables after a basic block has been copied.
3091 (expand_scalar_variables): Same.
3092 (graphite_rename_variables): Renamed rename_variables.
3093 (move_phi_nodes): Removed.
3094 (get_false_edge_from_guard_bb): New.
3095 (build_iv_mapping): Do not insert the induction variable of a
3096 loop in the renaming iv map if the basic block does not belong
3098 (register_old_new_names, graphite_copy_stmts_from_block,
3099 copy_bb_and_scalar_dependences): New.
3100 (translate_clast): Heavily reimplemented: copy basic blocks,
3101 do not move them. Finally, in call cleanup_tree_cfg in gloog.
3102 At each translation step call graphite_verify ensuring the
3103 consistency of the SSA, loops and dominators information.
3104 (collect_virtual_phis, find_vdef_for_var_in_bb,
3105 find_vdef_for_var_1, find_vdef_for_var,
3106 patch_phis_for_virtual_defs): Removed huge hack.
3107 (mark_old_loops, remove_dead_loops, skip_phi_defs,
3108 collect_scop_exit_phi_args, patch_scop_exit_phi_args,
3109 gbb_can_be_ignored, scop_remove_ignoreable_gbbs, ): Removed.
3110 (remove_sese_region, ifsese, if_region_entry, if_region_exit,
3111 if_region_get_condition_block, if_region_set_false_region,
3112 create_if_region_on_edge, move_sese_in_condition, bb_in_sese_p,
3113 sese_find_uses_to_rename_use, sese_find_uses_to_rename_bb,
3114 sese_add_exit_phis_edge, sese_add_exit_phis_var,
3115 rewrite_into_sese_closed_ssa): New.
3116 (gloog): Remove dead code. Early return if code cannot be
3117 generated. Call cleanup_tree_cfg once the scop has been code
3119 (graphite_trans_scop_block, graphite_trans_loop_block): Do not
3120 block loops with less than two loops.
3121 (graphite_apply_transformations): Remove the call to
3122 scop_remove_ignoreable_gbbs.
3123 (limit_scops): When build_scop_loop_nests fails, continue on
3124 the next scop. Fix open_scop.entry.
3125 (graphite_transform_loops): Call recompute_all_dominators: force the
3126 recomputation of correct CDI_DOMINATORS and CDI_POST_DOMINATORS.
3127 Call initialize_original_copy_tables and free_original_copy_tables
3128 to be able to copy basic blocks during code generation.
3129 When build_scop_loop_nests fails, continue on next scop.
3130 (value_clast): New union.
3131 (clast_to_gcc_expression): Fix type cast warning.
3133 2008-11-09 Sebastian Pop <sebastian.pop@amd.com>
3135 * Merge from mainline (r140838:141727).
3137 2008-11-05 Tobias Grosser <grosser@fim.uni-passau.de>
3141 * graphite.c (scan_tree_for_params): Add POINTER_PLUS_EXPR.
3143 2008-11-05 Tobias Grosser <grosser@fim.uni-passau.de>
3147 * graphite.c (scopdet_basic_block_info): Fix loops with multiple
3148 exits and conditions.
3149 * testsuite/gcc.dg/graphite/pr37943.c: New.
3151 2008-10-23 Tobias Grosser <grosser@fim.uni-passau.de>
3154 * graphite.c (gloog): Replace EXIT_BLOCK_PTR with scop exit.
3156 2008-10-23 Tobias Grosser <grosser@fim.uni-passau.de>
3158 * doc/invoke.texi: Fix spaces.
3160 2008-10-22 Sebastian Pop <sebastian.pop@amd.com>
3162 PR tree-optimization/37891
3163 Reverted last commit.
3164 * graphite.c (create_single_entry_edge): Set
3165 EDGE_IRREDUCIBLE_LOOP and BB_IRREDUCIBLE_LOOP.
3167 2008-10-21 Sebastian Pop <sebastian.pop@amd.com>
3168 Mitul Thakkar <mitul.thakkar@amd.com>
3170 * graphite.c (create_single_entry_edge): Set
3171 EDGE_IRREDUCIBLE_LOOP and BB_IRREDUCIBLE_LOOP.
3173 2008-10-16 Tobias Grosser <grosser@fim.uni-passau.de>
3175 * doc/invoke.texi: Add -fgraphite-identity.
3176 * graphite.c (graphite_apply_transformations): Check for
3177 -fgraphite-identity.
3178 * toplev.c (process_options): Add flag_graphite_identity.
3179 * tree-ssa-loop.c: Add flag_graphite_identity.
3181 2008-10-14 Sebastian Pop <sebastian.pop@amd.com>
3183 Undo changes from 2008-10-02:
3184 * tree-ssa-loop-ivopts.c (rewrite_use_nonlinear_expr): Convert
3185 operand type when copying the operand to a variable of different type.
3186 * cfgloopmanip.c (create_empty_loop_on_edge): Write exit condition
3187 with the IV name after increment.
3189 2008-10-14 Sebastian Pop <sebastian.pop@amd.com>
3190 Harsha Jagasia <harsha.jagasia@amd.com>
3192 PR tree-optimization/37828
3193 * testsuite/gcc.dg/graphite/pr37828.c: New.
3194 * graphite.c (graphite_trans_loop_block): Do not loop block
3195 single nested loops.
3197 2008-10-09 Harsha Jagasia <harsha.jagasia@amd.com>
3198 Sebastian Pop <sebastian.pop@amd.com>
3200 * graphite.c (struct rename_map_elt, new_rename_map_elt,
3201 rename_map_elt_info, eq_rename_map_elts): New.
3202 (graphite_rename_ivs_stmt): Renamed graphite_rename_variables_in_stmt.
3203 (expand_scalar_variables_expr): Change parameters.
3204 (expand_scalar_variables_stmt): Same.
3205 (expand_scalar_variables): Same.
3206 (graphite_rename_ivs): Rename graphite_rename_variables.
3207 (build_iv_mapping): New.
3208 (translate_clast): Call build_iv_mapping.
3209 * graphite.h (gbb_p): New name.
3211 2008-10-03 Harsha Jagasia <harsha.jagasia@amd.com>
3213 PR tree-optimization/37684
3214 * gcc.dg/graphite/pr37684.c: New.
3215 * graphite.c (exclude_component_ref): New.
3216 (is_simple_operand): Call exclude_component_ref.
3218 2008-10-02 Jan Sjodin <jan.sjodin@amd.com>
3219 Harsha Jagasia <harsha.jagasia@amd.com>
3221 PR tree-optimization/37485
3222 * gcc.dg/graphite/block-2.c: New
3223 * graphite.c (gmp_cst_to_tree): Moved.
3224 (iv_stack_entry_is_constant): New.
3225 (iv_stack_entry_is_iv): New.
3226 (loop_iv_stack_push): Renamed to loop_iv_stack_push_iv.
3227 (loop_iv_stack_insert_constant): New.
3228 (loop_iv_stack_pop): Use new datatpype.
3229 (loop_iv_stack_get_iv): Same.
3230 (loop_iv_stack_get_iv_from_name): Same.
3231 (loop_iv_stack_debug): Renamed to debug_loop_iv_stack.
3232 (loop_iv_stack_patch_for_consts): New.
3233 (loop_iv_stack_remove_constants): New.
3234 (graphite_create_new_loop): Use loop_iv_stack_push_iv.
3235 (translate_clast): Call loop_iv_stack_patch_for_consts and
3236 loop_iv_stack_remove_constants.
3237 (gloog): Use new datatype. Redirect construction edge to end
3238 block to avoid accidental deletion.
3239 * graphite.h (enum iv_stack_entry_kind): New. Tag for data in
3241 (union iv_stack_entry_data): New. Data in iv stack entry.
3242 (struct iv_stack_entry): New. Datatype for iv stack entries.
3244 2008-10-02 Sebastian Pop <sebastian.pop@amd.com>
3246 * tree-ssa-loop-ivopts.c (rewrite_use_nonlinear_expr): Convert
3247 operand type when copying the operand to a variable of different type.
3249 2008-10-02 Sebastian Pop <sebastian.pop@amd.com>
3251 * cfgloopmanip.c (create_empty_loop_on_edge): Write exit condition
3252 with the IV name after increment.
3254 2008-10-02 Sebastian Pop <sebastian.pop@amd.com>
3256 * Merge from mainline (r140164:140838).
3258 2008-09-10 Konrad Trifunovic <konrad.trifunovic@inria.fr>
3260 * graphite-data-ref.c: New.
3261 * graphite.c (print_scop): Also dump the dependence graph.
3262 (bb_in_scop_p, loop_in_scop_p, nb_loops_around_gb): Moved...
3263 (new_scop): Initialize SCOP_DEP_GRAPH.
3264 (build_scop_dynamic_schedules): New.
3265 (build_access_matrix_with_af): Fixed column numbering.
3266 (graphite_transform_loops): Call build_scop_dynamic_schedules.
3267 * graphite.h: Add ifndef/define guards against multiple inclusion.
3268 (struct scop): Add dep_graph field.
3269 (SCOP_DEP_GRAPH): Defined.
3270 (ref_nb_loops): Fixed and moved to other position.
3271 (bb_in_scop_p, loop_in_scop_p, nb_loops_around_gb): ... here.
3272 (nb_loops_around_loop_in_scop): New.
3273 (graphite_dump_dependence_graph): Declared.
3274 (graphite_build_rdg_all_levels): Declared.
3275 (graphite_test_dependence): Declared.
3276 * Makefile.in (graphite-data-ref.o): New target.
3278 2008-09-09 Sebastian Pop <sebastian.pop@amd.com>
3280 * Merge from mainline (139870:140164).
3282 2008-09-01 Sebastian Pop <sebastian.pop@amd.com>
3284 * Merge from mainline (138275:139870).
3285 * testsuite/gcc.dg/graphite/scop-matmult.c: XFailed as one of
3286 the commits from trunk broke the niter detection.
3288 2008-09-01 Sebastian Pop <sebastian.pop@amd.com>
3290 * graphite.c: Add more documentation. Fix formatting.
3291 (debug_loop_vec, debug_oldivs, loop_iv_stack,
3292 loop_iv_stack_debug): Moved...
3293 (schedule_to_scattering): Move before use.
3294 (dot_all_scops): Include in "#if 0" the code for system
3297 * graphite.h: (debug_loop_vec, debug_oldivs, loop_iv_stack,
3298 loop_iv_stack_debug): ...here.
3300 2008-08-29 Jan Sjodin <jan.sjodin@amd.com>
3302 * tree-phinodes.c (make_phi_node): Extern.
3303 (add_phi_node_to_bb): New.
3304 (create_phi_node): Call add_phi_node_to_bb.
3305 * tree-ssa-loop-ivopts.c (get_phi_with_result): New.
3306 (remove_statement): Handle case where stored phi was updated
3307 and is no longer the same.
3308 * graphite.c (is_parameter): New.
3310 (expand_scalar_variables_expr): New.
3311 (expand_scalar_variables_stmt): New.
3312 (expand_scalar_variables): New.
3313 (move_phi_nodes): Create new phi instead of moving old one.
3314 (translate_clast): Call expand_scalar_variables.
3315 (find_vdef_for_var_in_bb): Also scan regular definitions.
3316 (skip_phi_defs): New.
3317 (collect_scop_exit_phi_args): New.
3318 (patch_scop_exit_phi_args): New.
3319 (gloog): Patch phis after scop.
3320 * tree-flow.h: (add_phi_node_to_bb): Declared.
3321 (make_phi_node): Declared.
3323 2008-08-26 Sebastian Pop <sebastian.pop@amd.com>
3325 * graphite.c (end_scop): Split the entry of the scop when it
3326 is the header of the loop in which the scop is ending.
3327 (build_scops_1, limit_scops): Update uses of end_scop.
3329 2008-08-26 Sebastian Pop <sebastian.pop@amd.com>
3331 * graphite.c (dot_all_scops_1): Do not fail on uninitialized
3332 SCOP_ENTRY or SCOP_EXIT.
3334 2008-08-25 Sebastian Pop <sebastian.pop@amd.com>
3336 * graphite.c (get_construction_edge): Removed.
3337 (gloog): Construction edge is the scop entry edge.
3339 2008-08-25 Sebastian Pop <sebastian.pop@amd.com>
3341 * graphite.c (can_generate_for_scop): Removed.
3342 (gloog): Do not call it.
3344 2008-08-25 Sebastian Pop <sebastian.pop@amd.com>
3346 * graphite.c (new_scop): Entry of a scop is an edge.
3347 Initialize SESE region.
3348 (free_scop): Free SESE region.
3349 (build_scops_1, scopdet_bb_info): Work on edges, not on bbs.
3350 (split_difficult_bb): New, split from end_scop.
3351 (end_scop): Exit of a scop is an edge.
3352 (build_scop_bbs): Never check CDI_POST_DOMINATORS: this info is
3353 not automatically updated and thus is always wrong.
3354 * graphite.h (struct sese): New.
3357 (struct scop): New field for a SESE region. Remove entry, exit.
3358 (SCOP_ENTRY, SCOP_EXIT): Update definitions to match same
3359 semantics as before. Moved comment around.
3361 2008-08-25 Tobias Grosser <grosser@fim.uni-passau.de>
3362 Sebastian Pop <sebastian.pop@amd.com>
3364 * graphite.c (graphite_transform_loops): Always enable gloog
3365 and find_transform when ENABLE_CHECKING.
3367 2008-08-25 Sebastian Pop <sebastian.pop@amd.com>
3369 * graphite.c (graphite_transform_loops): Move pretty printer
3370 of SCOPs before doing any transform. Remove call to print_scops
3371 and dot_all_scops_1.
3373 2008-08-25 Sebastian Pop <sebastian.pop@amd.com>
3375 * graphite.c (dump_gbb_conditions): Don't try to print NULL pointers.
3376 (print_graphite_bb): Same.
3378 2008-08-25 Sebastian Pop <sebastian.pop@amd.com>
3380 * graphite.c (dot_all_scops_1): Cleanup.
3381 (move_scops): Fix comment.
3383 2008-08-25 Sebastian Pop <sebastian.pop@amd.com>
3385 * graphite.c (build_scop_bbs): Revert commit 139355:
3387 2008-08-20 Sebastian Pop <sebastian.pop@amd.com>
3388 Dwarakanath Rajagopal <dwarak.rajagopal@amd.com>
3390 * graphite.c (build_scop_bbs): Factor up code.
3392 2008-08-25 Tobias Grosser <grosser@fim.uni-passau.de>
3394 * graphite.c (gloog): Update dominator info.
3396 2008-08-25 Tobias Grosser <grosser@fim.uni-passau.de>
3398 * graphite.c (remove_cond_exprs): Do not fail on empty bbs.
3400 2008-08-24 Sebastian Pop <sebastian.pop@amd.com>
3402 * graphite.c (new_graphite_bb): Remove GBB_INDEX_TO_NUM_MAP
3404 (free_graphite_bb): Remove GBB_INDEX_TO_NUM_MAP free.
3405 (translate_clast): Correct formatting.
3406 * graphite.h (struct num_map): Removed.
3407 (struct graphite_bb): Remove num_map field.
3408 (GBB_INDEX_TO_NUM_MAP): Removed.
3410 2008-08-24 Sebastian Pop <sebastian.pop@amd.com>
3412 * graphite.c (build_access_matrix_with_af): Fix comments.
3413 (build_scop_data_accesses): Same.
3415 2008-08-24 Sebastian Pop <sebastian.pop@amd.com>
3417 * graphite.c (build_scop_data_accesses): Don't construct
3418 access matrices. Add a FIXME and an assert condition that
3419 should pass when the access matrices will be needed.
3421 2008-08-24 Sebastian Pop <sebastian.pop@amd.com>
3423 * tree-data-ref.c (stmt_simple_memref_p): Don't call
3425 * graphite.c (build_graphite_bb): Renamed new_graphite_bb.
3426 Moved close by free_graphite_bb.
3427 (free_graphite_bb): Call free_data_refs. Reset bb->aux.
3428 (new_scop): Move close by free_scop.
3429 (graphite_transform_loops): Avoid linear scan to reset bb->aux.
3431 2008-08-22 Jan Sjodin <jan.sjodin@amd.com>
3433 * cfgloopmanip.c (create_empty_if_region_on_edge): New.
3434 * graphite.c (clast_to_gcc_expression): Call gmp_cst_to_tree
3435 instead of recursive call.
3436 (graphite_translate_clast_equation): New.
3437 (graphite_create_guard_cond_expr): New.
3438 (graphite_create_new_guard): New.
3439 (get_stack_index_from_iv): Removed.
3440 (graphite_rename_ivs_stmt): Use gbb_loop_index.
3441 (get_true_edge_from_guard_bb): New.
3442 (translate_clast): Handle stmt_guard in clast.
3443 (get_construction_edge): Allow construction edge detection for
3444 a scope entry with multiple predecessors if one predecessor is
3445 the immediate dominator of scope entry.
3446 (can_generate_code_stmt): Enable code generation for clast_guard.
3447 (gloog): Use correct context loop. Removed check for post dominators.
3448 * cfgloop.h (create_empty_if_region_on_edge): Declared.
3450 2008-08-21 Sebastian Pop <sebastian.pop@amd.com>
3452 * graphite.c (remove_dead_loops): Document better which
3455 2008-08-21 Sebastian Pop <sebastian.pop@amd.com>
3457 * Makefile.in: Rename POLYLIBLIBS and POLYLIBINC to PPLLIBS
3459 (graphite.o): Also depends on pointer-set.h.
3461 2008-08-21 Sebastian Pop <sebastian.pop@amd.com>
3463 * graphite.c (scop_record_loop): Fix compile warning.
3465 2008-08-21 Harsha Jagasia <harsha.jagasia@amd.com>
3466 Sebastian Pop <sebastian.pop@amd.com>
3468 * graphite.c (scop_record_loop): DECL_NAME can be NULL.
3470 2008-08-21 Sebastian Pop <sebastian.pop@amd.com>
3472 * graphite.c (build_graphite_bb): Initialize bb->aux to
3473 point to the graphite_bb_p.
3474 (graphite_bb_from_bb): Renamed gbb_from_bb; returns the
3476 (add_bb_domains): Does not use the scop parameter.
3477 (graphite_transform_loops): Clean bb->aux at the end.
3479 2008-08-20 Dwarakanath Rajagopal <dwarak.rajagopal@amd.com>
3480 Sebastian Pop <sebastian.pop@amd.com>
3482 * testsuite/lib/target-supports.exp
3483 (check_effective_target_fgraphite): New.
3485 * testsuite/gcc.dg/graphite/graphite.exp: Early exit when
3486 check_effective_target_fgraphite returns false.
3487 Set dg-do-what-default to compile.
3488 (scan-graphite-dump-times): Removed.
3489 * testsuite/gfortran.dg/graphite/graphite.exp: Same.
3491 * testsuite/gcc.dg/graphite/scop-0.c: Do not use "dg-do compile".
3492 Use scan-tree-dump-times instead of scan-graphite-dump-times.
3493 * testsuite/gcc.dg/graphite/scop-1.c: Same.
3494 * testsuite/gcc.dg/graphite/scop-2.c: Same.
3495 * testsuite/gcc.dg/graphite/scop-3.c: Same.
3496 * testsuite/gcc.dg/graphite/scop-4.c: Same.
3497 * testsuite/gcc.dg/graphite/scop-5.c: Same.
3498 * testsuite/gcc.dg/graphite/scop-6.c: Same.
3499 * testsuite/gcc.dg/graphite/scop-7.c: Same.
3500 * testsuite/gcc.dg/graphite/scop-8.c: Same.
3501 * testsuite/gcc.dg/graphite/scop-9.c: Same.
3502 * testsuite/gcc.dg/graphite/scop-10.c: Same.
3503 * testsuite/gcc.dg/graphite/scop-11.c: Same.
3504 * testsuite/gcc.dg/graphite/scop-12.c: Same.
3505 * testsuite/gcc.dg/graphite/scop-13.c: Same.
3506 * testsuite/gcc.dg/graphite/scop-matmult.c: Same.
3507 * testsuite/gcc.dg/graphite/scop-14.c: Same.
3508 * testsuite/gcc.dg/graphite/scop-15.c: Same.
3509 * testsuite/gcc.dg/graphite/block-0.c: Same.
3510 * testsuite/gcc.dg/graphite/scop-16.c: Same.
3511 * testsuite/gcc.dg/graphite/block-1.c: Same.
3512 * testsuite/gcc.dg/graphite/scop-17.c: Same.
3513 * testsuite/gcc.dg/graphite/scop-18.c: Same.
3514 * testsuite/gfortran.dg/graphite/block-1.f90: Same.
3515 * testsuite/gfortran.dg/graphite/scop-1.f: Same.
3516 * testsuite/gfortran.dg/graphite/block-2.f: Same.
3518 2008-08-20 Sebastian Pop <sebastian.pop@amd.com>
3520 * graphite.c: Fix some XXX comments.
3521 (build_scop_dynamic_schedules): Removed.
3523 2008-08-20 Sebastian Pop <sebastian.pop@amd.com>
3525 * graphite.h (scop_max_loop_depth): Moved...
3526 * graphite.c (scop_max_loop_depth): ...here.
3527 (remove_all_edges_1): New.
3528 (remove_all_edges): Factored code.
3529 (remove_cond_exprs): Check only the last statement for
3530 a GIMPLE_COND expression.
3532 2008-08-20 Sebastian Pop <sebastian.pop@amd.com>
3534 * graphite.c (scan_tree_for_params): Early return when the
3535 expression is a chrec_dont_know. Handle case NEGATE_EXPR.
3536 (find_scop_parameters): Factor out code.
3537 (graphite_trans_bb_strip_mine): Remove dead code.
3539 2008-08-20 Sebastian Pop <sebastian.pop@amd.com>
3541 * graphite.c (clast_to_gcc_expression, graphite_create_new_loop,
3542 graphite_trans_bb_move_loop): Factor asserts.
3543 (gloog): Perform sanity checks only for ENABLE_CHECKING.
3544 Do not call calculate_dominance_info and estimate_bb_frequencies.
3546 2008-08-20 Jan Sjodin <jan.sjodin@amd.com>
3548 * graphite.c (create_loops_mapping, free_loops_mapping,
3549 create_loops_mapping_num, debug_loop_mapping_1,
3550 debug_loop_mapping, graphite_loops_mapping_max_loop_num,
3551 get_loop_mapping_for_num, graphite_loops_mapping_add_child,
3552 graphite_loops_mapping_add_child_num,
3553 graphite_loops_mapping_insert_child,
3554 graphite_loops_mapping_parent, get_loop_mapped_depth_for_num,
3555 get_loop_mapped_depth, split_loop_mapped_depth_for_num,
3556 loop_mapped_depth_split_loop, swap_loop_mapped_depth_for_num,
3557 create_num_from_index, get_num_from_index,
3558 swap_loop_mapped_depth): Removed.
3559 (new_scop): Do not initialize SCOP_LOOPS_MAPPING.
3560 (free_scop): Do not call free_loops_mapping.
3561 (graphite_get_new_iv_stack_index_from_old_iv): Renamed
3562 get_stack_index_from_iv. Use GBB_LOOPS instead of calling
3563 get_loop_mapped_depth.
3564 (graphite_trans_bb_move_loop): Do not update the loop mapping.
3565 (graphite_trans_bb_strip_mine): Same.
3566 * graphite.h (graphite_loops_mapping, graphite_loop_node): Removed.
3567 (struct scop): Remove field loops_mapping.
3569 2008-08-20 Sebastian Pop <sebastian.pop@amd.com>
3570 Dwarakanath Rajagopal <dwarak.rajagopal@amd.com>
3572 * graphite.c (scop_record_loop): Factor out one level of the
3573 condition by early return.
3574 (build_scop_loop_nests): Format following FSF coding style.
3575 (build_scop_dynamic_schedules): Factor out code.
3576 (scopdet_bb_info): Reindent. Default case should not be reachable.
3578 2008-08-20 Sebastian Pop <sebastian.pop@amd.com>
3579 Dwarakanath Rajagopal <dwarak.rajagopal@amd.com>
3581 * graphite.c (loop_affine_expr): Check for DECL_P or struct
3582 assignments that are not handled as simple operands for now.
3584 2008-08-20 Sebastian Pop <sebastian.pop@amd.com>
3585 Dwarakanath Rajagopal <dwarak.rajagopal@amd.com>
3587 * graphite.c (build_scop_bbs): Factor up code.
3589 2008-08-20 Sebastian Pop <sebastian.pop@amd.com>
3590 Dwarakanath Rajagopal <dwarak.rajagopal@amd.com>
3592 * graphite.c (stmt_simple_for_scop_p): Factor code out
3594 (enum gbb_type): New. Group all the GBB_* types under it.
3595 (is_loop_exit): Moved...
3596 (end_scop): Enable BB spliting.
3597 * cfgloop.c (is_loop_exit): ...here. Reimplemented.
3598 * cfgloop.h (is_loop_exit): Declared.
3600 2008-08-20 Sebastian Pop <sebastian.pop@amd.com>
3602 * doc/invoke.texi: Remove strides from examples containing
3603 DO loops when the strides are equal to 1.
3605 2008-08-20 Harsha Jagasia <harsha.jagasia@amd.com>
3606 Dwarakanath Rajagopal <dwarak.rajagopal@amd.com>
3608 * graphite.c (graphite_trans_scop_block): Or the result with
3609 the result from graphite_trans_loop_block.
3610 * testsuite/gcc.dg/graphite/block-1.c: New.
3611 * testsuite/gfortran.dg/graphite/block-1.f90: New.
3612 * testsuite/gfortran.dg/graphite/block-2.f: New.
3614 2008-08-20 Sebastian Pop <sebastian.pop@amd.com>
3616 * graphite.c (graphite_transform_loops): Call cloog_initialize
3619 2008-08-20 Sebastian Pop <sebastian.pop@amd.com>
3621 * tree-data-ref.c) (stmt_simple_memref_p): New.
3622 * tree-data-ref.h (stmt_simple_memref_p): Declared.
3623 * graphite.c (stmt_simple_memref_for_scop_p): Removed.
3624 (is_simple_operand): Call stmt_simple_memref_p.
3626 * testsuite/gcc.dg/graphite/scop-matmult.c: Updated for not
3627 using pointer arithmetic, as this is optimized by PRE and
3628 makes the code too difficult to analyze.
3630 * testsuite/gcc.dg/graphite/scop-18.c: Same.
3632 2008-08-20 Sebastian Pop <sebastian.pop@amd.com>
3634 * gdbinit.in (pgg): New.
3636 2008-08-15 Tobias Grosser <grosser@fim.uni-passau.de>
3638 * graphite.c (graphite_trans_loop_block): Fix warning.
3640 2008-08-15 Tobias Grosser <grosser@fim.uni-passau.de>
3642 * graphite.c (graphite_trans_loop_block): Fix my merge error.
3644 2008-08-15 Tobias Grosser <grosser@fim.uni-passau.de>
3646 * graphite.c (graphite_trans_bb_block): Remove check for
3647 flag_loop_strip_mine, flag_loop_block, flag_loop_interchange.
3648 Check if loop blocking is profitable for every loop, before applying
3650 (graphite_apply_transformations): Call graphite_trans_bb_block only,
3651 if flag_loop_block is set.
3653 2008-08-14 Sebastian Pop <sebastian.pop@amd.com>
3655 * graphite.c: Add some more documentation for the loop
3658 2008-08-14 Sebastian Pop <sebastian.pop@amd.com>
3660 * Makefile.in (tree-data-ref.o): Remove dependence on graphite.h.
3661 * graphite.c: Format on less than 80 columns.
3664 2008-08-14 Sebastian Pop <sebastian.pop@amd.com>
3666 * cfgloopmanip.c (loopify): Use update_dominators_in_loop.
3668 2008-08-14 Sebastian Pop <sebastian.pop@amd.com>
3670 * doc/invoke.texi (floop-block, floop-strip-mine,
3671 floop-interchange): Update documentation with examples.
3673 2008-08-13 Sebastian Pop <sebastian.pop@amd.com>
3675 * cfgloopmanip.c (create_empty_loop_on_edge): Don't call
3677 * graphite.c (graphite_create_new_loop): Call add_referenced_var.
3679 2008-08-13 Sebastian Pop <sebastian.pop@amd.com>
3681 * cfgloopmanip.c (create_empty_loop_on_edge): Improve documentation.
3682 Factor gcc_asserts into a single one. Use force_gimple_operand_gsi.
3683 * tree-scalar-evolution.c: Revert useless changes.
3684 * tree-phinodes.c: Same.
3687 * tree-vectorizer.h: Same.
3688 * tree-flow.h: Same.
3690 * common.opt (fgraphite): Update documentation.
3692 2008-08-12 Harsha Jagasia <harsha.jagasia@amd.com>
3694 * doc/invoke.texi (-floop-block, -floop-strip-mine,
3695 -floop-interchange): Add more text for explaining what each of these
3697 * tree-into-ssa.c (gimple_vec): Moved to...
3698 * graphite.c: Include gimple.h.
3699 (gimple_vec): Moved to...
3700 (del_loop_to_cloog_loop): Removed.
3701 (loop_affine_expr): Do not call create_data_ref when the
3702 operand is a constant.
3703 (new_scop): Use free instead of del_loop_to_cloog_loop.
3704 * Makefile.in (graphite.o): Depend on GIMPLE_H.
3705 * gimple.h (gimple_vec): ... here.
3707 2008-08-11 Tobias Grosser <grosser@fim.uni-passau.de>
3709 * graphite.c (scopdet_bb_info): Only allow loops with known number of
3711 (build_loop_iteration_domains): Fail, if latch executions unknown.
3713 2008-08-11 Tobias Grosser <grosser@fim.uni-passau.de>
3715 * graphite.c (add_conditions_to_domain): New.
3716 (build_scop_conditions_1): Call add_conditions_to_domain.
3717 (set_cloog_options): Allow to disable optimizations.
3719 2008-08-11 Tobias Grosser <grosser@fim.uni-passau.de>
3721 * graphite.c (find_params_in_bb): Look for parameters in conditions.
3722 Do not use walk_dominator_tree.
3723 (find_scop_parameters): Do not use walk_dominator_tree.
3725 2008-08-11 Tobias Grosser <grosser@fim.uni-passau.de>
3727 * graphite.c (scan_tree_for_params) Add / Subtract inequality.
3728 (idx_record_params): Adapt.
3729 * graphite.h (scop_gimple_loop_depth): New.
3731 2008-08-11 Tobias Grosser <grosser@fim.uni-passau.de>
3733 * graphite.c (build_scop_dynamic_schedules): Remove value_init.
3734 (scan_tree_for_params): Remove value_init.
3735 (build_scop_context): Remove value_init.
3736 (build_loop_iteration_domains): Remove value_init.
3737 (schedule_to_scattering): Remove value_init.
3738 (graphite_trans_bb_strip_mine): Remove value_init.
3740 2008-08-11 Tobias Grosser <grosser@fim.uni-passau.de>
3742 * gcc/graphite.c (limit_scops): New.
3743 (graphite_transform_loops): Add limit SCoPs.
3744 * gcc/testsuite/gcc.dg/graphite/scop-0.c: Update number of SCoPs.
3745 * gcc/testsuite/gcc.dg/graphite/scop-1.c: Update number of SCoPs.
3746 * gcc/testsuite/gcc.dg/graphite/scop-10.c: Update number of SCoPs.
3747 * gcc/testsuite/gcc.dg/graphite/scop-11.c: Update number of SCoPs.
3748 * gcc/testsuite/gcc.dg/graphite/scop-12.c: Update number of SCoPs.
3749 * gcc/testsuite/gcc.dg/graphite/scop-13.c: Update number of SCoPs.
3750 * gcc/testsuite/gcc.dg/graphite/scop-14.c: Update number of SCoPs.
3751 * gcc/testsuite/gcc.dg/graphite/scop-15.c: Update number of SCoPs.
3752 * gcc/testsuite/gcc.dg/graphite/scop-16.c: Update number of SCoPs.
3753 Change loop numbers.
3754 * gcc/testsuite/gcc.dg/graphite/scop-17.c: Update number of SCoPs.
3755 Change loop numbers.
3756 * gcc/testsuite/gcc.dg/graphite/scop-18.c: Update number of SCoPs.
3757 * gcc/testsuite/gcc.dg/graphite/scop-2.c: Update number of SCoPs.
3758 * gcc/testsuite/gcc.dg/graphite/scop-3.c: Update number of SCoPs.
3759 * gcc/testsuite/gcc.dg/graphite/scop-4.c: Update number of SCoPs.
3760 * gcc/testsuite/gcc.dg/graphite/scop-5.c: Update number of SCoPs.
3761 * gcc/testsuite/gcc.dg/graphite/scop-6.c: Update number of SCoPs.
3762 * gcc/testsuite/gcc.dg/graphite/scop-7.c: Update number of SCoPs.
3763 * gcc/testsuite/gcc.dg/graphite/scop-8.c: Update number of SCoPs.
3764 * gcc/testsuite/gcc.dg/graphite/scop-9.c: Update number of SCoPs.
3765 * gcc/testsuite/gcc.dg/graphite/scop-matmult.c: Update number of SCoPs.
3767 2008-08-11 Tobias Grosser <grosser@fim.uni-passau.de>
3769 * graphite.c (graphite_transform_loops): Call always find_transform.
3771 2008-08-08 Tobias Grosser <grosser@fim.uni-passau.de>
3773 * graphite.c (free_loops_mapping): New.
3774 (stmt_simple_for_scop_p): Fix typo.
3775 (stmt_simple_for_scop_p): Fix tuples functions, that
3777 (free_graphite_bb): Fix some memleaks.
3778 (free_scop): Fix some memleaks.
3779 (scopdet_bb_info): Do not forget some tmp SCoPs.
3780 (find_params_in_bb): Fix some memleaks.
3781 (clast_to_gcc_expression): Fix warning.
3783 2008-08-07 Tobias Grosser <grosser@fim.uni-passau.de>
3785 * testsuite/gcc.dg/graphite/scop-16.c: Fix for 32bit.
3786 * testsuite/gcc.dg/graphite/scop-17.c: Fix for 32bit.
3788 2008-08-04 Sebastian Pop <sebastian.pop@amd.com>
3790 * tree-ssa-loop.c (tree-ssa-loop.o): Do not include toplev.h.
3791 Move code ifdef-ed HAVE_cloog...
3792 * graphite.c: Include toplev.h.
3794 * Makefile.in (OBJS-common): Always build graphite.o.
3795 (BACKEND): Remove @GRAPHITE@.
3796 (tree-ssa-loop.o): Do not depend on TOPLEV_H.
3797 (graphite.o): Depend on TOPLEV_H.
3799 2008-08-04 Sebastian Pop <sebastian.pop@amd.com>
3801 * Makefile.in (tree-ssa-loop.o): Depend on TOPLEV_H.
3802 Remove typo left from polylib to ppl conversion.
3803 * graphite.c (graphite_transforms): Use sorry instead of fatal.
3805 2008-08-03 Sebastian Pop <sebastian.pop@amd.com>
3807 * toplev.c (process_options): Move the graphite loop optimization
3809 * tree-ssa-loop.c (graphite_transforms): ... here.
3810 When not configured with CLooG, print to dump_file that
3811 Graphite transforms were not performed.
3812 * testsuite/gcc.dg/graphite/graphite.exp (scan-graphite-dump-times):
3814 * testsuite/gcc.dg/graphite/*.c: Updated all testcases to use
3815 scan-graphite-dump-times.
3817 2008-08-03 Sebastian Pop <sebastian.pop@amd.com>
3819 * graphite.c (dot_scop, dot_all_scops): Do not call system.
3820 Do not open /tmp/scop.dot and /tmp/allscops.dot.
3822 2008-08-02 Sebastian Pop <sebastian.pop@amd.com>
3823 Jan Sjodin <jan.sjodin@amd.com>
3825 * configure: Regenerated.
3826 * omp-low.c (expand_omp_sections): Remove now unused code.
3827 * config.in (HAVE_polylib): Removed.
3828 * configure.ac (HAVE_polylib, POLYLIBLIBS, POLYLIBINC): Removed.
3829 (PPLLIBS, PPLINC): Added.
3830 * graphite.c: Replace unsigned with int wherever possible.
3831 Don't access Cloog's data structures, but use accessor functions.
3832 Clast's stmt->type is now implemented as a vtable: change the
3833 switches of stmt->type into ifs.
3834 (polylib/polylibgmp.h): Don't include.
3835 (initialize_dependence_polyhedron,
3836 initialize_data_dependence_polyhedron, is_empty_polyhedron,
3837 statement_precedes_p, test_dependence, build_rdg_all_levels,
3838 dump_dependence_graph): Removed until this code is cleaned up
3840 * Makefile.in (POLYLIBLIBS): Renamed PPLLIBS.
3841 (POLYLIBINC): Renamed PPLINC.
3843 2008-08-01 Harsha Jagasia <harsha.jagasia@amd.com>
3844 Dwarakanath Rajagopal <dwarak.rajagopal@amd.com>
3845 Jan Sjodin <jan.sjodin@amd.com>
3847 Finish the merge and tuplification of graphite.
3849 2008-07-24 Sebastian Pop <sebastian.pop@amd.com>
3850 Jan Sjodin <jan.sjodin@amd.com>
3852 Partial merge from mainline (138072:138275).
3853 * graphite.c still has to be tuplified.
3855 2008-07-29 Jan Sjodin <jan.sjodin@amd.com>
3857 * graphite.c (graphite_loops_mapping_max_loop_num): New.
3858 (create_num_from_index): New.
3859 (get_num_from_index): Also pass in the graphite BB.
3860 (free_graphite_bb): Free GBB_INDEX_TO_NUM_MAP.
3861 (build_graphite_bb): Initialize GBB_INDEX_TO_NUM_MAP.
3862 (graphite_trans_bb_strip_mine): Call create_num_from_index.
3863 (is_interchange_valid): Return false when failing.
3864 * graphite.h (struct num_map): New.
3865 (struct graphite_bb): New field num_map.
3866 (GBB_LOOPS_MAPPING): Renamed GBB_INDEX_TO_NUM_MAP.
3868 2008-07-29 Tobias Grosser <grosser@fim.uni-passau.de>
3870 * graphite.c (dump_gbb_conditions): Print also conditions like
3871 "if (a)". Remove dublicated code and use print_generic_expr ().
3872 (stmt_simple_for_scop_p): Only allow conditions we can handle
3875 2008-07-25 Jan Sjodin <jan.sjodin@amd.com>
3877 * graphite.h (struct scop): Removed new_ivs field.
3878 (SCOP_NEWIVS): Deleted.
3879 * graphite.c (new_scop, free_scop, clast_name_to_gcc,
3880 clast_to_gcc_expression, graphite_create_new_loop):
3881 Removed use of new_ivs.
3883 2008-07-25 Jan Sjodin <jan.sjodin@amd.com>
3885 * graphite.c (debug_oldivs, debug_loop_vec, create_loops_mapping,
3886 create_loops_mapping_num, debug_loop_mapping_1): New.
3887 (debug_loop_mapping): Call debug_loop_mapping_1.
3888 (get_loop_mapping_for_num,
3889 graphite_loops_mapping_add_child,
3890 graphite_loops_mapping_add_child_num,
3891 graphite_loops_mapping_insert_child,
3892 graphite_loops_mapping_parent,
3893 split_loop_mapped_depth_for_num,
3894 loop_mapped_depth_split_loop): New.
3895 (increment_loop_mapped_depths): Removed.
3896 (swap_loop_mapped_depth_for_num): Reimplemented.
3897 (new_scop): Call create_loops_mapping.
3898 (scop_record_loop): Call graphite_loops_mapping_insert_child.
3899 (translate_clast): Pass the old loop father in parameter, and pass
3900 it to get_old_iv_from_ssa_name.
3901 (remove_edges_around_useless_blocks, can_generate_code_stmt,
3902 can_generate_code, can_generate_for_scop): New.
3903 (graphite_trans_bb_block): Returns false when it fails to transform.
3904 * graphite.h (graphite_loop_node, graphite_loops_mapping): New.
3906 2008-07-25 Sebastian Pop <sebastian.pop@amd.com>
3908 Reverted all the changes related to the streamization and
3910 These changes are now tracked in the streamization branch.
3912 2008-07-25 Sebastian Pop <sebastian.pop@amd.com>
3913 Jan Sjodin <jan.sjodin@amd.com>
3915 * graphite.c (gbb_compare): Correctly constify.
3916 (gbb_can_be_ignored): Indent.
3917 (graphite_trans_scop_swap_1and2): Add legality check.
3920 2008-07-25 Sebastian Pop <sebastian.pop@amd.com>
3922 Remove fallouts from "Reverted the Condate changes".
3923 * tree.h: Remove unused decl.
3924 * testsuite/gcc.dg/tree-checker: Same.
3925 * timevar.def: Remove counter.
3927 2008-07-24 Sebastian Pop <sebastian.pop@amd.com>
3929 * Merge from mainline (135673:138072).
3931 Reverted the MIRO changes (from 2008-04-05) that are now
3932 tracked in the miro branch.
3933 * tree-bounds.c: Removed.
3934 * tree-bounds.h: Removed.
3936 Reverted the Condate changes (from 2006-07-04, 2007-03-20) that
3937 are now tracked in the condate branch.
3938 * tree-check.c: Removed.
3939 * tree-match.c: Removed.
3940 * condate.y: Removed.
3942 2008-07-24 Dwarakanath Rajagopal <dwarak.rajagopal@amd.com>
3944 * common.opt: New user flag -floop-block, -floop-strip-mine
3945 and -floop-interchange.
3946 * toplev.c (process_options): Enable -fgraphite pass if any one of the
3947 graphite loop optimization flags is turned on.
3948 * graphite.c (graphite_apply_transformations): Add flag_loop_block,
3949 flag_loop_strip_mine and flag_loop_interchange checks before
3951 * doc/invoke.texi: Remove -fgraphite and add -floop-block,
3952 -floop-strip-mine and -floop-interchange.
3953 * testsuite/gcc.dg/graphite/block-0.c: Add -floop-block and remove
3955 * testsuite/gcc.dg/graphite/scop-16.c: Ditto.
3956 * testsuite/gcc.dg/graphite/scop-17.c: Ditto.
3957 * testsuite/gcc.dg/graphite/scop-18.c: Ditto.
3959 2008-07-23 Jan Sjodin <jan.sjodin@amd.com>
3960 Sebastian Pop <sebastian.pop@amd.com>
3962 * cfgloopmanip.c (update_dominators_in_loop): Make it static.
3963 (create_empty_loop_on_edge): More fixes.
3964 * tree-phinodes.c (resize_phi_node): Extern.
3965 (unlink_phi_node, move_phi_node): New split from remove_phi_node.
3966 * cfghooks.c (update_dominator_information): New split from
3968 * tree-vectorizer.c (rename_variables_in_bb): Extern.
3969 * tree-dfa.c (collect_dfa_stats): Start walking the CFG on the
3970 successor of the function entry block.
3972 * graphite.c: Include pointer-set.h.
3973 (debug_loop_mapping, increment_loop_mapped_depths,
3974 get_loop_mapped_depth_for_num, get_loop_mapped_depth,
3975 set_loop_mapped_depth_for_num, set_loop_mapped_depth,
3976 swap_loop_mapped_depth_for_num, get_num_from_index,
3977 swap_loop_mapped_depth, loop_iv_stack_debug,
3978 loop_iv_stack_push, loop_iv_stack_pop, loop_iv_stack_get_iv,
3979 loop_iv_stack_get_iv_from_name, loop_iv_stack_debug,
3980 get_old_iv_from_ssa_name): New.
3981 (new_scop): Initialize SCOP_LOOPS_MAPPING.
3982 (free_scop): Free SCOP_LOOPS_MAPPING.
3983 (scop_record_loop): Record old ivs.
3984 (create_var_name): Removed.
3985 (initialize_cloog_names): Allocate double space in case strip mine
3986 applies to all loops once.
3987 (clast_name_to_gcc): Look up in the map ivstack passed in parameter.
3988 (clast_to_gcc_expression): Same. Implement more clast to gimple
3990 (graphite_create_new_loop): Pass in ivstack.
3991 (remove_all_edges): Pass in the construction_edge.
3992 (graphite_remove_iv): Removed.
3993 (graphite_rename_ivs, graphite_rename_ivs_stmt,
3994 remove_cond_exprs): Rewritten.
3995 (move_phi_nodes): New.
3996 (disconnect_virtual_phi_nodes, disconnect_cond_expr): Removed.
3997 (translate_clast): Pass in ivstack. Rewrite some cases.
3998 (set_cloog_options, debug_clast_stmt): New.
3999 (find_transform): Use set_cloog_options.
4000 (outermost_loop_layer): Removed.
4001 (get_construction_edge, collect_virtual_phis, find_vdef_for_var_in_bb,
4002 find_vdef_for_var_1, find_vdef_for_var, patch_phis_for_virtual_defs,
4003 mark_old_loops, remove_dead_loops): New.
4005 (graphite_trans_bb_move_loop): Call swap_loop_mapped_depth.
4006 (const_column_index, get_first_matching_sign_row_index,
4007 get_lower_bound_row, get_upper_bound_row, get_lower_bound,
4008 get_upper_bound): New.
4009 (graphite_trans_bb_strip_mine): Also update the iv map.
4011 * graphite.h (graphite_loops_mapping, GBB_LOOPS_MAPPING): New.
4012 (struct name_tree): Add a loop field.
4013 (struct scop): Add a graphite_loops_mapping field.
4014 (SCOP_LOOPS_MAPPING): New.
4015 (debug_clast_stmt): Declare.
4016 * lambda.h (find_induction_var_from_exit_cond): Declare.
4017 (lambda-code.c): (find_induction_var_from_exit_cond): Extern.
4018 * cfgloop.h (update_dominators_in_loop): Removed declaration.
4019 (create_empty_loop_on_edge): Updated.
4020 * tree-flow.h (remove_bb, resize_phi_node, move_phi_node,
4021 rename_variables_in_bb): Declare.
4022 * tree-cfg.c (remove_bb): Extern.
4024 * testsuite/gcc.dg/graphite/block-0.c: New.
4026 2008-07-21 Dwarakanath Rajagopal <dwarak.rajagopal@amd.com>
4027 Sebastian Pop <sebastian.pop@amd.com>
4029 * graphite.c (strip_mine_profitable_p): New.
4030 (graphite_trans_bb_block): Disable strip mining if not profitable.
4032 * testsuite/gcc.dg/graphite/scop-18.c: New.
4033 * testsuite/gcc.dg/graphite/scop-17.c: Fixed.
4034 * testsuite/gcc.dg/graphite/scop-16.c: Fixed.
4036 2008-07-17 Harsha Jagasia <harsha.jagasia@amd.com>
4037 Jan Sjodin <jan.sjodin@amd.com>
4038 Sebastian Pop <sebastian.pop@amd.com>
4040 * graphite.c (is_interchange_valid): New.
4041 (graphite_trans_bb_block): Check loop nest of basic block for legality
4044 * graphite.h (gbb_inner_most_loop_index, outer_most_loop_1,
4045 outer_most_loop, gbb_outer_most_loop_index): New.
4047 * tree-loop-linear.c (perfect_loop_nest_depth): Remove static.
4048 * tree-flow.h (perfect_loop_nest_depth): Declare as extern.
4049 * testsuite/gcc.dg/graphite/scop-16.c: New.
4050 * testsuite/gcc.dg/graphite/scop-17.c: New.
4052 2008-07-11 Tobias Grosser <grosser@fim.uni-passau.de>
4054 * graphite.c (scop_remove_ignoreable_gbbs): Also update bitmap.
4055 (graphite_trans_scop_block): Ignore SCoPs without bbs.
4057 2008-07-11 Tobias Grosser <grosser@fim.uni-passau.de>
4059 * graphite.c (new_scop): Initialize SCOP_EXIT.
4060 (scopdet_info): Add.
4061 (scopdet_bb_info): Rename from is_bb_addable. Cleanup, bugfixes.
4062 (build_scops_1): Cleanup, bugfixes.
4063 (build_scops): Cleanup.
4065 * testsuite/gcc.dg/graphite/scop-matmult.c: Remove duplicated code.
4066 * testsuite/gcc.dg/graphite/scop-15.c: Add SCoP numbers.
4068 2008-07-10 Harsha Jagasia <harsha.jagasia@amd.com>
4070 * testsuite/gfortran.dg/graphite/scop-1.f: Update to reduced test case.
4072 * testsuite/gfortran.dg/graphite/graphite.exp: Use
4073 DEFAULT_GRAPHITE_FLAGS.
4075 * testsuite/gcc.dg/graphite/scop-15.c: Update to reduced test case.
4077 2008-07-10 Harsha Jagasia <harsha.jagasia@amd.com>
4079 * graphite.c (scan_tree_for_params): Do not assert any more if
4080 MULT_EXPR parameter is negative.
4082 * testsuite/gfortran.dg/graphite/scop-1.f: New.
4084 * testsuite/gfortran.dg/graphite/graphite.exp: New.
4086 * testsuite/gcc.dg/graphite/scop-15.c: New.
4088 2008-07-10 Harsha Jagasia <harsha.jagasia@amd.com>
4090 * graphite.c (is_bb_addable): Fix segfault in spec gzip and reformat.
4092 2008-07-10 Tobias Grosser <grosser@fim.uni-passau.de>
4094 * graphite.c (graphite_trans_bb_swap_loops): Rename from
4095 graphite_swap_loops.
4096 (graphite_trans_bb_move_loop): New.
4097 (graphite_trans_bb_strip_mine): Rename from graphite_strip_mine_loop.
4098 (graphite_trans_bb_block): New.
4099 (graphite_trans_loop_block): New.
4100 (graphite_trans_scop_swap_1and2): Rename from
4101 graphite_trans_swap_1and2.
4102 (graphite_trans_scop_strip): Rename from graphite_trans_strip.
4103 (graphite_trans_scop_block): New.
4104 (graphite_apply_transformations): Rename from
4105 graphite_transformations.
4107 * testsuite/gcc.dg/graphite/scop-matmult.c: New.
4109 2008-07-10 Tobias Grosser <grosser@fim.uni-passau.de>
4111 * graphite.c (gbb_compare): New.
4112 (graphite_sort_gbbs): New.
4113 (gbb_can_be_ignored): New.
4114 (scop_remove_ignoreable_gbbs): New.
4115 (graphite_transformations): Cleanup and add
4116 scop_remove_ignoreable_gbbs.
4117 * lambda.h (lambda_vector_compare): New.
4119 2008-07-09 Tobias Grosser <grosser@fim.uni-passau.de>
4121 * graphite.c (print_graphite_bb): Correct printing of static schedule.
4122 (graphite_swap_loops): int -> unsigned
4123 (graphite_strip_mine_loop): int -> unsigned, Fix SCHEDULE
4124 (graphite_transformations): New.
4125 (graphite_transform_loops): Move to graphite_transformations.
4126 * graphite.h (gbb_nb_loops): Return unsigned.
4128 2008-07-04 Tobias Grosser <grosser@fim.uni-passau.de>
4130 * graphite.c (scan_tree_for_params): Fix insertion of parameters into
4131 the domain matrix. This makes scop-0.c work again.
4133 2008-06-20 Richard Guenther <rguenther@suse.de>
4135 * graphite.h: Adjust copyright to GPLv3.
4136 * graphite.c: Likewise.
4137 (stmt_simple_memref_for_scop_p): Split out from ...
4138 (stmt_simple_for_scop_p): ... here. Fix handling of calls
4140 (get_bb_type): Optimize.
4142 (is_bb_addable): Fix memleak, replace is_pred call with
4144 (build_scops): Use current_loops.
4145 (param_index): Fix memleak.
4147 2008-06-20 Konrad Trifunovic <konrad.trifunovic@inria.fr>
4149 * graphite.c: Fix formatting.
4151 2008-06-19 Konrad Trifunovic <konrad.trifunovic@inria.fr>
4153 * graphite.c (new_scop): Memory allocation for SCOP_{NEWIVS, OLDIVS}.
4154 (free_scop): Memory deallocation for SCOP_NEWIVS, SCOP_OLDIVS.
4155 (create_var_name, save_var_name): Newly defined functions.
4156 (initialize_cloog_names): Part of the code factored out to
4158 (clast_to_gcc_expression): Now handles the case of clast_red_sum
4159 in clast_reduction statement.
4160 (graphite_create_new_loop): Now takes a new parameter
4162 (translate_clast): Now also takes the context_loop and bb_exit
4163 parameters. Rewritten the code so that it creates a gimple code
4164 inside the given context.
4165 (outermost_loop_layer, graphite_remove_iv, graphite_rename_ivs,
4166 remove_cond_expr, disconnect_cond_expr,
4167 disconnect_virtual_phi_nodes): Newly defined functions.
4168 * graphite.h (struct scop): added old_ivs vector.
4169 SCOP_OLDIVS: New macro.
4171 2008-06-19 Sebastian Pop <sebastian.pop@amd.com>
4173 * cfgloopmanip.c: Add missing function comments, fix formatting.
4175 2008-06-18 Konrad Trifunovic <konrad.trifunovic@inria.fr>
4177 * cfgloopmanip.c (update_dominators_in_loop): Defined.
4178 (create_empty_loop_on_edge): Defined.
4179 * tree-parloops.c (canonicalize_loop_ivs): Returns tree
4181 * cfgloop.h (create_empty_loop_on_edge): Declared as extern.
4182 (update_dominators_in_loop): Declared as extern
4183 * tree-flow.h (canonicalize_loop_ivs): Declared as extern.
4185 2008-06-16 Tobias Grosser <grosser@fim.uni-passau.de>
4187 * graphite.c (print_graphite_bb): Allow changing number of loops
4189 (initialize_cloog_names): Allow changing number of loops.
4190 (build_cloog_prog): Simplify.
4191 (find_transform): Enable cloog option --strides.
4192 (graphite_swap_loops): New.
4193 (graphite_strip_mine_loop): New.
4194 (graphite_trans_swap_1and2): New.
4195 (graphite_trans_strip): New.
4196 (graphite_transform_loops): Add graphite_trans_strip.
4197 * graphite.h (scop_max_loop_depth): New.
4199 2008-06-15 Tobias Grosser <grosser@fim.uni-passau.de>
4201 * graphite.c (build_scop_iteration_domain): Remove forgotten
4202 line. (Fixes compile)
4204 2008-06-15 Tobias Grosser <grosser@fim.uni-passau.de>
4206 * graphite.c (print_graphite_bb): Add output of GBB_LOOPS.
4207 (build_graphite_bb): Add GBB_LOOPS and GBB_DOMAIN and reorder.
4208 (build_bb_loops): New.
4209 (graphite_transform_loops): Add build_bb_loops.
4210 (schedule_to_scattering): Use gbb_nb_loops to support changing loop
4212 * graphite.h (graphite_bb): Add loops.
4213 (gbb_nb_loops): New.
4214 (gbb_loop_at_index): New.
4215 (gbb_loop_index): New.
4216 (nb_params_in_scop): Renamed to scop_nb_params. Updated all functions
4217 using nb_params_in_scop.
4219 2008-06-14 Tobias Grosser <grosser@fim.uni-passau.de>
4221 * graphite.c (print_graphite_bb): Adapt to minimized schedule.
4222 (build_scop_canonical_schedules): Build minimized schedule.
4223 (schedule_to_scattering): Adapt to minimized schedule.
4224 * graphite.h (graphite_bb): Add/Update descriptions.
4226 2008-06-14 Adrien Eliche <aeliche@isty.uvsq.fr>
4227 Tobias Grosser <grosser@fim.uni-passau.de>
4229 * graphite.c (print_graphite_bb): Add condition printing.
4231 (dump_gbb_conditions): New.
4232 (build_scop_conditions_1): New.
4233 (build_scop_conditions): New.
4234 * graphite.h (graphite_bb): Add conditions.
4236 2008-06-14 Tobias Grosser <grosser@fim.uni-passau.de>
4238 * graphite.c (print_graphite_bb):
4239 (free_graphite_bb): New.
4240 (free_scop): Free bbs.
4241 (get_bb_type): Free doms.
4242 (build_scop_context): Free context matrix.
4243 (build_loop_iteration_domains): Remove unused code.
4244 (build_cloog_prog): Free scattering function and blocklist.
4245 (find_transform): Free options.
4247 2008-06-13 Tobias Grosser <grosser@fim.uni-passau.de>
4249 * graphite.c (loop_body_to_cloog_stmts): Rename to add_bb_domains.
4250 Remove unnecessery cloog data structures. Make a copy of the domain
4251 (setup_cloog_loop): Rename to build_loop_iteration_domains. Remove
4252 unnecessary cloog data structures. Fix memory leaks. Remove insert
4253 into SCOP_LOOP2CLOOG_LOOP as the inserted CloogLoops will never be
4255 (build_scop_iteration_domain): Remove unnecessary cloog
4256 data structures. Fix memory leaks.
4257 (graphite_transform_loops): Disable build_scop_dynamic_schedules as it
4258 uses SCOP_LOOP2CLOOG_LOOP, that is at the moment not working.
4260 2008-06-12 Tobias Grosser <grosser@fim.uni-passau.de>
4262 * graphite.c (find_scop_params): Remove initialize_cloog_names.
4264 2008-06-12 Tobias Grosser <grosser@fim.uni-passau.de>
4266 * graphite.c (end_scop): Style fix.
4267 (schedule_to_scattering): Style and comment fix.
4269 2008-06-12 Tobias Grosser <grosser@fim.uni-passau.de>
4270 * graphite.c (print_graphite_bb): Fix definiton of
4271 schedule_to_scattering.
4272 (initialize_cloog_names): Change nb_scattdims to max loop
4274 (schedule_to_scattering): Take parameter for number of scattering
4276 (build_cloog_prog): Only build as much scattering dimensions as
4279 2008-06-12 Tobias Grosser <grosser@fim.uni-passau.de>
4281 * graphite.c (end_scop): Disable bb splitting. Fixes SIGSEGV
4282 in polyhedron/aermod.f90.
4284 2008-06-11 Tobias Grosser <grosser@fim.uni-passau.de>
4285 Dwarak Rajagopal <dwarak.rajagopal@amd.com>
4286 Harsha Jagasia <harsha.jagasia@amd.com>
4288 * graphite.c (is_bb_addable): Fix segfault.
4290 2008-06-10 Tobias Grosser <grosser@fim.uni-passau.de>
4292 * graphite.c (is_bb_addable): Fix memory leak, handling of loops
4293 with multiple exits and conditional handling in edge cases.
4294 (is_loop_exit): Fix memory leak. (Forgotten in last commit)
4296 * testsuite/gcc.dg/graphite/scop-14.c: New.
4298 2008-06-06 Tobias Grosser <grosser@fim.uni-passau.de>
4299 Adrien Eliche <aeliche@isty.uvsq.fr>
4301 * graphite.c (is_bb_addable): Add more comments and enhance
4302 readablity of the source code. Fix memory leak.
4303 (is_loop_exit): Fix memory leak.
4305 2008-06-05 Tobias Grosser <grosser@fim.uni-passau.de>
4307 * graphite.c (first_loop_in_scop): Deleted.
4308 (setup_cloog_loop): Only walk the loop chain for inner loops.
4309 (build_scop_iteration_domain): Execute setup_cloog_loop for
4310 all loops in the first layer.
4312 2008-06-05 Tobias Grosser <grosser@fim.uni-passau.de>
4314 * graphite.c (scan_tree_for_params): Change the way params are
4315 added to be indepenent of the number of loops.
4316 (setup_cloog_loop): Revert to short matrix format. Fix parameter
4318 (build_cloog_prog): Revert to short matrix format.
4320 2008-06-05 Sebastian Pop <sebastian.pop@amd.com>
4321 Dwarak Rajagopal <dwarak.rajagopal@amd.com>
4323 * tree-loop-fusion.c (fuse_loops): Fix uninitialized variable
4326 2008-06-05 Sebastian Pop <sebastian.pop@amd.com>
4328 * graphite.c (nb_data_refs_in_scop): New.
4329 (graphite_transform_loops): Print more stats: number of
4330 loops, basic blocks and data references per scop.
4332 2008-06-04 Sebastian Pop <sebastian.pop@amd.com>
4333 Jan Sjodin <jan.sjodin@amd.com>
4335 * graphite.c (loop_affine_expr, idx_record_params,
4336 find_scop_parameters, setup_cloog_loop): Use instantiate_scev
4337 instead of instantiate_parameters.
4339 2008-06-04 Tobias Grosser <grosser@fim.uni-passau.de>
4341 * graphite.c (schedule_to_scattering): Fix scattering dimensions,
4342 add support for parameters, add STATIC_SCHEDULE at the right places,
4345 2008-06-04 Tobias Grosser <grosser@fim.uni-passau.de>
4347 * graphite.c (build_scop_loop_nests): Only add the loops, that
4348 are contained completely in the SCoP.
4349 (build_cloog_prog): Disable scattering, until schedule_to_scattering
4350 and the domains are fixed.
4351 (build_scop_canonical_schedules): Add support for bbs not contained
4354 2008-06-04 Tobias Grosser <grosser@fim.uni-passau.de>
4356 * graphite.h (scop_contains_loop): Update comments to match
4357 the actual behavior.
4358 (scop_contains_loop): New.
4359 * graphite.c (schedule_to_scattering): Use scop_contains_loop.
4361 2008-06-04 Sebastian Pop <sebastian.pop@amd.com>
4363 * graphite.c (get_bb_type): On function body, i.e. loop_0,
4364 don't mark blocks as GBB_LOOP_SING_EXIT_HEADER, mark them
4367 2008-06-04 Sebastian Pop <sebastian.pop@amd.com>
4368 Tobias Grosser <grosser@fim.uni-passau.de>
4370 * graphite.c (graphite_transform_loops): Early return when
4371 there are no loops in the function.
4373 2008-05-31 Sebastian Pop <sebastian.pop@amd.com>
4374 Jan Sjodin <jan.sjodin@amd.com>
4376 * graphite.c (scan_tree_for_params, setup_cloog_loop): Compute the
4377 offset of the last loop.
4378 (setup_cloog_loop): Copy the entire outer constraint matrix.
4380 2008-05-31 Sebastian Pop <sebastian.pop@amd.com>
4381 Jan Sjodin <jan.sjodin@amd.com>
4383 * graphite.c (stmt_in_scop_p, function_parameter_p,
4384 invariant_in_scop_p): Removed.
4385 (scan_tree_for_params): Can be used with no constraint
4386 matrix for gathering parameters.
4387 (idx_record_params): Don't use idx_record_param, instead use
4388 scan_tree_for_params.
4389 (find_scop_parameters): Same.
4390 (setup_cloog_loop, build_scop_iteration_domain, build_cloog_prog):
4391 Fix the size of loop domains.
4392 (schedule_to_scattering): Exit when the outer loop is not in scop.
4393 (find_transform): Enable build_cloog_prog.
4395 2008-05-31 Sebastian Pop <sebastian.pop@amd.com>
4396 Jan Sjodin <jan.sjodin@amd.com>
4398 * graphite.c (schedule_to_scattering): Make scattering domains
4399 uniformly of the same size, as required by CLooG 0.14.0 and before.
4401 2008-05-31 Sebastian Pop <sebastian.pop@amd.com>
4402 Jan Sjodin <jan.sjodin@amd.com>
4404 * graphite.c (schedule_to_scattering): Rewrite, correct the
4405 translation of the scheduling function to scattering.
4406 (build_cloog_prog): Call schedule_to_scattering only once.
4407 * graphite.h (scop_loop_index): Do not fail for loops not
4408 in the scop: return -1.
4410 2008-05-30 Tobias Grosser <grosser@fim.uni-passau.de>
4412 * graphite.c (build_graphite_bb): Initialize GBB_DOMAIN.
4413 (loop_body_to_cloog_stmts): Export GBB_DOMAIN.
4414 (setup_cloog_loop): Export GBB_DOMAIN.
4415 (build_cloog_prog): New. Create new CLOOG_PROG, which should be
4416 able to rebuild the original control flow.
4417 * graphite.h (graphite_bb): Add domain field and access macro.
4420 2008-05-30 Sebastian Pop <sebastian.pop@amd.com>
4422 * graphite.c (debug_gbb): New.
4423 (print_scop, build_graphite_bb): Use SCOP_BBS.
4424 (build_scop_bbs): Reimplemented.
4425 (dfs_bb_in_scop_p): Removed.
4426 (build_scop_loop_nests): Reorder loops inserted in
4427 SCOP_LOOP_NEST: outer loops should come first.
4428 (build_scop_canonical_schedules): Reinitialize at zero
4429 the components of the SCOP_STATIC_SCHEDULE for the loops
4430 that have already been parsed.
4432 * graphite.h (debug_gbb): Declared.
4434 2008-05-30 Sebastian Pop <sebastian.pop@amd.com>
4435 Jan Sjodin <jan.sjodin@amd.com>
4437 * graphite.c (create_empty_loop): Renamed graphite_create_new_loop.
4438 (graphite_loop_to_gcc_loop): Removed.
4439 (remove_all_edges): New.
4440 (graphite_stmt_to_gcc_stmt): Renamed translate_clast.
4441 (gloog): Remove useless code.
4443 2008-05-29 Tobias Grosser <grosser@fim.uni-passau.de>
4445 * graphite.c (get_bb_type): Reworked. We distinguish between
4446 loops with one or multiple exits.
4447 (is_loop_exit): New.
4449 (is_bb_addable): Rework condition handling, now support for case
4450 case statements and loops with multiple exits.
4452 * testsuite/gcc.dg/graphite/scop-11.c: New.
4453 * testsuite/gcc.dg/graphite/scop-12.c: New.
4454 * testsuite/gcc.dg/graphite/scop-13.c: New.
4456 2008-05-29 Tobias Grosser <grosser@fim.uni-passau.de>
4458 * graphite.c (dot_all_scops_1): Fix some colors. Reuse colors, if
4459 we have too many colors.
4461 2008-05-22 Sandeep Maram <smaram_b04@iiita.ac.in>
4463 * doc/invoke.texi (-ftree-loop-fusion): Document.
4464 * tree-pass.h (pass_loop_fusion): Declared.
4465 * tree-loop-fusion.c: New.
4466 * timevar.def (TV_TREE_LOOP_FUSION): Declared.
4467 * tree-data-ref.c (find_data_references_in_loop): Make extern.
4468 * tree-data-ref.h (find_data_references_in_loop): Declared.
4469 * common.opt (ftree-loop-fusion): Declared.
4470 * Makefile.in (tree-loop-fusion.o): Added rule and to OBJS-common.
4472 2008-05-21 Sebastian Pop <sebastian.pop@amd.com>
4474 * graphite.c (build_access_matrix): Fix typo from the merge.
4476 2008-05-20 Sebastian Pop <sebastian.pop@amd.com>
4478 * Merge from mainline (130800:135673).
4480 2008-05-07 Sebastian Pop <sebastian.pop@amd.com>
4482 * graphite.c (end_scop): The exit of the scop is not part of the scop.
4483 Update dominators after splitting.
4485 2008-05-07 Sebastian Pop <sebastian.pop@amd.com>
4487 * graphite.c (is_bb_addable): Return the harmful statement.
4488 Factor up some code.
4489 (end_scop): New. Splits end of scope bbs on a harmful statement.
4490 (build_scops_1): Call end_scop.
4492 2008-05-07 Sebastian Pop <sebastian.pop@amd.com>
4494 * graphite.c: (succs_at_same_depth, end_scop, all_preds_visited_p,
4495 all_succs_visited_p, start_new_scop_for_each_succ, start_new_scop,
4496 add_dominators_to_open_scops, stop_last_open_scop, scop_end_loop,
4497 build_scops_1): Removed.
4498 (build_scops_2): Renamed build_scops_1.
4500 2008-05-06 Sebastian Pop <sebastian.pop@amd.com>
4502 * graphite.c: Fix formatting.
4504 2008-05-06 Tobias Grosser <grosser@fim.uni-passau.de>
4506 * graphite.c (get_bb_type): New.
4508 (build_scops_2): New.
4509 (is_bb_addable): New.
4510 (build_scops): Switch the scop detection.
4511 (build_scop_bbs): Add entry bb to scop.
4512 * graphite.h (struct scop): Update comment.
4514 2008-05-06 Tobias Grosser <grosser@fim.uni-passau.de>
4516 * graphite.c (dot_all_scops_1): Fix some incorrect colors and add
4519 2008-05-06 Tobias Grosser <grosser@fim.uni-passau.de>
4521 * testsuite/gcc.dg/graphite/scop-1.c: Update.
4522 * testsuite/gcc.dg/graphite/scop-2.c: Update.
4523 * testsuite/gcc.dg/graphite/scop-4.c: Update.
4524 * testsuite/gcc.dg/graphite/scop-5.c: Add.
4525 * testsuite/gcc.dg/graphite/scop-6.c: Add.
4527 2008-05-06 Sebastian Pop <sebastian.pop@amd.com>
4529 * testsuite/gcc.dg/graphite/scop-0.c: Add.
4530 * testsuite/gcc.dg/graphite/scop-7.c: Add.
4531 * testsuite/gcc.dg/graphite/scop-8.c: Add.
4532 * testsuite/gcc.dg/graphite/scop-9.c: Add.
4533 * testsuite/gcc.dg/graphite/scop-10.c: Add.
4535 2008-05-06 Tobias Grosser <grosser@fim.uni-passau.de>
4537 * graphite.c (scop_affine_expr): Renamed to loop_affine_expr.
4538 Check affine expressions depending on the outermost loop
4540 (stmt_simple_for_scop_p): Same.
4541 (harmfule_stmt_in_scop): Same.
4543 2008-04-28 Tobias Grosser <grosser@fim.uni-passau.de>
4545 * graphite.c (dot_all_scops): Remove incorrect difficult bb coloring,
4546 mark entry and exit, that are not part of the SCoP and update HTML
4549 2008-04-25 Sebastian Pop <sebastian.pop@amd.com>
4551 * graphite.c (basic_block_simple_for_scop_p): Renamed
4553 (save_scop, preds_at_same_depth, test_for_scop_bound): Removed.
4554 (add_dominators_to_open_scops, build_scops_1): Reimplemented.
4555 (all_preds_visited_p, all_succs_visited_p,
4556 start_new_scop_for_each_succ, start_new_scop, stop_last_open_scop,
4557 scop_end_loop): New.
4558 (build_scops): Do not use dfs_enumerate_from.
4560 * testsuite/gcc.dg/graphite/scop-{1,2,4}.c: Updated.
4562 2008-04-23 Sebastian Pop <sebastian.pop@amd.com>
4564 * graphite.c: Add comments to functions that are missing a
4566 (graphite_create_iv): Removed. Merged in graphite_loop_to_gcc_loop.
4568 2008-04-23 Sebastian Pop <sebastian.pop@amd.com>
4570 * graphite.c (nb_params_in_scop): Moved...
4571 (graphite_bb_from_bb, loop_body_to_cloog_stmts): New.
4572 (setup_cloog_loop): Call loop_body_to_cloog_stmts.
4573 (clast_to_gcc_expression): Reduce column size to less than 80.
4574 (graphite_create_iv): Return the new name of the IV.
4575 (find_transform): Set options->esp and options->cpp.
4576 (gloog): Comment out the invalidation of the old loop code.
4577 (initialize_dependence_polyhedron): Replace scop_nb_params with
4580 * graphite.h (nb_params_in_scop): ... here.
4581 (scop_nb_params): Removed.
4582 (loop_domain_dim): Return something even when the loop was not
4583 found in the hash table: avoid ICEing on all the graphite.exp
4586 2008-04-14 Konrad Trifunovic <konrad.trifunovic@inria.fr>
4588 * tree-chrec.c (for_each_scev_op): SCEV can have 3 operands.
4590 * graphite.c (build_scop_dynamic_schedules): Schedule is built
4591 according to nesting level.
4592 (find_scop_parameters): Call instantiate_parameters.
4593 (scan_tree_for_params): Extend it to handle general affine bounds.
4594 Inner loop bound can depend on outer loop induction variable.
4595 (setup_cloog_loop): tmp variable is allocated on stack. Call
4596 instantiate_parameters with respect to outermost_loop_in_scop.
4597 (loop_domain_dim, ref_nb_loops, loop_iteration_vector_dim): moved to
4599 (create_empty_loop): Function loopify should be given edge
4600 probability, instead of edge frequency. Dominance relation from
4601 switch_bb to loop_header.
4602 (clast_to_gcc_expression): Added handling of clast_reduction node.
4603 (gloog): New functionality for removing old loop.
4604 (test_dependence): Factored out from build_rdg_all_levels.
4605 (build_rdg_all_levels): Dependence testing factored out to
4606 test_dependence function.
4608 * graphite.h (struct graphite_bb): Extended with dynamic_schedule.
4609 (loop_domain_dim, ref_nb_loops, loop_iteration_vector_dim): Moved
4612 2008-04-07 Sebastian Pop <sebastian.pop@amd.com>
4614 * graphite.c (free_scop, param_index, initialize_cloog_names,
4615 nb_params_in_scop): Use name_tree map instead of just a tree
4616 for keeping track of the variable name associated to that tree.
4617 (create_empty_loop, gmp_cst_to_tree, clast_name_to_gcc,
4618 clast_to_gcc_expression, graphite_create_iv,
4619 graphite_loop_to_gcc_loop, graphite_cond_to_gcc_cond,
4620 graphite_stmt_to_gcc_stmt): New.
4621 (gloog): Call these.
4622 * graphite.h (struct name_tree): New.
4623 (struct scop): Use name_tree instead of tree for params.
4624 Store a vector of name_tree for new_ivs.
4626 (scop_nb_params): Use name_tree instead of tree.
4628 2008-04-05 Alexander Lamaison <awl03@doc.ic.ac.uk>
4629 Sebastian Pop <sebastian.pop@amd.com>
4631 * tree-bounds.c: New.
4632 * tree-bounds.h: New.
4633 * tree-pass.h: Declare pass_bounds_early and pass_bounds_late.
4634 * passes.c: Schedule pass_bounds_early, pass_bounds_late.
4635 * builtins.c (expand_builtin_alloca): Add flag_bounds as for
4639 * c-cppbuiltin.c: Same.
4643 * tree-outof-ssa.c: Same.
4645 * Makefile.in: Same.
4647 2008-03-15 Antoniu Pop <antoniu.pop@gmail.com>
4648 Sebastian Pop <sebastian.pop@amd.com>
4650 * tree-loop-distribution.c (remaining_stmts,
4651 upstream_mem_writes): Removed static variables.
4652 (copy_loop_before, create_bb_after_loop,
4653 mark_nodes_having_upstream_mem_writes, free_rdg_components,
4654 rdg_build_components, rdg_build_partitions,
4655 dump_rdg_partitions): Extern.
4656 (generate_loops_for_partition, generate_code_for_partition): Do not
4658 (already_processed_vertex_p, predecessor_has_mem_write,
4659 mark_nodes_having_upstream_mem_writes, has_upstream_mem_writes,
4660 rdg_flag_all_uses, rdg_flag_uses, rdg_flag_vertex_and_dependent,
4661 rdg_flag_loop_exits, rdg_flag_similar_memory_accesses,
4662 build_rdg_partition_for_component, rdg_build_partitions, ldist_gen):
4663 Pass remaining_stmts and upstream_mem_writes as parameters.
4664 (rdg_component): Moved...
4665 (build_rdg_partition_for_component): Do not aggregate components when
4666 flag_streamize_loops is set.
4667 (gen_sequential_loops): New.
4668 (ldist_gen): Call gen_sequential_loops.
4670 * tree-pass.h (pass_loop_streamization): Declared.
4672 * omp-low.c (expand_omp_sections): Call add_bb_to_loop on created
4673 basic blocks when loops structures exist.
4675 * builtin-types.def (BT_FN_VOID_PTR_PTR_INT): New.
4677 * tree-ssa-loop-ivopts.c (expr_invariant_in_region_p): New.
4679 * tree-parloops.c (take_address_of, eliminate_local_variables_1,
4680 eliminate_local_variables_stmt, eliminate_local_variables,
4681 separate_decls_in_loop_name, separate_decls_in_loop_stmt,
4682 separate_decls_in_loop, gen_parallel_loop): Make them work on a region
4683 of code delimited by two edges in the CFG.
4684 (separate_decls_in_loop_name): Renamed separate_decls_in_region_name.
4685 (separate_decls_in_loop_stmt): Renamed separate_decls_in_region_stmt.
4686 (separate_decls_in_loop): Renamed separate_decls_in_region. Isolate
4687 the case of parallelisation of reductions.
4688 (create_loop_fn): Extern.
4689 (create_omp_parallel_region): New.
4691 * tree-data-ref.c (dump_data_dependence_relation): Don't call
4692 dump_data_reference for printing dra and drb.
4693 (create_rdg_edge_for_ddr, create_rdg_edges_for_scalar): Initialise
4695 (build_rdg): Don't call free_dependence_relations for the moment, as
4696 we attach dependence relations on each edge of the RDG.
4699 * tree-data-ref.h (rdg_component): ...here.
4700 (struct rdg_edge): New field ddr_p relation.
4701 (RDGE_RELATION): New.
4702 (create_bb_after_loop, copy_loop_before,
4703 mark_nodes_having_upstream_mem_writes, rdg_build_components,
4704 rdg_build_partitions, dump_rdg_partitions,
4705 free_rdg_components): Declared.
4707 * omp-builtins.def (BUILT_IN_GOMP_STREAM_ALIGN_PUSH,
4708 BUILT_IN_GOMP_STREAM_ALIGN_POP): New.
4710 * tree-loop-streamization.c: New.
4712 * tree-flow.h (gather_blocks_in_sese_region, create_loop_fn,
4713 create_omp_parallel_region, expr_invariant_in_region_p): Declared.
4715 * Makefile.in (tree-loop-streamization.o): Added to OBJS-common.
4717 * tree-cfg.c (gather_blocks_in_sese_region): Extern.
4719 * passes.c: Schedule pass_loop_streamization.
4721 2008-03-08 Tobias Grosser <grosser@fmi.uni-passau.de>
4723 * graphite.c (dot_all_scops_1): Fix formatting for difficult bbs and
4726 2008-03-07 Tobias Grosser <grosser@fim.uni-passau.de>
4728 * graphite.c (dot_all_scops): Update formatting.
4729 Bbs can now be part of more than one SCoP.
4731 2008-03-04 Sebastian Pop <sebastian.pop@amd.com>
4733 * graphite.c (new_loop_to_cloog_loop_str, setup_cloog_loop): Fix
4735 (loop_domain_dim): Check for unregistered toplev SCOP loop.
4736 * graphite.h (loop_to_cloog_loop): New.
4738 2008-03-04 Konrad Trifunovic <konrad.trifunovic@inria.fr>
4740 * graphite.c (loop_domain_dim, ref_nb_loops,
4741 loop_iteration_vector_dim): New.
4742 (build_access_matrix_with_af, build_access_matrix,
4743 initialize_dependence_polyhedron): Fixed for new matrix layout.
4744 No longer assume that all iteration domains are of the same
4747 2008-03-02 Sebastian Pop <sebastian.pop@amd.com>
4749 * tree-scalar-evolution.c (instantiate_parameters_1): An SSA_NAME
4750 defined in a loop at depth 0 is invariant.
4751 * tree-chrec.c (evolution_function_is_invariant_rec_p): Ditto.
4752 * tree-ssa-loop-ivopts.c (expr_invariant_in_loop_p): Should never
4753 be called at loop depth 0.
4755 * graphite.c (basic_block_simple_for_scop_p): Take the scop as
4757 (dot_all_scops_1): Update use of basic_block_simple_for_scop_p.
4758 (down_open_scop): Removed.
4759 (loop_in_scop_p): Redefined.
4760 (scop_affine_expr): New argument: scop.
4761 (stmt_simple_for_scop_p): New argument: scop. RETURN_EXPR is not
4762 a harmful statement ending a scop.
4763 (basic_block_simple_for_scop_p): New argument: scop.
4764 (get_loop_start): Removed.
4765 (new_scop): Initialize SCOP_LOOPS.
4766 (free_scop): Free SCOP_LOOPS.
4767 (succs_at_same_depth, preds_at_same_depth): New.
4768 (end_scop): Test the validity of a scop.
4769 (add_dominators_to_open_scops): New.
4770 (test_for_scop_bound): Call add_dominators_to_open_scops.
4771 Add cases for opening and closing multiple scops.
4772 (build_scops, build_scop_bbs): Iterate over basic blocks in
4774 (build_graphite_bb): Pass scop directly.
4775 (dfs_bb_in_scop_p): New.
4776 (scop_record_loop): Use SCOP_LOOPS for not recording the same loop
4778 (nb_loops_around_gb): Use loop_in_scop_p.
4779 (schedule_to_scattering): Disabled for the moment the code computing
4780 the "textual order for outer loop".
4782 * graphite.h (struct scop): New field loops.
4784 (scop_loop_index): Test that the given loop belongs to SCOP_LOOPS.
4786 * testsuite/gcc.dg/graphite/scop-{1,...,7}.c: Updated.
4788 2008-02-27 Antoniu Pop <antoniu.pop@gmail.com>
4789 Sebastian Pop <sebastian.pop@amd.com>
4791 * builtin-types.def (BT_FN_PTR_SIZE_UINT, BT_FN_BOOL_PTR): New.
4792 * common.opt (fstreamize-loops): New.
4793 * omp-builtins.def (BUILT_IN_GOMP_STREAM_CREATE,
4794 BUILT_IN_GOMP_STREAM_PUSH, BUILT_IN_GOMP_STREAM_HEAD,
4795 BUILT_IN_GOMP_STREAM_POP, BUILT_IN_GOMP_STREAM_EOS_P,
4796 BUILT_IN_GOMP_STREAM_SET_EOS, BUILT_IN_GOMP_STREAM_DESTROY): New.
4798 2008-02-22 Konrad Trifunovic <konrad.trifunovic@inria.fr>
4800 * tree-data-ref.c (build_empty_rdg): New.
4801 (build_rdg): Use it.
4802 * tree-data-ref.h (build_empty_rdg): Declared.
4803 * graphite.c (free_scop): Free SCOP_LOOP2CLOOG_LOOP.
4804 (find_vertex_for_stmt): Removed.
4805 (build_rdg_all_levels): Use build_empty_rdg and rdg_vertex_for_stmt.
4807 2008-02-21 Sebastian Pop <sebastian.pop@amd.com>
4809 * tree-loop-distribution.c (generate_builtin): After cancelling the
4810 loop tree, also delete basic blocks.
4811 (rdg_flag_uses): Stop recursion when a vertex has already been
4814 2008-02-15 Konrad Trifunovic <konrad.trifunovic@inria.fr>
4816 * graphite.c (build_scop_alpha): Removed.
4817 (graphite_transform_loops): Add a dummy call to build_all_rdg_levels
4818 and dump_dependence_graph to avoid compiler warnings.
4820 2008-02-14 Konrad Trifunovic <konrad.trifunovic@inria.fr>
4822 * tree-data-ref.c (dr_may_alias_p, create_rdg_vertices): Extern.
4823 * tree-data-ref.h (dr_may_alias_p, create_rdg_vertices): Declared.
4824 * graphite.c (new_loop_to_cloog_loop_str, hash_loop_to_cloog_loop,
4825 eq_loop_to_cloog_loop, del_loop_to_cloog_loop): New.
4826 (new_scop, setup_cloog_loop): Initialize SCOP_LOOP2CLOOG_LOOP.
4827 (initialize_dependence_polyhedron, find_vertex_for_stmt,
4828 initialize_data_dependence_polyhedron, is_empty_polyhedron,
4829 statement_precedes_p, build_rdg_all_levels, build_scop_alpha,
4830 dump_dependence_graph): New.
4831 * graphite.h (struct graphite_bb): New field compressed_alpha_matrix.
4833 (struct scop): New field loop2cloog_loop.
4834 (SCOP_LOOP2CLOOG_LOOP, struct data_dependence_polyhedron,
4835 RDGE_DDP, ddp_p, struct loop_to_cloog_loop_str): New.
4837 2008-02-10 Konrad Trifunovic <konrad.trifunovic@inria.fr>
4839 * graphite.c (build_graphite_bb): Fix initialization
4840 of the graphite basic block.
4842 2008-02-05 Sebastian Pop <sebastian.pop@amd.com>
4844 * graphite.c (scan_tree_for_params): Rewrite for the new layout of
4845 loop domain matrix. Pass in the number of loops contained in the
4847 (nb_loops_around_gb): Moved before setup_cloog_loop that uses it.
4848 (setup_cloog_loop): Rewrite for the new layout of loop domain matrix:
4849 loops that are not surrounding the current loop are not represented
4850 in the domain constraint matrix.
4851 (build_scop_iteration_domain): Initial domain constraint matrix
4852 contains only the eq/ineq, cst, and scop parameters columns.
4854 2008-01-29 Tobias Grosser <grosser@fim.uni-passau.de>
4856 * graphite.c (schedule_to_scattering, nb_loops_around_gb): New.
4857 (print_graphite_bb): Print scattering.
4859 2008-01-29 Tobias Grosser <grosser@fim.uni-passau.de>
4861 * graphite.c (initialize_cloog_names): Initialize names of
4862 scattering variables.
4864 2009-01-29 Tobias Grosser <grosser@fim.uni-passau.de>
4866 * graphite.c (dot_all_scops_1): Disable debug output while
4869 2008-01-29 Tobias Grosser <grosser@fim.uni-passau.de>
4871 * graphite.c (find_transform): Change cloog output language to C.
4873 2008-01-27 Sebastian Pop <sebastian.pop@amd.com>
4875 * tree-loop-distribution.c (generate_memset_zero,
4876 generate_builtin, generate_code_for_partition,
4877 rdg_flag_all_uses): New.
4878 (rdg_flag_uses): Gather in the same partition the statements defining
4879 the VUSES of the current statement.
4880 (rdg_flag_similar_stores): Renamed rdg_flag_similar_memory_accesses.
4881 Gather in the same partition not only the stores to the same memory
4882 access, but also the reads.
4883 (ldist_generate_loops): Renamed ldist_gen.
4885 2008-01-24 Sebastian Pop <sebastian.pop@amd.com>
4886 Tobias Grosser <grosser@fmi.uni-passau.de>
4888 * graphite.c (setup_cloog_loop): Chain all cloog loops with the
4889 next pointer, don't use the inner pointer.
4891 2008-01-20 Tobias Grosser <grosser@fmi.uni-passau.de>
4893 * graphite.c (dot_all_scops, dot_all_scops_1): New.
4894 (find_transform): Call dot_all_1.
4895 * graphite.h (dot_all_scops): Declared.
4897 2007-12-14 Sebastian Pop <sebastian.pop@amd.com>
4899 * tree-loop-distribution.c: Fix apsi.f ICE.
4900 (create_bb_after_loop): New.
4901 (generate_loops_for_partition): Use it.
4902 * testsuite/gfortran.dg/ldist-1.f90: New.
4904 * tree-data-ref.c (dot_rdg): Use /tmp/rdg.dot for dotty format.
4905 * graphite.c (dot_scop): Use /tmp/scop.dot for dotty format.
4907 2007-12-13 Tobias Grosser <grosser@fmi.uni-passau.de>
4909 * graphite.c (find_transform): Dump cloog program sent to cloog.
4911 2007-12-13 Tobias Grosser <grosser@fmi.uni-passau.de>
4913 * graphite.c (initialize_cloog_names): Initialize cloog
4916 2007-12-13 Tobias Grosser <grosser@fmi.uni-passau.de>
4918 * graphite.c (build_scop_context): Fix typo, for the matrix
4919 format: insert '0 >= 0' instead of '-1 >= 0'.
4921 2007-12-13 Sebastian Pop <sebastian.pop@amd.com>
4923 * Fix merge problems.
4925 2007-12-13 Sebastian Pop <sebastian.pop@amd.com>
4927 * graphite.c (setup_cloog_loop): Fix typo.
4929 2007-12-12 Sebastian Pop <sebastian.pop@amd.com>
4931 * doc/invoke.texi (-ftree-loop-distribution): Documented.
4932 * tree-loop-distribution.c: Reimplemented.
4933 * tree-pass.h (pass_loop_distribution): New.
4934 * tree-scalar-evolution.c (number_of_iterations_for_all_loops): Use
4936 * graphds.h (struct graph): New field indexes.
4937 * timevar.def (TV_TREE_LOOP_DISTRIBUTION): New.
4939 * tree-vect-analyze.c: Remove declaration of static functions when not
4941 * tree-vectorizer.c: Same.
4942 (rename_variables_in_loop): Now extern.
4943 (slpeel_tree_duplicate_loop_to_edge_cfg): Renamed
4944 tree_duplicate_loop_to_edge_cfg. Reset PENDING_STMT for edges after
4945 calling redirect_edge_and_branch_force.
4947 * tree-vectorizer.h (tree_duplicate_loop_on_edge): Declared.
4949 * tree-data-ref.c: Don't include tree-chrec.h.
4950 (debug_data_dependence_relations): New.
4951 (dump_data_dependence_relation): Call dump_data_reference on data refs
4953 (same_access_functions): Moved...
4954 (find_vertex_for_stmt): Renamed rdg_vertex_for_stmt.
4955 (dump_rdg_vertex, debug_rdg_vertex, dump_rdg_component,
4956 debug_rdg_component, dump_rdg, debug_rdg, dot_rdg_1, dot_rdg,
4957 struct rdg_vertex_info, ): New.
4958 (create_rdg_edge_for_ddr): Compute the dependence level before looking
4960 (create_rdg_vertices): Initialize the htab of graph->indexes.
4961 Initialize RDG_MEM_WRITE_STMT and RDG_MEM_READS_STMT.
4962 (stmts_from_loop): Don't save LABEL_EXPR.
4963 (hash_stmt_vertex_info, eq_stmt_vertex_info,
4964 hash_stmt_vertex_del): New.
4965 (build_rdg): Initialize rdg->indexes.
4966 (free_rdg, stores_from_loop, ref_base_address,
4967 rdg_defs_used_in_other_loops_p, have_similar_memory_accesses,
4968 have_similar_memory_accesses_1, ref_base_address_1,
4969 remove_similar_memory_refs): New.
4971 * tree-data-ref.h: Include tree-chrec.h.
4972 (debug_data_dependence_relations): Declared.
4973 (same_access_functions): ...here. Now static inline.
4974 (ddr_is_anti_dependent, ddrs_have_anti_deps,
4975 ddr_dependence_level): New.
4976 (struct rdg_vertex): New fields has_mem_write, has_mem_reads.
4977 (RDGV_HAS_MEM_WRITE, RDGV_HAS_MEM_READS, RDG_STMT, RDG_MEM_WRITE_STMT,
4978 RDG_MEM_READS_STMT): New.
4979 (dump_rdg_vertex, debug_rdg_vertex, dump_rdg_component,
4980 debug_rdg_component, dump_rdg, debug_rdg, dot_rdg,
4981 rdg_vertex_for_stmt): Declared.
4982 (struct rdg_edge): New field level.
4983 (RDGE_LEVEL, free_rdg): New.
4984 (stores_from_loop, remove_similar_memory_refs,
4985 rdg_defs_used_in_other_loops_p,
4986 have_similar_memory_accesses): Declared.
4987 (rdg_has_similar_memory_accesses): New.
4989 * lambda.h (dependence_level): New.
4990 * common.opt (ftree-loop-distribution): New.
4991 * tree-flow.h (debug_loop_ir): Renamed debug_loops.
4992 (print_loop_ir): Renamed print_loops.
4993 (debug_loop, debug_loop_num, print_loops_bb, mark_virtual_ops_in_bb,
4994 tree_duplicate_loop_to_edge_cfg, rename_variables_in_loop): Declared.
4995 * Makefile.in (TREE_DATA_REF_H): Depends on tree-chrec.h.
4996 (tree-loop-distribution.o): Added.
4997 * tree-cfg.c (mark_virtual_ops_in_region): Use mark_virtual_ops_in_bb.
4998 (mark_virtual_ops_in_bb): New.
4999 (print_loops_bb, debug_loop_num, debug_loop): New.
5000 * passes.c: Scheduled pass_loop_distribution.
5002 2007-12-12 Konrad Trifunovic <konrad.trifunovic@inria.fr>
5004 * graphite.c (scan_tree_for_params): Correct the number of columns
5006 (nb_flat_iterator): New.
5007 (setup_cloog_loop): Initialize to 1 the first column for inequalities.
5008 (build_scop_iteration_domain): Correct the number of columns for
5011 2007-12-12 Sebastian Pop <sebastian.pop@amd.com>
5013 * Merge from mainline (129697:130800).
5015 2007-10-30 Sebastian Pop <sebastian.pop@amd.com>
5017 * graphite.c (build_graphite_bb): SCoP's basic blocks are post
5018 dominated by SCoP's exit.
5019 (graphite_transform_loops): Compute post dominators.
5021 2007-10-28 Sebastian Pop <sebastian.pop@amd.com>
5023 * Merge from mainline (127169:129697).
5025 2007-10-28 Sebastian Pop <sebastian.pop@amd.com>
5027 * graphite.c (affine_expr): Renamed scop_affine_expr. Use an extra
5028 parameter for the basic block that contains the expression. Use
5029 outermost_loop_in_scop for evolution_function_is_affine_multivariate_p.
5030 (stmt_simple_for_scop_p): Pass to scop_affine_expr the basic block of
5032 * graphite.h (gbb_loop): New.
5033 (GBB_LOOP): Removed.
5035 2007-08-03 Sebastian Pop <sebpop@gmail.com>
5037 * Makefile.in: Fix merge problem.
5039 2007-08-03 Sebastian Pop <sebpop@gmail.com>
5041 * Merge from mainline (125309:127169).
5042 * tree-loop-distribution.c: Disabled.
5044 2007-06-05 Sebastian Pop <sebpop@gmail.com>
5046 * Merge from mainline (r123693:125309).
5048 2007-05-30 Sebastian Pop <sebpop@gmail.com>
5050 * tree-loop-distribution.c (correct_modify_expr_p): Renamed
5052 (correct_modify_p, check_statements, number_of_lvalue_uses,
5053 number_of_scalar_dependences, create_edges): Use GIMPLE_MODIFY_STMT
5054 instead of MODIFY_EXPR.
5055 (update_edge_with_ddv): Don't pass index_of_edge. Initialize
5058 2007-05-24 Sebastian Pop <sebpop@gmail.com>
5060 * tree-loop-distribution.c (struct rdg): Replace arrays by
5061 VECs for edges and vertices.
5062 (RDG_NBV, RDG_NBE, RDG_VERTEX, RDG_EDGE): Removed.
5063 (RDGV_NB_PARTITIONS): New.
5064 (PRDG_NBV, PRDG_NBE): Removed.
5065 (build_scc_graph, correct_partitions_p, mark_partitions, build_prdg,
5066 dump_rdg, find_vertex_with_stmt, create_vertices, free_rdg,
5067 number_of_scalar_dependences, create_edges, build_rdg): Use VECs.
5069 2007-05-17 Georges-Andre Silber <silber@cri.ensmp.fr>
5070 Sebastian Pop <sebpop@gmail.com>
5072 * doc/invoke.texi (-ftree-loop-distribution): Document.
5073 * tree-loop-distribution.c: New file.
5074 * tree-pass.h (pass_loop_distribution): Declared.
5075 * timevar.def (TV_TREE_LOOP_DISTRIBUTION): New.
5076 * tree-data-ref.c (initialize_data_dependence_relation): Initialize
5078 * tree-data-ref.h (data_dependence_relation): Add reversed_p.
5079 (DDR_REVERSED_P): New.
5080 * common.opt (-ftree-loop-distribution): New.
5081 * tree-flow.h (distribute_loops): Declared.
5082 * Makefile.in (OBJS-common): Depend on tree-loop-distribution.o.
5083 * passes.c (init_optimization_passes): Schedule loop distribution.
5085 2007-05-12 Sebastian Pop <sebastian.pop@inria.fr>
5087 * graphite.c (print_graphite_bb): Don't call dump_data_references.
5088 (print_scop): Don't print when scop is NULL.
5089 (build_scop_context, find_transform): Don't output to stderr.
5091 2007-05-09 Sebastian Pop <sebastian.pop@inria.fr>
5093 * tree-data-ref.c: Don't include graphite.h.
5094 Comment out the code for printing data reference's scop.
5095 (build_access_matrix_with_af): Moved...
5096 * tree-data-ref.h (build_access_matrix_with_af): Removed declaration.
5097 * graphite.c (build_access_matrix_with_af): ... here. Now static.
5098 (print_graphite_bb): Print basic block's schedule.
5099 (print_scop): Don't print the schedule, call cloog's pretty printer.
5100 (bb_in_scop_p): A basic block is in a scop only if it is both
5101 dominated and postdominated by the scop's entry and exit basic blocks.
5102 (function_parameter_p): New.
5103 (invariant_in_scop_p): Use function_parameter_p.
5104 (new_scop, save_scop): New.
5105 (end_scop, test_for_scop_bound, build_scops): Use new_scop, and
5107 (scan_tree_for_params): Directly build the constraint as CloogMatrix.
5108 (loop_in_scop_p): New.
5109 (scop_record_loop): Use loop_in_scop_p.
5110 (build_scop_domain): Renamed build_scop_iteration_domain.
5111 (setup_cloog_loop, initialize_cloog_names, find_scop_parameters,
5112 nb_params_in_scop, build_scop_context, first_loop_in_scop,
5113 setup_cloog_loop, dot_scop_1, dot_scop): New.
5114 * graphite.h (GBB_LOOP, SCOP_PROG, dot_scop): New.
5115 (struct scop): Add a pointer to cloog's representation of a program.
5117 2007-04-14 Sebastian Pop <sebastian.pop@inria.fr>
5119 * doc/invoke.texi (-ftree-check-verbose): Renamed
5120 -ftree-checks-verbose.
5121 * common.opt (flag_tree_check_verbose): Renamed
5122 flag_tree_checks_verbose.
5123 * tree-check.c (tree_check_warning): Use flag_tree_checks_verbose.
5125 2007-04-14 Sebastian Pop <sebastian.pop@inria.fr>
5127 * configure: Regenerated.
5128 * config.in: Regenerated.
5129 * tree-ssa-loop.c (graphite_transforms): Execute
5130 graphite_transform_loops only when HAVE_cloog.
5131 * configure.ac (HAVE_polylib, HAVE_cloog, GRAPHITE): Defined.
5132 * graphite.c: Include polylibgmp.h and cloog.h.
5133 (graphite_transform_loops): Removed loops parameter.
5134 * tree-flow.h (graphite_transform_loops): Update declaration.
5135 * Makefile.in (POLYLIBLIBS, POLYLIBINC, CLOOGLIBS, CLOOGINC): New.
5136 (LIBS): Depend on CLOOGLIBS and on POLYLIBLIBS.
5137 (INCLUDES): Depend on POLYLIBINC and on CLOOGINC.
5138 (OBJS-common): Remove dependence on graphite.o.
5139 (BACKEND): Depend on @GRAPHITE@.
5141 2007-04-13 Sebastian Pop <sebastian.pop@inria.fr>
5143 * doc/invoke.texi (-ftree-check-verbose): Documented.
5144 * testsuite/gcc.dg/tree-checker/tree-checks-1.c: New.
5145 * testsuite/gcc.dg/tree-checker/tree-checks-2.c: New.
5146 * testsuite/gcc.dg/tree-checker/tree-checks-3.c: New.
5147 * testsuite/gcc.dg/tree-checker/tree-checks-4.c: New.
5148 * testsuite/gcc.dg/tree-checker/tree-checks.exp: New.
5149 * testsuite/gcc.dg/tree-checker/condates.crp: New.
5150 * common.opt (ftree-checks-verbose): New.
5151 * tree-check.c (tree_check_warning): Move extra stderr output
5152 under control of flag_tree_check_verbose.
5154 2007-04-12 Sebastian Pop <sebastian.pop@inria.fr>
5156 * tree-match.c: Fix comments formatting.
5157 * tree-match.h: Fix comments formatting.
5158 * tree-check.c: Fix comments formatting.
5159 (tree_check_init): Restructure.
5161 2007-04-12 Nic Volanschi <nic.volanschi@free.fr>
5163 * doc/invoke.texi (-ftree-check, -ftree-checks): Documented.
5165 2007-04-10 Sebastian Pop <sebastian.pop@inria.fr>
5167 * Merge from mainline (r120733:123693).
5169 2007-03-20 Nic Volanschi <nic.volanschi@free.fr>
5171 * condate.y: New file.
5172 * tree-match.h (struct patt_info_s): New field sign.
5173 (struct condate_s): New field msg.
5174 (normalize_condate, name_condate, add_condate): New.
5175 (conds[], condate_parse): Made extern.
5176 * tree-check.c (tree_check_warning): First arg changed to cond;
5177 warning reformatted.
5178 (tree_check_init): Reset the TREE_VISITED bit on every CFG node.
5180 (tree_check): Process trivial condates.
5181 (read_delimited_string): Removed.
5182 (print_cond): Print name and msg.
5183 (conds[]): Made extern.
5184 (parse_tree_check_file_once): Rewritten to use the parser in
5186 Processing of option --tree_check_string moved to tree_scan().
5187 * Makefile.in: Added condate.y
5189 2007-03-12 Sebastian Pop <sebastian.pop@inria.fr>
5191 * tree-pretty-print.c (dump_generic_bb_buff, lazy_dump_generic_node):
5192 Use VECs instead of varrays.
5193 * diagnostic.h (lazy_dump_generic_node): Update declaration.
5194 * Makefile.in (pretty-print.o): Depend on vec.h.
5195 * pretty-print.c: Include tree.h and vec.h.
5196 (pp_clear_state, pp_write_list_to_stream, pp_base_format,
5197 pp_base_format, pp_construct, pp_base_string, pp_lazy_mode,
5198 new_tree_chunk, pp_add_tree, pp_add_string, pp_add_char, pp_write_list,
5199 pp_free_list): Use VECs instead of varrays.
5200 * pretty-print.h: Do not include varray.h.
5201 (struct tree_chunk_s): Declaration moved before its use.
5202 (output_buffer): Rename varray field to chunks.
5203 * tree-match.c (tree_equal, chunk_1st_char, chunks_lookahead,
5204 tree_1st_char, match_chunks_pattinfo, match_tree_pattinfo,
5205 save_global_holes): Use VECs instead of varrays.
5206 * tree-match.h: Declare VECs of cfg_node, and hole_p.
5207 * tree-check.c (scan_cfg_stmts, push_node,
5208 print_matching_stmt): Removed.
5209 (tree_check_instance, push_global_holes_if_new, tree_check,
5210 execute_tree_check): Use VECs instead of varrays.
5211 (gate_tree_check): Don't execute the CFG check when basic_block_info
5214 2007-01-12 Sebastian Pop <sebastian.pop@inria.fr>
5216 * Merge from mainline (r115016:120733).
5218 2007-01-12 Sebastian Pop <sebastian.pop@inria.fr>
5220 * Merge from mainline (r117632:117661).
5222 2007-01-12 Sebastian Pop <sebastian.pop@inria.fr>
5224 * tree-dump.c (dump_option_value_in): Add TDF_DEBUG.
5225 * tree-pass.h (TDF_DEBUG, debug_p): New.
5226 * tree-scalar-evolution.c (set_scalar_evolution, get_scalar_evolution,
5227 get_scalar_evolution, add_to_evolution, set_nb_iterations_in_loop,
5228 get_loop_exit_condition, analyze_evolution_in_loop,
5229 analyze_initial_condition, analyze_scalar_evolution,
5230 instantiate_parameters, number_of_latch_executions): Use debug_p.
5231 * tree-chrec.c (chrec_apply): Use debug_p.
5232 * tree-data-ref.c: Include graphite.h.
5233 (dump_data_reference): Print also the access matrix.
5234 (analyze_array, analyze_indirect_ref, init_data_ref,
5235 analyze_offset_expr, address_analysis, object_analysis,
5236 create_data_ref, finalize_ddr_dependent,
5237 non_affine_dependence_relation, analyze_ziv_subscript,
5238 analyze_siv_subscript_cst_affine,
5239 compute_overlap_steps_for_affine_1_2, analyze_subscript_affine_affine,
5240 can_use_analyze_subscript_affine_affine, analyze_siv_subscript,
5241 analyze_miv_subscript, analyze_overlapping_iterations,
5242 build_classic_dist_vector, subscript_dependence_tester,
5243 compute_affine_dependence, analyze_all_data_dependences): Use debug_p.
5244 (build_access_matrix_with_af): No longer static.
5245 * tree-data-ref.h (scop_p): ... declaration here.
5246 (data_reference.scop): New field.
5247 (DR_SCOP, DR_ACCESS_MATRIX): New.
5248 (build_access_matrix_with_af, dr_num_subscripts): Declared.
5249 * graphite.c (print_graphite_bb): Call dump_data_references.
5250 (print_scop): Use scop_nb_loops and scop_dim_domain.
5251 (test_for_scop_bound): Use debug_p.
5252 (scan_tree_for_params): Use scop_nb_loops, scop_nb_loops and
5254 (scop_loop_index): Moved...
5255 (scop_record_loop): New.
5256 (build_scop_loop_nests): Use scop_record_loop.
5257 (build_scop_domain): Use scop_dim_domain.
5258 (build_access_matrix): Implemented.
5259 (build_scop_canonical_schedules): Use scop_nb_loops.
5260 (build_graphite_bb): Initialize GBB_SCOP.
5261 * graphite.h (scop_p): Moved...
5262 (graphite_bb.scop): New field.
5263 (graphite_bb.iteration_domain, GBB_DOMAIN, scop.nb_params,
5264 scop.nb_loops, scop.dim_domain, SCOP_NB_LOOPS, SCOP_NB_PARAMS,
5265 SCOP_DIM_DOMAIN, SCOP_STMTS): Removed.
5266 (scop_nb_params, scop_nb_loops, scop_dim_domain, gbb_dim_domain,
5267 scop_loop_index): New.
5268 * Makefile.in (tree-data-ref.o): Depends on graphite.h.
5270 2007-01-05 Sebastian Pop <sebastian.pop@inria.fr>
5272 * Merge from mainline (r117661:120450).
5274 2006-10-12 Sebastian Pop <sebastian.pop@inria.fr>
5276 * tree-scalar-evolution.c (instantiate_parameters_1): Don't stop
5277 at the first declaration outside the varying loop, instantiate as
5279 * tree-chrec.c (for_each_scev_op): New.
5280 * tree-chrec.h (for_each_scev_op): Declared.
5281 * tree-ssa-loop.c (pass_graphite_trans): Don't dump the function.
5282 * tree-data-ref.c (get_references_in_stmt,
5283 find_data_references_in_stmt): New, from trunk.
5284 (find_data_references_in_loop): Use get_references_in_stmt
5285 and find_data_references_in_loop, modified as in trunk.
5286 (build_access_matrix_with_af): New.
5287 * tree-data-ref.h (data_reference): Add a field access_matrix.
5288 (data_ref_loc): New, as in trunk.
5289 * graphite.c (print_graphite_bb, bb_in_scop_p, stmt_in_scop_p,
5290 invariant_in_scop_p, param_index, scan_tree_for_params,
5291 scop_loop_index, build_scop_loop_nests, build_scop_domain, irp_data,
5292 idx_record_param, idx_record_params, build_access_matrix,
5293 build_scop_data_accesses, build_scop_canonical_schedules,
5294 build_graphite_bb, build_scop_bbs, find_params_in_bb,
5295 build_scop_params): New.
5296 * graphite.h (graphite_bb): New.
5297 (scop): Add fields static_schedule, params, loop_nest,
5299 * lambda.h: Declare vecs of lambda_matrix.
5300 * tree-flow.h (print_loop_ir_bb): Declared.
5301 * tree-cfg.c (print_loop_ir_bb): New.
5302 (print_loop): Use print_loop_ir_bb.
5304 2006-10-12 Sebastian Pop <pop@cri.ensmp.fr>
5306 * Merge from mainline (r115016:117632).
5308 2006-10-11 Sebastian Pop <pop@cri.ensmp.fr>
5310 * graphite.c (debug_scops): Adjust definition for avoiding a bootstrap
5311 break due to a warning.
5313 2006-10-10 Sebastian Pop <pop@cri.ensmp.fr>
5315 * graphite.c (print_scops, debug_scops): New.
5316 (graphite_transform): Renamed graphite_find_transform.
5317 * graphite.h (debug_scops): Declared.
5319 2006-08-17 Sebastian Pop <pop@cri.ensmp.fr>
5321 * tree-match.c: Reformat following the GNU style.
5322 * tree-match.h: Reformat following the GNU style.
5323 * tree-pattern.h: Removed empty file.
5324 * Makefile.in: Remove references to tree-pattern.h.
5325 * tree-check.c: Reformat following the GNU style.
5326 (execute_tree_check): Move gate condition code to...
5327 (gate_tree_check): ...here. New function.
5328 (pass_check): Use the gate function.
5330 2006-07-04 Nic Volanschi <nic.volanschi@free.fr>
5332 * tree-pattern.h: New. Tree pattern matching and checking using
5334 * tree-check.c: New. Tree/CFG checking pass.
5335 * tree-match.c: New. Library for tree pattern matching.
5336 * opts.c, common.opt: Add options --ftree-check & --ftree-checks.
5337 * toplev.c, flags.h: Add globals for tree-check pass.
5338 * Makefile.in: Integrate the files in tree-check pass.
5339 * timevar.def, tree-optimize.c, tree-pass.h: Register tree-check pass.
5340 * pretty-print.c, pretty-print.h, tree-pretty-print.c, diagnostic.h:
5341 Introduce a "lazy" pretty-print mode.
5342 * tree.c, tree.h: Add tree_name.
5344 2006-07-04 Sebastian Pop <pop@cri.ensmp.fr>
5346 * doc/invoke.texi (-fgraphite): Correct typo.
5347 * tree-scalar-evolution.c (number_of_iterations_for_all_loops): Update
5348 use of print_loop_ir.
5349 * testsuite/gcc.dg/graphite/scop-1.c: New.
5350 * testsuite/gcc.dg/graphite/scop-2.c: New.
5351 * testsuite/gcc.dg/graphite/graphite.exp: New.
5352 * graphite.c: Include domwalk.h.
5353 (print_scop): Print only the entry and exit blocks.
5354 (debug_scop): No longer static.
5355 (affine_expr): Fix formating. Return also true when the expression is
5357 (stmt_simple_for_scop_p): Fix formating.
5358 (build_scops): Use domwalk.
5359 (get_loop_start, end_scop, test_for_scop_bound): New.
5360 (graphite_transform_loops): Avoid printing on stderr.
5361 * graphite.h (debug_scop): Declared.
5362 * tree-flow.h (debug_loop_ir, print_loop_ir): Update declarations.
5363 * Makefile.in (graphite.o): Depend on domwalk.h.
5364 * tree-cfg.c (print_loop, print_pred_bbs, print_succ_bbs): Remove
5365 declarations for static functions.
5366 (print_loop, print_loop_ir, debug_loop_ir): Use an extra parameter for
5367 controlling output verbosity.
5369 2006-06-26 Sebastian Pop <pop@cri.ensmp.fr>
5370 Plesco Alexandru <shurikx@gmail.com>
5372 * doc/invoke.texi (-fgraphite): Document.
5373 * tree-pass.h (pass_graphite_transforms): Declared.
5374 * timevar.def (TV_GRAPHITE_TRANSFORMS): New.
5375 * tree-ssa-loop.c (graphite_transforms, gate_graphite_transforms): New.
5376 (pass_graphite_transforms): Defined.
5377 * tree-data-ref.c (free_data_ref, data_reference): Extern.
5378 * tree-data-ref.h (free_data_ref, data_reference): Declared.
5379 * graphite.c, graphite.h: New.
5380 * common.opt (fgraphite): Declared.
5381 * tree-flow.h (graphite_transform_loops): Declared.
5382 * Makefile.in (OBJS-common): Add graphite.o.
5383 (graphite.o): New rule.
5384 * passes.c (pass_graphite_transforms): Scheduled.