1 2009-08-25 Sebastian Pop <sebastian.pop@amd.com>
3 * graphite-dependences.c (pddr_original_scattering): Return NULL
4 for read-read dependence relations.
5 * graphite-poly.h (enum poly_dr_type): Fix comment.
8 (pdr_may_write_p): New.
10 2009-08-25 Sebastian Pop <sebastian.pop@amd.com>
12 * graphite-poly.h (enum POLY_DR_TYPE): Renamed poly_dr_type.
13 (struct poly_dr): Same.
15 * graphite-poly.c (new_poly_dr): Same.
17 2009-08-25 Konrad Trifunovic <konrad.trifunovic@gmail.com>
18 Sebastian Pop <sebastian.pop@amd.com>
20 * graphite-blocking.c (pbb_strip_mine_loop_depth): Renamed
21 pbb_strip_mine_time_depth. Changed the implementation so that
22 transformation is expressed as a transformation on
23 time (scatttering) dimensions. Also, ensures that the 2d+1
24 scheduling format is preserved.
25 (pbb_strip_mine_profitable_p): Profitability is based on the
26 iteration number of a given time (scattering) dimension,
27 and not on a original loop depth dimension.
28 (pbb_strip_mine): Call pbb_number_of_iterations_at_time.
29 (pbb_do_strip_mine): Call psct_dynamic_dim.
30 * graphite-poly.c (pbb_number_of_iterations_at_time): New.
31 * graphite-poly.h (pbb_number_of_iterations_at_time): Declared.
32 (pbb_nb_dynamic_scattering_transform): New.
33 (psct_dynamic_dim): New.
35 2009-08-25 Konrad Trifunovic <konrad.trifunovic@gmail.com>
37 * graphite-ppl.c (ppl_max_for_le): Renamed ppl_max_for_le_pointset.
38 * graphite-ppl.h (ppl_max_for_le): Renamed ppl_max_for_le_pointset.
39 * graphite-poly.c (pbb_number_of_iterations): Rename ppl_max_for_le.
40 * graphite-interchange.c (build_linearized_memory_access): Same.
41 (memory_stride_in_loop): Same.
43 2009-08-25 Sebastian Pop <sebastian.pop@amd.com>
45 * graphite-dependences.c (pddr_original_scattering): New.
46 (graphite_legal_transform_dr): Call pddr_original_scattering.
49 * graphite-dependences.h (dot_deps): Declared.
50 * graphite-poly.c (new_poly_dr): Initialize PDR_ID.
51 (print_pdr): Print PDR_ID.
52 * graphite-poly.h (struct poly_dr): Add field id.
55 * graphite-scop-detection.c (dot_all_scops_1): Cleanup comment.
57 2009-08-22 Sebastian Pop <sebastian.pop@amd.com>
59 * graphite-dependences.c (graphite_carried_dependence_level_k): Do
60 not delete the original dependence relation.
62 2009-08-21 Sebastian Pop <sebastian.pop@amd.com>
64 * graphite-dependences.c (graphite_legal_transform_bb): Avoid
65 the computation of symmetric data dependence relations.
66 (dependency_between_pbbs_p): Same.
68 2009-08-21 Sebastian Pop <sebastian.pop@amd.com>
70 * graphite-dependences.c (new_poly_dr_pair): Renamed new_poly_ddr.
71 (eq_poly_dr_pair_p): Renamed eq_poly_ddr_p.
72 (hash_poly_dr_pair_p): Renamed hash_poly_ddr_p.
75 (dependence_polyhedron_1): Now returns a poly_ddr_p.
76 (dependence_polyhedron): Same. Remove useless gcc_assert.
78 (graphite_legal_transform_dr): Call pddr_is_empty and free_poly_ddr.
79 (graphite_carried_dependence_level_k): Call pddr_is_empty.
80 * graphite-dependences.h (enum poly_dependence_kind): New.
81 (poly_dr_pair): Renamed poly_ddr. Added a field kind.
82 (PDRP_SOURCE): Renamed PDDR_SOURCE.
83 (PDRP_SINK): Renamed PDDR_SINK.
84 (PDRP_DDP): Renamed PDDR_DDP.
86 (free_poly_ddr): Declared.
87 * graphite-poly.c (new_scop): Use the new hash function names.
88 * graphite-poly.h (struct scop): Renamed field original_pdr_pairs
90 (SCOP_ORIGINAL_PDR_PAIRS): Renamed SCOP_ORIGINAL_PDDRS.
92 2009-08-21 Sebastian Pop <sebastian.pop@amd.com>
94 * Merge from mainline (150764:150992).
96 2009-08-18 Sebastian Pop <sebastian.pop@amd.com>
98 * cfgloopmanip.c (create_empty_loop_on_edge): Generate upper
99 bounds with LT_EXPR to make niter analysis more precise on code
100 generated by Graphite.
102 2009-08-18 Sebastian Pop <sebastian.pop@amd.com>
104 * graphite-dependences.c (graphite_legal_transform_dr): Fix formatting.
105 (graphite_legal_transform_bb): Same.
106 (poly_drs_may_alias_p): Same.
108 2009-08-15 Sebastian Pop <sebastian.pop@amd.com>
111 * graphite-ppl.c (ppl_max_for_le): Correct the use of
112 ppl_Pointset_Powerset_C_Polyhedron_maximize.
114 2009-08-13 Sebastian Pop <sebastian.pop@amd.com>
116 * graphite-poly.c (print_pbb): Print PBB index.
118 2009-08-13 Sebastian Pop <sebastian.pop@amd.com>
120 * Merge from mainline (r150672:150764).
122 2009-08-13 Sebastian Pop <sebastian.pop@amd.com>
124 * graphite-interchange.c (ppl_max_for_le): Moved...
125 * graphite-poly.c (pbb_number_of_iterations): Call ppl_max_for_le.
126 * graphite-ppl.c (ppl_max_for_le): ... here.
127 * graphite-ppl.h (ppl_max_for_le): Declared.
129 2009-08-12 Sebastian Pop <sebastian.pop@amd.com>
131 * Merge from mainline (r150372:150672).
133 2009-08-11 Sebastian Pop <sebastian.pop@amd.com>
136 * sese.c (convert_for_phi_arg): New.
137 (add_guard_exit_phis): Use convert_for_phi_arg.
139 * testsuite/gfortran.dg/graphite/id-17.f: New.
141 2009-08-11 Sebastian Pop <sebastian.pop@amd.com>
143 * graphite-sese-to-poly.c (pdr_add_data_dimensions): Dont add
144 unknown subscript upper bounds.
146 * testsuite/gcc.dg/graphite/interchange-6.c: Un-XFAIL.
148 2009-08-11 Sebastian Pop <sebastian.pop@amd.com>
149 Pranav Garg <pranav.garg2107@gmail.com>
151 * graphite-interchange.c (gather_access_strides): Removed.
152 (ppl_max_for_le): New.
153 (build_linearized_memory_access): New.
154 (memory_stride_in_loop): New.
155 (pbb_interchange_profitable_p): Reimplemented.
156 * graphite-ppl.h (ppl_new_id_map): New.
157 (ppl_interchange): New.
159 * testsuite/gcc.dg/graphite/interchange-6.c: XFAILed.
161 2009-08-11 Sebastian Pop <sebastian.pop@amd.com>
163 * graphite-interchange.c (compute_subscript): Removed.
164 (compute_array_size_cstr): Removed.
165 (compute_array_size_poly): Removed.
166 (compute_array_size): Removed.
167 (gather_access_strides_poly): Removed.
168 (gather_access_strides): Empty.
170 2009-08-11 Sebastian Pop <sebastian.pop@amd.com>
172 * graphite-dependences.c (dependence_polyhedron_1): Replace
173 pdr_nb_subscripts with PDR_NB_SUBSCRIPTS.
174 (graphite_legal_transform_dr): Same.
175 (graphite_carried_dependence_level_k): Same.
176 * graphite-poly.c (new_poly_dr): Add a parameter nb_subscripts.
177 Initialize PDR_NB_SUBSCRIPTS.
178 (print_pdr_access_layout): Replace pdr_nb_subscripts with
180 * graphite-poly.h (struct poly_dr): Add nb_subscripts field.
181 (PDR_NB_SUBSCRIPTS): New.
182 (pdr_nb_subscripts): Removed.
183 (pdr_dim): Simplified.
184 * graphite-sese-to-poly.c (build_poly_dr): Replace pdr_nb_subscripts
185 with PDR_NB_SUBSCRIPTS.
187 2009-08-11 Sebastian Pop <sebastian.pop@amd.com>
189 * graphite-interchange.c (compute_array_size): Remove use of
191 * graphite-poly.c (new_poly_dr): Remove argument data_container.
192 Do not initialize PDR_DATA_CONTAINER.
193 (print_pdr): Do not print PDR_DATA_CONTAINER.
194 * graphite-poly.h (struct poly_dr): Remove data_container field.
195 (PDR_DATA_CONTAINER): Removed.
196 * graphite-sese-to-poly.c (pdr_add_data_dimensions): Remove use of
198 (build_poly_dr): Same.
200 2009-08-11 Sebastian Pop <sebastian.pop@amd.com>
202 * testsuite/gcc.dg/graphite/interchange-9.c: New.
204 2009-08-05 Konrad Trifunovic <konrad.trifunovic@gmail.com>
205 Sebastian Pop <sebastian.pop@amd.com>
207 * graphite-dependences.c (graphite_legal_transform_dr): Work on a
208 copy of the dependence polyhedron. Free the temporary objects.
209 (graphite_carried_dependence_level_k): Free unused objects before
212 * testsuite/gcc.dg/graphite/interchange-1.c: XFAILed.
213 * testsuite/gcc.dg/graphite/interchange-2.c: XFAILed.
214 * testsuite/gcc.dg/graphite/interchange-3.c: XFAILed.
215 * testsuite/gcc.dg/graphite/interchange-4.c: XFAILed.
216 * testsuite/gcc.dg/graphite/interchange-7.c: XFAILed.
218 2009-08-05 Sebastian Pop <sebastian.pop@amd.com>
220 * graphite-blocking.c (scop_do_strip_mine): Call store_scattering.
221 Early return without analyzing the data dependences if no
222 transform has been done. Call restore_scattering if the transform
224 (graphite-interchange.c): Same.
225 * graphite-poly.c (print_scattering_function): Test for PBB_TRANSFORMED.
226 (graphite_read_transforms): Initialize PBB_TRANSFORMED.
227 (apply_poly_transforms): Do not gcc_assert that
228 the transform is legal.
229 (new_poly_bb): Initialize PBB_TRANSFORMED, PBB_SAVED, and PBB_ORIGINAL.
230 Do not initialize PBB_NB_SCATTERING_TRANSFORM, PBB_NB_LOCAL_VARIABLES,
231 PBB_TRANSFORMED_SCATTERING, and PBB_ORIGINAL_SCATTERING.
232 (free_poly_dr): Free PBB_TRANSFORMED, PBB_SAVED, and PBB_ORIGINAL.
233 * graphite-poly.h (struct poly_scattering): New.
234 (struct poly_bb): Add original, transformed, and saved fields.
235 Remove transformed_scattering, original_scattering, nb_local_variables,
236 and nb_scattering_transform fields.
237 (PBB_ORIGINAL, PBB_TRANSFORMED, PBB_SAVED): New.
238 (poly_scattering_new): New.
239 (poly_scattering_free): New.
240 (poly_scattering_copy): New.
241 (store_scattering_pbb): New.
242 (store_scattering): New.
243 (restore_scattering_pbb): New.
244 (restore_scattering): New.
245 * graphite-sese-to-poly.c (build_pbb_scattering_polyhedrons):
246 Initialize PBB_TRANSFORMED and PBB_ORIGINAL.
248 2009-08-05 Sebastian Pop <sebastian.pop@amd.com>
250 * graphite-poly.c (print_pbb): Add parentheses in the pretty print.
253 2009-08-05 Sebastian Pop <sebastian.pop@amd.com>
255 * Makefile.in (graphite.o): Depends on PREDICT_H.
256 * graphite.c: Include predict.h.
257 (graphite_finalize): Call tree_estimate_probability.
258 * predict.c (predict_loops): Do not call scev_initialize and
260 (tree_estimate_probability_bb): New.
261 (tree_estimate_probability): Do not initialize loops: move that
262 code to the driver. Call tree_estimate_probability_bb.
263 (tree_estimate_probability_driver): New.
264 (pass_profile): Use tree_estimate_probability_driver.
265 * predict.h (tree_estimate_probability): Declared.
267 2009-08-05 Sebastian Pop <sebastian.pop@amd.com>
269 * graphite-clast-to-gimple.c (gloog): Add time to TV_GRAPHITE_CODE_GEN.
270 * graphite-dependences.c (graphite_legal_transform): Add time to
271 TV_GRAPHITE_DATA_DEPS.
272 (dependency_between_pbbs_p): Same.
273 * timevar.def (TV_GRAPHITE_DATA_DEPS, TV_GRAPHITE_CODE_GEN): New.
275 2009-08-03 Sebastian Pop <sebastian.pop@amd.com>
277 * Merge from mainline (r149952:150372).
279 2009-07-28 Sebastian Pop <sebastian.pop@amd.com>
281 * ChangeLog.graphite: Fix indenting, white spaces and 80 columns.
282 * graphite-blocking.c: Same.
283 * graphite-clast-to-gimple.c: Same.
284 * graphite-dependences.c: Same.
285 * graphite-poly.c: Same.
286 * graphite-poly.h: Same.
287 * graphite-ppl.c: Same.
288 * graphite-scop-detection.c: Same.
289 * graphite-sese-to-poly.c: Same.
292 2009-07-28 Sebastian Pop <sebastian.pop@amd.com>
294 * graphite-sese-to-poly.c (loop_entry_phi_arg): New.
295 (remove_simple_copy_phi): New.
296 (remove_invariant_phi): New.
297 (simple_copy_phi_p): New.
298 (reduction_phi_p): New.
299 (gsi_for_ssa_name_def): New.
300 (insert_out_of_ssa_copy): New.
301 (insert_out_of_ssa_copy_on_edge): New.
302 (create_zero_dim_array): New.
303 (scalar_close_phi_node_p): New.
304 (rewrite_close_phi_out_of_ssa): New.
305 (rewrite_phi_out_of_ssa): New.
306 (rewrite_reductions_out_of_ssa): New.
307 (build_poly_scop): Call rewrite_reductions_out_of_ssa.
309 * testsuite/gcc.dg/graphite/id-11.c: New.
310 * testsuite/gcc.dg/graphite/id-15.c: New.
311 * testsuite/gcc.dg/graphite/interchange-1.c: Un-XFAIL.
312 * testsuite/gcc.dg/graphite/interchange-2.c: Un-XFAIL.
313 * testsuite/gcc.dg/graphite/interchange-3.c: Un-XFAIL.
314 * testsuite/gcc.dg/graphite/interchange-4.c: Un-XFAIL.
315 * testsuite/gcc.dg/graphite/interchange-7.c: Un-XFAIL.
316 * testsuite/gcc.dg/graphite/scop-matmult.c: Un-XFAIL.
317 * testsuite/gfortran.dg/graphite/id-13.f: New.
318 * testsuite/gfortran.dg/graphite/id-5.f: New.
320 2009-07-28 Sebastian Pop <sebastian.pop@amd.com>
322 * graphite-clast-to-gimple.c (graphite_loop_normal_form): Do not
323 check that nb_reductions_in_loop is zero.
324 * graphite-scop-detection.c (harmful_stmt_in_bb): Don't filter out
326 (nb_reductions_in_loop): Removed.
327 (graphite_can_represent_loop): Do not call nb_reductions_in_loop.
328 * graphite-sese-to-poly.c (phi_node_is_iv): Removed.
329 (bb_contains_non_iv_scalar_phi_nodes): Removed.
330 (scop_contains_non_iv_scalar_phi_nodes): Removed.
331 (build_poly_scop): Do not call scop_contains_non_iv_scalar_phi_nodes.
333 2009-07-28 Sebastian Pop <sebastian.pop@amd.com>
335 * graphite-clast-to-gimple.c (build_cloog_prog): Do not code generate
336 statements that have an empty iteration domain.
337 * testsuite/gfortran.dg/graphite/id-16.f: New.
339 2009-07-28 Sebastian Pop <sebastian.pop@amd.com>
341 * tree-scalar-evolution.c (instantiate_scev_1): Return
342 chrec_dont_know when the result is not above instantiate_below.
343 * graphite-scop-detection.c (scopdet_basic_block_info): Fix formatting.
344 * graphite-sese-to-poly.c (create_linear_expr_from_tree): Assert that
345 the tree has a known scalar evolution.
346 * testsuite/gfortran.dg/graphite/id-14.f: New.
347 * testsuite/gfortran.dg/graphite/id-15.f: New.
349 2009-07-28 Sebastian Pop <sebastian.pop@amd.com>
351 * sese.c (rename_variables_in_stmt): Pass in an extra parameter
353 (rename_variables): Keep inserting renames after the ones already
356 2009-07-28 Sebastian Pop <sebastian.pop@amd.com>
358 * graphite-sese-to-poly.c (compare_bb_depths): New.
359 (graphite_sort_dominated_info): New.
360 (build_scop_bbs_1): Call graphite_sort_dominated_info.
361 (build_scop_scattering): Fix comment.
363 2009-07-28 Sebastian Pop <sebastian.pop@amd.com>
365 * graphite.c (graphite_finalize): Call print_loops instead of
366 dump_function_to_file.
367 * testsuite/gcc.dg/graphite/graphite.exp: Fix formatting.
368 * testsuite/gcc.dg/graphite/pr35356-1.c: New. Look for the number of
369 loops generated in the graphite output file.
370 * testsuite/gcc.dg/graphite/pr35356-2.c: New.
371 * testsuite/gcc.dg/graphite/pr35356-3.c: New. XFAILed for now.
372 * testsuite/gfortran.dg/graphite/id-12.f: New.
374 2009-07-24 Li Feng <nemokingdom@gmail.com>
376 * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-8.c:
379 2009-07-24 Li Feng <nemokingdom@gmail.com>
380 Tobias Grosser <grosser@fim.uni-passau.de>
382 * graphite-sese-to-poly.c (pdr_add_alias_set): Use data reference's
383 alias set number build alias in ACCESSES polyhedron.
384 (build_alias_set_for_drs): New.
385 (build_pbb_drs): Added build_alias_set_for_drs.
386 * graphite-dependences.c (poly_drs_may_alias_p): New.
387 (graphite_carried_dependence_level_k): Check alias information
388 before building polyhedron.
390 2009-07-24 Tobias Grosser <grosser@fim.uni-passau.de>
392 * Makefile.in (lambda-code.o): Fix formatting.
394 2009-07-24 Tobias Grosser <grosser@fim.uni-passau.de>
396 * Merge from mainline (r149350-149952)
398 2009-07-18 Tobias Grosser <grosser@fim.uni-passau.de>
400 * graphite-poly.c (apply_poly_transforms): Move strip_mine
401 before interchange to prepare for loop blocking.
403 2009-07-18 Tobias Grosser <grosser@fim.uni-passau.de>
405 * graphite-poly.c (apply_poly_transforms): Add checks after every
407 * graphite-sese-to-poly.c (build_poly_scop): Remove check, as already
408 done in apply_poly_transforms.
410 2009-07-17 Konrad Trifunovic <konrad.trifunovic@gmail.com>
412 * graphite-dependences.c (build_lexicographically_gt_constraint):
413 Replace RES parameter with *RES.
414 (dependence_polyhedron_1): Pass an address of the parameter RES
415 instead of value of RES.
417 2009-07-16 Sebastian Pop <sebastian.pop@amd.com>
419 * graphite.c (graphite_finalize): Fix comment.
420 (graphite_transform_loops): Reset scev info after code generation
423 2009-07-16 Sebastian Pop <sebastian.pop@amd.com>
425 * graphite.c (graphite_finalize): Call scev_reset.
427 2009-07-16 Sebastian Pop <sebastian.pop@amd.com>
429 * graphite-clast-to-gimple.c (compute_cloog_iv_types): Do not create
430 GBB_CLOOG_IV_TYPES hash table twice.
431 * graphite-sese-to-poly.c (free_gimple_bb): Call free_data_refs.
432 (add_condition_to_domain): Clear GMP values.
434 2009-07-16 Sebastian Pop <sebastian.pop@amd.com>
436 * graphite-dependences.c: Fix formatting.
437 * graphite-poly.c (free_poly_dr): Also free PDR_DATA_CONTAINER.
438 (pbb_number_of_iterations): Free ppl_Linear_Expression.
439 * graphite-sese-to-poly.c: Fix formatting.
440 * graphite.c (graphite_transform_loops): Create the hash table
441 after the early return.
443 2009-07-16 Sebastian Pop <sebastian.pop@amd.com>
445 * testsuite/gcc.dg/graphite/id-14.c: New.
446 * testsuite/gcc.dg/graphite/pr40157.c: New.
447 * testsuite/gfortran.dg/graphite/id-11.f: New.
449 2009-07-16 Sebastian Pop <sebastian.pop@amd.com>
451 * graphite-sese-to-poly.c (nb_pbbs_in_loops): New.
452 (build_poly_scop): Return false when there are no pbbs within
453 loops to avoid to pass to cloog scops with no loops.
455 2009-07-16 Sebastian Pop <sebastian.pop@amd.com>
457 * graphite-sese-to-poly.c (build_pbb_scattering_polyhedrons): Avoid
458 useless test "i % 2".
459 (build_pbb_scattering_polyhedrons): Fix formatting.
460 (build_poly_dr): Same.
461 * graphite.c (graphite_transform_loops): Restructure.
463 2009-07-14 Razya Ladelsky <razya@il.ibm.com>
465 * tree-ssa-loop-manip.c (rewrite_phi_with_iv): Remove
466 reduction_list parameter.
467 (rewrite_all_phi_nodes_with_iv): Same.
468 (canonicalize_loop_ivs): Same.
469 * tree-parloops.c (struct brli): Removed.
470 (build_reduction_list_info): Removed.
471 (build_new_reduction): New.
472 (analyze_reduction_list): Removed.
473 (gather_scalar_reductions): Find reductions instead of phi
474 nodes that can't be canonicalized.
475 (try_create_reduction_list): Remove reduction_list parameter.
476 (gen_parallel_loop): Same.
477 (parallelize_loops): Remove analyze_reductions variable,
478 initialization and free.
479 Change reduction_list htab initialization to reduction_info
480 elements instead of ssa names.
481 Call try_create_reduction_list and gen_parallel_loop without
482 analyzed_reduction argument.
483 * graphite-clast-to-gimple (graphite_loop_normal_form): Call
484 canonicalize_loop_ivs with one less argument.
485 * tree-flow.h (canonicalize_loop_ivs): Remove one argument.
487 2009-07-14 Konrad Trifunovic <konrad.trifunovic@gmail.com>
489 * graphite-dependences.c (new_poly_dr_pair): New.
490 (dependence_polyhedron): Renamed into dependence_polyhedron_1.
491 (new_poly_dr_pair): New.
492 (eq_poly_dr_pair_p): New.
493 (hash_poly_dr_pair_p): New.
494 * graphite-dependences.h (struct poly_dr_pair): New.
495 (eq_poly_dr_pair_p): Declared.
496 (hash_poly_dr_pair_p): Declared.
497 * graphite-poly.c (new_scop): Initialize SCOP_ORIGINAL_PDR_PAIRS.
498 (free_scop): Free SCOP_ORIGINAL_PDR_PAIRS.
499 * graphite-poly.h (struct scop): Add original_pdr_pairs field.
500 * Makefile.in (graphite-poly.o): Add dependence on
501 graphite-dependences.h.
503 2009-07-14 Sebastian Pop <sebastian.pop@amd.com>
505 * graphite-scop-detection.c (graphite_can_represent_scev): Do not let
506 polynomials of degree > 1 pass to Graphite.
507 * tree-chrec.c (scev_is_linear_expression): Call
508 evolution_function_is_affine_multivariate_p.
509 * testsuite/gfortran.dg/graphite/id-10.f90: New.
511 2009-07-14 Sebastian Pop <sebastian.pop@amd.com>
513 * tree-scalar-evolution.c (compute_overall_effect_of_inner_loop):
514 Instantiate scevs varying in outer loops.
515 * testsuite/gfortran.dg/graphite/id-9.f: Correct testcase.
517 2009-07-14 Sebastian Pop <sebastian.pop@amd.com>
519 * graphite-sese-to-poly.c (build_loop_iteration_domains): Do not insert
520 redundant constraint.
522 2009-07-14 Sebastian Pop <sebastian.pop@amd.com>
524 * testsuite/gcc.dg/graphite/graphite.exp: Fix comments.
525 * testsuite/gfortran.dg/graphite/graphite.exp: Trigger actions
526 based on the file names as in the C testsuite.
527 * testsuite/gfortran.dg/graphite/block-1.f90: Fix patterns.
528 * testsuite/gfortran.dg/graphite/block-2.f: Same.
529 * testsuite/gfortran.dg/graphite/block-3.f90: Same.
530 * testsuite/gfortran.dg/graphite/block-4.f90: Same.
531 * testsuite/gfortran.dg/graphite/id-1.f90: Same.
532 * testsuite/gfortran.dg/graphite/id-2.f90: Same.
533 * testsuite/gfortran.dg/graphite/id-3.f90: Same.
534 * testsuite/gfortran.dg/graphite/id-4.f90: Same.
535 * testsuite/gfortran.dg/graphite/id-6.f: Same.
536 * testsuite/gfortran.dg/graphite/id-9.f: Same.
537 * testsuite/gfortran.dg/graphite/interchange-1.f: Same.
538 * testsuite/gfortran.dg/graphite/interchange-2.f: Same.
539 * testsuite/gfortran.dg/graphite/scop-1.f: Same.
541 2009-07-14 Sebastian Pop <sebastian.pop@amd.com>
543 * sese.c (expand_scalar_variables_call): New.
544 (expand_scalar_variables_ssa_name): Handle calls in expander.
546 2009-07-13 Sebastian Pop <sebastian.pop@amd.com>
548 * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-6.c:
549 Expect to see the pattern twice.
550 * testsuite/gcc.dg/graphite/interchange-0.c: Un-XFAIL.
551 * testsuite/gcc.dg/graphite/interchange-5.c: Same.
552 * testsuite/gcc.dg/graphite/interchange-6.c: Same.
554 2009-07-13 Sebastian Pop <sebastian.pop@amd.com>
556 * testsuite/gcc.dg/graphite/id-10.c: New.
557 * testsuite/gcc.dg/graphite/id-12.c: New.
558 * testsuite/gfortran.dg/graphite/id-7.f: New.
559 * testsuite/gfortran.dg/graphite/id-8.f: New.
561 2009-07-13 Sebastian Pop <sebastian.pop@amd.com>
563 * graphite-sese-to-poly.c (pdr_add_data_dimensions): Fix division by
566 2009-07-13 Sebastian Pop <sebastian.pop@amd.com>
568 * sese.c (rename_variables_in_stmt): Call fold_convert during renaming.
570 2009-07-13 Sebastian Pop <sebastian.pop@amd.com>
572 * sese.c (expand_scalar_variables_stmt): Avoid unnecessary expansion.
574 2009-07-10 Sebastian Pop <sebastian.pop@amd.com>
576 * graphite-sese-to-poly.c (pdr_add_memory_accesses): Fix order of
577 building PDR subscripts.
579 2009-07-10 Sebastian Pop <sebastian.pop@amd.com>
581 * graphite-sese-to-poly.c (pdr_add_data_dimensions): Fix the
582 computation of array sizes.
584 2009-07-10 Sebastian Pop <sebastian.pop@amd.com>
586 * graphite-sese-to-poly.c (add_param_constraints): Disabled.
588 2009-07-10 Tobias Grosser <grosser@fim.uni-passau.de>
590 * graphite-dependences.c (map_into_dep_poly, map_dr_into_dep_poly,
591 build_pairwise_constraint, dr_equality_constraints,
592 build_pairwise_scheduling_equality,
593 build_pairwise_scheduling_inequality, lexicographically_gt_p,
594 build_lexicographically_gt_constraint, dependence_polyhedron,
595 graphite_legal_transform_dr, graphite_carried_dependence_level_k):
596 Move from NNC_Polyhedron to C_Polyhedron.
597 * graphite-interchange.c (compute_array_size_poly,
598 gather_access_strides): Dito.
599 * graphite-poly.c (apply_poly_transforms, new_poly_dr, free_poly_bb,
600 free_scop, pbb_number_of_iterations): Dito.
601 * graphite-poly.h (struct poly_dr, pdr_nb_subscripts, struct poly_bb,
602 pbb_dim_iter_domain, struct scop): Dito.
603 * graphite-ppl.c (new_Constraint_System_from_Cloog_Matrix,
604 new_Cloog_Domain_from_ppl_Polyhedron,
605 new_Cloog_Domain_from_ppl_Pointset_Powerset, ppl_set_coef_gmp,
606 ppl_insert_dimensions_pointset, ppl_insert_dimensions_pointset,
607 ppl_strip_loop, ppl_strip_loop, ppl_print_polyhedron_matrix,
608 ppl_print_powerset_matrix, debug_ppl_polyhedron_matrix,
609 debug_ppl_powerset_matrix, ppl_read_polyhedron_matrix): Dito.
610 * graphite-ppl.h (ppl_Pointset_Powerset_C_Polyhedron_t,
611 new_C_Polyhedron_from_Cloog_Matrix, ppl_print_powerset_matrix,
612 debug_ppl_powerset_matrix, ppl_insert_dimensions_pointset): Dito.
613 * graphite-sese-to-poly.c (build_pbb_scattering_polyhedrons,
614 build_loop_iteration_domains, ppl_constraint_type_from_tree_code,
615 add_condition_to_domain, add_condition_to_pbb, build_scop_context,
616 build_scop_iteration_domain, build_poly_dr): Dito
618 2009-07-09 Sebastian Pop <sebastian.pop@amd.com>
620 * testsuite/gcc.dg/graphite/graphite.exp: Added a rule to execute
622 * testsuite/gcc.dg/graphite/run-id-1.c: New.
624 2009-07-09 Sebastian Pop <sebastian.pop@amd.com>
626 * graphite-sese-to-poly.c (build_loop_iteration_domains): Add the
627 positivity constraint on the symbolic number of iterations.
629 2009-07-09 Sebastian Pop <sebastian.pop@amd.com>
631 * graphite-sese-to-poly.c (build_loop_iteration_domains): Rewrite.
633 2009-07-09 Sebastian Pop <sebastian.pop@amd.com>
634 Tobias Grosser <grosser@fim.uni-passau.de>
636 * graphite-clast-to-gimple.c (build_scop_context): Removed.
637 (build_cloog_prog): Directly use SCOP_CONTEXT.
638 * graphite-poly.c (new_scop): Initialize SCOP_CONTEXT.
639 (free_scop): Free SCOP_CONTEXT.
640 (print_scop_context): New.
641 (print_scop): Call print_scop_context.
642 (debug_scop_context): New.
643 * graphite-poly.h (print_scop_context, debug_scop_context): Declared.
644 (struct scop): Added field context.
646 * graphite-sese-to-poly.c (add_param_constraints): New.
647 (build_scop_context): New.
648 (build_poly_scop): Call build_scop_context.
650 2009-07-09 Sebastian Pop <sebastian.pop@amd.com>
652 * graphite-clast-to-gimple.c (gmp_cst_to_tree): Moved...
653 * graphite-ppl.c (ppl_set_inhomogeneous_gmp, ppl_set_coef_gmp): New.
654 (ppl_set_inhomogeneous, ppl_set_coef): Moved...
655 * graphite-ppl.h: Include double-int.h and tree.h.
656 (ppl_set_inhomogeneous_gmp, ppl_set_coef_gmp): Declared.
657 (ppl_set_inhomogeneous, ppl_set_coef): ...here.
658 (gmp_cst_to_tree): ...here. Reimplemented using mpz_get_double_int.
659 (tree_int_to_gmp, ppl_set_inhomogeneous_tree, ppl_set_coef_tree): New.
661 2009-07-09 Sebastian Pop <sebastian.pop@amd.com>
663 * graphite-clast-to-gimple.c (clast_to_gcc_expression_red): Generate
664 POINTER_PLUS_EXPR for pointer types.
665 (clast_to_gcc_expression): Same.
667 2009-07-09 Sebastian Pop <sebastian.pop@amd.com>
669 * graphite-poly.c (print_scattering_function): Early return when
670 PBB_TRANSFORMED_SCATTERING is not initialized.
671 (print_pbb_domain): Early return when PBB_DOMAIN is not initialized.
673 2009-07-08 Sebastian Pop <sebastian.pop@amd.com>
675 * tree-parloops.c (analyze_reduction_list): Remove unused variable
678 2009-07-08 Razya Ladelsky <razya@il.ibm.com>
680 * tree-parloops.c (analyze_reduction_list): Change return
682 (try_create_reduction_list): Move the call to
683 analyze_reduction_list to the beginining.
684 Call reduction_phi with analyzed_reductions as argument
685 instead of reduction_list.
687 2009-07-08 Tobias Grosser <grosser@fim.uni-passau.de>
689 * Merge from mainline (r148296:149346)
691 2009-07-07 Sebastian Pop <sebastian.pop@amd.com>
693 * graphite-scop-detection.c (graphite_can_represent_init): New.
694 (graphite_can_represent_scev): Call graphite_can_represent_init:
695 check that the initial value does not contain multiplications of
697 (stmt_has_simple_data_refs_p): New.
698 (stmt_simple_for_scop_p): Call stmt_simple_for_scop_p.
699 (is_simple_operand): Fix formatting.
700 * graphite-sese-to-poly.c (try_generate_gimple_bb): Fix formatting.
702 2009-07-07 Sebastian Pop <sebastian.pop@amd.com>
704 * testsuite/gcc.dg/graphite/id-13.c: New.
705 * graphite-sese-to-poly.c (graphite_stmt_p): Do not call
706 analyze_scalar_evolution, use scalar_evolution_in_region.
707 (scan_tree_for_params_right_scev): Add extra assert.
708 (parameter_index_in_region_1): Split from parameter_index_in_region.
709 (idx_record_params): Use scalar_evolution_in_region.
710 (find_params_in_bb): Same.
711 (find_scop_parameters): Same.
712 (build_loop_iteration_domains): Same.
713 (create_linear_expr_from_tree): Same.
714 * sese.c (scalar_evolution_in_region): New.
715 * sese.h (scalar_evolution_in_region): Declared.
716 (defined_in_sese_p): New.
717 * tree-scalar-evolution.c (compute_overall_effect_of_inner_loop): Not
719 * tree-scalar-evolution.h (compute_overall_effect_of_inner_loop):
722 2009-07-07 Sebastian Pop <sebastian.pop@amd.com>
724 * Makefile.in: Replace dependences on tree-chrec.h with SCEV_H.
725 TREE_DATA_REF_H also implies SCEV_H.
727 2009-07-07 Sebastian Pop <sebastian.pop@amd.com>
729 * graphite-poly.c (print_scop_params): New.
730 (print_scop): Call print_scop_params.
731 (debug_scop_params): New.
732 * graphite-poly.h (print_scop_params, debug_scop_params): Declared.
734 2009-07-07 Li Feng <nemokingdom@gmail.com>
736 * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-4.c: New.
737 * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-5.c: New.
738 * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-6.c: New.
739 * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-7.c: New.
740 * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-8.c: New.
741 * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-9.c: New.
743 2009-07-07 Li Feng <nemokingdom@gmail.com>
745 * graphite-clast-to-gimple.c (mark_loops_parallel): Dump information
746 for dependency checking part.
747 * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-1.c: Add
748 tests for dependency checking.
749 * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-2.c: Ditto.
750 * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-3.c: Ditto.
751 * testsuite/gcc.dg/graphite/graphite_autopar/graphite_autopar.exp: Add
752 flag -fdump-tree-graphite-all for autopar testsuites.
754 2009-07-06 Sebastian Pop <sebastian.pop@amd.com>
756 * Makefile.in (tree-ssa-loop-manip.o): Depends on langhooks.h.
757 * tree-parloops.c (rewrite_phi_with_iv, rewrite_all_phi_nodes_with_iv,
758 canonicalize_loop_ivs): Moved...
759 * tree-ssa-loop-manip.c: ... here. Include langhooks.h.
761 2009-07-06 Sebastian Pop <sebastian.pop@amd.com>
763 * tree-parloops.c (try_create_reduction_list): Pass an extra
764 argument analyzed_reductions. Call analyze_reduction_list.
765 (gen_parallel_loop): Do not call analyze_reduction_list.
766 (parallelize_loops): Init and finalize analyzed_reductions.
768 2009-07-06 Li Feng <nemokingdom@gmail.com>
770 * testsuite/gcc.dg/graphite/graphite_autopar/graphite_autopar.exp:
771 Added flag -fno-loop-strip-mine for autopar testcase.
773 2009-07-04 Li Feng <nemokingdom@gmail.com>
775 * graphite-dependences.c (graphite_carried_dependence_level_k): Use
776 transformed scattering dimension instead of unmatch orignal when
777 calling dependence_polyhedron.
779 2009-06-30 Sebastian Pop <sebastian.pop@amd.com>
781 * opts.c (decode_options): Enable flag_loop_strip_mine at -O2.
783 2009-06-30 Sebastian Pop <sebastian.pop@amd.com>
785 * graphite-poly.c (pbb_number_of_iterations): Check for returned
786 value 1 from ppl_Pointset_Powerset_NNC_Polyhedron_maximize.
788 2009-06-30 Sebastian Pop <sebastian.pop@amd.com>
790 * graphite-blocking.c (pbb_strip_mine_profitable_p): New.
791 (pbb_do_strip_mine): Call pbb_strip_mine_profitable_p.
792 * graphite-poly.c (pbb_number_of_iterations): New.
793 * graphite-poly.h (pbb_number_of_iterations): Declared.
794 (pbb_iterator_dim, pbb_parameter_dim): New.
796 2009-06-29 Sebastian Pop <sebastian.pop@amd.com>
798 * graphite-clast-to-gimple.c (graphite_create_new_loop): Revert the
799 last commit on type of lower and upper bound of loops.
801 2009-06-29 Li Feng <nemokingdom@gmail.com>
803 * Makefile.in (graphite-clast-to-gimple.o): Added dependence on
804 graphite-dependences.h.
805 * graphite-clast-to-gimple.c (new_bb_pbb_def): New.
806 (mark_bb_with_pbb): New.
807 (get_stmtfor_depth): New.
808 (find_pbb_via_hash): New.
809 (dependency_in_loop_p): New.
810 (mark_loops_parallel): New.
811 (free_aux_in_new_loops): New.
812 (translate_clast): Add parameter BB_PBB_MAPPING. Mark newly created
813 bb with it's relevant pbb. Mark newly created loops. Remove mark
814 innermost loop parallel without checking.
815 (gloog): Add parameter BB_PBB_MAPPING.
816 * graphite-clast-to-gimple.h (struct bb_pbb_def): New.
817 (gloog): Change declaration.
818 (mark_loop_parallel): Make extern.
819 (free_aux_in_new_loops): Declare.
820 (bb_pbb_map_hash): New.
821 (eq_bb_pbb_map): New.
822 * graphite.c (graphite_transform_loops): Added BB_PBB_MAPPING. Trigger
823 auto parallelization when flag_graphite_force_parallel is set.
824 (graphite_finalize): Added free_aux_in_new_loops.
825 * tree-parloops.c (parallelize_loops): Only generate parallel code for
826 the innermost loop that marked parallel. Use
827 flag_graphite_force_parallel instead of loop->can_be_parallel.
828 (loop_parallel_p): Move inner most checking out of function.
830 2009-06-26 Sebastian Pop <sebastian.pop@amd.com>
832 * graphite-clast-to-gimple.c (graphite_create_new_loop): Make the
833 type of lower and upper bound of loops signed long int.
835 2009-06-26 Sebastian Pop <sebastian.pop@amd.com>
837 * cfgloopmanip.c (create_empty_loop_on_edge): Gimplify the loop exit
838 expression outside the loop.
840 2009-06-26 Sebastian Pop <sebastian.pop@amd.com>
842 * gcc.dg/graphite/interchange-8.c: New.
844 2009-06-26 Sebastian Pop <sebastian.pop@amd.com>
846 * gcc.dg/graphite/interchange-0.c: XFailed.
847 * gcc.dg/graphite/interchange-5.c: XFailed.
848 * gcc.dg/graphite/interchange-6.c: XFailed.
850 2009-06-26 Sebastian Pop <sebastian.pop@amd.com>
852 * graphite-interchange.c (compute_array_size_poly): The end of the
853 recursion should return 1.
855 2009-06-26 Sebastian Pop <sebastian.pop@amd.com>
857 * graphite-interchange.c (compute_array_size_cstr): Allow the
858 subscript multiplier to be -1.
859 (compute_array_size): Use PDR_DATA_CONTAINER and not PDR_ACCESSES.
860 * graphite-poly.c (new_poly_dr): Takes an extra argument for the
861 data_container. Initializes PDR_DATA_CONTAINER.
862 (print_pdr_access_layout): New.
863 (print_pdr): Call print_pdr_access_layout. Print PDR_DATA_CONTAINER.
864 * graphite-poly.h (struct poly_dr): Adjust comment. Add a new field
866 (PDR_DATA_CONTAINER): New.
867 (new_poly_dr): Update declaration.
868 * graphite-sese-to-poly.c (pdr_add_data_dimensions): New.
869 (build_poly_dr): Call pdr_add_data_dimensions.
871 2009-06-26 Sebastian Pop <sebastian.pop@amd.com>
873 * graphite-poly.h (struct poly_dr): Fix comment.
874 * graphite-sese-to-poly.c (pdr_add_alias_set): New.
875 (pdr_add_memory_accesses): New.
876 (build_poly_dr): Call pdr_add_memory_accesses and pdr_add_alias_set.
878 2009-06-26 Sebastian Pop <sebastian.pop@amd.com>
880 * graphite-poly.c (print_pdrs, debug_pdrs): New.
881 (print_pbb): Add call to print_pdrs.
882 * graphite-poly.h (print_pdrs, debug_pdrs): Declared.
884 2009-06-24 Konrad Trifunovic <konrad.trifunovic@gmail.com>
885 Li Feng <nemokingdom@gmail.com>
887 * graphite-dependences.c (graphite_carried_dependence_level_k): New.
888 (dependency_between_pbbs_p): New.
889 (lexicographically_gt_p): Assure !empty_p before polyhedron
891 (build_lexicographically_gt_constraint): Correct lexicographically
893 * graphite-dependences.h: New.
894 * Makefile.in (graphite-dependences.o): Add graphite-dependences.h.
896 2009-06-24 Sebastian Pop <sebastian.pop@amd.com>
898 * graphite-clast-to-gimple.c (print_clast_stmt): New.
899 (gloog): Print to dump_file the generated clast.
900 * graphite-clast-to-gimple.h (print_clast_stmt): Declared.
901 * graphite-interchange.c (pbb_do_interchange): Fix dump formatting.
903 2009-06-24 Sebastian Pop <sebastian.pop@amd.com>
905 * graphite-poly.c (extend_scattering): Increment
906 PBB_NB_LOCAL_VARIABLES by the number of added dimensions.
908 2009-06-24 Sebastian Pop <sebastian.pop@amd.com>
910 * graphite-interchange.c (compute_array_size_poly): Added exit of
911 recursion condition. Continue iterating even after the first equality.
912 (compute_array_size): Same.
914 2009-06-24 Li Feng <nemokingdom@gmail.com>
916 * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-1.c: Update
917 -fdump-tree-final_cleanup to -fdump-tree-optimized.
918 * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-2.c: Ditto.
919 * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-3.c: Ditto.
920 * testsuite/gcc.dg/graphite/graphite_autopar/graphite_autopar.exp: Ditto.
922 2009-06-23 Sebastian Pop <sebastian.pop@amd.com>
924 * sese.c (expand_scalar_variables_stmt): Expand scalar variables
925 only when the use verifies is_gimple_reg.
927 2009-06-23 Sebastian Pop <sebastian.pop@amd.com>
929 * graphite-clast-to-gimple.c (build_cloog_prog): Fix memory corruption.
930 Allocate scaldims after call to unify_scattering_dimensions.
932 2009-06-23 Sebastian Pop <sebastian.pop@amd.com>
934 * graphite-clast-to-gimple.c (translate_clast): Fix memory leak.
936 2009-06-23 Sebastian Pop <sebastian.pop@amd.com>
937 Albert Cohen <albert.cohen@inria.fr>
939 * graphite-blocking.c (pbb_strip_mine_loop_depth): Do not use local
940 variables for the strip mining.
942 2009-06-23 Sebastian Pop <sebastian.pop@amd.com>
943 Pranav Garg <pranav.garg2107@gmail.com>
945 * Makefile.in (OBJS-common): Added graphite-blocking.o.
946 (graphite-sese-to-poly.o): Moved down to be in lexicographical order.
947 (graphite-blocking.o): New rule.
948 (graphite-poly.o, graphite-ppl.o): Moved to be in lexicographical order.
949 * graphite-blocking.c: New.
950 * graphite-poly.c (apply_poly_transforms): Call scop_do_strip_mine for
951 flag_loop_strip_mine.
952 (psct_scattering_dim_for_loop_depth): New.
953 * graphite-poly.h (scop_do_strip_mine): Declared.
954 (psct_add_local_variable): Increment PBB_NB_LOCAL_VARIABLES.
955 * tree-ssa-loop.c (gate_graphite_transforms): Do not fail when using
956 flag_loop_strip_mine.
958 2009-06-23 Sebastian Pop <sebastian.pop@amd.com>
960 * graphite-poly.c (extend_scattering): Avoid initializing and freeing
961 a GMP value and a PPL coefficient at each iteration of a loop.
963 2009-06-23 Sebastian Pop <sebastian.pop@amd.com>
965 * graphite-dependences.c (dependence_polyhedron): Do not use
966 pbb_nb_scattering_dims anymore. Use pbb_nb_scattering_orig and
967 pbb_nb_scattering_transform.
968 (graphite_legal_transform_dr): Same.
969 * graphite-poly.c (extend_scattering): Same.
970 (unify_scattering_dimensions): Same.
971 (print_scattering_function): Same.
972 (new_poly_bb): Initialize PBB_NB_SCATTERING_TRANSFORM and
973 PBB_NB_LOCAL_VARIABLES.
974 * graphite-poly.h (pbb_nb_scattering): Removed declaration.
975 (struct poly_bb): Added nb_local_variables and nb_scattering_transform.
976 (PBB_NB_LOCAL_VARIABLES, PBB_NB_SCATTERING_TRANSFORM): New.
977 (pbb_nb_scattering_orig, pbb_nb_scattering_transform): New.
978 (pbb_nb_scattering_dims, pbb_nb_scattering): Removed.
979 (pbb_nb_scattering_transform): New.
980 (pbb_nb_local_vars): Return PBB_NB_LOCAL_VARIABLES.
981 (psco_scattering_dim): Add assert on parameters.
982 (psct_scattering_dim): Same.
983 (psct_scattering_dim_for_loop_depth): Declared.
984 (psct_local_var_dim): New.
985 (psco_iterator_dim, psco_parameter_dim): Add assert on parameters.
986 (psct_iterator_dim, psct_parameter_dim): Same. To maintain the
987 correct layout, call pbb_nb_local_vars.
988 (psct_add_local_variable, psct_add_scattering_dimension): New.
989 * graphite-sese-to-poly.c (build_pbb_scattering_polyhedrons):
990 Initialize PBB_NB_SCATTERING_TRANSFORM.
992 2009-06-23 Sebastian Pop <sebastian.pop@amd.com>
994 * graphite-ppl.c (set_inhomogeneous): Renamed ppl_set_inhomogeneous.
995 (set_coef): Renamed ppl_set_coef.
996 * graphite-ppl.h (ppl_set_inhomogeneous, ppl_set_coef): Declared.
998 2009-06-23 Sebastian Pop <sebastian.pop@amd.com>
1000 * graphite-dependences.c (build_pairwise_scheduling_inequality): Don't
1001 test a boolean against 1.
1002 * graphite-interchange.c (pbb_interchange_loop_depths): Do not build
1003 a new polyhedron for the PBB_TRANSFORMED_SCATTERING.
1004 (pbb_do_interchange): Returns true when a transform has been performed.
1005 (scop_do_interchange): Same.
1006 * graphite-poly.c (apply_poly_transforms): Use the return value of
1007 scop_do_interchange.
1008 * graphite-poly.h (scop_do_interchange): Update declaration.
1010 2009-06-23 Tobias Grosser <grosser@fim.uni-passau.de>
1012 * graphite-clast-to-gimple.c (gloog): Reset loop->aux right
1014 * sese.c (sese_reset_aux_in_loops): New.
1015 * sese.h (sese_reset_aux_in_loops): New.
1017 2009-06-19 Sebastian Pop <sebastian.pop@amd.com>
1019 * graphite-sese-to-poly.c (scan_tree_for_params_int): Pass in the
1020 multiplier and multiply the constant by the multiplier.
1021 (scan_tree_for_params): Bound the multiplier to its MULT_EXPR.
1022 (build_poly_dr): Do not use the multiplier to define the subscript.
1024 2009-06-19 Sebastian Pop <sebastian.pop@amd.com>
1026 * graphite-poly.c (new_poly_dr): Pass an extra argument for the
1027 compiler's data reference. Initialize PDR_CDR.
1028 (print_pdr): Call dump_data_reference.
1029 * graphite-poly.h (struct poly_dr): Rename black_box into pbb.
1030 Add compiler_dr field.
1031 (PDR_BB): Renamed PDR_PBB.
1033 * graphite-sese-to-poly.c (build_poly_dr): Pass to new_poly_dr
1034 GCC's data reference representation.
1035 * tree-data-ref.c (debug_data_references, debug_data_reference): New.
1036 * tree-data-ref.h (debug_data_references, debug_data_reference): Decl.
1038 2009-06-19 Sebastian Pop <sebastian.pop@amd.com>
1040 * graphite-poly.c (print_scattering_function): Also print the layout.
1041 * graphite-poly.h (pbb_nb_local_vars): New.
1043 2009-06-19 Sebastian Pop <sebastian.pop@amd.com>
1045 * graphite-poly.c (print_pbb_domain): Also print the layout names.
1047 2009-06-19 Sebastian Pop <sebastian.pop@amd.com>
1049 * graphite-poly.c (print_pdr, debug_pdr): New.
1050 * graphite-poly.h (print_pdr, debug_pdr): Declared.
1051 (PDR_BASE): Removed.
1053 2009-06-18 Sebastian Pop <sebastian.pop@amd.com>
1055 * gcc/testsuite/gcc.dg/graphite/interchange-{1..7}.c: New avatars of
1058 2009-06-18 Sebastian Pop <sebastian.pop@amd.com>
1060 * graphite-interchange.c (compute_subscript): Allow also -1 in the
1061 subscript identification column.
1062 (pbb_do_interchange): Print to dump_file that some loops "will be
1063 interchanged". Rely on that chain of characters in the testcases.
1064 * gcc.dg/graphite/interchange-0.c: New.
1065 * gcc.dg/graphite/graphite.exp: Iterate over the testsuite
1066 interchange-*.c files and compile them with -floop-interchange.
1068 2009-06-18 Pranav Garg <pranav.garg2107@gmail.com>
1070 * graphite-interchange.c (interchange_profitable_p): Renamed
1071 pbb_interchange_profitable_p.
1073 2009-06-18 Sebastian Pop <sebastian.pop@amd.com>
1074 Harsha Jagasia <harsha.jagasia@amd.com>
1075 Pranav Garg <pranav.garg2107@gmail.com>
1077 * graphite-interchange.c (interchange_profitable_p): Make static.
1078 (pbb_interchange_loop_depths, pbb_do_interchange,
1079 scop_do_interchange): New.
1080 * graphite-poly.c (apply_poly_transforms): Call scop_do_interchange
1081 for flag_loop_interchange.
1082 * graphite-poly.h (scop_do_interchange): Declared.
1083 * tree-ssa-loop.c (gate_graphite_transforms): Do not fail when
1084 flag_loop_interchange is used.
1086 2009-06-18 Sebastian Pop <sebastian.pop@amd.com>
1088 * graphite-dependences.c (dependence_polyhedron): Update use of
1089 pbb_nb_scattering_dims.
1090 * graphite-poly.h (pbb_nb_scattering_dims): Do not pass SCOP.
1091 (pbb_nb_scattering): Update use of pbb_nb_scattering_dims.
1092 (psco_scattering_dim, psct_scattering_dim, psco_iterator_dim,
1093 psct_iterator_dim, psco_parameter_dim, psct_parameter_dim): New.
1095 2009-06-16 Sebastian Pop <sebastian.pop@amd.com>
1097 * graphite.c: Cleanup foo.
1099 2009-06-16 Sebastian Pop <sebastian.pop@amd.com>
1101 * Merge from mainline (r143684:148293).
1102 * Disabled libpcp until it gets fixed.
1104 2009-06-05 Sebastian Pop <sebastian.pop@amd.com>
1105 Harsha Jagasia <harsha.jagasia@amd.com>
1107 * graphite-interchange.c: New.
1108 * Makefile.in (graphite-interchange.o): New.
1109 * graphite-poly.h (interchange_profitable_p): Declared.
1110 * graphite-ppl.h (value_max): New.
1112 2009-06-04 Sebastian Pop <sebastian.pop@amd.com>
1114 * graphite-dependences.c (dependence_polyhedron): Use pdr_dim.
1115 * graphite-poly.h: Fix some comments.
1119 2009-06-04 Sebastian Pop <sebastian.pop@amd.com>
1122 (pdr_accessp_nb_subscripts): Renamed pdr_nb_subscripts.
1123 (pdr_accessp_nb_iterators): Renamed pdr_dim_iter_domain.
1124 (pdr_accessp_nb_params): Renamed pdr_nb_params.
1125 (pdr_accessp_alias_set_dim): Renamed pdr_alias_set_dim.
1126 (pdr_accessp_subscript_dim): Renamed pdr_subscript_dim.
1127 (pdr_accessp_iterator_dim): Renamed pdr_iterator_dim.
1128 (pdr_accessp_param_dim): Renamed pdr_parameter_dim.
1129 (pbb_nb_loops): Renamed pbb_dim_iter_domain.
1130 * graphite-clast-to-gimple.c: Same.
1131 * graphite-dependences.c: Same.
1132 * graphite-poly.c: Same.
1133 * graphite-sese-to-poly.c: Same.
1135 2009-06-03 Sebastian Pop <sebastian.pop@amd.com>
1137 * graphite-clast-to-gimple.c (build_iv_mapping): Insert full
1138 expressions for an IV rename, as returned by clast_to_gcc_expression.
1139 (copy_renames): Rename new_name to expr.
1140 * sese.c (debug_rename_elt): Same.
1143 (sese_adjust_liveout_phis): Call force_gimple_operand before using
1144 the information from the rename map.
1145 (rename_variables_in_stmt): Same.
1146 (add_loop_exit_phis): Rename new_name to expr.
1147 (insert_loop_close_phis): Same.
1148 (add_guard_exit_phis): Same. Call force_gimple_operand.
1149 * sese.h (struct rename_map_elt): Rename new_name to expr.
1150 (new_rename_map_elt): Same.
1152 2009-06-03 Sebastian Pop <sebastian.pop@amd.com>
1154 * graphite-clast-to-gimple.c (build_iv_mapping): Use set_rename.
1155 * sese.c (set_rename): Make it extern.
1156 * sese.h (set_rename): Declared.
1158 2009-06-03 Sebastian Pop <sebastian.pop@amd.com>
1160 * graphite-poly.c (extend_scattering): Free values.
1161 * graphite-ppl.c (new_Cloog_Domain_from_ppl_Pointset_Powerset):
1163 (ppl_print_powerset_matrix): Same.
1164 * graphite-scop-detection.c (free_scops_1): New.
1165 (limit_scops): Call free_scops_1.
1166 * graphite-sese-to-poly.c (build_scop_bbs_1): Free dom.
1167 (build_poly_dr): Free PPL coefficients.
1168 * tree-parloops.c (rewrite_all_phi_nodes_with_iv): Free bbs.
1170 2009-06-02 Sebastian Pop <sebastian.pop@amd.com>
1172 * graphite-dependences.c: New.
1173 * graphite-data-ref.c: Removed.
1174 * graphite-data-ref.h: Removed.
1175 * Makefile.in (graphite-data-ref.o): Removed.
1176 (graphite-dependences.o): Added.
1177 * graphite-clast-to-gimple.c: Remove dependence on graphite-data-ref.h.
1178 * graphite-poly.c: Same.
1179 Move the data dependence testing to graphite-dependences.c.
1181 2009-05-19 Tobias Grosser <grosser@fim.uni-passau.de>
1183 * graphite-scop-detection.c (graphite_can_represent_loop): Renamed
1184 from graphite_cannot_represent_loop. Code refactored.
1185 (scopdet_basic_block_info): Call graphite_can_represent_loop.
1187 2009-05-17 Li Feng <nemokingdom@gmail.com>
1189 * testsuite/gcc.dg/graphite/graphite_autopar/graphite_autopar.exp:
1190 Cover all the testcases (not only the filtered ones).
1192 2009-05-17 Tobias Grosser <grosser@fim.uni-passau.de>
1194 * graphite-scop-detection.c (stmt_simple_for_scop_p): Remove
1195 unnecessary check. Update comments. Move check for REAL_TYPE here.
1196 (harmful_stmt_in_bb): Remove checks for conditions. This is already
1197 done in (stmt_simple_for_scop_p).
1199 2009-05-14 Tobias Grosser <grosser@fim.uni-passau.de>
1201 * graphite.c (print_global_statistics): New.
1202 (print_graphite_scop_statistic): New.
1203 (print_graphite_statistics): New.
1204 (graphite_initialize, graphite_transform_loops): Print statistics.
1205 * graphite-scop-detection (build_scops): Print statistics.
1206 (print_graphite_scop_statistics): New.
1207 (print_graphite_statistics): New.
1209 2009-05-13 Sebastian Pop <sebastian.pop@amd.com>
1211 * graphite-clast-to-gimple.c (struct clast_name_index): Removed.
1212 (debug_clast_name_index): Removed.
1213 (debug_clast_name_indexes_1): Removed.
1214 (debug_clast_name_indexes): Removed.
1215 (clast_name_index_elt_info): Removed.
1216 (eq_clast_name_indexes): Removed.
1217 (clast_name_to_index): Removed.
1218 (new_clast_name_index): Removed.
1219 (save_clast_name_index): Removed.
1220 (save_var_name): Moved...
1221 (init_sese_params_index): Removed.
1222 (clast_name_to_gcc): Remove use of name_tree.
1223 (initialize_cloog_names): Same.
1224 (gloog): Do not call init_sese_params_index.
1225 * graphite-sese-to-poly.c (save_var_name): ...here.
1226 (parameter_index_in_region): New.
1227 * sese.c (new_sese): Initialize SESE_PARAMS_NAMES.
1228 (parameter_index_in_region): Removed.
1229 (is_parameter): Remove use of name_tree.
1230 * sese.h (struct name_tree): Removed.
1231 (struct sese): Remove use of name_tree. New field params_names.
1232 (SESE_PARAMS_NAMES): New.
1233 (SESE_PARAMS): Remove duplicate.
1234 (parameter_index_in_region): Removed.
1235 (sese_nb_params): Remove use of name_tree.
1236 (struct clast_name_index): New.
1237 (new_clast_name_index): New.
1238 (clast_name_to_index): New.
1239 (save_clast_name_index): New.
1240 (debug_clast_name_index): New.
1241 (debug_clast_name_indexes_1): New.
1242 (debug_clast_name_indexes): New.
1243 (clast_name_index_elt_info): New.
1244 (eq_clast_name_indexes): New.
1246 2009-05-13 Sebastian Pop <sebastian.pop@amd.com>
1248 * graphite-clast-to-gimple.c (compute_cloog_iv_types_1): Call
1249 pbb_to_depth_to_oldiv. Remove call to oldiv_for_loop.
1250 (graphite_loop_normal_form): Do not pass region. Do not
1251 initialize SESE_OLDIVS.
1252 (build_graphite_loop_normal_form): Update call to
1253 graphite_loop_normal_form.
1254 * sese.c (debug_oldivs): Removed.
1255 (new_sese): Do not initialize SESE_OLDIVS.
1256 (free_sese): Do not free SESE_OLDIVS.
1257 (oldiv_for_loop): Removed.
1258 * sese.h (struct sese): Remove old_ivs.
1259 (SESE_OLDIVS): Removed.
1260 (oldiv_for_loop): Removed.
1262 2009-05-13 Sebastian Pop <sebastian.pop@amd.com>
1264 * graphite-clast-to-gimple.c (clast_name_to_gcc): Pass newivs,
1265 remove ivstack. Remove call to loop_iv_stack_get_iv_from_name,
1266 replaced by a call to newivs_to_depth_to_newiv.
1267 (clast_to_gcc_expression): Pass newivs, remove ivstack.
1268 (clast_to_gcc_expression_red): Same.
1269 (gcc_type_for_clast_expr): Same.
1270 (gcc_type_for_clast_eq): Same.
1271 (graphite_translate_clast_equation): Same.
1272 (graphite_create_guard_cond_expr): Same.
1273 (graphite_create_new_guard): Same.
1274 (graphite_create_new_loop): Same.
1275 (build_iv_mapping): Same.
1276 (translate_clast): Same.
1278 (loop_iv_stack_patch_for_consts): Removed. *
1279 sese.c (iv_stack_entry_is_constant): Removed.
1280 (iv_stack_entry_is_iv): Removed.
1281 (loop_iv_stack_push_iv): Removed.
1282 (loop_iv_stack_insert_constant): Removed.
1283 (loop_iv_stack_pop): Removed.
1284 (loop_iv_stack_get_iv): Removed.
1285 (loop_iv_stack_get_iv_from_name): Removed.
1286 (debug_loop_iv_stack): Removed.
1287 (free_loop_iv_stack): Removed.
1288 (loop_iv_stack_remove_constants): Removed. *
1289 sese.h (iv_stack_entry_kind): Removed.
1290 (iv_stack_entry_data_union): Removed.
1291 (iv_stack_entry_struct): Removed.
1292 (iv_stack_entry_p): Removed.
1293 (debug_oldivs, debug_loop_iv_stack, loop_iv_stack_insert_constant,
1294 loop_iv_stack_get_iv_from_name, loop_iv_stack_push_iv,
1295 loop_iv_stack_get_iv, loop_iv_stack_remove_constants,
1296 loop_iv_stack_pop, free_loop_iv_stack): Removed.
1297 (gbb_loop_at_index): Fix indenting.
1298 (gbb_loop_index): Removed.
1300 2009-05-13 Sebastian Pop <sebastian.pop@amd.com>
1302 * graphite-clast-to-gimple.c (clast_name_to_gcc): Do not use strcmp.
1303 Call clast_name_to_index.
1305 2009-05-13 Sebastian Pop <sebastian.pop@amd.com>
1307 * graphite-clast-to-gimple.c (clast_name_to_gcc): Pass region,
1308 do not pass params. Get params from SESE_PARAMS.
1309 (clast_to_gcc_expression): Same.
1310 (clast_to_gcc_expression_red): Same.
1311 (gcc_type_for_clast_eq): Same.
1312 (graphite_translate_clast_equation): Same.
1313 (graphite_create_new_loop): Same.
1314 * sese.c (rename_variables_in_stmt): Fix comment.
1316 2009-05-13 Sebastian Pop <sebastian.pop@amd.com>
1318 * graphite-clast-to-gimple.c (graphite_create_new_loop): Pass
1320 Call save_clast_name_index.
1321 (translate_clast): Pass newivs_index.
1322 (gloog): Create and free newivs_index.
1324 2009-05-13 Sebastian Pop <sebastian.pop@amd.com>
1326 * graphite-clast-to-gimple.c (clast_name_index): New structure.
1327 (clast_name_index_p): New type.
1328 (debug_clast_name_index): New.
1329 (debug_clast_name_indexes_1): New.
1330 (debug_clast_name_indexes): New.
1331 (clast_name_index_elt_info): New.
1332 (eq_clast_name_indexes): New.
1333 (clast_name_to_index): New.
1334 (new_clast_name_index): New.
1335 (save_clast_name_index): New.
1336 (init_sese_params_index): New.
1337 (gloog): Call init_sese_params_index.
1338 * graphite-clast-to-gimple.h (debug_clast_name_indexes): Declared.
1339 * sese.c (new_sese): Initialize SESE_PARAMS_INDEX.
1340 (free_sese): Free SESE_PARAMS_INDEX.
1341 * sese.h (struct sese): Add params_index.
1342 (SESE_PARAMS_INDEX): New.
1344 2009-05-13 Sebastian Pop <sebastian.pop@amd.com>
1346 * graphite-clast-to-gimple.c (newivs_to_depth_to_newiv): New.
1347 (graphite_create_new_loop): Pass the newivs vector. Push the
1348 newly created IV to newivs.
1349 (translate_clast): Pass the newivs vector.
1350 (gloog): Create and destroy the newivs vector.
1352 2009-05-13 Sebastian Pop <sebastian.pop@amd.com>
1354 * graphite-clast-to-gimple.c (pbb_to_depth_to_oldiv): New.
1355 (graphite_loop_normal_form): Initialize loop->aux with the unique
1356 IV that has been created.
1358 2009-05-13 Tobias Grosser <grosser@fim.uni-passau.de>
1360 * tree-chrec.c (evolution_function_right_is_integer_cst): Allow
1361 scev with parameters in the base part. They where forbidden
1364 2009-05-11 Li Feng <nemokingdom@gmail.com>
1366 * testsuite/gcc.dg/graphite/graphite.exp: Set different default
1367 compile options by file names.
1368 * testsuite/gcc.dg/graphite/block{0-6}.c: Remove dg-option line.
1369 * testsuite/gcc.dg/graphite/id-{1-9}.c: Ditto.
1370 * testsuite/gcc.dg/graphite/scop-{0-20}.c: Ditto.
1371 * testsuite/gcc.dg/graphite/scop-matmult.c: Ditto.
1373 2009-05-08 Li Feng <nemokingdom@gmail.com>
1375 * testsuite/gcc.dg/graphite/graphite_autopar/graphite_autopar.exp: New.
1376 * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-1.c: New.
1377 * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-2.c: New.
1378 * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-3.c: New.
1380 2009-05-07 Tobias Grosser <grosser@fim.uni-passau.de>
1382 * graphite-scop-detection (build_scops_1): Fix little bug introduced
1385 2009-05-07 Tobias Grosser <grosser@fim.uni-passau.de>
1387 * graphite-scop-detection.c (graphite_can_represent_scev): Only
1388 allow integer constant strides.
1389 (graphite_can_represent_expr): Depend on outermost_loop.
1390 (stmt_simple_memref_p, graphite_cannot_represent_loop,
1391 harmful_stmt_in_bb, is_simple_operand, stmt_simple_for_scop_p,
1392 build_scops_1): Same.
1393 (scopdet_basic_block_info): Same and insert layered SCoP
1395 (try_generate_gimple_bb): Cleanup.
1396 (build_scops): Enable data references.
1398 * testsuite/gcc.dg/graphite/id-5.c: New.
1399 * testsuite/gcc.dg/graphite/id-9.c: New.
1400 * tree-chrec.c (evolution_function_right_is_integer_cst): New.
1401 * tree-chrec.h (evolution_function_right_is_integer_cst): New.
1403 2009-05-06 Tobias Grosser <grosser@fim.uni-passau.de>
1405 * sese.c (expand_scalar_variables_ssa_name): Only build expressions,
1406 that we have not yet built for this SCoP.
1408 2009-05-06 Tobias Grosser <grosser@fim.uni-passau.de>
1410 * sese.c (expand_scalar_variables_expr): Fix expand_scalar_variables
1411 for complex numbers.
1413 2009-05-06 Tobias Grosser <grosser@fim.uni-passau.de>
1415 * graphite-ppl.c: Fix build if cloog is not available.
1417 2009-05-04 Li Feng <nemokingdom@gmail.com>
1419 * tree-parloops.c (loop_parallel_p): Remove construction of
1420 NITER and REDUCTION_LIST.
1421 (try_get_loop_niter): New.
1422 (try_create_reduction_list): New.
1423 (parallelize_loops): Bypass the failed checkings in autopar
1424 when can_be_parallel in loop structure is set to true.
1426 2009-05-01 Tobias Grosser <grosser@fim.uni-passau.de>
1428 * testsuite/gcc.dg/graphite/id-6.c: Update testcase.
1429 * testsuite/gcc.dg/graphite/scop-3.c: Dito.
1431 2009-05-01 Tobias Grosser <grosser@fim.uni-passau.de>
1433 * graphite-scop-detection.c (stmt_simple_for_scop_p):
1434 Enable EQ_EXPR and NE_EXPR again.
1436 2009-04-30 Tobias Grosser <grosser@fim.uni-passau.de>
1438 * graphite-scop-detection.c (graphite_can_represent_scev):
1439 Add check if scev is affine multivariate.
1440 (harmful_stmt_in_bb): Check if we can represent the conditions.
1441 (scopdet_basic_block_info (basic_block bb, VEC): Pass the loop to
1443 * testsuite/gcc.dg/graphite/id-7.c: New.
1445 2009-04-30 Tobias Grosser <grosser@fim.uni-passau.de>
1447 * graphite-sese-to-poly.c (bb_contains_non_iv_scalar_phi_nodes):
1448 Check all bbs in region, not only the bbs that are represented in
1450 (build_poly_scop): Add newline.
1451 * testsuite/gcc.dg/graphite/id-8.c: New.
1453 2009-04-30 Li Feng <nemokingdom@gmail.com>
1455 * cfgloop.c (alloc_loop): Initialize can_be_parallel to false
1456 when loop initialize.
1457 * cfgloop.h (struct loop): Introduce flag can_be_parallel.
1458 * common.opt: Declare flag_graphite_force_parallel.
1459 * graphite-clast-to-gimple.c (translate_clast): Mark the innermost
1461 * graphite-poly.c (apply_poly_transforms): Introduce
1462 flag_graphite_force_parallel.
1463 * tree-ssa-loop.c (gate_graphite_transforms): ditto.
1464 * toplev.c (process_options): ditto and replace a not correctly
1467 2009-04-30 Li Feng <nemokingdom@gmail.com>
1469 * graphite-clast-to-gimple.c (loop_iv_stack_patch_for_consts):
1470 Change the call of gbb_loop_at_index and/or gbb_loop_index due
1471 to the redefinition.
1472 (compute_cloog_iv_types_1): ditto.
1473 (build_iv_mapping): ditto.
1474 * graphite-sese-to-poly.c (new_gimple_bb): Remove GBB_LOOPS related
1476 (free_gimple_bb): Removed GBB_LOOPS related free part.
1477 (build_bb_loops): Removed.
1478 * sese.h (struct gimple_bb): Removed loops.
1479 (GBB_LOOPS): Removed.
1480 (gbb_loop_at_index): Instead of using GBB_LOOPS, we use sese instead.
1481 (gbb_loop_index): ditto.
1483 2009-04-24 Tobias Grosser <grosser@fim.uni-passau.de>
1485 * graphite-scop-detection.c (graphite_can_represent_scev): Do not
1486 allow non constant strides.
1487 * testsuite/gcc.dg/graphite/scop-20.c: New.
1489 2009-04-24 Sebastian Pop <sebastian.pop@amd.com>
1491 * graphite-scop-detection.c (dot_all_scops): Fix system call
1492 return value warning.
1495 2009-04-24 Sebastian Pop <sebastian.pop@amd.com>
1497 * testsuite/gcc.dg/graphite/id-6.c: Fix pattern.
1498 * testsuite/gcc.dg/graphite/scop-3.c: Same.
1500 2009-04-24 Sebastian Pop <sebastian.pop@amd.com>
1502 * graphite-poly.c (map_into_dep_poly, map_dr_into_dep_poly,
1503 build_pairwise_constraint, dr_equality_constraints,
1504 build_pairwise_scheduling_equality,
1505 build_pairwise_scheduling_inequality, lexicographically_gt_p,
1506 build_lexicographically_gt_constraint, dependence_polyhedron,
1507 graphite_legal_transform_dr, graphite_legal_transform_bb,
1508 graphite_legal_transform): New.
1509 * graphite-poly.h (graphite_legal_transform): Declared.
1510 * graphite-sese-to-poly.c (build_poly_scop): Call to
1511 graphite_legal_transform is disabled for the moment.
1513 2009-04-24 Sebastian Pop <sebastian.pop@amd.com>
1515 * graphite-poly.h (pbb_nb_scattering_dims): New.
1516 (pbb_nb_scattering): Use it.
1518 2009-04-24 Sebastian Pop <sebastian.pop@amd.com>
1520 * graphite-ppl.c (ppl_insert_dimensions_pointset): Add
1521 Pointset_Powerset version of ppl_insert_dimensions.
1522 * graphite-ppl.h (ppl_insert_dimensions_pointset): Declared.
1524 2009-04-24 Sebastian Pop <sebastian.pop@amd.com>
1526 * graphite-ppl.c (ppl_insert_dimensions): Fix formatting.
1528 2009-04-24 Sebastian Pop <sebastian.pop@amd.com>
1530 * graphite-poly.h: Fix comment.
1532 2009-04-24 Sebastian Pop <sebastian.pop@amd.com>
1534 * graphite-sese-to-poly.c (build_poly_dr): Fix data ref multiplier.
1536 2009-04-24 Tobias Grosser <grosser@fim.uni-passau.de>
1538 * sese.c (expand_scalar_variables_stmt): Only iterate over the old
1541 2009-04-24 Tobias Grosser <grosser@fim.uni-passau.de>
1543 * graphite-sese-to-poly.c (var_used_in_not_loop_header_phi_node): New.
1544 (graphite_stmt_p): Represent bbs necessary to build the phi nodes of
1547 2009-04-20 Sebastian Pop <sebastian.pop@amd.com>
1549 * graphite-scop-detection.c (stmt_simple_for_scop_p): Do not
1550 handle EQ_EXPR and NE_EXPR.
1552 2009-04-17 Tobias Grosser <grosser@fim.uni-passau.de>
1554 * graphite-poly.h (poly_dr): Fix comment.
1556 2009-04-09 Sebastian Pop <sebastian.pop@amd.com>
1557 Tobias Grosser <grosser@fim.uni-passau.de>
1559 * graphite-poly.c (new_poly_bb): Do not initialize PBB_DOMAIN
1560 with a zero dimension polyhedron.
1561 (find_scop_parameters): Move the call to scop_set_nb_params here.
1562 (build_loop_iteration_domains): Store in loop->aux the iteration
1564 (build_scop_iteration_domain): Fix PBB_DOMAIN for bbs not surrounded
1565 by any loop in scop.
1566 (build_poly_scop): Do not call scop_set_nb_params.
1568 2009-04-09 Sebastian Pop <sebastian.pop@amd.com>
1569 Tobias Grosser <grosser@fim.uni-passau.de>
1571 * graphite-sese-to-poly.c (add_condition_to_pbb): Pass code to
1572 add_condition_to_domain not GT_EXPR.
1574 2009-04-09 Tobias Grosser <grosser@fim.uni-passau.de>
1576 * graphite-ppl.c (debug_ppl_powerset_matrix): New.
1577 * graphite-ppl.h (debug_ppl_powerset_matrix): New.
1578 * graphite-sese-to-poly.c (add_condition_to_pbb): Use
1579 upper_bound_assign to calculate unions.
1580 * testsuite/gcc.dg/graphite/id-6.c: New.
1582 2009-04-09 Tobias Grosser <grosser@fim.uni-passau.de>
1584 * graphite-scop-detection.c (canonicalize_loop_closed_ssa): Do not
1585 handle abnormal edges.
1587 2009-04-09 Tobias Grosser <grosser@fim.uni-passau.de>
1589 * graphite-poly.c (new_poly_dr, free_poly_dr): New.
1590 (free_poly_bb): Also free poly_drs.
1591 * graphite-poly.h (new_poly_dr, free_poly_dr): New.
1592 (poly_dr): Polyhedron to Pointset_Powerset.
1593 (pdr_accessp_nb_subscripts): Same.
1594 * graphite-sese-to-poly.c (build_poly_dr): Same. And actually build
1597 2009-04-08 Sebastian Pop <sebastian.pop@amd.com>
1599 * graphite-clast-to-gimple.c (initialize_cloog_names): Change cloog
1600 names into more meaningful names.
1602 2009-04-08 Sebastian Pop <sebastian.pop@amd.com>
1604 * testsuite/gfortran.dg/graphite/interchange-1.c: New.
1605 * testsuite/gfortran.dg/graphite/interchange-2.c: New.
1607 2009-04-08 Sebastian Pop <sebastian.pop@amd.com>
1609 * graphite-clast-to-gimple.c (graphite_loop_normal_form): Do not build
1611 * tree-parloops.c (rewrite_phi_with_iv): New.
1612 (rewrite_all_phi_nodes_with_iv): New.
1613 (canonicalize_loop_ivs): Call them.
1615 2009-04-08 Sebastian Pop <sebastian.pop@amd.com>
1617 * graphite-sese-to-poly.c (try_generate_gimple_bb): Use
1618 graphite_find_data_references_in_stmt.
1619 * tree-data-ref.c (graphite_find_data_references_in_stmt): New.
1620 * tree-data-ref.h (graphite_find_data_references_in_stmt): Declared.
1622 2009-04-08 Sebastian Pop <sebastian.pop@amd.com>
1624 * sese.c (add_loop_exit_phis): Don't fail on non SSA_NAME renames.
1626 2009-04-08 Sebastian Pop <sebastian.pop@amd.com>
1628 * graphite-sese-to-poly.c (build_scop_bbs_1): Use bb_in_sese_p
1629 instead of bb_in_region.
1630 (flag_bb_in_region): Same. Renamed flag_bb_in_sese.
1631 (build_sese_conditions): Use flag_bb_in_sese.
1632 * sese.c (register_bb_in_sese): Removed.
1633 (new_sese): Remove initialization of SESE_REGION_BBS.
1634 (free_sese): Do not free SESE_REGION_BBS.
1635 * sese.h (struct sese): Remove field region_basic_blocks.
1636 (SESE_REGION_BBS): Removed.
1637 (bb_in_sese_p): Implement in function of bb_in_region.
1639 2009-04-08 Sebastian Pop <sebastian.pop@amd.com>
1641 * graphite-scop-detection.c (limit_scops): Deal only with single exit
1644 2009-04-08 Tobias Grosser <grosser@fim.uni-passau.de>
1646 * graphite-scop-detection.c (stmt_simple_for_scop_p): Allow NE_EXPR
1648 * graphite-sese-to-poly.c (create_linear_expr_from_tree): New.
1649 (add_condition_to_domain): New.
1650 (add_condition_to_pbb): New.
1651 (add_conditions_to_domain): Cleanup and handle of NE_EXPR and EQ_EXPR.
1652 * testsuite/gcc.dg/graphite/scop-3.c: Update number of detected SCoPs.
1654 2009-04-08 Tobias Grosser <grosser@fim.uni-passau.de>
1656 * graphite-clast-to-gimple.c (build_cloog_prog): ppl_Polyhedron ->
1657 ppl_Pointset_Powerset.
1658 * graphite-poly.c (new_poly_bb, free_poly_bb): Same.
1659 * graphite-poly.h (poly_bb): poly_bb.domain Same.
1660 (pbb_nb_loops): Same.
1661 * graphite-sese-to-poly.c (build_loop_iteration_domains,
1662 add_conditions_to_domain): Same.
1663 * graphite-ppl.c (new_Cloog_Domain_from_ppl_Pointset_Powerset): New.
1664 (ppl_print_polyhedron_matrix): ppl_Polyhedron_t ->
1665 ppl_const_Polyhedron_t.
1666 (ppl_print_powerset_matrix): New.
1667 * graphite-ppl.h (new_Cloog_Domain_from_ppl_Pointset_Powerset,
1668 ppl_print_powerset_matrix): New.
1669 (ppl_print_polyhedron_matrix): Updated.
1671 2009-04-07 Sebastian Pop <sebastian.pop@amd.com>
1673 * tree-scalar-evolution.c (analyze_scalar_evolution_1): Fix comment.
1675 2009-04-07 Sebastian Pop <sebastian.pop@amd.com>
1677 * graphite-poly.c (extend_scattering): Fix indenting. Free cstr.
1678 (print_iteration_domains, debug_iteration_domain,
1679 debug_iteration_domains): New.
1680 * graphite-poly.h (print_iteration_domains, debug_iteration_domain,
1681 debug_iteration_domains): Declared.
1682 * graphite-sese-to-poly.c (build_pbb_scattering_polyhedrons): Fix
1685 2009-04-03 Tobias Grosser <grosser@fim.uni-passau.de>
1686 Sebastian Pop <sebastian.pop@amd.com>
1688 * graphite-poly.h (print_iteration_domain): New.
1689 * graphite-sese-to-poly.c (add_conditions_to_domain): Fixed bug.
1690 (build_sese_conditions_1, build_sese_conditions_after,
1691 build_sese_conditions_before): New.
1692 (build_sese_conditions): Rewritten.
1694 2009-04-03 Sebastian Pop <sebastian.pop@amd.com>
1695 Tobias Grosser <grosser@fim.uni-passau.de>
1697 Cleanup of code generation liveouts.
1698 * graphite-clast-to-gimple.c (translate_clast): Use a single
1699 rename_map instead of one per translated statement.
1700 Do not use SESE_LIVEOUT_RENAMES.
1701 (graphite_loop_normal_form): Do not use SESE_REDUCTION_LIST.
1702 (gloog): Do not use SESE_LIVEOUT_RENAMES.
1703 * graphite-scop-detection.c (harmful_stmt_in_bb): Return the close
1704 phi node of a reduction: when a loop contains a reduction used outside
1705 the loop, there should be a scalar close phi node on the exit block.
1706 * sese.c (new_sese): Do not initialize SESE_LIVEOUT,
1707 SESE_LIVEOUT_RENAMES, and SESE_REDUCTION_LIST.
1708 (free_sese): Do not free them.
1709 (sese_build_liveouts_use): Do not use them.
1710 (sese_build_liveouts_bb): Same.
1711 (sese_build_liveouts): Same.
1712 (sese_insert_phis_for_liveouts): Same.
1713 (sese_adjust_phis_for_liveouts): Same. Renamed sese_adjust_liveout_phis.
1714 (defined_in_loop_p): New.
1715 (alive_after_loop): New.
1716 (close_phi_not_yet_inserted_p): New.
1717 (struct alep, alep_p): New.
1718 (add_loop_exit_phis): Remove from the rename_map all the names defined
1719 in the code generated loop.
1720 (insert_loop_close_phis): Traverse the rename_map passed to it.
1721 Don't use SESE_LIVEOUT_RENAMES.
1722 (default_liveout_before_guard): Renamed default_before_guard.
1723 (insert_guard_phis): Do not use SESE_LIVEOUT_RENAMES.
1724 (graphite_copy_stmts_from_block): Do not directly call set_rename.
1725 (register_sese_liveout_renames): Removed.
1726 (copy_bb_and_scalar_dependences): Do not call it.
1727 * sese.h (struct sese): Removed fields: liveout, liveout_renames, and
1729 (SESE_LIVEOUT): Removed.
1730 (SESE_LIVEOUT_RENAMES): Removed.
1731 (SESE_REDUCTION_LIST): Removed.
1732 (sese_build_liveouts): Removed.
1733 (sese_adjust_phis_for_liveouts): Renamed sese_adjust_liveout_phis.
1734 (insert_loop_close_phis): Pass a htab_t instead of a sese.
1735 (insert_guard_phis): Same.
1736 (rename_map_elt): Declare a VEC of them.
1737 * tree-parloops.c (canonicalize_loop_ivs): reduction_list contains
1738 trees not pointers to trees.
1740 Rewrite in canonical close SSA form:
1741 * graphite-scop-detection.c (contains_only_close_phi_nodes): New.
1742 (limit_scops): Close the scop after the block containing the close phi
1744 (canonicalize_loop_closed_ssa): New.
1745 (canonicalize_loop_closed_ssa_form): New.
1746 (build_scops): Call canonicalize_loop_closed_ssa_form.
1748 * graphite-sese-to-poly.c: Fix typos.
1750 2009-04-03 Sebastian Pop <sebastian.pop@amd.com>
1752 * graphite-poly.c (print_scattering_function, print_pbb_domain):
1754 (dump_gbb_conditions, dump_gbb_cases, print_iteration_domain): New.
1755 (print_pbb): Add conditions.
1757 2009-04-01 Tobias Grosser <grosser@fim.uni-passau.de>
1758 Sebastian Pop <sebastian.pop@amd.com>
1760 * graphite-scop-detection.c (bb_in_sd_region): Use bb_in_region.
1761 * graphite-sese-to-poly.c (all_non_dominated_preds_marked_p): New.
1762 (build_scop_bbs_1): New.
1763 (build_scop_bbs): Rewrite.
1764 * sese.h (bb_in_region): New.
1766 2009-03-29 Tobias Grosser <grosser@fim.uni-passau.de>
1768 * graphite-poly.c (new_poly_bb, free_poly_bb): Initialize/free
1770 (print_scop): Style.
1771 * graphite-poly.h (poly_bb): Add drs vector.
1772 (PBB_DRS): Add accessor.
1773 * graphite-sese-to-poly.c (build_poly_dr): New.
1774 (build_pbb_drs, build_scop_drs): New.
1775 (build_poly_scop): call build_scop_drs (Disabled at the moment).
1777 2009-03-29 Tobias Grosser <grosser@fim.uni-passau.de>
1779 * tree-ssa-loop.c: Include forgotten toplev.h
1781 2009-03-29 Tobias Grosser <grosser@fim.uni-passau.de>
1783 * graphite-poly.c: (apply_poly_transforms): sorry -> gcc_unreachable.
1784 * testsuite/gcc.dg/graphite/pr37883.c: Remove -floop-*
1785 * testsuite/gcc.dg/graphite/pr37928.c: Same
1786 * testsuite/gcc.dg/graphite/pr38409.c: Same
1787 * testsuite/gcc.dg/graphite/pr38498.c: Same
1788 * testsuite/gcc.dg/graphite/pr38559.c: Same
1789 * testsuite/gcc.dg/graphite/pr39335.c: Same
1790 * testsuite/gcc.dg/graphite/pr39335_1.c: Same
1791 * testsuite/gfortran.dg/graphite/block-2.f: Same
1792 * tree-ssa-loop.c (gate_graphite_transforms): Always fail if called
1795 2009-03-28 Tobias Grosser <grosser@fim.uni-passau.de>
1797 * graphite-sese-to-poly.c (ref_nb_loops, build_access_matrix_with_af,
1798 build_access_matrix, build_scop_data_accesses): Remove access function
1799 building. (We get a new version soon).
1800 (build_bb_loops, scan_tree_for_params_right_scev): Update.
1801 * sese.h (nb_loops_around_loop_in_sese): Remove.
1802 (sese_loop_depth): Do not use SESE_LOOP_NEST any more.
1804 2009-03-27 Tobias Grosser <grosser@fim.uni-passau.de>
1805 Sebastian Pop <sebastian.pop@amd.com>
1807 * graphite-scop-detection.c (struct scopdet_info): Rename last
1809 (scopdet_basic_block_info, build_scops_1): Don't use
1810 CDI_POST_DOMINATORS. CDI_POST_DOMINATORS should never be used.
1812 2009-03-26 Tobias Grosser <grosser@fim.uni-passau.de>
1813 Sebastian Pop <sebastian.pop@amd.com>
1815 * graphite-clast-to-gimple.c (gloog): Call sese_build_liveouts.
1816 * sese.c (sese_build_liveouts_use): Renamed from
1817 sese_build_livein_liveouts_use. Remove liveins.
1818 (sese_build_liveouts_bb): Renamed from sese_build_livein_liveouts_bb.
1819 Call sese_build_liveouts_use.
1820 (sese_build_liveouts): Renamed from sese_build_livein_liveouts.
1821 Call sese_build_liveouts_bb.
1822 (new_sese, free_sese): Remove liveins.
1823 (sese_add_exit_phis_var): Deleted.
1824 (sese_insert_phis_for_liveouts): Call sese_add_exit_phis_edge
1826 (graphite_copy_stmts_from_block): Remove SESE_NUM_VER.
1828 * sese.h (sese): Remove num_ver and livein.
1829 (SESE_LIVEIN, SESE_LIVEIN_VER, SESE_NUM_VER): Removed.
1831 2009-03-25 Tobias Grosser <grosser@fim.uni-passau.de>
1833 * graphite-sese-to-poly.c (build_scop_scattering): Fix compile.
1835 2009-03-25 Tobias Grosser <grosser@fim.uni-passau.de>
1837 * graphite-sese-to-poly.c (compare_prefix_loops): Removed.
1838 (build_scop_scattering): Do not use compare_prefix_loops any more.
1839 (nb_common_loops): New.
1841 2009-03-24 Sebastian Pop <sebastian.pop@amd.com>
1843 * sese.c (get_new_name_from_old_name): Renamed get_rename.
1844 (register_old_and_new_names): Renamed set_rename.
1846 2009-03-24 Sebastian Pop <sebastian.pop@amd.com>
1848 * graphite-scop-detection.h (nb_reductions_in_loop): Revert removal
1849 of the decl from the previous commit.
1851 2009-03-24 Sebastian Pop <sebastian.pop@amd.com>
1853 * graphite-scop-detection.c (dot_scop): New.
1854 * graphite-scop-detection.h (dot_scop): Declared.
1856 2009-03-24 Sebastian Pop <sebastian.pop@amd.com>
1858 * graphite-sese-to-poly.c (compare_prefix_loops): Fix compare.
1860 2009-03-24 Sebastian Pop <sebastian.pop@amd.com>
1862 * cfgloopmanip.c (create_empty_loop_on_edge): Generate the loop exit
1863 condition at the end of the loop.
1864 * graphite.c (graphite_initialize, graphite_finalize): Print to
1865 dump_file the compiled function.
1866 * graphite-clast-to-gimple.c (graphite_create_new_loop): Update use
1867 of create_empty_loop_on_edge.
1868 (translate_clast): Update the code generation of loops for the new
1870 * cfgloop.h (create_empty_loop_on_edge): Update declaration.
1872 2009-03-24 Sebastian Pop <sebastian.pop@amd.com>
1874 Reverted the patch from 2009-03-19.
1876 2009-03-19 Tobias Grosser <grosser@fim.uni-passau.de>
1878 * graphite-poly.c (new_poly_bb, free_poly_bb): Initialize/free
1880 (print_scop): Style.
1881 * graphite-poly.h (poly_bb): Add drs vector.
1882 (PBB_DRS): Add accessor.
1883 * graphite-sese-to-poly.c (ref_nb_loops): Remove.
1884 (build_access_matrix_with_af, build_access_matrix,
1885 build_scop_data_accesses): Delete.
1886 (build_poly_dr): New.
1887 (build_pbb_drs, build_scop_drs): New.
1888 (build_poly_scop): call build_scop_drs.
1890 2009-03-13 Sebastian Pop <sebastian.pop@amd.com>
1892 * graphite-scop-detection.c (dot_all_scops_1): Close the table
1893 once per basic block.
1895 2009-03-13 Tobias Grosser <grosser@fim.uni-passau.de>
1897 * graphite-scop-detection.c (graphite_can_represent_scev): New.
1898 (graphite_can_represent_expr): Renamed from loop_affine_expr
1900 (stmt_simple_for_scop_p): Call graphite_can_represent_expr.
1901 (graphite_cannot_represent_loop): Add scop_entry to parameters.
1902 (scopdet_basic_block_info): Actually define entry_block.
1903 (stmt_simple_memref_p): Moved here from ...
1905 * tree-data-ref.c (stmt_simple_memref_p): here.
1906 * tree-data-ref.h (stmt_simple_memref_p): Removed.
1908 2009-03-13 Tobias Grosser <grosser@fim.uni-passau.de>
1910 * testsuite/gcc.dg/graphite/id-4.c: New.
1912 2009-03-12 Sebastian Pop <sebastian.pop@amd.com>
1914 * sese.c (expand_scalar_variables_expr): Handle tcc_comparison.
1915 (register_old_and_new_names): Update the content of the map.
1916 When there was already a rename_map_elt in the map at that
1918 (copy_bb_and_scalar_dependences): Do rename_variables after
1919 expand_scalar_variables.
1920 * graphite-clast-to-gimple.c (build_iv_mapping): Update the content
1921 of the map. When there was already a rename_map_elt in the
1922 map at that location, free it.
1923 (translate_clast): Pass the rename_map. Do not initialize and free
1924 a rename_map per stmt_user.
1925 (gloog): Initialize and free one rename_map and pass it to
1928 2009-03-12 Sebastian Pop <sebastian.pop@amd.com>
1930 * sese.c (expand_scalar_variables_stmt,
1931 expand_scalar_variables_ssa_name): Add a gimple_stmt_iterator
1933 (expand_scalar_variables_expr): Handle REALPART_EXPR and IMAGPART_EXPR.
1934 (expand_scalar_variables): Pass to expand_scalar_variables_stmt
1935 the gimple_stmt_iterator of the statement to be expanded.
1936 * graphite-scop-detection.c (is_simple_operand): Do handle
1939 2009-03-11 Tobias Grosser <grosser@fim.uni-passau.de>
1941 * graphite-scop-detection.c (is_simple_operand): Do not handle
1943 * testsuite/gcc.dg/graphite/id-2.c: New.
1945 * graphite-sese-to-poly.c (build_bb_loops,
1946 add_value_to_dim, scan_tree_for_params_right_scev,
1947 scan_tree_for_params_int, scan_tree_for_params, idx_record_params,
1948 find_params_in_bb, build_loop_iteration_domains,
1949 add_conditions_to_domain): Remove subtract.
1951 2009-03-11 Tobias Grosser <grosser@fim.uni-passau.de>
1953 * graphite-clast-to-gimple.c (loop_iv_stack_patch_for_consts,
1954 build_iv_mapping, compute_cloog_iv_types_1, build_cloog_prog):
1955 pbb_loop_at_index -> gbb_loop_at_index.
1956 * graphite-poly.c (new_poly_bb, new_scop): New accessors.
1957 (debug_loop_vec): Delete.
1958 * graphite-poly.h (poly_bb, scop): Change black_box and region to void
1959 pointer. Move LOOPS to gimple_bb_p and insert nb_params.
1960 (PBB_LOOPS): Removed.
1961 (PBB_BLACK_BOX): Insert cast.
1962 (pbb_set_black_box): New setter.
1963 (pbb_loop_at_index, pbb_loop_index): Removed.
1964 (scop_set_region, scop_set_nb_params): New.
1965 * graphite-sese-to-poly.c (new_gimple_bb, free_gimple_bb,
1966 build_scop_scattering, build_bb_loops): Add GBB_LOOPS.
1967 (build_poly_scop): Use scop_set_nb_params.
1968 * sese.h (gimple_bb): Add LOOPS.
1969 (GBB_LOOPS, gbb_loop_index, gbb_loop_at_index): New.
1971 2009-03-11 Tobias Grosser <grosser@fim.uni-passau.de>
1973 Revert previous commit.
1975 2009-03-11 Sebastian Pop <sebastian.pop@amd.com>
1977 * sese.c (expand_scalar_variables_expr): Handle tcc_comparison.
1978 (register_old_and_new_names): Update the content of the map.
1979 When there was already a rename_map_elt in the map at that
1981 (copy_bb_and_scalar_dependences): Do rename_variables after
1982 expand_scalar_variables.
1983 * graphite-clast-to-gimple.c (build_iv_mapping): Update the content
1984 of the map. When there was already a rename_map_elt in the
1985 map at that location, free it.
1986 (translate_clast): Pass the rename_map. Do not initialize and free
1987 a rename_map per stmt_user.
1988 (gloog): Initialize and free one rename_map and pass it to
1991 2009-03-11 Tobias Grosser <grosser@fim.uni-passau.de>
1993 Remove forgotten line in revert.
1995 2009-03-11 Sebastian Pop <sebastian.pop@amd.com>
1997 Revert previous commit.
1999 2009-03-10 Sebastian Pop <sebastian.pop@amd.com>
2001 * sese.c (register_old_and_new_names): Update the content
2002 of the map. When there was already a rename_map_elt in the
2003 map at that location, free it.
2004 (copy_bb_and_scalar_dependences): Do rename_variables after
2005 expand_scalar_variables.
2006 * graphite-clast-to-gimple.c (build_iv_mapping): Update the content
2007 of the map. When there was already a rename_map_elt in the
2008 map at that location, free it.
2009 (translate_clast): Pass the rename_map. Do not initialize and free
2010 a rename_map per stmt_user.
2011 (gloog): Initialize and free one rename_map and pass it to
2014 2009-03-10 Sebastian Pop <sebastian.pop@amd.com>
2016 * graphite-clast-to-gimple.c (translate_clast): context_loop
2019 2009-03-10 Tobias Grosser <grosser@fim.uni-passau.de>
2020 Sebastian Pop <sebastian.pop@amd.com>
2022 * graphite-ppl.c (ppl_insert_dimensions): Fix stupid mistake
2023 of the use of ppl_Polyhedron_map_space_dimensions.
2025 2009-03-10 Tobias Grosser <grosser@fim.uni-passau.de>
2026 Sebastian Pop <sebastian.pop@amd.com>
2028 * graphite-poly.c (unify_scattering_dimensions): Fix types.
2029 * graphite-poly.h (poly_dr_p, poly_dr, POLY_DR_TYPE, PDR_BB,
2030 PDR_TYPE, PDR_ACCESSES, pdr_accessp_nb_subscripts,
2031 pdr_accessp_nb_iterators, pdr_accessp_nb_params,
2032 pdr_accessp_alias_set_dim, pdr_accessp_subscript_dim,
2033 pdr_accessp_iterator_dim, pdr_accessp_param_dim,
2034 pbb_nb_params): New.
2035 (pbb_nb_loops, pbb_nb_scattering, scop_nb_params,
2036 nb_loops_around_pbb): Adapt return types.
2038 2009-03-09 Tobias Grosser <grosser@fim.uni-passau.de>
2040 * Makefile.in (graphite.o, graphite-sese-to-poly.o,
2041 graphite-clast-to-gimple.o, graphite-data-ref.o,
2042 graphite-scop-detection.o, graphite-poly.o): Add
2045 2009-03-05 Tobias Grosser <grosser@fim.uni-passau.de>
2047 * Makefile.in (graphite.o, graphite-sese-to-poly.o,
2048 graphite-clast-to-gimple.o, graphite-data-ref.o,
2049 graphite-scop-detection.o, graphite-poly.o): Add graphite-poly.h.
2051 2009-03-04 Tobias Grosser <grosser@fim.uni-passau.de>
2053 * testsuite/gcc.dg/graphite/pr37485.c: Remove -floop-block
2054 * testsuite/gcc.dg/graphite/pr37828.c: Same.
2055 * testsuite/gcc.dg/graphite/pr37684.c: Same.
2056 * testsuite/gcc.dg/graphite/block-0.c: Same.
2057 * testsuite/gcc.dg/graphite/block-1.c: Same.
2058 * testsuite/gcc.dg/graphite/block-2.c: Same.
2059 * testsuite/gcc.dg/graphite/block-3.c: Same.
2060 * testsuite/gcc.dg/graphite/block-4.c: Same.
2061 * testsuite/gcc.dg/graphite/block-5.c: Same.
2062 * testsuite/gcc.dg/graphite/block-6.c: Same.
2063 * testsuite/gfortran.dg/graphite/pr38083.f90: Same.
2064 * testsuite/gfortran.dg/graphite/block-1.f90: Same.
2065 * testsuite/gfortran.dg/graphite/block-3.f90: Same.
2066 * testsuite/gfortran.dg/graphite/pr37852.f90: Same.
2067 * testsuite/gfortran.dg/graphite/block-4.f90: Same.
2068 * testsuite/gfortran.dg/graphite/pr37980.f90: Same.
2069 * testsuite/gfortran.dg/graphite/pr38953.f90: Same.
2070 * testsuite/gfortran.dg/graphite/pr37857.f90: Same.
2071 * opts.c: Remove -floop-block from -O2.
2072 * graphite-poly.c: Fail if -floop-block -floop-interchange or
2073 -floop-strip-mine are used.
2075 2009-03-04 Tobias Grosser <grosser@fim.uni-passau.de>
2076 Sebastian Pop <sebastian.pop@amd.com>
2078 * graphite-clast-to-gimple.c (build_cloog_prog): Unify scattering
2080 * graphite-poly.c (pbb_compare, graphite_sort_pbbs,
2081 graphite_trans_bb_move_loop, graphite_trans_bb_strip_mine,
2082 strip_mine_profitable_p, is_interchange_valid,
2083 graphite_trans_bb_block, graphite_trans_loop_block,
2084 graphite_trans_scop_block): Temporary removed.
2085 (extend_scattering, unify_scattering_dimensions): New.
2086 (print_scattering_function, graphite_read_transforms):
2087 PBB_SCATTERING -> PBB_TRANSFORMED_SCATTERING.
2088 (graphite_generate_scattering_fns): Removed.
2089 (apply_poly_transforms): Cleanup.
2090 (free_poly_bb): Add PBB_SCATTERING -> PBB_TRANSFORMED_SCATTERING.
2091 (schedule_to_scattering): Moved.
2092 (PBB_STATIC_SCHEDULE, PBB_SCATTERING): Removed.
2093 (PBB_ORIGINAL_SCATTERING, PBB_TRANSFORMED_SCATTERING): New.
2094 (pbb_nb_scattering): New.
2095 (SCOP_ENTRY, SCOP_EXIT, SCOP_REGION_BBS, SCOP_DEP_GRAPH, SCOP_PARAMS,
2096 SCOP_LOOP_NEST, SCOP_PARAMS, SCOP_OLDIVS, SCOP_LIVEOUT_RENAMES):
2098 * graphite-ppl.c (ppl_insert_dimensions): Extended and renamed from
2100 (ppl_strip_loop): PBB_SCATTERING -> PBB_TRANSFORMED_SCATTERING.
2101 * graphite-scop-detection.c (dot_all_scops_1): PBB_SCATTERING
2102 -> PBB_TRANSFORMED_SCATTERING.
2103 * graphite-sese-to-poly.c (build_scop_bbs): Remove region.
2104 (build_pbb_scattering_polyhedron): Moved from schedule_to_scattering.
2105 (build_scop_scattering): Renamed from build_scop_canonical_schedules.
2106 (check_poly_representation): Do not return bool.
2107 (graphite_transform_loops): Reformat.
2108 * sese.h (SESE_ENTRY_BB, SESE_EXIT_BB): New.
2110 2009-03-04 Sebastian Pop <sebastian.pop@amd.com>
2112 * graphite-poly.c (print_pbb_domain, print_pbb, print_scop,
2113 debug_pbb_domain, debug_pbb, debug_scop): New.
2114 * graphite-poly.h (print_pbb_domain, print_pbb, print_scop,
2115 debug_pbb_domain, debug_pbb, debug_scop): Declared.
2117 2009-03-02 Sebastian Pop <sebastian.pop@amd.com>
2120 * tree-parloops.c (canonicalize_loop_ivs): Call fold_convert
2121 when the type precision of the induction variable should be
2122 larger than the type precision of nit.
2123 (gen_parallel_loop): Update use of canonicalize_loop_ivs.
2124 * graphite-clast-to-gimple.c (graphite_loop_normal_form): Same.
2125 * tree-flow.h (canonicalize_loop_ivs): Update declaration.
2127 * testsuite/gcc.dg/graphite/pr39335_1.c: New.
2128 * testsuite/gcc.dg/graphite/pr39335.c: New.
2130 2009-03-02 Sebastian Pop <sebastian.pop@amd.com>
2132 * tree-parloops.c (canonicalize_loop_ivs): reduction_list contains
2133 SSA_NAMES not struct reduction_info.
2135 2009-03-02 Sebastian Pop <sebastian.pop@amd.com>
2137 * sese.c (expand_scalar_variables_expr): Handle ADDR_EXPR.
2139 2009-02-27 Sebastian Pop <sebastian.pop@amd.com>
2140 Tobias Grosser <grosser@fim.uni-passau.de>
2142 * sese.c (new_sese): Initialize SESE_REDUCTION_LIST.
2143 (free_sese): Free SESE_REDUCTION_LIST.
2144 * sese.h (struct sese): Add field reduction_list.
2145 (SESE_REDUCTION_LIST): New.
2146 * graphite-clast-to-gimple.c (graphite_loop_normal_form): Call
2147 canonicalize_loop_ivs on SESE_REDUCTION_LIST.
2149 2009-02-27 Sebastian Pop <sebastian.pop@amd.com>
2150 Tobias Grosser <grosser@fim.uni-passau.de>
2152 * tree-flow.h (gather_scalar_reductions): Use struct loop * instead
2155 2009-02-27 Sebastian Pop <sebastian.pop@amd.com>
2156 Tobias Grosser <grosser@fim.uni-passau.de>
2158 * tree-parloops.c (struct brli, build_reduction_list_info,
2159 analyze_reduction_list, gather_scalar_reductions): New.
2160 (loop_parallel_p): Build a reduction list containing only
2161 PHI_RESULT SSA_NAMEs: call gather_scalar_reductions.
2162 (gen_parallel_loop): Call the analysis analyze_reduction_list.
2163 (parallelize_loops): Now reduction_list is a htab_t of SSA_NAMEs.
2164 * tree-flow.h (gather_scalar_reductions): Declared.
2166 2009-02-26 Sebastian Pop <sebastian.pop@amd.com>
2169 * graphite-clast-to-gimple.c (graphite_loop_normal_form): Do not call
2170 number_of_iterations_exit from a gcc_assert.
2172 2009-02-25 Sebastian Pop <sebastian.pop@amd.com>
2173 Jan Sjodin <jan.sjodin@amd.com>
2175 * output.h (graphite_out_file, graphite_in_file): Declared.
2176 * toplev.c (graphite_out_file, graphite_in_file): New.
2177 (init_asm_output): Initialize graphite_in_file and graphite_out_file.
2178 * graphite-clast-to-gimple.c (build_cloog_prog): Read PBB_SCATTERING.
2179 Don't call schedule_to_scattering.
2180 * common.opt (fgraphite-write, fgraphite-read): New.
2181 * graphite-poly.c: Include output.h.
2182 (print_scattering_function, print_scattering_functions,
2183 debug_scattering_function, debug_scattering_functions,
2184 graphite_write_transforms, graphite_read_transforms,
2185 graphite_generate_scattering_fns): New.
2186 (apply_poly_transforms): Do not apply transform if flag_graphite_read.
2187 Call graphite_generate_scattering_fns, graphite_write_transforms,
2188 graphite_read_transforms.
2189 (new_poly_bb): Initialize PBB_SCATTERING.
2190 (free_poly_bb): Free PBB_SCATTERING.
2191 (schedule_to_scattering): Does not return, initialize PBB_SCATTERING.
2192 * graphite-poly.h (struct poly_bb): Add field scattering.
2193 (PBB_SCATTERING): New.
2194 (print_scattering_function, print_scattering_functions,
2195 debug_scattering_function, debug_scattering_functions): Declared.
2196 * graphite-ppl.c (cloog_matrix_to_ppl_constraint): Matrices contain
2197 GMP values, not integers!
2198 (ppl_print_polyhedron_matrix, debug_ppl_polyhedron_matrix,
2199 ppl_read_polyhedron_matrix): New.
2200 * graphite-ppl.h (ppl_print_polyhedron_matrix,
2201 debug_ppl_polyhedron_matrix,
2202 ppl_read_polyhedron_matrix): Declared.
2203 * Makefile.in (graphite-poly.o): Depends on output.h.
2205 2009-02-23 Sebastian Pop <sebastian.pop@amd.com>
2206 Tobias Grosser <grosser@fim.uni-passau.de>
2209 * graphite-scop-detection.c (stmt_simple_for_scop_p): Analyze
2210 scalar evolutions in the scop_entry->loop_father.
2212 2009-02-23 Sebastian Pop <sebastian.pop@amd.com>
2213 Tobias Grosser <grosser@fim.uni-passau.de>
2215 * graphite.h (ref_nb_loops): Remove declaration.
2216 (struct gimple_bb, gimple_bb_p, GBB_BB, GBB_DATA_REFS, GBB_CONDITIONS,
2217 GBB_CONDITION_CASES, GBB_CLOOG_IV_TYPES, gbb_loop, print_gimple_bb,
2218 debug_gbb): Moved to sese.h.
2221 2009-02-23 Sebastian Pop <sebastian.pop@amd.com>
2222 Tobias Grosser <grosser@fim.uni-passau.de>
2224 * graphite-data-ref.[ch]: Disable.
2226 2009-02-23 Sebastian Pop <sebastian.pop@amd.com>
2227 Tobias Grosser <grosser@fim.uni-passau.de>
2229 * graphite-scop-detection.c (stmt_simple_for_scop_p): Analyze
2230 scalar evolutions in the scop_entry->loop_father.
2232 2009-02-23 Sebastian Pop <sebastian.pop@amd.com>
2234 * graphite-scop-detection.c (nb_reductions_in_loop): Moved here...
2235 (graphite_cannot_represent_loop_niter): Renamed
2236 graphite_cannot_represent_loop. Call nb_reductions_in_loop.
2237 (limit_scops): build_sese_loop_nests does not return a bool.
2238 * graphite-scop-detection.h (nb_reductions_in_loop): Declared.
2239 * sese.c (nb_reductions_in_loop): ... from here.
2240 (graphite_loop_normal_form): ... from here.
2241 (sese_record_loop): Does not fail, so does not return a bool.
2242 (build_sese_loop_nests): Same.
2243 * sese.h (build_sese_loop_nests): Update declaration.
2244 * graphite-clast-to-gimple.c (graphite_loop_normal_form): Moved here...
2245 (build_graphite_loop_normal_form): New.
2246 (gloog): Call build_graphite_loop_normal_form.
2247 * graphite-sese-to-poly.c (build_poly_scop): Don't fail on
2248 build_sese_loop_nests.
2250 * testsuite/gcc.dg/graphite/id-1.c: New.
2252 2009-02-23 Sebastian Pop <sebastian.pop@amd.com>
2253 Tobias Grosser <grosser@fim.uni-passau.de>
2255 * graphite-sese-to-poly.c (scan_tree_for_params): Remove REAL_CST.
2256 The SCoP detection fix is sufficient.
2258 2009-02-21 Sebastian Pop <sebastian.pop@amd.com>
2260 PR tree-optimization/39260
2261 * graphite-scop-detection.c (harmful_stmt_in_bb): Stop a SCoP when
2262 the basic block contains a condition with a real type.
2263 * graphite-sese-to-poly.c (scan_tree_for_params): Handle REAL_CST.
2265 * gcc.dg/graphite/pr39260.c: New.
2267 2009-02-21 Sebastian Pop <sebastian.pop@amd.com>
2269 * graphite-poly.c: Inlcude params.h.
2270 (graphite_trans_loop_block): Use PARAM_LOOP_BLOCK_TILE_SIZE for
2272 * Makefile.in (graphite-poly.o): Depend on PARAMS_H.
2273 * params.def (PARAM_LOOP_BLOCK_TILE_SIZE): Define.
2275 2009-02-20 Sebastian Pop <sebastian.pop@amd.com>
2276 Tobias Grosser <grosser@fim.uni-passau.de>
2278 * graphite-scop-detection.c (dot_all_scops_1,
2279 dot_all_scops): Moved here.
2280 * graphite-scop-detection.h (dot_all_scops): Declared here.
2281 * graphite.c (graphite_initialize, graphite_finalize): New.
2282 (graphite_transform_loops): Cleaned up.
2283 * sese.c (debug_oldivs): Moved here.
2284 * graphite-poly.c (graphite_apply_transformations): Renamed
2285 apply_poly_transforms.
2286 (debug_loop_vec): Moved here.
2287 * graphite-sese-to-poly.c (build_bb_loops, build_sese_conditions_1,
2288 scop_contains_non_iv_scalar_phi_nodes, build_sese_conditions,
2289 find_scop_parameters, build_scop_iteration_domain,
2290 add_conditions_to_constraints, build_scop_canonical_schedules,
2291 build_scop_data_accesses): Now static.
2292 (build_poly_scop, check_poly_representation): New.
2294 2009-02-20 Sebastian Pop <sebastian.pop@amd.com>
2296 * graphite.c (graphite_stmt_p, new_gimple_bb, free_gimple_bb,
2297 remove_gbbs_in_scop, free_scops, try_generate_gimple_bb,
2298 build_scop_bbs, ref_nb_loops, compare_prefix_loops,
2299 build_scop_canonical_schedules, build_bb_loops, add_value_to_dim,
2300 scan_tree_for_params_right_scev, scan_tree_for_params_int,
2301 scan_tree_for_params, struct irp_data, dx_record_params,
2302 find_params_in_bb, find_scop_parameters, gbb_from_bb,
2303 build_loop_iteration_domains, add_conditions_to_domain,
2304 phi_node_is_iv, bb_contains_non_iv_scalar_phi_nodes,
2305 scop_contains_non_iv_scalar_phi_nodes, build_sese_conditions_1,
2306 build_sese_conditions, add_conditions_to_constraints,
2307 build_scop_iteration_domain, build_access_matrix_with_af,
2308 build_access_matrix,
2309 build_scop_data_accesses): Moved to graphite-sese-to-poly.c.
2311 * graphite-sese-to-poly.c: New.
2312 * graphite-sese-to-poly.h: New.
2314 * Makefile.in: Add new rule for graphite-sese-to-poly.o.
2316 2009-02-20 Sebastian Pop <sebastian.pop@amd.com>
2318 * graphite.c: Split graphite code generation to a new file.
2319 (graphite_verify, gmp_cst_to_tree, clast_name_to_gcc,
2320 max_precision_type, clast_to_gcc_expression_red,
2321 clast_to_gcc_expression, gcc_type_for_clast_expr,
2322 gcc_type_for_clast_eq, loop_iv_stack_patch_for_consts,
2323 graphite_translate_clast_equation, graphite_create_guard_cond_expr,
2324 graphite_create_new_guard, clast_get_body_of_loop,
2325 gcc_type_for_cloog_iv, gcc_type_for_iv_of_clast_loop,
2326 graphite_create_new_loop, build_iv_mapping, copy_renames,
2327 translate_clast, find_cloog_iv_in_expr, compute_cloog_iv_types_1,
2328 compute_cloog_iv_types, free_scattering, save_var_name,
2329 initialize_cloog_names, build_scop_context, build_cloog_prog,
2330 set_cloog_options, debug_clast_stmt, scop_to_clast,
2331 print_generated_program, debug_generated_program,
2332 gloog): Moved to graphite-clast-to-gimple.c.
2334 (struct cloog_prog_clast): Moved to graphite-clast-to-gimple.h.
2336 (iv_stack_entry_is_constant, iv_stack_entry_is_iv,
2337 loop_iv_stack_push_iv, loop_iv_stack_insert_constant,
2338 loop_iv_stack_pop, loop_iv_stack_get_iv,
2339 loop_iv_stack_get_iv_from_name, debug_loop_iv_stack,
2340 free_loop_iv_stack, loop_iv_stack_remove_constants,
2341 debug_rename_elt, debug_rename_map_1, debug_rename_map,
2342 rename_map_elt_info, eq_rename_map_elts, debug_ivtype_elt,
2343 debug_ivtype_map_1, debug_ivtype_map, ivtype_map_elt_info,
2344 eq_ivtype_map_elts, sese_add_exit_phis_edge,
2345 sese_add_exit_phis_var, sese_insert_phis_for_liveouts,
2346 get_vdef_before_sese, sese_adjust_vphi,
2347 get_new_name_from_old_name, sese_adjust_phis_for_liveouts,
2348 oldiv_for_loop, rename_variables_in_stmt, is_parameter,
2349 is_iv, expand_scalar_variables_ssa_name,
2350 expand_scalar_variables_expr, expand_scalar_variables_stmt,
2351 expand_scalar_variables, rename_variables, remove_condition,
2352 get_true_edge_from_guard_bb, get_false_edge_from_guard_bb,
2353 add_loop_exit_phis, insert_loop_close_phis, struct igp,
2354 default_liveout_before_guard, add_guard_exit_phis,
2355 insert_guard_phis, register_old_and_new_names,
2356 graphite_copy_stmts_from_block, register_sese_liveout_renames,
2357 copy_bb_and_scalar_dependences, outermost_loop_in_sese,
2358 if_region_set_false_region, create_if_region_on_edge,
2359 move_sese_in_condition): Moved to sese.c.
2361 (nb_loops_around_loop_in_sese, struct ifsese, if_region_entry,
2362 if_region_exit, if_region_get_condition_block,
2363 struct rename_map_elt, new_rename_map_elt, enum iv_stack_entry_kind,
2364 union iv_stack_entry_data_union, struct iv_stack_entry_struct,
2365 iv_stack_entry_p, loop_iv_stack, struct ivtype_map_elt,
2366 ivtype_map_elt, new_ivtype_map_elt,
2367 recompute_all_dominators): Moved to sese.h.
2369 * graphite-clast-to-gimple.c: New.
2370 * graphite-clast-to-gimple.h: New.
2371 * Makefile.in: Add new rule for graphite-clast-to-gimple.o.
2372 * sese.c: Modified as said above.
2375 2009-02-20 Sebastian Pop <sebastian.pop@amd.com>
2377 * graphite.c: Split scop detection to a new file.
2378 (enum gbb_type, gbb_type, get_bb_type, struct sd_region_p, sd_region,
2379 move_sd_regions, loop_affine_expr, exclude_component_ref,
2380 is_simple_operand, stmt_simple_for_scop_p, harmful_stmt_in_bb,
2381 graphite_cannot_represent_loop_niter, struct scopdet_info,
2382 scopdet_basic_block_info, build_scops_1, bb_in_sd_region,
2383 find_single_entry_edge, find_single_exit_edge,
2384 create_single_entry_edge, sd_region_without_exit,
2385 create_single_exit_edge, unmark_exit_edges, mark_exit_edges,
2386 create_sese_edges, build_graphite_scops, limit_scops, build_scops):
2387 Moved to graphite-scop-detection.c.
2389 * graphite-scop-detection.c: New.
2390 * graphite-scop-detection.h: New.
2391 * Makefile.in: Add new rule for graphite-scop-detection.o.
2393 * sese.c: Include tree-chrec.h, tree-data-ref.h, and
2394 tree-scalar-evolution.h.
2395 (nb_reductions_in_loop, graphite_loop_normal_form, sese_record_loop,
2396 build_sese_loop_nests): Moved here from graphite.c.
2397 (param_index): Renamed parameter_index_in_region.
2399 2009-02-18 Tobias Grosser <grosser@fim.uni-passau.de>
2400 Sebastian Pop <sebastian.pop@amd.com>
2402 * gcc.dg/graphite/block-0.c: Expected to fail now.
2403 * gcc.dg/graphite/block-1.c: Same.
2404 * gcc.dg/graphite/block-5.c: Same.
2405 * gcc.dg/graphite/block-6.c: Same.
2407 2009-02-18 Tobias Grosser <grosser@fim.uni-passau.de>
2408 Sebastian Pop <sebastian.pop@amd.com>
2410 * graphite.h: Separate from graphite_bb_p the polyhedral
2411 representation in poly_bb_p and the GCC specifics in gimple_bb_p.
2412 (struct data_dependence_polyhedron, RDGE_DDP, ddp_p): Moved to
2413 graphite-data-ref.h.
2414 (struct poly_bb, PBB_SCOP, PBB_STATIC_SCHEDULE, PBB_DOMAIN,
2415 PBB_BLACK_BOX, PBB_LOOPS, pbb_nb_loops, pbb_loop_at_index,
2416 pbb_loop_index, struct scop, SCOP_BBS, SCOP_REGION, SCOP_ENTRY,
2417 SCOP_EXIT, SCOP_REGION_BBS, SCOP_DEP_GRAPH, SCOP_PARAMS,
2418 SCOP_LOOP_NEST, SCOP_PARAMS, SCOP_OLDIVS, SCOP_LIVEOUT_RENAMES,
2419 scop_nb_params): Moved to graphite-poly.h.
2420 * graphite-data-ref.c: Same.
2421 * graphite-data-ref.h: New.
2423 (pbb_compare, graphite_sort_pbbs, graphite_trans_bb_move_loop,
2424 graphite_trans_bb_strip_mine, strip_mine_profitable_p,
2425 is_interchange_valid, graphite_trans_bb_block,
2426 graphite_trans_loop_block, scop_max_loop_depth,
2427 graphite_trans_scop_block, graphite_apply_transformations,
2428 new_poly_bb, free_poly_bb, new_scop, free_scop): Moved to
2430 * graphite-poly.h: New.
2431 * graphite-poly.c: New.
2432 * Makefile.in (OBJS-common): Add graphite-poly.o.
2433 (graphite-poly.o): New rule.
2434 * tree-data-ref.h (struct data_reference): Remove unused scop field.
2437 2009-02-18 Sebastian Pop <sebastian.pop@amd.com>
2438 Tobias Grosser <grosser@fim.uni-passau.de>
2440 * graphite.c: Replace gb -> gbb.
2442 * graphite-data-ref.c: Same.
2444 2009-02-18 Sebastian Pop <sebastian.pop@amd.com>
2445 Tobias Grosser <grosser@fim.uni-passau.de>
2447 * Makefile.in (OBJS-commmon): Add sese.o.
2449 (graphite.o): Add sese.h.
2450 * graphite.c (bb_in_ss_p, loop_in_sese_p,
2451 sese_build_livein_liveouts_use, sese_build_livein_liveouts_bb,
2452 sese_build_livein_liveouts, register_bb_in_sese, new_sese, free_sese):
2454 (block_before_scop): Add missing return.
2455 (new_scop, free_scop): Remove SESE data structures.
2456 (scop_record_loop, scan_tree_for_params, find_params_in_bb,
2457 find_scop_parameters, build_loop_iteration_domains,
2458 add_conditions_to_domain, register_scop_liveout_renames,
2459 copy_bb_and_scalar_dependences): Scop -> SESE.
2461 (add_conditions_to_domain): SCoP -> SESE and remove check
2462 (scop_contains_non_iv_scalar_phi_nodes): New.
2463 (build_scop_conditions_1, build_scop_conditions): Remove check for
2464 non iv scalar phi nodes.
2465 (print_scop_statistics): New.
2466 (graphite_transform_loops): Cleanup.
2468 * graphite.h: Move to sese & cleanup.
2472 2009-02-16 Sebastian Pop <sebastian.pop@amd.com>
2473 Tobias Grosser <grosser@fim.uni-passau.de>
2475 * graphite.c (build_scop_conditions_1): Conditions are only
2476 at the end of a basic block.
2478 2009-02-16 Sebastian Pop <sebastian.pop@amd.com>
2479 Tobias Grosser <grosser@fim.uni-passau>
2481 * graphite.h (struct graphite_bb): Remove compressed_alpha_matrix
2483 (GBB_ALPHA): Removed.
2485 2009-02-16 Sebastian Pop <sebastian.pop@amd.com>
2486 Tobias Grosser <grosser@fim.uni-passau.de>
2488 * graphite-data-ref.c (graphite_test_dependence): Don't use
2489 GBB_DYNAMIC_SCHEDULE.
2490 * graphite.c (new_graphite_bb): Same.
2491 (free_graphite_bb): Same.
2492 (build_scop_dynamic_schedules): Removed.
2493 (graphite_transform_loops): Don't call it.
2494 * graphite.h (struct graphite_bb): Remove dynamic_schedule field.
2495 (GBB_DYNAMIC_SCHEDULE): Removed.
2497 2009-02-16 Sebastian Pop <sebastian.pop@amd.com>
2498 Tobias Grosser <grosser@fim.uni-passau.de>
2500 * graphite.c (schedule_to_scattering): Don't use CloogMatrix.
2501 (print_graphite_bb): Same.
2502 (build_cloog_prog): Same.
2504 2009-02-16 Sebastian Pop <sebastian.pop@amd.com>
2505 Tobias Grosser <grosser@fim.uni-passau.de>
2507 * graphite.c (build_cloog_prog): Don't use CloogMatrix.
2509 2009-02-16 Sebastian Pop <sebastian.pop@amd.com>
2510 Tobias Grosser <grosser@fim.uni-passau.de>
2512 * graphite.c (build_scop_context): Don't use CloogMatrix.
2513 * graphite-ppl.c (new_Cloog_Domain_from_ppl_Polyhedron): New.
2514 * graphite-ppl.h (new_Cloog_Domain_from_ppl_Polyhedron): Declared.
2516 2009-02-16 Sebastian Pop <sebastian.pop@amd.com>
2517 Tobias Grosser <grosser@fim.uni-passau.de>
2519 * graphite.h (struct scop): Move params, old_ivs, loops, loop_nest,
2520 liveout_renames, add_params fields...
2521 (struct sese): ... here.
2522 (SESE_PARAMS, SESE_LOOPS, SESE_LOOP_NEST, SESE_ADD_PARAMS,
2523 SESE_PARAMS, SESE_OLDIVS, SESE_LIVEOUT_RENAMES): New.
2525 2009-02-16 Sebastian Pop <sebastian.pop@amd.com>
2526 Tobias Grosser <grosser@fim.uni-passau.de>
2528 * graphite.c (print_scop): Do not print the CLooG program.
2529 (new_scop, free_scop, initialize_cloog_names, build_scop_context,
2530 build_cloog_prog, gloog): Don't use SCOP_PROG.
2531 (find_transform): Renamed scop_to_clast.
2532 (print_generated_program, debug_generated_program): New.
2533 (graphite_transform_loops): Adapt to new interface.
2534 * graphite.h (struct scop): Remove program field.
2535 (SCOP_PROG): Removed.
2536 (print_generated_program, debug_generated_program): Declared.
2538 2009-02-16 Sebastian Pop <sebastian.pop@amd.com>
2540 * graphite-data-ref.c (schedule_precedes_p, schedule_same_p): New.
2541 (statement_precedes_p): Use schedule_same_p and schedule_precedes_p.
2542 * graphite.c (gbb_compare, schedule_to_scattering, print_graphite_bb,
2543 free_graphite_bb, build_scop_canonical_schedules,
2544 graphite_trans_bb_strip_mine, graphite_trans_scop_block): Static
2545 schedules are now represented using a ppl_Linear_Expression_t.
2546 * graphite.h (struct graphite_bb): Same.
2547 * graphite-ppl.c (ppl_lexico_compare_linear_expressions): New.
2548 * graphite-ppl.h (ppl_lexico_compare_linear_expressions): Declared.
2550 2009-02-15 Sebastian Pop <sebastian.pop@amd.com>
2552 * graphite.c: Free local memory.
2553 * graphite-ppl.c: Same.
2555 2009-02-15 Sebastian Pop <sebastian.pop@amd.com>
2557 * graphite.c (const_column_index, get_first_matching_sign_row_index,
2558 get_lower_bound_row, get_upper_bound_row, copy_constraint,
2559 swap_constraint_variables, scale_constraint_variable): Removed.
2560 (graphite_trans_bb_strip_mine): Remove pong.
2561 * graphite-ppl.c: Include missing header files.
2562 (set_inhomogeneous, set_coef, shift_poly, ppl_strip_loop): New.
2563 * graphite-ppl.h (ppl_strip_loop): Declared.
2564 * Makefile.in (graphite-ppl.o): Adjust dependences.
2566 2009-02-14 Sebastian Pop <sebastian.pop@amd.com>
2568 * graphite.c (build_loop_iteration_domains): Remove ping pong.
2569 (build_scop_iteration_domain): Same.
2571 2009-02-13 Sebastian Pop <sebastian.pop@amd.com>
2573 * graphite.c (scan_tree_for_params, add_conditions_to_domain): Remove
2575 (add_value_to_dim, scan_tree_for_params_right_scev,
2576 scan_tree_for_params_int): New.
2577 * graphite-ppl.c (oppose_constraint): New.
2578 (insert_constraint_into_matrix): Implement missing cases.
2579 * graphite-ppl.h (insert_constraint_into_matrix): Declared.
2581 2009-02-13 Sebastian Pop <sebastian.pop@amd.com>
2583 * graphite.c (graphite_trans_bb_move_loop): Remove ping pong,
2584 use ppl_move_dimension.
2586 2009-02-12 Sebastian Pop <sebastian.pop@amd.com>
2588 * graphite-data-ref.c: Domains are now ppl_Polyhedra_t.
2591 * graphite-ppl.c: Same.
2592 * graphite-ppl.h: Same.
2594 2009-02-12 Sebastian Pop <sebastian.pop@amd.com>
2596 Revert last 3 commits.
2598 2009-02-10 Sebastian Pop <sebastian.pop@amd.com>
2600 * graphite.c (scan_tree_for_params, add_conditions_to_domain): Remove
2602 (add_value_to_dim, scan_tree_for_params_right_scev,
2603 scan_tree_for_params_int): New.
2604 * graphite-ppl.c (oppose_constraint): New.
2605 (insert_constraint_into_matrix): Implement missing cases.
2606 * graphite-ppl.h (insert_constraint_into_matrix): Declared.
2608 2009-02-10 Sebastian Pop <sebastian.pop@amd.com>
2610 * graphite.c (graphite_trans_bb_move_loop): Remove unused variables.
2612 2009-02-10 Sebastian Pop <sebastian.pop@amd.com>
2613 Tobias Grosser <grosser@fim.uni-passau.de>
2615 * graphite.c (graphite_trans_bb_move_loop): Remove ping pong,
2616 use ppl_move_dimension.
2617 * graphite-ppl.c (ppl_move_dimension): New.
2618 * graphite-ppl.h (ppl_move_dimension): Declared.
2620 2009-02-10 Sebastian Pop <sebastian.pop@amd.com>
2622 * graphite.c: Do not include cloog/cloog.h.
2623 (print_graphite_bb): Remove ping pong, call PPL print function.
2625 2009-02-10 Tobias Grosser <grosser@fim.uni-passau.de>
2627 * Makefile.in (OBJS-common): Add graphite-ppl.o.
2628 (graphite.o): Add dependence on graphite-ppl.h.
2629 (graphite-ppl.o): New.
2630 (graphite-data-ref.c): Ping pong between PPL data structures
2632 * graphite-ppl.c: New.
2633 * graphite-ppl.h: New.
2634 * graphite.c: Include graphite-ppl.h.
2635 (print_graphite_bb, add_conditions_to_domain, build_cloog_prog,
2636 graphite_trans_bb_move_loop, graphite_trans_bb_strip_mine):
2637 Ping pong between PPL data structures and matrices.
2638 (new_graphite_bb): Create a PPL constraint system.
2639 Call ppl_delete_Constraint_System instead of cloog_matrix_free.
2640 (build_loop_iteration_domains): Use PPL functions.
2641 * graphite.h: Include graphite-ppl.h. Fix comments.
2642 (graphite_bb): Use a ppl_Constraint_System_t instead of
2643 CloogMatrix for representing the domain.
2644 (scop): Remove static_schedule.
2645 (gbb_nb_loops): Ping pong between PPL data structures and matrices.
2647 2009-02-06 Sebastian Pop <sebastian.pop@amd.com>
2649 * graphite.c: Fix some comments.
2651 2009-02-05 Sebastian Pop <sebastian.pop@amd.com>
2654 * graphite.c (if_region_set_false_region): After moving a region
2655 in the false branch of a condition, remove the empty dummy
2657 (gloog): Remove wrong fix for PR38953.
2659 2009-02-03 Tobias Grosser <grosser@fim.uni-passau.de>
2661 * graphite.c (bb_in_sese_p, sese_build_livein_liveouts_use,
2662 sese_build_livein_liveouts_bb, sese_build_livein_liveouts,
2663 register_bb_in_sese, new_sese, free_sese): Moved.
2664 (dot_scop_1, build_scop_loop_nests, build_loop_iteration_domains,
2665 outermost_loop_in_scop, build_scop_iteration_domain,
2666 expand_scalar_variables_ssa_name, get_vdef_before_scop,
2667 limit_scops): Use bb_in_sese_p instead of bb_in_scop_p.
2668 Use loop_in_sese_p instead of loop_in_scop_p.
2669 (new_graphite_bb, new_scop, gloog): Do not initialize SCOP_BBS_B.
2670 (free_scop): Do not free SCOP_BBS_B.
2671 (nb_loops_around_loop_in_scop, nb_loops_around_gb,
2672 ref_nb_loops): Moved here...
2673 * graphite.h (ref_nb_loops): ... from here.
2674 (struct scop): Remove bbs_b bitmap.
2675 (SCOP_BBS_B, bb_in_scop_p, loop_in_scop_p): Removed.
2676 * testsuite/gcc.dg/graphite/scop-19.c: New
2678 2009-02-03 Tobias Grosser <grosser@fim.uni-passau.de>
2680 * graphite.c (scopdet_basic_block_info): Fix bug in scop
2683 2009-01-30 Tobias Grosser <grosser@fim.uni-passau.de>
2685 * graphite.c (new_loop_to_cloog_loop_str, hash_loop_to_cloog_loop,
2686 eq_loop_to_cloog_loop): Remove.
2687 (new_scop, free_scop): Remove SCOP_LOOP2CLOOG_LOOP.
2688 * graphite.h (struct scop): Remove loop2cloog_loop.
2689 (loop_domain_dim, loop_iteration_vector_dim): Remove.
2691 2009-01-30 Tobias Grosser <grosser@fim.uni-passau.de>
2693 * opts.c (decode_options): Only add graphite options to O2
2694 if we compile with graphite enabled.
2696 2009-01-26 Sebastian Pop <sebastian.pop@amd.com>
2698 * Merge from mainline (r143163:143684).
2700 2009-01-26 Sebastian Pop <sebastian.pop@amd.com>
2702 * graphite.c (debug_value): Removed.
2703 * graphite.h (debug_value): Removed.
2705 2009-01-23 Sebastian Pop <sebastian.pop@amd.com>
2707 * passes.c (init_optimization_passes): Do not call pass_copy_prop
2708 after graphite: pass_copy_prop does not maintain a proper loop closed
2709 SSA form. pass_copy_prop should be fixed.
2711 2009-01-23 Sebastian Pop <sebastian.pop@amd.com>
2713 * graphite.c (scop_adjust_phis_for_liveouts): Fix warning.
2715 2009-01-23 Sebastian Pop <sebastian.pop@amd.com>
2717 * graphite.c (graphite_verify): Add a call to verify_loop_closed_ssa.
2718 (gloog): Split the exit of the scop when the scop exit is a loop exit.
2719 (graphite_transform_loops): Only call cleanup_tree_cfg if gloog
2722 2009-01-20 Sebastian Pop <sebastian.pop@amd.com>
2724 * graphite.c (gloog): Return true when code gen succeeded.
2725 (graphite_transform_loops): Do not call cleanup_tree_cfg if
2726 the code of the function did not changed. After cleanup_tree_cfg
2727 call rewrite_into_loop_closed_ssa to maintain the loop closed ssa
2730 2009-01-19 Sebastian Pop <sebastian.pop@amd.com>
2732 * graphite.c (stmt_simple_for_scop_p): Also handle cases when
2733 gimple_call_lhs is NULL.
2735 2009-01-16 Sebastian Pop <sebastian.pop@amd.com>
2736 Tobias Grosser <tobi.grosser@amd.com>
2738 * graphite.c (graphite_trans_scop_block): Do not block single
2741 2009-01-15 Sebastian Pop <sebastian.pop@amd.com>
2742 Tobias Grosser <tobi.grosser@amd.com>
2744 * graphite.c (build_scop_canonical_schedules): Start schedules at
2747 2009-01-15 Sebastian Pop <sebastian.pop@amd.com>
2748 Tobias Grosser <tobi.grosser@amd.com>
2750 * graphite.c (compare_prefix_loops): New.
2751 (build_scop_canonical_schedules): Rewritten.
2752 (graphite_transform_loops): Move build_scop_canonical_schedules
2753 after build_scop_iteration_domain.
2755 2009-01-14 Sebastian Pop <sebastian.pop@amd.com>
2756 Tobias Grosser <tobi.grosser@amd.com>
2758 * graphite.c (add_conditions_to_domain): Add the loops to
2759 the dimension of the iteration domain. Do copy the domain
2760 only when it exists.
2761 (build_scop_conditions_1): Do not call add_conditions_to_domain.
2762 (add_conditions_to_constraints): New.
2763 (can_generate_code_stmt, can_generate_code): Removed.
2764 (gloog): Do not call can_generate_code.
2765 (graphite_transform_loops): Call add_conditions_to_constraints
2766 after building the iteration domain.
2768 2009-01-14 Sebastian Pop <sebastian.pop@amd.com>
2769 Tobias Grosser <tobi.grosser@amd.com>
2770 Jan Sjodin <jan.sjodin@amd.com>
2772 * graphite.c (scan_tree_for_params): On substractions negate
2773 all the coefficients of the term.
2774 (clast_to_gcc_expression_red): New. Handle reduction expressions
2775 of more than two operands.
2776 (clast_to_gcc_expression): Call clast_to_gcc_expression_red.
2777 (get_vdef_before_scop): Handle also the case of default definitions.
2779 2009-01-14 Sebastian Pop <sebastian.pop@amd.com>
2782 * graphite.c (get_vdef_before_scop, scop_adjust_vphi): New.
2783 (scop_adjust_phis_for_liveouts): Call scop_adjust_vphi.
2784 (gloog): Do not call cleanup_tree_cfg.
2785 (graphite_transform_loops): Call cleanup_tree_cfg after all
2786 scops have been code generated.
2788 2009-01-13 Sebastian Pop <sebastian.pop@amd.com>
2790 * passes.c (init_optimization_passes): Schedule after
2791 graphite transforms pass_copy_prop, pass_dce_loop and pass_lim.
2793 2009-01-13 Sebastian Pop <sebastian.pop@amd.com>
2795 * graphite.c (expand_scalar_variables_stmt): Do not pass loop_p.
2797 (expand_scalar_variables_ssa_name): Do not pass loop_p. Fix comment.
2798 Set the type of an expression to the type of its assign statement.
2799 (expand_scalar_variables_expr): Do not pass loop_p.
2800 Fix comment. Stop recursion on tcc_constant or tcc_declaration.
2801 (copy_bb_and_scalar_dependences): Do not pass loop_p.
2802 (translate_clast): Update call to copy_bb_and_scalar_dependences.
2804 2009-01-11 Sebastian Pop <sebastian.pop@amd.com>
2806 * graphite.c (expand_scalar_variables_ssa_name): Set the type of
2807 an expression to the gimple_expr_type of its assign statement.
2808 (expand_scalar_variables_expr): Stop recursion on tcc_constant
2811 2009-01-11 Sebastian Pop <sebastian.pop@amd.com>
2813 PR tree-optimization/38786
2814 * testsuite/gcc.dg/graphite/pr38786.c: New.
2815 * graphite.c (expand_scalar_variables_ssa_name): New, outlined from
2816 the SSA_NAME case of expand_scalar_variables_expr.
2817 (expand_scalar_variables_expr): Also gather the scalar computation
2818 used to index the memory access.
2819 (expand_scalar_variables_stmt): Pass to expand_scalar_variables_expr
2820 the gimple_stmt_iterator where it inserts new code.
2822 2009-01-10 Sebastian Pop <sebastian.pop@amd.com>
2824 * testsuite/gcc.dg/graphite/block-3.c: Fix compile error on 32bit.
2826 2009-01-10 Sebastian Pop <sebastian.pop@amd.com>
2828 * opts.c (decode_options): Enable flag_graphite_identity and
2829 flag_loop_block in -O2 and above.
2831 2009-01-08 Sebastian Pop <sebastian.pop@amd.com>
2833 * libjava/classpath/lib/gnu/java/awt/peer/gtk/GtkMouseInfoPeer.class:
2834 Fix merge problem: replace with the file from trunk.
2836 2009-01-08 Sebastian Pop <sebastian.pop@amd.com>
2838 * Merge from mainline (r141727:143163).
2840 2009-01-07 Sebastian Pop <sebastian.pop@amd.com>
2841 Jan Sjodin <jan.sjodin@amd.com>
2843 PR tree-optimization/38559
2844 * testsuite/gcc.dg/graphite/pr38559.c: New.
2846 * graphite.c (debug_value, copy_constraint,
2847 swap_constraint_variables, scale_constraint_variable, ): New.
2848 (get_lower_bound, get_upper_bound): Removed.
2849 (graphite_trans_bb_strip_mine): Clean up this code that works
2850 only for constant number of iterations. Fully copy upper and
2851 lower bound constraints, not only the constant part of them.
2852 * graphite.h (debug_value): Declared.
2854 2009-01-06 Jan Sjodin <jan.sjodin@amd.com>
2856 PR tree-optimization/38492
2857 PR tree-optimization/38498
2858 * tree-check.c (operator_is_linear, scev_is_linear_expression): New.
2859 * tree-chrec.h (scev_is_linear_expression): Declared.
2860 * graphite.c (graphite_cannot_represent_loop_niter): New.
2861 (scopdet_basic_block_info): Call graphite_cannot_represent_loop_niter.
2862 (graphite_loop_normal_form): Use gcc_assert.
2863 (scan_tree_for_params): Use CASE_CONVERT.
2864 (phi_node_is_iv, bb_contains_non_iv_scalar_phi_nodes): New.
2865 (build_scop_conditions_1): Call bb_contains_non_iv_scalar_phi_nodes.
2866 Use gcc_assert. Discard scops that contain unhandled cases.
2867 (build_scop_conditions): Return a boolean status for unhandled cases.
2868 (strip_mine_profitable_p): Print the loop number, not its depth.
2869 (is_interchange_valid): Pass the depth of the loop nest, don't
2870 recompute it wrongly.
2871 (graphite_trans_bb_block): Same.
2872 (graphite_trans_bb_block): Print tentative of loop blocking.
2873 (graphite_trans_scop_block): Do not print that the loop has been
2875 (graphite_transform_loops): Do not handle scops that contain condition
2878 * testsuite/gcc.dg/graphite/pr38500.c: Fixed warning as committed
2880 * testsuite/gcc.dg/graphite/block-0.c: Update test.
2881 * testsuite/gcc.dg/graphite/block-1.c: Same.
2882 * testsuite/gcc.dg/graphite/block-2.c: Remove xfail and test for
2884 * testsuite/gcc.dg/graphite/block-4.c: Remove test for strip mine.
2885 * testsuite/gcc.dg/graphite/block-3.c: New.
2886 * testsuite/gcc.dg/graphite/pr38498.c: New.
2888 2008-12-22 Harsha Jagasia <harsha.jagasia@amd.com>
2890 PR tree-optimization/38510
2891 * gcc.dg/graphite/pr38510.c: New.
2892 * graphite.c (recompute_all_dominators): Call mark_irreducible_loops.
2893 (translate_clast): Call recompute_all_dominators before
2895 (gloog): Call recompute_all_dominators before graphite_verify.
2897 2008-12-12 Sebastian Pop <sebastian.pop@amd.com>
2899 PR tree-optimization/38492
2900 * graphite.c (rename_map_elt, debug_rename_elt,
2901 debug_rename_map_1, debug_rename_map, new_rename_map_elt,
2902 rename_map_elt_info, eq_rename_map_elts,
2903 get_new_name_from_old_name, bb_in_sese_p): Moved around.
2904 (sese_find_uses_to_rename_use): Renamed sese_build_livein_liveouts_use.
2905 (sese_find_uses_to_rename_bb): Renamed sese_build_livein_liveouts_bb.
2906 (sese_build_livein_liveouts): New.
2907 (new_sese, free_sese): New.
2908 (new_scop): Call new_sese.
2909 (free_scop): Call free_sese.
2910 (rename_variables_from_edge, rename_phis_end_scop): Removed.
2911 (register_old_new_names): Renamed register_old_and_new_names.
2912 (register_scop_liveout_renames, add_loop_exit_phis,
2913 insert_loop_close_phis, struct igp,
2914 default_liveout_before_guard, add_guard_exit_phis,
2915 insert_guard_phis, copy_renames): New.
2916 (translate_clast): Call insert_loop_close_phis and insert_guard_phis.
2917 (sese_add_exit_phis_edge): Renamed scop_add_exit_phis_edge.
2918 (rewrite_into_sese_closed_ssa): Renamed scop_insert_phis_for_liveouts.
2919 (scop_adjust_phis_for_liveouts): New.
2920 (gloog): Call scop_adjust_phis_for_liveouts.
2922 * graphite.h (struct sese): Documented. Added fields liveout,
2924 (SESE_LIVEOUT, SESE_LIVEIN, SESE_LIVEIN_VER, SESE_NUM_VER): New.
2925 (new_sese, free_sese, sese_build_livein_liveouts): Declared.
2926 (struct scop): Added field liveout_renames.
2927 (SCOP_LIVEOUT_RENAMES): New.
2929 2008-12-11 Sebastian Pop <sebastian.pop@amd.com>
2931 PR tree-optimization/38409
2932 * gcc.dg/graphite/pr38409.c: New.
2933 * graphite.c (nb_reductions_in_loop): Use simple_iv.
2935 2008-12-11 Sebastian Pop <sebastian.pop@amd.com>
2937 * graphite.c (gcc_type_for_cloog_iv): By default return
2939 (graphite_create_new_loop): Don't fold_convert the already
2940 fold_convert-ed expression.
2942 2008-12-11 Harsha Jagasia <harsha.jagasia@amd.com>
2944 PR tree-optimization/38446
2945 * gcc.dg/graphite/pr38446.c: New.
2946 * graphite.c (register_bb_in_sese): New.
2947 (bb_in_sese_p): Check if bb belongs to sese region by explicitly
2948 looking at the bbs in the region.
2949 * graphite.h (sese): Add region_basic_blocks pointer set to
2950 structure and initialize at the time of defining new scop.
2952 2008-12-11 Tobias Grosser <grosser@fim.uni-passau.de>
2954 * graphite.c (new_graphite_bb): Initialize GBB_STATIC_SCHEDULE.
2955 (find_params_in_bb): Do not free data refs.
2956 (free_graphite_bb): Add FIXME on disabled free_data_refs.
2958 2008-12-11 Sebastian Pop <sebastian.pop@amd.com>
2960 * testsuite/gcc.dg/graphite/scop-16.c: Test only scop specific info.
2961 * testsuite/gcc.dg/graphite/scop-17.c: Same.
2962 * testsuite/gcc.dg/graphite/block-5.c: New.
2963 * testsuite/gcc.dg/graphite/block-6.c: New.
2964 * testsuite/gcc.dg/graphite/pr37485.c: Clean dump file after.
2965 * testsuite/gcc.dg/graphite/pr37684.c: Same.
2966 * testsuite/gcc.dg/graphite/block-2.c: Same.
2968 * graphite.c (struct ivtype_map_elt): New.
2969 (debug_ivtype_elt, debug_ivtype_map_1, debug_ivtype_map,
2970 new_ivtype_map_elt, ivtype_map_elt_info, eq_ivtype_map_elts,
2971 gcc_type_for_cloog_iv): New.
2972 (loop_iv_stack_patch_for_consts): Use the type of the induction
2973 variable from the original loop, except for the automatically
2974 generated loops, i.e., in the case of a strip-mined loop, in
2975 which case there is no original loop: in that case just use
2977 (new_graphite_bb): Initialize GBB_CLOOG_IV_TYPES.
2978 (free_graphite_bb): Free GBB_CLOOG_IV_TYPES.
2979 (clast_name_to_gcc): Accept params to be NULL.
2980 (clast_to_gcc_expression): Take an extra parameter for the type.
2981 Convert to that type all the expressions built by this function.
2982 (gcc_type_for_clast_expr, gcc_type_for_clast_eq): New.
2983 (graphite_translate_clast_equation): Compute the type of the
2984 clast_equation before translating its LHS and RHS.
2985 (clast_get_body_of_loop, gcc_type_for_iv_of_clast_loop): New.
2986 (graphite_create_new_loop): Compute the type of the induction
2987 variable before translating the lower and upper bounds and before
2988 creating the induction variable.
2989 (rename_variables_from_edge, rename_phis_end_scop): New.
2990 (copy_bb_and_scalar_dependences): Call rename_phis_end_scop.
2991 (sese_add_exit_phis_edge): Do not use integer_zero_node.
2992 (find_cloog_iv_in_expr, compute_cloog_iv_types_1,
2993 compute_cloog_iv_types): New.
2994 (gloog): Call compute_cloog_iv_types before starting the
2995 translation of the clast.
2997 * graphite.h (struct graphite_bb): New field cloog_iv_types.
2998 (GBB_CLOOG_IV_TYPES): New.
2999 (debug_ivtype_map): Declared.
3000 (oldiv_for_loop): New.
3002 2008-12-10 Tobias Grosser <grosser@fim.uni-passau.de>
3005 * graphite.c (new_scop): Initialize SCOP_ADD_PARAMS.
3006 (param_index): Assert if parameter is not know after parameter
3008 (find_params_in_bb): Detect params directly in GBB_CONDITIONS.
3009 (find_scop_parameters): Mark, that we have finished parameter
3011 (graphite_transform_loops): Move condition detection before parameter
3013 * graphite.h (struct scop): Add SCOP_ADD_PARAMS.
3014 * testsuite/gfortran.dg/graphite/pr38459.f90: New.
3016 2008-12-09 Tobias Grosser <grosser@fim.uni-passau.de>
3018 * graphite.c (graphite_transform_loops): Always call find_transform ()
3019 in ENABLE_CHECKING. So we test these code paths, even if we do not
3022 2008-12-09 Tobias Grosser <grosser@fim.uni-passau.de>
3024 * graphite.c (print_graphite_bb): Fix printing to file != dump_file.
3025 (print_scop): Ditto.
3027 2008-12-08 Tobias Grosser <grosser@fim.uni-passau.de>
3030 Fix testsuite/gfortran.dg/graphite/id-3.f90.
3031 * graphite.c (scopdet_basic_block_info): Fix bug that found some
3032 regions more than once.
3034 2008-12-03 Sebastian Pop <sebastian.pop@amd.com>
3036 Fix testsuite/gfortran.dg/graphite/id-4.f90.
3037 * graphite.c (scan_tree_for_params): Do not compute the multiplicand
3040 2008-12-03 Sebastian Pop <sebastian.pop@amd.com>
3042 Fix testsuite/gfortran.dg/graphite/id-1.f90.
3043 * graphite.c (gmp_cst_to_tree): Pass the type in parameter.
3044 (loop_iv_stack_patch_for_consts): Update use of gmp_cst_to_tree.
3045 (max_precision_type): New.
3046 (value_clast): Removed.
3047 (clast_to_gcc_expression): Be more careful to types of expressions.
3048 Use max_precision_type and update use of gmp_cst_to_tree.
3049 (graphite_translate_clast_equation): Use max_precision_type.
3050 (graphite_create_guard_cond_expr): Do not use integer_type_node,
3051 use the type of the condition.
3052 (graphite_create_new_loop): Do not use integer_type_node, use the
3053 max_precision_type of lb and ub.
3055 2008-12-03 Sebastian Pop <sebastian.pop@amd.com>
3057 * graphite.c (build_scops_1): Initialize open_scop.exit
3060 2008-12-02 Sebastian Pop <sebastian.pop@amd.com>
3062 * testsuite/gcc.dg/graphite/pr38084.c: New.
3063 * testsuite/gfortran.dg/graphite/id-1.f90: New.
3064 * testsuite/gfortran.dg/graphite/id-2.f90: New.
3065 * testsuite/gfortran.dg/graphite/id-3.f90: New.
3066 * testsuite/gfortran.dg/graphite/id-4.f90: New.
3067 * testsuite/gfortran.dg/graphite/pr37857.f90: New.
3069 2008-12-02 Sebastian Pop <sebastian.pop@amd.com>
3070 Jan Sjodin <jan.sjodin@amd.com>
3071 Harsha Jagasia <harsha.jagasia@amd.com>
3083 * testsuite/gcc.dg/graphite/pr38073.c: New.
3084 * testsuite/gcc.dg/graphite/pr37928.c: New.
3085 * testsuite/gcc.dg/graphite/pr37883.c: New.
3086 * testsuite/gcc.dg/graphite/pr38125.c: New.
3087 * testsuite/gfortran.dg/graphite/pr38083.f90: New.
3088 * testsuite/gfortran.dg/graphite/pr37852.f90: New.
3089 * testsuite/gfortran.dg/graphite/pr37980.f90: New.
3091 * testsuite/gcc.dg/graphite/scop-18.c: Remove reduction, test for
3092 the number of detected scops. Copy exact same test for loop
3094 * testsuite/gcc.dg/graphite/block-1.c: Fix the number of expected
3095 loops to be blocked as reductions are not handled.
3096 * testsuite/gcc.dg/graphite/block-4.c: ...here. New.
3098 * tree-phinodes.c (remove_phi_nodes): New, extracted from...
3099 * tree-cfg.c (remove_phi_nodes_and_edges_for_unreachable_block):
3101 * tree-flow.h (remove_phi_nodes, canonicalize_loop_ivs): Declared.
3102 * Makefile.in (graphite.o): Depend on value-prof.h.
3103 (graphite.o-warn): Removed -Wno-error.
3104 * tree-parloops.c (canonicalize_loop_ivs): Allow reduction_list
3105 to be a NULL pointer. Call update_stmt. Return the newly created
3106 cannonical induction variable.
3108 * graphite.h (debug_rename_map): Declared. Fix some comments.
3110 * graphite.c: Reimplement the code generation from graphite to gimple.
3111 Include value-prof.h.
3112 (loop_iv_stack_get_iv): Do not return NULL for constant substitutions.
3113 (get_old_iv_from_ssa_name): Removed.
3114 (graphite_stmt_p): New.
3115 (new_graphite_bb): Test for useful statements before building a
3116 graphite statement for the basic block.
3117 (free_graphite_bb): Do not free GBB_DATA_REFS: this is a bug
3118 in free_data_ref that calls BITMAP_FREE (DR_VOPS (dr)) without
3120 (recompute_all_dominators, graphite_verify,
3121 nb_reductions_in_loop, graphite_loop_normal_form): New.
3122 (scop_record_loop): Call graphite_loop_normal_form.
3123 (build_scop_loop_nests): Iterate over all the blocks of the
3124 function instead of relying on the incomplete information from
3125 SCOP_BBS. Return the success of the operation.
3126 (find_params_in_bb): Use the data from GBB_DATA_REFS.
3127 (add_bb_domains): Removed.
3128 (build_loop_iteration_domains): Don't call add_bb_domains.
3129 Add the iteration domain only to the basic blocks that have been
3130 translated to graphite.
3131 (build_scop_conditions_1): Add constraints only if the basic
3132 block have been translated to graphite.
3133 (build_scop_data_accesses): Completely disabled until data
3134 dependence is correctly implemented.
3135 (debug_rename_elt, debug_rename_map_1, debug_rename_map): New.
3136 (remove_all_edges_1, remove_all_edges): Removed.
3137 (get_new_name_from_old_name): New.
3138 (graphite_rename_variables_in_stmt): Renamed
3139 rename_variables_in_stmt. Call get_new_name_from_old_name.
3140 Use replace_exp and update_stmt.
3141 (is_old_iv): Renamed is_iv.
3142 (expand_scalar_variables_stmt): Extra parameter for renaming map.
3143 Use replace_exp and update_stmt.
3144 (expand_scalar_variables_expr): Same. Use the map to get the
3145 new names for the renaming of induction variables and for the
3146 renaming of variables after a basic block has been copied.
3147 (expand_scalar_variables): Same.
3148 (graphite_rename_variables): Renamed rename_variables.
3149 (move_phi_nodes): Removed.
3150 (get_false_edge_from_guard_bb): New.
3151 (build_iv_mapping): Do not insert the induction variable of a
3152 loop in the renaming iv map if the basic block does not belong
3154 (register_old_new_names, graphite_copy_stmts_from_block,
3155 copy_bb_and_scalar_dependences): New.
3156 (translate_clast): Heavily reimplemented: copy basic blocks,
3157 do not move them. Finally, in call cleanup_tree_cfg in gloog.
3158 At each translation step call graphite_verify ensuring the
3159 consistency of the SSA, loops and dominators information.
3160 (collect_virtual_phis, find_vdef_for_var_in_bb,
3161 find_vdef_for_var_1, find_vdef_for_var,
3162 patch_phis_for_virtual_defs): Removed huge hack.
3163 (mark_old_loops, remove_dead_loops, skip_phi_defs,
3164 collect_scop_exit_phi_args, patch_scop_exit_phi_args,
3165 gbb_can_be_ignored, scop_remove_ignoreable_gbbs, ): Removed.
3166 (remove_sese_region, ifsese, if_region_entry, if_region_exit,
3167 if_region_get_condition_block, if_region_set_false_region,
3168 create_if_region_on_edge, move_sese_in_condition, bb_in_sese_p,
3169 sese_find_uses_to_rename_use, sese_find_uses_to_rename_bb,
3170 sese_add_exit_phis_edge, sese_add_exit_phis_var,
3171 rewrite_into_sese_closed_ssa): New.
3172 (gloog): Remove dead code. Early return if code cannot be
3173 generated. Call cleanup_tree_cfg once the scop has been code
3175 (graphite_trans_scop_block, graphite_trans_loop_block): Do not
3176 block loops with less than two loops.
3177 (graphite_apply_transformations): Remove the call to
3178 scop_remove_ignoreable_gbbs.
3179 (limit_scops): When build_scop_loop_nests fails, continue on
3180 the next scop. Fix open_scop.entry.
3181 (graphite_transform_loops): Call recompute_all_dominators: force the
3182 recomputation of correct CDI_DOMINATORS and CDI_POST_DOMINATORS.
3183 Call initialize_original_copy_tables and free_original_copy_tables
3184 to be able to copy basic blocks during code generation.
3185 When build_scop_loop_nests fails, continue on next scop.
3186 (value_clast): New union.
3187 (clast_to_gcc_expression): Fix type cast warning.
3189 2008-11-09 Sebastian Pop <sebastian.pop@amd.com>
3191 * Merge from mainline (r140838:141727).
3193 2008-11-05 Tobias Grosser <grosser@fim.uni-passau.de>
3197 * graphite.c (scan_tree_for_params): Add POINTER_PLUS_EXPR.
3199 2008-11-05 Tobias Grosser <grosser@fim.uni-passau.de>
3203 * graphite.c (scopdet_basic_block_info): Fix loops with multiple
3204 exits and conditions.
3205 * testsuite/gcc.dg/graphite/pr37943.c: New.
3207 2008-10-23 Tobias Grosser <grosser@fim.uni-passau.de>
3210 * graphite.c (gloog): Replace EXIT_BLOCK_PTR with scop exit.
3212 2008-10-23 Tobias Grosser <grosser@fim.uni-passau.de>
3214 * doc/invoke.texi: Fix spaces.
3216 2008-10-22 Sebastian Pop <sebastian.pop@amd.com>
3218 PR tree-optimization/37891
3219 Reverted last commit.
3220 * graphite.c (create_single_entry_edge): Set
3221 EDGE_IRREDUCIBLE_LOOP and BB_IRREDUCIBLE_LOOP.
3223 2008-10-21 Sebastian Pop <sebastian.pop@amd.com>
3224 Mitul Thakkar <mitul.thakkar@amd.com>
3226 * graphite.c (create_single_entry_edge): Set
3227 EDGE_IRREDUCIBLE_LOOP and BB_IRREDUCIBLE_LOOP.
3229 2008-10-16 Tobias Grosser <grosser@fim.uni-passau.de>
3231 * doc/invoke.texi: Add -fgraphite-identity.
3232 * graphite.c (graphite_apply_transformations): Check for
3233 -fgraphite-identity.
3234 * toplev.c (process_options): Add flag_graphite_identity.
3235 * tree-ssa-loop.c: Add flag_graphite_identity.
3237 2008-10-14 Sebastian Pop <sebastian.pop@amd.com>
3239 Undo changes from 2008-10-02:
3240 * tree-ssa-loop-ivopts.c (rewrite_use_nonlinear_expr): Convert
3241 operand type when copying the operand to a variable of different type.
3242 * cfgloopmanip.c (create_empty_loop_on_edge): Write exit condition
3243 with the IV name after increment.
3245 2008-10-14 Sebastian Pop <sebastian.pop@amd.com>
3246 Harsha Jagasia <harsha.jagasia@amd.com>
3248 PR tree-optimization/37828
3249 * testsuite/gcc.dg/graphite/pr37828.c: New.
3250 * graphite.c (graphite_trans_loop_block): Do not loop block
3251 single nested loops.
3253 2008-10-09 Harsha Jagasia <harsha.jagasia@amd.com>
3254 Sebastian Pop <sebastian.pop@amd.com>
3256 * graphite.c (struct rename_map_elt, new_rename_map_elt,
3257 rename_map_elt_info, eq_rename_map_elts): New.
3258 (graphite_rename_ivs_stmt): Renamed graphite_rename_variables_in_stmt.
3259 (expand_scalar_variables_expr): Change parameters.
3260 (expand_scalar_variables_stmt): Same.
3261 (expand_scalar_variables): Same.
3262 (graphite_rename_ivs): Rename graphite_rename_variables.
3263 (build_iv_mapping): New.
3264 (translate_clast): Call build_iv_mapping.
3265 * graphite.h (gbb_p): New name.
3267 2008-10-03 Harsha Jagasia <harsha.jagasia@amd.com>
3269 PR tree-optimization/37684
3270 * gcc.dg/graphite/pr37684.c: New.
3271 * graphite.c (exclude_component_ref): New.
3272 (is_simple_operand): Call exclude_component_ref.
3274 2008-10-02 Jan Sjodin <jan.sjodin@amd.com>
3275 Harsha Jagasia <harsha.jagasia@amd.com>
3277 PR tree-optimization/37485
3278 * gcc.dg/graphite/block-2.c: New
3279 * graphite.c (gmp_cst_to_tree): Moved.
3280 (iv_stack_entry_is_constant): New.
3281 (iv_stack_entry_is_iv): New.
3282 (loop_iv_stack_push): Renamed to loop_iv_stack_push_iv.
3283 (loop_iv_stack_insert_constant): New.
3284 (loop_iv_stack_pop): Use new datatpype.
3285 (loop_iv_stack_get_iv): Same.
3286 (loop_iv_stack_get_iv_from_name): Same.
3287 (loop_iv_stack_debug): Renamed to debug_loop_iv_stack.
3288 (loop_iv_stack_patch_for_consts): New.
3289 (loop_iv_stack_remove_constants): New.
3290 (graphite_create_new_loop): Use loop_iv_stack_push_iv.
3291 (translate_clast): Call loop_iv_stack_patch_for_consts and
3292 loop_iv_stack_remove_constants.
3293 (gloog): Use new datatype. Redirect construction edge to end
3294 block to avoid accidental deletion.
3295 * graphite.h (enum iv_stack_entry_kind): New. Tag for data in
3297 (union iv_stack_entry_data): New. Data in iv stack entry.
3298 (struct iv_stack_entry): New. Datatype for iv stack entries.
3300 2008-10-02 Sebastian Pop <sebastian.pop@amd.com>
3302 * tree-ssa-loop-ivopts.c (rewrite_use_nonlinear_expr): Convert
3303 operand type when copying the operand to a variable of different type.
3305 2008-10-02 Sebastian Pop <sebastian.pop@amd.com>
3307 * cfgloopmanip.c (create_empty_loop_on_edge): Write exit condition
3308 with the IV name after increment.
3310 2008-10-02 Sebastian Pop <sebastian.pop@amd.com>
3312 * Merge from mainline (r140164:140838).
3314 2008-09-10 Konrad Trifunovic <konrad.trifunovic@inria.fr>
3316 * graphite-data-ref.c: New.
3317 * graphite.c (print_scop): Also dump the dependence graph.
3318 (bb_in_scop_p, loop_in_scop_p, nb_loops_around_gb): Moved...
3319 (new_scop): Initialize SCOP_DEP_GRAPH.
3320 (build_scop_dynamic_schedules): New.
3321 (build_access_matrix_with_af): Fixed column numbering.
3322 (graphite_transform_loops): Call build_scop_dynamic_schedules.
3323 * graphite.h: Add ifndef/define guards against multiple inclusion.
3324 (struct scop): Add dep_graph field.
3325 (SCOP_DEP_GRAPH): Defined.
3326 (ref_nb_loops): Fixed and moved to other position.
3327 (bb_in_scop_p, loop_in_scop_p, nb_loops_around_gb): ... here.
3328 (nb_loops_around_loop_in_scop): New.
3329 (graphite_dump_dependence_graph): Declared.
3330 (graphite_build_rdg_all_levels): Declared.
3331 (graphite_test_dependence): Declared.
3332 * Makefile.in (graphite-data-ref.o): New target.
3334 2008-09-09 Sebastian Pop <sebastian.pop@amd.com>
3336 * Merge from mainline (139870:140164).
3338 2008-09-01 Sebastian Pop <sebastian.pop@amd.com>
3340 * Merge from mainline (138275:139870).
3341 * testsuite/gcc.dg/graphite/scop-matmult.c: XFailed as one of
3342 the commits from trunk broke the niter detection.
3344 2008-09-01 Sebastian Pop <sebastian.pop@amd.com>
3346 * graphite.c: Add more documentation. Fix formatting.
3347 (debug_loop_vec, debug_oldivs, loop_iv_stack,
3348 loop_iv_stack_debug): Moved...
3349 (schedule_to_scattering): Move before use.
3350 (dot_all_scops): Include in "#if 0" the code for system
3353 * graphite.h: (debug_loop_vec, debug_oldivs, loop_iv_stack,
3354 loop_iv_stack_debug): ...here.
3356 2008-08-29 Jan Sjodin <jan.sjodin@amd.com>
3358 * tree-phinodes.c (make_phi_node): Extern.
3359 (add_phi_node_to_bb): New.
3360 (create_phi_node): Call add_phi_node_to_bb.
3361 * tree-ssa-loop-ivopts.c (get_phi_with_result): New.
3362 (remove_statement): Handle case where stored phi was updated
3363 and is no longer the same.
3364 * graphite.c (is_parameter): New.
3366 (expand_scalar_variables_expr): New.
3367 (expand_scalar_variables_stmt): New.
3368 (expand_scalar_variables): New.
3369 (move_phi_nodes): Create new phi instead of moving old one.
3370 (translate_clast): Call expand_scalar_variables.
3371 (find_vdef_for_var_in_bb): Also scan regular definitions.
3372 (skip_phi_defs): New.
3373 (collect_scop_exit_phi_args): New.
3374 (patch_scop_exit_phi_args): New.
3375 (gloog): Patch phis after scop.
3376 * tree-flow.h: (add_phi_node_to_bb): Declared.
3377 (make_phi_node): Declared.
3379 2008-08-26 Sebastian Pop <sebastian.pop@amd.com>
3381 * graphite.c (end_scop): Split the entry of the scop when it
3382 is the header of the loop in which the scop is ending.
3383 (build_scops_1, limit_scops): Update uses of end_scop.
3385 2008-08-26 Sebastian Pop <sebastian.pop@amd.com>
3387 * graphite.c (dot_all_scops_1): Do not fail on uninitialized
3388 SCOP_ENTRY or SCOP_EXIT.
3390 2008-08-25 Sebastian Pop <sebastian.pop@amd.com>
3392 * graphite.c (get_construction_edge): Removed.
3393 (gloog): Construction edge is the scop entry edge.
3395 2008-08-25 Sebastian Pop <sebastian.pop@amd.com>
3397 * graphite.c (can_generate_for_scop): Removed.
3398 (gloog): Do not call it.
3400 2008-08-25 Sebastian Pop <sebastian.pop@amd.com>
3402 * graphite.c (new_scop): Entry of a scop is an edge.
3403 Initialize SESE region.
3404 (free_scop): Free SESE region.
3405 (build_scops_1, scopdet_bb_info): Work on edges, not on bbs.
3406 (split_difficult_bb): New, split from end_scop.
3407 (end_scop): Exit of a scop is an edge.
3408 (build_scop_bbs): Never check CDI_POST_DOMINATORS: this info is
3409 not automatically updated and thus is always wrong.
3410 * graphite.h (struct sese): New.
3413 (struct scop): New field for a SESE region. Remove entry, exit.
3414 (SCOP_ENTRY, SCOP_EXIT): Update definitions to match same
3415 semantics as before. Moved comment around.
3417 2008-08-25 Tobias Grosser <grosser@fim.uni-passau.de>
3418 Sebastian Pop <sebastian.pop@amd.com>
3420 * graphite.c (graphite_transform_loops): Always enable gloog
3421 and find_transform when ENABLE_CHECKING.
3423 2008-08-25 Sebastian Pop <sebastian.pop@amd.com>
3425 * graphite.c (graphite_transform_loops): Move pretty printer
3426 of SCOPs before doing any transform. Remove call to print_scops
3427 and dot_all_scops_1.
3429 2008-08-25 Sebastian Pop <sebastian.pop@amd.com>
3431 * graphite.c (dump_gbb_conditions): Don't try to print NULL pointers.
3432 (print_graphite_bb): Same.
3434 2008-08-25 Sebastian Pop <sebastian.pop@amd.com>
3436 * graphite.c (dot_all_scops_1): Cleanup.
3437 (move_scops): Fix comment.
3439 2008-08-25 Sebastian Pop <sebastian.pop@amd.com>
3441 * graphite.c (build_scop_bbs): Revert commit 139355:
3443 2008-08-20 Sebastian Pop <sebastian.pop@amd.com>
3444 Dwarakanath Rajagopal <dwarak.rajagopal@amd.com>
3446 * graphite.c (build_scop_bbs): Factor up code.
3448 2008-08-25 Tobias Grosser <grosser@fim.uni-passau.de>
3450 * graphite.c (gloog): Update dominator info.
3452 2008-08-25 Tobias Grosser <grosser@fim.uni-passau.de>
3454 * graphite.c (remove_cond_exprs): Do not fail on empty bbs.
3456 2008-08-24 Sebastian Pop <sebastian.pop@amd.com>
3458 * graphite.c (new_graphite_bb): Remove GBB_INDEX_TO_NUM_MAP
3460 (free_graphite_bb): Remove GBB_INDEX_TO_NUM_MAP free.
3461 (translate_clast): Correct formatting.
3462 * graphite.h (struct num_map): Removed.
3463 (struct graphite_bb): Remove num_map field.
3464 (GBB_INDEX_TO_NUM_MAP): Removed.
3466 2008-08-24 Sebastian Pop <sebastian.pop@amd.com>
3468 * graphite.c (build_access_matrix_with_af): Fix comments.
3469 (build_scop_data_accesses): Same.
3471 2008-08-24 Sebastian Pop <sebastian.pop@amd.com>
3473 * graphite.c (build_scop_data_accesses): Don't construct
3474 access matrices. Add a FIXME and an assert condition that
3475 should pass when the access matrices will be needed.
3477 2008-08-24 Sebastian Pop <sebastian.pop@amd.com>
3479 * tree-data-ref.c (stmt_simple_memref_p): Don't call
3481 * graphite.c (build_graphite_bb): Renamed new_graphite_bb.
3482 Moved close by free_graphite_bb.
3483 (free_graphite_bb): Call free_data_refs. Reset bb->aux.
3484 (new_scop): Move close by free_scop.
3485 (graphite_transform_loops): Avoid linear scan to reset bb->aux.
3487 2008-08-22 Jan Sjodin <jan.sjodin@amd.com>
3489 * cfgloopmanip.c (create_empty_if_region_on_edge): New.
3490 * graphite.c (clast_to_gcc_expression): Call gmp_cst_to_tree
3491 instead of recursive call.
3492 (graphite_translate_clast_equation): New.
3493 (graphite_create_guard_cond_expr): New.
3494 (graphite_create_new_guard): New.
3495 (get_stack_index_from_iv): Removed.
3496 (graphite_rename_ivs_stmt): Use gbb_loop_index.
3497 (get_true_edge_from_guard_bb): New.
3498 (translate_clast): Handle stmt_guard in clast.
3499 (get_construction_edge): Allow construction edge detection for
3500 a scope entry with multiple predecessors if one predecessor is
3501 the immediate dominator of scope entry.
3502 (can_generate_code_stmt): Enable code generation for clast_guard.
3503 (gloog): Use correct context loop. Removed check for post dominators.
3504 * cfgloop.h (create_empty_if_region_on_edge): Declared.
3506 2008-08-21 Sebastian Pop <sebastian.pop@amd.com>
3508 * graphite.c (remove_dead_loops): Document better which
3511 2008-08-21 Sebastian Pop <sebastian.pop@amd.com>
3513 * Makefile.in: Rename POLYLIBLIBS and POLYLIBINC to PPLLIBS
3515 (graphite.o): Also depends on pointer-set.h.
3517 2008-08-21 Sebastian Pop <sebastian.pop@amd.com>
3519 * graphite.c (scop_record_loop): Fix compile warning.
3521 2008-08-21 Harsha Jagasia <harsha.jagasia@amd.com>
3522 Sebastian Pop <sebastian.pop@amd.com>
3524 * graphite.c (scop_record_loop): DECL_NAME can be NULL.
3526 2008-08-21 Sebastian Pop <sebastian.pop@amd.com>
3528 * graphite.c (build_graphite_bb): Initialize bb->aux to
3529 point to the graphite_bb_p.
3530 (graphite_bb_from_bb): Renamed gbb_from_bb; returns the
3532 (add_bb_domains): Does not use the scop parameter.
3533 (graphite_transform_loops): Clean bb->aux at the end.
3535 2008-08-20 Dwarakanath Rajagopal <dwarak.rajagopal@amd.com>
3536 Sebastian Pop <sebastian.pop@amd.com>
3538 * testsuite/lib/target-supports.exp
3539 (check_effective_target_fgraphite): New.
3541 * testsuite/gcc.dg/graphite/graphite.exp: Early exit when
3542 check_effective_target_fgraphite returns false.
3543 Set dg-do-what-default to compile.
3544 (scan-graphite-dump-times): Removed.
3545 * testsuite/gfortran.dg/graphite/graphite.exp: Same.
3547 * testsuite/gcc.dg/graphite/scop-0.c: Do not use "dg-do compile".
3548 Use scan-tree-dump-times instead of scan-graphite-dump-times.
3549 * testsuite/gcc.dg/graphite/scop-1.c: Same.
3550 * testsuite/gcc.dg/graphite/scop-2.c: Same.
3551 * testsuite/gcc.dg/graphite/scop-3.c: Same.
3552 * testsuite/gcc.dg/graphite/scop-4.c: Same.
3553 * testsuite/gcc.dg/graphite/scop-5.c: Same.
3554 * testsuite/gcc.dg/graphite/scop-6.c: Same.
3555 * testsuite/gcc.dg/graphite/scop-7.c: Same.
3556 * testsuite/gcc.dg/graphite/scop-8.c: Same.
3557 * testsuite/gcc.dg/graphite/scop-9.c: Same.
3558 * testsuite/gcc.dg/graphite/scop-10.c: Same.
3559 * testsuite/gcc.dg/graphite/scop-11.c: Same.
3560 * testsuite/gcc.dg/graphite/scop-12.c: Same.
3561 * testsuite/gcc.dg/graphite/scop-13.c: Same.
3562 * testsuite/gcc.dg/graphite/scop-matmult.c: Same.
3563 * testsuite/gcc.dg/graphite/scop-14.c: Same.
3564 * testsuite/gcc.dg/graphite/scop-15.c: Same.
3565 * testsuite/gcc.dg/graphite/block-0.c: Same.
3566 * testsuite/gcc.dg/graphite/scop-16.c: Same.
3567 * testsuite/gcc.dg/graphite/block-1.c: Same.
3568 * testsuite/gcc.dg/graphite/scop-17.c: Same.
3569 * testsuite/gcc.dg/graphite/scop-18.c: Same.
3570 * testsuite/gfortran.dg/graphite/block-1.f90: Same.
3571 * testsuite/gfortran.dg/graphite/scop-1.f: Same.
3572 * testsuite/gfortran.dg/graphite/block-2.f: Same.
3574 2008-08-20 Sebastian Pop <sebastian.pop@amd.com>
3576 * graphite.c: Fix some XXX comments.
3577 (build_scop_dynamic_schedules): Removed.
3579 2008-08-20 Sebastian Pop <sebastian.pop@amd.com>
3581 * graphite.h (scop_max_loop_depth): Moved...
3582 * graphite.c (scop_max_loop_depth): ...here.
3583 (remove_all_edges_1): New.
3584 (remove_all_edges): Factored code.
3585 (remove_cond_exprs): Check only the last statement for
3586 a GIMPLE_COND expression.
3588 2008-08-20 Sebastian Pop <sebastian.pop@amd.com>
3590 * graphite.c (scan_tree_for_params): Early return when the
3591 expression is a chrec_dont_know. Handle case NEGATE_EXPR.
3592 (find_scop_parameters): Factor out code.
3593 (graphite_trans_bb_strip_mine): Remove dead code.
3595 2008-08-20 Sebastian Pop <sebastian.pop@amd.com>
3597 * graphite.c (clast_to_gcc_expression, graphite_create_new_loop,
3598 graphite_trans_bb_move_loop): Factor asserts.
3599 (gloog): Perform sanity checks only for ENABLE_CHECKING.
3600 Do not call calculate_dominance_info and estimate_bb_frequencies.
3602 2008-08-20 Jan Sjodin <jan.sjodin@amd.com>
3604 * graphite.c (create_loops_mapping, free_loops_mapping,
3605 create_loops_mapping_num, debug_loop_mapping_1,
3606 debug_loop_mapping, graphite_loops_mapping_max_loop_num,
3607 get_loop_mapping_for_num, graphite_loops_mapping_add_child,
3608 graphite_loops_mapping_add_child_num,
3609 graphite_loops_mapping_insert_child,
3610 graphite_loops_mapping_parent, get_loop_mapped_depth_for_num,
3611 get_loop_mapped_depth, split_loop_mapped_depth_for_num,
3612 loop_mapped_depth_split_loop, swap_loop_mapped_depth_for_num,
3613 create_num_from_index, get_num_from_index,
3614 swap_loop_mapped_depth): Removed.
3615 (new_scop): Do not initialize SCOP_LOOPS_MAPPING.
3616 (free_scop): Do not call free_loops_mapping.
3617 (graphite_get_new_iv_stack_index_from_old_iv): Renamed
3618 get_stack_index_from_iv. Use GBB_LOOPS instead of calling
3619 get_loop_mapped_depth.
3620 (graphite_trans_bb_move_loop): Do not update the loop mapping.
3621 (graphite_trans_bb_strip_mine): Same.
3622 * graphite.h (graphite_loops_mapping, graphite_loop_node): Removed.
3623 (struct scop): Remove field loops_mapping.
3625 2008-08-20 Sebastian Pop <sebastian.pop@amd.com>
3626 Dwarakanath Rajagopal <dwarak.rajagopal@amd.com>
3628 * graphite.c (scop_record_loop): Factor out one level of the
3629 condition by early return.
3630 (build_scop_loop_nests): Format following FSF coding style.
3631 (build_scop_dynamic_schedules): Factor out code.
3632 (scopdet_bb_info): Reindent. Default case should not be reachable.
3634 2008-08-20 Sebastian Pop <sebastian.pop@amd.com>
3635 Dwarakanath Rajagopal <dwarak.rajagopal@amd.com>
3637 * graphite.c (loop_affine_expr): Check for DECL_P or struct
3638 assignments that are not handled as simple operands for now.
3640 2008-08-20 Sebastian Pop <sebastian.pop@amd.com>
3641 Dwarakanath Rajagopal <dwarak.rajagopal@amd.com>
3643 * graphite.c (build_scop_bbs): Factor up code.
3645 2008-08-20 Sebastian Pop <sebastian.pop@amd.com>
3646 Dwarakanath Rajagopal <dwarak.rajagopal@amd.com>
3648 * graphite.c (stmt_simple_for_scop_p): Factor code out
3650 (enum gbb_type): New. Group all the GBB_* types under it.
3651 (is_loop_exit): Moved...
3652 (end_scop): Enable BB spliting.
3653 * cfgloop.c (is_loop_exit): ...here. Reimplemented.
3654 * cfgloop.h (is_loop_exit): Declared.
3656 2008-08-20 Sebastian Pop <sebastian.pop@amd.com>
3658 * doc/invoke.texi: Remove strides from examples containing
3659 DO loops when the strides are equal to 1.
3661 2008-08-20 Harsha Jagasia <harsha.jagasia@amd.com>
3662 Dwarakanath Rajagopal <dwarak.rajagopal@amd.com>
3664 * graphite.c (graphite_trans_scop_block): Or the result with
3665 the result from graphite_trans_loop_block.
3666 * testsuite/gcc.dg/graphite/block-1.c: New.
3667 * testsuite/gfortran.dg/graphite/block-1.f90: New.
3668 * testsuite/gfortran.dg/graphite/block-2.f: New.
3670 2008-08-20 Sebastian Pop <sebastian.pop@amd.com>
3672 * graphite.c (graphite_transform_loops): Call cloog_initialize
3675 2008-08-20 Sebastian Pop <sebastian.pop@amd.com>
3677 * tree-data-ref.c) (stmt_simple_memref_p): New.
3678 * tree-data-ref.h (stmt_simple_memref_p): Declared.
3679 * graphite.c (stmt_simple_memref_for_scop_p): Removed.
3680 (is_simple_operand): Call stmt_simple_memref_p.
3682 * testsuite/gcc.dg/graphite/scop-matmult.c: Updated for not
3683 using pointer arithmetic, as this is optimized by PRE and
3684 makes the code too difficult to analyze.
3686 * testsuite/gcc.dg/graphite/scop-18.c: Same.
3688 2008-08-20 Sebastian Pop <sebastian.pop@amd.com>
3690 * gdbinit.in (pgg): New.
3692 2008-08-15 Tobias Grosser <grosser@fim.uni-passau.de>
3694 * graphite.c (graphite_trans_loop_block): Fix warning.
3696 2008-08-15 Tobias Grosser <grosser@fim.uni-passau.de>
3698 * graphite.c (graphite_trans_loop_block): Fix my merge error.
3700 2008-08-15 Tobias Grosser <grosser@fim.uni-passau.de>
3702 * graphite.c (graphite_trans_bb_block): Remove check for
3703 flag_loop_strip_mine, flag_loop_block, flag_loop_interchange.
3704 Check if loop blocking is profitable for every loop, before applying
3706 (graphite_apply_transformations): Call graphite_trans_bb_block only,
3707 if flag_loop_block is set.
3709 2008-08-14 Sebastian Pop <sebastian.pop@amd.com>
3711 * graphite.c: Add some more documentation for the loop
3714 2008-08-14 Sebastian Pop <sebastian.pop@amd.com>
3716 * Makefile.in (tree-data-ref.o): Remove dependence on graphite.h.
3717 * graphite.c: Format on less than 80 columns.
3720 2008-08-14 Sebastian Pop <sebastian.pop@amd.com>
3722 * cfgloopmanip.c (loopify): Use update_dominators_in_loop.
3724 2008-08-14 Sebastian Pop <sebastian.pop@amd.com>
3726 * doc/invoke.texi (floop-block, floop-strip-mine,
3727 floop-interchange): Update documentation with examples.
3729 2008-08-13 Sebastian Pop <sebastian.pop@amd.com>
3731 * cfgloopmanip.c (create_empty_loop_on_edge): Don't call
3733 * graphite.c (graphite_create_new_loop): Call add_referenced_var.
3735 2008-08-13 Sebastian Pop <sebastian.pop@amd.com>
3737 * cfgloopmanip.c (create_empty_loop_on_edge): Improve documentation.
3738 Factor gcc_asserts into a single one. Use force_gimple_operand_gsi.
3739 * tree-scalar-evolution.c: Revert useless changes.
3740 * tree-phinodes.c: Same.
3743 * tree-vectorizer.h: Same.
3744 * tree-flow.h: Same.
3746 * common.opt (fgraphite): Update documentation.
3748 2008-08-12 Harsha Jagasia <harsha.jagasia@amd.com>
3750 * doc/invoke.texi (-floop-block, -floop-strip-mine,
3751 -floop-interchange): Add more text for explaining what each of these
3753 * tree-into-ssa.c (gimple_vec): Moved to...
3754 * graphite.c: Include gimple.h.
3755 (gimple_vec): Moved to...
3756 (del_loop_to_cloog_loop): Removed.
3757 (loop_affine_expr): Do not call create_data_ref when the
3758 operand is a constant.
3759 (new_scop): Use free instead of del_loop_to_cloog_loop.
3760 * Makefile.in (graphite.o): Depend on GIMPLE_H.
3761 * gimple.h (gimple_vec): ... here.
3763 2008-08-11 Tobias Grosser <grosser@fim.uni-passau.de>
3765 * graphite.c (scopdet_bb_info): Only allow loops with known number of
3767 (build_loop_iteration_domains): Fail, if latch executions unknown.
3769 2008-08-11 Tobias Grosser <grosser@fim.uni-passau.de>
3771 * graphite.c (add_conditions_to_domain): New.
3772 (build_scop_conditions_1): Call add_conditions_to_domain.
3773 (set_cloog_options): Allow to disable optimizations.
3775 2008-08-11 Tobias Grosser <grosser@fim.uni-passau.de>
3777 * graphite.c (find_params_in_bb): Look for parameters in conditions.
3778 Do not use walk_dominator_tree.
3779 (find_scop_parameters): Do not use walk_dominator_tree.
3781 2008-08-11 Tobias Grosser <grosser@fim.uni-passau.de>
3783 * graphite.c (scan_tree_for_params) Add / Subtract inequality.
3784 (idx_record_params): Adapt.
3785 * graphite.h (scop_gimple_loop_depth): New.
3787 2008-08-11 Tobias Grosser <grosser@fim.uni-passau.de>
3789 * graphite.c (build_scop_dynamic_schedules): Remove value_init.
3790 (scan_tree_for_params): Remove value_init.
3791 (build_scop_context): Remove value_init.
3792 (build_loop_iteration_domains): Remove value_init.
3793 (schedule_to_scattering): Remove value_init.
3794 (graphite_trans_bb_strip_mine): Remove value_init.
3796 2008-08-11 Tobias Grosser <grosser@fim.uni-passau.de>
3798 * gcc/graphite.c (limit_scops): New.
3799 (graphite_transform_loops): Add limit SCoPs.
3800 * gcc/testsuite/gcc.dg/graphite/scop-0.c: Update number of SCoPs.
3801 * gcc/testsuite/gcc.dg/graphite/scop-1.c: Update number of SCoPs.
3802 * gcc/testsuite/gcc.dg/graphite/scop-10.c: Update number of SCoPs.
3803 * gcc/testsuite/gcc.dg/graphite/scop-11.c: Update number of SCoPs.
3804 * gcc/testsuite/gcc.dg/graphite/scop-12.c: Update number of SCoPs.
3805 * gcc/testsuite/gcc.dg/graphite/scop-13.c: Update number of SCoPs.
3806 * gcc/testsuite/gcc.dg/graphite/scop-14.c: Update number of SCoPs.
3807 * gcc/testsuite/gcc.dg/graphite/scop-15.c: Update number of SCoPs.
3808 * gcc/testsuite/gcc.dg/graphite/scop-16.c: Update number of SCoPs.
3809 Change loop numbers.
3810 * gcc/testsuite/gcc.dg/graphite/scop-17.c: Update number of SCoPs.
3811 Change loop numbers.
3812 * gcc/testsuite/gcc.dg/graphite/scop-18.c: Update number of SCoPs.
3813 * gcc/testsuite/gcc.dg/graphite/scop-2.c: Update number of SCoPs.
3814 * gcc/testsuite/gcc.dg/graphite/scop-3.c: Update number of SCoPs.
3815 * gcc/testsuite/gcc.dg/graphite/scop-4.c: Update number of SCoPs.
3816 * gcc/testsuite/gcc.dg/graphite/scop-5.c: Update number of SCoPs.
3817 * gcc/testsuite/gcc.dg/graphite/scop-6.c: Update number of SCoPs.
3818 * gcc/testsuite/gcc.dg/graphite/scop-7.c: Update number of SCoPs.
3819 * gcc/testsuite/gcc.dg/graphite/scop-8.c: Update number of SCoPs.
3820 * gcc/testsuite/gcc.dg/graphite/scop-9.c: Update number of SCoPs.
3821 * gcc/testsuite/gcc.dg/graphite/scop-matmult.c: Update number of SCoPs.
3823 2008-08-11 Tobias Grosser <grosser@fim.uni-passau.de>
3825 * graphite.c (graphite_transform_loops): Call always find_transform.
3827 2008-08-08 Tobias Grosser <grosser@fim.uni-passau.de>
3829 * graphite.c (free_loops_mapping): New.
3830 (stmt_simple_for_scop_p): Fix typo.
3831 (stmt_simple_for_scop_p): Fix tuples functions, that
3833 (free_graphite_bb): Fix some memleaks.
3834 (free_scop): Fix some memleaks.
3835 (scopdet_bb_info): Do not forget some tmp SCoPs.
3836 (find_params_in_bb): Fix some memleaks.
3837 (clast_to_gcc_expression): Fix warning.
3839 2008-08-07 Tobias Grosser <grosser@fim.uni-passau.de>
3841 * testsuite/gcc.dg/graphite/scop-16.c: Fix for 32bit.
3842 * testsuite/gcc.dg/graphite/scop-17.c: Fix for 32bit.
3844 2008-08-04 Sebastian Pop <sebastian.pop@amd.com>
3846 * tree-ssa-loop.c (tree-ssa-loop.o): Do not include toplev.h.
3847 Move code ifdef-ed HAVE_cloog...
3848 * graphite.c: Include toplev.h.
3850 * Makefile.in (OBJS-common): Always build graphite.o.
3851 (BACKEND): Remove @GRAPHITE@.
3852 (tree-ssa-loop.o): Do not depend on TOPLEV_H.
3853 (graphite.o): Depend on TOPLEV_H.
3855 2008-08-04 Sebastian Pop <sebastian.pop@amd.com>
3857 * Makefile.in (tree-ssa-loop.o): Depend on TOPLEV_H.
3858 Remove typo left from polylib to ppl conversion.
3859 * graphite.c (graphite_transforms): Use sorry instead of fatal.
3861 2008-08-03 Sebastian Pop <sebastian.pop@amd.com>
3863 * toplev.c (process_options): Move the graphite loop optimization
3865 * tree-ssa-loop.c (graphite_transforms): ... here.
3866 When not configured with CLooG, print to dump_file that
3867 Graphite transforms were not performed.
3868 * testsuite/gcc.dg/graphite/graphite.exp (scan-graphite-dump-times):
3870 * testsuite/gcc.dg/graphite/*.c: Updated all testcases to use
3871 scan-graphite-dump-times.
3873 2008-08-03 Sebastian Pop <sebastian.pop@amd.com>
3875 * graphite.c (dot_scop, dot_all_scops): Do not call system.
3876 Do not open /tmp/scop.dot and /tmp/allscops.dot.
3878 2008-08-02 Sebastian Pop <sebastian.pop@amd.com>
3879 Jan Sjodin <jan.sjodin@amd.com>
3881 * configure: Regenerated.
3882 * omp-low.c (expand_omp_sections): Remove now unused code.
3883 * config.in (HAVE_polylib): Removed.
3884 * configure.ac (HAVE_polylib, POLYLIBLIBS, POLYLIBINC): Removed.
3885 (PPLLIBS, PPLINC): Added.
3886 * graphite.c: Replace unsigned with int wherever possible.
3887 Don't access Cloog's data structures, but use accessor functions.
3888 Clast's stmt->type is now implemented as a vtable: change the
3889 switches of stmt->type into ifs.
3890 (polylib/polylibgmp.h): Don't include.
3891 (initialize_dependence_polyhedron,
3892 initialize_data_dependence_polyhedron, is_empty_polyhedron,
3893 statement_precedes_p, test_dependence, build_rdg_all_levels,
3894 dump_dependence_graph): Removed until this code is cleaned up
3896 * Makefile.in (POLYLIBLIBS): Renamed PPLLIBS.
3897 (POLYLIBINC): Renamed PPLINC.
3899 2008-08-01 Harsha Jagasia <harsha.jagasia@amd.com>
3900 Dwarakanath Rajagopal <dwarak.rajagopal@amd.com>
3901 Jan Sjodin <jan.sjodin@amd.com>
3903 Finish the merge and tuplification of graphite.
3905 2008-07-24 Sebastian Pop <sebastian.pop@amd.com>
3906 Jan Sjodin <jan.sjodin@amd.com>
3908 Partial merge from mainline (138072:138275).
3909 * graphite.c still has to be tuplified.
3911 2008-07-29 Jan Sjodin <jan.sjodin@amd.com>
3913 * graphite.c (graphite_loops_mapping_max_loop_num): New.
3914 (create_num_from_index): New.
3915 (get_num_from_index): Also pass in the graphite BB.
3916 (free_graphite_bb): Free GBB_INDEX_TO_NUM_MAP.
3917 (build_graphite_bb): Initialize GBB_INDEX_TO_NUM_MAP.
3918 (graphite_trans_bb_strip_mine): Call create_num_from_index.
3919 (is_interchange_valid): Return false when failing.
3920 * graphite.h (struct num_map): New.
3921 (struct graphite_bb): New field num_map.
3922 (GBB_LOOPS_MAPPING): Renamed GBB_INDEX_TO_NUM_MAP.
3924 2008-07-29 Tobias Grosser <grosser@fim.uni-passau.de>
3926 * graphite.c (dump_gbb_conditions): Print also conditions like
3927 "if (a)". Remove dublicated code and use print_generic_expr ().
3928 (stmt_simple_for_scop_p): Only allow conditions we can handle
3931 2008-07-25 Jan Sjodin <jan.sjodin@amd.com>
3933 * graphite.h (struct scop): Removed new_ivs field.
3934 (SCOP_NEWIVS): Deleted.
3935 * graphite.c (new_scop, free_scop, clast_name_to_gcc,
3936 clast_to_gcc_expression, graphite_create_new_loop):
3937 Removed use of new_ivs.
3939 2008-07-25 Jan Sjodin <jan.sjodin@amd.com>
3941 * graphite.c (debug_oldivs, debug_loop_vec, create_loops_mapping,
3942 create_loops_mapping_num, debug_loop_mapping_1): New.
3943 (debug_loop_mapping): Call debug_loop_mapping_1.
3944 (get_loop_mapping_for_num,
3945 graphite_loops_mapping_add_child,
3946 graphite_loops_mapping_add_child_num,
3947 graphite_loops_mapping_insert_child,
3948 graphite_loops_mapping_parent,
3949 split_loop_mapped_depth_for_num,
3950 loop_mapped_depth_split_loop): New.
3951 (increment_loop_mapped_depths): Removed.
3952 (swap_loop_mapped_depth_for_num): Reimplemented.
3953 (new_scop): Call create_loops_mapping.
3954 (scop_record_loop): Call graphite_loops_mapping_insert_child.
3955 (translate_clast): Pass the old loop father in parameter, and pass
3956 it to get_old_iv_from_ssa_name.
3957 (remove_edges_around_useless_blocks, can_generate_code_stmt,
3958 can_generate_code, can_generate_for_scop): New.
3959 (graphite_trans_bb_block): Returns false when it fails to transform.
3960 * graphite.h (graphite_loop_node, graphite_loops_mapping): New.
3962 2008-07-25 Sebastian Pop <sebastian.pop@amd.com>
3964 Reverted all the changes related to the streamization and
3966 These changes are now tracked in the streamization branch.
3968 2008-07-25 Sebastian Pop <sebastian.pop@amd.com>
3969 Jan Sjodin <jan.sjodin@amd.com>
3971 * graphite.c (gbb_compare): Correctly constify.
3972 (gbb_can_be_ignored): Indent.
3973 (graphite_trans_scop_swap_1and2): Add legality check.
3976 2008-07-25 Sebastian Pop <sebastian.pop@amd.com>
3978 Remove fallouts from "Reverted the Condate changes".
3979 * tree.h: Remove unused decl.
3980 * testsuite/gcc.dg/tree-checker: Same.
3981 * timevar.def: Remove counter.
3983 2008-07-24 Sebastian Pop <sebastian.pop@amd.com>
3985 * Merge from mainline (135673:138072).
3987 Reverted the MIRO changes (from 2008-04-05) that are now
3988 tracked in the miro branch.
3989 * tree-bounds.c: Removed.
3990 * tree-bounds.h: Removed.
3992 Reverted the Condate changes (from 2006-07-04, 2007-03-20) that
3993 are now tracked in the condate branch.
3994 * tree-check.c: Removed.
3995 * tree-match.c: Removed.
3996 * condate.y: Removed.
3998 2008-07-24 Dwarakanath Rajagopal <dwarak.rajagopal@amd.com>
4000 * common.opt: New user flag -floop-block, -floop-strip-mine
4001 and -floop-interchange.
4002 * toplev.c (process_options): Enable -fgraphite pass if any one of the
4003 graphite loop optimization flags is turned on.
4004 * graphite.c (graphite_apply_transformations): Add flag_loop_block,
4005 flag_loop_strip_mine and flag_loop_interchange checks before
4007 * doc/invoke.texi: Remove -fgraphite and add -floop-block,
4008 -floop-strip-mine and -floop-interchange.
4009 * testsuite/gcc.dg/graphite/block-0.c: Add -floop-block and remove
4011 * testsuite/gcc.dg/graphite/scop-16.c: Ditto.
4012 * testsuite/gcc.dg/graphite/scop-17.c: Ditto.
4013 * testsuite/gcc.dg/graphite/scop-18.c: Ditto.
4015 2008-07-23 Jan Sjodin <jan.sjodin@amd.com>
4016 Sebastian Pop <sebastian.pop@amd.com>
4018 * cfgloopmanip.c (update_dominators_in_loop): Make it static.
4019 (create_empty_loop_on_edge): More fixes.
4020 * tree-phinodes.c (resize_phi_node): Extern.
4021 (unlink_phi_node, move_phi_node): New split from remove_phi_node.
4022 * cfghooks.c (update_dominator_information): New split from
4024 * tree-vectorizer.c (rename_variables_in_bb): Extern.
4025 * tree-dfa.c (collect_dfa_stats): Start walking the CFG on the
4026 successor of the function entry block.
4028 * graphite.c: Include pointer-set.h.
4029 (debug_loop_mapping, increment_loop_mapped_depths,
4030 get_loop_mapped_depth_for_num, get_loop_mapped_depth,
4031 set_loop_mapped_depth_for_num, set_loop_mapped_depth,
4032 swap_loop_mapped_depth_for_num, get_num_from_index,
4033 swap_loop_mapped_depth, loop_iv_stack_debug,
4034 loop_iv_stack_push, loop_iv_stack_pop, loop_iv_stack_get_iv,
4035 loop_iv_stack_get_iv_from_name, loop_iv_stack_debug,
4036 get_old_iv_from_ssa_name): New.
4037 (new_scop): Initialize SCOP_LOOPS_MAPPING.
4038 (free_scop): Free SCOP_LOOPS_MAPPING.
4039 (scop_record_loop): Record old ivs.
4040 (create_var_name): Removed.
4041 (initialize_cloog_names): Allocate double space in case strip mine
4042 applies to all loops once.
4043 (clast_name_to_gcc): Look up in the map ivstack passed in parameter.
4044 (clast_to_gcc_expression): Same. Implement more clast to gimple
4046 (graphite_create_new_loop): Pass in ivstack.
4047 (remove_all_edges): Pass in the construction_edge.
4048 (graphite_remove_iv): Removed.
4049 (graphite_rename_ivs, graphite_rename_ivs_stmt,
4050 remove_cond_exprs): Rewritten.
4051 (move_phi_nodes): New.
4052 (disconnect_virtual_phi_nodes, disconnect_cond_expr): Removed.
4053 (translate_clast): Pass in ivstack. Rewrite some cases.
4054 (set_cloog_options, debug_clast_stmt): New.
4055 (find_transform): Use set_cloog_options.
4056 (outermost_loop_layer): Removed.
4057 (get_construction_edge, collect_virtual_phis, find_vdef_for_var_in_bb,
4058 find_vdef_for_var_1, find_vdef_for_var, patch_phis_for_virtual_defs,
4059 mark_old_loops, remove_dead_loops): New.
4061 (graphite_trans_bb_move_loop): Call swap_loop_mapped_depth.
4062 (const_column_index, get_first_matching_sign_row_index,
4063 get_lower_bound_row, get_upper_bound_row, get_lower_bound,
4064 get_upper_bound): New.
4065 (graphite_trans_bb_strip_mine): Also update the iv map.
4067 * graphite.h (graphite_loops_mapping, GBB_LOOPS_MAPPING): New.
4068 (struct name_tree): Add a loop field.
4069 (struct scop): Add a graphite_loops_mapping field.
4070 (SCOP_LOOPS_MAPPING): New.
4071 (debug_clast_stmt): Declare.
4072 * lambda.h (find_induction_var_from_exit_cond): Declare.
4073 (lambda-code.c): (find_induction_var_from_exit_cond): Extern.
4074 * cfgloop.h (update_dominators_in_loop): Removed declaration.
4075 (create_empty_loop_on_edge): Updated.
4076 * tree-flow.h (remove_bb, resize_phi_node, move_phi_node,
4077 rename_variables_in_bb): Declare.
4078 * tree-cfg.c (remove_bb): Extern.
4080 * testsuite/gcc.dg/graphite/block-0.c: New.
4082 2008-07-21 Dwarakanath Rajagopal <dwarak.rajagopal@amd.com>
4083 Sebastian Pop <sebastian.pop@amd.com>
4085 * graphite.c (strip_mine_profitable_p): New.
4086 (graphite_trans_bb_block): Disable strip mining if not profitable.
4088 * testsuite/gcc.dg/graphite/scop-18.c: New.
4089 * testsuite/gcc.dg/graphite/scop-17.c: Fixed.
4090 * testsuite/gcc.dg/graphite/scop-16.c: Fixed.
4092 2008-07-17 Harsha Jagasia <harsha.jagasia@amd.com>
4093 Jan Sjodin <jan.sjodin@amd.com>
4094 Sebastian Pop <sebastian.pop@amd.com>
4096 * graphite.c (is_interchange_valid): New.
4097 (graphite_trans_bb_block): Check loop nest of basic block for legality
4100 * graphite.h (gbb_inner_most_loop_index, outer_most_loop_1,
4101 outer_most_loop, gbb_outer_most_loop_index): New.
4103 * tree-loop-linear.c (perfect_loop_nest_depth): Remove static.
4104 * tree-flow.h (perfect_loop_nest_depth): Declare as extern.
4105 * testsuite/gcc.dg/graphite/scop-16.c: New.
4106 * testsuite/gcc.dg/graphite/scop-17.c: New.
4108 2008-07-11 Tobias Grosser <grosser@fim.uni-passau.de>
4110 * graphite.c (scop_remove_ignoreable_gbbs): Also update bitmap.
4111 (graphite_trans_scop_block): Ignore SCoPs without bbs.
4113 2008-07-11 Tobias Grosser <grosser@fim.uni-passau.de>
4115 * graphite.c (new_scop): Initialize SCOP_EXIT.
4116 (scopdet_info): Add.
4117 (scopdet_bb_info): Rename from is_bb_addable. Cleanup, bugfixes.
4118 (build_scops_1): Cleanup, bugfixes.
4119 (build_scops): Cleanup.
4121 * testsuite/gcc.dg/graphite/scop-matmult.c: Remove duplicated code.
4122 * testsuite/gcc.dg/graphite/scop-15.c: Add SCoP numbers.
4124 2008-07-10 Harsha Jagasia <harsha.jagasia@amd.com>
4126 * testsuite/gfortran.dg/graphite/scop-1.f: Update to reduced test case.
4128 * testsuite/gfortran.dg/graphite/graphite.exp: Use
4129 DEFAULT_GRAPHITE_FLAGS.
4131 * testsuite/gcc.dg/graphite/scop-15.c: Update to reduced test case.
4133 2008-07-10 Harsha Jagasia <harsha.jagasia@amd.com>
4135 * graphite.c (scan_tree_for_params): Do not assert any more if
4136 MULT_EXPR parameter is negative.
4138 * testsuite/gfortran.dg/graphite/scop-1.f: New.
4140 * testsuite/gfortran.dg/graphite/graphite.exp: New.
4142 * testsuite/gcc.dg/graphite/scop-15.c: New.
4144 2008-07-10 Harsha Jagasia <harsha.jagasia@amd.com>
4146 * graphite.c (is_bb_addable): Fix segfault in spec gzip and reformat.
4148 2008-07-10 Tobias Grosser <grosser@fim.uni-passau.de>
4150 * graphite.c (graphite_trans_bb_swap_loops): Rename from
4151 graphite_swap_loops.
4152 (graphite_trans_bb_move_loop): New.
4153 (graphite_trans_bb_strip_mine): Rename from graphite_strip_mine_loop.
4154 (graphite_trans_bb_block): New.
4155 (graphite_trans_loop_block): New.
4156 (graphite_trans_scop_swap_1and2): Rename from
4157 graphite_trans_swap_1and2.
4158 (graphite_trans_scop_strip): Rename from graphite_trans_strip.
4159 (graphite_trans_scop_block): New.
4160 (graphite_apply_transformations): Rename from
4161 graphite_transformations.
4163 * testsuite/gcc.dg/graphite/scop-matmult.c: New.
4165 2008-07-10 Tobias Grosser <grosser@fim.uni-passau.de>
4167 * graphite.c (gbb_compare): New.
4168 (graphite_sort_gbbs): New.
4169 (gbb_can_be_ignored): New.
4170 (scop_remove_ignoreable_gbbs): New.
4171 (graphite_transformations): Cleanup and add
4172 scop_remove_ignoreable_gbbs.
4173 * lambda.h (lambda_vector_compare): New.
4175 2008-07-09 Tobias Grosser <grosser@fim.uni-passau.de>
4177 * graphite.c (print_graphite_bb): Correct printing of static schedule.
4178 (graphite_swap_loops): int -> unsigned
4179 (graphite_strip_mine_loop): int -> unsigned, Fix SCHEDULE
4180 (graphite_transformations): New.
4181 (graphite_transform_loops): Move to graphite_transformations.
4182 * graphite.h (gbb_nb_loops): Return unsigned.
4184 2008-07-04 Tobias Grosser <grosser@fim.uni-passau.de>
4186 * graphite.c (scan_tree_for_params): Fix insertion of parameters into
4187 the domain matrix. This makes scop-0.c work again.
4189 2008-06-20 Richard Guenther <rguenther@suse.de>
4191 * graphite.h: Adjust copyright to GPLv3.
4192 * graphite.c: Likewise.
4193 (stmt_simple_memref_for_scop_p): Split out from ...
4194 (stmt_simple_for_scop_p): ... here. Fix handling of calls
4196 (get_bb_type): Optimize.
4198 (is_bb_addable): Fix memleak, replace is_pred call with
4200 (build_scops): Use current_loops.
4201 (param_index): Fix memleak.
4203 2008-06-20 Konrad Trifunovic <konrad.trifunovic@inria.fr>
4205 * graphite.c: Fix formatting.
4207 2008-06-19 Konrad Trifunovic <konrad.trifunovic@inria.fr>
4209 * graphite.c (new_scop): Memory allocation for SCOP_{NEWIVS, OLDIVS}.
4210 (free_scop): Memory deallocation for SCOP_NEWIVS, SCOP_OLDIVS.
4211 (create_var_name, save_var_name): Newly defined functions.
4212 (initialize_cloog_names): Part of the code factored out to
4214 (clast_to_gcc_expression): Now handles the case of clast_red_sum
4215 in clast_reduction statement.
4216 (graphite_create_new_loop): Now takes a new parameter
4218 (translate_clast): Now also takes the context_loop and bb_exit
4219 parameters. Rewritten the code so that it creates a gimple code
4220 inside the given context.
4221 (outermost_loop_layer, graphite_remove_iv, graphite_rename_ivs,
4222 remove_cond_expr, disconnect_cond_expr,
4223 disconnect_virtual_phi_nodes): Newly defined functions.
4224 * graphite.h (struct scop): added old_ivs vector.
4225 SCOP_OLDIVS: New macro.
4227 2008-06-19 Sebastian Pop <sebastian.pop@amd.com>
4229 * cfgloopmanip.c: Add missing function comments, fix formatting.
4231 2008-06-18 Konrad Trifunovic <konrad.trifunovic@inria.fr>
4233 * cfgloopmanip.c (update_dominators_in_loop): Defined.
4234 (create_empty_loop_on_edge): Defined.
4235 * tree-parloops.c (canonicalize_loop_ivs): Returns tree
4237 * cfgloop.h (create_empty_loop_on_edge): Declared as extern.
4238 (update_dominators_in_loop): Declared as extern
4239 * tree-flow.h (canonicalize_loop_ivs): Declared as extern.
4241 2008-06-16 Tobias Grosser <grosser@fim.uni-passau.de>
4243 * graphite.c (print_graphite_bb): Allow changing number of loops
4245 (initialize_cloog_names): Allow changing number of loops.
4246 (build_cloog_prog): Simplify.
4247 (find_transform): Enable cloog option --strides.
4248 (graphite_swap_loops): New.
4249 (graphite_strip_mine_loop): New.
4250 (graphite_trans_swap_1and2): New.
4251 (graphite_trans_strip): New.
4252 (graphite_transform_loops): Add graphite_trans_strip.
4253 * graphite.h (scop_max_loop_depth): New.
4255 2008-06-15 Tobias Grosser <grosser@fim.uni-passau.de>
4257 * graphite.c (build_scop_iteration_domain): Remove forgotten
4258 line. (Fixes compile)
4260 2008-06-15 Tobias Grosser <grosser@fim.uni-passau.de>
4262 * graphite.c (print_graphite_bb): Add output of GBB_LOOPS.
4263 (build_graphite_bb): Add GBB_LOOPS and GBB_DOMAIN and reorder.
4264 (build_bb_loops): New.
4265 (graphite_transform_loops): Add build_bb_loops.
4266 (schedule_to_scattering): Use gbb_nb_loops to support changing loop
4268 * graphite.h (graphite_bb): Add loops.
4269 (gbb_nb_loops): New.
4270 (gbb_loop_at_index): New.
4271 (gbb_loop_index): New.
4272 (nb_params_in_scop): Renamed to scop_nb_params. Updated all functions
4273 using nb_params_in_scop.
4275 2008-06-14 Tobias Grosser <grosser@fim.uni-passau.de>
4277 * graphite.c (print_graphite_bb): Adapt to minimized schedule.
4278 (build_scop_canonical_schedules): Build minimized schedule.
4279 (schedule_to_scattering): Adapt to minimized schedule.
4280 * graphite.h (graphite_bb): Add/Update descriptions.
4282 2008-06-14 Adrien Eliche <aeliche@isty.uvsq.fr>
4283 Tobias Grosser <grosser@fim.uni-passau.de>
4285 * graphite.c (print_graphite_bb): Add condition printing.
4287 (dump_gbb_conditions): New.
4288 (build_scop_conditions_1): New.
4289 (build_scop_conditions): New.
4290 * graphite.h (graphite_bb): Add conditions.
4292 2008-06-14 Tobias Grosser <grosser@fim.uni-passau.de>
4294 * graphite.c (print_graphite_bb):
4295 (free_graphite_bb): New.
4296 (free_scop): Free bbs.
4297 (get_bb_type): Free doms.
4298 (build_scop_context): Free context matrix.
4299 (build_loop_iteration_domains): Remove unused code.
4300 (build_cloog_prog): Free scattering function and blocklist.
4301 (find_transform): Free options.
4303 2008-06-13 Tobias Grosser <grosser@fim.uni-passau.de>
4305 * graphite.c (loop_body_to_cloog_stmts): Rename to add_bb_domains.
4306 Remove unnecessery cloog data structures. Make a copy of the domain
4307 (setup_cloog_loop): Rename to build_loop_iteration_domains. Remove
4308 unnecessary cloog data structures. Fix memory leaks. Remove insert
4309 into SCOP_LOOP2CLOOG_LOOP as the inserted CloogLoops will never be
4311 (build_scop_iteration_domain): Remove unnecessary cloog
4312 data structures. Fix memory leaks.
4313 (graphite_transform_loops): Disable build_scop_dynamic_schedules as it
4314 uses SCOP_LOOP2CLOOG_LOOP, that is at the moment not working.
4316 2008-06-12 Tobias Grosser <grosser@fim.uni-passau.de>
4318 * graphite.c (find_scop_params): Remove initialize_cloog_names.
4320 2008-06-12 Tobias Grosser <grosser@fim.uni-passau.de>
4322 * graphite.c (end_scop): Style fix.
4323 (schedule_to_scattering): Style and comment fix.
4325 2008-06-12 Tobias Grosser <grosser@fim.uni-passau.de>
4326 * graphite.c (print_graphite_bb): Fix definiton of
4327 schedule_to_scattering.
4328 (initialize_cloog_names): Change nb_scattdims to max loop
4330 (schedule_to_scattering): Take parameter for number of scattering
4332 (build_cloog_prog): Only build as much scattering dimensions as
4335 2008-06-12 Tobias Grosser <grosser@fim.uni-passau.de>
4337 * graphite.c (end_scop): Disable bb splitting. Fixes SIGSEGV
4338 in polyhedron/aermod.f90.
4340 2008-06-11 Tobias Grosser <grosser@fim.uni-passau.de>
4341 Dwarak Rajagopal <dwarak.rajagopal@amd.com>
4342 Harsha Jagasia <harsha.jagasia@amd.com>
4344 * graphite.c (is_bb_addable): Fix segfault.
4346 2008-06-10 Tobias Grosser <grosser@fim.uni-passau.de>
4348 * graphite.c (is_bb_addable): Fix memory leak, handling of loops
4349 with multiple exits and conditional handling in edge cases.
4350 (is_loop_exit): Fix memory leak. (Forgotten in last commit)
4352 * testsuite/gcc.dg/graphite/scop-14.c: New.
4354 2008-06-06 Tobias Grosser <grosser@fim.uni-passau.de>
4355 Adrien Eliche <aeliche@isty.uvsq.fr>
4357 * graphite.c (is_bb_addable): Add more comments and enhance
4358 readablity of the source code. Fix memory leak.
4359 (is_loop_exit): Fix memory leak.
4361 2008-06-05 Tobias Grosser <grosser@fim.uni-passau.de>
4363 * graphite.c (first_loop_in_scop): Deleted.
4364 (setup_cloog_loop): Only walk the loop chain for inner loops.
4365 (build_scop_iteration_domain): Execute setup_cloog_loop for
4366 all loops in the first layer.
4368 2008-06-05 Tobias Grosser <grosser@fim.uni-passau.de>
4370 * graphite.c (scan_tree_for_params): Change the way params are
4371 added to be indepenent of the number of loops.
4372 (setup_cloog_loop): Revert to short matrix format. Fix parameter
4374 (build_cloog_prog): Revert to short matrix format.
4376 2008-06-05 Sebastian Pop <sebastian.pop@amd.com>
4377 Dwarak Rajagopal <dwarak.rajagopal@amd.com>
4379 * tree-loop-fusion.c (fuse_loops): Fix uninitialized variable
4382 2008-06-05 Sebastian Pop <sebastian.pop@amd.com>
4384 * graphite.c (nb_data_refs_in_scop): New.
4385 (graphite_transform_loops): Print more stats: number of
4386 loops, basic blocks and data references per scop.
4388 2008-06-04 Sebastian Pop <sebastian.pop@amd.com>
4389 Jan Sjodin <jan.sjodin@amd.com>
4391 * graphite.c (loop_affine_expr, idx_record_params,
4392 find_scop_parameters, setup_cloog_loop): Use instantiate_scev
4393 instead of instantiate_parameters.
4395 2008-06-04 Tobias Grosser <grosser@fim.uni-passau.de>
4397 * graphite.c (schedule_to_scattering): Fix scattering dimensions,
4398 add support for parameters, add STATIC_SCHEDULE at the right places,
4401 2008-06-04 Tobias Grosser <grosser@fim.uni-passau.de>
4403 * graphite.c (build_scop_loop_nests): Only add the loops, that
4404 are contained completely in the SCoP.
4405 (build_cloog_prog): Disable scattering, until schedule_to_scattering
4406 and the domains are fixed.
4407 (build_scop_canonical_schedules): Add support for bbs not contained
4410 2008-06-04 Tobias Grosser <grosser@fim.uni-passau.de>
4412 * graphite.h (scop_contains_loop): Update comments to match
4413 the actual behavior.
4414 (scop_contains_loop): New.
4415 * graphite.c (schedule_to_scattering): Use scop_contains_loop.
4417 2008-06-04 Sebastian Pop <sebastian.pop@amd.com>
4419 * graphite.c (get_bb_type): On function body, i.e. loop_0,
4420 don't mark blocks as GBB_LOOP_SING_EXIT_HEADER, mark them
4423 2008-06-04 Sebastian Pop <sebastian.pop@amd.com>
4424 Tobias Grosser <grosser@fim.uni-passau.de>
4426 * graphite.c (graphite_transform_loops): Early return when
4427 there are no loops in the function.
4429 2008-05-31 Sebastian Pop <sebastian.pop@amd.com>
4430 Jan Sjodin <jan.sjodin@amd.com>
4432 * graphite.c (scan_tree_for_params, setup_cloog_loop): Compute the
4433 offset of the last loop.
4434 (setup_cloog_loop): Copy the entire outer constraint matrix.
4436 2008-05-31 Sebastian Pop <sebastian.pop@amd.com>
4437 Jan Sjodin <jan.sjodin@amd.com>
4439 * graphite.c (stmt_in_scop_p, function_parameter_p,
4440 invariant_in_scop_p): Removed.
4441 (scan_tree_for_params): Can be used with no constraint
4442 matrix for gathering parameters.
4443 (idx_record_params): Don't use idx_record_param, instead use
4444 scan_tree_for_params.
4445 (find_scop_parameters): Same.
4446 (setup_cloog_loop, build_scop_iteration_domain, build_cloog_prog):
4447 Fix the size of loop domains.
4448 (schedule_to_scattering): Exit when the outer loop is not in scop.
4449 (find_transform): Enable build_cloog_prog.
4451 2008-05-31 Sebastian Pop <sebastian.pop@amd.com>
4452 Jan Sjodin <jan.sjodin@amd.com>
4454 * graphite.c (schedule_to_scattering): Make scattering domains
4455 uniformly of the same size, as required by CLooG 0.14.0 and before.
4457 2008-05-31 Sebastian Pop <sebastian.pop@amd.com>
4458 Jan Sjodin <jan.sjodin@amd.com>
4460 * graphite.c (schedule_to_scattering): Rewrite, correct the
4461 translation of the scheduling function to scattering.
4462 (build_cloog_prog): Call schedule_to_scattering only once.
4463 * graphite.h (scop_loop_index): Do not fail for loops not
4464 in the scop: return -1.
4466 2008-05-30 Tobias Grosser <grosser@fim.uni-passau.de>
4468 * graphite.c (build_graphite_bb): Initialize GBB_DOMAIN.
4469 (loop_body_to_cloog_stmts): Export GBB_DOMAIN.
4470 (setup_cloog_loop): Export GBB_DOMAIN.
4471 (build_cloog_prog): New. Create new CLOOG_PROG, which should be
4472 able to rebuild the original control flow.
4473 * graphite.h (graphite_bb): Add domain field and access macro.
4476 2008-05-30 Sebastian Pop <sebastian.pop@amd.com>
4478 * graphite.c (debug_gbb): New.
4479 (print_scop, build_graphite_bb): Use SCOP_BBS.
4480 (build_scop_bbs): Reimplemented.
4481 (dfs_bb_in_scop_p): Removed.
4482 (build_scop_loop_nests): Reorder loops inserted in
4483 SCOP_LOOP_NEST: outer loops should come first.
4484 (build_scop_canonical_schedules): Reinitialize at zero
4485 the components of the SCOP_STATIC_SCHEDULE for the loops
4486 that have already been parsed.
4488 * graphite.h (debug_gbb): Declared.
4490 2008-05-30 Sebastian Pop <sebastian.pop@amd.com>
4491 Jan Sjodin <jan.sjodin@amd.com>
4493 * graphite.c (create_empty_loop): Renamed graphite_create_new_loop.
4494 (graphite_loop_to_gcc_loop): Removed.
4495 (remove_all_edges): New.
4496 (graphite_stmt_to_gcc_stmt): Renamed translate_clast.
4497 (gloog): Remove useless code.
4499 2008-05-29 Tobias Grosser <grosser@fim.uni-passau.de>
4501 * graphite.c (get_bb_type): Reworked. We distinguish between
4502 loops with one or multiple exits.
4503 (is_loop_exit): New.
4505 (is_bb_addable): Rework condition handling, now support for case
4506 case statements and loops with multiple exits.
4508 * testsuite/gcc.dg/graphite/scop-11.c: New.
4509 * testsuite/gcc.dg/graphite/scop-12.c: New.
4510 * testsuite/gcc.dg/graphite/scop-13.c: New.
4512 2008-05-29 Tobias Grosser <grosser@fim.uni-passau.de>
4514 * graphite.c (dot_all_scops_1): Fix some colors. Reuse colors, if
4515 we have too many colors.
4517 2008-05-22 Sandeep Maram <smaram_b04@iiita.ac.in>
4519 * doc/invoke.texi (-ftree-loop-fusion): Document.
4520 * tree-pass.h (pass_loop_fusion): Declared.
4521 * tree-loop-fusion.c: New.
4522 * timevar.def (TV_TREE_LOOP_FUSION): Declared.
4523 * tree-data-ref.c (find_data_references_in_loop): Make extern.
4524 * tree-data-ref.h (find_data_references_in_loop): Declared.
4525 * common.opt (ftree-loop-fusion): Declared.
4526 * Makefile.in (tree-loop-fusion.o): Added rule and to OBJS-common.
4528 2008-05-21 Sebastian Pop <sebastian.pop@amd.com>
4530 * graphite.c (build_access_matrix): Fix typo from the merge.
4532 2008-05-20 Sebastian Pop <sebastian.pop@amd.com>
4534 * Merge from mainline (130800:135673).
4536 2008-05-07 Sebastian Pop <sebastian.pop@amd.com>
4538 * graphite.c (end_scop): The exit of the scop is not part of the scop.
4539 Update dominators after splitting.
4541 2008-05-07 Sebastian Pop <sebastian.pop@amd.com>
4543 * graphite.c (is_bb_addable): Return the harmful statement.
4544 Factor up some code.
4545 (end_scop): New. Splits end of scope bbs on a harmful statement.
4546 (build_scops_1): Call end_scop.
4548 2008-05-07 Sebastian Pop <sebastian.pop@amd.com>
4550 * graphite.c: (succs_at_same_depth, end_scop, all_preds_visited_p,
4551 all_succs_visited_p, start_new_scop_for_each_succ, start_new_scop,
4552 add_dominators_to_open_scops, stop_last_open_scop, scop_end_loop,
4553 build_scops_1): Removed.
4554 (build_scops_2): Renamed build_scops_1.
4556 2008-05-06 Sebastian Pop <sebastian.pop@amd.com>
4558 * graphite.c: Fix formatting.
4560 2008-05-06 Tobias Grosser <grosser@fim.uni-passau.de>
4562 * graphite.c (get_bb_type): New.
4564 (build_scops_2): New.
4565 (is_bb_addable): New.
4566 (build_scops): Switch the scop detection.
4567 (build_scop_bbs): Add entry bb to scop.
4568 * graphite.h (struct scop): Update comment.
4570 2008-05-06 Tobias Grosser <grosser@fim.uni-passau.de>
4572 * graphite.c (dot_all_scops_1): Fix some incorrect colors and add
4575 2008-05-06 Tobias Grosser <grosser@fim.uni-passau.de>
4577 * testsuite/gcc.dg/graphite/scop-1.c: Update.
4578 * testsuite/gcc.dg/graphite/scop-2.c: Update.
4579 * testsuite/gcc.dg/graphite/scop-4.c: Update.
4580 * testsuite/gcc.dg/graphite/scop-5.c: Add.
4581 * testsuite/gcc.dg/graphite/scop-6.c: Add.
4583 2008-05-06 Sebastian Pop <sebastian.pop@amd.com>
4585 * testsuite/gcc.dg/graphite/scop-0.c: Add.
4586 * testsuite/gcc.dg/graphite/scop-7.c: Add.
4587 * testsuite/gcc.dg/graphite/scop-8.c: Add.
4588 * testsuite/gcc.dg/graphite/scop-9.c: Add.
4589 * testsuite/gcc.dg/graphite/scop-10.c: Add.
4591 2008-05-06 Tobias Grosser <grosser@fim.uni-passau.de>
4593 * graphite.c (scop_affine_expr): Renamed to loop_affine_expr.
4594 Check affine expressions depending on the outermost loop
4596 (stmt_simple_for_scop_p): Same.
4597 (harmfule_stmt_in_scop): Same.
4599 2008-04-28 Tobias Grosser <grosser@fim.uni-passau.de>
4601 * graphite.c (dot_all_scops): Remove incorrect difficult bb coloring,
4602 mark entry and exit, that are not part of the SCoP and update HTML
4605 2008-04-25 Sebastian Pop <sebastian.pop@amd.com>
4607 * graphite.c (basic_block_simple_for_scop_p): Renamed
4609 (save_scop, preds_at_same_depth, test_for_scop_bound): Removed.
4610 (add_dominators_to_open_scops, build_scops_1): Reimplemented.
4611 (all_preds_visited_p, all_succs_visited_p,
4612 start_new_scop_for_each_succ, start_new_scop, stop_last_open_scop,
4613 scop_end_loop): New.
4614 (build_scops): Do not use dfs_enumerate_from.
4616 * testsuite/gcc.dg/graphite/scop-{1,2,4}.c: Updated.
4618 2008-04-23 Sebastian Pop <sebastian.pop@amd.com>
4620 * graphite.c: Add comments to functions that are missing a
4622 (graphite_create_iv): Removed. Merged in graphite_loop_to_gcc_loop.
4624 2008-04-23 Sebastian Pop <sebastian.pop@amd.com>
4626 * graphite.c (nb_params_in_scop): Moved...
4627 (graphite_bb_from_bb, loop_body_to_cloog_stmts): New.
4628 (setup_cloog_loop): Call loop_body_to_cloog_stmts.
4629 (clast_to_gcc_expression): Reduce column size to less than 80.
4630 (graphite_create_iv): Return the new name of the IV.
4631 (find_transform): Set options->esp and options->cpp.
4632 (gloog): Comment out the invalidation of the old loop code.
4633 (initialize_dependence_polyhedron): Replace scop_nb_params with
4636 * graphite.h (nb_params_in_scop): ... here.
4637 (scop_nb_params): Removed.
4638 (loop_domain_dim): Return something even when the loop was not
4639 found in the hash table: avoid ICEing on all the graphite.exp
4642 2008-04-14 Konrad Trifunovic <konrad.trifunovic@inria.fr>
4644 * tree-chrec.c (for_each_scev_op): SCEV can have 3 operands.
4646 * graphite.c (build_scop_dynamic_schedules): Schedule is built
4647 according to nesting level.
4648 (find_scop_parameters): Call instantiate_parameters.
4649 (scan_tree_for_params): Extend it to handle general affine bounds.
4650 Inner loop bound can depend on outer loop induction variable.
4651 (setup_cloog_loop): tmp variable is allocated on stack. Call
4652 instantiate_parameters with respect to outermost_loop_in_scop.
4653 (loop_domain_dim, ref_nb_loops, loop_iteration_vector_dim): moved to
4655 (create_empty_loop): Function loopify should be given edge
4656 probability, instead of edge frequency. Dominance relation from
4657 switch_bb to loop_header.
4658 (clast_to_gcc_expression): Added handling of clast_reduction node.
4659 (gloog): New functionality for removing old loop.
4660 (test_dependence): Factored out from build_rdg_all_levels.
4661 (build_rdg_all_levels): Dependence testing factored out to
4662 test_dependence function.
4664 * graphite.h (struct graphite_bb): Extended with dynamic_schedule.
4665 (loop_domain_dim, ref_nb_loops, loop_iteration_vector_dim): Moved
4668 2008-04-07 Sebastian Pop <sebastian.pop@amd.com>
4670 * graphite.c (free_scop, param_index, initialize_cloog_names,
4671 nb_params_in_scop): Use name_tree map instead of just a tree
4672 for keeping track of the variable name associated to that tree.
4673 (create_empty_loop, gmp_cst_to_tree, clast_name_to_gcc,
4674 clast_to_gcc_expression, graphite_create_iv,
4675 graphite_loop_to_gcc_loop, graphite_cond_to_gcc_cond,
4676 graphite_stmt_to_gcc_stmt): New.
4677 (gloog): Call these.
4678 * graphite.h (struct name_tree): New.
4679 (struct scop): Use name_tree instead of tree for params.
4680 Store a vector of name_tree for new_ivs.
4682 (scop_nb_params): Use name_tree instead of tree.
4684 2008-04-05 Alexander Lamaison <awl03@doc.ic.ac.uk>
4685 Sebastian Pop <sebastian.pop@amd.com>
4687 * tree-bounds.c: New.
4688 * tree-bounds.h: New.
4689 * tree-pass.h: Declare pass_bounds_early and pass_bounds_late.
4690 * passes.c: Schedule pass_bounds_early, pass_bounds_late.
4691 * builtins.c (expand_builtin_alloca): Add flag_bounds as for
4695 * c-cppbuiltin.c: Same.
4699 * tree-outof-ssa.c: Same.
4701 * Makefile.in: Same.
4703 2008-03-15 Antoniu Pop <antoniu.pop@gmail.com>
4704 Sebastian Pop <sebastian.pop@amd.com>
4706 * tree-loop-distribution.c (remaining_stmts,
4707 upstream_mem_writes): Removed static variables.
4708 (copy_loop_before, create_bb_after_loop,
4709 mark_nodes_having_upstream_mem_writes, free_rdg_components,
4710 rdg_build_components, rdg_build_partitions,
4711 dump_rdg_partitions): Extern.
4712 (generate_loops_for_partition, generate_code_for_partition): Do not
4714 (already_processed_vertex_p, predecessor_has_mem_write,
4715 mark_nodes_having_upstream_mem_writes, has_upstream_mem_writes,
4716 rdg_flag_all_uses, rdg_flag_uses, rdg_flag_vertex_and_dependent,
4717 rdg_flag_loop_exits, rdg_flag_similar_memory_accesses,
4718 build_rdg_partition_for_component, rdg_build_partitions, ldist_gen):
4719 Pass remaining_stmts and upstream_mem_writes as parameters.
4720 (rdg_component): Moved...
4721 (build_rdg_partition_for_component): Do not aggregate components when
4722 flag_streamize_loops is set.
4723 (gen_sequential_loops): New.
4724 (ldist_gen): Call gen_sequential_loops.
4726 * tree-pass.h (pass_loop_streamization): Declared.
4728 * omp-low.c (expand_omp_sections): Call add_bb_to_loop on created
4729 basic blocks when loops structures exist.
4731 * builtin-types.def (BT_FN_VOID_PTR_PTR_INT): New.
4733 * tree-ssa-loop-ivopts.c (expr_invariant_in_region_p): New.
4735 * tree-parloops.c (take_address_of, eliminate_local_variables_1,
4736 eliminate_local_variables_stmt, eliminate_local_variables,
4737 separate_decls_in_loop_name, separate_decls_in_loop_stmt,
4738 separate_decls_in_loop, gen_parallel_loop): Make them work on a region
4739 of code delimited by two edges in the CFG.
4740 (separate_decls_in_loop_name): Renamed separate_decls_in_region_name.
4741 (separate_decls_in_loop_stmt): Renamed separate_decls_in_region_stmt.
4742 (separate_decls_in_loop): Renamed separate_decls_in_region. Isolate
4743 the case of parallelisation of reductions.
4744 (create_loop_fn): Extern.
4745 (create_omp_parallel_region): New.
4747 * tree-data-ref.c (dump_data_dependence_relation): Don't call
4748 dump_data_reference for printing dra and drb.
4749 (create_rdg_edge_for_ddr, create_rdg_edges_for_scalar): Initialise
4751 (build_rdg): Don't call free_dependence_relations for the moment, as
4752 we attach dependence relations on each edge of the RDG.
4755 * tree-data-ref.h (rdg_component): ...here.
4756 (struct rdg_edge): New field ddr_p relation.
4757 (RDGE_RELATION): New.
4758 (create_bb_after_loop, copy_loop_before,
4759 mark_nodes_having_upstream_mem_writes, rdg_build_components,
4760 rdg_build_partitions, dump_rdg_partitions,
4761 free_rdg_components): Declared.
4763 * omp-builtins.def (BUILT_IN_GOMP_STREAM_ALIGN_PUSH,
4764 BUILT_IN_GOMP_STREAM_ALIGN_POP): New.
4766 * tree-loop-streamization.c: New.
4768 * tree-flow.h (gather_blocks_in_sese_region, create_loop_fn,
4769 create_omp_parallel_region, expr_invariant_in_region_p): Declared.
4771 * Makefile.in (tree-loop-streamization.o): Added to OBJS-common.
4773 * tree-cfg.c (gather_blocks_in_sese_region): Extern.
4775 * passes.c: Schedule pass_loop_streamization.
4777 2008-03-08 Tobias Grosser <grosser@fmi.uni-passau.de>
4779 * graphite.c (dot_all_scops_1): Fix formatting for difficult bbs and
4782 2008-03-07 Tobias Grosser <grosser@fim.uni-passau.de>
4784 * graphite.c (dot_all_scops): Update formatting.
4785 Bbs can now be part of more than one SCoP.
4787 2008-03-04 Sebastian Pop <sebastian.pop@amd.com>
4789 * graphite.c (new_loop_to_cloog_loop_str, setup_cloog_loop): Fix
4791 (loop_domain_dim): Check for unregistered toplev SCOP loop.
4792 * graphite.h (loop_to_cloog_loop): New.
4794 2008-03-04 Konrad Trifunovic <konrad.trifunovic@inria.fr>
4796 * graphite.c (loop_domain_dim, ref_nb_loops,
4797 loop_iteration_vector_dim): New.
4798 (build_access_matrix_with_af, build_access_matrix,
4799 initialize_dependence_polyhedron): Fixed for new matrix layout.
4800 No longer assume that all iteration domains are of the same
4803 2008-03-02 Sebastian Pop <sebastian.pop@amd.com>
4805 * tree-scalar-evolution.c (instantiate_parameters_1): An SSA_NAME
4806 defined in a loop at depth 0 is invariant.
4807 * tree-chrec.c (evolution_function_is_invariant_rec_p): Ditto.
4808 * tree-ssa-loop-ivopts.c (expr_invariant_in_loop_p): Should never
4809 be called at loop depth 0.
4811 * graphite.c (basic_block_simple_for_scop_p): Take the scop as
4813 (dot_all_scops_1): Update use of basic_block_simple_for_scop_p.
4814 (down_open_scop): Removed.
4815 (loop_in_scop_p): Redefined.
4816 (scop_affine_expr): New argument: scop.
4817 (stmt_simple_for_scop_p): New argument: scop. RETURN_EXPR is not
4818 a harmful statement ending a scop.
4819 (basic_block_simple_for_scop_p): New argument: scop.
4820 (get_loop_start): Removed.
4821 (new_scop): Initialize SCOP_LOOPS.
4822 (free_scop): Free SCOP_LOOPS.
4823 (succs_at_same_depth, preds_at_same_depth): New.
4824 (end_scop): Test the validity of a scop.
4825 (add_dominators_to_open_scops): New.
4826 (test_for_scop_bound): Call add_dominators_to_open_scops.
4827 Add cases for opening and closing multiple scops.
4828 (build_scops, build_scop_bbs): Iterate over basic blocks in
4830 (build_graphite_bb): Pass scop directly.
4831 (dfs_bb_in_scop_p): New.
4832 (scop_record_loop): Use SCOP_LOOPS for not recording the same loop
4834 (nb_loops_around_gb): Use loop_in_scop_p.
4835 (schedule_to_scattering): Disabled for the moment the code computing
4836 the "textual order for outer loop".
4838 * graphite.h (struct scop): New field loops.
4840 (scop_loop_index): Test that the given loop belongs to SCOP_LOOPS.
4842 * testsuite/gcc.dg/graphite/scop-{1,...,7}.c: Updated.
4844 2008-02-27 Antoniu Pop <antoniu.pop@gmail.com>
4845 Sebastian Pop <sebastian.pop@amd.com>
4847 * builtin-types.def (BT_FN_PTR_SIZE_UINT, BT_FN_BOOL_PTR): New.
4848 * common.opt (fstreamize-loops): New.
4849 * omp-builtins.def (BUILT_IN_GOMP_STREAM_CREATE,
4850 BUILT_IN_GOMP_STREAM_PUSH, BUILT_IN_GOMP_STREAM_HEAD,
4851 BUILT_IN_GOMP_STREAM_POP, BUILT_IN_GOMP_STREAM_EOS_P,
4852 BUILT_IN_GOMP_STREAM_SET_EOS, BUILT_IN_GOMP_STREAM_DESTROY): New.
4854 2008-02-22 Konrad Trifunovic <konrad.trifunovic@inria.fr>
4856 * tree-data-ref.c (build_empty_rdg): New.
4857 (build_rdg): Use it.
4858 * tree-data-ref.h (build_empty_rdg): Declared.
4859 * graphite.c (free_scop): Free SCOP_LOOP2CLOOG_LOOP.
4860 (find_vertex_for_stmt): Removed.
4861 (build_rdg_all_levels): Use build_empty_rdg and rdg_vertex_for_stmt.
4863 2008-02-21 Sebastian Pop <sebastian.pop@amd.com>
4865 * tree-loop-distribution.c (generate_builtin): After cancelling the
4866 loop tree, also delete basic blocks.
4867 (rdg_flag_uses): Stop recursion when a vertex has already been
4870 2008-02-15 Konrad Trifunovic <konrad.trifunovic@inria.fr>
4872 * graphite.c (build_scop_alpha): Removed.
4873 (graphite_transform_loops): Add a dummy call to build_all_rdg_levels
4874 and dump_dependence_graph to avoid compiler warnings.
4876 2008-02-14 Konrad Trifunovic <konrad.trifunovic@inria.fr>
4878 * tree-data-ref.c (dr_may_alias_p, create_rdg_vertices): Extern.
4879 * tree-data-ref.h (dr_may_alias_p, create_rdg_vertices): Declared.
4880 * graphite.c (new_loop_to_cloog_loop_str, hash_loop_to_cloog_loop,
4881 eq_loop_to_cloog_loop, del_loop_to_cloog_loop): New.
4882 (new_scop, setup_cloog_loop): Initialize SCOP_LOOP2CLOOG_LOOP.
4883 (initialize_dependence_polyhedron, find_vertex_for_stmt,
4884 initialize_data_dependence_polyhedron, is_empty_polyhedron,
4885 statement_precedes_p, build_rdg_all_levels, build_scop_alpha,
4886 dump_dependence_graph): New.
4887 * graphite.h (struct graphite_bb): New field compressed_alpha_matrix.
4889 (struct scop): New field loop2cloog_loop.
4890 (SCOP_LOOP2CLOOG_LOOP, struct data_dependence_polyhedron,
4891 RDGE_DDP, ddp_p, struct loop_to_cloog_loop_str): New.
4893 2008-02-10 Konrad Trifunovic <konrad.trifunovic@inria.fr>
4895 * graphite.c (build_graphite_bb): Fix initialization
4896 of the graphite basic block.
4898 2008-02-05 Sebastian Pop <sebastian.pop@amd.com>
4900 * graphite.c (scan_tree_for_params): Rewrite for the new layout of
4901 loop domain matrix. Pass in the number of loops contained in the
4903 (nb_loops_around_gb): Moved before setup_cloog_loop that uses it.
4904 (setup_cloog_loop): Rewrite for the new layout of loop domain matrix:
4905 loops that are not surrounding the current loop are not represented
4906 in the domain constraint matrix.
4907 (build_scop_iteration_domain): Initial domain constraint matrix
4908 contains only the eq/ineq, cst, and scop parameters columns.
4910 2008-01-29 Tobias Grosser <grosser@fim.uni-passau.de>
4912 * graphite.c (schedule_to_scattering, nb_loops_around_gb): New.
4913 (print_graphite_bb): Print scattering.
4915 2008-01-29 Tobias Grosser <grosser@fim.uni-passau.de>
4917 * graphite.c (initialize_cloog_names): Initialize names of
4918 scattering variables.
4920 2009-01-29 Tobias Grosser <grosser@fim.uni-passau.de>
4922 * graphite.c (dot_all_scops_1): Disable debug output while
4925 2008-01-29 Tobias Grosser <grosser@fim.uni-passau.de>
4927 * graphite.c (find_transform): Change cloog output language to C.
4929 2008-01-27 Sebastian Pop <sebastian.pop@amd.com>
4931 * tree-loop-distribution.c (generate_memset_zero,
4932 generate_builtin, generate_code_for_partition,
4933 rdg_flag_all_uses): New.
4934 (rdg_flag_uses): Gather in the same partition the statements defining
4935 the VUSES of the current statement.
4936 (rdg_flag_similar_stores): Renamed rdg_flag_similar_memory_accesses.
4937 Gather in the same partition not only the stores to the same memory
4938 access, but also the reads.
4939 (ldist_generate_loops): Renamed ldist_gen.
4941 2008-01-24 Sebastian Pop <sebastian.pop@amd.com>
4942 Tobias Grosser <grosser@fmi.uni-passau.de>
4944 * graphite.c (setup_cloog_loop): Chain all cloog loops with the
4945 next pointer, don't use the inner pointer.
4947 2008-01-20 Tobias Grosser <grosser@fmi.uni-passau.de>
4949 * graphite.c (dot_all_scops, dot_all_scops_1): New.
4950 (find_transform): Call dot_all_1.
4951 * graphite.h (dot_all_scops): Declared.
4953 2007-12-14 Sebastian Pop <sebastian.pop@amd.com>
4955 * tree-loop-distribution.c: Fix apsi.f ICE.
4956 (create_bb_after_loop): New.
4957 (generate_loops_for_partition): Use it.
4958 * testsuite/gfortran.dg/ldist-1.f90: New.
4960 * tree-data-ref.c (dot_rdg): Use /tmp/rdg.dot for dotty format.
4961 * graphite.c (dot_scop): Use /tmp/scop.dot for dotty format.
4963 2007-12-13 Tobias Grosser <grosser@fmi.uni-passau.de>
4965 * graphite.c (find_transform): Dump cloog program sent to cloog.
4967 2007-12-13 Tobias Grosser <grosser@fmi.uni-passau.de>
4969 * graphite.c (initialize_cloog_names): Initialize cloog
4972 2007-12-13 Tobias Grosser <grosser@fmi.uni-passau.de>
4974 * graphite.c (build_scop_context): Fix typo, for the matrix
4975 format: insert '0 >= 0' instead of '-1 >= 0'.
4977 2007-12-13 Sebastian Pop <sebastian.pop@amd.com>
4979 * Fix merge problems.
4981 2007-12-13 Sebastian Pop <sebastian.pop@amd.com>
4983 * graphite.c (setup_cloog_loop): Fix typo.
4985 2007-12-12 Sebastian Pop <sebastian.pop@amd.com>
4987 * doc/invoke.texi (-ftree-loop-distribution): Documented.
4988 * tree-loop-distribution.c: Reimplemented.
4989 * tree-pass.h (pass_loop_distribution): New.
4990 * tree-scalar-evolution.c (number_of_iterations_for_all_loops): Use
4992 * graphds.h (struct graph): New field indexes.
4993 * timevar.def (TV_TREE_LOOP_DISTRIBUTION): New.
4995 * tree-vect-analyze.c: Remove declaration of static functions when not
4997 * tree-vectorizer.c: Same.
4998 (rename_variables_in_loop): Now extern.
4999 (slpeel_tree_duplicate_loop_to_edge_cfg): Renamed
5000 tree_duplicate_loop_to_edge_cfg. Reset PENDING_STMT for edges after
5001 calling redirect_edge_and_branch_force.
5003 * tree-vectorizer.h (tree_duplicate_loop_on_edge): Declared.
5005 * tree-data-ref.c: Don't include tree-chrec.h.
5006 (debug_data_dependence_relations): New.
5007 (dump_data_dependence_relation): Call dump_data_reference on data refs
5009 (same_access_functions): Moved...
5010 (find_vertex_for_stmt): Renamed rdg_vertex_for_stmt.
5011 (dump_rdg_vertex, debug_rdg_vertex, dump_rdg_component,
5012 debug_rdg_component, dump_rdg, debug_rdg, dot_rdg_1, dot_rdg,
5013 struct rdg_vertex_info, ): New.
5014 (create_rdg_edge_for_ddr): Compute the dependence level before looking
5016 (create_rdg_vertices): Initialize the htab of graph->indexes.
5017 Initialize RDG_MEM_WRITE_STMT and RDG_MEM_READS_STMT.
5018 (stmts_from_loop): Don't save LABEL_EXPR.
5019 (hash_stmt_vertex_info, eq_stmt_vertex_info,
5020 hash_stmt_vertex_del): New.
5021 (build_rdg): Initialize rdg->indexes.
5022 (free_rdg, stores_from_loop, ref_base_address,
5023 rdg_defs_used_in_other_loops_p, have_similar_memory_accesses,
5024 have_similar_memory_accesses_1, ref_base_address_1,
5025 remove_similar_memory_refs): New.
5027 * tree-data-ref.h: Include tree-chrec.h.
5028 (debug_data_dependence_relations): Declared.
5029 (same_access_functions): ...here. Now static inline.
5030 (ddr_is_anti_dependent, ddrs_have_anti_deps,
5031 ddr_dependence_level): New.
5032 (struct rdg_vertex): New fields has_mem_write, has_mem_reads.
5033 (RDGV_HAS_MEM_WRITE, RDGV_HAS_MEM_READS, RDG_STMT, RDG_MEM_WRITE_STMT,
5034 RDG_MEM_READS_STMT): New.
5035 (dump_rdg_vertex, debug_rdg_vertex, dump_rdg_component,
5036 debug_rdg_component, dump_rdg, debug_rdg, dot_rdg,
5037 rdg_vertex_for_stmt): Declared.
5038 (struct rdg_edge): New field level.
5039 (RDGE_LEVEL, free_rdg): New.
5040 (stores_from_loop, remove_similar_memory_refs,
5041 rdg_defs_used_in_other_loops_p,
5042 have_similar_memory_accesses): Declared.
5043 (rdg_has_similar_memory_accesses): New.
5045 * lambda.h (dependence_level): New.
5046 * common.opt (ftree-loop-distribution): New.
5047 * tree-flow.h (debug_loop_ir): Renamed debug_loops.
5048 (print_loop_ir): Renamed print_loops.
5049 (debug_loop, debug_loop_num, print_loops_bb, mark_virtual_ops_in_bb,
5050 tree_duplicate_loop_to_edge_cfg, rename_variables_in_loop): Declared.
5051 * Makefile.in (TREE_DATA_REF_H): Depends on tree-chrec.h.
5052 (tree-loop-distribution.o): Added.
5053 * tree-cfg.c (mark_virtual_ops_in_region): Use mark_virtual_ops_in_bb.
5054 (mark_virtual_ops_in_bb): New.
5055 (print_loops_bb, debug_loop_num, debug_loop): New.
5056 * passes.c: Scheduled pass_loop_distribution.
5058 2007-12-12 Konrad Trifunovic <konrad.trifunovic@inria.fr>
5060 * graphite.c (scan_tree_for_params): Correct the number of columns
5062 (nb_flat_iterator): New.
5063 (setup_cloog_loop): Initialize to 1 the first column for inequalities.
5064 (build_scop_iteration_domain): Correct the number of columns for
5067 2007-12-12 Sebastian Pop <sebastian.pop@amd.com>
5069 * Merge from mainline (129697:130800).
5071 2007-10-30 Sebastian Pop <sebastian.pop@amd.com>
5073 * graphite.c (build_graphite_bb): SCoP's basic blocks are post
5074 dominated by SCoP's exit.
5075 (graphite_transform_loops): Compute post dominators.
5077 2007-10-28 Sebastian Pop <sebastian.pop@amd.com>
5079 * Merge from mainline (127169:129697).
5081 2007-10-28 Sebastian Pop <sebastian.pop@amd.com>
5083 * graphite.c (affine_expr): Renamed scop_affine_expr. Use an extra
5084 parameter for the basic block that contains the expression. Use
5085 outermost_loop_in_scop for evolution_function_is_affine_multivariate_p.
5086 (stmt_simple_for_scop_p): Pass to scop_affine_expr the basic block of
5088 * graphite.h (gbb_loop): New.
5089 (GBB_LOOP): Removed.
5091 2007-08-03 Sebastian Pop <sebpop@gmail.com>
5093 * Makefile.in: Fix merge problem.
5095 2007-08-03 Sebastian Pop <sebpop@gmail.com>
5097 * Merge from mainline (125309:127169).
5098 * tree-loop-distribution.c: Disabled.
5100 2007-06-05 Sebastian Pop <sebpop@gmail.com>
5102 * Merge from mainline (r123693:125309).
5104 2007-05-30 Sebastian Pop <sebpop@gmail.com>
5106 * tree-loop-distribution.c (correct_modify_expr_p): Renamed
5108 (correct_modify_p, check_statements, number_of_lvalue_uses,
5109 number_of_scalar_dependences, create_edges): Use GIMPLE_MODIFY_STMT
5110 instead of MODIFY_EXPR.
5111 (update_edge_with_ddv): Don't pass index_of_edge. Initialize
5114 2007-05-24 Sebastian Pop <sebpop@gmail.com>
5116 * tree-loop-distribution.c (struct rdg): Replace arrays by
5117 VECs for edges and vertices.
5118 (RDG_NBV, RDG_NBE, RDG_VERTEX, RDG_EDGE): Removed.
5119 (RDGV_NB_PARTITIONS): New.
5120 (PRDG_NBV, PRDG_NBE): Removed.
5121 (build_scc_graph, correct_partitions_p, mark_partitions, build_prdg,
5122 dump_rdg, find_vertex_with_stmt, create_vertices, free_rdg,
5123 number_of_scalar_dependences, create_edges, build_rdg): Use VECs.
5125 2007-05-17 Georges-Andre Silber <silber@cri.ensmp.fr>
5126 Sebastian Pop <sebpop@gmail.com>
5128 * doc/invoke.texi (-ftree-loop-distribution): Document.
5129 * tree-loop-distribution.c: New file.
5130 * tree-pass.h (pass_loop_distribution): Declared.
5131 * timevar.def (TV_TREE_LOOP_DISTRIBUTION): New.
5132 * tree-data-ref.c (initialize_data_dependence_relation): Initialize
5134 * tree-data-ref.h (data_dependence_relation): Add reversed_p.
5135 (DDR_REVERSED_P): New.
5136 * common.opt (-ftree-loop-distribution): New.
5137 * tree-flow.h (distribute_loops): Declared.
5138 * Makefile.in (OBJS-common): Depend on tree-loop-distribution.o.
5139 * passes.c (init_optimization_passes): Schedule loop distribution.
5141 2007-05-12 Sebastian Pop <sebastian.pop@inria.fr>
5143 * graphite.c (print_graphite_bb): Don't call dump_data_references.
5144 (print_scop): Don't print when scop is NULL.
5145 (build_scop_context, find_transform): Don't output to stderr.
5147 2007-05-09 Sebastian Pop <sebastian.pop@inria.fr>
5149 * tree-data-ref.c: Don't include graphite.h.
5150 Comment out the code for printing data reference's scop.
5151 (build_access_matrix_with_af): Moved...
5152 * tree-data-ref.h (build_access_matrix_with_af): Removed declaration.
5153 * graphite.c (build_access_matrix_with_af): ... here. Now static.
5154 (print_graphite_bb): Print basic block's schedule.
5155 (print_scop): Don't print the schedule, call cloog's pretty printer.
5156 (bb_in_scop_p): A basic block is in a scop only if it is both
5157 dominated and postdominated by the scop's entry and exit basic blocks.
5158 (function_parameter_p): New.
5159 (invariant_in_scop_p): Use function_parameter_p.
5160 (new_scop, save_scop): New.
5161 (end_scop, test_for_scop_bound, build_scops): Use new_scop, and
5163 (scan_tree_for_params): Directly build the constraint as CloogMatrix.
5164 (loop_in_scop_p): New.
5165 (scop_record_loop): Use loop_in_scop_p.
5166 (build_scop_domain): Renamed build_scop_iteration_domain.
5167 (setup_cloog_loop, initialize_cloog_names, find_scop_parameters,
5168 nb_params_in_scop, build_scop_context, first_loop_in_scop,
5169 setup_cloog_loop, dot_scop_1, dot_scop): New.
5170 * graphite.h (GBB_LOOP, SCOP_PROG, dot_scop): New.
5171 (struct scop): Add a pointer to cloog's representation of a program.
5173 2007-04-14 Sebastian Pop <sebastian.pop@inria.fr>
5175 * doc/invoke.texi (-ftree-check-verbose): Renamed
5176 -ftree-checks-verbose.
5177 * common.opt (flag_tree_check_verbose): Renamed
5178 flag_tree_checks_verbose.
5179 * tree-check.c (tree_check_warning): Use flag_tree_checks_verbose.
5181 2007-04-14 Sebastian Pop <sebastian.pop@inria.fr>
5183 * configure: Regenerated.
5184 * config.in: Regenerated.
5185 * tree-ssa-loop.c (graphite_transforms): Execute
5186 graphite_transform_loops only when HAVE_cloog.
5187 * configure.ac (HAVE_polylib, HAVE_cloog, GRAPHITE): Defined.
5188 * graphite.c: Include polylibgmp.h and cloog.h.
5189 (graphite_transform_loops): Removed loops parameter.
5190 * tree-flow.h (graphite_transform_loops): Update declaration.
5191 * Makefile.in (POLYLIBLIBS, POLYLIBINC, CLOOGLIBS, CLOOGINC): New.
5192 (LIBS): Depend on CLOOGLIBS and on POLYLIBLIBS.
5193 (INCLUDES): Depend on POLYLIBINC and on CLOOGINC.
5194 (OBJS-common): Remove dependence on graphite.o.
5195 (BACKEND): Depend on @GRAPHITE@.
5197 2007-04-13 Sebastian Pop <sebastian.pop@inria.fr>
5199 * doc/invoke.texi (-ftree-check-verbose): Documented.
5200 * testsuite/gcc.dg/tree-checker/tree-checks-1.c: New.
5201 * testsuite/gcc.dg/tree-checker/tree-checks-2.c: New.
5202 * testsuite/gcc.dg/tree-checker/tree-checks-3.c: New.
5203 * testsuite/gcc.dg/tree-checker/tree-checks-4.c: New.
5204 * testsuite/gcc.dg/tree-checker/tree-checks.exp: New.
5205 * testsuite/gcc.dg/tree-checker/condates.crp: New.
5206 * common.opt (ftree-checks-verbose): New.
5207 * tree-check.c (tree_check_warning): Move extra stderr output
5208 under control of flag_tree_check_verbose.
5210 2007-04-12 Sebastian Pop <sebastian.pop@inria.fr>
5212 * tree-match.c: Fix comments formatting.
5213 * tree-match.h: Fix comments formatting.
5214 * tree-check.c: Fix comments formatting.
5215 (tree_check_init): Restructure.
5217 2007-04-12 Nic Volanschi <nic.volanschi@free.fr>
5219 * doc/invoke.texi (-ftree-check, -ftree-checks): Documented.
5221 2007-04-10 Sebastian Pop <sebastian.pop@inria.fr>
5223 * Merge from mainline (r120733:123693).
5225 2007-03-20 Nic Volanschi <nic.volanschi@free.fr>
5227 * condate.y: New file.
5228 * tree-match.h (struct patt_info_s): New field sign.
5229 (struct condate_s): New field msg.
5230 (normalize_condate, name_condate, add_condate): New.
5231 (conds[], condate_parse): Made extern.
5232 * tree-check.c (tree_check_warning): First arg changed to cond;
5233 warning reformatted.
5234 (tree_check_init): Reset the TREE_VISITED bit on every CFG node.
5236 (tree_check): Process trivial condates.
5237 (read_delimited_string): Removed.
5238 (print_cond): Print name and msg.
5239 (conds[]): Made extern.
5240 (parse_tree_check_file_once): Rewritten to use the parser in
5242 Processing of option --tree_check_string moved to tree_scan().
5243 * Makefile.in: Added condate.y
5245 2007-03-12 Sebastian Pop <sebastian.pop@inria.fr>
5247 * tree-pretty-print.c (dump_generic_bb_buff, lazy_dump_generic_node):
5248 Use VECs instead of varrays.
5249 * diagnostic.h (lazy_dump_generic_node): Update declaration.
5250 * Makefile.in (pretty-print.o): Depend on vec.h.
5251 * pretty-print.c: Include tree.h and vec.h.
5252 (pp_clear_state, pp_write_list_to_stream, pp_base_format,
5253 pp_base_format, pp_construct, pp_base_string, pp_lazy_mode,
5254 new_tree_chunk, pp_add_tree, pp_add_string, pp_add_char, pp_write_list,
5255 pp_free_list): Use VECs instead of varrays.
5256 * pretty-print.h: Do not include varray.h.
5257 (struct tree_chunk_s): Declaration moved before its use.
5258 (output_buffer): Rename varray field to chunks.
5259 * tree-match.c (tree_equal, chunk_1st_char, chunks_lookahead,
5260 tree_1st_char, match_chunks_pattinfo, match_tree_pattinfo,
5261 save_global_holes): Use VECs instead of varrays.
5262 * tree-match.h: Declare VECs of cfg_node, and hole_p.
5263 * tree-check.c (scan_cfg_stmts, push_node,
5264 print_matching_stmt): Removed.
5265 (tree_check_instance, push_global_holes_if_new, tree_check,
5266 execute_tree_check): Use VECs instead of varrays.
5267 (gate_tree_check): Don't execute the CFG check when basic_block_info
5270 2007-01-12 Sebastian Pop <sebastian.pop@inria.fr>
5272 * Merge from mainline (r115016:120733).
5274 2007-01-12 Sebastian Pop <sebastian.pop@inria.fr>
5276 * Merge from mainline (r117632:117661).
5278 2007-01-12 Sebastian Pop <sebastian.pop@inria.fr>
5280 * tree-dump.c (dump_option_value_in): Add TDF_DEBUG.
5281 * tree-pass.h (TDF_DEBUG, debug_p): New.
5282 * tree-scalar-evolution.c (set_scalar_evolution, get_scalar_evolution,
5283 get_scalar_evolution, add_to_evolution, set_nb_iterations_in_loop,
5284 get_loop_exit_condition, analyze_evolution_in_loop,
5285 analyze_initial_condition, analyze_scalar_evolution,
5286 instantiate_parameters, number_of_latch_executions): Use debug_p.
5287 * tree-chrec.c (chrec_apply): Use debug_p.
5288 * tree-data-ref.c: Include graphite.h.
5289 (dump_data_reference): Print also the access matrix.
5290 (analyze_array, analyze_indirect_ref, init_data_ref,
5291 analyze_offset_expr, address_analysis, object_analysis,
5292 create_data_ref, finalize_ddr_dependent,
5293 non_affine_dependence_relation, analyze_ziv_subscript,
5294 analyze_siv_subscript_cst_affine,
5295 compute_overlap_steps_for_affine_1_2, analyze_subscript_affine_affine,
5296 can_use_analyze_subscript_affine_affine, analyze_siv_subscript,
5297 analyze_miv_subscript, analyze_overlapping_iterations,
5298 build_classic_dist_vector, subscript_dependence_tester,
5299 compute_affine_dependence, analyze_all_data_dependences): Use debug_p.
5300 (build_access_matrix_with_af): No longer static.
5301 * tree-data-ref.h (scop_p): ... declaration here.
5302 (data_reference.scop): New field.
5303 (DR_SCOP, DR_ACCESS_MATRIX): New.
5304 (build_access_matrix_with_af, dr_num_subscripts): Declared.
5305 * graphite.c (print_graphite_bb): Call dump_data_references.
5306 (print_scop): Use scop_nb_loops and scop_dim_domain.
5307 (test_for_scop_bound): Use debug_p.
5308 (scan_tree_for_params): Use scop_nb_loops, scop_nb_loops and
5310 (scop_loop_index): Moved...
5311 (scop_record_loop): New.
5312 (build_scop_loop_nests): Use scop_record_loop.
5313 (build_scop_domain): Use scop_dim_domain.
5314 (build_access_matrix): Implemented.
5315 (build_scop_canonical_schedules): Use scop_nb_loops.
5316 (build_graphite_bb): Initialize GBB_SCOP.
5317 * graphite.h (scop_p): Moved...
5318 (graphite_bb.scop): New field.
5319 (graphite_bb.iteration_domain, GBB_DOMAIN, scop.nb_params,
5320 scop.nb_loops, scop.dim_domain, SCOP_NB_LOOPS, SCOP_NB_PARAMS,
5321 SCOP_DIM_DOMAIN, SCOP_STMTS): Removed.
5322 (scop_nb_params, scop_nb_loops, scop_dim_domain, gbb_dim_domain,
5323 scop_loop_index): New.
5324 * Makefile.in (tree-data-ref.o): Depends on graphite.h.
5326 2007-01-05 Sebastian Pop <sebastian.pop@inria.fr>
5328 * Merge from mainline (r117661:120450).
5330 2006-10-12 Sebastian Pop <sebastian.pop@inria.fr>
5332 * tree-scalar-evolution.c (instantiate_parameters_1): Don't stop
5333 at the first declaration outside the varying loop, instantiate as
5335 * tree-chrec.c (for_each_scev_op): New.
5336 * tree-chrec.h (for_each_scev_op): Declared.
5337 * tree-ssa-loop.c (pass_graphite_trans): Don't dump the function.
5338 * tree-data-ref.c (get_references_in_stmt,
5339 find_data_references_in_stmt): New, from trunk.
5340 (find_data_references_in_loop): Use get_references_in_stmt
5341 and find_data_references_in_loop, modified as in trunk.
5342 (build_access_matrix_with_af): New.
5343 * tree-data-ref.h (data_reference): Add a field access_matrix.
5344 (data_ref_loc): New, as in trunk.
5345 * graphite.c (print_graphite_bb, bb_in_scop_p, stmt_in_scop_p,
5346 invariant_in_scop_p, param_index, scan_tree_for_params,
5347 scop_loop_index, build_scop_loop_nests, build_scop_domain, irp_data,
5348 idx_record_param, idx_record_params, build_access_matrix,
5349 build_scop_data_accesses, build_scop_canonical_schedules,
5350 build_graphite_bb, build_scop_bbs, find_params_in_bb,
5351 build_scop_params): New.
5352 * graphite.h (graphite_bb): New.
5353 (scop): Add fields static_schedule, params, loop_nest,
5355 * lambda.h: Declare vecs of lambda_matrix.
5356 * tree-flow.h (print_loop_ir_bb): Declared.
5357 * tree-cfg.c (print_loop_ir_bb): New.
5358 (print_loop): Use print_loop_ir_bb.
5360 2006-10-12 Sebastian Pop <pop@cri.ensmp.fr>
5362 * Merge from mainline (r115016:117632).
5364 2006-10-11 Sebastian Pop <pop@cri.ensmp.fr>
5366 * graphite.c (debug_scops): Adjust definition for avoiding a bootstrap
5367 break due to a warning.
5369 2006-10-10 Sebastian Pop <pop@cri.ensmp.fr>
5371 * graphite.c (print_scops, debug_scops): New.
5372 (graphite_transform): Renamed graphite_find_transform.
5373 * graphite.h (debug_scops): Declared.
5375 2006-08-17 Sebastian Pop <pop@cri.ensmp.fr>
5377 * tree-match.c: Reformat following the GNU style.
5378 * tree-match.h: Reformat following the GNU style.
5379 * tree-pattern.h: Removed empty file.
5380 * Makefile.in: Remove references to tree-pattern.h.
5381 * tree-check.c: Reformat following the GNU style.
5382 (execute_tree_check): Move gate condition code to...
5383 (gate_tree_check): ...here. New function.
5384 (pass_check): Use the gate function.
5386 2006-07-04 Nic Volanschi <nic.volanschi@free.fr>
5388 * tree-pattern.h: New. Tree pattern matching and checking using
5390 * tree-check.c: New. Tree/CFG checking pass.
5391 * tree-match.c: New. Library for tree pattern matching.
5392 * opts.c, common.opt: Add options --ftree-check & --ftree-checks.
5393 * toplev.c, flags.h: Add globals for tree-check pass.
5394 * Makefile.in: Integrate the files in tree-check pass.
5395 * timevar.def, tree-optimize.c, tree-pass.h: Register tree-check pass.
5396 * pretty-print.c, pretty-print.h, tree-pretty-print.c, diagnostic.h:
5397 Introduce a "lazy" pretty-print mode.
5398 * tree.c, tree.h: Add tree_name.
5400 2006-07-04 Sebastian Pop <pop@cri.ensmp.fr>
5402 * doc/invoke.texi (-fgraphite): Correct typo.
5403 * tree-scalar-evolution.c (number_of_iterations_for_all_loops): Update
5404 use of print_loop_ir.
5405 * testsuite/gcc.dg/graphite/scop-1.c: New.
5406 * testsuite/gcc.dg/graphite/scop-2.c: New.
5407 * testsuite/gcc.dg/graphite/graphite.exp: New.
5408 * graphite.c: Include domwalk.h.
5409 (print_scop): Print only the entry and exit blocks.
5410 (debug_scop): No longer static.
5411 (affine_expr): Fix formating. Return also true when the expression is
5413 (stmt_simple_for_scop_p): Fix formating.
5414 (build_scops): Use domwalk.
5415 (get_loop_start, end_scop, test_for_scop_bound): New.
5416 (graphite_transform_loops): Avoid printing on stderr.
5417 * graphite.h (debug_scop): Declared.
5418 * tree-flow.h (debug_loop_ir, print_loop_ir): Update declarations.
5419 * Makefile.in (graphite.o): Depend on domwalk.h.
5420 * tree-cfg.c (print_loop, print_pred_bbs, print_succ_bbs): Remove
5421 declarations for static functions.
5422 (print_loop, print_loop_ir, debug_loop_ir): Use an extra parameter for
5423 controlling output verbosity.
5425 2006-06-26 Sebastian Pop <pop@cri.ensmp.fr>
5426 Plesco Alexandru <shurikx@gmail.com>
5428 * doc/invoke.texi (-fgraphite): Document.
5429 * tree-pass.h (pass_graphite_transforms): Declared.
5430 * timevar.def (TV_GRAPHITE_TRANSFORMS): New.
5431 * tree-ssa-loop.c (graphite_transforms, gate_graphite_transforms): New.
5432 (pass_graphite_transforms): Defined.
5433 * tree-data-ref.c (free_data_ref, data_reference): Extern.
5434 * tree-data-ref.h (free_data_ref, data_reference): Declared.
5435 * graphite.c, graphite.h: New.
5436 * common.opt (fgraphite): Declared.
5437 * tree-flow.h (graphite_transform_loops): Declared.
5438 * Makefile.in (OBJS-common): Add graphite.o.
5439 (graphite.o): New rule.
5440 * passes.c (pass_graphite_transforms): Scheduled.