1 2010-07-27 Andreas Simbuerger <simbuerg@fim.uni-passau.de>
3 * graphite.c (graphite_initialize): Do not initialize
4 CLooG and initialize the Parma Polyhedra Library
5 manually when using CLOOG_ORG.
6 (graphite_finalize): Do not finalize CLooG and finalize
7 the Parma Polyhedra Library manually when using CLOOG_ORG.
8 * graphite-cloog-compat.h (cloog_initialize): Hide function
10 (cloog_finalize): Same.
12 2010-07-27 Andreas Simbuerger <simbuerg@fim.uni-passau.de>
14 * graphite-clast-to-gimple.c (free_scattering): Change
15 CloogDomainList/CloogDomain to CloogScatteringList/CloogScattering
17 (build_cloog_prog): Same.
18 * graphite-cloog-compat.h (cloog_domain): Removed.
19 (cloog_scattering): New.
20 (cloog_set_domain): Removed.
21 (cloog_set_scattering): New.
22 (cloog_next_domain): Removed.
23 (cloog_next_scattering): New.
24 (cloog_set_next_domain): Removed.
25 (cloog_set_next_scattering): New.
26 (CloogScatteringList): New.
27 (CloogScattering): New.
28 (cloog_scattering_free): New.
29 (new_Cloog_Scattering_from_ppl_Polyhedron): New.
30 * graphite-cloog-util.c (new_Cloog_Scattering_from_ppl_Polyhedron):
33 2010-07-27 Andreas Simbuerger <simbuerg@fim.uni-passau.de>
35 * graphite-clast-to-gimple.c (build_cloog_prog): Extend with
37 (set_cloog_options): Same.
38 (print_clast_stmt): Same.
39 (scop_to_clast): Same.
40 (print_generated_program): Same.
42 * graphite-clast-to-gimple.h: Include graphite-cloog-util.h.
43 (scop_to_clast): Extend with CloogState.
44 * graphite-cloog-util.c: Include graphite-cloog-compat.h
45 (new_Cloog_Domain_from_ppl_Polyhedron):
46 Extend with CloogState. Use cloog_domain_from_cloog_matrix (CLOOG_ORG).
47 (new_Cloog_Domain_from_ppl_Pointset_Powerset): Extend with CloogState.
48 (new_Cloog_Domain_from_ppl_Polyhedron): Same.
49 * graphite-cloog-util.h (build_cloog_prog): Same.
50 * graphite-cloog-copat.h (build_cloog_prog): New.
52 (cloog_state_malloc): New.
53 (cloog_state_free): New.
54 (cloog_loop_malloc): New.
55 (cloog_options_malloc): New.
56 (cloog_statement_alloc): New.
57 (cloog_domain_from_cloog_matrix): New.
58 (new_Cloog_Domain_from_ppl_Pointset_Powerset): New.
59 (new_Cloog_Domain_from_ppl_Polyhedron): New.
61 2010-07-27 Andreas Simbuerger <simbuerg@fim.uni-passau.de>
63 * graphite-clast-to-gimple.c (clast_name_to_gcc): Parameter
64 type of NAME now depends on used CLooG version.
65 (clast_to_gcc_expression): Replace expr_* with clast_expr_*.
66 (gcc_type_for_clast_expr): Same.
67 (print_clast_stmt): Replace pprint with clast_pprint.
68 * graphite-cloog-compat.h: Provide compatibility macros for
71 (clast_expr_term): New.
72 (clast_expr_red): New.
73 (clast_expr_bin): New.
76 2010-07-27 Andreas Simbuerger <simbuerg@fim.uni-passau.de>
78 * graphite-clast-to-gimple.c (set_cloog_options): Make CLooG options
79 compatible to newer CLooG releases (CLOOG_ORG).
80 (build_cloog_prog): Pass CloogOptions to more functions (CLOOG_ORG).
81 (scop_to_clast): Pass CloogOptions to build_cloog_prog (CLOOG_ORG).
82 * graphite-cloog-compat.h: Add compatibility macros for CLooG Legacy.
83 (build_cloog_prog) : New.
84 (cloog_program_extract_scalars): New.
85 (cloog_program_scatter): New.
87 2010-07-27 Andreas Simbuerger <simbuerg@fim.uni-passau.de>
89 * graphite-clast-to-gimple.c: Include graphite-cloog-compat.h
90 conditionally (CLOOG_ORG).
91 * graphite-cloog-compat.h: New. Include graphite-cloog-compat.h.
92 (cloog_statement_usr): New.
94 (cloog_set_domain): Same.
95 (cloog_next_domain): Same.
96 (cloog_set_next_domain): Same.
97 (cloog_program_nb_scattdims): Same.
98 (cloog_program_set_nb_scattdims): Same.
99 (cloog_program_names): Same.
100 (cloog_program_set_names): Same.
101 (cloog_program_set_context): Same.
102 (cloog_program_set_loop): Same.
103 (cloog_program_blocklist): Same.
104 (cloog_program_set_blocklist): Same.
105 (cloog_program_scaldims): Same.
106 (cloog_program_set_scaldims): Same.
107 (cloog_names_nb_parameters): Same.
108 (cloog_names_set_nb_parameters): Same.
109 (cloog_names_parameters): Same.
110 (cloog_names_set_parameters): Same.
111 (cloog_names_set_nb_iterators): Same.
112 (cloog_names_set_iterators): Same.
113 (cloog_names_set_nb_scattering): Same.
114 (cloog_names_set_scattering): Same.
115 (cloog_statement_set_usr): Same.
116 (cloog_loop_set_next): Same.
117 (cloog_loop_set_domain): Same.
118 (cloog_loop_set_block): Same.
119 (cloog_block_list_next): Same.
120 (cloog_block_list_set_next):
121 (cloog_block_list_set_block): Same.
123 2010-07-27 Sebastian Pop <sebastian.pop@amd.com>
125 * graphite-sese-to-poly.c (rewrite_cross_bb_scalar_deps): Returns
127 (rewrite_commutative_reductions_out_of_ssa_close_phi): Same.
128 (rewrite_commutative_reductions_out_of_ssa_loop): Same.
129 (rewrite_cross_bb_scalar_deps_out_of_ssa): Call scev_reset_htab
130 when something has been changed.
131 (rewrite_commutative_reductions_out_of_ssa): Same.
133 * gcc.dg/graphite/id-26.c: New.
135 2010-07-26 Sebastian Pop <sebastian.pop@amd.com>
137 * graphite-sese-to-poly.c (propagate_expr_outside_region): Also
138 handle the case when def is in the sese region.
139 (rewrite_close_phi_out_of_ssa): Call propagate_expr_outside_region
140 for invariant expressions.
141 (rewrite_cross_bb_phi_deps): Removed.
142 (rewrite_cross_bb_scalar_deps): Also handle GIMPLE_PHI nodes.
143 (rewrite_cross_bb_scalar_deps_out_of_ssa): Do not call
144 rewrite_cross_bb_phi_deps.
146 2010-07-26 Sebastian Pop <sebastian.pop@amd.com>
148 * graphite-sese-to-poly.c
149 (rewrite_commutative_reductions_out_of_ssa_loop): Call
150 scev_analyzable_p only on is_gimple_reg
152 * gcc.dg/graphite/id-25.c: New.
154 2010-07-22 Sebastian Pop <sebastian.pop@amd.com>
156 * graphite-sese-to-poly.c (propagate_expr_outside_region): New.
157 (rewrite_close_phi_out_of_ssa): Propagate constant values or
158 parametric expressions outside the scop region.
159 (rewrite_cross_bb_scalar_deps): Same.
160 * sese.c (rename_uses): Use NULL_TREE instead of NULL for trees.
162 * gcc.dg/graphite/run-id-5.c: New.
163 * gcc.dg/graphite/run-id-6.c: New.
164 * gfortran.dg/graphite/id-21.f: New.
166 2010-07-22 Sebastian Pop <sebastian.pop@amd.com>
168 * graphite-sese-to-poly.c (rewrite_phi_out_of_ssa): Use
169 SSA_NAME_DEF_STMT only on SSA_NAMEs.
171 * gcc.dg/graphite/id-24.c: New.
173 2010-07-22 Sebastian Pop <sebastian.pop@amd.com>
175 * tree-scalar-evolution.c (instantiate_scev_name): Do not
176 instantiate default definitions.
178 2010-07-20 Vladimir Kargov <kargov@gmail.com>
180 * graphite-scop-detection.c (is_valid_stmt_p): New.
181 (is_valid_bb_p): New.
183 2010-07-20 Vladimir Kargov <kargov@gmail.com>
184 Sebastian Pop <sebastian.pop@amd.com>
186 * cfgloop.c (is_loop_exit): Renamed loop_exits_to_bb_p.
187 (loop_exits_from_bb_p): New.
188 * cfgloop.h (is_loop_exit): Renamed loop_exits_to_bb_p.
189 (loop_exits_from_bb_p): Declared.
190 * graphite-scop-detection.c (scopdet_basic_block_info): Call
193 2010-07-20 Vladimir Kargov <kargov@gmail.com>
195 * refined-regions.c: Include tree-pass.h, cfgloop.h, gimple.h, and
197 (dot_regions_1): New.
199 * refined-regions.h (dot_regions): Declared.
200 * Makefile.in (refined-regions.o): Update dependences.
202 2010-07-20 Sebastian Pop <sebastian.pop@amd.com>
204 * graphite-sese-to-poly.c (rewrite_close_phi_out_of_ssa): Add an
205 extra parameter for the region. Call scev_analyzable_p.
206 (rewrite_reductions_out_of_ssa): Update call to
207 rewrite_close_phi_out_of_ssa.
208 (rewrite_cross_bb_phi_deps): Same.
209 (rewrite_commutative_reductions_out_of_ssa_loop): Add an extra
210 parameter for the region. Call scev_analyzable_p.
211 (rewrite_commutative_reductions_out_of_ssa): Update call to
212 rewrite_commutative_reductions_out_of_ssa_loop.
214 2010-07-20 Sebastian Pop <sebastian.pop@amd.com>
216 * gcc.dg/tree-ssa/pr20742.c: New.
218 2010-07-15 Sebastian Pop <sebastian.pop@amd.com>
220 * sese.c (rename_uses): Call unshare_expr before force_gimple_operand.
222 * gcc.dg/graphite/id-23.c: New.
224 2010-07-15 Sebastian Pop <sebastian.pop@amd.com>
226 * graphite-sese-to-poly.c (reduction_phi_p): Do not rewrite out of
227 SSA scalar phi nodes that can be scev_analyzable_p.
229 * gfortran.dg/graphite/id-20.f: Adjust testcase.
231 2010-07-15 Sebastian Pop <sebastian.pop@amd.com>
233 * graphite-sese-to-poly.c (rewrite_close_phi_out_of_ssa): Correctly
234 handle SSA_NAME_IS_DEFAULT_DEF.
236 2010-07-15 Sebastian Pop <sebastian.pop@amd.com>
238 * sese.c (rename_uses): Handl unconditionally gimple_debug statements.
240 * gcc.dg/graphite/pr42729.c: New.
242 2010-07-15 Sebastian Pop <sebastian.pop@amd.com>
244 * graphite-sese-to-poly.c (rewrite_close_phi_out_of_ssa): Special
245 case non close-phi nodes with one argument.
247 2010-07-15 Sebastian Pop <sebastian.pop@amd.com>
249 * sese.h (scev_analyzable_p): Scevs could be expressions without
250 chrecs and still be scev_analyzable_p.
252 2010-07-15 Sebastian Pop <sebastian.pop@amd.com>
254 * params.def (PARAM_SCEV_MAX_EXPR_SIZE): Bump the value to 100.
256 2010-07-15 Sebastian Pop <sebastian.pop@amd.com>
258 * cfgloop.c (alloc_loop): Remove initialization of loop->single_iv.
259 * cfgloop.h (struct loop): Remove single_iv field.
260 * graphite-sese-to-poly.c (graphite_loop_normal_form): Removed.
261 (scop_canonicalize_loops): Removed.
262 (scop_ivs_can_be_represented): Do not use loop->single_iv. Iterate
263 over all the loop phi nodes in loop->header.
264 (build_poly_scop): Remove use of scop_canonicalize_loops.
266 2010-07-15 Sebastian Pop <sebastian.pop@amd.com>
268 * graphite-sese-to-poly.c (rewrite_cross_bb_scalar_deps): Also
271 2010-07-15 Sebastian Pop <sebastian.pop@amd.com>
273 * tree-chrec.c (chrec_apply): Should only apply to the specified
274 variable. Also handle multivariate chains of recurrences that
275 satisfy evolution_function_is_affine_p. Also handle CASE_CONVERT.
277 2010-07-15 Sebastian Pop <sebastian.pop@amd.com>
279 * graphite-clast-to-gimple.c (debug_clast_name_index): Removed.
280 (debug_clast_name_indexes_1): Removed.
281 (debug_clast_name_indexes): Removed.
282 (pbb_to_depth_to_oldiv): Removed.
283 (build_iv_mapping): Replace the use of rename_map with iv_map.
284 (translate_clast_user): Remove uses of rename_map. Allocate and
286 (translate_clast_for_loop): Remove uses of rename_map.
287 (translate_clast_for): Same.
288 (translate_clast_guard): Same.
289 (translate_clast): Same.
291 * graphite-clast-to-gimple.h (debug_clast_name_indexes): Removed.
292 * graphite-sese-to-poly.c (scev_analyzable_p): Moved...
293 * sese.c (set_rename): Now static.
294 (rename_variables_in_stmt): Removed.
296 (is_parameter): Removed.
298 (expand_scalar_variables_call): Removed.
299 (expand_scalar_variables_ssa_name): Removed.
300 (expand_scalar_variables_expr): Removed.
301 (expand_scalar_variables_stmt): Removed.
302 (expand_scalar_variables): Removed.
303 (rename_variables): Removed.
304 (remove_condition): Removed.
305 (get_true_edge_from_guard_bb): Removed.
306 (get_false_edge_from_guard_bb): Removed.
307 (struct igp): Removed.
308 (default_before_guard): Removed.
309 (convert_for_phi_arg): Removed.
310 (add_guard_exit_phis): Removed.
311 (insert_guard_phis): Removed.
312 (graphite_copy_stmts_from_block): Now also uses iv_map and a
313 region. Do not copy conditions. Do not copy induction variables.
315 (copy_bb_and_scalar_dependences): Allocate a local rename_map for
316 the translated statement. Use the iv_map for the induction
318 * sese.h (copy_bb_and_scalar_dependences): Update declaration.
319 (set_rename): Removed declaration.
320 (scev_analyzable_p): ...here.
321 * tree-chrec.c (chrec_apply_map): New.
322 * tree-chrec.h (chrec_apply_map): Declared.
324 2010-07-15 Sebastian Pop <sebastian.pop@amd.com>
326 * graphite-clast-to-gimple.c (translate_clast_for_loop): Do not call
327 insert_loop_close_phis.
328 * sese.c (name_defined_in_loop_p): Removed.
329 (expr_defined_in_loop_p): Removed.
330 (alive_after_loop): Removed.
331 (close_phi_not_yet_inserted_p): Removed.
332 (struct alep): Removed.
333 (add_loop_exit_phis): Removed.
334 (insert_loop_close_phis): Removed.
336 2010-07-15 Andreas Simbuerger <simbuerg@fim.uni-passau.de>
338 * graphite-cloog-util.c (cloog_matrix_to_ppl_constraint): Fix flipped
340 * graphite-poly.c (psct_scattering_dim_for_loop_depth): Same.
342 2010-07-07 Sebastian Pop <sebastian.pop@amd.com>
344 * gfortran.dg/graphite/id-20.f: New.
346 2010-07-05 Andreas Simbuerger <simbuerg@fim.uni-passau.de>
348 * graphite-cloog-util.h: Added cloog.h.
349 * graphite-blocking.c: Removed cloog.h.
350 * graphite-dependences.c: Same.
351 * graphite-interchange.c: Same.
352 * graphite-poly.c: Same.
353 * graphite-ppl.c: Same.
354 * graphite-scop-detection.c: Same.
355 * graphite-sese-to-poly.c:
357 Removed graphite-clast-to-gimple.h.
358 (check_poly_representation): Removed (unused).
359 * graphite-sese-to-poly.h
360 (check_poly_representation): Removed (unused).
362 2010-07-05 Andreas Simbuerger <simbuerg@fim.uni-passau.de>
365 (OBJS-common): Added graphite-cloog-util.o.
366 (graphite-clast-to-gimple.o): Added graphite-cloog-util.h.
367 (graphite-cloog-util.o): New.
368 (graphite-ppl.o): Added graphite-cloog-util.h.
369 * graphite-clast-to-gimple.c:
370 Added graphite-cloog-util.h to include statements.
371 * graphite-cloog-util.c: New.
372 (new_Cloog_Matrix_from_ppl_Polyhedron): Moved from graphite-ppl.c.
373 (new_Cloog_Domain_from_ppl_Polyhedron): Same.
374 (new_Cloog_Domain_from_ppl_Pointset_Powerset): Same.
375 (new_C_Polyhedron_from_Cloog_Matrix): Same.
376 (ppl_Constrain_System_number_of_constraints): Same.
377 (new_Cloog_Matrix_from_ppl_Constraint_System): Same.
378 (oppose_constraint): Same.
379 (cloog_matrix_to_ppl_constraint): Same.
380 (new_Constraint_System_from_Cloog_Matrix): Same.
381 (insert_constraint_into_matrix): Same. Declared static.
382 * graphite-cloog-util.h: New.
383 (new_Cloog_Matrix_from_ppl_Polyhedron): Moved from graphite-ppl.h.
384 (new_Cloog_Domain_from_ppl_Polyhedron): Same.
385 (new_Cloog_Domain_from_ppl_Pointset_Powerset): Same.
386 (new_C_Polyhedron_from_Cloog_Matrix): Same.
387 (insert_constraint_into_matrix): Same.
389 Added graphite-cloog-util.h to include statements.
390 (new_Cloog_Matrix_from_ppl_Polyhedron): Moved to graphite-cloog-util.c.
391 (new_Cloog_Domain_from_ppl_Polyhedron): Same.
392 (new_Cloog_Domain_from_ppl_Pointset_Powerset): Same.
393 (new_C_Polyhedron_from_Cloog_Matrix): Same.
394 (insert_constraint_into_matrix): Same.
395 (ppl_Constrain_System_number_of_constraints): Same.
396 (new_Cloog_Matrix_from_ppl_Constraint_System): Same.
397 (oppose_constraint): Same.
398 (cloog_matrix_to_ppl_constraint): Same.
399 (new_Constraint_System_from_Cloog_Matrix): Same.
401 (new_Cloog_Matrix_from_ppl_Polyhedron): Moved to
402 graphite-cloog-util.h.
403 (new_Cloog_Domain_from_ppl_Polyhedron): Same.
404 (new_Cloog_Domain_from_ppl_Pointset_Powerset): Same.
405 (new_C_Polyhedron_from_Cloog_Matrix): Same.
406 (insert_constraint_into_matrix): Removed.
408 2010-07-04 Andreas Simbuerger <simbuerg@fim.uni-passau.de>
410 * graphite-clast-to-gimple.c
411 (precision_for_value): Resolve value_* calls to matching mpz_* calls.
412 (precision_for_interval): Same.
413 (gcc_type_for_interval): Same.
414 (compute_type_for_level): Same.
415 * graphite-interchange.c
416 (lst_interchange_profitable_p): Same.
418 (psct_scattering_dim_for_loop_depth): Same.
420 (ppl_max_for_le_pointset): Same.
421 (ppl_min_for_le_pointset): Same.
423 2010-06-25 Vladimir Kargov <kargov@gmail.com>
425 * refined-regions.c (bb_index_compare): New.
426 (get_bbs_in_region): New.
427 (print_bbs_in_region): New.
428 (print_refined_region): Add an argument that allows to print
429 all basic blocks contained in regions.
430 (debug_refined_region): Update call to print_refined_region.
431 * refined-regions.h (print_refined_region): Update declaration.
432 (get_bbs_in_region): Declared.
433 * graphite-scop-detection.c (build_scops_new): Print the refined
434 region tree into the Grahite dump file.
436 2010-06-24 Sebastian Pop <sebastian.pop@amd.com>
438 * graphite-sese-to-poly.c (rewrite_degenerate_phi): New.
439 (rewrite_reductions_out_of_ssa): Call it for degenerate_phi_result.
441 2010-06-24 Sebastian Pop <sebastian.pop@amd.com>
443 * graphite-sese-to-poly.c (rewrite_cross_bb_phi_deps): Call
444 rewrite_close_phi_out_of_ssa.
446 * gcc.dg/graphite/id-22.c: New.
448 2010-06-24 Sebastian Pop <sebastian.pop@amd.com>
450 * graphite-sese-to-poly.c (rewrite_cross_bb_phi_deps): Remove dead code.
452 2010-06-24 Sebastian Pop <sebastian.pop@amd.com>
454 * graphite-clast-to-gimple.c (build_iv_mapping): Rename map with
456 * sese.c (debug_rename_map): Same.
459 (rename_variables_in_stmt): Same.
460 (expand_scalar_variables_call): Same.
461 (expand_scalar_variables_ssa_name): Same.
462 (expand_scalar_variables_expr): Same.
463 (expand_scalar_variables_stmt): Same.
464 (expand_scalar_variables): Same.
465 (rename_variables): Same.
466 (graphite_copy_stmts_from_block): Same.
467 (copy_bb_and_scalar_dependences): Same.
469 2010-06-24 Sebastian Pop <sebastian.pop@amd.com>
471 * graphite-clast-to-gimple.c (copy_renames): Removed.
472 (translate_clast_for): Do not call copy_renames.
473 (translate_clast_guard): Same.
475 2010-06-23 Sebastian Pop <sebastian.pop@amd.com>
477 * graphite-sese-to-poly.c (rewrite_reductions_out_of_ssa): Moved up.
478 (rewrite_cross_bb_phi_deps): Split out of rewrite_cross_bb_scalar_deps.
479 (rewrite_cross_bb_scalar_deps_out_of_ssa): Run rewrite_cross_bb_phi_deps
480 before rewrite_cross_bb_scalar_deps.
482 2010-06-23 Sebastian Pop <sebastian.pop@amd.com>
484 * graphite-sese-to-poly.c (rewrite_commutative_reductions_out_of_ssa):
485 Early return in when flag_associative_math is not set.
487 2010-06-23 Sebastian Pop <sebastian.pop@amd.com>
489 * gcc.dg/graphite/run-id-2.c: Call abort.
491 2010-06-23 Sebastian Pop <sebastian.pop@amd.com>
493 * graphite-sese-to-poly.c (rewrite_phi_out_of_ssa): Always insert out
494 of SSA copies on edges except for loop->latch.
496 2010-06-23 Sebastian Pop <sebastian.pop@amd.com>
498 * graphite-sese-to-poly.c (rewrite_cross_bb_scalar_deps_out_of_ssa):
499 Split out of rewrite_reductions_out_of_ssa.
500 * graphite-sese-to-poly.h (rewrite_cross_bb_scalar_deps_out_of_ssa):
502 * graphite.c (graphite_transform_loops): Call it.
504 2010-06-23 Sebastian Pop <sebastian.pop@amd.com>
506 * graphite.c (graphite_transform_loops): Add two more dbg_cnt calls.
508 2010-06-15 Sebastian Pop <sebastian.pop@amd.com>
510 * passes.c (init_optimization_passes): Add pass_graphite.
511 Schedule a pass_copy_prop before pass_graphite_transforms.
512 * timevar.def (TV_GRAPHITE): Declared.
513 * tree-pass.h (pass_graphite): Declared.
514 * tree-ssa-loop.c (pass_graphite): New.
516 * gcc.dg/graphite/id-20.c: New.
518 2010-06-12 Sebastian Pop <sebastian.pop@amd.com>
520 * graphite-clast-to-gimple.c (gloog): Do not pass scops in parameter.
521 Remove calls to rename_nb_iterations and rename_sese_parameters.
522 * graphite-clast-to-gimple.h (gloog): Update declaration.
523 * graphite.c (graphite_transform_loops): Update call to gloog.
524 * sese.c (rename_variables_in_expr): Removed.
525 (rename_nb_iterations): Removed.
526 (rename_sese_parameters): Removed.
527 * sese.h (rename_nb_iterations): Removed.
528 (rename_sese_parameters): Removed.
530 2010-06-12 Sebastian Pop <sebastian.pop@amd.com>
532 * graphite-clast-to-gimple.c (gloog): Remove call to
533 sese_adjust_liveout_phis.
534 * graphite-sese-to-poly.c (scev_analyzable_p): When scev returns an
535 SSA_NAME, allow it to be handled by rewrite_cross_bb_scalar_deps.
536 (rewrite_cross_bb_scalar_deps): Handle GIMPLE_PHI nodes: call
537 rewrite_phi_out_of_ssa.
538 * sese.c (get_vdef_before_sese): Removed.
539 (sese_adjust_vphi): Removed.
540 (sese_adjust_liveout_phis): Removed.
541 * sese.h (sese_adjust_liveout_phis): Removed.
543 2010-06-12 Sebastian Pop <sebastian.pop@amd.com>
545 * graphite-sese-to-poly.c (insert_out_of_ssa_copy): Pass an extra
546 argument for the place after which to insert the out of SSA copy.
547 (rewrite_close_phi_out_of_ssa): Update calls to insert_out_of_ssa_copy.
548 (rewrite_phi_out_of_ssa): Same.
549 (rewrite_cross_bb_scalar_deps): Same.
550 (insert_copyout): Removed.
551 (insert_copyin): Removed.
552 (translate_scalar_reduction_to_array): Call insert_out_of_ssa_copy and
553 insert_out_of_ssa_copy_on_edge instead of insert_copyout and
556 2010-06-12 Sebastian Pop <sebastian.pop@amd.com>
558 * graphite-sese-to-poly.c (build_scop_bbs): Not static anymore.
559 (rewrite_reductions_out_of_ssa): Same.
560 (rewrite_commutative_reductions_out_of_ssa): Same.
561 (build_poly_scop): Do not call these functions.
562 * graphite-sese-to-poly.h (build_poly_scop): Declared.
563 (rewrite_reductions_out_of_ssa): Declared.
564 (rewrite_commutative_reductions_out_of_ssa): Declared.
565 * graphite.c (graphite_transform_loops): Call on every scop
566 rewrite_commutative_reductions_out_of_ssa before calling
567 rewrite_reductions_out_of_ssa and build_scop_bbs.
569 2010-06-12 Sebastian Pop <sebastian.pop@amd.com>
571 * graphite-dependences.c (dot_deps): Make system call to dotty run
573 (dot_deps_stmt): Same.
574 * graphite-poly.c (dot_lst): Same.
576 2010-06-11 Sebastian Pop <sebastian.pop@amd.com>
578 * graphite-clast-to-gimple.c (gcc_type_for_interval): Do not pass
579 old_type in parameter.
580 (gcc_type_for_value): Update call to gcc_type_for_interval.
581 (compute_type_for_level_1): Renamed compute_type_for_level.
582 Update call to gcc_type_for_interval.
584 2010-06-09 Sebastian Pop <sebastian.pop@amd.com>
586 * tree-scalar-evolution.c (instantiate_scev_name): Do not fail
587 the scev analysis when the variable is not used outside the loop
588 in a close phi node: call compute_overall_effect_of_inner_loop.
590 2010-06-09 Sebastian Pop <sebastian.pop@amd.com>
592 * graphite-sese-to-poly.c (single_pred_cond): Renamed
593 single_pred_cond_non_loop_exit. Return NULL for loop exit edges.
594 (build_sese_conditions_before): Renamed call to single_pred_cond.
595 (build_sese_conditions_after): Same.
597 2010-06-09 Sebastian Pop <sebastian.pop@amd.com>
599 * graphite-poly.h: Fix comments and indentation.
600 * graphite-sese-to-poly.c: Same.
601 (build_sese_conditions_before): Compute stmt and gbb only when needed.
602 * tree-chrec.c: Fix comments and indentation.
603 (tree-ssa-loop-niter.c): Same.
605 2010-06-08 Tobias Grosser <grosser@fim.uni-passau.de>
607 * refined-regions.c (create_region): Only initialize the region.
608 (find_regions_with_entry): Initialize parent relation and bbmap
610 (build_regions_tree): Set outermost_region to region instead of
612 (calculate_region_tree): Remove unneeded parameters.
614 2010-06-02 Tobias Grosser <grosser@fim.uni-passau.de>
616 * graphite-scop-detection.c (is_scop_p): New.
617 (build_scops_new): New. A skeleton for the new scop detection.
618 (build_scops_old): Renamed from build_scops.
619 (build_scops): New version. Call the new and the old scop
622 2010-05-27 Tobias Grosser <grosser@fim.uni-passau.de>
623 Antoniu Pop <antoniu.pop@gmail.com>
625 * Makefile.in (OBJS-common): Add refined-regions.o.
626 (refined-regions.o): New.
627 (graphite-scop-detection.o): Use refined-regions.h.
628 * graphite-scop-detection.c: Include refined-regions.h
629 (build_scops): Also build the refined region tree.
630 * refined-regions.c: New. Adds an algorithm to detect refined
632 (print_refined_region): New.
633 (debug_refined_region): New.
634 (refined_region_contains_bb_p): New.
635 (refined_region_contains_region_p): New.
637 (struct find_regions_global_data): New.
639 (typedef struct bb_bb_def): New.
640 (new_bb_bb_def): New.
641 (bb_bb_map_hash): New.
645 (new_bb_reg_def): New.
646 (bb_reg_map_hash): New.
647 (eq_bb_reg_map): New.
648 (find_new_region): New.
649 (insert_new_reg): New.
650 (insert_new_bb): New.
651 (insert_shortcut): New.
652 (get_next_postdom): New.
653 (create_region): New.
654 (find_regions_with_entry): New.
655 (find_regions_adc): New.
657 (get_topmost_parent): New.
658 (build_regions_tree): New.
659 (calculate_region_tree): New.
660 (free_region_tree): New.
661 * refined-regions.h: New.
662 (struct refined_region): New.
663 (calculate_region_tree): New.
664 (free_region_tree): New.
665 (refined_region_contains_bb_p): New.
666 (refined_region_contains_region_p): New.
667 (print_refined_region): New.
668 (debug_refined_region): New.
670 2010-05-26 Sebastian Pop <sebastian.pop@amd.com>
672 * graphite-clast-to-gimple.c (graphite_create_new_loop_guard): Use
675 2010-05-07 Sebastian Pop <sebastian.pop@amd.com>
677 * graphite-clast-to-gimple.c (graphite_create_new_loop_guard): Fix
678 type of integer_one_node for fold_build of POINTER_PLUS_EXPR.
680 2010-05-07 Sebastian Pop <sebastian.pop@amd.com>
682 * graphite-sese-to-poly.c (loop_entry_phi_arg): Renamed
683 phi_arg_in_outermost_loop.
684 (remove_simple_copy_phi): Call phi_arg_in_outermost_loop.
685 (remove_invariant_phi): Same.
687 2010-04-12 Andreas Simbuerger <simbuerg@fim.uni-passau.de>
689 * graphite-blocking.c
690 (pbb_strip_mine_profitable_p): Replace Value with mpz_t.
691 * graphite-clast-to-gimple.c
692 (clast_to_gcc_expression): Same.
693 (precision_for_value): Same.
694 (precision_for_interval): Same.
695 (gcc_type_for_interval): Same.
696 (graphite_create_new_guard): Same.
697 (compute_bounds_for_level): Same.
698 (graphite_create_new_loop_guard): Same.
699 * graphite-interchange.c
700 (build_linearized_memory_access): Same.
701 (pdr_stride_in_loop): Same.
702 (memory_strides_in_loop_1): Same.
703 (memory_strides_in_loop): Same.
704 (extend_scattering): Same.
705 (psct_scattering_dim_for_loop_depth): Same.
706 (pbb_number_of_iterations): Same.
708 (debug_iteration_domains): Same.
710 (new_Cloog_Domain_from_ppl_Pointset_Powerset): Same.
711 (ppl_set_inhomogeneous_gmp): Same.
712 (ppl_strip_loop): Same.
713 (ppl_lexico_compare_linear_expressions): Same.
714 (ppl_read_polyhedron_matrix): Same.
715 (ppl_max_for_le_pointset): Same.
717 (ppl_read_polyhedron_matrix): Same.
718 (tree_int_to_gmp): Same.
719 (gmp_cst_to_tree): Same.
720 (ppl_set_inhomogeneous): Same.
721 (ppl_set_inhomogeneous_tree): Same.
722 (ppl_set_coef): Same.
723 (ppl_set_coef_tree): Same.
724 * graphite-sese-to-poly.c
725 (build_pbb_scattering_polyhedrons): Same.
726 (build_scop_scattering): Same.
727 (scan_tree_for_params_right_scev): Same.
728 (scan_tree_for_params): Same.
729 (find_params_in_bb): Same.
730 (find_scop_parameters): Same.
731 (add_upper_bounds_from_estimated_nit): Same.
732 (build_loop_iteration_domains): Same.
733 (add_condition_to_domain): Same.
734 (pdr_add_memory_accesses): Same.
736 2010-04-11 Andreas Simbuerger <simbuerg@fim.uni-passau.de>
738 * graphite-blocking.c (pbb_strip_mine_profitable_p): Resolve
739 CLooG's value_* macros to their respective mpz_* counterparts.
740 * graphite-clast-to-gimple.c (clast_to_gcc_expression): Same.
741 (graphite_create_new_loop_guard): Same.
742 * graphite-interchange.c (build_linearized_memory_access): Same.
743 (pdr_stride_in_loop): Same.
744 (memory_strides_in_loop_1): Same.
745 (1st_interchange_profitable_p): Same.
746 * graphite-poly.c (extend_scattering): Same.
747 (psct_scattering_dim_for_loop_depth): Same.
748 (pbb_number_of_iterations): Same.
749 (pbb_number_of_iterations_at_time): Same.
750 * graphite-poly.h (new_1st_loop): Same.
751 * graphite-ppl.c (cloog_matrix_to_ppl_constraint): Same.
752 (oppose_constraint): Same.
753 (insert_constraint_into_matrix): Same.
754 (ppl_set_inhomogeneous_gmp): Same.
755 (ppl_set_coef_gmp): Same.
756 (ppl_strip_loop): Same.
757 (ppl_lexico_compare_linear_expressions): Same.
758 (ppl_max_for_le_pointset): Same.
759 (ppl_min_for_le_pointset): Same.
760 (ppl_build_realtion): Same.
761 * graphite-ppl.h (gmp_cst_to_tree): Same.
762 (ppl_set_inhomogeneous): Same.
763 (ppl_set_inhomogeneous_tree): Same.
764 (ppl_set_coef): Same.
765 (ppl_set_coef_tree): Same.
766 * graphite-sese-to-poly.c (build_pbb_scattering_polyhedrons): Same.
767 (build_scop_scattering): Same.
768 (add_value_to_dim): Same.
769 (scan_tree_for_params_right_scev): Same.
770 (scan_tree_for_params_int): Same.
771 (scan_tree_for_params): Same.
772 (find_params_in_bb): Same.
773 (find_scop_parameters): Same.
774 (add_upper_bounds_from_estimated_nit): Same.
775 (build_loop_iteration_domains): Same.
776 (create_linear_expr_from_tree): Same.
777 (add_condition_to_domain): Same.
778 (pdr_add_memory_accesses): Same.
780 2010-04-05 Sebastian Pop <sebastian.pop@amd.com>
783 * graphite-clast-to-gimple.c (max_signed_precision_type): Use
784 lang_hooks.types.type_for_size instead of build_nonstandard_integer_type.
785 When converting an unsigned type to signed, double its precision.
786 (gcc_type_for_interval): Use lang_hooks.types.type_for_size.
787 (gcc_type_for_iv_of_clast_loop): Call max_signed_precision_type.
788 (graphite_create_new_loop_guard): When ub + 1 wraps around, use lb <= ub.
790 2010-04-05 Sebastian Pop <sebastian.pop@amd.com>
793 * graphite-clast-to-gimple.c (max_signed_precision_type): Use
794 build_nonstandard_integer_type.
795 (gcc_type_for_interval): Same.
797 2010-04-05 Sebastian Pop <sebastian.pop@amd.com>
800 * graphite-clast-to-gimple.c (graphite_create_new_loop_guard): Use
801 POINTER_PLUS_EXPR for pointer types.
803 * gcc.dg/graphite/id-19.c: New.
805 2010-04-04 Sebastian Pop <sebastian.pop@amd.com>
808 * Makefile.in (graphite-clast-to-gimple.o): Depends on langhooks.h.
809 * graphite-clast-to-gimple.c: Include langhooks.h.
810 (max_signed_precision_type): New.
811 (max_precision_type): Takes two types as arguments.
812 (precision_for_value): New.
813 (precision_for_interval): New.
814 (gcc_type_for_interval): New.
815 (gcc_type_for_value): New.
816 (gcc_type_for_clast_term): New.
817 (gcc_type_for_clast_red): New.
818 (gcc_type_for_clast_bin): New.
819 (gcc_type_for_clast_expr): Split up into several functions.
820 (gcc_type_for_clast_eq): Rewritten.
821 (compute_bounds_for_level): New.
822 (compute_type_for_level_1): New.
823 (compute_type_for_level): New.
824 (gcc_type_for_cloog_iv): Removed.
825 (gcc_type_for_iv_of_clast_loop): Rewritten.
826 (graphite_create_new_loop): Compute the lower and upper bound types
827 with gcc_type_for_clast_expr.
828 (graphite_create_new_loop_guard): Same.
829 (find_cloog_iv_in_expr): Removed.
830 (compute_cloog_iv_types_1): Removed.
831 (compute_cloog_iv_types): Removed.
832 (gloog): Do not call compute_cloog_iv_types.
833 * graphite-sese-to-poly.c (new_gimple_bb): Do not initialize
835 (free_data_refs_aux): Do not free GBB_CLOOG_IV_TYPES.
836 * sese.h (struct gimple_bb): Removed field cloog_iv_types.
837 (GBB_CLOOG_IV_TYPES): Removed.
839 * gcc.dg/graphite/run-id-pr42644.c: Call abort.
841 2010-04-02 Sebastian Pop <sebastian.pop@amd.com>
843 Reverted this commit: as at this point the loop closed SSA form
844 is under a canonical form respecting the single argument condition.
845 * graphite-sese-to-poly.c (scalar_close_phi_node_p): Loop
846 close phi nodes may have more than one argument.
848 2010-04-01 Sebastian Pop <sebastian.pop@amd.com>
850 * graphite-sese-to-poly.c (rewrite_close_phi_out_of_ssa): Assert that
851 gimple_phi_num_args of the loop close SSA phi node is equal to 1.
852 (detect_commutative_reduction): Same.
854 2010-03-31 Sebastian Pop <sebastian.pop@amd.com>
856 * graphite-sese-to-poly.c (scalar_close_phi_node_p): Loop
857 close phi nodes may have more than one argument.
859 2010-03-30 Richard Guenther <rguenther@suse.de>
860 Zdenek Dvorak <ook@ucw.cz>
861 Sebastian Pop <sebastian.pop@amd.com>
864 * tree-ssa-copy.c (init_copy_prop): Handle loop close phi nodes
865 with multiple arguments.
866 (execute_copy_prop): Remove call to rewrite_into_loop_closed_ssa.
868 2010-03-23 Sebastian Pop <sebastian.pop@amd.com>
870 * graphite-dependences.c (print_pddr): Call print_pdr with an
872 * graphite-poly.c (debug_pdr): Add an extra argument for the
875 (print_pbb_domain): Same.
877 (print_scop_context): Same.
880 (debug_pbb_domain): Same.
884 (debug_scop_context): Same.
887 (print_scop_params): Same.
888 (debug_scop_params): Same.
889 (print_iteration_domain): Same.
890 (print_iteration_domains): Same.
891 (debug_iteration_domain): Same.
892 (debug_iteration_domains): Same.
893 (print_scattering_function): Same.
894 (print_scattering_functions): Same.
895 (debug_scattering_function): Same.
896 (debug_scattering_functions): Same.
897 * graphite-poly.h (debug_pdr): Update declaration.
899 (print_pbb_domain): Same.
901 (print_scop_context): Same.
904 (debug_pbb_domain): Same.
908 (debug_scop_context): Same.
911 (print_scop_params): Same.
912 (debug_scop_params): Same.
913 (print_iteration_domain): Same.
914 (print_iteration_domains): Same.
915 (debug_iteration_domain): Same.
916 (debug_iteration_domains): Same.
917 (print_scattering_function): Same.
918 (print_scattering_functions): Same.
919 (debug_scattering_function): Same.
920 (debug_scattering_functions): Same.
922 2010-03-23 Sebastian Pop <sebastian.pop@amd.com>
924 * graphite-poly.c (print_scattering_function_1): New.
925 (print_scattering_function): Call it.
926 (print_scop_params): Remove spaces at the end of lines.
929 * graphite-poly.h (print_cloog): Declared.
930 (debug_cloog): Declared.
932 2010-03-23 Sebastian Pop <sebastian.pop@amd.com>
934 * tree-ssa-copy.c: Revert this previous change:
935 (init_copy_prop): Loop closed phi nodes cancontain more than one
937 (execute_copy_prop): Revert the previous change: do not call
938 rewrite_into_loop_closed_ssa.
940 2010-03-21 Sebastian Pop <sebastian.pop@amd.com>
941 Richard Guenther <rguenther@suse.de>
944 * tree-ssa-copy.c (init_copy_prop): Loop closed phi nodes can
945 contain more than one argument.
946 (execute_copy_prop): Revert the previous change: do not call
947 rewrite_into_loop_closed_ssa.
949 * gcc.dg/graphite/id-pr43464.c: Remove compile warning.
950 * gcc.dg/graphite/id-pr43464-1.c: New.
952 2010-03-21 Sebastian Pop <sebastian.pop@amd.com>
955 * tree-ssa-copy.c (execute_copy_prop): Call rewrite_into_loop_closed_ssa
956 and verify_loop_closed_ssa when copy prop is executed in the LNO.
958 * gcc.dg/graphite/id-pr43464.c: New.
960 2010-03-16 Sebastian Pop <sebastian.pop@amd.com>
962 * graphite-sese-to-poly.c (graphite_loop_normal_form): Add the IV bump
964 * tree-flow.h (canonicalize_loop_ivs): Updated declaration.
965 * tree-parloops.c (gen_parallel_loop): Add the IV bump in loop->latch.
966 * tree-ssa-loop-manip.c (canonicalize_loop_ivs): Add a new parameter
967 to switch between adding the IV bump in loop->latch or in loop->header.
969 2010-03-16 Sebastian Pop <sebastian.pop@amd.com>
971 * passes.c (init_optimization_passes): Add pass_copy_prop
974 2010-03-16 Sebastian Pop <sebastian.pop@amd.com>
976 * graphite-poly.c (print_scattering_function): Pretty print following
979 (print_pbb_domain): Same.
980 (dump_gbb_cases): Same.
981 (dump_gbb_conditions): Same.
984 (print_scop_params): Same.
985 (print_scop_context): Same.
987 (print_pbb_body): New.
988 (lst_indent_to): New.
989 (print_lst): Start new lines with a #.
990 * graphite-poly.h (pbb_bb): New.
991 (pbb_index): Use pbb_bb.
992 * graphite-ppl.c (ppl_print_powerset_matrix): Print the number of
994 * tree-data-ref.c (dump_data_reference): Start new lines with a #.
996 2010-03-13 Sebastian Pop <sebastian.pop@amd.com>
999 * gcc.dg/graphite/id-pr43351.c
1001 2010-03-13 Sebastian Pop <sebastian.pop@amd.com>
1004 * graphite-sese-to-poly.c (rewrite_close_phi_out_of_ssa): Do not
1005 call insert_out_of_ssa_copy for default definitions.
1006 * gfortran.dg/graphite/id-pr43354.f: New.
1008 2010-03-13 Sebastian Pop <sebastian.pop@amd.com>
1011 * gfortran.dg/graphite/pr43349.f: New.
1013 2010-03-11 Sebastian Pop <sebastian.pop@amd.com>
1015 * graphite-clast-to-gimple.c (my_long_long): Defined.
1016 (gcc_type_for_cloog_iv): Use it instead of long_long_integer_type_node.
1017 * graphite-sese-to-poly.c (my_long_long): Defined.
1018 (scop_ivs_can_be_represented): Use it.
1020 2010-03-10 Sebastian Pop <sebastian.pop@amd.com>
1022 * doc/invoke.texi: Fix documentation of graphite-max-nb-scop-params,
1023 graphite-max-bbs-per-function, and loop-block-tile-size.
1024 * params.def (PARAM_GRAPHITE_MAX_NB_SCOP_PARAMS): Replace "maximal"
1026 (PARAM_GRAPHITE_MAX_BBS_PER_FUNCTION): Same.
1028 2010-03-10 Sebastian Pop <sebastian.pop@amd.com>
1030 * graphite-clast-to-gimple.c (gcc_type_for_iv_of_clast_loop): Remove
1031 forward declaration.
1032 * graphite-sese-to-poly.c (reduction_phi_p): Remove FIXME comment.
1033 (add_upper_bounds_from_estimated_nit): New.
1034 (build_loop_iteration_domains): Use it.
1036 2010-03-09 Sebastian Pop <sebastian.pop@amd.com>
1038 * doc/invoke.texi (PARAM_LOOP_BLOCK_TILE_SIZE): Document.
1040 2010-03-09 Sebastian Pop <sebastian.pop@amd.com>
1043 * tree-chrec.c (evolution_function_right_is_integer_cst): CHREC_RIGHT
1044 should be an INTEGER_CST. Also handle CASE_CONVERT.
1045 * gcc.dg/graphite/pr43306.c: New.
1047 2010-03-09 Sebastian Pop <sebastian.pop@amd.com>
1049 * graphite.c (graphite_initialize): To bound the number of bbs per
1050 function, use PARAM_GRAPHITE_MAX_BBS_PER_FUNCTION.
1051 * params.def (PARAM_GRAPHITE_MAX_BBS_PER_FUNCTION): Declared.
1052 * doc/invoke.texi: Document it.
1054 2010-03-09 Sebastian Pop <sebastian.pop@amd.com>
1056 * graphite-sese-to-poly.c (build_poly_scop): Do not return bool.
1057 * graphite-sese-to-poly.h (build_poly_scop): Same.
1059 2010-03-09 Sebastian Pop <sebastian.pop@amd.com>
1061 * graphite-sese-to-poly.c (build_poly_scop): Limit scops following
1062 the number of parameters in the scop. Use as an upper bound
1063 PARAM_GRAPHITE_MAX_NB_SCOP_PARAMS.
1064 * params.def (PARAM_GRAPHITE_MAX_NB_SCOP_PARAMS): Declared.
1065 * doc/invoke.texi: Document it.
1067 2010-03-05 Sebastian Pop <sebastian.pop@amd.com>
1069 * graphite-sese-to-poly.c (add_param_constraints): Use
1070 lower_bound_in_type and upper_bound_in_type.
1072 2010-03-05 Sebastian Pop <sebastian.pop@amd.com>
1074 * graphite-sese-to-poly.c (add_param_constraints): Use sizetype
1075 instead of unsigned_type_node.
1077 2010-03-05 Sebastian Pop <sebastian.pop@amd.com>
1078 Reza Yazdani <reza.yazdani@amd.com>
1081 * graphite-sese-to-poly.c (add_param_constraints): Insert bounds
1082 on pointer type parameters.
1084 * gcc.dg/graphite/run-id-4.c: New.
1086 2010-03-05 Sebastian Pop <sebastian.pop@amd.com>
1089 * gcc.dg/graphite/run-id-3.c: New.
1091 2010-03-05 Tobias Grosser <grosser@fim.uni-passau.de>
1092 Ramakrishna Upadrasta <Ramakrishna.Upadrasta@inria.fr>
1094 * graphite-clast-to-gimple.c (clast_to_gcc_expression): Also
1095 handle conversions from pointer to integers.
1096 (gcc_type_for_cloog_iv): Choose the smalles signed integer as an
1097 induction variable, to be able to work with code generated by CLooG.
1098 * graphite-sese-to-poly.c (scop_ivs_can_be_represented): New.
1099 (build_poly_scop): Bail out if we cannot codegen a loop.
1101 2010-03-04 Tobias Grosser <grosser@fim.uni-passau.de>
1103 * graphite-clast-to-gimple.c (translate_clast): Do not short-cut
1104 code generation with gloog_error.
1106 2010-03-04 Sebastian Pop <sebastian.pop@amd.com>
1108 * sese.c (expand_scalar_variables_ssa_name): Add new argument for type.
1109 Call fold_convert on all the returned values.
1110 (expand_scalar_variables_expr): Pass to expand_scalar_variables_ssa_name
1111 the type of the resulting expression.
1113 2010-03-04 Sebastian Pop <sebastian.pop@amd.com>
1115 * graphite-ppl.c (ppl_min_for_le_polyhedron): Renamed
1116 ppl_min_for_le_pointset. Use ppl_Pointset_Powerset_C_Polyhedron_minimize.
1117 * graphite-ppl.h (ppl_min_for_le_polyhedron): Update declaration.
1119 2010-03-04 Sebastian Pop <sebastian.pop@amd.com>
1121 * graphite-dependences.c (map_into_dep_poly): Removed.
1122 (dependence_polyhedron_1): Use combine_context_id_scat.
1124 2010-03-04 Sebastian Pop <sebastian.pop@amd.com>
1126 * graphite-poly.h (struct poly_scattering): Add layout documentation.
1127 (struct poly_bb): Same.
1128 (combine_context_id_scat): New.
1130 2010-03-02 Sebastian Pop <sebastian.pop@amd.com>
1133 * sese.c (name_defined_in_loop_p): Return false for default
1136 * gcc.dg/graphite/pr42326.c: New.
1138 2010-02-23 Sebastian Pop <sebastian.pop@amd.com>
1140 * graphite-clast-to-gimple.c (find_cloog_iv_in_expr): Simplify
1141 and clean up the logic.
1143 2010-02-23 Sebastian Pop <sebastian.pop@amd.com>
1145 * graphite-sese-to-poly.c (add_param_constraints): Enabled: remove
1148 2010-02-22 Sebastian Pop <sebastian.pop@amd.com>
1151 * graphite-scop-detection.c (create_single_exit_edge): Move
1152 the call to find_single_exit_edge to....
1153 (create_sese_edges): ...here. Don't handle multiple edges
1154 exiting the function.
1155 (build_graphite_scops): Don't handle multiple edges
1156 exiting the function.
1158 * gcc.dg/graphite/pr43083.c: New.
1160 2010-02-22 Sebastian Pop <sebastian.pop@amd.com>
1163 * sese.c (get_rename): Assert that old_name is an SSA_NAME.
1164 (rename_variables_in_stmt): Continue when the use is not an SSA_NAME.
1166 * gfortran.dg/graphite/pr43097.f: New.
1168 2010-02-22 Sebastian Pop <sebastian.pop@amd.com>
1169 Manuel López-Ibáñez <manu@gcc.gnu.org>
1172 * g++.dg/graphite/pr41305.C: Add -Wno-conversion-null.
1174 2010-02-22 Sebastian Pop <sebastian.pop@amd.com>
1177 * sese.c (expand_scalar_variables_expr): Handle COMPONENT_REF.
1179 * g++.dg/graphite/pr43026.C: New.
1181 2010-02-13 Tobias Grosser <grosser@fim.uni-passau.de>
1183 * Merge from mainline (154736:156693).
1185 2010-02-11 Sebastian Pop <sebastian.pop@amd.com>
1188 * gcc.dg/graphite/pr43012.c: New.
1190 2010-02-10 Sebastian Pop <sebastian.pop@amd.com>
1192 * graphite.c (graphite_transform_loops): Re-enable dbg_cnt.
1193 2010-02-10 Sebastian Pop <sebastian.pop@amd.com>
1195 * g++.dg/graphite/pr42930.C: New.
1197 2010-02-10 Sebastian Pop <sebastian.pop@amd.com>
1200 * graphite-scop-detection.c (graphite_can_represent_scev): Call
1201 graphite_can_represent_init for MULT_EXPR.
1203 2010-02-10 Sebastian Pop <sebastian.pop@amd.com>
1207 * graphite-sese-to-poly.c (remove_phi): New.
1208 (translate_scalar_reduction_to_array): Call remove_phi.
1210 * gcc.dg/graphite/pr42530.c: New.
1211 * gcc.dg/graphite/pr42914.c: New.
1213 2010-02-10 Sebastian Pop <sebastian.pop@amd.com>
1216 * graphite-clast-to-gimple.c (gloog): Call rename_sese_parameters.
1217 * graphite-clast-to-gimple.h (gloog): Update declaration.
1218 * graphite-poly.c (new_scop): Clear POLY_SCOP_P.
1219 * graphite-poly.h (struct poly_bb): Add missing comments.
1220 (struct scop): Add poly_scop_p field.
1222 * graphite-sese-to-poly.c (build_poly_scop): Set POLY_SCOP_P.
1223 * graphite.c (graphite_transform_loops): Build the polyhedral
1224 representation for each scop before code generation.
1225 * sese.c (rename_variables_in_operand): Removed.
1226 (rename_variables_in_expr): Return the renamed expression.
1227 (rename_sese_parameters): New.
1228 * sese.h (rename_sese_parameters): Declared.
1230 * gcc.dg/graphite/pr42771.c: New.
1232 2010-02-07 Sebastian Pop <sebastian.pop@amd.com>
1234 * gcc.dg/graphite/block-0.c: Call abort for runtime test. Always
1236 * gcc.dg/graphite/block-1.c: Same.
1237 * gcc.dg/graphite/block-3.c: Same.
1238 * gcc.dg/graphite/block-4.c: Same.
1239 * gcc.dg/graphite/block-5.c: Same.
1240 * gcc.dg/graphite/block-6.c: Same.
1241 * gcc.dg/graphite/block-7.c: Same.
1242 * gcc.dg/graphite/interchange-0.c: Same.
1243 * gcc.dg/graphite/interchange-1.c: Same.
1244 * gcc.dg/graphite/interchange-10.c: Same.
1245 * gcc.dg/graphite/interchange-11.c: Same.
1246 * gcc.dg/graphite/interchange-12.c: Same.
1247 * gcc.dg/graphite/interchange-2.c: Same.
1248 * gcc.dg/graphite/interchange-3.c: Same.
1249 * gcc.dg/graphite/interchange-4.c: Same.
1250 * gcc.dg/graphite/interchange-5.c: Same.
1251 * gcc.dg/graphite/interchange-6.c: Same.
1252 * gcc.dg/graphite/interchange-7.c: Same.
1253 * gcc.dg/graphite/interchange-8.c: Same.
1254 * gcc.dg/graphite/interchange-9.c: Same.
1255 * gcc.dg/graphite/interchange-mvt.c: Same.
1257 2010-02-07 Sebastian Pop <sebastian.pop@amd.com>
1259 * gfortran.dg/graphite/id-19.f: New.
1260 * gfortran.dg/graphite/pr14741.f90: New.
1261 * gfortran.dg/graphite/pr41924.f90: New.
1262 * gfortran.dg/graphite/run-id-2.f90: New.
1264 2010-02-07 Sebastian Pop <sebastian.pop@amd.com>
1267 * graphite-dependences.c (dependence_polyhedron): Set PDDR_KIND
1268 to unknown_dependence.
1269 (graphite_legal_transform_dr): Handle the unknown_dependence.
1270 (graphite_carried_dependence_level_k): Same.
1272 2010-02-07 Sebastian Pop <sebastian.pop@amd.com>
1274 * ChangeLog.graphite: Remove testsuite/ or gcc/testsuite/.
1276 2010-02-05 Sebastian Pop <sebastian.pop@amd.com>
1277 Konrad Trifunovic <konrad.trifunovic@inria.fr>
1280 * graphite-dependences.c (build_lexicographical_constraint): Return
1281 a union of dependence polyhedra.
1282 (dependence_polyhedron_1): Adapt for build_lexicographical_constraint.
1284 * gcc.dg/graphite/block-0.c: Enable runtime check. XFAILed.
1285 * gcc.dg/graphite/block-4.c: Same.
1286 * gcc.dg/graphite/block-7.c: Same.
1287 * gcc.dg/graphite/interchange-12.c: Same.
1288 * gcc.dg/graphite/interchange-mvt.c: Same.
1289 * gfortran.dg/graphite/interchange-1.f: XFAILed.
1290 * gfortran.dg/graphite/interchange-3.f90: XFAILed.
1291 * gfortran.dg/graphite/run-id-1.f: New testcase for PR42637.
1293 2010-02-03 Sebastian Pop <sebastian.pop@amd.com>
1295 * gcc.dg/graphite/interchange-12.c: Return 0 to avoid
1296 the execution check to FAIL. This testcase is miscompiled by Graphite
1297 and the check should be re-enabled.
1298 * gcc.dg/graphite/interchange-mvt.c: Same.
1299 * gcc.dg/graphite/block-0.c: Same.
1300 * gcc.dg/graphite/block-4.c: Same.
1301 * gcc.dg/graphite/block-7.c: Same.
1303 2010-02-03 Sebastian Pop <sebastian.pop@amd.com>
1305 * gcc.dg/graphite/interchange-mvt.c: Un-XFAILed.
1306 * gcc.dg/graphite/scop-0.c: Fix spaces.
1307 * gfortran.dg/graphite/block-1.f90: Rewrite expected output.
1308 * gfortran.dg/graphite/block-2.f: Same.
1309 * gfortran.dg/graphite/block-3.f90: Same.
1310 * gfortran.dg/graphite/block-4.f90: Same.
1311 * gfortran.dg/graphite/interchange-1.f: Un-XFAILed.
1312 * gfortran.dg/graphite/interchange-3.f90: Un-XFAILed.
1314 2010-02-03 Sebastian Pop <sebastian.pop@amd.com>
1316 * graphite-dependences.c (new_poly_ddr): Initialize PDDR_KIND and
1317 PDDR_ORIGINAL_SCATTERING_P.
1318 (pddr_is_empty): Rewritten.
1319 (print_dependence_polyhedron_layout): New.
1322 (build_alias_set_powerset): Moved up.
1323 (poly_drs_may_alias_p): Moved up.
1324 (lexicographically_gt_p): Removed.
1325 (build_lexicographically_gt_constraint): Renamed
1326 build_lexicographical_constraint, reimplemented.
1327 (dependence_polyhedron_1): Simplified parameters.
1328 (dependence_polyhedron): Same. Keep along empty PDDRs
1329 to make efficient use of the cache.
1330 (reduction_dr_p): Compute the PBBs don't pass them as parameters.
1331 (graphite_legal_transform_dr): Rewritten.
1332 (graphite_legal_transform_bb): Pass fewer arguments to
1333 graphite_legal_transform_dr.
1334 (graphite_carried_dependence_level_k): Simplified implementation.
1335 (dot_original_deps_stmt_1): Call dependence_polyhedron.
1336 (dot_transformed_deps_stmt_1): Same.
1337 (dot_original_deps): Same.
1338 (dot_transformed_deps): Same.
1339 * graphite-dependences.h (struct poly_ddr): Added a new field
1340 original_scattering_p.
1341 (PDDR_ORIGINAL_SCATTERING_P): New.
1342 (print_pddr): Declared.
1343 (debug_pddr): Declared.
1344 * graphite-ppl.c: Clarify comment.
1345 * sese.h (print_gimple_bb): Removed unused declaration.
1348 2010-02-03 Sebastian Pop <sebastian.pop@amd.com>
1350 * g++.dg/graphite/graphite.exp: Rewritten.
1351 * gcc.dg/graphite/graphite.exp: Rewritten.
1352 * gfortran.dg/graphite/graphite.exp: Rewritten.
1353 * gcc.dg/graphite/block-0.c: Added runtime test.
1354 * gcc.dg/graphite/block-1.c: Same.
1355 * gcc.dg/graphite/block-3.c: Same.
1356 * gcc.dg/graphite/block-4.c: Same.
1357 * gcc.dg/graphite/block-5.c: Same.
1358 * gcc.dg/graphite/block-6.c: Same.
1359 * gcc.dg/graphite/block-7.c: Same.
1360 * gcc.dg/graphite/interchange-0.c: Same.
1361 * gcc.dg/graphite/interchange-1.c: Same.
1362 * gcc.dg/graphite/interchange-10.c: Same.
1363 * gcc.dg/graphite/interchange-11.c: Same.
1364 * gcc.dg/graphite/interchange-12.c: Same.
1365 * gcc.dg/graphite/interchange-2.c: Same.
1366 * gcc.dg/graphite/interchange-3.c: Same.
1367 * gcc.dg/graphite/interchange-4.c: Same.
1368 * gcc.dg/graphite/interchange-5.c: Same.
1369 * gcc.dg/graphite/interchange-6.c: Same.
1370 * gcc.dg/graphite/interchange-7.c: Same.
1371 * gcc.dg/graphite/interchange-8.c: Same.
1372 * gcc.dg/graphite/interchange-9.c: Same.
1373 * gcc.dg/graphite/interchange-mvt.c: Same.
1374 * gcc.dg/graphite/run-id-2.c: Remove useless dg-do run.
1376 2010-01-22 Ramakrishna Upadrasta <Ramakrishna.Upadrasta@inria.fr>
1378 * graphite-scop-detection.c (dot_all_scops): Make calls to dot run in
1381 2010-01-22 Ramakrishna Upadrasta <Ramakrishna.Upadrasta@inria.fr>
1383 * common.opt: Add -fgraphite-cloog-opts.
1384 * graphite-clast-to-gimple.c (set_cloog_options): Same.
1385 * opts.c (decode_options): Same.
1387 2010-01-20 Sebastian Pop <sebastian.pop@amd.com>
1389 * gcc.dg/graphite/id-17.c: New.
1390 * gcc.dg/graphite/pr41888.c: New.
1391 * gcc.dg/graphite/scop-22.c: New.
1392 * gfortran.dg/graphite/pr40982.f90: New.
1394 2010-01-20 Sebastian Pop <sebastian.pop@amd.com>
1396 * graphite-dependences.c: Clarify comments.
1397 (build_pddr): Add an extra parameter direction.
1398 (graphite_legal_transform_dr): Use build_pddr.
1399 (dot_original_deps_stmt_1): Update use of build_pddr.
1400 (dot_transformed_deps_stmt_1): Same.
1401 (dot_original_deps): Same.
1402 (dot_transformed_deps): Same.
1404 * gcc.dg/graphite/interchange-12.c: New.
1405 * gcc.dg/graphite/block-7.c: New.
1407 2010-01-20 Sebastian Pop <sebastian.pop@amd.com>
1409 * graphite-dependences.c (pddr_original_scattering): Renamed build_pddr.
1410 (pddr_transformed_scattering): Removed.
1411 (graphite_legal_transform_dr): Use build_pddr.
1412 (dot_original_deps_stmt_1): Same.
1413 (dot_transformed_deps_stmt_1): Same.
1414 (dot_original_deps): Same.
1415 (dot_transformed_deps): Same.
1417 2010-01-20 Sebastian Pop <sebastian.pop@amd.com>
1419 * graphite-dependences.c (lexicographically_gt_p): Add comments.
1420 (build_lexicographically_gt_constraint): Same.
1421 (dependence_polyhedron_1): Same.
1422 (dependence_polyhedron): Same.
1424 2010-01-20 Sebastian Pop <sebastian.pop@amd.com>
1426 * graphite-dependences.c (build_pairwise_scheduling_equality): Removed.
1427 (build_pairwise_scheduling_inequality): Renamed build_pairwise_scheduling.
1428 (lexicographically_gt_p): Change type of direction to int.
1429 (build_lexicographically_gt_constraint): Same.
1430 (dependence_polyhedron_1): Same.
1431 (dependence_polyhedron): Same.
1432 (pddr_original_scattering): Use integers for direction.
1433 (pddr_transformed_scattering): Same.
1434 (graphite_legal_transform_dr): Same.
1435 (graphite_carried_dependence_level_k): Same.
1437 2010-01-20 Sebastian Pop <sebastian.pop@amd.com>
1439 * graphite-dependences.c (build_pairwise_constraint): Renamed
1440 ppl_build_relation. Moved...
1441 (dr_equality_constraints): Use ppl_build_relation.
1442 (build_pairwise_scheduling_equality): Same.
1443 (build_pairwise_scheduling_inequality): Same.
1444 * graphite-ppl.c (ppl_build_relation): ...here.
1445 * graphite-ppl.h (ppl_build_relation): Declared.
1447 2010-01-14 Sebastian Pop <sebastian.pop@amd.com>
1450 * graphite-clast-to-gimple.c (gloog_error): New static variable.
1451 (clast_to_gcc_expression): Do not build MULT_EXPR of POINTER_TYPE_P.
1452 Set gloog_error when such an expression failed to be built.
1453 (translate_clast): Early return when gloog_error is set.
1454 (gloog): Clear gloog_error. When gloog_error is set, call
1455 set_ifsese_condition to enable the original code. Return the status
1456 of the code generation based on gloog_error.
1457 * sese.c (set_ifsese_condition): New.
1458 * sese.h (set_ifsese_condition): Declared.
1460 * g++.dg/graphite/pr42681.C: New.
1462 2010-01-14 Sebastian Pop <sebastian.pop@amd.com>
1465 * graphite-clast-to-gimple.c (gloog): Call scev_reset_htab and
1466 rename_nb_iterations.
1467 * sese.c (rename_variables_in_operand): New.
1468 (rename_variables_in_expr): New.
1469 (rename_nb_iterations): New.
1470 (sese_adjust_liveout_phis): Update the rename_map.
1471 * sese.h (rename_nb_iterations): Declared.
1472 * tree-scalar-evolution.c (scev_reset_htab): New.
1473 (scev_reset): Call scev_reset_htab.
1474 * tree-scalar-evolution.h (scev_reset_htab): Declared.
1476 * gfortran.dg/graphite/pr42732.f: New.
1478 2010-01-08 Sebastian Pop <sebastian.pop@amd.com>
1481 * graphite-clast-to-gimple.c: Fix formatting.
1482 * sese.c (defined_in_loop_p): Renamed name_defined_in_loop_p.
1483 (expr_defined_in_loop_p): New.
1484 (add_loop_exit_phis): Also handle full expressions: remove from
1485 the rename_map the expressions defined in the loop that we're closing.
1487 * gfortran.dg/graphite/pr42393-1.f90: New.
1488 * gfortran.dg/graphite/pr42393.f90: Add new flags
1489 -fno-loop-block -fno-loop-interchange -fno-loop-strip-mine to also
1490 make this testcase useful in the Graphite branch.
1492 2010-01-08 Sebastian Pop <sebastian.pop@amd.com>
1494 * graphite-scop-detection.c (exclude_component_ref): Removed.
1495 (is_simple_operand): Removed.
1496 (stmt_simple_for_scop_p): Remove use of is_simple_operand.
1498 2010-01-07 Sebastian Pop <sebastian.pop@amd.com>
1501 * sese.c (expand_scalar_variables_expr): Follow the SSA links into
1502 the array indexing of ADDR_EXPRs.
1504 * gcc.dg/graphite/pr42221.c: New.
1506 2010-01-07 Sebastian Pop <sebastian.pop@amd.com>
1509 * graphite.c (graphite_finalize): Call scev_reset.
1510 (graphite_transform_loops): Do not call scev_reset between the code
1511 generation of scops.
1513 * gcc.dg/graphite/pr42521.c: New.
1515 2010-01-07 Sebastian Pop <sebastian.pop@amd.com>
1517 * graphite-interchange.c (memory_stride_in_loop): Renamed
1519 (memory_strides_in_loop): Renamed memory_strides_in_loop_1.
1520 (memory_strides_in_loop): Memoize the memory strides per loop.
1521 (lst_interchange_profitable_p): Do not initialize to zero the memory
1523 * graphite-poly.h (struct lst): Add a field memory_strides.
1524 (LST_LOOP_MEMORY_STRIDES): New.
1525 (new_lst_loop): Initialize LST_LOOP_MEMORY_STRIDES to -1.
1526 (free_lst): Clear LST_LOOP_MEMORY_STRIDES.
1528 2010-01-07 Sebastian Pop <sebastian.pop@amd.com>
1530 * graphite-interchange.c (memory_strides_in_loop_depth): Renamed
1531 memory_strides_in_loop. Gather memory strides on a whole loop.
1532 (pbb_interchange_profitable_p): Renamed lst_interchange_profitable_p.
1533 (lst_interchange_profitable_p): Removed.
1534 (lst_try_interchange_loops): Call lst_interchange_profitable_p.
1536 2010-01-07 Sebastian Pop <sebastian.pop@amd.com>
1538 Revert patch 2009-11-23 Tobias Grosser <grosser@fim.uni-passau.de>
1539 * graphite-clast-to-gimple.c (try_mark_loop_parallel): New.
1540 (translate_clast_for, translate_clast_guard, translate_clast, gloog):
1541 Remove context_loop and level.
1543 2010-01-07 Richard Guenther <rguenther@suse.de>
1545 PR tree-optimization/42641
1546 * sese.c (rename_map_elt_info): Use the SSA name version, do
1549 2010-01-06 Sebastian Pop <sebastian.pop@amd.com>
1551 * graphite-blocking.c (scop_do_block): Print "SCoP will be loop
1552 blocked" only when both the strip mine and the interchange have
1555 * gcc.dg/graphite/block-2.c: Removed.
1556 * gcc.dg/graphite/block-3.c: Add scan pattern.
1557 * gcc.dg/graphite/block-4.c: Same.
1558 * gcc.dg/graphite/block-5.c: Same.
1559 * gcc.dg/graphite/block-6.c: Same.
1561 2010-01-06 Sebastian Pop <sebastian.pop@amd.com>
1563 * graphite-clast-to-gimple.c (save_clast_name_index): Free slot
1564 before allocating a new one.
1565 (copy_renames): Check that slot is not NULL.
1566 (mark_bb_with_pbb): Same.
1567 (compute_cloog_iv_types_1): Same.
1568 * graphite-interchange.c (lst_perfect_nestify): Free the before,
1569 nest, and after LSTs.
1570 (lst_try_interchange_loops): Same.
1572 2010-01-05 Sebastian Pop <sebastian.pop@amd.com>
1575 * graphite-interchange.c (lst_try_interchange_loops): Do not return
1576 the before, nest, and after LSTs.
1577 (lst_try_interchange): Removed.
1578 (lst_interchange_select_inner): Do not iterate over the LSTs if they
1580 (lst_interchange_select_outer): Apply interchange on the outer loop
1581 until there are no more changes in the inner loops.
1583 2009-12-18 Sebastian Pop <sebastian.pop@amd.com>
1585 Revert patch fixing PR middle-end/42221.
1587 2009-12-18 Sebastian Pop <sebastian.pop@amd.com>
1590 * graphite-sese-to-poly.c (follow_ssa_with_commutative_ops): Handle
1593 * gfortran.dg/graphite/pr42180.f90: Add compile flags.
1595 2009-12-18 Sebastian Pop <sebastian.pop@amd.com>
1598 * graphite-sese-to-poly.c (split_reduction_stmt): Do not split blocks
1599 that contain only one statement.
1601 * gfortran.dg/graphite/pr42180.f90: New.
1603 2009-12-17 Sebastian Pop <sebastian.pop@amd.com>
1606 * gfortran.dg/graphite/pr42393.f90: New.
1608 2009-12-17 Sebastian Pop <sebastian.pop@amd.com>
1611 * gfortran.dg/graphite/pr42186.f90: New.
1613 2009-12-17 Sebastian Pop <sebastian.pop@amd.com>
1616 * graphite-sese-to-poly.c (translate_scalar_reduction_to_array_for_stmt):
1617 Insert the reduction copy in the same block as the phi node.
1618 (follow_ssa_with_commutative_ops): Handle GIMPLE_NOPs.
1620 * gcc.dg/graphite/pr42205-1.c: New.
1621 * gcc.dg/graphite/pr42205-2.c: New.
1623 2009-12-17 Sebastian Pop <sebastian.pop@amd.com>
1626 * sese.c (expand_scalar_variables_expr): Follow the SSA links into
1627 the array indexing of ADDR_EXPRs.
1629 * gcc.dg/graphite/pr42221.c: New.
1631 2009-12-17 Sebastian Pop <sebastian.pop@amd.com>
1635 * graphite-interchange.c (lst_try_interchange): Do not modify OUTER
1636 index. Call lst_interchange_select_inner only once.
1637 (lst_interchange_select_inner): Update use of lst_try_interchange.
1638 (lst_interchange_select_outer): Update.
1640 2009-12-15 Sebastian Pop <sebastian.pop@amd.com>
1644 * graphite-interchange.c (lst_try_interchange): Do not increment the
1645 the OUTER index when there is no AFTER kernel. Do not increment the
1646 OUTER index for after processing the AFTER kernel.
1647 (lst_interchange_select_inner): Call lst_try_interchange only on loops.
1648 (lst_interchange_select_outer): Do not pass in a pointer to the OUTER
1649 index. Do not pass to lst_interchange_select_inner the OUTER index.
1650 (scop_do_interchange): Update use of lst_interchange_select_outer.
1652 * gfortran.dg/graphite/graphite.exp
1653 (DEFAULT_FLAGS_GRAPHITE_IDENTITY): Remove -fdump-tree-graphite-all.
1654 * gfortran.dg/graphite/interchange-1.f: Add comment. Clean
1655 the graphite dump file.
1656 * gfortran.dg/graphite/interchange-2.f: Same.
1657 * gfortran.dg/graphite/pr42334-1.f: New.
1659 2009-12-15 Sebastian Pop <sebastian.pop@amd.com>
1663 * graphite-interchange.c (lst_perfect_nestify): Reset to NULL the LSTs
1665 (lst_do_interchange_1): Renamed lst_interchange_select_inner.
1666 (lst_try_interchange): Reimplemented.
1667 (lst_interchange_select_inner): Same.
1668 (lst_do_interchange): Renamed lst_interchange_select_outer.
1670 (scop_do_interchange): Update use of lst_interchange_select_outer.
1672 * g++.dg/graphite/pr42130.C: Add -fgraphite-identity.
1673 * gcc.dg/graphite/block-0.c: Un-XFAILed.
1674 * gcc.dg/graphite/pr42211.c: New.
1675 * gfortran.dg/graphite/pr42334.f90: New.
1677 2009-12-14 Sebastian Pop <sebastian.pop@amd.com>
1680 * graphite-scop-detection.c (graphite_can_represent_scev): Handle more
1681 carefully PLUS_EXPR, MINUS_EXPR, and MULT_EXPR.
1683 * gfortran.dg/graphite/pr42181.f90: New.
1685 2009-12-12 Sebastian Pop <sebpop@gmail.com>
1688 * graphite-sese-to-poly.c (rewrite_close_phi_out_of_ssa): Call
1689 insert_out_of_ssa_copy_on_edge for anything else than SSA_NAMEs.
1690 (detect_commutative_reduction_arg): Simplified.
1691 (detect_commutative_reduction): Early return when the argument of
1692 the close phi is not of an SSA_NAME.
1694 * gcc.dg/graphite/pr42284.c: New.
1696 2009-12-11 Alexander Monakov <amonakov@ispras.ru>
1698 * dbgcnt.def (graphite_scop): New counter.
1699 * graphite.c: Include dbgcnt.h
1700 (graphite_transform_loops): Use new counter to limit transformations.
1702 2009-12-08 Sebastian Pop <sebpop@gmail.com>
1705 * graphite-scop-detection.c (graphite_can_represent_init): Also
1706 handle more complex MULT_EXPRs containing parameters by recursion
1709 * gfortran.dg/graphite/pr42285.f90: New.
1711 2009-12-01 Tobias Grosser <grosser@fim.uni-passau.de>
1713 * g++.dg/graphite/pr42130.C: Fix type.
1715 2009-11-29 Alexander Monakov <amonakov@gcc.gnu.org>
1717 * g++.dg/graphite/pr42130.C: Correct testcase.
1719 2009-11-28 Tobias Grosser <grosser@fim.uni-passau.de>
1721 * Merge from mainline (154493:154734).
1723 2009-11-28 Tobias Grosser <grosser@fim.uni-passau.de>
1725 * Merge from mainline (151362:154491).
1727 2009-11-24 Tobias Grosser <grosser@fim.uni-passau.de>
1729 * graphite-clast-to-gimple.c (try_mark_loop_parallel,
1730 graphite_create_new_loop_guard, translate_clast_for): Fix comments.
1732 2009-11-23 Tobias Grosser <grosser@fim.uni-passau.de>
1735 * graphite-clast-to-gimple.c (graphite_create_new_loop_guard,
1736 translate_clast_for_loop): New.
1737 (translate_clast_for): Add a condition around the loop, to do not
1738 execute loops with zero iterations.
1739 * g++.dg/graphite/pr42130.C: New.
1740 * gcc.dg/graphite/pr35356-2.c: Adapt.
1742 2009-11-23 Tobias Grosser <grosser@fim.uni-passau.de>
1744 * graphite-clast-to-gimple.c (try_mark_loop_parallel): New.
1745 (translate_clast_for, translate_clast_guard, translate_clast, gloog):
1746 Remove context_loop and level.
1748 2009-11-23 Tobias Grosser <grosser@fim.uni-passau.de>
1750 * graphite-clast-to-gimple.c (translate_clast_user,
1751 translate_clast_for, translate_clast_guard): Simplify and move common
1752 elements to translate_clast().
1753 (translate_clast): Simplify and get common elements.
1755 2009-11-23 Tobias Grosser <grosser@fim.uni-passau.de>
1757 * graphite-clast-to-gimple.c (translate_clast_user,
1758 translate_clast_for, translate_clast_guard): Split out of
1761 2009-11-21 Tobias Grosser <grosser@fim.uni-passau.de>
1763 * graphite-clast-to-gimple.c (clast_name_index, new_clast_name_index,
1764 clast_name_to_index, save_clast_name_index, debug_clast_name_index,
1765 debug_clast_name_indexes_1, debug_clast_name_indexes,
1766 clast_name_index_elt_info, eq_clast_name_indexes): Moved from sese.h.
1767 (clast_name_to_gcc, clast_to_gcc_expression,
1768 clast_to_gcc_expression_red, gcc_type_for_clast_expr,
1769 gcc_type_for_clast_eq, graphite_translate_clast_equation,
1770 graphite_create_guard_cond_expr, graphite_create_new_loop,
1771 translate_clast): Add params_index.
1772 (initialize_cloog_names): Create parameter strings from scratch, do
1773 not reference other strings.
1774 (create_params_index): New.
1775 (gloog): Initialize params_index.
1776 * graphite-scop-detection (free_scops_1): Removed.
1777 (limit_scops): Use normal free_scops.
1778 * graphite-sese-to-poly.c (save_var_names): Removed.
1779 (parameter_index_in_region): Do not initialize SESE_PARAM_NAMES
1780 and SESE_PARAMS_INDEX.
1781 * sese.c (new_sese, free_sese): Dito.
1782 * sese.h (struct sese): Remove params_index, params_names.
1783 (SESE_PARAMS_INDEX, SESE_PARAMS_NAMES): Removed.
1785 2009-11-20 Sebastian Pop <sebastian.pop@amd.com>
1787 Revert the following patch from 2009-09-14:
1788 * graphite-blocking.c: Fix order of includes: tree-chrec.h, then
1789 tree-scalar-evolution.h, and then tree-data-ref.h.
1790 * graphite-clast-to-gimple.c: Same.
1791 * graphite-dependences.c: Same.
1792 * graphite-interchange.c: Same.
1793 * graphite-poly.c: Same.
1794 * graphite-scop-detection.c: Same.
1795 * graphite-sese-to-poly.c: Same.
1797 * lambda-code.c: Same.
1798 * matrix-reorg.c: Same.
1799 * tree-data-ref.c: Same.
1800 * tree-if-conv.c: Same.
1801 * tree-loop-distribu: Same.: Same.
1802 * tree-loop-linear.c: Same.
1803 * tree-parloops.c: Same.
1804 * tree-predcom.c: Same.
1805 * tree-vect-patterns.c: Same.
1807 2009-11-20 Sebastian Pop <sebastian.pop@amd.com>
1809 Revert patch from 2009-09-14.
1810 * tree-ssa-loop.c (gate_graphite_transforms): Re-enable Graphite
1811 passes at -O1 and below.
1813 2009-11-18 Sebastian Pop <sebastian.pop@amd.com>
1816 * gcc.dg/graphite/pr40281.c: New.
1818 * tree-scalar-evolution.c (instantiate_scev_poly): Base and stride
1819 evolutions should not variate in inner loops.
1821 2009-11-18 Sebastian Pop <sebastian.pop@amd.com>
1824 * gfortran.dg/graphite/pr42050.f90: New.
1826 2009-11-18 Sebastian Pop <sebastian.pop@amd.com>
1828 * graphite-interchange.c (memory_strides_in_loop_depth): New.
1829 (pbb_interchange_profitable_p): Call memory_strides_in_loop_depth.
1831 2009-11-18 Sebastian Pop <sebastian.pop@amd.com>
1833 * graphite-blocking.c (scop_do_block): New.
1834 * graphite-poly.c (apply_poly_transforms): Call scop_do_block.
1835 * graphite-poly.h (scop_do_block): Declared.
1837 2009-11-18 Sebastian Pop <sebastian.pop@amd.com>
1839 * graphite-blocking.c (pbb_strip_mine_profitable_p): The parameter
1840 depth is the loop nesting depth in the LST. Call psct_dynamic_dim
1841 to transform depth into the time_depth before calling
1842 pbb_number_of_iterations_at_time.
1843 (lst_do_strip_mine): Use a scalar variable instead of recomputing
1846 2009-11-18 Sebastian Pop <sebastian.pop@amd.com>
1848 Reverted the patch for "scattering permutations" from 2009-10-28.
1850 * graphite-poly.c (print_permutation): New.
1851 (debug_permutation): New.
1852 (new_poly_bb): Initialize PBB_PERMUTATION.
1853 (free_poly_bb): Free PBB_PERMUTATION.
1854 * graphite-poly.h (pbb_permutation_elt_p): Declared.
1855 (struct pbb_permutation_elt): New.
1856 (PBB_PERMUTATION_ELT_STRIDE): New.
1857 (PBB_PERMUTATION_ELT_STRIDED_P): New.
1858 (PBB_PERMUTATION_ELT_TIME_DIMENSION): New.
1859 (new_pbb_permutation_elt): New.
1860 (pbb_permutation_elt_free): New.
1861 (struct poly_bb): Add field permutation.
1862 (PBB_PERMUTATION): New.
1863 (print_permutation): Declared.
1864 (debug_permutation): Declared.
1866 2009-11-04 Konrad Trifunovic <konrad.trifunovic@inria.fr>
1868 * graphite-interchange.c (build_partial_difference): New.
1869 (memory_stride_in_loop): Refactored the computation of
1870 equality constraints into build_partial_difference function.
1871 Added support for debugging stride computations.
1873 2009-11-03 Sebastian Pop <sebastian.pop@amd.com>
1875 * graphite-clast-to-gimple.c (gloog): Free if_region,
1876 if_region->true_region, and if_region->region.
1877 * sese.c (if_region_set_false_region): Free if_region->false_region.
1878 (create_if_region_on_edge): Do not use GGC_NEW.
1879 (move_sese_in_condition): Remove useless initialization.
1881 2009-11-03 Sebastian Pop <sebastian.pop@amd.com>
1883 * graphite-interchange.c (lst_perfect_nestify): Pass 3 parameters
1884 for the loops created by the loop distribution. Do not modify the
1886 (lst_try_interchange_loops): Same. Use a temporary LST for the
1887 transformed schedule. Call lst_update_scattering before data
1888 dependence analysis.
1889 (lst_try_interchange): Pass an extra parameter INDEX.
1890 (lst_do_interchange_1): New.
1891 (lst_do_interchange): Call lst_do_interchange_1.
1892 (scop_do_interchange): Call lst_update_scattering.
1893 * graphite-poly.c (apply_poly_transforms): Do not call
1894 lst_update_scattering.
1895 * graphite-poly.h (lst_pred): New.
1897 (lst_find_first_pbb): Return NULL when not found.
1899 (lst_insert_in_sequence): Allow LST1 to be NULL.
1901 (lst_substitute_3): New.
1902 * gcc.dg/graphite/interchange-1.c: XFail.
1903 * gcc.dg/graphite/interchange-8.c: XFail.
1904 * gcc.dg/graphite/interchange-11.c: XFail.
1906 2009-10-30 Sebastian Pop <sebastian.pop@amd.com>
1908 * graphite-interchange.c (lst_perfectly_nested_p): New.
1909 (lst_perfect_nestify): New.
1910 (lst_try_interchange_loops): Call store_lst_schedule,
1911 lst_perfectly_nested_p, lst_perfect_nestify and restore_lst_schedule.
1912 (scop_do_interchange): Avoid redundant legality test.
1913 Call lst_do_interchange on a copy of SCOP_TRANSFORMED_SCHEDULE.
1914 * graphite-poly.c (apply_poly_transforms): Call lst_update_scattering.
1915 * graphite-poly.h (psct_static_dim): New.
1916 (lst_dewey_number_at_depth): New.
1917 (lst_find_pbb): Restructured.
1918 (lst_find_first_pbb): Restructured.
1919 (lst_find_last_pbb): New.
1920 (lst_contains_p): New.
1921 (lst_contains_pbb): New.
1922 (lst_create_nest): New.
1923 (lst_remove_from_sequence): New.
1924 (pbb_update_scattering): New.
1925 (lst_update_scattering_under): New.
1926 (lst_update_scattering_seq): New.
1927 (lst_update_scattering): New.
1928 (lst_insert_in_sequence): New.
1929 (lst_distribute_lst): New.
1930 (lst_remove_all_before_including_pbb): New.
1931 (lst_remove_all_before_excluding_pbb): New.
1933 2009-10-30 Sebastian Pop <sebastian.pop@amd.com>
1935 * tree-ssa-loop-niter.c (finite_loop_p): Do not call twice
1936 get_loop_exit_edges.
1938 2009-10-30 Sebastian Pop <sebastian.pop@amd.com>
1940 * graphite-poly.c (pbb_remove_duplicate_pdrs): Free collapsed.
1942 2009-10-28 Konrad Trifunovic <konrad.trifunovic@gmail.com>
1944 * graphite-poly.c (print_permutation): New.
1945 (debug_permutation): New.
1946 (new_poly_bb): Initialize PBB_PERMUTATION.
1947 (free_poly_bb): Free PBB_PERMUTATION.
1948 * graphite-poly.h (pbb_permutation_elt_p): Declared.
1949 (struct pbb_permutation_elt): New.
1950 (PBB_PERMUTATION_ELT_STRIDE): New.
1951 (PBB_PERMUTATION_ELT_STRIDED_P): New.
1952 (PBB_PERMUTATION_ELT_TIME_DIMENSION): New.
1953 (new_pbb_permutation_elt): New.
1954 (pbb_permutation_elt_free): New.
1955 (struct poly_bb): Add field permutation.
1956 (PBB_PERMUTATION): New.
1957 (print_permutation): Declared.
1958 (debug_permutation): Declared.
1960 2009-10-26 Sebastian Pop <sebastian.pop@amd.com>
1962 * graphite-clast-to-gimple.c (gloog): Do not call
1963 sese_reset_aux_in_loops.
1964 * graphite-sese-to-poly.c (build_loop_iteration_domains): Pass an
1965 extra argument for domains. Do not use loop->aux.
1966 (build_scop_iteration_domain): Initialize and free domains, pass it
1967 to build_loop_iteration_domains and extract the information from
1968 domains. Do not use loop->aux.
1969 * sese.c (sese_reset_aux_in_loops): Removed.
1970 * sese.h (sese_reset_aux_in_loops): Removed.
1972 2009-10-26 Sebastian Pop <sebastian.pop@amd.com>
1974 * graphite-clast-to-gimple.c (find_pbb_via_hash): Moved up.
1975 (dependency_in_loop_p): Same.
1976 (translate_clast): Do not use loop->aux. Initialize
1977 loop->can_be_parallel.
1978 (mark_loops_parallel): Removed.
1979 * graphite-clast-to-gimple.h (mark_loops_parallel): Removed.
1980 * graphite.c (free_aux_in_new_loops): Removed.
1981 (graphite_finalize): Do not call free_aux_in_new_loops.
1982 (graphite_transform_loops): Do not call mark_loops_parallel.
1984 2009-10-26 Li Feng <nemokingdom@gmail.com>
1986 * graphite-clast-to-gimple.c (get_stmtfor_depth): Removed.
1987 (translate_clast): Pass an extra parameter LEVEL.
1988 Call get_scattering_level.
1989 * graphite-clast-to-gimple.h (get_scattering_level): New.
1991 2009-10-22 Sebastian Pop <sebastian.pop@amd.com>
1993 * cfgloop.c (alloc_loop): Initialize loop->single_iv.
1994 * cfgloop.h (struct loop): New field single_iv.
1996 * graphite-clast-to-gimple.c (pbb_to_depth_to_oldiv): Do not use
1997 loop->aux anymore: use loop->single_iv.
1998 (graphite_loop_normal_form): Moved...
1999 (build_graphite_loop_normal_form): Removed.
2000 (gloog): Do not call build_graphite_loop_normal_form.
2001 (free_aux_in_new_loops): Moved...
2002 (mark_loops_parallel): Restructure.
2003 * graphite-clast-to-gimple.h (free_aux_in_new_loops): Do not declare.
2004 * graphite-sese-to-poly.c (graphite_loop_normal_form): ...here.
2005 (scop_canonicalize_loops): New.
2006 (build_poly_scop): Call scop_canonicalize_loops.
2007 * graphite.c (free_aux_in_new_loops): ...here.
2009 2009-10-22 Sebastian Pop <sebastian.pop@amd.com>
2011 * g++.dg/graphite/graphite.exp: Add the same rules as in
2012 gcc.dg/graphite/graphite.exp.
2014 2009-10-22 Sebastian Pop <sebastian.pop@amd.com>
2016 * g++.dg/graphite/id-1.C: New.
2018 2009-10-22 Sebastian Pop <sebastian.pop@amd.com>
2020 * graphite-sese-to-poly.c (create_zero_dim_array): Pass an extra
2022 (rewrite_close_phi_out_of_ssa): Update use of create_zero_dim_array.
2023 (rewrite_phi_out_of_ssa): Same.
2024 (rewrite_cross_bb_scalar_deps): Same.
2025 (translate_scalar_reduction_to_array): Same.
2027 2009-10-22 Sebastian Pop <sebastian.pop@amd.com>
2029 * graphite-sese-to-poly.c (build_scop_drs): Disable call to
2032 2009-10-22 Sebastian Pop <sebastian.pop@amd.com>
2034 * graphite-sese-to-poly.c (dump_alias_graphs): New.
2035 (build_scop_drs): Call dump_alias_graphs.
2037 2009-10-22 Sebastian Pop <sebastian.pop@amd.com>
2039 * graphite-poly.c (new_scop): Initialize SCOP_ORIGINAL_SCHEDULE,
2040 SCOP_TRANSFORMED_SCHEDULE, and SCOP_SAVED_SCHEDULE.
2041 (free_scop): Call free_lst on SCOP_ORIGINAL_SCHEDULE,
2042 SCOP_TRANSFORMED_SCHEDULE, and SCOP_SAVED_SCHEDULE.
2043 * graphite-poly.h (free_lst): New.
2044 (store_lst_schedule): Free SCOP_SAVED_SCHEDULE.
2045 (restore_lst_schedule): Free SCOP_TRANSFORMED_SCHEDULE.
2047 2009-10-22 Sebastian Pop <sebastian.pop@amd.com>
2049 * graphite-poly.h (struct scop): Add a field saved_schedule.
2050 (SCOP_SAVED_SCHEDULE): New.
2051 (store_lst_schedule): New.
2052 (restore_lst_schedule): New.
2053 (store_scattering): Call store_lst_schedule.
2054 (restore_scattering): Call restore_lst_schedule.
2056 2009-10-20 Sebastian Pop <sebastian.pop@amd.com>
2058 * graphite-sese-to-poly.c (free_data_refs_aux): Fix formatting.
2059 (pdr_add_alias_set): Same.
2060 (build_poly_dr): Same.
2061 (build_alias_set_optimal_p): Same.
2062 (build_base_obj_set_for_drs): Same. Do not store the result of
2065 2009-10-20 Sebastian Pop <sebastian.pop@amd.com>
2067 * graphite-sese-to-poly.c (build_alias_set_optimal_p): Initialize
2068 all_components_are_cliques to 1.
2070 2009-10-20 Li Feng <nemokingdom@gmail.com>
2072 * graphite-sese-to-poly.c (free_data_refs_aux): Update to free
2074 (pdr_add_alias_set): Update retrieving alias_set_num.
2075 (build_poly_dr): Update retrieving dr_base_object_set.
2076 (partition_drs_to_sets): Remove.
2077 (build_alias_set_optimal_p): New.
2078 (build_alias_set_for_drs): Rename.
2079 (build_scop_drs): Update.
2080 * graphite-sese-to-poly.h (struct base_alias_pair): New.
2081 (ALIAS_SET_INDEX): Remove.
2082 (BASE_OBJECT_SET_INDEX): Remove.
2084 2009-10-20 Sebastian Pop <sebastian.pop@amd.com>
2086 * sese.c (get_vdef_before_sese): Handle GIMPLE_ASSIGN and GIMPLE_CALL.
2088 2009-10-20 Sebastian Pop <sebastian.pop@amd.com>
2090 * graphite-sese-to-poly.c (pdr_add_data_dimensions): Do not infer
2091 loop upper bounds for 1-element arrays at end of structures.
2092 * tree-flow.h (array_at_struct_end_p): Declared.
2093 * tree-ssa-loop-niter.c (array_at_struct_end_p): Not static anymore.
2095 2009-10-20 Sebastian Pop <sebastian.pop@amd.com>
2097 * g++.dg/graphite/pr41305.C: New.
2099 2009-10-20 Alexander Monakov <amonakov@ispras.ru>
2101 * graphite-sese-to-poly.c (build_loop_iteration_domains): Generalize
2102 construction of parameter constraints from loop iteration analysis.
2103 * gcc.dg/graphite/run-id-2.c: New test.
2105 2009-10-17 Sebastian Pop <sebastian.pop@amd.com>
2107 * graphite-interchange.c (memory_stride_in_loop): Delete p1, lma
2110 2009-10-17 Sebastian Pop <sebastian.pop@amd.com>
2112 * graphite-dependences.c (dependence_polyhedron_1): Remove
2113 unused gdim dimensions from the DDR polyhedron.
2115 2009-10-17 Sebastian Pop <sebastian.pop@amd.com>
2117 * graphite-dependences.c (pddr_transformed_scattering): New.
2118 (dot_original_deps_stmt_1): New.
2119 (dot_transformed_deps_stmt_1): New.
2120 (dot_deps_stmt_1): Call dot_original_deps_stmt_1 and
2121 dot_transformed_deps_stmt_1.
2122 (dot_original_deps): New.
2123 (dot_transformed_deps): New.
2124 (dot_deps_1): Call dot_original_deps and dot_transformed_deps.
2126 2009-10-17 Sebastian Pop <sebastian.pop@amd.com>
2128 * graphite-dependences.c (reduction_dr_1): Remove wrong
2129 assert: reduction BBs can have multiple reduction writes
2130 to memory. interchange-3.f90 is an example.
2132 2009-10-17 Sebastian Pop <sebastian.pop@amd.com>
2134 * gfortran.dg/graphite/interchange-3.f90: New.
2136 2009-10-17 Sebastian Pop <sebastian.pop@amd.com>
2138 * gcc.dg/graphite/interchange-1.c: Un-XFAILed.
2140 2009-10-17 Sebastian Pop <sebastian.pop@amd.com>
2142 * graphite-dependences.c (dependence_polyhedron_1): Add the
2143 context to the dependence polyhedron.
2145 2009-10-17 Sebastian Pop <sebastian.pop@amd.com>
2147 * graphite-poly.c (pbb_remove_duplicate_pdrs): Initialize
2148 PBB_PDR_DUPLICATES_REMOVED.
2149 (new_poly_bb): Same.
2151 2009-10-17 Sebastian Pop <sebastian.pop@amd.com>
2153 * graphite-sese-to-poly.c (find_scop_parameters): Initialize
2155 (build_loop_iteration_domains): Extract bounds on parameters
2156 based on the data size.
2157 (build_scop_context): Do not initialize SCOP_CONTEXT;
2158 add new constraints.
2160 2009-10-17 Sebastian Pop <sebastian.pop@amd.com>
2162 * graphite-ppl.c (ppl_min_for_le_polyhedron): New.
2163 * graphite-ppl.h (graphite-ppl.h): Declared.
2165 2009-10-17 Sebastian Pop <sebastian.pop@amd.com>
2167 * graphite-ppl.c (ppl_print_linear_expr): New.
2168 (debug_ppl_linear_expr): New.
2169 * graphite-ppl.h (ppl_print_linear_expr): Declared.
2170 (debug_ppl_linear_expr): Declared.
2172 2009-10-16 Sebastian Pop <sebastian.pop@amd.com>
2174 * graphite-interchange.c: Fix comments.
2175 * gcc.dg/graphite/block-1.c: Fix comments.
2177 2009-10-16 Sebastian Pop <sebastian.pop@amd.com>
2179 * gcc.dg/graphite/interchange-7.c: Un-XFAILed.
2180 * gcc.dg/graphite/interchange-9.c: Un-XFAILed.
2182 2009-10-16 Sebastian Pop <sebastian.pop@amd.com>
2184 Reapply the patch from Alexander Monakov that disappeared during
2185 the last merges from trunk.
2187 2009-09-16 Alexander Monakov <amonakov@ispras.ru>
2189 * graphite-sese-to-poly.c (pdr_add_data_dimensions): Add bounds only
2190 for ARRAY_REFs. Use array_ref_{low,up}_bound to determine bounds.
2192 2009-10-15 Sebastian Pop <sebastian.pop@amd.com>
2194 * graphite-interchange.c (memory_stride_in_loop): The depth
2195 argument corresponds to a dynamic time dimension, so use
2196 psct_dynamic_dim to refer to the transformed scattering dimension.
2198 2009-10-15 Sebastian Pop <sebastian.pop@amd.com>
2200 * graphite-interchange.c (memory_stride_in_loop): Fix comments.
2202 2009-10-15 Sebastian Pop <sebastian.pop@amd.com>
2204 * graphite-blocking.c (lst_do_strip_mine): Avoid strip mining the
2206 * graphite-interchange.c (lst_do_interchange): Avoid interchanging
2207 the root of the LST.
2208 * graphite-poly.c (scop_to_lst): Fix LST sequence in an outermost
2210 (print_lst): Print the root of LST in a different format.
2211 * graphite-poly.h (lst_depth): Adjust to include the root of the LST.
2213 2009-10-15 Sebastian Pop <sebastian.pop@amd.com>
2215 * graphite-poly.c (print_scop): Fix pretty printing of a SCoP.
2217 2009-10-15 Sebastian Pop <sebastian.pop@amd.com>
2219 * doc/passes.texi: Document the Graphite infrastructure.
2221 2009-10-15 Sebastian Pop <sebastian.pop@amd.com>
2223 * graphite-sese-to-poly.c (insert_copyin): Use gsi_insert_seq_on_edge.
2224 (rewrite_commutative_reductions_out_of_ssa): Call gsi_commit_edge_inserts,
2225 and check the SSA representation.
2227 * gfortran.dg/graphite/id-18.f90: New, reduced from PR41193.
2229 2009-10-15 Sebastian Pop <sebastian.pop@amd.com>
2231 * gcc.dg/graphite/pr40157.c: Use -floop-block as reported in the PR.
2233 2009-10-14 Sebastian Pop <sebastian.pop@amd.com>
2235 * gcc.dg/graphite/interchange-11.c: New.
2237 2009-10-14 Sebastian Pop <sebastian.pop@amd.com>
2239 * gcc.dg/graphite/interchange-8.c: Enable loop interchange.
2241 2009-10-14 Sebastian Pop <sebastian.pop@amd.com>
2243 * gcc.dg/graphite/graphite.exp (DEFAULT_CFLAGS_GRAPHITE_BLOCK):
2244 Add -fno-loop-strip-mine and -fno-loop-interchange.
2245 (DEFAULT_FLAGS_GRAPHITE_INTERCHANGE): Add -fno-loop-block and
2246 -fno-loop-strip-mine.
2247 * gfortran.dg/graphite/graphite.exp: Same.
2249 2009-10-14 Sebastian Pop <sebastian.pop@amd.com>
2251 * gcc.dg/graphite/graphite.exp (DEFAULT_CFLAGS_GRAPHITE_BLOCK):
2252 Renamed DEFAULT_FLAGS_GRAPHITE_BLOCK.
2253 (DEFAULT_CFLAGS_GRAPHITE_IDENTITY): Renamed
2254 DEFAULT_FLAGS_GRAPHITE_IDENTITY.
2255 (DEFAULT_CFLAGS_GRAPHITE_INTERCHANGE): Renamed
2256 DEFAULT_FLAGS_GRAPHITE_INTERCHANGE.
2257 (DEFAULT_CFLAGS_GRAPHITE_SCOP): Renamed
2258 DEFAULT_FLAGS_GRAPHITE_SCOP.
2259 (DEFAULT_CFLAGS_RUN_ID): Renamed DEFAULT_FLAGS_RUN_ID.
2260 (DEFAULT_CFLAGS_GRAPHITE): Renamed DEFAULT_FLAGS_GRAPHITE.
2262 2009-10-14 Sebastian Pop <sebastian.pop@amd.com>
2264 * graphite-poly.c (pbb_number_of_iterations_at_time): Cleanup comments.
2266 2009-10-14 Konrad Trifunovic <konrad.trifunovic@gmail.com>
2267 Sebastian Pop <sebastian.pop@amd.com>
2269 * graphite-interchange.c (build_linearized_memory_access): Pass an
2270 offset as parameter.
2271 (memory_stride_in_loop): Include transform scattering in the
2272 access functions to be able to querry the strides in the
2274 (pbb_interchange_loop_depths): Interchange the psct_dynamic_dim,
2275 not the psct_iterator_dim.
2277 2009-10-14 Sebastian Pop <sebastian.pop@amd.com>
2279 * graphite-blocking.c (pbb_do_strip_mine): Removed.
2280 (lst_do_strip_mine_loop): New.
2281 (lst_do_strip_mine): New.
2282 (scop_do_strip_mine): Call lst_do_strip_mine.
2283 * graphite-poly.h (lst_add_loop_under_loop): New.
2284 (lst_find_first_pbb): New.
2286 2009-10-14 Sebastian Pop <sebastian.pop@amd.com>
2288 * graphite-poly.c (loop_to_lst): Fix LST creation.
2290 2009-10-14 Tobias Grosser <grosser@fim.uni-passau.de>
2292 * gcc.dg/graphite/id-15.c: (8 * 8) replaced with
2293 sizeof(unsigned long) to make it run on 32bit systems.
2295 2009-10-14 Tobias Grosser <grosser@fim.uni-passau.de>
2297 * gcc.dg/graphite/run-id-1.c: Use smaller matrix to not
2300 2009-10-14 Ramakrishna Upadrasta <Ramakrishna.Upadrasta@inria.fr>
2302 * graphite-sese-to-poly.c (write_alias_graph_to_ascii_dimacs): Fix
2304 (write_alias_graph_to_ascii_dot): New.
2305 (write_alias_graph_to_ascii_ecc): Ditto.
2306 (partition_drs_to_sets): Add testing of optimality of current method
2307 which assigns alias numbers according to DFS Comopnent number. used
2308 as heuristic for the upcoming ECC algorithm.
2309 (build_scop_drs): Write to file also with the ecc and dot format.
2311 2009-10-13 Sebastian Pop <sebastian.pop@amd.com>
2313 * gfortran.dg/graphite/interchange-1.f: XFail.
2315 2009-10-13 Sebastian Pop <sebastian.pop@amd.com>
2317 * graphite.c (graphite_initialize): Do not handle functions with
2318 more than 100 basic blocks.
2320 2009-10-13 Sebastian Pop <sebastian.pop@amd.com>
2322 * graphite-blocking.c (pbb_do_strip_mine): Use
2323 PARAM_LOOP_BLOCK_TILE_SIZE.
2325 2009-10-13 Sebastian Pop <sebastian.pop@amd.com>
2327 * graphite-poly.c (dot_lst_1): New.
2329 * graphite-poly.h (dot_lst): Declared.
2331 2009-10-13 Sebastian Pop <sebastian.pop@amd.com>
2333 * graphite-dependences.c (dot_deps_stmt_1): New.
2334 (dot_deps_stmt): New.
2335 * graphite-dependences.h (dot_deps_stmt): Declared.
2337 2009-10-09 Sebastian Pop <sebastian.pop@amd.com>
2339 * graphite-sese-to-poly.c (rewrite_cross_bb_scalar_dependence): Do
2340 not replace cross BB scalar dependences ending on PHI nodes.
2341 (rewrite_cross_bb_scalar_deps): Filter out GIMPLE_PHI nodes.
2343 2009-10-09 Sebastian Pop <sebastian.pop@amd.com>
2345 * graphite-poly.c (apply_poly_transforms): Implement the high
2346 level driver for flag_loop_block.
2347 * opts.c (decode_options): Enable flag_loop_block at -O2.
2348 * tree-ssa-loop.c (gate_graphite_transforms): Remove call to sorry for
2351 * gcc.dg/graphite/graphite.exp (DEFAULT_CFLAGS_GRAPHITE_BLOCK): Add
2353 * gfortran.dg/graphite/graphite.exp (DEFAULT_CFLAGS_GRAPHITE_BLOCK):
2356 2009-10-09 Sebastian Pop <sebastian.pop@amd.com>
2358 * graphite-poly.h (lst_find_pbb): New.
2359 (find_lst_loop): New.
2361 2009-10-09 Sebastian Pop <sebastian.pop@amd.com>
2363 * graphite-poly.c (new_scop): Remove init of SCOP_DEP_GRAPH.
2364 * graphite-poly.h (struct scop): Remove dep_graph field.
2365 (SCOP_DEP_GRAPH): Removed.
2367 2009-10-09 Sebastian Pop <sebastian.pop@amd.com>
2369 * graphite-poly.h (copy_lst): Do full copy of LST.
2371 2009-10-07 Sebastian Pop <sebastian.pop@amd.com>
2373 * graphite-sese-to-poly.c (reduction_phi_p): Call remove_invariant_phi
2374 when the loop stride is zero.
2376 * gcc.dg/graphite/id-16.c: New.
2378 2009-10-06 Sebastian Pop <sebastian.pop@amd.com>
2380 * graphite-dependences.c (reduction_dr_1): New.
2381 (reduction_dr_p): New.
2382 (graphite_legal_transform_dr): Call reduction_dr_p.
2383 (reduction_ddr): Renamed reduction_ddr_p.
2384 * graphite-poly.h (same_pdr_p): New.
2385 (number_of_write_pdrs): New.
2386 * graphite-sese-to-poly.c (nb_data_writes_in_bb): New.
2387 (split_reduction_stmt): Do not split reduction statements
2388 when there are no writes to memory.
2389 (translate_scalar_reduction_to_array_for_stmt): Insert the
2390 memory reduction statement just after the scalar reduction statement.
2392 * gcc.dg/graphite/interchange-10.c: Updated to differ from interchange-4.c.
2394 * gcc.dg/graphite/interchange-3.c: Un-XFAIL-ed.
2395 * gcc.dg/graphite/interchange-4.c: Un-XFAIL-ed.
2397 2009-10-06 Sebastian Pop <sebastian.pop@amd.com>
2399 * graphite-interchange.c (lst_apply_interchange): New.
2400 (lst_interchange_profitable_p): New.
2401 (lst_try_interchange_loops): New.
2402 (lst_try_interchange): New.
2403 (lst_do_interchange): New.
2404 (pbb_do_interchange): Removed.
2405 (scop_do_interchange): Call lst_do_interchange.
2407 2009-10-06 Sebastian Pop <sebastian.pop@amd.com>
2409 * graphite-poly.c (print_scop): Print SCOP_ORIGINAL_SCHEDULE and
2410 SCOP_TRANSFORMED_SCHEDULE.
2415 * graphite-poly.h (lst_p): New.
2418 (LST_LOOP_FATHER): New.
2421 (scop_to_lst): Declared.
2422 (print_lst): Declared.
2423 (debug_lst): Declared.
2424 (new_lst_loop): New.
2425 (new_lst_stmt): New.
2428 (lst_dewey_number): New.
2429 (struct scop): Add original_schedule and transformed_schedule fields.
2430 (SCOP_ORIGINAL_SCHEDULE): New.
2431 (SCOP_TRANSFORMED_SCHEDULE): New.
2432 * graphite-sese-to-poly.c (build_poly_scop): Call scop_to_lst.
2434 2009-10-05 Sebastian Pop <sebastian.pop@amd.com>
2436 * graphite-dependences.c (reduction_ddr): New.
2437 (graphite_legal_transform_bb): Call reduction_ddr.
2438 * graphite-poly.c (new_poly_bb): Pass a new bool parameter.
2439 Initialize PBB_IS_REDUCTION.
2440 * graphite-poly.h (struct poly_bb): New bool field is_reduction.
2441 (PBB_IS_REDUCTION): New.
2442 (new_poly_bb): Update declaration.
2443 * graphite-scop-detection.h (build_scop_bbs): Removed.
2444 (nb_reductions_in_loop): Removed.
2445 * graphite-sese-to-poly.c (try_generate_gimple_bb): Pass a sbitmap
2446 parameter for reductions.
2447 (try_generate_gimple_bb): Update call to new_poly_bb.
2448 (build_scop_bbs_1): Same.
2449 (build_scop_bbs): Same.
2450 (gsi_for_phi_node): New.
2451 (scalar_close_phi_node_p): Remove gcc_assert.
2452 (split_reduction_stmt): New.
2453 (is_reduction_operation_p): New.
2454 (phi_contains_arg): New.
2455 (follow_ssa_with_commutative_ops): New.
2456 (detect_commutative_reduction_arg): New.
2457 (detect_commutative_reduction_assign): New.
2458 (follow_inital_value_to_phi): New.
2459 (edge_initial_value_for_loop_phi): New.
2460 (initial_value_for_loop_phi): New.
2461 (detect_commutative_reduction): New.
2462 (translate_scalar_reduction_to_array_for_stmt): New.
2463 (insert_copyout): New.
2464 (insert_copyin): New.
2465 (translate_scalar_reduction_to_array): New.
2466 (rewrite_commutative_reductions_out_of_ssa_close_phi): New.
2467 (rewrite_commutative_reductions_out_of_ssa_loop): New.
2468 (rewrite_commutative_reductions_out_of_ssa): New.
2469 (build_poly_scop): Call rewrite_commutative_reductions_out_of_ssa.
2470 * sese.h (split_region_for_bb): New.
2472 * gcc.dg/graphite/graphite.exp (DEFAULT_CFLAGS_GRAPHITE_BLOCK): Add -ffast-math.
2473 * gcc.dg/graphite/interchange-1.c: Fix format.
2474 * gcc.dg/graphite/interchange-10.c: New.
2476 2009-10-05 Sebastian Pop <sebastian.pop@amd.com>
2478 * graphite-sese-to-poly.c (insert_out_of_ssa_copy): Remove
2481 2009-10-05 Sebastian Pop <sebastian.pop@amd.com>
2483 * graphite-sese-to-poly.c (scev_analyzable_p): New.
2484 (rewrite_cross_bb_scalar_dependence): New.
2485 (rewrite_cross_bb_scalar_deps): New.
2486 (rewrite_reductions_out_of_ssa): Use bb_in_sese_p.
2487 Call rewrite_cross_bb_scalar_deps.
2489 2009-10-05 Sebastian Pop <sebastian.pop@amd.com>
2491 * graphite-sese-to-poly.c (gsi_for_ssa_name_def): Removed.
2492 (insert_out_of_ssa_copy): Directly use gsi_after_labels and
2495 2009-10-05 Sebastian Pop <sebastian.pop@amd.com>
2497 * graphite-clast-to-gimple.c (build_cloog_prog): Use pbb_index.
2498 * graphite-interchange.c (pbb_do_interchange): Same.
2499 * graphite-poly.c (print_scattering_function): Same.
2501 * graphite-poly.h (pbb_loop): New.
2502 * graphite-sese-to-poly.c (create_linear_expr_from_tree): Use pbb_loop.
2504 2009-09-27 Sebastian Pop <sebastian.pop@amd.com>
2506 * graphite-scop-detection.c (limit_scops): Do not build poly_bbs.
2508 2009-09-27 Sebastian Pop <sebastian.pop@amd.com>
2510 * graphite-sese-to-poly.c (partition_drs_to_sets): Drs is not modified,
2511 so don't pass a pointer to it.
2512 (build_alias_set_for_drs): Same.
2513 (build_base_obj_set_for_drs): Same.
2514 (build_scop_drs): Same.
2516 2009-09-26 Li Feng <nemokingdom@gmail.com>
2518 * graphite-sese-to-poly.c (build_scop_drs): Disable writing to file
2519 the alias graph of data references.
2521 2009-09-25 Li Feng <nemokingdom@gmail.com>
2523 * graphite-sese-to-poly.c (write_alias_graph_to_ascii_dimacs): New.
2524 (build_scop_drs): When debugging, write the alias graph to file,
2525 otherwise, should be disabled.
2527 2009-09-17 Sebastian Pop <sebastian.pop@amd.com>
2529 * Merge from mainline (151310:151361).
2531 2009-09-17 Sebastian Pop <sebastian.pop@amd.com>
2533 * Merge from mainline (151171:151310).
2535 2009-09-17 Sebastian Pop <sebastian.pop@amd.com>
2537 * Merge from mainline (151171:151806).
2539 2009-09-17 Sebastian Pop <sebastian.pop@amd.com>
2541 * Revert the last commit.
2543 2009-09-17 Sebastian Pop <sebastian.pop@amd.com>
2545 * Merge from mainline (151171:151819).
2547 2009-09-17 Sebastian Pop <sebastian.pop@amd.com>
2549 * graphite-scop-detection.c (stmt_simple_memref_p): Removed.
2550 (is_simple_operand): Remove call to stmt_simple_memref_p.
2551 (stmt_simple_for_scop_p): Update call to is_simple_operand.
2553 2009-09-17 David Edelsohn <edelsohn@gnu.org>
2555 * gcc.dg/graphite/interchange-mvt.c: New File.
2556 * gcc.dg/graphite/scop-dsyrk.c: New File.
2557 * gcc.dg/graphite/scop-dsyr2k.c: New File.
2558 * gcc.dg/graphite/scop-mvt.c: New File.
2559 * gcc.dg/graphite/scop-sor.c: New File.
2561 2009-09-17 Li Feng <nemokingdom@gmail.com>
2563 * graphite-dependences.c (poly_drs_may_alias_p): Adjust definition.
2564 (pddr_original_scattering): Make sure 2 pdr2 in the same base object set.
2565 (graphite_carried_dependence_level_k): Ditto.
2566 * graphite-poly.c (new_poly_dr): Add init of PDR_BASE_OBJECT_SET.
2567 * graphite-poly.h (struct poly_dr): Add member dr_base_object_set.
2568 (new_poly_dr): Adjust declaration.
2569 * graphite-sese-to-poly.c (free_data_refs_aux): New.
2570 (free_gimple_bb): Added free_data_refs_aux.
2571 (build_poly_dr): Add dr_base_object_set.
2572 (partition_drs_to_sets): New.
2573 (dr_same_base_object_p): New.
2574 (build_alias_set_for_drs): New.
2575 (build_base_object_set_for_drs): New.
2576 (build_scop_drs): Add build_base_obj_set_for_drs.
2577 * graphite-sese-to-poly.h: Added #define for alias set number index and
2578 base object set index.
2579 * libgomp/testsuite/libgomp.graphite/force-parallel-6.c: Refine tests.
2580 * libgomp/testsuite/libgomp.graphite/pr4118.c: New.
2582 2009-09-16 Alexander Monakov <amonakov@ispras.ru>
2584 * graphite-sese-to-poly.c (pdr_add_data_dimensions): Add bounds only
2585 for ARRAY_REFs. Use array_ref_{low,up}_bound to determine bounds.
2587 2009-09-14 Sebastian Pop <sebastian.pop@amd.com>
2589 * graphite-sese-to-poly.c (struct irp_data): Removed.
2590 (idx_record_params): Removed.
2591 (find_params_in_bb): Scan for parameters the access functions; don't
2592 parse the tree representation.
2594 2009-09-14 Sebastian Pop <sebastian.pop@amd.com>
2596 * tree-ssa-loop.c (gate_graphite_transforms): Disable Graphite
2597 passes at -O1 and below.
2599 2009-09-14 Sebastian Pop <sebastian.pop@amd.com>
2601 * graphite-blocking.c: Fix order of includes: tree-chrec.h, then
2602 tree-scalar-evolution.h, and then tree-data-ref.h.
2603 * graphite-clast-to-gimple.c: Same.
2604 * graphite-dependences.c: Same.
2605 * graphite-interchange.c: Same.
2606 * graphite-poly.c: Same.
2607 * graphite-scop-detection.c: Same.
2608 * graphite-sese-to-poly.c: Same.
2610 * lambda-code.c: Same.
2611 * matrix-reorg.c: Same.
2612 * tree-data-ref.c: Same.
2613 * tree-if-conv.c: Same.
2614 * tree-loop-distribu: Same.: Same.
2615 * tree-loop-linear.c: Same.
2616 * tree-parloops.c: Same.
2617 * tree-predcom.c: Same.
2618 * tree-vect-patterns.c: Same.
2620 2009-09-02 Sebastian Pop <sebastian.pop@amd.com>
2622 Partially revert the previous patch, except the following.
2623 * tree-scalar-evolution.c (instantiate_scev_not): Adapted to pass
2624 as parameters the operands of the not expression.
2626 2009-09-01 Sebastian Pop <sebastian.pop@amd.com>
2628 * tree-scalar-evolution.c (instantiate_scev_assign): New.
2629 Do not call analyze_scalar_evolution on assignments.
2630 (instantiate_scev_phi): Call analyze_scalar_evolution.
2631 (instantiate_scev_name): Call instantiate_scev_assign and
2632 instantiate_scev_phi.
2633 (instantiate_scev_not): Adapted to pass as parameters the operands
2634 of the not expression.
2636 2009-09-01 Sebastian Pop <sebastian.pop@amd.com>
2638 * tree-scalar-evolution.c (instantiate_scev_binary): Adapted
2639 to pass as parameters the operands of the binary expression.
2641 2009-09-01 Sebastian Pop <sebastian.pop@amd.com>
2643 * tree-scalar-evolution.c (instantiate_scev_bitnot): Renamed
2644 instantiate_scev_not. Handle NEGATE_EXPR.
2645 (instantiate_scev_r): Handle NEGATE_EXPR.
2647 2009-09-01 Sebastian Pop <sebastian.pop@amd.com>
2649 * tree-scalar-evolution.c (instantiate_scev_1): Renamed
2651 (instantiate_scev_r): Move code in instantiate_scev_2
2652 and instantiate_scev_1.
2654 2009-09-01 Sebastian Pop <sebastian.pop@amd.com>
2656 * tree-scalar-evolution.c (instantiate_scev_3): New.
2657 (instantiate_scev_1): Move code in instantiate_scev_3.
2659 2009-09-01 Sebastian Pop <sebastian.pop@amd.com>
2661 * tree-scalar-evolution.c (instantiate_scev_poly): New.
2662 (instantiate_scev_1): Move code in instantiate_scev_poly.
2664 2009-09-01 Sebastian Pop <sebastian.pop@amd.com>
2666 * tree-scalar-evolution.c (instantiate_scev_bitnot): New.
2667 (instantiate_scev_1): Move code in instantiate_scev_bitnot.
2669 2009-09-01 Sebastian Pop <sebastian.pop@amd.com>
2671 * tree-scalar-evolution.c (instantiate_scev_convert): New.
2672 (instantiate_scev_1): Move code in instantiate_scev_convert.
2674 2009-09-01 Sebastian Pop <sebastian.pop@amd.com>
2676 * tree-scalar-evolution.c (instantiate_scev_binary): New.
2677 (instantiate_scev_1): Move code in instantiate_scev_binary.
2679 2009-09-01 Sebastian Pop <sebastian.pop@amd.com>
2681 * tree-scalar-evolution.c (instantiate_scev_name): New.
2682 (instantiate_scev_1): Move code in instantiate_scev_name.
2684 2009-08-28 Sebastian Pop <sebastian.pop@amd.com>
2686 * Merge from mainline (150992:151171).
2688 2009-08-25 Sebastian Pop <sebastian.pop@amd.com>
2690 * opts.c (decode_options): Enable flag_loop_interchange at -O2.
2692 2009-08-25 Sebastian Pop <sebastian.pop@amd.com>
2694 * graphite-dependences.c (graphite_legal_transform_bb): Call
2695 pbb_remove_duplicate_pdrs.
2696 * graphite-poly.c (can_collapse_pdr): Removed.
2697 (pdr_find_duplicate): Removed.
2698 (can_collapse_pdrs): New.
2699 (pbb_remove_duplicate_pdrs): New.
2700 (new_poly_dr): Do not look for duplicates.
2701 * graphite-poly.h (struct poly_bb): New field pdr_duplicates_removed.
2702 (PBB_PDR_DUPLICATES_REMOVED): New.
2703 (pbb_remove_duplicate_pdrs): Declared.
2705 2009-08-25 Sebastian Pop <sebastian.pop@amd.com>
2707 * graphite-interchange.c (pbb_interchange_profitable_p): Adjust
2708 the strides by multiplying by PDR_NB_REFS.
2709 * graphite-poly.c (can_collapse_pdr): New.
2710 (pdr_find_duplicate): New.
2711 (new_poly_dr): Call pdr_find_duplicate. Collapse duplicate PDRs.
2712 Initialize PDR_NB_REFS.
2713 * graphite-poly.h (struct poly_dr): Add field nb_refs.
2715 (new_poly_dr): Number of subscripts is a graphite_dim_t.
2717 2009-08-25 Sebastian Pop <sebastian.pop@amd.com>
2719 Revert one of the previous commits:
2720 * graphite-dependences.c (graphite_legal_transform_bb): Avoid
2721 the computation of symmetric data dependence relations.
2722 (dependency_between_pbbs_p): Same.
2724 2009-08-25 Sebastian Pop <sebastian.pop@amd.com>
2727 * graphite-poly.c (apply_poly_transforms): Remove legality test before
2730 2009-08-25 Sebastian Pop <sebastian.pop@amd.com>
2732 * graphite-dependences.c (pddr_original_scattering): Return NULL
2733 for read-read dependence relations.
2734 * graphite-poly.h (enum poly_dr_type): Fix comment.
2737 (pdr_may_write_p): New.
2739 2009-08-25 Sebastian Pop <sebastian.pop@amd.com>
2741 * graphite-poly.h (enum POLY_DR_TYPE): Renamed poly_dr_type.
2742 (struct poly_dr): Same.
2743 (new_poly_dr): Same.
2744 * graphite-poly.c (new_poly_dr): Same.
2746 2009-08-25 Konrad Trifunovic <konrad.trifunovic@gmail.com>
2747 Sebastian Pop <sebastian.pop@amd.com>
2749 * graphite-blocking.c (pbb_strip_mine_loop_depth): Renamed
2750 pbb_strip_mine_time_depth. Changed the implementation so that
2751 transformation is expressed as a transformation on
2752 time (scatttering) dimensions. Also, ensures that the 2d+1
2753 scheduling format is preserved.
2754 (pbb_strip_mine_profitable_p): Profitability is based on the
2755 iteration number of a given time (scattering) dimension,
2756 and not on a original loop depth dimension.
2757 (pbb_strip_mine): Call pbb_number_of_iterations_at_time.
2758 (pbb_do_strip_mine): Call psct_dynamic_dim.
2759 * graphite-poly.c (pbb_number_of_iterations_at_time): New.
2760 * graphite-poly.h (pbb_number_of_iterations_at_time): Declared.
2761 (pbb_nb_dynamic_scattering_transform): New.
2762 (psct_dynamic_dim): New.
2764 2009-08-25 Konrad Trifunovic <konrad.trifunovic@gmail.com>
2766 * graphite-ppl.c (ppl_max_for_le): Renamed ppl_max_for_le_pointset.
2767 * graphite-ppl.h (ppl_max_for_le): Renamed ppl_max_for_le_pointset.
2768 * graphite-poly.c (pbb_number_of_iterations): Rename ppl_max_for_le.
2769 * graphite-interchange.c (build_linearized_memory_access): Same.
2770 (memory_stride_in_loop): Same.
2772 2009-08-25 Sebastian Pop <sebastian.pop@amd.com>
2774 * graphite-dependences.c (pddr_original_scattering): New.
2775 (graphite_legal_transform_dr): Call pddr_original_scattering.
2778 * graphite-dependences.h (dot_deps): Declared.
2779 * graphite-poly.c (new_poly_dr): Initialize PDR_ID.
2780 (print_pdr): Print PDR_ID.
2781 * graphite-poly.h (struct poly_dr): Add field id.
2784 * graphite-scop-detection.c (dot_all_scops_1): Cleanup comment.
2786 2009-08-22 Sebastian Pop <sebastian.pop@amd.com>
2788 * graphite-dependences.c (graphite_carried_dependence_level_k): Do
2789 not delete the original dependence relation.
2791 2009-08-21 Sebastian Pop <sebastian.pop@amd.com>
2793 * graphite-dependences.c (graphite_legal_transform_bb): Avoid
2794 the computation of symmetric data dependence relations.
2795 (dependency_between_pbbs_p): Same.
2797 2009-08-21 Sebastian Pop <sebastian.pop@amd.com>
2799 * graphite-dependences.c (new_poly_dr_pair): Renamed new_poly_ddr.
2800 (eq_poly_dr_pair_p): Renamed eq_poly_ddr_p.
2801 (hash_poly_dr_pair_p): Renamed hash_poly_ddr_p.
2802 (free_poly_ddr): New.
2803 (pddr_is_empty): New.
2804 (dependence_polyhedron_1): Now returns a poly_ddr_p.
2805 (dependence_polyhedron): Same. Remove useless gcc_assert.
2807 (graphite_legal_transform_dr): Call pddr_is_empty and free_poly_ddr.
2808 (graphite_carried_dependence_level_k): Call pddr_is_empty.
2809 * graphite-dependences.h (enum poly_dependence_kind): New.
2810 (poly_dr_pair): Renamed poly_ddr. Added a field kind.
2811 (PDRP_SOURCE): Renamed PDDR_SOURCE.
2812 (PDRP_SINK): Renamed PDDR_SINK.
2813 (PDRP_DDP): Renamed PDDR_DDP.
2815 (free_poly_ddr): Declared.
2816 * graphite-poly.c (new_scop): Use the new hash function names.
2817 * graphite-poly.h (struct scop): Renamed field original_pdr_pairs
2818 into original_pddrs.
2819 (SCOP_ORIGINAL_PDR_PAIRS): Renamed SCOP_ORIGINAL_PDDRS.
2821 2009-08-21 Sebastian Pop <sebastian.pop@amd.com>
2823 * Merge from mainline (150764:150992).
2825 2009-08-18 Sebastian Pop <sebastian.pop@amd.com>
2827 * cfgloopmanip.c (create_empty_loop_on_edge): Generate upper
2828 bounds with LT_EXPR to make niter analysis more precise on code
2829 generated by Graphite.
2831 2009-08-18 Sebastian Pop <sebastian.pop@amd.com>
2833 * graphite-dependences.c (graphite_legal_transform_dr): Fix formatting.
2834 (graphite_legal_transform_bb): Same.
2835 (poly_drs_may_alias_p): Same.
2837 2009-08-15 Sebastian Pop <sebastian.pop@amd.com>
2840 * graphite-ppl.c (ppl_max_for_le): Correct the use of
2841 ppl_Pointset_Powerset_C_Polyhedron_maximize.
2843 2009-08-13 Sebastian Pop <sebastian.pop@amd.com>
2845 * graphite-poly.c (print_pbb): Print PBB index.
2847 2009-08-13 Sebastian Pop <sebastian.pop@amd.com>
2849 * Merge from mainline (r150672:150764).
2851 2009-08-13 Sebastian Pop <sebastian.pop@amd.com>
2853 * graphite-interchange.c (ppl_max_for_le): Moved...
2854 * graphite-poly.c (pbb_number_of_iterations): Call ppl_max_for_le.
2855 * graphite-ppl.c (ppl_max_for_le): ... here.
2856 * graphite-ppl.h (ppl_max_for_le): Declared.
2858 2009-08-12 Sebastian Pop <sebastian.pop@amd.com>
2860 * Merge from mainline (r150372:150672).
2862 2009-08-11 Sebastian Pop <sebastian.pop@amd.com>
2865 * sese.c (convert_for_phi_arg): New.
2866 (add_guard_exit_phis): Use convert_for_phi_arg.
2868 * gfortran.dg/graphite/id-17.f: New.
2870 2009-08-11 Sebastian Pop <sebastian.pop@amd.com>
2872 * graphite-sese-to-poly.c (pdr_add_data_dimensions): Dont add
2873 unknown subscript upper bounds.
2875 * gcc.dg/graphite/interchange-6.c: Un-XFAIL.
2877 2009-08-11 Sebastian Pop <sebastian.pop@amd.com>
2878 Pranav Garg <pranav.garg2107@gmail.com>
2880 * graphite-interchange.c (gather_access_strides): Removed.
2881 (ppl_max_for_le): New.
2882 (build_linearized_memory_access): New.
2883 (memory_stride_in_loop): New.
2884 (pbb_interchange_profitable_p): Reimplemented.
2885 * graphite-ppl.h (ppl_new_id_map): New.
2886 (ppl_interchange): New.
2888 * gcc.dg/graphite/interchange-6.c: XFAILed.
2890 2009-08-11 Sebastian Pop <sebastian.pop@amd.com>
2892 * graphite-interchange.c (compute_subscript): Removed.
2893 (compute_array_size_cstr): Removed.
2894 (compute_array_size_poly): Removed.
2895 (compute_array_size): Removed.
2896 (gather_access_strides_poly): Removed.
2897 (gather_access_strides): Empty.
2899 2009-08-11 Sebastian Pop <sebastian.pop@amd.com>
2901 * graphite-dependences.c (dependence_polyhedron_1): Replace
2902 pdr_nb_subscripts with PDR_NB_SUBSCRIPTS.
2903 (graphite_legal_transform_dr): Same.
2904 (graphite_carried_dependence_level_k): Same.
2905 * graphite-poly.c (new_poly_dr): Add a parameter nb_subscripts.
2906 Initialize PDR_NB_SUBSCRIPTS.
2907 (print_pdr_access_layout): Replace pdr_nb_subscripts with
2909 * graphite-poly.h (struct poly_dr): Add nb_subscripts field.
2910 (PDR_NB_SUBSCRIPTS): New.
2911 (pdr_nb_subscripts): Removed.
2912 (pdr_dim): Simplified.
2913 * graphite-sese-to-poly.c (build_poly_dr): Replace pdr_nb_subscripts
2914 with PDR_NB_SUBSCRIPTS.
2916 2009-08-11 Sebastian Pop <sebastian.pop@amd.com>
2918 * graphite-interchange.c (compute_array_size): Remove use of
2920 * graphite-poly.c (new_poly_dr): Remove argument data_container.
2921 Do not initialize PDR_DATA_CONTAINER.
2922 (print_pdr): Do not print PDR_DATA_CONTAINER.
2923 * graphite-poly.h (struct poly_dr): Remove data_container field.
2924 (PDR_DATA_CONTAINER): Removed.
2925 * graphite-sese-to-poly.c (pdr_add_data_dimensions): Remove use of
2927 (build_poly_dr): Same.
2929 2009-08-11 Sebastian Pop <sebastian.pop@amd.com>
2931 * gcc.dg/graphite/interchange-9.c: New.
2933 2009-08-05 Konrad Trifunovic <konrad.trifunovic@gmail.com>
2934 Sebastian Pop <sebastian.pop@amd.com>
2936 * graphite-dependences.c (graphite_legal_transform_dr): Work on a
2937 copy of the dependence polyhedron. Free the temporary objects.
2938 (graphite_carried_dependence_level_k): Free unused objects before
2941 * gcc.dg/graphite/interchange-1.c: XFAILed.
2942 * gcc.dg/graphite/interchange-2.c: XFAILed.
2943 * gcc.dg/graphite/interchange-3.c: XFAILed.
2944 * gcc.dg/graphite/interchange-4.c: XFAILed.
2945 * gcc.dg/graphite/interchange-7.c: XFAILed.
2947 2009-08-05 Sebastian Pop <sebastian.pop@amd.com>
2949 * graphite-blocking.c (scop_do_strip_mine): Call store_scattering.
2950 Early return without analyzing the data dependences if no
2951 transform has been done. Call restore_scattering if the transform
2953 (graphite-interchange.c): Same.
2954 * graphite-poly.c (print_scattering_function): Test for PBB_TRANSFORMED.
2955 (graphite_read_transforms): Initialize PBB_TRANSFORMED.
2956 (apply_poly_transforms): Do not gcc_assert that
2957 the transform is legal.
2958 (new_poly_bb): Initialize PBB_TRANSFORMED, PBB_SAVED, and PBB_ORIGINAL.
2959 Do not initialize PBB_NB_SCATTERING_TRANSFORM, PBB_NB_LOCAL_VARIABLES,
2960 PBB_TRANSFORMED_SCATTERING, and PBB_ORIGINAL_SCATTERING.
2961 (free_poly_dr): Free PBB_TRANSFORMED, PBB_SAVED, and PBB_ORIGINAL.
2962 * graphite-poly.h (struct poly_scattering): New.
2963 (struct poly_bb): Add original, transformed, and saved fields.
2964 Remove transformed_scattering, original_scattering, nb_local_variables,
2965 and nb_scattering_transform fields.
2966 (PBB_ORIGINAL, PBB_TRANSFORMED, PBB_SAVED): New.
2967 (poly_scattering_new): New.
2968 (poly_scattering_free): New.
2969 (poly_scattering_copy): New.
2970 (store_scattering_pbb): New.
2971 (store_scattering): New.
2972 (restore_scattering_pbb): New.
2973 (restore_scattering): New.
2974 * graphite-sese-to-poly.c (build_pbb_scattering_polyhedrons):
2975 Initialize PBB_TRANSFORMED and PBB_ORIGINAL.
2977 2009-08-05 Sebastian Pop <sebastian.pop@amd.com>
2979 * graphite-poly.c (print_pbb): Add parentheses in the pretty print.
2982 2009-08-05 Sebastian Pop <sebastian.pop@amd.com>
2984 * Makefile.in (graphite.o): Depends on PREDICT_H.
2985 * graphite.c: Include predict.h.
2986 (graphite_finalize): Call tree_estimate_probability.
2987 * predict.c (predict_loops): Do not call scev_initialize and
2989 (tree_estimate_probability_bb): New.
2990 (tree_estimate_probability): Do not initialize loops: move that
2991 code to the driver. Call tree_estimate_probability_bb.
2992 (tree_estimate_probability_driver): New.
2993 (pass_profile): Use tree_estimate_probability_driver.
2994 * predict.h (tree_estimate_probability): Declared.
2996 2009-08-05 Sebastian Pop <sebastian.pop@amd.com>
2998 * graphite-clast-to-gimple.c (gloog): Add time to TV_GRAPHITE_CODE_GEN.
2999 * graphite-dependences.c (graphite_legal_transform): Add time to
3000 TV_GRAPHITE_DATA_DEPS.
3001 (dependency_between_pbbs_p): Same.
3002 * timevar.def (TV_GRAPHITE_DATA_DEPS, TV_GRAPHITE_CODE_GEN): New.
3004 2009-08-03 Sebastian Pop <sebastian.pop@amd.com>
3006 * Merge from mainline (r149952:150372).
3008 2009-07-28 Sebastian Pop <sebastian.pop@amd.com>
3010 * ChangeLog.graphite: Fix indenting, white spaces and 80 columns.
3011 * graphite-blocking.c: Same.
3012 * graphite-clast-to-gimple.c: Same.
3013 * graphite-dependences.c: Same.
3014 * graphite-poly.c: Same.
3015 * graphite-poly.h: Same.
3016 * graphite-ppl.c: Same.
3017 * graphite-scop-detection.c: Same.
3018 * graphite-sese-to-poly.c: Same.
3021 2009-07-28 Sebastian Pop <sebastian.pop@amd.com>
3023 * graphite-sese-to-poly.c (loop_entry_phi_arg): New.
3024 (remove_simple_copy_phi): New.
3025 (remove_invariant_phi): New.
3026 (simple_copy_phi_p): New.
3027 (reduction_phi_p): New.
3028 (gsi_for_ssa_name_def): New.
3029 (insert_out_of_ssa_copy): New.
3030 (insert_out_of_ssa_copy_on_edge): New.
3031 (create_zero_dim_array): New.
3032 (scalar_close_phi_node_p): New.
3033 (rewrite_close_phi_out_of_ssa): New.
3034 (rewrite_phi_out_of_ssa): New.
3035 (rewrite_reductions_out_of_ssa): New.
3036 (build_poly_scop): Call rewrite_reductions_out_of_ssa.
3038 * gcc.dg/graphite/id-11.c: New.
3039 * gcc.dg/graphite/id-15.c: New.
3040 * gcc.dg/graphite/interchange-1.c: Un-XFAIL.
3041 * gcc.dg/graphite/interchange-2.c: Un-XFAIL.
3042 * gcc.dg/graphite/interchange-3.c: Un-XFAIL.
3043 * gcc.dg/graphite/interchange-4.c: Un-XFAIL.
3044 * gcc.dg/graphite/interchange-7.c: Un-XFAIL.
3045 * gcc.dg/graphite/scop-matmult.c: Un-XFAIL.
3046 * gfortran.dg/graphite/id-13.f: New.
3047 * gfortran.dg/graphite/id-5.f: New.
3049 2009-07-28 Sebastian Pop <sebastian.pop@amd.com>
3051 * graphite-clast-to-gimple.c (graphite_loop_normal_form): Do not
3052 check that nb_reductions_in_loop is zero.
3053 * graphite-scop-detection.c (harmful_stmt_in_bb): Don't filter out
3054 reduction phi nodes.
3055 (nb_reductions_in_loop): Removed.
3056 (graphite_can_represent_loop): Do not call nb_reductions_in_loop.
3057 * graphite-sese-to-poly.c (phi_node_is_iv): Removed.
3058 (bb_contains_non_iv_scalar_phi_nodes): Removed.
3059 (scop_contains_non_iv_scalar_phi_nodes): Removed.
3060 (build_poly_scop): Do not call scop_contains_non_iv_scalar_phi_nodes.
3062 2009-07-28 Sebastian Pop <sebastian.pop@amd.com>
3064 * graphite-clast-to-gimple.c (build_cloog_prog): Do not code generate
3065 statements that have an empty iteration domain.
3066 * gfortran.dg/graphite/id-16.f: New.
3068 2009-07-28 Sebastian Pop <sebastian.pop@amd.com>
3070 * tree-scalar-evolution.c (instantiate_scev_1): Return
3071 chrec_dont_know when the result is not above instantiate_below.
3072 * graphite-scop-detection.c (scopdet_basic_block_info): Fix formatting.
3073 * graphite-sese-to-poly.c (create_linear_expr_from_tree): Assert that
3074 the tree has a known scalar evolution.
3075 * gfortran.dg/graphite/id-14.f: New.
3076 * gfortran.dg/graphite/id-15.f: New.
3078 2009-07-28 Sebastian Pop <sebastian.pop@amd.com>
3080 * sese.c (rename_variables_in_stmt): Pass in an extra parameter
3082 (rename_variables): Keep inserting renames after the ones already
3085 2009-07-28 Sebastian Pop <sebastian.pop@amd.com>
3087 * graphite-sese-to-poly.c (compare_bb_depths): New.
3088 (graphite_sort_dominated_info): New.
3089 (build_scop_bbs_1): Call graphite_sort_dominated_info.
3090 (build_scop_scattering): Fix comment.
3092 2009-07-28 Sebastian Pop <sebastian.pop@amd.com>
3094 * graphite.c (graphite_finalize): Call print_loops instead of
3095 dump_function_to_file.
3096 * gcc.dg/graphite/graphite.exp: Fix formatting.
3097 * gcc.dg/graphite/pr35356-1.c: New. Look for the number of
3098 loops generated in the graphite output file.
3099 * gcc.dg/graphite/pr35356-2.c: New.
3100 * gcc.dg/graphite/pr35356-3.c: New. XFAILed for now.
3101 * gfortran.dg/graphite/id-12.f: New.
3103 2009-07-24 Li Feng <nemokingdom@gmail.com>
3105 * gcc.dg/graphite/graphite_autopar/force-parallel-8.c:
3108 2009-07-24 Li Feng <nemokingdom@gmail.com>
3109 Tobias Grosser <grosser@fim.uni-passau.de>
3111 * graphite-sese-to-poly.c (pdr_add_alias_set): Use data reference's
3112 alias set number build alias in ACCESSES polyhedron.
3113 (build_alias_set_for_drs): New.
3114 (build_pbb_drs): Added build_alias_set_for_drs.
3115 * graphite-dependences.c (poly_drs_may_alias_p): New.
3116 (graphite_carried_dependence_level_k): Check alias information
3117 before building polyhedron.
3119 2009-07-24 Tobias Grosser <grosser@fim.uni-passau.de>
3121 * Makefile.in (lambda-code.o): Fix formatting.
3123 2009-07-24 Tobias Grosser <grosser@fim.uni-passau.de>
3125 * Merge from mainline (r149350-149952)
3127 2009-07-18 Tobias Grosser <grosser@fim.uni-passau.de>
3129 * graphite-poly.c (apply_poly_transforms): Move strip_mine
3130 before interchange to prepare for loop blocking.
3132 2009-07-18 Tobias Grosser <grosser@fim.uni-passau.de>
3134 * graphite-poly.c (apply_poly_transforms): Add checks after every
3136 * graphite-sese-to-poly.c (build_poly_scop): Remove check, as already
3137 done in apply_poly_transforms.
3139 2009-07-17 Konrad Trifunovic <konrad.trifunovic@gmail.com>
3141 * graphite-dependences.c (build_lexicographically_gt_constraint):
3142 Replace RES parameter with *RES.
3143 (dependence_polyhedron_1): Pass an address of the parameter RES
3144 instead of value of RES.
3146 2009-07-16 Sebastian Pop <sebastian.pop@amd.com>
3148 * graphite.c (graphite_finalize): Fix comment.
3149 (graphite_transform_loops): Reset scev info after code generation
3152 2009-07-16 Sebastian Pop <sebastian.pop@amd.com>
3154 * graphite.c (graphite_finalize): Call scev_reset.
3156 2009-07-16 Sebastian Pop <sebastian.pop@amd.com>
3158 * graphite-clast-to-gimple.c (compute_cloog_iv_types): Do not create
3159 GBB_CLOOG_IV_TYPES hash table twice.
3160 * graphite-sese-to-poly.c (free_gimple_bb): Call free_data_refs.
3161 (add_condition_to_domain): Clear GMP values.
3163 2009-07-16 Sebastian Pop <sebastian.pop@amd.com>
3165 * graphite-dependences.c: Fix formatting.
3166 * graphite-poly.c (free_poly_dr): Also free PDR_DATA_CONTAINER.
3167 (pbb_number_of_iterations): Free ppl_Linear_Expression.
3168 * graphite-sese-to-poly.c: Fix formatting.
3169 * graphite.c (graphite_transform_loops): Create the hash table
3170 after the early return.
3172 2009-07-16 Sebastian Pop <sebastian.pop@amd.com>
3174 * gcc.dg/graphite/id-14.c: New.
3175 * gcc.dg/graphite/pr40157.c: New.
3176 * gfortran.dg/graphite/id-11.f: New.
3178 2009-07-16 Sebastian Pop <sebastian.pop@amd.com>
3180 * graphite-sese-to-poly.c (nb_pbbs_in_loops): New.
3181 (build_poly_scop): Return false when there are no pbbs within
3182 loops to avoid to pass to cloog scops with no loops.
3184 2009-07-16 Sebastian Pop <sebastian.pop@amd.com>
3186 * graphite-sese-to-poly.c (build_pbb_scattering_polyhedrons): Avoid
3187 useless test "i % 2".
3188 (build_pbb_scattering_polyhedrons): Fix formatting.
3189 (build_poly_dr): Same.
3190 * graphite.c (graphite_transform_loops): Restructure.
3192 2009-07-14 Razya Ladelsky <razya@il.ibm.com>
3194 * tree-ssa-loop-manip.c (rewrite_phi_with_iv): Remove
3195 reduction_list parameter.
3196 (rewrite_all_phi_nodes_with_iv): Same.
3197 (canonicalize_loop_ivs): Same.
3198 * tree-parloops.c (struct brli): Removed.
3199 (build_reduction_list_info): Removed.
3200 (build_new_reduction): New.
3201 (analyze_reduction_list): Removed.
3202 (gather_scalar_reductions): Find reductions instead of phi
3203 nodes that can't be canonicalized.
3204 (try_create_reduction_list): Remove reduction_list parameter.
3205 (gen_parallel_loop): Same.
3206 (parallelize_loops): Remove analyze_reductions variable,
3207 initialization and free.
3208 Change reduction_list htab initialization to reduction_info
3209 elements instead of ssa names.
3210 Call try_create_reduction_list and gen_parallel_loop without
3211 analyzed_reduction argument.
3212 * graphite-clast-to-gimple (graphite_loop_normal_form): Call
3213 canonicalize_loop_ivs with one less argument.
3214 * tree-flow.h (canonicalize_loop_ivs): Remove one argument.
3216 2009-07-14 Konrad Trifunovic <konrad.trifunovic@gmail.com>
3218 * graphite-dependences.c (new_poly_dr_pair): New.
3219 (dependence_polyhedron): Renamed into dependence_polyhedron_1.
3220 (new_poly_dr_pair): New.
3221 (eq_poly_dr_pair_p): New.
3222 (hash_poly_dr_pair_p): New.
3223 * graphite-dependences.h (struct poly_dr_pair): New.
3224 (eq_poly_dr_pair_p): Declared.
3225 (hash_poly_dr_pair_p): Declared.
3226 * graphite-poly.c (new_scop): Initialize SCOP_ORIGINAL_PDR_PAIRS.
3227 (free_scop): Free SCOP_ORIGINAL_PDR_PAIRS.
3228 * graphite-poly.h (struct scop): Add original_pdr_pairs field.
3229 * Makefile.in (graphite-poly.o): Add dependence on
3230 graphite-dependences.h.
3232 2009-07-14 Sebastian Pop <sebastian.pop@amd.com>
3234 * graphite-scop-detection.c (graphite_can_represent_scev): Do not let
3235 polynomials of degree > 1 pass to Graphite.
3236 * tree-chrec.c (scev_is_linear_expression): Call
3237 evolution_function_is_affine_multivariate_p.
3238 * gfortran.dg/graphite/id-10.f90: New.
3240 2009-07-14 Sebastian Pop <sebastian.pop@amd.com>
3242 * tree-scalar-evolution.c (compute_overall_effect_of_inner_loop):
3243 Instantiate scevs varying in outer loops.
3244 * gfortran.dg/graphite/id-9.f: Correct testcase.
3246 2009-07-14 Sebastian Pop <sebastian.pop@amd.com>
3248 * graphite-sese-to-poly.c (build_loop_iteration_domains): Do not insert
3249 redundant constraint.
3251 2009-07-14 Sebastian Pop <sebastian.pop@amd.com>
3253 * gcc.dg/graphite/graphite.exp: Fix comments.
3254 * gfortran.dg/graphite/graphite.exp: Trigger actions
3255 based on the file names as in the C testsuite.
3256 * gfortran.dg/graphite/block-1.f90: Fix patterns.
3257 * gfortran.dg/graphite/block-2.f: Same.
3258 * gfortran.dg/graphite/block-3.f90: Same.
3259 * gfortran.dg/graphite/block-4.f90: Same.
3260 * gfortran.dg/graphite/id-1.f90: Same.
3261 * gfortran.dg/graphite/id-2.f90: Same.
3262 * gfortran.dg/graphite/id-3.f90: Same.
3263 * gfortran.dg/graphite/id-4.f90: Same.
3264 * gfortran.dg/graphite/id-6.f: Same.
3265 * gfortran.dg/graphite/id-9.f: Same.
3266 * gfortran.dg/graphite/interchange-1.f: Same.
3267 * gfortran.dg/graphite/interchange-2.f: Same.
3268 * gfortran.dg/graphite/scop-1.f: Same.
3270 2009-07-14 Sebastian Pop <sebastian.pop@amd.com>
3272 * sese.c (expand_scalar_variables_call): New.
3273 (expand_scalar_variables_ssa_name): Handle calls in expander.
3275 2009-07-13 Sebastian Pop <sebastian.pop@amd.com>
3277 * gcc.dg/graphite/graphite_autopar/force-parallel-6.c:
3278 Expect to see the pattern twice.
3279 * gcc.dg/graphite/interchange-0.c: Un-XFAIL.
3280 * gcc.dg/graphite/interchange-5.c: Same.
3281 * gcc.dg/graphite/interchange-6.c: Same.
3283 2009-07-13 Sebastian Pop <sebastian.pop@amd.com>
3285 * gcc.dg/graphite/id-10.c: New.
3286 * gcc.dg/graphite/id-12.c: New.
3287 * gfortran.dg/graphite/id-7.f: New.
3288 * gfortran.dg/graphite/id-8.f: New.
3290 2009-07-13 Sebastian Pop <sebastian.pop@amd.com>
3292 * graphite-sese-to-poly.c (pdr_add_data_dimensions): Fix division by
3295 2009-07-13 Sebastian Pop <sebastian.pop@amd.com>
3297 * sese.c (rename_variables_in_stmt): Call fold_convert during renaming.
3299 2009-07-13 Sebastian Pop <sebastian.pop@amd.com>
3301 * sese.c (expand_scalar_variables_stmt): Avoid unnecessary expansion.
3303 2009-07-10 Sebastian Pop <sebastian.pop@amd.com>
3305 * graphite-sese-to-poly.c (pdr_add_memory_accesses): Fix order of
3306 building PDR subscripts.
3308 2009-07-10 Sebastian Pop <sebastian.pop@amd.com>
3310 * graphite-sese-to-poly.c (pdr_add_data_dimensions): Fix the
3311 computation of array sizes.
3313 2009-07-10 Sebastian Pop <sebastian.pop@amd.com>
3315 * graphite-sese-to-poly.c (add_param_constraints): Disabled.
3317 2009-07-10 Tobias Grosser <grosser@fim.uni-passau.de>
3319 * graphite-dependences.c (map_into_dep_poly, map_dr_into_dep_poly,
3320 build_pairwise_constraint, dr_equality_constraints,
3321 build_pairwise_scheduling_equality,
3322 build_pairwise_scheduling_inequality, lexicographically_gt_p,
3323 build_lexicographically_gt_constraint, dependence_polyhedron,
3324 graphite_legal_transform_dr, graphite_carried_dependence_level_k):
3325 Move from NNC_Polyhedron to C_Polyhedron.
3326 * graphite-interchange.c (compute_array_size_poly,
3327 gather_access_strides): Dito.
3328 * graphite-poly.c (apply_poly_transforms, new_poly_dr, free_poly_bb,
3329 free_scop, pbb_number_of_iterations): Dito.
3330 * graphite-poly.h (struct poly_dr, pdr_nb_subscripts, struct poly_bb,
3331 pbb_dim_iter_domain, struct scop): Dito.
3332 * graphite-ppl.c (new_Constraint_System_from_Cloog_Matrix,
3333 new_Cloog_Domain_from_ppl_Polyhedron,
3334 new_Cloog_Domain_from_ppl_Pointset_Powerset, ppl_set_coef_gmp,
3335 ppl_insert_dimensions_pointset, ppl_insert_dimensions_pointset,
3336 ppl_strip_loop, ppl_strip_loop, ppl_print_polyhedron_matrix,
3337 ppl_print_powerset_matrix, debug_ppl_polyhedron_matrix,
3338 debug_ppl_powerset_matrix, ppl_read_polyhedron_matrix): Dito.
3339 * graphite-ppl.h (ppl_Pointset_Powerset_C_Polyhedron_t,
3340 new_C_Polyhedron_from_Cloog_Matrix, ppl_print_powerset_matrix,
3341 debug_ppl_powerset_matrix, ppl_insert_dimensions_pointset): Dito.
3342 * graphite-sese-to-poly.c (build_pbb_scattering_polyhedrons,
3343 build_loop_iteration_domains, ppl_constraint_type_from_tree_code,
3344 add_condition_to_domain, add_condition_to_pbb, build_scop_context,
3345 build_scop_iteration_domain, build_poly_dr): Dito
3347 2009-07-09 Sebastian Pop <sebastian.pop@amd.com>
3349 * gcc.dg/graphite/graphite.exp: Added a rule to execute
3351 * gcc.dg/graphite/run-id-1.c: New.
3353 2009-07-09 Sebastian Pop <sebastian.pop@amd.com>
3355 * graphite-sese-to-poly.c (build_loop_iteration_domains): Add the
3356 positivity constraint on the symbolic number of iterations.
3358 2009-07-09 Sebastian Pop <sebastian.pop@amd.com>
3360 * graphite-sese-to-poly.c (build_loop_iteration_domains): Rewrite.
3362 2009-07-09 Sebastian Pop <sebastian.pop@amd.com>
3363 Tobias Grosser <grosser@fim.uni-passau.de>
3365 * graphite-clast-to-gimple.c (build_scop_context): Removed.
3366 (build_cloog_prog): Directly use SCOP_CONTEXT.
3367 * graphite-poly.c (new_scop): Initialize SCOP_CONTEXT.
3368 (free_scop): Free SCOP_CONTEXT.
3369 (print_scop_context): New.
3370 (print_scop): Call print_scop_context.
3371 (debug_scop_context): New.
3372 * graphite-poly.h (print_scop_context, debug_scop_context): Declared.
3373 (struct scop): Added field context.
3374 (SCOP_CONTEXT): New.
3375 * graphite-sese-to-poly.c (add_param_constraints): New.
3376 (build_scop_context): New.
3377 (build_poly_scop): Call build_scop_context.
3379 2009-07-09 Sebastian Pop <sebastian.pop@amd.com>
3381 * graphite-clast-to-gimple.c (gmp_cst_to_tree): Moved...
3382 * graphite-ppl.c (ppl_set_inhomogeneous_gmp, ppl_set_coef_gmp): New.
3383 (ppl_set_inhomogeneous, ppl_set_coef): Moved...
3384 * graphite-ppl.h: Include double-int.h and tree.h.
3385 (ppl_set_inhomogeneous_gmp, ppl_set_coef_gmp): Declared.
3386 (ppl_set_inhomogeneous, ppl_set_coef): ...here.
3387 (gmp_cst_to_tree): ...here. Reimplemented using mpz_get_double_int.
3388 (tree_int_to_gmp, ppl_set_inhomogeneous_tree, ppl_set_coef_tree): New.
3390 2009-07-09 Sebastian Pop <sebastian.pop@amd.com>
3392 * graphite-clast-to-gimple.c (clast_to_gcc_expression_red): Generate
3393 POINTER_PLUS_EXPR for pointer types.
3394 (clast_to_gcc_expression): Same.
3396 2009-07-09 Sebastian Pop <sebastian.pop@amd.com>
3398 * graphite-poly.c (print_scattering_function): Early return when
3399 PBB_TRANSFORMED_SCATTERING is not initialized.
3400 (print_pbb_domain): Early return when PBB_DOMAIN is not initialized.
3402 2009-07-08 Sebastian Pop <sebastian.pop@amd.com>
3404 * tree-parloops.c (analyze_reduction_list): Remove unused variable
3407 2009-07-08 Razya Ladelsky <razya@il.ibm.com>
3409 * tree-parloops.c (analyze_reduction_list): Change return
3411 (try_create_reduction_list): Move the call to
3412 analyze_reduction_list to the beginining.
3413 Call reduction_phi with analyzed_reductions as argument
3414 instead of reduction_list.
3416 2009-07-08 Tobias Grosser <grosser@fim.uni-passau.de>
3418 * Merge from mainline (r148296:149346)
3420 2009-07-07 Sebastian Pop <sebastian.pop@amd.com>
3422 * graphite-scop-detection.c (graphite_can_represent_init): New.
3423 (graphite_can_represent_scev): Call graphite_can_represent_init:
3424 check that the initial value does not contain multiplications of
3426 (stmt_has_simple_data_refs_p): New.
3427 (stmt_simple_for_scop_p): Call stmt_simple_for_scop_p.
3428 (is_simple_operand): Fix formatting.
3429 * graphite-sese-to-poly.c (try_generate_gimple_bb): Fix formatting.
3431 2009-07-07 Sebastian Pop <sebastian.pop@amd.com>
3433 * gcc.dg/graphite/id-13.c: New.
3434 * graphite-sese-to-poly.c (graphite_stmt_p): Do not call
3435 analyze_scalar_evolution, use scalar_evolution_in_region.
3436 (scan_tree_for_params_right_scev): Add extra assert.
3437 (parameter_index_in_region_1): Split from parameter_index_in_region.
3438 (idx_record_params): Use scalar_evolution_in_region.
3439 (find_params_in_bb): Same.
3440 (find_scop_parameters): Same.
3441 (build_loop_iteration_domains): Same.
3442 (create_linear_expr_from_tree): Same.
3443 * sese.c (scalar_evolution_in_region): New.
3444 * sese.h (scalar_evolution_in_region): Declared.
3445 (defined_in_sese_p): New.
3446 * tree-scalar-evolution.c (compute_overall_effect_of_inner_loop): Not
3448 * tree-scalar-evolution.h (compute_overall_effect_of_inner_loop):
3451 2009-07-07 Sebastian Pop <sebastian.pop@amd.com>
3453 * Makefile.in: Replace dependences on tree-chrec.h with SCEV_H.
3454 TREE_DATA_REF_H also implies SCEV_H.
3456 2009-07-07 Sebastian Pop <sebastian.pop@amd.com>
3458 * graphite-poly.c (print_scop_params): New.
3459 (print_scop): Call print_scop_params.
3460 (debug_scop_params): New.
3461 * graphite-poly.h (print_scop_params, debug_scop_params): Declared.
3463 2009-07-07 Li Feng <nemokingdom@gmail.com>
3465 * gcc.dg/graphite/graphite_autopar/force-parallel-4.c: New.
3466 * gcc.dg/graphite/graphite_autopar/force-parallel-5.c: New.
3467 * gcc.dg/graphite/graphite_autopar/force-parallel-6.c: New.
3468 * gcc.dg/graphite/graphite_autopar/force-parallel-7.c: New.
3469 * gcc.dg/graphite/graphite_autopar/force-parallel-8.c: New.
3470 * gcc.dg/graphite/graphite_autopar/force-parallel-9.c: New.
3472 2009-07-07 Li Feng <nemokingdom@gmail.com>
3474 * graphite-clast-to-gimple.c (mark_loops_parallel): Dump information
3475 for dependency checking part.
3476 * gcc.dg/graphite/graphite_autopar/force-parallel-1.c: Add
3477 tests for dependency checking.
3478 * gcc.dg/graphite/graphite_autopar/force-parallel-2.c: Ditto.
3479 * gcc.dg/graphite/graphite_autopar/force-parallel-3.c: Ditto.
3480 * gcc.dg/graphite/graphite_autopar/graphite_autopar.exp: Add
3481 flag -fdump-tree-graphite-all for autopar testsuites.
3483 2009-07-06 Sebastian Pop <sebastian.pop@amd.com>
3485 * Makefile.in (tree-ssa-loop-manip.o): Depends on langhooks.h.
3486 * tree-parloops.c (rewrite_phi_with_iv, rewrite_all_phi_nodes_with_iv,
3487 canonicalize_loop_ivs): Moved...
3488 * tree-ssa-loop-manip.c: ... here. Include langhooks.h.
3490 2009-07-06 Sebastian Pop <sebastian.pop@amd.com>
3492 * tree-parloops.c (try_create_reduction_list): Pass an extra
3493 argument analyzed_reductions. Call analyze_reduction_list.
3494 (gen_parallel_loop): Do not call analyze_reduction_list.
3495 (parallelize_loops): Init and finalize analyzed_reductions.
3497 2009-07-06 Li Feng <nemokingdom@gmail.com>
3499 * gcc.dg/graphite/graphite_autopar/graphite_autopar.exp:
3500 Added flag -fno-loop-strip-mine for autopar testcase.
3502 2009-07-04 Li Feng <nemokingdom@gmail.com>
3504 * graphite-dependences.c (graphite_carried_dependence_level_k): Use
3505 transformed scattering dimension instead of unmatch orignal when
3506 calling dependence_polyhedron.
3508 2009-06-30 Sebastian Pop <sebastian.pop@amd.com>
3510 * opts.c (decode_options): Enable flag_loop_strip_mine at -O2.
3512 2009-06-30 Sebastian Pop <sebastian.pop@amd.com>
3514 * graphite-poly.c (pbb_number_of_iterations): Check for returned
3515 value 1 from ppl_Pointset_Powerset_NNC_Polyhedron_maximize.
3517 2009-06-30 Sebastian Pop <sebastian.pop@amd.com>
3519 * graphite-blocking.c (pbb_strip_mine_profitable_p): New.
3520 (pbb_do_strip_mine): Call pbb_strip_mine_profitable_p.
3521 * graphite-poly.c (pbb_number_of_iterations): New.
3522 * graphite-poly.h (pbb_number_of_iterations): Declared.
3523 (pbb_iterator_dim, pbb_parameter_dim): New.
3525 2009-06-29 Sebastian Pop <sebastian.pop@amd.com>
3527 * graphite-clast-to-gimple.c (graphite_create_new_loop): Revert the
3528 last commit on type of lower and upper bound of loops.
3530 2009-06-29 Li Feng <nemokingdom@gmail.com>
3532 * Makefile.in (graphite-clast-to-gimple.o): Added dependence on
3533 graphite-dependences.h.
3534 * graphite-clast-to-gimple.c (new_bb_pbb_def): New.
3535 (mark_bb_with_pbb): New.
3536 (get_stmtfor_depth): New.
3537 (find_pbb_via_hash): New.
3538 (dependency_in_loop_p): New.
3539 (mark_loops_parallel): New.
3540 (free_aux_in_new_loops): New.
3541 (translate_clast): Add parameter BB_PBB_MAPPING. Mark newly created
3542 bb with it's relevant pbb. Mark newly created loops. Remove mark
3543 innermost loop parallel without checking.
3544 (gloog): Add parameter BB_PBB_MAPPING.
3545 * graphite-clast-to-gimple.h (struct bb_pbb_def): New.
3546 (gloog): Change declaration.
3547 (mark_loop_parallel): Make extern.
3548 (free_aux_in_new_loops): Declare.
3549 (bb_pbb_map_hash): New.
3550 (eq_bb_pbb_map): New.
3551 * graphite.c (graphite_transform_loops): Added BB_PBB_MAPPING. Trigger
3552 auto parallelization when flag_graphite_force_parallel is set.
3553 (graphite_finalize): Added free_aux_in_new_loops.
3554 * tree-parloops.c (parallelize_loops): Only generate parallel code for
3555 the innermost loop that marked parallel. Use
3556 flag_graphite_force_parallel instead of loop->can_be_parallel.
3557 (loop_parallel_p): Move inner most checking out of function.
3559 2009-06-26 Sebastian Pop <sebastian.pop@amd.com>
3561 * graphite-clast-to-gimple.c (graphite_create_new_loop): Make the
3562 type of lower and upper bound of loops signed long int.
3564 2009-06-26 Sebastian Pop <sebastian.pop@amd.com>
3566 * cfgloopmanip.c (create_empty_loop_on_edge): Gimplify the loop exit
3567 expression outside the loop.
3569 2009-06-26 Sebastian Pop <sebastian.pop@amd.com>
3571 * gcc.dg/graphite/interchange-8.c: New.
3573 2009-06-26 Sebastian Pop <sebastian.pop@amd.com>
3575 * gcc.dg/graphite/interchange-0.c: XFailed.
3576 * gcc.dg/graphite/interchange-5.c: XFailed.
3577 * gcc.dg/graphite/interchange-6.c: XFailed.
3579 2009-06-26 Sebastian Pop <sebastian.pop@amd.com>
3581 * graphite-interchange.c (compute_array_size_poly): The end of the
3582 recursion should return 1.
3584 2009-06-26 Sebastian Pop <sebastian.pop@amd.com>
3586 * graphite-interchange.c (compute_array_size_cstr): Allow the
3587 subscript multiplier to be -1.
3588 (compute_array_size): Use PDR_DATA_CONTAINER and not PDR_ACCESSES.
3589 * graphite-poly.c (new_poly_dr): Takes an extra argument for the
3590 data_container. Initializes PDR_DATA_CONTAINER.
3591 (print_pdr_access_layout): New.
3592 (print_pdr): Call print_pdr_access_layout. Print PDR_DATA_CONTAINER.
3593 * graphite-poly.h (struct poly_dr): Adjust comment. Add a new field
3595 (PDR_DATA_CONTAINER): New.
3596 (new_poly_dr): Update declaration.
3597 * graphite-sese-to-poly.c (pdr_add_data_dimensions): New.
3598 (build_poly_dr): Call pdr_add_data_dimensions.
3600 2009-06-26 Sebastian Pop <sebastian.pop@amd.com>
3602 * graphite-poly.h (struct poly_dr): Fix comment.
3603 * graphite-sese-to-poly.c (pdr_add_alias_set): New.
3604 (pdr_add_memory_accesses): New.
3605 (build_poly_dr): Call pdr_add_memory_accesses and pdr_add_alias_set.
3607 2009-06-26 Sebastian Pop <sebastian.pop@amd.com>
3609 * graphite-poly.c (print_pdrs, debug_pdrs): New.
3610 (print_pbb): Add call to print_pdrs.
3611 * graphite-poly.h (print_pdrs, debug_pdrs): Declared.
3613 2009-06-24 Konrad Trifunovic <konrad.trifunovic@gmail.com>
3614 Li Feng <nemokingdom@gmail.com>
3616 * graphite-dependences.c (graphite_carried_dependence_level_k): New.
3617 (dependency_between_pbbs_p): New.
3618 (lexicographically_gt_p): Assure !empty_p before polyhedron
3619 intersection assign.
3620 (build_lexicographically_gt_constraint): Correct lexicographically
3622 * graphite-dependences.h: New.
3623 * Makefile.in (graphite-dependences.o): Add graphite-dependences.h.
3625 2009-06-24 Sebastian Pop <sebastian.pop@amd.com>
3627 * graphite-clast-to-gimple.c (print_clast_stmt): New.
3628 (gloog): Print to dump_file the generated clast.
3629 * graphite-clast-to-gimple.h (print_clast_stmt): Declared.
3630 * graphite-interchange.c (pbb_do_interchange): Fix dump formatting.
3632 2009-06-24 Sebastian Pop <sebastian.pop@amd.com>
3634 * graphite-poly.c (extend_scattering): Increment
3635 PBB_NB_LOCAL_VARIABLES by the number of added dimensions.
3637 2009-06-24 Sebastian Pop <sebastian.pop@amd.com>
3639 * graphite-interchange.c (compute_array_size_poly): Added exit of
3640 recursion condition. Continue iterating even after the first equality.
3641 (compute_array_size): Same.
3643 2009-06-24 Li Feng <nemokingdom@gmail.com>
3645 * gcc.dg/graphite/graphite_autopar/force-parallel-1.c: Update
3646 -fdump-tree-final_cleanup to -fdump-tree-optimized.
3647 * gcc.dg/graphite/graphite_autopar/force-parallel-2.c: Ditto.
3648 * gcc.dg/graphite/graphite_autopar/force-parallel-3.c: Ditto.
3649 * gcc.dg/graphite/graphite_autopar/graphite_autopar.exp: Ditto.
3651 2009-06-23 Sebastian Pop <sebastian.pop@amd.com>
3653 * sese.c (expand_scalar_variables_stmt): Expand scalar variables
3654 only when the use verifies is_gimple_reg.
3656 2009-06-23 Sebastian Pop <sebastian.pop@amd.com>
3658 * graphite-clast-to-gimple.c (build_cloog_prog): Fix memory corruption.
3659 Allocate scaldims after call to unify_scattering_dimensions.
3661 2009-06-23 Sebastian Pop <sebastian.pop@amd.com>
3663 * graphite-clast-to-gimple.c (translate_clast): Fix memory leak.
3665 2009-06-23 Sebastian Pop <sebastian.pop@amd.com>
3666 Albert Cohen <albert.cohen@inria.fr>
3668 * graphite-blocking.c (pbb_strip_mine_loop_depth): Do not use local
3669 variables for the strip mining.
3671 2009-06-23 Sebastian Pop <sebastian.pop@amd.com>
3672 Pranav Garg <pranav.garg2107@gmail.com>
3674 * Makefile.in (OBJS-common): Added graphite-blocking.o.
3675 (graphite-sese-to-poly.o): Moved down to be in lexicographical order.
3676 (graphite-blocking.o): New rule.
3677 (graphite-poly.o, graphite-ppl.o): Moved to be in lexicographical order.
3678 * graphite-blocking.c: New.
3679 * graphite-poly.c (apply_poly_transforms): Call scop_do_strip_mine for
3680 flag_loop_strip_mine.
3681 (psct_scattering_dim_for_loop_depth): New.
3682 * graphite-poly.h (scop_do_strip_mine): Declared.
3683 (psct_add_local_variable): Increment PBB_NB_LOCAL_VARIABLES.
3684 * tree-ssa-loop.c (gate_graphite_transforms): Do not fail when using
3685 flag_loop_strip_mine.
3687 2009-06-23 Sebastian Pop <sebastian.pop@amd.com>
3689 * graphite-poly.c (extend_scattering): Avoid initializing and freeing
3690 a GMP value and a PPL coefficient at each iteration of a loop.
3692 2009-06-23 Sebastian Pop <sebastian.pop@amd.com>
3694 * graphite-dependences.c (dependence_polyhedron): Do not use
3695 pbb_nb_scattering_dims anymore. Use pbb_nb_scattering_orig and
3696 pbb_nb_scattering_transform.
3697 (graphite_legal_transform_dr): Same.
3698 * graphite-poly.c (extend_scattering): Same.
3699 (unify_scattering_dimensions): Same.
3700 (print_scattering_function): Same.
3701 (new_poly_bb): Initialize PBB_NB_SCATTERING_TRANSFORM and
3702 PBB_NB_LOCAL_VARIABLES.
3703 * graphite-poly.h (pbb_nb_scattering): Removed declaration.
3704 (struct poly_bb): Added nb_local_variables and nb_scattering_transform.
3705 (PBB_NB_LOCAL_VARIABLES, PBB_NB_SCATTERING_TRANSFORM): New.
3706 (pbb_nb_scattering_orig, pbb_nb_scattering_transform): New.
3707 (pbb_nb_scattering_dims, pbb_nb_scattering): Removed.
3708 (pbb_nb_scattering_transform): New.
3709 (pbb_nb_local_vars): Return PBB_NB_LOCAL_VARIABLES.
3710 (psco_scattering_dim): Add assert on parameters.
3711 (psct_scattering_dim): Same.
3712 (psct_scattering_dim_for_loop_depth): Declared.
3713 (psct_local_var_dim): New.
3714 (psco_iterator_dim, psco_parameter_dim): Add assert on parameters.
3715 (psct_iterator_dim, psct_parameter_dim): Same. To maintain the
3716 correct layout, call pbb_nb_local_vars.
3717 (psct_add_local_variable, psct_add_scattering_dimension): New.
3718 * graphite-sese-to-poly.c (build_pbb_scattering_polyhedrons):
3719 Initialize PBB_NB_SCATTERING_TRANSFORM.
3721 2009-06-23 Sebastian Pop <sebastian.pop@amd.com>
3723 * graphite-ppl.c (set_inhomogeneous): Renamed ppl_set_inhomogeneous.
3724 (set_coef): Renamed ppl_set_coef.
3725 * graphite-ppl.h (ppl_set_inhomogeneous, ppl_set_coef): Declared.
3727 2009-06-23 Sebastian Pop <sebastian.pop@amd.com>
3729 * graphite-dependences.c (build_pairwise_scheduling_inequality): Don't
3730 test a boolean against 1.
3731 * graphite-interchange.c (pbb_interchange_loop_depths): Do not build
3732 a new polyhedron for the PBB_TRANSFORMED_SCATTERING.
3733 (pbb_do_interchange): Returns true when a transform has been performed.
3734 (scop_do_interchange): Same.
3735 * graphite-poly.c (apply_poly_transforms): Use the return value of
3736 scop_do_interchange.
3737 * graphite-poly.h (scop_do_interchange): Update declaration.
3739 2009-06-23 Tobias Grosser <grosser@fim.uni-passau.de>
3741 * graphite-clast-to-gimple.c (gloog): Reset loop->aux right
3743 * sese.c (sese_reset_aux_in_loops): New.
3744 * sese.h (sese_reset_aux_in_loops): New.
3746 2009-06-19 Sebastian Pop <sebastian.pop@amd.com>
3748 * graphite-sese-to-poly.c (scan_tree_for_params_int): Pass in the
3749 multiplier and multiply the constant by the multiplier.
3750 (scan_tree_for_params): Bound the multiplier to its MULT_EXPR.
3751 (build_poly_dr): Do not use the multiplier to define the subscript.
3753 2009-06-19 Sebastian Pop <sebastian.pop@amd.com>
3755 * graphite-poly.c (new_poly_dr): Pass an extra argument for the
3756 compiler's data reference. Initialize PDR_CDR.
3757 (print_pdr): Call dump_data_reference.
3758 * graphite-poly.h (struct poly_dr): Rename black_box into pbb.
3759 Add compiler_dr field.
3760 (PDR_BB): Renamed PDR_PBB.
3762 * graphite-sese-to-poly.c (build_poly_dr): Pass to new_poly_dr
3763 GCC's data reference representation.
3764 * tree-data-ref.c (debug_data_references, debug_data_reference): New.
3765 * tree-data-ref.h (debug_data_references, debug_data_reference): Decl.
3767 2009-06-19 Sebastian Pop <sebastian.pop@amd.com>
3769 * graphite-poly.c (print_scattering_function): Also print the layout.
3770 * graphite-poly.h (pbb_nb_local_vars): New.
3772 2009-06-19 Sebastian Pop <sebastian.pop@amd.com>
3774 * graphite-poly.c (print_pbb_domain): Also print the layout names.
3776 2009-06-19 Sebastian Pop <sebastian.pop@amd.com>
3778 * graphite-poly.c (print_pdr, debug_pdr): New.
3779 * graphite-poly.h (print_pdr, debug_pdr): Declared.
3780 (PDR_BASE): Removed.
3782 2009-06-18 Sebastian Pop <sebastian.pop@amd.com>
3784 * gcc.dg/graphite/interchange-{1..7}.c: New avatars of
3787 2009-06-18 Sebastian Pop <sebastian.pop@amd.com>
3789 * graphite-interchange.c (compute_subscript): Allow also -1 in the
3790 subscript identification column.
3791 (pbb_do_interchange): Print to dump_file that some loops "will be
3792 interchanged". Rely on that chain of characters in the testcases.
3793 * gcc.dg/graphite/interchange-0.c: New.
3794 * gcc.dg/graphite/graphite.exp: Iterate over the testsuite
3795 interchange-*.c files and compile them with -floop-interchange.
3797 2009-06-18 Pranav Garg <pranav.garg2107@gmail.com>
3799 * graphite-interchange.c (interchange_profitable_p): Renamed
3800 pbb_interchange_profitable_p.
3802 2009-06-18 Sebastian Pop <sebastian.pop@amd.com>
3803 Harsha Jagasia <harsha.jagasia@amd.com>
3804 Pranav Garg <pranav.garg2107@gmail.com>
3806 * graphite-interchange.c (interchange_profitable_p): Make static.
3807 (pbb_interchange_loop_depths, pbb_do_interchange,
3808 scop_do_interchange): New.
3809 * graphite-poly.c (apply_poly_transforms): Call scop_do_interchange
3810 for flag_loop_interchange.
3811 * graphite-poly.h (scop_do_interchange): Declared.
3812 * tree-ssa-loop.c (gate_graphite_transforms): Do not fail when
3813 flag_loop_interchange is used.
3815 2009-06-18 Sebastian Pop <sebastian.pop@amd.com>
3817 * graphite-dependences.c (dependence_polyhedron): Update use of
3818 pbb_nb_scattering_dims.
3819 * graphite-poly.h (pbb_nb_scattering_dims): Do not pass SCOP.
3820 (pbb_nb_scattering): Update use of pbb_nb_scattering_dims.
3821 (psco_scattering_dim, psct_scattering_dim, psco_iterator_dim,
3822 psct_iterator_dim, psco_parameter_dim, psct_parameter_dim): New.
3824 2009-06-16 Sebastian Pop <sebastian.pop@amd.com>
3826 * graphite.c: Cleanup foo.
3828 2009-06-16 Sebastian Pop <sebastian.pop@amd.com>
3830 * Merge from mainline (r143684:148293).
3831 * Disabled libpcp until it gets fixed.
3833 2009-06-05 Sebastian Pop <sebastian.pop@amd.com>
3834 Harsha Jagasia <harsha.jagasia@amd.com>
3836 * graphite-interchange.c: New.
3837 * Makefile.in (graphite-interchange.o): New.
3838 * graphite-poly.h (interchange_profitable_p): Declared.
3839 * graphite-ppl.h (value_max): New.
3841 2009-06-04 Sebastian Pop <sebastian.pop@amd.com>
3843 * graphite-dependences.c (dependence_polyhedron): Use pdr_dim.
3844 * graphite-poly.h: Fix some comments.
3848 2009-06-04 Sebastian Pop <sebastian.pop@amd.com>
3851 (pdr_accessp_nb_subscripts): Renamed pdr_nb_subscripts.
3852 (pdr_accessp_nb_iterators): Renamed pdr_dim_iter_domain.
3853 (pdr_accessp_nb_params): Renamed pdr_nb_params.
3854 (pdr_accessp_alias_set_dim): Renamed pdr_alias_set_dim.
3855 (pdr_accessp_subscript_dim): Renamed pdr_subscript_dim.
3856 (pdr_accessp_iterator_dim): Renamed pdr_iterator_dim.
3857 (pdr_accessp_param_dim): Renamed pdr_parameter_dim.
3858 (pbb_nb_loops): Renamed pbb_dim_iter_domain.
3859 * graphite-clast-to-gimple.c: Same.
3860 * graphite-dependences.c: Same.
3861 * graphite-poly.c: Same.
3862 * graphite-sese-to-poly.c: Same.
3864 2009-06-03 Sebastian Pop <sebastian.pop@amd.com>
3866 * graphite-clast-to-gimple.c (build_iv_mapping): Insert full
3867 expressions for an IV rename, as returned by clast_to_gcc_expression.
3868 (copy_renames): Rename new_name to expr.
3869 * sese.c (debug_rename_elt): Same.
3872 (sese_adjust_liveout_phis): Call force_gimple_operand before using
3873 the information from the rename map.
3874 (rename_variables_in_stmt): Same.
3875 (add_loop_exit_phis): Rename new_name to expr.
3876 (insert_loop_close_phis): Same.
3877 (add_guard_exit_phis): Same. Call force_gimple_operand.
3878 * sese.h (struct rename_map_elt): Rename new_name to expr.
3879 (new_rename_map_elt): Same.
3881 2009-06-03 Sebastian Pop <sebastian.pop@amd.com>
3883 * graphite-clast-to-gimple.c (build_iv_mapping): Use set_rename.
3884 * sese.c (set_rename): Make it extern.
3885 * sese.h (set_rename): Declared.
3887 2009-06-03 Sebastian Pop <sebastian.pop@amd.com>
3889 * graphite-poly.c (extend_scattering): Free values.
3890 * graphite-ppl.c (new_Cloog_Domain_from_ppl_Pointset_Powerset):
3892 (ppl_print_powerset_matrix): Same.
3893 * graphite-scop-detection.c (free_scops_1): New.
3894 (limit_scops): Call free_scops_1.
3895 * graphite-sese-to-poly.c (build_scop_bbs_1): Free dom.
3896 (build_poly_dr): Free PPL coefficients.
3897 * tree-parloops.c (rewrite_all_phi_nodes_with_iv): Free bbs.
3899 2009-06-02 Sebastian Pop <sebastian.pop@amd.com>
3901 * graphite-dependences.c: New.
3902 * graphite-data-ref.c: Removed.
3903 * graphite-data-ref.h: Removed.
3904 * Makefile.in (graphite-data-ref.o): Removed.
3905 (graphite-dependences.o): Added.
3906 * graphite-clast-to-gimple.c: Remove dependence on graphite-data-ref.h.
3907 * graphite-poly.c: Same.
3908 Move the data dependence testing to graphite-dependences.c.
3910 2009-05-19 Tobias Grosser <grosser@fim.uni-passau.de>
3912 * graphite-scop-detection.c (graphite_can_represent_loop): Renamed
3913 from graphite_cannot_represent_loop. Code refactored.
3914 (scopdet_basic_block_info): Call graphite_can_represent_loop.
3916 2009-05-17 Li Feng <nemokingdom@gmail.com>
3918 * gcc.dg/graphite/graphite_autopar/graphite_autopar.exp:
3919 Cover all the testcases (not only the filtered ones).
3921 2009-05-17 Tobias Grosser <grosser@fim.uni-passau.de>
3923 * graphite-scop-detection.c (stmt_simple_for_scop_p): Remove
3924 unnecessary check. Update comments. Move check for REAL_TYPE here.
3925 (harmful_stmt_in_bb): Remove checks for conditions. This is already
3926 done in (stmt_simple_for_scop_p).
3928 2009-05-14 Tobias Grosser <grosser@fim.uni-passau.de>
3930 * graphite.c (print_global_statistics): New.
3931 (print_graphite_scop_statistic): New.
3932 (print_graphite_statistics): New.
3933 (graphite_initialize, graphite_transform_loops): Print statistics.
3934 * graphite-scop-detection (build_scops): Print statistics.
3935 (print_graphite_scop_statistics): New.
3936 (print_graphite_statistics): New.
3938 2009-05-13 Sebastian Pop <sebastian.pop@amd.com>
3940 * graphite-clast-to-gimple.c (struct clast_name_index): Removed.
3941 (debug_clast_name_index): Removed.
3942 (debug_clast_name_indexes_1): Removed.
3943 (debug_clast_name_indexes): Removed.
3944 (clast_name_index_elt_info): Removed.
3945 (eq_clast_name_indexes): Removed.
3946 (clast_name_to_index): Removed.
3947 (new_clast_name_index): Removed.
3948 (save_clast_name_index): Removed.
3949 (save_var_name): Moved...
3950 (init_sese_params_index): Removed.
3951 (clast_name_to_gcc): Remove use of name_tree.
3952 (initialize_cloog_names): Same.
3953 (gloog): Do not call init_sese_params_index.
3954 * graphite-sese-to-poly.c (save_var_name): ...here.
3955 (parameter_index_in_region): New.
3956 * sese.c (new_sese): Initialize SESE_PARAMS_NAMES.
3957 (parameter_index_in_region): Removed.
3958 (is_parameter): Remove use of name_tree.
3959 * sese.h (struct name_tree): Removed.
3960 (struct sese): Remove use of name_tree. New field params_names.
3961 (SESE_PARAMS_NAMES): New.
3962 (SESE_PARAMS): Remove duplicate.
3963 (parameter_index_in_region): Removed.
3964 (sese_nb_params): Remove use of name_tree.
3965 (struct clast_name_index): New.
3966 (new_clast_name_index): New.
3967 (clast_name_to_index): New.
3968 (save_clast_name_index): New.
3969 (debug_clast_name_index): New.
3970 (debug_clast_name_indexes_1): New.
3971 (debug_clast_name_indexes): New.
3972 (clast_name_index_elt_info): New.
3973 (eq_clast_name_indexes): New.
3975 2009-05-13 Sebastian Pop <sebastian.pop@amd.com>
3977 * graphite-clast-to-gimple.c (compute_cloog_iv_types_1): Call
3978 pbb_to_depth_to_oldiv. Remove call to oldiv_for_loop.
3979 (graphite_loop_normal_form): Do not pass region. Do not
3980 initialize SESE_OLDIVS.
3981 (build_graphite_loop_normal_form): Update call to
3982 graphite_loop_normal_form.
3983 * sese.c (debug_oldivs): Removed.
3984 (new_sese): Do not initialize SESE_OLDIVS.
3985 (free_sese): Do not free SESE_OLDIVS.
3986 (oldiv_for_loop): Removed.
3987 * sese.h (struct sese): Remove old_ivs.
3988 (SESE_OLDIVS): Removed.
3989 (oldiv_for_loop): Removed.
3991 2009-05-13 Sebastian Pop <sebastian.pop@amd.com>
3993 * graphite-clast-to-gimple.c (clast_name_to_gcc): Pass newivs,
3994 remove ivstack. Remove call to loop_iv_stack_get_iv_from_name,
3995 replaced by a call to newivs_to_depth_to_newiv.
3996 (clast_to_gcc_expression): Pass newivs, remove ivstack.
3997 (clast_to_gcc_expression_red): Same.
3998 (gcc_type_for_clast_expr): Same.
3999 (gcc_type_for_clast_eq): Same.
4000 (graphite_translate_clast_equation): Same.
4001 (graphite_create_guard_cond_expr): Same.
4002 (graphite_create_new_guard): Same.
4003 (graphite_create_new_loop): Same.
4004 (build_iv_mapping): Same.
4005 (translate_clast): Same.
4007 (loop_iv_stack_patch_for_consts): Removed. *
4008 sese.c (iv_stack_entry_is_constant): Removed.
4009 (iv_stack_entry_is_iv): Removed.
4010 (loop_iv_stack_push_iv): Removed.
4011 (loop_iv_stack_insert_constant): Removed.
4012 (loop_iv_stack_pop): Removed.
4013 (loop_iv_stack_get_iv): Removed.
4014 (loop_iv_stack_get_iv_from_name): Removed.
4015 (debug_loop_iv_stack): Removed.
4016 (free_loop_iv_stack): Removed.
4017 (loop_iv_stack_remove_constants): Removed. *
4018 sese.h (iv_stack_entry_kind): Removed.
4019 (iv_stack_entry_data_union): Removed.
4020 (iv_stack_entry_struct): Removed.
4021 (iv_stack_entry_p): Removed.
4022 (debug_oldivs, debug_loop_iv_stack, loop_iv_stack_insert_constant,
4023 loop_iv_stack_get_iv_from_name, loop_iv_stack_push_iv,
4024 loop_iv_stack_get_iv, loop_iv_stack_remove_constants,
4025 loop_iv_stack_pop, free_loop_iv_stack): Removed.
4026 (gbb_loop_at_index): Fix indenting.
4027 (gbb_loop_index): Removed.
4029 2009-05-13 Sebastian Pop <sebastian.pop@amd.com>
4031 * graphite-clast-to-gimple.c (clast_name_to_gcc): Do not use strcmp.
4032 Call clast_name_to_index.
4034 2009-05-13 Sebastian Pop <sebastian.pop@amd.com>
4036 * graphite-clast-to-gimple.c (clast_name_to_gcc): Pass region,
4037 do not pass params. Get params from SESE_PARAMS.
4038 (clast_to_gcc_expression): Same.
4039 (clast_to_gcc_expression_red): Same.
4040 (gcc_type_for_clast_eq): Same.
4041 (graphite_translate_clast_equation): Same.
4042 (graphite_create_new_loop): Same.
4043 * sese.c (rename_variables_in_stmt): Fix comment.
4045 2009-05-13 Sebastian Pop <sebastian.pop@amd.com>
4047 * graphite-clast-to-gimple.c (graphite_create_new_loop): Pass
4049 Call save_clast_name_index.
4050 (translate_clast): Pass newivs_index.
4051 (gloog): Create and free newivs_index.
4053 2009-05-13 Sebastian Pop <sebastian.pop@amd.com>
4055 * graphite-clast-to-gimple.c (clast_name_index): New structure.
4056 (clast_name_index_p): New type.
4057 (debug_clast_name_index): New.
4058 (debug_clast_name_indexes_1): New.
4059 (debug_clast_name_indexes): New.
4060 (clast_name_index_elt_info): New.
4061 (eq_clast_name_indexes): New.
4062 (clast_name_to_index): New.
4063 (new_clast_name_index): New.
4064 (save_clast_name_index): New.
4065 (init_sese_params_index): New.
4066 (gloog): Call init_sese_params_index.
4067 * graphite-clast-to-gimple.h (debug_clast_name_indexes): Declared.
4068 * sese.c (new_sese): Initialize SESE_PARAMS_INDEX.
4069 (free_sese): Free SESE_PARAMS_INDEX.
4070 * sese.h (struct sese): Add params_index.
4071 (SESE_PARAMS_INDEX): New.
4073 2009-05-13 Sebastian Pop <sebastian.pop@amd.com>
4075 * graphite-clast-to-gimple.c (newivs_to_depth_to_newiv): New.
4076 (graphite_create_new_loop): Pass the newivs vector. Push the
4077 newly created IV to newivs.
4078 (translate_clast): Pass the newivs vector.
4079 (gloog): Create and destroy the newivs vector.
4081 2009-05-13 Sebastian Pop <sebastian.pop@amd.com>
4083 * graphite-clast-to-gimple.c (pbb_to_depth_to_oldiv): New.
4084 (graphite_loop_normal_form): Initialize loop->aux with the unique
4085 IV that has been created.
4087 2009-05-13 Tobias Grosser <grosser@fim.uni-passau.de>
4089 * tree-chrec.c (evolution_function_right_is_integer_cst): Allow
4090 scev with parameters in the base part. They where forbidden
4093 2009-05-11 Li Feng <nemokingdom@gmail.com>
4095 * gcc.dg/graphite/graphite.exp: Set different default
4096 compile options by file names.
4097 * gcc.dg/graphite/block{0-6}.c: Remove dg-option line.
4098 * gcc.dg/graphite/id-{1-9}.c: Ditto.
4099 * gcc.dg/graphite/scop-{0-20}.c: Ditto.
4100 * gcc.dg/graphite/scop-matmult.c: Ditto.
4102 2009-05-08 Li Feng <nemokingdom@gmail.com>
4104 * gcc.dg/graphite/graphite_autopar/graphite_autopar.exp: New.
4105 * gcc.dg/graphite/graphite_autopar/force-parallel-1.c: New.
4106 * gcc.dg/graphite/graphite_autopar/force-parallel-2.c: New.
4107 * gcc.dg/graphite/graphite_autopar/force-parallel-3.c: New.
4109 2009-05-07 Tobias Grosser <grosser@fim.uni-passau.de>
4111 * graphite-scop-detection (build_scops_1): Fix little bug introduced
4114 2009-05-07 Tobias Grosser <grosser@fim.uni-passau.de>
4116 * graphite-scop-detection.c (graphite_can_represent_scev): Only
4117 allow integer constant strides.
4118 (graphite_can_represent_expr): Depend on outermost_loop.
4119 (stmt_simple_memref_p, graphite_cannot_represent_loop,
4120 harmful_stmt_in_bb, is_simple_operand, stmt_simple_for_scop_p,
4121 build_scops_1): Same.
4122 (scopdet_basic_block_info): Same and insert layered SCoP
4124 (try_generate_gimple_bb): Cleanup.
4125 (build_scops): Enable data references.
4127 * gcc.dg/graphite/id-5.c: New.
4128 * gcc.dg/graphite/id-9.c: New.
4129 * tree-chrec.c (evolution_function_right_is_integer_cst): New.
4130 * tree-chrec.h (evolution_function_right_is_integer_cst): New.
4132 2009-05-06 Tobias Grosser <grosser@fim.uni-passau.de>
4134 * sese.c (expand_scalar_variables_ssa_name): Only build expressions,
4135 that we have not yet built for this SCoP.
4137 2009-05-06 Tobias Grosser <grosser@fim.uni-passau.de>
4139 * sese.c (expand_scalar_variables_expr): Fix expand_scalar_variables
4140 for complex numbers.
4142 2009-05-06 Tobias Grosser <grosser@fim.uni-passau.de>
4144 * graphite-ppl.c: Fix build if cloog is not available.
4146 2009-05-04 Li Feng <nemokingdom@gmail.com>
4148 * tree-parloops.c (loop_parallel_p): Remove construction of
4149 NITER and REDUCTION_LIST.
4150 (try_get_loop_niter): New.
4151 (try_create_reduction_list): New.
4152 (parallelize_loops): Bypass the failed checkings in autopar
4153 when can_be_parallel in loop structure is set to true.
4155 2009-05-01 Tobias Grosser <grosser@fim.uni-passau.de>
4157 * gcc.dg/graphite/id-6.c: Update testcase.
4158 * gcc.dg/graphite/scop-3.c: Dito.
4160 2009-05-01 Tobias Grosser <grosser@fim.uni-passau.de>
4162 * graphite-scop-detection.c (stmt_simple_for_scop_p):
4163 Enable EQ_EXPR and NE_EXPR again.
4165 2009-04-30 Tobias Grosser <grosser@fim.uni-passau.de>
4167 * graphite-scop-detection.c (graphite_can_represent_scev):
4168 Add check if scev is affine multivariate.
4169 (harmful_stmt_in_bb): Check if we can represent the conditions.
4170 (scopdet_basic_block_info (basic_block bb, VEC): Pass the loop to
4172 * gcc.dg/graphite/id-7.c: New.
4174 2009-04-30 Tobias Grosser <grosser@fim.uni-passau.de>
4176 * graphite-sese-to-poly.c (bb_contains_non_iv_scalar_phi_nodes):
4177 Check all bbs in region, not only the bbs that are represented in
4179 (build_poly_scop): Add newline.
4180 * gcc.dg/graphite/id-8.c: New.
4182 2009-04-30 Li Feng <nemokingdom@gmail.com>
4184 * cfgloop.c (alloc_loop): Initialize can_be_parallel to false
4185 when loop initialize.
4186 * cfgloop.h (struct loop): Introduce flag can_be_parallel.
4187 * common.opt: Declare flag_graphite_force_parallel.
4188 * graphite-clast-to-gimple.c (translate_clast): Mark the innermost
4190 * graphite-poly.c (apply_poly_transforms): Introduce
4191 flag_graphite_force_parallel.
4192 * tree-ssa-loop.c (gate_graphite_transforms): ditto.
4193 * toplev.c (process_options): ditto and replace a not correctly
4196 2009-04-30 Li Feng <nemokingdom@gmail.com>
4198 * graphite-clast-to-gimple.c (loop_iv_stack_patch_for_consts):
4199 Change the call of gbb_loop_at_index and/or gbb_loop_index due
4200 to the redefinition.
4201 (compute_cloog_iv_types_1): ditto.
4202 (build_iv_mapping): ditto.
4203 * graphite-sese-to-poly.c (new_gimple_bb): Remove GBB_LOOPS related
4205 (free_gimple_bb): Removed GBB_LOOPS related free part.
4206 (build_bb_loops): Removed.
4207 * sese.h (struct gimple_bb): Removed loops.
4208 (GBB_LOOPS): Removed.
4209 (gbb_loop_at_index): Instead of using GBB_LOOPS, we use sese instead.
4210 (gbb_loop_index): ditto.
4212 2009-04-24 Tobias Grosser <grosser@fim.uni-passau.de>
4214 * graphite-scop-detection.c (graphite_can_represent_scev): Do not
4215 allow non constant strides.
4216 * gcc.dg/graphite/scop-20.c: New.
4218 2009-04-24 Sebastian Pop <sebastian.pop@amd.com>
4220 * graphite-scop-detection.c (dot_all_scops): Fix system call
4221 return value warning.
4224 2009-04-24 Sebastian Pop <sebastian.pop@amd.com>
4226 * gcc.dg/graphite/id-6.c: Fix pattern.
4227 * gcc.dg/graphite/scop-3.c: Same.
4229 2009-04-24 Sebastian Pop <sebastian.pop@amd.com>
4231 * graphite-poly.c (map_into_dep_poly, map_dr_into_dep_poly,
4232 build_pairwise_constraint, dr_equality_constraints,
4233 build_pairwise_scheduling_equality,
4234 build_pairwise_scheduling_inequality, lexicographically_gt_p,
4235 build_lexicographically_gt_constraint, dependence_polyhedron,
4236 graphite_legal_transform_dr, graphite_legal_transform_bb,
4237 graphite_legal_transform): New.
4238 * graphite-poly.h (graphite_legal_transform): Declared.
4239 * graphite-sese-to-poly.c (build_poly_scop): Call to
4240 graphite_legal_transform is disabled for the moment.
4242 2009-04-24 Sebastian Pop <sebastian.pop@amd.com>
4244 * graphite-poly.h (pbb_nb_scattering_dims): New.
4245 (pbb_nb_scattering): Use it.
4247 2009-04-24 Sebastian Pop <sebastian.pop@amd.com>
4249 * graphite-ppl.c (ppl_insert_dimensions_pointset): Add
4250 Pointset_Powerset version of ppl_insert_dimensions.
4251 * graphite-ppl.h (ppl_insert_dimensions_pointset): Declared.
4253 2009-04-24 Sebastian Pop <sebastian.pop@amd.com>
4255 * graphite-ppl.c (ppl_insert_dimensions): Fix formatting.
4257 2009-04-24 Sebastian Pop <sebastian.pop@amd.com>
4259 * graphite-poly.h: Fix comment.
4261 2009-04-24 Sebastian Pop <sebastian.pop@amd.com>
4263 * graphite-sese-to-poly.c (build_poly_dr): Fix data ref multiplier.
4265 2009-04-24 Tobias Grosser <grosser@fim.uni-passau.de>
4267 * sese.c (expand_scalar_variables_stmt): Only iterate over the old
4270 2009-04-24 Tobias Grosser <grosser@fim.uni-passau.de>
4272 * graphite-sese-to-poly.c (var_used_in_not_loop_header_phi_node): New.
4273 (graphite_stmt_p): Represent bbs necessary to build the phi nodes of
4276 2009-04-20 Sebastian Pop <sebastian.pop@amd.com>
4278 * graphite-scop-detection.c (stmt_simple_for_scop_p): Do not
4279 handle EQ_EXPR and NE_EXPR.
4281 2009-04-17 Tobias Grosser <grosser@fim.uni-passau.de>
4283 * graphite-poly.h (poly_dr): Fix comment.
4285 2009-04-09 Sebastian Pop <sebastian.pop@amd.com>
4286 Tobias Grosser <grosser@fim.uni-passau.de>
4288 * graphite-poly.c (new_poly_bb): Do not initialize PBB_DOMAIN
4289 with a zero dimension polyhedron.
4290 (find_scop_parameters): Move the call to scop_set_nb_params here.
4291 (build_loop_iteration_domains): Store in loop->aux the iteration
4293 (build_scop_iteration_domain): Fix PBB_DOMAIN for bbs not surrounded
4294 by any loop in scop.
4295 (build_poly_scop): Do not call scop_set_nb_params.
4297 2009-04-09 Sebastian Pop <sebastian.pop@amd.com>
4298 Tobias Grosser <grosser@fim.uni-passau.de>
4300 * graphite-sese-to-poly.c (add_condition_to_pbb): Pass code to
4301 add_condition_to_domain not GT_EXPR.
4303 2009-04-09 Tobias Grosser <grosser@fim.uni-passau.de>
4305 * graphite-ppl.c (debug_ppl_powerset_matrix): New.
4306 * graphite-ppl.h (debug_ppl_powerset_matrix): New.
4307 * graphite-sese-to-poly.c (add_condition_to_pbb): Use
4308 upper_bound_assign to calculate unions.
4309 * gcc.dg/graphite/id-6.c: New.
4311 2009-04-09 Tobias Grosser <grosser@fim.uni-passau.de>
4313 * graphite-scop-detection.c (canonicalize_loop_closed_ssa): Do not
4314 handle abnormal edges.
4316 2009-04-09 Tobias Grosser <grosser@fim.uni-passau.de>
4318 * graphite-poly.c (new_poly_dr, free_poly_dr): New.
4319 (free_poly_bb): Also free poly_drs.
4320 * graphite-poly.h (new_poly_dr, free_poly_dr): New.
4321 (poly_dr): Polyhedron to Pointset_Powerset.
4322 (pdr_accessp_nb_subscripts): Same.
4323 * graphite-sese-to-poly.c (build_poly_dr): Same. And actually build
4326 2009-04-08 Sebastian Pop <sebastian.pop@amd.com>
4328 * graphite-clast-to-gimple.c (initialize_cloog_names): Change cloog
4329 names into more meaningful names.
4331 2009-04-08 Sebastian Pop <sebastian.pop@amd.com>
4333 * gfortran.dg/graphite/interchange-1.c: New.
4334 * gfortran.dg/graphite/interchange-2.c: New.
4336 2009-04-08 Sebastian Pop <sebastian.pop@amd.com>
4338 * graphite-clast-to-gimple.c (graphite_loop_normal_form): Do not build
4340 * tree-parloops.c (rewrite_phi_with_iv): New.
4341 (rewrite_all_phi_nodes_with_iv): New.
4342 (canonicalize_loop_ivs): Call them.
4344 2009-04-08 Sebastian Pop <sebastian.pop@amd.com>
4346 * graphite-sese-to-poly.c (try_generate_gimple_bb): Use
4347 graphite_find_data_references_in_stmt.
4348 * tree-data-ref.c (graphite_find_data_references_in_stmt): New.
4349 * tree-data-ref.h (graphite_find_data_references_in_stmt): Declared.
4351 2009-04-08 Sebastian Pop <sebastian.pop@amd.com>
4353 * sese.c (add_loop_exit_phis): Don't fail on non SSA_NAME renames.
4355 2009-04-08 Sebastian Pop <sebastian.pop@amd.com>
4357 * graphite-sese-to-poly.c (build_scop_bbs_1): Use bb_in_sese_p
4358 instead of bb_in_region.
4359 (flag_bb_in_region): Same. Renamed flag_bb_in_sese.
4360 (build_sese_conditions): Use flag_bb_in_sese.
4361 * sese.c (register_bb_in_sese): Removed.
4362 (new_sese): Remove initialization of SESE_REGION_BBS.
4363 (free_sese): Do not free SESE_REGION_BBS.
4364 * sese.h (struct sese): Remove field region_basic_blocks.
4365 (SESE_REGION_BBS): Removed.
4366 (bb_in_sese_p): Implement in function of bb_in_region.
4368 2009-04-08 Sebastian Pop <sebastian.pop@amd.com>
4370 * graphite-scop-detection.c (limit_scops): Deal only with single exit
4373 2009-04-08 Tobias Grosser <grosser@fim.uni-passau.de>
4375 * graphite-scop-detection.c (stmt_simple_for_scop_p): Allow NE_EXPR
4377 * graphite-sese-to-poly.c (create_linear_expr_from_tree): New.
4378 (add_condition_to_domain): New.
4379 (add_condition_to_pbb): New.
4380 (add_conditions_to_domain): Cleanup and handle of NE_EXPR and EQ_EXPR.
4381 * gcc.dg/graphite/scop-3.c: Update number of detected SCoPs.
4383 2009-04-08 Tobias Grosser <grosser@fim.uni-passau.de>
4385 * graphite-clast-to-gimple.c (build_cloog_prog): ppl_Polyhedron ->
4386 ppl_Pointset_Powerset.
4387 * graphite-poly.c (new_poly_bb, free_poly_bb): Same.
4388 * graphite-poly.h (poly_bb): poly_bb.domain Same.
4389 (pbb_nb_loops): Same.
4390 * graphite-sese-to-poly.c (build_loop_iteration_domains,
4391 add_conditions_to_domain): Same.
4392 * graphite-ppl.c (new_Cloog_Domain_from_ppl_Pointset_Powerset): New.
4393 (ppl_print_polyhedron_matrix): ppl_Polyhedron_t ->
4394 ppl_const_Polyhedron_t.
4395 (ppl_print_powerset_matrix): New.
4396 * graphite-ppl.h (new_Cloog_Domain_from_ppl_Pointset_Powerset,
4397 ppl_print_powerset_matrix): New.
4398 (ppl_print_polyhedron_matrix): Updated.
4400 2009-04-07 Sebastian Pop <sebastian.pop@amd.com>
4402 * tree-scalar-evolution.c (analyze_scalar_evolution_1): Fix comment.
4404 2009-04-07 Sebastian Pop <sebastian.pop@amd.com>
4406 * graphite-poly.c (extend_scattering): Fix indenting. Free cstr.
4407 (print_iteration_domains, debug_iteration_domain,
4408 debug_iteration_domains): New.
4409 * graphite-poly.h (print_iteration_domains, debug_iteration_domain,
4410 debug_iteration_domains): Declared.
4411 * graphite-sese-to-poly.c (build_pbb_scattering_polyhedrons): Fix
4414 2009-04-03 Tobias Grosser <grosser@fim.uni-passau.de>
4415 Sebastian Pop <sebastian.pop@amd.com>
4417 * graphite-poly.h (print_iteration_domain): New.
4418 * graphite-sese-to-poly.c (add_conditions_to_domain): Fixed bug.
4419 (build_sese_conditions_1, build_sese_conditions_after,
4420 build_sese_conditions_before): New.
4421 (build_sese_conditions): Rewritten.
4423 2009-04-03 Sebastian Pop <sebastian.pop@amd.com>
4424 Tobias Grosser <grosser@fim.uni-passau.de>
4426 Cleanup of code generation liveouts.
4427 * graphite-clast-to-gimple.c (translate_clast): Use a single
4428 rename_map instead of one per translated statement.
4429 Do not use SESE_LIVEOUT_RENAMES.
4430 (graphite_loop_normal_form): Do not use SESE_REDUCTION_LIST.
4431 (gloog): Do not use SESE_LIVEOUT_RENAMES.
4432 * graphite-scop-detection.c (harmful_stmt_in_bb): Return the close
4433 phi node of a reduction: when a loop contains a reduction used outside
4434 the loop, there should be a scalar close phi node on the exit block.
4435 * sese.c (new_sese): Do not initialize SESE_LIVEOUT,
4436 SESE_LIVEOUT_RENAMES, and SESE_REDUCTION_LIST.
4437 (free_sese): Do not free them.
4438 (sese_build_liveouts_use): Do not use them.
4439 (sese_build_liveouts_bb): Same.
4440 (sese_build_liveouts): Same.
4441 (sese_insert_phis_for_liveouts): Same.
4442 (sese_adjust_phis_for_liveouts): Same. Renamed sese_adjust_liveout_phis.
4443 (defined_in_loop_p): New.
4444 (alive_after_loop): New.
4445 (close_phi_not_yet_inserted_p): New.
4446 (struct alep, alep_p): New.
4447 (add_loop_exit_phis): Remove from the rename_map all the names defined
4448 in the code generated loop.
4449 (insert_loop_close_phis): Traverse the rename_map passed to it.
4450 Don't use SESE_LIVEOUT_RENAMES.
4451 (default_liveout_before_guard): Renamed default_before_guard.
4452 (insert_guard_phis): Do not use SESE_LIVEOUT_RENAMES.
4453 (graphite_copy_stmts_from_block): Do not directly call set_rename.
4454 (register_sese_liveout_renames): Removed.
4455 (copy_bb_and_scalar_dependences): Do not call it.
4456 * sese.h (struct sese): Removed fields: liveout, liveout_renames, and
4458 (SESE_LIVEOUT): Removed.
4459 (SESE_LIVEOUT_RENAMES): Removed.
4460 (SESE_REDUCTION_LIST): Removed.
4461 (sese_build_liveouts): Removed.
4462 (sese_adjust_phis_for_liveouts): Renamed sese_adjust_liveout_phis.
4463 (insert_loop_close_phis): Pass a htab_t instead of a sese.
4464 (insert_guard_phis): Same.
4465 (rename_map_elt): Declare a VEC of them.
4466 * tree-parloops.c (canonicalize_loop_ivs): reduction_list contains
4467 trees not pointers to trees.
4469 Rewrite in canonical close SSA form:
4470 * graphite-scop-detection.c (contains_only_close_phi_nodes): New.
4471 (limit_scops): Close the scop after the block containing the close phi
4473 (canonicalize_loop_closed_ssa): New.
4474 (canonicalize_loop_closed_ssa_form): New.
4475 (build_scops): Call canonicalize_loop_closed_ssa_form.
4477 * graphite-sese-to-poly.c: Fix typos.
4479 2009-04-03 Sebastian Pop <sebastian.pop@amd.com>
4481 * graphite-poly.c (print_scattering_function, print_pbb_domain):
4483 (dump_gbb_conditions, dump_gbb_cases, print_iteration_domain): New.
4484 (print_pbb): Add conditions.
4486 2009-04-01 Tobias Grosser <grosser@fim.uni-passau.de>
4487 Sebastian Pop <sebastian.pop@amd.com>
4489 * graphite-scop-detection.c (bb_in_sd_region): Use bb_in_region.
4490 * graphite-sese-to-poly.c (all_non_dominated_preds_marked_p): New.
4491 (build_scop_bbs_1): New.
4492 (build_scop_bbs): Rewrite.
4493 * sese.h (bb_in_region): New.
4495 2009-03-29 Tobias Grosser <grosser@fim.uni-passau.de>
4497 * graphite-poly.c (new_poly_bb, free_poly_bb): Initialize/free
4499 (print_scop): Style.
4500 * graphite-poly.h (poly_bb): Add drs vector.
4501 (PBB_DRS): Add accessor.
4502 * graphite-sese-to-poly.c (build_poly_dr): New.
4503 (build_pbb_drs, build_scop_drs): New.
4504 (build_poly_scop): call build_scop_drs (Disabled at the moment).
4506 2009-03-29 Tobias Grosser <grosser@fim.uni-passau.de>
4508 * tree-ssa-loop.c: Include forgotten toplev.h
4510 2009-03-29 Tobias Grosser <grosser@fim.uni-passau.de>
4512 * graphite-poly.c: (apply_poly_transforms): sorry -> gcc_unreachable.
4513 * gcc.dg/graphite/pr37883.c: Remove -floop-*
4514 * gcc.dg/graphite/pr37928.c: Same
4515 * gcc.dg/graphite/pr38409.c: Same
4516 * gcc.dg/graphite/pr38498.c: Same
4517 * gcc.dg/graphite/pr38559.c: Same
4518 * gcc.dg/graphite/pr39335.c: Same
4519 * gcc.dg/graphite/pr39335_1.c: Same
4520 * gfortran.dg/graphite/block-2.f: Same
4521 * tree-ssa-loop.c (gate_graphite_transforms): Always fail if called
4524 2009-03-28 Tobias Grosser <grosser@fim.uni-passau.de>
4526 * graphite-sese-to-poly.c (ref_nb_loops, build_access_matrix_with_af,
4527 build_access_matrix, build_scop_data_accesses): Remove access function
4528 building. (We get a new version soon).
4529 (build_bb_loops, scan_tree_for_params_right_scev): Update.
4530 * sese.h (nb_loops_around_loop_in_sese): Remove.
4531 (sese_loop_depth): Do not use SESE_LOOP_NEST any more.
4533 2009-03-27 Tobias Grosser <grosser@fim.uni-passau.de>
4534 Sebastian Pop <sebastian.pop@amd.com>
4536 * graphite-scop-detection.c (struct scopdet_info): Rename last
4538 (scopdet_basic_block_info, build_scops_1): Don't use
4539 CDI_POST_DOMINATORS. CDI_POST_DOMINATORS should never be used.
4541 2009-03-26 Tobias Grosser <grosser@fim.uni-passau.de>
4542 Sebastian Pop <sebastian.pop@amd.com>
4544 * graphite-clast-to-gimple.c (gloog): Call sese_build_liveouts.
4545 * sese.c (sese_build_liveouts_use): Renamed from
4546 sese_build_livein_liveouts_use. Remove liveins.
4547 (sese_build_liveouts_bb): Renamed from sese_build_livein_liveouts_bb.
4548 Call sese_build_liveouts_use.
4549 (sese_build_liveouts): Renamed from sese_build_livein_liveouts.
4550 Call sese_build_liveouts_bb.
4551 (new_sese, free_sese): Remove liveins.
4552 (sese_add_exit_phis_var): Deleted.
4553 (sese_insert_phis_for_liveouts): Call sese_add_exit_phis_edge
4555 (graphite_copy_stmts_from_block): Remove SESE_NUM_VER.
4557 * sese.h (sese): Remove num_ver and livein.
4558 (SESE_LIVEIN, SESE_LIVEIN_VER, SESE_NUM_VER): Removed.
4560 2009-03-25 Tobias Grosser <grosser@fim.uni-passau.de>
4562 * graphite-sese-to-poly.c (build_scop_scattering): Fix compile.
4564 2009-03-25 Tobias Grosser <grosser@fim.uni-passau.de>
4566 * graphite-sese-to-poly.c (compare_prefix_loops): Removed.
4567 (build_scop_scattering): Do not use compare_prefix_loops any more.
4568 (nb_common_loops): New.
4570 2009-03-24 Sebastian Pop <sebastian.pop@amd.com>
4572 * sese.c (get_new_name_from_old_name): Renamed get_rename.
4573 (register_old_and_new_names): Renamed set_rename.
4575 2009-03-24 Sebastian Pop <sebastian.pop@amd.com>
4577 * graphite-scop-detection.h (nb_reductions_in_loop): Revert removal
4578 of the decl from the previous commit.
4580 2009-03-24 Sebastian Pop <sebastian.pop@amd.com>
4582 * graphite-scop-detection.c (dot_scop): New.
4583 * graphite-scop-detection.h (dot_scop): Declared.
4585 2009-03-24 Sebastian Pop <sebastian.pop@amd.com>
4587 * graphite-sese-to-poly.c (compare_prefix_loops): Fix compare.
4589 2009-03-24 Sebastian Pop <sebastian.pop@amd.com>
4591 * cfgloopmanip.c (create_empty_loop_on_edge): Generate the loop exit
4592 condition at the end of the loop.
4593 * graphite.c (graphite_initialize, graphite_finalize): Print to
4594 dump_file the compiled function.
4595 * graphite-clast-to-gimple.c (graphite_create_new_loop): Update use
4596 of create_empty_loop_on_edge.
4597 (translate_clast): Update the code generation of loops for the new
4599 * cfgloop.h (create_empty_loop_on_edge): Update declaration.
4601 2009-03-24 Sebastian Pop <sebastian.pop@amd.com>
4603 Reverted the patch from 2009-03-19.
4605 2009-03-19 Tobias Grosser <grosser@fim.uni-passau.de>
4607 * graphite-poly.c (new_poly_bb, free_poly_bb): Initialize/free
4609 (print_scop): Style.
4610 * graphite-poly.h (poly_bb): Add drs vector.
4611 (PBB_DRS): Add accessor.
4612 * graphite-sese-to-poly.c (ref_nb_loops): Remove.
4613 (build_access_matrix_with_af, build_access_matrix,
4614 build_scop_data_accesses): Delete.
4615 (build_poly_dr): New.
4616 (build_pbb_drs, build_scop_drs): New.
4617 (build_poly_scop): call build_scop_drs.
4619 2009-03-13 Sebastian Pop <sebastian.pop@amd.com>
4621 * graphite-scop-detection.c (dot_all_scops_1): Close the table
4622 once per basic block.
4624 2009-03-13 Tobias Grosser <grosser@fim.uni-passau.de>
4626 * graphite-scop-detection.c (graphite_can_represent_scev): New.
4627 (graphite_can_represent_expr): Renamed from loop_affine_expr
4629 (stmt_simple_for_scop_p): Call graphite_can_represent_expr.
4630 (graphite_cannot_represent_loop): Add scop_entry to parameters.
4631 (scopdet_basic_block_info): Actually define entry_block.
4632 (stmt_simple_memref_p): Moved here from ...
4634 * tree-data-ref.c (stmt_simple_memref_p): here.
4635 * tree-data-ref.h (stmt_simple_memref_p): Removed.
4637 2009-03-13 Tobias Grosser <grosser@fim.uni-passau.de>
4639 * gcc.dg/graphite/id-4.c: New.
4641 2009-03-12 Sebastian Pop <sebastian.pop@amd.com>
4643 * sese.c (expand_scalar_variables_expr): Handle tcc_comparison.
4644 (register_old_and_new_names): Update the content of the map.
4645 When there was already a rename_map_elt in the map at that
4647 (copy_bb_and_scalar_dependences): Do rename_variables after
4648 expand_scalar_variables.
4649 * graphite-clast-to-gimple.c (build_iv_mapping): Update the content
4650 of the map. When there was already a rename_map_elt in the
4651 map at that location, free it.
4652 (translate_clast): Pass the rename_map. Do not initialize and free
4653 a rename_map per stmt_user.
4654 (gloog): Initialize and free one rename_map and pass it to
4657 2009-03-12 Sebastian Pop <sebastian.pop@amd.com>
4659 * sese.c (expand_scalar_variables_stmt,
4660 expand_scalar_variables_ssa_name): Add a gimple_stmt_iterator
4662 (expand_scalar_variables_expr): Handle REALPART_EXPR and IMAGPART_EXPR.
4663 (expand_scalar_variables): Pass to expand_scalar_variables_stmt
4664 the gimple_stmt_iterator of the statement to be expanded.
4665 * graphite-scop-detection.c (is_simple_operand): Do handle
4668 2009-03-11 Tobias Grosser <grosser@fim.uni-passau.de>
4670 * graphite-scop-detection.c (is_simple_operand): Do not handle
4672 * gcc.dg/graphite/id-2.c: New.
4674 * graphite-sese-to-poly.c (build_bb_loops,
4675 add_value_to_dim, scan_tree_for_params_right_scev,
4676 scan_tree_for_params_int, scan_tree_for_params, idx_record_params,
4677 find_params_in_bb, build_loop_iteration_domains,
4678 add_conditions_to_domain): Remove subtract.
4680 2009-03-11 Tobias Grosser <grosser@fim.uni-passau.de>
4682 * graphite-clast-to-gimple.c (loop_iv_stack_patch_for_consts,
4683 build_iv_mapping, compute_cloog_iv_types_1, build_cloog_prog):
4684 pbb_loop_at_index -> gbb_loop_at_index.
4685 * graphite-poly.c (new_poly_bb, new_scop): New accessors.
4686 (debug_loop_vec): Delete.
4687 * graphite-poly.h (poly_bb, scop): Change black_box and region to void
4688 pointer. Move LOOPS to gimple_bb_p and insert nb_params.
4689 (PBB_LOOPS): Removed.
4690 (PBB_BLACK_BOX): Insert cast.
4691 (pbb_set_black_box): New setter.
4692 (pbb_loop_at_index, pbb_loop_index): Removed.
4693 (scop_set_region, scop_set_nb_params): New.
4694 * graphite-sese-to-poly.c (new_gimple_bb, free_gimple_bb,
4695 build_scop_scattering, build_bb_loops): Add GBB_LOOPS.
4696 (build_poly_scop): Use scop_set_nb_params.
4697 * sese.h (gimple_bb): Add LOOPS.
4698 (GBB_LOOPS, gbb_loop_index, gbb_loop_at_index): New.
4700 2009-03-11 Tobias Grosser <grosser@fim.uni-passau.de>
4702 Revert previous commit.
4704 2009-03-11 Sebastian Pop <sebastian.pop@amd.com>
4706 * sese.c (expand_scalar_variables_expr): Handle tcc_comparison.
4707 (register_old_and_new_names): Update the content of the map.
4708 When there was already a rename_map_elt in the map at that
4710 (copy_bb_and_scalar_dependences): Do rename_variables after
4711 expand_scalar_variables.
4712 * graphite-clast-to-gimple.c (build_iv_mapping): Update the content
4713 of the map. When there was already a rename_map_elt in the
4714 map at that location, free it.
4715 (translate_clast): Pass the rename_map. Do not initialize and free
4716 a rename_map per stmt_user.
4717 (gloog): Initialize and free one rename_map and pass it to
4720 2009-03-11 Tobias Grosser <grosser@fim.uni-passau.de>
4722 Remove forgotten line in revert.
4724 2009-03-11 Sebastian Pop <sebastian.pop@amd.com>
4726 Revert previous commit.
4728 2009-03-10 Sebastian Pop <sebastian.pop@amd.com>
4730 * sese.c (register_old_and_new_names): Update the content
4731 of the map. When there was already a rename_map_elt in the
4732 map at that location, free it.
4733 (copy_bb_and_scalar_dependences): Do rename_variables after
4734 expand_scalar_variables.
4735 * graphite-clast-to-gimple.c (build_iv_mapping): Update the content
4736 of the map. When there was already a rename_map_elt in the
4737 map at that location, free it.
4738 (translate_clast): Pass the rename_map. Do not initialize and free
4739 a rename_map per stmt_user.
4740 (gloog): Initialize and free one rename_map and pass it to
4743 2009-03-10 Sebastian Pop <sebastian.pop@amd.com>
4745 * graphite-clast-to-gimple.c (translate_clast): context_loop
4748 2009-03-10 Tobias Grosser <grosser@fim.uni-passau.de>
4749 Sebastian Pop <sebastian.pop@amd.com>
4751 * graphite-ppl.c (ppl_insert_dimensions): Fix stupid mistake
4752 of the use of ppl_Polyhedron_map_space_dimensions.
4754 2009-03-10 Tobias Grosser <grosser@fim.uni-passau.de>
4755 Sebastian Pop <sebastian.pop@amd.com>
4757 * graphite-poly.c (unify_scattering_dimensions): Fix types.
4758 * graphite-poly.h (poly_dr_p, poly_dr, POLY_DR_TYPE, PDR_BB,
4759 PDR_TYPE, PDR_ACCESSES, pdr_accessp_nb_subscripts,
4760 pdr_accessp_nb_iterators, pdr_accessp_nb_params,
4761 pdr_accessp_alias_set_dim, pdr_accessp_subscript_dim,
4762 pdr_accessp_iterator_dim, pdr_accessp_param_dim,
4763 pbb_nb_params): New.
4764 (pbb_nb_loops, pbb_nb_scattering, scop_nb_params,
4765 nb_loops_around_pbb): Adapt return types.
4767 2009-03-09 Tobias Grosser <grosser@fim.uni-passau.de>
4769 * Makefile.in (graphite.o, graphite-sese-to-poly.o,
4770 graphite-clast-to-gimple.o, graphite-data-ref.o,
4771 graphite-scop-detection.o, graphite-poly.o): Add
4774 2009-03-05 Tobias Grosser <grosser@fim.uni-passau.de>
4776 * Makefile.in (graphite.o, graphite-sese-to-poly.o,
4777 graphite-clast-to-gimple.o, graphite-data-ref.o,
4778 graphite-scop-detection.o, graphite-poly.o): Add graphite-poly.h.
4780 2009-03-04 Tobias Grosser <grosser@fim.uni-passau.de>
4782 * gcc.dg/graphite/pr37485.c: Remove -floop-block
4783 * gcc.dg/graphite/pr37828.c: Same.
4784 * gcc.dg/graphite/pr37684.c: Same.
4785 * gcc.dg/graphite/block-0.c: Same.
4786 * gcc.dg/graphite/block-1.c: Same.
4787 * gcc.dg/graphite/block-2.c: Same.
4788 * gcc.dg/graphite/block-3.c: Same.
4789 * gcc.dg/graphite/block-4.c: Same.
4790 * gcc.dg/graphite/block-5.c: Same.
4791 * gcc.dg/graphite/block-6.c: Same.
4792 * gfortran.dg/graphite/pr38083.f90: Same.
4793 * gfortran.dg/graphite/block-1.f90: Same.
4794 * gfortran.dg/graphite/block-3.f90: Same.
4795 * gfortran.dg/graphite/pr37852.f90: Same.
4796 * gfortran.dg/graphite/block-4.f90: Same.
4797 * gfortran.dg/graphite/pr37980.f90: Same.
4798 * gfortran.dg/graphite/pr38953.f90: Same.
4799 * gfortran.dg/graphite/pr37857.f90: Same.
4800 * opts.c: Remove -floop-block from -O2.
4801 * graphite-poly.c: Fail if -floop-block -floop-interchange or
4802 -floop-strip-mine are used.
4804 2009-03-04 Tobias Grosser <grosser@fim.uni-passau.de>
4805 Sebastian Pop <sebastian.pop@amd.com>
4807 * graphite-clast-to-gimple.c (build_cloog_prog): Unify scattering
4809 * graphite-poly.c (pbb_compare, graphite_sort_pbbs,
4810 graphite_trans_bb_move_loop, graphite_trans_bb_strip_mine,
4811 strip_mine_profitable_p, is_interchange_valid,
4812 graphite_trans_bb_block, graphite_trans_loop_block,
4813 graphite_trans_scop_block): Temporary removed.
4814 (extend_scattering, unify_scattering_dimensions): New.
4815 (print_scattering_function, graphite_read_transforms):
4816 PBB_SCATTERING -> PBB_TRANSFORMED_SCATTERING.
4817 (graphite_generate_scattering_fns): Removed.
4818 (apply_poly_transforms): Cleanup.
4819 (free_poly_bb): Add PBB_SCATTERING -> PBB_TRANSFORMED_SCATTERING.
4820 (schedule_to_scattering): Moved.
4821 (PBB_STATIC_SCHEDULE, PBB_SCATTERING): Removed.
4822 (PBB_ORIGINAL_SCATTERING, PBB_TRANSFORMED_SCATTERING): New.
4823 (pbb_nb_scattering): New.
4824 (SCOP_ENTRY, SCOP_EXIT, SCOP_REGION_BBS, SCOP_DEP_GRAPH, SCOP_PARAMS,
4825 SCOP_LOOP_NEST, SCOP_PARAMS, SCOP_OLDIVS, SCOP_LIVEOUT_RENAMES):
4827 * graphite-ppl.c (ppl_insert_dimensions): Extended and renamed from
4829 (ppl_strip_loop): PBB_SCATTERING -> PBB_TRANSFORMED_SCATTERING.
4830 * graphite-scop-detection.c (dot_all_scops_1): PBB_SCATTERING
4831 -> PBB_TRANSFORMED_SCATTERING.
4832 * graphite-sese-to-poly.c (build_scop_bbs): Remove region.
4833 (build_pbb_scattering_polyhedron): Moved from schedule_to_scattering.
4834 (build_scop_scattering): Renamed from build_scop_canonical_schedules.
4835 (check_poly_representation): Do not return bool.
4836 (graphite_transform_loops): Reformat.
4837 * sese.h (SESE_ENTRY_BB, SESE_EXIT_BB): New.
4839 2009-03-04 Sebastian Pop <sebastian.pop@amd.com>
4841 * graphite-poly.c (print_pbb_domain, print_pbb, print_scop,
4842 debug_pbb_domain, debug_pbb, debug_scop): New.
4843 * graphite-poly.h (print_pbb_domain, print_pbb, print_scop,
4844 debug_pbb_domain, debug_pbb, debug_scop): Declared.
4846 2009-03-02 Sebastian Pop <sebastian.pop@amd.com>
4849 * tree-parloops.c (canonicalize_loop_ivs): Call fold_convert
4850 when the type precision of the induction variable should be
4851 larger than the type precision of nit.
4852 (gen_parallel_loop): Update use of canonicalize_loop_ivs.
4853 * graphite-clast-to-gimple.c (graphite_loop_normal_form): Same.
4854 * tree-flow.h (canonicalize_loop_ivs): Update declaration.
4856 * gcc.dg/graphite/pr39335_1.c: New.
4857 * gcc.dg/graphite/pr39335.c: New.
4859 2009-03-02 Sebastian Pop <sebastian.pop@amd.com>
4861 * tree-parloops.c (canonicalize_loop_ivs): reduction_list contains
4862 SSA_NAMES not struct reduction_info.
4864 2009-03-02 Sebastian Pop <sebastian.pop@amd.com>
4866 * sese.c (expand_scalar_variables_expr): Handle ADDR_EXPR.
4868 2009-02-27 Sebastian Pop <sebastian.pop@amd.com>
4869 Tobias Grosser <grosser@fim.uni-passau.de>
4871 * sese.c (new_sese): Initialize SESE_REDUCTION_LIST.
4872 (free_sese): Free SESE_REDUCTION_LIST.
4873 * sese.h (struct sese): Add field reduction_list.
4874 (SESE_REDUCTION_LIST): New.
4875 * graphite-clast-to-gimple.c (graphite_loop_normal_form): Call
4876 canonicalize_loop_ivs on SESE_REDUCTION_LIST.
4878 2009-02-27 Sebastian Pop <sebastian.pop@amd.com>
4879 Tobias Grosser <grosser@fim.uni-passau.de>
4881 * tree-flow.h (gather_scalar_reductions): Use struct loop * instead
4884 2009-02-27 Sebastian Pop <sebastian.pop@amd.com>
4885 Tobias Grosser <grosser@fim.uni-passau.de>
4887 * tree-parloops.c (struct brli, build_reduction_list_info,
4888 analyze_reduction_list, gather_scalar_reductions): New.
4889 (loop_parallel_p): Build a reduction list containing only
4890 PHI_RESULT SSA_NAMEs: call gather_scalar_reductions.
4891 (gen_parallel_loop): Call the analysis analyze_reduction_list.
4892 (parallelize_loops): Now reduction_list is a htab_t of SSA_NAMEs.
4893 * tree-flow.h (gather_scalar_reductions): Declared.
4895 2009-02-26 Sebastian Pop <sebastian.pop@amd.com>
4898 * graphite-clast-to-gimple.c (graphite_loop_normal_form): Do not call
4899 number_of_iterations_exit from a gcc_assert.
4901 2009-02-25 Sebastian Pop <sebastian.pop@amd.com>
4902 Jan Sjodin <jan.sjodin@amd.com>
4904 * output.h (graphite_out_file, graphite_in_file): Declared.
4905 * toplev.c (graphite_out_file, graphite_in_file): New.
4906 (init_asm_output): Initialize graphite_in_file and graphite_out_file.
4907 * graphite-clast-to-gimple.c (build_cloog_prog): Read PBB_SCATTERING.
4908 Don't call schedule_to_scattering.
4909 * common.opt (fgraphite-write, fgraphite-read): New.
4910 * graphite-poly.c: Include output.h.
4911 (print_scattering_function, print_scattering_functions,
4912 debug_scattering_function, debug_scattering_functions,
4913 graphite_write_transforms, graphite_read_transforms,
4914 graphite_generate_scattering_fns): New.
4915 (apply_poly_transforms): Do not apply transform if flag_graphite_read.
4916 Call graphite_generate_scattering_fns, graphite_write_transforms,
4917 graphite_read_transforms.
4918 (new_poly_bb): Initialize PBB_SCATTERING.
4919 (free_poly_bb): Free PBB_SCATTERING.
4920 (schedule_to_scattering): Does not return, initialize PBB_SCATTERING.
4921 * graphite-poly.h (struct poly_bb): Add field scattering.
4922 (PBB_SCATTERING): New.
4923 (print_scattering_function, print_scattering_functions,
4924 debug_scattering_function, debug_scattering_functions): Declared.
4925 * graphite-ppl.c (cloog_matrix_to_ppl_constraint): Matrices contain
4926 GMP values, not integers!
4927 (ppl_print_polyhedron_matrix, debug_ppl_polyhedron_matrix,
4928 ppl_read_polyhedron_matrix): New.
4929 * graphite-ppl.h (ppl_print_polyhedron_matrix,
4930 debug_ppl_polyhedron_matrix,
4931 ppl_read_polyhedron_matrix): Declared.
4932 * Makefile.in (graphite-poly.o): Depends on output.h.
4934 2009-02-23 Sebastian Pop <sebastian.pop@amd.com>
4935 Tobias Grosser <grosser@fim.uni-passau.de>
4938 * graphite-scop-detection.c (stmt_simple_for_scop_p): Analyze
4939 scalar evolutions in the scop_entry->loop_father.
4941 2009-02-23 Sebastian Pop <sebastian.pop@amd.com>
4942 Tobias Grosser <grosser@fim.uni-passau.de>
4944 * graphite.h (ref_nb_loops): Remove declaration.
4945 (struct gimple_bb, gimple_bb_p, GBB_BB, GBB_DATA_REFS, GBB_CONDITIONS,
4946 GBB_CONDITION_CASES, GBB_CLOOG_IV_TYPES, gbb_loop, print_gimple_bb,
4947 debug_gbb): Moved to sese.h.
4950 2009-02-23 Sebastian Pop <sebastian.pop@amd.com>
4951 Tobias Grosser <grosser@fim.uni-passau.de>
4953 * graphite-data-ref.[ch]: Disable.
4955 2009-02-23 Sebastian Pop <sebastian.pop@amd.com>
4956 Tobias Grosser <grosser@fim.uni-passau.de>
4958 * graphite-scop-detection.c (stmt_simple_for_scop_p): Analyze
4959 scalar evolutions in the scop_entry->loop_father.
4961 2009-02-23 Sebastian Pop <sebastian.pop@amd.com>
4963 * graphite-scop-detection.c (nb_reductions_in_loop): Moved here...
4964 (graphite_cannot_represent_loop_niter): Renamed
4965 graphite_cannot_represent_loop. Call nb_reductions_in_loop.
4966 (limit_scops): build_sese_loop_nests does not return a bool.
4967 * graphite-scop-detection.h (nb_reductions_in_loop): Declared.
4968 * sese.c (nb_reductions_in_loop): ... from here.
4969 (graphite_loop_normal_form): ... from here.
4970 (sese_record_loop): Does not fail, so does not return a bool.
4971 (build_sese_loop_nests): Same.
4972 * sese.h (build_sese_loop_nests): Update declaration.
4973 * graphite-clast-to-gimple.c (graphite_loop_normal_form): Moved here...
4974 (build_graphite_loop_normal_form): New.
4975 (gloog): Call build_graphite_loop_normal_form.
4976 * graphite-sese-to-poly.c (build_poly_scop): Don't fail on
4977 build_sese_loop_nests.
4979 * gcc.dg/graphite/id-1.c: New.
4981 2009-02-23 Sebastian Pop <sebastian.pop@amd.com>
4982 Tobias Grosser <grosser@fim.uni-passau.de>
4984 * graphite-sese-to-poly.c (scan_tree_for_params): Remove REAL_CST.
4985 The SCoP detection fix is sufficient.
4987 2009-02-21 Sebastian Pop <sebastian.pop@amd.com>
4989 PR tree-optimization/39260
4990 * graphite-scop-detection.c (harmful_stmt_in_bb): Stop a SCoP when
4991 the basic block contains a condition with a real type.
4992 * graphite-sese-to-poly.c (scan_tree_for_params): Handle REAL_CST.
4994 * gcc.dg/graphite/pr39260.c: New.
4996 2009-02-21 Sebastian Pop <sebastian.pop@amd.com>
4998 * graphite-poly.c: Inlcude params.h.
4999 (graphite_trans_loop_block): Use PARAM_LOOP_BLOCK_TILE_SIZE for
5001 * Makefile.in (graphite-poly.o): Depend on PARAMS_H.
5002 * params.def (PARAM_LOOP_BLOCK_TILE_SIZE): Define.
5004 2009-02-20 Sebastian Pop <sebastian.pop@amd.com>
5005 Tobias Grosser <grosser@fim.uni-passau.de>
5007 * graphite-scop-detection.c (dot_all_scops_1,
5008 dot_all_scops): Moved here.
5009 * graphite-scop-detection.h (dot_all_scops): Declared here.
5010 * graphite.c (graphite_initialize, graphite_finalize): New.
5011 (graphite_transform_loops): Cleaned up.
5012 * sese.c (debug_oldivs): Moved here.
5013 * graphite-poly.c (graphite_apply_transformations): Renamed
5014 apply_poly_transforms.
5015 (debug_loop_vec): Moved here.
5016 * graphite-sese-to-poly.c (build_bb_loops, build_sese_conditions_1,
5017 scop_contains_non_iv_scalar_phi_nodes, build_sese_conditions,
5018 find_scop_parameters, build_scop_iteration_domain,
5019 add_conditions_to_constraints, build_scop_canonical_schedules,
5020 build_scop_data_accesses): Now static.
5021 (build_poly_scop, check_poly_representation): New.
5023 2009-02-20 Sebastian Pop <sebastian.pop@amd.com>
5025 * graphite.c (graphite_stmt_p, new_gimple_bb, free_gimple_bb,
5026 remove_gbbs_in_scop, free_scops, try_generate_gimple_bb,
5027 build_scop_bbs, ref_nb_loops, compare_prefix_loops,
5028 build_scop_canonical_schedules, build_bb_loops, add_value_to_dim,
5029 scan_tree_for_params_right_scev, scan_tree_for_params_int,
5030 scan_tree_for_params, struct irp_data, dx_record_params,
5031 find_params_in_bb, find_scop_parameters, gbb_from_bb,
5032 build_loop_iteration_domains, add_conditions_to_domain,
5033 phi_node_is_iv, bb_contains_non_iv_scalar_phi_nodes,
5034 scop_contains_non_iv_scalar_phi_nodes, build_sese_conditions_1,
5035 build_sese_conditions, add_conditions_to_constraints,
5036 build_scop_iteration_domain, build_access_matrix_with_af,
5037 build_access_matrix,
5038 build_scop_data_accesses): Moved to graphite-sese-to-poly.c.
5040 * graphite-sese-to-poly.c: New.
5041 * graphite-sese-to-poly.h: New.
5043 * Makefile.in: Add new rule for graphite-sese-to-poly.o.
5045 2009-02-20 Sebastian Pop <sebastian.pop@amd.com>
5047 * graphite.c: Split graphite code generation to a new file.
5048 (graphite_verify, gmp_cst_to_tree, clast_name_to_gcc,
5049 max_precision_type, clast_to_gcc_expression_red,
5050 clast_to_gcc_expression, gcc_type_for_clast_expr,
5051 gcc_type_for_clast_eq, loop_iv_stack_patch_for_consts,
5052 graphite_translate_clast_equation, graphite_create_guard_cond_expr,
5053 graphite_create_new_guard, clast_get_body_of_loop,
5054 gcc_type_for_cloog_iv, gcc_type_for_iv_of_clast_loop,
5055 graphite_create_new_loop, build_iv_mapping, copy_renames,
5056 translate_clast, find_cloog_iv_in_expr, compute_cloog_iv_types_1,
5057 compute_cloog_iv_types, free_scattering, save_var_name,
5058 initialize_cloog_names, build_scop_context, build_cloog_prog,
5059 set_cloog_options, debug_clast_stmt, scop_to_clast,
5060 print_generated_program, debug_generated_program,
5061 gloog): Moved to graphite-clast-to-gimple.c.
5063 (struct cloog_prog_clast): Moved to graphite-clast-to-gimple.h.
5065 (iv_stack_entry_is_constant, iv_stack_entry_is_iv,
5066 loop_iv_stack_push_iv, loop_iv_stack_insert_constant,
5067 loop_iv_stack_pop, loop_iv_stack_get_iv,
5068 loop_iv_stack_get_iv_from_name, debug_loop_iv_stack,
5069 free_loop_iv_stack, loop_iv_stack_remove_constants,
5070 debug_rename_elt, debug_rename_map_1, debug_rename_map,
5071 rename_map_elt_info, eq_rename_map_elts, debug_ivtype_elt,
5072 debug_ivtype_map_1, debug_ivtype_map, ivtype_map_elt_info,
5073 eq_ivtype_map_elts, sese_add_exit_phis_edge,
5074 sese_add_exit_phis_var, sese_insert_phis_for_liveouts,
5075 get_vdef_before_sese, sese_adjust_vphi,
5076 get_new_name_from_old_name, sese_adjust_phis_for_liveouts,
5077 oldiv_for_loop, rename_variables_in_stmt, is_parameter,
5078 is_iv, expand_scalar_variables_ssa_name,
5079 expand_scalar_variables_expr, expand_scalar_variables_stmt,
5080 expand_scalar_variables, rename_variables, remove_condition,
5081 get_true_edge_from_guard_bb, get_false_edge_from_guard_bb,
5082 add_loop_exit_phis, insert_loop_close_phis, struct igp,
5083 default_liveout_before_guard, add_guard_exit_phis,
5084 insert_guard_phis, register_old_and_new_names,
5085 graphite_copy_stmts_from_block, register_sese_liveout_renames,
5086 copy_bb_and_scalar_dependences, outermost_loop_in_sese,
5087 if_region_set_false_region, create_if_region_on_edge,
5088 move_sese_in_condition): Moved to sese.c.
5090 (nb_loops_around_loop_in_sese, struct ifsese, if_region_entry,
5091 if_region_exit, if_region_get_condition_block,
5092 struct rename_map_elt, new_rename_map_elt, enum iv_stack_entry_kind,
5093 union iv_stack_entry_data_union, struct iv_stack_entry_struct,
5094 iv_stack_entry_p, loop_iv_stack, struct ivtype_map_elt,
5095 ivtype_map_elt, new_ivtype_map_elt,
5096 recompute_all_dominators): Moved to sese.h.
5098 * graphite-clast-to-gimple.c: New.
5099 * graphite-clast-to-gimple.h: New.
5100 * Makefile.in: Add new rule for graphite-clast-to-gimple.o.
5101 * sese.c: Modified as said above.
5104 2009-02-20 Sebastian Pop <sebastian.pop@amd.com>
5106 * graphite.c: Split scop detection to a new file.
5107 (enum gbb_type, gbb_type, get_bb_type, struct sd_region_p, sd_region,
5108 move_sd_regions, loop_affine_expr, exclude_component_ref,
5109 is_simple_operand, stmt_simple_for_scop_p, harmful_stmt_in_bb,
5110 graphite_cannot_represent_loop_niter, struct scopdet_info,
5111 scopdet_basic_block_info, build_scops_1, bb_in_sd_region,
5112 find_single_entry_edge, find_single_exit_edge,
5113 create_single_entry_edge, sd_region_without_exit,
5114 create_single_exit_edge, unmark_exit_edges, mark_exit_edges,
5115 create_sese_edges, build_graphite_scops, limit_scops, build_scops):
5116 Moved to graphite-scop-detection.c.
5118 * graphite-scop-detection.c: New.
5119 * graphite-scop-detection.h: New.
5120 * Makefile.in: Add new rule for graphite-scop-detection.o.
5122 * sese.c: Include tree-chrec.h, tree-data-ref.h, and
5123 tree-scalar-evolution.h.
5124 (nb_reductions_in_loop, graphite_loop_normal_form, sese_record_loop,
5125 build_sese_loop_nests): Moved here from graphite.c.
5126 (param_index): Renamed parameter_index_in_region.
5128 2009-02-18 Tobias Grosser <grosser@fim.uni-passau.de>
5129 Sebastian Pop <sebastian.pop@amd.com>
5131 * gcc.dg/graphite/block-0.c: Expected to fail now.
5132 * gcc.dg/graphite/block-1.c: Same.
5133 * gcc.dg/graphite/block-5.c: Same.
5134 * gcc.dg/graphite/block-6.c: Same.
5136 2009-02-18 Tobias Grosser <grosser@fim.uni-passau.de>
5137 Sebastian Pop <sebastian.pop@amd.com>
5139 * graphite.h: Separate from graphite_bb_p the polyhedral
5140 representation in poly_bb_p and the GCC specifics in gimple_bb_p.
5141 (struct data_dependence_polyhedron, RDGE_DDP, ddp_p): Moved to
5142 graphite-data-ref.h.
5143 (struct poly_bb, PBB_SCOP, PBB_STATIC_SCHEDULE, PBB_DOMAIN,
5144 PBB_BLACK_BOX, PBB_LOOPS, pbb_nb_loops, pbb_loop_at_index,
5145 pbb_loop_index, struct scop, SCOP_BBS, SCOP_REGION, SCOP_ENTRY,
5146 SCOP_EXIT, SCOP_REGION_BBS, SCOP_DEP_GRAPH, SCOP_PARAMS,
5147 SCOP_LOOP_NEST, SCOP_PARAMS, SCOP_OLDIVS, SCOP_LIVEOUT_RENAMES,
5148 scop_nb_params): Moved to graphite-poly.h.
5149 * graphite-data-ref.c: Same.
5150 * graphite-data-ref.h: New.
5152 (pbb_compare, graphite_sort_pbbs, graphite_trans_bb_move_loop,
5153 graphite_trans_bb_strip_mine, strip_mine_profitable_p,
5154 is_interchange_valid, graphite_trans_bb_block,
5155 graphite_trans_loop_block, scop_max_loop_depth,
5156 graphite_trans_scop_block, graphite_apply_transformations,
5157 new_poly_bb, free_poly_bb, new_scop, free_scop): Moved to
5159 * graphite-poly.h: New.
5160 * graphite-poly.c: New.
5161 * Makefile.in (OBJS-common): Add graphite-poly.o.
5162 (graphite-poly.o): New rule.
5163 * tree-data-ref.h (struct data_reference): Remove unused scop field.
5166 2009-02-18 Sebastian Pop <sebastian.pop@amd.com>
5167 Tobias Grosser <grosser@fim.uni-passau.de>
5169 * graphite.c: Replace gb -> gbb.
5171 * graphite-data-ref.c: Same.
5173 2009-02-18 Sebastian Pop <sebastian.pop@amd.com>
5174 Tobias Grosser <grosser@fim.uni-passau.de>
5176 * Makefile.in (OBJS-commmon): Add sese.o.
5178 (graphite.o): Add sese.h.
5179 * graphite.c (bb_in_ss_p, loop_in_sese_p,
5180 sese_build_livein_liveouts_use, sese_build_livein_liveouts_bb,
5181 sese_build_livein_liveouts, register_bb_in_sese, new_sese, free_sese):
5183 (block_before_scop): Add missing return.
5184 (new_scop, free_scop): Remove SESE data structures.
5185 (scop_record_loop, scan_tree_for_params, find_params_in_bb,
5186 find_scop_parameters, build_loop_iteration_domains,
5187 add_conditions_to_domain, register_scop_liveout_renames,
5188 copy_bb_and_scalar_dependences): Scop -> SESE.
5190 (add_conditions_to_domain): SCoP -> SESE and remove check
5191 (scop_contains_non_iv_scalar_phi_nodes): New.
5192 (build_scop_conditions_1, build_scop_conditions): Remove check for
5193 non iv scalar phi nodes.
5194 (print_scop_statistics): New.
5195 (graphite_transform_loops): Cleanup.
5197 * graphite.h: Move to sese & cleanup.
5201 2009-02-16 Sebastian Pop <sebastian.pop@amd.com>
5202 Tobias Grosser <grosser@fim.uni-passau.de>
5204 * graphite.c (build_scop_conditions_1): Conditions are only
5205 at the end of a basic block.
5207 2009-02-16 Sebastian Pop <sebastian.pop@amd.com>
5208 Tobias Grosser <grosser@fim.uni-passau>
5210 * graphite.h (struct graphite_bb): Remove compressed_alpha_matrix
5212 (GBB_ALPHA): Removed.
5214 2009-02-16 Sebastian Pop <sebastian.pop@amd.com>
5215 Tobias Grosser <grosser@fim.uni-passau.de>
5217 * graphite-data-ref.c (graphite_test_dependence): Don't use
5218 GBB_DYNAMIC_SCHEDULE.
5219 * graphite.c (new_graphite_bb): Same.
5220 (free_graphite_bb): Same.
5221 (build_scop_dynamic_schedules): Removed.
5222 (graphite_transform_loops): Don't call it.
5223 * graphite.h (struct graphite_bb): Remove dynamic_schedule field.
5224 (GBB_DYNAMIC_SCHEDULE): Removed.
5226 2009-02-16 Sebastian Pop <sebastian.pop@amd.com>
5227 Tobias Grosser <grosser@fim.uni-passau.de>
5229 * graphite.c (schedule_to_scattering): Don't use CloogMatrix.
5230 (print_graphite_bb): Same.
5231 (build_cloog_prog): Same.
5233 2009-02-16 Sebastian Pop <sebastian.pop@amd.com>
5234 Tobias Grosser <grosser@fim.uni-passau.de>
5236 * graphite.c (build_cloog_prog): Don't use CloogMatrix.
5238 2009-02-16 Sebastian Pop <sebastian.pop@amd.com>
5239 Tobias Grosser <grosser@fim.uni-passau.de>
5241 * graphite.c (build_scop_context): Don't use CloogMatrix.
5242 * graphite-ppl.c (new_Cloog_Domain_from_ppl_Polyhedron): New.
5243 * graphite-ppl.h (new_Cloog_Domain_from_ppl_Polyhedron): Declared.
5245 2009-02-16 Sebastian Pop <sebastian.pop@amd.com>
5246 Tobias Grosser <grosser@fim.uni-passau.de>
5248 * graphite.h (struct scop): Move params, old_ivs, loops, loop_nest,
5249 liveout_renames, add_params fields...
5250 (struct sese): ... here.
5251 (SESE_PARAMS, SESE_LOOPS, SESE_LOOP_NEST, SESE_ADD_PARAMS,
5252 SESE_PARAMS, SESE_OLDIVS, SESE_LIVEOUT_RENAMES): New.
5254 2009-02-16 Sebastian Pop <sebastian.pop@amd.com>
5255 Tobias Grosser <grosser@fim.uni-passau.de>
5257 * graphite.c (print_scop): Do not print the CLooG program.
5258 (new_scop, free_scop, initialize_cloog_names, build_scop_context,
5259 build_cloog_prog, gloog): Don't use SCOP_PROG.
5260 (find_transform): Renamed scop_to_clast.
5261 (print_generated_program, debug_generated_program): New.
5262 (graphite_transform_loops): Adapt to new interface.
5263 * graphite.h (struct scop): Remove program field.
5264 (SCOP_PROG): Removed.
5265 (print_generated_program, debug_generated_program): Declared.
5267 2009-02-16 Sebastian Pop <sebastian.pop@amd.com>
5269 * graphite-data-ref.c (schedule_precedes_p, schedule_same_p): New.
5270 (statement_precedes_p): Use schedule_same_p and schedule_precedes_p.
5271 * graphite.c (gbb_compare, schedule_to_scattering, print_graphite_bb,
5272 free_graphite_bb, build_scop_canonical_schedules,
5273 graphite_trans_bb_strip_mine, graphite_trans_scop_block): Static
5274 schedules are now represented using a ppl_Linear_Expression_t.
5275 * graphite.h (struct graphite_bb): Same.
5276 * graphite-ppl.c (ppl_lexico_compare_linear_expressions): New.
5277 * graphite-ppl.h (ppl_lexico_compare_linear_expressions): Declared.
5279 2009-02-15 Sebastian Pop <sebastian.pop@amd.com>
5281 * graphite.c: Free local memory.
5282 * graphite-ppl.c: Same.
5284 2009-02-15 Sebastian Pop <sebastian.pop@amd.com>
5286 * graphite.c (const_column_index, get_first_matching_sign_row_index,
5287 get_lower_bound_row, get_upper_bound_row, copy_constraint,
5288 swap_constraint_variables, scale_constraint_variable): Removed.
5289 (graphite_trans_bb_strip_mine): Remove pong.
5290 * graphite-ppl.c: Include missing header files.
5291 (set_inhomogeneous, set_coef, shift_poly, ppl_strip_loop): New.
5292 * graphite-ppl.h (ppl_strip_loop): Declared.
5293 * Makefile.in (graphite-ppl.o): Adjust dependences.
5295 2009-02-14 Sebastian Pop <sebastian.pop@amd.com>
5297 * graphite.c (build_loop_iteration_domains): Remove ping pong.
5298 (build_scop_iteration_domain): Same.
5300 2009-02-13 Sebastian Pop <sebastian.pop@amd.com>
5302 * graphite.c (scan_tree_for_params, add_conditions_to_domain): Remove
5304 (add_value_to_dim, scan_tree_for_params_right_scev,
5305 scan_tree_for_params_int): New.
5306 * graphite-ppl.c (oppose_constraint): New.
5307 (insert_constraint_into_matrix): Implement missing cases.
5308 * graphite-ppl.h (insert_constraint_into_matrix): Declared.
5310 2009-02-13 Sebastian Pop <sebastian.pop@amd.com>
5312 * graphite.c (graphite_trans_bb_move_loop): Remove ping pong,
5313 use ppl_move_dimension.
5315 2009-02-12 Sebastian Pop <sebastian.pop@amd.com>
5317 * graphite-data-ref.c: Domains are now ppl_Polyhedra_t.
5320 * graphite-ppl.c: Same.
5321 * graphite-ppl.h: Same.
5323 2009-02-12 Sebastian Pop <sebastian.pop@amd.com>
5325 Revert last 3 commits.
5327 2009-02-10 Sebastian Pop <sebastian.pop@amd.com>
5329 * graphite.c (scan_tree_for_params, add_conditions_to_domain): Remove
5331 (add_value_to_dim, scan_tree_for_params_right_scev,
5332 scan_tree_for_params_int): New.
5333 * graphite-ppl.c (oppose_constraint): New.
5334 (insert_constraint_into_matrix): Implement missing cases.
5335 * graphite-ppl.h (insert_constraint_into_matrix): Declared.
5337 2009-02-10 Sebastian Pop <sebastian.pop@amd.com>
5339 * graphite.c (graphite_trans_bb_move_loop): Remove unused variables.
5341 2009-02-10 Sebastian Pop <sebastian.pop@amd.com>
5342 Tobias Grosser <grosser@fim.uni-passau.de>
5344 * graphite.c (graphite_trans_bb_move_loop): Remove ping pong,
5345 use ppl_move_dimension.
5346 * graphite-ppl.c (ppl_move_dimension): New.
5347 * graphite-ppl.h (ppl_move_dimension): Declared.
5349 2009-02-10 Sebastian Pop <sebastian.pop@amd.com>
5351 * graphite.c: Do not include cloog/cloog.h.
5352 (print_graphite_bb): Remove ping pong, call PPL print function.
5354 2009-02-10 Tobias Grosser <grosser@fim.uni-passau.de>
5356 * Makefile.in (OBJS-common): Add graphite-ppl.o.
5357 (graphite.o): Add dependence on graphite-ppl.h.
5358 (graphite-ppl.o): New.
5359 (graphite-data-ref.c): Ping pong between PPL data structures
5361 * graphite-ppl.c: New.
5362 * graphite-ppl.h: New.
5363 * graphite.c: Include graphite-ppl.h.
5364 (print_graphite_bb, add_conditions_to_domain, build_cloog_prog,
5365 graphite_trans_bb_move_loop, graphite_trans_bb_strip_mine):
5366 Ping pong between PPL data structures and matrices.
5367 (new_graphite_bb): Create a PPL constraint system.
5368 Call ppl_delete_Constraint_System instead of cloog_matrix_free.
5369 (build_loop_iteration_domains): Use PPL functions.
5370 * graphite.h: Include graphite-ppl.h. Fix comments.
5371 (graphite_bb): Use a ppl_Constraint_System_t instead of
5372 CloogMatrix for representing the domain.
5373 (scop): Remove static_schedule.
5374 (gbb_nb_loops): Ping pong between PPL data structures and matrices.
5376 2009-02-06 Sebastian Pop <sebastian.pop@amd.com>
5378 * graphite.c: Fix some comments.
5380 2009-02-05 Sebastian Pop <sebastian.pop@amd.com>
5383 * graphite.c (if_region_set_false_region): After moving a region
5384 in the false branch of a condition, remove the empty dummy
5386 (gloog): Remove wrong fix for PR38953.
5388 2009-02-03 Tobias Grosser <grosser@fim.uni-passau.de>
5390 * graphite.c (bb_in_sese_p, sese_build_livein_liveouts_use,
5391 sese_build_livein_liveouts_bb, sese_build_livein_liveouts,
5392 register_bb_in_sese, new_sese, free_sese): Moved.
5393 (dot_scop_1, build_scop_loop_nests, build_loop_iteration_domains,
5394 outermost_loop_in_scop, build_scop_iteration_domain,
5395 expand_scalar_variables_ssa_name, get_vdef_before_scop,
5396 limit_scops): Use bb_in_sese_p instead of bb_in_scop_p.
5397 Use loop_in_sese_p instead of loop_in_scop_p.
5398 (new_graphite_bb, new_scop, gloog): Do not initialize SCOP_BBS_B.
5399 (free_scop): Do not free SCOP_BBS_B.
5400 (nb_loops_around_loop_in_scop, nb_loops_around_gb,
5401 ref_nb_loops): Moved here...
5402 * graphite.h (ref_nb_loops): ... from here.
5403 (struct scop): Remove bbs_b bitmap.
5404 (SCOP_BBS_B, bb_in_scop_p, loop_in_scop_p): Removed.
5405 * gcc.dg/graphite/scop-19.c: New
5407 2009-02-03 Tobias Grosser <grosser@fim.uni-passau.de>
5409 * graphite.c (scopdet_basic_block_info): Fix bug in scop
5412 2009-01-30 Tobias Grosser <grosser@fim.uni-passau.de>
5414 * graphite.c (new_loop_to_cloog_loop_str, hash_loop_to_cloog_loop,
5415 eq_loop_to_cloog_loop): Remove.
5416 (new_scop, free_scop): Remove SCOP_LOOP2CLOOG_LOOP.
5417 * graphite.h (struct scop): Remove loop2cloog_loop.
5418 (loop_domain_dim, loop_iteration_vector_dim): Remove.
5420 2009-01-30 Tobias Grosser <grosser@fim.uni-passau.de>
5422 * opts.c (decode_options): Only add graphite options to O2
5423 if we compile with graphite enabled.
5425 2009-01-26 Sebastian Pop <sebastian.pop@amd.com>
5427 * Merge from mainline (r143163:143684).
5429 2009-01-26 Sebastian Pop <sebastian.pop@amd.com>
5431 * graphite.c (debug_value): Removed.
5432 * graphite.h (debug_value): Removed.
5434 2009-01-23 Sebastian Pop <sebastian.pop@amd.com>
5436 * passes.c (init_optimization_passes): Do not call pass_copy_prop
5437 after graphite: pass_copy_prop does not maintain a proper loop closed
5438 SSA form. pass_copy_prop should be fixed.
5440 2009-01-23 Sebastian Pop <sebastian.pop@amd.com>
5442 * graphite.c (scop_adjust_phis_for_liveouts): Fix warning.
5444 2009-01-23 Sebastian Pop <sebastian.pop@amd.com>
5446 * graphite.c (graphite_verify): Add a call to verify_loop_closed_ssa.
5447 (gloog): Split the exit of the scop when the scop exit is a loop exit.
5448 (graphite_transform_loops): Only call cleanup_tree_cfg if gloog
5451 2009-01-20 Sebastian Pop <sebastian.pop@amd.com>
5453 * graphite.c (gloog): Return true when code gen succeeded.
5454 (graphite_transform_loops): Do not call cleanup_tree_cfg if
5455 the code of the function did not changed. After cleanup_tree_cfg
5456 call rewrite_into_loop_closed_ssa to maintain the loop closed ssa
5459 2009-01-19 Sebastian Pop <sebastian.pop@amd.com>
5461 * graphite.c (stmt_simple_for_scop_p): Also handle cases when
5462 gimple_call_lhs is NULL.
5464 2009-01-16 Sebastian Pop <sebastian.pop@amd.com>
5465 Tobias Grosser <tobi.grosser@amd.com>
5467 * graphite.c (graphite_trans_scop_block): Do not block single
5470 2009-01-15 Sebastian Pop <sebastian.pop@amd.com>
5471 Tobias Grosser <tobi.grosser@amd.com>
5473 * graphite.c (build_scop_canonical_schedules): Start schedules at
5476 2009-01-15 Sebastian Pop <sebastian.pop@amd.com>
5477 Tobias Grosser <tobi.grosser@amd.com>
5479 * graphite.c (compare_prefix_loops): New.
5480 (build_scop_canonical_schedules): Rewritten.
5481 (graphite_transform_loops): Move build_scop_canonical_schedules
5482 after build_scop_iteration_domain.
5484 2009-01-14 Sebastian Pop <sebastian.pop@amd.com>
5485 Tobias Grosser <tobi.grosser@amd.com>
5487 * graphite.c (add_conditions_to_domain): Add the loops to
5488 the dimension of the iteration domain. Do copy the domain
5489 only when it exists.
5490 (build_scop_conditions_1): Do not call add_conditions_to_domain.
5491 (add_conditions_to_constraints): New.
5492 (can_generate_code_stmt, can_generate_code): Removed.
5493 (gloog): Do not call can_generate_code.
5494 (graphite_transform_loops): Call add_conditions_to_constraints
5495 after building the iteration domain.
5497 2009-01-14 Sebastian Pop <sebastian.pop@amd.com>
5498 Tobias Grosser <tobi.grosser@amd.com>
5499 Jan Sjodin <jan.sjodin@amd.com>
5501 * graphite.c (scan_tree_for_params): On substractions negate
5502 all the coefficients of the term.
5503 (clast_to_gcc_expression_red): New. Handle reduction expressions
5504 of more than two operands.
5505 (clast_to_gcc_expression): Call clast_to_gcc_expression_red.
5506 (get_vdef_before_scop): Handle also the case of default definitions.
5508 2009-01-14 Sebastian Pop <sebastian.pop@amd.com>
5511 * graphite.c (get_vdef_before_scop, scop_adjust_vphi): New.
5512 (scop_adjust_phis_for_liveouts): Call scop_adjust_vphi.
5513 (gloog): Do not call cleanup_tree_cfg.
5514 (graphite_transform_loops): Call cleanup_tree_cfg after all
5515 scops have been code generated.
5517 2009-01-13 Sebastian Pop <sebastian.pop@amd.com>
5519 * passes.c (init_optimization_passes): Schedule after
5520 graphite transforms pass_copy_prop, pass_dce_loop and pass_lim.
5522 2009-01-13 Sebastian Pop <sebastian.pop@amd.com>
5524 * graphite.c (expand_scalar_variables_stmt): Do not pass loop_p.
5526 (expand_scalar_variables_ssa_name): Do not pass loop_p. Fix comment.
5527 Set the type of an expression to the type of its assign statement.
5528 (expand_scalar_variables_expr): Do not pass loop_p.
5529 Fix comment. Stop recursion on tcc_constant or tcc_declaration.
5530 (copy_bb_and_scalar_dependences): Do not pass loop_p.
5531 (translate_clast): Update call to copy_bb_and_scalar_dependences.
5533 2009-01-11 Sebastian Pop <sebastian.pop@amd.com>
5535 * graphite.c (expand_scalar_variables_ssa_name): Set the type of
5536 an expression to the gimple_expr_type of its assign statement.
5537 (expand_scalar_variables_expr): Stop recursion on tcc_constant
5540 2009-01-11 Sebastian Pop <sebastian.pop@amd.com>
5542 PR tree-optimization/38786
5543 * gcc.dg/graphite/pr38786.c: New.
5544 * graphite.c (expand_scalar_variables_ssa_name): New, outlined from
5545 the SSA_NAME case of expand_scalar_variables_expr.
5546 (expand_scalar_variables_expr): Also gather the scalar computation
5547 used to index the memory access.
5548 (expand_scalar_variables_stmt): Pass to expand_scalar_variables_expr
5549 the gimple_stmt_iterator where it inserts new code.
5551 2009-01-10 Sebastian Pop <sebastian.pop@amd.com>
5553 * gcc.dg/graphite/block-3.c: Fix compile error on 32bit.
5555 2009-01-10 Sebastian Pop <sebastian.pop@amd.com>
5557 * opts.c (decode_options): Enable flag_graphite_identity and
5558 flag_loop_block in -O2 and above.
5560 2009-01-08 Sebastian Pop <sebastian.pop@amd.com>
5562 * libjava/classpath/lib/gnu/java/awt/peer/gtk/GtkMouseInfoPeer.class:
5563 Fix merge problem: replace with the file from trunk.
5565 2009-01-08 Sebastian Pop <sebastian.pop@amd.com>
5567 * Merge from mainline (r141727:143163).
5569 2009-01-07 Sebastian Pop <sebastian.pop@amd.com>
5570 Jan Sjodin <jan.sjodin@amd.com>
5572 PR tree-optimization/38559
5573 * gcc.dg/graphite/pr38559.c: New.
5575 * graphite.c (debug_value, copy_constraint,
5576 swap_constraint_variables, scale_constraint_variable, ): New.
5577 (get_lower_bound, get_upper_bound): Removed.
5578 (graphite_trans_bb_strip_mine): Clean up this code that works
5579 only for constant number of iterations. Fully copy upper and
5580 lower bound constraints, not only the constant part of them.
5581 * graphite.h (debug_value): Declared.
5583 2009-01-06 Jan Sjodin <jan.sjodin@amd.com>
5585 PR tree-optimization/38492
5586 PR tree-optimization/38498
5587 * tree-check.c (operator_is_linear, scev_is_linear_expression): New.
5588 * tree-chrec.h (scev_is_linear_expression): Declared.
5589 * graphite.c (graphite_cannot_represent_loop_niter): New.
5590 (scopdet_basic_block_info): Call graphite_cannot_represent_loop_niter.
5591 (graphite_loop_normal_form): Use gcc_assert.
5592 (scan_tree_for_params): Use CASE_CONVERT.
5593 (phi_node_is_iv, bb_contains_non_iv_scalar_phi_nodes): New.
5594 (build_scop_conditions_1): Call bb_contains_non_iv_scalar_phi_nodes.
5595 Use gcc_assert. Discard scops that contain unhandled cases.
5596 (build_scop_conditions): Return a boolean status for unhandled cases.
5597 (strip_mine_profitable_p): Print the loop number, not its depth.
5598 (is_interchange_valid): Pass the depth of the loop nest, don't
5599 recompute it wrongly.
5600 (graphite_trans_bb_block): Same.
5601 (graphite_trans_bb_block): Print tentative of loop blocking.
5602 (graphite_trans_scop_block): Do not print that the loop has been
5604 (graphite_transform_loops): Do not handle scops that contain condition
5607 * gcc.dg/graphite/pr38500.c: Fixed warning as committed
5609 * gcc.dg/graphite/block-0.c: Update test.
5610 * gcc.dg/graphite/block-1.c: Same.
5611 * gcc.dg/graphite/block-2.c: Remove xfail and test for
5613 * gcc.dg/graphite/block-4.c: Remove test for strip mine.
5614 * gcc.dg/graphite/block-3.c: New.
5615 * gcc.dg/graphite/pr38498.c: New.
5617 2008-12-22 Harsha Jagasia <harsha.jagasia@amd.com>
5619 PR tree-optimization/38510
5620 * gcc.dg/graphite/pr38510.c: New.
5621 * graphite.c (recompute_all_dominators): Call mark_irreducible_loops.
5622 (translate_clast): Call recompute_all_dominators before
5624 (gloog): Call recompute_all_dominators before graphite_verify.
5626 2008-12-12 Sebastian Pop <sebastian.pop@amd.com>
5628 PR tree-optimization/38492
5629 * graphite.c (rename_map_elt, debug_rename_elt,
5630 debug_rename_map_1, debug_rename_map, new_rename_map_elt,
5631 rename_map_elt_info, eq_rename_map_elts,
5632 get_new_name_from_old_name, bb_in_sese_p): Moved around.
5633 (sese_find_uses_to_rename_use): Renamed sese_build_livein_liveouts_use.
5634 (sese_find_uses_to_rename_bb): Renamed sese_build_livein_liveouts_bb.
5635 (sese_build_livein_liveouts): New.
5636 (new_sese, free_sese): New.
5637 (new_scop): Call new_sese.
5638 (free_scop): Call free_sese.
5639 (rename_variables_from_edge, rename_phis_end_scop): Removed.
5640 (register_old_new_names): Renamed register_old_and_new_names.
5641 (register_scop_liveout_renames, add_loop_exit_phis,
5642 insert_loop_close_phis, struct igp,
5643 default_liveout_before_guard, add_guard_exit_phis,
5644 insert_guard_phis, copy_renames): New.
5645 (translate_clast): Call insert_loop_close_phis and insert_guard_phis.
5646 (sese_add_exit_phis_edge): Renamed scop_add_exit_phis_edge.
5647 (rewrite_into_sese_closed_ssa): Renamed scop_insert_phis_for_liveouts.
5648 (scop_adjust_phis_for_liveouts): New.
5649 (gloog): Call scop_adjust_phis_for_liveouts.
5651 * graphite.h (struct sese): Documented. Added fields liveout,
5653 (SESE_LIVEOUT, SESE_LIVEIN, SESE_LIVEIN_VER, SESE_NUM_VER): New.
5654 (new_sese, free_sese, sese_build_livein_liveouts): Declared.
5655 (struct scop): Added field liveout_renames.
5656 (SCOP_LIVEOUT_RENAMES): New.
5658 2008-12-11 Sebastian Pop <sebastian.pop@amd.com>
5660 PR tree-optimization/38409
5661 * gcc.dg/graphite/pr38409.c: New.
5662 * graphite.c (nb_reductions_in_loop): Use simple_iv.
5664 2008-12-11 Sebastian Pop <sebastian.pop@amd.com>
5666 * graphite.c (gcc_type_for_cloog_iv): By default return
5668 (graphite_create_new_loop): Don't fold_convert the already
5669 fold_convert-ed expression.
5671 2008-12-11 Harsha Jagasia <harsha.jagasia@amd.com>
5673 PR tree-optimization/38446
5674 * gcc.dg/graphite/pr38446.c: New.
5675 * graphite.c (register_bb_in_sese): New.
5676 (bb_in_sese_p): Check if bb belongs to sese region by explicitly
5677 looking at the bbs in the region.
5678 * graphite.h (sese): Add region_basic_blocks pointer set to
5679 structure and initialize at the time of defining new scop.
5681 2008-12-11 Tobias Grosser <grosser@fim.uni-passau.de>
5683 * graphite.c (new_graphite_bb): Initialize GBB_STATIC_SCHEDULE.
5684 (find_params_in_bb): Do not free data refs.
5685 (free_graphite_bb): Add FIXME on disabled free_data_refs.
5687 2008-12-11 Sebastian Pop <sebastian.pop@amd.com>
5689 * gcc.dg/graphite/scop-16.c: Test only scop specific info.
5690 * gcc.dg/graphite/scop-17.c: Same.
5691 * gcc.dg/graphite/block-5.c: New.
5692 * gcc.dg/graphite/block-6.c: New.
5693 * gcc.dg/graphite/pr37485.c: Clean dump file after.
5694 * gcc.dg/graphite/pr37684.c: Same.
5695 * gcc.dg/graphite/block-2.c: Same.
5697 * graphite.c (struct ivtype_map_elt): New.
5698 (debug_ivtype_elt, debug_ivtype_map_1, debug_ivtype_map,
5699 new_ivtype_map_elt, ivtype_map_elt_info, eq_ivtype_map_elts,
5700 gcc_type_for_cloog_iv): New.
5701 (loop_iv_stack_patch_for_consts): Use the type of the induction
5702 variable from the original loop, except for the automatically
5703 generated loops, i.e., in the case of a strip-mined loop, in
5704 which case there is no original loop: in that case just use
5706 (new_graphite_bb): Initialize GBB_CLOOG_IV_TYPES.
5707 (free_graphite_bb): Free GBB_CLOOG_IV_TYPES.
5708 (clast_name_to_gcc): Accept params to be NULL.
5709 (clast_to_gcc_expression): Take an extra parameter for the type.
5710 Convert to that type all the expressions built by this function.
5711 (gcc_type_for_clast_expr, gcc_type_for_clast_eq): New.
5712 (graphite_translate_clast_equation): Compute the type of the
5713 clast_equation before translating its LHS and RHS.
5714 (clast_get_body_of_loop, gcc_type_for_iv_of_clast_loop): New.
5715 (graphite_create_new_loop): Compute the type of the induction
5716 variable before translating the lower and upper bounds and before
5717 creating the induction variable.
5718 (rename_variables_from_edge, rename_phis_end_scop): New.
5719 (copy_bb_and_scalar_dependences): Call rename_phis_end_scop.
5720 (sese_add_exit_phis_edge): Do not use integer_zero_node.
5721 (find_cloog_iv_in_expr, compute_cloog_iv_types_1,
5722 compute_cloog_iv_types): New.
5723 (gloog): Call compute_cloog_iv_types before starting the
5724 translation of the clast.
5726 * graphite.h (struct graphite_bb): New field cloog_iv_types.
5727 (GBB_CLOOG_IV_TYPES): New.
5728 (debug_ivtype_map): Declared.
5729 (oldiv_for_loop): New.
5731 2008-12-10 Tobias Grosser <grosser@fim.uni-passau.de>
5734 * graphite.c (new_scop): Initialize SCOP_ADD_PARAMS.
5735 (param_index): Assert if parameter is not know after parameter
5737 (find_params_in_bb): Detect params directly in GBB_CONDITIONS.
5738 (find_scop_parameters): Mark, that we have finished parameter
5740 (graphite_transform_loops): Move condition detection before parameter
5742 * graphite.h (struct scop): Add SCOP_ADD_PARAMS.
5743 * gfortran.dg/graphite/pr38459.f90: New.
5745 2008-12-09 Tobias Grosser <grosser@fim.uni-passau.de>
5747 * graphite.c (graphite_transform_loops): Always call find_transform ()
5748 in ENABLE_CHECKING. So we test these code paths, even if we do not
5751 2008-12-09 Tobias Grosser <grosser@fim.uni-passau.de>
5753 * graphite.c (print_graphite_bb): Fix printing to file != dump_file.
5754 (print_scop): Ditto.
5756 2008-12-08 Tobias Grosser <grosser@fim.uni-passau.de>
5759 Fix gfortran.dg/graphite/id-3.f90.
5760 * graphite.c (scopdet_basic_block_info): Fix bug that found some
5761 regions more than once.
5763 2008-12-03 Sebastian Pop <sebastian.pop@amd.com>
5765 Fix gfortran.dg/graphite/id-4.f90.
5766 * graphite.c (scan_tree_for_params): Do not compute the multiplicand
5769 2008-12-03 Sebastian Pop <sebastian.pop@amd.com>
5771 Fix gfortran.dg/graphite/id-1.f90.
5772 * graphite.c (gmp_cst_to_tree): Pass the type in parameter.
5773 (loop_iv_stack_patch_for_consts): Update use of gmp_cst_to_tree.
5774 (max_precision_type): New.
5775 (value_clast): Removed.
5776 (clast_to_gcc_expression): Be more careful to types of expressions.
5777 Use max_precision_type and update use of gmp_cst_to_tree.
5778 (graphite_translate_clast_equation): Use max_precision_type.
5779 (graphite_create_guard_cond_expr): Do not use integer_type_node,
5780 use the type of the condition.
5781 (graphite_create_new_loop): Do not use integer_type_node, use the
5782 max_precision_type of lb and ub.
5784 2008-12-03 Sebastian Pop <sebastian.pop@amd.com>
5786 * graphite.c (build_scops_1): Initialize open_scop.exit
5789 2008-12-02 Sebastian Pop <sebastian.pop@amd.com>
5791 * gcc.dg/graphite/pr38084.c: New.
5792 * gfortran.dg/graphite/id-1.f90: New.
5793 * gfortran.dg/graphite/id-2.f90: New.
5794 * gfortran.dg/graphite/id-3.f90: New.
5795 * gfortran.dg/graphite/id-4.f90: New.
5796 * gfortran.dg/graphite/pr37857.f90: New.
5798 2008-12-02 Sebastian Pop <sebastian.pop@amd.com>
5799 Jan Sjodin <jan.sjodin@amd.com>
5800 Harsha Jagasia <harsha.jagasia@amd.com>
5812 * gcc.dg/graphite/pr38073.c: New.
5813 * gcc.dg/graphite/pr37928.c: New.
5814 * gcc.dg/graphite/pr37883.c: New.
5815 * gcc.dg/graphite/pr38125.c: New.
5816 * gfortran.dg/graphite/pr38083.f90: New.
5817 * gfortran.dg/graphite/pr37852.f90: New.
5818 * gfortran.dg/graphite/pr37980.f90: New.
5820 * gcc.dg/graphite/scop-18.c: Remove reduction, test for
5821 the number of detected scops. Copy exact same test for loop
5823 * gcc.dg/graphite/block-1.c: Fix the number of expected
5824 loops to be blocked as reductions are not handled.
5825 * gcc.dg/graphite/block-4.c: ...here. New.
5827 * tree-phinodes.c (remove_phi_nodes): New, extracted from...
5828 * tree-cfg.c (remove_phi_nodes_and_edges_for_unreachable_block):
5830 * tree-flow.h (remove_phi_nodes, canonicalize_loop_ivs): Declared.
5831 * Makefile.in (graphite.o): Depend on value-prof.h.
5832 (graphite.o-warn): Removed -Wno-error.
5833 * tree-parloops.c (canonicalize_loop_ivs): Allow reduction_list
5834 to be a NULL pointer. Call update_stmt. Return the newly created
5835 cannonical induction variable.
5837 * graphite.h (debug_rename_map): Declared. Fix some comments.
5839 * graphite.c: Reimplement the code generation from graphite to gimple.
5840 Include value-prof.h.
5841 (loop_iv_stack_get_iv): Do not return NULL for constant substitutions.
5842 (get_old_iv_from_ssa_name): Removed.
5843 (graphite_stmt_p): New.
5844 (new_graphite_bb): Test for useful statements before building a
5845 graphite statement for the basic block.
5846 (free_graphite_bb): Do not free GBB_DATA_REFS: this is a bug
5847 in free_data_ref that calls BITMAP_FREE (DR_VOPS (dr)) without
5849 (recompute_all_dominators, graphite_verify,
5850 nb_reductions_in_loop, graphite_loop_normal_form): New.
5851 (scop_record_loop): Call graphite_loop_normal_form.
5852 (build_scop_loop_nests): Iterate over all the blocks of the
5853 function instead of relying on the incomplete information from
5854 SCOP_BBS. Return the success of the operation.
5855 (find_params_in_bb): Use the data from GBB_DATA_REFS.
5856 (add_bb_domains): Removed.
5857 (build_loop_iteration_domains): Don't call add_bb_domains.
5858 Add the iteration domain only to the basic blocks that have been
5859 translated to graphite.
5860 (build_scop_conditions_1): Add constraints only if the basic
5861 block have been translated to graphite.
5862 (build_scop_data_accesses): Completely disabled until data
5863 dependence is correctly implemented.
5864 (debug_rename_elt, debug_rename_map_1, debug_rename_map): New.
5865 (remove_all_edges_1, remove_all_edges): Removed.
5866 (get_new_name_from_old_name): New.
5867 (graphite_rename_variables_in_stmt): Renamed
5868 rename_variables_in_stmt. Call get_new_name_from_old_name.
5869 Use replace_exp and update_stmt.
5870 (is_old_iv): Renamed is_iv.
5871 (expand_scalar_variables_stmt): Extra parameter for renaming map.
5872 Use replace_exp and update_stmt.
5873 (expand_scalar_variables_expr): Same. Use the map to get the
5874 new names for the renaming of induction variables and for the
5875 renaming of variables after a basic block has been copied.
5876 (expand_scalar_variables): Same.
5877 (graphite_rename_variables): Renamed rename_variables.
5878 (move_phi_nodes): Removed.
5879 (get_false_edge_from_guard_bb): New.
5880 (build_iv_mapping): Do not insert the induction variable of a
5881 loop in the renaming iv map if the basic block does not belong
5883 (register_old_new_names, graphite_copy_stmts_from_block,
5884 copy_bb_and_scalar_dependences): New.
5885 (translate_clast): Heavily reimplemented: copy basic blocks,
5886 do not move them. Finally, in call cleanup_tree_cfg in gloog.
5887 At each translation step call graphite_verify ensuring the
5888 consistency of the SSA, loops and dominators information.
5889 (collect_virtual_phis, find_vdef_for_var_in_bb,
5890 find_vdef_for_var_1, find_vdef_for_var,
5891 patch_phis_for_virtual_defs): Removed huge hack.
5892 (mark_old_loops, remove_dead_loops, skip_phi_defs,
5893 collect_scop_exit_phi_args, patch_scop_exit_phi_args,
5894 gbb_can_be_ignored, scop_remove_ignoreable_gbbs, ): Removed.
5895 (remove_sese_region, ifsese, if_region_entry, if_region_exit,
5896 if_region_get_condition_block, if_region_set_false_region,
5897 create_if_region_on_edge, move_sese_in_condition, bb_in_sese_p,
5898 sese_find_uses_to_rename_use, sese_find_uses_to_rename_bb,
5899 sese_add_exit_phis_edge, sese_add_exit_phis_var,
5900 rewrite_into_sese_closed_ssa): New.
5901 (gloog): Remove dead code. Early return if code cannot be
5902 generated. Call cleanup_tree_cfg once the scop has been code
5904 (graphite_trans_scop_block, graphite_trans_loop_block): Do not
5905 block loops with less than two loops.
5906 (graphite_apply_transformations): Remove the call to
5907 scop_remove_ignoreable_gbbs.
5908 (limit_scops): When build_scop_loop_nests fails, continue on
5909 the next scop. Fix open_scop.entry.
5910 (graphite_transform_loops): Call recompute_all_dominators: force the
5911 recomputation of correct CDI_DOMINATORS and CDI_POST_DOMINATORS.
5912 Call initialize_original_copy_tables and free_original_copy_tables
5913 to be able to copy basic blocks during code generation.
5914 When build_scop_loop_nests fails, continue on next scop.
5915 (value_clast): New union.
5916 (clast_to_gcc_expression): Fix type cast warning.
5918 2008-11-09 Sebastian Pop <sebastian.pop@amd.com>
5920 * Merge from mainline (r140838:141727).
5922 2008-11-05 Tobias Grosser <grosser@fim.uni-passau.de>
5926 * graphite.c (scan_tree_for_params): Add POINTER_PLUS_EXPR.
5928 2008-11-05 Tobias Grosser <grosser@fim.uni-passau.de>
5932 * graphite.c (scopdet_basic_block_info): Fix loops with multiple
5933 exits and conditions.
5934 * gcc.dg/graphite/pr37943.c: New.
5936 2008-10-23 Tobias Grosser <grosser@fim.uni-passau.de>
5939 * graphite.c (gloog): Replace EXIT_BLOCK_PTR with scop exit.
5941 2008-10-23 Tobias Grosser <grosser@fim.uni-passau.de>
5943 * doc/invoke.texi: Fix spaces.
5945 2008-10-22 Sebastian Pop <sebastian.pop@amd.com>
5947 PR tree-optimization/37891
5948 Reverted last commit.
5949 * graphite.c (create_single_entry_edge): Set
5950 EDGE_IRREDUCIBLE_LOOP and BB_IRREDUCIBLE_LOOP.
5952 2008-10-21 Sebastian Pop <sebastian.pop@amd.com>
5953 Mitul Thakkar <mitul.thakkar@amd.com>
5955 * graphite.c (create_single_entry_edge): Set
5956 EDGE_IRREDUCIBLE_LOOP and BB_IRREDUCIBLE_LOOP.
5958 2008-10-16 Tobias Grosser <grosser@fim.uni-passau.de>
5960 * doc/invoke.texi: Add -fgraphite-identity.
5961 * graphite.c (graphite_apply_transformations): Check for
5962 -fgraphite-identity.
5963 * toplev.c (process_options): Add flag_graphite_identity.
5964 * tree-ssa-loop.c: Add flag_graphite_identity.
5966 2008-10-14 Sebastian Pop <sebastian.pop@amd.com>
5968 Undo changes from 2008-10-02:
5969 * tree-ssa-loop-ivopts.c (rewrite_use_nonlinear_expr): Convert
5970 operand type when copying the operand to a variable of different type.
5971 * cfgloopmanip.c (create_empty_loop_on_edge): Write exit condition
5972 with the IV name after increment.
5974 2008-10-14 Sebastian Pop <sebastian.pop@amd.com>
5975 Harsha Jagasia <harsha.jagasia@amd.com>
5977 PR tree-optimization/37828
5978 * gcc.dg/graphite/pr37828.c: New.
5979 * graphite.c (graphite_trans_loop_block): Do not loop block
5980 single nested loops.
5982 2008-10-09 Harsha Jagasia <harsha.jagasia@amd.com>
5983 Sebastian Pop <sebastian.pop@amd.com>
5985 * graphite.c (struct rename_map_elt, new_rename_map_elt,
5986 rename_map_elt_info, eq_rename_map_elts): New.
5987 (graphite_rename_ivs_stmt): Renamed graphite_rename_variables_in_stmt.
5988 (expand_scalar_variables_expr): Change parameters.
5989 (expand_scalar_variables_stmt): Same.
5990 (expand_scalar_variables): Same.
5991 (graphite_rename_ivs): Rename graphite_rename_variables.
5992 (build_iv_mapping): New.
5993 (translate_clast): Call build_iv_mapping.
5994 * graphite.h (gbb_p): New name.
5996 2008-10-03 Harsha Jagasia <harsha.jagasia@amd.com>
5998 PR tree-optimization/37684
5999 * gcc.dg/graphite/pr37684.c: New.
6000 * graphite.c (exclude_component_ref): New.
6001 (is_simple_operand): Call exclude_component_ref.
6003 2008-10-02 Jan Sjodin <jan.sjodin@amd.com>
6004 Harsha Jagasia <harsha.jagasia@amd.com>
6006 PR tree-optimization/37485
6007 * gcc.dg/graphite/block-2.c: New
6008 * graphite.c (gmp_cst_to_tree): Moved.
6009 (iv_stack_entry_is_constant): New.
6010 (iv_stack_entry_is_iv): New.
6011 (loop_iv_stack_push): Renamed to loop_iv_stack_push_iv.
6012 (loop_iv_stack_insert_constant): New.
6013 (loop_iv_stack_pop): Use new datatpype.
6014 (loop_iv_stack_get_iv): Same.
6015 (loop_iv_stack_get_iv_from_name): Same.
6016 (loop_iv_stack_debug): Renamed to debug_loop_iv_stack.
6017 (loop_iv_stack_patch_for_consts): New.
6018 (loop_iv_stack_remove_constants): New.
6019 (graphite_create_new_loop): Use loop_iv_stack_push_iv.
6020 (translate_clast): Call loop_iv_stack_patch_for_consts and
6021 loop_iv_stack_remove_constants.
6022 (gloog): Use new datatype. Redirect construction edge to end
6023 block to avoid accidental deletion.
6024 * graphite.h (enum iv_stack_entry_kind): New. Tag for data in
6026 (union iv_stack_entry_data): New. Data in iv stack entry.
6027 (struct iv_stack_entry): New. Datatype for iv stack entries.
6029 2008-10-02 Sebastian Pop <sebastian.pop@amd.com>
6031 * tree-ssa-loop-ivopts.c (rewrite_use_nonlinear_expr): Convert
6032 operand type when copying the operand to a variable of different type.
6034 2008-10-02 Sebastian Pop <sebastian.pop@amd.com>
6036 * cfgloopmanip.c (create_empty_loop_on_edge): Write exit condition
6037 with the IV name after increment.
6039 2008-10-02 Sebastian Pop <sebastian.pop@amd.com>
6041 * Merge from mainline (r140164:140838).
6043 2008-09-10 Konrad Trifunovic <konrad.trifunovic@inria.fr>
6045 * graphite-data-ref.c: New.
6046 * graphite.c (print_scop): Also dump the dependence graph.
6047 (bb_in_scop_p, loop_in_scop_p, nb_loops_around_gb): Moved...
6048 (new_scop): Initialize SCOP_DEP_GRAPH.
6049 (build_scop_dynamic_schedules): New.
6050 (build_access_matrix_with_af): Fixed column numbering.
6051 (graphite_transform_loops): Call build_scop_dynamic_schedules.
6052 * graphite.h: Add ifndef/define guards against multiple inclusion.
6053 (struct scop): Add dep_graph field.
6054 (SCOP_DEP_GRAPH): Defined.
6055 (ref_nb_loops): Fixed and moved to other position.
6056 (bb_in_scop_p, loop_in_scop_p, nb_loops_around_gb): ... here.
6057 (nb_loops_around_loop_in_scop): New.
6058 (graphite_dump_dependence_graph): Declared.
6059 (graphite_build_rdg_all_levels): Declared.
6060 (graphite_test_dependence): Declared.
6061 * Makefile.in (graphite-data-ref.o): New target.
6063 2008-09-09 Sebastian Pop <sebastian.pop@amd.com>
6065 * Merge from mainline (139870:140164).
6067 2008-09-01 Sebastian Pop <sebastian.pop@amd.com>
6069 * Merge from mainline (138275:139870).
6070 * gcc.dg/graphite/scop-matmult.c: XFailed as one of
6071 the commits from trunk broke the niter detection.
6073 2008-09-01 Sebastian Pop <sebastian.pop@amd.com>
6075 * graphite.c: Add more documentation. Fix formatting.
6076 (debug_loop_vec, debug_oldivs, loop_iv_stack,
6077 loop_iv_stack_debug): Moved...
6078 (schedule_to_scattering): Move before use.
6079 (dot_all_scops): Include in "#if 0" the code for system
6082 * graphite.h: (debug_loop_vec, debug_oldivs, loop_iv_stack,
6083 loop_iv_stack_debug): ...here.
6085 2008-08-29 Jan Sjodin <jan.sjodin@amd.com>
6087 * tree-phinodes.c (make_phi_node): Extern.
6088 (add_phi_node_to_bb): New.
6089 (create_phi_node): Call add_phi_node_to_bb.
6090 * tree-ssa-loop-ivopts.c (get_phi_with_result): New.
6091 (remove_statement): Handle case where stored phi was updated
6092 and is no longer the same.
6093 * graphite.c (is_parameter): New.
6095 (expand_scalar_variables_expr): New.
6096 (expand_scalar_variables_stmt): New.
6097 (expand_scalar_variables): New.
6098 (move_phi_nodes): Create new phi instead of moving old one.
6099 (translate_clast): Call expand_scalar_variables.
6100 (find_vdef_for_var_in_bb): Also scan regular definitions.
6101 (skip_phi_defs): New.
6102 (collect_scop_exit_phi_args): New.
6103 (patch_scop_exit_phi_args): New.
6104 (gloog): Patch phis after scop.
6105 * tree-flow.h: (add_phi_node_to_bb): Declared.
6106 (make_phi_node): Declared.
6108 2008-08-26 Sebastian Pop <sebastian.pop@amd.com>
6110 * graphite.c (end_scop): Split the entry of the scop when it
6111 is the header of the loop in which the scop is ending.
6112 (build_scops_1, limit_scops): Update uses of end_scop.
6114 2008-08-26 Sebastian Pop <sebastian.pop@amd.com>
6116 * graphite.c (dot_all_scops_1): Do not fail on uninitialized
6117 SCOP_ENTRY or SCOP_EXIT.
6119 2008-08-25 Sebastian Pop <sebastian.pop@amd.com>
6121 * graphite.c (get_construction_edge): Removed.
6122 (gloog): Construction edge is the scop entry edge.
6124 2008-08-25 Sebastian Pop <sebastian.pop@amd.com>
6126 * graphite.c (can_generate_for_scop): Removed.
6127 (gloog): Do not call it.
6129 2008-08-25 Sebastian Pop <sebastian.pop@amd.com>
6131 * graphite.c (new_scop): Entry of a scop is an edge.
6132 Initialize SESE region.
6133 (free_scop): Free SESE region.
6134 (build_scops_1, scopdet_bb_info): Work on edges, not on bbs.
6135 (split_difficult_bb): New, split from end_scop.
6136 (end_scop): Exit of a scop is an edge.
6137 (build_scop_bbs): Never check CDI_POST_DOMINATORS: this info is
6138 not automatically updated and thus is always wrong.
6139 * graphite.h (struct sese): New.
6142 (struct scop): New field for a SESE region. Remove entry, exit.
6143 (SCOP_ENTRY, SCOP_EXIT): Update definitions to match same
6144 semantics as before. Moved comment around.
6146 2008-08-25 Tobias Grosser <grosser@fim.uni-passau.de>
6147 Sebastian Pop <sebastian.pop@amd.com>
6149 * graphite.c (graphite_transform_loops): Always enable gloog
6150 and find_transform when ENABLE_CHECKING.
6152 2008-08-25 Sebastian Pop <sebastian.pop@amd.com>
6154 * graphite.c (graphite_transform_loops): Move pretty printer
6155 of SCOPs before doing any transform. Remove call to print_scops
6156 and dot_all_scops_1.
6158 2008-08-25 Sebastian Pop <sebastian.pop@amd.com>
6160 * graphite.c (dump_gbb_conditions): Don't try to print NULL pointers.
6161 (print_graphite_bb): Same.
6163 2008-08-25 Sebastian Pop <sebastian.pop@amd.com>
6165 * graphite.c (dot_all_scops_1): Cleanup.
6166 (move_scops): Fix comment.
6168 2008-08-25 Sebastian Pop <sebastian.pop@amd.com>
6170 * graphite.c (build_scop_bbs): Revert commit 139355:
6172 2008-08-20 Sebastian Pop <sebastian.pop@amd.com>
6173 Dwarakanath Rajagopal <dwarak.rajagopal@amd.com>
6175 * graphite.c (build_scop_bbs): Factor up code.
6177 2008-08-25 Tobias Grosser <grosser@fim.uni-passau.de>
6179 * graphite.c (gloog): Update dominator info.
6181 2008-08-25 Tobias Grosser <grosser@fim.uni-passau.de>
6183 * graphite.c (remove_cond_exprs): Do not fail on empty bbs.
6185 2008-08-24 Sebastian Pop <sebastian.pop@amd.com>
6187 * graphite.c (new_graphite_bb): Remove GBB_INDEX_TO_NUM_MAP
6189 (free_graphite_bb): Remove GBB_INDEX_TO_NUM_MAP free.
6190 (translate_clast): Correct formatting.
6191 * graphite.h (struct num_map): Removed.
6192 (struct graphite_bb): Remove num_map field.
6193 (GBB_INDEX_TO_NUM_MAP): Removed.
6195 2008-08-24 Sebastian Pop <sebastian.pop@amd.com>
6197 * graphite.c (build_access_matrix_with_af): Fix comments.
6198 (build_scop_data_accesses): Same.
6200 2008-08-24 Sebastian Pop <sebastian.pop@amd.com>
6202 * graphite.c (build_scop_data_accesses): Don't construct
6203 access matrices. Add a FIXME and an assert condition that
6204 should pass when the access matrices will be needed.
6206 2008-08-24 Sebastian Pop <sebastian.pop@amd.com>
6208 * tree-data-ref.c (stmt_simple_memref_p): Don't call
6210 * graphite.c (build_graphite_bb): Renamed new_graphite_bb.
6211 Moved close by free_graphite_bb.
6212 (free_graphite_bb): Call free_data_refs. Reset bb->aux.
6213 (new_scop): Move close by free_scop.
6214 (graphite_transform_loops): Avoid linear scan to reset bb->aux.
6216 2008-08-22 Jan Sjodin <jan.sjodin@amd.com>
6218 * cfgloopmanip.c (create_empty_if_region_on_edge): New.
6219 * graphite.c (clast_to_gcc_expression): Call gmp_cst_to_tree
6220 instead of recursive call.
6221 (graphite_translate_clast_equation): New.
6222 (graphite_create_guard_cond_expr): New.
6223 (graphite_create_new_guard): New.
6224 (get_stack_index_from_iv): Removed.
6225 (graphite_rename_ivs_stmt): Use gbb_loop_index.
6226 (get_true_edge_from_guard_bb): New.
6227 (translate_clast): Handle stmt_guard in clast.
6228 (get_construction_edge): Allow construction edge detection for
6229 a scope entry with multiple predecessors if one predecessor is
6230 the immediate dominator of scope entry.
6231 (can_generate_code_stmt): Enable code generation for clast_guard.
6232 (gloog): Use correct context loop. Removed check for post dominators.
6233 * cfgloop.h (create_empty_if_region_on_edge): Declared.
6235 2008-08-21 Sebastian Pop <sebastian.pop@amd.com>
6237 * graphite.c (remove_dead_loops): Document better which
6240 2008-08-21 Sebastian Pop <sebastian.pop@amd.com>
6242 * Makefile.in: Rename POLYLIBLIBS and POLYLIBINC to PPLLIBS
6244 (graphite.o): Also depends on pointer-set.h.
6246 2008-08-21 Sebastian Pop <sebastian.pop@amd.com>
6248 * graphite.c (scop_record_loop): Fix compile warning.
6250 2008-08-21 Harsha Jagasia <harsha.jagasia@amd.com>
6251 Sebastian Pop <sebastian.pop@amd.com>
6253 * graphite.c (scop_record_loop): DECL_NAME can be NULL.
6255 2008-08-21 Sebastian Pop <sebastian.pop@amd.com>
6257 * graphite.c (build_graphite_bb): Initialize bb->aux to
6258 point to the graphite_bb_p.
6259 (graphite_bb_from_bb): Renamed gbb_from_bb; returns the
6261 (add_bb_domains): Does not use the scop parameter.
6262 (graphite_transform_loops): Clean bb->aux at the end.
6264 2008-08-20 Dwarakanath Rajagopal <dwarak.rajagopal@amd.com>
6265 Sebastian Pop <sebastian.pop@amd.com>
6267 * lib/target-supports.exp
6268 (check_effective_target_fgraphite): New.
6270 * gcc.dg/graphite/graphite.exp: Early exit when
6271 check_effective_target_fgraphite returns false.
6272 Set dg-do-what-default to compile.
6273 (scan-graphite-dump-times): Removed.
6274 * gfortran.dg/graphite/graphite.exp: Same.
6276 * gcc.dg/graphite/scop-0.c: Do not use "dg-do compile".
6277 Use scan-tree-dump-times instead of scan-graphite-dump-times.
6278 * gcc.dg/graphite/scop-1.c: Same.
6279 * gcc.dg/graphite/scop-2.c: Same.
6280 * gcc.dg/graphite/scop-3.c: Same.
6281 * gcc.dg/graphite/scop-4.c: Same.
6282 * gcc.dg/graphite/scop-5.c: Same.
6283 * gcc.dg/graphite/scop-6.c: Same.
6284 * gcc.dg/graphite/scop-7.c: Same.
6285 * gcc.dg/graphite/scop-8.c: Same.
6286 * gcc.dg/graphite/scop-9.c: Same.
6287 * gcc.dg/graphite/scop-10.c: Same.
6288 * gcc.dg/graphite/scop-11.c: Same.
6289 * gcc.dg/graphite/scop-12.c: Same.
6290 * gcc.dg/graphite/scop-13.c: Same.
6291 * gcc.dg/graphite/scop-matmult.c: Same.
6292 * gcc.dg/graphite/scop-14.c: Same.
6293 * gcc.dg/graphite/scop-15.c: Same.
6294 * gcc.dg/graphite/block-0.c: Same.
6295 * gcc.dg/graphite/scop-16.c: Same.
6296 * gcc.dg/graphite/block-1.c: Same.
6297 * gcc.dg/graphite/scop-17.c: Same.
6298 * gcc.dg/graphite/scop-18.c: Same.
6299 * gfortran.dg/graphite/block-1.f90: Same.
6300 * gfortran.dg/graphite/scop-1.f: Same.
6301 * gfortran.dg/graphite/block-2.f: Same.
6303 2008-08-20 Sebastian Pop <sebastian.pop@amd.com>
6305 * graphite.c: Fix some XXX comments.
6306 (build_scop_dynamic_schedules): Removed.
6308 2008-08-20 Sebastian Pop <sebastian.pop@amd.com>
6310 * graphite.h (scop_max_loop_depth): Moved...
6311 * graphite.c (scop_max_loop_depth): ...here.
6312 (remove_all_edges_1): New.
6313 (remove_all_edges): Factored code.
6314 (remove_cond_exprs): Check only the last statement for
6315 a GIMPLE_COND expression.
6317 2008-08-20 Sebastian Pop <sebastian.pop@amd.com>
6319 * graphite.c (scan_tree_for_params): Early return when the
6320 expression is a chrec_dont_know. Handle case NEGATE_EXPR.
6321 (find_scop_parameters): Factor out code.
6322 (graphite_trans_bb_strip_mine): Remove dead code.
6324 2008-08-20 Sebastian Pop <sebastian.pop@amd.com>
6326 * graphite.c (clast_to_gcc_expression, graphite_create_new_loop,
6327 graphite_trans_bb_move_loop): Factor asserts.
6328 (gloog): Perform sanity checks only for ENABLE_CHECKING.
6329 Do not call calculate_dominance_info and estimate_bb_frequencies.
6331 2008-08-20 Jan Sjodin <jan.sjodin@amd.com>
6333 * graphite.c (create_loops_mapping, free_loops_mapping,
6334 create_loops_mapping_num, debug_loop_mapping_1,
6335 debug_loop_mapping, graphite_loops_mapping_max_loop_num,
6336 get_loop_mapping_for_num, graphite_loops_mapping_add_child,
6337 graphite_loops_mapping_add_child_num,
6338 graphite_loops_mapping_insert_child,
6339 graphite_loops_mapping_parent, get_loop_mapped_depth_for_num,
6340 get_loop_mapped_depth, split_loop_mapped_depth_for_num,
6341 loop_mapped_depth_split_loop, swap_loop_mapped_depth_for_num,
6342 create_num_from_index, get_num_from_index,
6343 swap_loop_mapped_depth): Removed.
6344 (new_scop): Do not initialize SCOP_LOOPS_MAPPING.
6345 (free_scop): Do not call free_loops_mapping.
6346 (graphite_get_new_iv_stack_index_from_old_iv): Renamed
6347 get_stack_index_from_iv. Use GBB_LOOPS instead of calling
6348 get_loop_mapped_depth.
6349 (graphite_trans_bb_move_loop): Do not update the loop mapping.
6350 (graphite_trans_bb_strip_mine): Same.
6351 * graphite.h (graphite_loops_mapping, graphite_loop_node): Removed.
6352 (struct scop): Remove field loops_mapping.
6354 2008-08-20 Sebastian Pop <sebastian.pop@amd.com>
6355 Dwarakanath Rajagopal <dwarak.rajagopal@amd.com>
6357 * graphite.c (scop_record_loop): Factor out one level of the
6358 condition by early return.
6359 (build_scop_loop_nests): Format following FSF coding style.
6360 (build_scop_dynamic_schedules): Factor out code.
6361 (scopdet_bb_info): Reindent. Default case should not be reachable.
6363 2008-08-20 Sebastian Pop <sebastian.pop@amd.com>
6364 Dwarakanath Rajagopal <dwarak.rajagopal@amd.com>
6366 * graphite.c (loop_affine_expr): Check for DECL_P or struct
6367 assignments that are not handled as simple operands for now.
6369 2008-08-20 Sebastian Pop <sebastian.pop@amd.com>
6370 Dwarakanath Rajagopal <dwarak.rajagopal@amd.com>
6372 * graphite.c (build_scop_bbs): Factor up code.
6374 2008-08-20 Sebastian Pop <sebastian.pop@amd.com>
6375 Dwarakanath Rajagopal <dwarak.rajagopal@amd.com>
6377 * graphite.c (stmt_simple_for_scop_p): Factor code out
6379 (enum gbb_type): New. Group all the GBB_* types under it.
6380 (is_loop_exit): Moved...
6381 (end_scop): Enable BB spliting.
6382 * cfgloop.c (is_loop_exit): ...here. Reimplemented.
6383 * cfgloop.h (is_loop_exit): Declared.
6385 2008-08-20 Sebastian Pop <sebastian.pop@amd.com>
6387 * doc/invoke.texi: Remove strides from examples containing
6388 DO loops when the strides are equal to 1.
6390 2008-08-20 Harsha Jagasia <harsha.jagasia@amd.com>
6391 Dwarakanath Rajagopal <dwarak.rajagopal@amd.com>
6393 * graphite.c (graphite_trans_scop_block): Or the result with
6394 the result from graphite_trans_loop_block.
6395 * gcc.dg/graphite/block-1.c: New.
6396 * gfortran.dg/graphite/block-1.f90: New.
6397 * gfortran.dg/graphite/block-2.f: New.
6399 2008-08-20 Sebastian Pop <sebastian.pop@amd.com>
6401 * graphite.c (graphite_transform_loops): Call cloog_initialize
6404 2008-08-20 Sebastian Pop <sebastian.pop@amd.com>
6406 * tree-data-ref.c) (stmt_simple_memref_p): New.
6407 * tree-data-ref.h (stmt_simple_memref_p): Declared.
6408 * graphite.c (stmt_simple_memref_for_scop_p): Removed.
6409 (is_simple_operand): Call stmt_simple_memref_p.
6411 * gcc.dg/graphite/scop-matmult.c: Updated for not
6412 using pointer arithmetic, as this is optimized by PRE and
6413 makes the code too difficult to analyze.
6415 * gcc.dg/graphite/scop-18.c: Same.
6417 2008-08-20 Sebastian Pop <sebastian.pop@amd.com>
6419 * gdbinit.in (pgg): New.
6421 2008-08-15 Tobias Grosser <grosser@fim.uni-passau.de>
6423 * graphite.c (graphite_trans_loop_block): Fix warning.
6425 2008-08-15 Tobias Grosser <grosser@fim.uni-passau.de>
6427 * graphite.c (graphite_trans_loop_block): Fix my merge error.
6429 2008-08-15 Tobias Grosser <grosser@fim.uni-passau.de>
6431 * graphite.c (graphite_trans_bb_block): Remove check for
6432 flag_loop_strip_mine, flag_loop_block, flag_loop_interchange.
6433 Check if loop blocking is profitable for every loop, before applying
6435 (graphite_apply_transformations): Call graphite_trans_bb_block only,
6436 if flag_loop_block is set.
6438 2008-08-14 Sebastian Pop <sebastian.pop@amd.com>
6440 * graphite.c: Add some more documentation for the loop
6443 2008-08-14 Sebastian Pop <sebastian.pop@amd.com>
6445 * Makefile.in (tree-data-ref.o): Remove dependence on graphite.h.
6446 * graphite.c: Format on less than 80 columns.
6449 2008-08-14 Sebastian Pop <sebastian.pop@amd.com>
6451 * cfgloopmanip.c (loopify): Use update_dominators_in_loop.
6453 2008-08-14 Sebastian Pop <sebastian.pop@amd.com>
6455 * doc/invoke.texi (floop-block, floop-strip-mine,
6456 floop-interchange): Update documentation with examples.
6458 2008-08-13 Sebastian Pop <sebastian.pop@amd.com>
6460 * cfgloopmanip.c (create_empty_loop_on_edge): Don't call
6462 * graphite.c (graphite_create_new_loop): Call add_referenced_var.
6464 2008-08-13 Sebastian Pop <sebastian.pop@amd.com>
6466 * cfgloopmanip.c (create_empty_loop_on_edge): Improve documentation.
6467 Factor gcc_asserts into a single one. Use force_gimple_operand_gsi.
6468 * tree-scalar-evolution.c: Revert useless changes.
6469 * tree-phinodes.c: Same.
6472 * tree-vectorizer.h: Same.
6473 * tree-flow.h: Same.
6475 * common.opt (fgraphite): Update documentation.
6477 2008-08-12 Harsha Jagasia <harsha.jagasia@amd.com>
6479 * doc/invoke.texi (-floop-block, -floop-strip-mine,
6480 -floop-interchange): Add more text for explaining what each of these
6482 * tree-into-ssa.c (gimple_vec): Moved to...
6483 * graphite.c: Include gimple.h.
6484 (gimple_vec): Moved to...
6485 (del_loop_to_cloog_loop): Removed.
6486 (loop_affine_expr): Do not call create_data_ref when the
6487 operand is a constant.
6488 (new_scop): Use free instead of del_loop_to_cloog_loop.
6489 * Makefile.in (graphite.o): Depend on GIMPLE_H.
6490 * gimple.h (gimple_vec): ... here.
6492 2008-08-11 Tobias Grosser <grosser@fim.uni-passau.de>
6494 * graphite.c (scopdet_bb_info): Only allow loops with known number of
6496 (build_loop_iteration_domains): Fail, if latch executions unknown.
6498 2008-08-11 Tobias Grosser <grosser@fim.uni-passau.de>
6500 * graphite.c (add_conditions_to_domain): New.
6501 (build_scop_conditions_1): Call add_conditions_to_domain.
6502 (set_cloog_options): Allow to disable optimizations.
6504 2008-08-11 Tobias Grosser <grosser@fim.uni-passau.de>
6506 * graphite.c (find_params_in_bb): Look for parameters in conditions.
6507 Do not use walk_dominator_tree.
6508 (find_scop_parameters): Do not use walk_dominator_tree.
6510 2008-08-11 Tobias Grosser <grosser@fim.uni-passau.de>
6512 * graphite.c (scan_tree_for_params) Add / Subtract inequality.
6513 (idx_record_params): Adapt.
6514 * graphite.h (scop_gimple_loop_depth): New.
6516 2008-08-11 Tobias Grosser <grosser@fim.uni-passau.de>
6518 * graphite.c (build_scop_dynamic_schedules): Remove value_init.
6519 (scan_tree_for_params): Remove value_init.
6520 (build_scop_context): Remove value_init.
6521 (build_loop_iteration_domains): Remove value_init.
6522 (schedule_to_scattering): Remove value_init.
6523 (graphite_trans_bb_strip_mine): Remove value_init.
6525 2008-08-11 Tobias Grosser <grosser@fim.uni-passau.de>
6527 * gcc/graphite.c (limit_scops): New.
6528 (graphite_transform_loops): Add limit SCoPs.
6529 * gcc.dg/graphite/scop-0.c: Update number of SCoPs.
6530 * gcc.dg/graphite/scop-1.c: Update number of SCoPs.
6531 * gcc.dg/graphite/scop-10.c: Update number of SCoPs.
6532 * gcc.dg/graphite/scop-11.c: Update number of SCoPs.
6533 * gcc.dg/graphite/scop-12.c: Update number of SCoPs.
6534 * gcc.dg/graphite/scop-13.c: Update number of SCoPs.
6535 * gcc.dg/graphite/scop-14.c: Update number of SCoPs.
6536 * gcc.dg/graphite/scop-15.c: Update number of SCoPs.
6537 * gcc.dg/graphite/scop-16.c: Update number of SCoPs.
6538 Change loop numbers.
6539 * gcc.dg/graphite/scop-17.c: Update number of SCoPs.
6540 Change loop numbers.
6541 * gcc.dg/graphite/scop-18.c: Update number of SCoPs.
6542 * gcc.dg/graphite/scop-2.c: Update number of SCoPs.
6543 * gcc.dg/graphite/scop-3.c: Update number of SCoPs.
6544 * gcc.dg/graphite/scop-4.c: Update number of SCoPs.
6545 * gcc.dg/graphite/scop-5.c: Update number of SCoPs.
6546 * gcc.dg/graphite/scop-6.c: Update number of SCoPs.
6547 * gcc.dg/graphite/scop-7.c: Update number of SCoPs.
6548 * gcc.dg/graphite/scop-8.c: Update number of SCoPs.
6549 * gcc.dg/graphite/scop-9.c: Update number of SCoPs.
6550 * gcc.dg/graphite/scop-matmult.c: Update number of SCoPs.
6552 2008-08-11 Tobias Grosser <grosser@fim.uni-passau.de>
6554 * graphite.c (graphite_transform_loops): Call always find_transform.
6556 2008-08-08 Tobias Grosser <grosser@fim.uni-passau.de>
6558 * graphite.c (free_loops_mapping): New.
6559 (stmt_simple_for_scop_p): Fix typo.
6560 (stmt_simple_for_scop_p): Fix tuples functions, that
6562 (free_graphite_bb): Fix some memleaks.
6563 (free_scop): Fix some memleaks.
6564 (scopdet_bb_info): Do not forget some tmp SCoPs.
6565 (find_params_in_bb): Fix some memleaks.
6566 (clast_to_gcc_expression): Fix warning.
6568 2008-08-07 Tobias Grosser <grosser@fim.uni-passau.de>
6570 * gcc.dg/graphite/scop-16.c: Fix for 32bit.
6571 * gcc.dg/graphite/scop-17.c: Fix for 32bit.
6573 2008-08-04 Sebastian Pop <sebastian.pop@amd.com>
6575 * tree-ssa-loop.c (tree-ssa-loop.o): Do not include toplev.h.
6576 Move code ifdef-ed HAVE_cloog...
6577 * graphite.c: Include toplev.h.
6579 * Makefile.in (OBJS-common): Always build graphite.o.
6580 (BACKEND): Remove @GRAPHITE@.
6581 (tree-ssa-loop.o): Do not depend on TOPLEV_H.
6582 (graphite.o): Depend on TOPLEV_H.
6584 2008-08-04 Sebastian Pop <sebastian.pop@amd.com>
6586 * Makefile.in (tree-ssa-loop.o): Depend on TOPLEV_H.
6587 Remove typo left from polylib to ppl conversion.
6588 * graphite.c (graphite_transforms): Use sorry instead of fatal.
6590 2008-08-03 Sebastian Pop <sebastian.pop@amd.com>
6592 * toplev.c (process_options): Move the graphite loop optimization
6594 * tree-ssa-loop.c (graphite_transforms): ... here.
6595 When not configured with CLooG, print to dump_file that
6596 Graphite transforms were not performed.
6597 * gcc.dg/graphite/graphite.exp (scan-graphite-dump-times):
6599 * gcc.dg/graphite/*.c: Updated all testcases to use
6600 scan-graphite-dump-times.
6602 2008-08-03 Sebastian Pop <sebastian.pop@amd.com>
6604 * graphite.c (dot_scop, dot_all_scops): Do not call system.
6605 Do not open /tmp/scop.dot and /tmp/allscops.dot.
6607 2008-08-02 Sebastian Pop <sebastian.pop@amd.com>
6608 Jan Sjodin <jan.sjodin@amd.com>
6610 * configure: Regenerated.
6611 * omp-low.c (expand_omp_sections): Remove now unused code.
6612 * config.in (HAVE_polylib): Removed.
6613 * configure.ac (HAVE_polylib, POLYLIBLIBS, POLYLIBINC): Removed.
6614 (PPLLIBS, PPLINC): Added.
6615 * graphite.c: Replace unsigned with int wherever possible.
6616 Don't access Cloog's data structures, but use accessor functions.
6617 Clast's stmt->type is now implemented as a vtable: change the
6618 switches of stmt->type into ifs.
6619 (polylib/polylibgmp.h): Don't include.
6620 (initialize_dependence_polyhedron,
6621 initialize_data_dependence_polyhedron, is_empty_polyhedron,
6622 statement_precedes_p, test_dependence, build_rdg_all_levels,
6623 dump_dependence_graph): Removed until this code is cleaned up
6625 * Makefile.in (POLYLIBLIBS): Renamed PPLLIBS.
6626 (POLYLIBINC): Renamed PPLINC.
6628 2008-08-01 Harsha Jagasia <harsha.jagasia@amd.com>
6629 Dwarakanath Rajagopal <dwarak.rajagopal@amd.com>
6630 Jan Sjodin <jan.sjodin@amd.com>
6632 Finish the merge and tuplification of graphite.
6634 2008-07-24 Sebastian Pop <sebastian.pop@amd.com>
6635 Jan Sjodin <jan.sjodin@amd.com>
6637 Partial merge from mainline (138072:138275).
6638 * graphite.c still has to be tuplified.
6640 2008-07-29 Jan Sjodin <jan.sjodin@amd.com>
6642 * graphite.c (graphite_loops_mapping_max_loop_num): New.
6643 (create_num_from_index): New.
6644 (get_num_from_index): Also pass in the graphite BB.
6645 (free_graphite_bb): Free GBB_INDEX_TO_NUM_MAP.
6646 (build_graphite_bb): Initialize GBB_INDEX_TO_NUM_MAP.
6647 (graphite_trans_bb_strip_mine): Call create_num_from_index.
6648 (is_interchange_valid): Return false when failing.
6649 * graphite.h (struct num_map): New.
6650 (struct graphite_bb): New field num_map.
6651 (GBB_LOOPS_MAPPING): Renamed GBB_INDEX_TO_NUM_MAP.
6653 2008-07-29 Tobias Grosser <grosser@fim.uni-passau.de>
6655 * graphite.c (dump_gbb_conditions): Print also conditions like
6656 "if (a)". Remove dublicated code and use print_generic_expr ().
6657 (stmt_simple_for_scop_p): Only allow conditions we can handle
6660 2008-07-25 Jan Sjodin <jan.sjodin@amd.com>
6662 * graphite.h (struct scop): Removed new_ivs field.
6663 (SCOP_NEWIVS): Deleted.
6664 * graphite.c (new_scop, free_scop, clast_name_to_gcc,
6665 clast_to_gcc_expression, graphite_create_new_loop):
6666 Removed use of new_ivs.
6668 2008-07-25 Jan Sjodin <jan.sjodin@amd.com>
6670 * graphite.c (debug_oldivs, debug_loop_vec, create_loops_mapping,
6671 create_loops_mapping_num, debug_loop_mapping_1): New.
6672 (debug_loop_mapping): Call debug_loop_mapping_1.
6673 (get_loop_mapping_for_num,
6674 graphite_loops_mapping_add_child,
6675 graphite_loops_mapping_add_child_num,
6676 graphite_loops_mapping_insert_child,
6677 graphite_loops_mapping_parent,
6678 split_loop_mapped_depth_for_num,
6679 loop_mapped_depth_split_loop): New.
6680 (increment_loop_mapped_depths): Removed.
6681 (swap_loop_mapped_depth_for_num): Reimplemented.
6682 (new_scop): Call create_loops_mapping.
6683 (scop_record_loop): Call graphite_loops_mapping_insert_child.
6684 (translate_clast): Pass the old loop father in parameter, and pass
6685 it to get_old_iv_from_ssa_name.
6686 (remove_edges_around_useless_blocks, can_generate_code_stmt,
6687 can_generate_code, can_generate_for_scop): New.
6688 (graphite_trans_bb_block): Returns false when it fails to transform.
6689 * graphite.h (graphite_loop_node, graphite_loops_mapping): New.
6691 2008-07-25 Sebastian Pop <sebastian.pop@amd.com>
6693 Reverted all the changes related to the streamization and
6695 These changes are now tracked in the streamization branch.
6697 2008-07-25 Sebastian Pop <sebastian.pop@amd.com>
6698 Jan Sjodin <jan.sjodin@amd.com>
6700 * graphite.c (gbb_compare): Correctly constify.
6701 (gbb_can_be_ignored): Indent.
6702 (graphite_trans_scop_swap_1and2): Add legality check.
6705 2008-07-25 Sebastian Pop <sebastian.pop@amd.com>
6707 Remove fallouts from "Reverted the Condate changes".
6708 * tree.h: Remove unused decl.
6709 * gcc.dg/tree-checker: Same.
6710 * timevar.def: Remove counter.
6712 2008-07-24 Sebastian Pop <sebastian.pop@amd.com>
6714 * Merge from mainline (135673:138072).
6716 Reverted the MIRO changes (from 2008-04-05) that are now
6717 tracked in the miro branch.
6718 * tree-bounds.c: Removed.
6719 * tree-bounds.h: Removed.
6721 Reverted the Condate changes (from 2006-07-04, 2007-03-20) that
6722 are now tracked in the condate branch.
6723 * tree-check.c: Removed.
6724 * tree-match.c: Removed.
6725 * condate.y: Removed.
6727 2008-07-24 Dwarakanath Rajagopal <dwarak.rajagopal@amd.com>
6729 * common.opt: New user flag -floop-block, -floop-strip-mine
6730 and -floop-interchange.
6731 * toplev.c (process_options): Enable -fgraphite pass if any one of the
6732 graphite loop optimization flags is turned on.
6733 * graphite.c (graphite_apply_transformations): Add flag_loop_block,
6734 flag_loop_strip_mine and flag_loop_interchange checks before
6736 * doc/invoke.texi: Remove -fgraphite and add -floop-block,
6737 -floop-strip-mine and -floop-interchange.
6738 * gcc.dg/graphite/block-0.c: Add -floop-block and remove
6740 * gcc.dg/graphite/scop-16.c: Ditto.
6741 * gcc.dg/graphite/scop-17.c: Ditto.
6742 * gcc.dg/graphite/scop-18.c: Ditto.
6744 2008-07-23 Jan Sjodin <jan.sjodin@amd.com>
6745 Sebastian Pop <sebastian.pop@amd.com>
6747 * cfgloopmanip.c (update_dominators_in_loop): Make it static.
6748 (create_empty_loop_on_edge): More fixes.
6749 * tree-phinodes.c (resize_phi_node): Extern.
6750 (unlink_phi_node, move_phi_node): New split from remove_phi_node.
6751 * cfghooks.c (update_dominator_information): New split from
6753 * tree-vectorizer.c (rename_variables_in_bb): Extern.
6754 * tree-dfa.c (collect_dfa_stats): Start walking the CFG on the
6755 successor of the function entry block.
6757 * graphite.c: Include pointer-set.h.
6758 (debug_loop_mapping, increment_loop_mapped_depths,
6759 get_loop_mapped_depth_for_num, get_loop_mapped_depth,
6760 set_loop_mapped_depth_for_num, set_loop_mapped_depth,
6761 swap_loop_mapped_depth_for_num, get_num_from_index,
6762 swap_loop_mapped_depth, loop_iv_stack_debug,
6763 loop_iv_stack_push, loop_iv_stack_pop, loop_iv_stack_get_iv,
6764 loop_iv_stack_get_iv_from_name, loop_iv_stack_debug,
6765 get_old_iv_from_ssa_name): New.
6766 (new_scop): Initialize SCOP_LOOPS_MAPPING.
6767 (free_scop): Free SCOP_LOOPS_MAPPING.
6768 (scop_record_loop): Record old ivs.
6769 (create_var_name): Removed.
6770 (initialize_cloog_names): Allocate double space in case strip mine
6771 applies to all loops once.
6772 (clast_name_to_gcc): Look up in the map ivstack passed in parameter.
6773 (clast_to_gcc_expression): Same. Implement more clast to gimple
6775 (graphite_create_new_loop): Pass in ivstack.
6776 (remove_all_edges): Pass in the construction_edge.
6777 (graphite_remove_iv): Removed.
6778 (graphite_rename_ivs, graphite_rename_ivs_stmt,
6779 remove_cond_exprs): Rewritten.
6780 (move_phi_nodes): New.
6781 (disconnect_virtual_phi_nodes, disconnect_cond_expr): Removed.
6782 (translate_clast): Pass in ivstack. Rewrite some cases.
6783 (set_cloog_options, debug_clast_stmt): New.
6784 (find_transform): Use set_cloog_options.
6785 (outermost_loop_layer): Removed.
6786 (get_construction_edge, collect_virtual_phis, find_vdef_for_var_in_bb,
6787 find_vdef_for_var_1, find_vdef_for_var, patch_phis_for_virtual_defs,
6788 mark_old_loops, remove_dead_loops): New.
6790 (graphite_trans_bb_move_loop): Call swap_loop_mapped_depth.
6791 (const_column_index, get_first_matching_sign_row_index,
6792 get_lower_bound_row, get_upper_bound_row, get_lower_bound,
6793 get_upper_bound): New.
6794 (graphite_trans_bb_strip_mine): Also update the iv map.
6796 * graphite.h (graphite_loops_mapping, GBB_LOOPS_MAPPING): New.
6797 (struct name_tree): Add a loop field.
6798 (struct scop): Add a graphite_loops_mapping field.
6799 (SCOP_LOOPS_MAPPING): New.
6800 (debug_clast_stmt): Declare.
6801 * lambda.h (find_induction_var_from_exit_cond): Declare.
6802 (lambda-code.c): (find_induction_var_from_exit_cond): Extern.
6803 * cfgloop.h (update_dominators_in_loop): Removed declaration.
6804 (create_empty_loop_on_edge): Updated.
6805 * tree-flow.h (remove_bb, resize_phi_node, move_phi_node,
6806 rename_variables_in_bb): Declare.
6807 * tree-cfg.c (remove_bb): Extern.
6809 * gcc.dg/graphite/block-0.c: New.
6811 2008-07-21 Dwarakanath Rajagopal <dwarak.rajagopal@amd.com>
6812 Sebastian Pop <sebastian.pop@amd.com>
6814 * graphite.c (strip_mine_profitable_p): New.
6815 (graphite_trans_bb_block): Disable strip mining if not profitable.
6817 * gcc.dg/graphite/scop-18.c: New.
6818 * gcc.dg/graphite/scop-17.c: Fixed.
6819 * gcc.dg/graphite/scop-16.c: Fixed.
6821 2008-07-17 Harsha Jagasia <harsha.jagasia@amd.com>
6822 Jan Sjodin <jan.sjodin@amd.com>
6823 Sebastian Pop <sebastian.pop@amd.com>
6825 * graphite.c (is_interchange_valid): New.
6826 (graphite_trans_bb_block): Check loop nest of basic block for legality
6829 * graphite.h (gbb_inner_most_loop_index, outer_most_loop_1,
6830 outer_most_loop, gbb_outer_most_loop_index): New.
6832 * tree-loop-linear.c (perfect_loop_nest_depth): Remove static.
6833 * tree-flow.h (perfect_loop_nest_depth): Declare as extern.
6834 * gcc.dg/graphite/scop-16.c: New.
6835 * gcc.dg/graphite/scop-17.c: New.
6837 2008-07-11 Tobias Grosser <grosser@fim.uni-passau.de>
6839 * graphite.c (scop_remove_ignoreable_gbbs): Also update bitmap.
6840 (graphite_trans_scop_block): Ignore SCoPs without bbs.
6842 2008-07-11 Tobias Grosser <grosser@fim.uni-passau.de>
6844 * graphite.c (new_scop): Initialize SCOP_EXIT.
6845 (scopdet_info): Add.
6846 (scopdet_bb_info): Rename from is_bb_addable. Cleanup, bugfixes.
6847 (build_scops_1): Cleanup, bugfixes.
6848 (build_scops): Cleanup.
6850 * gcc.dg/graphite/scop-matmult.c: Remove duplicated code.
6851 * gcc.dg/graphite/scop-15.c: Add SCoP numbers.
6853 2008-07-10 Harsha Jagasia <harsha.jagasia@amd.com>
6855 * gfortran.dg/graphite/scop-1.f: Update to reduced test case.
6857 * gfortran.dg/graphite/graphite.exp: Use
6858 DEFAULT_GRAPHITE_FLAGS.
6860 * gcc.dg/graphite/scop-15.c: Update to reduced test case.
6862 2008-07-10 Harsha Jagasia <harsha.jagasia@amd.com>
6864 * graphite.c (scan_tree_for_params): Do not assert any more if
6865 MULT_EXPR parameter is negative.
6867 * gfortran.dg/graphite/scop-1.f: New.
6869 * gfortran.dg/graphite/graphite.exp: New.
6871 * gcc.dg/graphite/scop-15.c: New.
6873 2008-07-10 Harsha Jagasia <harsha.jagasia@amd.com>
6875 * graphite.c (is_bb_addable): Fix segfault in spec gzip and reformat.
6877 2008-07-10 Tobias Grosser <grosser@fim.uni-passau.de>
6879 * graphite.c (graphite_trans_bb_swap_loops): Rename from
6880 graphite_swap_loops.
6881 (graphite_trans_bb_move_loop): New.
6882 (graphite_trans_bb_strip_mine): Rename from graphite_strip_mine_loop.
6883 (graphite_trans_bb_block): New.
6884 (graphite_trans_loop_block): New.
6885 (graphite_trans_scop_swap_1and2): Rename from
6886 graphite_trans_swap_1and2.
6887 (graphite_trans_scop_strip): Rename from graphite_trans_strip.
6888 (graphite_trans_scop_block): New.
6889 (graphite_apply_transformations): Rename from
6890 graphite_transformations.
6892 * gcc.dg/graphite/scop-matmult.c: New.
6894 2008-07-10 Tobias Grosser <grosser@fim.uni-passau.de>
6896 * graphite.c (gbb_compare): New.
6897 (graphite_sort_gbbs): New.
6898 (gbb_can_be_ignored): New.
6899 (scop_remove_ignoreable_gbbs): New.
6900 (graphite_transformations): Cleanup and add
6901 scop_remove_ignoreable_gbbs.
6902 * lambda.h (lambda_vector_compare): New.
6904 2008-07-09 Tobias Grosser <grosser@fim.uni-passau.de>
6906 * graphite.c (print_graphite_bb): Correct printing of static schedule.
6907 (graphite_swap_loops): int -> unsigned
6908 (graphite_strip_mine_loop): int -> unsigned, Fix SCHEDULE
6909 (graphite_transformations): New.
6910 (graphite_transform_loops): Move to graphite_transformations.
6911 * graphite.h (gbb_nb_loops): Return unsigned.
6913 2008-07-04 Tobias Grosser <grosser@fim.uni-passau.de>
6915 * graphite.c (scan_tree_for_params): Fix insertion of parameters into
6916 the domain matrix. This makes scop-0.c work again.
6918 2008-06-20 Richard Guenther <rguenther@suse.de>
6920 * graphite.h: Adjust copyright to GPLv3.
6921 * graphite.c: Likewise.
6922 (stmt_simple_memref_for_scop_p): Split out from ...
6923 (stmt_simple_for_scop_p): ... here. Fix handling of calls
6925 (get_bb_type): Optimize.
6927 (is_bb_addable): Fix memleak, replace is_pred call with
6929 (build_scops): Use current_loops.
6930 (param_index): Fix memleak.
6932 2008-06-20 Konrad Trifunovic <konrad.trifunovic@inria.fr>
6934 * graphite.c: Fix formatting.
6936 2008-06-19 Konrad Trifunovic <konrad.trifunovic@inria.fr>
6938 * graphite.c (new_scop): Memory allocation for SCOP_{NEWIVS, OLDIVS}.
6939 (free_scop): Memory deallocation for SCOP_NEWIVS, SCOP_OLDIVS.
6940 (create_var_name, save_var_name): Newly defined functions.
6941 (initialize_cloog_names): Part of the code factored out to
6943 (clast_to_gcc_expression): Now handles the case of clast_red_sum
6944 in clast_reduction statement.
6945 (graphite_create_new_loop): Now takes a new parameter
6947 (translate_clast): Now also takes the context_loop and bb_exit
6948 parameters. Rewritten the code so that it creates a gimple code
6949 inside the given context.
6950 (outermost_loop_layer, graphite_remove_iv, graphite_rename_ivs,
6951 remove_cond_expr, disconnect_cond_expr,
6952 disconnect_virtual_phi_nodes): Newly defined functions.
6953 * graphite.h (struct scop): added old_ivs vector.
6954 SCOP_OLDIVS: New macro.
6956 2008-06-19 Sebastian Pop <sebastian.pop@amd.com>
6958 * cfgloopmanip.c: Add missing function comments, fix formatting.
6960 2008-06-18 Konrad Trifunovic <konrad.trifunovic@inria.fr>
6962 * cfgloopmanip.c (update_dominators_in_loop): Defined.
6963 (create_empty_loop_on_edge): Defined.
6964 * tree-parloops.c (canonicalize_loop_ivs): Returns tree
6966 * cfgloop.h (create_empty_loop_on_edge): Declared as extern.
6967 (update_dominators_in_loop): Declared as extern
6968 * tree-flow.h (canonicalize_loop_ivs): Declared as extern.
6970 2008-06-16 Tobias Grosser <grosser@fim.uni-passau.de>
6972 * graphite.c (print_graphite_bb): Allow changing number of loops
6974 (initialize_cloog_names): Allow changing number of loops.
6975 (build_cloog_prog): Simplify.
6976 (find_transform): Enable cloog option --strides.
6977 (graphite_swap_loops): New.
6978 (graphite_strip_mine_loop): New.
6979 (graphite_trans_swap_1and2): New.
6980 (graphite_trans_strip): New.
6981 (graphite_transform_loops): Add graphite_trans_strip.
6982 * graphite.h (scop_max_loop_depth): New.
6984 2008-06-15 Tobias Grosser <grosser@fim.uni-passau.de>
6986 * graphite.c (build_scop_iteration_domain): Remove forgotten
6987 line. (Fixes compile)
6989 2008-06-15 Tobias Grosser <grosser@fim.uni-passau.de>
6991 * graphite.c (print_graphite_bb): Add output of GBB_LOOPS.
6992 (build_graphite_bb): Add GBB_LOOPS and GBB_DOMAIN and reorder.
6993 (build_bb_loops): New.
6994 (graphite_transform_loops): Add build_bb_loops.
6995 (schedule_to_scattering): Use gbb_nb_loops to support changing loop
6997 * graphite.h (graphite_bb): Add loops.
6998 (gbb_nb_loops): New.
6999 (gbb_loop_at_index): New.
7000 (gbb_loop_index): New.
7001 (nb_params_in_scop): Renamed to scop_nb_params. Updated all functions
7002 using nb_params_in_scop.
7004 2008-06-14 Tobias Grosser <grosser@fim.uni-passau.de>
7006 * graphite.c (print_graphite_bb): Adapt to minimized schedule.
7007 (build_scop_canonical_schedules): Build minimized schedule.
7008 (schedule_to_scattering): Adapt to minimized schedule.
7009 * graphite.h (graphite_bb): Add/Update descriptions.
7011 2008-06-14 Adrien Eliche <aeliche@isty.uvsq.fr>
7012 Tobias Grosser <grosser@fim.uni-passau.de>
7014 * graphite.c (print_graphite_bb): Add condition printing.
7016 (dump_gbb_conditions): New.
7017 (build_scop_conditions_1): New.
7018 (build_scop_conditions): New.
7019 * graphite.h (graphite_bb): Add conditions.
7021 2008-06-14 Tobias Grosser <grosser@fim.uni-passau.de>
7023 * graphite.c (print_graphite_bb):
7024 (free_graphite_bb): New.
7025 (free_scop): Free bbs.
7026 (get_bb_type): Free doms.
7027 (build_scop_context): Free context matrix.
7028 (build_loop_iteration_domains): Remove unused code.
7029 (build_cloog_prog): Free scattering function and blocklist.
7030 (find_transform): Free options.
7032 2008-06-13 Tobias Grosser <grosser@fim.uni-passau.de>
7034 * graphite.c (loop_body_to_cloog_stmts): Rename to add_bb_domains.
7035 Remove unnecessery cloog data structures. Make a copy of the domain
7036 (setup_cloog_loop): Rename to build_loop_iteration_domains. Remove
7037 unnecessary cloog data structures. Fix memory leaks. Remove insert
7038 into SCOP_LOOP2CLOOG_LOOP as the inserted CloogLoops will never be
7040 (build_scop_iteration_domain): Remove unnecessary cloog
7041 data structures. Fix memory leaks.
7042 (graphite_transform_loops): Disable build_scop_dynamic_schedules as it
7043 uses SCOP_LOOP2CLOOG_LOOP, that is at the moment not working.
7045 2008-06-12 Tobias Grosser <grosser@fim.uni-passau.de>
7047 * graphite.c (find_scop_params): Remove initialize_cloog_names.
7049 2008-06-12 Tobias Grosser <grosser@fim.uni-passau.de>
7051 * graphite.c (end_scop): Style fix.
7052 (schedule_to_scattering): Style and comment fix.
7054 2008-06-12 Tobias Grosser <grosser@fim.uni-passau.de>
7055 * graphite.c (print_graphite_bb): Fix definiton of
7056 schedule_to_scattering.
7057 (initialize_cloog_names): Change nb_scattdims to max loop
7059 (schedule_to_scattering): Take parameter for number of scattering
7061 (build_cloog_prog): Only build as much scattering dimensions as
7064 2008-06-12 Tobias Grosser <grosser@fim.uni-passau.de>
7066 * graphite.c (end_scop): Disable bb splitting. Fixes SIGSEGV
7067 in polyhedron/aermod.f90.
7069 2008-06-11 Tobias Grosser <grosser@fim.uni-passau.de>
7070 Dwarak Rajagopal <dwarak.rajagopal@amd.com>
7071 Harsha Jagasia <harsha.jagasia@amd.com>
7073 * graphite.c (is_bb_addable): Fix segfault.
7075 2008-06-10 Tobias Grosser <grosser@fim.uni-passau.de>
7077 * graphite.c (is_bb_addable): Fix memory leak, handling of loops
7078 with multiple exits and conditional handling in edge cases.
7079 (is_loop_exit): Fix memory leak. (Forgotten in last commit)
7081 * gcc.dg/graphite/scop-14.c: New.
7083 2008-06-06 Tobias Grosser <grosser@fim.uni-passau.de>
7084 Adrien Eliche <aeliche@isty.uvsq.fr>
7086 * graphite.c (is_bb_addable): Add more comments and enhance
7087 readablity of the source code. Fix memory leak.
7088 (is_loop_exit): Fix memory leak.
7090 2008-06-05 Tobias Grosser <grosser@fim.uni-passau.de>
7092 * graphite.c (first_loop_in_scop): Deleted.
7093 (setup_cloog_loop): Only walk the loop chain for inner loops.
7094 (build_scop_iteration_domain): Execute setup_cloog_loop for
7095 all loops in the first layer.
7097 2008-06-05 Tobias Grosser <grosser@fim.uni-passau.de>
7099 * graphite.c (scan_tree_for_params): Change the way params are
7100 added to be indepenent of the number of loops.
7101 (setup_cloog_loop): Revert to short matrix format. Fix parameter
7103 (build_cloog_prog): Revert to short matrix format.
7105 2008-06-05 Sebastian Pop <sebastian.pop@amd.com>
7106 Dwarak Rajagopal <dwarak.rajagopal@amd.com>
7108 * tree-loop-fusion.c (fuse_loops): Fix uninitialized variable
7111 2008-06-05 Sebastian Pop <sebastian.pop@amd.com>
7113 * graphite.c (nb_data_refs_in_scop): New.
7114 (graphite_transform_loops): Print more stats: number of
7115 loops, basic blocks and data references per scop.
7117 2008-06-04 Sebastian Pop <sebastian.pop@amd.com>
7118 Jan Sjodin <jan.sjodin@amd.com>
7120 * graphite.c (loop_affine_expr, idx_record_params,
7121 find_scop_parameters, setup_cloog_loop): Use instantiate_scev
7122 instead of instantiate_parameters.
7124 2008-06-04 Tobias Grosser <grosser@fim.uni-passau.de>
7126 * graphite.c (schedule_to_scattering): Fix scattering dimensions,
7127 add support for parameters, add STATIC_SCHEDULE at the right places,
7130 2008-06-04 Tobias Grosser <grosser@fim.uni-passau.de>
7132 * graphite.c (build_scop_loop_nests): Only add the loops, that
7133 are contained completely in the SCoP.
7134 (build_cloog_prog): Disable scattering, until schedule_to_scattering
7135 and the domains are fixed.
7136 (build_scop_canonical_schedules): Add support for bbs not contained
7139 2008-06-04 Tobias Grosser <grosser@fim.uni-passau.de>
7141 * graphite.h (scop_contains_loop): Update comments to match
7142 the actual behavior.
7143 (scop_contains_loop): New.
7144 * graphite.c (schedule_to_scattering): Use scop_contains_loop.
7146 2008-06-04 Sebastian Pop <sebastian.pop@amd.com>
7148 * graphite.c (get_bb_type): On function body, i.e. loop_0,
7149 don't mark blocks as GBB_LOOP_SING_EXIT_HEADER, mark them
7152 2008-06-04 Sebastian Pop <sebastian.pop@amd.com>
7153 Tobias Grosser <grosser@fim.uni-passau.de>
7155 * graphite.c (graphite_transform_loops): Early return when
7156 there are no loops in the function.
7158 2008-05-31 Sebastian Pop <sebastian.pop@amd.com>
7159 Jan Sjodin <jan.sjodin@amd.com>
7161 * graphite.c (scan_tree_for_params, setup_cloog_loop): Compute the
7162 offset of the last loop.
7163 (setup_cloog_loop): Copy the entire outer constraint matrix.
7165 2008-05-31 Sebastian Pop <sebastian.pop@amd.com>
7166 Jan Sjodin <jan.sjodin@amd.com>
7168 * graphite.c (stmt_in_scop_p, function_parameter_p,
7169 invariant_in_scop_p): Removed.
7170 (scan_tree_for_params): Can be used with no constraint
7171 matrix for gathering parameters.
7172 (idx_record_params): Don't use idx_record_param, instead use
7173 scan_tree_for_params.
7174 (find_scop_parameters): Same.
7175 (setup_cloog_loop, build_scop_iteration_domain, build_cloog_prog):
7176 Fix the size of loop domains.
7177 (schedule_to_scattering): Exit when the outer loop is not in scop.
7178 (find_transform): Enable build_cloog_prog.
7180 2008-05-31 Sebastian Pop <sebastian.pop@amd.com>
7181 Jan Sjodin <jan.sjodin@amd.com>
7183 * graphite.c (schedule_to_scattering): Make scattering domains
7184 uniformly of the same size, as required by CLooG 0.14.0 and before.
7186 2008-05-31 Sebastian Pop <sebastian.pop@amd.com>
7187 Jan Sjodin <jan.sjodin@amd.com>
7189 * graphite.c (schedule_to_scattering): Rewrite, correct the
7190 translation of the scheduling function to scattering.
7191 (build_cloog_prog): Call schedule_to_scattering only once.
7192 * graphite.h (scop_loop_index): Do not fail for loops not
7193 in the scop: return -1.
7195 2008-05-30 Tobias Grosser <grosser@fim.uni-passau.de>
7197 * graphite.c (build_graphite_bb): Initialize GBB_DOMAIN.
7198 (loop_body_to_cloog_stmts): Export GBB_DOMAIN.
7199 (setup_cloog_loop): Export GBB_DOMAIN.
7200 (build_cloog_prog): New. Create new CLOOG_PROG, which should be
7201 able to rebuild the original control flow.
7202 * graphite.h (graphite_bb): Add domain field and access macro.
7205 2008-05-30 Sebastian Pop <sebastian.pop@amd.com>
7207 * graphite.c (debug_gbb): New.
7208 (print_scop, build_graphite_bb): Use SCOP_BBS.
7209 (build_scop_bbs): Reimplemented.
7210 (dfs_bb_in_scop_p): Removed.
7211 (build_scop_loop_nests): Reorder loops inserted in
7212 SCOP_LOOP_NEST: outer loops should come first.
7213 (build_scop_canonical_schedules): Reinitialize at zero
7214 the components of the SCOP_STATIC_SCHEDULE for the loops
7215 that have already been parsed.
7217 * graphite.h (debug_gbb): Declared.
7219 2008-05-30 Sebastian Pop <sebastian.pop@amd.com>
7220 Jan Sjodin <jan.sjodin@amd.com>
7222 * graphite.c (create_empty_loop): Renamed graphite_create_new_loop.
7223 (graphite_loop_to_gcc_loop): Removed.
7224 (remove_all_edges): New.
7225 (graphite_stmt_to_gcc_stmt): Renamed translate_clast.
7226 (gloog): Remove useless code.
7228 2008-05-29 Tobias Grosser <grosser@fim.uni-passau.de>
7230 * graphite.c (get_bb_type): Reworked. We distinguish between
7231 loops with one or multiple exits.
7232 (is_loop_exit): New.
7234 (is_bb_addable): Rework condition handling, now support for case
7235 case statements and loops with multiple exits.
7237 * gcc.dg/graphite/scop-11.c: New.
7238 * gcc.dg/graphite/scop-12.c: New.
7239 * gcc.dg/graphite/scop-13.c: New.
7241 2008-05-29 Tobias Grosser <grosser@fim.uni-passau.de>
7243 * graphite.c (dot_all_scops_1): Fix some colors. Reuse colors, if
7244 we have too many colors.
7246 2008-05-22 Sandeep Maram <smaram_b04@iiita.ac.in>
7248 * doc/invoke.texi (-ftree-loop-fusion): Document.
7249 * tree-pass.h (pass_loop_fusion): Declared.
7250 * tree-loop-fusion.c: New.
7251 * timevar.def (TV_TREE_LOOP_FUSION): Declared.
7252 * tree-data-ref.c (find_data_references_in_loop): Make extern.
7253 * tree-data-ref.h (find_data_references_in_loop): Declared.
7254 * common.opt (ftree-loop-fusion): Declared.
7255 * Makefile.in (tree-loop-fusion.o): Added rule and to OBJS-common.
7257 2008-05-21 Sebastian Pop <sebastian.pop@amd.com>
7259 * graphite.c (build_access_matrix): Fix typo from the merge.
7261 2008-05-20 Sebastian Pop <sebastian.pop@amd.com>
7263 * Merge from mainline (130800:135673).
7265 2008-05-07 Sebastian Pop <sebastian.pop@amd.com>
7267 * graphite.c (end_scop): The exit of the scop is not part of the scop.
7268 Update dominators after splitting.
7270 2008-05-07 Sebastian Pop <sebastian.pop@amd.com>
7272 * graphite.c (is_bb_addable): Return the harmful statement.
7273 Factor up some code.
7274 (end_scop): New. Splits end of scope bbs on a harmful statement.
7275 (build_scops_1): Call end_scop.
7277 2008-05-07 Sebastian Pop <sebastian.pop@amd.com>
7279 * graphite.c: (succs_at_same_depth, end_scop, all_preds_visited_p,
7280 all_succs_visited_p, start_new_scop_for_each_succ, start_new_scop,
7281 add_dominators_to_open_scops, stop_last_open_scop, scop_end_loop,
7282 build_scops_1): Removed.
7283 (build_scops_2): Renamed build_scops_1.
7285 2008-05-06 Sebastian Pop <sebastian.pop@amd.com>
7287 * graphite.c: Fix formatting.
7289 2008-05-06 Tobias Grosser <grosser@fim.uni-passau.de>
7291 * graphite.c (get_bb_type): New.
7293 (build_scops_2): New.
7294 (is_bb_addable): New.
7295 (build_scops): Switch the scop detection.
7296 (build_scop_bbs): Add entry bb to scop.
7297 * graphite.h (struct scop): Update comment.
7299 2008-05-06 Tobias Grosser <grosser@fim.uni-passau.de>
7301 * graphite.c (dot_all_scops_1): Fix some incorrect colors and add
7304 2008-05-06 Tobias Grosser <grosser@fim.uni-passau.de>
7306 * gcc.dg/graphite/scop-1.c: Update.
7307 * gcc.dg/graphite/scop-2.c: Update.
7308 * gcc.dg/graphite/scop-4.c: Update.
7309 * gcc.dg/graphite/scop-5.c: Add.
7310 * gcc.dg/graphite/scop-6.c: Add.
7312 2008-05-06 Sebastian Pop <sebastian.pop@amd.com>
7314 * gcc.dg/graphite/scop-0.c: Add.
7315 * gcc.dg/graphite/scop-7.c: Add.
7316 * gcc.dg/graphite/scop-8.c: Add.
7317 * gcc.dg/graphite/scop-9.c: Add.
7318 * gcc.dg/graphite/scop-10.c: Add.
7320 2008-05-06 Tobias Grosser <grosser@fim.uni-passau.de>
7322 * graphite.c (scop_affine_expr): Renamed to loop_affine_expr.
7323 Check affine expressions depending on the outermost loop
7325 (stmt_simple_for_scop_p): Same.
7326 (harmfule_stmt_in_scop): Same.
7328 2008-04-28 Tobias Grosser <grosser@fim.uni-passau.de>
7330 * graphite.c (dot_all_scops): Remove incorrect difficult bb coloring,
7331 mark entry and exit, that are not part of the SCoP and update HTML
7334 2008-04-25 Sebastian Pop <sebastian.pop@amd.com>
7336 * graphite.c (basic_block_simple_for_scop_p): Renamed
7338 (save_scop, preds_at_same_depth, test_for_scop_bound): Removed.
7339 (add_dominators_to_open_scops, build_scops_1): Reimplemented.
7340 (all_preds_visited_p, all_succs_visited_p,
7341 start_new_scop_for_each_succ, start_new_scop, stop_last_open_scop,
7342 scop_end_loop): New.
7343 (build_scops): Do not use dfs_enumerate_from.
7345 * gcc.dg/graphite/scop-{1,2,4}.c: Updated.
7347 2008-04-23 Sebastian Pop <sebastian.pop@amd.com>
7349 * graphite.c: Add comments to functions that are missing a
7351 (graphite_create_iv): Removed. Merged in graphite_loop_to_gcc_loop.
7353 2008-04-23 Sebastian Pop <sebastian.pop@amd.com>
7355 * graphite.c (nb_params_in_scop): Moved...
7356 (graphite_bb_from_bb, loop_body_to_cloog_stmts): New.
7357 (setup_cloog_loop): Call loop_body_to_cloog_stmts.
7358 (clast_to_gcc_expression): Reduce column size to less than 80.
7359 (graphite_create_iv): Return the new name of the IV.
7360 (find_transform): Set options->esp and options->cpp.
7361 (gloog): Comment out the invalidation of the old loop code.
7362 (initialize_dependence_polyhedron): Replace scop_nb_params with
7365 * graphite.h (nb_params_in_scop): ... here.
7366 (scop_nb_params): Removed.
7367 (loop_domain_dim): Return something even when the loop was not
7368 found in the hash table: avoid ICEing on all the graphite.exp
7371 2008-04-14 Konrad Trifunovic <konrad.trifunovic@inria.fr>
7373 * tree-chrec.c (for_each_scev_op): SCEV can have 3 operands.
7375 * graphite.c (build_scop_dynamic_schedules): Schedule is built
7376 according to nesting level.
7377 (find_scop_parameters): Call instantiate_parameters.
7378 (scan_tree_for_params): Extend it to handle general affine bounds.
7379 Inner loop bound can depend on outer loop induction variable.
7380 (setup_cloog_loop): tmp variable is allocated on stack. Call
7381 instantiate_parameters with respect to outermost_loop_in_scop.
7382 (loop_domain_dim, ref_nb_loops, loop_iteration_vector_dim): moved to
7384 (create_empty_loop): Function loopify should be given edge
7385 probability, instead of edge frequency. Dominance relation from
7386 switch_bb to loop_header.
7387 (clast_to_gcc_expression): Added handling of clast_reduction node.
7388 (gloog): New functionality for removing old loop.
7389 (test_dependence): Factored out from build_rdg_all_levels.
7390 (build_rdg_all_levels): Dependence testing factored out to
7391 test_dependence function.
7393 * graphite.h (struct graphite_bb): Extended with dynamic_schedule.
7394 (loop_domain_dim, ref_nb_loops, loop_iteration_vector_dim): Moved
7397 2008-04-07 Sebastian Pop <sebastian.pop@amd.com>
7399 * graphite.c (free_scop, param_index, initialize_cloog_names,
7400 nb_params_in_scop): Use name_tree map instead of just a tree
7401 for keeping track of the variable name associated to that tree.
7402 (create_empty_loop, gmp_cst_to_tree, clast_name_to_gcc,
7403 clast_to_gcc_expression, graphite_create_iv,
7404 graphite_loop_to_gcc_loop, graphite_cond_to_gcc_cond,
7405 graphite_stmt_to_gcc_stmt): New.
7406 (gloog): Call these.
7407 * graphite.h (struct name_tree): New.
7408 (struct scop): Use name_tree instead of tree for params.
7409 Store a vector of name_tree for new_ivs.
7411 (scop_nb_params): Use name_tree instead of tree.
7413 2008-04-05 Alexander Lamaison <awl03@doc.ic.ac.uk>
7414 Sebastian Pop <sebastian.pop@amd.com>
7416 * tree-bounds.c: New.
7417 * tree-bounds.h: New.
7418 * tree-pass.h: Declare pass_bounds_early and pass_bounds_late.
7419 * passes.c: Schedule pass_bounds_early, pass_bounds_late.
7420 * builtins.c (expand_builtin_alloca): Add flag_bounds as for
7424 * c-cppbuiltin.c: Same.
7428 * tree-outof-ssa.c: Same.
7430 * Makefile.in: Same.
7432 2008-03-15 Antoniu Pop <antoniu.pop@gmail.com>
7433 Sebastian Pop <sebastian.pop@amd.com>
7435 * tree-loop-distribution.c (remaining_stmts,
7436 upstream_mem_writes): Removed static variables.
7437 (copy_loop_before, create_bb_after_loop,
7438 mark_nodes_having_upstream_mem_writes, free_rdg_components,
7439 rdg_build_components, rdg_build_partitions,
7440 dump_rdg_partitions): Extern.
7441 (generate_loops_for_partition, generate_code_for_partition): Do not
7443 (already_processed_vertex_p, predecessor_has_mem_write,
7444 mark_nodes_having_upstream_mem_writes, has_upstream_mem_writes,
7445 rdg_flag_all_uses, rdg_flag_uses, rdg_flag_vertex_and_dependent,
7446 rdg_flag_loop_exits, rdg_flag_similar_memory_accesses,
7447 build_rdg_partition_for_component, rdg_build_partitions, ldist_gen):
7448 Pass remaining_stmts and upstream_mem_writes as parameters.
7449 (rdg_component): Moved...
7450 (build_rdg_partition_for_component): Do not aggregate components when
7451 flag_streamize_loops is set.
7452 (gen_sequential_loops): New.
7453 (ldist_gen): Call gen_sequential_loops.
7455 * tree-pass.h (pass_loop_streamization): Declared.
7457 * omp-low.c (expand_omp_sections): Call add_bb_to_loop on created
7458 basic blocks when loops structures exist.
7460 * builtin-types.def (BT_FN_VOID_PTR_PTR_INT): New.
7462 * tree-ssa-loop-ivopts.c (expr_invariant_in_region_p): New.
7464 * tree-parloops.c (take_address_of, eliminate_local_variables_1,
7465 eliminate_local_variables_stmt, eliminate_local_variables,
7466 separate_decls_in_loop_name, separate_decls_in_loop_stmt,
7467 separate_decls_in_loop, gen_parallel_loop): Make them work on a region
7468 of code delimited by two edges in the CFG.
7469 (separate_decls_in_loop_name): Renamed separate_decls_in_region_name.
7470 (separate_decls_in_loop_stmt): Renamed separate_decls_in_region_stmt.
7471 (separate_decls_in_loop): Renamed separate_decls_in_region. Isolate
7472 the case of parallelisation of reductions.
7473 (create_loop_fn): Extern.
7474 (create_omp_parallel_region): New.
7476 * tree-data-ref.c (dump_data_dependence_relation): Don't call
7477 dump_data_reference for printing dra and drb.
7478 (create_rdg_edge_for_ddr, create_rdg_edges_for_scalar): Initialise
7480 (build_rdg): Don't call free_dependence_relations for the moment, as
7481 we attach dependence relations on each edge of the RDG.
7484 * tree-data-ref.h (rdg_component): ...here.
7485 (struct rdg_edge): New field ddr_p relation.
7486 (RDGE_RELATION): New.
7487 (create_bb_after_loop, copy_loop_before,
7488 mark_nodes_having_upstream_mem_writes, rdg_build_components,
7489 rdg_build_partitions, dump_rdg_partitions,
7490 free_rdg_components): Declared.
7492 * omp-builtins.def (BUILT_IN_GOMP_STREAM_ALIGN_PUSH,
7493 BUILT_IN_GOMP_STREAM_ALIGN_POP): New.
7495 * tree-loop-streamization.c: New.
7497 * tree-flow.h (gather_blocks_in_sese_region, create_loop_fn,
7498 create_omp_parallel_region, expr_invariant_in_region_p): Declared.
7500 * Makefile.in (tree-loop-streamization.o): Added to OBJS-common.
7502 * tree-cfg.c (gather_blocks_in_sese_region): Extern.
7504 * passes.c: Schedule pass_loop_streamization.
7506 2008-03-08 Tobias Grosser <grosser@fmi.uni-passau.de>
7508 * graphite.c (dot_all_scops_1): Fix formatting for difficult bbs and
7511 2008-03-07 Tobias Grosser <grosser@fim.uni-passau.de>
7513 * graphite.c (dot_all_scops): Update formatting.
7514 Bbs can now be part of more than one SCoP.
7516 2008-03-04 Sebastian Pop <sebastian.pop@amd.com>
7518 * graphite.c (new_loop_to_cloog_loop_str, setup_cloog_loop): Fix
7520 (loop_domain_dim): Check for unregistered toplev SCOP loop.
7521 * graphite.h (loop_to_cloog_loop): New.
7523 2008-03-04 Konrad Trifunovic <konrad.trifunovic@inria.fr>
7525 * graphite.c (loop_domain_dim, ref_nb_loops,
7526 loop_iteration_vector_dim): New.
7527 (build_access_matrix_with_af, build_access_matrix,
7528 initialize_dependence_polyhedron): Fixed for new matrix layout.
7529 No longer assume that all iteration domains are of the same
7532 2008-03-02 Sebastian Pop <sebastian.pop@amd.com>
7534 * tree-scalar-evolution.c (instantiate_parameters_1): An SSA_NAME
7535 defined in a loop at depth 0 is invariant.
7536 * tree-chrec.c (evolution_function_is_invariant_rec_p): Ditto.
7537 * tree-ssa-loop-ivopts.c (expr_invariant_in_loop_p): Should never
7538 be called at loop depth 0.
7540 * graphite.c (basic_block_simple_for_scop_p): Take the scop as
7542 (dot_all_scops_1): Update use of basic_block_simple_for_scop_p.
7543 (down_open_scop): Removed.
7544 (loop_in_scop_p): Redefined.
7545 (scop_affine_expr): New argument: scop.
7546 (stmt_simple_for_scop_p): New argument: scop. RETURN_EXPR is not
7547 a harmful statement ending a scop.
7548 (basic_block_simple_for_scop_p): New argument: scop.
7549 (get_loop_start): Removed.
7550 (new_scop): Initialize SCOP_LOOPS.
7551 (free_scop): Free SCOP_LOOPS.
7552 (succs_at_same_depth, preds_at_same_depth): New.
7553 (end_scop): Test the validity of a scop.
7554 (add_dominators_to_open_scops): New.
7555 (test_for_scop_bound): Call add_dominators_to_open_scops.
7556 Add cases for opening and closing multiple scops.
7557 (build_scops, build_scop_bbs): Iterate over basic blocks in
7559 (build_graphite_bb): Pass scop directly.
7560 (dfs_bb_in_scop_p): New.
7561 (scop_record_loop): Use SCOP_LOOPS for not recording the same loop
7563 (nb_loops_around_gb): Use loop_in_scop_p.
7564 (schedule_to_scattering): Disabled for the moment the code computing
7565 the "textual order for outer loop".
7567 * graphite.h (struct scop): New field loops.
7569 (scop_loop_index): Test that the given loop belongs to SCOP_LOOPS.
7571 * gcc.dg/graphite/scop-{1,...,7}.c: Updated.
7573 2008-02-27 Antoniu Pop <antoniu.pop@gmail.com>
7574 Sebastian Pop <sebastian.pop@amd.com>
7576 * builtin-types.def (BT_FN_PTR_SIZE_UINT, BT_FN_BOOL_PTR): New.
7577 * common.opt (fstreamize-loops): New.
7578 * omp-builtins.def (BUILT_IN_GOMP_STREAM_CREATE,
7579 BUILT_IN_GOMP_STREAM_PUSH, BUILT_IN_GOMP_STREAM_HEAD,
7580 BUILT_IN_GOMP_STREAM_POP, BUILT_IN_GOMP_STREAM_EOS_P,
7581 BUILT_IN_GOMP_STREAM_SET_EOS, BUILT_IN_GOMP_STREAM_DESTROY): New.
7583 2008-02-22 Konrad Trifunovic <konrad.trifunovic@inria.fr>
7585 * tree-data-ref.c (build_empty_rdg): New.
7586 (build_rdg): Use it.
7587 * tree-data-ref.h (build_empty_rdg): Declared.
7588 * graphite.c (free_scop): Free SCOP_LOOP2CLOOG_LOOP.
7589 (find_vertex_for_stmt): Removed.
7590 (build_rdg_all_levels): Use build_empty_rdg and rdg_vertex_for_stmt.
7592 2008-02-21 Sebastian Pop <sebastian.pop@amd.com>
7594 * tree-loop-distribution.c (generate_builtin): After cancelling the
7595 loop tree, also delete basic blocks.
7596 (rdg_flag_uses): Stop recursion when a vertex has already been
7599 2008-02-15 Konrad Trifunovic <konrad.trifunovic@inria.fr>
7601 * graphite.c (build_scop_alpha): Removed.
7602 (graphite_transform_loops): Add a dummy call to build_all_rdg_levels
7603 and dump_dependence_graph to avoid compiler warnings.
7605 2008-02-14 Konrad Trifunovic <konrad.trifunovic@inria.fr>
7607 * tree-data-ref.c (dr_may_alias_p, create_rdg_vertices): Extern.
7608 * tree-data-ref.h (dr_may_alias_p, create_rdg_vertices): Declared.
7609 * graphite.c (new_loop_to_cloog_loop_str, hash_loop_to_cloog_loop,
7610 eq_loop_to_cloog_loop, del_loop_to_cloog_loop): New.
7611 (new_scop, setup_cloog_loop): Initialize SCOP_LOOP2CLOOG_LOOP.
7612 (initialize_dependence_polyhedron, find_vertex_for_stmt,
7613 initialize_data_dependence_polyhedron, is_empty_polyhedron,
7614 statement_precedes_p, build_rdg_all_levels, build_scop_alpha,
7615 dump_dependence_graph): New.
7616 * graphite.h (struct graphite_bb): New field compressed_alpha_matrix.
7618 (struct scop): New field loop2cloog_loop.
7619 (SCOP_LOOP2CLOOG_LOOP, struct data_dependence_polyhedron,
7620 RDGE_DDP, ddp_p, struct loop_to_cloog_loop_str): New.
7622 2008-02-10 Konrad Trifunovic <konrad.trifunovic@inria.fr>
7624 * graphite.c (build_graphite_bb): Fix initialization
7625 of the graphite basic block.
7627 2008-02-05 Sebastian Pop <sebastian.pop@amd.com>
7629 * graphite.c (scan_tree_for_params): Rewrite for the new layout of
7630 loop domain matrix. Pass in the number of loops contained in the
7632 (nb_loops_around_gb): Moved before setup_cloog_loop that uses it.
7633 (setup_cloog_loop): Rewrite for the new layout of loop domain matrix:
7634 loops that are not surrounding the current loop are not represented
7635 in the domain constraint matrix.
7636 (build_scop_iteration_domain): Initial domain constraint matrix
7637 contains only the eq/ineq, cst, and scop parameters columns.
7639 2008-01-29 Tobias Grosser <grosser@fim.uni-passau.de>
7641 * graphite.c (schedule_to_scattering, nb_loops_around_gb): New.
7642 (print_graphite_bb): Print scattering.
7644 2008-01-29 Tobias Grosser <grosser@fim.uni-passau.de>
7646 * graphite.c (initialize_cloog_names): Initialize names of
7647 scattering variables.
7649 2009-01-29 Tobias Grosser <grosser@fim.uni-passau.de>
7651 * graphite.c (dot_all_scops_1): Disable debug output while
7654 2008-01-29 Tobias Grosser <grosser@fim.uni-passau.de>
7656 * graphite.c (find_transform): Change cloog output language to C.
7658 2008-01-27 Sebastian Pop <sebastian.pop@amd.com>
7660 * tree-loop-distribution.c (generate_memset_zero,
7661 generate_builtin, generate_code_for_partition,
7662 rdg_flag_all_uses): New.
7663 (rdg_flag_uses): Gather in the same partition the statements defining
7664 the VUSES of the current statement.
7665 (rdg_flag_similar_stores): Renamed rdg_flag_similar_memory_accesses.
7666 Gather in the same partition not only the stores to the same memory
7667 access, but also the reads.
7668 (ldist_generate_loops): Renamed ldist_gen.
7670 2008-01-24 Sebastian Pop <sebastian.pop@amd.com>
7671 Tobias Grosser <grosser@fmi.uni-passau.de>
7673 * graphite.c (setup_cloog_loop): Chain all cloog loops with the
7674 next pointer, don't use the inner pointer.
7676 2008-01-20 Tobias Grosser <grosser@fmi.uni-passau.de>
7678 * graphite.c (dot_all_scops, dot_all_scops_1): New.
7679 (find_transform): Call dot_all_1.
7680 * graphite.h (dot_all_scops): Declared.
7682 2007-12-14 Sebastian Pop <sebastian.pop@amd.com>
7684 * tree-loop-distribution.c: Fix apsi.f ICE.
7685 (create_bb_after_loop): New.
7686 (generate_loops_for_partition): Use it.
7687 * gfortran.dg/ldist-1.f90: New.
7689 * tree-data-ref.c (dot_rdg): Use /tmp/rdg.dot for dotty format.
7690 * graphite.c (dot_scop): Use /tmp/scop.dot for dotty format.
7692 2007-12-13 Tobias Grosser <grosser@fmi.uni-passau.de>
7694 * graphite.c (find_transform): Dump cloog program sent to cloog.
7696 2007-12-13 Tobias Grosser <grosser@fmi.uni-passau.de>
7698 * graphite.c (initialize_cloog_names): Initialize cloog
7701 2007-12-13 Tobias Grosser <grosser@fmi.uni-passau.de>
7703 * graphite.c (build_scop_context): Fix typo, for the matrix
7704 format: insert '0 >= 0' instead of '-1 >= 0'.
7706 2007-12-13 Sebastian Pop <sebastian.pop@amd.com>
7708 * Fix merge problems.
7710 2007-12-13 Sebastian Pop <sebastian.pop@amd.com>
7712 * graphite.c (setup_cloog_loop): Fix typo.
7714 2007-12-12 Sebastian Pop <sebastian.pop@amd.com>
7716 * doc/invoke.texi (-ftree-loop-distribution): Documented.
7717 * tree-loop-distribution.c: Reimplemented.
7718 * tree-pass.h (pass_loop_distribution): New.
7719 * tree-scalar-evolution.c (number_of_iterations_for_all_loops): Use
7721 * graphds.h (struct graph): New field indexes.
7722 * timevar.def (TV_TREE_LOOP_DISTRIBUTION): New.
7724 * tree-vect-analyze.c: Remove declaration of static functions when not
7726 * tree-vectorizer.c: Same.
7727 (rename_variables_in_loop): Now extern.
7728 (slpeel_tree_duplicate_loop_to_edge_cfg): Renamed
7729 tree_duplicate_loop_to_edge_cfg. Reset PENDING_STMT for edges after
7730 calling redirect_edge_and_branch_force.
7732 * tree-vectorizer.h (tree_duplicate_loop_on_edge): Declared.
7734 * tree-data-ref.c: Don't include tree-chrec.h.
7735 (debug_data_dependence_relations): New.
7736 (dump_data_dependence_relation): Call dump_data_reference on data refs
7738 (same_access_functions): Moved...
7739 (find_vertex_for_stmt): Renamed rdg_vertex_for_stmt.
7740 (dump_rdg_vertex, debug_rdg_vertex, dump_rdg_component,
7741 debug_rdg_component, dump_rdg, debug_rdg, dot_rdg_1, dot_rdg,
7742 struct rdg_vertex_info, ): New.
7743 (create_rdg_edge_for_ddr): Compute the dependence level before looking
7745 (create_rdg_vertices): Initialize the htab of graph->indexes.
7746 Initialize RDG_MEM_WRITE_STMT and RDG_MEM_READS_STMT.
7747 (stmts_from_loop): Don't save LABEL_EXPR.
7748 (hash_stmt_vertex_info, eq_stmt_vertex_info,
7749 hash_stmt_vertex_del): New.
7750 (build_rdg): Initialize rdg->indexes.
7751 (free_rdg, stores_from_loop, ref_base_address,
7752 rdg_defs_used_in_other_loops_p, have_similar_memory_accesses,
7753 have_similar_memory_accesses_1, ref_base_address_1,
7754 remove_similar_memory_refs): New.
7756 * tree-data-ref.h: Include tree-chrec.h.
7757 (debug_data_dependence_relations): Declared.
7758 (same_access_functions): ...here. Now static inline.
7759 (ddr_is_anti_dependent, ddrs_have_anti_deps,
7760 ddr_dependence_level): New.
7761 (struct rdg_vertex): New fields has_mem_write, has_mem_reads.
7762 (RDGV_HAS_MEM_WRITE, RDGV_HAS_MEM_READS, RDG_STMT, RDG_MEM_WRITE_STMT,
7763 RDG_MEM_READS_STMT): New.
7764 (dump_rdg_vertex, debug_rdg_vertex, dump_rdg_component,
7765 debug_rdg_component, dump_rdg, debug_rdg, dot_rdg,
7766 rdg_vertex_for_stmt): Declared.
7767 (struct rdg_edge): New field level.
7768 (RDGE_LEVEL, free_rdg): New.
7769 (stores_from_loop, remove_similar_memory_refs,
7770 rdg_defs_used_in_other_loops_p,
7771 have_similar_memory_accesses): Declared.
7772 (rdg_has_similar_memory_accesses): New.
7774 * lambda.h (dependence_level): New.
7775 * common.opt (ftree-loop-distribution): New.
7776 * tree-flow.h (debug_loop_ir): Renamed debug_loops.
7777 (print_loop_ir): Renamed print_loops.
7778 (debug_loop, debug_loop_num, print_loops_bb, mark_virtual_ops_in_bb,
7779 tree_duplicate_loop_to_edge_cfg, rename_variables_in_loop): Declared.
7780 * Makefile.in (TREE_DATA_REF_H): Depends on tree-chrec.h.
7781 (tree-loop-distribution.o): Added.
7782 * tree-cfg.c (mark_virtual_ops_in_region): Use mark_virtual_ops_in_bb.
7783 (mark_virtual_ops_in_bb): New.
7784 (print_loops_bb, debug_loop_num, debug_loop): New.
7785 * passes.c: Scheduled pass_loop_distribution.
7787 2007-12-12 Konrad Trifunovic <konrad.trifunovic@inria.fr>
7789 * graphite.c (scan_tree_for_params): Correct the number of columns
7791 (nb_flat_iterator): New.
7792 (setup_cloog_loop): Initialize to 1 the first column for inequalities.
7793 (build_scop_iteration_domain): Correct the number of columns for
7796 2007-12-12 Sebastian Pop <sebastian.pop@amd.com>
7798 * Merge from mainline (129697:130800).
7800 2007-10-30 Sebastian Pop <sebastian.pop@amd.com>
7802 * graphite.c (build_graphite_bb): SCoP's basic blocks are post
7803 dominated by SCoP's exit.
7804 (graphite_transform_loops): Compute post dominators.
7806 2007-10-28 Sebastian Pop <sebastian.pop@amd.com>
7808 * Merge from mainline (127169:129697).
7810 2007-10-28 Sebastian Pop <sebastian.pop@amd.com>
7812 * graphite.c (affine_expr): Renamed scop_affine_expr. Use an extra
7813 parameter for the basic block that contains the expression. Use
7814 outermost_loop_in_scop for evolution_function_is_affine_multivariate_p.
7815 (stmt_simple_for_scop_p): Pass to scop_affine_expr the basic block of
7817 * graphite.h (gbb_loop): New.
7818 (GBB_LOOP): Removed.
7820 2007-08-03 Sebastian Pop <sebpop@gmail.com>
7822 * Makefile.in: Fix merge problem.
7824 2007-08-03 Sebastian Pop <sebpop@gmail.com>
7826 * Merge from mainline (125309:127169).
7827 * tree-loop-distribution.c: Disabled.
7829 2007-06-05 Sebastian Pop <sebpop@gmail.com>
7831 * Merge from mainline (r123693:125309).
7833 2007-05-30 Sebastian Pop <sebpop@gmail.com>
7835 * tree-loop-distribution.c (correct_modify_expr_p): Renamed
7837 (correct_modify_p, check_statements, number_of_lvalue_uses,
7838 number_of_scalar_dependences, create_edges): Use GIMPLE_MODIFY_STMT
7839 instead of MODIFY_EXPR.
7840 (update_edge_with_ddv): Don't pass index_of_edge. Initialize
7843 2007-05-24 Sebastian Pop <sebpop@gmail.com>
7845 * tree-loop-distribution.c (struct rdg): Replace arrays by
7846 VECs for edges and vertices.
7847 (RDG_NBV, RDG_NBE, RDG_VERTEX, RDG_EDGE): Removed.
7848 (RDGV_NB_PARTITIONS): New.
7849 (PRDG_NBV, PRDG_NBE): Removed.
7850 (build_scc_graph, correct_partitions_p, mark_partitions, build_prdg,
7851 dump_rdg, find_vertex_with_stmt, create_vertices, free_rdg,
7852 number_of_scalar_dependences, create_edges, build_rdg): Use VECs.
7854 2007-05-17 Georges-Andre Silber <silber@cri.ensmp.fr>
7855 Sebastian Pop <sebpop@gmail.com>
7857 * doc/invoke.texi (-ftree-loop-distribution): Document.
7858 * tree-loop-distribution.c: New file.
7859 * tree-pass.h (pass_loop_distribution): Declared.
7860 * timevar.def (TV_TREE_LOOP_DISTRIBUTION): New.
7861 * tree-data-ref.c (initialize_data_dependence_relation): Initialize
7863 * tree-data-ref.h (data_dependence_relation): Add reversed_p.
7864 (DDR_REVERSED_P): New.
7865 * common.opt (-ftree-loop-distribution): New.
7866 * tree-flow.h (distribute_loops): Declared.
7867 * Makefile.in (OBJS-common): Depend on tree-loop-distribution.o.
7868 * passes.c (init_optimization_passes): Schedule loop distribution.
7870 2007-05-12 Sebastian Pop <sebastian.pop@inria.fr>
7872 * graphite.c (print_graphite_bb): Don't call dump_data_references.
7873 (print_scop): Don't print when scop is NULL.
7874 (build_scop_context, find_transform): Don't output to stderr.
7876 2007-05-09 Sebastian Pop <sebastian.pop@inria.fr>
7878 * tree-data-ref.c: Don't include graphite.h.
7879 Comment out the code for printing data reference's scop.
7880 (build_access_matrix_with_af): Moved...
7881 * tree-data-ref.h (build_access_matrix_with_af): Removed declaration.
7882 * graphite.c (build_access_matrix_with_af): ... here. Now static.
7883 (print_graphite_bb): Print basic block's schedule.
7884 (print_scop): Don't print the schedule, call cloog's pretty printer.
7885 (bb_in_scop_p): A basic block is in a scop only if it is both
7886 dominated and postdominated by the scop's entry and exit basic blocks.
7887 (function_parameter_p): New.
7888 (invariant_in_scop_p): Use function_parameter_p.
7889 (new_scop, save_scop): New.
7890 (end_scop, test_for_scop_bound, build_scops): Use new_scop, and
7892 (scan_tree_for_params): Directly build the constraint as CloogMatrix.
7893 (loop_in_scop_p): New.
7894 (scop_record_loop): Use loop_in_scop_p.
7895 (build_scop_domain): Renamed build_scop_iteration_domain.
7896 (setup_cloog_loop, initialize_cloog_names, find_scop_parameters,
7897 nb_params_in_scop, build_scop_context, first_loop_in_scop,
7898 setup_cloog_loop, dot_scop_1, dot_scop): New.
7899 * graphite.h (GBB_LOOP, SCOP_PROG, dot_scop): New.
7900 (struct scop): Add a pointer to cloog's representation of a program.
7902 2007-04-14 Sebastian Pop <sebastian.pop@inria.fr>
7904 * doc/invoke.texi (-ftree-check-verbose): Renamed
7905 -ftree-checks-verbose.
7906 * common.opt (flag_tree_check_verbose): Renamed
7907 flag_tree_checks_verbose.
7908 * tree-check.c (tree_check_warning): Use flag_tree_checks_verbose.
7910 2007-04-14 Sebastian Pop <sebastian.pop@inria.fr>
7912 * configure: Regenerated.
7913 * config.in: Regenerated.
7914 * tree-ssa-loop.c (graphite_transforms): Execute
7915 graphite_transform_loops only when HAVE_cloog.
7916 * configure.ac (HAVE_polylib, HAVE_cloog, GRAPHITE): Defined.
7917 * graphite.c: Include polylibgmp.h and cloog.h.
7918 (graphite_transform_loops): Removed loops parameter.
7919 * tree-flow.h (graphite_transform_loops): Update declaration.
7920 * Makefile.in (POLYLIBLIBS, POLYLIBINC, CLOOGLIBS, CLOOGINC): New.
7921 (LIBS): Depend on CLOOGLIBS and on POLYLIBLIBS.
7922 (INCLUDES): Depend on POLYLIBINC and on CLOOGINC.
7923 (OBJS-common): Remove dependence on graphite.o.
7924 (BACKEND): Depend on @GRAPHITE@.
7926 2007-04-13 Sebastian Pop <sebastian.pop@inria.fr>
7928 * doc/invoke.texi (-ftree-check-verbose): Documented.
7929 * gcc.dg/tree-checker/tree-checks-1.c: New.
7930 * gcc.dg/tree-checker/tree-checks-2.c: New.
7931 * gcc.dg/tree-checker/tree-checks-3.c: New.
7932 * gcc.dg/tree-checker/tree-checks-4.c: New.
7933 * gcc.dg/tree-checker/tree-checks.exp: New.
7934 * gcc.dg/tree-checker/condates.crp: New.
7935 * common.opt (ftree-checks-verbose): New.
7936 * tree-check.c (tree_check_warning): Move extra stderr output
7937 under control of flag_tree_check_verbose.
7939 2007-04-12 Sebastian Pop <sebastian.pop@inria.fr>
7941 * tree-match.c: Fix comments formatting.
7942 * tree-match.h: Fix comments formatting.
7943 * tree-check.c: Fix comments formatting.
7944 (tree_check_init): Restructure.
7946 2007-04-12 Nic Volanschi <nic.volanschi@free.fr>
7948 * doc/invoke.texi (-ftree-check, -ftree-checks): Documented.
7950 2007-04-10 Sebastian Pop <sebastian.pop@inria.fr>
7952 * Merge from mainline (r120733:123693).
7954 2007-03-20 Nic Volanschi <nic.volanschi@free.fr>
7956 * condate.y: New file.
7957 * tree-match.h (struct patt_info_s): New field sign.
7958 (struct condate_s): New field msg.
7959 (normalize_condate, name_condate, add_condate): New.
7960 (conds[], condate_parse): Made extern.
7961 * tree-check.c (tree_check_warning): First arg changed to cond;
7962 warning reformatted.
7963 (tree_check_init): Reset the TREE_VISITED bit on every CFG node.
7965 (tree_check): Process trivial condates.
7966 (read_delimited_string): Removed.
7967 (print_cond): Print name and msg.
7968 (conds[]): Made extern.
7969 (parse_tree_check_file_once): Rewritten to use the parser in
7971 Processing of option --tree_check_string moved to tree_scan().
7972 * Makefile.in: Added condate.y
7974 2007-03-12 Sebastian Pop <sebastian.pop@inria.fr>
7976 * tree-pretty-print.c (dump_generic_bb_buff, lazy_dump_generic_node):
7977 Use VECs instead of varrays.
7978 * diagnostic.h (lazy_dump_generic_node): Update declaration.
7979 * Makefile.in (pretty-print.o): Depend on vec.h.
7980 * pretty-print.c: Include tree.h and vec.h.
7981 (pp_clear_state, pp_write_list_to_stream, pp_base_format,
7982 pp_base_format, pp_construct, pp_base_string, pp_lazy_mode,
7983 new_tree_chunk, pp_add_tree, pp_add_string, pp_add_char, pp_write_list,
7984 pp_free_list): Use VECs instead of varrays.
7985 * pretty-print.h: Do not include varray.h.
7986 (struct tree_chunk_s): Declaration moved before its use.
7987 (output_buffer): Rename varray field to chunks.
7988 * tree-match.c (tree_equal, chunk_1st_char, chunks_lookahead,
7989 tree_1st_char, match_chunks_pattinfo, match_tree_pattinfo,
7990 save_global_holes): Use VECs instead of varrays.
7991 * tree-match.h: Declare VECs of cfg_node, and hole_p.
7992 * tree-check.c (scan_cfg_stmts, push_node,
7993 print_matching_stmt): Removed.
7994 (tree_check_instance, push_global_holes_if_new, tree_check,
7995 execute_tree_check): Use VECs instead of varrays.
7996 (gate_tree_check): Don't execute the CFG check when basic_block_info
7999 2007-01-12 Sebastian Pop <sebastian.pop@inria.fr>
8001 * Merge from mainline (r115016:120733).
8003 2007-01-12 Sebastian Pop <sebastian.pop@inria.fr>
8005 * Merge from mainline (r117632:117661).
8007 2007-01-12 Sebastian Pop <sebastian.pop@inria.fr>
8009 * tree-dump.c (dump_option_value_in): Add TDF_DEBUG.
8010 * tree-pass.h (TDF_DEBUG, debug_p): New.
8011 * tree-scalar-evolution.c (set_scalar_evolution, get_scalar_evolution,
8012 get_scalar_evolution, add_to_evolution, set_nb_iterations_in_loop,
8013 get_loop_exit_condition, analyze_evolution_in_loop,
8014 analyze_initial_condition, analyze_scalar_evolution,
8015 instantiate_parameters, number_of_latch_executions): Use debug_p.
8016 * tree-chrec.c (chrec_apply): Use debug_p.
8017 * tree-data-ref.c: Include graphite.h.
8018 (dump_data_reference): Print also the access matrix.
8019 (analyze_array, analyze_indirect_ref, init_data_ref,
8020 analyze_offset_expr, address_analysis, object_analysis,
8021 create_data_ref, finalize_ddr_dependent,
8022 non_affine_dependence_relation, analyze_ziv_subscript,
8023 analyze_siv_subscript_cst_affine,
8024 compute_overlap_steps_for_affine_1_2, analyze_subscript_affine_affine,
8025 can_use_analyze_subscript_affine_affine, analyze_siv_subscript,
8026 analyze_miv_subscript, analyze_overlapping_iterations,
8027 build_classic_dist_vector, subscript_dependence_tester,
8028 compute_affine_dependence, analyze_all_data_dependences): Use debug_p.
8029 (build_access_matrix_with_af): No longer static.
8030 * tree-data-ref.h (scop_p): ... declaration here.
8031 (data_reference.scop): New field.
8032 (DR_SCOP, DR_ACCESS_MATRIX): New.
8033 (build_access_matrix_with_af, dr_num_subscripts): Declared.
8034 * graphite.c (print_graphite_bb): Call dump_data_references.
8035 (print_scop): Use scop_nb_loops and scop_dim_domain.
8036 (test_for_scop_bound): Use debug_p.
8037 (scan_tree_for_params): Use scop_nb_loops, scop_nb_loops and
8039 (scop_loop_index): Moved...
8040 (scop_record_loop): New.
8041 (build_scop_loop_nests): Use scop_record_loop.
8042 (build_scop_domain): Use scop_dim_domain.
8043 (build_access_matrix): Implemented.
8044 (build_scop_canonical_schedules): Use scop_nb_loops.
8045 (build_graphite_bb): Initialize GBB_SCOP.
8046 * graphite.h (scop_p): Moved...
8047 (graphite_bb.scop): New field.
8048 (graphite_bb.iteration_domain, GBB_DOMAIN, scop.nb_params,
8049 scop.nb_loops, scop.dim_domain, SCOP_NB_LOOPS, SCOP_NB_PARAMS,
8050 SCOP_DIM_DOMAIN, SCOP_STMTS): Removed.
8051 (scop_nb_params, scop_nb_loops, scop_dim_domain, gbb_dim_domain,
8052 scop_loop_index): New.
8053 * Makefile.in (tree-data-ref.o): Depends on graphite.h.
8055 2007-01-05 Sebastian Pop <sebastian.pop@inria.fr>
8057 * Merge from mainline (r117661:120450).
8059 2006-10-12 Sebastian Pop <sebastian.pop@inria.fr>
8061 * tree-scalar-evolution.c (instantiate_parameters_1): Don't stop
8062 at the first declaration outside the varying loop, instantiate as
8064 * tree-chrec.c (for_each_scev_op): New.
8065 * tree-chrec.h (for_each_scev_op): Declared.
8066 * tree-ssa-loop.c (pass_graphite_trans): Don't dump the function.
8067 * tree-data-ref.c (get_references_in_stmt,
8068 find_data_references_in_stmt): New, from trunk.
8069 (find_data_references_in_loop): Use get_references_in_stmt
8070 and find_data_references_in_loop, modified as in trunk.
8071 (build_access_matrix_with_af): New.
8072 * tree-data-ref.h (data_reference): Add a field access_matrix.
8073 (data_ref_loc): New, as in trunk.
8074 * graphite.c (print_graphite_bb, bb_in_scop_p, stmt_in_scop_p,
8075 invariant_in_scop_p, param_index, scan_tree_for_params,
8076 scop_loop_index, build_scop_loop_nests, build_scop_domain, irp_data,
8077 idx_record_param, idx_record_params, build_access_matrix,
8078 build_scop_data_accesses, build_scop_canonical_schedules,
8079 build_graphite_bb, build_scop_bbs, find_params_in_bb,
8080 build_scop_params): New.
8081 * graphite.h (graphite_bb): New.
8082 (scop): Add fields static_schedule, params, loop_nest,
8084 * lambda.h: Declare vecs of lambda_matrix.
8085 * tree-flow.h (print_loop_ir_bb): Declared.
8086 * tree-cfg.c (print_loop_ir_bb): New.
8087 (print_loop): Use print_loop_ir_bb.
8089 2006-10-12 Sebastian Pop <pop@cri.ensmp.fr>
8091 * Merge from mainline (r115016:117632).
8093 2006-10-11 Sebastian Pop <pop@cri.ensmp.fr>
8095 * graphite.c (debug_scops): Adjust definition for avoiding a bootstrap
8096 break due to a warning.
8098 2006-10-10 Sebastian Pop <pop@cri.ensmp.fr>
8100 * graphite.c (print_scops, debug_scops): New.
8101 (graphite_transform): Renamed graphite_find_transform.
8102 * graphite.h (debug_scops): Declared.
8104 2006-08-17 Sebastian Pop <pop@cri.ensmp.fr>
8106 * tree-match.c: Reformat following the GNU style.
8107 * tree-match.h: Reformat following the GNU style.
8108 * tree-pattern.h: Removed empty file.
8109 * Makefile.in: Remove references to tree-pattern.h.
8110 * tree-check.c: Reformat following the GNU style.
8111 (execute_tree_check): Move gate condition code to...
8112 (gate_tree_check): ...here. New function.
8113 (pass_check): Use the gate function.
8115 2006-07-04 Nic Volanschi <nic.volanschi@free.fr>
8117 * tree-pattern.h: New. Tree pattern matching and checking using
8119 * tree-check.c: New. Tree/CFG checking pass.
8120 * tree-match.c: New. Library for tree pattern matching.
8121 * opts.c, common.opt: Add options --ftree-check & --ftree-checks.
8122 * toplev.c, flags.h: Add globals for tree-check pass.
8123 * Makefile.in: Integrate the files in tree-check pass.
8124 * timevar.def, tree-optimize.c, tree-pass.h: Register tree-check pass.
8125 * pretty-print.c, pretty-print.h, tree-pretty-print.c, diagnostic.h:
8126 Introduce a "lazy" pretty-print mode.
8127 * tree.c, tree.h: Add tree_name.
8129 2006-07-04 Sebastian Pop <pop@cri.ensmp.fr>
8131 * doc/invoke.texi (-fgraphite): Correct typo.
8132 * tree-scalar-evolution.c (number_of_iterations_for_all_loops): Update
8133 use of print_loop_ir.
8134 * gcc.dg/graphite/scop-1.c: New.
8135 * gcc.dg/graphite/scop-2.c: New.
8136 * gcc.dg/graphite/graphite.exp: New.
8137 * graphite.c: Include domwalk.h.
8138 (print_scop): Print only the entry and exit blocks.
8139 (debug_scop): No longer static.
8140 (affine_expr): Fix formating. Return also true when the expression is
8142 (stmt_simple_for_scop_p): Fix formating.
8143 (build_scops): Use domwalk.
8144 (get_loop_start, end_scop, test_for_scop_bound): New.
8145 (graphite_transform_loops): Avoid printing on stderr.
8146 * graphite.h (debug_scop): Declared.
8147 * tree-flow.h (debug_loop_ir, print_loop_ir): Update declarations.
8148 * Makefile.in (graphite.o): Depend on domwalk.h.
8149 * tree-cfg.c (print_loop, print_pred_bbs, print_succ_bbs): Remove
8150 declarations for static functions.
8151 (print_loop, print_loop_ir, debug_loop_ir): Use an extra parameter for
8152 controlling output verbosity.
8154 2006-06-26 Sebastian Pop <pop@cri.ensmp.fr>
8155 Plesco Alexandru <shurikx@gmail.com>
8157 * doc/invoke.texi (-fgraphite): Document.
8158 * tree-pass.h (pass_graphite_transforms): Declared.
8159 * timevar.def (TV_GRAPHITE_TRANSFORMS): New.
8160 * tree-ssa-loop.c (graphite_transforms, gate_graphite_transforms): New.
8161 (pass_graphite_transforms): Defined.
8162 * tree-data-ref.c (free_data_ref, data_reference): Extern.
8163 * tree-data-ref.h (free_data_ref, data_reference): Declared.
8164 * graphite.c, graphite.h: New.
8165 * common.opt (fgraphite): Declared.
8166 * tree-flow.h (graphite_transform_loops): Declared.
8167 * Makefile.in (OBJS-common): Add graphite.o.
8168 (graphite.o): New rule.
8169 * passes.c (pass_graphite_transforms): Scheduled.