1 2011-01-19 Sebastian Pop <sebastian.pop@amd.com>
3 * graphite-scop-detection.c (stmt_has_simple_data_refs_p): Update
4 call to graphite_find_data_references_in_stmt.
5 * graphite-sese-to-poly.c (outermost_loop_in_sese_1): New.
6 (try_generate_gimple_bb): Call outermost_loop_in_sese_1. Update
7 call to graphite_find_data_references_in_stmt.
8 (analyze_drs_in_stmts): Same.
9 * tree-data-ref.c (dr_analyze_indices): Pass in parameter the loop
10 in which the scalar analysis of indices is performed.
11 (create_data_ref): Same. Update call to dr_analyze_indices.
12 (find_data_references_in_stmt): Update call to create_data_ref.
13 (graphite_find_data_references_in_stmt): Same.
14 * tree-data-ref.h (graphite_find_data_references_in_stmt): Update
16 (create_data_ref): Same.
17 * tree-ssa-loop-prefetch.c (determine_loop_nest_reuse): Update
18 call to create_data_ref.
20 2011-01-19 Sebastian Pop <sebastian.pop@amd.com>
22 * graphite-sese-to-poly.c (build_poly_scop): Move
23 rewrite_commutative_reductions_out_of_ssa before
26 2011-01-18 Sebastian Pop <sebastian.pop@amd.com>
28 PR tree-optimization/46970
29 * gcc.dg/graphite/pr46970.c: New.
31 2011-01-18 Sebastian Pop <sebastian.pop@amd.com>
33 PR tree-optimization/46215
34 * gcc.dg/graphite/pr46215.c: New.
36 2011-01-18 Sebastian Pop <sebastian.pop@amd.com>
38 PR tree-optimization/46168
39 * gcc.dg/graphite/pr46168.c: New.
41 2011-01-18 Sebastian Pop <sebastian.pop@amd.com>
43 PR tree-optimization/43657
44 * gcc.dg/graphite/pr43657.c: New.
46 2011-01-18 Sebastian Pop <sebastian.pop@amd.com>
48 PR tree-optimization/29832
49 * gfortran.dg/graphite/pr29832.f90: New.
51 2011-01-18 Sebastian Pop <sebastian.pop@amd.com>
53 PR tree-optimization/43567
54 * gcc.dg/graphite/pr43567.c: New.
56 2011-01-17 Sebastian Pop <sebastian.pop@amd.com>
58 * Makefile.in (LAMBDA_H): Removed.
59 (TREE_DATA_REF_H): Remove dependence on LAMBDA_H.
60 (OBJS-common): Remove dependence on lambda-code.o, lambda-mat.o,
61 lambda-trans.o, and tree-loop-linear.o.
62 (lto-symtab.o): Remove dependence on LAMBDA_H.
63 (tree-loop-linear.o): Remove rule.
65 (lambda-trans.o): Same.
66 (lambda-code.o): Same.
67 (tree-vect-loop.o): Add missing dependence on TREE_DATA_REF_H.
68 (tree-vect-slp.o): Same.
69 * hwint.h (gcd): Moved here.
70 (least_common_multiple): Same.
71 * lambda-code.c: Removed.
72 * lambda-mat.c: Removed.
73 * lambda-trans.c: Removed.
75 * tree-loop-linear.c: Removed.
76 * lto-symtab.c: Do not include lambda.h.
77 * omega.c (gcd): Removed.
78 * passes.c (init_optimization_passes): Remove pass_linear_transform.
79 * tree-data-ref.c (print_lambda_vector): Moved here.
80 (lambda_vector_copy): Same.
81 (lambda_matrix_copy): Same.
82 (lambda_matrix_id): Same.
83 (lambda_vector_first_nz): Same.
84 (lambda_matrix_row_add): Same.
85 (lambda_matrix_row_exchange): Same.
86 (lambda_vector_mult_const): Same.
87 (lambda_vector_negate): Same.
88 (lambda_matrix_row_negate): Same.
89 (lambda_vector_equal): Same.
90 (lambda_matrix_right_hermite): Same.
91 * tree-data-ref.h: Do not include lambda.h.
92 (lambda_vector): Moved here.
93 (lambda_matrix): Same.
94 (dependence_level): Same.
95 (lambda_transform_legal_p): Removed declaration.
96 (lambda_collect_parameters): Same.
97 (lambda_compute_access_matrices): Same.
98 (lambda_vector_gcd): Same.
99 (lambda_vector_new): Same.
100 (lambda_vector_clear): Same.
101 (lambda_vector_lexico_pos): Same.
102 (lambda_vector_zerop): Same.
103 (lambda_matrix_new): Same.
104 * tree-flow.h (least_common_multiple): Removed declaration.
105 * tree-parloops.c (lambda_trans_matrix): Moved here.
109 (LTM_DENOMINATOR): Same.
110 (lambda_trans_matrix_new): Same.
111 (lambda_matrix_vector_mult): Same.
112 (lambda_transform_legal_p): Same.
113 * tree-pass.h (pass_linear_transform): Removed declaration.
114 * tree-ssa-loop.c (tree_linear_transform): Removed.
115 (gate_tree_linear_transform): Removed.
116 (pass_linear_transform): Removed.
117 (gate_graphite_transforms): Make flag_tree_loop_linear an alias of
118 flag_loop_interchange.
120 * gfortran.dg/graphite/interchange-4.f: New.
121 * gfortran.dg/graphite/interchange-5.f: New.
123 * gcc.dg/tree-ssa/ltrans-1.c: Removed.
124 * gcc.dg/tree-ssa/ltrans-2.c: Removed.
125 * gcc.dg/tree-ssa/ltrans-3.c: Removed.
126 * gcc.dg/tree-ssa/ltrans-4.c: Removed.
127 * gcc.dg/tree-ssa/ltrans-5.c: Removed.
128 * gcc.dg/tree-ssa/ltrans-6.c: Removed.
129 * gcc.dg/tree-ssa/ltrans-8.c: Removed.
130 * gfortran.dg/ltrans-7.f90: Removed.
131 * gcc.dg/tree-ssa/data-dep-1.c: Removed.
133 * gcc.dg/pr18792.c: -> gcc.dg/graphite/pr18792.c
134 * gcc.dg/pr19910.c: -> gcc.dg/graphite/pr19910.c
135 * gcc.dg/tree-ssa/20041110-1.c: -> gcc.dg/graphite/pr20041110-1.c
136 * gcc.dg/tree-ssa/pr20256.c: -> gcc.dg/graphite/pr20256.c
137 * gcc.dg/pr23625.c: -> gcc.dg/graphite/pr23625.c
138 * gcc.dg/tree-ssa/pr23820.c: -> gcc.dg/graphite/pr23820.c
139 * gcc.dg/tree-ssa/pr24309.c: -> gcc.dg/graphite/pr24309.c
140 * gcc.dg/tree-ssa/pr26435.c: -> gcc.dg/graphite/pr26435.c
141 * gcc.dg/pr29330.c: -> gcc.dg/graphite/pr29330.c
142 * gcc.dg/pr29581-1.c: -> gcc.dg/graphite/pr29581-1.c
143 * gcc.dg/pr29581-2.c: -> gcc.dg/graphite/pr29581-2.c
144 * gcc.dg/pr29581-3.c: -> gcc.dg/graphite/pr29581-3.c
145 * gcc.dg/pr29581-4.c: -> gcc.dg/graphite/pr29581-4.c
146 * gcc.dg/tree-ssa/loop-27.c: -> gcc.dg/graphite/pr30565.c
147 * gcc.dg/tree-ssa/pr31183.c: -> gcc.dg/graphite/pr31183.c
148 * gcc.dg/tree-ssa/pr33576.c: -> gcc.dg/graphite/pr33576.c
149 * gcc.dg/tree-ssa/pr33766.c: -> gcc.dg/graphite/pr33766.c
150 * gcc.dg/pr34016.c: -> gcc.dg/graphite/pr34016.c
151 * gcc.dg/tree-ssa/pr34017.c: -> gcc.dg/graphite/pr34017.c
152 * gcc.dg/tree-ssa/pr34123.c: -> gcc.dg/graphite/pr34123.c
153 * gcc.dg/tree-ssa/pr36287.c: -> gcc.dg/graphite/pr36287.c
154 * gcc.dg/tree-ssa/pr37686.c: -> gcc.dg/graphite/pr37686.c
155 * gcc.dg/pr42917.c: -> gcc.dg/graphite/pr42917.c
156 * gcc.dg/tree-ssa/data-dep-1.c
157 * gfortran.dg/loop_nest_1.f90: -> gfortran.dg/graphite/pr29290.f90
158 * gfortran.dg/pr29581.f90: -> gfortran.dg/graphite/pr29581.f90
159 * gfortran.dg/pr36286.f90: -> gfortran.dg/graphite/pr36286.f90
160 * gfortran.dg/pr36922.f: -> gfortran.dg/graphite/pr36922.f
161 * gfortran.dg/pr39516.f: -> gfortran.dg/graphite/pr39516.f
163 2011-01-17 Sebastian Pop <sebastian.pop@amd.com>
165 * graphite-sese-to-poly.c (close_phi_written_to_memory): Also allow
166 VAR_DECL, PARM_DECL, and RESULT_DECL.
168 * gfortran.dg/graphite/interchange-3.f90: Un-XFAILed.
170 2011-01-17 Sebastian Pop <sebastian.pop@amd.com>
172 * graphite-dependences.c (reduction_dr_1): Allow several reductions
174 * graphite-sese-to-poly.c (split_reduction_stmt): Do not split PBBs
175 that have already been marked as PBB_IS_REDUCTION.
177 2011-01-17 Sebastian Pop <sebastian.pop@amd.com>
179 * graphite-scop-detection.c (same_close_phi_node): New.
180 (remove_duplicate_close_phi): New.
181 (make_close_phi_nodes_unique): New.
182 (canonicalize_loop_closed_ssa): Call make_close_phi_nodes_unique.
184 2011-01-17 Sebastian Pop <sebastian.pop@amd.com>
186 * graphite-dependences.c (new_poly_ddr): Call same_pdr_p.
187 * graphite-poly.h (same_pdr_p): Do not expect that the PDR_TYPE
188 of both data references to be the same.
190 2011-01-17 Sebastian Pop <sebastian.pop@amd.com>
192 * graphite-dependences.c (build_lexicographical_constraint): Remove the
194 (build_lexicographical_constraint): Adjust call to ppl_powerset_is_empty.
195 (dependence_polyhedron): Same.
196 (graphite_legal_transform_dr): Same.
197 (graphite_carried_dependence_level_k): Same.
198 * graphite-ppl.c (ppl_powerset_is_empty): Remove the nb_params parameter.
199 * graphite-ppl.h (ppl_powerset_is_empty): Adjust declaration.
201 2011-01-15 Sebastian Pop <sebastian.pop@amd.com>
203 * graphite-sese-to-poly.c
204 (translate_scalar_reduction_to_array_for_stmt): Call unshare_expr.
205 (close_phi_written_to_memory): New.
206 (translate_scalar_reduction_to_array): Call close_phi_written_to_memory
209 * gcc.dg/graphite/block-0.c: Un-XFAILed.
210 * gcc.dg/graphite/block-1.c: Un-XFAILed.
211 * gcc.dg/graphite/block-7.c: Un-XFAILed.
212 * gcc.dg/graphite/block-8.c: Un-XFAILed.
213 * gcc.dg/graphite/interchange-12.c: Un-XFAILed.
214 * gcc.dg/graphite/interchange-14.c: Un-XFAILed.
215 * gcc.dg/graphite/interchange-15.c: Un-XFAILed.
216 * gcc.dg/graphite/interchange-8.c: Un-XFAILed.
217 * gcc.dg/graphite/interchange-mvt.c: Un-XFAILed.
219 2011-01-15 Sebastian Pop <sebastian.pop@amd.com>
221 * doc/install.texi: Update the expected version number of PPL to 0.11.
222 * graphite-ppl.c (ppl_powerset_is_empty): Remove now dead code under
223 #if PPL_VERSION_MINOR < 11.
225 2011-01-15 Sebastian Pop <sebastian.pop@amd.com>
227 * graphite-dependences.c (new_poly_ddr): Inlined into
228 dependence_polyhedron.
229 (free_poly_ddr): Moved close by new_poly_ddr.
230 (dependence_polyhedron_1): Renamed dependence_polyhedron.
231 Early return NULL when ppl_powerset_is_empty returns true.
232 (dependence_polyhedron): Renamed new_poly_ddr. Call only once
233 poly_drs_may_alias_p. Avoid one call to ppl_powerset_is_empty.
234 (graphite_legal_transform_dr): Call new_poly_ddr.
235 (graphite_carried_dependence_level_k): Same.
236 (dot_original_deps_stmt_1): Renamed dot_deps_stmt_2. Use new_poly_ddr.
237 (dot_transformed_deps_stmt_1): Removed.
238 (dot_deps_stmt_1): Call dot_deps_stmt_2.
239 (dot_original_deps): Renamed dot_deps_2. Call new_poly_ddr.
240 (dot_deps_1): Call dot_deps_2.
242 2011-01-15 Sebastian Pop <sebastian.pop@amd.com>
244 * graphite-dependences.c (new_poly_dr): Call ppl_powerset_is_empty.
245 (build_lexicographical_constraint): Same.
246 (dependence_polyhedron_1): Same.
247 (graphite_legal_transform_dr): Same.
248 (graphite_carried_dependence_level_k): Same.
249 * graphite-ppl.c (ppl_powerset_is_empty): New.
250 * graphite-ppl.h (ppl_powerset_is_empty): Declared.
251 * tree-data-ref.c (dump_data_reference): Print the basic block index.
253 * gcc.dg/graphite/block-0.c: Add documentation.
254 * gcc.dg/graphite/block-4.c: Same.
255 * gcc.dg/graphite/block-7.c: Same.
256 * gcc.dg/graphite/block-8.c: New.
257 * gcc.dg/graphite/interchange-1.c: Un-XFAILed.
258 * gcc.dg/graphite/interchange-11.c: Un-XFAILed.
259 * gcc.dg/graphite/interchange-12.c: Add documentation.
260 * gcc.dg/graphite/interchange-13.c: New.
261 * gcc.dg/graphite/interchange-14.c: New.
262 * gcc.dg/graphite/interchange-15.c: New.
263 * gcc.dg/graphite/interchange-8.c: Add documentation.
264 * gcc.dg/graphite/interchange-mvt.c: Same.
266 2011-01-15 Sebastian Pop <sebastian.pop@amd.com>
268 * graphite-dependences.c (build_pairwise_scheduling): Correctly compute
269 the "a followed by b" relation and document it.
271 2011-01-15 Sebastian Pop <sebastian.pop@amd.com>
273 * graphite-dependences.c (build_lexicographical_constraint): Stop the
274 iteration when the bag of constraints is empty.
276 2011-01-15 Sebastian Pop <sebastian.pop@amd.com>
278 * graphite-poly.c (pbb_remove_duplicate_pdrs): Make it work.
280 2011-01-15 Sebastian Pop <sebastian.pop@amd.com>
282 * graphite-interchange.c (lst_interchange_profitable_p): Takes a loop
283 nest and two loop depths as parameters.
284 (lst_try_interchange_loops): Call lst_interchange_profitable_p after
287 2011-01-15 Sebastian Pop <sebastian.pop@amd.com>
289 * graphite-dependences.c (print_pddr): Call
290 ppl_io_fprint_Pointset_Powerset_C_Polyhedron.
292 2011-01-15 Sebastian Pop <sebastian.pop@amd.com>
294 * graphite-ppl.c (debug_gmp_value): New.
295 * graphite-ppl.h (debug_gmp_value): Declared.
297 2011-01-13 Tobias Grosser <grosser@fim.uni-passau.de>
299 * doc/install.texi: Document availability of cloog-0.16
301 2011-01-05 Vladimir Kargov <kargov@gmail.com>
303 * graphite-scop-detection.c (is_valid_stmt_p): Pass the entry basic
304 block instead of region start to the instantiation.
305 (is_valid_bb_p): Add support for basic blocks with conditional
307 (find_scops_new): Recalculate dominance info before SCOP
310 2011-01-05 Vladimir Kargov <kargov@gmail.com>
312 * graphite-scop-detection.c (get_outermost_loop_in_region): New.
313 (is_valid_loop_p): Correct loop passed to stmt_has_simple_data_refs_p
315 2011-01-05 Vladimir Kargov <kargov@gmail.com>
317 * graphite-scop-detection.c (canonicalize_loop_closed_ssa): Free
318 invalid postdominance info
320 2010-12-29 Sebastian Pop <sebastian.pop@amd.com>
322 * Makefile.in (graphite-opencl-codegen.o): Update dependences.
323 (graphite-opencl-meta-clast.o): Same.
324 (graphite-opencl.o): Same.
325 (refined-regions.o): Same.
326 * graphite-opencl-codegen.c: Do not include unnecessary .h files.
327 * graphite-opencl-meta-clast.c: Same.
328 * graphite-opencl.c: Same.
329 * refined-regions.c: Same.
331 2010-12-27 Sebastian Pop <sebastian.pop@amd.com>
333 * graphite-opencl-codegen.c: Use FOR_EACH_VEC_ELT.
334 * graphite-opencl-meta-clast.c: Same.
335 * graphite-opencl.c: Same.
337 2010-12-27 Sebastian Pop <sebastian.pop@amd.com>
339 * graphite-opencl-codegen.c: Do not include sys/time.h.
340 * graphite-opencl.c: Same.
342 2010-12-27 Sebastian Pop <sebastian.pop@amd.com>
344 * graphite-opencl.c (h_context, h_cmd_queue, h_program): Moved
345 out of ifdef HAVE_cloog section.
347 2010-12-27 Sebastian Pop <sebastian.pop@amd.com>
349 * Makefile.in (graphite-opencl.o): Depends on
350 graphite-opencl-functions.def.
351 * graphite-opencl-functions.def: New.
352 * graphite-opencl.c (enum OPENCL_FUNCTIONS): Read data from
353 graphite-opencl-functions.def.
354 (opencl_function_names): Same.
355 (opencl_create_function_decl): Use the enum OPENCL_FUNCTIONS
356 as indices of opencl_function_names.
358 2010-12-27 Sebastian Pop <sebastian.pop@amd.com>
360 * graphite-opencl-codegen.c: Fix formatting.
361 * graphite-opencl-meta-clast.c: Same.
362 * graphite-opencl.c: Same.
364 2010-12-27 Sebastian Pop <sebastian.pop@amd.com>
366 * graphite-opencl-codegen.c: Fix formating problems.
367 * graphite-opencl-meta-clast.c: Same.
368 * graphite-opencl.c: Same.
369 * graphite-opencl.h: Same.
371 2010-12-27 Sebastian Pop <sebastian.pop@amd.com>
373 * graphite-opencl-codegen.c: Sort topologically static functions.
374 * graphite-opencl.c: Same.
376 2010-12-25 Sebastian Pop <sebastian.pop@amd.com>
378 * graphite-cloog-compat.h (cloog_names_nb_scattering): New.
379 (cloog_names_scattering): New.
380 * graphite-opencl-codegen.c (opencl_constant_expression_p): Use
381 clast_expr_* instead of expr_*. Call clast_name_to_str.
382 (opencl_clast_name_to_tree): Now takes a clast_name_p in parameter.
383 (opencl_get_scat_real_name): Same. Call clast_name_to_str.
384 (opencl_add_scat_as_arg): Same.
385 (opencl_print_local_vars): Call cloog_names_scattering and
386 cloog_names_nb_scattering.
387 (opencl_print_for): Do not call value_*.
388 (opencl_print_term): Same.
389 (opencl_print_expr): Use clast_expr_* instead of expr_*.
390 (opencl_print_sum): Same.
391 (opencl_print_binary): Same.
393 2010-12-25 Alexey Kravets <kayrick@ispras.ru>
395 * Makefile.in (OBJS-common): Add graphite-opencl-codegen.o,
396 graphite-opencl-meta-clast.o and graphite-opencl.o.
397 (graphite-opencl-codegen.o): New.
398 (graphite-opencl-meta-clast.o): New.
399 (graphite-opencl.o): New.
400 (GTFILES): Add graphite-opencl.c.
401 * common.opt (fgraphite-opencl): New.
402 (fgraphite-opencl-cpu): New.
403 (fgraphite-opencl-ignore-depth-heuristic): New.
404 (fgraphite-opencl-ignore-mem-heuristic): New.
405 (fgraphite-opencl-ignore-dep): New.
406 (fgraphite-opencl-ignore-types): New.
407 (fgraphite-opencl-depth-base): New.
408 (fgraphite-opencl-debug): New.
409 * graphite-opencl-codegen.c: New file.
410 * graphite-opencl-meta-clast.c: New file.
411 * graphite-opencl.c: New file.
412 * graphite-opencl.h: New file.
413 * graphite.c (graphite_transform_loops): Call graphite_opencl_init and
414 graphite_opencl_finalize.
415 * tree-ssa-loop.c (gate_graphite_transforms): Handle
416 flag_graphite_opencl.
417 * graphite-clast-to-gimple.c (gloog): Call opencl_transform_clast.
418 * dbgcnt.def (opencl_scop_cnt): New counter.
420 2010-12-25 Alexander Monakov <amonakov@ispras.ru>
422 * graphite-dependences.c (graphite_outer_subscript_bound): New.
423 (graphite_carried_dependence_level_k): Export.
424 * graphite-dependences.h (graphite_outer_subscript_bound): Declare.
425 (graphite_carried_dependence_level_k): Ditto.
427 2010-12-25 Alexey Kravets <kayrick@ispras.ru>
429 * graphite-clast-to-gimple.c (struct clast_name_index): Move
430 definition to graphite-clast-to-gimple.h.
431 (clast_name_to_index): Ditto.
432 (clast_name_index_elt_info): Ditto.
433 (eq_clast_name_indexes): Ditto.
434 (save_clast_name_index): Export.
435 (clast_name_to_gcc): Ditto.
436 (clast_to_gcc_expression): Ditto.
437 (gcc_type_for_clast_expr): Ditto.
438 (graphite_create_new_guard): Ditto.
439 (gcc_type_for_iv_of_clast_loop): Ditto.
440 (graphite_create_new_loop): Ditto.
441 (build_iv_mapping): Ditto.
442 (graphite_create_new_loop_guard): Ditto.
443 (debug_clast_name_index): New.
444 (debug_clast_name_indices): New debug function.
446 2010-12-21 Sebastian Pop <sebastian.pop@amd.com>
448 PR tree-optimization/47021
449 * graphite-sese-to-poly.c (scan_tree_for_params): Handle ADDR_EXPR.
451 2010-11-26 Sebastian Pop <sebastian.pop@amd.com>
453 * graphite-sese-to-poly.c (analyze_drs_in_stmts): Fix set but
455 (rewrite_cross_bb_scalar_deps_out_of_ssa): Same.
457 2010-11-26 Sebastian Pop <sebastian.pop@amd.com>
459 * graphite-sese-to-poly.c (analyze_drs): Removed.
460 (build_scop_drs): Do not call analyze_drs.
461 (analyze_drs_in_stmts): New.
463 (insert_out_of_ssa_copy): Call analyze_drs_in_stmts.
464 (insert_out_of_ssa_copy_on_edge): Same.
465 (rewrite_close_phi_out_of_ssa): Call insert_stmts.
466 (rewrite_phi_out_of_ssa): Same.
467 (rewrite_cross_bb_scalar_dependence): Same.
468 (split_reduction_stmt): Move data references in the new basic blocks.
469 (translate_scalar_reduction_to_array_for_stmt): Call insert_stmts.
471 2010-11-26 Sebastian Pop <sebastian.pop@amd.com>
473 * sese.c (rename_uses): Do not handle ADDR_EXPR in LHS of assignments.
475 2010-11-22 Sebastian Pop <sebastian.pop@amd.com>
478 * graphite-poly.c (new_poly_bb): Returns a poly_bb_p. Do not take
479 the reduction bool in parameter. Clear PBB_IS_REDUCTION. Set GBB_PBB.
480 * graphite-poly.h (new_poly_bb): Update declaration.
481 (gbb_from_bb): Moved here...
483 * graphite-sese-to-poly.c (var_used_in_not_loop_header_phi_node):
485 (graphite_stmt_p): Removed.
486 (try_generate_gimple_bb): Returns a gimple_bb_p. Do not pass in
487 sbitmap reductions. Always build a gimple_bb_p. Do not call
489 (build_scop_bbs_1): Do not pass in sbitmap reductions.
490 (build_scop_bbs): Same.
491 (gbb_from_bb): ... from here.
492 (add_conditions_to_constraints): Moved up.
494 (build_scop_drs): Call analyze_drs. Remove all the PBBs that do
495 not contain data references.
496 (new_pbb_from_pbb): New.
497 (insert_out_of_ssa_copy_on_edge): Call new_pbb_from_pbb after a
499 (rewrite_close_phi_out_of_ssa): Update call to
500 insert_out_of_ssa_copy_on_edge.
501 (rewrite_reductions_out_of_ssa): Now static.
502 (rewrite_cross_bb_scalar_deps_out_of_ssa): Same.
504 (split_reduction_stmt): Call split_pbb.
505 (translate_scalar_reduction_to_array): Pass in the scop, do not
506 pass in the sbitmap reductions.
507 (rewrite_commutative_reductions_out_of_ssa_close_phi): Same.
508 (rewrite_commutative_reductions_out_of_ssa_loop): Same.
509 (rewrite_commutative_reductions_out_of_ssa): Same.
510 (build_poly_scop): Call build_scop_bbs,
511 rewrite_commutative_reductions_out_of_ssa,
512 rewrite_reductions_out_of_ssa, and
513 rewrite_cross_bb_scalar_deps_out_of_ssa. Move build_scop_drs
515 * graphite-sese-to-poly.h (rewrite_commutative_reductions_out_of_ssa):
517 (rewrite_reductions_out_of_ssa): Same.
518 (rewrite_cross_bb_scalar_deps_out_of_ssa): Same.
519 (build_scop_bbs): Same.
520 * graphite.c (graphite_transform_loops): Do not initialize reductions.
521 Do not call build_scop_bbs,
522 rewrite_commutative_reductions_out_of_ssa,
523 rewrite_reductions_out_of_ssa, and
524 rewrite_cross_bb_scalar_deps_out_of_ssa.
525 * sese.h (struct gimple_bb): Add field pbb.
528 * gcc.dg/graphite/pr45297.c: New.
530 2010-11-22 Sebastian Pop <sebastian.pop@amd.com>
532 * graphite-sese-to-poly.c (handle_scalar_deps_crossing_scop_limits):
534 (rewrite_cross_bb_scalar_deps): Pass in the scop. Call
535 handle_scalar_deps_crossing_scop_limits.
536 (rewrite_cross_bb_scalar_deps_out_of_ssa): Create an empty BB
537 after the scop. Update call to rewrite_cross_bb_scalar_deps.
539 2010-11-22 Sebastian Pop <sebastian.pop@amd.com>
541 * sese.c (rename_uses): Call recompute_tree_invariant_for_addr_expr
542 when replacing a constant in an ADDR_EXPR.
544 2010-10-20 Sebastian Pop <sebastian.pop@amd.com>
546 * graphite-blocking.c (lst_do_strip_mine_loop): Extra parameter
548 (lst_do_strip_mine): Same.
549 (scop_do_strip_mine): Same.
550 * graphite-poly.c (apply_poly_transforms): Update call to
552 * graphite-poly.h (scop_do_strip_mine): Update declaration.
554 2010-09-24 Sebastian Pop <sebastian.pop@amd.com>
557 * graphite.c (graphite_initialize): Call scev_reset.
559 2010-09-23 Sebastian Pop <sebastian.pop@amd.com>
561 * sese.h (scev_analyzable_p): Return false for real or floating
562 point. Only handle INTEGRAL_TYPE_P and POINTER_TYPE_P.
564 2010-09-23 Sebastian Pop <sebastian.pop@amd.com>
567 * gfortran.dg/graphite/pr45758.f90: New.
569 2010-09-23 Sebastian Pop <sebastian.pop@amd.com>
571 * graphite-scop-detection.c (is_scop_p): Free bblist.
573 2010-09-23 Sebastian Pop <sebastian.pop@amd.com>
575 * graphite-clast-to-gimple.c (compute_bounds_for_level): Free le
577 * graphite-poly.c (pbb_number_of_iterations_at_time): Free le and
579 * graphite-sese-to-poly.c (add_upper_bounds_from_estimated_nit):
580 Do not allocate ub_expr, it is passed in initialized.
582 2010-09-21 Andreas Simbuerger <simbuerg@fim.uni-passau.de>
584 * common.opt (fgraphite-dump-cloog): New flag.
585 * doc/invoke.texi (-fgraphite-dump-cloog): Documented.
586 * graphite-clast-to-gimple.c (init_cloog_input_file): New.
587 (build_cloog_prog): Dump CLooG input file when
588 flag_graphite_dump_cloog is set.
589 * graphite-cloog-compat.h (cloog_program_dump_cloog): New.
591 2010-09-20 Sebastian Pop <sebastian.pop@amd.com>
593 Revert previous patch "New flag: -fgraphite-dump-cloog."
595 2010-09-20 Andreas Simbuerger <simbuerg@fim.uni-passau.de>
597 * common.opt (fgraphite-dump-cloog): New flag.
598 * doc/invoke.texi (-fgraphite-dump-cloog): Documented.
599 * graphite-clast-to-gimple.c (init_cloog_input_file): New.
600 (build_cloog_prog): Dump CLooG input file when
601 flag_graphite_dump_cloog is set.
603 2010-09-20 Sebastian Pop <sebastian.pop@amd.com>
605 * graphite-clast-to-gimple.c (graphite_verify): Remove call to
606 verify_dominators for CDI_POST_DOMINATORS.
607 * sese.h: Remove comment about CDI_POST_DOMINATORS.
608 (recompute_all_dominators): Remove call to free_dominance_info
609 for CDI_POST_DOMINATORS. Remove call to calculate_dominance_info
610 for CDI_POST_DOMINATORS.
612 2010-09-09 Sebastian Pop <sebastian.pop@amd.com>
614 * graphite-poly.c (pbb_number_of_iterations_at_time): Only iterate
615 over pbb_dim_iter_domain.
617 2010-09-09 Sebastian Pop <sebastian.pop@amd.com>
619 * graphite-flattening.c: Fix comments.
621 2010-09-09 Sebastian Pop <sebastian.pop@amd.com>
623 * Makefile.in (OBJS-common): Add graphite-flattening.o.
624 (graphite-flattening.o): New rule.
625 * common.opt (floop-flatten): New flag.
626 * doc/invoke.texi (-floop-flatten): Documented.
627 * graphite-flattening.c: New.
628 * graphite-poly.c (apply_poly_transforms): Call flatten_all_loops.
629 * graphite-poly.h (flatten_all_loops): Declared.
630 (lst_remove_loop_and_inline_stmts_in_loop_father): New.
631 * tree-ssa-loop.c (gate_graphite_transforms): When flag_loop_flatten
632 is set, also set flag_graphite.
634 2010-09-09 Sebastian Pop <sebastian.pop@amd.com>
636 * graphite-poly.c (cloog_checksum): New.
637 * graphite-poly.h (cloog_checksum): Declared.
639 2010-09-09 Sebastian Pop <sebastian.pop@amd.com>
641 * graphite-poly.c (pbb_number_of_iterations): Removed.
642 (pbb_number_of_iterations_at_time): Correctly compute the number
643 of iterations in the transformed loop.
644 * graphite-poly.h (pbb_number_of_iterations): Removed.
646 2010-09-09 Sebastian Pop <sebastian.pop@amd.com>
648 * graphite-poly.h (lst_update_scattering_seq): Removed.
649 (lst_update_scattering): Correctly handle outermost loop dewey
652 2010-09-09 Sebastian Pop <sebastian.pop@amd.com>
654 * graphite-blocking.c (pbb_strip_mine_profitable_p): Renamed
655 lst_strip_mine_profitable_p. Call lst_niter_for_loop.
656 * graphite-poly.h (lst_niter_for_loop): New.
658 2010-09-09 Sebastian Pop <sebastian.pop@amd.com>
660 * graphite-poly.c (apply_poly_transforms): Do not abort when the
661 transform read from disk is not legal. Call fatal_error instead.
663 2010-09-09 Sebastian Pop <sebastian.pop@amd.com>
665 * graphite-poly.c (print_pbb_body): Add missing closing parenthesis.
666 (print_scop_header): Removed. Inlined in the only call place...
667 (print_scop): ... here.
669 2010-09-09 Sebastian Pop <sebastian.pop@amd.com>
671 * graphite-poly.h (lst_dewey_number): Use FOR_EACH_VEC_ELT.
673 2010-09-02 Vladimir Kargov <kargov@gmail.com>
675 * graphite-scop-detection.c (is_valid_expr_p, is_valid_loop_p): New.
676 (is_valid_stmt_p): Add data reference and operation-specific checks.
677 (is_valid_bb_p): Change structure, add loop validity check.
678 (is_scop_p): Move the TODO list
679 (find_scops_new): New.
680 (build_scops_new): Move part of functionality to find_scops_new and
681 build_scops. Add necessary steps for successful SCoP construction.
682 (build_scops): Compute SCoP sets for both detection algorithms, choose
683 the resulting one depending on static condition.
685 2010-08-24 Sebastian Pop <sebastian.pop@amd.com>
687 * graphite-poly.c (graphite_read_scop_file): Fix uninitialize warning.
689 2010-08-24 Sebastian Pop <sebastian.pop@amd.com>
691 * graphite-dependences.c (dot_deps): Avoid set but not used warning.
692 (dot_deps_stmt): Same.
693 * graphite-poly.c (dot_lst): Same.
695 2010-08-23 Sebastian Pop <sebastian.pop@amd.com>
697 * graphite-blocking.c (scop_do_strip_mine): Do not call
698 graphite_legal_transform.
699 (scop_do_block): Same.
701 2010-08-20 Vladimir Kargov <kargov@gmail.com>
703 * graphite-scop-detection.c (graphite_can_represent_loop): Correct the
706 2010-08-20 Sebastian Pop <sebastian.pop@amd.com>
709 * gcc.dg/graphite/id-pr45230.c: New.
711 2010-08-20 Sebastian Pop <sebastian.pop@amd.com>
713 * tree-scalar-evolution.c (instantiate_array_ref): New.
714 (instantiate_scev_r): Also handle ARRAY_REFs.
716 2010-08-20 Sebastian Pop <sebastian.pop@amd.com>
718 * tree-scalar-evolution.c (chrec_contains_symbols_defined_in_loop):
719 Do not check for VAR_DECL, PARM_DECL, FUNCTION_DECL, LABEL_DECL,
720 RESULT_DECL, and FIELD_DECL. Return false for an
721 SSA_NAME_IS_DEFAULT_DEF.
722 (compute_scalar_evolution_in_loop): Do not further analyze the
723 scalar evolution when no_evolution_in_loop_p returns true.
725 2010-08-20 Sebastian Pop <sebastian.pop@amd.com>
727 * tree-chrec.h (evolution_function_is_affine_p): Do not check
728 whether CHREC_LEFT is invariant. A function is affine when
729 CHREC_RIGHT is invariant.
731 2010-08-20 Sebastian Pop <sebastian.pop@amd.com>
733 * graphite-sese-to-poly.c (reduction_phi_p): Remove check for
735 (rewrite_degenerate_phi): Same.
736 (rewrite_reductions_out_of_ssa): Add check for is_gimple_reg.
738 2010-08-18 Vladimir Kargov <kargov@gmail.com>
740 * graphite-scop-detection.c (graphite_can_represent_scev,
741 graphite_can_represent_expr, stmt_has_simple_data_refs_p,
742 graphite_can_represent_loop): Remove outermost_loop.
744 2010-08-17 Sebastian Pop <sebastian.pop@amd.com>
747 * graphite-sese-to-poly.c (rewrite_cross_bb_scalar_deps): Do not
748 handle GIMPLE_CALLs with no LHS.
750 2010-08-17 Riyadh Baghdadi <baghdadi.mr@gmail.com>
751 Sebastian Pop <sebastian.pop@amd.com>
753 * gcc.dg/graphite/graphite.exp: Add test rules for openscop read/write.
754 Call remove-build-file to clean up the generated *.graphite files.
756 2010-08-17 Riyadh Baghdadi <baghdadi.mr@gmail.com>
758 * doc/invoke.texi (debugging options): Update documentation.
759 (-floop-interchange): Same.
760 (-flopp-strip-mine): Same.
761 (-floop-block): Same.
762 (-fgraphite-read): Add documentation.
763 (-fgraphite-write): Same.
765 2010-08-17 Riyadh Baghdadi <baghdadi.mr@gmail.com>
767 * toplev.c (process_options): Disable graphite loop optimization
768 options when -fgraphite-read flag is used.
770 2010-08-17 Riyadh Baghdadi <baghdadi.mr@gmail.com>
772 * graphite-poly.c (init_graphite_out_file): New.
773 (init_graphite_in_file): New.
774 (apply_poly_transforms): Updated to enable reading and writing of
776 * toplev.c (init_asm_output): Remove graphite in/out file initialization.
778 2010-08-17 Tobias Grosser <grosser@fim.uni-passau.de>
780 * graphite-scop-detection.c (graphite_can_represent_scev): Remove
783 2010-08-12 Sebastian Pop <sebastian.pop@amd.com>
785 * graphite-clast-to-gimple.c (precision_for_value): Adjust
786 computation of precision by 1.
788 2010-08-12 Riyadh Baghdadi <baghdadi.mr@gmail.com>
790 * graphite-cloog-util.c (openscop_read_cloog_matrix): New.
791 (openscop_read_polyhedron_matrix): New.
792 * graphite-cloog-util.h (openscop_read_polyhedron_matrix): Declared.
793 (openscop_read_N_int): Same.
794 * graphite-poly.c (openscop_read_N_int): New.
795 (openscop_read_one_int): New.
796 (openscop_read_N_string): New.
797 (openscop_read_one_string): New.
798 (openscop_read_powerset_matrix): New.
799 (graphite_read_transforms): Remove.
800 (graphite_read_scatt): New.
801 (graphite_read_scop_file): New.
802 (apply_poly_transforms): Updated to call graphite_read_scop_file.
804 2010-08-11 Andreas Simbuerger <simbuerg@fim.uni-passau.de>
806 * graphite-poly.c: Change include order.
808 2010-08-11 Andreas Simbuerger <simbuerg@fim.uni-passau.de>
810 * graphite-cloog-compat.h (cloog_matrix_ncolumns): New.
811 (cloog_matrix_nrows): New.
813 2010-08-11 Riyadh Baghdadi <baghdadi.mr@gmail.com>
815 * graphite-cloog-util.c (openscop_print_cloog_matrix): Remove spaces
817 * graphite-poly.c (openscop_print_scattering_function_1): Same.
818 (print_scattering_function_1): Same.
819 (openscop_print_pbb_domain): Same.
820 (openscop_print_scop_context): Same.
821 (print_scop_context): Same.
823 2010-08-11 Riyadh Baghdadi <baghdadi.mr@gmail.com>
825 * graphite-poly.c (openscop_print_pdr_polyhedron): Fix indentation.
826 (openscop_print_pdr_polyhedron): Print pph.
828 2010-07-29 Sebastian Pop <sebastian.pop@amd.com>
830 * gcc.dg/graphite/graphite.exp: Add compile rules for vect-* files.
831 * gfortran.dg/graphite/graphite.exp: Same.
832 * gcc.dg/graphite/vect-pr43423.c: New.
834 2010-07-29 Sebastian Pop <sebastian.pop@amd.com>
836 * graphite-clast-to-gimple.c (gcc_type_for_interval): Generate in
837 priority signed types.
839 2010-07-29 Sebastian Pop <sebastian.pop@amd.com>
841 * graphite-clast-to-gimple.c (max_signed_precision_type): Remove the call
842 to lang_hooks.types.type_for_size. Call build_nonstandard_integer_type.
844 2010-07-29 Riyadh Baghdadi <baghdadi.mr@gmail.com>
846 * graphite-cloog-util.c (openscop_print_cloog_matrix): New.
847 (openscop_print_polyhedron_matrix): New.
848 * graphite-cloog-util.h (openscop_print_polyhedron_matrix): Declared.
849 * graphite-poly.c (openscop_print_pdr_polyhedron): Same.
850 (openscop_print_pdr_powerset): New.
851 (openscop_print_powerset_matrix): New.
852 (openscop_print_scattering_function_1): New.
853 (print_scattering_function): Add support for scattering names and
855 (graphite_write_transforms): Remove.
856 (apply_poly_transforms): Updated to call print_scop.
857 (print_pdr_access_layout): Updated to support OpenScop format.
859 (openscop_print_pbb_domain): New.
860 (print_pbb_body): Added a parameter to allow indicating that pbb_body is
862 (print_pbb): Updated to call the new print_pbb_body.
863 (openscop_print_scop_context): New.
864 (print_scop_header): New.
865 (print_scop): Updated to call print_scop_header.
866 * graphite-poly.h: Document OpenScop format.
868 2010-07-29 Sebastian Pop <sebastian.pop@amd.com>
870 * graphite-sese-to-poly.c (rewrite_close_phi_out_of_ssa): Add back
871 the case removed in the previous patch, when the only phi argument
872 is defined in the same loop as the phi node itself. Handle it
873 separately from the invariant case by both propagating it outside
874 the region and replacing the phi node with an assign.
876 2010-07-28 Sebastian Pop <sebastian.pop@amd.com>
878 * graphite-sese-to-poly.c (rewrite_close_phi_out_of_ssa): The only
879 constant phi nodes with one argument are is_gimple_min_invariant
880 and SSA_NAME_IS_DEFAULT_DEF.
882 * gfortran.dg/graphite/id-22.f: New.
884 2010-07-27 Andreas Simbuerger <simbuerg@fim.uni-passau.de>
886 * graphite.c (graphite_initialize): Do not initialize
887 CLooG and initialize the Parma Polyhedra Library
888 manually when using CLOOG_ORG.
889 (graphite_finalize): Do not finalize CLooG and finalize
890 the Parma Polyhedra Library manually when using CLOOG_ORG.
891 * graphite-cloog-compat.h (cloog_initialize): Hide function
892 when using CLOOG_ORG.
893 (cloog_finalize): Same.
895 2010-07-27 Andreas Simbuerger <simbuerg@fim.uni-passau.de>
897 * graphite-clast-to-gimple.c (free_scattering): Change
898 CloogDomainList/CloogDomain to CloogScatteringList/CloogScattering
900 (build_cloog_prog): Same.
901 * graphite-cloog-compat.h (cloog_domain): Removed.
902 (cloog_scattering): New.
903 (cloog_set_domain): Removed.
904 (cloog_set_scattering): New.
905 (cloog_next_domain): Removed.
906 (cloog_next_scattering): New.
907 (cloog_set_next_domain): Removed.
908 (cloog_set_next_scattering): New.
909 (CloogScatteringList): New.
910 (CloogScattering): New.
911 (cloog_scattering_free): New.
912 (new_Cloog_Scattering_from_ppl_Polyhedron): New.
913 * graphite-cloog-util.c (new_Cloog_Scattering_from_ppl_Polyhedron):
916 2010-07-27 Andreas Simbuerger <simbuerg@fim.uni-passau.de>
918 * graphite-clast-to-gimple.c (build_cloog_prog): Extend with
920 (set_cloog_options): Same.
921 (print_clast_stmt): Same.
922 (scop_to_clast): Same.
923 (print_generated_program): Same.
925 * graphite-clast-to-gimple.h: Include graphite-cloog-util.h.
926 (scop_to_clast): Extend with CloogState.
927 * graphite-cloog-util.c: Include graphite-cloog-compat.h
928 (new_Cloog_Domain_from_ppl_Polyhedron):
929 Extend with CloogState. Use cloog_domain_from_cloog_matrix (CLOOG_ORG).
930 (new_Cloog_Domain_from_ppl_Pointset_Powerset): Extend with CloogState.
931 (new_Cloog_Domain_from_ppl_Polyhedron): Same.
932 * graphite-cloog-util.h (build_cloog_prog): Same.
933 * graphite-cloog-copat.h (build_cloog_prog): New.
935 (cloog_state_malloc): New.
936 (cloog_state_free): New.
937 (cloog_loop_malloc): New.
938 (cloog_options_malloc): New.
939 (cloog_statement_alloc): New.
940 (cloog_domain_from_cloog_matrix): New.
941 (new_Cloog_Domain_from_ppl_Pointset_Powerset): New.
942 (new_Cloog_Domain_from_ppl_Polyhedron): New.
944 2010-07-27 Andreas Simbuerger <simbuerg@fim.uni-passau.de>
946 * graphite-clast-to-gimple.c (clast_name_to_gcc): Parameter
947 type of NAME now depends on used CLooG version.
948 (clast_to_gcc_expression): Replace expr_* with clast_expr_*.
949 (gcc_type_for_clast_expr): Same.
950 (print_clast_stmt): Replace pprint with clast_pprint.
951 * graphite-cloog-compat.h: Provide compatibility macros for
954 (clast_expr_term): New.
955 (clast_expr_red): New.
956 (clast_expr_bin): New.
959 2010-07-27 Andreas Simbuerger <simbuerg@fim.uni-passau.de>
961 * graphite-clast-to-gimple.c (set_cloog_options): Make CLooG options
962 compatible to newer CLooG releases (CLOOG_ORG).
963 (build_cloog_prog): Pass CloogOptions to more functions (CLOOG_ORG).
964 (scop_to_clast): Pass CloogOptions to build_cloog_prog (CLOOG_ORG).
965 * graphite-cloog-compat.h: Add compatibility macros for CLooG Legacy.
966 (build_cloog_prog) : New.
967 (cloog_program_extract_scalars): New.
968 (cloog_program_scatter): New.
970 2010-07-27 Andreas Simbuerger <simbuerg@fim.uni-passau.de>
972 * graphite-clast-to-gimple.c: Include graphite-cloog-compat.h
973 conditionally (CLOOG_ORG).
974 * graphite-cloog-compat.h: New. Include graphite-cloog-compat.h.
975 (cloog_statement_usr): New.
976 (cloog_domain): Same.
977 (cloog_set_domain): Same.
978 (cloog_next_domain): Same.
979 (cloog_set_next_domain): Same.
980 (cloog_program_nb_scattdims): Same.
981 (cloog_program_set_nb_scattdims): Same.
982 (cloog_program_names): Same.
983 (cloog_program_set_names): Same.
984 (cloog_program_set_context): Same.
985 (cloog_program_set_loop): Same.
986 (cloog_program_blocklist): Same.
987 (cloog_program_set_blocklist): Same.
988 (cloog_program_scaldims): Same.
989 (cloog_program_set_scaldims): Same.
990 (cloog_names_nb_parameters): Same.
991 (cloog_names_set_nb_parameters): Same.
992 (cloog_names_parameters): Same.
993 (cloog_names_set_parameters): Same.
994 (cloog_names_set_nb_iterators): Same.
995 (cloog_names_set_iterators): Same.
996 (cloog_names_set_nb_scattering): Same.
997 (cloog_names_set_scattering): Same.
998 (cloog_statement_set_usr): Same.
999 (cloog_loop_set_next): Same.
1000 (cloog_loop_set_domain): Same.
1001 (cloog_loop_set_block): Same.
1002 (cloog_block_list_next): Same.
1003 (cloog_block_list_set_next):
1004 (cloog_block_list_set_block): Same.
1006 2010-07-27 Sebastian Pop <sebastian.pop@amd.com>
1008 * graphite-sese-to-poly.c (rewrite_cross_bb_scalar_deps): Returns
1010 (rewrite_commutative_reductions_out_of_ssa_close_phi): Same.
1011 (rewrite_commutative_reductions_out_of_ssa_loop): Same.
1012 (rewrite_cross_bb_scalar_deps_out_of_ssa): Call scev_reset_htab
1013 when something has been changed.
1014 (rewrite_commutative_reductions_out_of_ssa): Same.
1016 * gcc.dg/graphite/id-26.c: New.
1018 2010-07-26 Sebastian Pop <sebastian.pop@amd.com>
1020 * graphite-sese-to-poly.c (propagate_expr_outside_region): Also
1021 handle the case when def is in the sese region.
1022 (rewrite_close_phi_out_of_ssa): Call propagate_expr_outside_region
1023 for invariant expressions.
1024 (rewrite_cross_bb_phi_deps): Removed.
1025 (rewrite_cross_bb_scalar_deps): Also handle GIMPLE_PHI nodes.
1026 (rewrite_cross_bb_scalar_deps_out_of_ssa): Do not call
1027 rewrite_cross_bb_phi_deps.
1029 2010-07-26 Sebastian Pop <sebastian.pop@amd.com>
1031 * graphite-sese-to-poly.c
1032 (rewrite_commutative_reductions_out_of_ssa_loop): Call
1033 scev_analyzable_p only on is_gimple_reg
1035 * gcc.dg/graphite/id-25.c: New.
1037 2010-07-22 Sebastian Pop <sebastian.pop@amd.com>
1039 * graphite-sese-to-poly.c (propagate_expr_outside_region): New.
1040 (rewrite_close_phi_out_of_ssa): Propagate constant values or
1041 parametric expressions outside the scop region.
1042 (rewrite_cross_bb_scalar_deps): Same.
1043 * sese.c (rename_uses): Use NULL_TREE instead of NULL for trees.
1045 * gcc.dg/graphite/run-id-5.c: New.
1046 * gcc.dg/graphite/run-id-6.c: New.
1047 * gfortran.dg/graphite/id-21.f: New.
1049 2010-07-22 Sebastian Pop <sebastian.pop@amd.com>
1051 * graphite-sese-to-poly.c (rewrite_phi_out_of_ssa): Use
1052 SSA_NAME_DEF_STMT only on SSA_NAMEs.
1054 * gcc.dg/graphite/id-24.c: New.
1056 2010-07-22 Sebastian Pop <sebastian.pop@amd.com>
1058 * tree-scalar-evolution.c (instantiate_scev_name): Do not
1059 instantiate default definitions.
1061 2010-07-20 Vladimir Kargov <kargov@gmail.com>
1063 * graphite-scop-detection.c (is_valid_stmt_p): New.
1064 (is_valid_bb_p): New.
1066 2010-07-20 Vladimir Kargov <kargov@gmail.com>
1067 Sebastian Pop <sebastian.pop@amd.com>
1069 * cfgloop.c (is_loop_exit): Renamed loop_exits_to_bb_p.
1070 (loop_exits_from_bb_p): New.
1071 * cfgloop.h (is_loop_exit): Renamed loop_exits_to_bb_p.
1072 (loop_exits_from_bb_p): Declared.
1073 * graphite-scop-detection.c (scopdet_basic_block_info): Call
1076 2010-07-20 Vladimir Kargov <kargov@gmail.com>
1078 * refined-regions.c: Include tree-pass.h, cfgloop.h, gimple.h, and
1080 (dot_regions_1): New.
1082 * refined-regions.h (dot_regions): Declared.
1083 * Makefile.in (refined-regions.o): Update dependences.
1085 2010-07-20 Sebastian Pop <sebastian.pop@amd.com>
1087 * graphite-sese-to-poly.c (rewrite_close_phi_out_of_ssa): Add an
1088 extra parameter for the region. Call scev_analyzable_p.
1089 (rewrite_reductions_out_of_ssa): Update call to
1090 rewrite_close_phi_out_of_ssa.
1091 (rewrite_cross_bb_phi_deps): Same.
1092 (rewrite_commutative_reductions_out_of_ssa_loop): Add an extra
1093 parameter for the region. Call scev_analyzable_p.
1094 (rewrite_commutative_reductions_out_of_ssa): Update call to
1095 rewrite_commutative_reductions_out_of_ssa_loop.
1097 2010-07-20 Sebastian Pop <sebastian.pop@amd.com>
1099 * gcc.dg/tree-ssa/pr20742.c: New.
1101 2010-07-15 Sebastian Pop <sebastian.pop@amd.com>
1103 * sese.c (rename_uses): Call unshare_expr before force_gimple_operand.
1105 * gcc.dg/graphite/id-23.c: New.
1107 2010-07-15 Sebastian Pop <sebastian.pop@amd.com>
1109 * graphite-sese-to-poly.c (reduction_phi_p): Do not rewrite out of
1110 SSA scalar phi nodes that can be scev_analyzable_p.
1112 * gfortran.dg/graphite/id-20.f: Adjust testcase.
1114 2010-07-15 Sebastian Pop <sebastian.pop@amd.com>
1116 * graphite-sese-to-poly.c (rewrite_close_phi_out_of_ssa): Correctly
1117 handle SSA_NAME_IS_DEFAULT_DEF.
1119 2010-07-15 Sebastian Pop <sebastian.pop@amd.com>
1121 * sese.c (rename_uses): Handl unconditionally gimple_debug statements.
1123 * gcc.dg/graphite/pr42729.c: New.
1125 2010-07-15 Sebastian Pop <sebastian.pop@amd.com>
1127 * graphite-sese-to-poly.c (rewrite_close_phi_out_of_ssa): Special
1128 case non close-phi nodes with one argument.
1130 2010-07-15 Sebastian Pop <sebastian.pop@amd.com>
1132 * sese.h (scev_analyzable_p): Scevs could be expressions without
1133 chrecs and still be scev_analyzable_p.
1135 2010-07-15 Sebastian Pop <sebastian.pop@amd.com>
1137 * params.def (PARAM_SCEV_MAX_EXPR_SIZE): Bump the value to 100.
1139 2010-07-15 Sebastian Pop <sebastian.pop@amd.com>
1141 * cfgloop.c (alloc_loop): Remove initialization of loop->single_iv.
1142 * cfgloop.h (struct loop): Remove single_iv field.
1143 * graphite-sese-to-poly.c (graphite_loop_normal_form): Removed.
1144 (scop_canonicalize_loops): Removed.
1145 (scop_ivs_can_be_represented): Do not use loop->single_iv. Iterate
1146 over all the loop phi nodes in loop->header.
1147 (build_poly_scop): Remove use of scop_canonicalize_loops.
1149 2010-07-15 Sebastian Pop <sebastian.pop@amd.com>
1151 * graphite-sese-to-poly.c (rewrite_cross_bb_scalar_deps): Also
1154 2010-07-15 Sebastian Pop <sebastian.pop@amd.com>
1156 * tree-chrec.c (chrec_apply): Should only apply to the specified
1157 variable. Also handle multivariate chains of recurrences that
1158 satisfy evolution_function_is_affine_p. Also handle CASE_CONVERT.
1160 2010-07-15 Sebastian Pop <sebastian.pop@amd.com>
1162 * graphite-clast-to-gimple.c (debug_clast_name_index): Removed.
1163 (debug_clast_name_indexes_1): Removed.
1164 (debug_clast_name_indexes): Removed.
1165 (pbb_to_depth_to_oldiv): Removed.
1166 (build_iv_mapping): Replace the use of rename_map with iv_map.
1167 (translate_clast_user): Remove uses of rename_map. Allocate and
1169 (translate_clast_for_loop): Remove uses of rename_map.
1170 (translate_clast_for): Same.
1171 (translate_clast_guard): Same.
1172 (translate_clast): Same.
1174 * graphite-clast-to-gimple.h (debug_clast_name_indexes): Removed.
1175 * graphite-sese-to-poly.c (scev_analyzable_p): Moved...
1176 * sese.c (set_rename): Now static.
1177 (rename_variables_in_stmt): Removed.
1179 (is_parameter): Removed.
1181 (expand_scalar_variables_call): Removed.
1182 (expand_scalar_variables_ssa_name): Removed.
1183 (expand_scalar_variables_expr): Removed.
1184 (expand_scalar_variables_stmt): Removed.
1185 (expand_scalar_variables): Removed.
1186 (rename_variables): Removed.
1187 (remove_condition): Removed.
1188 (get_true_edge_from_guard_bb): Removed.
1189 (get_false_edge_from_guard_bb): Removed.
1190 (struct igp): Removed.
1191 (default_before_guard): Removed.
1192 (convert_for_phi_arg): Removed.
1193 (add_guard_exit_phis): Removed.
1194 (insert_guard_phis): Removed.
1195 (graphite_copy_stmts_from_block): Now also uses iv_map and a
1196 region. Do not copy conditions. Do not copy induction variables.
1198 (copy_bb_and_scalar_dependences): Allocate a local rename_map for
1199 the translated statement. Use the iv_map for the induction
1201 * sese.h (copy_bb_and_scalar_dependences): Update declaration.
1202 (set_rename): Removed declaration.
1203 (scev_analyzable_p): ...here.
1204 * tree-chrec.c (chrec_apply_map): New.
1205 * tree-chrec.h (chrec_apply_map): Declared.
1207 2010-07-15 Sebastian Pop <sebastian.pop@amd.com>
1209 * graphite-clast-to-gimple.c (translate_clast_for_loop): Do not call
1210 insert_loop_close_phis.
1211 * sese.c (name_defined_in_loop_p): Removed.
1212 (expr_defined_in_loop_p): Removed.
1213 (alive_after_loop): Removed.
1214 (close_phi_not_yet_inserted_p): Removed.
1215 (struct alep): Removed.
1216 (add_loop_exit_phis): Removed.
1217 (insert_loop_close_phis): Removed.
1219 2010-07-15 Andreas Simbuerger <simbuerg@fim.uni-passau.de>
1221 * graphite-cloog-util.c (cloog_matrix_to_ppl_constraint): Fix flipped
1223 * graphite-poly.c (psct_scattering_dim_for_loop_depth): Same.
1225 2010-07-07 Sebastian Pop <sebastian.pop@amd.com>
1227 * gfortran.dg/graphite/id-20.f: New.
1229 2010-07-05 Andreas Simbuerger <simbuerg@fim.uni-passau.de>
1231 * graphite-cloog-util.h: Added cloog.h.
1232 * graphite-blocking.c: Removed cloog.h.
1233 * graphite-dependences.c: Same.
1234 * graphite-interchange.c: Same.
1235 * graphite-poly.c: Same.
1236 * graphite-ppl.c: Same.
1237 * graphite-scop-detection.c: Same.
1238 * graphite-sese-to-poly.c:
1240 Removed graphite-clast-to-gimple.h.
1241 (check_poly_representation): Removed (unused).
1242 * graphite-sese-to-poly.h
1243 (check_poly_representation): Removed (unused).
1245 2010-07-05 Andreas Simbuerger <simbuerg@fim.uni-passau.de>
1248 (OBJS-common): Added graphite-cloog-util.o.
1249 (graphite-clast-to-gimple.o): Added graphite-cloog-util.h.
1250 (graphite-cloog-util.o): New.
1251 (graphite-ppl.o): Added graphite-cloog-util.h.
1252 * graphite-clast-to-gimple.c:
1253 Added graphite-cloog-util.h to include statements.
1254 * graphite-cloog-util.c: New.
1255 (new_Cloog_Matrix_from_ppl_Polyhedron): Moved from graphite-ppl.c.
1256 (new_Cloog_Domain_from_ppl_Polyhedron): Same.
1257 (new_Cloog_Domain_from_ppl_Pointset_Powerset): Same.
1258 (new_C_Polyhedron_from_Cloog_Matrix): Same.
1259 (ppl_Constrain_System_number_of_constraints): Same.
1260 (new_Cloog_Matrix_from_ppl_Constraint_System): Same.
1261 (oppose_constraint): Same.
1262 (cloog_matrix_to_ppl_constraint): Same.
1263 (new_Constraint_System_from_Cloog_Matrix): Same.
1264 (insert_constraint_into_matrix): Same. Declared static.
1265 * graphite-cloog-util.h: New.
1266 (new_Cloog_Matrix_from_ppl_Polyhedron): Moved from graphite-ppl.h.
1267 (new_Cloog_Domain_from_ppl_Polyhedron): Same.
1268 (new_Cloog_Domain_from_ppl_Pointset_Powerset): Same.
1269 (new_C_Polyhedron_from_Cloog_Matrix): Same.
1270 (insert_constraint_into_matrix): Same.
1272 Added graphite-cloog-util.h to include statements.
1273 (new_Cloog_Matrix_from_ppl_Polyhedron): Moved to graphite-cloog-util.c.
1274 (new_Cloog_Domain_from_ppl_Polyhedron): Same.
1275 (new_Cloog_Domain_from_ppl_Pointset_Powerset): Same.
1276 (new_C_Polyhedron_from_Cloog_Matrix): Same.
1277 (insert_constraint_into_matrix): Same.
1278 (ppl_Constrain_System_number_of_constraints): Same.
1279 (new_Cloog_Matrix_from_ppl_Constraint_System): Same.
1280 (oppose_constraint): Same.
1281 (cloog_matrix_to_ppl_constraint): Same.
1282 (new_Constraint_System_from_Cloog_Matrix): Same.
1284 (new_Cloog_Matrix_from_ppl_Polyhedron): Moved to
1285 graphite-cloog-util.h.
1286 (new_Cloog_Domain_from_ppl_Polyhedron): Same.
1287 (new_Cloog_Domain_from_ppl_Pointset_Powerset): Same.
1288 (new_C_Polyhedron_from_Cloog_Matrix): Same.
1289 (insert_constraint_into_matrix): Removed.
1291 2010-07-04 Andreas Simbuerger <simbuerg@fim.uni-passau.de>
1293 * graphite-clast-to-gimple.c
1294 (precision_for_value): Resolve value_* calls to matching mpz_* calls.
1295 (precision_for_interval): Same.
1296 (gcc_type_for_interval): Same.
1297 (compute_type_for_level): Same.
1298 * graphite-interchange.c
1299 (lst_interchange_profitable_p): Same.
1301 (psct_scattering_dim_for_loop_depth): Same.
1303 (ppl_max_for_le_pointset): Same.
1304 (ppl_min_for_le_pointset): Same.
1306 2010-06-25 Vladimir Kargov <kargov@gmail.com>
1308 * refined-regions.c (bb_index_compare): New.
1309 (get_bbs_in_region): New.
1310 (print_bbs_in_region): New.
1311 (print_refined_region): Add an argument that allows to print
1312 all basic blocks contained in regions.
1313 (debug_refined_region): Update call to print_refined_region.
1314 * refined-regions.h (print_refined_region): Update declaration.
1315 (get_bbs_in_region): Declared.
1316 * graphite-scop-detection.c (build_scops_new): Print the refined
1317 region tree into the Grahite dump file.
1319 2010-06-24 Sebastian Pop <sebastian.pop@amd.com>
1321 * graphite-sese-to-poly.c (rewrite_degenerate_phi): New.
1322 (rewrite_reductions_out_of_ssa): Call it for degenerate_phi_result.
1324 2010-06-24 Sebastian Pop <sebastian.pop@amd.com>
1326 * graphite-sese-to-poly.c (rewrite_cross_bb_phi_deps): Call
1327 rewrite_close_phi_out_of_ssa.
1329 * gcc.dg/graphite/id-22.c: New.
1331 2010-06-24 Sebastian Pop <sebastian.pop@amd.com>
1333 * graphite-sese-to-poly.c (rewrite_cross_bb_phi_deps): Remove dead code.
1335 2010-06-24 Sebastian Pop <sebastian.pop@amd.com>
1337 * graphite-clast-to-gimple.c (build_iv_mapping): Rename map with
1339 * sese.c (debug_rename_map): Same.
1342 (rename_variables_in_stmt): Same.
1343 (expand_scalar_variables_call): Same.
1344 (expand_scalar_variables_ssa_name): Same.
1345 (expand_scalar_variables_expr): Same.
1346 (expand_scalar_variables_stmt): Same.
1347 (expand_scalar_variables): Same.
1348 (rename_variables): Same.
1349 (graphite_copy_stmts_from_block): Same.
1350 (copy_bb_and_scalar_dependences): Same.
1352 2010-06-24 Sebastian Pop <sebastian.pop@amd.com>
1354 * graphite-clast-to-gimple.c (copy_renames): Removed.
1355 (translate_clast_for): Do not call copy_renames.
1356 (translate_clast_guard): Same.
1358 2010-06-23 Sebastian Pop <sebastian.pop@amd.com>
1360 * graphite-sese-to-poly.c (rewrite_reductions_out_of_ssa): Moved up.
1361 (rewrite_cross_bb_phi_deps): Split out of rewrite_cross_bb_scalar_deps.
1362 (rewrite_cross_bb_scalar_deps_out_of_ssa): Run rewrite_cross_bb_phi_deps
1363 before rewrite_cross_bb_scalar_deps.
1365 2010-06-23 Sebastian Pop <sebastian.pop@amd.com>
1367 * graphite-sese-to-poly.c (rewrite_commutative_reductions_out_of_ssa):
1368 Early return in when flag_associative_math is not set.
1370 2010-06-23 Sebastian Pop <sebastian.pop@amd.com>
1372 * gcc.dg/graphite/run-id-2.c: Call abort.
1374 2010-06-23 Sebastian Pop <sebastian.pop@amd.com>
1376 * graphite-sese-to-poly.c (rewrite_phi_out_of_ssa): Always insert out
1377 of SSA copies on edges except for loop->latch.
1379 2010-06-23 Sebastian Pop <sebastian.pop@amd.com>
1381 * graphite-sese-to-poly.c (rewrite_cross_bb_scalar_deps_out_of_ssa):
1382 Split out of rewrite_reductions_out_of_ssa.
1383 * graphite-sese-to-poly.h (rewrite_cross_bb_scalar_deps_out_of_ssa):
1385 * graphite.c (graphite_transform_loops): Call it.
1387 2010-06-23 Sebastian Pop <sebastian.pop@amd.com>
1389 * graphite.c (graphite_transform_loops): Add two more dbg_cnt calls.
1391 2010-06-15 Sebastian Pop <sebastian.pop@amd.com>
1393 * passes.c (init_optimization_passes): Add pass_graphite.
1394 Schedule a pass_copy_prop before pass_graphite_transforms.
1395 * timevar.def (TV_GRAPHITE): Declared.
1396 * tree-pass.h (pass_graphite): Declared.
1397 * tree-ssa-loop.c (pass_graphite): New.
1399 * gcc.dg/graphite/id-20.c: New.
1401 2010-06-12 Sebastian Pop <sebastian.pop@amd.com>
1403 * graphite-clast-to-gimple.c (gloog): Do not pass scops in parameter.
1404 Remove calls to rename_nb_iterations and rename_sese_parameters.
1405 * graphite-clast-to-gimple.h (gloog): Update declaration.
1406 * graphite.c (graphite_transform_loops): Update call to gloog.
1407 * sese.c (rename_variables_in_expr): Removed.
1408 (rename_nb_iterations): Removed.
1409 (rename_sese_parameters): Removed.
1410 * sese.h (rename_nb_iterations): Removed.
1411 (rename_sese_parameters): Removed.
1413 2010-06-12 Sebastian Pop <sebastian.pop@amd.com>
1415 * graphite-clast-to-gimple.c (gloog): Remove call to
1416 sese_adjust_liveout_phis.
1417 * graphite-sese-to-poly.c (scev_analyzable_p): When scev returns an
1418 SSA_NAME, allow it to be handled by rewrite_cross_bb_scalar_deps.
1419 (rewrite_cross_bb_scalar_deps): Handle GIMPLE_PHI nodes: call
1420 rewrite_phi_out_of_ssa.
1421 * sese.c (get_vdef_before_sese): Removed.
1422 (sese_adjust_vphi): Removed.
1423 (sese_adjust_liveout_phis): Removed.
1424 * sese.h (sese_adjust_liveout_phis): Removed.
1426 2010-06-12 Sebastian Pop <sebastian.pop@amd.com>
1428 * graphite-sese-to-poly.c (insert_out_of_ssa_copy): Pass an extra
1429 argument for the place after which to insert the out of SSA copy.
1430 (rewrite_close_phi_out_of_ssa): Update calls to insert_out_of_ssa_copy.
1431 (rewrite_phi_out_of_ssa): Same.
1432 (rewrite_cross_bb_scalar_deps): Same.
1433 (insert_copyout): Removed.
1434 (insert_copyin): Removed.
1435 (translate_scalar_reduction_to_array): Call insert_out_of_ssa_copy and
1436 insert_out_of_ssa_copy_on_edge instead of insert_copyout and
1439 2010-06-12 Sebastian Pop <sebastian.pop@amd.com>
1441 * graphite-sese-to-poly.c (build_scop_bbs): Not static anymore.
1442 (rewrite_reductions_out_of_ssa): Same.
1443 (rewrite_commutative_reductions_out_of_ssa): Same.
1444 (build_poly_scop): Do not call these functions.
1445 * graphite-sese-to-poly.h (build_poly_scop): Declared.
1446 (rewrite_reductions_out_of_ssa): Declared.
1447 (rewrite_commutative_reductions_out_of_ssa): Declared.
1448 * graphite.c (graphite_transform_loops): Call on every scop
1449 rewrite_commutative_reductions_out_of_ssa before calling
1450 rewrite_reductions_out_of_ssa and build_scop_bbs.
1452 2010-06-12 Sebastian Pop <sebastian.pop@amd.com>
1454 * graphite-dependences.c (dot_deps): Make system call to dotty run
1456 (dot_deps_stmt): Same.
1457 * graphite-poly.c (dot_lst): Same.
1459 2010-06-11 Sebastian Pop <sebastian.pop@amd.com>
1461 * graphite-clast-to-gimple.c (gcc_type_for_interval): Do not pass
1462 old_type in parameter.
1463 (gcc_type_for_value): Update call to gcc_type_for_interval.
1464 (compute_type_for_level_1): Renamed compute_type_for_level.
1465 Update call to gcc_type_for_interval.
1467 2010-06-09 Sebastian Pop <sebastian.pop@amd.com>
1469 * tree-scalar-evolution.c (instantiate_scev_name): Do not fail
1470 the scev analysis when the variable is not used outside the loop
1471 in a close phi node: call compute_overall_effect_of_inner_loop.
1473 2010-06-09 Sebastian Pop <sebastian.pop@amd.com>
1475 * graphite-sese-to-poly.c (single_pred_cond): Renamed
1476 single_pred_cond_non_loop_exit. Return NULL for loop exit edges.
1477 (build_sese_conditions_before): Renamed call to single_pred_cond.
1478 (build_sese_conditions_after): Same.
1480 2010-06-09 Sebastian Pop <sebastian.pop@amd.com>
1482 * graphite-poly.h: Fix comments and indentation.
1483 * graphite-sese-to-poly.c: Same.
1484 (build_sese_conditions_before): Compute stmt and gbb only when needed.
1485 * tree-chrec.c: Fix comments and indentation.
1486 (tree-ssa-loop-niter.c): Same.
1488 2010-06-08 Tobias Grosser <grosser@fim.uni-passau.de>
1490 * refined-regions.c (create_region): Only initialize the region.
1491 (find_regions_with_entry): Initialize parent relation and bbmap
1493 (build_regions_tree): Set outermost_region to region instead of
1495 (calculate_region_tree): Remove unneeded parameters.
1497 2010-06-02 Tobias Grosser <grosser@fim.uni-passau.de>
1499 * graphite-scop-detection.c (is_scop_p): New.
1500 (build_scops_new): New. A skeleton for the new scop detection.
1501 (build_scops_old): Renamed from build_scops.
1502 (build_scops): New version. Call the new and the old scop
1505 2010-05-27 Tobias Grosser <grosser@fim.uni-passau.de>
1506 Antoniu Pop <antoniu.pop@gmail.com>
1508 * Makefile.in (OBJS-common): Add refined-regions.o.
1509 (refined-regions.o): New.
1510 (graphite-scop-detection.o): Use refined-regions.h.
1511 * graphite-scop-detection.c: Include refined-regions.h
1512 (build_scops): Also build the refined region tree.
1513 * refined-regions.c: New. Adds an algorithm to detect refined
1515 (print_refined_region): New.
1516 (debug_refined_region): New.
1517 (refined_region_contains_bb_p): New.
1518 (refined_region_contains_region_p): New.
1519 (is_common_df): New.
1520 (struct find_regions_global_data): New.
1522 (typedef struct bb_bb_def): New.
1523 (new_bb_bb_def): New.
1524 (bb_bb_map_hash): New.
1525 (eq_bb_bb_map): New.
1528 (new_bb_reg_def): New.
1529 (bb_reg_map_hash): New.
1530 (eq_bb_reg_map): New.
1531 (find_new_region): New.
1532 (insert_new_reg): New.
1533 (insert_new_bb): New.
1534 (insert_shortcut): New.
1535 (get_next_postdom): New.
1536 (create_region): New.
1537 (find_regions_with_entry): New.
1538 (find_regions_adc): New.
1539 (find_regions): New.
1540 (get_topmost_parent): New.
1541 (build_regions_tree): New.
1542 (calculate_region_tree): New.
1543 (free_region_tree): New.
1544 * refined-regions.h: New.
1545 (struct refined_region): New.
1546 (calculate_region_tree): New.
1547 (free_region_tree): New.
1548 (refined_region_contains_bb_p): New.
1549 (refined_region_contains_region_p): New.
1550 (print_refined_region): New.
1551 (debug_refined_region): New.
1553 2010-05-26 Sebastian Pop <sebastian.pop@amd.com>
1555 * graphite-clast-to-gimple.c (graphite_create_new_loop_guard): Use
1558 2010-05-07 Sebastian Pop <sebastian.pop@amd.com>
1560 * graphite-clast-to-gimple.c (graphite_create_new_loop_guard): Fix
1561 type of integer_one_node for fold_build of POINTER_PLUS_EXPR.
1563 2010-05-07 Sebastian Pop <sebastian.pop@amd.com>
1565 * graphite-sese-to-poly.c (loop_entry_phi_arg): Renamed
1566 phi_arg_in_outermost_loop.
1567 (remove_simple_copy_phi): Call phi_arg_in_outermost_loop.
1568 (remove_invariant_phi): Same.
1570 2010-04-12 Andreas Simbuerger <simbuerg@fim.uni-passau.de>
1572 * graphite-blocking.c
1573 (pbb_strip_mine_profitable_p): Replace Value with mpz_t.
1574 * graphite-clast-to-gimple.c
1575 (clast_to_gcc_expression): Same.
1576 (precision_for_value): Same.
1577 (precision_for_interval): Same.
1578 (gcc_type_for_interval): Same.
1579 (graphite_create_new_guard): Same.
1580 (compute_bounds_for_level): Same.
1581 (graphite_create_new_loop_guard): Same.
1582 * graphite-interchange.c
1583 (build_linearized_memory_access): Same.
1584 (pdr_stride_in_loop): Same.
1585 (memory_strides_in_loop_1): Same.
1586 (memory_strides_in_loop): Same.
1587 (extend_scattering): Same.
1588 (psct_scattering_dim_for_loop_depth): Same.
1589 (pbb_number_of_iterations): Same.
1591 (debug_iteration_domains): Same.
1593 (new_Cloog_Domain_from_ppl_Pointset_Powerset): Same.
1594 (ppl_set_inhomogeneous_gmp): Same.
1595 (ppl_strip_loop): Same.
1596 (ppl_lexico_compare_linear_expressions): Same.
1597 (ppl_read_polyhedron_matrix): Same.
1598 (ppl_max_for_le_pointset): Same.
1600 (ppl_read_polyhedron_matrix): Same.
1601 (tree_int_to_gmp): Same.
1602 (gmp_cst_to_tree): Same.
1603 (ppl_set_inhomogeneous): Same.
1604 (ppl_set_inhomogeneous_tree): Same.
1605 (ppl_set_coef): Same.
1606 (ppl_set_coef_tree): Same.
1607 * graphite-sese-to-poly.c
1608 (build_pbb_scattering_polyhedrons): Same.
1609 (build_scop_scattering): Same.
1610 (scan_tree_for_params_right_scev): Same.
1611 (scan_tree_for_params): Same.
1612 (find_params_in_bb): Same.
1613 (find_scop_parameters): Same.
1614 (add_upper_bounds_from_estimated_nit): Same.
1615 (build_loop_iteration_domains): Same.
1616 (add_condition_to_domain): Same.
1617 (pdr_add_memory_accesses): Same.
1619 2010-04-11 Andreas Simbuerger <simbuerg@fim.uni-passau.de>
1621 * graphite-blocking.c (pbb_strip_mine_profitable_p): Resolve
1622 CLooG's value_* macros to their respective mpz_* counterparts.
1623 * graphite-clast-to-gimple.c (clast_to_gcc_expression): Same.
1624 (graphite_create_new_loop_guard): Same.
1625 * graphite-interchange.c (build_linearized_memory_access): Same.
1626 (pdr_stride_in_loop): Same.
1627 (memory_strides_in_loop_1): Same.
1628 (1st_interchange_profitable_p): Same.
1629 * graphite-poly.c (extend_scattering): Same.
1630 (psct_scattering_dim_for_loop_depth): Same.
1631 (pbb_number_of_iterations): Same.
1632 (pbb_number_of_iterations_at_time): Same.
1633 * graphite-poly.h (new_1st_loop): Same.
1634 * graphite-ppl.c (cloog_matrix_to_ppl_constraint): Same.
1635 (oppose_constraint): Same.
1636 (insert_constraint_into_matrix): Same.
1637 (ppl_set_inhomogeneous_gmp): Same.
1638 (ppl_set_coef_gmp): Same.
1639 (ppl_strip_loop): Same.
1640 (ppl_lexico_compare_linear_expressions): Same.
1641 (ppl_max_for_le_pointset): Same.
1642 (ppl_min_for_le_pointset): Same.
1643 (ppl_build_realtion): Same.
1644 * graphite-ppl.h (gmp_cst_to_tree): Same.
1645 (ppl_set_inhomogeneous): Same.
1646 (ppl_set_inhomogeneous_tree): Same.
1647 (ppl_set_coef): Same.
1648 (ppl_set_coef_tree): Same.
1649 * graphite-sese-to-poly.c (build_pbb_scattering_polyhedrons): Same.
1650 (build_scop_scattering): Same.
1651 (add_value_to_dim): Same.
1652 (scan_tree_for_params_right_scev): Same.
1653 (scan_tree_for_params_int): Same.
1654 (scan_tree_for_params): Same.
1655 (find_params_in_bb): Same.
1656 (find_scop_parameters): Same.
1657 (add_upper_bounds_from_estimated_nit): Same.
1658 (build_loop_iteration_domains): Same.
1659 (create_linear_expr_from_tree): Same.
1660 (add_condition_to_domain): Same.
1661 (pdr_add_memory_accesses): Same.
1663 2010-04-05 Sebastian Pop <sebastian.pop@amd.com>
1666 * graphite-clast-to-gimple.c (max_signed_precision_type): Use
1667 lang_hooks.types.type_for_size instead of build_nonstandard_integer_type.
1668 When converting an unsigned type to signed, double its precision.
1669 (gcc_type_for_interval): Use lang_hooks.types.type_for_size.
1670 (gcc_type_for_iv_of_clast_loop): Call max_signed_precision_type.
1671 (graphite_create_new_loop_guard): When ub + 1 wraps around, use lb <= ub.
1673 2010-04-05 Sebastian Pop <sebastian.pop@amd.com>
1676 * graphite-clast-to-gimple.c (max_signed_precision_type): Use
1677 build_nonstandard_integer_type.
1678 (gcc_type_for_interval): Same.
1680 2010-04-05 Sebastian Pop <sebastian.pop@amd.com>
1683 * graphite-clast-to-gimple.c (graphite_create_new_loop_guard): Use
1684 POINTER_PLUS_EXPR for pointer types.
1686 * gcc.dg/graphite/id-19.c: New.
1688 2010-04-04 Sebastian Pop <sebastian.pop@amd.com>
1691 * Makefile.in (graphite-clast-to-gimple.o): Depends on langhooks.h.
1692 * graphite-clast-to-gimple.c: Include langhooks.h.
1693 (max_signed_precision_type): New.
1694 (max_precision_type): Takes two types as arguments.
1695 (precision_for_value): New.
1696 (precision_for_interval): New.
1697 (gcc_type_for_interval): New.
1698 (gcc_type_for_value): New.
1699 (gcc_type_for_clast_term): New.
1700 (gcc_type_for_clast_red): New.
1701 (gcc_type_for_clast_bin): New.
1702 (gcc_type_for_clast_expr): Split up into several functions.
1703 (gcc_type_for_clast_eq): Rewritten.
1704 (compute_bounds_for_level): New.
1705 (compute_type_for_level_1): New.
1706 (compute_type_for_level): New.
1707 (gcc_type_for_cloog_iv): Removed.
1708 (gcc_type_for_iv_of_clast_loop): Rewritten.
1709 (graphite_create_new_loop): Compute the lower and upper bound types
1710 with gcc_type_for_clast_expr.
1711 (graphite_create_new_loop_guard): Same.
1712 (find_cloog_iv_in_expr): Removed.
1713 (compute_cloog_iv_types_1): Removed.
1714 (compute_cloog_iv_types): Removed.
1715 (gloog): Do not call compute_cloog_iv_types.
1716 * graphite-sese-to-poly.c (new_gimple_bb): Do not initialize
1718 (free_data_refs_aux): Do not free GBB_CLOOG_IV_TYPES.
1719 * sese.h (struct gimple_bb): Removed field cloog_iv_types.
1720 (GBB_CLOOG_IV_TYPES): Removed.
1722 * gcc.dg/graphite/run-id-pr42644.c: Call abort.
1724 2010-04-02 Sebastian Pop <sebastian.pop@amd.com>
1726 Reverted this commit: as at this point the loop closed SSA form
1727 is under a canonical form respecting the single argument condition.
1728 * graphite-sese-to-poly.c (scalar_close_phi_node_p): Loop
1729 close phi nodes may have more than one argument.
1731 2010-04-01 Sebastian Pop <sebastian.pop@amd.com>
1733 * graphite-sese-to-poly.c (rewrite_close_phi_out_of_ssa): Assert that
1734 gimple_phi_num_args of the loop close SSA phi node is equal to 1.
1735 (detect_commutative_reduction): Same.
1737 2010-03-31 Sebastian Pop <sebastian.pop@amd.com>
1739 * graphite-sese-to-poly.c (scalar_close_phi_node_p): Loop
1740 close phi nodes may have more than one argument.
1742 2010-03-30 Richard Guenther <rguenther@suse.de>
1743 Zdenek Dvorak <ook@ucw.cz>
1744 Sebastian Pop <sebastian.pop@amd.com>
1747 * tree-ssa-copy.c (init_copy_prop): Handle loop close phi nodes
1748 with multiple arguments.
1749 (execute_copy_prop): Remove call to rewrite_into_loop_closed_ssa.
1751 2010-03-23 Sebastian Pop <sebastian.pop@amd.com>
1753 * graphite-dependences.c (print_pddr): Call print_pdr with an
1755 * graphite-poly.c (debug_pdr): Add an extra argument for the
1758 (print_pbb_domain): Same.
1760 (print_scop_context): Same.
1762 (print_cloog): Same.
1763 (debug_pbb_domain): Same.
1767 (debug_scop_context): Same.
1769 (debug_cloog): Same.
1770 (print_scop_params): Same.
1771 (debug_scop_params): Same.
1772 (print_iteration_domain): Same.
1773 (print_iteration_domains): Same.
1774 (debug_iteration_domain): Same.
1775 (debug_iteration_domains): Same.
1776 (print_scattering_function): Same.
1777 (print_scattering_functions): Same.
1778 (debug_scattering_function): Same.
1779 (debug_scattering_functions): Same.
1780 * graphite-poly.h (debug_pdr): Update declaration.
1782 (print_pbb_domain): Same.
1784 (print_scop_context): Same.
1786 (print_cloog): Same.
1787 (debug_pbb_domain): Same.
1791 (debug_scop_context): Same.
1793 (debug_cloog): Same.
1794 (print_scop_params): Same.
1795 (debug_scop_params): Same.
1796 (print_iteration_domain): Same.
1797 (print_iteration_domains): Same.
1798 (debug_iteration_domain): Same.
1799 (debug_iteration_domains): Same.
1800 (print_scattering_function): Same.
1801 (print_scattering_functions): Same.
1802 (debug_scattering_function): Same.
1803 (debug_scattering_functions): Same.
1805 2010-03-23 Sebastian Pop <sebastian.pop@amd.com>
1807 * graphite-poly.c (print_scattering_function_1): New.
1808 (print_scattering_function): Call it.
1809 (print_scop_params): Remove spaces at the end of lines.
1812 * graphite-poly.h (print_cloog): Declared.
1813 (debug_cloog): Declared.
1815 2010-03-23 Sebastian Pop <sebastian.pop@amd.com>
1817 * tree-ssa-copy.c: Revert this previous change:
1818 (init_copy_prop): Loop closed phi nodes cancontain more than one
1820 (execute_copy_prop): Revert the previous change: do not call
1821 rewrite_into_loop_closed_ssa.
1823 2010-03-21 Sebastian Pop <sebastian.pop@amd.com>
1824 Richard Guenther <rguenther@suse.de>
1827 * tree-ssa-copy.c (init_copy_prop): Loop closed phi nodes can
1828 contain more than one argument.
1829 (execute_copy_prop): Revert the previous change: do not call
1830 rewrite_into_loop_closed_ssa.
1832 * gcc.dg/graphite/id-pr43464.c: Remove compile warning.
1833 * gcc.dg/graphite/id-pr43464-1.c: New.
1835 2010-03-21 Sebastian Pop <sebastian.pop@amd.com>
1838 * tree-ssa-copy.c (execute_copy_prop): Call rewrite_into_loop_closed_ssa
1839 and verify_loop_closed_ssa when copy prop is executed in the LNO.
1841 * gcc.dg/graphite/id-pr43464.c: New.
1843 2010-03-16 Sebastian Pop <sebastian.pop@amd.com>
1845 * graphite-sese-to-poly.c (graphite_loop_normal_form): Add the IV bump
1847 * tree-flow.h (canonicalize_loop_ivs): Updated declaration.
1848 * tree-parloops.c (gen_parallel_loop): Add the IV bump in loop->latch.
1849 * tree-ssa-loop-manip.c (canonicalize_loop_ivs): Add a new parameter
1850 to switch between adding the IV bump in loop->latch or in loop->header.
1852 2010-03-16 Sebastian Pop <sebastian.pop@amd.com>
1854 * passes.c (init_optimization_passes): Add pass_copy_prop
1857 2010-03-16 Sebastian Pop <sebastian.pop@amd.com>
1859 * graphite-poly.c (print_scattering_function): Pretty print following
1862 (print_pbb_domain): Same.
1863 (dump_gbb_cases): Same.
1864 (dump_gbb_conditions): Same.
1867 (print_scop_params): Same.
1868 (print_scop_context): Same.
1870 (print_pbb_body): New.
1871 (lst_indent_to): New.
1872 (print_lst): Start new lines with a #.
1873 * graphite-poly.h (pbb_bb): New.
1874 (pbb_index): Use pbb_bb.
1875 * graphite-ppl.c (ppl_print_powerset_matrix): Print the number of
1877 * tree-data-ref.c (dump_data_reference): Start new lines with a #.
1879 2010-03-13 Sebastian Pop <sebastian.pop@amd.com>
1882 * gcc.dg/graphite/id-pr43351.c
1884 2010-03-13 Sebastian Pop <sebastian.pop@amd.com>
1887 * graphite-sese-to-poly.c (rewrite_close_phi_out_of_ssa): Do not
1888 call insert_out_of_ssa_copy for default definitions.
1889 * gfortran.dg/graphite/id-pr43354.f: New.
1891 2010-03-13 Sebastian Pop <sebastian.pop@amd.com>
1894 * gfortran.dg/graphite/pr43349.f: New.
1896 2010-03-11 Sebastian Pop <sebastian.pop@amd.com>
1898 * graphite-clast-to-gimple.c (my_long_long): Defined.
1899 (gcc_type_for_cloog_iv): Use it instead of long_long_integer_type_node.
1900 * graphite-sese-to-poly.c (my_long_long): Defined.
1901 (scop_ivs_can_be_represented): Use it.
1903 2010-03-10 Sebastian Pop <sebastian.pop@amd.com>
1905 * doc/invoke.texi: Fix documentation of graphite-max-nb-scop-params,
1906 graphite-max-bbs-per-function, and loop-block-tile-size.
1907 * params.def (PARAM_GRAPHITE_MAX_NB_SCOP_PARAMS): Replace "maximal"
1909 (PARAM_GRAPHITE_MAX_BBS_PER_FUNCTION): Same.
1911 2010-03-10 Sebastian Pop <sebastian.pop@amd.com>
1913 * graphite-clast-to-gimple.c (gcc_type_for_iv_of_clast_loop): Remove
1914 forward declaration.
1915 * graphite-sese-to-poly.c (reduction_phi_p): Remove FIXME comment.
1916 (add_upper_bounds_from_estimated_nit): New.
1917 (build_loop_iteration_domains): Use it.
1919 2010-03-09 Sebastian Pop <sebastian.pop@amd.com>
1921 * doc/invoke.texi (PARAM_LOOP_BLOCK_TILE_SIZE): Document.
1923 2010-03-09 Sebastian Pop <sebastian.pop@amd.com>
1926 * tree-chrec.c (evolution_function_right_is_integer_cst): CHREC_RIGHT
1927 should be an INTEGER_CST. Also handle CASE_CONVERT.
1928 * gcc.dg/graphite/pr43306.c: New.
1930 2010-03-09 Sebastian Pop <sebastian.pop@amd.com>
1932 * graphite.c (graphite_initialize): To bound the number of bbs per
1933 function, use PARAM_GRAPHITE_MAX_BBS_PER_FUNCTION.
1934 * params.def (PARAM_GRAPHITE_MAX_BBS_PER_FUNCTION): Declared.
1935 * doc/invoke.texi: Document it.
1937 2010-03-09 Sebastian Pop <sebastian.pop@amd.com>
1939 * graphite-sese-to-poly.c (build_poly_scop): Do not return bool.
1940 * graphite-sese-to-poly.h (build_poly_scop): Same.
1942 2010-03-09 Sebastian Pop <sebastian.pop@amd.com>
1944 * graphite-sese-to-poly.c (build_poly_scop): Limit scops following
1945 the number of parameters in the scop. Use as an upper bound
1946 PARAM_GRAPHITE_MAX_NB_SCOP_PARAMS.
1947 * params.def (PARAM_GRAPHITE_MAX_NB_SCOP_PARAMS): Declared.
1948 * doc/invoke.texi: Document it.
1950 2010-03-05 Sebastian Pop <sebastian.pop@amd.com>
1952 * graphite-sese-to-poly.c (add_param_constraints): Use
1953 lower_bound_in_type and upper_bound_in_type.
1955 2010-03-05 Sebastian Pop <sebastian.pop@amd.com>
1957 * graphite-sese-to-poly.c (add_param_constraints): Use sizetype
1958 instead of unsigned_type_node.
1960 2010-03-05 Sebastian Pop <sebastian.pop@amd.com>
1961 Reza Yazdani <reza.yazdani@amd.com>
1964 * graphite-sese-to-poly.c (add_param_constraints): Insert bounds
1965 on pointer type parameters.
1967 * gcc.dg/graphite/run-id-4.c: New.
1969 2010-03-05 Sebastian Pop <sebastian.pop@amd.com>
1972 * gcc.dg/graphite/run-id-3.c: New.
1974 2010-03-05 Tobias Grosser <grosser@fim.uni-passau.de>
1975 Ramakrishna Upadrasta <Ramakrishna.Upadrasta@inria.fr>
1977 * graphite-clast-to-gimple.c (clast_to_gcc_expression): Also
1978 handle conversions from pointer to integers.
1979 (gcc_type_for_cloog_iv): Choose the smalles signed integer as an
1980 induction variable, to be able to work with code generated by CLooG.
1981 * graphite-sese-to-poly.c (scop_ivs_can_be_represented): New.
1982 (build_poly_scop): Bail out if we cannot codegen a loop.
1984 2010-03-04 Tobias Grosser <grosser@fim.uni-passau.de>
1986 * graphite-clast-to-gimple.c (translate_clast): Do not short-cut
1987 code generation with gloog_error.
1989 2010-03-04 Sebastian Pop <sebastian.pop@amd.com>
1991 * sese.c (expand_scalar_variables_ssa_name): Add new argument for type.
1992 Call fold_convert on all the returned values.
1993 (expand_scalar_variables_expr): Pass to expand_scalar_variables_ssa_name
1994 the type of the resulting expression.
1996 2010-03-04 Sebastian Pop <sebastian.pop@amd.com>
1998 * graphite-ppl.c (ppl_min_for_le_polyhedron): Renamed
1999 ppl_min_for_le_pointset. Use ppl_Pointset_Powerset_C_Polyhedron_minimize.
2000 * graphite-ppl.h (ppl_min_for_le_polyhedron): Update declaration.
2002 2010-03-04 Sebastian Pop <sebastian.pop@amd.com>
2004 * graphite-dependences.c (map_into_dep_poly): Removed.
2005 (dependence_polyhedron_1): Use combine_context_id_scat.
2007 2010-03-04 Sebastian Pop <sebastian.pop@amd.com>
2009 * graphite-poly.h (struct poly_scattering): Add layout documentation.
2010 (struct poly_bb): Same.
2011 (combine_context_id_scat): New.
2013 2010-03-02 Sebastian Pop <sebastian.pop@amd.com>
2016 * sese.c (name_defined_in_loop_p): Return false for default
2019 * gcc.dg/graphite/pr42326.c: New.
2021 2010-02-23 Sebastian Pop <sebastian.pop@amd.com>
2023 * graphite-clast-to-gimple.c (find_cloog_iv_in_expr): Simplify
2024 and clean up the logic.
2026 2010-02-23 Sebastian Pop <sebastian.pop@amd.com>
2028 * graphite-sese-to-poly.c (add_param_constraints): Enabled: remove
2031 2010-02-22 Sebastian Pop <sebastian.pop@amd.com>
2034 * graphite-scop-detection.c (create_single_exit_edge): Move
2035 the call to find_single_exit_edge to....
2036 (create_sese_edges): ...here. Don't handle multiple edges
2037 exiting the function.
2038 (build_graphite_scops): Don't handle multiple edges
2039 exiting the function.
2041 * gcc.dg/graphite/pr43083.c: New.
2043 2010-02-22 Sebastian Pop <sebastian.pop@amd.com>
2046 * sese.c (get_rename): Assert that old_name is an SSA_NAME.
2047 (rename_variables_in_stmt): Continue when the use is not an SSA_NAME.
2049 * gfortran.dg/graphite/pr43097.f: New.
2051 2010-02-22 Sebastian Pop <sebastian.pop@amd.com>
2052 Manuel López-Ibáñez <manu@gcc.gnu.org>
2055 * g++.dg/graphite/pr41305.C: Add -Wno-conversion-null.
2057 2010-02-22 Sebastian Pop <sebastian.pop@amd.com>
2060 * sese.c (expand_scalar_variables_expr): Handle COMPONENT_REF.
2062 * g++.dg/graphite/pr43026.C: New.
2064 2010-02-13 Tobias Grosser <grosser@fim.uni-passau.de>
2066 * Merge from mainline (154736:156693).
2068 2010-02-11 Sebastian Pop <sebastian.pop@amd.com>
2071 * gcc.dg/graphite/pr43012.c: New.
2073 2010-02-10 Sebastian Pop <sebastian.pop@amd.com>
2075 * graphite.c (graphite_transform_loops): Re-enable dbg_cnt.
2076 2010-02-10 Sebastian Pop <sebastian.pop@amd.com>
2078 * g++.dg/graphite/pr42930.C: New.
2080 2010-02-10 Sebastian Pop <sebastian.pop@amd.com>
2083 * graphite-scop-detection.c (graphite_can_represent_scev): Call
2084 graphite_can_represent_init for MULT_EXPR.
2086 2010-02-10 Sebastian Pop <sebastian.pop@amd.com>
2090 * graphite-sese-to-poly.c (remove_phi): New.
2091 (translate_scalar_reduction_to_array): Call remove_phi.
2093 * gcc.dg/graphite/pr42530.c: New.
2094 * gcc.dg/graphite/pr42914.c: New.
2096 2010-02-10 Sebastian Pop <sebastian.pop@amd.com>
2099 * graphite-clast-to-gimple.c (gloog): Call rename_sese_parameters.
2100 * graphite-clast-to-gimple.h (gloog): Update declaration.
2101 * graphite-poly.c (new_scop): Clear POLY_SCOP_P.
2102 * graphite-poly.h (struct poly_bb): Add missing comments.
2103 (struct scop): Add poly_scop_p field.
2105 * graphite-sese-to-poly.c (build_poly_scop): Set POLY_SCOP_P.
2106 * graphite.c (graphite_transform_loops): Build the polyhedral
2107 representation for each scop before code generation.
2108 * sese.c (rename_variables_in_operand): Removed.
2109 (rename_variables_in_expr): Return the renamed expression.
2110 (rename_sese_parameters): New.
2111 * sese.h (rename_sese_parameters): Declared.
2113 * gcc.dg/graphite/pr42771.c: New.
2115 2010-02-07 Sebastian Pop <sebastian.pop@amd.com>
2117 * gcc.dg/graphite/block-0.c: Call abort for runtime test. Always
2119 * gcc.dg/graphite/block-1.c: Same.
2120 * gcc.dg/graphite/block-3.c: Same.
2121 * gcc.dg/graphite/block-4.c: Same.
2122 * gcc.dg/graphite/block-5.c: Same.
2123 * gcc.dg/graphite/block-6.c: Same.
2124 * gcc.dg/graphite/block-7.c: Same.
2125 * gcc.dg/graphite/interchange-0.c: Same.
2126 * gcc.dg/graphite/interchange-1.c: Same.
2127 * gcc.dg/graphite/interchange-10.c: Same.
2128 * gcc.dg/graphite/interchange-11.c: Same.
2129 * gcc.dg/graphite/interchange-12.c: Same.
2130 * gcc.dg/graphite/interchange-2.c: Same.
2131 * gcc.dg/graphite/interchange-3.c: Same.
2132 * gcc.dg/graphite/interchange-4.c: Same.
2133 * gcc.dg/graphite/interchange-5.c: Same.
2134 * gcc.dg/graphite/interchange-6.c: Same.
2135 * gcc.dg/graphite/interchange-7.c: Same.
2136 * gcc.dg/graphite/interchange-8.c: Same.
2137 * gcc.dg/graphite/interchange-9.c: Same.
2138 * gcc.dg/graphite/interchange-mvt.c: Same.
2140 2010-02-07 Sebastian Pop <sebastian.pop@amd.com>
2142 * gfortran.dg/graphite/id-19.f: New.
2143 * gfortran.dg/graphite/pr14741.f90: New.
2144 * gfortran.dg/graphite/pr41924.f90: New.
2145 * gfortran.dg/graphite/run-id-2.f90: New.
2147 2010-02-07 Sebastian Pop <sebastian.pop@amd.com>
2150 * graphite-dependences.c (dependence_polyhedron): Set PDDR_KIND
2151 to unknown_dependence.
2152 (graphite_legal_transform_dr): Handle the unknown_dependence.
2153 (graphite_carried_dependence_level_k): Same.
2155 2010-02-07 Sebastian Pop <sebastian.pop@amd.com>
2157 * ChangeLog.graphite: Remove testsuite/ or gcc/testsuite/.
2159 2010-02-05 Sebastian Pop <sebastian.pop@amd.com>
2160 Konrad Trifunovic <konrad.trifunovic@inria.fr>
2163 * graphite-dependences.c (build_lexicographical_constraint): Return
2164 a union of dependence polyhedra.
2165 (dependence_polyhedron_1): Adapt for build_lexicographical_constraint.
2167 * gcc.dg/graphite/block-0.c: Enable runtime check. XFAILed.
2168 * gcc.dg/graphite/block-4.c: Same.
2169 * gcc.dg/graphite/block-7.c: Same.
2170 * gcc.dg/graphite/interchange-12.c: Same.
2171 * gcc.dg/graphite/interchange-mvt.c: Same.
2172 * gfortran.dg/graphite/interchange-1.f: XFAILed.
2173 * gfortran.dg/graphite/interchange-3.f90: XFAILed.
2174 * gfortran.dg/graphite/run-id-1.f: New testcase for PR42637.
2176 2010-02-03 Sebastian Pop <sebastian.pop@amd.com>
2178 * gcc.dg/graphite/interchange-12.c: Return 0 to avoid
2179 the execution check to FAIL. This testcase is miscompiled by Graphite
2180 and the check should be re-enabled.
2181 * gcc.dg/graphite/interchange-mvt.c: Same.
2182 * gcc.dg/graphite/block-0.c: Same.
2183 * gcc.dg/graphite/block-4.c: Same.
2184 * gcc.dg/graphite/block-7.c: Same.
2186 2010-02-03 Sebastian Pop <sebastian.pop@amd.com>
2188 * gcc.dg/graphite/interchange-mvt.c: Un-XFAILed.
2189 * gcc.dg/graphite/scop-0.c: Fix spaces.
2190 * gfortran.dg/graphite/block-1.f90: Rewrite expected output.
2191 * gfortran.dg/graphite/block-2.f: Same.
2192 * gfortran.dg/graphite/block-3.f90: Same.
2193 * gfortran.dg/graphite/block-4.f90: Same.
2194 * gfortran.dg/graphite/interchange-1.f: Un-XFAILed.
2195 * gfortran.dg/graphite/interchange-3.f90: Un-XFAILed.
2197 2010-02-03 Sebastian Pop <sebastian.pop@amd.com>
2199 * graphite-dependences.c (new_poly_ddr): Initialize PDDR_KIND and
2200 PDDR_ORIGINAL_SCATTERING_P.
2201 (pddr_is_empty): Rewritten.
2202 (print_dependence_polyhedron_layout): New.
2205 (build_alias_set_powerset): Moved up.
2206 (poly_drs_may_alias_p): Moved up.
2207 (lexicographically_gt_p): Removed.
2208 (build_lexicographically_gt_constraint): Renamed
2209 build_lexicographical_constraint, reimplemented.
2210 (dependence_polyhedron_1): Simplified parameters.
2211 (dependence_polyhedron): Same. Keep along empty PDDRs
2212 to make efficient use of the cache.
2213 (reduction_dr_p): Compute the PBBs don't pass them as parameters.
2214 (graphite_legal_transform_dr): Rewritten.
2215 (graphite_legal_transform_bb): Pass fewer arguments to
2216 graphite_legal_transform_dr.
2217 (graphite_carried_dependence_level_k): Simplified implementation.
2218 (dot_original_deps_stmt_1): Call dependence_polyhedron.
2219 (dot_transformed_deps_stmt_1): Same.
2220 (dot_original_deps): Same.
2221 (dot_transformed_deps): Same.
2222 * graphite-dependences.h (struct poly_ddr): Added a new field
2223 original_scattering_p.
2224 (PDDR_ORIGINAL_SCATTERING_P): New.
2225 (print_pddr): Declared.
2226 (debug_pddr): Declared.
2227 * graphite-ppl.c: Clarify comment.
2228 * sese.h (print_gimple_bb): Removed unused declaration.
2231 2010-02-03 Sebastian Pop <sebastian.pop@amd.com>
2233 * g++.dg/graphite/graphite.exp: Rewritten.
2234 * gcc.dg/graphite/graphite.exp: Rewritten.
2235 * gfortran.dg/graphite/graphite.exp: Rewritten.
2236 * gcc.dg/graphite/block-0.c: Added runtime test.
2237 * gcc.dg/graphite/block-1.c: Same.
2238 * gcc.dg/graphite/block-3.c: Same.
2239 * gcc.dg/graphite/block-4.c: Same.
2240 * gcc.dg/graphite/block-5.c: Same.
2241 * gcc.dg/graphite/block-6.c: Same.
2242 * gcc.dg/graphite/block-7.c: Same.
2243 * gcc.dg/graphite/interchange-0.c: Same.
2244 * gcc.dg/graphite/interchange-1.c: Same.
2245 * gcc.dg/graphite/interchange-10.c: Same.
2246 * gcc.dg/graphite/interchange-11.c: Same.
2247 * gcc.dg/graphite/interchange-12.c: Same.
2248 * gcc.dg/graphite/interchange-2.c: Same.
2249 * gcc.dg/graphite/interchange-3.c: Same.
2250 * gcc.dg/graphite/interchange-4.c: Same.
2251 * gcc.dg/graphite/interchange-5.c: Same.
2252 * gcc.dg/graphite/interchange-6.c: Same.
2253 * gcc.dg/graphite/interchange-7.c: Same.
2254 * gcc.dg/graphite/interchange-8.c: Same.
2255 * gcc.dg/graphite/interchange-9.c: Same.
2256 * gcc.dg/graphite/interchange-mvt.c: Same.
2257 * gcc.dg/graphite/run-id-2.c: Remove useless dg-do run.
2259 2010-01-22 Ramakrishna Upadrasta <Ramakrishna.Upadrasta@inria.fr>
2261 * graphite-scop-detection.c (dot_all_scops): Make calls to dot run in
2264 2010-01-22 Ramakrishna Upadrasta <Ramakrishna.Upadrasta@inria.fr>
2266 * common.opt: Add -fgraphite-cloog-opts.
2267 * graphite-clast-to-gimple.c (set_cloog_options): Same.
2268 * opts.c (decode_options): Same.
2270 2010-01-20 Sebastian Pop <sebastian.pop@amd.com>
2272 * gcc.dg/graphite/id-17.c: New.
2273 * gcc.dg/graphite/pr41888.c: New.
2274 * gcc.dg/graphite/scop-22.c: New.
2275 * gfortran.dg/graphite/pr40982.f90: New.
2277 2010-01-20 Sebastian Pop <sebastian.pop@amd.com>
2279 * graphite-dependences.c: Clarify comments.
2280 (build_pddr): Add an extra parameter direction.
2281 (graphite_legal_transform_dr): Use build_pddr.
2282 (dot_original_deps_stmt_1): Update use of build_pddr.
2283 (dot_transformed_deps_stmt_1): Same.
2284 (dot_original_deps): Same.
2285 (dot_transformed_deps): Same.
2287 * gcc.dg/graphite/interchange-12.c: New.
2288 * gcc.dg/graphite/block-7.c: New.
2290 2010-01-20 Sebastian Pop <sebastian.pop@amd.com>
2292 * graphite-dependences.c (pddr_original_scattering): Renamed build_pddr.
2293 (pddr_transformed_scattering): Removed.
2294 (graphite_legal_transform_dr): Use build_pddr.
2295 (dot_original_deps_stmt_1): Same.
2296 (dot_transformed_deps_stmt_1): Same.
2297 (dot_original_deps): Same.
2298 (dot_transformed_deps): Same.
2300 2010-01-20 Sebastian Pop <sebastian.pop@amd.com>
2302 * graphite-dependences.c (lexicographically_gt_p): Add comments.
2303 (build_lexicographically_gt_constraint): Same.
2304 (dependence_polyhedron_1): Same.
2305 (dependence_polyhedron): Same.
2307 2010-01-20 Sebastian Pop <sebastian.pop@amd.com>
2309 * graphite-dependences.c (build_pairwise_scheduling_equality): Removed.
2310 (build_pairwise_scheduling_inequality): Renamed build_pairwise_scheduling.
2311 (lexicographically_gt_p): Change type of direction to int.
2312 (build_lexicographically_gt_constraint): Same.
2313 (dependence_polyhedron_1): Same.
2314 (dependence_polyhedron): Same.
2315 (pddr_original_scattering): Use integers for direction.
2316 (pddr_transformed_scattering): Same.
2317 (graphite_legal_transform_dr): Same.
2318 (graphite_carried_dependence_level_k): Same.
2320 2010-01-20 Sebastian Pop <sebastian.pop@amd.com>
2322 * graphite-dependences.c (build_pairwise_constraint): Renamed
2323 ppl_build_relation. Moved...
2324 (dr_equality_constraints): Use ppl_build_relation.
2325 (build_pairwise_scheduling_equality): Same.
2326 (build_pairwise_scheduling_inequality): Same.
2327 * graphite-ppl.c (ppl_build_relation): ...here.
2328 * graphite-ppl.h (ppl_build_relation): Declared.
2330 2010-01-14 Sebastian Pop <sebastian.pop@amd.com>
2333 * graphite-clast-to-gimple.c (gloog_error): New static variable.
2334 (clast_to_gcc_expression): Do not build MULT_EXPR of POINTER_TYPE_P.
2335 Set gloog_error when such an expression failed to be built.
2336 (translate_clast): Early return when gloog_error is set.
2337 (gloog): Clear gloog_error. When gloog_error is set, call
2338 set_ifsese_condition to enable the original code. Return the status
2339 of the code generation based on gloog_error.
2340 * sese.c (set_ifsese_condition): New.
2341 * sese.h (set_ifsese_condition): Declared.
2343 * g++.dg/graphite/pr42681.C: New.
2345 2010-01-14 Sebastian Pop <sebastian.pop@amd.com>
2348 * graphite-clast-to-gimple.c (gloog): Call scev_reset_htab and
2349 rename_nb_iterations.
2350 * sese.c (rename_variables_in_operand): New.
2351 (rename_variables_in_expr): New.
2352 (rename_nb_iterations): New.
2353 (sese_adjust_liveout_phis): Update the rename_map.
2354 * sese.h (rename_nb_iterations): Declared.
2355 * tree-scalar-evolution.c (scev_reset_htab): New.
2356 (scev_reset): Call scev_reset_htab.
2357 * tree-scalar-evolution.h (scev_reset_htab): Declared.
2359 * gfortran.dg/graphite/pr42732.f: New.
2361 2010-01-08 Sebastian Pop <sebastian.pop@amd.com>
2364 * graphite-clast-to-gimple.c: Fix formatting.
2365 * sese.c (defined_in_loop_p): Renamed name_defined_in_loop_p.
2366 (expr_defined_in_loop_p): New.
2367 (add_loop_exit_phis): Also handle full expressions: remove from
2368 the rename_map the expressions defined in the loop that we're closing.
2370 * gfortran.dg/graphite/pr42393-1.f90: New.
2371 * gfortran.dg/graphite/pr42393.f90: Add new flags
2372 -fno-loop-block -fno-loop-interchange -fno-loop-strip-mine to also
2373 make this testcase useful in the Graphite branch.
2375 2010-01-08 Sebastian Pop <sebastian.pop@amd.com>
2377 * graphite-scop-detection.c (exclude_component_ref): Removed.
2378 (is_simple_operand): Removed.
2379 (stmt_simple_for_scop_p): Remove use of is_simple_operand.
2381 2010-01-07 Sebastian Pop <sebastian.pop@amd.com>
2384 * sese.c (expand_scalar_variables_expr): Follow the SSA links into
2385 the array indexing of ADDR_EXPRs.
2387 * gcc.dg/graphite/pr42221.c: New.
2389 2010-01-07 Sebastian Pop <sebastian.pop@amd.com>
2392 * graphite.c (graphite_finalize): Call scev_reset.
2393 (graphite_transform_loops): Do not call scev_reset between the code
2394 generation of scops.
2396 * gcc.dg/graphite/pr42521.c: New.
2398 2010-01-07 Sebastian Pop <sebastian.pop@amd.com>
2400 * graphite-interchange.c (memory_stride_in_loop): Renamed
2402 (memory_strides_in_loop): Renamed memory_strides_in_loop_1.
2403 (memory_strides_in_loop): Memoize the memory strides per loop.
2404 (lst_interchange_profitable_p): Do not initialize to zero the memory
2406 * graphite-poly.h (struct lst): Add a field memory_strides.
2407 (LST_LOOP_MEMORY_STRIDES): New.
2408 (new_lst_loop): Initialize LST_LOOP_MEMORY_STRIDES to -1.
2409 (free_lst): Clear LST_LOOP_MEMORY_STRIDES.
2411 2010-01-07 Sebastian Pop <sebastian.pop@amd.com>
2413 * graphite-interchange.c (memory_strides_in_loop_depth): Renamed
2414 memory_strides_in_loop. Gather memory strides on a whole loop.
2415 (pbb_interchange_profitable_p): Renamed lst_interchange_profitable_p.
2416 (lst_interchange_profitable_p): Removed.
2417 (lst_try_interchange_loops): Call lst_interchange_profitable_p.
2419 2010-01-07 Sebastian Pop <sebastian.pop@amd.com>
2421 Revert patch 2009-11-23 Tobias Grosser <grosser@fim.uni-passau.de>
2422 * graphite-clast-to-gimple.c (try_mark_loop_parallel): New.
2423 (translate_clast_for, translate_clast_guard, translate_clast, gloog):
2424 Remove context_loop and level.
2426 2010-01-07 Richard Guenther <rguenther@suse.de>
2428 PR tree-optimization/42641
2429 * sese.c (rename_map_elt_info): Use the SSA name version, do
2432 2010-01-06 Sebastian Pop <sebastian.pop@amd.com>
2434 * graphite-blocking.c (scop_do_block): Print "SCoP will be loop
2435 blocked" only when both the strip mine and the interchange have
2438 * gcc.dg/graphite/block-2.c: Removed.
2439 * gcc.dg/graphite/block-3.c: Add scan pattern.
2440 * gcc.dg/graphite/block-4.c: Same.
2441 * gcc.dg/graphite/block-5.c: Same.
2442 * gcc.dg/graphite/block-6.c: Same.
2444 2010-01-06 Sebastian Pop <sebastian.pop@amd.com>
2446 * graphite-clast-to-gimple.c (save_clast_name_index): Free slot
2447 before allocating a new one.
2448 (copy_renames): Check that slot is not NULL.
2449 (mark_bb_with_pbb): Same.
2450 (compute_cloog_iv_types_1): Same.
2451 * graphite-interchange.c (lst_perfect_nestify): Free the before,
2452 nest, and after LSTs.
2453 (lst_try_interchange_loops): Same.
2455 2010-01-05 Sebastian Pop <sebastian.pop@amd.com>
2458 * graphite-interchange.c (lst_try_interchange_loops): Do not return
2459 the before, nest, and after LSTs.
2460 (lst_try_interchange): Removed.
2461 (lst_interchange_select_inner): Do not iterate over the LSTs if they
2463 (lst_interchange_select_outer): Apply interchange on the outer loop
2464 until there are no more changes in the inner loops.
2466 2009-12-18 Sebastian Pop <sebastian.pop@amd.com>
2468 Revert patch fixing PR middle-end/42221.
2470 2009-12-18 Sebastian Pop <sebastian.pop@amd.com>
2473 * graphite-sese-to-poly.c (follow_ssa_with_commutative_ops): Handle
2476 * gfortran.dg/graphite/pr42180.f90: Add compile flags.
2478 2009-12-18 Sebastian Pop <sebastian.pop@amd.com>
2481 * graphite-sese-to-poly.c (split_reduction_stmt): Do not split blocks
2482 that contain only one statement.
2484 * gfortran.dg/graphite/pr42180.f90: New.
2486 2009-12-17 Sebastian Pop <sebastian.pop@amd.com>
2489 * gfortran.dg/graphite/pr42393.f90: New.
2491 2009-12-17 Sebastian Pop <sebastian.pop@amd.com>
2494 * gfortran.dg/graphite/pr42186.f90: New.
2496 2009-12-17 Sebastian Pop <sebastian.pop@amd.com>
2499 * graphite-sese-to-poly.c (translate_scalar_reduction_to_array_for_stmt):
2500 Insert the reduction copy in the same block as the phi node.
2501 (follow_ssa_with_commutative_ops): Handle GIMPLE_NOPs.
2503 * gcc.dg/graphite/pr42205-1.c: New.
2504 * gcc.dg/graphite/pr42205-2.c: New.
2506 2009-12-17 Sebastian Pop <sebastian.pop@amd.com>
2509 * sese.c (expand_scalar_variables_expr): Follow the SSA links into
2510 the array indexing of ADDR_EXPRs.
2512 * gcc.dg/graphite/pr42221.c: New.
2514 2009-12-17 Sebastian Pop <sebastian.pop@amd.com>
2518 * graphite-interchange.c (lst_try_interchange): Do not modify OUTER
2519 index. Call lst_interchange_select_inner only once.
2520 (lst_interchange_select_inner): Update use of lst_try_interchange.
2521 (lst_interchange_select_outer): Update.
2523 2009-12-15 Sebastian Pop <sebastian.pop@amd.com>
2527 * graphite-interchange.c (lst_try_interchange): Do not increment the
2528 the OUTER index when there is no AFTER kernel. Do not increment the
2529 OUTER index for after processing the AFTER kernel.
2530 (lst_interchange_select_inner): Call lst_try_interchange only on loops.
2531 (lst_interchange_select_outer): Do not pass in a pointer to the OUTER
2532 index. Do not pass to lst_interchange_select_inner the OUTER index.
2533 (scop_do_interchange): Update use of lst_interchange_select_outer.
2535 * gfortran.dg/graphite/graphite.exp
2536 (DEFAULT_FLAGS_GRAPHITE_IDENTITY): Remove -fdump-tree-graphite-all.
2537 * gfortran.dg/graphite/interchange-1.f: Add comment. Clean
2538 the graphite dump file.
2539 * gfortran.dg/graphite/interchange-2.f: Same.
2540 * gfortran.dg/graphite/pr42334-1.f: New.
2542 2009-12-15 Sebastian Pop <sebastian.pop@amd.com>
2546 * graphite-interchange.c (lst_perfect_nestify): Reset to NULL the LSTs
2548 (lst_do_interchange_1): Renamed lst_interchange_select_inner.
2549 (lst_try_interchange): Reimplemented.
2550 (lst_interchange_select_inner): Same.
2551 (lst_do_interchange): Renamed lst_interchange_select_outer.
2553 (scop_do_interchange): Update use of lst_interchange_select_outer.
2555 * g++.dg/graphite/pr42130.C: Add -fgraphite-identity.
2556 * gcc.dg/graphite/block-0.c: Un-XFAILed.
2557 * gcc.dg/graphite/pr42211.c: New.
2558 * gfortran.dg/graphite/pr42334.f90: New.
2560 2009-12-14 Sebastian Pop <sebastian.pop@amd.com>
2563 * graphite-scop-detection.c (graphite_can_represent_scev): Handle more
2564 carefully PLUS_EXPR, MINUS_EXPR, and MULT_EXPR.
2566 * gfortran.dg/graphite/pr42181.f90: New.
2568 2009-12-12 Sebastian Pop <sebpop@gmail.com>
2571 * graphite-sese-to-poly.c (rewrite_close_phi_out_of_ssa): Call
2572 insert_out_of_ssa_copy_on_edge for anything else than SSA_NAMEs.
2573 (detect_commutative_reduction_arg): Simplified.
2574 (detect_commutative_reduction): Early return when the argument of
2575 the close phi is not of an SSA_NAME.
2577 * gcc.dg/graphite/pr42284.c: New.
2579 2009-12-11 Alexander Monakov <amonakov@ispras.ru>
2581 * dbgcnt.def (graphite_scop): New counter.
2582 * graphite.c: Include dbgcnt.h
2583 (graphite_transform_loops): Use new counter to limit transformations.
2585 2009-12-08 Sebastian Pop <sebpop@gmail.com>
2588 * graphite-scop-detection.c (graphite_can_represent_init): Also
2589 handle more complex MULT_EXPRs containing parameters by recursion
2592 * gfortran.dg/graphite/pr42285.f90: New.
2594 2009-12-01 Tobias Grosser <grosser@fim.uni-passau.de>
2596 * g++.dg/graphite/pr42130.C: Fix type.
2598 2009-11-29 Alexander Monakov <amonakov@gcc.gnu.org>
2600 * g++.dg/graphite/pr42130.C: Correct testcase.
2602 2009-11-28 Tobias Grosser <grosser@fim.uni-passau.de>
2604 * Merge from mainline (154493:154734).
2606 2009-11-28 Tobias Grosser <grosser@fim.uni-passau.de>
2608 * Merge from mainline (151362:154491).
2610 2009-11-24 Tobias Grosser <grosser@fim.uni-passau.de>
2612 * graphite-clast-to-gimple.c (try_mark_loop_parallel,
2613 graphite_create_new_loop_guard, translate_clast_for): Fix comments.
2615 2009-11-23 Tobias Grosser <grosser@fim.uni-passau.de>
2618 * graphite-clast-to-gimple.c (graphite_create_new_loop_guard,
2619 translate_clast_for_loop): New.
2620 (translate_clast_for): Add a condition around the loop, to do not
2621 execute loops with zero iterations.
2622 * g++.dg/graphite/pr42130.C: New.
2623 * gcc.dg/graphite/pr35356-2.c: Adapt.
2625 2009-11-23 Tobias Grosser <grosser@fim.uni-passau.de>
2627 * graphite-clast-to-gimple.c (try_mark_loop_parallel): New.
2628 (translate_clast_for, translate_clast_guard, translate_clast, gloog):
2629 Remove context_loop and level.
2631 2009-11-23 Tobias Grosser <grosser@fim.uni-passau.de>
2633 * graphite-clast-to-gimple.c (translate_clast_user,
2634 translate_clast_for, translate_clast_guard): Simplify and move common
2635 elements to translate_clast().
2636 (translate_clast): Simplify and get common elements.
2638 2009-11-23 Tobias Grosser <grosser@fim.uni-passau.de>
2640 * graphite-clast-to-gimple.c (translate_clast_user,
2641 translate_clast_for, translate_clast_guard): Split out of
2644 2009-11-21 Tobias Grosser <grosser@fim.uni-passau.de>
2646 * graphite-clast-to-gimple.c (clast_name_index, new_clast_name_index,
2647 clast_name_to_index, save_clast_name_index, debug_clast_name_index,
2648 debug_clast_name_indexes_1, debug_clast_name_indexes,
2649 clast_name_index_elt_info, eq_clast_name_indexes): Moved from sese.h.
2650 (clast_name_to_gcc, clast_to_gcc_expression,
2651 clast_to_gcc_expression_red, gcc_type_for_clast_expr,
2652 gcc_type_for_clast_eq, graphite_translate_clast_equation,
2653 graphite_create_guard_cond_expr, graphite_create_new_loop,
2654 translate_clast): Add params_index.
2655 (initialize_cloog_names): Create parameter strings from scratch, do
2656 not reference other strings.
2657 (create_params_index): New.
2658 (gloog): Initialize params_index.
2659 * graphite-scop-detection (free_scops_1): Removed.
2660 (limit_scops): Use normal free_scops.
2661 * graphite-sese-to-poly.c (save_var_names): Removed.
2662 (parameter_index_in_region): Do not initialize SESE_PARAM_NAMES
2663 and SESE_PARAMS_INDEX.
2664 * sese.c (new_sese, free_sese): Dito.
2665 * sese.h (struct sese): Remove params_index, params_names.
2666 (SESE_PARAMS_INDEX, SESE_PARAMS_NAMES): Removed.
2668 2009-11-20 Sebastian Pop <sebastian.pop@amd.com>
2670 Revert the following patch from 2009-09-14:
2671 * graphite-blocking.c: Fix order of includes: tree-chrec.h, then
2672 tree-scalar-evolution.h, and then tree-data-ref.h.
2673 * graphite-clast-to-gimple.c: Same.
2674 * graphite-dependences.c: Same.
2675 * graphite-interchange.c: Same.
2676 * graphite-poly.c: Same.
2677 * graphite-scop-detection.c: Same.
2678 * graphite-sese-to-poly.c: Same.
2680 * lambda-code.c: Same.
2681 * matrix-reorg.c: Same.
2682 * tree-data-ref.c: Same.
2683 * tree-if-conv.c: Same.
2684 * tree-loop-distribu: Same.: Same.
2685 * tree-loop-linear.c: Same.
2686 * tree-parloops.c: Same.
2687 * tree-predcom.c: Same.
2688 * tree-vect-patterns.c: Same.
2690 2009-11-20 Sebastian Pop <sebastian.pop@amd.com>
2692 Revert patch from 2009-09-14.
2693 * tree-ssa-loop.c (gate_graphite_transforms): Re-enable Graphite
2694 passes at -O1 and below.
2696 2009-11-18 Sebastian Pop <sebastian.pop@amd.com>
2699 * gcc.dg/graphite/pr40281.c: New.
2701 * tree-scalar-evolution.c (instantiate_scev_poly): Base and stride
2702 evolutions should not variate in inner loops.
2704 2009-11-18 Sebastian Pop <sebastian.pop@amd.com>
2707 * gfortran.dg/graphite/pr42050.f90: New.
2709 2009-11-18 Sebastian Pop <sebastian.pop@amd.com>
2711 * graphite-interchange.c (memory_strides_in_loop_depth): New.
2712 (pbb_interchange_profitable_p): Call memory_strides_in_loop_depth.
2714 2009-11-18 Sebastian Pop <sebastian.pop@amd.com>
2716 * graphite-blocking.c (scop_do_block): New.
2717 * graphite-poly.c (apply_poly_transforms): Call scop_do_block.
2718 * graphite-poly.h (scop_do_block): Declared.
2720 2009-11-18 Sebastian Pop <sebastian.pop@amd.com>
2722 * graphite-blocking.c (pbb_strip_mine_profitable_p): The parameter
2723 depth is the loop nesting depth in the LST. Call psct_dynamic_dim
2724 to transform depth into the time_depth before calling
2725 pbb_number_of_iterations_at_time.
2726 (lst_do_strip_mine): Use a scalar variable instead of recomputing
2729 2009-11-18 Sebastian Pop <sebastian.pop@amd.com>
2731 Reverted the patch for "scattering permutations" from 2009-10-28.
2733 * graphite-poly.c (print_permutation): New.
2734 (debug_permutation): New.
2735 (new_poly_bb): Initialize PBB_PERMUTATION.
2736 (free_poly_bb): Free PBB_PERMUTATION.
2737 * graphite-poly.h (pbb_permutation_elt_p): Declared.
2738 (struct pbb_permutation_elt): New.
2739 (PBB_PERMUTATION_ELT_STRIDE): New.
2740 (PBB_PERMUTATION_ELT_STRIDED_P): New.
2741 (PBB_PERMUTATION_ELT_TIME_DIMENSION): New.
2742 (new_pbb_permutation_elt): New.
2743 (pbb_permutation_elt_free): New.
2744 (struct poly_bb): Add field permutation.
2745 (PBB_PERMUTATION): New.
2746 (print_permutation): Declared.
2747 (debug_permutation): Declared.
2749 2009-11-04 Konrad Trifunovic <konrad.trifunovic@inria.fr>
2751 * graphite-interchange.c (build_partial_difference): New.
2752 (memory_stride_in_loop): Refactored the computation of
2753 equality constraints into build_partial_difference function.
2754 Added support for debugging stride computations.
2756 2009-11-03 Sebastian Pop <sebastian.pop@amd.com>
2758 * graphite-clast-to-gimple.c (gloog): Free if_region,
2759 if_region->true_region, and if_region->region.
2760 * sese.c (if_region_set_false_region): Free if_region->false_region.
2761 (create_if_region_on_edge): Do not use GGC_NEW.
2762 (move_sese_in_condition): Remove useless initialization.
2764 2009-11-03 Sebastian Pop <sebastian.pop@amd.com>
2766 * graphite-interchange.c (lst_perfect_nestify): Pass 3 parameters
2767 for the loops created by the loop distribution. Do not modify the
2769 (lst_try_interchange_loops): Same. Use a temporary LST for the
2770 transformed schedule. Call lst_update_scattering before data
2771 dependence analysis.
2772 (lst_try_interchange): Pass an extra parameter INDEX.
2773 (lst_do_interchange_1): New.
2774 (lst_do_interchange): Call lst_do_interchange_1.
2775 (scop_do_interchange): Call lst_update_scattering.
2776 * graphite-poly.c (apply_poly_transforms): Do not call
2777 lst_update_scattering.
2778 * graphite-poly.h (lst_pred): New.
2780 (lst_find_first_pbb): Return NULL when not found.
2782 (lst_insert_in_sequence): Allow LST1 to be NULL.
2784 (lst_substitute_3): New.
2785 * gcc.dg/graphite/interchange-1.c: XFail.
2786 * gcc.dg/graphite/interchange-8.c: XFail.
2787 * gcc.dg/graphite/interchange-11.c: XFail.
2789 2009-10-30 Sebastian Pop <sebastian.pop@amd.com>
2791 * graphite-interchange.c (lst_perfectly_nested_p): New.
2792 (lst_perfect_nestify): New.
2793 (lst_try_interchange_loops): Call store_lst_schedule,
2794 lst_perfectly_nested_p, lst_perfect_nestify and restore_lst_schedule.
2795 (scop_do_interchange): Avoid redundant legality test.
2796 Call lst_do_interchange on a copy of SCOP_TRANSFORMED_SCHEDULE.
2797 * graphite-poly.c (apply_poly_transforms): Call lst_update_scattering.
2798 * graphite-poly.h (psct_static_dim): New.
2799 (lst_dewey_number_at_depth): New.
2800 (lst_find_pbb): Restructured.
2801 (lst_find_first_pbb): Restructured.
2802 (lst_find_last_pbb): New.
2803 (lst_contains_p): New.
2804 (lst_contains_pbb): New.
2805 (lst_create_nest): New.
2806 (lst_remove_from_sequence): New.
2807 (pbb_update_scattering): New.
2808 (lst_update_scattering_under): New.
2809 (lst_update_scattering_seq): New.
2810 (lst_update_scattering): New.
2811 (lst_insert_in_sequence): New.
2812 (lst_distribute_lst): New.
2813 (lst_remove_all_before_including_pbb): New.
2814 (lst_remove_all_before_excluding_pbb): New.
2816 2009-10-30 Sebastian Pop <sebastian.pop@amd.com>
2818 * tree-ssa-loop-niter.c (finite_loop_p): Do not call twice
2819 get_loop_exit_edges.
2821 2009-10-30 Sebastian Pop <sebastian.pop@amd.com>
2823 * graphite-poly.c (pbb_remove_duplicate_pdrs): Free collapsed.
2825 2009-10-28 Konrad Trifunovic <konrad.trifunovic@gmail.com>
2827 * graphite-poly.c (print_permutation): New.
2828 (debug_permutation): New.
2829 (new_poly_bb): Initialize PBB_PERMUTATION.
2830 (free_poly_bb): Free PBB_PERMUTATION.
2831 * graphite-poly.h (pbb_permutation_elt_p): Declared.
2832 (struct pbb_permutation_elt): New.
2833 (PBB_PERMUTATION_ELT_STRIDE): New.
2834 (PBB_PERMUTATION_ELT_STRIDED_P): New.
2835 (PBB_PERMUTATION_ELT_TIME_DIMENSION): New.
2836 (new_pbb_permutation_elt): New.
2837 (pbb_permutation_elt_free): New.
2838 (struct poly_bb): Add field permutation.
2839 (PBB_PERMUTATION): New.
2840 (print_permutation): Declared.
2841 (debug_permutation): Declared.
2843 2009-10-26 Sebastian Pop <sebastian.pop@amd.com>
2845 * graphite-clast-to-gimple.c (gloog): Do not call
2846 sese_reset_aux_in_loops.
2847 * graphite-sese-to-poly.c (build_loop_iteration_domains): Pass an
2848 extra argument for domains. Do not use loop->aux.
2849 (build_scop_iteration_domain): Initialize and free domains, pass it
2850 to build_loop_iteration_domains and extract the information from
2851 domains. Do not use loop->aux.
2852 * sese.c (sese_reset_aux_in_loops): Removed.
2853 * sese.h (sese_reset_aux_in_loops): Removed.
2855 2009-10-26 Sebastian Pop <sebastian.pop@amd.com>
2857 * graphite-clast-to-gimple.c (find_pbb_via_hash): Moved up.
2858 (dependency_in_loop_p): Same.
2859 (translate_clast): Do not use loop->aux. Initialize
2860 loop->can_be_parallel.
2861 (mark_loops_parallel): Removed.
2862 * graphite-clast-to-gimple.h (mark_loops_parallel): Removed.
2863 * graphite.c (free_aux_in_new_loops): Removed.
2864 (graphite_finalize): Do not call free_aux_in_new_loops.
2865 (graphite_transform_loops): Do not call mark_loops_parallel.
2867 2009-10-26 Li Feng <nemokingdom@gmail.com>
2869 * graphite-clast-to-gimple.c (get_stmtfor_depth): Removed.
2870 (translate_clast): Pass an extra parameter LEVEL.
2871 Call get_scattering_level.
2872 * graphite-clast-to-gimple.h (get_scattering_level): New.
2874 2009-10-22 Sebastian Pop <sebastian.pop@amd.com>
2876 * cfgloop.c (alloc_loop): Initialize loop->single_iv.
2877 * cfgloop.h (struct loop): New field single_iv.
2879 * graphite-clast-to-gimple.c (pbb_to_depth_to_oldiv): Do not use
2880 loop->aux anymore: use loop->single_iv.
2881 (graphite_loop_normal_form): Moved...
2882 (build_graphite_loop_normal_form): Removed.
2883 (gloog): Do not call build_graphite_loop_normal_form.
2884 (free_aux_in_new_loops): Moved...
2885 (mark_loops_parallel): Restructure.
2886 * graphite-clast-to-gimple.h (free_aux_in_new_loops): Do not declare.
2887 * graphite-sese-to-poly.c (graphite_loop_normal_form): ...here.
2888 (scop_canonicalize_loops): New.
2889 (build_poly_scop): Call scop_canonicalize_loops.
2890 * graphite.c (free_aux_in_new_loops): ...here.
2892 2009-10-22 Sebastian Pop <sebastian.pop@amd.com>
2894 * g++.dg/graphite/graphite.exp: Add the same rules as in
2895 gcc.dg/graphite/graphite.exp.
2897 2009-10-22 Sebastian Pop <sebastian.pop@amd.com>
2899 * g++.dg/graphite/id-1.C: New.
2901 2009-10-22 Sebastian Pop <sebastian.pop@amd.com>
2903 * graphite-sese-to-poly.c (create_zero_dim_array): Pass an extra
2905 (rewrite_close_phi_out_of_ssa): Update use of create_zero_dim_array.
2906 (rewrite_phi_out_of_ssa): Same.
2907 (rewrite_cross_bb_scalar_deps): Same.
2908 (translate_scalar_reduction_to_array): Same.
2910 2009-10-22 Sebastian Pop <sebastian.pop@amd.com>
2912 * graphite-sese-to-poly.c (build_scop_drs): Disable call to
2915 2009-10-22 Sebastian Pop <sebastian.pop@amd.com>
2917 * graphite-sese-to-poly.c (dump_alias_graphs): New.
2918 (build_scop_drs): Call dump_alias_graphs.
2920 2009-10-22 Sebastian Pop <sebastian.pop@amd.com>
2922 * graphite-poly.c (new_scop): Initialize SCOP_ORIGINAL_SCHEDULE,
2923 SCOP_TRANSFORMED_SCHEDULE, and SCOP_SAVED_SCHEDULE.
2924 (free_scop): Call free_lst on SCOP_ORIGINAL_SCHEDULE,
2925 SCOP_TRANSFORMED_SCHEDULE, and SCOP_SAVED_SCHEDULE.
2926 * graphite-poly.h (free_lst): New.
2927 (store_lst_schedule): Free SCOP_SAVED_SCHEDULE.
2928 (restore_lst_schedule): Free SCOP_TRANSFORMED_SCHEDULE.
2930 2009-10-22 Sebastian Pop <sebastian.pop@amd.com>
2932 * graphite-poly.h (struct scop): Add a field saved_schedule.
2933 (SCOP_SAVED_SCHEDULE): New.
2934 (store_lst_schedule): New.
2935 (restore_lst_schedule): New.
2936 (store_scattering): Call store_lst_schedule.
2937 (restore_scattering): Call restore_lst_schedule.
2939 2009-10-20 Sebastian Pop <sebastian.pop@amd.com>
2941 * graphite-sese-to-poly.c (free_data_refs_aux): Fix formatting.
2942 (pdr_add_alias_set): Same.
2943 (build_poly_dr): Same.
2944 (build_alias_set_optimal_p): Same.
2945 (build_base_obj_set_for_drs): Same. Do not store the result of
2948 2009-10-20 Sebastian Pop <sebastian.pop@amd.com>
2950 * graphite-sese-to-poly.c (build_alias_set_optimal_p): Initialize
2951 all_components_are_cliques to 1.
2953 2009-10-20 Li Feng <nemokingdom@gmail.com>
2955 * graphite-sese-to-poly.c (free_data_refs_aux): Update to free
2957 (pdr_add_alias_set): Update retrieving alias_set_num.
2958 (build_poly_dr): Update retrieving dr_base_object_set.
2959 (partition_drs_to_sets): Remove.
2960 (build_alias_set_optimal_p): New.
2961 (build_alias_set_for_drs): Rename.
2962 (build_scop_drs): Update.
2963 * graphite-sese-to-poly.h (struct base_alias_pair): New.
2964 (ALIAS_SET_INDEX): Remove.
2965 (BASE_OBJECT_SET_INDEX): Remove.
2967 2009-10-20 Sebastian Pop <sebastian.pop@amd.com>
2969 * sese.c (get_vdef_before_sese): Handle GIMPLE_ASSIGN and GIMPLE_CALL.
2971 2009-10-20 Sebastian Pop <sebastian.pop@amd.com>
2973 * graphite-sese-to-poly.c (pdr_add_data_dimensions): Do not infer
2974 loop upper bounds for 1-element arrays at end of structures.
2975 * tree-flow.h (array_at_struct_end_p): Declared.
2976 * tree-ssa-loop-niter.c (array_at_struct_end_p): Not static anymore.
2978 2009-10-20 Sebastian Pop <sebastian.pop@amd.com>
2980 * g++.dg/graphite/pr41305.C: New.
2982 2009-10-20 Alexander Monakov <amonakov@ispras.ru>
2984 * graphite-sese-to-poly.c (build_loop_iteration_domains): Generalize
2985 construction of parameter constraints from loop iteration analysis.
2986 * gcc.dg/graphite/run-id-2.c: New test.
2988 2009-10-17 Sebastian Pop <sebastian.pop@amd.com>
2990 * graphite-interchange.c (memory_stride_in_loop): Delete p1, lma
2993 2009-10-17 Sebastian Pop <sebastian.pop@amd.com>
2995 * graphite-dependences.c (dependence_polyhedron_1): Remove
2996 unused gdim dimensions from the DDR polyhedron.
2998 2009-10-17 Sebastian Pop <sebastian.pop@amd.com>
3000 * graphite-dependences.c (pddr_transformed_scattering): New.
3001 (dot_original_deps_stmt_1): New.
3002 (dot_transformed_deps_stmt_1): New.
3003 (dot_deps_stmt_1): Call dot_original_deps_stmt_1 and
3004 dot_transformed_deps_stmt_1.
3005 (dot_original_deps): New.
3006 (dot_transformed_deps): New.
3007 (dot_deps_1): Call dot_original_deps and dot_transformed_deps.
3009 2009-10-17 Sebastian Pop <sebastian.pop@amd.com>
3011 * graphite-dependences.c (reduction_dr_1): Remove wrong
3012 assert: reduction BBs can have multiple reduction writes
3013 to memory. interchange-3.f90 is an example.
3015 2009-10-17 Sebastian Pop <sebastian.pop@amd.com>
3017 * gfortran.dg/graphite/interchange-3.f90: New.
3019 2009-10-17 Sebastian Pop <sebastian.pop@amd.com>
3021 * gcc.dg/graphite/interchange-1.c: Un-XFAILed.
3023 2009-10-17 Sebastian Pop <sebastian.pop@amd.com>
3025 * graphite-dependences.c (dependence_polyhedron_1): Add the
3026 context to the dependence polyhedron.
3028 2009-10-17 Sebastian Pop <sebastian.pop@amd.com>
3030 * graphite-poly.c (pbb_remove_duplicate_pdrs): Initialize
3031 PBB_PDR_DUPLICATES_REMOVED.
3032 (new_poly_bb): Same.
3034 2009-10-17 Sebastian Pop <sebastian.pop@amd.com>
3036 * graphite-sese-to-poly.c (find_scop_parameters): Initialize
3038 (build_loop_iteration_domains): Extract bounds on parameters
3039 based on the data size.
3040 (build_scop_context): Do not initialize SCOP_CONTEXT;
3041 add new constraints.
3043 2009-10-17 Sebastian Pop <sebastian.pop@amd.com>
3045 * graphite-ppl.c (ppl_min_for_le_polyhedron): New.
3046 * graphite-ppl.h (graphite-ppl.h): Declared.
3048 2009-10-17 Sebastian Pop <sebastian.pop@amd.com>
3050 * graphite-ppl.c (ppl_print_linear_expr): New.
3051 (debug_ppl_linear_expr): New.
3052 * graphite-ppl.h (ppl_print_linear_expr): Declared.
3053 (debug_ppl_linear_expr): Declared.
3055 2009-10-16 Sebastian Pop <sebastian.pop@amd.com>
3057 * graphite-interchange.c: Fix comments.
3058 * gcc.dg/graphite/block-1.c: Fix comments.
3060 2009-10-16 Sebastian Pop <sebastian.pop@amd.com>
3062 * gcc.dg/graphite/interchange-7.c: Un-XFAILed.
3063 * gcc.dg/graphite/interchange-9.c: Un-XFAILed.
3065 2009-10-16 Sebastian Pop <sebastian.pop@amd.com>
3067 Reapply the patch from Alexander Monakov that disappeared during
3068 the last merges from trunk.
3070 2009-09-16 Alexander Monakov <amonakov@ispras.ru>
3072 * graphite-sese-to-poly.c (pdr_add_data_dimensions): Add bounds only
3073 for ARRAY_REFs. Use array_ref_{low,up}_bound to determine bounds.
3075 2009-10-15 Sebastian Pop <sebastian.pop@amd.com>
3077 * graphite-interchange.c (memory_stride_in_loop): The depth
3078 argument corresponds to a dynamic time dimension, so use
3079 psct_dynamic_dim to refer to the transformed scattering dimension.
3081 2009-10-15 Sebastian Pop <sebastian.pop@amd.com>
3083 * graphite-interchange.c (memory_stride_in_loop): Fix comments.
3085 2009-10-15 Sebastian Pop <sebastian.pop@amd.com>
3087 * graphite-blocking.c (lst_do_strip_mine): Avoid strip mining the
3089 * graphite-interchange.c (lst_do_interchange): Avoid interchanging
3090 the root of the LST.
3091 * graphite-poly.c (scop_to_lst): Fix LST sequence in an outermost
3093 (print_lst): Print the root of LST in a different format.
3094 * graphite-poly.h (lst_depth): Adjust to include the root of the LST.
3096 2009-10-15 Sebastian Pop <sebastian.pop@amd.com>
3098 * graphite-poly.c (print_scop): Fix pretty printing of a SCoP.
3100 2009-10-15 Sebastian Pop <sebastian.pop@amd.com>
3102 * doc/passes.texi: Document the Graphite infrastructure.
3104 2009-10-15 Sebastian Pop <sebastian.pop@amd.com>
3106 * graphite-sese-to-poly.c (insert_copyin): Use gsi_insert_seq_on_edge.
3107 (rewrite_commutative_reductions_out_of_ssa): Call gsi_commit_edge_inserts,
3108 and check the SSA representation.
3110 * gfortran.dg/graphite/id-18.f90: New, reduced from PR41193.
3112 2009-10-15 Sebastian Pop <sebastian.pop@amd.com>
3114 * gcc.dg/graphite/pr40157.c: Use -floop-block as reported in the PR.
3116 2009-10-14 Sebastian Pop <sebastian.pop@amd.com>
3118 * gcc.dg/graphite/interchange-11.c: New.
3120 2009-10-14 Sebastian Pop <sebastian.pop@amd.com>
3122 * gcc.dg/graphite/interchange-8.c: Enable loop interchange.
3124 2009-10-14 Sebastian Pop <sebastian.pop@amd.com>
3126 * gcc.dg/graphite/graphite.exp (DEFAULT_CFLAGS_GRAPHITE_BLOCK):
3127 Add -fno-loop-strip-mine and -fno-loop-interchange.
3128 (DEFAULT_FLAGS_GRAPHITE_INTERCHANGE): Add -fno-loop-block and
3129 -fno-loop-strip-mine.
3130 * gfortran.dg/graphite/graphite.exp: Same.
3132 2009-10-14 Sebastian Pop <sebastian.pop@amd.com>
3134 * gcc.dg/graphite/graphite.exp (DEFAULT_CFLAGS_GRAPHITE_BLOCK):
3135 Renamed DEFAULT_FLAGS_GRAPHITE_BLOCK.
3136 (DEFAULT_CFLAGS_GRAPHITE_IDENTITY): Renamed
3137 DEFAULT_FLAGS_GRAPHITE_IDENTITY.
3138 (DEFAULT_CFLAGS_GRAPHITE_INTERCHANGE): Renamed
3139 DEFAULT_FLAGS_GRAPHITE_INTERCHANGE.
3140 (DEFAULT_CFLAGS_GRAPHITE_SCOP): Renamed
3141 DEFAULT_FLAGS_GRAPHITE_SCOP.
3142 (DEFAULT_CFLAGS_RUN_ID): Renamed DEFAULT_FLAGS_RUN_ID.
3143 (DEFAULT_CFLAGS_GRAPHITE): Renamed DEFAULT_FLAGS_GRAPHITE.
3145 2009-10-14 Sebastian Pop <sebastian.pop@amd.com>
3147 * graphite-poly.c (pbb_number_of_iterations_at_time): Cleanup comments.
3149 2009-10-14 Konrad Trifunovic <konrad.trifunovic@gmail.com>
3150 Sebastian Pop <sebastian.pop@amd.com>
3152 * graphite-interchange.c (build_linearized_memory_access): Pass an
3153 offset as parameter.
3154 (memory_stride_in_loop): Include transform scattering in the
3155 access functions to be able to querry the strides in the
3157 (pbb_interchange_loop_depths): Interchange the psct_dynamic_dim,
3158 not the psct_iterator_dim.
3160 2009-10-14 Sebastian Pop <sebastian.pop@amd.com>
3162 * graphite-blocking.c (pbb_do_strip_mine): Removed.
3163 (lst_do_strip_mine_loop): New.
3164 (lst_do_strip_mine): New.
3165 (scop_do_strip_mine): Call lst_do_strip_mine.
3166 * graphite-poly.h (lst_add_loop_under_loop): New.
3167 (lst_find_first_pbb): New.
3169 2009-10-14 Sebastian Pop <sebastian.pop@amd.com>
3171 * graphite-poly.c (loop_to_lst): Fix LST creation.
3173 2009-10-14 Tobias Grosser <grosser@fim.uni-passau.de>
3175 * gcc.dg/graphite/id-15.c: (8 * 8) replaced with
3176 sizeof(unsigned long) to make it run on 32bit systems.
3178 2009-10-14 Tobias Grosser <grosser@fim.uni-passau.de>
3180 * gcc.dg/graphite/run-id-1.c: Use smaller matrix to not
3183 2009-10-14 Ramakrishna Upadrasta <Ramakrishna.Upadrasta@inria.fr>
3185 * graphite-sese-to-poly.c (write_alias_graph_to_ascii_dimacs): Fix
3187 (write_alias_graph_to_ascii_dot): New.
3188 (write_alias_graph_to_ascii_ecc): Ditto.
3189 (partition_drs_to_sets): Add testing of optimality of current method
3190 which assigns alias numbers according to DFS Comopnent number. used
3191 as heuristic for the upcoming ECC algorithm.
3192 (build_scop_drs): Write to file also with the ecc and dot format.
3194 2009-10-13 Sebastian Pop <sebastian.pop@amd.com>
3196 * gfortran.dg/graphite/interchange-1.f: XFail.
3198 2009-10-13 Sebastian Pop <sebastian.pop@amd.com>
3200 * graphite.c (graphite_initialize): Do not handle functions with
3201 more than 100 basic blocks.
3203 2009-10-13 Sebastian Pop <sebastian.pop@amd.com>
3205 * graphite-blocking.c (pbb_do_strip_mine): Use
3206 PARAM_LOOP_BLOCK_TILE_SIZE.
3208 2009-10-13 Sebastian Pop <sebastian.pop@amd.com>
3210 * graphite-poly.c (dot_lst_1): New.
3212 * graphite-poly.h (dot_lst): Declared.
3214 2009-10-13 Sebastian Pop <sebastian.pop@amd.com>
3216 * graphite-dependences.c (dot_deps_stmt_1): New.
3217 (dot_deps_stmt): New.
3218 * graphite-dependences.h (dot_deps_stmt): Declared.
3220 2009-10-09 Sebastian Pop <sebastian.pop@amd.com>
3222 * graphite-sese-to-poly.c (rewrite_cross_bb_scalar_dependence): Do
3223 not replace cross BB scalar dependences ending on PHI nodes.
3224 (rewrite_cross_bb_scalar_deps): Filter out GIMPLE_PHI nodes.
3226 2009-10-09 Sebastian Pop <sebastian.pop@amd.com>
3228 * graphite-poly.c (apply_poly_transforms): Implement the high
3229 level driver for flag_loop_block.
3230 * opts.c (decode_options): Enable flag_loop_block at -O2.
3231 * tree-ssa-loop.c (gate_graphite_transforms): Remove call to sorry for
3234 * gcc.dg/graphite/graphite.exp (DEFAULT_CFLAGS_GRAPHITE_BLOCK): Add
3236 * gfortran.dg/graphite/graphite.exp (DEFAULT_CFLAGS_GRAPHITE_BLOCK):
3239 2009-10-09 Sebastian Pop <sebastian.pop@amd.com>
3241 * graphite-poly.h (lst_find_pbb): New.
3242 (find_lst_loop): New.
3244 2009-10-09 Sebastian Pop <sebastian.pop@amd.com>
3246 * graphite-poly.c (new_scop): Remove init of SCOP_DEP_GRAPH.
3247 * graphite-poly.h (struct scop): Remove dep_graph field.
3248 (SCOP_DEP_GRAPH): Removed.
3250 2009-10-09 Sebastian Pop <sebastian.pop@amd.com>
3252 * graphite-poly.h (copy_lst): Do full copy of LST.
3254 2009-10-07 Sebastian Pop <sebastian.pop@amd.com>
3256 * graphite-sese-to-poly.c (reduction_phi_p): Call remove_invariant_phi
3257 when the loop stride is zero.
3259 * gcc.dg/graphite/id-16.c: New.
3261 2009-10-06 Sebastian Pop <sebastian.pop@amd.com>
3263 * graphite-dependences.c (reduction_dr_1): New.
3264 (reduction_dr_p): New.
3265 (graphite_legal_transform_dr): Call reduction_dr_p.
3266 (reduction_ddr): Renamed reduction_ddr_p.
3267 * graphite-poly.h (same_pdr_p): New.
3268 (number_of_write_pdrs): New.
3269 * graphite-sese-to-poly.c (nb_data_writes_in_bb): New.
3270 (split_reduction_stmt): Do not split reduction statements
3271 when there are no writes to memory.
3272 (translate_scalar_reduction_to_array_for_stmt): Insert the
3273 memory reduction statement just after the scalar reduction statement.
3275 * gcc.dg/graphite/interchange-10.c: Updated to differ from interchange-4.c.
3277 * gcc.dg/graphite/interchange-3.c: Un-XFAIL-ed.
3278 * gcc.dg/graphite/interchange-4.c: Un-XFAIL-ed.
3280 2009-10-06 Sebastian Pop <sebastian.pop@amd.com>
3282 * graphite-interchange.c (lst_apply_interchange): New.
3283 (lst_interchange_profitable_p): New.
3284 (lst_try_interchange_loops): New.
3285 (lst_try_interchange): New.
3286 (lst_do_interchange): New.
3287 (pbb_do_interchange): Removed.
3288 (scop_do_interchange): Call lst_do_interchange.
3290 2009-10-06 Sebastian Pop <sebastian.pop@amd.com>
3292 * graphite-poly.c (print_scop): Print SCOP_ORIGINAL_SCHEDULE and
3293 SCOP_TRANSFORMED_SCHEDULE.
3298 * graphite-poly.h (lst_p): New.
3301 (LST_LOOP_FATHER): New.
3304 (scop_to_lst): Declared.
3305 (print_lst): Declared.
3306 (debug_lst): Declared.
3307 (new_lst_loop): New.
3308 (new_lst_stmt): New.
3311 (lst_dewey_number): New.
3312 (struct scop): Add original_schedule and transformed_schedule fields.
3313 (SCOP_ORIGINAL_SCHEDULE): New.
3314 (SCOP_TRANSFORMED_SCHEDULE): New.
3315 * graphite-sese-to-poly.c (build_poly_scop): Call scop_to_lst.
3317 2009-10-05 Sebastian Pop <sebastian.pop@amd.com>
3319 * graphite-dependences.c (reduction_ddr): New.
3320 (graphite_legal_transform_bb): Call reduction_ddr.
3321 * graphite-poly.c (new_poly_bb): Pass a new bool parameter.
3322 Initialize PBB_IS_REDUCTION.
3323 * graphite-poly.h (struct poly_bb): New bool field is_reduction.
3324 (PBB_IS_REDUCTION): New.
3325 (new_poly_bb): Update declaration.
3326 * graphite-scop-detection.h (build_scop_bbs): Removed.
3327 (nb_reductions_in_loop): Removed.
3328 * graphite-sese-to-poly.c (try_generate_gimple_bb): Pass a sbitmap
3329 parameter for reductions.
3330 (try_generate_gimple_bb): Update call to new_poly_bb.
3331 (build_scop_bbs_1): Same.
3332 (build_scop_bbs): Same.
3333 (gsi_for_phi_node): New.
3334 (scalar_close_phi_node_p): Remove gcc_assert.
3335 (split_reduction_stmt): New.
3336 (is_reduction_operation_p): New.
3337 (phi_contains_arg): New.
3338 (follow_ssa_with_commutative_ops): New.
3339 (detect_commutative_reduction_arg): New.
3340 (detect_commutative_reduction_assign): New.
3341 (follow_inital_value_to_phi): New.
3342 (edge_initial_value_for_loop_phi): New.
3343 (initial_value_for_loop_phi): New.
3344 (detect_commutative_reduction): New.
3345 (translate_scalar_reduction_to_array_for_stmt): New.
3346 (insert_copyout): New.
3347 (insert_copyin): New.
3348 (translate_scalar_reduction_to_array): New.
3349 (rewrite_commutative_reductions_out_of_ssa_close_phi): New.
3350 (rewrite_commutative_reductions_out_of_ssa_loop): New.
3351 (rewrite_commutative_reductions_out_of_ssa): New.
3352 (build_poly_scop): Call rewrite_commutative_reductions_out_of_ssa.
3353 * sese.h (split_region_for_bb): New.
3355 * gcc.dg/graphite/graphite.exp (DEFAULT_CFLAGS_GRAPHITE_BLOCK): Add -ffast-math.
3356 * gcc.dg/graphite/interchange-1.c: Fix format.
3357 * gcc.dg/graphite/interchange-10.c: New.
3359 2009-10-05 Sebastian Pop <sebastian.pop@amd.com>
3361 * graphite-sese-to-poly.c (insert_out_of_ssa_copy): Remove
3364 2009-10-05 Sebastian Pop <sebastian.pop@amd.com>
3366 * graphite-sese-to-poly.c (scev_analyzable_p): New.
3367 (rewrite_cross_bb_scalar_dependence): New.
3368 (rewrite_cross_bb_scalar_deps): New.
3369 (rewrite_reductions_out_of_ssa): Use bb_in_sese_p.
3370 Call rewrite_cross_bb_scalar_deps.
3372 2009-10-05 Sebastian Pop <sebastian.pop@amd.com>
3374 * graphite-sese-to-poly.c (gsi_for_ssa_name_def): Removed.
3375 (insert_out_of_ssa_copy): Directly use gsi_after_labels and
3378 2009-10-05 Sebastian Pop <sebastian.pop@amd.com>
3380 * graphite-clast-to-gimple.c (build_cloog_prog): Use pbb_index.
3381 * graphite-interchange.c (pbb_do_interchange): Same.
3382 * graphite-poly.c (print_scattering_function): Same.
3384 * graphite-poly.h (pbb_loop): New.
3385 * graphite-sese-to-poly.c (create_linear_expr_from_tree): Use pbb_loop.
3387 2009-09-27 Sebastian Pop <sebastian.pop@amd.com>
3389 * graphite-scop-detection.c (limit_scops): Do not build poly_bbs.
3391 2009-09-27 Sebastian Pop <sebastian.pop@amd.com>
3393 * graphite-sese-to-poly.c (partition_drs_to_sets): Drs is not modified,
3394 so don't pass a pointer to it.
3395 (build_alias_set_for_drs): Same.
3396 (build_base_obj_set_for_drs): Same.
3397 (build_scop_drs): Same.
3399 2009-09-26 Li Feng <nemokingdom@gmail.com>
3401 * graphite-sese-to-poly.c (build_scop_drs): Disable writing to file
3402 the alias graph of data references.
3404 2009-09-25 Li Feng <nemokingdom@gmail.com>
3406 * graphite-sese-to-poly.c (write_alias_graph_to_ascii_dimacs): New.
3407 (build_scop_drs): When debugging, write the alias graph to file,
3408 otherwise, should be disabled.
3410 2009-09-17 Sebastian Pop <sebastian.pop@amd.com>
3412 * Merge from mainline (151310:151361).
3414 2009-09-17 Sebastian Pop <sebastian.pop@amd.com>
3416 * Merge from mainline (151171:151310).
3418 2009-09-17 Sebastian Pop <sebastian.pop@amd.com>
3420 * Merge from mainline (151171:151806).
3422 2009-09-17 Sebastian Pop <sebastian.pop@amd.com>
3424 * Revert the last commit.
3426 2009-09-17 Sebastian Pop <sebastian.pop@amd.com>
3428 * Merge from mainline (151171:151819).
3430 2009-09-17 Sebastian Pop <sebastian.pop@amd.com>
3432 * graphite-scop-detection.c (stmt_simple_memref_p): Removed.
3433 (is_simple_operand): Remove call to stmt_simple_memref_p.
3434 (stmt_simple_for_scop_p): Update call to is_simple_operand.
3436 2009-09-17 David Edelsohn <edelsohn@gnu.org>
3438 * gcc.dg/graphite/interchange-mvt.c: New File.
3439 * gcc.dg/graphite/scop-dsyrk.c: New File.
3440 * gcc.dg/graphite/scop-dsyr2k.c: New File.
3441 * gcc.dg/graphite/scop-mvt.c: New File.
3442 * gcc.dg/graphite/scop-sor.c: New File.
3444 2009-09-17 Li Feng <nemokingdom@gmail.com>
3446 * graphite-dependences.c (poly_drs_may_alias_p): Adjust definition.
3447 (pddr_original_scattering): Make sure 2 pdr2 in the same base object set.
3448 (graphite_carried_dependence_level_k): Ditto.
3449 * graphite-poly.c (new_poly_dr): Add init of PDR_BASE_OBJECT_SET.
3450 * graphite-poly.h (struct poly_dr): Add member dr_base_object_set.
3451 (new_poly_dr): Adjust declaration.
3452 * graphite-sese-to-poly.c (free_data_refs_aux): New.
3453 (free_gimple_bb): Added free_data_refs_aux.
3454 (build_poly_dr): Add dr_base_object_set.
3455 (partition_drs_to_sets): New.
3456 (dr_same_base_object_p): New.
3457 (build_alias_set_for_drs): New.
3458 (build_base_object_set_for_drs): New.
3459 (build_scop_drs): Add build_base_obj_set_for_drs.
3460 * graphite-sese-to-poly.h: Added #define for alias set number index and
3461 base object set index.
3462 * libgomp/testsuite/libgomp.graphite/force-parallel-6.c: Refine tests.
3463 * libgomp/testsuite/libgomp.graphite/pr4118.c: New.
3465 2009-09-16 Alexander Monakov <amonakov@ispras.ru>
3467 * graphite-sese-to-poly.c (pdr_add_data_dimensions): Add bounds only
3468 for ARRAY_REFs. Use array_ref_{low,up}_bound to determine bounds.
3470 2009-09-14 Sebastian Pop <sebastian.pop@amd.com>
3472 * graphite-sese-to-poly.c (struct irp_data): Removed.
3473 (idx_record_params): Removed.
3474 (find_params_in_bb): Scan for parameters the access functions; don't
3475 parse the tree representation.
3477 2009-09-14 Sebastian Pop <sebastian.pop@amd.com>
3479 * tree-ssa-loop.c (gate_graphite_transforms): Disable Graphite
3480 passes at -O1 and below.
3482 2009-09-14 Sebastian Pop <sebastian.pop@amd.com>
3484 * graphite-blocking.c: Fix order of includes: tree-chrec.h, then
3485 tree-scalar-evolution.h, and then tree-data-ref.h.
3486 * graphite-clast-to-gimple.c: Same.
3487 * graphite-dependences.c: Same.
3488 * graphite-interchange.c: Same.
3489 * graphite-poly.c: Same.
3490 * graphite-scop-detection.c: Same.
3491 * graphite-sese-to-poly.c: Same.
3493 * lambda-code.c: Same.
3494 * matrix-reorg.c: Same.
3495 * tree-data-ref.c: Same.
3496 * tree-if-conv.c: Same.
3497 * tree-loop-distribu: Same.: Same.
3498 * tree-loop-linear.c: Same.
3499 * tree-parloops.c: Same.
3500 * tree-predcom.c: Same.
3501 * tree-vect-patterns.c: Same.
3503 2009-09-02 Sebastian Pop <sebastian.pop@amd.com>
3505 Partially revert the previous patch, except the following.
3506 * tree-scalar-evolution.c (instantiate_scev_not): Adapted to pass
3507 as parameters the operands of the not expression.
3509 2009-09-01 Sebastian Pop <sebastian.pop@amd.com>
3511 * tree-scalar-evolution.c (instantiate_scev_assign): New.
3512 Do not call analyze_scalar_evolution on assignments.
3513 (instantiate_scev_phi): Call analyze_scalar_evolution.
3514 (instantiate_scev_name): Call instantiate_scev_assign and
3515 instantiate_scev_phi.
3516 (instantiate_scev_not): Adapted to pass as parameters the operands
3517 of the not expression.
3519 2009-09-01 Sebastian Pop <sebastian.pop@amd.com>
3521 * tree-scalar-evolution.c (instantiate_scev_binary): Adapted
3522 to pass as parameters the operands of the binary expression.
3524 2009-09-01 Sebastian Pop <sebastian.pop@amd.com>
3526 * tree-scalar-evolution.c (instantiate_scev_bitnot): Renamed
3527 instantiate_scev_not. Handle NEGATE_EXPR.
3528 (instantiate_scev_r): Handle NEGATE_EXPR.
3530 2009-09-01 Sebastian Pop <sebastian.pop@amd.com>
3532 * tree-scalar-evolution.c (instantiate_scev_1): Renamed
3534 (instantiate_scev_r): Move code in instantiate_scev_2
3535 and instantiate_scev_1.
3537 2009-09-01 Sebastian Pop <sebastian.pop@amd.com>
3539 * tree-scalar-evolution.c (instantiate_scev_3): New.
3540 (instantiate_scev_1): Move code in instantiate_scev_3.
3542 2009-09-01 Sebastian Pop <sebastian.pop@amd.com>
3544 * tree-scalar-evolution.c (instantiate_scev_poly): New.
3545 (instantiate_scev_1): Move code in instantiate_scev_poly.
3547 2009-09-01 Sebastian Pop <sebastian.pop@amd.com>
3549 * tree-scalar-evolution.c (instantiate_scev_bitnot): New.
3550 (instantiate_scev_1): Move code in instantiate_scev_bitnot.
3552 2009-09-01 Sebastian Pop <sebastian.pop@amd.com>
3554 * tree-scalar-evolution.c (instantiate_scev_convert): New.
3555 (instantiate_scev_1): Move code in instantiate_scev_convert.
3557 2009-09-01 Sebastian Pop <sebastian.pop@amd.com>
3559 * tree-scalar-evolution.c (instantiate_scev_binary): New.
3560 (instantiate_scev_1): Move code in instantiate_scev_binary.
3562 2009-09-01 Sebastian Pop <sebastian.pop@amd.com>
3564 * tree-scalar-evolution.c (instantiate_scev_name): New.
3565 (instantiate_scev_1): Move code in instantiate_scev_name.
3567 2009-08-28 Sebastian Pop <sebastian.pop@amd.com>
3569 * Merge from mainline (150992:151171).
3571 2009-08-25 Sebastian Pop <sebastian.pop@amd.com>
3573 * opts.c (decode_options): Enable flag_loop_interchange at -O2.
3575 2009-08-25 Sebastian Pop <sebastian.pop@amd.com>
3577 * graphite-dependences.c (graphite_legal_transform_bb): Call
3578 pbb_remove_duplicate_pdrs.
3579 * graphite-poly.c (can_collapse_pdr): Removed.
3580 (pdr_find_duplicate): Removed.
3581 (can_collapse_pdrs): New.
3582 (pbb_remove_duplicate_pdrs): New.
3583 (new_poly_dr): Do not look for duplicates.
3584 * graphite-poly.h (struct poly_bb): New field pdr_duplicates_removed.
3585 (PBB_PDR_DUPLICATES_REMOVED): New.
3586 (pbb_remove_duplicate_pdrs): Declared.
3588 2009-08-25 Sebastian Pop <sebastian.pop@amd.com>
3590 * graphite-interchange.c (pbb_interchange_profitable_p): Adjust
3591 the strides by multiplying by PDR_NB_REFS.
3592 * graphite-poly.c (can_collapse_pdr): New.
3593 (pdr_find_duplicate): New.
3594 (new_poly_dr): Call pdr_find_duplicate. Collapse duplicate PDRs.
3595 Initialize PDR_NB_REFS.
3596 * graphite-poly.h (struct poly_dr): Add field nb_refs.
3598 (new_poly_dr): Number of subscripts is a graphite_dim_t.
3600 2009-08-25 Sebastian Pop <sebastian.pop@amd.com>
3602 Revert one of the previous commits:
3603 * graphite-dependences.c (graphite_legal_transform_bb): Avoid
3604 the computation of symmetric data dependence relations.
3605 (dependency_between_pbbs_p): Same.
3607 2009-08-25 Sebastian Pop <sebastian.pop@amd.com>
3610 * graphite-poly.c (apply_poly_transforms): Remove legality test before
3613 2009-08-25 Sebastian Pop <sebastian.pop@amd.com>
3615 * graphite-dependences.c (pddr_original_scattering): Return NULL
3616 for read-read dependence relations.
3617 * graphite-poly.h (enum poly_dr_type): Fix comment.
3620 (pdr_may_write_p): New.
3622 2009-08-25 Sebastian Pop <sebastian.pop@amd.com>
3624 * graphite-poly.h (enum POLY_DR_TYPE): Renamed poly_dr_type.
3625 (struct poly_dr): Same.
3626 (new_poly_dr): Same.
3627 * graphite-poly.c (new_poly_dr): Same.
3629 2009-08-25 Konrad Trifunovic <konrad.trifunovic@gmail.com>
3630 Sebastian Pop <sebastian.pop@amd.com>
3632 * graphite-blocking.c (pbb_strip_mine_loop_depth): Renamed
3633 pbb_strip_mine_time_depth. Changed the implementation so that
3634 transformation is expressed as a transformation on
3635 time (scatttering) dimensions. Also, ensures that the 2d+1
3636 scheduling format is preserved.
3637 (pbb_strip_mine_profitable_p): Profitability is based on the
3638 iteration number of a given time (scattering) dimension,
3639 and not on a original loop depth dimension.
3640 (pbb_strip_mine): Call pbb_number_of_iterations_at_time.
3641 (pbb_do_strip_mine): Call psct_dynamic_dim.
3642 * graphite-poly.c (pbb_number_of_iterations_at_time): New.
3643 * graphite-poly.h (pbb_number_of_iterations_at_time): Declared.
3644 (pbb_nb_dynamic_scattering_transform): New.
3645 (psct_dynamic_dim): New.
3647 2009-08-25 Konrad Trifunovic <konrad.trifunovic@gmail.com>
3649 * graphite-ppl.c (ppl_max_for_le): Renamed ppl_max_for_le_pointset.
3650 * graphite-ppl.h (ppl_max_for_le): Renamed ppl_max_for_le_pointset.
3651 * graphite-poly.c (pbb_number_of_iterations): Rename ppl_max_for_le.
3652 * graphite-interchange.c (build_linearized_memory_access): Same.
3653 (memory_stride_in_loop): Same.
3655 2009-08-25 Sebastian Pop <sebastian.pop@amd.com>
3657 * graphite-dependences.c (pddr_original_scattering): New.
3658 (graphite_legal_transform_dr): Call pddr_original_scattering.
3661 * graphite-dependences.h (dot_deps): Declared.
3662 * graphite-poly.c (new_poly_dr): Initialize PDR_ID.
3663 (print_pdr): Print PDR_ID.
3664 * graphite-poly.h (struct poly_dr): Add field id.
3667 * graphite-scop-detection.c (dot_all_scops_1): Cleanup comment.
3669 2009-08-22 Sebastian Pop <sebastian.pop@amd.com>
3671 * graphite-dependences.c (graphite_carried_dependence_level_k): Do
3672 not delete the original dependence relation.
3674 2009-08-21 Sebastian Pop <sebastian.pop@amd.com>
3676 * graphite-dependences.c (graphite_legal_transform_bb): Avoid
3677 the computation of symmetric data dependence relations.
3678 (dependency_between_pbbs_p): Same.
3680 2009-08-21 Sebastian Pop <sebastian.pop@amd.com>
3682 * graphite-dependences.c (new_poly_dr_pair): Renamed new_poly_ddr.
3683 (eq_poly_dr_pair_p): Renamed eq_poly_ddr_p.
3684 (hash_poly_dr_pair_p): Renamed hash_poly_ddr_p.
3685 (free_poly_ddr): New.
3686 (pddr_is_empty): New.
3687 (dependence_polyhedron_1): Now returns a poly_ddr_p.
3688 (dependence_polyhedron): Same. Remove useless gcc_assert.
3690 (graphite_legal_transform_dr): Call pddr_is_empty and free_poly_ddr.
3691 (graphite_carried_dependence_level_k): Call pddr_is_empty.
3692 * graphite-dependences.h (enum poly_dependence_kind): New.
3693 (poly_dr_pair): Renamed poly_ddr. Added a field kind.
3694 (PDRP_SOURCE): Renamed PDDR_SOURCE.
3695 (PDRP_SINK): Renamed PDDR_SINK.
3696 (PDRP_DDP): Renamed PDDR_DDP.
3698 (free_poly_ddr): Declared.
3699 * graphite-poly.c (new_scop): Use the new hash function names.
3700 * graphite-poly.h (struct scop): Renamed field original_pdr_pairs
3701 into original_pddrs.
3702 (SCOP_ORIGINAL_PDR_PAIRS): Renamed SCOP_ORIGINAL_PDDRS.
3704 2009-08-21 Sebastian Pop <sebastian.pop@amd.com>
3706 * Merge from mainline (150764:150992).
3708 2009-08-18 Sebastian Pop <sebastian.pop@amd.com>
3710 * cfgloopmanip.c (create_empty_loop_on_edge): Generate upper
3711 bounds with LT_EXPR to make niter analysis more precise on code
3712 generated by Graphite.
3714 2009-08-18 Sebastian Pop <sebastian.pop@amd.com>
3716 * graphite-dependences.c (graphite_legal_transform_dr): Fix formatting.
3717 (graphite_legal_transform_bb): Same.
3718 (poly_drs_may_alias_p): Same.
3720 2009-08-15 Sebastian Pop <sebastian.pop@amd.com>
3723 * graphite-ppl.c (ppl_max_for_le): Correct the use of
3724 ppl_Pointset_Powerset_C_Polyhedron_maximize.
3726 2009-08-13 Sebastian Pop <sebastian.pop@amd.com>
3728 * graphite-poly.c (print_pbb): Print PBB index.
3730 2009-08-13 Sebastian Pop <sebastian.pop@amd.com>
3732 * Merge from mainline (r150672:150764).
3734 2009-08-13 Sebastian Pop <sebastian.pop@amd.com>
3736 * graphite-interchange.c (ppl_max_for_le): Moved...
3737 * graphite-poly.c (pbb_number_of_iterations): Call ppl_max_for_le.
3738 * graphite-ppl.c (ppl_max_for_le): ... here.
3739 * graphite-ppl.h (ppl_max_for_le): Declared.
3741 2009-08-12 Sebastian Pop <sebastian.pop@amd.com>
3743 * Merge from mainline (r150372:150672).
3745 2009-08-11 Sebastian Pop <sebastian.pop@amd.com>
3748 * sese.c (convert_for_phi_arg): New.
3749 (add_guard_exit_phis): Use convert_for_phi_arg.
3751 * gfortran.dg/graphite/id-17.f: New.
3753 2009-08-11 Sebastian Pop <sebastian.pop@amd.com>
3755 * graphite-sese-to-poly.c (pdr_add_data_dimensions): Dont add
3756 unknown subscript upper bounds.
3758 * gcc.dg/graphite/interchange-6.c: Un-XFAIL.
3760 2009-08-11 Sebastian Pop <sebastian.pop@amd.com>
3761 Pranav Garg <pranav.garg2107@gmail.com>
3763 * graphite-interchange.c (gather_access_strides): Removed.
3764 (ppl_max_for_le): New.
3765 (build_linearized_memory_access): New.
3766 (memory_stride_in_loop): New.
3767 (pbb_interchange_profitable_p): Reimplemented.
3768 * graphite-ppl.h (ppl_new_id_map): New.
3769 (ppl_interchange): New.
3771 * gcc.dg/graphite/interchange-6.c: XFAILed.
3773 2009-08-11 Sebastian Pop <sebastian.pop@amd.com>
3775 * graphite-interchange.c (compute_subscript): Removed.
3776 (compute_array_size_cstr): Removed.
3777 (compute_array_size_poly): Removed.
3778 (compute_array_size): Removed.
3779 (gather_access_strides_poly): Removed.
3780 (gather_access_strides): Empty.
3782 2009-08-11 Sebastian Pop <sebastian.pop@amd.com>
3784 * graphite-dependences.c (dependence_polyhedron_1): Replace
3785 pdr_nb_subscripts with PDR_NB_SUBSCRIPTS.
3786 (graphite_legal_transform_dr): Same.
3787 (graphite_carried_dependence_level_k): Same.
3788 * graphite-poly.c (new_poly_dr): Add a parameter nb_subscripts.
3789 Initialize PDR_NB_SUBSCRIPTS.
3790 (print_pdr_access_layout): Replace pdr_nb_subscripts with
3792 * graphite-poly.h (struct poly_dr): Add nb_subscripts field.
3793 (PDR_NB_SUBSCRIPTS): New.
3794 (pdr_nb_subscripts): Removed.
3795 (pdr_dim): Simplified.
3796 * graphite-sese-to-poly.c (build_poly_dr): Replace pdr_nb_subscripts
3797 with PDR_NB_SUBSCRIPTS.
3799 2009-08-11 Sebastian Pop <sebastian.pop@amd.com>
3801 * graphite-interchange.c (compute_array_size): Remove use of
3803 * graphite-poly.c (new_poly_dr): Remove argument data_container.
3804 Do not initialize PDR_DATA_CONTAINER.
3805 (print_pdr): Do not print PDR_DATA_CONTAINER.
3806 * graphite-poly.h (struct poly_dr): Remove data_container field.
3807 (PDR_DATA_CONTAINER): Removed.
3808 * graphite-sese-to-poly.c (pdr_add_data_dimensions): Remove use of
3810 (build_poly_dr): Same.
3812 2009-08-11 Sebastian Pop <sebastian.pop@amd.com>
3814 * gcc.dg/graphite/interchange-9.c: New.
3816 2009-08-05 Konrad Trifunovic <konrad.trifunovic@gmail.com>
3817 Sebastian Pop <sebastian.pop@amd.com>
3819 * graphite-dependences.c (graphite_legal_transform_dr): Work on a
3820 copy of the dependence polyhedron. Free the temporary objects.
3821 (graphite_carried_dependence_level_k): Free unused objects before
3824 * gcc.dg/graphite/interchange-1.c: XFAILed.
3825 * gcc.dg/graphite/interchange-2.c: XFAILed.
3826 * gcc.dg/graphite/interchange-3.c: XFAILed.
3827 * gcc.dg/graphite/interchange-4.c: XFAILed.
3828 * gcc.dg/graphite/interchange-7.c: XFAILed.
3830 2009-08-05 Sebastian Pop <sebastian.pop@amd.com>
3832 * graphite-blocking.c (scop_do_strip_mine): Call store_scattering.
3833 Early return without analyzing the data dependences if no
3834 transform has been done. Call restore_scattering if the transform
3836 (graphite-interchange.c): Same.
3837 * graphite-poly.c (print_scattering_function): Test for PBB_TRANSFORMED.
3838 (graphite_read_transforms): Initialize PBB_TRANSFORMED.
3839 (apply_poly_transforms): Do not gcc_assert that
3840 the transform is legal.
3841 (new_poly_bb): Initialize PBB_TRANSFORMED, PBB_SAVED, and PBB_ORIGINAL.
3842 Do not initialize PBB_NB_SCATTERING_TRANSFORM, PBB_NB_LOCAL_VARIABLES,
3843 PBB_TRANSFORMED_SCATTERING, and PBB_ORIGINAL_SCATTERING.
3844 (free_poly_dr): Free PBB_TRANSFORMED, PBB_SAVED, and PBB_ORIGINAL.
3845 * graphite-poly.h (struct poly_scattering): New.
3846 (struct poly_bb): Add original, transformed, and saved fields.
3847 Remove transformed_scattering, original_scattering, nb_local_variables,
3848 and nb_scattering_transform fields.
3849 (PBB_ORIGINAL, PBB_TRANSFORMED, PBB_SAVED): New.
3850 (poly_scattering_new): New.
3851 (poly_scattering_free): New.
3852 (poly_scattering_copy): New.
3853 (store_scattering_pbb): New.
3854 (store_scattering): New.
3855 (restore_scattering_pbb): New.
3856 (restore_scattering): New.
3857 * graphite-sese-to-poly.c (build_pbb_scattering_polyhedrons):
3858 Initialize PBB_TRANSFORMED and PBB_ORIGINAL.
3860 2009-08-05 Sebastian Pop <sebastian.pop@amd.com>
3862 * graphite-poly.c (print_pbb): Add parentheses in the pretty print.
3865 2009-08-05 Sebastian Pop <sebastian.pop@amd.com>
3867 * Makefile.in (graphite.o): Depends on PREDICT_H.
3868 * graphite.c: Include predict.h.
3869 (graphite_finalize): Call tree_estimate_probability.
3870 * predict.c (predict_loops): Do not call scev_initialize and
3872 (tree_estimate_probability_bb): New.
3873 (tree_estimate_probability): Do not initialize loops: move that
3874 code to the driver. Call tree_estimate_probability_bb.
3875 (tree_estimate_probability_driver): New.
3876 (pass_profile): Use tree_estimate_probability_driver.
3877 * predict.h (tree_estimate_probability): Declared.
3879 2009-08-05 Sebastian Pop <sebastian.pop@amd.com>
3881 * graphite-clast-to-gimple.c (gloog): Add time to TV_GRAPHITE_CODE_GEN.
3882 * graphite-dependences.c (graphite_legal_transform): Add time to
3883 TV_GRAPHITE_DATA_DEPS.
3884 (dependency_between_pbbs_p): Same.
3885 * timevar.def (TV_GRAPHITE_DATA_DEPS, TV_GRAPHITE_CODE_GEN): New.
3887 2009-08-03 Sebastian Pop <sebastian.pop@amd.com>
3889 * Merge from mainline (r149952:150372).
3891 2009-07-28 Sebastian Pop <sebastian.pop@amd.com>
3893 * ChangeLog.graphite: Fix indenting, white spaces and 80 columns.
3894 * graphite-blocking.c: Same.
3895 * graphite-clast-to-gimple.c: Same.
3896 * graphite-dependences.c: Same.
3897 * graphite-poly.c: Same.
3898 * graphite-poly.h: Same.
3899 * graphite-ppl.c: Same.
3900 * graphite-scop-detection.c: Same.
3901 * graphite-sese-to-poly.c: Same.
3904 2009-07-28 Sebastian Pop <sebastian.pop@amd.com>
3906 * graphite-sese-to-poly.c (loop_entry_phi_arg): New.
3907 (remove_simple_copy_phi): New.
3908 (remove_invariant_phi): New.
3909 (simple_copy_phi_p): New.
3910 (reduction_phi_p): New.
3911 (gsi_for_ssa_name_def): New.
3912 (insert_out_of_ssa_copy): New.
3913 (insert_out_of_ssa_copy_on_edge): New.
3914 (create_zero_dim_array): New.
3915 (scalar_close_phi_node_p): New.
3916 (rewrite_close_phi_out_of_ssa): New.
3917 (rewrite_phi_out_of_ssa): New.
3918 (rewrite_reductions_out_of_ssa): New.
3919 (build_poly_scop): Call rewrite_reductions_out_of_ssa.
3921 * gcc.dg/graphite/id-11.c: New.
3922 * gcc.dg/graphite/id-15.c: New.
3923 * gcc.dg/graphite/interchange-1.c: Un-XFAIL.
3924 * gcc.dg/graphite/interchange-2.c: Un-XFAIL.
3925 * gcc.dg/graphite/interchange-3.c: Un-XFAIL.
3926 * gcc.dg/graphite/interchange-4.c: Un-XFAIL.
3927 * gcc.dg/graphite/interchange-7.c: Un-XFAIL.
3928 * gcc.dg/graphite/scop-matmult.c: Un-XFAIL.
3929 * gfortran.dg/graphite/id-13.f: New.
3930 * gfortran.dg/graphite/id-5.f: New.
3932 2009-07-28 Sebastian Pop <sebastian.pop@amd.com>
3934 * graphite-clast-to-gimple.c (graphite_loop_normal_form): Do not
3935 check that nb_reductions_in_loop is zero.
3936 * graphite-scop-detection.c (harmful_stmt_in_bb): Don't filter out
3937 reduction phi nodes.
3938 (nb_reductions_in_loop): Removed.
3939 (graphite_can_represent_loop): Do not call nb_reductions_in_loop.
3940 * graphite-sese-to-poly.c (phi_node_is_iv): Removed.
3941 (bb_contains_non_iv_scalar_phi_nodes): Removed.
3942 (scop_contains_non_iv_scalar_phi_nodes): Removed.
3943 (build_poly_scop): Do not call scop_contains_non_iv_scalar_phi_nodes.
3945 2009-07-28 Sebastian Pop <sebastian.pop@amd.com>
3947 * graphite-clast-to-gimple.c (build_cloog_prog): Do not code generate
3948 statements that have an empty iteration domain.
3949 * gfortran.dg/graphite/id-16.f: New.
3951 2009-07-28 Sebastian Pop <sebastian.pop@amd.com>
3953 * tree-scalar-evolution.c (instantiate_scev_1): Return
3954 chrec_dont_know when the result is not above instantiate_below.
3955 * graphite-scop-detection.c (scopdet_basic_block_info): Fix formatting.
3956 * graphite-sese-to-poly.c (create_linear_expr_from_tree): Assert that
3957 the tree has a known scalar evolution.
3958 * gfortran.dg/graphite/id-14.f: New.
3959 * gfortran.dg/graphite/id-15.f: New.
3961 2009-07-28 Sebastian Pop <sebastian.pop@amd.com>
3963 * sese.c (rename_variables_in_stmt): Pass in an extra parameter
3965 (rename_variables): Keep inserting renames after the ones already
3968 2009-07-28 Sebastian Pop <sebastian.pop@amd.com>
3970 * graphite-sese-to-poly.c (compare_bb_depths): New.
3971 (graphite_sort_dominated_info): New.
3972 (build_scop_bbs_1): Call graphite_sort_dominated_info.
3973 (build_scop_scattering): Fix comment.
3975 2009-07-28 Sebastian Pop <sebastian.pop@amd.com>
3977 * graphite.c (graphite_finalize): Call print_loops instead of
3978 dump_function_to_file.
3979 * gcc.dg/graphite/graphite.exp: Fix formatting.
3980 * gcc.dg/graphite/pr35356-1.c: New. Look for the number of
3981 loops generated in the graphite output file.
3982 * gcc.dg/graphite/pr35356-2.c: New.
3983 * gcc.dg/graphite/pr35356-3.c: New. XFAILed for now.
3984 * gfortran.dg/graphite/id-12.f: New.
3986 2009-07-24 Li Feng <nemokingdom@gmail.com>
3988 * gcc.dg/graphite/graphite_autopar/force-parallel-8.c:
3991 2009-07-24 Li Feng <nemokingdom@gmail.com>
3992 Tobias Grosser <grosser@fim.uni-passau.de>
3994 * graphite-sese-to-poly.c (pdr_add_alias_set): Use data reference's
3995 alias set number build alias in ACCESSES polyhedron.
3996 (build_alias_set_for_drs): New.
3997 (build_pbb_drs): Added build_alias_set_for_drs.
3998 * graphite-dependences.c (poly_drs_may_alias_p): New.
3999 (graphite_carried_dependence_level_k): Check alias information
4000 before building polyhedron.
4002 2009-07-24 Tobias Grosser <grosser@fim.uni-passau.de>
4004 * Makefile.in (lambda-code.o): Fix formatting.
4006 2009-07-24 Tobias Grosser <grosser@fim.uni-passau.de>
4008 * Merge from mainline (r149350-149952)
4010 2009-07-18 Tobias Grosser <grosser@fim.uni-passau.de>
4012 * graphite-poly.c (apply_poly_transforms): Move strip_mine
4013 before interchange to prepare for loop blocking.
4015 2009-07-18 Tobias Grosser <grosser@fim.uni-passau.de>
4017 * graphite-poly.c (apply_poly_transforms): Add checks after every
4019 * graphite-sese-to-poly.c (build_poly_scop): Remove check, as already
4020 done in apply_poly_transforms.
4022 2009-07-17 Konrad Trifunovic <konrad.trifunovic@gmail.com>
4024 * graphite-dependences.c (build_lexicographically_gt_constraint):
4025 Replace RES parameter with *RES.
4026 (dependence_polyhedron_1): Pass an address of the parameter RES
4027 instead of value of RES.
4029 2009-07-16 Sebastian Pop <sebastian.pop@amd.com>
4031 * graphite.c (graphite_finalize): Fix comment.
4032 (graphite_transform_loops): Reset scev info after code generation
4035 2009-07-16 Sebastian Pop <sebastian.pop@amd.com>
4037 * graphite.c (graphite_finalize): Call scev_reset.
4039 2009-07-16 Sebastian Pop <sebastian.pop@amd.com>
4041 * graphite-clast-to-gimple.c (compute_cloog_iv_types): Do not create
4042 GBB_CLOOG_IV_TYPES hash table twice.
4043 * graphite-sese-to-poly.c (free_gimple_bb): Call free_data_refs.
4044 (add_condition_to_domain): Clear GMP values.
4046 2009-07-16 Sebastian Pop <sebastian.pop@amd.com>
4048 * graphite-dependences.c: Fix formatting.
4049 * graphite-poly.c (free_poly_dr): Also free PDR_DATA_CONTAINER.
4050 (pbb_number_of_iterations): Free ppl_Linear_Expression.
4051 * graphite-sese-to-poly.c: Fix formatting.
4052 * graphite.c (graphite_transform_loops): Create the hash table
4053 after the early return.
4055 2009-07-16 Sebastian Pop <sebastian.pop@amd.com>
4057 * gcc.dg/graphite/id-14.c: New.
4058 * gcc.dg/graphite/pr40157.c: New.
4059 * gfortran.dg/graphite/id-11.f: New.
4061 2009-07-16 Sebastian Pop <sebastian.pop@amd.com>
4063 * graphite-sese-to-poly.c (nb_pbbs_in_loops): New.
4064 (build_poly_scop): Return false when there are no pbbs within
4065 loops to avoid to pass to cloog scops with no loops.
4067 2009-07-16 Sebastian Pop <sebastian.pop@amd.com>
4069 * graphite-sese-to-poly.c (build_pbb_scattering_polyhedrons): Avoid
4070 useless test "i % 2".
4071 (build_pbb_scattering_polyhedrons): Fix formatting.
4072 (build_poly_dr): Same.
4073 * graphite.c (graphite_transform_loops): Restructure.
4075 2009-07-14 Razya Ladelsky <razya@il.ibm.com>
4077 * tree-ssa-loop-manip.c (rewrite_phi_with_iv): Remove
4078 reduction_list parameter.
4079 (rewrite_all_phi_nodes_with_iv): Same.
4080 (canonicalize_loop_ivs): Same.
4081 * tree-parloops.c (struct brli): Removed.
4082 (build_reduction_list_info): Removed.
4083 (build_new_reduction): New.
4084 (analyze_reduction_list): Removed.
4085 (gather_scalar_reductions): Find reductions instead of phi
4086 nodes that can't be canonicalized.
4087 (try_create_reduction_list): Remove reduction_list parameter.
4088 (gen_parallel_loop): Same.
4089 (parallelize_loops): Remove analyze_reductions variable,
4090 initialization and free.
4091 Change reduction_list htab initialization to reduction_info
4092 elements instead of ssa names.
4093 Call try_create_reduction_list and gen_parallel_loop without
4094 analyzed_reduction argument.
4095 * graphite-clast-to-gimple (graphite_loop_normal_form): Call
4096 canonicalize_loop_ivs with one less argument.
4097 * tree-flow.h (canonicalize_loop_ivs): Remove one argument.
4099 2009-07-14 Konrad Trifunovic <konrad.trifunovic@gmail.com>
4101 * graphite-dependences.c (new_poly_dr_pair): New.
4102 (dependence_polyhedron): Renamed into dependence_polyhedron_1.
4103 (new_poly_dr_pair): New.
4104 (eq_poly_dr_pair_p): New.
4105 (hash_poly_dr_pair_p): New.
4106 * graphite-dependences.h (struct poly_dr_pair): New.
4107 (eq_poly_dr_pair_p): Declared.
4108 (hash_poly_dr_pair_p): Declared.
4109 * graphite-poly.c (new_scop): Initialize SCOP_ORIGINAL_PDR_PAIRS.
4110 (free_scop): Free SCOP_ORIGINAL_PDR_PAIRS.
4111 * graphite-poly.h (struct scop): Add original_pdr_pairs field.
4112 * Makefile.in (graphite-poly.o): Add dependence on
4113 graphite-dependences.h.
4115 2009-07-14 Sebastian Pop <sebastian.pop@amd.com>
4117 * graphite-scop-detection.c (graphite_can_represent_scev): Do not let
4118 polynomials of degree > 1 pass to Graphite.
4119 * tree-chrec.c (scev_is_linear_expression): Call
4120 evolution_function_is_affine_multivariate_p.
4121 * gfortran.dg/graphite/id-10.f90: New.
4123 2009-07-14 Sebastian Pop <sebastian.pop@amd.com>
4125 * tree-scalar-evolution.c (compute_overall_effect_of_inner_loop):
4126 Instantiate scevs varying in outer loops.
4127 * gfortran.dg/graphite/id-9.f: Correct testcase.
4129 2009-07-14 Sebastian Pop <sebastian.pop@amd.com>
4131 * graphite-sese-to-poly.c (build_loop_iteration_domains): Do not insert
4132 redundant constraint.
4134 2009-07-14 Sebastian Pop <sebastian.pop@amd.com>
4136 * gcc.dg/graphite/graphite.exp: Fix comments.
4137 * gfortran.dg/graphite/graphite.exp: Trigger actions
4138 based on the file names as in the C testsuite.
4139 * gfortran.dg/graphite/block-1.f90: Fix patterns.
4140 * gfortran.dg/graphite/block-2.f: Same.
4141 * gfortran.dg/graphite/block-3.f90: Same.
4142 * gfortran.dg/graphite/block-4.f90: Same.
4143 * gfortran.dg/graphite/id-1.f90: Same.
4144 * gfortran.dg/graphite/id-2.f90: Same.
4145 * gfortran.dg/graphite/id-3.f90: Same.
4146 * gfortran.dg/graphite/id-4.f90: Same.
4147 * gfortran.dg/graphite/id-6.f: Same.
4148 * gfortran.dg/graphite/id-9.f: Same.
4149 * gfortran.dg/graphite/interchange-1.f: Same.
4150 * gfortran.dg/graphite/interchange-2.f: Same.
4151 * gfortran.dg/graphite/scop-1.f: Same.
4153 2009-07-14 Sebastian Pop <sebastian.pop@amd.com>
4155 * sese.c (expand_scalar_variables_call): New.
4156 (expand_scalar_variables_ssa_name): Handle calls in expander.
4158 2009-07-13 Sebastian Pop <sebastian.pop@amd.com>
4160 * gcc.dg/graphite/graphite_autopar/force-parallel-6.c:
4161 Expect to see the pattern twice.
4162 * gcc.dg/graphite/interchange-0.c: Un-XFAIL.
4163 * gcc.dg/graphite/interchange-5.c: Same.
4164 * gcc.dg/graphite/interchange-6.c: Same.
4166 2009-07-13 Sebastian Pop <sebastian.pop@amd.com>
4168 * gcc.dg/graphite/id-10.c: New.
4169 * gcc.dg/graphite/id-12.c: New.
4170 * gfortran.dg/graphite/id-7.f: New.
4171 * gfortran.dg/graphite/id-8.f: New.
4173 2009-07-13 Sebastian Pop <sebastian.pop@amd.com>
4175 * graphite-sese-to-poly.c (pdr_add_data_dimensions): Fix division by
4178 2009-07-13 Sebastian Pop <sebastian.pop@amd.com>
4180 * sese.c (rename_variables_in_stmt): Call fold_convert during renaming.
4182 2009-07-13 Sebastian Pop <sebastian.pop@amd.com>
4184 * sese.c (expand_scalar_variables_stmt): Avoid unnecessary expansion.
4186 2009-07-10 Sebastian Pop <sebastian.pop@amd.com>
4188 * graphite-sese-to-poly.c (pdr_add_memory_accesses): Fix order of
4189 building PDR subscripts.
4191 2009-07-10 Sebastian Pop <sebastian.pop@amd.com>
4193 * graphite-sese-to-poly.c (pdr_add_data_dimensions): Fix the
4194 computation of array sizes.
4196 2009-07-10 Sebastian Pop <sebastian.pop@amd.com>
4198 * graphite-sese-to-poly.c (add_param_constraints): Disabled.
4200 2009-07-10 Tobias Grosser <grosser@fim.uni-passau.de>
4202 * graphite-dependences.c (map_into_dep_poly, map_dr_into_dep_poly,
4203 build_pairwise_constraint, dr_equality_constraints,
4204 build_pairwise_scheduling_equality,
4205 build_pairwise_scheduling_inequality, lexicographically_gt_p,
4206 build_lexicographically_gt_constraint, dependence_polyhedron,
4207 graphite_legal_transform_dr, graphite_carried_dependence_level_k):
4208 Move from NNC_Polyhedron to C_Polyhedron.
4209 * graphite-interchange.c (compute_array_size_poly,
4210 gather_access_strides): Dito.
4211 * graphite-poly.c (apply_poly_transforms, new_poly_dr, free_poly_bb,
4212 free_scop, pbb_number_of_iterations): Dito.
4213 * graphite-poly.h (struct poly_dr, pdr_nb_subscripts, struct poly_bb,
4214 pbb_dim_iter_domain, struct scop): Dito.
4215 * graphite-ppl.c (new_Constraint_System_from_Cloog_Matrix,
4216 new_Cloog_Domain_from_ppl_Polyhedron,
4217 new_Cloog_Domain_from_ppl_Pointset_Powerset, ppl_set_coef_gmp,
4218 ppl_insert_dimensions_pointset, ppl_insert_dimensions_pointset,
4219 ppl_strip_loop, ppl_strip_loop, ppl_print_polyhedron_matrix,
4220 ppl_print_powerset_matrix, debug_ppl_polyhedron_matrix,
4221 debug_ppl_powerset_matrix, ppl_read_polyhedron_matrix): Dito.
4222 * graphite-ppl.h (ppl_Pointset_Powerset_C_Polyhedron_t,
4223 new_C_Polyhedron_from_Cloog_Matrix, ppl_print_powerset_matrix,
4224 debug_ppl_powerset_matrix, ppl_insert_dimensions_pointset): Dito.
4225 * graphite-sese-to-poly.c (build_pbb_scattering_polyhedrons,
4226 build_loop_iteration_domains, ppl_constraint_type_from_tree_code,
4227 add_condition_to_domain, add_condition_to_pbb, build_scop_context,
4228 build_scop_iteration_domain, build_poly_dr): Dito
4230 2009-07-09 Sebastian Pop <sebastian.pop@amd.com>
4232 * gcc.dg/graphite/graphite.exp: Added a rule to execute
4234 * gcc.dg/graphite/run-id-1.c: New.
4236 2009-07-09 Sebastian Pop <sebastian.pop@amd.com>
4238 * graphite-sese-to-poly.c (build_loop_iteration_domains): Add the
4239 positivity constraint on the symbolic number of iterations.
4241 2009-07-09 Sebastian Pop <sebastian.pop@amd.com>
4243 * graphite-sese-to-poly.c (build_loop_iteration_domains): Rewrite.
4245 2009-07-09 Sebastian Pop <sebastian.pop@amd.com>
4246 Tobias Grosser <grosser@fim.uni-passau.de>
4248 * graphite-clast-to-gimple.c (build_scop_context): Removed.
4249 (build_cloog_prog): Directly use SCOP_CONTEXT.
4250 * graphite-poly.c (new_scop): Initialize SCOP_CONTEXT.
4251 (free_scop): Free SCOP_CONTEXT.
4252 (print_scop_context): New.
4253 (print_scop): Call print_scop_context.
4254 (debug_scop_context): New.
4255 * graphite-poly.h (print_scop_context, debug_scop_context): Declared.
4256 (struct scop): Added field context.
4257 (SCOP_CONTEXT): New.
4258 * graphite-sese-to-poly.c (add_param_constraints): New.
4259 (build_scop_context): New.
4260 (build_poly_scop): Call build_scop_context.
4262 2009-07-09 Sebastian Pop <sebastian.pop@amd.com>
4264 * graphite-clast-to-gimple.c (gmp_cst_to_tree): Moved...
4265 * graphite-ppl.c (ppl_set_inhomogeneous_gmp, ppl_set_coef_gmp): New.
4266 (ppl_set_inhomogeneous, ppl_set_coef): Moved...
4267 * graphite-ppl.h: Include double-int.h and tree.h.
4268 (ppl_set_inhomogeneous_gmp, ppl_set_coef_gmp): Declared.
4269 (ppl_set_inhomogeneous, ppl_set_coef): ...here.
4270 (gmp_cst_to_tree): ...here. Reimplemented using mpz_get_double_int.
4271 (tree_int_to_gmp, ppl_set_inhomogeneous_tree, ppl_set_coef_tree): New.
4273 2009-07-09 Sebastian Pop <sebastian.pop@amd.com>
4275 * graphite-clast-to-gimple.c (clast_to_gcc_expression_red): Generate
4276 POINTER_PLUS_EXPR for pointer types.
4277 (clast_to_gcc_expression): Same.
4279 2009-07-09 Sebastian Pop <sebastian.pop@amd.com>
4281 * graphite-poly.c (print_scattering_function): Early return when
4282 PBB_TRANSFORMED_SCATTERING is not initialized.
4283 (print_pbb_domain): Early return when PBB_DOMAIN is not initialized.
4285 2009-07-08 Sebastian Pop <sebastian.pop@amd.com>
4287 * tree-parloops.c (analyze_reduction_list): Remove unused variable
4290 2009-07-08 Razya Ladelsky <razya@il.ibm.com>
4292 * tree-parloops.c (analyze_reduction_list): Change return
4294 (try_create_reduction_list): Move the call to
4295 analyze_reduction_list to the beginining.
4296 Call reduction_phi with analyzed_reductions as argument
4297 instead of reduction_list.
4299 2009-07-08 Tobias Grosser <grosser@fim.uni-passau.de>
4301 * Merge from mainline (r148296:149346)
4303 2009-07-07 Sebastian Pop <sebastian.pop@amd.com>
4305 * graphite-scop-detection.c (graphite_can_represent_init): New.
4306 (graphite_can_represent_scev): Call graphite_can_represent_init:
4307 check that the initial value does not contain multiplications of
4309 (stmt_has_simple_data_refs_p): New.
4310 (stmt_simple_for_scop_p): Call stmt_simple_for_scop_p.
4311 (is_simple_operand): Fix formatting.
4312 * graphite-sese-to-poly.c (try_generate_gimple_bb): Fix formatting.
4314 2009-07-07 Sebastian Pop <sebastian.pop@amd.com>
4316 * gcc.dg/graphite/id-13.c: New.
4317 * graphite-sese-to-poly.c (graphite_stmt_p): Do not call
4318 analyze_scalar_evolution, use scalar_evolution_in_region.
4319 (scan_tree_for_params_right_scev): Add extra assert.
4320 (parameter_index_in_region_1): Split from parameter_index_in_region.
4321 (idx_record_params): Use scalar_evolution_in_region.
4322 (find_params_in_bb): Same.
4323 (find_scop_parameters): Same.
4324 (build_loop_iteration_domains): Same.
4325 (create_linear_expr_from_tree): Same.
4326 * sese.c (scalar_evolution_in_region): New.
4327 * sese.h (scalar_evolution_in_region): Declared.
4328 (defined_in_sese_p): New.
4329 * tree-scalar-evolution.c (compute_overall_effect_of_inner_loop): Not
4331 * tree-scalar-evolution.h (compute_overall_effect_of_inner_loop):
4334 2009-07-07 Sebastian Pop <sebastian.pop@amd.com>
4336 * Makefile.in: Replace dependences on tree-chrec.h with SCEV_H.
4337 TREE_DATA_REF_H also implies SCEV_H.
4339 2009-07-07 Sebastian Pop <sebastian.pop@amd.com>
4341 * graphite-poly.c (print_scop_params): New.
4342 (print_scop): Call print_scop_params.
4343 (debug_scop_params): New.
4344 * graphite-poly.h (print_scop_params, debug_scop_params): Declared.
4346 2009-07-07 Li Feng <nemokingdom@gmail.com>
4348 * gcc.dg/graphite/graphite_autopar/force-parallel-4.c: New.
4349 * gcc.dg/graphite/graphite_autopar/force-parallel-5.c: New.
4350 * gcc.dg/graphite/graphite_autopar/force-parallel-6.c: New.
4351 * gcc.dg/graphite/graphite_autopar/force-parallel-7.c: New.
4352 * gcc.dg/graphite/graphite_autopar/force-parallel-8.c: New.
4353 * gcc.dg/graphite/graphite_autopar/force-parallel-9.c: New.
4355 2009-07-07 Li Feng <nemokingdom@gmail.com>
4357 * graphite-clast-to-gimple.c (mark_loops_parallel): Dump information
4358 for dependency checking part.
4359 * gcc.dg/graphite/graphite_autopar/force-parallel-1.c: Add
4360 tests for dependency checking.
4361 * gcc.dg/graphite/graphite_autopar/force-parallel-2.c: Ditto.
4362 * gcc.dg/graphite/graphite_autopar/force-parallel-3.c: Ditto.
4363 * gcc.dg/graphite/graphite_autopar/graphite_autopar.exp: Add
4364 flag -fdump-tree-graphite-all for autopar testsuites.
4366 2009-07-06 Sebastian Pop <sebastian.pop@amd.com>
4368 * Makefile.in (tree-ssa-loop-manip.o): Depends on langhooks.h.
4369 * tree-parloops.c (rewrite_phi_with_iv, rewrite_all_phi_nodes_with_iv,
4370 canonicalize_loop_ivs): Moved...
4371 * tree-ssa-loop-manip.c: ... here. Include langhooks.h.
4373 2009-07-06 Sebastian Pop <sebastian.pop@amd.com>
4375 * tree-parloops.c (try_create_reduction_list): Pass an extra
4376 argument analyzed_reductions. Call analyze_reduction_list.
4377 (gen_parallel_loop): Do not call analyze_reduction_list.
4378 (parallelize_loops): Init and finalize analyzed_reductions.
4380 2009-07-06 Li Feng <nemokingdom@gmail.com>
4382 * gcc.dg/graphite/graphite_autopar/graphite_autopar.exp:
4383 Added flag -fno-loop-strip-mine for autopar testcase.
4385 2009-07-04 Li Feng <nemokingdom@gmail.com>
4387 * graphite-dependences.c (graphite_carried_dependence_level_k): Use
4388 transformed scattering dimension instead of unmatch orignal when
4389 calling dependence_polyhedron.
4391 2009-06-30 Sebastian Pop <sebastian.pop@amd.com>
4393 * opts.c (decode_options): Enable flag_loop_strip_mine at -O2.
4395 2009-06-30 Sebastian Pop <sebastian.pop@amd.com>
4397 * graphite-poly.c (pbb_number_of_iterations): Check for returned
4398 value 1 from ppl_Pointset_Powerset_NNC_Polyhedron_maximize.
4400 2009-06-30 Sebastian Pop <sebastian.pop@amd.com>
4402 * graphite-blocking.c (pbb_strip_mine_profitable_p): New.
4403 (pbb_do_strip_mine): Call pbb_strip_mine_profitable_p.
4404 * graphite-poly.c (pbb_number_of_iterations): New.
4405 * graphite-poly.h (pbb_number_of_iterations): Declared.
4406 (pbb_iterator_dim, pbb_parameter_dim): New.
4408 2009-06-29 Sebastian Pop <sebastian.pop@amd.com>
4410 * graphite-clast-to-gimple.c (graphite_create_new_loop): Revert the
4411 last commit on type of lower and upper bound of loops.
4413 2009-06-29 Li Feng <nemokingdom@gmail.com>
4415 * Makefile.in (graphite-clast-to-gimple.o): Added dependence on
4416 graphite-dependences.h.
4417 * graphite-clast-to-gimple.c (new_bb_pbb_def): New.
4418 (mark_bb_with_pbb): New.
4419 (get_stmtfor_depth): New.
4420 (find_pbb_via_hash): New.
4421 (dependency_in_loop_p): New.
4422 (mark_loops_parallel): New.
4423 (free_aux_in_new_loops): New.
4424 (translate_clast): Add parameter BB_PBB_MAPPING. Mark newly created
4425 bb with it's relevant pbb. Mark newly created loops. Remove mark
4426 innermost loop parallel without checking.
4427 (gloog): Add parameter BB_PBB_MAPPING.
4428 * graphite-clast-to-gimple.h (struct bb_pbb_def): New.
4429 (gloog): Change declaration.
4430 (mark_loop_parallel): Make extern.
4431 (free_aux_in_new_loops): Declare.
4432 (bb_pbb_map_hash): New.
4433 (eq_bb_pbb_map): New.
4434 * graphite.c (graphite_transform_loops): Added BB_PBB_MAPPING. Trigger
4435 auto parallelization when flag_graphite_force_parallel is set.
4436 (graphite_finalize): Added free_aux_in_new_loops.
4437 * tree-parloops.c (parallelize_loops): Only generate parallel code for
4438 the innermost loop that marked parallel. Use
4439 flag_graphite_force_parallel instead of loop->can_be_parallel.
4440 (loop_parallel_p): Move inner most checking out of function.
4442 2009-06-26 Sebastian Pop <sebastian.pop@amd.com>
4444 * graphite-clast-to-gimple.c (graphite_create_new_loop): Make the
4445 type of lower and upper bound of loops signed long int.
4447 2009-06-26 Sebastian Pop <sebastian.pop@amd.com>
4449 * cfgloopmanip.c (create_empty_loop_on_edge): Gimplify the loop exit
4450 expression outside the loop.
4452 2009-06-26 Sebastian Pop <sebastian.pop@amd.com>
4454 * gcc.dg/graphite/interchange-8.c: New.
4456 2009-06-26 Sebastian Pop <sebastian.pop@amd.com>
4458 * gcc.dg/graphite/interchange-0.c: XFailed.
4459 * gcc.dg/graphite/interchange-5.c: XFailed.
4460 * gcc.dg/graphite/interchange-6.c: XFailed.
4462 2009-06-26 Sebastian Pop <sebastian.pop@amd.com>
4464 * graphite-interchange.c (compute_array_size_poly): The end of the
4465 recursion should return 1.
4467 2009-06-26 Sebastian Pop <sebastian.pop@amd.com>
4469 * graphite-interchange.c (compute_array_size_cstr): Allow the
4470 subscript multiplier to be -1.
4471 (compute_array_size): Use PDR_DATA_CONTAINER and not PDR_ACCESSES.
4472 * graphite-poly.c (new_poly_dr): Takes an extra argument for the
4473 data_container. Initializes PDR_DATA_CONTAINER.
4474 (print_pdr_access_layout): New.
4475 (print_pdr): Call print_pdr_access_layout. Print PDR_DATA_CONTAINER.
4476 * graphite-poly.h (struct poly_dr): Adjust comment. Add a new field
4478 (PDR_DATA_CONTAINER): New.
4479 (new_poly_dr): Update declaration.
4480 * graphite-sese-to-poly.c (pdr_add_data_dimensions): New.
4481 (build_poly_dr): Call pdr_add_data_dimensions.
4483 2009-06-26 Sebastian Pop <sebastian.pop@amd.com>
4485 * graphite-poly.h (struct poly_dr): Fix comment.
4486 * graphite-sese-to-poly.c (pdr_add_alias_set): New.
4487 (pdr_add_memory_accesses): New.
4488 (build_poly_dr): Call pdr_add_memory_accesses and pdr_add_alias_set.
4490 2009-06-26 Sebastian Pop <sebastian.pop@amd.com>
4492 * graphite-poly.c (print_pdrs, debug_pdrs): New.
4493 (print_pbb): Add call to print_pdrs.
4494 * graphite-poly.h (print_pdrs, debug_pdrs): Declared.
4496 2009-06-24 Konrad Trifunovic <konrad.trifunovic@gmail.com>
4497 Li Feng <nemokingdom@gmail.com>
4499 * graphite-dependences.c (graphite_carried_dependence_level_k): New.
4500 (dependency_between_pbbs_p): New.
4501 (lexicographically_gt_p): Assure !empty_p before polyhedron
4502 intersection assign.
4503 (build_lexicographically_gt_constraint): Correct lexicographically
4505 * graphite-dependences.h: New.
4506 * Makefile.in (graphite-dependences.o): Add graphite-dependences.h.
4508 2009-06-24 Sebastian Pop <sebastian.pop@amd.com>
4510 * graphite-clast-to-gimple.c (print_clast_stmt): New.
4511 (gloog): Print to dump_file the generated clast.
4512 * graphite-clast-to-gimple.h (print_clast_stmt): Declared.
4513 * graphite-interchange.c (pbb_do_interchange): Fix dump formatting.
4515 2009-06-24 Sebastian Pop <sebastian.pop@amd.com>
4517 * graphite-poly.c (extend_scattering): Increment
4518 PBB_NB_LOCAL_VARIABLES by the number of added dimensions.
4520 2009-06-24 Sebastian Pop <sebastian.pop@amd.com>
4522 * graphite-interchange.c (compute_array_size_poly): Added exit of
4523 recursion condition. Continue iterating even after the first equality.
4524 (compute_array_size): Same.
4526 2009-06-24 Li Feng <nemokingdom@gmail.com>
4528 * gcc.dg/graphite/graphite_autopar/force-parallel-1.c: Update
4529 -fdump-tree-final_cleanup to -fdump-tree-optimized.
4530 * gcc.dg/graphite/graphite_autopar/force-parallel-2.c: Ditto.
4531 * gcc.dg/graphite/graphite_autopar/force-parallel-3.c: Ditto.
4532 * gcc.dg/graphite/graphite_autopar/graphite_autopar.exp: Ditto.
4534 2009-06-23 Sebastian Pop <sebastian.pop@amd.com>
4536 * sese.c (expand_scalar_variables_stmt): Expand scalar variables
4537 only when the use verifies is_gimple_reg.
4539 2009-06-23 Sebastian Pop <sebastian.pop@amd.com>
4541 * graphite-clast-to-gimple.c (build_cloog_prog): Fix memory corruption.
4542 Allocate scaldims after call to unify_scattering_dimensions.
4544 2009-06-23 Sebastian Pop <sebastian.pop@amd.com>
4546 * graphite-clast-to-gimple.c (translate_clast): Fix memory leak.
4548 2009-06-23 Sebastian Pop <sebastian.pop@amd.com>
4549 Albert Cohen <albert.cohen@inria.fr>
4551 * graphite-blocking.c (pbb_strip_mine_loop_depth): Do not use local
4552 variables for the strip mining.
4554 2009-06-23 Sebastian Pop <sebastian.pop@amd.com>
4555 Pranav Garg <pranav.garg2107@gmail.com>
4557 * Makefile.in (OBJS-common): Added graphite-blocking.o.
4558 (graphite-sese-to-poly.o): Moved down to be in lexicographical order.
4559 (graphite-blocking.o): New rule.
4560 (graphite-poly.o, graphite-ppl.o): Moved to be in lexicographical order.
4561 * graphite-blocking.c: New.
4562 * graphite-poly.c (apply_poly_transforms): Call scop_do_strip_mine for
4563 flag_loop_strip_mine.
4564 (psct_scattering_dim_for_loop_depth): New.
4565 * graphite-poly.h (scop_do_strip_mine): Declared.
4566 (psct_add_local_variable): Increment PBB_NB_LOCAL_VARIABLES.
4567 * tree-ssa-loop.c (gate_graphite_transforms): Do not fail when using
4568 flag_loop_strip_mine.
4570 2009-06-23 Sebastian Pop <sebastian.pop@amd.com>
4572 * graphite-poly.c (extend_scattering): Avoid initializing and freeing
4573 a GMP value and a PPL coefficient at each iteration of a loop.
4575 2009-06-23 Sebastian Pop <sebastian.pop@amd.com>
4577 * graphite-dependences.c (dependence_polyhedron): Do not use
4578 pbb_nb_scattering_dims anymore. Use pbb_nb_scattering_orig and
4579 pbb_nb_scattering_transform.
4580 (graphite_legal_transform_dr): Same.
4581 * graphite-poly.c (extend_scattering): Same.
4582 (unify_scattering_dimensions): Same.
4583 (print_scattering_function): Same.
4584 (new_poly_bb): Initialize PBB_NB_SCATTERING_TRANSFORM and
4585 PBB_NB_LOCAL_VARIABLES.
4586 * graphite-poly.h (pbb_nb_scattering): Removed declaration.
4587 (struct poly_bb): Added nb_local_variables and nb_scattering_transform.
4588 (PBB_NB_LOCAL_VARIABLES, PBB_NB_SCATTERING_TRANSFORM): New.
4589 (pbb_nb_scattering_orig, pbb_nb_scattering_transform): New.
4590 (pbb_nb_scattering_dims, pbb_nb_scattering): Removed.
4591 (pbb_nb_scattering_transform): New.
4592 (pbb_nb_local_vars): Return PBB_NB_LOCAL_VARIABLES.
4593 (psco_scattering_dim): Add assert on parameters.
4594 (psct_scattering_dim): Same.
4595 (psct_scattering_dim_for_loop_depth): Declared.
4596 (psct_local_var_dim): New.
4597 (psco_iterator_dim, psco_parameter_dim): Add assert on parameters.
4598 (psct_iterator_dim, psct_parameter_dim): Same. To maintain the
4599 correct layout, call pbb_nb_local_vars.
4600 (psct_add_local_variable, psct_add_scattering_dimension): New.
4601 * graphite-sese-to-poly.c (build_pbb_scattering_polyhedrons):
4602 Initialize PBB_NB_SCATTERING_TRANSFORM.
4604 2009-06-23 Sebastian Pop <sebastian.pop@amd.com>
4606 * graphite-ppl.c (set_inhomogeneous): Renamed ppl_set_inhomogeneous.
4607 (set_coef): Renamed ppl_set_coef.
4608 * graphite-ppl.h (ppl_set_inhomogeneous, ppl_set_coef): Declared.
4610 2009-06-23 Sebastian Pop <sebastian.pop@amd.com>
4612 * graphite-dependences.c (build_pairwise_scheduling_inequality): Don't
4613 test a boolean against 1.
4614 * graphite-interchange.c (pbb_interchange_loop_depths): Do not build
4615 a new polyhedron for the PBB_TRANSFORMED_SCATTERING.
4616 (pbb_do_interchange): Returns true when a transform has been performed.
4617 (scop_do_interchange): Same.
4618 * graphite-poly.c (apply_poly_transforms): Use the return value of
4619 scop_do_interchange.
4620 * graphite-poly.h (scop_do_interchange): Update declaration.
4622 2009-06-23 Tobias Grosser <grosser@fim.uni-passau.de>
4624 * graphite-clast-to-gimple.c (gloog): Reset loop->aux right
4626 * sese.c (sese_reset_aux_in_loops): New.
4627 * sese.h (sese_reset_aux_in_loops): New.
4629 2009-06-19 Sebastian Pop <sebastian.pop@amd.com>
4631 * graphite-sese-to-poly.c (scan_tree_for_params_int): Pass in the
4632 multiplier and multiply the constant by the multiplier.
4633 (scan_tree_for_params): Bound the multiplier to its MULT_EXPR.
4634 (build_poly_dr): Do not use the multiplier to define the subscript.
4636 2009-06-19 Sebastian Pop <sebastian.pop@amd.com>
4638 * graphite-poly.c (new_poly_dr): Pass an extra argument for the
4639 compiler's data reference. Initialize PDR_CDR.
4640 (print_pdr): Call dump_data_reference.
4641 * graphite-poly.h (struct poly_dr): Rename black_box into pbb.
4642 Add compiler_dr field.
4643 (PDR_BB): Renamed PDR_PBB.
4645 * graphite-sese-to-poly.c (build_poly_dr): Pass to new_poly_dr
4646 GCC's data reference representation.
4647 * tree-data-ref.c (debug_data_references, debug_data_reference): New.
4648 * tree-data-ref.h (debug_data_references, debug_data_reference): Decl.
4650 2009-06-19 Sebastian Pop <sebastian.pop@amd.com>
4652 * graphite-poly.c (print_scattering_function): Also print the layout.
4653 * graphite-poly.h (pbb_nb_local_vars): New.
4655 2009-06-19 Sebastian Pop <sebastian.pop@amd.com>
4657 * graphite-poly.c (print_pbb_domain): Also print the layout names.
4659 2009-06-19 Sebastian Pop <sebastian.pop@amd.com>
4661 * graphite-poly.c (print_pdr, debug_pdr): New.
4662 * graphite-poly.h (print_pdr, debug_pdr): Declared.
4663 (PDR_BASE): Removed.
4665 2009-06-18 Sebastian Pop <sebastian.pop@amd.com>
4667 * gcc.dg/graphite/interchange-{1..7}.c: New avatars of
4670 2009-06-18 Sebastian Pop <sebastian.pop@amd.com>
4672 * graphite-interchange.c (compute_subscript): Allow also -1 in the
4673 subscript identification column.
4674 (pbb_do_interchange): Print to dump_file that some loops "will be
4675 interchanged". Rely on that chain of characters in the testcases.
4676 * gcc.dg/graphite/interchange-0.c: New.
4677 * gcc.dg/graphite/graphite.exp: Iterate over the testsuite
4678 interchange-*.c files and compile them with -floop-interchange.
4680 2009-06-18 Pranav Garg <pranav.garg2107@gmail.com>
4682 * graphite-interchange.c (interchange_profitable_p): Renamed
4683 pbb_interchange_profitable_p.
4685 2009-06-18 Sebastian Pop <sebastian.pop@amd.com>
4686 Harsha Jagasia <harsha.jagasia@amd.com>
4687 Pranav Garg <pranav.garg2107@gmail.com>
4689 * graphite-interchange.c (interchange_profitable_p): Make static.
4690 (pbb_interchange_loop_depths, pbb_do_interchange,
4691 scop_do_interchange): New.
4692 * graphite-poly.c (apply_poly_transforms): Call scop_do_interchange
4693 for flag_loop_interchange.
4694 * graphite-poly.h (scop_do_interchange): Declared.
4695 * tree-ssa-loop.c (gate_graphite_transforms): Do not fail when
4696 flag_loop_interchange is used.
4698 2009-06-18 Sebastian Pop <sebastian.pop@amd.com>
4700 * graphite-dependences.c (dependence_polyhedron): Update use of
4701 pbb_nb_scattering_dims.
4702 * graphite-poly.h (pbb_nb_scattering_dims): Do not pass SCOP.
4703 (pbb_nb_scattering): Update use of pbb_nb_scattering_dims.
4704 (psco_scattering_dim, psct_scattering_dim, psco_iterator_dim,
4705 psct_iterator_dim, psco_parameter_dim, psct_parameter_dim): New.
4707 2009-06-16 Sebastian Pop <sebastian.pop@amd.com>
4709 * graphite.c: Cleanup foo.
4711 2009-06-16 Sebastian Pop <sebastian.pop@amd.com>
4713 * Merge from mainline (r143684:148293).
4714 * Disabled libpcp until it gets fixed.
4716 2009-06-05 Sebastian Pop <sebastian.pop@amd.com>
4717 Harsha Jagasia <harsha.jagasia@amd.com>
4719 * graphite-interchange.c: New.
4720 * Makefile.in (graphite-interchange.o): New.
4721 * graphite-poly.h (interchange_profitable_p): Declared.
4722 * graphite-ppl.h (value_max): New.
4724 2009-06-04 Sebastian Pop <sebastian.pop@amd.com>
4726 * graphite-dependences.c (dependence_polyhedron): Use pdr_dim.
4727 * graphite-poly.h: Fix some comments.
4731 2009-06-04 Sebastian Pop <sebastian.pop@amd.com>
4734 (pdr_accessp_nb_subscripts): Renamed pdr_nb_subscripts.
4735 (pdr_accessp_nb_iterators): Renamed pdr_dim_iter_domain.
4736 (pdr_accessp_nb_params): Renamed pdr_nb_params.
4737 (pdr_accessp_alias_set_dim): Renamed pdr_alias_set_dim.
4738 (pdr_accessp_subscript_dim): Renamed pdr_subscript_dim.
4739 (pdr_accessp_iterator_dim): Renamed pdr_iterator_dim.
4740 (pdr_accessp_param_dim): Renamed pdr_parameter_dim.
4741 (pbb_nb_loops): Renamed pbb_dim_iter_domain.
4742 * graphite-clast-to-gimple.c: Same.
4743 * graphite-dependences.c: Same.
4744 * graphite-poly.c: Same.
4745 * graphite-sese-to-poly.c: Same.
4747 2009-06-03 Sebastian Pop <sebastian.pop@amd.com>
4749 * graphite-clast-to-gimple.c (build_iv_mapping): Insert full
4750 expressions for an IV rename, as returned by clast_to_gcc_expression.
4751 (copy_renames): Rename new_name to expr.
4752 * sese.c (debug_rename_elt): Same.
4755 (sese_adjust_liveout_phis): Call force_gimple_operand before using
4756 the information from the rename map.
4757 (rename_variables_in_stmt): Same.
4758 (add_loop_exit_phis): Rename new_name to expr.
4759 (insert_loop_close_phis): Same.
4760 (add_guard_exit_phis): Same. Call force_gimple_operand.
4761 * sese.h (struct rename_map_elt): Rename new_name to expr.
4762 (new_rename_map_elt): Same.
4764 2009-06-03 Sebastian Pop <sebastian.pop@amd.com>
4766 * graphite-clast-to-gimple.c (build_iv_mapping): Use set_rename.
4767 * sese.c (set_rename): Make it extern.
4768 * sese.h (set_rename): Declared.
4770 2009-06-03 Sebastian Pop <sebastian.pop@amd.com>
4772 * graphite-poly.c (extend_scattering): Free values.
4773 * graphite-ppl.c (new_Cloog_Domain_from_ppl_Pointset_Powerset):
4775 (ppl_print_powerset_matrix): Same.
4776 * graphite-scop-detection.c (free_scops_1): New.
4777 (limit_scops): Call free_scops_1.
4778 * graphite-sese-to-poly.c (build_scop_bbs_1): Free dom.
4779 (build_poly_dr): Free PPL coefficients.
4780 * tree-parloops.c (rewrite_all_phi_nodes_with_iv): Free bbs.
4782 2009-06-02 Sebastian Pop <sebastian.pop@amd.com>
4784 * graphite-dependences.c: New.
4785 * graphite-data-ref.c: Removed.
4786 * graphite-data-ref.h: Removed.
4787 * Makefile.in (graphite-data-ref.o): Removed.
4788 (graphite-dependences.o): Added.
4789 * graphite-clast-to-gimple.c: Remove dependence on graphite-data-ref.h.
4790 * graphite-poly.c: Same.
4791 Move the data dependence testing to graphite-dependences.c.
4793 2009-05-19 Tobias Grosser <grosser@fim.uni-passau.de>
4795 * graphite-scop-detection.c (graphite_can_represent_loop): Renamed
4796 from graphite_cannot_represent_loop. Code refactored.
4797 (scopdet_basic_block_info): Call graphite_can_represent_loop.
4799 2009-05-17 Li Feng <nemokingdom@gmail.com>
4801 * gcc.dg/graphite/graphite_autopar/graphite_autopar.exp:
4802 Cover all the testcases (not only the filtered ones).
4804 2009-05-17 Tobias Grosser <grosser@fim.uni-passau.de>
4806 * graphite-scop-detection.c (stmt_simple_for_scop_p): Remove
4807 unnecessary check. Update comments. Move check for REAL_TYPE here.
4808 (harmful_stmt_in_bb): Remove checks for conditions. This is already
4809 done in (stmt_simple_for_scop_p).
4811 2009-05-14 Tobias Grosser <grosser@fim.uni-passau.de>
4813 * graphite.c (print_global_statistics): New.
4814 (print_graphite_scop_statistic): New.
4815 (print_graphite_statistics): New.
4816 (graphite_initialize, graphite_transform_loops): Print statistics.
4817 * graphite-scop-detection (build_scops): Print statistics.
4818 (print_graphite_scop_statistics): New.
4819 (print_graphite_statistics): New.
4821 2009-05-13 Sebastian Pop <sebastian.pop@amd.com>
4823 * graphite-clast-to-gimple.c (struct clast_name_index): Removed.
4824 (debug_clast_name_index): Removed.
4825 (debug_clast_name_indexes_1): Removed.
4826 (debug_clast_name_indexes): Removed.
4827 (clast_name_index_elt_info): Removed.
4828 (eq_clast_name_indexes): Removed.
4829 (clast_name_to_index): Removed.
4830 (new_clast_name_index): Removed.
4831 (save_clast_name_index): Removed.
4832 (save_var_name): Moved...
4833 (init_sese_params_index): Removed.
4834 (clast_name_to_gcc): Remove use of name_tree.
4835 (initialize_cloog_names): Same.
4836 (gloog): Do not call init_sese_params_index.
4837 * graphite-sese-to-poly.c (save_var_name): ...here.
4838 (parameter_index_in_region): New.
4839 * sese.c (new_sese): Initialize SESE_PARAMS_NAMES.
4840 (parameter_index_in_region): Removed.
4841 (is_parameter): Remove use of name_tree.
4842 * sese.h (struct name_tree): Removed.
4843 (struct sese): Remove use of name_tree. New field params_names.
4844 (SESE_PARAMS_NAMES): New.
4845 (SESE_PARAMS): Remove duplicate.
4846 (parameter_index_in_region): Removed.
4847 (sese_nb_params): Remove use of name_tree.
4848 (struct clast_name_index): New.
4849 (new_clast_name_index): New.
4850 (clast_name_to_index): New.
4851 (save_clast_name_index): New.
4852 (debug_clast_name_index): New.
4853 (debug_clast_name_indexes_1): New.
4854 (debug_clast_name_indexes): New.
4855 (clast_name_index_elt_info): New.
4856 (eq_clast_name_indexes): New.
4858 2009-05-13 Sebastian Pop <sebastian.pop@amd.com>
4860 * graphite-clast-to-gimple.c (compute_cloog_iv_types_1): Call
4861 pbb_to_depth_to_oldiv. Remove call to oldiv_for_loop.
4862 (graphite_loop_normal_form): Do not pass region. Do not
4863 initialize SESE_OLDIVS.
4864 (build_graphite_loop_normal_form): Update call to
4865 graphite_loop_normal_form.
4866 * sese.c (debug_oldivs): Removed.
4867 (new_sese): Do not initialize SESE_OLDIVS.
4868 (free_sese): Do not free SESE_OLDIVS.
4869 (oldiv_for_loop): Removed.
4870 * sese.h (struct sese): Remove old_ivs.
4871 (SESE_OLDIVS): Removed.
4872 (oldiv_for_loop): Removed.
4874 2009-05-13 Sebastian Pop <sebastian.pop@amd.com>
4876 * graphite-clast-to-gimple.c (clast_name_to_gcc): Pass newivs,
4877 remove ivstack. Remove call to loop_iv_stack_get_iv_from_name,
4878 replaced by a call to newivs_to_depth_to_newiv.
4879 (clast_to_gcc_expression): Pass newivs, remove ivstack.
4880 (clast_to_gcc_expression_red): Same.
4881 (gcc_type_for_clast_expr): Same.
4882 (gcc_type_for_clast_eq): Same.
4883 (graphite_translate_clast_equation): Same.
4884 (graphite_create_guard_cond_expr): Same.
4885 (graphite_create_new_guard): Same.
4886 (graphite_create_new_loop): Same.
4887 (build_iv_mapping): Same.
4888 (translate_clast): Same.
4890 (loop_iv_stack_patch_for_consts): Removed. *
4891 sese.c (iv_stack_entry_is_constant): Removed.
4892 (iv_stack_entry_is_iv): Removed.
4893 (loop_iv_stack_push_iv): Removed.
4894 (loop_iv_stack_insert_constant): Removed.
4895 (loop_iv_stack_pop): Removed.
4896 (loop_iv_stack_get_iv): Removed.
4897 (loop_iv_stack_get_iv_from_name): Removed.
4898 (debug_loop_iv_stack): Removed.
4899 (free_loop_iv_stack): Removed.
4900 (loop_iv_stack_remove_constants): Removed. *
4901 sese.h (iv_stack_entry_kind): Removed.
4902 (iv_stack_entry_data_union): Removed.
4903 (iv_stack_entry_struct): Removed.
4904 (iv_stack_entry_p): Removed.
4905 (debug_oldivs, debug_loop_iv_stack, loop_iv_stack_insert_constant,
4906 loop_iv_stack_get_iv_from_name, loop_iv_stack_push_iv,
4907 loop_iv_stack_get_iv, loop_iv_stack_remove_constants,
4908 loop_iv_stack_pop, free_loop_iv_stack): Removed.
4909 (gbb_loop_at_index): Fix indenting.
4910 (gbb_loop_index): Removed.
4912 2009-05-13 Sebastian Pop <sebastian.pop@amd.com>
4914 * graphite-clast-to-gimple.c (clast_name_to_gcc): Do not use strcmp.
4915 Call clast_name_to_index.
4917 2009-05-13 Sebastian Pop <sebastian.pop@amd.com>
4919 * graphite-clast-to-gimple.c (clast_name_to_gcc): Pass region,
4920 do not pass params. Get params from SESE_PARAMS.
4921 (clast_to_gcc_expression): Same.
4922 (clast_to_gcc_expression_red): Same.
4923 (gcc_type_for_clast_eq): Same.
4924 (graphite_translate_clast_equation): Same.
4925 (graphite_create_new_loop): Same.
4926 * sese.c (rename_variables_in_stmt): Fix comment.
4928 2009-05-13 Sebastian Pop <sebastian.pop@amd.com>
4930 * graphite-clast-to-gimple.c (graphite_create_new_loop): Pass
4932 Call save_clast_name_index.
4933 (translate_clast): Pass newivs_index.
4934 (gloog): Create and free newivs_index.
4936 2009-05-13 Sebastian Pop <sebastian.pop@amd.com>
4938 * graphite-clast-to-gimple.c (clast_name_index): New structure.
4939 (clast_name_index_p): New type.
4940 (debug_clast_name_index): New.
4941 (debug_clast_name_indexes_1): New.
4942 (debug_clast_name_indexes): New.
4943 (clast_name_index_elt_info): New.
4944 (eq_clast_name_indexes): New.
4945 (clast_name_to_index): New.
4946 (new_clast_name_index): New.
4947 (save_clast_name_index): New.
4948 (init_sese_params_index): New.
4949 (gloog): Call init_sese_params_index.
4950 * graphite-clast-to-gimple.h (debug_clast_name_indexes): Declared.
4951 * sese.c (new_sese): Initialize SESE_PARAMS_INDEX.
4952 (free_sese): Free SESE_PARAMS_INDEX.
4953 * sese.h (struct sese): Add params_index.
4954 (SESE_PARAMS_INDEX): New.
4956 2009-05-13 Sebastian Pop <sebastian.pop@amd.com>
4958 * graphite-clast-to-gimple.c (newivs_to_depth_to_newiv): New.
4959 (graphite_create_new_loop): Pass the newivs vector. Push the
4960 newly created IV to newivs.
4961 (translate_clast): Pass the newivs vector.
4962 (gloog): Create and destroy the newivs vector.
4964 2009-05-13 Sebastian Pop <sebastian.pop@amd.com>
4966 * graphite-clast-to-gimple.c (pbb_to_depth_to_oldiv): New.
4967 (graphite_loop_normal_form): Initialize loop->aux with the unique
4968 IV that has been created.
4970 2009-05-13 Tobias Grosser <grosser@fim.uni-passau.de>
4972 * tree-chrec.c (evolution_function_right_is_integer_cst): Allow
4973 scev with parameters in the base part. They where forbidden
4976 2009-05-11 Li Feng <nemokingdom@gmail.com>
4978 * gcc.dg/graphite/graphite.exp: Set different default
4979 compile options by file names.
4980 * gcc.dg/graphite/block{0-6}.c: Remove dg-option line.
4981 * gcc.dg/graphite/id-{1-9}.c: Ditto.
4982 * gcc.dg/graphite/scop-{0-20}.c: Ditto.
4983 * gcc.dg/graphite/scop-matmult.c: Ditto.
4985 2009-05-08 Li Feng <nemokingdom@gmail.com>
4987 * gcc.dg/graphite/graphite_autopar/graphite_autopar.exp: New.
4988 * gcc.dg/graphite/graphite_autopar/force-parallel-1.c: New.
4989 * gcc.dg/graphite/graphite_autopar/force-parallel-2.c: New.
4990 * gcc.dg/graphite/graphite_autopar/force-parallel-3.c: New.
4992 2009-05-07 Tobias Grosser <grosser@fim.uni-passau.de>
4994 * graphite-scop-detection (build_scops_1): Fix little bug introduced
4997 2009-05-07 Tobias Grosser <grosser@fim.uni-passau.de>
4999 * graphite-scop-detection.c (graphite_can_represent_scev): Only
5000 allow integer constant strides.
5001 (graphite_can_represent_expr): Depend on outermost_loop.
5002 (stmt_simple_memref_p, graphite_cannot_represent_loop,
5003 harmful_stmt_in_bb, is_simple_operand, stmt_simple_for_scop_p,
5004 build_scops_1): Same.
5005 (scopdet_basic_block_info): Same and insert layered SCoP
5007 (try_generate_gimple_bb): Cleanup.
5008 (build_scops): Enable data references.
5010 * gcc.dg/graphite/id-5.c: New.
5011 * gcc.dg/graphite/id-9.c: New.
5012 * tree-chrec.c (evolution_function_right_is_integer_cst): New.
5013 * tree-chrec.h (evolution_function_right_is_integer_cst): New.
5015 2009-05-06 Tobias Grosser <grosser@fim.uni-passau.de>
5017 * sese.c (expand_scalar_variables_ssa_name): Only build expressions,
5018 that we have not yet built for this SCoP.
5020 2009-05-06 Tobias Grosser <grosser@fim.uni-passau.de>
5022 * sese.c (expand_scalar_variables_expr): Fix expand_scalar_variables
5023 for complex numbers.
5025 2009-05-06 Tobias Grosser <grosser@fim.uni-passau.de>
5027 * graphite-ppl.c: Fix build if cloog is not available.
5029 2009-05-04 Li Feng <nemokingdom@gmail.com>
5031 * tree-parloops.c (loop_parallel_p): Remove construction of
5032 NITER and REDUCTION_LIST.
5033 (try_get_loop_niter): New.
5034 (try_create_reduction_list): New.
5035 (parallelize_loops): Bypass the failed checkings in autopar
5036 when can_be_parallel in loop structure is set to true.
5038 2009-05-01 Tobias Grosser <grosser@fim.uni-passau.de>
5040 * gcc.dg/graphite/id-6.c: Update testcase.
5041 * gcc.dg/graphite/scop-3.c: Dito.
5043 2009-05-01 Tobias Grosser <grosser@fim.uni-passau.de>
5045 * graphite-scop-detection.c (stmt_simple_for_scop_p):
5046 Enable EQ_EXPR and NE_EXPR again.
5048 2009-04-30 Tobias Grosser <grosser@fim.uni-passau.de>
5050 * graphite-scop-detection.c (graphite_can_represent_scev):
5051 Add check if scev is affine multivariate.
5052 (harmful_stmt_in_bb): Check if we can represent the conditions.
5053 (scopdet_basic_block_info (basic_block bb, VEC): Pass the loop to
5055 * gcc.dg/graphite/id-7.c: New.
5057 2009-04-30 Tobias Grosser <grosser@fim.uni-passau.de>
5059 * graphite-sese-to-poly.c (bb_contains_non_iv_scalar_phi_nodes):
5060 Check all bbs in region, not only the bbs that are represented in
5062 (build_poly_scop): Add newline.
5063 * gcc.dg/graphite/id-8.c: New.
5065 2009-04-30 Li Feng <nemokingdom@gmail.com>
5067 * cfgloop.c (alloc_loop): Initialize can_be_parallel to false
5068 when loop initialize.
5069 * cfgloop.h (struct loop): Introduce flag can_be_parallel.
5070 * common.opt: Declare flag_graphite_force_parallel.
5071 * graphite-clast-to-gimple.c (translate_clast): Mark the innermost
5073 * graphite-poly.c (apply_poly_transforms): Introduce
5074 flag_graphite_force_parallel.
5075 * tree-ssa-loop.c (gate_graphite_transforms): ditto.
5076 * toplev.c (process_options): ditto and replace a not correctly
5079 2009-04-30 Li Feng <nemokingdom@gmail.com>
5081 * graphite-clast-to-gimple.c (loop_iv_stack_patch_for_consts):
5082 Change the call of gbb_loop_at_index and/or gbb_loop_index due
5083 to the redefinition.
5084 (compute_cloog_iv_types_1): ditto.
5085 (build_iv_mapping): ditto.
5086 * graphite-sese-to-poly.c (new_gimple_bb): Remove GBB_LOOPS related
5088 (free_gimple_bb): Removed GBB_LOOPS related free part.
5089 (build_bb_loops): Removed.
5090 * sese.h (struct gimple_bb): Removed loops.
5091 (GBB_LOOPS): Removed.
5092 (gbb_loop_at_index): Instead of using GBB_LOOPS, we use sese instead.
5093 (gbb_loop_index): ditto.
5095 2009-04-24 Tobias Grosser <grosser@fim.uni-passau.de>
5097 * graphite-scop-detection.c (graphite_can_represent_scev): Do not
5098 allow non constant strides.
5099 * gcc.dg/graphite/scop-20.c: New.
5101 2009-04-24 Sebastian Pop <sebastian.pop@amd.com>
5103 * graphite-scop-detection.c (dot_all_scops): Fix system call
5104 return value warning.
5107 2009-04-24 Sebastian Pop <sebastian.pop@amd.com>
5109 * gcc.dg/graphite/id-6.c: Fix pattern.
5110 * gcc.dg/graphite/scop-3.c: Same.
5112 2009-04-24 Sebastian Pop <sebastian.pop@amd.com>
5114 * graphite-poly.c (map_into_dep_poly, map_dr_into_dep_poly,
5115 build_pairwise_constraint, dr_equality_constraints,
5116 build_pairwise_scheduling_equality,
5117 build_pairwise_scheduling_inequality, lexicographically_gt_p,
5118 build_lexicographically_gt_constraint, dependence_polyhedron,
5119 graphite_legal_transform_dr, graphite_legal_transform_bb,
5120 graphite_legal_transform): New.
5121 * graphite-poly.h (graphite_legal_transform): Declared.
5122 * graphite-sese-to-poly.c (build_poly_scop): Call to
5123 graphite_legal_transform is disabled for the moment.
5125 2009-04-24 Sebastian Pop <sebastian.pop@amd.com>
5127 * graphite-poly.h (pbb_nb_scattering_dims): New.
5128 (pbb_nb_scattering): Use it.
5130 2009-04-24 Sebastian Pop <sebastian.pop@amd.com>
5132 * graphite-ppl.c (ppl_insert_dimensions_pointset): Add
5133 Pointset_Powerset version of ppl_insert_dimensions.
5134 * graphite-ppl.h (ppl_insert_dimensions_pointset): Declared.
5136 2009-04-24 Sebastian Pop <sebastian.pop@amd.com>
5138 * graphite-ppl.c (ppl_insert_dimensions): Fix formatting.
5140 2009-04-24 Sebastian Pop <sebastian.pop@amd.com>
5142 * graphite-poly.h: Fix comment.
5144 2009-04-24 Sebastian Pop <sebastian.pop@amd.com>
5146 * graphite-sese-to-poly.c (build_poly_dr): Fix data ref multiplier.
5148 2009-04-24 Tobias Grosser <grosser@fim.uni-passau.de>
5150 * sese.c (expand_scalar_variables_stmt): Only iterate over the old
5153 2009-04-24 Tobias Grosser <grosser@fim.uni-passau.de>
5155 * graphite-sese-to-poly.c (var_used_in_not_loop_header_phi_node): New.
5156 (graphite_stmt_p): Represent bbs necessary to build the phi nodes of
5159 2009-04-20 Sebastian Pop <sebastian.pop@amd.com>
5161 * graphite-scop-detection.c (stmt_simple_for_scop_p): Do not
5162 handle EQ_EXPR and NE_EXPR.
5164 2009-04-17 Tobias Grosser <grosser@fim.uni-passau.de>
5166 * graphite-poly.h (poly_dr): Fix comment.
5168 2009-04-09 Sebastian Pop <sebastian.pop@amd.com>
5169 Tobias Grosser <grosser@fim.uni-passau.de>
5171 * graphite-poly.c (new_poly_bb): Do not initialize PBB_DOMAIN
5172 with a zero dimension polyhedron.
5173 (find_scop_parameters): Move the call to scop_set_nb_params here.
5174 (build_loop_iteration_domains): Store in loop->aux the iteration
5176 (build_scop_iteration_domain): Fix PBB_DOMAIN for bbs not surrounded
5177 by any loop in scop.
5178 (build_poly_scop): Do not call scop_set_nb_params.
5180 2009-04-09 Sebastian Pop <sebastian.pop@amd.com>
5181 Tobias Grosser <grosser@fim.uni-passau.de>
5183 * graphite-sese-to-poly.c (add_condition_to_pbb): Pass code to
5184 add_condition_to_domain not GT_EXPR.
5186 2009-04-09 Tobias Grosser <grosser@fim.uni-passau.de>
5188 * graphite-ppl.c (debug_ppl_powerset_matrix): New.
5189 * graphite-ppl.h (debug_ppl_powerset_matrix): New.
5190 * graphite-sese-to-poly.c (add_condition_to_pbb): Use
5191 upper_bound_assign to calculate unions.
5192 * gcc.dg/graphite/id-6.c: New.
5194 2009-04-09 Tobias Grosser <grosser@fim.uni-passau.de>
5196 * graphite-scop-detection.c (canonicalize_loop_closed_ssa): Do not
5197 handle abnormal edges.
5199 2009-04-09 Tobias Grosser <grosser@fim.uni-passau.de>
5201 * graphite-poly.c (new_poly_dr, free_poly_dr): New.
5202 (free_poly_bb): Also free poly_drs.
5203 * graphite-poly.h (new_poly_dr, free_poly_dr): New.
5204 (poly_dr): Polyhedron to Pointset_Powerset.
5205 (pdr_accessp_nb_subscripts): Same.
5206 * graphite-sese-to-poly.c (build_poly_dr): Same. And actually build
5209 2009-04-08 Sebastian Pop <sebastian.pop@amd.com>
5211 * graphite-clast-to-gimple.c (initialize_cloog_names): Change cloog
5212 names into more meaningful names.
5214 2009-04-08 Sebastian Pop <sebastian.pop@amd.com>
5216 * gfortran.dg/graphite/interchange-1.c: New.
5217 * gfortran.dg/graphite/interchange-2.c: New.
5219 2009-04-08 Sebastian Pop <sebastian.pop@amd.com>
5221 * graphite-clast-to-gimple.c (graphite_loop_normal_form): Do not build
5223 * tree-parloops.c (rewrite_phi_with_iv): New.
5224 (rewrite_all_phi_nodes_with_iv): New.
5225 (canonicalize_loop_ivs): Call them.
5227 2009-04-08 Sebastian Pop <sebastian.pop@amd.com>
5229 * graphite-sese-to-poly.c (try_generate_gimple_bb): Use
5230 graphite_find_data_references_in_stmt.
5231 * tree-data-ref.c (graphite_find_data_references_in_stmt): New.
5232 * tree-data-ref.h (graphite_find_data_references_in_stmt): Declared.
5234 2009-04-08 Sebastian Pop <sebastian.pop@amd.com>
5236 * sese.c (add_loop_exit_phis): Don't fail on non SSA_NAME renames.
5238 2009-04-08 Sebastian Pop <sebastian.pop@amd.com>
5240 * graphite-sese-to-poly.c (build_scop_bbs_1): Use bb_in_sese_p
5241 instead of bb_in_region.
5242 (flag_bb_in_region): Same. Renamed flag_bb_in_sese.
5243 (build_sese_conditions): Use flag_bb_in_sese.
5244 * sese.c (register_bb_in_sese): Removed.
5245 (new_sese): Remove initialization of SESE_REGION_BBS.
5246 (free_sese): Do not free SESE_REGION_BBS.
5247 * sese.h (struct sese): Remove field region_basic_blocks.
5248 (SESE_REGION_BBS): Removed.
5249 (bb_in_sese_p): Implement in function of bb_in_region.
5251 2009-04-08 Sebastian Pop <sebastian.pop@amd.com>
5253 * graphite-scop-detection.c (limit_scops): Deal only with single exit
5256 2009-04-08 Tobias Grosser <grosser@fim.uni-passau.de>
5258 * graphite-scop-detection.c (stmt_simple_for_scop_p): Allow NE_EXPR
5260 * graphite-sese-to-poly.c (create_linear_expr_from_tree): New.
5261 (add_condition_to_domain): New.
5262 (add_condition_to_pbb): New.
5263 (add_conditions_to_domain): Cleanup and handle of NE_EXPR and EQ_EXPR.
5264 * gcc.dg/graphite/scop-3.c: Update number of detected SCoPs.
5266 2009-04-08 Tobias Grosser <grosser@fim.uni-passau.de>
5268 * graphite-clast-to-gimple.c (build_cloog_prog): ppl_Polyhedron ->
5269 ppl_Pointset_Powerset.
5270 * graphite-poly.c (new_poly_bb, free_poly_bb): Same.
5271 * graphite-poly.h (poly_bb): poly_bb.domain Same.
5272 (pbb_nb_loops): Same.
5273 * graphite-sese-to-poly.c (build_loop_iteration_domains,
5274 add_conditions_to_domain): Same.
5275 * graphite-ppl.c (new_Cloog_Domain_from_ppl_Pointset_Powerset): New.
5276 (ppl_print_polyhedron_matrix): ppl_Polyhedron_t ->
5277 ppl_const_Polyhedron_t.
5278 (ppl_print_powerset_matrix): New.
5279 * graphite-ppl.h (new_Cloog_Domain_from_ppl_Pointset_Powerset,
5280 ppl_print_powerset_matrix): New.
5281 (ppl_print_polyhedron_matrix): Updated.
5283 2009-04-07 Sebastian Pop <sebastian.pop@amd.com>
5285 * tree-scalar-evolution.c (analyze_scalar_evolution_1): Fix comment.
5287 2009-04-07 Sebastian Pop <sebastian.pop@amd.com>
5289 * graphite-poly.c (extend_scattering): Fix indenting. Free cstr.
5290 (print_iteration_domains, debug_iteration_domain,
5291 debug_iteration_domains): New.
5292 * graphite-poly.h (print_iteration_domains, debug_iteration_domain,
5293 debug_iteration_domains): Declared.
5294 * graphite-sese-to-poly.c (build_pbb_scattering_polyhedrons): Fix
5297 2009-04-03 Tobias Grosser <grosser@fim.uni-passau.de>
5298 Sebastian Pop <sebastian.pop@amd.com>
5300 * graphite-poly.h (print_iteration_domain): New.
5301 * graphite-sese-to-poly.c (add_conditions_to_domain): Fixed bug.
5302 (build_sese_conditions_1, build_sese_conditions_after,
5303 build_sese_conditions_before): New.
5304 (build_sese_conditions): Rewritten.
5306 2009-04-03 Sebastian Pop <sebastian.pop@amd.com>
5307 Tobias Grosser <grosser@fim.uni-passau.de>
5309 Cleanup of code generation liveouts.
5310 * graphite-clast-to-gimple.c (translate_clast): Use a single
5311 rename_map instead of one per translated statement.
5312 Do not use SESE_LIVEOUT_RENAMES.
5313 (graphite_loop_normal_form): Do not use SESE_REDUCTION_LIST.
5314 (gloog): Do not use SESE_LIVEOUT_RENAMES.
5315 * graphite-scop-detection.c (harmful_stmt_in_bb): Return the close
5316 phi node of a reduction: when a loop contains a reduction used outside
5317 the loop, there should be a scalar close phi node on the exit block.
5318 * sese.c (new_sese): Do not initialize SESE_LIVEOUT,
5319 SESE_LIVEOUT_RENAMES, and SESE_REDUCTION_LIST.
5320 (free_sese): Do not free them.
5321 (sese_build_liveouts_use): Do not use them.
5322 (sese_build_liveouts_bb): Same.
5323 (sese_build_liveouts): Same.
5324 (sese_insert_phis_for_liveouts): Same.
5325 (sese_adjust_phis_for_liveouts): Same. Renamed sese_adjust_liveout_phis.
5326 (defined_in_loop_p): New.
5327 (alive_after_loop): New.
5328 (close_phi_not_yet_inserted_p): New.
5329 (struct alep, alep_p): New.
5330 (add_loop_exit_phis): Remove from the rename_map all the names defined
5331 in the code generated loop.
5332 (insert_loop_close_phis): Traverse the rename_map passed to it.
5333 Don't use SESE_LIVEOUT_RENAMES.
5334 (default_liveout_before_guard): Renamed default_before_guard.
5335 (insert_guard_phis): Do not use SESE_LIVEOUT_RENAMES.
5336 (graphite_copy_stmts_from_block): Do not directly call set_rename.
5337 (register_sese_liveout_renames): Removed.
5338 (copy_bb_and_scalar_dependences): Do not call it.
5339 * sese.h (struct sese): Removed fields: liveout, liveout_renames, and
5341 (SESE_LIVEOUT): Removed.
5342 (SESE_LIVEOUT_RENAMES): Removed.
5343 (SESE_REDUCTION_LIST): Removed.
5344 (sese_build_liveouts): Removed.
5345 (sese_adjust_phis_for_liveouts): Renamed sese_adjust_liveout_phis.
5346 (insert_loop_close_phis): Pass a htab_t instead of a sese.
5347 (insert_guard_phis): Same.
5348 (rename_map_elt): Declare a VEC of them.
5349 * tree-parloops.c (canonicalize_loop_ivs): reduction_list contains
5350 trees not pointers to trees.
5352 Rewrite in canonical close SSA form:
5353 * graphite-scop-detection.c (contains_only_close_phi_nodes): New.
5354 (limit_scops): Close the scop after the block containing the close phi
5356 (canonicalize_loop_closed_ssa): New.
5357 (canonicalize_loop_closed_ssa_form): New.
5358 (build_scops): Call canonicalize_loop_closed_ssa_form.
5360 * graphite-sese-to-poly.c: Fix typos.
5362 2009-04-03 Sebastian Pop <sebastian.pop@amd.com>
5364 * graphite-poly.c (print_scattering_function, print_pbb_domain):
5366 (dump_gbb_conditions, dump_gbb_cases, print_iteration_domain): New.
5367 (print_pbb): Add conditions.
5369 2009-04-01 Tobias Grosser <grosser@fim.uni-passau.de>
5370 Sebastian Pop <sebastian.pop@amd.com>
5372 * graphite-scop-detection.c (bb_in_sd_region): Use bb_in_region.
5373 * graphite-sese-to-poly.c (all_non_dominated_preds_marked_p): New.
5374 (build_scop_bbs_1): New.
5375 (build_scop_bbs): Rewrite.
5376 * sese.h (bb_in_region): New.
5378 2009-03-29 Tobias Grosser <grosser@fim.uni-passau.de>
5380 * graphite-poly.c (new_poly_bb, free_poly_bb): Initialize/free
5382 (print_scop): Style.
5383 * graphite-poly.h (poly_bb): Add drs vector.
5384 (PBB_DRS): Add accessor.
5385 * graphite-sese-to-poly.c (build_poly_dr): New.
5386 (build_pbb_drs, build_scop_drs): New.
5387 (build_poly_scop): call build_scop_drs (Disabled at the moment).
5389 2009-03-29 Tobias Grosser <grosser@fim.uni-passau.de>
5391 * tree-ssa-loop.c: Include forgotten toplev.h
5393 2009-03-29 Tobias Grosser <grosser@fim.uni-passau.de>
5395 * graphite-poly.c: (apply_poly_transforms): sorry -> gcc_unreachable.
5396 * gcc.dg/graphite/pr37883.c: Remove -floop-*
5397 * gcc.dg/graphite/pr37928.c: Same
5398 * gcc.dg/graphite/pr38409.c: Same
5399 * gcc.dg/graphite/pr38498.c: Same
5400 * gcc.dg/graphite/pr38559.c: Same
5401 * gcc.dg/graphite/pr39335.c: Same
5402 * gcc.dg/graphite/pr39335_1.c: Same
5403 * gfortran.dg/graphite/block-2.f: Same
5404 * tree-ssa-loop.c (gate_graphite_transforms): Always fail if called
5407 2009-03-28 Tobias Grosser <grosser@fim.uni-passau.de>
5409 * graphite-sese-to-poly.c (ref_nb_loops, build_access_matrix_with_af,
5410 build_access_matrix, build_scop_data_accesses): Remove access function
5411 building. (We get a new version soon).
5412 (build_bb_loops, scan_tree_for_params_right_scev): Update.
5413 * sese.h (nb_loops_around_loop_in_sese): Remove.
5414 (sese_loop_depth): Do not use SESE_LOOP_NEST any more.
5416 2009-03-27 Tobias Grosser <grosser@fim.uni-passau.de>
5417 Sebastian Pop <sebastian.pop@amd.com>
5419 * graphite-scop-detection.c (struct scopdet_info): Rename last
5421 (scopdet_basic_block_info, build_scops_1): Don't use
5422 CDI_POST_DOMINATORS. CDI_POST_DOMINATORS should never be used.
5424 2009-03-26 Tobias Grosser <grosser@fim.uni-passau.de>
5425 Sebastian Pop <sebastian.pop@amd.com>
5427 * graphite-clast-to-gimple.c (gloog): Call sese_build_liveouts.
5428 * sese.c (sese_build_liveouts_use): Renamed from
5429 sese_build_livein_liveouts_use. Remove liveins.
5430 (sese_build_liveouts_bb): Renamed from sese_build_livein_liveouts_bb.
5431 Call sese_build_liveouts_use.
5432 (sese_build_liveouts): Renamed from sese_build_livein_liveouts.
5433 Call sese_build_liveouts_bb.
5434 (new_sese, free_sese): Remove liveins.
5435 (sese_add_exit_phis_var): Deleted.
5436 (sese_insert_phis_for_liveouts): Call sese_add_exit_phis_edge
5438 (graphite_copy_stmts_from_block): Remove SESE_NUM_VER.
5440 * sese.h (sese): Remove num_ver and livein.
5441 (SESE_LIVEIN, SESE_LIVEIN_VER, SESE_NUM_VER): Removed.
5443 2009-03-25 Tobias Grosser <grosser@fim.uni-passau.de>
5445 * graphite-sese-to-poly.c (build_scop_scattering): Fix compile.
5447 2009-03-25 Tobias Grosser <grosser@fim.uni-passau.de>
5449 * graphite-sese-to-poly.c (compare_prefix_loops): Removed.
5450 (build_scop_scattering): Do not use compare_prefix_loops any more.
5451 (nb_common_loops): New.
5453 2009-03-24 Sebastian Pop <sebastian.pop@amd.com>
5455 * sese.c (get_new_name_from_old_name): Renamed get_rename.
5456 (register_old_and_new_names): Renamed set_rename.
5458 2009-03-24 Sebastian Pop <sebastian.pop@amd.com>
5460 * graphite-scop-detection.h (nb_reductions_in_loop): Revert removal
5461 of the decl from the previous commit.
5463 2009-03-24 Sebastian Pop <sebastian.pop@amd.com>
5465 * graphite-scop-detection.c (dot_scop): New.
5466 * graphite-scop-detection.h (dot_scop): Declared.
5468 2009-03-24 Sebastian Pop <sebastian.pop@amd.com>
5470 * graphite-sese-to-poly.c (compare_prefix_loops): Fix compare.
5472 2009-03-24 Sebastian Pop <sebastian.pop@amd.com>
5474 * cfgloopmanip.c (create_empty_loop_on_edge): Generate the loop exit
5475 condition at the end of the loop.
5476 * graphite.c (graphite_initialize, graphite_finalize): Print to
5477 dump_file the compiled function.
5478 * graphite-clast-to-gimple.c (graphite_create_new_loop): Update use
5479 of create_empty_loop_on_edge.
5480 (translate_clast): Update the code generation of loops for the new
5482 * cfgloop.h (create_empty_loop_on_edge): Update declaration.
5484 2009-03-24 Sebastian Pop <sebastian.pop@amd.com>
5486 Reverted the patch from 2009-03-19.
5488 2009-03-19 Tobias Grosser <grosser@fim.uni-passau.de>
5490 * graphite-poly.c (new_poly_bb, free_poly_bb): Initialize/free
5492 (print_scop): Style.
5493 * graphite-poly.h (poly_bb): Add drs vector.
5494 (PBB_DRS): Add accessor.
5495 * graphite-sese-to-poly.c (ref_nb_loops): Remove.
5496 (build_access_matrix_with_af, build_access_matrix,
5497 build_scop_data_accesses): Delete.
5498 (build_poly_dr): New.
5499 (build_pbb_drs, build_scop_drs): New.
5500 (build_poly_scop): call build_scop_drs.
5502 2009-03-13 Sebastian Pop <sebastian.pop@amd.com>
5504 * graphite-scop-detection.c (dot_all_scops_1): Close the table
5505 once per basic block.
5507 2009-03-13 Tobias Grosser <grosser@fim.uni-passau.de>
5509 * graphite-scop-detection.c (graphite_can_represent_scev): New.
5510 (graphite_can_represent_expr): Renamed from loop_affine_expr
5512 (stmt_simple_for_scop_p): Call graphite_can_represent_expr.
5513 (graphite_cannot_represent_loop): Add scop_entry to parameters.
5514 (scopdet_basic_block_info): Actually define entry_block.
5515 (stmt_simple_memref_p): Moved here from ...
5517 * tree-data-ref.c (stmt_simple_memref_p): here.
5518 * tree-data-ref.h (stmt_simple_memref_p): Removed.
5520 2009-03-13 Tobias Grosser <grosser@fim.uni-passau.de>
5522 * gcc.dg/graphite/id-4.c: New.
5524 2009-03-12 Sebastian Pop <sebastian.pop@amd.com>
5526 * sese.c (expand_scalar_variables_expr): Handle tcc_comparison.
5527 (register_old_and_new_names): Update the content of the map.
5528 When there was already a rename_map_elt in the map at that
5530 (copy_bb_and_scalar_dependences): Do rename_variables after
5531 expand_scalar_variables.
5532 * graphite-clast-to-gimple.c (build_iv_mapping): Update the content
5533 of the map. When there was already a rename_map_elt in the
5534 map at that location, free it.
5535 (translate_clast): Pass the rename_map. Do not initialize and free
5536 a rename_map per stmt_user.
5537 (gloog): Initialize and free one rename_map and pass it to
5540 2009-03-12 Sebastian Pop <sebastian.pop@amd.com>
5542 * sese.c (expand_scalar_variables_stmt,
5543 expand_scalar_variables_ssa_name): Add a gimple_stmt_iterator
5545 (expand_scalar_variables_expr): Handle REALPART_EXPR and IMAGPART_EXPR.
5546 (expand_scalar_variables): Pass to expand_scalar_variables_stmt
5547 the gimple_stmt_iterator of the statement to be expanded.
5548 * graphite-scop-detection.c (is_simple_operand): Do handle
5551 2009-03-11 Tobias Grosser <grosser@fim.uni-passau.de>
5553 * graphite-scop-detection.c (is_simple_operand): Do not handle
5555 * gcc.dg/graphite/id-2.c: New.
5557 * graphite-sese-to-poly.c (build_bb_loops,
5558 add_value_to_dim, scan_tree_for_params_right_scev,
5559 scan_tree_for_params_int, scan_tree_for_params, idx_record_params,
5560 find_params_in_bb, build_loop_iteration_domains,
5561 add_conditions_to_domain): Remove subtract.
5563 2009-03-11 Tobias Grosser <grosser@fim.uni-passau.de>
5565 * graphite-clast-to-gimple.c (loop_iv_stack_patch_for_consts,
5566 build_iv_mapping, compute_cloog_iv_types_1, build_cloog_prog):
5567 pbb_loop_at_index -> gbb_loop_at_index.
5568 * graphite-poly.c (new_poly_bb, new_scop): New accessors.
5569 (debug_loop_vec): Delete.
5570 * graphite-poly.h (poly_bb, scop): Change black_box and region to void
5571 pointer. Move LOOPS to gimple_bb_p and insert nb_params.
5572 (PBB_LOOPS): Removed.
5573 (PBB_BLACK_BOX): Insert cast.
5574 (pbb_set_black_box): New setter.
5575 (pbb_loop_at_index, pbb_loop_index): Removed.
5576 (scop_set_region, scop_set_nb_params): New.
5577 * graphite-sese-to-poly.c (new_gimple_bb, free_gimple_bb,
5578 build_scop_scattering, build_bb_loops): Add GBB_LOOPS.
5579 (build_poly_scop): Use scop_set_nb_params.
5580 * sese.h (gimple_bb): Add LOOPS.
5581 (GBB_LOOPS, gbb_loop_index, gbb_loop_at_index): New.
5583 2009-03-11 Tobias Grosser <grosser@fim.uni-passau.de>
5585 Revert previous commit.
5587 2009-03-11 Sebastian Pop <sebastian.pop@amd.com>
5589 * sese.c (expand_scalar_variables_expr): Handle tcc_comparison.
5590 (register_old_and_new_names): Update the content of the map.
5591 When there was already a rename_map_elt in the map at that
5593 (copy_bb_and_scalar_dependences): Do rename_variables after
5594 expand_scalar_variables.
5595 * graphite-clast-to-gimple.c (build_iv_mapping): Update the content
5596 of the map. When there was already a rename_map_elt in the
5597 map at that location, free it.
5598 (translate_clast): Pass the rename_map. Do not initialize and free
5599 a rename_map per stmt_user.
5600 (gloog): Initialize and free one rename_map and pass it to
5603 2009-03-11 Tobias Grosser <grosser@fim.uni-passau.de>
5605 Remove forgotten line in revert.
5607 2009-03-11 Sebastian Pop <sebastian.pop@amd.com>
5609 Revert previous commit.
5611 2009-03-10 Sebastian Pop <sebastian.pop@amd.com>
5613 * sese.c (register_old_and_new_names): Update the content
5614 of the map. When there was already a rename_map_elt in the
5615 map at that location, free it.
5616 (copy_bb_and_scalar_dependences): Do rename_variables after
5617 expand_scalar_variables.
5618 * graphite-clast-to-gimple.c (build_iv_mapping): Update the content
5619 of the map. When there was already a rename_map_elt in the
5620 map at that location, free it.
5621 (translate_clast): Pass the rename_map. Do not initialize and free
5622 a rename_map per stmt_user.
5623 (gloog): Initialize and free one rename_map and pass it to
5626 2009-03-10 Sebastian Pop <sebastian.pop@amd.com>
5628 * graphite-clast-to-gimple.c (translate_clast): context_loop
5631 2009-03-10 Tobias Grosser <grosser@fim.uni-passau.de>
5632 Sebastian Pop <sebastian.pop@amd.com>
5634 * graphite-ppl.c (ppl_insert_dimensions): Fix stupid mistake
5635 of the use of ppl_Polyhedron_map_space_dimensions.
5637 2009-03-10 Tobias Grosser <grosser@fim.uni-passau.de>
5638 Sebastian Pop <sebastian.pop@amd.com>
5640 * graphite-poly.c (unify_scattering_dimensions): Fix types.
5641 * graphite-poly.h (poly_dr_p, poly_dr, POLY_DR_TYPE, PDR_BB,
5642 PDR_TYPE, PDR_ACCESSES, pdr_accessp_nb_subscripts,
5643 pdr_accessp_nb_iterators, pdr_accessp_nb_params,
5644 pdr_accessp_alias_set_dim, pdr_accessp_subscript_dim,
5645 pdr_accessp_iterator_dim, pdr_accessp_param_dim,
5646 pbb_nb_params): New.
5647 (pbb_nb_loops, pbb_nb_scattering, scop_nb_params,
5648 nb_loops_around_pbb): Adapt return types.
5650 2009-03-09 Tobias Grosser <grosser@fim.uni-passau.de>
5652 * Makefile.in (graphite.o, graphite-sese-to-poly.o,
5653 graphite-clast-to-gimple.o, graphite-data-ref.o,
5654 graphite-scop-detection.o, graphite-poly.o): Add
5657 2009-03-05 Tobias Grosser <grosser@fim.uni-passau.de>
5659 * Makefile.in (graphite.o, graphite-sese-to-poly.o,
5660 graphite-clast-to-gimple.o, graphite-data-ref.o,
5661 graphite-scop-detection.o, graphite-poly.o): Add graphite-poly.h.
5663 2009-03-04 Tobias Grosser <grosser@fim.uni-passau.de>
5665 * gcc.dg/graphite/pr37485.c: Remove -floop-block
5666 * gcc.dg/graphite/pr37828.c: Same.
5667 * gcc.dg/graphite/pr37684.c: Same.
5668 * gcc.dg/graphite/block-0.c: Same.
5669 * gcc.dg/graphite/block-1.c: Same.
5670 * gcc.dg/graphite/block-2.c: Same.
5671 * gcc.dg/graphite/block-3.c: Same.
5672 * gcc.dg/graphite/block-4.c: Same.
5673 * gcc.dg/graphite/block-5.c: Same.
5674 * gcc.dg/graphite/block-6.c: Same.
5675 * gfortran.dg/graphite/pr38083.f90: Same.
5676 * gfortran.dg/graphite/block-1.f90: Same.
5677 * gfortran.dg/graphite/block-3.f90: Same.
5678 * gfortran.dg/graphite/pr37852.f90: Same.
5679 * gfortran.dg/graphite/block-4.f90: Same.
5680 * gfortran.dg/graphite/pr37980.f90: Same.
5681 * gfortran.dg/graphite/pr38953.f90: Same.
5682 * gfortran.dg/graphite/pr37857.f90: Same.
5683 * opts.c: Remove -floop-block from -O2.
5684 * graphite-poly.c: Fail if -floop-block -floop-interchange or
5685 -floop-strip-mine are used.
5687 2009-03-04 Tobias Grosser <grosser@fim.uni-passau.de>
5688 Sebastian Pop <sebastian.pop@amd.com>
5690 * graphite-clast-to-gimple.c (build_cloog_prog): Unify scattering
5692 * graphite-poly.c (pbb_compare, graphite_sort_pbbs,
5693 graphite_trans_bb_move_loop, graphite_trans_bb_strip_mine,
5694 strip_mine_profitable_p, is_interchange_valid,
5695 graphite_trans_bb_block, graphite_trans_loop_block,
5696 graphite_trans_scop_block): Temporary removed.
5697 (extend_scattering, unify_scattering_dimensions): New.
5698 (print_scattering_function, graphite_read_transforms):
5699 PBB_SCATTERING -> PBB_TRANSFORMED_SCATTERING.
5700 (graphite_generate_scattering_fns): Removed.
5701 (apply_poly_transforms): Cleanup.
5702 (free_poly_bb): Add PBB_SCATTERING -> PBB_TRANSFORMED_SCATTERING.
5703 (schedule_to_scattering): Moved.
5704 (PBB_STATIC_SCHEDULE, PBB_SCATTERING): Removed.
5705 (PBB_ORIGINAL_SCATTERING, PBB_TRANSFORMED_SCATTERING): New.
5706 (pbb_nb_scattering): New.
5707 (SCOP_ENTRY, SCOP_EXIT, SCOP_REGION_BBS, SCOP_DEP_GRAPH, SCOP_PARAMS,
5708 SCOP_LOOP_NEST, SCOP_PARAMS, SCOP_OLDIVS, SCOP_LIVEOUT_RENAMES):
5710 * graphite-ppl.c (ppl_insert_dimensions): Extended and renamed from
5712 (ppl_strip_loop): PBB_SCATTERING -> PBB_TRANSFORMED_SCATTERING.
5713 * graphite-scop-detection.c (dot_all_scops_1): PBB_SCATTERING
5714 -> PBB_TRANSFORMED_SCATTERING.
5715 * graphite-sese-to-poly.c (build_scop_bbs): Remove region.
5716 (build_pbb_scattering_polyhedron): Moved from schedule_to_scattering.
5717 (build_scop_scattering): Renamed from build_scop_canonical_schedules.
5718 (check_poly_representation): Do not return bool.
5719 (graphite_transform_loops): Reformat.
5720 * sese.h (SESE_ENTRY_BB, SESE_EXIT_BB): New.
5722 2009-03-04 Sebastian Pop <sebastian.pop@amd.com>
5724 * graphite-poly.c (print_pbb_domain, print_pbb, print_scop,
5725 debug_pbb_domain, debug_pbb, debug_scop): New.
5726 * graphite-poly.h (print_pbb_domain, print_pbb, print_scop,
5727 debug_pbb_domain, debug_pbb, debug_scop): Declared.
5729 2009-03-02 Sebastian Pop <sebastian.pop@amd.com>
5732 * tree-parloops.c (canonicalize_loop_ivs): Call fold_convert
5733 when the type precision of the induction variable should be
5734 larger than the type precision of nit.
5735 (gen_parallel_loop): Update use of canonicalize_loop_ivs.
5736 * graphite-clast-to-gimple.c (graphite_loop_normal_form): Same.
5737 * tree-flow.h (canonicalize_loop_ivs): Update declaration.
5739 * gcc.dg/graphite/pr39335_1.c: New.
5740 * gcc.dg/graphite/pr39335.c: New.
5742 2009-03-02 Sebastian Pop <sebastian.pop@amd.com>
5744 * tree-parloops.c (canonicalize_loop_ivs): reduction_list contains
5745 SSA_NAMES not struct reduction_info.
5747 2009-03-02 Sebastian Pop <sebastian.pop@amd.com>
5749 * sese.c (expand_scalar_variables_expr): Handle ADDR_EXPR.
5751 2009-02-27 Sebastian Pop <sebastian.pop@amd.com>
5752 Tobias Grosser <grosser@fim.uni-passau.de>
5754 * sese.c (new_sese): Initialize SESE_REDUCTION_LIST.
5755 (free_sese): Free SESE_REDUCTION_LIST.
5756 * sese.h (struct sese): Add field reduction_list.
5757 (SESE_REDUCTION_LIST): New.
5758 * graphite-clast-to-gimple.c (graphite_loop_normal_form): Call
5759 canonicalize_loop_ivs on SESE_REDUCTION_LIST.
5761 2009-02-27 Sebastian Pop <sebastian.pop@amd.com>
5762 Tobias Grosser <grosser@fim.uni-passau.de>
5764 * tree-flow.h (gather_scalar_reductions): Use struct loop * instead
5767 2009-02-27 Sebastian Pop <sebastian.pop@amd.com>
5768 Tobias Grosser <grosser@fim.uni-passau.de>
5770 * tree-parloops.c (struct brli, build_reduction_list_info,
5771 analyze_reduction_list, gather_scalar_reductions): New.
5772 (loop_parallel_p): Build a reduction list containing only
5773 PHI_RESULT SSA_NAMEs: call gather_scalar_reductions.
5774 (gen_parallel_loop): Call the analysis analyze_reduction_list.
5775 (parallelize_loops): Now reduction_list is a htab_t of SSA_NAMEs.
5776 * tree-flow.h (gather_scalar_reductions): Declared.
5778 2009-02-26 Sebastian Pop <sebastian.pop@amd.com>
5781 * graphite-clast-to-gimple.c (graphite_loop_normal_form): Do not call
5782 number_of_iterations_exit from a gcc_assert.
5784 2009-02-25 Sebastian Pop <sebastian.pop@amd.com>
5785 Jan Sjodin <jan.sjodin@amd.com>
5787 * output.h (graphite_out_file, graphite_in_file): Declared.
5788 * toplev.c (graphite_out_file, graphite_in_file): New.
5789 (init_asm_output): Initialize graphite_in_file and graphite_out_file.
5790 * graphite-clast-to-gimple.c (build_cloog_prog): Read PBB_SCATTERING.
5791 Don't call schedule_to_scattering.
5792 * common.opt (fgraphite-write, fgraphite-read): New.
5793 * graphite-poly.c: Include output.h.
5794 (print_scattering_function, print_scattering_functions,
5795 debug_scattering_function, debug_scattering_functions,
5796 graphite_write_transforms, graphite_read_transforms,
5797 graphite_generate_scattering_fns): New.
5798 (apply_poly_transforms): Do not apply transform if flag_graphite_read.
5799 Call graphite_generate_scattering_fns, graphite_write_transforms,
5800 graphite_read_transforms.
5801 (new_poly_bb): Initialize PBB_SCATTERING.
5802 (free_poly_bb): Free PBB_SCATTERING.
5803 (schedule_to_scattering): Does not return, initialize PBB_SCATTERING.
5804 * graphite-poly.h (struct poly_bb): Add field scattering.
5805 (PBB_SCATTERING): New.
5806 (print_scattering_function, print_scattering_functions,
5807 debug_scattering_function, debug_scattering_functions): Declared.
5808 * graphite-ppl.c (cloog_matrix_to_ppl_constraint): Matrices contain
5809 GMP values, not integers!
5810 (ppl_print_polyhedron_matrix, debug_ppl_polyhedron_matrix,
5811 ppl_read_polyhedron_matrix): New.
5812 * graphite-ppl.h (ppl_print_polyhedron_matrix,
5813 debug_ppl_polyhedron_matrix,
5814 ppl_read_polyhedron_matrix): Declared.
5815 * Makefile.in (graphite-poly.o): Depends on output.h.
5817 2009-02-23 Sebastian Pop <sebastian.pop@amd.com>
5818 Tobias Grosser <grosser@fim.uni-passau.de>
5821 * graphite-scop-detection.c (stmt_simple_for_scop_p): Analyze
5822 scalar evolutions in the scop_entry->loop_father.
5824 2009-02-23 Sebastian Pop <sebastian.pop@amd.com>
5825 Tobias Grosser <grosser@fim.uni-passau.de>
5827 * graphite.h (ref_nb_loops): Remove declaration.
5828 (struct gimple_bb, gimple_bb_p, GBB_BB, GBB_DATA_REFS, GBB_CONDITIONS,
5829 GBB_CONDITION_CASES, GBB_CLOOG_IV_TYPES, gbb_loop, print_gimple_bb,
5830 debug_gbb): Moved to sese.h.
5833 2009-02-23 Sebastian Pop <sebastian.pop@amd.com>
5834 Tobias Grosser <grosser@fim.uni-passau.de>
5836 * graphite-data-ref.[ch]: Disable.
5838 2009-02-23 Sebastian Pop <sebastian.pop@amd.com>
5839 Tobias Grosser <grosser@fim.uni-passau.de>
5841 * graphite-scop-detection.c (stmt_simple_for_scop_p): Analyze
5842 scalar evolutions in the scop_entry->loop_father.
5844 2009-02-23 Sebastian Pop <sebastian.pop@amd.com>
5846 * graphite-scop-detection.c (nb_reductions_in_loop): Moved here...
5847 (graphite_cannot_represent_loop_niter): Renamed
5848 graphite_cannot_represent_loop. Call nb_reductions_in_loop.
5849 (limit_scops): build_sese_loop_nests does not return a bool.
5850 * graphite-scop-detection.h (nb_reductions_in_loop): Declared.
5851 * sese.c (nb_reductions_in_loop): ... from here.
5852 (graphite_loop_normal_form): ... from here.
5853 (sese_record_loop): Does not fail, so does not return a bool.
5854 (build_sese_loop_nests): Same.
5855 * sese.h (build_sese_loop_nests): Update declaration.
5856 * graphite-clast-to-gimple.c (graphite_loop_normal_form): Moved here...
5857 (build_graphite_loop_normal_form): New.
5858 (gloog): Call build_graphite_loop_normal_form.
5859 * graphite-sese-to-poly.c (build_poly_scop): Don't fail on
5860 build_sese_loop_nests.
5862 * gcc.dg/graphite/id-1.c: New.
5864 2009-02-23 Sebastian Pop <sebastian.pop@amd.com>
5865 Tobias Grosser <grosser@fim.uni-passau.de>
5867 * graphite-sese-to-poly.c (scan_tree_for_params): Remove REAL_CST.
5868 The SCoP detection fix is sufficient.
5870 2009-02-21 Sebastian Pop <sebastian.pop@amd.com>
5872 PR tree-optimization/39260
5873 * graphite-scop-detection.c (harmful_stmt_in_bb): Stop a SCoP when
5874 the basic block contains a condition with a real type.
5875 * graphite-sese-to-poly.c (scan_tree_for_params): Handle REAL_CST.
5877 * gcc.dg/graphite/pr39260.c: New.
5879 2009-02-21 Sebastian Pop <sebastian.pop@amd.com>
5881 * graphite-poly.c: Inlcude params.h.
5882 (graphite_trans_loop_block): Use PARAM_LOOP_BLOCK_TILE_SIZE for
5884 * Makefile.in (graphite-poly.o): Depend on PARAMS_H.
5885 * params.def (PARAM_LOOP_BLOCK_TILE_SIZE): Define.
5887 2009-02-20 Sebastian Pop <sebastian.pop@amd.com>
5888 Tobias Grosser <grosser@fim.uni-passau.de>
5890 * graphite-scop-detection.c (dot_all_scops_1,
5891 dot_all_scops): Moved here.
5892 * graphite-scop-detection.h (dot_all_scops): Declared here.
5893 * graphite.c (graphite_initialize, graphite_finalize): New.
5894 (graphite_transform_loops): Cleaned up.
5895 * sese.c (debug_oldivs): Moved here.
5896 * graphite-poly.c (graphite_apply_transformations): Renamed
5897 apply_poly_transforms.
5898 (debug_loop_vec): Moved here.
5899 * graphite-sese-to-poly.c (build_bb_loops, build_sese_conditions_1,
5900 scop_contains_non_iv_scalar_phi_nodes, build_sese_conditions,
5901 find_scop_parameters, build_scop_iteration_domain,
5902 add_conditions_to_constraints, build_scop_canonical_schedules,
5903 build_scop_data_accesses): Now static.
5904 (build_poly_scop, check_poly_representation): New.
5906 2009-02-20 Sebastian Pop <sebastian.pop@amd.com>
5908 * graphite.c (graphite_stmt_p, new_gimple_bb, free_gimple_bb,
5909 remove_gbbs_in_scop, free_scops, try_generate_gimple_bb,
5910 build_scop_bbs, ref_nb_loops, compare_prefix_loops,
5911 build_scop_canonical_schedules, build_bb_loops, add_value_to_dim,
5912 scan_tree_for_params_right_scev, scan_tree_for_params_int,
5913 scan_tree_for_params, struct irp_data, dx_record_params,
5914 find_params_in_bb, find_scop_parameters, gbb_from_bb,
5915 build_loop_iteration_domains, add_conditions_to_domain,
5916 phi_node_is_iv, bb_contains_non_iv_scalar_phi_nodes,
5917 scop_contains_non_iv_scalar_phi_nodes, build_sese_conditions_1,
5918 build_sese_conditions, add_conditions_to_constraints,
5919 build_scop_iteration_domain, build_access_matrix_with_af,
5920 build_access_matrix,
5921 build_scop_data_accesses): Moved to graphite-sese-to-poly.c.
5923 * graphite-sese-to-poly.c: New.
5924 * graphite-sese-to-poly.h: New.
5926 * Makefile.in: Add new rule for graphite-sese-to-poly.o.
5928 2009-02-20 Sebastian Pop <sebastian.pop@amd.com>
5930 * graphite.c: Split graphite code generation to a new file.
5931 (graphite_verify, gmp_cst_to_tree, clast_name_to_gcc,
5932 max_precision_type, clast_to_gcc_expression_red,
5933 clast_to_gcc_expression, gcc_type_for_clast_expr,
5934 gcc_type_for_clast_eq, loop_iv_stack_patch_for_consts,
5935 graphite_translate_clast_equation, graphite_create_guard_cond_expr,
5936 graphite_create_new_guard, clast_get_body_of_loop,
5937 gcc_type_for_cloog_iv, gcc_type_for_iv_of_clast_loop,
5938 graphite_create_new_loop, build_iv_mapping, copy_renames,
5939 translate_clast, find_cloog_iv_in_expr, compute_cloog_iv_types_1,
5940 compute_cloog_iv_types, free_scattering, save_var_name,
5941 initialize_cloog_names, build_scop_context, build_cloog_prog,
5942 set_cloog_options, debug_clast_stmt, scop_to_clast,
5943 print_generated_program, debug_generated_program,
5944 gloog): Moved to graphite-clast-to-gimple.c.
5946 (struct cloog_prog_clast): Moved to graphite-clast-to-gimple.h.
5948 (iv_stack_entry_is_constant, iv_stack_entry_is_iv,
5949 loop_iv_stack_push_iv, loop_iv_stack_insert_constant,
5950 loop_iv_stack_pop, loop_iv_stack_get_iv,
5951 loop_iv_stack_get_iv_from_name, debug_loop_iv_stack,
5952 free_loop_iv_stack, loop_iv_stack_remove_constants,
5953 debug_rename_elt, debug_rename_map_1, debug_rename_map,
5954 rename_map_elt_info, eq_rename_map_elts, debug_ivtype_elt,
5955 debug_ivtype_map_1, debug_ivtype_map, ivtype_map_elt_info,
5956 eq_ivtype_map_elts, sese_add_exit_phis_edge,
5957 sese_add_exit_phis_var, sese_insert_phis_for_liveouts,
5958 get_vdef_before_sese, sese_adjust_vphi,
5959 get_new_name_from_old_name, sese_adjust_phis_for_liveouts,
5960 oldiv_for_loop, rename_variables_in_stmt, is_parameter,
5961 is_iv, expand_scalar_variables_ssa_name,
5962 expand_scalar_variables_expr, expand_scalar_variables_stmt,
5963 expand_scalar_variables, rename_variables, remove_condition,
5964 get_true_edge_from_guard_bb, get_false_edge_from_guard_bb,
5965 add_loop_exit_phis, insert_loop_close_phis, struct igp,
5966 default_liveout_before_guard, add_guard_exit_phis,
5967 insert_guard_phis, register_old_and_new_names,
5968 graphite_copy_stmts_from_block, register_sese_liveout_renames,
5969 copy_bb_and_scalar_dependences, outermost_loop_in_sese,
5970 if_region_set_false_region, create_if_region_on_edge,
5971 move_sese_in_condition): Moved to sese.c.
5973 (nb_loops_around_loop_in_sese, struct ifsese, if_region_entry,
5974 if_region_exit, if_region_get_condition_block,
5975 struct rename_map_elt, new_rename_map_elt, enum iv_stack_entry_kind,
5976 union iv_stack_entry_data_union, struct iv_stack_entry_struct,
5977 iv_stack_entry_p, loop_iv_stack, struct ivtype_map_elt,
5978 ivtype_map_elt, new_ivtype_map_elt,
5979 recompute_all_dominators): Moved to sese.h.
5981 * graphite-clast-to-gimple.c: New.
5982 * graphite-clast-to-gimple.h: New.
5983 * Makefile.in: Add new rule for graphite-clast-to-gimple.o.
5984 * sese.c: Modified as said above.
5987 2009-02-20 Sebastian Pop <sebastian.pop@amd.com>
5989 * graphite.c: Split scop detection to a new file.
5990 (enum gbb_type, gbb_type, get_bb_type, struct sd_region_p, sd_region,
5991 move_sd_regions, loop_affine_expr, exclude_component_ref,
5992 is_simple_operand, stmt_simple_for_scop_p, harmful_stmt_in_bb,
5993 graphite_cannot_represent_loop_niter, struct scopdet_info,
5994 scopdet_basic_block_info, build_scops_1, bb_in_sd_region,
5995 find_single_entry_edge, find_single_exit_edge,
5996 create_single_entry_edge, sd_region_without_exit,
5997 create_single_exit_edge, unmark_exit_edges, mark_exit_edges,
5998 create_sese_edges, build_graphite_scops, limit_scops, build_scops):
5999 Moved to graphite-scop-detection.c.
6001 * graphite-scop-detection.c: New.
6002 * graphite-scop-detection.h: New.
6003 * Makefile.in: Add new rule for graphite-scop-detection.o.
6005 * sese.c: Include tree-chrec.h, tree-data-ref.h, and
6006 tree-scalar-evolution.h.
6007 (nb_reductions_in_loop, graphite_loop_normal_form, sese_record_loop,
6008 build_sese_loop_nests): Moved here from graphite.c.
6009 (param_index): Renamed parameter_index_in_region.
6011 2009-02-18 Tobias Grosser <grosser@fim.uni-passau.de>
6012 Sebastian Pop <sebastian.pop@amd.com>
6014 * gcc.dg/graphite/block-0.c: Expected to fail now.
6015 * gcc.dg/graphite/block-1.c: Same.
6016 * gcc.dg/graphite/block-5.c: Same.
6017 * gcc.dg/graphite/block-6.c: Same.
6019 2009-02-18 Tobias Grosser <grosser@fim.uni-passau.de>
6020 Sebastian Pop <sebastian.pop@amd.com>
6022 * graphite.h: Separate from graphite_bb_p the polyhedral
6023 representation in poly_bb_p and the GCC specifics in gimple_bb_p.
6024 (struct data_dependence_polyhedron, RDGE_DDP, ddp_p): Moved to
6025 graphite-data-ref.h.
6026 (struct poly_bb, PBB_SCOP, PBB_STATIC_SCHEDULE, PBB_DOMAIN,
6027 PBB_BLACK_BOX, PBB_LOOPS, pbb_nb_loops, pbb_loop_at_index,
6028 pbb_loop_index, struct scop, SCOP_BBS, SCOP_REGION, SCOP_ENTRY,
6029 SCOP_EXIT, SCOP_REGION_BBS, SCOP_DEP_GRAPH, SCOP_PARAMS,
6030 SCOP_LOOP_NEST, SCOP_PARAMS, SCOP_OLDIVS, SCOP_LIVEOUT_RENAMES,
6031 scop_nb_params): Moved to graphite-poly.h.
6032 * graphite-data-ref.c: Same.
6033 * graphite-data-ref.h: New.
6035 (pbb_compare, graphite_sort_pbbs, graphite_trans_bb_move_loop,
6036 graphite_trans_bb_strip_mine, strip_mine_profitable_p,
6037 is_interchange_valid, graphite_trans_bb_block,
6038 graphite_trans_loop_block, scop_max_loop_depth,
6039 graphite_trans_scop_block, graphite_apply_transformations,
6040 new_poly_bb, free_poly_bb, new_scop, free_scop): Moved to
6042 * graphite-poly.h: New.
6043 * graphite-poly.c: New.
6044 * Makefile.in (OBJS-common): Add graphite-poly.o.
6045 (graphite-poly.o): New rule.
6046 * tree-data-ref.h (struct data_reference): Remove unused scop field.
6049 2009-02-18 Sebastian Pop <sebastian.pop@amd.com>
6050 Tobias Grosser <grosser@fim.uni-passau.de>
6052 * graphite.c: Replace gb -> gbb.
6054 * graphite-data-ref.c: Same.
6056 2009-02-18 Sebastian Pop <sebastian.pop@amd.com>
6057 Tobias Grosser <grosser@fim.uni-passau.de>
6059 * Makefile.in (OBJS-commmon): Add sese.o.
6061 (graphite.o): Add sese.h.
6062 * graphite.c (bb_in_ss_p, loop_in_sese_p,
6063 sese_build_livein_liveouts_use, sese_build_livein_liveouts_bb,
6064 sese_build_livein_liveouts, register_bb_in_sese, new_sese, free_sese):
6066 (block_before_scop): Add missing return.
6067 (new_scop, free_scop): Remove SESE data structures.
6068 (scop_record_loop, scan_tree_for_params, find_params_in_bb,
6069 find_scop_parameters, build_loop_iteration_domains,
6070 add_conditions_to_domain, register_scop_liveout_renames,
6071 copy_bb_and_scalar_dependences): Scop -> SESE.
6073 (add_conditions_to_domain): SCoP -> SESE and remove check
6074 (scop_contains_non_iv_scalar_phi_nodes): New.
6075 (build_scop_conditions_1, build_scop_conditions): Remove check for
6076 non iv scalar phi nodes.
6077 (print_scop_statistics): New.
6078 (graphite_transform_loops): Cleanup.
6080 * graphite.h: Move to sese & cleanup.
6084 2009-02-16 Sebastian Pop <sebastian.pop@amd.com>
6085 Tobias Grosser <grosser@fim.uni-passau.de>
6087 * graphite.c (build_scop_conditions_1): Conditions are only
6088 at the end of a basic block.
6090 2009-02-16 Sebastian Pop <sebastian.pop@amd.com>
6091 Tobias Grosser <grosser@fim.uni-passau>
6093 * graphite.h (struct graphite_bb): Remove compressed_alpha_matrix
6095 (GBB_ALPHA): Removed.
6097 2009-02-16 Sebastian Pop <sebastian.pop@amd.com>
6098 Tobias Grosser <grosser@fim.uni-passau.de>
6100 * graphite-data-ref.c (graphite_test_dependence): Don't use
6101 GBB_DYNAMIC_SCHEDULE.
6102 * graphite.c (new_graphite_bb): Same.
6103 (free_graphite_bb): Same.
6104 (build_scop_dynamic_schedules): Removed.
6105 (graphite_transform_loops): Don't call it.
6106 * graphite.h (struct graphite_bb): Remove dynamic_schedule field.
6107 (GBB_DYNAMIC_SCHEDULE): Removed.
6109 2009-02-16 Sebastian Pop <sebastian.pop@amd.com>
6110 Tobias Grosser <grosser@fim.uni-passau.de>
6112 * graphite.c (schedule_to_scattering): Don't use CloogMatrix.
6113 (print_graphite_bb): Same.
6114 (build_cloog_prog): Same.
6116 2009-02-16 Sebastian Pop <sebastian.pop@amd.com>
6117 Tobias Grosser <grosser@fim.uni-passau.de>
6119 * graphite.c (build_cloog_prog): Don't use CloogMatrix.
6121 2009-02-16 Sebastian Pop <sebastian.pop@amd.com>
6122 Tobias Grosser <grosser@fim.uni-passau.de>
6124 * graphite.c (build_scop_context): Don't use CloogMatrix.
6125 * graphite-ppl.c (new_Cloog_Domain_from_ppl_Polyhedron): New.
6126 * graphite-ppl.h (new_Cloog_Domain_from_ppl_Polyhedron): Declared.
6128 2009-02-16 Sebastian Pop <sebastian.pop@amd.com>
6129 Tobias Grosser <grosser@fim.uni-passau.de>
6131 * graphite.h (struct scop): Move params, old_ivs, loops, loop_nest,
6132 liveout_renames, add_params fields...
6133 (struct sese): ... here.
6134 (SESE_PARAMS, SESE_LOOPS, SESE_LOOP_NEST, SESE_ADD_PARAMS,
6135 SESE_PARAMS, SESE_OLDIVS, SESE_LIVEOUT_RENAMES): New.
6137 2009-02-16 Sebastian Pop <sebastian.pop@amd.com>
6138 Tobias Grosser <grosser@fim.uni-passau.de>
6140 * graphite.c (print_scop): Do not print the CLooG program.
6141 (new_scop, free_scop, initialize_cloog_names, build_scop_context,
6142 build_cloog_prog, gloog): Don't use SCOP_PROG.
6143 (find_transform): Renamed scop_to_clast.
6144 (print_generated_program, debug_generated_program): New.
6145 (graphite_transform_loops): Adapt to new interface.
6146 * graphite.h (struct scop): Remove program field.
6147 (SCOP_PROG): Removed.
6148 (print_generated_program, debug_generated_program): Declared.
6150 2009-02-16 Sebastian Pop <sebastian.pop@amd.com>
6152 * graphite-data-ref.c (schedule_precedes_p, schedule_same_p): New.
6153 (statement_precedes_p): Use schedule_same_p and schedule_precedes_p.
6154 * graphite.c (gbb_compare, schedule_to_scattering, print_graphite_bb,
6155 free_graphite_bb, build_scop_canonical_schedules,
6156 graphite_trans_bb_strip_mine, graphite_trans_scop_block): Static
6157 schedules are now represented using a ppl_Linear_Expression_t.
6158 * graphite.h (struct graphite_bb): Same.
6159 * graphite-ppl.c (ppl_lexico_compare_linear_expressions): New.
6160 * graphite-ppl.h (ppl_lexico_compare_linear_expressions): Declared.
6162 2009-02-15 Sebastian Pop <sebastian.pop@amd.com>
6164 * graphite.c: Free local memory.
6165 * graphite-ppl.c: Same.
6167 2009-02-15 Sebastian Pop <sebastian.pop@amd.com>
6169 * graphite.c (const_column_index, get_first_matching_sign_row_index,
6170 get_lower_bound_row, get_upper_bound_row, copy_constraint,
6171 swap_constraint_variables, scale_constraint_variable): Removed.
6172 (graphite_trans_bb_strip_mine): Remove pong.
6173 * graphite-ppl.c: Include missing header files.
6174 (set_inhomogeneous, set_coef, shift_poly, ppl_strip_loop): New.
6175 * graphite-ppl.h (ppl_strip_loop): Declared.
6176 * Makefile.in (graphite-ppl.o): Adjust dependences.
6178 2009-02-14 Sebastian Pop <sebastian.pop@amd.com>
6180 * graphite.c (build_loop_iteration_domains): Remove ping pong.
6181 (build_scop_iteration_domain): Same.
6183 2009-02-13 Sebastian Pop <sebastian.pop@amd.com>
6185 * graphite.c (scan_tree_for_params, add_conditions_to_domain): Remove
6187 (add_value_to_dim, scan_tree_for_params_right_scev,
6188 scan_tree_for_params_int): New.
6189 * graphite-ppl.c (oppose_constraint): New.
6190 (insert_constraint_into_matrix): Implement missing cases.
6191 * graphite-ppl.h (insert_constraint_into_matrix): Declared.
6193 2009-02-13 Sebastian Pop <sebastian.pop@amd.com>
6195 * graphite.c (graphite_trans_bb_move_loop): Remove ping pong,
6196 use ppl_move_dimension.
6198 2009-02-12 Sebastian Pop <sebastian.pop@amd.com>
6200 * graphite-data-ref.c: Domains are now ppl_Polyhedra_t.
6203 * graphite-ppl.c: Same.
6204 * graphite-ppl.h: Same.
6206 2009-02-12 Sebastian Pop <sebastian.pop@amd.com>
6208 Revert last 3 commits.
6210 2009-02-10 Sebastian Pop <sebastian.pop@amd.com>
6212 * graphite.c (scan_tree_for_params, add_conditions_to_domain): Remove
6214 (add_value_to_dim, scan_tree_for_params_right_scev,
6215 scan_tree_for_params_int): New.
6216 * graphite-ppl.c (oppose_constraint): New.
6217 (insert_constraint_into_matrix): Implement missing cases.
6218 * graphite-ppl.h (insert_constraint_into_matrix): Declared.
6220 2009-02-10 Sebastian Pop <sebastian.pop@amd.com>
6222 * graphite.c (graphite_trans_bb_move_loop): Remove unused variables.
6224 2009-02-10 Sebastian Pop <sebastian.pop@amd.com>
6225 Tobias Grosser <grosser@fim.uni-passau.de>
6227 * graphite.c (graphite_trans_bb_move_loop): Remove ping pong,
6228 use ppl_move_dimension.
6229 * graphite-ppl.c (ppl_move_dimension): New.
6230 * graphite-ppl.h (ppl_move_dimension): Declared.
6232 2009-02-10 Sebastian Pop <sebastian.pop@amd.com>
6234 * graphite.c: Do not include cloog/cloog.h.
6235 (print_graphite_bb): Remove ping pong, call PPL print function.
6237 2009-02-10 Tobias Grosser <grosser@fim.uni-passau.de>
6239 * Makefile.in (OBJS-common): Add graphite-ppl.o.
6240 (graphite.o): Add dependence on graphite-ppl.h.
6241 (graphite-ppl.o): New.
6242 (graphite-data-ref.c): Ping pong between PPL data structures
6244 * graphite-ppl.c: New.
6245 * graphite-ppl.h: New.
6246 * graphite.c: Include graphite-ppl.h.
6247 (print_graphite_bb, add_conditions_to_domain, build_cloog_prog,
6248 graphite_trans_bb_move_loop, graphite_trans_bb_strip_mine):
6249 Ping pong between PPL data structures and matrices.
6250 (new_graphite_bb): Create a PPL constraint system.
6251 Call ppl_delete_Constraint_System instead of cloog_matrix_free.
6252 (build_loop_iteration_domains): Use PPL functions.
6253 * graphite.h: Include graphite-ppl.h. Fix comments.
6254 (graphite_bb): Use a ppl_Constraint_System_t instead of
6255 CloogMatrix for representing the domain.
6256 (scop): Remove static_schedule.
6257 (gbb_nb_loops): Ping pong between PPL data structures and matrices.
6259 2009-02-06 Sebastian Pop <sebastian.pop@amd.com>
6261 * graphite.c: Fix some comments.
6263 2009-02-05 Sebastian Pop <sebastian.pop@amd.com>
6266 * graphite.c (if_region_set_false_region): After moving a region
6267 in the false branch of a condition, remove the empty dummy
6269 (gloog): Remove wrong fix for PR38953.
6271 2009-02-03 Tobias Grosser <grosser@fim.uni-passau.de>
6273 * graphite.c (bb_in_sese_p, sese_build_livein_liveouts_use,
6274 sese_build_livein_liveouts_bb, sese_build_livein_liveouts,
6275 register_bb_in_sese, new_sese, free_sese): Moved.
6276 (dot_scop_1, build_scop_loop_nests, build_loop_iteration_domains,
6277 outermost_loop_in_scop, build_scop_iteration_domain,
6278 expand_scalar_variables_ssa_name, get_vdef_before_scop,
6279 limit_scops): Use bb_in_sese_p instead of bb_in_scop_p.
6280 Use loop_in_sese_p instead of loop_in_scop_p.
6281 (new_graphite_bb, new_scop, gloog): Do not initialize SCOP_BBS_B.
6282 (free_scop): Do not free SCOP_BBS_B.
6283 (nb_loops_around_loop_in_scop, nb_loops_around_gb,
6284 ref_nb_loops): Moved here...
6285 * graphite.h (ref_nb_loops): ... from here.
6286 (struct scop): Remove bbs_b bitmap.
6287 (SCOP_BBS_B, bb_in_scop_p, loop_in_scop_p): Removed.
6288 * gcc.dg/graphite/scop-19.c: New
6290 2009-02-03 Tobias Grosser <grosser@fim.uni-passau.de>
6292 * graphite.c (scopdet_basic_block_info): Fix bug in scop
6295 2009-01-30 Tobias Grosser <grosser@fim.uni-passau.de>
6297 * graphite.c (new_loop_to_cloog_loop_str, hash_loop_to_cloog_loop,
6298 eq_loop_to_cloog_loop): Remove.
6299 (new_scop, free_scop): Remove SCOP_LOOP2CLOOG_LOOP.
6300 * graphite.h (struct scop): Remove loop2cloog_loop.
6301 (loop_domain_dim, loop_iteration_vector_dim): Remove.
6303 2009-01-30 Tobias Grosser <grosser@fim.uni-passau.de>
6305 * opts.c (decode_options): Only add graphite options to O2
6306 if we compile with graphite enabled.
6308 2009-01-26 Sebastian Pop <sebastian.pop@amd.com>
6310 * Merge from mainline (r143163:143684).
6312 2009-01-26 Sebastian Pop <sebastian.pop@amd.com>
6314 * graphite.c (debug_value): Removed.
6315 * graphite.h (debug_value): Removed.
6317 2009-01-23 Sebastian Pop <sebastian.pop@amd.com>
6319 * passes.c (init_optimization_passes): Do not call pass_copy_prop
6320 after graphite: pass_copy_prop does not maintain a proper loop closed
6321 SSA form. pass_copy_prop should be fixed.
6323 2009-01-23 Sebastian Pop <sebastian.pop@amd.com>
6325 * graphite.c (scop_adjust_phis_for_liveouts): Fix warning.
6327 2009-01-23 Sebastian Pop <sebastian.pop@amd.com>
6329 * graphite.c (graphite_verify): Add a call to verify_loop_closed_ssa.
6330 (gloog): Split the exit of the scop when the scop exit is a loop exit.
6331 (graphite_transform_loops): Only call cleanup_tree_cfg if gloog
6334 2009-01-20 Sebastian Pop <sebastian.pop@amd.com>
6336 * graphite.c (gloog): Return true when code gen succeeded.
6337 (graphite_transform_loops): Do not call cleanup_tree_cfg if
6338 the code of the function did not changed. After cleanup_tree_cfg
6339 call rewrite_into_loop_closed_ssa to maintain the loop closed ssa
6342 2009-01-19 Sebastian Pop <sebastian.pop@amd.com>
6344 * graphite.c (stmt_simple_for_scop_p): Also handle cases when
6345 gimple_call_lhs is NULL.
6347 2009-01-16 Sebastian Pop <sebastian.pop@amd.com>
6348 Tobias Grosser <tobi.grosser@amd.com>
6350 * graphite.c (graphite_trans_scop_block): Do not block single
6353 2009-01-15 Sebastian Pop <sebastian.pop@amd.com>
6354 Tobias Grosser <tobi.grosser@amd.com>
6356 * graphite.c (build_scop_canonical_schedules): Start schedules at
6359 2009-01-15 Sebastian Pop <sebastian.pop@amd.com>
6360 Tobias Grosser <tobi.grosser@amd.com>
6362 * graphite.c (compare_prefix_loops): New.
6363 (build_scop_canonical_schedules): Rewritten.
6364 (graphite_transform_loops): Move build_scop_canonical_schedules
6365 after build_scop_iteration_domain.
6367 2009-01-14 Sebastian Pop <sebastian.pop@amd.com>
6368 Tobias Grosser <tobi.grosser@amd.com>
6370 * graphite.c (add_conditions_to_domain): Add the loops to
6371 the dimension of the iteration domain. Do copy the domain
6372 only when it exists.
6373 (build_scop_conditions_1): Do not call add_conditions_to_domain.
6374 (add_conditions_to_constraints): New.
6375 (can_generate_code_stmt, can_generate_code): Removed.
6376 (gloog): Do not call can_generate_code.
6377 (graphite_transform_loops): Call add_conditions_to_constraints
6378 after building the iteration domain.
6380 2009-01-14 Sebastian Pop <sebastian.pop@amd.com>
6381 Tobias Grosser <tobi.grosser@amd.com>
6382 Jan Sjodin <jan.sjodin@amd.com>
6384 * graphite.c (scan_tree_for_params): On substractions negate
6385 all the coefficients of the term.
6386 (clast_to_gcc_expression_red): New. Handle reduction expressions
6387 of more than two operands.
6388 (clast_to_gcc_expression): Call clast_to_gcc_expression_red.
6389 (get_vdef_before_scop): Handle also the case of default definitions.
6391 2009-01-14 Sebastian Pop <sebastian.pop@amd.com>
6394 * graphite.c (get_vdef_before_scop, scop_adjust_vphi): New.
6395 (scop_adjust_phis_for_liveouts): Call scop_adjust_vphi.
6396 (gloog): Do not call cleanup_tree_cfg.
6397 (graphite_transform_loops): Call cleanup_tree_cfg after all
6398 scops have been code generated.
6400 2009-01-13 Sebastian Pop <sebastian.pop@amd.com>
6402 * passes.c (init_optimization_passes): Schedule after
6403 graphite transforms pass_copy_prop, pass_dce_loop and pass_lim.
6405 2009-01-13 Sebastian Pop <sebastian.pop@amd.com>
6407 * graphite.c (expand_scalar_variables_stmt): Do not pass loop_p.
6409 (expand_scalar_variables_ssa_name): Do not pass loop_p. Fix comment.
6410 Set the type of an expression to the type of its assign statement.
6411 (expand_scalar_variables_expr): Do not pass loop_p.
6412 Fix comment. Stop recursion on tcc_constant or tcc_declaration.
6413 (copy_bb_and_scalar_dependences): Do not pass loop_p.
6414 (translate_clast): Update call to copy_bb_and_scalar_dependences.
6416 2009-01-11 Sebastian Pop <sebastian.pop@amd.com>
6418 * graphite.c (expand_scalar_variables_ssa_name): Set the type of
6419 an expression to the gimple_expr_type of its assign statement.
6420 (expand_scalar_variables_expr): Stop recursion on tcc_constant
6423 2009-01-11 Sebastian Pop <sebastian.pop@amd.com>
6425 PR tree-optimization/38786
6426 * gcc.dg/graphite/pr38786.c: New.
6427 * graphite.c (expand_scalar_variables_ssa_name): New, outlined from
6428 the SSA_NAME case of expand_scalar_variables_expr.
6429 (expand_scalar_variables_expr): Also gather the scalar computation
6430 used to index the memory access.
6431 (expand_scalar_variables_stmt): Pass to expand_scalar_variables_expr
6432 the gimple_stmt_iterator where it inserts new code.
6434 2009-01-10 Sebastian Pop <sebastian.pop@amd.com>
6436 * gcc.dg/graphite/block-3.c: Fix compile error on 32bit.
6438 2009-01-10 Sebastian Pop <sebastian.pop@amd.com>
6440 * opts.c (decode_options): Enable flag_graphite_identity and
6441 flag_loop_block in -O2 and above.
6443 2009-01-08 Sebastian Pop <sebastian.pop@amd.com>
6445 * libjava/classpath/lib/gnu/java/awt/peer/gtk/GtkMouseInfoPeer.class:
6446 Fix merge problem: replace with the file from trunk.
6448 2009-01-08 Sebastian Pop <sebastian.pop@amd.com>
6450 * Merge from mainline (r141727:143163).
6452 2009-01-07 Sebastian Pop <sebastian.pop@amd.com>
6453 Jan Sjodin <jan.sjodin@amd.com>
6455 PR tree-optimization/38559
6456 * gcc.dg/graphite/pr38559.c: New.
6458 * graphite.c (debug_value, copy_constraint,
6459 swap_constraint_variables, scale_constraint_variable, ): New.
6460 (get_lower_bound, get_upper_bound): Removed.
6461 (graphite_trans_bb_strip_mine): Clean up this code that works
6462 only for constant number of iterations. Fully copy upper and
6463 lower bound constraints, not only the constant part of them.
6464 * graphite.h (debug_value): Declared.
6466 2009-01-06 Jan Sjodin <jan.sjodin@amd.com>
6468 PR tree-optimization/38492
6469 PR tree-optimization/38498
6470 * tree-check.c (operator_is_linear, scev_is_linear_expression): New.
6471 * tree-chrec.h (scev_is_linear_expression): Declared.
6472 * graphite.c (graphite_cannot_represent_loop_niter): New.
6473 (scopdet_basic_block_info): Call graphite_cannot_represent_loop_niter.
6474 (graphite_loop_normal_form): Use gcc_assert.
6475 (scan_tree_for_params): Use CASE_CONVERT.
6476 (phi_node_is_iv, bb_contains_non_iv_scalar_phi_nodes): New.
6477 (build_scop_conditions_1): Call bb_contains_non_iv_scalar_phi_nodes.
6478 Use gcc_assert. Discard scops that contain unhandled cases.
6479 (build_scop_conditions): Return a boolean status for unhandled cases.
6480 (strip_mine_profitable_p): Print the loop number, not its depth.
6481 (is_interchange_valid): Pass the depth of the loop nest, don't
6482 recompute it wrongly.
6483 (graphite_trans_bb_block): Same.
6484 (graphite_trans_bb_block): Print tentative of loop blocking.
6485 (graphite_trans_scop_block): Do not print that the loop has been
6487 (graphite_transform_loops): Do not handle scops that contain condition
6490 * gcc.dg/graphite/pr38500.c: Fixed warning as committed
6492 * gcc.dg/graphite/block-0.c: Update test.
6493 * gcc.dg/graphite/block-1.c: Same.
6494 * gcc.dg/graphite/block-2.c: Remove xfail and test for
6496 * gcc.dg/graphite/block-4.c: Remove test for strip mine.
6497 * gcc.dg/graphite/block-3.c: New.
6498 * gcc.dg/graphite/pr38498.c: New.
6500 2008-12-22 Harsha Jagasia <harsha.jagasia@amd.com>
6502 PR tree-optimization/38510
6503 * gcc.dg/graphite/pr38510.c: New.
6504 * graphite.c (recompute_all_dominators): Call mark_irreducible_loops.
6505 (translate_clast): Call recompute_all_dominators before
6507 (gloog): Call recompute_all_dominators before graphite_verify.
6509 2008-12-12 Sebastian Pop <sebastian.pop@amd.com>
6511 PR tree-optimization/38492
6512 * graphite.c (rename_map_elt, debug_rename_elt,
6513 debug_rename_map_1, debug_rename_map, new_rename_map_elt,
6514 rename_map_elt_info, eq_rename_map_elts,
6515 get_new_name_from_old_name, bb_in_sese_p): Moved around.
6516 (sese_find_uses_to_rename_use): Renamed sese_build_livein_liveouts_use.
6517 (sese_find_uses_to_rename_bb): Renamed sese_build_livein_liveouts_bb.
6518 (sese_build_livein_liveouts): New.
6519 (new_sese, free_sese): New.
6520 (new_scop): Call new_sese.
6521 (free_scop): Call free_sese.
6522 (rename_variables_from_edge, rename_phis_end_scop): Removed.
6523 (register_old_new_names): Renamed register_old_and_new_names.
6524 (register_scop_liveout_renames, add_loop_exit_phis,
6525 insert_loop_close_phis, struct igp,
6526 default_liveout_before_guard, add_guard_exit_phis,
6527 insert_guard_phis, copy_renames): New.
6528 (translate_clast): Call insert_loop_close_phis and insert_guard_phis.
6529 (sese_add_exit_phis_edge): Renamed scop_add_exit_phis_edge.
6530 (rewrite_into_sese_closed_ssa): Renamed scop_insert_phis_for_liveouts.
6531 (scop_adjust_phis_for_liveouts): New.
6532 (gloog): Call scop_adjust_phis_for_liveouts.
6534 * graphite.h (struct sese): Documented. Added fields liveout,
6536 (SESE_LIVEOUT, SESE_LIVEIN, SESE_LIVEIN_VER, SESE_NUM_VER): New.
6537 (new_sese, free_sese, sese_build_livein_liveouts): Declared.
6538 (struct scop): Added field liveout_renames.
6539 (SCOP_LIVEOUT_RENAMES): New.
6541 2008-12-11 Sebastian Pop <sebastian.pop@amd.com>
6543 PR tree-optimization/38409
6544 * gcc.dg/graphite/pr38409.c: New.
6545 * graphite.c (nb_reductions_in_loop): Use simple_iv.
6547 2008-12-11 Sebastian Pop <sebastian.pop@amd.com>
6549 * graphite.c (gcc_type_for_cloog_iv): By default return
6551 (graphite_create_new_loop): Don't fold_convert the already
6552 fold_convert-ed expression.
6554 2008-12-11 Harsha Jagasia <harsha.jagasia@amd.com>
6556 PR tree-optimization/38446
6557 * gcc.dg/graphite/pr38446.c: New.
6558 * graphite.c (register_bb_in_sese): New.
6559 (bb_in_sese_p): Check if bb belongs to sese region by explicitly
6560 looking at the bbs in the region.
6561 * graphite.h (sese): Add region_basic_blocks pointer set to
6562 structure and initialize at the time of defining new scop.
6564 2008-12-11 Tobias Grosser <grosser@fim.uni-passau.de>
6566 * graphite.c (new_graphite_bb): Initialize GBB_STATIC_SCHEDULE.
6567 (find_params_in_bb): Do not free data refs.
6568 (free_graphite_bb): Add FIXME on disabled free_data_refs.
6570 2008-12-11 Sebastian Pop <sebastian.pop@amd.com>
6572 * gcc.dg/graphite/scop-16.c: Test only scop specific info.
6573 * gcc.dg/graphite/scop-17.c: Same.
6574 * gcc.dg/graphite/block-5.c: New.
6575 * gcc.dg/graphite/block-6.c: New.
6576 * gcc.dg/graphite/pr37485.c: Clean dump file after.
6577 * gcc.dg/graphite/pr37684.c: Same.
6578 * gcc.dg/graphite/block-2.c: Same.
6580 * graphite.c (struct ivtype_map_elt): New.
6581 (debug_ivtype_elt, debug_ivtype_map_1, debug_ivtype_map,
6582 new_ivtype_map_elt, ivtype_map_elt_info, eq_ivtype_map_elts,
6583 gcc_type_for_cloog_iv): New.
6584 (loop_iv_stack_patch_for_consts): Use the type of the induction
6585 variable from the original loop, except for the automatically
6586 generated loops, i.e., in the case of a strip-mined loop, in
6587 which case there is no original loop: in that case just use
6589 (new_graphite_bb): Initialize GBB_CLOOG_IV_TYPES.
6590 (free_graphite_bb): Free GBB_CLOOG_IV_TYPES.
6591 (clast_name_to_gcc): Accept params to be NULL.
6592 (clast_to_gcc_expression): Take an extra parameter for the type.
6593 Convert to that type all the expressions built by this function.
6594 (gcc_type_for_clast_expr, gcc_type_for_clast_eq): New.
6595 (graphite_translate_clast_equation): Compute the type of the
6596 clast_equation before translating its LHS and RHS.
6597 (clast_get_body_of_loop, gcc_type_for_iv_of_clast_loop): New.
6598 (graphite_create_new_loop): Compute the type of the induction
6599 variable before translating the lower and upper bounds and before
6600 creating the induction variable.
6601 (rename_variables_from_edge, rename_phis_end_scop): New.
6602 (copy_bb_and_scalar_dependences): Call rename_phis_end_scop.
6603 (sese_add_exit_phis_edge): Do not use integer_zero_node.
6604 (find_cloog_iv_in_expr, compute_cloog_iv_types_1,
6605 compute_cloog_iv_types): New.
6606 (gloog): Call compute_cloog_iv_types before starting the
6607 translation of the clast.
6609 * graphite.h (struct graphite_bb): New field cloog_iv_types.
6610 (GBB_CLOOG_IV_TYPES): New.
6611 (debug_ivtype_map): Declared.
6612 (oldiv_for_loop): New.
6614 2008-12-10 Tobias Grosser <grosser@fim.uni-passau.de>
6617 * graphite.c (new_scop): Initialize SCOP_ADD_PARAMS.
6618 (param_index): Assert if parameter is not know after parameter
6620 (find_params_in_bb): Detect params directly in GBB_CONDITIONS.
6621 (find_scop_parameters): Mark, that we have finished parameter
6623 (graphite_transform_loops): Move condition detection before parameter
6625 * graphite.h (struct scop): Add SCOP_ADD_PARAMS.
6626 * gfortran.dg/graphite/pr38459.f90: New.
6628 2008-12-09 Tobias Grosser <grosser@fim.uni-passau.de>
6630 * graphite.c (graphite_transform_loops): Always call find_transform ()
6631 in ENABLE_CHECKING. So we test these code paths, even if we do not
6634 2008-12-09 Tobias Grosser <grosser@fim.uni-passau.de>
6636 * graphite.c (print_graphite_bb): Fix printing to file != dump_file.
6637 (print_scop): Ditto.
6639 2008-12-08 Tobias Grosser <grosser@fim.uni-passau.de>
6642 Fix gfortran.dg/graphite/id-3.f90.
6643 * graphite.c (scopdet_basic_block_info): Fix bug that found some
6644 regions more than once.
6646 2008-12-03 Sebastian Pop <sebastian.pop@amd.com>
6648 Fix gfortran.dg/graphite/id-4.f90.
6649 * graphite.c (scan_tree_for_params): Do not compute the multiplicand
6652 2008-12-03 Sebastian Pop <sebastian.pop@amd.com>
6654 Fix gfortran.dg/graphite/id-1.f90.
6655 * graphite.c (gmp_cst_to_tree): Pass the type in parameter.
6656 (loop_iv_stack_patch_for_consts): Update use of gmp_cst_to_tree.
6657 (max_precision_type): New.
6658 (value_clast): Removed.
6659 (clast_to_gcc_expression): Be more careful to types of expressions.
6660 Use max_precision_type and update use of gmp_cst_to_tree.
6661 (graphite_translate_clast_equation): Use max_precision_type.
6662 (graphite_create_guard_cond_expr): Do not use integer_type_node,
6663 use the type of the condition.
6664 (graphite_create_new_loop): Do not use integer_type_node, use the
6665 max_precision_type of lb and ub.
6667 2008-12-03 Sebastian Pop <sebastian.pop@amd.com>
6669 * graphite.c (build_scops_1): Initialize open_scop.exit
6672 2008-12-02 Sebastian Pop <sebastian.pop@amd.com>
6674 * gcc.dg/graphite/pr38084.c: New.
6675 * gfortran.dg/graphite/id-1.f90: New.
6676 * gfortran.dg/graphite/id-2.f90: New.
6677 * gfortran.dg/graphite/id-3.f90: New.
6678 * gfortran.dg/graphite/id-4.f90: New.
6679 * gfortran.dg/graphite/pr37857.f90: New.
6681 2008-12-02 Sebastian Pop <sebastian.pop@amd.com>
6682 Jan Sjodin <jan.sjodin@amd.com>
6683 Harsha Jagasia <harsha.jagasia@amd.com>
6695 * gcc.dg/graphite/pr38073.c: New.
6696 * gcc.dg/graphite/pr37928.c: New.
6697 * gcc.dg/graphite/pr37883.c: New.
6698 * gcc.dg/graphite/pr38125.c: New.
6699 * gfortran.dg/graphite/pr38083.f90: New.
6700 * gfortran.dg/graphite/pr37852.f90: New.
6701 * gfortran.dg/graphite/pr37980.f90: New.
6703 * gcc.dg/graphite/scop-18.c: Remove reduction, test for
6704 the number of detected scops. Copy exact same test for loop
6706 * gcc.dg/graphite/block-1.c: Fix the number of expected
6707 loops to be blocked as reductions are not handled.
6708 * gcc.dg/graphite/block-4.c: ...here. New.
6710 * tree-phinodes.c (remove_phi_nodes): New, extracted from...
6711 * tree-cfg.c (remove_phi_nodes_and_edges_for_unreachable_block):
6713 * tree-flow.h (remove_phi_nodes, canonicalize_loop_ivs): Declared.
6714 * Makefile.in (graphite.o): Depend on value-prof.h.
6715 (graphite.o-warn): Removed -Wno-error.
6716 * tree-parloops.c (canonicalize_loop_ivs): Allow reduction_list
6717 to be a NULL pointer. Call update_stmt. Return the newly created
6718 cannonical induction variable.
6720 * graphite.h (debug_rename_map): Declared. Fix some comments.
6722 * graphite.c: Reimplement the code generation from graphite to gimple.
6723 Include value-prof.h.
6724 (loop_iv_stack_get_iv): Do not return NULL for constant substitutions.
6725 (get_old_iv_from_ssa_name): Removed.
6726 (graphite_stmt_p): New.
6727 (new_graphite_bb): Test for useful statements before building a
6728 graphite statement for the basic block.
6729 (free_graphite_bb): Do not free GBB_DATA_REFS: this is a bug
6730 in free_data_ref that calls BITMAP_FREE (DR_VOPS (dr)) without
6732 (recompute_all_dominators, graphite_verify,
6733 nb_reductions_in_loop, graphite_loop_normal_form): New.
6734 (scop_record_loop): Call graphite_loop_normal_form.
6735 (build_scop_loop_nests): Iterate over all the blocks of the
6736 function instead of relying on the incomplete information from
6737 SCOP_BBS. Return the success of the operation.
6738 (find_params_in_bb): Use the data from GBB_DATA_REFS.
6739 (add_bb_domains): Removed.
6740 (build_loop_iteration_domains): Don't call add_bb_domains.
6741 Add the iteration domain only to the basic blocks that have been
6742 translated to graphite.
6743 (build_scop_conditions_1): Add constraints only if the basic
6744 block have been translated to graphite.
6745 (build_scop_data_accesses): Completely disabled until data
6746 dependence is correctly implemented.
6747 (debug_rename_elt, debug_rename_map_1, debug_rename_map): New.
6748 (remove_all_edges_1, remove_all_edges): Removed.
6749 (get_new_name_from_old_name): New.
6750 (graphite_rename_variables_in_stmt): Renamed
6751 rename_variables_in_stmt. Call get_new_name_from_old_name.
6752 Use replace_exp and update_stmt.
6753 (is_old_iv): Renamed is_iv.
6754 (expand_scalar_variables_stmt): Extra parameter for renaming map.
6755 Use replace_exp and update_stmt.
6756 (expand_scalar_variables_expr): Same. Use the map to get the
6757 new names for the renaming of induction variables and for the
6758 renaming of variables after a basic block has been copied.
6759 (expand_scalar_variables): Same.
6760 (graphite_rename_variables): Renamed rename_variables.
6761 (move_phi_nodes): Removed.
6762 (get_false_edge_from_guard_bb): New.
6763 (build_iv_mapping): Do not insert the induction variable of a
6764 loop in the renaming iv map if the basic block does not belong
6766 (register_old_new_names, graphite_copy_stmts_from_block,
6767 copy_bb_and_scalar_dependences): New.
6768 (translate_clast): Heavily reimplemented: copy basic blocks,
6769 do not move them. Finally, in call cleanup_tree_cfg in gloog.
6770 At each translation step call graphite_verify ensuring the
6771 consistency of the SSA, loops and dominators information.
6772 (collect_virtual_phis, find_vdef_for_var_in_bb,
6773 find_vdef_for_var_1, find_vdef_for_var,
6774 patch_phis_for_virtual_defs): Removed huge hack.
6775 (mark_old_loops, remove_dead_loops, skip_phi_defs,
6776 collect_scop_exit_phi_args, patch_scop_exit_phi_args,
6777 gbb_can_be_ignored, scop_remove_ignoreable_gbbs, ): Removed.
6778 (remove_sese_region, ifsese, if_region_entry, if_region_exit,
6779 if_region_get_condition_block, if_region_set_false_region,
6780 create_if_region_on_edge, move_sese_in_condition, bb_in_sese_p,
6781 sese_find_uses_to_rename_use, sese_find_uses_to_rename_bb,
6782 sese_add_exit_phis_edge, sese_add_exit_phis_var,
6783 rewrite_into_sese_closed_ssa): New.
6784 (gloog): Remove dead code. Early return if code cannot be
6785 generated. Call cleanup_tree_cfg once the scop has been code
6787 (graphite_trans_scop_block, graphite_trans_loop_block): Do not
6788 block loops with less than two loops.
6789 (graphite_apply_transformations): Remove the call to
6790 scop_remove_ignoreable_gbbs.
6791 (limit_scops): When build_scop_loop_nests fails, continue on
6792 the next scop. Fix open_scop.entry.
6793 (graphite_transform_loops): Call recompute_all_dominators: force the
6794 recomputation of correct CDI_DOMINATORS and CDI_POST_DOMINATORS.
6795 Call initialize_original_copy_tables and free_original_copy_tables
6796 to be able to copy basic blocks during code generation.
6797 When build_scop_loop_nests fails, continue on next scop.
6798 (value_clast): New union.
6799 (clast_to_gcc_expression): Fix type cast warning.
6801 2008-11-09 Sebastian Pop <sebastian.pop@amd.com>
6803 * Merge from mainline (r140838:141727).
6805 2008-11-05 Tobias Grosser <grosser@fim.uni-passau.de>
6809 * graphite.c (scan_tree_for_params): Add POINTER_PLUS_EXPR.
6811 2008-11-05 Tobias Grosser <grosser@fim.uni-passau.de>
6815 * graphite.c (scopdet_basic_block_info): Fix loops with multiple
6816 exits and conditions.
6817 * gcc.dg/graphite/pr37943.c: New.
6819 2008-10-23 Tobias Grosser <grosser@fim.uni-passau.de>
6822 * graphite.c (gloog): Replace EXIT_BLOCK_PTR with scop exit.
6824 2008-10-23 Tobias Grosser <grosser@fim.uni-passau.de>
6826 * doc/invoke.texi: Fix spaces.
6828 2008-10-22 Sebastian Pop <sebastian.pop@amd.com>
6830 PR tree-optimization/37891
6831 Reverted last commit.
6832 * graphite.c (create_single_entry_edge): Set
6833 EDGE_IRREDUCIBLE_LOOP and BB_IRREDUCIBLE_LOOP.
6835 2008-10-21 Sebastian Pop <sebastian.pop@amd.com>
6836 Mitul Thakkar <mitul.thakkar@amd.com>
6838 * graphite.c (create_single_entry_edge): Set
6839 EDGE_IRREDUCIBLE_LOOP and BB_IRREDUCIBLE_LOOP.
6841 2008-10-16 Tobias Grosser <grosser@fim.uni-passau.de>
6843 * doc/invoke.texi: Add -fgraphite-identity.
6844 * graphite.c (graphite_apply_transformations): Check for
6845 -fgraphite-identity.
6846 * toplev.c (process_options): Add flag_graphite_identity.
6847 * tree-ssa-loop.c: Add flag_graphite_identity.
6849 2008-10-14 Sebastian Pop <sebastian.pop@amd.com>
6851 Undo changes from 2008-10-02:
6852 * tree-ssa-loop-ivopts.c (rewrite_use_nonlinear_expr): Convert
6853 operand type when copying the operand to a variable of different type.
6854 * cfgloopmanip.c (create_empty_loop_on_edge): Write exit condition
6855 with the IV name after increment.
6857 2008-10-14 Sebastian Pop <sebastian.pop@amd.com>
6858 Harsha Jagasia <harsha.jagasia@amd.com>
6860 PR tree-optimization/37828
6861 * gcc.dg/graphite/pr37828.c: New.
6862 * graphite.c (graphite_trans_loop_block): Do not loop block
6863 single nested loops.
6865 2008-10-09 Harsha Jagasia <harsha.jagasia@amd.com>
6866 Sebastian Pop <sebastian.pop@amd.com>
6868 * graphite.c (struct rename_map_elt, new_rename_map_elt,
6869 rename_map_elt_info, eq_rename_map_elts): New.
6870 (graphite_rename_ivs_stmt): Renamed graphite_rename_variables_in_stmt.
6871 (expand_scalar_variables_expr): Change parameters.
6872 (expand_scalar_variables_stmt): Same.
6873 (expand_scalar_variables): Same.
6874 (graphite_rename_ivs): Rename graphite_rename_variables.
6875 (build_iv_mapping): New.
6876 (translate_clast): Call build_iv_mapping.
6877 * graphite.h (gbb_p): New name.
6879 2008-10-03 Harsha Jagasia <harsha.jagasia@amd.com>
6881 PR tree-optimization/37684
6882 * gcc.dg/graphite/pr37684.c: New.
6883 * graphite.c (exclude_component_ref): New.
6884 (is_simple_operand): Call exclude_component_ref.
6886 2008-10-02 Jan Sjodin <jan.sjodin@amd.com>
6887 Harsha Jagasia <harsha.jagasia@amd.com>
6889 PR tree-optimization/37485
6890 * gcc.dg/graphite/block-2.c: New
6891 * graphite.c (gmp_cst_to_tree): Moved.
6892 (iv_stack_entry_is_constant): New.
6893 (iv_stack_entry_is_iv): New.
6894 (loop_iv_stack_push): Renamed to loop_iv_stack_push_iv.
6895 (loop_iv_stack_insert_constant): New.
6896 (loop_iv_stack_pop): Use new datatpype.
6897 (loop_iv_stack_get_iv): Same.
6898 (loop_iv_stack_get_iv_from_name): Same.
6899 (loop_iv_stack_debug): Renamed to debug_loop_iv_stack.
6900 (loop_iv_stack_patch_for_consts): New.
6901 (loop_iv_stack_remove_constants): New.
6902 (graphite_create_new_loop): Use loop_iv_stack_push_iv.
6903 (translate_clast): Call loop_iv_stack_patch_for_consts and
6904 loop_iv_stack_remove_constants.
6905 (gloog): Use new datatype. Redirect construction edge to end
6906 block to avoid accidental deletion.
6907 * graphite.h (enum iv_stack_entry_kind): New. Tag for data in
6909 (union iv_stack_entry_data): New. Data in iv stack entry.
6910 (struct iv_stack_entry): New. Datatype for iv stack entries.
6912 2008-10-02 Sebastian Pop <sebastian.pop@amd.com>
6914 * tree-ssa-loop-ivopts.c (rewrite_use_nonlinear_expr): Convert
6915 operand type when copying the operand to a variable of different type.
6917 2008-10-02 Sebastian Pop <sebastian.pop@amd.com>
6919 * cfgloopmanip.c (create_empty_loop_on_edge): Write exit condition
6920 with the IV name after increment.
6922 2008-10-02 Sebastian Pop <sebastian.pop@amd.com>
6924 * Merge from mainline (r140164:140838).
6926 2008-09-10 Konrad Trifunovic <konrad.trifunovic@inria.fr>
6928 * graphite-data-ref.c: New.
6929 * graphite.c (print_scop): Also dump the dependence graph.
6930 (bb_in_scop_p, loop_in_scop_p, nb_loops_around_gb): Moved...
6931 (new_scop): Initialize SCOP_DEP_GRAPH.
6932 (build_scop_dynamic_schedules): New.
6933 (build_access_matrix_with_af): Fixed column numbering.
6934 (graphite_transform_loops): Call build_scop_dynamic_schedules.
6935 * graphite.h: Add ifndef/define guards against multiple inclusion.
6936 (struct scop): Add dep_graph field.
6937 (SCOP_DEP_GRAPH): Defined.
6938 (ref_nb_loops): Fixed and moved to other position.
6939 (bb_in_scop_p, loop_in_scop_p, nb_loops_around_gb): ... here.
6940 (nb_loops_around_loop_in_scop): New.
6941 (graphite_dump_dependence_graph): Declared.
6942 (graphite_build_rdg_all_levels): Declared.
6943 (graphite_test_dependence): Declared.
6944 * Makefile.in (graphite-data-ref.o): New target.
6946 2008-09-09 Sebastian Pop <sebastian.pop@amd.com>
6948 * Merge from mainline (139870:140164).
6950 2008-09-01 Sebastian Pop <sebastian.pop@amd.com>
6952 * Merge from mainline (138275:139870).
6953 * gcc.dg/graphite/scop-matmult.c: XFailed as one of
6954 the commits from trunk broke the niter detection.
6956 2008-09-01 Sebastian Pop <sebastian.pop@amd.com>
6958 * graphite.c: Add more documentation. Fix formatting.
6959 (debug_loop_vec, debug_oldivs, loop_iv_stack,
6960 loop_iv_stack_debug): Moved...
6961 (schedule_to_scattering): Move before use.
6962 (dot_all_scops): Include in "#if 0" the code for system
6965 * graphite.h: (debug_loop_vec, debug_oldivs, loop_iv_stack,
6966 loop_iv_stack_debug): ...here.
6968 2008-08-29 Jan Sjodin <jan.sjodin@amd.com>
6970 * tree-phinodes.c (make_phi_node): Extern.
6971 (add_phi_node_to_bb): New.
6972 (create_phi_node): Call add_phi_node_to_bb.
6973 * tree-ssa-loop-ivopts.c (get_phi_with_result): New.
6974 (remove_statement): Handle case where stored phi was updated
6975 and is no longer the same.
6976 * graphite.c (is_parameter): New.
6978 (expand_scalar_variables_expr): New.
6979 (expand_scalar_variables_stmt): New.
6980 (expand_scalar_variables): New.
6981 (move_phi_nodes): Create new phi instead of moving old one.
6982 (translate_clast): Call expand_scalar_variables.
6983 (find_vdef_for_var_in_bb): Also scan regular definitions.
6984 (skip_phi_defs): New.
6985 (collect_scop_exit_phi_args): New.
6986 (patch_scop_exit_phi_args): New.
6987 (gloog): Patch phis after scop.
6988 * tree-flow.h: (add_phi_node_to_bb): Declared.
6989 (make_phi_node): Declared.
6991 2008-08-26 Sebastian Pop <sebastian.pop@amd.com>
6993 * graphite.c (end_scop): Split the entry of the scop when it
6994 is the header of the loop in which the scop is ending.
6995 (build_scops_1, limit_scops): Update uses of end_scop.
6997 2008-08-26 Sebastian Pop <sebastian.pop@amd.com>
6999 * graphite.c (dot_all_scops_1): Do not fail on uninitialized
7000 SCOP_ENTRY or SCOP_EXIT.
7002 2008-08-25 Sebastian Pop <sebastian.pop@amd.com>
7004 * graphite.c (get_construction_edge): Removed.
7005 (gloog): Construction edge is the scop entry edge.
7007 2008-08-25 Sebastian Pop <sebastian.pop@amd.com>
7009 * graphite.c (can_generate_for_scop): Removed.
7010 (gloog): Do not call it.
7012 2008-08-25 Sebastian Pop <sebastian.pop@amd.com>
7014 * graphite.c (new_scop): Entry of a scop is an edge.
7015 Initialize SESE region.
7016 (free_scop): Free SESE region.
7017 (build_scops_1, scopdet_bb_info): Work on edges, not on bbs.
7018 (split_difficult_bb): New, split from end_scop.
7019 (end_scop): Exit of a scop is an edge.
7020 (build_scop_bbs): Never check CDI_POST_DOMINATORS: this info is
7021 not automatically updated and thus is always wrong.
7022 * graphite.h (struct sese): New.
7025 (struct scop): New field for a SESE region. Remove entry, exit.
7026 (SCOP_ENTRY, SCOP_EXIT): Update definitions to match same
7027 semantics as before. Moved comment around.
7029 2008-08-25 Tobias Grosser <grosser@fim.uni-passau.de>
7030 Sebastian Pop <sebastian.pop@amd.com>
7032 * graphite.c (graphite_transform_loops): Always enable gloog
7033 and find_transform when ENABLE_CHECKING.
7035 2008-08-25 Sebastian Pop <sebastian.pop@amd.com>
7037 * graphite.c (graphite_transform_loops): Move pretty printer
7038 of SCOPs before doing any transform. Remove call to print_scops
7039 and dot_all_scops_1.
7041 2008-08-25 Sebastian Pop <sebastian.pop@amd.com>
7043 * graphite.c (dump_gbb_conditions): Don't try to print NULL pointers.
7044 (print_graphite_bb): Same.
7046 2008-08-25 Sebastian Pop <sebastian.pop@amd.com>
7048 * graphite.c (dot_all_scops_1): Cleanup.
7049 (move_scops): Fix comment.
7051 2008-08-25 Sebastian Pop <sebastian.pop@amd.com>
7053 * graphite.c (build_scop_bbs): Revert commit 139355:
7055 2008-08-20 Sebastian Pop <sebastian.pop@amd.com>
7056 Dwarakanath Rajagopal <dwarak.rajagopal@amd.com>
7058 * graphite.c (build_scop_bbs): Factor up code.
7060 2008-08-25 Tobias Grosser <grosser@fim.uni-passau.de>
7062 * graphite.c (gloog): Update dominator info.
7064 2008-08-25 Tobias Grosser <grosser@fim.uni-passau.de>
7066 * graphite.c (remove_cond_exprs): Do not fail on empty bbs.
7068 2008-08-24 Sebastian Pop <sebastian.pop@amd.com>
7070 * graphite.c (new_graphite_bb): Remove GBB_INDEX_TO_NUM_MAP
7072 (free_graphite_bb): Remove GBB_INDEX_TO_NUM_MAP free.
7073 (translate_clast): Correct formatting.
7074 * graphite.h (struct num_map): Removed.
7075 (struct graphite_bb): Remove num_map field.
7076 (GBB_INDEX_TO_NUM_MAP): Removed.
7078 2008-08-24 Sebastian Pop <sebastian.pop@amd.com>
7080 * graphite.c (build_access_matrix_with_af): Fix comments.
7081 (build_scop_data_accesses): Same.
7083 2008-08-24 Sebastian Pop <sebastian.pop@amd.com>
7085 * graphite.c (build_scop_data_accesses): Don't construct
7086 access matrices. Add a FIXME and an assert condition that
7087 should pass when the access matrices will be needed.
7089 2008-08-24 Sebastian Pop <sebastian.pop@amd.com>
7091 * tree-data-ref.c (stmt_simple_memref_p): Don't call
7093 * graphite.c (build_graphite_bb): Renamed new_graphite_bb.
7094 Moved close by free_graphite_bb.
7095 (free_graphite_bb): Call free_data_refs. Reset bb->aux.
7096 (new_scop): Move close by free_scop.
7097 (graphite_transform_loops): Avoid linear scan to reset bb->aux.
7099 2008-08-22 Jan Sjodin <jan.sjodin@amd.com>
7101 * cfgloopmanip.c (create_empty_if_region_on_edge): New.
7102 * graphite.c (clast_to_gcc_expression): Call gmp_cst_to_tree
7103 instead of recursive call.
7104 (graphite_translate_clast_equation): New.
7105 (graphite_create_guard_cond_expr): New.
7106 (graphite_create_new_guard): New.
7107 (get_stack_index_from_iv): Removed.
7108 (graphite_rename_ivs_stmt): Use gbb_loop_index.
7109 (get_true_edge_from_guard_bb): New.
7110 (translate_clast): Handle stmt_guard in clast.
7111 (get_construction_edge): Allow construction edge detection for
7112 a scope entry with multiple predecessors if one predecessor is
7113 the immediate dominator of scope entry.
7114 (can_generate_code_stmt): Enable code generation for clast_guard.
7115 (gloog): Use correct context loop. Removed check for post dominators.
7116 * cfgloop.h (create_empty_if_region_on_edge): Declared.
7118 2008-08-21 Sebastian Pop <sebastian.pop@amd.com>
7120 * graphite.c (remove_dead_loops): Document better which
7123 2008-08-21 Sebastian Pop <sebastian.pop@amd.com>
7125 * Makefile.in: Rename POLYLIBLIBS and POLYLIBINC to PPLLIBS
7127 (graphite.o): Also depends on pointer-set.h.
7129 2008-08-21 Sebastian Pop <sebastian.pop@amd.com>
7131 * graphite.c (scop_record_loop): Fix compile warning.
7133 2008-08-21 Harsha Jagasia <harsha.jagasia@amd.com>
7134 Sebastian Pop <sebastian.pop@amd.com>
7136 * graphite.c (scop_record_loop): DECL_NAME can be NULL.
7138 2008-08-21 Sebastian Pop <sebastian.pop@amd.com>
7140 * graphite.c (build_graphite_bb): Initialize bb->aux to
7141 point to the graphite_bb_p.
7142 (graphite_bb_from_bb): Renamed gbb_from_bb; returns the
7144 (add_bb_domains): Does not use the scop parameter.
7145 (graphite_transform_loops): Clean bb->aux at the end.
7147 2008-08-20 Dwarakanath Rajagopal <dwarak.rajagopal@amd.com>
7148 Sebastian Pop <sebastian.pop@amd.com>
7150 * lib/target-supports.exp
7151 (check_effective_target_fgraphite): New.
7153 * gcc.dg/graphite/graphite.exp: Early exit when
7154 check_effective_target_fgraphite returns false.
7155 Set dg-do-what-default to compile.
7156 (scan-graphite-dump-times): Removed.
7157 * gfortran.dg/graphite/graphite.exp: Same.
7159 * gcc.dg/graphite/scop-0.c: Do not use "dg-do compile".
7160 Use scan-tree-dump-times instead of scan-graphite-dump-times.
7161 * gcc.dg/graphite/scop-1.c: Same.
7162 * gcc.dg/graphite/scop-2.c: Same.
7163 * gcc.dg/graphite/scop-3.c: Same.
7164 * gcc.dg/graphite/scop-4.c: Same.
7165 * gcc.dg/graphite/scop-5.c: Same.
7166 * gcc.dg/graphite/scop-6.c: Same.
7167 * gcc.dg/graphite/scop-7.c: Same.
7168 * gcc.dg/graphite/scop-8.c: Same.
7169 * gcc.dg/graphite/scop-9.c: Same.
7170 * gcc.dg/graphite/scop-10.c: Same.
7171 * gcc.dg/graphite/scop-11.c: Same.
7172 * gcc.dg/graphite/scop-12.c: Same.
7173 * gcc.dg/graphite/scop-13.c: Same.
7174 * gcc.dg/graphite/scop-matmult.c: Same.
7175 * gcc.dg/graphite/scop-14.c: Same.
7176 * gcc.dg/graphite/scop-15.c: Same.
7177 * gcc.dg/graphite/block-0.c: Same.
7178 * gcc.dg/graphite/scop-16.c: Same.
7179 * gcc.dg/graphite/block-1.c: Same.
7180 * gcc.dg/graphite/scop-17.c: Same.
7181 * gcc.dg/graphite/scop-18.c: Same.
7182 * gfortran.dg/graphite/block-1.f90: Same.
7183 * gfortran.dg/graphite/scop-1.f: Same.
7184 * gfortran.dg/graphite/block-2.f: Same.
7186 2008-08-20 Sebastian Pop <sebastian.pop@amd.com>
7188 * graphite.c: Fix some XXX comments.
7189 (build_scop_dynamic_schedules): Removed.
7191 2008-08-20 Sebastian Pop <sebastian.pop@amd.com>
7193 * graphite.h (scop_max_loop_depth): Moved...
7194 * graphite.c (scop_max_loop_depth): ...here.
7195 (remove_all_edges_1): New.
7196 (remove_all_edges): Factored code.
7197 (remove_cond_exprs): Check only the last statement for
7198 a GIMPLE_COND expression.
7200 2008-08-20 Sebastian Pop <sebastian.pop@amd.com>
7202 * graphite.c (scan_tree_for_params): Early return when the
7203 expression is a chrec_dont_know. Handle case NEGATE_EXPR.
7204 (find_scop_parameters): Factor out code.
7205 (graphite_trans_bb_strip_mine): Remove dead code.
7207 2008-08-20 Sebastian Pop <sebastian.pop@amd.com>
7209 * graphite.c (clast_to_gcc_expression, graphite_create_new_loop,
7210 graphite_trans_bb_move_loop): Factor asserts.
7211 (gloog): Perform sanity checks only for ENABLE_CHECKING.
7212 Do not call calculate_dominance_info and estimate_bb_frequencies.
7214 2008-08-20 Jan Sjodin <jan.sjodin@amd.com>
7216 * graphite.c (create_loops_mapping, free_loops_mapping,
7217 create_loops_mapping_num, debug_loop_mapping_1,
7218 debug_loop_mapping, graphite_loops_mapping_max_loop_num,
7219 get_loop_mapping_for_num, graphite_loops_mapping_add_child,
7220 graphite_loops_mapping_add_child_num,
7221 graphite_loops_mapping_insert_child,
7222 graphite_loops_mapping_parent, get_loop_mapped_depth_for_num,
7223 get_loop_mapped_depth, split_loop_mapped_depth_for_num,
7224 loop_mapped_depth_split_loop, swap_loop_mapped_depth_for_num,
7225 create_num_from_index, get_num_from_index,
7226 swap_loop_mapped_depth): Removed.
7227 (new_scop): Do not initialize SCOP_LOOPS_MAPPING.
7228 (free_scop): Do not call free_loops_mapping.
7229 (graphite_get_new_iv_stack_index_from_old_iv): Renamed
7230 get_stack_index_from_iv. Use GBB_LOOPS instead of calling
7231 get_loop_mapped_depth.
7232 (graphite_trans_bb_move_loop): Do not update the loop mapping.
7233 (graphite_trans_bb_strip_mine): Same.
7234 * graphite.h (graphite_loops_mapping, graphite_loop_node): Removed.
7235 (struct scop): Remove field loops_mapping.
7237 2008-08-20 Sebastian Pop <sebastian.pop@amd.com>
7238 Dwarakanath Rajagopal <dwarak.rajagopal@amd.com>
7240 * graphite.c (scop_record_loop): Factor out one level of the
7241 condition by early return.
7242 (build_scop_loop_nests): Format following FSF coding style.
7243 (build_scop_dynamic_schedules): Factor out code.
7244 (scopdet_bb_info): Reindent. Default case should not be reachable.
7246 2008-08-20 Sebastian Pop <sebastian.pop@amd.com>
7247 Dwarakanath Rajagopal <dwarak.rajagopal@amd.com>
7249 * graphite.c (loop_affine_expr): Check for DECL_P or struct
7250 assignments that are not handled as simple operands for now.
7252 2008-08-20 Sebastian Pop <sebastian.pop@amd.com>
7253 Dwarakanath Rajagopal <dwarak.rajagopal@amd.com>
7255 * graphite.c (build_scop_bbs): Factor up code.
7257 2008-08-20 Sebastian Pop <sebastian.pop@amd.com>
7258 Dwarakanath Rajagopal <dwarak.rajagopal@amd.com>
7260 * graphite.c (stmt_simple_for_scop_p): Factor code out
7262 (enum gbb_type): New. Group all the GBB_* types under it.
7263 (is_loop_exit): Moved...
7264 (end_scop): Enable BB spliting.
7265 * cfgloop.c (is_loop_exit): ...here. Reimplemented.
7266 * cfgloop.h (is_loop_exit): Declared.
7268 2008-08-20 Sebastian Pop <sebastian.pop@amd.com>
7270 * doc/invoke.texi: Remove strides from examples containing
7271 DO loops when the strides are equal to 1.
7273 2008-08-20 Harsha Jagasia <harsha.jagasia@amd.com>
7274 Dwarakanath Rajagopal <dwarak.rajagopal@amd.com>
7276 * graphite.c (graphite_trans_scop_block): Or the result with
7277 the result from graphite_trans_loop_block.
7278 * gcc.dg/graphite/block-1.c: New.
7279 * gfortran.dg/graphite/block-1.f90: New.
7280 * gfortran.dg/graphite/block-2.f: New.
7282 2008-08-20 Sebastian Pop <sebastian.pop@amd.com>
7284 * graphite.c (graphite_transform_loops): Call cloog_initialize
7287 2008-08-20 Sebastian Pop <sebastian.pop@amd.com>
7289 * tree-data-ref.c) (stmt_simple_memref_p): New.
7290 * tree-data-ref.h (stmt_simple_memref_p): Declared.
7291 * graphite.c (stmt_simple_memref_for_scop_p): Removed.
7292 (is_simple_operand): Call stmt_simple_memref_p.
7294 * gcc.dg/graphite/scop-matmult.c: Updated for not
7295 using pointer arithmetic, as this is optimized by PRE and
7296 makes the code too difficult to analyze.
7298 * gcc.dg/graphite/scop-18.c: Same.
7300 2008-08-20 Sebastian Pop <sebastian.pop@amd.com>
7302 * gdbinit.in (pgg): New.
7304 2008-08-15 Tobias Grosser <grosser@fim.uni-passau.de>
7306 * graphite.c (graphite_trans_loop_block): Fix warning.
7308 2008-08-15 Tobias Grosser <grosser@fim.uni-passau.de>
7310 * graphite.c (graphite_trans_loop_block): Fix my merge error.
7312 2008-08-15 Tobias Grosser <grosser@fim.uni-passau.de>
7314 * graphite.c (graphite_trans_bb_block): Remove check for
7315 flag_loop_strip_mine, flag_loop_block, flag_loop_interchange.
7316 Check if loop blocking is profitable for every loop, before applying
7318 (graphite_apply_transformations): Call graphite_trans_bb_block only,
7319 if flag_loop_block is set.
7321 2008-08-14 Sebastian Pop <sebastian.pop@amd.com>
7323 * graphite.c: Add some more documentation for the loop
7326 2008-08-14 Sebastian Pop <sebastian.pop@amd.com>
7328 * Makefile.in (tree-data-ref.o): Remove dependence on graphite.h.
7329 * graphite.c: Format on less than 80 columns.
7332 2008-08-14 Sebastian Pop <sebastian.pop@amd.com>
7334 * cfgloopmanip.c (loopify): Use update_dominators_in_loop.
7336 2008-08-14 Sebastian Pop <sebastian.pop@amd.com>
7338 * doc/invoke.texi (floop-block, floop-strip-mine,
7339 floop-interchange): Update documentation with examples.
7341 2008-08-13 Sebastian Pop <sebastian.pop@amd.com>
7343 * cfgloopmanip.c (create_empty_loop_on_edge): Don't call
7345 * graphite.c (graphite_create_new_loop): Call add_referenced_var.
7347 2008-08-13 Sebastian Pop <sebastian.pop@amd.com>
7349 * cfgloopmanip.c (create_empty_loop_on_edge): Improve documentation.
7350 Factor gcc_asserts into a single one. Use force_gimple_operand_gsi.
7351 * tree-scalar-evolution.c: Revert useless changes.
7352 * tree-phinodes.c: Same.
7355 * tree-vectorizer.h: Same.
7356 * tree-flow.h: Same.
7358 * common.opt (fgraphite): Update documentation.
7360 2008-08-12 Harsha Jagasia <harsha.jagasia@amd.com>
7362 * doc/invoke.texi (-floop-block, -floop-strip-mine,
7363 -floop-interchange): Add more text for explaining what each of these
7365 * tree-into-ssa.c (gimple_vec): Moved to...
7366 * graphite.c: Include gimple.h.
7367 (gimple_vec): Moved to...
7368 (del_loop_to_cloog_loop): Removed.
7369 (loop_affine_expr): Do not call create_data_ref when the
7370 operand is a constant.
7371 (new_scop): Use free instead of del_loop_to_cloog_loop.
7372 * Makefile.in (graphite.o): Depend on GIMPLE_H.
7373 * gimple.h (gimple_vec): ... here.
7375 2008-08-11 Tobias Grosser <grosser@fim.uni-passau.de>
7377 * graphite.c (scopdet_bb_info): Only allow loops with known number of
7379 (build_loop_iteration_domains): Fail, if latch executions unknown.
7381 2008-08-11 Tobias Grosser <grosser@fim.uni-passau.de>
7383 * graphite.c (add_conditions_to_domain): New.
7384 (build_scop_conditions_1): Call add_conditions_to_domain.
7385 (set_cloog_options): Allow to disable optimizations.
7387 2008-08-11 Tobias Grosser <grosser@fim.uni-passau.de>
7389 * graphite.c (find_params_in_bb): Look for parameters in conditions.
7390 Do not use walk_dominator_tree.
7391 (find_scop_parameters): Do not use walk_dominator_tree.
7393 2008-08-11 Tobias Grosser <grosser@fim.uni-passau.de>
7395 * graphite.c (scan_tree_for_params) Add / Subtract inequality.
7396 (idx_record_params): Adapt.
7397 * graphite.h (scop_gimple_loop_depth): New.
7399 2008-08-11 Tobias Grosser <grosser@fim.uni-passau.de>
7401 * graphite.c (build_scop_dynamic_schedules): Remove value_init.
7402 (scan_tree_for_params): Remove value_init.
7403 (build_scop_context): Remove value_init.
7404 (build_loop_iteration_domains): Remove value_init.
7405 (schedule_to_scattering): Remove value_init.
7406 (graphite_trans_bb_strip_mine): Remove value_init.
7408 2008-08-11 Tobias Grosser <grosser@fim.uni-passau.de>
7410 * gcc/graphite.c (limit_scops): New.
7411 (graphite_transform_loops): Add limit SCoPs.
7412 * gcc.dg/graphite/scop-0.c: Update number of SCoPs.
7413 * gcc.dg/graphite/scop-1.c: Update number of SCoPs.
7414 * gcc.dg/graphite/scop-10.c: Update number of SCoPs.
7415 * gcc.dg/graphite/scop-11.c: Update number of SCoPs.
7416 * gcc.dg/graphite/scop-12.c: Update number of SCoPs.
7417 * gcc.dg/graphite/scop-13.c: Update number of SCoPs.
7418 * gcc.dg/graphite/scop-14.c: Update number of SCoPs.
7419 * gcc.dg/graphite/scop-15.c: Update number of SCoPs.
7420 * gcc.dg/graphite/scop-16.c: Update number of SCoPs.
7421 Change loop numbers.
7422 * gcc.dg/graphite/scop-17.c: Update number of SCoPs.
7423 Change loop numbers.
7424 * gcc.dg/graphite/scop-18.c: Update number of SCoPs.
7425 * gcc.dg/graphite/scop-2.c: Update number of SCoPs.
7426 * gcc.dg/graphite/scop-3.c: Update number of SCoPs.
7427 * gcc.dg/graphite/scop-4.c: Update number of SCoPs.
7428 * gcc.dg/graphite/scop-5.c: Update number of SCoPs.
7429 * gcc.dg/graphite/scop-6.c: Update number of SCoPs.
7430 * gcc.dg/graphite/scop-7.c: Update number of SCoPs.
7431 * gcc.dg/graphite/scop-8.c: Update number of SCoPs.
7432 * gcc.dg/graphite/scop-9.c: Update number of SCoPs.
7433 * gcc.dg/graphite/scop-matmult.c: Update number of SCoPs.
7435 2008-08-11 Tobias Grosser <grosser@fim.uni-passau.de>
7437 * graphite.c (graphite_transform_loops): Call always find_transform.
7439 2008-08-08 Tobias Grosser <grosser@fim.uni-passau.de>
7441 * graphite.c (free_loops_mapping): New.
7442 (stmt_simple_for_scop_p): Fix typo.
7443 (stmt_simple_for_scop_p): Fix tuples functions, that
7445 (free_graphite_bb): Fix some memleaks.
7446 (free_scop): Fix some memleaks.
7447 (scopdet_bb_info): Do not forget some tmp SCoPs.
7448 (find_params_in_bb): Fix some memleaks.
7449 (clast_to_gcc_expression): Fix warning.
7451 2008-08-07 Tobias Grosser <grosser@fim.uni-passau.de>
7453 * gcc.dg/graphite/scop-16.c: Fix for 32bit.
7454 * gcc.dg/graphite/scop-17.c: Fix for 32bit.
7456 2008-08-04 Sebastian Pop <sebastian.pop@amd.com>
7458 * tree-ssa-loop.c (tree-ssa-loop.o): Do not include toplev.h.
7459 Move code ifdef-ed HAVE_cloog...
7460 * graphite.c: Include toplev.h.
7462 * Makefile.in (OBJS-common): Always build graphite.o.
7463 (BACKEND): Remove @GRAPHITE@.
7464 (tree-ssa-loop.o): Do not depend on TOPLEV_H.
7465 (graphite.o): Depend on TOPLEV_H.
7467 2008-08-04 Sebastian Pop <sebastian.pop@amd.com>
7469 * Makefile.in (tree-ssa-loop.o): Depend on TOPLEV_H.
7470 Remove typo left from polylib to ppl conversion.
7471 * graphite.c (graphite_transforms): Use sorry instead of fatal.
7473 2008-08-03 Sebastian Pop <sebastian.pop@amd.com>
7475 * toplev.c (process_options): Move the graphite loop optimization
7477 * tree-ssa-loop.c (graphite_transforms): ... here.
7478 When not configured with CLooG, print to dump_file that
7479 Graphite transforms were not performed.
7480 * gcc.dg/graphite/graphite.exp (scan-graphite-dump-times):
7482 * gcc.dg/graphite/*.c: Updated all testcases to use
7483 scan-graphite-dump-times.
7485 2008-08-03 Sebastian Pop <sebastian.pop@amd.com>
7487 * graphite.c (dot_scop, dot_all_scops): Do not call system.
7488 Do not open /tmp/scop.dot and /tmp/allscops.dot.
7490 2008-08-02 Sebastian Pop <sebastian.pop@amd.com>
7491 Jan Sjodin <jan.sjodin@amd.com>
7493 * configure: Regenerated.
7494 * omp-low.c (expand_omp_sections): Remove now unused code.
7495 * config.in (HAVE_polylib): Removed.
7496 * configure.ac (HAVE_polylib, POLYLIBLIBS, POLYLIBINC): Removed.
7497 (PPLLIBS, PPLINC): Added.
7498 * graphite.c: Replace unsigned with int wherever possible.
7499 Don't access Cloog's data structures, but use accessor functions.
7500 Clast's stmt->type is now implemented as a vtable: change the
7501 switches of stmt->type into ifs.
7502 (polylib/polylibgmp.h): Don't include.
7503 (initialize_dependence_polyhedron,
7504 initialize_data_dependence_polyhedron, is_empty_polyhedron,
7505 statement_precedes_p, test_dependence, build_rdg_all_levels,
7506 dump_dependence_graph): Removed until this code is cleaned up
7508 * Makefile.in (POLYLIBLIBS): Renamed PPLLIBS.
7509 (POLYLIBINC): Renamed PPLINC.
7511 2008-08-01 Harsha Jagasia <harsha.jagasia@amd.com>
7512 Dwarakanath Rajagopal <dwarak.rajagopal@amd.com>
7513 Jan Sjodin <jan.sjodin@amd.com>
7515 Finish the merge and tuplification of graphite.
7517 2008-07-24 Sebastian Pop <sebastian.pop@amd.com>
7518 Jan Sjodin <jan.sjodin@amd.com>
7520 Partial merge from mainline (138072:138275).
7521 * graphite.c still has to be tuplified.
7523 2008-07-29 Jan Sjodin <jan.sjodin@amd.com>
7525 * graphite.c (graphite_loops_mapping_max_loop_num): New.
7526 (create_num_from_index): New.
7527 (get_num_from_index): Also pass in the graphite BB.
7528 (free_graphite_bb): Free GBB_INDEX_TO_NUM_MAP.
7529 (build_graphite_bb): Initialize GBB_INDEX_TO_NUM_MAP.
7530 (graphite_trans_bb_strip_mine): Call create_num_from_index.
7531 (is_interchange_valid): Return false when failing.
7532 * graphite.h (struct num_map): New.
7533 (struct graphite_bb): New field num_map.
7534 (GBB_LOOPS_MAPPING): Renamed GBB_INDEX_TO_NUM_MAP.
7536 2008-07-29 Tobias Grosser <grosser@fim.uni-passau.de>
7538 * graphite.c (dump_gbb_conditions): Print also conditions like
7539 "if (a)". Remove dublicated code and use print_generic_expr ().
7540 (stmt_simple_for_scop_p): Only allow conditions we can handle
7543 2008-07-25 Jan Sjodin <jan.sjodin@amd.com>
7545 * graphite.h (struct scop): Removed new_ivs field.
7546 (SCOP_NEWIVS): Deleted.
7547 * graphite.c (new_scop, free_scop, clast_name_to_gcc,
7548 clast_to_gcc_expression, graphite_create_new_loop):
7549 Removed use of new_ivs.
7551 2008-07-25 Jan Sjodin <jan.sjodin@amd.com>
7553 * graphite.c (debug_oldivs, debug_loop_vec, create_loops_mapping,
7554 create_loops_mapping_num, debug_loop_mapping_1): New.
7555 (debug_loop_mapping): Call debug_loop_mapping_1.
7556 (get_loop_mapping_for_num,
7557 graphite_loops_mapping_add_child,
7558 graphite_loops_mapping_add_child_num,
7559 graphite_loops_mapping_insert_child,
7560 graphite_loops_mapping_parent,
7561 split_loop_mapped_depth_for_num,
7562 loop_mapped_depth_split_loop): New.
7563 (increment_loop_mapped_depths): Removed.
7564 (swap_loop_mapped_depth_for_num): Reimplemented.
7565 (new_scop): Call create_loops_mapping.
7566 (scop_record_loop): Call graphite_loops_mapping_insert_child.
7567 (translate_clast): Pass the old loop father in parameter, and pass
7568 it to get_old_iv_from_ssa_name.
7569 (remove_edges_around_useless_blocks, can_generate_code_stmt,
7570 can_generate_code, can_generate_for_scop): New.
7571 (graphite_trans_bb_block): Returns false when it fails to transform.
7572 * graphite.h (graphite_loop_node, graphite_loops_mapping): New.
7574 2008-07-25 Sebastian Pop <sebastian.pop@amd.com>
7576 Reverted all the changes related to the streamization and
7578 These changes are now tracked in the streamization branch.
7580 2008-07-25 Sebastian Pop <sebastian.pop@amd.com>
7581 Jan Sjodin <jan.sjodin@amd.com>
7583 * graphite.c (gbb_compare): Correctly constify.
7584 (gbb_can_be_ignored): Indent.
7585 (graphite_trans_scop_swap_1and2): Add legality check.
7588 2008-07-25 Sebastian Pop <sebastian.pop@amd.com>
7590 Remove fallouts from "Reverted the Condate changes".
7591 * tree.h: Remove unused decl.
7592 * gcc.dg/tree-checker: Same.
7593 * timevar.def: Remove counter.
7595 2008-07-24 Sebastian Pop <sebastian.pop@amd.com>
7597 * Merge from mainline (135673:138072).
7599 Reverted the MIRO changes (from 2008-04-05) that are now
7600 tracked in the miro branch.
7601 * tree-bounds.c: Removed.
7602 * tree-bounds.h: Removed.
7604 Reverted the Condate changes (from 2006-07-04, 2007-03-20) that
7605 are now tracked in the condate branch.
7606 * tree-check.c: Removed.
7607 * tree-match.c: Removed.
7608 * condate.y: Removed.
7610 2008-07-24 Dwarakanath Rajagopal <dwarak.rajagopal@amd.com>
7612 * common.opt: New user flag -floop-block, -floop-strip-mine
7613 and -floop-interchange.
7614 * toplev.c (process_options): Enable -fgraphite pass if any one of the
7615 graphite loop optimization flags is turned on.
7616 * graphite.c (graphite_apply_transformations): Add flag_loop_block,
7617 flag_loop_strip_mine and flag_loop_interchange checks before
7619 * doc/invoke.texi: Remove -fgraphite and add -floop-block,
7620 -floop-strip-mine and -floop-interchange.
7621 * gcc.dg/graphite/block-0.c: Add -floop-block and remove
7623 * gcc.dg/graphite/scop-16.c: Ditto.
7624 * gcc.dg/graphite/scop-17.c: Ditto.
7625 * gcc.dg/graphite/scop-18.c: Ditto.
7627 2008-07-23 Jan Sjodin <jan.sjodin@amd.com>
7628 Sebastian Pop <sebastian.pop@amd.com>
7630 * cfgloopmanip.c (update_dominators_in_loop): Make it static.
7631 (create_empty_loop_on_edge): More fixes.
7632 * tree-phinodes.c (resize_phi_node): Extern.
7633 (unlink_phi_node, move_phi_node): New split from remove_phi_node.
7634 * cfghooks.c (update_dominator_information): New split from
7636 * tree-vectorizer.c (rename_variables_in_bb): Extern.
7637 * tree-dfa.c (collect_dfa_stats): Start walking the CFG on the
7638 successor of the function entry block.
7640 * graphite.c: Include pointer-set.h.
7641 (debug_loop_mapping, increment_loop_mapped_depths,
7642 get_loop_mapped_depth_for_num, get_loop_mapped_depth,
7643 set_loop_mapped_depth_for_num, set_loop_mapped_depth,
7644 swap_loop_mapped_depth_for_num, get_num_from_index,
7645 swap_loop_mapped_depth, loop_iv_stack_debug,
7646 loop_iv_stack_push, loop_iv_stack_pop, loop_iv_stack_get_iv,
7647 loop_iv_stack_get_iv_from_name, loop_iv_stack_debug,
7648 get_old_iv_from_ssa_name): New.
7649 (new_scop): Initialize SCOP_LOOPS_MAPPING.
7650 (free_scop): Free SCOP_LOOPS_MAPPING.
7651 (scop_record_loop): Record old ivs.
7652 (create_var_name): Removed.
7653 (initialize_cloog_names): Allocate double space in case strip mine
7654 applies to all loops once.
7655 (clast_name_to_gcc): Look up in the map ivstack passed in parameter.
7656 (clast_to_gcc_expression): Same. Implement more clast to gimple
7658 (graphite_create_new_loop): Pass in ivstack.
7659 (remove_all_edges): Pass in the construction_edge.
7660 (graphite_remove_iv): Removed.
7661 (graphite_rename_ivs, graphite_rename_ivs_stmt,
7662 remove_cond_exprs): Rewritten.
7663 (move_phi_nodes): New.
7664 (disconnect_virtual_phi_nodes, disconnect_cond_expr): Removed.
7665 (translate_clast): Pass in ivstack. Rewrite some cases.
7666 (set_cloog_options, debug_clast_stmt): New.
7667 (find_transform): Use set_cloog_options.
7668 (outermost_loop_layer): Removed.
7669 (get_construction_edge, collect_virtual_phis, find_vdef_for_var_in_bb,
7670 find_vdef_for_var_1, find_vdef_for_var, patch_phis_for_virtual_defs,
7671 mark_old_loops, remove_dead_loops): New.
7673 (graphite_trans_bb_move_loop): Call swap_loop_mapped_depth.
7674 (const_column_index, get_first_matching_sign_row_index,
7675 get_lower_bound_row, get_upper_bound_row, get_lower_bound,
7676 get_upper_bound): New.
7677 (graphite_trans_bb_strip_mine): Also update the iv map.
7679 * graphite.h (graphite_loops_mapping, GBB_LOOPS_MAPPING): New.
7680 (struct name_tree): Add a loop field.
7681 (struct scop): Add a graphite_loops_mapping field.
7682 (SCOP_LOOPS_MAPPING): New.
7683 (debug_clast_stmt): Declare.
7684 * lambda.h (find_induction_var_from_exit_cond): Declare.
7685 (lambda-code.c): (find_induction_var_from_exit_cond): Extern.
7686 * cfgloop.h (update_dominators_in_loop): Removed declaration.
7687 (create_empty_loop_on_edge): Updated.
7688 * tree-flow.h (remove_bb, resize_phi_node, move_phi_node,
7689 rename_variables_in_bb): Declare.
7690 * tree-cfg.c (remove_bb): Extern.
7692 * gcc.dg/graphite/block-0.c: New.
7694 2008-07-21 Dwarakanath Rajagopal <dwarak.rajagopal@amd.com>
7695 Sebastian Pop <sebastian.pop@amd.com>
7697 * graphite.c (strip_mine_profitable_p): New.
7698 (graphite_trans_bb_block): Disable strip mining if not profitable.
7700 * gcc.dg/graphite/scop-18.c: New.
7701 * gcc.dg/graphite/scop-17.c: Fixed.
7702 * gcc.dg/graphite/scop-16.c: Fixed.
7704 2008-07-17 Harsha Jagasia <harsha.jagasia@amd.com>
7705 Jan Sjodin <jan.sjodin@amd.com>
7706 Sebastian Pop <sebastian.pop@amd.com>
7708 * graphite.c (is_interchange_valid): New.
7709 (graphite_trans_bb_block): Check loop nest of basic block for legality
7712 * graphite.h (gbb_inner_most_loop_index, outer_most_loop_1,
7713 outer_most_loop, gbb_outer_most_loop_index): New.
7715 * tree-loop-linear.c (perfect_loop_nest_depth): Remove static.
7716 * tree-flow.h (perfect_loop_nest_depth): Declare as extern.
7717 * gcc.dg/graphite/scop-16.c: New.
7718 * gcc.dg/graphite/scop-17.c: New.
7720 2008-07-11 Tobias Grosser <grosser@fim.uni-passau.de>
7722 * graphite.c (scop_remove_ignoreable_gbbs): Also update bitmap.
7723 (graphite_trans_scop_block): Ignore SCoPs without bbs.
7725 2008-07-11 Tobias Grosser <grosser@fim.uni-passau.de>
7727 * graphite.c (new_scop): Initialize SCOP_EXIT.
7728 (scopdet_info): Add.
7729 (scopdet_bb_info): Rename from is_bb_addable. Cleanup, bugfixes.
7730 (build_scops_1): Cleanup, bugfixes.
7731 (build_scops): Cleanup.
7733 * gcc.dg/graphite/scop-matmult.c: Remove duplicated code.
7734 * gcc.dg/graphite/scop-15.c: Add SCoP numbers.
7736 2008-07-10 Harsha Jagasia <harsha.jagasia@amd.com>
7738 * gfortran.dg/graphite/scop-1.f: Update to reduced test case.
7740 * gfortran.dg/graphite/graphite.exp: Use
7741 DEFAULT_GRAPHITE_FLAGS.
7743 * gcc.dg/graphite/scop-15.c: Update to reduced test case.
7745 2008-07-10 Harsha Jagasia <harsha.jagasia@amd.com>
7747 * graphite.c (scan_tree_for_params): Do not assert any more if
7748 MULT_EXPR parameter is negative.
7750 * gfortran.dg/graphite/scop-1.f: New.
7752 * gfortran.dg/graphite/graphite.exp: New.
7754 * gcc.dg/graphite/scop-15.c: New.
7756 2008-07-10 Harsha Jagasia <harsha.jagasia@amd.com>
7758 * graphite.c (is_bb_addable): Fix segfault in spec gzip and reformat.
7760 2008-07-10 Tobias Grosser <grosser@fim.uni-passau.de>
7762 * graphite.c (graphite_trans_bb_swap_loops): Rename from
7763 graphite_swap_loops.
7764 (graphite_trans_bb_move_loop): New.
7765 (graphite_trans_bb_strip_mine): Rename from graphite_strip_mine_loop.
7766 (graphite_trans_bb_block): New.
7767 (graphite_trans_loop_block): New.
7768 (graphite_trans_scop_swap_1and2): Rename from
7769 graphite_trans_swap_1and2.
7770 (graphite_trans_scop_strip): Rename from graphite_trans_strip.
7771 (graphite_trans_scop_block): New.
7772 (graphite_apply_transformations): Rename from
7773 graphite_transformations.
7775 * gcc.dg/graphite/scop-matmult.c: New.
7777 2008-07-10 Tobias Grosser <grosser@fim.uni-passau.de>
7779 * graphite.c (gbb_compare): New.
7780 (graphite_sort_gbbs): New.
7781 (gbb_can_be_ignored): New.
7782 (scop_remove_ignoreable_gbbs): New.
7783 (graphite_transformations): Cleanup and add
7784 scop_remove_ignoreable_gbbs.
7785 * lambda.h (lambda_vector_compare): New.
7787 2008-07-09 Tobias Grosser <grosser@fim.uni-passau.de>
7789 * graphite.c (print_graphite_bb): Correct printing of static schedule.
7790 (graphite_swap_loops): int -> unsigned
7791 (graphite_strip_mine_loop): int -> unsigned, Fix SCHEDULE
7792 (graphite_transformations): New.
7793 (graphite_transform_loops): Move to graphite_transformations.
7794 * graphite.h (gbb_nb_loops): Return unsigned.
7796 2008-07-04 Tobias Grosser <grosser@fim.uni-passau.de>
7798 * graphite.c (scan_tree_for_params): Fix insertion of parameters into
7799 the domain matrix. This makes scop-0.c work again.
7801 2008-06-20 Richard Guenther <rguenther@suse.de>
7803 * graphite.h: Adjust copyright to GPLv3.
7804 * graphite.c: Likewise.
7805 (stmt_simple_memref_for_scop_p): Split out from ...
7806 (stmt_simple_for_scop_p): ... here. Fix handling of calls
7808 (get_bb_type): Optimize.
7810 (is_bb_addable): Fix memleak, replace is_pred call with
7812 (build_scops): Use current_loops.
7813 (param_index): Fix memleak.
7815 2008-06-20 Konrad Trifunovic <konrad.trifunovic@inria.fr>
7817 * graphite.c: Fix formatting.
7819 2008-06-19 Konrad Trifunovic <konrad.trifunovic@inria.fr>
7821 * graphite.c (new_scop): Memory allocation for SCOP_{NEWIVS, OLDIVS}.
7822 (free_scop): Memory deallocation for SCOP_NEWIVS, SCOP_OLDIVS.
7823 (create_var_name, save_var_name): Newly defined functions.
7824 (initialize_cloog_names): Part of the code factored out to
7826 (clast_to_gcc_expression): Now handles the case of clast_red_sum
7827 in clast_reduction statement.
7828 (graphite_create_new_loop): Now takes a new parameter
7830 (translate_clast): Now also takes the context_loop and bb_exit
7831 parameters. Rewritten the code so that it creates a gimple code
7832 inside the given context.
7833 (outermost_loop_layer, graphite_remove_iv, graphite_rename_ivs,
7834 remove_cond_expr, disconnect_cond_expr,
7835 disconnect_virtual_phi_nodes): Newly defined functions.
7836 * graphite.h (struct scop): added old_ivs vector.
7837 SCOP_OLDIVS: New macro.
7839 2008-06-19 Sebastian Pop <sebastian.pop@amd.com>
7841 * cfgloopmanip.c: Add missing function comments, fix formatting.
7843 2008-06-18 Konrad Trifunovic <konrad.trifunovic@inria.fr>
7845 * cfgloopmanip.c (update_dominators_in_loop): Defined.
7846 (create_empty_loop_on_edge): Defined.
7847 * tree-parloops.c (canonicalize_loop_ivs): Returns tree
7849 * cfgloop.h (create_empty_loop_on_edge): Declared as extern.
7850 (update_dominators_in_loop): Declared as extern
7851 * tree-flow.h (canonicalize_loop_ivs): Declared as extern.
7853 2008-06-16 Tobias Grosser <grosser@fim.uni-passau.de>
7855 * graphite.c (print_graphite_bb): Allow changing number of loops
7857 (initialize_cloog_names): Allow changing number of loops.
7858 (build_cloog_prog): Simplify.
7859 (find_transform): Enable cloog option --strides.
7860 (graphite_swap_loops): New.
7861 (graphite_strip_mine_loop): New.
7862 (graphite_trans_swap_1and2): New.
7863 (graphite_trans_strip): New.
7864 (graphite_transform_loops): Add graphite_trans_strip.
7865 * graphite.h (scop_max_loop_depth): New.
7867 2008-06-15 Tobias Grosser <grosser@fim.uni-passau.de>
7869 * graphite.c (build_scop_iteration_domain): Remove forgotten
7870 line. (Fixes compile)
7872 2008-06-15 Tobias Grosser <grosser@fim.uni-passau.de>
7874 * graphite.c (print_graphite_bb): Add output of GBB_LOOPS.
7875 (build_graphite_bb): Add GBB_LOOPS and GBB_DOMAIN and reorder.
7876 (build_bb_loops): New.
7877 (graphite_transform_loops): Add build_bb_loops.
7878 (schedule_to_scattering): Use gbb_nb_loops to support changing loop
7880 * graphite.h (graphite_bb): Add loops.
7881 (gbb_nb_loops): New.
7882 (gbb_loop_at_index): New.
7883 (gbb_loop_index): New.
7884 (nb_params_in_scop): Renamed to scop_nb_params. Updated all functions
7885 using nb_params_in_scop.
7887 2008-06-14 Tobias Grosser <grosser@fim.uni-passau.de>
7889 * graphite.c (print_graphite_bb): Adapt to minimized schedule.
7890 (build_scop_canonical_schedules): Build minimized schedule.
7891 (schedule_to_scattering): Adapt to minimized schedule.
7892 * graphite.h (graphite_bb): Add/Update descriptions.
7894 2008-06-14 Adrien Eliche <aeliche@isty.uvsq.fr>
7895 Tobias Grosser <grosser@fim.uni-passau.de>
7897 * graphite.c (print_graphite_bb): Add condition printing.
7899 (dump_gbb_conditions): New.
7900 (build_scop_conditions_1): New.
7901 (build_scop_conditions): New.
7902 * graphite.h (graphite_bb): Add conditions.
7904 2008-06-14 Tobias Grosser <grosser@fim.uni-passau.de>
7906 * graphite.c (print_graphite_bb):
7907 (free_graphite_bb): New.
7908 (free_scop): Free bbs.
7909 (get_bb_type): Free doms.
7910 (build_scop_context): Free context matrix.
7911 (build_loop_iteration_domains): Remove unused code.
7912 (build_cloog_prog): Free scattering function and blocklist.
7913 (find_transform): Free options.
7915 2008-06-13 Tobias Grosser <grosser@fim.uni-passau.de>
7917 * graphite.c (loop_body_to_cloog_stmts): Rename to add_bb_domains.
7918 Remove unnecessery cloog data structures. Make a copy of the domain
7919 (setup_cloog_loop): Rename to build_loop_iteration_domains. Remove
7920 unnecessary cloog data structures. Fix memory leaks. Remove insert
7921 into SCOP_LOOP2CLOOG_LOOP as the inserted CloogLoops will never be
7923 (build_scop_iteration_domain): Remove unnecessary cloog
7924 data structures. Fix memory leaks.
7925 (graphite_transform_loops): Disable build_scop_dynamic_schedules as it
7926 uses SCOP_LOOP2CLOOG_LOOP, that is at the moment not working.
7928 2008-06-12 Tobias Grosser <grosser@fim.uni-passau.de>
7930 * graphite.c (find_scop_params): Remove initialize_cloog_names.
7932 2008-06-12 Tobias Grosser <grosser@fim.uni-passau.de>
7934 * graphite.c (end_scop): Style fix.
7935 (schedule_to_scattering): Style and comment fix.
7937 2008-06-12 Tobias Grosser <grosser@fim.uni-passau.de>
7938 * graphite.c (print_graphite_bb): Fix definiton of
7939 schedule_to_scattering.
7940 (initialize_cloog_names): Change nb_scattdims to max loop
7942 (schedule_to_scattering): Take parameter for number of scattering
7944 (build_cloog_prog): Only build as much scattering dimensions as
7947 2008-06-12 Tobias Grosser <grosser@fim.uni-passau.de>
7949 * graphite.c (end_scop): Disable bb splitting. Fixes SIGSEGV
7950 in polyhedron/aermod.f90.
7952 2008-06-11 Tobias Grosser <grosser@fim.uni-passau.de>
7953 Dwarak Rajagopal <dwarak.rajagopal@amd.com>
7954 Harsha Jagasia <harsha.jagasia@amd.com>
7956 * graphite.c (is_bb_addable): Fix segfault.
7958 2008-06-10 Tobias Grosser <grosser@fim.uni-passau.de>
7960 * graphite.c (is_bb_addable): Fix memory leak, handling of loops
7961 with multiple exits and conditional handling in edge cases.
7962 (is_loop_exit): Fix memory leak. (Forgotten in last commit)
7964 * gcc.dg/graphite/scop-14.c: New.
7966 2008-06-06 Tobias Grosser <grosser@fim.uni-passau.de>
7967 Adrien Eliche <aeliche@isty.uvsq.fr>
7969 * graphite.c (is_bb_addable): Add more comments and enhance
7970 readablity of the source code. Fix memory leak.
7971 (is_loop_exit): Fix memory leak.
7973 2008-06-05 Tobias Grosser <grosser@fim.uni-passau.de>
7975 * graphite.c (first_loop_in_scop): Deleted.
7976 (setup_cloog_loop): Only walk the loop chain for inner loops.
7977 (build_scop_iteration_domain): Execute setup_cloog_loop for
7978 all loops in the first layer.
7980 2008-06-05 Tobias Grosser <grosser@fim.uni-passau.de>
7982 * graphite.c (scan_tree_for_params): Change the way params are
7983 added to be indepenent of the number of loops.
7984 (setup_cloog_loop): Revert to short matrix format. Fix parameter
7986 (build_cloog_prog): Revert to short matrix format.
7988 2008-06-05 Sebastian Pop <sebastian.pop@amd.com>
7989 Dwarak Rajagopal <dwarak.rajagopal@amd.com>
7991 * tree-loop-fusion.c (fuse_loops): Fix uninitialized variable
7994 2008-06-05 Sebastian Pop <sebastian.pop@amd.com>
7996 * graphite.c (nb_data_refs_in_scop): New.
7997 (graphite_transform_loops): Print more stats: number of
7998 loops, basic blocks and data references per scop.
8000 2008-06-04 Sebastian Pop <sebastian.pop@amd.com>
8001 Jan Sjodin <jan.sjodin@amd.com>
8003 * graphite.c (loop_affine_expr, idx_record_params,
8004 find_scop_parameters, setup_cloog_loop): Use instantiate_scev
8005 instead of instantiate_parameters.
8007 2008-06-04 Tobias Grosser <grosser@fim.uni-passau.de>
8009 * graphite.c (schedule_to_scattering): Fix scattering dimensions,
8010 add support for parameters, add STATIC_SCHEDULE at the right places,
8013 2008-06-04 Tobias Grosser <grosser@fim.uni-passau.de>
8015 * graphite.c (build_scop_loop_nests): Only add the loops, that
8016 are contained completely in the SCoP.
8017 (build_cloog_prog): Disable scattering, until schedule_to_scattering
8018 and the domains are fixed.
8019 (build_scop_canonical_schedules): Add support for bbs not contained
8022 2008-06-04 Tobias Grosser <grosser@fim.uni-passau.de>
8024 * graphite.h (scop_contains_loop): Update comments to match
8025 the actual behavior.
8026 (scop_contains_loop): New.
8027 * graphite.c (schedule_to_scattering): Use scop_contains_loop.
8029 2008-06-04 Sebastian Pop <sebastian.pop@amd.com>
8031 * graphite.c (get_bb_type): On function body, i.e. loop_0,
8032 don't mark blocks as GBB_LOOP_SING_EXIT_HEADER, mark them
8035 2008-06-04 Sebastian Pop <sebastian.pop@amd.com>
8036 Tobias Grosser <grosser@fim.uni-passau.de>
8038 * graphite.c (graphite_transform_loops): Early return when
8039 there are no loops in the function.
8041 2008-05-31 Sebastian Pop <sebastian.pop@amd.com>
8042 Jan Sjodin <jan.sjodin@amd.com>
8044 * graphite.c (scan_tree_for_params, setup_cloog_loop): Compute the
8045 offset of the last loop.
8046 (setup_cloog_loop): Copy the entire outer constraint matrix.
8048 2008-05-31 Sebastian Pop <sebastian.pop@amd.com>
8049 Jan Sjodin <jan.sjodin@amd.com>
8051 * graphite.c (stmt_in_scop_p, function_parameter_p,
8052 invariant_in_scop_p): Removed.
8053 (scan_tree_for_params): Can be used with no constraint
8054 matrix for gathering parameters.
8055 (idx_record_params): Don't use idx_record_param, instead use
8056 scan_tree_for_params.
8057 (find_scop_parameters): Same.
8058 (setup_cloog_loop, build_scop_iteration_domain, build_cloog_prog):
8059 Fix the size of loop domains.
8060 (schedule_to_scattering): Exit when the outer loop is not in scop.
8061 (find_transform): Enable build_cloog_prog.
8063 2008-05-31 Sebastian Pop <sebastian.pop@amd.com>
8064 Jan Sjodin <jan.sjodin@amd.com>
8066 * graphite.c (schedule_to_scattering): Make scattering domains
8067 uniformly of the same size, as required by CLooG 0.14.0 and before.
8069 2008-05-31 Sebastian Pop <sebastian.pop@amd.com>
8070 Jan Sjodin <jan.sjodin@amd.com>
8072 * graphite.c (schedule_to_scattering): Rewrite, correct the
8073 translation of the scheduling function to scattering.
8074 (build_cloog_prog): Call schedule_to_scattering only once.
8075 * graphite.h (scop_loop_index): Do not fail for loops not
8076 in the scop: return -1.
8078 2008-05-30 Tobias Grosser <grosser@fim.uni-passau.de>
8080 * graphite.c (build_graphite_bb): Initialize GBB_DOMAIN.
8081 (loop_body_to_cloog_stmts): Export GBB_DOMAIN.
8082 (setup_cloog_loop): Export GBB_DOMAIN.
8083 (build_cloog_prog): New. Create new CLOOG_PROG, which should be
8084 able to rebuild the original control flow.
8085 * graphite.h (graphite_bb): Add domain field and access macro.
8088 2008-05-30 Sebastian Pop <sebastian.pop@amd.com>
8090 * graphite.c (debug_gbb): New.
8091 (print_scop, build_graphite_bb): Use SCOP_BBS.
8092 (build_scop_bbs): Reimplemented.
8093 (dfs_bb_in_scop_p): Removed.
8094 (build_scop_loop_nests): Reorder loops inserted in
8095 SCOP_LOOP_NEST: outer loops should come first.
8096 (build_scop_canonical_schedules): Reinitialize at zero
8097 the components of the SCOP_STATIC_SCHEDULE for the loops
8098 that have already been parsed.
8100 * graphite.h (debug_gbb): Declared.
8102 2008-05-30 Sebastian Pop <sebastian.pop@amd.com>
8103 Jan Sjodin <jan.sjodin@amd.com>
8105 * graphite.c (create_empty_loop): Renamed graphite_create_new_loop.
8106 (graphite_loop_to_gcc_loop): Removed.
8107 (remove_all_edges): New.
8108 (graphite_stmt_to_gcc_stmt): Renamed translate_clast.
8109 (gloog): Remove useless code.
8111 2008-05-29 Tobias Grosser <grosser@fim.uni-passau.de>
8113 * graphite.c (get_bb_type): Reworked. We distinguish between
8114 loops with one or multiple exits.
8115 (is_loop_exit): New.
8117 (is_bb_addable): Rework condition handling, now support for case
8118 case statements and loops with multiple exits.
8120 * gcc.dg/graphite/scop-11.c: New.
8121 * gcc.dg/graphite/scop-12.c: New.
8122 * gcc.dg/graphite/scop-13.c: New.
8124 2008-05-29 Tobias Grosser <grosser@fim.uni-passau.de>
8126 * graphite.c (dot_all_scops_1): Fix some colors. Reuse colors, if
8127 we have too many colors.
8129 2008-05-22 Sandeep Maram <smaram_b04@iiita.ac.in>
8131 * doc/invoke.texi (-ftree-loop-fusion): Document.
8132 * tree-pass.h (pass_loop_fusion): Declared.
8133 * tree-loop-fusion.c: New.
8134 * timevar.def (TV_TREE_LOOP_FUSION): Declared.
8135 * tree-data-ref.c (find_data_references_in_loop): Make extern.
8136 * tree-data-ref.h (find_data_references_in_loop): Declared.
8137 * common.opt (ftree-loop-fusion): Declared.
8138 * Makefile.in (tree-loop-fusion.o): Added rule and to OBJS-common.
8140 2008-05-21 Sebastian Pop <sebastian.pop@amd.com>
8142 * graphite.c (build_access_matrix): Fix typo from the merge.
8144 2008-05-20 Sebastian Pop <sebastian.pop@amd.com>
8146 * Merge from mainline (130800:135673).
8148 2008-05-07 Sebastian Pop <sebastian.pop@amd.com>
8150 * graphite.c (end_scop): The exit of the scop is not part of the scop.
8151 Update dominators after splitting.
8153 2008-05-07 Sebastian Pop <sebastian.pop@amd.com>
8155 * graphite.c (is_bb_addable): Return the harmful statement.
8156 Factor up some code.
8157 (end_scop): New. Splits end of scope bbs on a harmful statement.
8158 (build_scops_1): Call end_scop.
8160 2008-05-07 Sebastian Pop <sebastian.pop@amd.com>
8162 * graphite.c: (succs_at_same_depth, end_scop, all_preds_visited_p,
8163 all_succs_visited_p, start_new_scop_for_each_succ, start_new_scop,
8164 add_dominators_to_open_scops, stop_last_open_scop, scop_end_loop,
8165 build_scops_1): Removed.
8166 (build_scops_2): Renamed build_scops_1.
8168 2008-05-06 Sebastian Pop <sebastian.pop@amd.com>
8170 * graphite.c: Fix formatting.
8172 2008-05-06 Tobias Grosser <grosser@fim.uni-passau.de>
8174 * graphite.c (get_bb_type): New.
8176 (build_scops_2): New.
8177 (is_bb_addable): New.
8178 (build_scops): Switch the scop detection.
8179 (build_scop_bbs): Add entry bb to scop.
8180 * graphite.h (struct scop): Update comment.
8182 2008-05-06 Tobias Grosser <grosser@fim.uni-passau.de>
8184 * graphite.c (dot_all_scops_1): Fix some incorrect colors and add
8187 2008-05-06 Tobias Grosser <grosser@fim.uni-passau.de>
8189 * gcc.dg/graphite/scop-1.c: Update.
8190 * gcc.dg/graphite/scop-2.c: Update.
8191 * gcc.dg/graphite/scop-4.c: Update.
8192 * gcc.dg/graphite/scop-5.c: Add.
8193 * gcc.dg/graphite/scop-6.c: Add.
8195 2008-05-06 Sebastian Pop <sebastian.pop@amd.com>
8197 * gcc.dg/graphite/scop-0.c: Add.
8198 * gcc.dg/graphite/scop-7.c: Add.
8199 * gcc.dg/graphite/scop-8.c: Add.
8200 * gcc.dg/graphite/scop-9.c: Add.
8201 * gcc.dg/graphite/scop-10.c: Add.
8203 2008-05-06 Tobias Grosser <grosser@fim.uni-passau.de>
8205 * graphite.c (scop_affine_expr): Renamed to loop_affine_expr.
8206 Check affine expressions depending on the outermost loop
8208 (stmt_simple_for_scop_p): Same.
8209 (harmfule_stmt_in_scop): Same.
8211 2008-04-28 Tobias Grosser <grosser@fim.uni-passau.de>
8213 * graphite.c (dot_all_scops): Remove incorrect difficult bb coloring,
8214 mark entry and exit, that are not part of the SCoP and update HTML
8217 2008-04-25 Sebastian Pop <sebastian.pop@amd.com>
8219 * graphite.c (basic_block_simple_for_scop_p): Renamed
8221 (save_scop, preds_at_same_depth, test_for_scop_bound): Removed.
8222 (add_dominators_to_open_scops, build_scops_1): Reimplemented.
8223 (all_preds_visited_p, all_succs_visited_p,
8224 start_new_scop_for_each_succ, start_new_scop, stop_last_open_scop,
8225 scop_end_loop): New.
8226 (build_scops): Do not use dfs_enumerate_from.
8228 * gcc.dg/graphite/scop-{1,2,4}.c: Updated.
8230 2008-04-23 Sebastian Pop <sebastian.pop@amd.com>
8232 * graphite.c: Add comments to functions that are missing a
8234 (graphite_create_iv): Removed. Merged in graphite_loop_to_gcc_loop.
8236 2008-04-23 Sebastian Pop <sebastian.pop@amd.com>
8238 * graphite.c (nb_params_in_scop): Moved...
8239 (graphite_bb_from_bb, loop_body_to_cloog_stmts): New.
8240 (setup_cloog_loop): Call loop_body_to_cloog_stmts.
8241 (clast_to_gcc_expression): Reduce column size to less than 80.
8242 (graphite_create_iv): Return the new name of the IV.
8243 (find_transform): Set options->esp and options->cpp.
8244 (gloog): Comment out the invalidation of the old loop code.
8245 (initialize_dependence_polyhedron): Replace scop_nb_params with
8248 * graphite.h (nb_params_in_scop): ... here.
8249 (scop_nb_params): Removed.
8250 (loop_domain_dim): Return something even when the loop was not
8251 found in the hash table: avoid ICEing on all the graphite.exp
8254 2008-04-14 Konrad Trifunovic <konrad.trifunovic@inria.fr>
8256 * tree-chrec.c (for_each_scev_op): SCEV can have 3 operands.
8258 * graphite.c (build_scop_dynamic_schedules): Schedule is built
8259 according to nesting level.
8260 (find_scop_parameters): Call instantiate_parameters.
8261 (scan_tree_for_params): Extend it to handle general affine bounds.
8262 Inner loop bound can depend on outer loop induction variable.
8263 (setup_cloog_loop): tmp variable is allocated on stack. Call
8264 instantiate_parameters with respect to outermost_loop_in_scop.
8265 (loop_domain_dim, ref_nb_loops, loop_iteration_vector_dim): moved to
8267 (create_empty_loop): Function loopify should be given edge
8268 probability, instead of edge frequency. Dominance relation from
8269 switch_bb to loop_header.
8270 (clast_to_gcc_expression): Added handling of clast_reduction node.
8271 (gloog): New functionality for removing old loop.
8272 (test_dependence): Factored out from build_rdg_all_levels.
8273 (build_rdg_all_levels): Dependence testing factored out to
8274 test_dependence function.
8276 * graphite.h (struct graphite_bb): Extended with dynamic_schedule.
8277 (loop_domain_dim, ref_nb_loops, loop_iteration_vector_dim): Moved
8280 2008-04-07 Sebastian Pop <sebastian.pop@amd.com>
8282 * graphite.c (free_scop, param_index, initialize_cloog_names,
8283 nb_params_in_scop): Use name_tree map instead of just a tree
8284 for keeping track of the variable name associated to that tree.
8285 (create_empty_loop, gmp_cst_to_tree, clast_name_to_gcc,
8286 clast_to_gcc_expression, graphite_create_iv,
8287 graphite_loop_to_gcc_loop, graphite_cond_to_gcc_cond,
8288 graphite_stmt_to_gcc_stmt): New.
8289 (gloog): Call these.
8290 * graphite.h (struct name_tree): New.
8291 (struct scop): Use name_tree instead of tree for params.
8292 Store a vector of name_tree for new_ivs.
8294 (scop_nb_params): Use name_tree instead of tree.
8296 2008-04-05 Alexander Lamaison <awl03@doc.ic.ac.uk>
8297 Sebastian Pop <sebastian.pop@amd.com>
8299 * tree-bounds.c: New.
8300 * tree-bounds.h: New.
8301 * tree-pass.h: Declare pass_bounds_early and pass_bounds_late.
8302 * passes.c: Schedule pass_bounds_early, pass_bounds_late.
8303 * builtins.c (expand_builtin_alloca): Add flag_bounds as for
8307 * c-cppbuiltin.c: Same.
8311 * tree-outof-ssa.c: Same.
8313 * Makefile.in: Same.
8315 2008-03-15 Antoniu Pop <antoniu.pop@gmail.com>
8316 Sebastian Pop <sebastian.pop@amd.com>
8318 * tree-loop-distribution.c (remaining_stmts,
8319 upstream_mem_writes): Removed static variables.
8320 (copy_loop_before, create_bb_after_loop,
8321 mark_nodes_having_upstream_mem_writes, free_rdg_components,
8322 rdg_build_components, rdg_build_partitions,
8323 dump_rdg_partitions): Extern.
8324 (generate_loops_for_partition, generate_code_for_partition): Do not
8326 (already_processed_vertex_p, predecessor_has_mem_write,
8327 mark_nodes_having_upstream_mem_writes, has_upstream_mem_writes,
8328 rdg_flag_all_uses, rdg_flag_uses, rdg_flag_vertex_and_dependent,
8329 rdg_flag_loop_exits, rdg_flag_similar_memory_accesses,
8330 build_rdg_partition_for_component, rdg_build_partitions, ldist_gen):
8331 Pass remaining_stmts and upstream_mem_writes as parameters.
8332 (rdg_component): Moved...
8333 (build_rdg_partition_for_component): Do not aggregate components when
8334 flag_streamize_loops is set.
8335 (gen_sequential_loops): New.
8336 (ldist_gen): Call gen_sequential_loops.
8338 * tree-pass.h (pass_loop_streamization): Declared.
8340 * omp-low.c (expand_omp_sections): Call add_bb_to_loop on created
8341 basic blocks when loops structures exist.
8343 * builtin-types.def (BT_FN_VOID_PTR_PTR_INT): New.
8345 * tree-ssa-loop-ivopts.c (expr_invariant_in_region_p): New.
8347 * tree-parloops.c (take_address_of, eliminate_local_variables_1,
8348 eliminate_local_variables_stmt, eliminate_local_variables,
8349 separate_decls_in_loop_name, separate_decls_in_loop_stmt,
8350 separate_decls_in_loop, gen_parallel_loop): Make them work on a region
8351 of code delimited by two edges in the CFG.
8352 (separate_decls_in_loop_name): Renamed separate_decls_in_region_name.
8353 (separate_decls_in_loop_stmt): Renamed separate_decls_in_region_stmt.
8354 (separate_decls_in_loop): Renamed separate_decls_in_region. Isolate
8355 the case of parallelisation of reductions.
8356 (create_loop_fn): Extern.
8357 (create_omp_parallel_region): New.
8359 * tree-data-ref.c (dump_data_dependence_relation): Don't call
8360 dump_data_reference for printing dra and drb.
8361 (create_rdg_edge_for_ddr, create_rdg_edges_for_scalar): Initialise
8363 (build_rdg): Don't call free_dependence_relations for the moment, as
8364 we attach dependence relations on each edge of the RDG.
8367 * tree-data-ref.h (rdg_component): ...here.
8368 (struct rdg_edge): New field ddr_p relation.
8369 (RDGE_RELATION): New.
8370 (create_bb_after_loop, copy_loop_before,
8371 mark_nodes_having_upstream_mem_writes, rdg_build_components,
8372 rdg_build_partitions, dump_rdg_partitions,
8373 free_rdg_components): Declared.
8375 * omp-builtins.def (BUILT_IN_GOMP_STREAM_ALIGN_PUSH,
8376 BUILT_IN_GOMP_STREAM_ALIGN_POP): New.
8378 * tree-loop-streamization.c: New.
8380 * tree-flow.h (gather_blocks_in_sese_region, create_loop_fn,
8381 create_omp_parallel_region, expr_invariant_in_region_p): Declared.
8383 * Makefile.in (tree-loop-streamization.o): Added to OBJS-common.
8385 * tree-cfg.c (gather_blocks_in_sese_region): Extern.
8387 * passes.c: Schedule pass_loop_streamization.
8389 2008-03-08 Tobias Grosser <grosser@fmi.uni-passau.de>
8391 * graphite.c (dot_all_scops_1): Fix formatting for difficult bbs and
8394 2008-03-07 Tobias Grosser <grosser@fim.uni-passau.de>
8396 * graphite.c (dot_all_scops): Update formatting.
8397 Bbs can now be part of more than one SCoP.
8399 2008-03-04 Sebastian Pop <sebastian.pop@amd.com>
8401 * graphite.c (new_loop_to_cloog_loop_str, setup_cloog_loop): Fix
8403 (loop_domain_dim): Check for unregistered toplev SCOP loop.
8404 * graphite.h (loop_to_cloog_loop): New.
8406 2008-03-04 Konrad Trifunovic <konrad.trifunovic@inria.fr>
8408 * graphite.c (loop_domain_dim, ref_nb_loops,
8409 loop_iteration_vector_dim): New.
8410 (build_access_matrix_with_af, build_access_matrix,
8411 initialize_dependence_polyhedron): Fixed for new matrix layout.
8412 No longer assume that all iteration domains are of the same
8415 2008-03-02 Sebastian Pop <sebastian.pop@amd.com>
8417 * tree-scalar-evolution.c (instantiate_parameters_1): An SSA_NAME
8418 defined in a loop at depth 0 is invariant.
8419 * tree-chrec.c (evolution_function_is_invariant_rec_p): Ditto.
8420 * tree-ssa-loop-ivopts.c (expr_invariant_in_loop_p): Should never
8421 be called at loop depth 0.
8423 * graphite.c (basic_block_simple_for_scop_p): Take the scop as
8425 (dot_all_scops_1): Update use of basic_block_simple_for_scop_p.
8426 (down_open_scop): Removed.
8427 (loop_in_scop_p): Redefined.
8428 (scop_affine_expr): New argument: scop.
8429 (stmt_simple_for_scop_p): New argument: scop. RETURN_EXPR is not
8430 a harmful statement ending a scop.
8431 (basic_block_simple_for_scop_p): New argument: scop.
8432 (get_loop_start): Removed.
8433 (new_scop): Initialize SCOP_LOOPS.
8434 (free_scop): Free SCOP_LOOPS.
8435 (succs_at_same_depth, preds_at_same_depth): New.
8436 (end_scop): Test the validity of a scop.
8437 (add_dominators_to_open_scops): New.
8438 (test_for_scop_bound): Call add_dominators_to_open_scops.
8439 Add cases for opening and closing multiple scops.
8440 (build_scops, build_scop_bbs): Iterate over basic blocks in
8442 (build_graphite_bb): Pass scop directly.
8443 (dfs_bb_in_scop_p): New.
8444 (scop_record_loop): Use SCOP_LOOPS for not recording the same loop
8446 (nb_loops_around_gb): Use loop_in_scop_p.
8447 (schedule_to_scattering): Disabled for the moment the code computing
8448 the "textual order for outer loop".
8450 * graphite.h (struct scop): New field loops.
8452 (scop_loop_index): Test that the given loop belongs to SCOP_LOOPS.
8454 * gcc.dg/graphite/scop-{1,...,7}.c: Updated.
8456 2008-02-27 Antoniu Pop <antoniu.pop@gmail.com>
8457 Sebastian Pop <sebastian.pop@amd.com>
8459 * builtin-types.def (BT_FN_PTR_SIZE_UINT, BT_FN_BOOL_PTR): New.
8460 * common.opt (fstreamize-loops): New.
8461 * omp-builtins.def (BUILT_IN_GOMP_STREAM_CREATE,
8462 BUILT_IN_GOMP_STREAM_PUSH, BUILT_IN_GOMP_STREAM_HEAD,
8463 BUILT_IN_GOMP_STREAM_POP, BUILT_IN_GOMP_STREAM_EOS_P,
8464 BUILT_IN_GOMP_STREAM_SET_EOS, BUILT_IN_GOMP_STREAM_DESTROY): New.
8466 2008-02-22 Konrad Trifunovic <konrad.trifunovic@inria.fr>
8468 * tree-data-ref.c (build_empty_rdg): New.
8469 (build_rdg): Use it.
8470 * tree-data-ref.h (build_empty_rdg): Declared.
8471 * graphite.c (free_scop): Free SCOP_LOOP2CLOOG_LOOP.
8472 (find_vertex_for_stmt): Removed.
8473 (build_rdg_all_levels): Use build_empty_rdg and rdg_vertex_for_stmt.
8475 2008-02-21 Sebastian Pop <sebastian.pop@amd.com>
8477 * tree-loop-distribution.c (generate_builtin): After cancelling the
8478 loop tree, also delete basic blocks.
8479 (rdg_flag_uses): Stop recursion when a vertex has already been
8482 2008-02-15 Konrad Trifunovic <konrad.trifunovic@inria.fr>
8484 * graphite.c (build_scop_alpha): Removed.
8485 (graphite_transform_loops): Add a dummy call to build_all_rdg_levels
8486 and dump_dependence_graph to avoid compiler warnings.
8488 2008-02-14 Konrad Trifunovic <konrad.trifunovic@inria.fr>
8490 * tree-data-ref.c (dr_may_alias_p, create_rdg_vertices): Extern.
8491 * tree-data-ref.h (dr_may_alias_p, create_rdg_vertices): Declared.
8492 * graphite.c (new_loop_to_cloog_loop_str, hash_loop_to_cloog_loop,
8493 eq_loop_to_cloog_loop, del_loop_to_cloog_loop): New.
8494 (new_scop, setup_cloog_loop): Initialize SCOP_LOOP2CLOOG_LOOP.
8495 (initialize_dependence_polyhedron, find_vertex_for_stmt,
8496 initialize_data_dependence_polyhedron, is_empty_polyhedron,
8497 statement_precedes_p, build_rdg_all_levels, build_scop_alpha,
8498 dump_dependence_graph): New.
8499 * graphite.h (struct graphite_bb): New field compressed_alpha_matrix.
8501 (struct scop): New field loop2cloog_loop.
8502 (SCOP_LOOP2CLOOG_LOOP, struct data_dependence_polyhedron,
8503 RDGE_DDP, ddp_p, struct loop_to_cloog_loop_str): New.
8505 2008-02-10 Konrad Trifunovic <konrad.trifunovic@inria.fr>
8507 * graphite.c (build_graphite_bb): Fix initialization
8508 of the graphite basic block.
8510 2008-02-05 Sebastian Pop <sebastian.pop@amd.com>
8512 * graphite.c (scan_tree_for_params): Rewrite for the new layout of
8513 loop domain matrix. Pass in the number of loops contained in the
8515 (nb_loops_around_gb): Moved before setup_cloog_loop that uses it.
8516 (setup_cloog_loop): Rewrite for the new layout of loop domain matrix:
8517 loops that are not surrounding the current loop are not represented
8518 in the domain constraint matrix.
8519 (build_scop_iteration_domain): Initial domain constraint matrix
8520 contains only the eq/ineq, cst, and scop parameters columns.
8522 2008-01-29 Tobias Grosser <grosser@fim.uni-passau.de>
8524 * graphite.c (schedule_to_scattering, nb_loops_around_gb): New.
8525 (print_graphite_bb): Print scattering.
8527 2008-01-29 Tobias Grosser <grosser@fim.uni-passau.de>
8529 * graphite.c (initialize_cloog_names): Initialize names of
8530 scattering variables.
8532 2009-01-29 Tobias Grosser <grosser@fim.uni-passau.de>
8534 * graphite.c (dot_all_scops_1): Disable debug output while
8537 2008-01-29 Tobias Grosser <grosser@fim.uni-passau.de>
8539 * graphite.c (find_transform): Change cloog output language to C.
8541 2008-01-27 Sebastian Pop <sebastian.pop@amd.com>
8543 * tree-loop-distribution.c (generate_memset_zero,
8544 generate_builtin, generate_code_for_partition,
8545 rdg_flag_all_uses): New.
8546 (rdg_flag_uses): Gather in the same partition the statements defining
8547 the VUSES of the current statement.
8548 (rdg_flag_similar_stores): Renamed rdg_flag_similar_memory_accesses.
8549 Gather in the same partition not only the stores to the same memory
8550 access, but also the reads.
8551 (ldist_generate_loops): Renamed ldist_gen.
8553 2008-01-24 Sebastian Pop <sebastian.pop@amd.com>
8554 Tobias Grosser <grosser@fmi.uni-passau.de>
8556 * graphite.c (setup_cloog_loop): Chain all cloog loops with the
8557 next pointer, don't use the inner pointer.
8559 2008-01-20 Tobias Grosser <grosser@fmi.uni-passau.de>
8561 * graphite.c (dot_all_scops, dot_all_scops_1): New.
8562 (find_transform): Call dot_all_1.
8563 * graphite.h (dot_all_scops): Declared.
8565 2007-12-14 Sebastian Pop <sebastian.pop@amd.com>
8567 * tree-loop-distribution.c: Fix apsi.f ICE.
8568 (create_bb_after_loop): New.
8569 (generate_loops_for_partition): Use it.
8570 * gfortran.dg/ldist-1.f90: New.
8572 * tree-data-ref.c (dot_rdg): Use /tmp/rdg.dot for dotty format.
8573 * graphite.c (dot_scop): Use /tmp/scop.dot for dotty format.
8575 2007-12-13 Tobias Grosser <grosser@fmi.uni-passau.de>
8577 * graphite.c (find_transform): Dump cloog program sent to cloog.
8579 2007-12-13 Tobias Grosser <grosser@fmi.uni-passau.de>
8581 * graphite.c (initialize_cloog_names): Initialize cloog
8584 2007-12-13 Tobias Grosser <grosser@fmi.uni-passau.de>
8586 * graphite.c (build_scop_context): Fix typo, for the matrix
8587 format: insert '0 >= 0' instead of '-1 >= 0'.
8589 2007-12-13 Sebastian Pop <sebastian.pop@amd.com>
8591 * Fix merge problems.
8593 2007-12-13 Sebastian Pop <sebastian.pop@amd.com>
8595 * graphite.c (setup_cloog_loop): Fix typo.
8597 2007-12-12 Sebastian Pop <sebastian.pop@amd.com>
8599 * doc/invoke.texi (-ftree-loop-distribution): Documented.
8600 * tree-loop-distribution.c: Reimplemented.
8601 * tree-pass.h (pass_loop_distribution): New.
8602 * tree-scalar-evolution.c (number_of_iterations_for_all_loops): Use
8604 * graphds.h (struct graph): New field indexes.
8605 * timevar.def (TV_TREE_LOOP_DISTRIBUTION): New.
8607 * tree-vect-analyze.c: Remove declaration of static functions when not
8609 * tree-vectorizer.c: Same.
8610 (rename_variables_in_loop): Now extern.
8611 (slpeel_tree_duplicate_loop_to_edge_cfg): Renamed
8612 tree_duplicate_loop_to_edge_cfg. Reset PENDING_STMT for edges after
8613 calling redirect_edge_and_branch_force.
8615 * tree-vectorizer.h (tree_duplicate_loop_on_edge): Declared.
8617 * tree-data-ref.c: Don't include tree-chrec.h.
8618 (debug_data_dependence_relations): New.
8619 (dump_data_dependence_relation): Call dump_data_reference on data refs
8621 (same_access_functions): Moved...
8622 (find_vertex_for_stmt): Renamed rdg_vertex_for_stmt.
8623 (dump_rdg_vertex, debug_rdg_vertex, dump_rdg_component,
8624 debug_rdg_component, dump_rdg, debug_rdg, dot_rdg_1, dot_rdg,
8625 struct rdg_vertex_info, ): New.
8626 (create_rdg_edge_for_ddr): Compute the dependence level before looking
8628 (create_rdg_vertices): Initialize the htab of graph->indexes.
8629 Initialize RDG_MEM_WRITE_STMT and RDG_MEM_READS_STMT.
8630 (stmts_from_loop): Don't save LABEL_EXPR.
8631 (hash_stmt_vertex_info, eq_stmt_vertex_info,
8632 hash_stmt_vertex_del): New.
8633 (build_rdg): Initialize rdg->indexes.
8634 (free_rdg, stores_from_loop, ref_base_address,
8635 rdg_defs_used_in_other_loops_p, have_similar_memory_accesses,
8636 have_similar_memory_accesses_1, ref_base_address_1,
8637 remove_similar_memory_refs): New.
8639 * tree-data-ref.h: Include tree-chrec.h.
8640 (debug_data_dependence_relations): Declared.
8641 (same_access_functions): ...here. Now static inline.
8642 (ddr_is_anti_dependent, ddrs_have_anti_deps,
8643 ddr_dependence_level): New.
8644 (struct rdg_vertex): New fields has_mem_write, has_mem_reads.
8645 (RDGV_HAS_MEM_WRITE, RDGV_HAS_MEM_READS, RDG_STMT, RDG_MEM_WRITE_STMT,
8646 RDG_MEM_READS_STMT): New.
8647 (dump_rdg_vertex, debug_rdg_vertex, dump_rdg_component,
8648 debug_rdg_component, dump_rdg, debug_rdg, dot_rdg,
8649 rdg_vertex_for_stmt): Declared.
8650 (struct rdg_edge): New field level.
8651 (RDGE_LEVEL, free_rdg): New.
8652 (stores_from_loop, remove_similar_memory_refs,
8653 rdg_defs_used_in_other_loops_p,
8654 have_similar_memory_accesses): Declared.
8655 (rdg_has_similar_memory_accesses): New.
8657 * lambda.h (dependence_level): New.
8658 * common.opt (ftree-loop-distribution): New.
8659 * tree-flow.h (debug_loop_ir): Renamed debug_loops.
8660 (print_loop_ir): Renamed print_loops.
8661 (debug_loop, debug_loop_num, print_loops_bb, mark_virtual_ops_in_bb,
8662 tree_duplicate_loop_to_edge_cfg, rename_variables_in_loop): Declared.
8663 * Makefile.in (TREE_DATA_REF_H): Depends on tree-chrec.h.
8664 (tree-loop-distribution.o): Added.
8665 * tree-cfg.c (mark_virtual_ops_in_region): Use mark_virtual_ops_in_bb.
8666 (mark_virtual_ops_in_bb): New.
8667 (print_loops_bb, debug_loop_num, debug_loop): New.
8668 * passes.c: Scheduled pass_loop_distribution.
8670 2007-12-12 Konrad Trifunovic <konrad.trifunovic@inria.fr>
8672 * graphite.c (scan_tree_for_params): Correct the number of columns
8674 (nb_flat_iterator): New.
8675 (setup_cloog_loop): Initialize to 1 the first column for inequalities.
8676 (build_scop_iteration_domain): Correct the number of columns for
8679 2007-12-12 Sebastian Pop <sebastian.pop@amd.com>
8681 * Merge from mainline (129697:130800).
8683 2007-10-30 Sebastian Pop <sebastian.pop@amd.com>
8685 * graphite.c (build_graphite_bb): SCoP's basic blocks are post
8686 dominated by SCoP's exit.
8687 (graphite_transform_loops): Compute post dominators.
8689 2007-10-28 Sebastian Pop <sebastian.pop@amd.com>
8691 * Merge from mainline (127169:129697).
8693 2007-10-28 Sebastian Pop <sebastian.pop@amd.com>
8695 * graphite.c (affine_expr): Renamed scop_affine_expr. Use an extra
8696 parameter for the basic block that contains the expression. Use
8697 outermost_loop_in_scop for evolution_function_is_affine_multivariate_p.
8698 (stmt_simple_for_scop_p): Pass to scop_affine_expr the basic block of
8700 * graphite.h (gbb_loop): New.
8701 (GBB_LOOP): Removed.
8703 2007-08-03 Sebastian Pop <sebpop@gmail.com>
8705 * Makefile.in: Fix merge problem.
8707 2007-08-03 Sebastian Pop <sebpop@gmail.com>
8709 * Merge from mainline (125309:127169).
8710 * tree-loop-distribution.c: Disabled.
8712 2007-06-05 Sebastian Pop <sebpop@gmail.com>
8714 * Merge from mainline (r123693:125309).
8716 2007-05-30 Sebastian Pop <sebpop@gmail.com>
8718 * tree-loop-distribution.c (correct_modify_expr_p): Renamed
8720 (correct_modify_p, check_statements, number_of_lvalue_uses,
8721 number_of_scalar_dependences, create_edges): Use GIMPLE_MODIFY_STMT
8722 instead of MODIFY_EXPR.
8723 (update_edge_with_ddv): Don't pass index_of_edge. Initialize
8726 2007-05-24 Sebastian Pop <sebpop@gmail.com>
8728 * tree-loop-distribution.c (struct rdg): Replace arrays by
8729 VECs for edges and vertices.
8730 (RDG_NBV, RDG_NBE, RDG_VERTEX, RDG_EDGE): Removed.
8731 (RDGV_NB_PARTITIONS): New.
8732 (PRDG_NBV, PRDG_NBE): Removed.
8733 (build_scc_graph, correct_partitions_p, mark_partitions, build_prdg,
8734 dump_rdg, find_vertex_with_stmt, create_vertices, free_rdg,
8735 number_of_scalar_dependences, create_edges, build_rdg): Use VECs.
8737 2007-05-17 Georges-Andre Silber <silber@cri.ensmp.fr>
8738 Sebastian Pop <sebpop@gmail.com>
8740 * doc/invoke.texi (-ftree-loop-distribution): Document.
8741 * tree-loop-distribution.c: New file.
8742 * tree-pass.h (pass_loop_distribution): Declared.
8743 * timevar.def (TV_TREE_LOOP_DISTRIBUTION): New.
8744 * tree-data-ref.c (initialize_data_dependence_relation): Initialize
8746 * tree-data-ref.h (data_dependence_relation): Add reversed_p.
8747 (DDR_REVERSED_P): New.
8748 * common.opt (-ftree-loop-distribution): New.
8749 * tree-flow.h (distribute_loops): Declared.
8750 * Makefile.in (OBJS-common): Depend on tree-loop-distribution.o.
8751 * passes.c (init_optimization_passes): Schedule loop distribution.
8753 2007-05-12 Sebastian Pop <sebastian.pop@inria.fr>
8755 * graphite.c (print_graphite_bb): Don't call dump_data_references.
8756 (print_scop): Don't print when scop is NULL.
8757 (build_scop_context, find_transform): Don't output to stderr.
8759 2007-05-09 Sebastian Pop <sebastian.pop@inria.fr>
8761 * tree-data-ref.c: Don't include graphite.h.
8762 Comment out the code for printing data reference's scop.
8763 (build_access_matrix_with_af): Moved...
8764 * tree-data-ref.h (build_access_matrix_with_af): Removed declaration.
8765 * graphite.c (build_access_matrix_with_af): ... here. Now static.
8766 (print_graphite_bb): Print basic block's schedule.
8767 (print_scop): Don't print the schedule, call cloog's pretty printer.
8768 (bb_in_scop_p): A basic block is in a scop only if it is both
8769 dominated and postdominated by the scop's entry and exit basic blocks.
8770 (function_parameter_p): New.
8771 (invariant_in_scop_p): Use function_parameter_p.
8772 (new_scop, save_scop): New.
8773 (end_scop, test_for_scop_bound, build_scops): Use new_scop, and
8775 (scan_tree_for_params): Directly build the constraint as CloogMatrix.
8776 (loop_in_scop_p): New.
8777 (scop_record_loop): Use loop_in_scop_p.
8778 (build_scop_domain): Renamed build_scop_iteration_domain.
8779 (setup_cloog_loop, initialize_cloog_names, find_scop_parameters,
8780 nb_params_in_scop, build_scop_context, first_loop_in_scop,
8781 setup_cloog_loop, dot_scop_1, dot_scop): New.
8782 * graphite.h (GBB_LOOP, SCOP_PROG, dot_scop): New.
8783 (struct scop): Add a pointer to cloog's representation of a program.
8785 2007-04-14 Sebastian Pop <sebastian.pop@inria.fr>
8787 * doc/invoke.texi (-ftree-check-verbose): Renamed
8788 -ftree-checks-verbose.
8789 * common.opt (flag_tree_check_verbose): Renamed
8790 flag_tree_checks_verbose.
8791 * tree-check.c (tree_check_warning): Use flag_tree_checks_verbose.
8793 2007-04-14 Sebastian Pop <sebastian.pop@inria.fr>
8795 * configure: Regenerated.
8796 * config.in: Regenerated.
8797 * tree-ssa-loop.c (graphite_transforms): Execute
8798 graphite_transform_loops only when HAVE_cloog.
8799 * configure.ac (HAVE_polylib, HAVE_cloog, GRAPHITE): Defined.
8800 * graphite.c: Include polylibgmp.h and cloog.h.
8801 (graphite_transform_loops): Removed loops parameter.
8802 * tree-flow.h (graphite_transform_loops): Update declaration.
8803 * Makefile.in (POLYLIBLIBS, POLYLIBINC, CLOOGLIBS, CLOOGINC): New.
8804 (LIBS): Depend on CLOOGLIBS and on POLYLIBLIBS.
8805 (INCLUDES): Depend on POLYLIBINC and on CLOOGINC.
8806 (OBJS-common): Remove dependence on graphite.o.
8807 (BACKEND): Depend on @GRAPHITE@.
8809 2007-04-13 Sebastian Pop <sebastian.pop@inria.fr>
8811 * doc/invoke.texi (-ftree-check-verbose): Documented.
8812 * gcc.dg/tree-checker/tree-checks-1.c: New.
8813 * gcc.dg/tree-checker/tree-checks-2.c: New.
8814 * gcc.dg/tree-checker/tree-checks-3.c: New.
8815 * gcc.dg/tree-checker/tree-checks-4.c: New.
8816 * gcc.dg/tree-checker/tree-checks.exp: New.
8817 * gcc.dg/tree-checker/condates.crp: New.
8818 * common.opt (ftree-checks-verbose): New.
8819 * tree-check.c (tree_check_warning): Move extra stderr output
8820 under control of flag_tree_check_verbose.
8822 2007-04-12 Sebastian Pop <sebastian.pop@inria.fr>
8824 * tree-match.c: Fix comments formatting.
8825 * tree-match.h: Fix comments formatting.
8826 * tree-check.c: Fix comments formatting.
8827 (tree_check_init): Restructure.
8829 2007-04-12 Nic Volanschi <nic.volanschi@free.fr>
8831 * doc/invoke.texi (-ftree-check, -ftree-checks): Documented.
8833 2007-04-10 Sebastian Pop <sebastian.pop@inria.fr>
8835 * Merge from mainline (r120733:123693).
8837 2007-03-20 Nic Volanschi <nic.volanschi@free.fr>
8839 * condate.y: New file.
8840 * tree-match.h (struct patt_info_s): New field sign.
8841 (struct condate_s): New field msg.
8842 (normalize_condate, name_condate, add_condate): New.
8843 (conds[], condate_parse): Made extern.
8844 * tree-check.c (tree_check_warning): First arg changed to cond;
8845 warning reformatted.
8846 (tree_check_init): Reset the TREE_VISITED bit on every CFG node.
8848 (tree_check): Process trivial condates.
8849 (read_delimited_string): Removed.
8850 (print_cond): Print name and msg.
8851 (conds[]): Made extern.
8852 (parse_tree_check_file_once): Rewritten to use the parser in
8854 Processing of option --tree_check_string moved to tree_scan().
8855 * Makefile.in: Added condate.y
8857 2007-03-12 Sebastian Pop <sebastian.pop@inria.fr>
8859 * tree-pretty-print.c (dump_generic_bb_buff, lazy_dump_generic_node):
8860 Use VECs instead of varrays.
8861 * diagnostic.h (lazy_dump_generic_node): Update declaration.
8862 * Makefile.in (pretty-print.o): Depend on vec.h.
8863 * pretty-print.c: Include tree.h and vec.h.
8864 (pp_clear_state, pp_write_list_to_stream, pp_base_format,
8865 pp_base_format, pp_construct, pp_base_string, pp_lazy_mode,
8866 new_tree_chunk, pp_add_tree, pp_add_string, pp_add_char, pp_write_list,
8867 pp_free_list): Use VECs instead of varrays.
8868 * pretty-print.h: Do not include varray.h.
8869 (struct tree_chunk_s): Declaration moved before its use.
8870 (output_buffer): Rename varray field to chunks.
8871 * tree-match.c (tree_equal, chunk_1st_char, chunks_lookahead,
8872 tree_1st_char, match_chunks_pattinfo, match_tree_pattinfo,
8873 save_global_holes): Use VECs instead of varrays.
8874 * tree-match.h: Declare VECs of cfg_node, and hole_p.
8875 * tree-check.c (scan_cfg_stmts, push_node,
8876 print_matching_stmt): Removed.
8877 (tree_check_instance, push_global_holes_if_new, tree_check,
8878 execute_tree_check): Use VECs instead of varrays.
8879 (gate_tree_check): Don't execute the CFG check when basic_block_info
8882 2007-01-12 Sebastian Pop <sebastian.pop@inria.fr>
8884 * Merge from mainline (r115016:120733).
8886 2007-01-12 Sebastian Pop <sebastian.pop@inria.fr>
8888 * Merge from mainline (r117632:117661).
8890 2007-01-12 Sebastian Pop <sebastian.pop@inria.fr>
8892 * tree-dump.c (dump_option_value_in): Add TDF_DEBUG.
8893 * tree-pass.h (TDF_DEBUG, debug_p): New.
8894 * tree-scalar-evolution.c (set_scalar_evolution, get_scalar_evolution,
8895 get_scalar_evolution, add_to_evolution, set_nb_iterations_in_loop,
8896 get_loop_exit_condition, analyze_evolution_in_loop,
8897 analyze_initial_condition, analyze_scalar_evolution,
8898 instantiate_parameters, number_of_latch_executions): Use debug_p.
8899 * tree-chrec.c (chrec_apply): Use debug_p.
8900 * tree-data-ref.c: Include graphite.h.
8901 (dump_data_reference): Print also the access matrix.
8902 (analyze_array, analyze_indirect_ref, init_data_ref,
8903 analyze_offset_expr, address_analysis, object_analysis,
8904 create_data_ref, finalize_ddr_dependent,
8905 non_affine_dependence_relation, analyze_ziv_subscript,
8906 analyze_siv_subscript_cst_affine,
8907 compute_overlap_steps_for_affine_1_2, analyze_subscript_affine_affine,
8908 can_use_analyze_subscript_affine_affine, analyze_siv_subscript,
8909 analyze_miv_subscript, analyze_overlapping_iterations,
8910 build_classic_dist_vector, subscript_dependence_tester,
8911 compute_affine_dependence, analyze_all_data_dependences): Use debug_p.
8912 (build_access_matrix_with_af): No longer static.
8913 * tree-data-ref.h (scop_p): ... declaration here.
8914 (data_reference.scop): New field.
8915 (DR_SCOP, DR_ACCESS_MATRIX): New.
8916 (build_access_matrix_with_af, dr_num_subscripts): Declared.
8917 * graphite.c (print_graphite_bb): Call dump_data_references.
8918 (print_scop): Use scop_nb_loops and scop_dim_domain.
8919 (test_for_scop_bound): Use debug_p.
8920 (scan_tree_for_params): Use scop_nb_loops, scop_nb_loops and
8922 (scop_loop_index): Moved...
8923 (scop_record_loop): New.
8924 (build_scop_loop_nests): Use scop_record_loop.
8925 (build_scop_domain): Use scop_dim_domain.
8926 (build_access_matrix): Implemented.
8927 (build_scop_canonical_schedules): Use scop_nb_loops.
8928 (build_graphite_bb): Initialize GBB_SCOP.
8929 * graphite.h (scop_p): Moved...
8930 (graphite_bb.scop): New field.
8931 (graphite_bb.iteration_domain, GBB_DOMAIN, scop.nb_params,
8932 scop.nb_loops, scop.dim_domain, SCOP_NB_LOOPS, SCOP_NB_PARAMS,
8933 SCOP_DIM_DOMAIN, SCOP_STMTS): Removed.
8934 (scop_nb_params, scop_nb_loops, scop_dim_domain, gbb_dim_domain,
8935 scop_loop_index): New.
8936 * Makefile.in (tree-data-ref.o): Depends on graphite.h.
8938 2007-01-05 Sebastian Pop <sebastian.pop@inria.fr>
8940 * Merge from mainline (r117661:120450).
8942 2006-10-12 Sebastian Pop <sebastian.pop@inria.fr>
8944 * tree-scalar-evolution.c (instantiate_parameters_1): Don't stop
8945 at the first declaration outside the varying loop, instantiate as
8947 * tree-chrec.c (for_each_scev_op): New.
8948 * tree-chrec.h (for_each_scev_op): Declared.
8949 * tree-ssa-loop.c (pass_graphite_trans): Don't dump the function.
8950 * tree-data-ref.c (get_references_in_stmt,
8951 find_data_references_in_stmt): New, from trunk.
8952 (find_data_references_in_loop): Use get_references_in_stmt
8953 and find_data_references_in_loop, modified as in trunk.
8954 (build_access_matrix_with_af): New.
8955 * tree-data-ref.h (data_reference): Add a field access_matrix.
8956 (data_ref_loc): New, as in trunk.
8957 * graphite.c (print_graphite_bb, bb_in_scop_p, stmt_in_scop_p,
8958 invariant_in_scop_p, param_index, scan_tree_for_params,
8959 scop_loop_index, build_scop_loop_nests, build_scop_domain, irp_data,
8960 idx_record_param, idx_record_params, build_access_matrix,
8961 build_scop_data_accesses, build_scop_canonical_schedules,
8962 build_graphite_bb, build_scop_bbs, find_params_in_bb,
8963 build_scop_params): New.
8964 * graphite.h (graphite_bb): New.
8965 (scop): Add fields static_schedule, params, loop_nest,
8967 * lambda.h: Declare vecs of lambda_matrix.
8968 * tree-flow.h (print_loop_ir_bb): Declared.
8969 * tree-cfg.c (print_loop_ir_bb): New.
8970 (print_loop): Use print_loop_ir_bb.
8972 2006-10-12 Sebastian Pop <pop@cri.ensmp.fr>
8974 * Merge from mainline (r115016:117632).
8976 2006-10-11 Sebastian Pop <pop@cri.ensmp.fr>
8978 * graphite.c (debug_scops): Adjust definition for avoiding a bootstrap
8979 break due to a warning.
8981 2006-10-10 Sebastian Pop <pop@cri.ensmp.fr>
8983 * graphite.c (print_scops, debug_scops): New.
8984 (graphite_transform): Renamed graphite_find_transform.
8985 * graphite.h (debug_scops): Declared.
8987 2006-08-17 Sebastian Pop <pop@cri.ensmp.fr>
8989 * tree-match.c: Reformat following the GNU style.
8990 * tree-match.h: Reformat following the GNU style.
8991 * tree-pattern.h: Removed empty file.
8992 * Makefile.in: Remove references to tree-pattern.h.
8993 * tree-check.c: Reformat following the GNU style.
8994 (execute_tree_check): Move gate condition code to...
8995 (gate_tree_check): ...here. New function.
8996 (pass_check): Use the gate function.
8998 2006-07-04 Nic Volanschi <nic.volanschi@free.fr>
9000 * tree-pattern.h: New. Tree pattern matching and checking using
9002 * tree-check.c: New. Tree/CFG checking pass.
9003 * tree-match.c: New. Library for tree pattern matching.
9004 * opts.c, common.opt: Add options --ftree-check & --ftree-checks.
9005 * toplev.c, flags.h: Add globals for tree-check pass.
9006 * Makefile.in: Integrate the files in tree-check pass.
9007 * timevar.def, tree-optimize.c, tree-pass.h: Register tree-check pass.
9008 * pretty-print.c, pretty-print.h, tree-pretty-print.c, diagnostic.h:
9009 Introduce a "lazy" pretty-print mode.
9010 * tree.c, tree.h: Add tree_name.
9012 2006-07-04 Sebastian Pop <pop@cri.ensmp.fr>
9014 * doc/invoke.texi (-fgraphite): Correct typo.
9015 * tree-scalar-evolution.c (number_of_iterations_for_all_loops): Update
9016 use of print_loop_ir.
9017 * gcc.dg/graphite/scop-1.c: New.
9018 * gcc.dg/graphite/scop-2.c: New.
9019 * gcc.dg/graphite/graphite.exp: New.
9020 * graphite.c: Include domwalk.h.
9021 (print_scop): Print only the entry and exit blocks.
9022 (debug_scop): No longer static.
9023 (affine_expr): Fix formating. Return also true when the expression is
9025 (stmt_simple_for_scop_p): Fix formating.
9026 (build_scops): Use domwalk.
9027 (get_loop_start, end_scop, test_for_scop_bound): New.
9028 (graphite_transform_loops): Avoid printing on stderr.
9029 * graphite.h (debug_scop): Declared.
9030 * tree-flow.h (debug_loop_ir, print_loop_ir): Update declarations.
9031 * Makefile.in (graphite.o): Depend on domwalk.h.
9032 * tree-cfg.c (print_loop, print_pred_bbs, print_succ_bbs): Remove
9033 declarations for static functions.
9034 (print_loop, print_loop_ir, debug_loop_ir): Use an extra parameter for
9035 controlling output verbosity.
9037 2006-06-26 Sebastian Pop <pop@cri.ensmp.fr>
9038 Plesco Alexandru <shurikx@gmail.com>
9040 * doc/invoke.texi (-fgraphite): Document.
9041 * tree-pass.h (pass_graphite_transforms): Declared.
9042 * timevar.def (TV_GRAPHITE_TRANSFORMS): New.
9043 * tree-ssa-loop.c (graphite_transforms, gate_graphite_transforms): New.
9044 (pass_graphite_transforms): Defined.
9045 * tree-data-ref.c (free_data_ref, data_reference): Extern.
9046 * tree-data-ref.h (free_data_ref, data_reference): Declared.
9047 * graphite.c, graphite.h: New.
9048 * common.opt (fgraphite): Declared.
9049 * tree-flow.h (graphite_transform_loops): Declared.
9050 * Makefile.in (OBJS-common): Add graphite.o.
9051 (graphite.o): New rule.
9052 * passes.c (pass_graphite_transforms): Scheduled.