1 2009-12-17 Sebastian Pop <sebastian.pop@amd.com>
4 * testsuite/gfortran.dg/graphite/pr42186.f90: New.
6 2009-12-17 Sebastian Pop <sebastian.pop@amd.com>
9 * graphite-sese-to-poly.c (translate_scalar_reduction_to_array_for_stmt):
10 Insert the reduction copy in the same block as the phi node.
11 (follow_ssa_with_commutative_ops): Handle GIMPLE_NOPs.
13 * testsuite/gcc.dg/graphite/pr42205-1.c: New.
14 * testsuite/gcc.dg/graphite/pr42205-2.c: New.
16 2009-12-17 Sebastian Pop <sebastian.pop@amd.com>
19 * sese.c (expand_scalar_variables_expr): Follow the SSA links into
20 the array indexing of ADDR_EXPRs.
22 * testsuite/gcc.dg/graphite/pr42221.c: New.
24 2009-12-17 Sebastian Pop <sebastian.pop@amd.com>
28 * graphite-interchange.c (lst_try_interchange): Do not modify OUTER
29 index. Call lst_interchange_select_inner only once.
30 (lst_interchange_select_inner): Update use of lst_try_interchange.
31 (lst_interchange_select_outer): Update.
33 2009-12-15 Sebastian Pop <sebastian.pop@amd.com>
37 * graphite-interchange.c (lst_try_interchange): Do not increment the
38 the OUTER index when there is no AFTER kernel. Do not increment the
39 OUTER index for after processing the AFTER kernel.
40 (lst_interchange_select_inner): Call lst_try_interchange only on loops.
41 (lst_interchange_select_outer): Do not pass in a pointer to the OUTER
42 index. Do not pass to lst_interchange_select_inner the OUTER index.
43 (scop_do_interchange): Update use of lst_interchange_select_outer.
45 * testsuite/gfortran.dg/graphite/graphite.exp
46 (DEFAULT_FLAGS_GRAPHITE_IDENTITY): Remove -fdump-tree-graphite-all.
47 * testsuite/gfortran.dg/graphite/interchange-1.f: Add comment. Clean
48 the graphite dump file.
49 * testsuite/gfortran.dg/graphite/interchange-2.f: Same.
50 * testsuite/gfortran.dg/graphite/pr42334-1.f: New.
52 2009-12-15 Sebastian Pop <sebastian.pop@amd.com>
56 * graphite-interchange.c (lst_perfect_nestify): Reset to NULL the LSTs
58 (lst_do_interchange_1): Renamed lst_interchange_select_inner.
59 (lst_try_interchange): Reimplemented.
60 (lst_interchange_select_inner): Same.
61 (lst_do_interchange): Renamed lst_interchange_select_outer.
63 (scop_do_interchange): Update use of lst_interchange_select_outer.
65 * testsuite/g++.dg/graphite/pr42130.C: Add -fgraphite-identity.
66 * testsuite/gcc.dg/graphite/block-0.c: Un-XFAILed.
67 * testsuite/gcc.dg/graphite/pr42211.c: New.
68 * testsuite/gfortran.dg/graphite/pr42334.f90: New.
70 2009-12-14 Sebastian Pop <sebastian.pop@amd.com>
73 * graphite-scop-detection.c (graphite_can_represent_scev): Handle more
74 carefully PLUS_EXPR, MINUS_EXPR, and MULT_EXPR.
76 * testsuite/gfortran.dg/graphite/pr42181.f90: New.
78 2009-12-12 Sebastian Pop <sebpop@gmail.com>
81 * graphite-sese-to-poly.c (rewrite_close_phi_out_of_ssa): Call
82 insert_out_of_ssa_copy_on_edge for anything else than SSA_NAMEs.
83 (detect_commutative_reduction_arg): Simplified.
84 (detect_commutative_reduction): Early return when the argument of
85 the close phi is not of an SSA_NAME.
87 * testsuite/gcc.dg/graphite/pr42284.c: New.
89 2009-12-11 Alexander Monakov <amonakov@ispras.ru>
91 * dbgcnt.def (graphite_scop): New counter.
92 * graphite.c: Include dbgcnt.h
93 (graphite_transform_loops): Use new counter to limit transformations.
95 2009-12-08 Sebastian Pop <sebpop@gmail.com>
98 * graphite-scop-detection.c (graphite_can_represent_init): Also
99 handle more complex MULT_EXPRs containing parameters by recursion
102 * testsuite/gfortran.dg/graphite/pr42285.f90: New.
104 2009-12-01 Tobias Grosser <grosser@fim.uni-passau.de>
106 * testsuite/g++.dg/graphite/pr42130.C: Fix type.
108 2009-11-29 Alexander Monakov <amonakov@gcc.gnu.org>
110 * testsuite/g++.dg/graphite/pr42130.C: Correct testcase.
112 2009-11-24 Tobias Grosser <grosser@fim.uni-passau.de>
114 * graphite-clast-to-gimple.c (try_mark_loop_parallel,
115 graphite_create_new_loop_guard, translate_clast_for): Fix comments.
117 2009-11-23 Tobias Grosser <grosser@fim.uni-passau.de>
120 * graphite-clast-to-gimple.c (graphite_create_new_loop_guard,
121 translate_clast_for_loop): New.
122 (translate_clast_for): Add a condition around the loop, to do not
123 execute loops with zero iterations.
124 * testsuite/g++.dg/graphite/pr42130.C: New.
125 * testsuite/gcc.dg/graphite/pr35356-2.c: Adapt.
127 2009-11-23 Tobias Grosser <grosser@fim.uni-passau.de>
129 * graphite-clast-to-gimple.c (try_mark_loop_parallel): New.
130 (translate_clast_for, translate_clast_guard, translate_clast, gloog):
131 Remove context_loop and level.
133 2009-11-23 Tobias Grosser <grosser@fim.uni-passau.de>
135 * graphite-clast-to-gimple.c (translate_clast_user,
136 translate_clast_for, translate_clast_guard): Simplify and move common
137 elements to translate_clast().
138 (translate_clast): Simplify and get common elements.
140 2009-11-23 Tobias Grosser <grosser@fim.uni-passau.de>
142 * graphite-clast-to-gimple.c (translate_clast_user,
143 translate_clast_for, translate_clast_guard): Split out of
146 2009-11-21 Tobias Grosser <grosser@fim.uni-passau.de>
148 * graphite-clast-to-gimple.c (clast_name_index, new_clast_name_index,
149 clast_name_to_index, save_clast_name_index, debug_clast_name_index,
150 debug_clast_name_indexes_1, debug_clast_name_indexes,
151 clast_name_index_elt_info, eq_clast_name_indexes): Moved from sese.h.
152 (clast_name_to_gcc, clast_to_gcc_expression,
153 clast_to_gcc_expression_red, gcc_type_for_clast_expr,
154 gcc_type_for_clast_eq, graphite_translate_clast_equation,
155 graphite_create_guard_cond_expr, graphite_create_new_loop,
156 translate_clast): Add params_index.
157 (initialize_cloog_names): Create parameter strings from scratch, do
158 not reference other strings.
159 (create_params_index): New.
160 (gloog): Initialize params_index.
161 * graphite-scop-detection (free_scops_1): Removed.
162 (limit_scops): Use normal free_scops.
163 * graphite-sese-to-poly.c (save_var_names): Removed.
164 (parameter_index_in_region): Do not initialize SESE_PARAM_NAMES
165 and SESE_PARAMS_INDEX.
166 * sese.c (new_sese, free_sese): Dito.
167 * sese.h (struct sese): Remove params_index, params_names.
168 (SESE_PARAMS_INDEX, SESE_PARAMS_NAMES): Removed.
170 2009-11-20 Sebastian Pop <sebastian.pop@amd.com>
172 Revert the following patch from 2009-09-14:
173 * graphite-blocking.c: Fix order of includes: tree-chrec.h, then
174 tree-scalar-evolution.h, and then tree-data-ref.h.
175 * graphite-clast-to-gimple.c: Same.
176 * graphite-dependences.c: Same.
177 * graphite-interchange.c: Same.
178 * graphite-poly.c: Same.
179 * graphite-scop-detection.c: Same.
180 * graphite-sese-to-poly.c: Same.
182 * lambda-code.c: Same.
183 * matrix-reorg.c: Same.
184 * tree-data-ref.c: Same.
185 * tree-if-conv.c: Same.
186 * tree-loop-distribu: Same.: Same.
187 * tree-loop-linear.c: Same.
188 * tree-parloops.c: Same.
189 * tree-predcom.c: Same.
190 * tree-vect-patterns.c: Same.
192 2009-11-20 Sebastian Pop <sebastian.pop@amd.com>
194 Revert patch from 2009-09-14.
195 * tree-ssa-loop.c (gate_graphite_transforms): Re-enable Graphite
196 passes at -O1 and below.
198 2009-11-18 Sebastian Pop <sebastian.pop@amd.com>
201 * testsuite/gcc.dg/graphite/pr40281.c: New.
203 * tree-scalar-evolution.c (instantiate_scev_poly): Base and stride
204 evolutions should not variate in inner loops.
206 2009-11-18 Sebastian Pop <sebastian.pop@amd.com>
209 * testsuite/gfortran.dg/graphite/pr42050.f90: New.
211 2009-11-18 Sebastian Pop <sebastian.pop@amd.com>
213 * graphite-interchange.c (memory_strides_in_loop_depth): New.
214 (pbb_interchange_profitable_p): Call memory_strides_in_loop_depth.
216 2009-11-18 Sebastian Pop <sebastian.pop@amd.com>
218 * graphite-blocking.c (scop_do_block): New.
219 * graphite-poly.c (apply_poly_transforms): Call scop_do_block.
220 * graphite-poly.h (scop_do_block): Declared.
222 2009-11-18 Sebastian Pop <sebastian.pop@amd.com>
224 * graphite-blocking.c (pbb_strip_mine_profitable_p): The parameter
225 depth is the loop nesting depth in the LST. Call psct_dynamic_dim
226 to transform depth into the time_depth before calling
227 pbb_number_of_iterations_at_time.
228 (lst_do_strip_mine): Use a scalar variable instead of recomputing
231 2009-11-18 Sebastian Pop <sebastian.pop@amd.com>
233 Reverted the patch for "scattering permutations" from 2009-10-28.
235 * graphite-poly.c (print_permutation): New.
236 (debug_permutation): New.
237 (new_poly_bb): Initialize PBB_PERMUTATION.
238 (free_poly_bb): Free PBB_PERMUTATION.
239 * graphite-poly.h (pbb_permutation_elt_p): Declared.
240 (struct pbb_permutation_elt): New.
241 (PBB_PERMUTATION_ELT_STRIDE): New.
242 (PBB_PERMUTATION_ELT_STRIDED_P): New.
243 (PBB_PERMUTATION_ELT_TIME_DIMENSION): New.
244 (new_pbb_permutation_elt): New.
245 (pbb_permutation_elt_free): New.
246 (struct poly_bb): Add field permutation.
247 (PBB_PERMUTATION): New.
248 (print_permutation): Declared.
249 (debug_permutation): Declared.
251 2009-11-04 Konrad Trifunovic <konrad.trifunovic@inria.fr>
253 * graphite-interchange.c (build_partial_difference): New.
254 (memory_stride_in_loop): Refactored the computation of
255 equality constraints into build_partial_difference function.
256 Added support for debugging stride computations.
258 2009-11-03 Sebastian Pop <sebastian.pop@amd.com>
260 * graphite-clast-to-gimple.c (gloog): Free if_region,
261 if_region->true_region, and if_region->region.
262 * sese.c (if_region_set_false_region): Free if_region->false_region.
263 (create_if_region_on_edge): Do not use GGC_NEW.
264 (move_sese_in_condition): Remove useless initialization.
266 2009-11-03 Sebastian Pop <sebastian.pop@amd.com>
268 * graphite-interchange.c (lst_perfect_nestify): Pass 3 parameters
269 for the loops created by the loop distribution. Do not modify the
271 (lst_try_interchange_loops): Same. Use a temporary LST for the
272 transformed schedule. Call lst_update_scattering before data
274 (lst_try_interchange): Pass an extra parameter INDEX.
275 (lst_do_interchange_1): New.
276 (lst_do_interchange): Call lst_do_interchange_1.
277 (scop_do_interchange): Call lst_update_scattering.
278 * graphite-poly.c (apply_poly_transforms): Do not call
279 lst_update_scattering.
280 * graphite-poly.h (lst_pred): New.
282 (lst_find_first_pbb): Return NULL when not found.
284 (lst_insert_in_sequence): Allow LST1 to be NULL.
286 (lst_substitute_3): New.
287 * gcc.dg/graphite/interchange-1.c: XFail.
288 * gcc.dg/graphite/interchange-8.c: XFail.
289 * gcc.dg/graphite/interchange-11.c: XFail.
291 2009-10-30 Sebastian Pop <sebastian.pop@amd.com>
293 * graphite-interchange.c (lst_perfectly_nested_p): New.
294 (lst_perfect_nestify): New.
295 (lst_try_interchange_loops): Call store_lst_schedule,
296 lst_perfectly_nested_p, lst_perfect_nestify and restore_lst_schedule.
297 (scop_do_interchange): Avoid redundant legality test.
298 Call lst_do_interchange on a copy of SCOP_TRANSFORMED_SCHEDULE.
299 * graphite-poly.c (apply_poly_transforms): Call lst_update_scattering.
300 * graphite-poly.h (psct_static_dim): New.
301 (lst_dewey_number_at_depth): New.
302 (lst_find_pbb): Restructured.
303 (lst_find_first_pbb): Restructured.
304 (lst_find_last_pbb): New.
305 (lst_contains_p): New.
306 (lst_contains_pbb): New.
307 (lst_create_nest): New.
308 (lst_remove_from_sequence): New.
309 (pbb_update_scattering): New.
310 (lst_update_scattering_under): New.
311 (lst_update_scattering_seq): New.
312 (lst_update_scattering): New.
313 (lst_insert_in_sequence): New.
314 (lst_distribute_lst): New.
315 (lst_remove_all_before_including_pbb): New.
316 (lst_remove_all_before_excluding_pbb): New.
318 2009-10-30 Sebastian Pop <sebastian.pop@amd.com>
320 * tree-ssa-loop-niter.c (finite_loop_p): Do not call twice
323 2009-10-30 Sebastian Pop <sebastian.pop@amd.com>
325 * graphite-poly.c (pbb_remove_duplicate_pdrs): Free collapsed.
327 2009-10-28 Konrad Trifunovic <konrad.trifunovic@gmail.com>
329 * graphite-poly.c (print_permutation): New.
330 (debug_permutation): New.
331 (new_poly_bb): Initialize PBB_PERMUTATION.
332 (free_poly_bb): Free PBB_PERMUTATION.
333 * graphite-poly.h (pbb_permutation_elt_p): Declared.
334 (struct pbb_permutation_elt): New.
335 (PBB_PERMUTATION_ELT_STRIDE): New.
336 (PBB_PERMUTATION_ELT_STRIDED_P): New.
337 (PBB_PERMUTATION_ELT_TIME_DIMENSION): New.
338 (new_pbb_permutation_elt): New.
339 (pbb_permutation_elt_free): New.
340 (struct poly_bb): Add field permutation.
341 (PBB_PERMUTATION): New.
342 (print_permutation): Declared.
343 (debug_permutation): Declared.
345 2009-10-26 Sebastian Pop <sebastian.pop@amd.com>
347 * graphite-clast-to-gimple.c (gloog): Do not call
348 sese_reset_aux_in_loops.
349 * graphite-sese-to-poly.c (build_loop_iteration_domains): Pass an
350 extra argument for domains. Do not use loop->aux.
351 (build_scop_iteration_domain): Initialize and free domains, pass it
352 to build_loop_iteration_domains and extract the information from
353 domains. Do not use loop->aux.
354 * sese.c (sese_reset_aux_in_loops): Removed.
355 * sese.h (sese_reset_aux_in_loops): Removed.
357 2009-10-26 Sebastian Pop <sebastian.pop@amd.com>
359 * graphite-clast-to-gimple.c (find_pbb_via_hash): Moved up.
360 (dependency_in_loop_p): Same.
361 (translate_clast): Do not use loop->aux. Initialize
362 loop->can_be_parallel.
363 (mark_loops_parallel): Removed.
364 * graphite-clast-to-gimple.h (mark_loops_parallel): Removed.
365 * graphite.c (free_aux_in_new_loops): Removed.
366 (graphite_finalize): Do not call free_aux_in_new_loops.
367 (graphite_transform_loops): Do not call mark_loops_parallel.
369 2009-10-26 Li Feng <nemokingdom@gmail.com>
371 * graphite-clast-to-gimple.c (get_stmtfor_depth): Removed.
372 (translate_clast): Pass an extra parameter LEVEL.
373 Call get_scattering_level.
374 * graphite-clast-to-gimple.h (get_scattering_level): New.
376 2009-10-22 Sebastian Pop <sebastian.pop@amd.com>
378 * cfgloop.c (alloc_loop): Initialize loop->single_iv.
379 * cfgloop.h (struct loop): New field single_iv.
381 * graphite-clast-to-gimple.c (pbb_to_depth_to_oldiv): Do not use
382 loop->aux anymore: use loop->single_iv.
383 (graphite_loop_normal_form): Moved...
384 (build_graphite_loop_normal_form): Removed.
385 (gloog): Do not call build_graphite_loop_normal_form.
386 (free_aux_in_new_loops): Moved...
387 (mark_loops_parallel): Restructure.
388 * graphite-clast-to-gimple.h (free_aux_in_new_loops): Do not declare.
389 * graphite-sese-to-poly.c (graphite_loop_normal_form): ...here.
390 (scop_canonicalize_loops): New.
391 (build_poly_scop): Call scop_canonicalize_loops.
392 * graphite.c (free_aux_in_new_loops): ...here.
394 2009-10-22 Sebastian Pop <sebastian.pop@amd.com>
396 * g++.dg/graphite/graphite.exp: Add the same rules as in
397 gcc.dg/graphite/graphite.exp.
399 2009-10-22 Sebastian Pop <sebastian.pop@amd.com>
401 * g++.dg/graphite/id-1.C: New.
403 2009-10-22 Sebastian Pop <sebastian.pop@amd.com>
405 * graphite-sese-to-poly.c (create_zero_dim_array): Pass an extra
407 (rewrite_close_phi_out_of_ssa): Update use of create_zero_dim_array.
408 (rewrite_phi_out_of_ssa): Same.
409 (rewrite_cross_bb_scalar_deps): Same.
410 (translate_scalar_reduction_to_array): Same.
412 2009-10-22 Sebastian Pop <sebastian.pop@amd.com>
414 * graphite-sese-to-poly.c (build_scop_drs): Disable call to
417 2009-10-22 Sebastian Pop <sebastian.pop@amd.com>
419 * graphite-sese-to-poly.c (dump_alias_graphs): New.
420 (build_scop_drs): Call dump_alias_graphs.
422 2009-10-22 Sebastian Pop <sebastian.pop@amd.com>
424 * graphite-poly.c (new_scop): Initialize SCOP_ORIGINAL_SCHEDULE,
425 SCOP_TRANSFORMED_SCHEDULE, and SCOP_SAVED_SCHEDULE.
426 (free_scop): Call free_lst on SCOP_ORIGINAL_SCHEDULE,
427 SCOP_TRANSFORMED_SCHEDULE, and SCOP_SAVED_SCHEDULE.
428 * graphite-poly.h (free_lst): New.
429 (store_lst_schedule): Free SCOP_SAVED_SCHEDULE.
430 (restore_lst_schedule): Free SCOP_TRANSFORMED_SCHEDULE.
432 2009-10-22 Sebastian Pop <sebastian.pop@amd.com>
434 * graphite-poly.h (struct scop): Add a field saved_schedule.
435 (SCOP_SAVED_SCHEDULE): New.
436 (store_lst_schedule): New.
437 (restore_lst_schedule): New.
438 (store_scattering): Call store_lst_schedule.
439 (restore_scattering): Call restore_lst_schedule.
441 2009-10-20 Sebastian Pop <sebastian.pop@amd.com>
443 * graphite-sese-to-poly.c (free_data_refs_aux): Fix formatting.
444 (pdr_add_alias_set): Same.
445 (build_poly_dr): Same.
446 (build_alias_set_optimal_p): Same.
447 (build_base_obj_set_for_drs): Same. Do not store the result of
450 2009-10-20 Sebastian Pop <sebastian.pop@amd.com>
452 * graphite-sese-to-poly.c (build_alias_set_optimal_p): Initialize
453 all_components_are_cliques to 1.
455 2009-10-20 Li Feng <nemokingdom@gmail.com>
457 * graphite-sese-to-poly.c (free_data_refs_aux): Update to free
459 (pdr_add_alias_set): Update retrieving alias_set_num.
460 (build_poly_dr): Update retrieving dr_base_object_set.
461 (partition_drs_to_sets): Remove.
462 (build_alias_set_optimal_p): New.
463 (build_alias_set_for_drs): Rename.
464 (build_scop_drs): Update.
465 * graphite-sese-to-poly.h (struct base_alias_pair): New.
466 (ALIAS_SET_INDEX): Remove.
467 (BASE_OBJECT_SET_INDEX): Remove.
469 2009-10-20 Sebastian Pop <sebastian.pop@amd.com>
471 * sese.c (get_vdef_before_sese): Handle GIMPLE_ASSIGN and GIMPLE_CALL.
473 2009-10-20 Sebastian Pop <sebastian.pop@amd.com>
475 * graphite-sese-to-poly.c (pdr_add_data_dimensions): Do not infer
476 loop upper bounds for 1-element arrays at end of structures.
477 * tree-flow.h (array_at_struct_end_p): Declared.
478 * tree-ssa-loop-niter.c (array_at_struct_end_p): Not static anymore.
480 2009-10-20 Sebastian Pop <sebastian.pop@amd.com>
482 * g++.dg/graphite/pr41305.C: New.
484 2009-10-20 Alexander Monakov <amonakov@ispras.ru>
486 * graphite-sese-to-poly.c (build_loop_iteration_domains): Generalize
487 construction of parameter constraints from loop iteration analysis.
488 * gcc.dg/graphite/run-id-2.c: New test.
490 2009-10-17 Sebastian Pop <sebastian.pop@amd.com>
492 * graphite-interchange.c (memory_stride_in_loop): Delete p1, lma
495 2009-10-17 Sebastian Pop <sebastian.pop@amd.com>
497 * graphite-dependences.c (dependence_polyhedron_1): Remove
498 unused gdim dimensions from the DDR polyhedron.
500 2009-10-17 Sebastian Pop <sebastian.pop@amd.com>
502 * graphite-dependences.c (pddr_transformed_scattering): New.
503 (dot_original_deps_stmt_1): New.
504 (dot_transformed_deps_stmt_1): New.
505 (dot_deps_stmt_1): Call dot_original_deps_stmt_1 and
506 dot_transformed_deps_stmt_1.
507 (dot_original_deps): New.
508 (dot_transformed_deps): New.
509 (dot_deps_1): Call dot_original_deps and dot_transformed_deps.
511 2009-10-17 Sebastian Pop <sebastian.pop@amd.com>
513 * graphite-dependences.c (reduction_dr_1): Remove wrong
514 assert: reduction BBs can have multiple reduction writes
515 to memory. interchange-3.f90 is an example.
517 2009-10-17 Sebastian Pop <sebastian.pop@amd.com>
519 * gfortran.dg/graphite/interchange-3.f90: New.
521 2009-10-17 Sebastian Pop <sebastian.pop@amd.com>
523 * gcc.dg/graphite/interchange-1.c: Un-XFAILed.
525 2009-10-17 Sebastian Pop <sebastian.pop@amd.com>
527 * graphite-dependences.c (dependence_polyhedron_1): Add the
528 context to the dependence polyhedron.
530 2009-10-17 Sebastian Pop <sebastian.pop@amd.com>
532 * graphite-poly.c (pbb_remove_duplicate_pdrs): Initialize
533 PBB_PDR_DUPLICATES_REMOVED.
536 2009-10-17 Sebastian Pop <sebastian.pop@amd.com>
538 * graphite-sese-to-poly.c (find_scop_parameters): Initialize
540 (build_loop_iteration_domains): Extract bounds on parameters
541 based on the data size.
542 (build_scop_context): Do not initialize SCOP_CONTEXT;
545 2009-10-17 Sebastian Pop <sebastian.pop@amd.com>
547 * graphite-ppl.c (ppl_min_for_le_polyhedron): New.
548 * graphite-ppl.h (graphite-ppl.h): Declared.
550 2009-10-17 Sebastian Pop <sebastian.pop@amd.com>
552 * graphite-ppl.c (ppl_print_linear_expr): New.
553 (debug_ppl_linear_expr): New.
554 * graphite-ppl.h (ppl_print_linear_expr): Declared.
555 (debug_ppl_linear_expr): Declared.
557 2009-10-16 Sebastian Pop <sebastian.pop@amd.com>
559 * graphite-interchange.c: Fix comments.
560 * gcc.dg/graphite/block-1.c: Fix comments.
562 2009-10-16 Sebastian Pop <sebastian.pop@amd.com>
564 * gcc.dg/graphite/interchange-7.c: Un-XFAILed.
565 * gcc.dg/graphite/interchange-9.c: Un-XFAILed.
567 2009-10-16 Sebastian Pop <sebastian.pop@amd.com>
569 Reapply the patch from Alexander Monakov that disappeared during
570 the last merges from trunk.
572 2009-09-16 Alexander Monakov <amonakov@ispras.ru>
574 * graphite-sese-to-poly.c (pdr_add_data_dimensions): Add bounds only
575 for ARRAY_REFs. Use array_ref_{low,up}_bound to determine bounds.
577 2009-10-15 Sebastian Pop <sebastian.pop@amd.com>
579 * graphite-interchange.c (memory_stride_in_loop): The depth
580 argument corresponds to a dynamic time dimension, so use
581 psct_dynamic_dim to refer to the transformed scattering dimension.
583 2009-10-15 Sebastian Pop <sebastian.pop@amd.com>
585 * graphite-interchange.c (memory_stride_in_loop): Fix comments.
587 2009-10-15 Sebastian Pop <sebastian.pop@amd.com>
589 * graphite-blocking.c (lst_do_strip_mine): Avoid strip mining the
591 * graphite-interchange.c (lst_do_interchange): Avoid interchanging
593 * graphite-poly.c (scop_to_lst): Fix LST sequence in an outermost
595 (print_lst): Print the root of LST in a different format.
596 * graphite-poly.h (lst_depth): Adjust to include the root of the LST.
598 2009-10-15 Sebastian Pop <sebastian.pop@amd.com>
600 * graphite-poly.c (print_scop): Fix pretty printing of a SCoP.
602 2009-10-15 Sebastian Pop <sebastian.pop@amd.com>
604 * doc/passes.texi: Document the Graphite infrastructure.
606 2009-10-15 Sebastian Pop <sebastian.pop@amd.com>
608 * graphite-sese-to-poly.c (insert_copyin): Use gsi_insert_seq_on_edge.
609 (rewrite_commutative_reductions_out_of_ssa): Call gsi_commit_edge_inserts,
610 and check the SSA representation.
612 * gfortran.dg/graphite/id-18.f90: New, reduced from PR41193.
614 2009-10-15 Sebastian Pop <sebastian.pop@amd.com>
616 * gcc.dg/graphite/pr40157.c: Use -floop-block as reported in the PR.
618 2009-10-14 Sebastian Pop <sebastian.pop@amd.com>
620 * gcc.dg/graphite/interchange-11.c: New.
622 2009-10-14 Sebastian Pop <sebastian.pop@amd.com>
624 * gcc.dg/graphite/interchange-8.c: Enable loop interchange.
626 2009-10-14 Sebastian Pop <sebastian.pop@amd.com>
628 * gcc.dg/graphite/graphite.exp (DEFAULT_CFLAGS_GRAPHITE_BLOCK):
629 Add -fno-loop-strip-mine and -fno-loop-interchange.
630 (DEFAULT_FLAGS_GRAPHITE_INTERCHANGE): Add -fno-loop-block and
631 -fno-loop-strip-mine.
632 * gfortran.dg/graphite/graphite.exp: Same.
634 2009-10-14 Sebastian Pop <sebastian.pop@amd.com>
636 * gcc.dg/graphite/graphite.exp (DEFAULT_CFLAGS_GRAPHITE_BLOCK):
637 Renamed DEFAULT_FLAGS_GRAPHITE_BLOCK.
638 (DEFAULT_CFLAGS_GRAPHITE_IDENTITY): Renamed
639 DEFAULT_FLAGS_GRAPHITE_IDENTITY.
640 (DEFAULT_CFLAGS_GRAPHITE_INTERCHANGE): Renamed
641 DEFAULT_FLAGS_GRAPHITE_INTERCHANGE.
642 (DEFAULT_CFLAGS_GRAPHITE_SCOP): Renamed
643 DEFAULT_FLAGS_GRAPHITE_SCOP.
644 (DEFAULT_CFLAGS_RUN_ID): Renamed DEFAULT_FLAGS_RUN_ID.
645 (DEFAULT_CFLAGS_GRAPHITE): Renamed DEFAULT_FLAGS_GRAPHITE.
647 2009-10-14 Sebastian Pop <sebastian.pop@amd.com>
649 * graphite-poly.c (pbb_number_of_iterations_at_time): Cleanup comments.
651 2009-10-14 Konrad Trifunovic <konrad.trifunovic@gmail.com>
652 Sebastian Pop <sebastian.pop@amd.com>
654 * graphite-interchange.c (build_linearized_memory_access): Pass an
656 (memory_stride_in_loop): Include transform scattering in the
657 access functions to be able to querry the strides in the
659 (pbb_interchange_loop_depths): Interchange the psct_dynamic_dim,
660 not the psct_iterator_dim.
662 2009-10-14 Sebastian Pop <sebastian.pop@amd.com>
664 * graphite-blocking.c (pbb_do_strip_mine): Removed.
665 (lst_do_strip_mine_loop): New.
666 (lst_do_strip_mine): New.
667 (scop_do_strip_mine): Call lst_do_strip_mine.
668 * graphite-poly.h (lst_add_loop_under_loop): New.
669 (lst_find_first_pbb): New.
671 2009-10-14 Sebastian Pop <sebastian.pop@amd.com>
673 * graphite-poly.c (loop_to_lst): Fix LST creation.
675 2009-10-14 Tobias Grosser <grosser@fim.uni-passau.de>
677 * testsuite/gcc.dg/graphite/id-15.c: (8 * 8) replaced with
678 sizeof(unsigned long) to make it run on 32bit systems.
680 2009-10-14 Tobias Grosser <grosser@fim.uni-passau.de>
682 * testsuite/gcc.dg/graphite/run-id-1.c: Use smaller matrix to not
685 2009-10-14 Ramakrishna Upadrasta <Ramakrishna.Upadrasta@inria.fr>
687 * graphite-sese-to-poly.c (write_alias_graph_to_ascii_dimacs): Fix
689 (write_alias_graph_to_ascii_dot): New.
690 (write_alias_graph_to_ascii_ecc): Ditto.
691 (partition_drs_to_sets): Add testing of optimality of current method
692 which assigns alias numbers according to DFS Comopnent number. used
693 as heuristic for the upcoming ECC algorithm.
694 (build_scop_drs): Write to file also with the ecc and dot format.
696 2009-10-13 Sebastian Pop <sebastian.pop@amd.com>
698 * gfortran.dg/graphite/interchange-1.f: XFail.
700 2009-10-13 Sebastian Pop <sebastian.pop@amd.com>
702 * graphite.c (graphite_initialize): Do not handle functions with
703 more than 100 basic blocks.
705 2009-10-13 Sebastian Pop <sebastian.pop@amd.com>
707 * graphite-blocking.c (pbb_do_strip_mine): Use
708 PARAM_LOOP_BLOCK_TILE_SIZE.
710 2009-10-13 Sebastian Pop <sebastian.pop@amd.com>
712 * graphite-poly.c (dot_lst_1): New.
714 * graphite-poly.h (dot_lst): Declared.
716 2009-10-13 Sebastian Pop <sebastian.pop@amd.com>
718 * graphite-dependences.c (dot_deps_stmt_1): New.
719 (dot_deps_stmt): New.
720 * graphite-dependences.h (dot_deps_stmt): Declared.
722 2009-10-09 Sebastian Pop <sebastian.pop@amd.com>
724 * graphite-sese-to-poly.c (rewrite_cross_bb_scalar_dependence): Do
725 not replace cross BB scalar dependences ending on PHI nodes.
726 (rewrite_cross_bb_scalar_deps): Filter out GIMPLE_PHI nodes.
728 2009-10-09 Sebastian Pop <sebastian.pop@amd.com>
730 * graphite-poly.c (apply_poly_transforms): Implement the high
731 level driver for flag_loop_block.
732 * tree-ssa-loop.c (gate_graphite_transforms): Remove call to sorry for
735 * gcc.dg/graphite/graphite.exp (DEFAULT_CFLAGS_GRAPHITE_BLOCK): Add
737 * gfortran.dg/graphite/graphite.exp (DEFAULT_CFLAGS_GRAPHITE_BLOCK):
740 2009-10-09 Sebastian Pop <sebastian.pop@amd.com>
742 * graphite-poly.h (lst_find_pbb): New.
743 (find_lst_loop): New.
745 2009-10-09 Sebastian Pop <sebastian.pop@amd.com>
747 * graphite-poly.c (new_scop): Remove init of SCOP_DEP_GRAPH.
748 * graphite-poly.h (struct scop): Remove dep_graph field.
749 (SCOP_DEP_GRAPH): Removed.
751 2009-10-09 Sebastian Pop <sebastian.pop@amd.com>
753 * graphite-poly.h (copy_lst): Do full copy of LST.
755 2009-10-07 Sebastian Pop <sebastian.pop@amd.com>
757 * graphite-sese-to-poly.c (reduction_phi_p): Call remove_invariant_phi
758 when the loop stride is zero.
760 * gcc.dg/graphite/id-16.c: New.
762 2009-10-06 Sebastian Pop <sebastian.pop@amd.com>
764 * graphite-dependences.c (reduction_dr_1): New.
765 (reduction_dr_p): New.
766 (graphite_legal_transform_dr): Call reduction_dr_p.
767 (reduction_ddr): Renamed reduction_ddr_p.
768 * graphite-poly.h (same_pdr_p): New.
769 (number_of_write_pdrs): New.
770 * graphite-sese-to-poly.c (nb_data_writes_in_bb): New.
771 (split_reduction_stmt): Do not split reduction statements
772 when there are no writes to memory.
773 (translate_scalar_reduction_to_array_for_stmt): Insert the
774 memory reduction statement just after the scalar reduction statement.
776 * gcc.dg/graphite/interchange-10.c: Updated to differ from interchange-4.c.
778 * gcc.dg/graphite/interchange-3.c: Un-XFAIL-ed.
779 * gcc.dg/graphite/interchange-4.c: Un-XFAIL-ed.
781 2009-10-06 Sebastian Pop <sebastian.pop@amd.com>
783 * graphite-interchange.c (lst_apply_interchange): New.
784 (lst_interchange_profitable_p): New.
785 (lst_try_interchange_loops): New.
786 (lst_try_interchange): New.
787 (lst_do_interchange): New.
788 (pbb_do_interchange): Removed.
789 (scop_do_interchange): Call lst_do_interchange.
791 2009-10-06 Sebastian Pop <sebastian.pop@amd.com>
793 * graphite-poly.c (print_scop): Print SCOP_ORIGINAL_SCHEDULE and
794 SCOP_TRANSFORMED_SCHEDULE.
799 * graphite-poly.h (lst_p): New.
802 (LST_LOOP_FATHER): New.
805 (scop_to_lst): Declared.
806 (print_lst): Declared.
807 (debug_lst): Declared.
812 (lst_dewey_number): New.
813 (struct scop): Add original_schedule and transformed_schedule fields.
814 (SCOP_ORIGINAL_SCHEDULE): New.
815 (SCOP_TRANSFORMED_SCHEDULE): New.
816 * graphite-sese-to-poly.c (build_poly_scop): Call scop_to_lst.
818 2009-10-05 Sebastian Pop <sebastian.pop@amd.com>
820 * graphite-dependences.c (reduction_ddr): New.
821 (graphite_legal_transform_bb): Call reduction_ddr.
822 * graphite-poly.c (new_poly_bb): Pass a new bool parameter.
823 Initialize PBB_IS_REDUCTION.
824 * graphite-poly.h (struct poly_bb): New bool field is_reduction.
825 (PBB_IS_REDUCTION): New.
826 (new_poly_bb): Update declaration.
827 * graphite-scop-detection.h (build_scop_bbs): Removed.
828 (nb_reductions_in_loop): Removed.
829 * graphite-sese-to-poly.c (try_generate_gimple_bb): Pass a sbitmap
830 parameter for reductions.
831 (try_generate_gimple_bb): Update call to new_poly_bb.
832 (build_scop_bbs_1): Same.
833 (build_scop_bbs): Same.
834 (gsi_for_phi_node): New.
835 (scalar_close_phi_node_p): Remove gcc_assert.
836 (split_reduction_stmt): New.
837 (is_reduction_operation_p): New.
838 (phi_contains_arg): New.
839 (follow_ssa_with_commutative_ops): New.
840 (detect_commutative_reduction_arg): New.
841 (detect_commutative_reduction_assign): New.
842 (follow_inital_value_to_phi): New.
843 (edge_initial_value_for_loop_phi): New.
844 (initial_value_for_loop_phi): New.
845 (detect_commutative_reduction): New.
846 (translate_scalar_reduction_to_array_for_stmt): New.
847 (insert_copyout): New.
848 (insert_copyin): New.
849 (translate_scalar_reduction_to_array): New.
850 (rewrite_commutative_reductions_out_of_ssa_close_phi): New.
851 (rewrite_commutative_reductions_out_of_ssa_loop): New.
852 (rewrite_commutative_reductions_out_of_ssa): New.
853 (build_poly_scop): Call rewrite_commutative_reductions_out_of_ssa.
854 * sese.h (split_region_for_bb): New.
856 * gcc.dg/graphite/graphite.exp (DEFAULT_CFLAGS_GRAPHITE_BLOCK): Add -ffast-math.
857 * gcc.dg/graphite/interchange-1.c: Fix format.
858 * gcc.dg/graphite/interchange-10.c: New.
860 2009-10-05 Sebastian Pop <sebastian.pop@amd.com>
862 * graphite-sese-to-poly.c (insert_out_of_ssa_copy): Remove
865 2009-10-05 Sebastian Pop <sebastian.pop@amd.com>
867 * graphite-sese-to-poly.c (scev_analyzable_p): New.
868 (rewrite_cross_bb_scalar_dependence): New.
869 (rewrite_cross_bb_scalar_deps): New.
870 (rewrite_reductions_out_of_ssa): Use bb_in_sese_p.
871 Call rewrite_cross_bb_scalar_deps.
873 2009-10-05 Sebastian Pop <sebastian.pop@amd.com>
875 * graphite-sese-to-poly.c (gsi_for_ssa_name_def): Removed.
876 (insert_out_of_ssa_copy): Directly use gsi_after_labels and
879 2009-10-05 Sebastian Pop <sebastian.pop@amd.com>
881 * graphite-clast-to-gimple.c (build_cloog_prog): Use pbb_index.
882 * graphite-interchange.c (pbb_do_interchange): Same.
883 * graphite-poly.c (print_scattering_function): Same.
885 * graphite-poly.h (pbb_loop): New.
886 * graphite-sese-to-poly.c (create_linear_expr_from_tree): Use pbb_loop.
888 2009-09-27 Sebastian Pop <sebastian.pop@amd.com>
890 * graphite-scop-detection.c (limit_scops): Do not build poly_bbs.
892 2009-09-27 Sebastian Pop <sebastian.pop@amd.com>
894 * graphite-sese-to-poly.c (partition_drs_to_sets): Drs is not modified,
895 so don't pass a pointer to it.
896 (build_alias_set_for_drs): Same.
897 (build_base_obj_set_for_drs): Same.
898 (build_scop_drs): Same.
900 2009-09-26 Li Feng <nemokingdom@gmail.com>
902 * graphite-sese-to-poly.c (build_scop_drs): Disable writing to file
903 the alias graph of data references.
905 2009-09-25 Li Feng <nemokingdom@gmail.com>
907 * graphite-sese-to-poly.c (write_alias_graph_to_ascii_dimacs): New.
908 (build_scop_drs): When debugging, write the alias graph to file,
909 otherwise, should be disabled.
911 2009-09-17 Sebastian Pop <sebastian.pop@amd.com>
913 * graphite-scop-detection.c (stmt_simple_memref_p): Removed.
914 (is_simple_operand): Remove call to stmt_simple_memref_p.
915 (stmt_simple_for_scop_p): Update call to is_simple_operand.
917 2009-09-17 David Edelsohn <edelsohn@gnu.org>
919 * testsuite/gcc.dg/graphite/interchange-mvt.c: New File.
920 * testsuite/gcc.dg/graphite/scop-dsyrk.c: New File.
921 * testsuite/gcc.dg/graphite/scop-dsyr2k.c: New File.
922 * testsuite/gcc.dg/graphite/scop-mvt.c: New File.
923 * testsuite/gcc.dg/graphite/scop-sor.c: New File.
925 2009-09-17 Li Feng <nemokingdom@gmail.com>
928 * graphite-dependences.c (poly_drs_may_alias_p): Adjust definition.
929 (pddr_original_scattering): Make sure 2 pdr2 in the same base object set.
930 (graphite_carried_dependence_level_k): Ditto.
931 * graphite-poly.c (new_poly_dr): Add init of PDR_BASE_OBJECT_SET.
932 * graphite-poly.h (struct poly_dr): Add member dr_base_object_set.
933 (new_poly_dr): Adjust declaration.
934 * graphite-sese-to-poly.c (free_data_refs_aux): New.
935 (free_gimple_bb): Added free_data_refs_aux.
936 (build_poly_dr): Add dr_base_object_set.
937 (partition_drs_to_sets): New.
938 (dr_same_base_object_p): New.
939 (build_alias_set_for_drs): New.
940 (build_base_object_set_for_drs): New.
941 (build_scop_drs): Add build_base_obj_set_for_drs.
942 * graphite-sese-to-poly.h: Added #define for alias set number index and
943 base object set index.
944 * libgomp/testsuite/libgomp.graphite/force-parallel-6.c: Refine tests.
945 * libgomp/testsuite/libgomp.graphite/pr4118.c: New.
947 2009-09-16 Alexander Monakov <amonakov@ispras.ru>
949 * graphite-sese-to-poly.c (pdr_add_data_dimensions): Add bounds only
950 for ARRAY_REFs. Use array_ref_{low,up}_bound to determine bounds.
952 2009-09-14 Sebastian Pop <sebastian.pop@amd.com>
954 * graphite-sese-to-poly.c (struct irp_data): Removed.
955 (idx_record_params): Removed.
956 (find_params_in_bb): Scan for parameters the access functions; don't
957 parse the tree representation.
959 2009-09-14 Sebastian Pop <sebastian.pop@amd.com>
961 * tree-ssa-loop.c (gate_graphite_transforms): Disable Graphite
962 passes at -O1 and below.
964 2009-09-14 Sebastian Pop <sebastian.pop@amd.com>
966 * graphite-blocking.c: Fix order of includes: tree-chrec.h, then
967 tree-scalar-evolution.h, and then tree-data-ref.h.
968 * graphite-clast-to-gimple.c: Same.
969 * graphite-dependences.c: Same.
970 * graphite-interchange.c: Same.
971 * graphite-poly.c: Same.
972 * graphite-scop-detection.c: Same.
973 * graphite-sese-to-poly.c: Same.
975 * lambda-code.c: Same.
976 * matrix-reorg.c: Same.
977 * tree-data-ref.c: Same.
978 * tree-if-conv.c: Same.
979 * tree-loop-distribu: Same.: Same.
980 * tree-loop-linear.c: Same.
981 * tree-parloops.c: Same.
982 * tree-predcom.c: Same.
983 * tree-vect-patterns.c: Same.
985 2009-09-02 Sebastian Pop <sebastian.pop@amd.com>
987 Partially revert the previous patch, except the following.
988 * tree-scalar-evolution.c (instantiate_scev_not): Adapted to pass
989 as parameters the operands of the not expression.
991 2009-09-01 Sebastian Pop <sebastian.pop@amd.com>
993 * tree-scalar-evolution.c (instantiate_scev_assign): New.
994 Do not call analyze_scalar_evolution on assignments.
995 (instantiate_scev_phi): Call analyze_scalar_evolution.
996 (instantiate_scev_name): Call instantiate_scev_assign and
997 instantiate_scev_phi.
998 (instantiate_scev_not): Adapted to pass as parameters the operands
999 of the not expression.
1001 2009-09-01 Sebastian Pop <sebastian.pop@amd.com>
1003 * tree-scalar-evolution.c (instantiate_scev_binary): Adapted
1004 to pass as parameters the operands of the binary expression.
1006 2009-09-01 Sebastian Pop <sebastian.pop@amd.com>
1008 * tree-scalar-evolution.c (instantiate_scev_bitnot): Renamed
1009 instantiate_scev_not. Handle NEGATE_EXPR.
1010 (instantiate_scev_r): Handle NEGATE_EXPR.
1012 2009-09-01 Sebastian Pop <sebastian.pop@amd.com>
1014 * tree-scalar-evolution.c (instantiate_scev_1): Renamed
1016 (instantiate_scev_r): Move code in instantiate_scev_2
1017 and instantiate_scev_1.
1019 2009-09-01 Sebastian Pop <sebastian.pop@amd.com>
1021 * tree-scalar-evolution.c (instantiate_scev_3): New.
1022 (instantiate_scev_1): Move code in instantiate_scev_3.
1024 2009-09-01 Sebastian Pop <sebastian.pop@amd.com>
1026 * tree-scalar-evolution.c (instantiate_scev_poly): New.
1027 (instantiate_scev_1): Move code in instantiate_scev_poly.
1029 2009-09-01 Sebastian Pop <sebastian.pop@amd.com>
1031 * tree-scalar-evolution.c (instantiate_scev_bitnot): New.
1032 (instantiate_scev_1): Move code in instantiate_scev_bitnot.
1034 2009-09-01 Sebastian Pop <sebastian.pop@amd.com>
1036 * tree-scalar-evolution.c (instantiate_scev_convert): New.
1037 (instantiate_scev_1): Move code in instantiate_scev_convert.
1039 2009-09-01 Sebastian Pop <sebastian.pop@amd.com>
1041 * tree-scalar-evolution.c (instantiate_scev_binary): New.
1042 (instantiate_scev_1): Move code in instantiate_scev_binary.
1044 2009-09-01 Sebastian Pop <sebastian.pop@amd.com>
1046 * tree-scalar-evolution.c (instantiate_scev_name): New.
1047 (instantiate_scev_1): Move code in instantiate_scev_name.
1049 2009-08-28 Sebastian Pop <sebastian.pop@amd.com>
1051 * Merge from mainline (150992:151171).
1053 2009-08-25 Sebastian Pop <sebastian.pop@amd.com>
1055 * graphite-dependences.c (graphite_legal_transform_bb): Call
1056 pbb_remove_duplicate_pdrs.
1057 * graphite-poly.c (can_collapse_pdr): Removed.
1058 (pdr_find_duplicate): Removed.
1059 (can_collapse_pdrs): New.
1060 (pbb_remove_duplicate_pdrs): New.
1061 (new_poly_dr): Do not look for duplicates.
1062 * graphite-poly.h (struct poly_bb): New field pdr_duplicates_removed.
1063 (PBB_PDR_DUPLICATES_REMOVED): New.
1064 (pbb_remove_duplicate_pdrs): Declared.
1066 2009-08-25 Sebastian Pop <sebastian.pop@amd.com>
1068 * graphite-interchange.c (pbb_interchange_profitable_p): Adjust
1069 the strides by multiplying by PDR_NB_REFS.
1070 * graphite-poly.c (can_collapse_pdr): New.
1071 (pdr_find_duplicate): New.
1072 (new_poly_dr): Call pdr_find_duplicate. Collapse duplicate PDRs.
1073 Initialize PDR_NB_REFS.
1074 * graphite-poly.h (struct poly_dr): Add field nb_refs.
1076 (new_poly_dr): Number of subscripts is a graphite_dim_t.
1078 2009-08-25 Sebastian Pop <sebastian.pop@amd.com>
1080 Revert one of the previous commits:
1081 * graphite-dependences.c (graphite_legal_transform_bb): Avoid
1082 the computation of symmetric data dependence relations.
1083 (dependency_between_pbbs_p): Same.
1085 2009-08-25 Sebastian Pop <sebastian.pop@amd.com>
1088 * graphite-poly.c (apply_poly_transforms): Remove legality test before
1091 2009-08-25 Sebastian Pop <sebastian.pop@amd.com>
1093 * graphite-dependences.c (pddr_original_scattering): Return NULL
1094 for read-read dependence relations.
1095 * graphite-poly.h (enum poly_dr_type): Fix comment.
1098 (pdr_may_write_p): New.
1100 2009-08-25 Sebastian Pop <sebastian.pop@amd.com>
1102 * graphite-poly.h (enum POLY_DR_TYPE): Renamed poly_dr_type.
1103 (struct poly_dr): Same.
1104 (new_poly_dr): Same.
1105 * graphite-poly.c (new_poly_dr): Same.
1107 2009-08-25 Konrad Trifunovic <konrad.trifunovic@gmail.com>
1108 Sebastian Pop <sebastian.pop@amd.com>
1110 * graphite-blocking.c (pbb_strip_mine_loop_depth): Renamed
1111 pbb_strip_mine_time_depth. Changed the implementation so that
1112 transformation is expressed as a transformation on
1113 time (scatttering) dimensions. Also, ensures that the 2d+1
1114 scheduling format is preserved.
1115 (pbb_strip_mine_profitable_p): Profitability is based on the
1116 iteration number of a given time (scattering) dimension,
1117 and not on a original loop depth dimension.
1118 (pbb_strip_mine): Call pbb_number_of_iterations_at_time.
1119 (pbb_do_strip_mine): Call psct_dynamic_dim.
1120 * graphite-poly.c (pbb_number_of_iterations_at_time): New.
1121 * graphite-poly.h (pbb_number_of_iterations_at_time): Declared.
1122 (pbb_nb_dynamic_scattering_transform): New.
1123 (psct_dynamic_dim): New.
1125 2009-08-25 Konrad Trifunovic <konrad.trifunovic@gmail.com>
1127 * graphite-ppl.c (ppl_max_for_le): Renamed ppl_max_for_le_pointset.
1128 * graphite-ppl.h (ppl_max_for_le): Renamed ppl_max_for_le_pointset.
1129 * graphite-poly.c (pbb_number_of_iterations): Rename ppl_max_for_le.
1130 * graphite-interchange.c (build_linearized_memory_access): Same.
1131 (memory_stride_in_loop): Same.
1133 2009-08-25 Sebastian Pop <sebastian.pop@amd.com>
1135 * graphite-dependences.c (pddr_original_scattering): New.
1136 (graphite_legal_transform_dr): Call pddr_original_scattering.
1139 * graphite-dependences.h (dot_deps): Declared.
1140 * graphite-poly.c (new_poly_dr): Initialize PDR_ID.
1141 (print_pdr): Print PDR_ID.
1142 * graphite-poly.h (struct poly_dr): Add field id.
1145 * graphite-scop-detection.c (dot_all_scops_1): Cleanup comment.
1147 2009-08-22 Sebastian Pop <sebastian.pop@amd.com>
1149 * graphite-dependences.c (graphite_carried_dependence_level_k): Do
1150 not delete the original dependence relation.
1152 2009-08-21 Sebastian Pop <sebastian.pop@amd.com>
1154 * graphite-dependences.c (graphite_legal_transform_bb): Avoid
1155 the computation of symmetric data dependence relations.
1156 (dependency_between_pbbs_p): Same.
1158 2009-08-21 Sebastian Pop <sebastian.pop@amd.com>
1160 * graphite-dependences.c (new_poly_dr_pair): Renamed new_poly_ddr.
1161 (eq_poly_dr_pair_p): Renamed eq_poly_ddr_p.
1162 (hash_poly_dr_pair_p): Renamed hash_poly_ddr_p.
1163 (free_poly_ddr): New.
1164 (pddr_is_empty): New.
1165 (dependence_polyhedron_1): Now returns a poly_ddr_p.
1166 (dependence_polyhedron): Same. Remove useless gcc_assert.
1168 (graphite_legal_transform_dr): Call pddr_is_empty and free_poly_ddr.
1169 (graphite_carried_dependence_level_k): Call pddr_is_empty.
1170 * graphite-dependences.h (enum poly_dependence_kind): New.
1171 (poly_dr_pair): Renamed poly_ddr. Added a field kind.
1172 (PDRP_SOURCE): Renamed PDDR_SOURCE.
1173 (PDRP_SINK): Renamed PDDR_SINK.
1174 (PDRP_DDP): Renamed PDDR_DDP.
1176 (free_poly_ddr): Declared.
1177 * graphite-poly.c (new_scop): Use the new hash function names.
1178 * graphite-poly.h (struct scop): Renamed field original_pdr_pairs
1179 into original_pddrs.
1180 (SCOP_ORIGINAL_PDR_PAIRS): Renamed SCOP_ORIGINAL_PDDRS.
1182 2009-08-21 Sebastian Pop <sebastian.pop@amd.com>
1184 * Merge from mainline (150764:150992).
1186 2009-08-18 Sebastian Pop <sebastian.pop@amd.com>
1188 * cfgloopmanip.c (create_empty_loop_on_edge): Generate upper
1189 bounds with LT_EXPR to make niter analysis more precise on code
1190 generated by Graphite.
1192 2009-08-18 Sebastian Pop <sebastian.pop@amd.com>
1194 * graphite-dependences.c (graphite_legal_transform_dr): Fix formatting.
1195 (graphite_legal_transform_bb): Same.
1196 (poly_drs_may_alias_p): Same.
1198 2009-08-15 Sebastian Pop <sebastian.pop@amd.com>
1201 * graphite-ppl.c (ppl_max_for_le): Correct the use of
1202 ppl_Pointset_Powerset_C_Polyhedron_maximize.
1204 2009-08-13 Sebastian Pop <sebastian.pop@amd.com>
1206 * graphite-poly.c (print_pbb): Print PBB index.
1208 2009-08-13 Sebastian Pop <sebastian.pop@amd.com>
1210 * Merge from mainline (r150672:150764).
1212 2009-08-13 Sebastian Pop <sebastian.pop@amd.com>
1214 * graphite-interchange.c (ppl_max_for_le): Moved...
1215 * graphite-poly.c (pbb_number_of_iterations): Call ppl_max_for_le.
1216 * graphite-ppl.c (ppl_max_for_le): ... here.
1217 * graphite-ppl.h (ppl_max_for_le): Declared.
1219 2009-08-12 Sebastian Pop <sebastian.pop@amd.com>
1221 * Merge from mainline (r150372:150672).
1223 2009-08-11 Sebastian Pop <sebastian.pop@amd.com>
1226 * sese.c (convert_for_phi_arg): New.
1227 (add_guard_exit_phis): Use convert_for_phi_arg.
1229 * testsuite/gfortran.dg/graphite/id-17.f: New.
1231 2009-08-11 Sebastian Pop <sebastian.pop@amd.com>
1233 * graphite-sese-to-poly.c (pdr_add_data_dimensions): Dont add
1234 unknown subscript upper bounds.
1236 * testsuite/gcc.dg/graphite/interchange-6.c: Un-XFAIL.
1238 2009-08-11 Sebastian Pop <sebastian.pop@amd.com>
1239 Pranav Garg <pranav.garg2107@gmail.com>
1241 * graphite-interchange.c (gather_access_strides): Removed.
1242 (ppl_max_for_le): New.
1243 (build_linearized_memory_access): New.
1244 (memory_stride_in_loop): New.
1245 (pbb_interchange_profitable_p): Reimplemented.
1246 * graphite-ppl.h (ppl_new_id_map): New.
1247 (ppl_interchange): New.
1249 * testsuite/gcc.dg/graphite/interchange-6.c: XFAILed.
1251 2009-08-11 Sebastian Pop <sebastian.pop@amd.com>
1253 * graphite-interchange.c (compute_subscript): Removed.
1254 (compute_array_size_cstr): Removed.
1255 (compute_array_size_poly): Removed.
1256 (compute_array_size): Removed.
1257 (gather_access_strides_poly): Removed.
1258 (gather_access_strides): Empty.
1260 2009-08-11 Sebastian Pop <sebastian.pop@amd.com>
1262 * graphite-dependences.c (dependence_polyhedron_1): Replace
1263 pdr_nb_subscripts with PDR_NB_SUBSCRIPTS.
1264 (graphite_legal_transform_dr): Same.
1265 (graphite_carried_dependence_level_k): Same.
1266 * graphite-poly.c (new_poly_dr): Add a parameter nb_subscripts.
1267 Initialize PDR_NB_SUBSCRIPTS.
1268 (print_pdr_access_layout): Replace pdr_nb_subscripts with
1270 * graphite-poly.h (struct poly_dr): Add nb_subscripts field.
1271 (PDR_NB_SUBSCRIPTS): New.
1272 (pdr_nb_subscripts): Removed.
1273 (pdr_dim): Simplified.
1274 * graphite-sese-to-poly.c (build_poly_dr): Replace pdr_nb_subscripts
1275 with PDR_NB_SUBSCRIPTS.
1277 2009-08-11 Sebastian Pop <sebastian.pop@amd.com>
1279 * graphite-interchange.c (compute_array_size): Remove use of
1281 * graphite-poly.c (new_poly_dr): Remove argument data_container.
1282 Do not initialize PDR_DATA_CONTAINER.
1283 (print_pdr): Do not print PDR_DATA_CONTAINER.
1284 * graphite-poly.h (struct poly_dr): Remove data_container field.
1285 (PDR_DATA_CONTAINER): Removed.
1286 * graphite-sese-to-poly.c (pdr_add_data_dimensions): Remove use of
1288 (build_poly_dr): Same.
1290 2009-08-11 Sebastian Pop <sebastian.pop@amd.com>
1292 * testsuite/gcc.dg/graphite/interchange-9.c: New.
1294 2009-08-05 Konrad Trifunovic <konrad.trifunovic@gmail.com>
1295 Sebastian Pop <sebastian.pop@amd.com>
1297 * graphite-dependences.c (graphite_legal_transform_dr): Work on a
1298 copy of the dependence polyhedron. Free the temporary objects.
1299 (graphite_carried_dependence_level_k): Free unused objects before
1302 * testsuite/gcc.dg/graphite/interchange-1.c: XFAILed.
1303 * testsuite/gcc.dg/graphite/interchange-2.c: XFAILed.
1304 * testsuite/gcc.dg/graphite/interchange-3.c: XFAILed.
1305 * testsuite/gcc.dg/graphite/interchange-4.c: XFAILed.
1306 * testsuite/gcc.dg/graphite/interchange-7.c: XFAILed.
1308 2009-08-05 Sebastian Pop <sebastian.pop@amd.com>
1310 * graphite-blocking.c (scop_do_strip_mine): Call store_scattering.
1311 Early return without analyzing the data dependences if no
1312 transform has been done. Call restore_scattering if the transform
1314 (graphite-interchange.c): Same.
1315 * graphite-poly.c (print_scattering_function): Test for PBB_TRANSFORMED.
1316 (graphite_read_transforms): Initialize PBB_TRANSFORMED.
1317 (apply_poly_transforms): Do not gcc_assert that
1318 the transform is legal.
1319 (new_poly_bb): Initialize PBB_TRANSFORMED, PBB_SAVED, and PBB_ORIGINAL.
1320 Do not initialize PBB_NB_SCATTERING_TRANSFORM, PBB_NB_LOCAL_VARIABLES,
1321 PBB_TRANSFORMED_SCATTERING, and PBB_ORIGINAL_SCATTERING.
1322 (free_poly_dr): Free PBB_TRANSFORMED, PBB_SAVED, and PBB_ORIGINAL.
1323 * graphite-poly.h (struct poly_scattering): New.
1324 (struct poly_bb): Add original, transformed, and saved fields.
1325 Remove transformed_scattering, original_scattering, nb_local_variables,
1326 and nb_scattering_transform fields.
1327 (PBB_ORIGINAL, PBB_TRANSFORMED, PBB_SAVED): New.
1328 (poly_scattering_new): New.
1329 (poly_scattering_free): New.
1330 (poly_scattering_copy): New.
1331 (store_scattering_pbb): New.
1332 (store_scattering): New.
1333 (restore_scattering_pbb): New.
1334 (restore_scattering): New.
1335 * graphite-sese-to-poly.c (build_pbb_scattering_polyhedrons):
1336 Initialize PBB_TRANSFORMED and PBB_ORIGINAL.
1338 2009-08-05 Sebastian Pop <sebastian.pop@amd.com>
1340 * graphite-poly.c (print_pbb): Add parentheses in the pretty print.
1343 2009-08-05 Sebastian Pop <sebastian.pop@amd.com>
1345 * Makefile.in (graphite.o): Depends on PREDICT_H.
1346 * graphite.c: Include predict.h.
1347 (graphite_finalize): Call tree_estimate_probability.
1348 * predict.c (predict_loops): Do not call scev_initialize and
1350 (tree_estimate_probability_bb): New.
1351 (tree_estimate_probability): Do not initialize loops: move that
1352 code to the driver. Call tree_estimate_probability_bb.
1353 (tree_estimate_probability_driver): New.
1354 (pass_profile): Use tree_estimate_probability_driver.
1355 * predict.h (tree_estimate_probability): Declared.
1357 2009-08-05 Sebastian Pop <sebastian.pop@amd.com>
1359 * graphite-clast-to-gimple.c (gloog): Add time to TV_GRAPHITE_CODE_GEN.
1360 * graphite-dependences.c (graphite_legal_transform): Add time to
1361 TV_GRAPHITE_DATA_DEPS.
1362 (dependency_between_pbbs_p): Same.
1363 * timevar.def (TV_GRAPHITE_DATA_DEPS, TV_GRAPHITE_CODE_GEN): New.
1365 2009-08-03 Sebastian Pop <sebastian.pop@amd.com>
1367 * Merge from mainline (r149952:150372).
1369 2009-07-28 Sebastian Pop <sebastian.pop@amd.com>
1371 * ChangeLog.graphite: Fix indenting, white spaces and 80 columns.
1372 * graphite-blocking.c: Same.
1373 * graphite-clast-to-gimple.c: Same.
1374 * graphite-dependences.c: Same.
1375 * graphite-poly.c: Same.
1376 * graphite-poly.h: Same.
1377 * graphite-ppl.c: Same.
1378 * graphite-scop-detection.c: Same.
1379 * graphite-sese-to-poly.c: Same.
1382 2009-07-28 Sebastian Pop <sebastian.pop@amd.com>
1384 * graphite-sese-to-poly.c (loop_entry_phi_arg): New.
1385 (remove_simple_copy_phi): New.
1386 (remove_invariant_phi): New.
1387 (simple_copy_phi_p): New.
1388 (reduction_phi_p): New.
1389 (gsi_for_ssa_name_def): New.
1390 (insert_out_of_ssa_copy): New.
1391 (insert_out_of_ssa_copy_on_edge): New.
1392 (create_zero_dim_array): New.
1393 (scalar_close_phi_node_p): New.
1394 (rewrite_close_phi_out_of_ssa): New.
1395 (rewrite_phi_out_of_ssa): New.
1396 (rewrite_reductions_out_of_ssa): New.
1397 (build_poly_scop): Call rewrite_reductions_out_of_ssa.
1399 * testsuite/gcc.dg/graphite/id-11.c: New.
1400 * testsuite/gcc.dg/graphite/id-15.c: New.
1401 * testsuite/gcc.dg/graphite/interchange-1.c: Un-XFAIL.
1402 * testsuite/gcc.dg/graphite/interchange-2.c: Un-XFAIL.
1403 * testsuite/gcc.dg/graphite/interchange-3.c: Un-XFAIL.
1404 * testsuite/gcc.dg/graphite/interchange-4.c: Un-XFAIL.
1405 * testsuite/gcc.dg/graphite/interchange-7.c: Un-XFAIL.
1406 * testsuite/gcc.dg/graphite/scop-matmult.c: Un-XFAIL.
1407 * testsuite/gfortran.dg/graphite/id-13.f: New.
1408 * testsuite/gfortran.dg/graphite/id-5.f: New.
1410 2009-07-28 Sebastian Pop <sebastian.pop@amd.com>
1412 * graphite-clast-to-gimple.c (graphite_loop_normal_form): Do not
1413 check that nb_reductions_in_loop is zero.
1414 * graphite-scop-detection.c (harmful_stmt_in_bb): Don't filter out
1415 reduction phi nodes.
1416 (nb_reductions_in_loop): Removed.
1417 (graphite_can_represent_loop): Do not call nb_reductions_in_loop.
1418 * graphite-sese-to-poly.c (phi_node_is_iv): Removed.
1419 (bb_contains_non_iv_scalar_phi_nodes): Removed.
1420 (scop_contains_non_iv_scalar_phi_nodes): Removed.
1421 (build_poly_scop): Do not call scop_contains_non_iv_scalar_phi_nodes.
1423 2009-07-28 Sebastian Pop <sebastian.pop@amd.com>
1425 * graphite-clast-to-gimple.c (build_cloog_prog): Do not code generate
1426 statements that have an empty iteration domain.
1427 * testsuite/gfortran.dg/graphite/id-16.f: New.
1429 2009-07-28 Sebastian Pop <sebastian.pop@amd.com>
1431 * tree-scalar-evolution.c (instantiate_scev_1): Return
1432 chrec_dont_know when the result is not above instantiate_below.
1433 * graphite-scop-detection.c (scopdet_basic_block_info): Fix formatting.
1434 * graphite-sese-to-poly.c (create_linear_expr_from_tree): Assert that
1435 the tree has a known scalar evolution.
1436 * testsuite/gfortran.dg/graphite/id-14.f: New.
1437 * testsuite/gfortran.dg/graphite/id-15.f: New.
1439 2009-07-28 Sebastian Pop <sebastian.pop@amd.com>
1441 * sese.c (rename_variables_in_stmt): Pass in an extra parameter
1443 (rename_variables): Keep inserting renames after the ones already
1446 2009-07-28 Sebastian Pop <sebastian.pop@amd.com>
1448 * graphite-sese-to-poly.c (compare_bb_depths): New.
1449 (graphite_sort_dominated_info): New.
1450 (build_scop_bbs_1): Call graphite_sort_dominated_info.
1451 (build_scop_scattering): Fix comment.
1453 2009-07-28 Sebastian Pop <sebastian.pop@amd.com>
1455 * graphite.c (graphite_finalize): Call print_loops instead of
1456 dump_function_to_file.
1457 * testsuite/gcc.dg/graphite/graphite.exp: Fix formatting.
1458 * testsuite/gcc.dg/graphite/pr35356-1.c: New. Look for the number of
1459 loops generated in the graphite output file.
1460 * testsuite/gcc.dg/graphite/pr35356-2.c: New.
1461 * testsuite/gcc.dg/graphite/pr35356-3.c: New. XFAILed for now.
1462 * testsuite/gfortran.dg/graphite/id-12.f: New.
1464 2009-07-24 Li Feng <nemokingdom@gmail.com>
1466 * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-8.c:
1469 2009-07-24 Li Feng <nemokingdom@gmail.com>
1470 Tobias Grosser <grosser@fim.uni-passau.de>
1472 * graphite-sese-to-poly.c (pdr_add_alias_set): Use data reference's
1473 alias set number build alias in ACCESSES polyhedron.
1474 (build_alias_set_for_drs): New.
1475 (build_pbb_drs): Added build_alias_set_for_drs.
1476 * graphite-dependences.c (poly_drs_may_alias_p): New.
1477 (graphite_carried_dependence_level_k): Check alias information
1478 before building polyhedron.
1480 2009-07-24 Tobias Grosser <grosser@fim.uni-passau.de>
1482 * Makefile.in (lambda-code.o): Fix formatting.
1484 2009-07-24 Tobias Grosser <grosser@fim.uni-passau.de>
1486 * Merge from mainline (r149350-149952)
1488 2009-07-18 Tobias Grosser <grosser@fim.uni-passau.de>
1490 * graphite-poly.c (apply_poly_transforms): Move strip_mine
1491 before interchange to prepare for loop blocking.
1493 2009-07-18 Tobias Grosser <grosser@fim.uni-passau.de>
1495 * graphite-poly.c (apply_poly_transforms): Add checks after every
1497 * graphite-sese-to-poly.c (build_poly_scop): Remove check, as already
1498 done in apply_poly_transforms.
1500 2009-07-17 Konrad Trifunovic <konrad.trifunovic@gmail.com>
1502 * graphite-dependences.c (build_lexicographically_gt_constraint):
1503 Replace RES parameter with *RES.
1504 (dependence_polyhedron_1): Pass an address of the parameter RES
1505 instead of value of RES.
1507 2009-07-16 Sebastian Pop <sebastian.pop@amd.com>
1509 * graphite.c (graphite_finalize): Fix comment.
1510 (graphite_transform_loops): Reset scev info after code generation
1513 2009-07-16 Sebastian Pop <sebastian.pop@amd.com>
1515 * graphite.c (graphite_finalize): Call scev_reset.
1517 2009-07-16 Sebastian Pop <sebastian.pop@amd.com>
1519 * graphite-clast-to-gimple.c (compute_cloog_iv_types): Do not create
1520 GBB_CLOOG_IV_TYPES hash table twice.
1521 * graphite-sese-to-poly.c (free_gimple_bb): Call free_data_refs.
1522 (add_condition_to_domain): Clear GMP values.
1524 2009-07-16 Sebastian Pop <sebastian.pop@amd.com>
1526 * graphite-dependences.c: Fix formatting.
1527 * graphite-poly.c (free_poly_dr): Also free PDR_DATA_CONTAINER.
1528 (pbb_number_of_iterations): Free ppl_Linear_Expression.
1529 * graphite-sese-to-poly.c: Fix formatting.
1530 * graphite.c (graphite_transform_loops): Create the hash table
1531 after the early return.
1533 2009-07-16 Sebastian Pop <sebastian.pop@amd.com>
1535 * testsuite/gcc.dg/graphite/id-14.c: New.
1536 * testsuite/gcc.dg/graphite/pr40157.c: New.
1537 * testsuite/gfortran.dg/graphite/id-11.f: New.
1539 2009-07-16 Sebastian Pop <sebastian.pop@amd.com>
1541 * graphite-sese-to-poly.c (nb_pbbs_in_loops): New.
1542 (build_poly_scop): Return false when there are no pbbs within
1543 loops to avoid to pass to cloog scops with no loops.
1545 2009-07-16 Sebastian Pop <sebastian.pop@amd.com>
1547 * graphite-sese-to-poly.c (build_pbb_scattering_polyhedrons): Avoid
1548 useless test "i % 2".
1549 (build_pbb_scattering_polyhedrons): Fix formatting.
1550 (build_poly_dr): Same.
1551 * graphite.c (graphite_transform_loops): Restructure.
1553 2009-07-14 Razya Ladelsky <razya@il.ibm.com>
1555 * tree-ssa-loop-manip.c (rewrite_phi_with_iv): Remove
1556 reduction_list parameter.
1557 (rewrite_all_phi_nodes_with_iv): Same.
1558 (canonicalize_loop_ivs): Same.
1559 * tree-parloops.c (struct brli): Removed.
1560 (build_reduction_list_info): Removed.
1561 (build_new_reduction): New.
1562 (analyze_reduction_list): Removed.
1563 (gather_scalar_reductions): Find reductions instead of phi
1564 nodes that can't be canonicalized.
1565 (try_create_reduction_list): Remove reduction_list parameter.
1566 (gen_parallel_loop): Same.
1567 (parallelize_loops): Remove analyze_reductions variable,
1568 initialization and free.
1569 Change reduction_list htab initialization to reduction_info
1570 elements instead of ssa names.
1571 Call try_create_reduction_list and gen_parallel_loop without
1572 analyzed_reduction argument.
1573 * graphite-clast-to-gimple (graphite_loop_normal_form): Call
1574 canonicalize_loop_ivs with one less argument.
1575 * tree-flow.h (canonicalize_loop_ivs): Remove one argument.
1577 2009-07-14 Konrad Trifunovic <konrad.trifunovic@gmail.com>
1579 * graphite-dependences.c (new_poly_dr_pair): New.
1580 (dependence_polyhedron): Renamed into dependence_polyhedron_1.
1581 (new_poly_dr_pair): New.
1582 (eq_poly_dr_pair_p): New.
1583 (hash_poly_dr_pair_p): New.
1584 * graphite-dependences.h (struct poly_dr_pair): New.
1585 (eq_poly_dr_pair_p): Declared.
1586 (hash_poly_dr_pair_p): Declared.
1587 * graphite-poly.c (new_scop): Initialize SCOP_ORIGINAL_PDR_PAIRS.
1588 (free_scop): Free SCOP_ORIGINAL_PDR_PAIRS.
1589 * graphite-poly.h (struct scop): Add original_pdr_pairs field.
1590 * Makefile.in (graphite-poly.o): Add dependence on
1591 graphite-dependences.h.
1593 2009-07-14 Sebastian Pop <sebastian.pop@amd.com>
1595 * graphite-scop-detection.c (graphite_can_represent_scev): Do not let
1596 polynomials of degree > 1 pass to Graphite.
1597 * tree-chrec.c (scev_is_linear_expression): Call
1598 evolution_function_is_affine_multivariate_p.
1599 * testsuite/gfortran.dg/graphite/id-10.f90: New.
1601 2009-07-14 Sebastian Pop <sebastian.pop@amd.com>
1603 * tree-scalar-evolution.c (compute_overall_effect_of_inner_loop):
1604 Instantiate scevs varying in outer loops.
1605 * testsuite/gfortran.dg/graphite/id-9.f: Correct testcase.
1607 2009-07-14 Sebastian Pop <sebastian.pop@amd.com>
1609 * graphite-sese-to-poly.c (build_loop_iteration_domains): Do not insert
1610 redundant constraint.
1612 2009-07-14 Sebastian Pop <sebastian.pop@amd.com>
1614 * testsuite/gcc.dg/graphite/graphite.exp: Fix comments.
1615 * testsuite/gfortran.dg/graphite/graphite.exp: Trigger actions
1616 based on the file names as in the C testsuite.
1617 * testsuite/gfortran.dg/graphite/block-1.f90: Fix patterns.
1618 * testsuite/gfortran.dg/graphite/block-2.f: Same.
1619 * testsuite/gfortran.dg/graphite/block-3.f90: Same.
1620 * testsuite/gfortran.dg/graphite/block-4.f90: Same.
1621 * testsuite/gfortran.dg/graphite/id-1.f90: Same.
1622 * testsuite/gfortran.dg/graphite/id-2.f90: Same.
1623 * testsuite/gfortran.dg/graphite/id-3.f90: Same.
1624 * testsuite/gfortran.dg/graphite/id-4.f90: Same.
1625 * testsuite/gfortran.dg/graphite/id-6.f: Same.
1626 * testsuite/gfortran.dg/graphite/id-9.f: Same.
1627 * testsuite/gfortran.dg/graphite/interchange-1.f: Same.
1628 * testsuite/gfortran.dg/graphite/interchange-2.f: Same.
1629 * testsuite/gfortran.dg/graphite/scop-1.f: Same.
1631 2009-07-14 Sebastian Pop <sebastian.pop@amd.com>
1633 * sese.c (expand_scalar_variables_call): New.
1634 (expand_scalar_variables_ssa_name): Handle calls in expander.
1636 2009-07-13 Sebastian Pop <sebastian.pop@amd.com>
1638 * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-6.c:
1639 Expect to see the pattern twice.
1640 * testsuite/gcc.dg/graphite/interchange-0.c: Un-XFAIL.
1641 * testsuite/gcc.dg/graphite/interchange-5.c: Same.
1642 * testsuite/gcc.dg/graphite/interchange-6.c: Same.
1644 2009-07-13 Sebastian Pop <sebastian.pop@amd.com>
1646 * testsuite/gcc.dg/graphite/id-10.c: New.
1647 * testsuite/gcc.dg/graphite/id-12.c: New.
1648 * testsuite/gfortran.dg/graphite/id-7.f: New.
1649 * testsuite/gfortran.dg/graphite/id-8.f: New.
1651 2009-07-13 Sebastian Pop <sebastian.pop@amd.com>
1653 * graphite-sese-to-poly.c (pdr_add_data_dimensions): Fix division by
1656 2009-07-13 Sebastian Pop <sebastian.pop@amd.com>
1658 * sese.c (rename_variables_in_stmt): Call fold_convert during renaming.
1660 2009-07-13 Sebastian Pop <sebastian.pop@amd.com>
1662 * sese.c (expand_scalar_variables_stmt): Avoid unnecessary expansion.
1664 2009-07-10 Sebastian Pop <sebastian.pop@amd.com>
1666 * graphite-sese-to-poly.c (pdr_add_memory_accesses): Fix order of
1667 building PDR subscripts.
1669 2009-07-10 Sebastian Pop <sebastian.pop@amd.com>
1671 * graphite-sese-to-poly.c (pdr_add_data_dimensions): Fix the
1672 computation of array sizes.
1674 2009-07-10 Sebastian Pop <sebastian.pop@amd.com>
1676 * graphite-sese-to-poly.c (add_param_constraints): Disabled.
1678 2009-07-10 Tobias Grosser <grosser@fim.uni-passau.de>
1680 * graphite-dependences.c (map_into_dep_poly, map_dr_into_dep_poly,
1681 build_pairwise_constraint, dr_equality_constraints,
1682 build_pairwise_scheduling_equality,
1683 build_pairwise_scheduling_inequality, lexicographically_gt_p,
1684 build_lexicographically_gt_constraint, dependence_polyhedron,
1685 graphite_legal_transform_dr, graphite_carried_dependence_level_k):
1686 Move from NNC_Polyhedron to C_Polyhedron.
1687 * graphite-interchange.c (compute_array_size_poly,
1688 gather_access_strides): Dito.
1689 * graphite-poly.c (apply_poly_transforms, new_poly_dr, free_poly_bb,
1690 free_scop, pbb_number_of_iterations): Dito.
1691 * graphite-poly.h (struct poly_dr, pdr_nb_subscripts, struct poly_bb,
1692 pbb_dim_iter_domain, struct scop): Dito.
1693 * graphite-ppl.c (new_Constraint_System_from_Cloog_Matrix,
1694 new_Cloog_Domain_from_ppl_Polyhedron,
1695 new_Cloog_Domain_from_ppl_Pointset_Powerset, ppl_set_coef_gmp,
1696 ppl_insert_dimensions_pointset, ppl_insert_dimensions_pointset,
1697 ppl_strip_loop, ppl_strip_loop, ppl_print_polyhedron_matrix,
1698 ppl_print_powerset_matrix, debug_ppl_polyhedron_matrix,
1699 debug_ppl_powerset_matrix, ppl_read_polyhedron_matrix): Dito.
1700 * graphite-ppl.h (ppl_Pointset_Powerset_C_Polyhedron_t,
1701 new_C_Polyhedron_from_Cloog_Matrix, ppl_print_powerset_matrix,
1702 debug_ppl_powerset_matrix, ppl_insert_dimensions_pointset): Dito.
1703 * graphite-sese-to-poly.c (build_pbb_scattering_polyhedrons,
1704 build_loop_iteration_domains, ppl_constraint_type_from_tree_code,
1705 add_condition_to_domain, add_condition_to_pbb, build_scop_context,
1706 build_scop_iteration_domain, build_poly_dr): Dito
1708 2009-07-09 Sebastian Pop <sebastian.pop@amd.com>
1710 * testsuite/gcc.dg/graphite/graphite.exp: Added a rule to execute
1712 * testsuite/gcc.dg/graphite/run-id-1.c: New.
1714 2009-07-09 Sebastian Pop <sebastian.pop@amd.com>
1716 * graphite-sese-to-poly.c (build_loop_iteration_domains): Add the
1717 positivity constraint on the symbolic number of iterations.
1719 2009-07-09 Sebastian Pop <sebastian.pop@amd.com>
1721 * graphite-sese-to-poly.c (build_loop_iteration_domains): Rewrite.
1723 2009-07-09 Sebastian Pop <sebastian.pop@amd.com>
1724 Tobias Grosser <grosser@fim.uni-passau.de>
1726 * graphite-clast-to-gimple.c (build_scop_context): Removed.
1727 (build_cloog_prog): Directly use SCOP_CONTEXT.
1728 * graphite-poly.c (new_scop): Initialize SCOP_CONTEXT.
1729 (free_scop): Free SCOP_CONTEXT.
1730 (print_scop_context): New.
1731 (print_scop): Call print_scop_context.
1732 (debug_scop_context): New.
1733 * graphite-poly.h (print_scop_context, debug_scop_context): Declared.
1734 (struct scop): Added field context.
1735 (SCOP_CONTEXT): New.
1736 * graphite-sese-to-poly.c (add_param_constraints): New.
1737 (build_scop_context): New.
1738 (build_poly_scop): Call build_scop_context.
1740 2009-07-09 Sebastian Pop <sebastian.pop@amd.com>
1742 * graphite-clast-to-gimple.c (gmp_cst_to_tree): Moved...
1743 * graphite-ppl.c (ppl_set_inhomogeneous_gmp, ppl_set_coef_gmp): New.
1744 (ppl_set_inhomogeneous, ppl_set_coef): Moved...
1745 * graphite-ppl.h: Include double-int.h and tree.h.
1746 (ppl_set_inhomogeneous_gmp, ppl_set_coef_gmp): Declared.
1747 (ppl_set_inhomogeneous, ppl_set_coef): ...here.
1748 (gmp_cst_to_tree): ...here. Reimplemented using mpz_get_double_int.
1749 (tree_int_to_gmp, ppl_set_inhomogeneous_tree, ppl_set_coef_tree): New.
1751 2009-07-09 Sebastian Pop <sebastian.pop@amd.com>
1753 * graphite-clast-to-gimple.c (clast_to_gcc_expression_red): Generate
1754 POINTER_PLUS_EXPR for pointer types.
1755 (clast_to_gcc_expression): Same.
1757 2009-07-09 Sebastian Pop <sebastian.pop@amd.com>
1759 * graphite-poly.c (print_scattering_function): Early return when
1760 PBB_TRANSFORMED_SCATTERING is not initialized.
1761 (print_pbb_domain): Early return when PBB_DOMAIN is not initialized.
1763 2009-07-08 Sebastian Pop <sebastian.pop@amd.com>
1765 * tree-parloops.c (analyze_reduction_list): Remove unused variable
1768 2009-07-08 Razya Ladelsky <razya@il.ibm.com>
1770 * tree-parloops.c (analyze_reduction_list): Change return
1772 (try_create_reduction_list): Move the call to
1773 analyze_reduction_list to the beginining.
1774 Call reduction_phi with analyzed_reductions as argument
1775 instead of reduction_list.
1777 2009-07-08 Tobias Grosser <grosser@fim.uni-passau.de>
1779 * Merge from mainline (r148296:149346)
1781 2009-07-07 Sebastian Pop <sebastian.pop@amd.com>
1783 * graphite-scop-detection.c (graphite_can_represent_init): New.
1784 (graphite_can_represent_scev): Call graphite_can_represent_init:
1785 check that the initial value does not contain multiplications of
1787 (stmt_has_simple_data_refs_p): New.
1788 (stmt_simple_for_scop_p): Call stmt_simple_for_scop_p.
1789 (is_simple_operand): Fix formatting.
1790 * graphite-sese-to-poly.c (try_generate_gimple_bb): Fix formatting.
1792 2009-07-07 Sebastian Pop <sebastian.pop@amd.com>
1794 * testsuite/gcc.dg/graphite/id-13.c: New.
1795 * graphite-sese-to-poly.c (graphite_stmt_p): Do not call
1796 analyze_scalar_evolution, use scalar_evolution_in_region.
1797 (scan_tree_for_params_right_scev): Add extra assert.
1798 (parameter_index_in_region_1): Split from parameter_index_in_region.
1799 (idx_record_params): Use scalar_evolution_in_region.
1800 (find_params_in_bb): Same.
1801 (find_scop_parameters): Same.
1802 (build_loop_iteration_domains): Same.
1803 (create_linear_expr_from_tree): Same.
1804 * sese.c (scalar_evolution_in_region): New.
1805 * sese.h (scalar_evolution_in_region): Declared.
1806 (defined_in_sese_p): New.
1807 * tree-scalar-evolution.c (compute_overall_effect_of_inner_loop): Not
1809 * tree-scalar-evolution.h (compute_overall_effect_of_inner_loop):
1812 2009-07-07 Sebastian Pop <sebastian.pop@amd.com>
1814 * Makefile.in: Replace dependences on tree-chrec.h with SCEV_H.
1815 TREE_DATA_REF_H also implies SCEV_H.
1817 2009-07-07 Sebastian Pop <sebastian.pop@amd.com>
1819 * graphite-poly.c (print_scop_params): New.
1820 (print_scop): Call print_scop_params.
1821 (debug_scop_params): New.
1822 * graphite-poly.h (print_scop_params, debug_scop_params): Declared.
1824 2009-07-07 Li Feng <nemokingdom@gmail.com>
1826 * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-4.c: New.
1827 * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-5.c: New.
1828 * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-6.c: New.
1829 * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-7.c: New.
1830 * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-8.c: New.
1831 * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-9.c: New.
1833 2009-07-07 Li Feng <nemokingdom@gmail.com>
1835 * graphite-clast-to-gimple.c (mark_loops_parallel): Dump information
1836 for dependency checking part.
1837 * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-1.c: Add
1838 tests for dependency checking.
1839 * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-2.c: Ditto.
1840 * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-3.c: Ditto.
1841 * testsuite/gcc.dg/graphite/graphite_autopar/graphite_autopar.exp: Add
1842 flag -fdump-tree-graphite-all for autopar testsuites.
1844 2009-07-06 Sebastian Pop <sebastian.pop@amd.com>
1846 * Makefile.in (tree-ssa-loop-manip.o): Depends on langhooks.h.
1847 * tree-parloops.c (rewrite_phi_with_iv, rewrite_all_phi_nodes_with_iv,
1848 canonicalize_loop_ivs): Moved...
1849 * tree-ssa-loop-manip.c: ... here. Include langhooks.h.
1851 2009-07-06 Sebastian Pop <sebastian.pop@amd.com>
1853 * tree-parloops.c (try_create_reduction_list): Pass an extra
1854 argument analyzed_reductions. Call analyze_reduction_list.
1855 (gen_parallel_loop): Do not call analyze_reduction_list.
1856 (parallelize_loops): Init and finalize analyzed_reductions.
1858 2009-07-06 Li Feng <nemokingdom@gmail.com>
1860 * testsuite/gcc.dg/graphite/graphite_autopar/graphite_autopar.exp:
1861 Added flag -fno-loop-strip-mine for autopar testcase.
1863 2009-07-04 Li Feng <nemokingdom@gmail.com>
1865 * graphite-dependences.c (graphite_carried_dependence_level_k): Use
1866 transformed scattering dimension instead of unmatch orignal when
1867 calling dependence_polyhedron.
1869 2009-06-30 Sebastian Pop <sebastian.pop@amd.com>
1871 * opts.c (decode_options): Enable flag_loop_strip_mine at -O2.
1873 2009-06-30 Sebastian Pop <sebastian.pop@amd.com>
1875 * graphite-poly.c (pbb_number_of_iterations): Check for returned
1876 value 1 from ppl_Pointset_Powerset_NNC_Polyhedron_maximize.
1878 2009-06-30 Sebastian Pop <sebastian.pop@amd.com>
1880 * graphite-blocking.c (pbb_strip_mine_profitable_p): New.
1881 (pbb_do_strip_mine): Call pbb_strip_mine_profitable_p.
1882 * graphite-poly.c (pbb_number_of_iterations): New.
1883 * graphite-poly.h (pbb_number_of_iterations): Declared.
1884 (pbb_iterator_dim, pbb_parameter_dim): New.
1886 2009-06-29 Sebastian Pop <sebastian.pop@amd.com>
1888 * graphite-clast-to-gimple.c (graphite_create_new_loop): Revert the
1889 last commit on type of lower and upper bound of loops.
1891 2009-06-29 Li Feng <nemokingdom@gmail.com>
1893 * Makefile.in (graphite-clast-to-gimple.o): Added dependence on
1894 graphite-dependences.h.
1895 * graphite-clast-to-gimple.c (new_bb_pbb_def): New.
1896 (mark_bb_with_pbb): New.
1897 (get_stmtfor_depth): New.
1898 (find_pbb_via_hash): New.
1899 (dependency_in_loop_p): New.
1900 (mark_loops_parallel): New.
1901 (free_aux_in_new_loops): New.
1902 (translate_clast): Add parameter BB_PBB_MAPPING. Mark newly created
1903 bb with it's relevant pbb. Mark newly created loops. Remove mark
1904 innermost loop parallel without checking.
1905 (gloog): Add parameter BB_PBB_MAPPING.
1906 * graphite-clast-to-gimple.h (struct bb_pbb_def): New.
1907 (gloog): Change declaration.
1908 (mark_loop_parallel): Make extern.
1909 (free_aux_in_new_loops): Declare.
1910 (bb_pbb_map_hash): New.
1911 (eq_bb_pbb_map): New.
1912 * graphite.c (graphite_transform_loops): Added BB_PBB_MAPPING. Trigger
1913 auto parallelization when flag_graphite_force_parallel is set.
1914 (graphite_finalize): Added free_aux_in_new_loops.
1915 * tree-parloops.c (parallelize_loops): Only generate parallel code for
1916 the innermost loop that marked parallel. Use
1917 flag_graphite_force_parallel instead of loop->can_be_parallel.
1918 (loop_parallel_p): Move inner most checking out of function.
1920 2009-06-26 Sebastian Pop <sebastian.pop@amd.com>
1922 * graphite-clast-to-gimple.c (graphite_create_new_loop): Make the
1923 type of lower and upper bound of loops signed long int.
1925 2009-06-26 Sebastian Pop <sebastian.pop@amd.com>
1927 * cfgloopmanip.c (create_empty_loop_on_edge): Gimplify the loop exit
1928 expression outside the loop.
1930 2009-06-26 Sebastian Pop <sebastian.pop@amd.com>
1932 * gcc.dg/graphite/interchange-8.c: New.
1934 2009-06-26 Sebastian Pop <sebastian.pop@amd.com>
1936 * gcc.dg/graphite/interchange-0.c: XFailed.
1937 * gcc.dg/graphite/interchange-5.c: XFailed.
1938 * gcc.dg/graphite/interchange-6.c: XFailed.
1940 2009-06-26 Sebastian Pop <sebastian.pop@amd.com>
1942 * graphite-interchange.c (compute_array_size_poly): The end of the
1943 recursion should return 1.
1945 2009-06-26 Sebastian Pop <sebastian.pop@amd.com>
1947 * graphite-interchange.c (compute_array_size_cstr): Allow the
1948 subscript multiplier to be -1.
1949 (compute_array_size): Use PDR_DATA_CONTAINER and not PDR_ACCESSES.
1950 * graphite-poly.c (new_poly_dr): Takes an extra argument for the
1951 data_container. Initializes PDR_DATA_CONTAINER.
1952 (print_pdr_access_layout): New.
1953 (print_pdr): Call print_pdr_access_layout. Print PDR_DATA_CONTAINER.
1954 * graphite-poly.h (struct poly_dr): Adjust comment. Add a new field
1956 (PDR_DATA_CONTAINER): New.
1957 (new_poly_dr): Update declaration.
1958 * graphite-sese-to-poly.c (pdr_add_data_dimensions): New.
1959 (build_poly_dr): Call pdr_add_data_dimensions.
1961 2009-06-26 Sebastian Pop <sebastian.pop@amd.com>
1963 * graphite-poly.h (struct poly_dr): Fix comment.
1964 * graphite-sese-to-poly.c (pdr_add_alias_set): New.
1965 (pdr_add_memory_accesses): New.
1966 (build_poly_dr): Call pdr_add_memory_accesses and pdr_add_alias_set.
1968 2009-06-26 Sebastian Pop <sebastian.pop@amd.com>
1970 * graphite-poly.c (print_pdrs, debug_pdrs): New.
1971 (print_pbb): Add call to print_pdrs.
1972 * graphite-poly.h (print_pdrs, debug_pdrs): Declared.
1974 2009-06-24 Konrad Trifunovic <konrad.trifunovic@gmail.com>
1975 Li Feng <nemokingdom@gmail.com>
1977 * graphite-dependences.c (graphite_carried_dependence_level_k): New.
1978 (dependency_between_pbbs_p): New.
1979 (lexicographically_gt_p): Assure !empty_p before polyhedron
1980 intersection assign.
1981 (build_lexicographically_gt_constraint): Correct lexicographically
1983 * graphite-dependences.h: New.
1984 * Makefile.in (graphite-dependences.o): Add graphite-dependences.h.
1986 2009-06-24 Sebastian Pop <sebastian.pop@amd.com>
1988 * graphite-clast-to-gimple.c (print_clast_stmt): New.
1989 (gloog): Print to dump_file the generated clast.
1990 * graphite-clast-to-gimple.h (print_clast_stmt): Declared.
1991 * graphite-interchange.c (pbb_do_interchange): Fix dump formatting.
1993 2009-06-24 Sebastian Pop <sebastian.pop@amd.com>
1995 * graphite-poly.c (extend_scattering): Increment
1996 PBB_NB_LOCAL_VARIABLES by the number of added dimensions.
1998 2009-06-24 Sebastian Pop <sebastian.pop@amd.com>
2000 * graphite-interchange.c (compute_array_size_poly): Added exit of
2001 recursion condition. Continue iterating even after the first equality.
2002 (compute_array_size): Same.
2004 2009-06-24 Li Feng <nemokingdom@gmail.com>
2006 * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-1.c: Update
2007 -fdump-tree-final_cleanup to -fdump-tree-optimized.
2008 * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-2.c: Ditto.
2009 * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-3.c: Ditto.
2010 * testsuite/gcc.dg/graphite/graphite_autopar/graphite_autopar.exp: Ditto.
2012 2009-06-23 Sebastian Pop <sebastian.pop@amd.com>
2014 * sese.c (expand_scalar_variables_stmt): Expand scalar variables
2015 only when the use verifies is_gimple_reg.
2017 2009-06-23 Sebastian Pop <sebastian.pop@amd.com>
2019 * graphite-clast-to-gimple.c (build_cloog_prog): Fix memory corruption.
2020 Allocate scaldims after call to unify_scattering_dimensions.
2022 2009-06-23 Sebastian Pop <sebastian.pop@amd.com>
2024 * graphite-clast-to-gimple.c (translate_clast): Fix memory leak.
2026 2009-06-23 Sebastian Pop <sebastian.pop@amd.com>
2027 Albert Cohen <albert.cohen@inria.fr>
2029 * graphite-blocking.c (pbb_strip_mine_loop_depth): Do not use local
2030 variables for the strip mining.
2032 2009-06-23 Sebastian Pop <sebastian.pop@amd.com>
2033 Pranav Garg <pranav.garg2107@gmail.com>
2035 * Makefile.in (OBJS-common): Added graphite-blocking.o.
2036 (graphite-sese-to-poly.o): Moved down to be in lexicographical order.
2037 (graphite-blocking.o): New rule.
2038 (graphite-poly.o, graphite-ppl.o): Moved to be in lexicographical order.
2039 * graphite-blocking.c: New.
2040 * graphite-poly.c (apply_poly_transforms): Call scop_do_strip_mine for
2041 flag_loop_strip_mine.
2042 (psct_scattering_dim_for_loop_depth): New.
2043 * graphite-poly.h (scop_do_strip_mine): Declared.
2044 (psct_add_local_variable): Increment PBB_NB_LOCAL_VARIABLES.
2045 * tree-ssa-loop.c (gate_graphite_transforms): Do not fail when using
2046 flag_loop_strip_mine.
2048 2009-06-23 Sebastian Pop <sebastian.pop@amd.com>
2050 * graphite-poly.c (extend_scattering): Avoid initializing and freeing
2051 a GMP value and a PPL coefficient at each iteration of a loop.
2053 2009-06-23 Sebastian Pop <sebastian.pop@amd.com>
2055 * graphite-dependences.c (dependence_polyhedron): Do not use
2056 pbb_nb_scattering_dims anymore. Use pbb_nb_scattering_orig and
2057 pbb_nb_scattering_transform.
2058 (graphite_legal_transform_dr): Same.
2059 * graphite-poly.c (extend_scattering): Same.
2060 (unify_scattering_dimensions): Same.
2061 (print_scattering_function): Same.
2062 (new_poly_bb): Initialize PBB_NB_SCATTERING_TRANSFORM and
2063 PBB_NB_LOCAL_VARIABLES.
2064 * graphite-poly.h (pbb_nb_scattering): Removed declaration.
2065 (struct poly_bb): Added nb_local_variables and nb_scattering_transform.
2066 (PBB_NB_LOCAL_VARIABLES, PBB_NB_SCATTERING_TRANSFORM): New.
2067 (pbb_nb_scattering_orig, pbb_nb_scattering_transform): New.
2068 (pbb_nb_scattering_dims, pbb_nb_scattering): Removed.
2069 (pbb_nb_scattering_transform): New.
2070 (pbb_nb_local_vars): Return PBB_NB_LOCAL_VARIABLES.
2071 (psco_scattering_dim): Add assert on parameters.
2072 (psct_scattering_dim): Same.
2073 (psct_scattering_dim_for_loop_depth): Declared.
2074 (psct_local_var_dim): New.
2075 (psco_iterator_dim, psco_parameter_dim): Add assert on parameters.
2076 (psct_iterator_dim, psct_parameter_dim): Same. To maintain the
2077 correct layout, call pbb_nb_local_vars.
2078 (psct_add_local_variable, psct_add_scattering_dimension): New.
2079 * graphite-sese-to-poly.c (build_pbb_scattering_polyhedrons):
2080 Initialize PBB_NB_SCATTERING_TRANSFORM.
2082 2009-06-23 Sebastian Pop <sebastian.pop@amd.com>
2084 * graphite-ppl.c (set_inhomogeneous): Renamed ppl_set_inhomogeneous.
2085 (set_coef): Renamed ppl_set_coef.
2086 * graphite-ppl.h (ppl_set_inhomogeneous, ppl_set_coef): Declared.
2088 2009-06-23 Sebastian Pop <sebastian.pop@amd.com>
2090 * graphite-dependences.c (build_pairwise_scheduling_inequality): Don't
2091 test a boolean against 1.
2092 * graphite-interchange.c (pbb_interchange_loop_depths): Do not build
2093 a new polyhedron for the PBB_TRANSFORMED_SCATTERING.
2094 (pbb_do_interchange): Returns true when a transform has been performed.
2095 (scop_do_interchange): Same.
2096 * graphite-poly.c (apply_poly_transforms): Use the return value of
2097 scop_do_interchange.
2098 * graphite-poly.h (scop_do_interchange): Update declaration.
2100 2009-06-23 Tobias Grosser <grosser@fim.uni-passau.de>
2102 * graphite-clast-to-gimple.c (gloog): Reset loop->aux right
2104 * sese.c (sese_reset_aux_in_loops): New.
2105 * sese.h (sese_reset_aux_in_loops): New.
2107 2009-06-19 Sebastian Pop <sebastian.pop@amd.com>
2109 * graphite-sese-to-poly.c (scan_tree_for_params_int): Pass in the
2110 multiplier and multiply the constant by the multiplier.
2111 (scan_tree_for_params): Bound the multiplier to its MULT_EXPR.
2112 (build_poly_dr): Do not use the multiplier to define the subscript.
2114 2009-06-19 Sebastian Pop <sebastian.pop@amd.com>
2116 * graphite-poly.c (new_poly_dr): Pass an extra argument for the
2117 compiler's data reference. Initialize PDR_CDR.
2118 (print_pdr): Call dump_data_reference.
2119 * graphite-poly.h (struct poly_dr): Rename black_box into pbb.
2120 Add compiler_dr field.
2121 (PDR_BB): Renamed PDR_PBB.
2123 * graphite-sese-to-poly.c (build_poly_dr): Pass to new_poly_dr
2124 GCC's data reference representation.
2125 * tree-data-ref.c (debug_data_references, debug_data_reference): New.
2126 * tree-data-ref.h (debug_data_references, debug_data_reference): Decl.
2128 2009-06-19 Sebastian Pop <sebastian.pop@amd.com>
2130 * graphite-poly.c (print_scattering_function): Also print the layout.
2131 * graphite-poly.h (pbb_nb_local_vars): New.
2133 2009-06-19 Sebastian Pop <sebastian.pop@amd.com>
2135 * graphite-poly.c (print_pbb_domain): Also print the layout names.
2137 2009-06-19 Sebastian Pop <sebastian.pop@amd.com>
2139 * graphite-poly.c (print_pdr, debug_pdr): New.
2140 * graphite-poly.h (print_pdr, debug_pdr): Declared.
2141 (PDR_BASE): Removed.
2143 2009-06-18 Sebastian Pop <sebastian.pop@amd.com>
2145 * gcc/testsuite/gcc.dg/graphite/interchange-{1..7}.c: New avatars of
2148 2009-06-18 Sebastian Pop <sebastian.pop@amd.com>
2150 * graphite-interchange.c (compute_subscript): Allow also -1 in the
2151 subscript identification column.
2152 (pbb_do_interchange): Print to dump_file that some loops "will be
2153 interchanged". Rely on that chain of characters in the testcases.
2154 * gcc.dg/graphite/interchange-0.c: New.
2155 * gcc.dg/graphite/graphite.exp: Iterate over the testsuite
2156 interchange-*.c files and compile them with -floop-interchange.
2158 2009-06-18 Pranav Garg <pranav.garg2107@gmail.com>
2160 * graphite-interchange.c (interchange_profitable_p): Renamed
2161 pbb_interchange_profitable_p.
2163 2009-06-18 Sebastian Pop <sebastian.pop@amd.com>
2164 Harsha Jagasia <harsha.jagasia@amd.com>
2165 Pranav Garg <pranav.garg2107@gmail.com>
2167 * graphite-interchange.c (interchange_profitable_p): Make static.
2168 (pbb_interchange_loop_depths, pbb_do_interchange,
2169 scop_do_interchange): New.
2170 * graphite-poly.c (apply_poly_transforms): Call scop_do_interchange
2171 for flag_loop_interchange.
2172 * graphite-poly.h (scop_do_interchange): Declared.
2173 * tree-ssa-loop.c (gate_graphite_transforms): Do not fail when
2174 flag_loop_interchange is used.
2176 2009-06-18 Sebastian Pop <sebastian.pop@amd.com>
2178 * graphite-dependences.c (dependence_polyhedron): Update use of
2179 pbb_nb_scattering_dims.
2180 * graphite-poly.h (pbb_nb_scattering_dims): Do not pass SCOP.
2181 (pbb_nb_scattering): Update use of pbb_nb_scattering_dims.
2182 (psco_scattering_dim, psct_scattering_dim, psco_iterator_dim,
2183 psct_iterator_dim, psco_parameter_dim, psct_parameter_dim): New.
2185 2009-06-16 Sebastian Pop <sebastian.pop@amd.com>
2187 * graphite.c: Cleanup foo.
2189 2009-06-16 Sebastian Pop <sebastian.pop@amd.com>
2191 * Merge from mainline (r143684:148293).
2192 * Disabled libpcp until it gets fixed.
2194 2009-06-05 Sebastian Pop <sebastian.pop@amd.com>
2195 Harsha Jagasia <harsha.jagasia@amd.com>
2197 * graphite-interchange.c: New.
2198 * Makefile.in (graphite-interchange.o): New.
2199 * graphite-poly.h (interchange_profitable_p): Declared.
2200 * graphite-ppl.h (value_max): New.
2202 2009-06-04 Sebastian Pop <sebastian.pop@amd.com>
2204 * graphite-dependences.c (dependence_polyhedron): Use pdr_dim.
2205 * graphite-poly.h: Fix some comments.
2209 2009-06-04 Sebastian Pop <sebastian.pop@amd.com>
2212 (pdr_accessp_nb_subscripts): Renamed pdr_nb_subscripts.
2213 (pdr_accessp_nb_iterators): Renamed pdr_dim_iter_domain.
2214 (pdr_accessp_nb_params): Renamed pdr_nb_params.
2215 (pdr_accessp_alias_set_dim): Renamed pdr_alias_set_dim.
2216 (pdr_accessp_subscript_dim): Renamed pdr_subscript_dim.
2217 (pdr_accessp_iterator_dim): Renamed pdr_iterator_dim.
2218 (pdr_accessp_param_dim): Renamed pdr_parameter_dim.
2219 (pbb_nb_loops): Renamed pbb_dim_iter_domain.
2220 * graphite-clast-to-gimple.c: Same.
2221 * graphite-dependences.c: Same.
2222 * graphite-poly.c: Same.
2223 * graphite-sese-to-poly.c: Same.
2225 2009-06-03 Sebastian Pop <sebastian.pop@amd.com>
2227 * graphite-clast-to-gimple.c (build_iv_mapping): Insert full
2228 expressions for an IV rename, as returned by clast_to_gcc_expression.
2229 (copy_renames): Rename new_name to expr.
2230 * sese.c (debug_rename_elt): Same.
2233 (sese_adjust_liveout_phis): Call force_gimple_operand before using
2234 the information from the rename map.
2235 (rename_variables_in_stmt): Same.
2236 (add_loop_exit_phis): Rename new_name to expr.
2237 (insert_loop_close_phis): Same.
2238 (add_guard_exit_phis): Same. Call force_gimple_operand.
2239 * sese.h (struct rename_map_elt): Rename new_name to expr.
2240 (new_rename_map_elt): Same.
2242 2009-06-03 Sebastian Pop <sebastian.pop@amd.com>
2244 * graphite-clast-to-gimple.c (build_iv_mapping): Use set_rename.
2245 * sese.c (set_rename): Make it extern.
2246 * sese.h (set_rename): Declared.
2248 2009-06-03 Sebastian Pop <sebastian.pop@amd.com>
2250 * graphite-poly.c (extend_scattering): Free values.
2251 * graphite-ppl.c (new_Cloog_Domain_from_ppl_Pointset_Powerset):
2253 (ppl_print_powerset_matrix): Same.
2254 * graphite-scop-detection.c (free_scops_1): New.
2255 (limit_scops): Call free_scops_1.
2256 * graphite-sese-to-poly.c (build_scop_bbs_1): Free dom.
2257 (build_poly_dr): Free PPL coefficients.
2258 * tree-parloops.c (rewrite_all_phi_nodes_with_iv): Free bbs.
2260 2009-06-02 Sebastian Pop <sebastian.pop@amd.com>
2262 * graphite-dependences.c: New.
2263 * graphite-data-ref.c: Removed.
2264 * graphite-data-ref.h: Removed.
2265 * Makefile.in (graphite-data-ref.o): Removed.
2266 (graphite-dependences.o): Added.
2267 * graphite-clast-to-gimple.c: Remove dependence on graphite-data-ref.h.
2268 * graphite-poly.c: Same.
2269 Move the data dependence testing to graphite-dependences.c.
2271 2009-05-19 Tobias Grosser <grosser@fim.uni-passau.de>
2273 * graphite-scop-detection.c (graphite_can_represent_loop): Renamed
2274 from graphite_cannot_represent_loop. Code refactored.
2275 (scopdet_basic_block_info): Call graphite_can_represent_loop.
2277 2009-05-17 Li Feng <nemokingdom@gmail.com>
2279 * testsuite/gcc.dg/graphite/graphite_autopar/graphite_autopar.exp:
2280 Cover all the testcases (not only the filtered ones).
2282 2009-05-17 Tobias Grosser <grosser@fim.uni-passau.de>
2284 * graphite-scop-detection.c (stmt_simple_for_scop_p): Remove
2285 unnecessary check. Update comments. Move check for REAL_TYPE here.
2286 (harmful_stmt_in_bb): Remove checks for conditions. This is already
2287 done in (stmt_simple_for_scop_p).
2289 2009-05-14 Tobias Grosser <grosser@fim.uni-passau.de>
2291 * graphite.c (print_global_statistics): New.
2292 (print_graphite_scop_statistic): New.
2293 (print_graphite_statistics): New.
2294 (graphite_initialize, graphite_transform_loops): Print statistics.
2295 * graphite-scop-detection (build_scops): Print statistics.
2296 (print_graphite_scop_statistics): New.
2297 (print_graphite_statistics): New.
2299 2009-05-13 Sebastian Pop <sebastian.pop@amd.com>
2301 * graphite-clast-to-gimple.c (struct clast_name_index): Removed.
2302 (debug_clast_name_index): Removed.
2303 (debug_clast_name_indexes_1): Removed.
2304 (debug_clast_name_indexes): Removed.
2305 (clast_name_index_elt_info): Removed.
2306 (eq_clast_name_indexes): Removed.
2307 (clast_name_to_index): Removed.
2308 (new_clast_name_index): Removed.
2309 (save_clast_name_index): Removed.
2310 (save_var_name): Moved...
2311 (init_sese_params_index): Removed.
2312 (clast_name_to_gcc): Remove use of name_tree.
2313 (initialize_cloog_names): Same.
2314 (gloog): Do not call init_sese_params_index.
2315 * graphite-sese-to-poly.c (save_var_name): ...here.
2316 (parameter_index_in_region): New.
2317 * sese.c (new_sese): Initialize SESE_PARAMS_NAMES.
2318 (parameter_index_in_region): Removed.
2319 (is_parameter): Remove use of name_tree.
2320 * sese.h (struct name_tree): Removed.
2321 (struct sese): Remove use of name_tree. New field params_names.
2322 (SESE_PARAMS_NAMES): New.
2323 (SESE_PARAMS): Remove duplicate.
2324 (parameter_index_in_region): Removed.
2325 (sese_nb_params): Remove use of name_tree.
2326 (struct clast_name_index): New.
2327 (new_clast_name_index): New.
2328 (clast_name_to_index): New.
2329 (save_clast_name_index): New.
2330 (debug_clast_name_index): New.
2331 (debug_clast_name_indexes_1): New.
2332 (debug_clast_name_indexes): New.
2333 (clast_name_index_elt_info): New.
2334 (eq_clast_name_indexes): New.
2336 2009-05-13 Sebastian Pop <sebastian.pop@amd.com>
2338 * graphite-clast-to-gimple.c (compute_cloog_iv_types_1): Call
2339 pbb_to_depth_to_oldiv. Remove call to oldiv_for_loop.
2340 (graphite_loop_normal_form): Do not pass region. Do not
2341 initialize SESE_OLDIVS.
2342 (build_graphite_loop_normal_form): Update call to
2343 graphite_loop_normal_form.
2344 * sese.c (debug_oldivs): Removed.
2345 (new_sese): Do not initialize SESE_OLDIVS.
2346 (free_sese): Do not free SESE_OLDIVS.
2347 (oldiv_for_loop): Removed.
2348 * sese.h (struct sese): Remove old_ivs.
2349 (SESE_OLDIVS): Removed.
2350 (oldiv_for_loop): Removed.
2352 2009-05-13 Sebastian Pop <sebastian.pop@amd.com>
2354 * graphite-clast-to-gimple.c (clast_name_to_gcc): Pass newivs,
2355 remove ivstack. Remove call to loop_iv_stack_get_iv_from_name,
2356 replaced by a call to newivs_to_depth_to_newiv.
2357 (clast_to_gcc_expression): Pass newivs, remove ivstack.
2358 (clast_to_gcc_expression_red): Same.
2359 (gcc_type_for_clast_expr): Same.
2360 (gcc_type_for_clast_eq): Same.
2361 (graphite_translate_clast_equation): Same.
2362 (graphite_create_guard_cond_expr): Same.
2363 (graphite_create_new_guard): Same.
2364 (graphite_create_new_loop): Same.
2365 (build_iv_mapping): Same.
2366 (translate_clast): Same.
2368 (loop_iv_stack_patch_for_consts): Removed. *
2369 sese.c (iv_stack_entry_is_constant): Removed.
2370 (iv_stack_entry_is_iv): Removed.
2371 (loop_iv_stack_push_iv): Removed.
2372 (loop_iv_stack_insert_constant): Removed.
2373 (loop_iv_stack_pop): Removed.
2374 (loop_iv_stack_get_iv): Removed.
2375 (loop_iv_stack_get_iv_from_name): Removed.
2376 (debug_loop_iv_stack): Removed.
2377 (free_loop_iv_stack): Removed.
2378 (loop_iv_stack_remove_constants): Removed. *
2379 sese.h (iv_stack_entry_kind): Removed.
2380 (iv_stack_entry_data_union): Removed.
2381 (iv_stack_entry_struct): Removed.
2382 (iv_stack_entry_p): Removed.
2383 (debug_oldivs, debug_loop_iv_stack, loop_iv_stack_insert_constant,
2384 loop_iv_stack_get_iv_from_name, loop_iv_stack_push_iv,
2385 loop_iv_stack_get_iv, loop_iv_stack_remove_constants,
2386 loop_iv_stack_pop, free_loop_iv_stack): Removed.
2387 (gbb_loop_at_index): Fix indenting.
2388 (gbb_loop_index): Removed.
2390 2009-05-13 Sebastian Pop <sebastian.pop@amd.com>
2392 * graphite-clast-to-gimple.c (clast_name_to_gcc): Do not use strcmp.
2393 Call clast_name_to_index.
2395 2009-05-13 Sebastian Pop <sebastian.pop@amd.com>
2397 * graphite-clast-to-gimple.c (clast_name_to_gcc): Pass region,
2398 do not pass params. Get params from SESE_PARAMS.
2399 (clast_to_gcc_expression): Same.
2400 (clast_to_gcc_expression_red): Same.
2401 (gcc_type_for_clast_eq): Same.
2402 (graphite_translate_clast_equation): Same.
2403 (graphite_create_new_loop): Same.
2404 * sese.c (rename_variables_in_stmt): Fix comment.
2406 2009-05-13 Sebastian Pop <sebastian.pop@amd.com>
2408 * graphite-clast-to-gimple.c (graphite_create_new_loop): Pass
2410 Call save_clast_name_index.
2411 (translate_clast): Pass newivs_index.
2412 (gloog): Create and free newivs_index.
2414 2009-05-13 Sebastian Pop <sebastian.pop@amd.com>
2416 * graphite-clast-to-gimple.c (clast_name_index): New structure.
2417 (clast_name_index_p): New type.
2418 (debug_clast_name_index): New.
2419 (debug_clast_name_indexes_1): New.
2420 (debug_clast_name_indexes): New.
2421 (clast_name_index_elt_info): New.
2422 (eq_clast_name_indexes): New.
2423 (clast_name_to_index): New.
2424 (new_clast_name_index): New.
2425 (save_clast_name_index): New.
2426 (init_sese_params_index): New.
2427 (gloog): Call init_sese_params_index.
2428 * graphite-clast-to-gimple.h (debug_clast_name_indexes): Declared.
2429 * sese.c (new_sese): Initialize SESE_PARAMS_INDEX.
2430 (free_sese): Free SESE_PARAMS_INDEX.
2431 * sese.h (struct sese): Add params_index.
2432 (SESE_PARAMS_INDEX): New.
2434 2009-05-13 Sebastian Pop <sebastian.pop@amd.com>
2436 * graphite-clast-to-gimple.c (newivs_to_depth_to_newiv): New.
2437 (graphite_create_new_loop): Pass the newivs vector. Push the
2438 newly created IV to newivs.
2439 (translate_clast): Pass the newivs vector.
2440 (gloog): Create and destroy the newivs vector.
2442 2009-05-13 Sebastian Pop <sebastian.pop@amd.com>
2444 * graphite-clast-to-gimple.c (pbb_to_depth_to_oldiv): New.
2445 (graphite_loop_normal_form): Initialize loop->aux with the unique
2446 IV that has been created.
2448 2009-05-13 Tobias Grosser <grosser@fim.uni-passau.de>
2450 * tree-chrec.c (evolution_function_right_is_integer_cst): Allow
2451 scev with parameters in the base part. They where forbidden
2454 2009-05-11 Li Feng <nemokingdom@gmail.com>
2456 * testsuite/gcc.dg/graphite/graphite.exp: Set different default
2457 compile options by file names.
2458 * testsuite/gcc.dg/graphite/block{0-6}.c: Remove dg-option line.
2459 * testsuite/gcc.dg/graphite/id-{1-9}.c: Ditto.
2460 * testsuite/gcc.dg/graphite/scop-{0-20}.c: Ditto.
2461 * testsuite/gcc.dg/graphite/scop-matmult.c: Ditto.
2463 2009-05-08 Li Feng <nemokingdom@gmail.com>
2465 * testsuite/gcc.dg/graphite/graphite_autopar/graphite_autopar.exp: New.
2466 * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-1.c: New.
2467 * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-2.c: New.
2468 * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-3.c: New.
2470 2009-05-07 Tobias Grosser <grosser@fim.uni-passau.de>
2472 * graphite-scop-detection (build_scops_1): Fix little bug introduced
2475 2009-05-07 Tobias Grosser <grosser@fim.uni-passau.de>
2477 * graphite-scop-detection.c (graphite_can_represent_scev): Only
2478 allow integer constant strides.
2479 (graphite_can_represent_expr): Depend on outermost_loop.
2480 (stmt_simple_memref_p, graphite_cannot_represent_loop,
2481 harmful_stmt_in_bb, is_simple_operand, stmt_simple_for_scop_p,
2482 build_scops_1): Same.
2483 (scopdet_basic_block_info): Same and insert layered SCoP
2485 (try_generate_gimple_bb): Cleanup.
2486 (build_scops): Enable data references.
2488 * testsuite/gcc.dg/graphite/id-5.c: New.
2489 * testsuite/gcc.dg/graphite/id-9.c: New.
2490 * tree-chrec.c (evolution_function_right_is_integer_cst): New.
2491 * tree-chrec.h (evolution_function_right_is_integer_cst): New.
2493 2009-05-06 Tobias Grosser <grosser@fim.uni-passau.de>
2495 * sese.c (expand_scalar_variables_ssa_name): Only build expressions,
2496 that we have not yet built for this SCoP.
2498 2009-05-06 Tobias Grosser <grosser@fim.uni-passau.de>
2500 * sese.c (expand_scalar_variables_expr): Fix expand_scalar_variables
2501 for complex numbers.
2503 2009-05-06 Tobias Grosser <grosser@fim.uni-passau.de>
2505 * graphite-ppl.c: Fix build if cloog is not available.
2507 2009-05-04 Li Feng <nemokingdom@gmail.com>
2509 * tree-parloops.c (loop_parallel_p): Remove construction of
2510 NITER and REDUCTION_LIST.
2511 (try_get_loop_niter): New.
2512 (try_create_reduction_list): New.
2513 (parallelize_loops): Bypass the failed checkings in autopar
2514 when can_be_parallel in loop structure is set to true.
2516 2009-05-01 Tobias Grosser <grosser@fim.uni-passau.de>
2518 * testsuite/gcc.dg/graphite/id-6.c: Update testcase.
2519 * testsuite/gcc.dg/graphite/scop-3.c: Dito.
2521 2009-05-01 Tobias Grosser <grosser@fim.uni-passau.de>
2523 * graphite-scop-detection.c (stmt_simple_for_scop_p):
2524 Enable EQ_EXPR and NE_EXPR again.
2526 2009-04-30 Tobias Grosser <grosser@fim.uni-passau.de>
2528 * graphite-scop-detection.c (graphite_can_represent_scev):
2529 Add check if scev is affine multivariate.
2530 (harmful_stmt_in_bb): Check if we can represent the conditions.
2531 (scopdet_basic_block_info (basic_block bb, VEC): Pass the loop to
2533 * testsuite/gcc.dg/graphite/id-7.c: New.
2535 2009-04-30 Tobias Grosser <grosser@fim.uni-passau.de>
2537 * graphite-sese-to-poly.c (bb_contains_non_iv_scalar_phi_nodes):
2538 Check all bbs in region, not only the bbs that are represented in
2540 (build_poly_scop): Add newline.
2541 * testsuite/gcc.dg/graphite/id-8.c: New.
2543 2009-04-30 Li Feng <nemokingdom@gmail.com>
2545 * cfgloop.c (alloc_loop): Initialize can_be_parallel to false
2546 when loop initialize.
2547 * cfgloop.h (struct loop): Introduce flag can_be_parallel.
2548 * common.opt: Declare flag_graphite_force_parallel.
2549 * graphite-clast-to-gimple.c (translate_clast): Mark the innermost
2551 * graphite-poly.c (apply_poly_transforms): Introduce
2552 flag_graphite_force_parallel.
2553 * tree-ssa-loop.c (gate_graphite_transforms): ditto.
2554 * toplev.c (process_options): ditto and replace a not correctly
2557 2009-04-30 Li Feng <nemokingdom@gmail.com>
2559 * graphite-clast-to-gimple.c (loop_iv_stack_patch_for_consts):
2560 Change the call of gbb_loop_at_index and/or gbb_loop_index due
2561 to the redefinition.
2562 (compute_cloog_iv_types_1): ditto.
2563 (build_iv_mapping): ditto.
2564 * graphite-sese-to-poly.c (new_gimple_bb): Remove GBB_LOOPS related
2566 (free_gimple_bb): Removed GBB_LOOPS related free part.
2567 (build_bb_loops): Removed.
2568 * sese.h (struct gimple_bb): Removed loops.
2569 (GBB_LOOPS): Removed.
2570 (gbb_loop_at_index): Instead of using GBB_LOOPS, we use sese instead.
2571 (gbb_loop_index): ditto.
2573 2009-04-24 Tobias Grosser <grosser@fim.uni-passau.de>
2575 * graphite-scop-detection.c (graphite_can_represent_scev): Do not
2576 allow non constant strides.
2577 * testsuite/gcc.dg/graphite/scop-20.c: New.
2579 2009-04-24 Sebastian Pop <sebastian.pop@amd.com>
2581 * graphite-scop-detection.c (dot_all_scops): Fix system call
2582 return value warning.
2585 2009-04-24 Sebastian Pop <sebastian.pop@amd.com>
2587 * testsuite/gcc.dg/graphite/id-6.c: Fix pattern.
2588 * testsuite/gcc.dg/graphite/scop-3.c: Same.
2590 2009-04-24 Sebastian Pop <sebastian.pop@amd.com>
2592 * graphite-poly.c (map_into_dep_poly, map_dr_into_dep_poly,
2593 build_pairwise_constraint, dr_equality_constraints,
2594 build_pairwise_scheduling_equality,
2595 build_pairwise_scheduling_inequality, lexicographically_gt_p,
2596 build_lexicographically_gt_constraint, dependence_polyhedron,
2597 graphite_legal_transform_dr, graphite_legal_transform_bb,
2598 graphite_legal_transform): New.
2599 * graphite-poly.h (graphite_legal_transform): Declared.
2600 * graphite-sese-to-poly.c (build_poly_scop): Call to
2601 graphite_legal_transform is disabled for the moment.
2603 2009-04-24 Sebastian Pop <sebastian.pop@amd.com>
2605 * graphite-poly.h (pbb_nb_scattering_dims): New.
2606 (pbb_nb_scattering): Use it.
2608 2009-04-24 Sebastian Pop <sebastian.pop@amd.com>
2610 * graphite-ppl.c (ppl_insert_dimensions_pointset): Add
2611 Pointset_Powerset version of ppl_insert_dimensions.
2612 * graphite-ppl.h (ppl_insert_dimensions_pointset): Declared.
2614 2009-04-24 Sebastian Pop <sebastian.pop@amd.com>
2616 * graphite-ppl.c (ppl_insert_dimensions): Fix formatting.
2618 2009-04-24 Sebastian Pop <sebastian.pop@amd.com>
2620 * graphite-poly.h: Fix comment.
2622 2009-04-24 Sebastian Pop <sebastian.pop@amd.com>
2624 * graphite-sese-to-poly.c (build_poly_dr): Fix data ref multiplier.
2626 2009-04-24 Tobias Grosser <grosser@fim.uni-passau.de>
2628 * sese.c (expand_scalar_variables_stmt): Only iterate over the old
2631 2009-04-24 Tobias Grosser <grosser@fim.uni-passau.de>
2633 * graphite-sese-to-poly.c (var_used_in_not_loop_header_phi_node): New.
2634 (graphite_stmt_p): Represent bbs necessary to build the phi nodes of
2637 2009-04-20 Sebastian Pop <sebastian.pop@amd.com>
2639 * graphite-scop-detection.c (stmt_simple_for_scop_p): Do not
2640 handle EQ_EXPR and NE_EXPR.
2642 2009-04-17 Tobias Grosser <grosser@fim.uni-passau.de>
2644 * graphite-poly.h (poly_dr): Fix comment.
2646 2009-04-09 Sebastian Pop <sebastian.pop@amd.com>
2647 Tobias Grosser <grosser@fim.uni-passau.de>
2649 * graphite-poly.c (new_poly_bb): Do not initialize PBB_DOMAIN
2650 with a zero dimension polyhedron.
2651 (find_scop_parameters): Move the call to scop_set_nb_params here.
2652 (build_loop_iteration_domains): Store in loop->aux the iteration
2654 (build_scop_iteration_domain): Fix PBB_DOMAIN for bbs not surrounded
2655 by any loop in scop.
2656 (build_poly_scop): Do not call scop_set_nb_params.
2658 2009-04-09 Sebastian Pop <sebastian.pop@amd.com>
2659 Tobias Grosser <grosser@fim.uni-passau.de>
2661 * graphite-sese-to-poly.c (add_condition_to_pbb): Pass code to
2662 add_condition_to_domain not GT_EXPR.
2664 2009-04-09 Tobias Grosser <grosser@fim.uni-passau.de>
2666 * graphite-ppl.c (debug_ppl_powerset_matrix): New.
2667 * graphite-ppl.h (debug_ppl_powerset_matrix): New.
2668 * graphite-sese-to-poly.c (add_condition_to_pbb): Use
2669 upper_bound_assign to calculate unions.
2670 * testsuite/gcc.dg/graphite/id-6.c: New.
2672 2009-04-09 Tobias Grosser <grosser@fim.uni-passau.de>
2674 * graphite-scop-detection.c (canonicalize_loop_closed_ssa): Do not
2675 handle abnormal edges.
2677 2009-04-09 Tobias Grosser <grosser@fim.uni-passau.de>
2679 * graphite-poly.c (new_poly_dr, free_poly_dr): New.
2680 (free_poly_bb): Also free poly_drs.
2681 * graphite-poly.h (new_poly_dr, free_poly_dr): New.
2682 (poly_dr): Polyhedron to Pointset_Powerset.
2683 (pdr_accessp_nb_subscripts): Same.
2684 * graphite-sese-to-poly.c (build_poly_dr): Same. And actually build
2687 2009-04-08 Sebastian Pop <sebastian.pop@amd.com>
2689 * graphite-clast-to-gimple.c (initialize_cloog_names): Change cloog
2690 names into more meaningful names.
2692 2009-04-08 Sebastian Pop <sebastian.pop@amd.com>
2694 * testsuite/gfortran.dg/graphite/interchange-1.c: New.
2695 * testsuite/gfortran.dg/graphite/interchange-2.c: New.
2697 2009-04-08 Sebastian Pop <sebastian.pop@amd.com>
2699 * graphite-clast-to-gimple.c (graphite_loop_normal_form): Do not build
2701 * tree-parloops.c (rewrite_phi_with_iv): New.
2702 (rewrite_all_phi_nodes_with_iv): New.
2703 (canonicalize_loop_ivs): Call them.
2705 2009-04-08 Sebastian Pop <sebastian.pop@amd.com>
2707 * graphite-sese-to-poly.c (try_generate_gimple_bb): Use
2708 graphite_find_data_references_in_stmt.
2709 * tree-data-ref.c (graphite_find_data_references_in_stmt): New.
2710 * tree-data-ref.h (graphite_find_data_references_in_stmt): Declared.
2712 2009-04-08 Sebastian Pop <sebastian.pop@amd.com>
2714 * sese.c (add_loop_exit_phis): Don't fail on non SSA_NAME renames.
2716 2009-04-08 Sebastian Pop <sebastian.pop@amd.com>
2718 * graphite-sese-to-poly.c (build_scop_bbs_1): Use bb_in_sese_p
2719 instead of bb_in_region.
2720 (flag_bb_in_region): Same. Renamed flag_bb_in_sese.
2721 (build_sese_conditions): Use flag_bb_in_sese.
2722 * sese.c (register_bb_in_sese): Removed.
2723 (new_sese): Remove initialization of SESE_REGION_BBS.
2724 (free_sese): Do not free SESE_REGION_BBS.
2725 * sese.h (struct sese): Remove field region_basic_blocks.
2726 (SESE_REGION_BBS): Removed.
2727 (bb_in_sese_p): Implement in function of bb_in_region.
2729 2009-04-08 Sebastian Pop <sebastian.pop@amd.com>
2731 * graphite-scop-detection.c (limit_scops): Deal only with single exit
2734 2009-04-08 Tobias Grosser <grosser@fim.uni-passau.de>
2736 * graphite-scop-detection.c (stmt_simple_for_scop_p): Allow NE_EXPR
2738 * graphite-sese-to-poly.c (create_linear_expr_from_tree): New.
2739 (add_condition_to_domain): New.
2740 (add_condition_to_pbb): New.
2741 (add_conditions_to_domain): Cleanup and handle of NE_EXPR and EQ_EXPR.
2742 * testsuite/gcc.dg/graphite/scop-3.c: Update number of detected SCoPs.
2744 2009-04-08 Tobias Grosser <grosser@fim.uni-passau.de>
2746 * graphite-clast-to-gimple.c (build_cloog_prog): ppl_Polyhedron ->
2747 ppl_Pointset_Powerset.
2748 * graphite-poly.c (new_poly_bb, free_poly_bb): Same.
2749 * graphite-poly.h (poly_bb): poly_bb.domain Same.
2750 (pbb_nb_loops): Same.
2751 * graphite-sese-to-poly.c (build_loop_iteration_domains,
2752 add_conditions_to_domain): Same.
2753 * graphite-ppl.c (new_Cloog_Domain_from_ppl_Pointset_Powerset): New.
2754 (ppl_print_polyhedron_matrix): ppl_Polyhedron_t ->
2755 ppl_const_Polyhedron_t.
2756 (ppl_print_powerset_matrix): New.
2757 * graphite-ppl.h (new_Cloog_Domain_from_ppl_Pointset_Powerset,
2758 ppl_print_powerset_matrix): New.
2759 (ppl_print_polyhedron_matrix): Updated.
2761 2009-04-07 Sebastian Pop <sebastian.pop@amd.com>
2763 * tree-scalar-evolution.c (analyze_scalar_evolution_1): Fix comment.
2765 2009-04-07 Sebastian Pop <sebastian.pop@amd.com>
2767 * graphite-poly.c (extend_scattering): Fix indenting. Free cstr.
2768 (print_iteration_domains, debug_iteration_domain,
2769 debug_iteration_domains): New.
2770 * graphite-poly.h (print_iteration_domains, debug_iteration_domain,
2771 debug_iteration_domains): Declared.
2772 * graphite-sese-to-poly.c (build_pbb_scattering_polyhedrons): Fix
2775 2009-04-03 Tobias Grosser <grosser@fim.uni-passau.de>
2776 Sebastian Pop <sebastian.pop@amd.com>
2778 * graphite-poly.h (print_iteration_domain): New.
2779 * graphite-sese-to-poly.c (add_conditions_to_domain): Fixed bug.
2780 (build_sese_conditions_1, build_sese_conditions_after,
2781 build_sese_conditions_before): New.
2782 (build_sese_conditions): Rewritten.
2784 2009-04-03 Sebastian Pop <sebastian.pop@amd.com>
2785 Tobias Grosser <grosser@fim.uni-passau.de>
2787 Cleanup of code generation liveouts.
2788 * graphite-clast-to-gimple.c (translate_clast): Use a single
2789 rename_map instead of one per translated statement.
2790 Do not use SESE_LIVEOUT_RENAMES.
2791 (graphite_loop_normal_form): Do not use SESE_REDUCTION_LIST.
2792 (gloog): Do not use SESE_LIVEOUT_RENAMES.
2793 * graphite-scop-detection.c (harmful_stmt_in_bb): Return the close
2794 phi node of a reduction: when a loop contains a reduction used outside
2795 the loop, there should be a scalar close phi node on the exit block.
2796 * sese.c (new_sese): Do not initialize SESE_LIVEOUT,
2797 SESE_LIVEOUT_RENAMES, and SESE_REDUCTION_LIST.
2798 (free_sese): Do not free them.
2799 (sese_build_liveouts_use): Do not use them.
2800 (sese_build_liveouts_bb): Same.
2801 (sese_build_liveouts): Same.
2802 (sese_insert_phis_for_liveouts): Same.
2803 (sese_adjust_phis_for_liveouts): Same. Renamed sese_adjust_liveout_phis.
2804 (defined_in_loop_p): New.
2805 (alive_after_loop): New.
2806 (close_phi_not_yet_inserted_p): New.
2807 (struct alep, alep_p): New.
2808 (add_loop_exit_phis): Remove from the rename_map all the names defined
2809 in the code generated loop.
2810 (insert_loop_close_phis): Traverse the rename_map passed to it.
2811 Don't use SESE_LIVEOUT_RENAMES.
2812 (default_liveout_before_guard): Renamed default_before_guard.
2813 (insert_guard_phis): Do not use SESE_LIVEOUT_RENAMES.
2814 (graphite_copy_stmts_from_block): Do not directly call set_rename.
2815 (register_sese_liveout_renames): Removed.
2816 (copy_bb_and_scalar_dependences): Do not call it.
2817 * sese.h (struct sese): Removed fields: liveout, liveout_renames, and
2819 (SESE_LIVEOUT): Removed.
2820 (SESE_LIVEOUT_RENAMES): Removed.
2821 (SESE_REDUCTION_LIST): Removed.
2822 (sese_build_liveouts): Removed.
2823 (sese_adjust_phis_for_liveouts): Renamed sese_adjust_liveout_phis.
2824 (insert_loop_close_phis): Pass a htab_t instead of a sese.
2825 (insert_guard_phis): Same.
2826 (rename_map_elt): Declare a VEC of them.
2827 * tree-parloops.c (canonicalize_loop_ivs): reduction_list contains
2828 trees not pointers to trees.
2830 Rewrite in canonical close SSA form:
2831 * graphite-scop-detection.c (contains_only_close_phi_nodes): New.
2832 (limit_scops): Close the scop after the block containing the close phi
2834 (canonicalize_loop_closed_ssa): New.
2835 (canonicalize_loop_closed_ssa_form): New.
2836 (build_scops): Call canonicalize_loop_closed_ssa_form.
2838 * graphite-sese-to-poly.c: Fix typos.
2840 2009-04-03 Sebastian Pop <sebastian.pop@amd.com>
2842 * graphite-poly.c (print_scattering_function, print_pbb_domain):
2844 (dump_gbb_conditions, dump_gbb_cases, print_iteration_domain): New.
2845 (print_pbb): Add conditions.
2847 2009-04-01 Tobias Grosser <grosser@fim.uni-passau.de>
2848 Sebastian Pop <sebastian.pop@amd.com>
2850 * graphite-scop-detection.c (bb_in_sd_region): Use bb_in_region.
2851 * graphite-sese-to-poly.c (all_non_dominated_preds_marked_p): New.
2852 (build_scop_bbs_1): New.
2853 (build_scop_bbs): Rewrite.
2854 * sese.h (bb_in_region): New.
2856 2009-03-29 Tobias Grosser <grosser@fim.uni-passau.de>
2858 * graphite-poly.c (new_poly_bb, free_poly_bb): Initialize/free
2860 (print_scop): Style.
2861 * graphite-poly.h (poly_bb): Add drs vector.
2862 (PBB_DRS): Add accessor.
2863 * graphite-sese-to-poly.c (build_poly_dr): New.
2864 (build_pbb_drs, build_scop_drs): New.
2865 (build_poly_scop): call build_scop_drs (Disabled at the moment).
2867 2009-03-29 Tobias Grosser <grosser@fim.uni-passau.de>
2869 * tree-ssa-loop.c: Include forgotten toplev.h
2871 2009-03-29 Tobias Grosser <grosser@fim.uni-passau.de>
2873 * graphite-poly.c: (apply_poly_transforms): sorry -> gcc_unreachable.
2874 * testsuite/gcc.dg/graphite/pr37883.c: Remove -floop-*
2875 * testsuite/gcc.dg/graphite/pr37928.c: Same
2876 * testsuite/gcc.dg/graphite/pr38409.c: Same
2877 * testsuite/gcc.dg/graphite/pr38498.c: Same
2878 * testsuite/gcc.dg/graphite/pr38559.c: Same
2879 * testsuite/gcc.dg/graphite/pr39335.c: Same
2880 * testsuite/gcc.dg/graphite/pr39335_1.c: Same
2881 * testsuite/gfortran.dg/graphite/block-2.f: Same
2882 * tree-ssa-loop.c (gate_graphite_transforms): Always fail if called
2885 2009-03-28 Tobias Grosser <grosser@fim.uni-passau.de>
2887 * graphite-sese-to-poly.c (ref_nb_loops, build_access_matrix_with_af,
2888 build_access_matrix, build_scop_data_accesses): Remove access function
2889 building. (We get a new version soon).
2890 (build_bb_loops, scan_tree_for_params_right_scev): Update.
2891 * sese.h (nb_loops_around_loop_in_sese): Remove.
2892 (sese_loop_depth): Do not use SESE_LOOP_NEST any more.
2894 2009-03-27 Tobias Grosser <grosser@fim.uni-passau.de>
2895 Sebastian Pop <sebastian.pop@amd.com>
2897 * graphite-scop-detection.c (struct scopdet_info): Rename last
2899 (scopdet_basic_block_info, build_scops_1): Don't use
2900 CDI_POST_DOMINATORS. CDI_POST_DOMINATORS should never be used.
2902 2009-03-26 Tobias Grosser <grosser@fim.uni-passau.de>
2903 Sebastian Pop <sebastian.pop@amd.com>
2905 * graphite-clast-to-gimple.c (gloog): Call sese_build_liveouts.
2906 * sese.c (sese_build_liveouts_use): Renamed from
2907 sese_build_livein_liveouts_use. Remove liveins.
2908 (sese_build_liveouts_bb): Renamed from sese_build_livein_liveouts_bb.
2909 Call sese_build_liveouts_use.
2910 (sese_build_liveouts): Renamed from sese_build_livein_liveouts.
2911 Call sese_build_liveouts_bb.
2912 (new_sese, free_sese): Remove liveins.
2913 (sese_add_exit_phis_var): Deleted.
2914 (sese_insert_phis_for_liveouts): Call sese_add_exit_phis_edge
2916 (graphite_copy_stmts_from_block): Remove SESE_NUM_VER.
2918 * sese.h (sese): Remove num_ver and livein.
2919 (SESE_LIVEIN, SESE_LIVEIN_VER, SESE_NUM_VER): Removed.
2921 2009-03-25 Tobias Grosser <grosser@fim.uni-passau.de>
2923 * graphite-sese-to-poly.c (build_scop_scattering): Fix compile.
2925 2009-03-25 Tobias Grosser <grosser@fim.uni-passau.de>
2927 * graphite-sese-to-poly.c (compare_prefix_loops): Removed.
2928 (build_scop_scattering): Do not use compare_prefix_loops any more.
2929 (nb_common_loops): New.
2931 2009-03-24 Sebastian Pop <sebastian.pop@amd.com>
2933 * sese.c (get_new_name_from_old_name): Renamed get_rename.
2934 (register_old_and_new_names): Renamed set_rename.
2936 2009-03-24 Sebastian Pop <sebastian.pop@amd.com>
2938 * graphite-scop-detection.h (nb_reductions_in_loop): Revert removal
2939 of the decl from the previous commit.
2941 2009-03-24 Sebastian Pop <sebastian.pop@amd.com>
2943 * graphite-scop-detection.c (dot_scop): New.
2944 * graphite-scop-detection.h (dot_scop): Declared.
2946 2009-03-24 Sebastian Pop <sebastian.pop@amd.com>
2948 * graphite-sese-to-poly.c (compare_prefix_loops): Fix compare.
2950 2009-03-24 Sebastian Pop <sebastian.pop@amd.com>
2952 * cfgloopmanip.c (create_empty_loop_on_edge): Generate the loop exit
2953 condition at the end of the loop.
2954 * graphite.c (graphite_initialize, graphite_finalize): Print to
2955 dump_file the compiled function.
2956 * graphite-clast-to-gimple.c (graphite_create_new_loop): Update use
2957 of create_empty_loop_on_edge.
2958 (translate_clast): Update the code generation of loops for the new
2960 * cfgloop.h (create_empty_loop_on_edge): Update declaration.
2962 2009-03-24 Sebastian Pop <sebastian.pop@amd.com>
2964 Reverted the patch from 2009-03-19.
2966 2009-03-19 Tobias Grosser <grosser@fim.uni-passau.de>
2968 * graphite-poly.c (new_poly_bb, free_poly_bb): Initialize/free
2970 (print_scop): Style.
2971 * graphite-poly.h (poly_bb): Add drs vector.
2972 (PBB_DRS): Add accessor.
2973 * graphite-sese-to-poly.c (ref_nb_loops): Remove.
2974 (build_access_matrix_with_af, build_access_matrix,
2975 build_scop_data_accesses): Delete.
2976 (build_poly_dr): New.
2977 (build_pbb_drs, build_scop_drs): New.
2978 (build_poly_scop): call build_scop_drs.
2980 2009-03-13 Sebastian Pop <sebastian.pop@amd.com>
2982 * graphite-scop-detection.c (dot_all_scops_1): Close the table
2983 once per basic block.
2985 2009-03-13 Tobias Grosser <grosser@fim.uni-passau.de>
2987 * graphite-scop-detection.c (graphite_can_represent_scev): New.
2988 (graphite_can_represent_expr): Renamed from loop_affine_expr
2990 (stmt_simple_for_scop_p): Call graphite_can_represent_expr.
2991 (graphite_cannot_represent_loop): Add scop_entry to parameters.
2992 (scopdet_basic_block_info): Actually define entry_block.
2993 (stmt_simple_memref_p): Moved here from ...
2995 * tree-data-ref.c (stmt_simple_memref_p): here.
2996 * tree-data-ref.h (stmt_simple_memref_p): Removed.
2998 2009-03-13 Tobias Grosser <grosser@fim.uni-passau.de>
3000 * testsuite/gcc.dg/graphite/id-4.c: New.
3002 2009-03-12 Sebastian Pop <sebastian.pop@amd.com>
3004 * sese.c (expand_scalar_variables_expr): Handle tcc_comparison.
3005 (register_old_and_new_names): Update the content of the map.
3006 When there was already a rename_map_elt in the map at that
3008 (copy_bb_and_scalar_dependences): Do rename_variables after
3009 expand_scalar_variables.
3010 * graphite-clast-to-gimple.c (build_iv_mapping): Update the content
3011 of the map. When there was already a rename_map_elt in the
3012 map at that location, free it.
3013 (translate_clast): Pass the rename_map. Do not initialize and free
3014 a rename_map per stmt_user.
3015 (gloog): Initialize and free one rename_map and pass it to
3018 2009-03-12 Sebastian Pop <sebastian.pop@amd.com>
3020 * sese.c (expand_scalar_variables_stmt,
3021 expand_scalar_variables_ssa_name): Add a gimple_stmt_iterator
3023 (expand_scalar_variables_expr): Handle REALPART_EXPR and IMAGPART_EXPR.
3024 (expand_scalar_variables): Pass to expand_scalar_variables_stmt
3025 the gimple_stmt_iterator of the statement to be expanded.
3026 * graphite-scop-detection.c (is_simple_operand): Do handle
3029 2009-03-11 Tobias Grosser <grosser@fim.uni-passau.de>
3031 * graphite-scop-detection.c (is_simple_operand): Do not handle
3033 * testsuite/gcc.dg/graphite/id-2.c: New.
3035 * graphite-sese-to-poly.c (build_bb_loops,
3036 add_value_to_dim, scan_tree_for_params_right_scev,
3037 scan_tree_for_params_int, scan_tree_for_params, idx_record_params,
3038 find_params_in_bb, build_loop_iteration_domains,
3039 add_conditions_to_domain): Remove subtract.
3041 2009-03-11 Tobias Grosser <grosser@fim.uni-passau.de>
3043 * graphite-clast-to-gimple.c (loop_iv_stack_patch_for_consts,
3044 build_iv_mapping, compute_cloog_iv_types_1, build_cloog_prog):
3045 pbb_loop_at_index -> gbb_loop_at_index.
3046 * graphite-poly.c (new_poly_bb, new_scop): New accessors.
3047 (debug_loop_vec): Delete.
3048 * graphite-poly.h (poly_bb, scop): Change black_box and region to void
3049 pointer. Move LOOPS to gimple_bb_p and insert nb_params.
3050 (PBB_LOOPS): Removed.
3051 (PBB_BLACK_BOX): Insert cast.
3052 (pbb_set_black_box): New setter.
3053 (pbb_loop_at_index, pbb_loop_index): Removed.
3054 (scop_set_region, scop_set_nb_params): New.
3055 * graphite-sese-to-poly.c (new_gimple_bb, free_gimple_bb,
3056 build_scop_scattering, build_bb_loops): Add GBB_LOOPS.
3057 (build_poly_scop): Use scop_set_nb_params.
3058 * sese.h (gimple_bb): Add LOOPS.
3059 (GBB_LOOPS, gbb_loop_index, gbb_loop_at_index): New.
3061 2009-03-11 Tobias Grosser <grosser@fim.uni-passau.de>
3063 Revert previous commit.
3065 2009-03-11 Sebastian Pop <sebastian.pop@amd.com>
3067 * sese.c (expand_scalar_variables_expr): Handle tcc_comparison.
3068 (register_old_and_new_names): Update the content of the map.
3069 When there was already a rename_map_elt in the map at that
3071 (copy_bb_and_scalar_dependences): Do rename_variables after
3072 expand_scalar_variables.
3073 * graphite-clast-to-gimple.c (build_iv_mapping): Update the content
3074 of the map. When there was already a rename_map_elt in the
3075 map at that location, free it.
3076 (translate_clast): Pass the rename_map. Do not initialize and free
3077 a rename_map per stmt_user.
3078 (gloog): Initialize and free one rename_map and pass it to
3081 2009-03-11 Tobias Grosser <grosser@fim.uni-passau.de>
3083 Remove forgotten line in revert.
3085 2009-03-11 Sebastian Pop <sebastian.pop@amd.com>
3087 Revert previous commit.
3089 2009-03-10 Sebastian Pop <sebastian.pop@amd.com>
3091 * sese.c (register_old_and_new_names): Update the content
3092 of the map. When there was already a rename_map_elt in the
3093 map at that location, free it.
3094 (copy_bb_and_scalar_dependences): Do rename_variables after
3095 expand_scalar_variables.
3096 * graphite-clast-to-gimple.c (build_iv_mapping): Update the content
3097 of the map. When there was already a rename_map_elt in the
3098 map at that location, free it.
3099 (translate_clast): Pass the rename_map. Do not initialize and free
3100 a rename_map per stmt_user.
3101 (gloog): Initialize and free one rename_map and pass it to
3104 2009-03-10 Sebastian Pop <sebastian.pop@amd.com>
3106 * graphite-clast-to-gimple.c (translate_clast): context_loop
3109 2009-03-10 Tobias Grosser <grosser@fim.uni-passau.de>
3110 Sebastian Pop <sebastian.pop@amd.com>
3112 * graphite-ppl.c (ppl_insert_dimensions): Fix stupid mistake
3113 of the use of ppl_Polyhedron_map_space_dimensions.
3115 2009-03-10 Tobias Grosser <grosser@fim.uni-passau.de>
3116 Sebastian Pop <sebastian.pop@amd.com>
3118 * graphite-poly.c (unify_scattering_dimensions): Fix types.
3119 * graphite-poly.h (poly_dr_p, poly_dr, POLY_DR_TYPE, PDR_BB,
3120 PDR_TYPE, PDR_ACCESSES, pdr_accessp_nb_subscripts,
3121 pdr_accessp_nb_iterators, pdr_accessp_nb_params,
3122 pdr_accessp_alias_set_dim, pdr_accessp_subscript_dim,
3123 pdr_accessp_iterator_dim, pdr_accessp_param_dim,
3124 pbb_nb_params): New.
3125 (pbb_nb_loops, pbb_nb_scattering, scop_nb_params,
3126 nb_loops_around_pbb): Adapt return types.
3128 2009-03-09 Tobias Grosser <grosser@fim.uni-passau.de>
3130 * Makefile.in (graphite.o, graphite-sese-to-poly.o,
3131 graphite-clast-to-gimple.o, graphite-data-ref.o,
3132 graphite-scop-detection.o, graphite-poly.o): Add
3135 2009-03-05 Tobias Grosser <grosser@fim.uni-passau.de>
3137 * Makefile.in (graphite.o, graphite-sese-to-poly.o,
3138 graphite-clast-to-gimple.o, graphite-data-ref.o,
3139 graphite-scop-detection.o, graphite-poly.o): Add graphite-poly.h.
3141 2009-03-04 Tobias Grosser <grosser@fim.uni-passau.de>
3143 * testsuite/gcc.dg/graphite/pr37485.c: Remove -floop-block
3144 * testsuite/gcc.dg/graphite/pr37828.c: Same.
3145 * testsuite/gcc.dg/graphite/pr37684.c: Same.
3146 * testsuite/gcc.dg/graphite/block-0.c: Same.
3147 * testsuite/gcc.dg/graphite/block-1.c: Same.
3148 * testsuite/gcc.dg/graphite/block-2.c: Same.
3149 * testsuite/gcc.dg/graphite/block-3.c: Same.
3150 * testsuite/gcc.dg/graphite/block-4.c: Same.
3151 * testsuite/gcc.dg/graphite/block-5.c: Same.
3152 * testsuite/gcc.dg/graphite/block-6.c: Same.
3153 * testsuite/gfortran.dg/graphite/pr38083.f90: Same.
3154 * testsuite/gfortran.dg/graphite/block-1.f90: Same.
3155 * testsuite/gfortran.dg/graphite/block-3.f90: Same.
3156 * testsuite/gfortran.dg/graphite/pr37852.f90: Same.
3157 * testsuite/gfortran.dg/graphite/block-4.f90: Same.
3158 * testsuite/gfortran.dg/graphite/pr37980.f90: Same.
3159 * testsuite/gfortran.dg/graphite/pr38953.f90: Same.
3160 * testsuite/gfortran.dg/graphite/pr37857.f90: Same.
3161 * opts.c: Remove -floop-block from -O2.
3162 * graphite-poly.c: Fail if -floop-block -floop-interchange or
3163 -floop-strip-mine are used.
3165 2009-03-04 Tobias Grosser <grosser@fim.uni-passau.de>
3166 Sebastian Pop <sebastian.pop@amd.com>
3168 * graphite-clast-to-gimple.c (build_cloog_prog): Unify scattering
3170 * graphite-poly.c (pbb_compare, graphite_sort_pbbs,
3171 graphite_trans_bb_move_loop, graphite_trans_bb_strip_mine,
3172 strip_mine_profitable_p, is_interchange_valid,
3173 graphite_trans_bb_block, graphite_trans_loop_block,
3174 graphite_trans_scop_block): Temporary removed.
3175 (extend_scattering, unify_scattering_dimensions): New.
3176 (print_scattering_function, graphite_read_transforms):
3177 PBB_SCATTERING -> PBB_TRANSFORMED_SCATTERING.
3178 (graphite_generate_scattering_fns): Removed.
3179 (apply_poly_transforms): Cleanup.
3180 (free_poly_bb): Add PBB_SCATTERING -> PBB_TRANSFORMED_SCATTERING.
3181 (schedule_to_scattering): Moved.
3182 (PBB_STATIC_SCHEDULE, PBB_SCATTERING): Removed.
3183 (PBB_ORIGINAL_SCATTERING, PBB_TRANSFORMED_SCATTERING): New.
3184 (pbb_nb_scattering): New.
3185 (SCOP_ENTRY, SCOP_EXIT, SCOP_REGION_BBS, SCOP_DEP_GRAPH, SCOP_PARAMS,
3186 SCOP_LOOP_NEST, SCOP_PARAMS, SCOP_OLDIVS, SCOP_LIVEOUT_RENAMES):
3188 * graphite-ppl.c (ppl_insert_dimensions): Extended and renamed from
3190 (ppl_strip_loop): PBB_SCATTERING -> PBB_TRANSFORMED_SCATTERING.
3191 * graphite-scop-detection.c (dot_all_scops_1): PBB_SCATTERING
3192 -> PBB_TRANSFORMED_SCATTERING.
3193 * graphite-sese-to-poly.c (build_scop_bbs): Remove region.
3194 (build_pbb_scattering_polyhedron): Moved from schedule_to_scattering.
3195 (build_scop_scattering): Renamed from build_scop_canonical_schedules.
3196 (check_poly_representation): Do not return bool.
3197 (graphite_transform_loops): Reformat.
3198 * sese.h (SESE_ENTRY_BB, SESE_EXIT_BB): New.
3200 2009-03-04 Sebastian Pop <sebastian.pop@amd.com>
3202 * graphite-poly.c (print_pbb_domain, print_pbb, print_scop,
3203 debug_pbb_domain, debug_pbb, debug_scop): New.
3204 * graphite-poly.h (print_pbb_domain, print_pbb, print_scop,
3205 debug_pbb_domain, debug_pbb, debug_scop): Declared.
3207 2009-03-02 Sebastian Pop <sebastian.pop@amd.com>
3210 * tree-parloops.c (canonicalize_loop_ivs): Call fold_convert
3211 when the type precision of the induction variable should be
3212 larger than the type precision of nit.
3213 (gen_parallel_loop): Update use of canonicalize_loop_ivs.
3214 * graphite-clast-to-gimple.c (graphite_loop_normal_form): Same.
3215 * tree-flow.h (canonicalize_loop_ivs): Update declaration.
3217 * testsuite/gcc.dg/graphite/pr39335_1.c: New.
3218 * testsuite/gcc.dg/graphite/pr39335.c: New.
3220 2009-03-02 Sebastian Pop <sebastian.pop@amd.com>
3222 * tree-parloops.c (canonicalize_loop_ivs): reduction_list contains
3223 SSA_NAMES not struct reduction_info.
3225 2009-03-02 Sebastian Pop <sebastian.pop@amd.com>
3227 * sese.c (expand_scalar_variables_expr): Handle ADDR_EXPR.
3229 2009-02-27 Sebastian Pop <sebastian.pop@amd.com>
3230 Tobias Grosser <grosser@fim.uni-passau.de>
3232 * sese.c (new_sese): Initialize SESE_REDUCTION_LIST.
3233 (free_sese): Free SESE_REDUCTION_LIST.
3234 * sese.h (struct sese): Add field reduction_list.
3235 (SESE_REDUCTION_LIST): New.
3236 * graphite-clast-to-gimple.c (graphite_loop_normal_form): Call
3237 canonicalize_loop_ivs on SESE_REDUCTION_LIST.
3239 2009-02-27 Sebastian Pop <sebastian.pop@amd.com>
3240 Tobias Grosser <grosser@fim.uni-passau.de>
3242 * tree-flow.h (gather_scalar_reductions): Use struct loop * instead
3245 2009-02-27 Sebastian Pop <sebastian.pop@amd.com>
3246 Tobias Grosser <grosser@fim.uni-passau.de>
3248 * tree-parloops.c (struct brli, build_reduction_list_info,
3249 analyze_reduction_list, gather_scalar_reductions): New.
3250 (loop_parallel_p): Build a reduction list containing only
3251 PHI_RESULT SSA_NAMEs: call gather_scalar_reductions.
3252 (gen_parallel_loop): Call the analysis analyze_reduction_list.
3253 (parallelize_loops): Now reduction_list is a htab_t of SSA_NAMEs.
3254 * tree-flow.h (gather_scalar_reductions): Declared.
3256 2009-02-26 Sebastian Pop <sebastian.pop@amd.com>
3259 * graphite-clast-to-gimple.c (graphite_loop_normal_form): Do not call
3260 number_of_iterations_exit from a gcc_assert.
3262 2009-02-25 Sebastian Pop <sebastian.pop@amd.com>
3263 Jan Sjodin <jan.sjodin@amd.com>
3265 * output.h (graphite_out_file, graphite_in_file): Declared.
3266 * toplev.c (graphite_out_file, graphite_in_file): New.
3267 (init_asm_output): Initialize graphite_in_file and graphite_out_file.
3268 * graphite-clast-to-gimple.c (build_cloog_prog): Read PBB_SCATTERING.
3269 Don't call schedule_to_scattering.
3270 * common.opt (fgraphite-write, fgraphite-read): New.
3271 * graphite-poly.c: Include output.h.
3272 (print_scattering_function, print_scattering_functions,
3273 debug_scattering_function, debug_scattering_functions,
3274 graphite_write_transforms, graphite_read_transforms,
3275 graphite_generate_scattering_fns): New.
3276 (apply_poly_transforms): Do not apply transform if flag_graphite_read.
3277 Call graphite_generate_scattering_fns, graphite_write_transforms,
3278 graphite_read_transforms.
3279 (new_poly_bb): Initialize PBB_SCATTERING.
3280 (free_poly_bb): Free PBB_SCATTERING.
3281 (schedule_to_scattering): Does not return, initialize PBB_SCATTERING.
3282 * graphite-poly.h (struct poly_bb): Add field scattering.
3283 (PBB_SCATTERING): New.
3284 (print_scattering_function, print_scattering_functions,
3285 debug_scattering_function, debug_scattering_functions): Declared.
3286 * graphite-ppl.c (cloog_matrix_to_ppl_constraint): Matrices contain
3287 GMP values, not integers!
3288 (ppl_print_polyhedron_matrix, debug_ppl_polyhedron_matrix,
3289 ppl_read_polyhedron_matrix): New.
3290 * graphite-ppl.h (ppl_print_polyhedron_matrix,
3291 debug_ppl_polyhedron_matrix,
3292 ppl_read_polyhedron_matrix): Declared.
3293 * Makefile.in (graphite-poly.o): Depends on output.h.
3295 2009-02-23 Sebastian Pop <sebastian.pop@amd.com>
3296 Tobias Grosser <grosser@fim.uni-passau.de>
3299 * graphite-scop-detection.c (stmt_simple_for_scop_p): Analyze
3300 scalar evolutions in the scop_entry->loop_father.
3302 2009-02-23 Sebastian Pop <sebastian.pop@amd.com>
3303 Tobias Grosser <grosser@fim.uni-passau.de>
3305 * graphite.h (ref_nb_loops): Remove declaration.
3306 (struct gimple_bb, gimple_bb_p, GBB_BB, GBB_DATA_REFS, GBB_CONDITIONS,
3307 GBB_CONDITION_CASES, GBB_CLOOG_IV_TYPES, gbb_loop, print_gimple_bb,
3308 debug_gbb): Moved to sese.h.
3311 2009-02-23 Sebastian Pop <sebastian.pop@amd.com>
3312 Tobias Grosser <grosser@fim.uni-passau.de>
3314 * graphite-data-ref.[ch]: Disable.
3316 2009-02-23 Sebastian Pop <sebastian.pop@amd.com>
3317 Tobias Grosser <grosser@fim.uni-passau.de>
3319 * graphite-scop-detection.c (stmt_simple_for_scop_p): Analyze
3320 scalar evolutions in the scop_entry->loop_father.
3322 2009-02-23 Sebastian Pop <sebastian.pop@amd.com>
3324 * graphite-scop-detection.c (nb_reductions_in_loop): Moved here...
3325 (graphite_cannot_represent_loop_niter): Renamed
3326 graphite_cannot_represent_loop. Call nb_reductions_in_loop.
3327 (limit_scops): build_sese_loop_nests does not return a bool.
3328 * graphite-scop-detection.h (nb_reductions_in_loop): Declared.
3329 * sese.c (nb_reductions_in_loop): ... from here.
3330 (graphite_loop_normal_form): ... from here.
3331 (sese_record_loop): Does not fail, so does not return a bool.
3332 (build_sese_loop_nests): Same.
3333 * sese.h (build_sese_loop_nests): Update declaration.
3334 * graphite-clast-to-gimple.c (graphite_loop_normal_form): Moved here...
3335 (build_graphite_loop_normal_form): New.
3336 (gloog): Call build_graphite_loop_normal_form.
3337 * graphite-sese-to-poly.c (build_poly_scop): Don't fail on
3338 build_sese_loop_nests.
3340 * testsuite/gcc.dg/graphite/id-1.c: New.
3342 2009-02-23 Sebastian Pop <sebastian.pop@amd.com>
3343 Tobias Grosser <grosser@fim.uni-passau.de>
3345 * graphite-sese-to-poly.c (scan_tree_for_params): Remove REAL_CST.
3346 The SCoP detection fix is sufficient.
3348 2009-02-21 Sebastian Pop <sebastian.pop@amd.com>
3350 PR tree-optimization/39260
3351 * graphite-scop-detection.c (harmful_stmt_in_bb): Stop a SCoP when
3352 the basic block contains a condition with a real type.
3353 * graphite-sese-to-poly.c (scan_tree_for_params): Handle REAL_CST.
3355 * gcc.dg/graphite/pr39260.c: New.
3357 2009-02-21 Sebastian Pop <sebastian.pop@amd.com>
3359 * graphite-poly.c: Inlcude params.h.
3360 (graphite_trans_loop_block): Use PARAM_LOOP_BLOCK_TILE_SIZE for
3362 * Makefile.in (graphite-poly.o): Depend on PARAMS_H.
3363 * params.def (PARAM_LOOP_BLOCK_TILE_SIZE): Define.
3365 2009-02-20 Sebastian Pop <sebastian.pop@amd.com>
3366 Tobias Grosser <grosser@fim.uni-passau.de>
3368 * graphite-scop-detection.c (dot_all_scops_1,
3369 dot_all_scops): Moved here.
3370 * graphite-scop-detection.h (dot_all_scops): Declared here.
3371 * graphite.c (graphite_initialize, graphite_finalize): New.
3372 (graphite_transform_loops): Cleaned up.
3373 * sese.c (debug_oldivs): Moved here.
3374 * graphite-poly.c (graphite_apply_transformations): Renamed
3375 apply_poly_transforms.
3376 (debug_loop_vec): Moved here.
3377 * graphite-sese-to-poly.c (build_bb_loops, build_sese_conditions_1,
3378 scop_contains_non_iv_scalar_phi_nodes, build_sese_conditions,
3379 find_scop_parameters, build_scop_iteration_domain,
3380 add_conditions_to_constraints, build_scop_canonical_schedules,
3381 build_scop_data_accesses): Now static.
3382 (build_poly_scop, check_poly_representation): New.
3384 2009-02-20 Sebastian Pop <sebastian.pop@amd.com>
3386 * graphite.c (graphite_stmt_p, new_gimple_bb, free_gimple_bb,
3387 remove_gbbs_in_scop, free_scops, try_generate_gimple_bb,
3388 build_scop_bbs, ref_nb_loops, compare_prefix_loops,
3389 build_scop_canonical_schedules, build_bb_loops, add_value_to_dim,
3390 scan_tree_for_params_right_scev, scan_tree_for_params_int,
3391 scan_tree_for_params, struct irp_data, dx_record_params,
3392 find_params_in_bb, find_scop_parameters, gbb_from_bb,
3393 build_loop_iteration_domains, add_conditions_to_domain,
3394 phi_node_is_iv, bb_contains_non_iv_scalar_phi_nodes,
3395 scop_contains_non_iv_scalar_phi_nodes, build_sese_conditions_1,
3396 build_sese_conditions, add_conditions_to_constraints,
3397 build_scop_iteration_domain, build_access_matrix_with_af,
3398 build_access_matrix,
3399 build_scop_data_accesses): Moved to graphite-sese-to-poly.c.
3401 * graphite-sese-to-poly.c: New.
3402 * graphite-sese-to-poly.h: New.
3404 * Makefile.in: Add new rule for graphite-sese-to-poly.o.
3406 2009-02-20 Sebastian Pop <sebastian.pop@amd.com>
3408 * graphite.c: Split graphite code generation to a new file.
3409 (graphite_verify, gmp_cst_to_tree, clast_name_to_gcc,
3410 max_precision_type, clast_to_gcc_expression_red,
3411 clast_to_gcc_expression, gcc_type_for_clast_expr,
3412 gcc_type_for_clast_eq, loop_iv_stack_patch_for_consts,
3413 graphite_translate_clast_equation, graphite_create_guard_cond_expr,
3414 graphite_create_new_guard, clast_get_body_of_loop,
3415 gcc_type_for_cloog_iv, gcc_type_for_iv_of_clast_loop,
3416 graphite_create_new_loop, build_iv_mapping, copy_renames,
3417 translate_clast, find_cloog_iv_in_expr, compute_cloog_iv_types_1,
3418 compute_cloog_iv_types, free_scattering, save_var_name,
3419 initialize_cloog_names, build_scop_context, build_cloog_prog,
3420 set_cloog_options, debug_clast_stmt, scop_to_clast,
3421 print_generated_program, debug_generated_program,
3422 gloog): Moved to graphite-clast-to-gimple.c.
3424 (struct cloog_prog_clast): Moved to graphite-clast-to-gimple.h.
3426 (iv_stack_entry_is_constant, iv_stack_entry_is_iv,
3427 loop_iv_stack_push_iv, loop_iv_stack_insert_constant,
3428 loop_iv_stack_pop, loop_iv_stack_get_iv,
3429 loop_iv_stack_get_iv_from_name, debug_loop_iv_stack,
3430 free_loop_iv_stack, loop_iv_stack_remove_constants,
3431 debug_rename_elt, debug_rename_map_1, debug_rename_map,
3432 rename_map_elt_info, eq_rename_map_elts, debug_ivtype_elt,
3433 debug_ivtype_map_1, debug_ivtype_map, ivtype_map_elt_info,
3434 eq_ivtype_map_elts, sese_add_exit_phis_edge,
3435 sese_add_exit_phis_var, sese_insert_phis_for_liveouts,
3436 get_vdef_before_sese, sese_adjust_vphi,
3437 get_new_name_from_old_name, sese_adjust_phis_for_liveouts,
3438 oldiv_for_loop, rename_variables_in_stmt, is_parameter,
3439 is_iv, expand_scalar_variables_ssa_name,
3440 expand_scalar_variables_expr, expand_scalar_variables_stmt,
3441 expand_scalar_variables, rename_variables, remove_condition,
3442 get_true_edge_from_guard_bb, get_false_edge_from_guard_bb,
3443 add_loop_exit_phis, insert_loop_close_phis, struct igp,
3444 default_liveout_before_guard, add_guard_exit_phis,
3445 insert_guard_phis, register_old_and_new_names,
3446 graphite_copy_stmts_from_block, register_sese_liveout_renames,
3447 copy_bb_and_scalar_dependences, outermost_loop_in_sese,
3448 if_region_set_false_region, create_if_region_on_edge,
3449 move_sese_in_condition): Moved to sese.c.
3451 (nb_loops_around_loop_in_sese, struct ifsese, if_region_entry,
3452 if_region_exit, if_region_get_condition_block,
3453 struct rename_map_elt, new_rename_map_elt, enum iv_stack_entry_kind,
3454 union iv_stack_entry_data_union, struct iv_stack_entry_struct,
3455 iv_stack_entry_p, loop_iv_stack, struct ivtype_map_elt,
3456 ivtype_map_elt, new_ivtype_map_elt,
3457 recompute_all_dominators): Moved to sese.h.
3459 * graphite-clast-to-gimple.c: New.
3460 * graphite-clast-to-gimple.h: New.
3461 * Makefile.in: Add new rule for graphite-clast-to-gimple.o.
3462 * sese.c: Modified as said above.
3465 2009-02-20 Sebastian Pop <sebastian.pop@amd.com>
3467 * graphite.c: Split scop detection to a new file.
3468 (enum gbb_type, gbb_type, get_bb_type, struct sd_region_p, sd_region,
3469 move_sd_regions, loop_affine_expr, exclude_component_ref,
3470 is_simple_operand, stmt_simple_for_scop_p, harmful_stmt_in_bb,
3471 graphite_cannot_represent_loop_niter, struct scopdet_info,
3472 scopdet_basic_block_info, build_scops_1, bb_in_sd_region,
3473 find_single_entry_edge, find_single_exit_edge,
3474 create_single_entry_edge, sd_region_without_exit,
3475 create_single_exit_edge, unmark_exit_edges, mark_exit_edges,
3476 create_sese_edges, build_graphite_scops, limit_scops, build_scops):
3477 Moved to graphite-scop-detection.c.
3479 * graphite-scop-detection.c: New.
3480 * graphite-scop-detection.h: New.
3481 * Makefile.in: Add new rule for graphite-scop-detection.o.
3483 * sese.c: Include tree-chrec.h, tree-data-ref.h, and
3484 tree-scalar-evolution.h.
3485 (nb_reductions_in_loop, graphite_loop_normal_form, sese_record_loop,
3486 build_sese_loop_nests): Moved here from graphite.c.
3487 (param_index): Renamed parameter_index_in_region.
3489 2009-02-18 Tobias Grosser <grosser@fim.uni-passau.de>
3490 Sebastian Pop <sebastian.pop@amd.com>
3492 * gcc.dg/graphite/block-0.c: Expected to fail now.
3493 * gcc.dg/graphite/block-1.c: Same.
3494 * gcc.dg/graphite/block-5.c: Same.
3495 * gcc.dg/graphite/block-6.c: Same.
3497 2009-02-18 Tobias Grosser <grosser@fim.uni-passau.de>
3498 Sebastian Pop <sebastian.pop@amd.com>
3500 * graphite.h: Separate from graphite_bb_p the polyhedral
3501 representation in poly_bb_p and the GCC specifics in gimple_bb_p.
3502 (struct data_dependence_polyhedron, RDGE_DDP, ddp_p): Moved to
3503 graphite-data-ref.h.
3504 (struct poly_bb, PBB_SCOP, PBB_STATIC_SCHEDULE, PBB_DOMAIN,
3505 PBB_BLACK_BOX, PBB_LOOPS, pbb_nb_loops, pbb_loop_at_index,
3506 pbb_loop_index, struct scop, SCOP_BBS, SCOP_REGION, SCOP_ENTRY,
3507 SCOP_EXIT, SCOP_REGION_BBS, SCOP_DEP_GRAPH, SCOP_PARAMS,
3508 SCOP_LOOP_NEST, SCOP_PARAMS, SCOP_OLDIVS, SCOP_LIVEOUT_RENAMES,
3509 scop_nb_params): Moved to graphite-poly.h.
3510 * graphite-data-ref.c: Same.
3511 * graphite-data-ref.h: New.
3513 (pbb_compare, graphite_sort_pbbs, graphite_trans_bb_move_loop,
3514 graphite_trans_bb_strip_mine, strip_mine_profitable_p,
3515 is_interchange_valid, graphite_trans_bb_block,
3516 graphite_trans_loop_block, scop_max_loop_depth,
3517 graphite_trans_scop_block, graphite_apply_transformations,
3518 new_poly_bb, free_poly_bb, new_scop, free_scop): Moved to
3520 * graphite-poly.h: New.
3521 * graphite-poly.c: New.
3522 * Makefile.in (OBJS-common): Add graphite-poly.o.
3523 (graphite-poly.o): New rule.
3524 * tree-data-ref.h (struct data_reference): Remove unused scop field.
3527 2009-02-18 Sebastian Pop <sebastian.pop@amd.com>
3528 Tobias Grosser <grosser@fim.uni-passau.de>
3530 * graphite.c: Replace gb -> gbb.
3532 * graphite-data-ref.c: Same.
3534 2009-02-18 Sebastian Pop <sebastian.pop@amd.com>
3535 Tobias Grosser <grosser@fim.uni-passau.de>
3537 * Makefile.in (OBJS-commmon): Add sese.o.
3539 (graphite.o): Add sese.h.
3540 * graphite.c (bb_in_ss_p, loop_in_sese_p,
3541 sese_build_livein_liveouts_use, sese_build_livein_liveouts_bb,
3542 sese_build_livein_liveouts, register_bb_in_sese, new_sese, free_sese):
3544 (block_before_scop): Add missing return.
3545 (new_scop, free_scop): Remove SESE data structures.
3546 (scop_record_loop, scan_tree_for_params, find_params_in_bb,
3547 find_scop_parameters, build_loop_iteration_domains,
3548 add_conditions_to_domain, register_scop_liveout_renames,
3549 copy_bb_and_scalar_dependences): Scop -> SESE.
3551 (add_conditions_to_domain): SCoP -> SESE and remove check
3552 (scop_contains_non_iv_scalar_phi_nodes): New.
3553 (build_scop_conditions_1, build_scop_conditions): Remove check for
3554 non iv scalar phi nodes.
3555 (print_scop_statistics): New.
3556 (graphite_transform_loops): Cleanup.
3558 * graphite.h: Move to sese & cleanup.
3562 2009-02-16 Sebastian Pop <sebastian.pop@amd.com>
3563 Tobias Grosser <grosser@fim.uni-passau.de>
3565 * graphite.c (build_scop_conditions_1): Conditions are only
3566 at the end of a basic block.
3568 2009-02-16 Sebastian Pop <sebastian.pop@amd.com>
3569 Tobias Grosser <grosser@fim.uni-passau>
3571 * graphite.h (struct graphite_bb): Remove compressed_alpha_matrix
3573 (GBB_ALPHA): Removed.
3575 2009-02-16 Sebastian Pop <sebastian.pop@amd.com>
3576 Tobias Grosser <grosser@fim.uni-passau.de>
3578 * graphite-data-ref.c (graphite_test_dependence): Don't use
3579 GBB_DYNAMIC_SCHEDULE.
3580 * graphite.c (new_graphite_bb): Same.
3581 (free_graphite_bb): Same.
3582 (build_scop_dynamic_schedules): Removed.
3583 (graphite_transform_loops): Don't call it.
3584 * graphite.h (struct graphite_bb): Remove dynamic_schedule field.
3585 (GBB_DYNAMIC_SCHEDULE): Removed.
3587 2009-02-16 Sebastian Pop <sebastian.pop@amd.com>
3588 Tobias Grosser <grosser@fim.uni-passau.de>
3590 * graphite.c (schedule_to_scattering): Don't use CloogMatrix.
3591 (print_graphite_bb): Same.
3592 (build_cloog_prog): Same.
3594 2009-02-16 Sebastian Pop <sebastian.pop@amd.com>
3595 Tobias Grosser <grosser@fim.uni-passau.de>
3597 * graphite.c (build_cloog_prog): Don't use CloogMatrix.
3599 2009-02-16 Sebastian Pop <sebastian.pop@amd.com>
3600 Tobias Grosser <grosser@fim.uni-passau.de>
3602 * graphite.c (build_scop_context): Don't use CloogMatrix.
3603 * graphite-ppl.c (new_Cloog_Domain_from_ppl_Polyhedron): New.
3604 * graphite-ppl.h (new_Cloog_Domain_from_ppl_Polyhedron): Declared.
3606 2009-02-16 Sebastian Pop <sebastian.pop@amd.com>
3607 Tobias Grosser <grosser@fim.uni-passau.de>
3609 * graphite.h (struct scop): Move params, old_ivs, loops, loop_nest,
3610 liveout_renames, add_params fields...
3611 (struct sese): ... here.
3612 (SESE_PARAMS, SESE_LOOPS, SESE_LOOP_NEST, SESE_ADD_PARAMS,
3613 SESE_PARAMS, SESE_OLDIVS, SESE_LIVEOUT_RENAMES): New.
3615 2009-02-16 Sebastian Pop <sebastian.pop@amd.com>
3616 Tobias Grosser <grosser@fim.uni-passau.de>
3618 * graphite.c (print_scop): Do not print the CLooG program.
3619 (new_scop, free_scop, initialize_cloog_names, build_scop_context,
3620 build_cloog_prog, gloog): Don't use SCOP_PROG.
3621 (find_transform): Renamed scop_to_clast.
3622 (print_generated_program, debug_generated_program): New.
3623 (graphite_transform_loops): Adapt to new interface.
3624 * graphite.h (struct scop): Remove program field.
3625 (SCOP_PROG): Removed.
3626 (print_generated_program, debug_generated_program): Declared.
3628 2009-02-16 Sebastian Pop <sebastian.pop@amd.com>
3630 * graphite-data-ref.c (schedule_precedes_p, schedule_same_p): New.
3631 (statement_precedes_p): Use schedule_same_p and schedule_precedes_p.
3632 * graphite.c (gbb_compare, schedule_to_scattering, print_graphite_bb,
3633 free_graphite_bb, build_scop_canonical_schedules,
3634 graphite_trans_bb_strip_mine, graphite_trans_scop_block): Static
3635 schedules are now represented using a ppl_Linear_Expression_t.
3636 * graphite.h (struct graphite_bb): Same.
3637 * graphite-ppl.c (ppl_lexico_compare_linear_expressions): New.
3638 * graphite-ppl.h (ppl_lexico_compare_linear_expressions): Declared.
3640 2009-02-15 Sebastian Pop <sebastian.pop@amd.com>
3642 * graphite.c: Free local memory.
3643 * graphite-ppl.c: Same.
3645 2009-02-15 Sebastian Pop <sebastian.pop@amd.com>
3647 * graphite.c (const_column_index, get_first_matching_sign_row_index,
3648 get_lower_bound_row, get_upper_bound_row, copy_constraint,
3649 swap_constraint_variables, scale_constraint_variable): Removed.
3650 (graphite_trans_bb_strip_mine): Remove pong.
3651 * graphite-ppl.c: Include missing header files.
3652 (set_inhomogeneous, set_coef, shift_poly, ppl_strip_loop): New.
3653 * graphite-ppl.h (ppl_strip_loop): Declared.
3654 * Makefile.in (graphite-ppl.o): Adjust dependences.
3656 2009-02-14 Sebastian Pop <sebastian.pop@amd.com>
3658 * graphite.c (build_loop_iteration_domains): Remove ping pong.
3659 (build_scop_iteration_domain): Same.
3661 2009-02-13 Sebastian Pop <sebastian.pop@amd.com>
3663 * graphite.c (scan_tree_for_params, add_conditions_to_domain): Remove
3665 (add_value_to_dim, scan_tree_for_params_right_scev,
3666 scan_tree_for_params_int): New.
3667 * graphite-ppl.c (oppose_constraint): New.
3668 (insert_constraint_into_matrix): Implement missing cases.
3669 * graphite-ppl.h (insert_constraint_into_matrix): Declared.
3671 2009-02-13 Sebastian Pop <sebastian.pop@amd.com>
3673 * graphite.c (graphite_trans_bb_move_loop): Remove ping pong,
3674 use ppl_move_dimension.
3676 2009-02-12 Sebastian Pop <sebastian.pop@amd.com>
3678 * graphite-data-ref.c: Domains are now ppl_Polyhedra_t.
3681 * graphite-ppl.c: Same.
3682 * graphite-ppl.h: Same.
3684 2009-02-12 Sebastian Pop <sebastian.pop@amd.com>
3686 Revert last 3 commits.
3688 2009-02-10 Sebastian Pop <sebastian.pop@amd.com>
3690 * graphite.c (scan_tree_for_params, add_conditions_to_domain): Remove
3692 (add_value_to_dim, scan_tree_for_params_right_scev,
3693 scan_tree_for_params_int): New.
3694 * graphite-ppl.c (oppose_constraint): New.
3695 (insert_constraint_into_matrix): Implement missing cases.
3696 * graphite-ppl.h (insert_constraint_into_matrix): Declared.
3698 2009-02-10 Sebastian Pop <sebastian.pop@amd.com>
3700 * graphite.c (graphite_trans_bb_move_loop): Remove unused variables.
3702 2009-02-10 Sebastian Pop <sebastian.pop@amd.com>
3703 Tobias Grosser <grosser@fim.uni-passau.de>
3705 * graphite.c (graphite_trans_bb_move_loop): Remove ping pong,
3706 use ppl_move_dimension.
3707 * graphite-ppl.c (ppl_move_dimension): New.
3708 * graphite-ppl.h (ppl_move_dimension): Declared.
3710 2009-02-10 Sebastian Pop <sebastian.pop@amd.com>
3712 * graphite.c: Do not include cloog/cloog.h.
3713 (print_graphite_bb): Remove ping pong, call PPL print function.
3715 2009-02-10 Tobias Grosser <grosser@fim.uni-passau.de>
3717 * Makefile.in (OBJS-common): Add graphite-ppl.o.
3718 (graphite.o): Add dependence on graphite-ppl.h.
3719 (graphite-ppl.o): New.
3720 (graphite-data-ref.c): Ping pong between PPL data structures
3722 * graphite-ppl.c: New.
3723 * graphite-ppl.h: New.
3724 * graphite.c: Include graphite-ppl.h.
3725 (print_graphite_bb, add_conditions_to_domain, build_cloog_prog,
3726 graphite_trans_bb_move_loop, graphite_trans_bb_strip_mine):
3727 Ping pong between PPL data structures and matrices.
3728 (new_graphite_bb): Create a PPL constraint system.
3729 Call ppl_delete_Constraint_System instead of cloog_matrix_free.
3730 (build_loop_iteration_domains): Use PPL functions.
3731 * graphite.h: Include graphite-ppl.h. Fix comments.
3732 (graphite_bb): Use a ppl_Constraint_System_t instead of
3733 CloogMatrix for representing the domain.
3734 (scop): Remove static_schedule.
3735 (gbb_nb_loops): Ping pong between PPL data structures and matrices.
3737 2009-02-06 Sebastian Pop <sebastian.pop@amd.com>
3739 * graphite.c: Fix some comments.
3741 2009-02-05 Sebastian Pop <sebastian.pop@amd.com>
3744 * graphite.c (if_region_set_false_region): After moving a region
3745 in the false branch of a condition, remove the empty dummy
3747 (gloog): Remove wrong fix for PR38953.
3749 2009-02-03 Tobias Grosser <grosser@fim.uni-passau.de>
3751 * graphite.c (bb_in_sese_p, sese_build_livein_liveouts_use,
3752 sese_build_livein_liveouts_bb, sese_build_livein_liveouts,
3753 register_bb_in_sese, new_sese, free_sese): Moved.
3754 (dot_scop_1, build_scop_loop_nests, build_loop_iteration_domains,
3755 outermost_loop_in_scop, build_scop_iteration_domain,
3756 expand_scalar_variables_ssa_name, get_vdef_before_scop,
3757 limit_scops): Use bb_in_sese_p instead of bb_in_scop_p.
3758 Use loop_in_sese_p instead of loop_in_scop_p.
3759 (new_graphite_bb, new_scop, gloog): Do not initialize SCOP_BBS_B.
3760 (free_scop): Do not free SCOP_BBS_B.
3761 (nb_loops_around_loop_in_scop, nb_loops_around_gb,
3762 ref_nb_loops): Moved here...
3763 * graphite.h (ref_nb_loops): ... from here.
3764 (struct scop): Remove bbs_b bitmap.
3765 (SCOP_BBS_B, bb_in_scop_p, loop_in_scop_p): Removed.
3766 * testsuite/gcc.dg/graphite/scop-19.c: New
3768 2009-02-03 Tobias Grosser <grosser@fim.uni-passau.de>
3770 * graphite.c (scopdet_basic_block_info): Fix bug in scop
3773 2009-01-30 Tobias Grosser <grosser@fim.uni-passau.de>
3775 * graphite.c (new_loop_to_cloog_loop_str, hash_loop_to_cloog_loop,
3776 eq_loop_to_cloog_loop): Remove.
3777 (new_scop, free_scop): Remove SCOP_LOOP2CLOOG_LOOP.
3778 * graphite.h (struct scop): Remove loop2cloog_loop.
3779 (loop_domain_dim, loop_iteration_vector_dim): Remove.
3781 2009-01-30 Tobias Grosser <grosser@fim.uni-passau.de>
3783 * opts.c (decode_options): Only add graphite options to O2
3784 if we compile with graphite enabled.
3786 2009-01-26 Sebastian Pop <sebastian.pop@amd.com>
3788 * Merge from mainline (r143163:143684).
3790 2009-01-26 Sebastian Pop <sebastian.pop@amd.com>
3792 * graphite.c (debug_value): Removed.
3793 * graphite.h (debug_value): Removed.
3795 2009-01-23 Sebastian Pop <sebastian.pop@amd.com>
3797 * passes.c (init_optimization_passes): Do not call pass_copy_prop
3798 after graphite: pass_copy_prop does not maintain a proper loop closed
3799 SSA form. pass_copy_prop should be fixed.
3801 2009-01-23 Sebastian Pop <sebastian.pop@amd.com>
3803 * graphite.c (scop_adjust_phis_for_liveouts): Fix warning.
3805 2009-01-23 Sebastian Pop <sebastian.pop@amd.com>
3807 * graphite.c (graphite_verify): Add a call to verify_loop_closed_ssa.
3808 (gloog): Split the exit of the scop when the scop exit is a loop exit.
3809 (graphite_transform_loops): Only call cleanup_tree_cfg if gloog
3812 2009-01-20 Sebastian Pop <sebastian.pop@amd.com>
3814 * graphite.c (gloog): Return true when code gen succeeded.
3815 (graphite_transform_loops): Do not call cleanup_tree_cfg if
3816 the code of the function did not changed. After cleanup_tree_cfg
3817 call rewrite_into_loop_closed_ssa to maintain the loop closed ssa
3820 2009-01-19 Sebastian Pop <sebastian.pop@amd.com>
3822 * graphite.c (stmt_simple_for_scop_p): Also handle cases when
3823 gimple_call_lhs is NULL.
3825 2009-01-16 Sebastian Pop <sebastian.pop@amd.com>
3826 Tobias Grosser <tobi.grosser@amd.com>
3828 * graphite.c (graphite_trans_scop_block): Do not block single
3831 2009-01-15 Sebastian Pop <sebastian.pop@amd.com>
3832 Tobias Grosser <tobi.grosser@amd.com>
3834 * graphite.c (build_scop_canonical_schedules): Start schedules at
3837 2009-01-15 Sebastian Pop <sebastian.pop@amd.com>
3838 Tobias Grosser <tobi.grosser@amd.com>
3840 * graphite.c (compare_prefix_loops): New.
3841 (build_scop_canonical_schedules): Rewritten.
3842 (graphite_transform_loops): Move build_scop_canonical_schedules
3843 after build_scop_iteration_domain.
3845 2009-01-14 Sebastian Pop <sebastian.pop@amd.com>
3846 Tobias Grosser <tobi.grosser@amd.com>
3848 * graphite.c (add_conditions_to_domain): Add the loops to
3849 the dimension of the iteration domain. Do copy the domain
3850 only when it exists.
3851 (build_scop_conditions_1): Do not call add_conditions_to_domain.
3852 (add_conditions_to_constraints): New.
3853 (can_generate_code_stmt, can_generate_code): Removed.
3854 (gloog): Do not call can_generate_code.
3855 (graphite_transform_loops): Call add_conditions_to_constraints
3856 after building the iteration domain.
3858 2009-01-14 Sebastian Pop <sebastian.pop@amd.com>
3859 Tobias Grosser <tobi.grosser@amd.com>
3860 Jan Sjodin <jan.sjodin@amd.com>
3862 * graphite.c (scan_tree_for_params): On substractions negate
3863 all the coefficients of the term.
3864 (clast_to_gcc_expression_red): New. Handle reduction expressions
3865 of more than two operands.
3866 (clast_to_gcc_expression): Call clast_to_gcc_expression_red.
3867 (get_vdef_before_scop): Handle also the case of default definitions.
3869 2009-01-14 Sebastian Pop <sebastian.pop@amd.com>
3872 * graphite.c (get_vdef_before_scop, scop_adjust_vphi): New.
3873 (scop_adjust_phis_for_liveouts): Call scop_adjust_vphi.
3874 (gloog): Do not call cleanup_tree_cfg.
3875 (graphite_transform_loops): Call cleanup_tree_cfg after all
3876 scops have been code generated.
3878 2009-01-13 Sebastian Pop <sebastian.pop@amd.com>
3880 * passes.c (init_optimization_passes): Schedule after
3881 graphite transforms pass_copy_prop, pass_dce_loop and pass_lim.
3883 2009-01-13 Sebastian Pop <sebastian.pop@amd.com>
3885 * graphite.c (expand_scalar_variables_stmt): Do not pass loop_p.
3887 (expand_scalar_variables_ssa_name): Do not pass loop_p. Fix comment.
3888 Set the type of an expression to the type of its assign statement.
3889 (expand_scalar_variables_expr): Do not pass loop_p.
3890 Fix comment. Stop recursion on tcc_constant or tcc_declaration.
3891 (copy_bb_and_scalar_dependences): Do not pass loop_p.
3892 (translate_clast): Update call to copy_bb_and_scalar_dependences.
3894 2009-01-11 Sebastian Pop <sebastian.pop@amd.com>
3896 * graphite.c (expand_scalar_variables_ssa_name): Set the type of
3897 an expression to the gimple_expr_type of its assign statement.
3898 (expand_scalar_variables_expr): Stop recursion on tcc_constant
3901 2009-01-11 Sebastian Pop <sebastian.pop@amd.com>
3903 PR tree-optimization/38786
3904 * testsuite/gcc.dg/graphite/pr38786.c: New.
3905 * graphite.c (expand_scalar_variables_ssa_name): New, outlined from
3906 the SSA_NAME case of expand_scalar_variables_expr.
3907 (expand_scalar_variables_expr): Also gather the scalar computation
3908 used to index the memory access.
3909 (expand_scalar_variables_stmt): Pass to expand_scalar_variables_expr
3910 the gimple_stmt_iterator where it inserts new code.
3912 2009-01-10 Sebastian Pop <sebastian.pop@amd.com>
3914 * testsuite/gcc.dg/graphite/block-3.c: Fix compile error on 32bit.
3916 2009-01-10 Sebastian Pop <sebastian.pop@amd.com>
3918 * opts.c (decode_options): Enable flag_graphite_identity and
3919 flag_loop_block in -O2 and above.
3921 2009-01-08 Sebastian Pop <sebastian.pop@amd.com>
3923 * libjava/classpath/lib/gnu/java/awt/peer/gtk/GtkMouseInfoPeer.class:
3924 Fix merge problem: replace with the file from trunk.
3926 2009-01-08 Sebastian Pop <sebastian.pop@amd.com>
3928 * Merge from mainline (r141727:143163).
3930 2009-01-07 Sebastian Pop <sebastian.pop@amd.com>
3931 Jan Sjodin <jan.sjodin@amd.com>
3933 PR tree-optimization/38559
3934 * testsuite/gcc.dg/graphite/pr38559.c: New.
3936 * graphite.c (debug_value, copy_constraint,
3937 swap_constraint_variables, scale_constraint_variable, ): New.
3938 (get_lower_bound, get_upper_bound): Removed.
3939 (graphite_trans_bb_strip_mine): Clean up this code that works
3940 only for constant number of iterations. Fully copy upper and
3941 lower bound constraints, not only the constant part of them.
3942 * graphite.h (debug_value): Declared.
3944 2009-01-06 Jan Sjodin <jan.sjodin@amd.com>
3946 PR tree-optimization/38492
3947 PR tree-optimization/38498
3948 * tree-check.c (operator_is_linear, scev_is_linear_expression): New.
3949 * tree-chrec.h (scev_is_linear_expression): Declared.
3950 * graphite.c (graphite_cannot_represent_loop_niter): New.
3951 (scopdet_basic_block_info): Call graphite_cannot_represent_loop_niter.
3952 (graphite_loop_normal_form): Use gcc_assert.
3953 (scan_tree_for_params): Use CASE_CONVERT.
3954 (phi_node_is_iv, bb_contains_non_iv_scalar_phi_nodes): New.
3955 (build_scop_conditions_1): Call bb_contains_non_iv_scalar_phi_nodes.
3956 Use gcc_assert. Discard scops that contain unhandled cases.
3957 (build_scop_conditions): Return a boolean status for unhandled cases.
3958 (strip_mine_profitable_p): Print the loop number, not its depth.
3959 (is_interchange_valid): Pass the depth of the loop nest, don't
3960 recompute it wrongly.
3961 (graphite_trans_bb_block): Same.
3962 (graphite_trans_bb_block): Print tentative of loop blocking.
3963 (graphite_trans_scop_block): Do not print that the loop has been
3965 (graphite_transform_loops): Do not handle scops that contain condition
3968 * testsuite/gcc.dg/graphite/pr38500.c: Fixed warning as committed
3970 * testsuite/gcc.dg/graphite/block-0.c: Update test.
3971 * testsuite/gcc.dg/graphite/block-1.c: Same.
3972 * testsuite/gcc.dg/graphite/block-2.c: Remove xfail and test for
3974 * testsuite/gcc.dg/graphite/block-4.c: Remove test for strip mine.
3975 * testsuite/gcc.dg/graphite/block-3.c: New.
3976 * testsuite/gcc.dg/graphite/pr38498.c: New.
3978 2008-12-22 Harsha Jagasia <harsha.jagasia@amd.com>
3980 PR tree-optimization/38510
3981 * gcc.dg/graphite/pr38510.c: New.
3982 * graphite.c (recompute_all_dominators): Call mark_irreducible_loops.
3983 (translate_clast): Call recompute_all_dominators before
3985 (gloog): Call recompute_all_dominators before graphite_verify.
3987 2008-12-12 Sebastian Pop <sebastian.pop@amd.com>
3989 PR tree-optimization/38492
3990 * graphite.c (rename_map_elt, debug_rename_elt,
3991 debug_rename_map_1, debug_rename_map, new_rename_map_elt,
3992 rename_map_elt_info, eq_rename_map_elts,
3993 get_new_name_from_old_name, bb_in_sese_p): Moved around.
3994 (sese_find_uses_to_rename_use): Renamed sese_build_livein_liveouts_use.
3995 (sese_find_uses_to_rename_bb): Renamed sese_build_livein_liveouts_bb.
3996 (sese_build_livein_liveouts): New.
3997 (new_sese, free_sese): New.
3998 (new_scop): Call new_sese.
3999 (free_scop): Call free_sese.
4000 (rename_variables_from_edge, rename_phis_end_scop): Removed.
4001 (register_old_new_names): Renamed register_old_and_new_names.
4002 (register_scop_liveout_renames, add_loop_exit_phis,
4003 insert_loop_close_phis, struct igp,
4004 default_liveout_before_guard, add_guard_exit_phis,
4005 insert_guard_phis, copy_renames): New.
4006 (translate_clast): Call insert_loop_close_phis and insert_guard_phis.
4007 (sese_add_exit_phis_edge): Renamed scop_add_exit_phis_edge.
4008 (rewrite_into_sese_closed_ssa): Renamed scop_insert_phis_for_liveouts.
4009 (scop_adjust_phis_for_liveouts): New.
4010 (gloog): Call scop_adjust_phis_for_liveouts.
4012 * graphite.h (struct sese): Documented. Added fields liveout,
4014 (SESE_LIVEOUT, SESE_LIVEIN, SESE_LIVEIN_VER, SESE_NUM_VER): New.
4015 (new_sese, free_sese, sese_build_livein_liveouts): Declared.
4016 (struct scop): Added field liveout_renames.
4017 (SCOP_LIVEOUT_RENAMES): New.
4019 2008-12-11 Sebastian Pop <sebastian.pop@amd.com>
4021 PR tree-optimization/38409
4022 * gcc.dg/graphite/pr38409.c: New.
4023 * graphite.c (nb_reductions_in_loop): Use simple_iv.
4025 2008-12-11 Sebastian Pop <sebastian.pop@amd.com>
4027 * graphite.c (gcc_type_for_cloog_iv): By default return
4029 (graphite_create_new_loop): Don't fold_convert the already
4030 fold_convert-ed expression.
4032 2008-12-11 Harsha Jagasia <harsha.jagasia@amd.com>
4034 PR tree-optimization/38446
4035 * gcc.dg/graphite/pr38446.c: New.
4036 * graphite.c (register_bb_in_sese): New.
4037 (bb_in_sese_p): Check if bb belongs to sese region by explicitly
4038 looking at the bbs in the region.
4039 * graphite.h (sese): Add region_basic_blocks pointer set to
4040 structure and initialize at the time of defining new scop.
4042 2008-12-11 Tobias Grosser <grosser@fim.uni-passau.de>
4044 * graphite.c (new_graphite_bb): Initialize GBB_STATIC_SCHEDULE.
4045 (find_params_in_bb): Do not free data refs.
4046 (free_graphite_bb): Add FIXME on disabled free_data_refs.
4048 2008-12-11 Sebastian Pop <sebastian.pop@amd.com>
4050 * testsuite/gcc.dg/graphite/scop-16.c: Test only scop specific info.
4051 * testsuite/gcc.dg/graphite/scop-17.c: Same.
4052 * testsuite/gcc.dg/graphite/block-5.c: New.
4053 * testsuite/gcc.dg/graphite/block-6.c: New.
4054 * testsuite/gcc.dg/graphite/pr37485.c: Clean dump file after.
4055 * testsuite/gcc.dg/graphite/pr37684.c: Same.
4056 * testsuite/gcc.dg/graphite/block-2.c: Same.
4058 * graphite.c (struct ivtype_map_elt): New.
4059 (debug_ivtype_elt, debug_ivtype_map_1, debug_ivtype_map,
4060 new_ivtype_map_elt, ivtype_map_elt_info, eq_ivtype_map_elts,
4061 gcc_type_for_cloog_iv): New.
4062 (loop_iv_stack_patch_for_consts): Use the type of the induction
4063 variable from the original loop, except for the automatically
4064 generated loops, i.e., in the case of a strip-mined loop, in
4065 which case there is no original loop: in that case just use
4067 (new_graphite_bb): Initialize GBB_CLOOG_IV_TYPES.
4068 (free_graphite_bb): Free GBB_CLOOG_IV_TYPES.
4069 (clast_name_to_gcc): Accept params to be NULL.
4070 (clast_to_gcc_expression): Take an extra parameter for the type.
4071 Convert to that type all the expressions built by this function.
4072 (gcc_type_for_clast_expr, gcc_type_for_clast_eq): New.
4073 (graphite_translate_clast_equation): Compute the type of the
4074 clast_equation before translating its LHS and RHS.
4075 (clast_get_body_of_loop, gcc_type_for_iv_of_clast_loop): New.
4076 (graphite_create_new_loop): Compute the type of the induction
4077 variable before translating the lower and upper bounds and before
4078 creating the induction variable.
4079 (rename_variables_from_edge, rename_phis_end_scop): New.
4080 (copy_bb_and_scalar_dependences): Call rename_phis_end_scop.
4081 (sese_add_exit_phis_edge): Do not use integer_zero_node.
4082 (find_cloog_iv_in_expr, compute_cloog_iv_types_1,
4083 compute_cloog_iv_types): New.
4084 (gloog): Call compute_cloog_iv_types before starting the
4085 translation of the clast.
4087 * graphite.h (struct graphite_bb): New field cloog_iv_types.
4088 (GBB_CLOOG_IV_TYPES): New.
4089 (debug_ivtype_map): Declared.
4090 (oldiv_for_loop): New.
4092 2008-12-10 Tobias Grosser <grosser@fim.uni-passau.de>
4095 * graphite.c (new_scop): Initialize SCOP_ADD_PARAMS.
4096 (param_index): Assert if parameter is not know after parameter
4098 (find_params_in_bb): Detect params directly in GBB_CONDITIONS.
4099 (find_scop_parameters): Mark, that we have finished parameter
4101 (graphite_transform_loops): Move condition detection before parameter
4103 * graphite.h (struct scop): Add SCOP_ADD_PARAMS.
4104 * testsuite/gfortran.dg/graphite/pr38459.f90: New.
4106 2008-12-09 Tobias Grosser <grosser@fim.uni-passau.de>
4108 * graphite.c (graphite_transform_loops): Always call find_transform ()
4109 in ENABLE_CHECKING. So we test these code paths, even if we do not
4112 2008-12-09 Tobias Grosser <grosser@fim.uni-passau.de>
4114 * graphite.c (print_graphite_bb): Fix printing to file != dump_file.
4115 (print_scop): Ditto.
4117 2008-12-08 Tobias Grosser <grosser@fim.uni-passau.de>
4120 Fix testsuite/gfortran.dg/graphite/id-3.f90.
4121 * graphite.c (scopdet_basic_block_info): Fix bug that found some
4122 regions more than once.
4124 2008-12-03 Sebastian Pop <sebastian.pop@amd.com>
4126 Fix testsuite/gfortran.dg/graphite/id-4.f90.
4127 * graphite.c (scan_tree_for_params): Do not compute the multiplicand
4130 2008-12-03 Sebastian Pop <sebastian.pop@amd.com>
4132 Fix testsuite/gfortran.dg/graphite/id-1.f90.
4133 * graphite.c (gmp_cst_to_tree): Pass the type in parameter.
4134 (loop_iv_stack_patch_for_consts): Update use of gmp_cst_to_tree.
4135 (max_precision_type): New.
4136 (value_clast): Removed.
4137 (clast_to_gcc_expression): Be more careful to types of expressions.
4138 Use max_precision_type and update use of gmp_cst_to_tree.
4139 (graphite_translate_clast_equation): Use max_precision_type.
4140 (graphite_create_guard_cond_expr): Do not use integer_type_node,
4141 use the type of the condition.
4142 (graphite_create_new_loop): Do not use integer_type_node, use the
4143 max_precision_type of lb and ub.
4145 2008-12-03 Sebastian Pop <sebastian.pop@amd.com>
4147 * graphite.c (build_scops_1): Initialize open_scop.exit
4150 2008-12-02 Sebastian Pop <sebastian.pop@amd.com>
4152 * testsuite/gcc.dg/graphite/pr38084.c: New.
4153 * testsuite/gfortran.dg/graphite/id-1.f90: New.
4154 * testsuite/gfortran.dg/graphite/id-2.f90: New.
4155 * testsuite/gfortran.dg/graphite/id-3.f90: New.
4156 * testsuite/gfortran.dg/graphite/id-4.f90: New.
4157 * testsuite/gfortran.dg/graphite/pr37857.f90: New.
4159 2008-12-02 Sebastian Pop <sebastian.pop@amd.com>
4160 Jan Sjodin <jan.sjodin@amd.com>
4161 Harsha Jagasia <harsha.jagasia@amd.com>
4173 * testsuite/gcc.dg/graphite/pr38073.c: New.
4174 * testsuite/gcc.dg/graphite/pr37928.c: New.
4175 * testsuite/gcc.dg/graphite/pr37883.c: New.
4176 * testsuite/gcc.dg/graphite/pr38125.c: New.
4177 * testsuite/gfortran.dg/graphite/pr38083.f90: New.
4178 * testsuite/gfortran.dg/graphite/pr37852.f90: New.
4179 * testsuite/gfortran.dg/graphite/pr37980.f90: New.
4181 * testsuite/gcc.dg/graphite/scop-18.c: Remove reduction, test for
4182 the number of detected scops. Copy exact same test for loop
4184 * testsuite/gcc.dg/graphite/block-1.c: Fix the number of expected
4185 loops to be blocked as reductions are not handled.
4186 * testsuite/gcc.dg/graphite/block-4.c: ...here. New.
4188 * tree-phinodes.c (remove_phi_nodes): New, extracted from...
4189 * tree-cfg.c (remove_phi_nodes_and_edges_for_unreachable_block):
4191 * tree-flow.h (remove_phi_nodes, canonicalize_loop_ivs): Declared.
4192 * Makefile.in (graphite.o): Depend on value-prof.h.
4193 (graphite.o-warn): Removed -Wno-error.
4194 * tree-parloops.c (canonicalize_loop_ivs): Allow reduction_list
4195 to be a NULL pointer. Call update_stmt. Return the newly created
4196 cannonical induction variable.
4198 * graphite.h (debug_rename_map): Declared. Fix some comments.
4200 * graphite.c: Reimplement the code generation from graphite to gimple.
4201 Include value-prof.h.
4202 (loop_iv_stack_get_iv): Do not return NULL for constant substitutions.
4203 (get_old_iv_from_ssa_name): Removed.
4204 (graphite_stmt_p): New.
4205 (new_graphite_bb): Test for useful statements before building a
4206 graphite statement for the basic block.
4207 (free_graphite_bb): Do not free GBB_DATA_REFS: this is a bug
4208 in free_data_ref that calls BITMAP_FREE (DR_VOPS (dr)) without
4210 (recompute_all_dominators, graphite_verify,
4211 nb_reductions_in_loop, graphite_loop_normal_form): New.
4212 (scop_record_loop): Call graphite_loop_normal_form.
4213 (build_scop_loop_nests): Iterate over all the blocks of the
4214 function instead of relying on the incomplete information from
4215 SCOP_BBS. Return the success of the operation.
4216 (find_params_in_bb): Use the data from GBB_DATA_REFS.
4217 (add_bb_domains): Removed.
4218 (build_loop_iteration_domains): Don't call add_bb_domains.
4219 Add the iteration domain only to the basic blocks that have been
4220 translated to graphite.
4221 (build_scop_conditions_1): Add constraints only if the basic
4222 block have been translated to graphite.
4223 (build_scop_data_accesses): Completely disabled until data
4224 dependence is correctly implemented.
4225 (debug_rename_elt, debug_rename_map_1, debug_rename_map): New.
4226 (remove_all_edges_1, remove_all_edges): Removed.
4227 (get_new_name_from_old_name): New.
4228 (graphite_rename_variables_in_stmt): Renamed
4229 rename_variables_in_stmt. Call get_new_name_from_old_name.
4230 Use replace_exp and update_stmt.
4231 (is_old_iv): Renamed is_iv.
4232 (expand_scalar_variables_stmt): Extra parameter for renaming map.
4233 Use replace_exp and update_stmt.
4234 (expand_scalar_variables_expr): Same. Use the map to get the
4235 new names for the renaming of induction variables and for the
4236 renaming of variables after a basic block has been copied.
4237 (expand_scalar_variables): Same.
4238 (graphite_rename_variables): Renamed rename_variables.
4239 (move_phi_nodes): Removed.
4240 (get_false_edge_from_guard_bb): New.
4241 (build_iv_mapping): Do not insert the induction variable of a
4242 loop in the renaming iv map if the basic block does not belong
4244 (register_old_new_names, graphite_copy_stmts_from_block,
4245 copy_bb_and_scalar_dependences): New.
4246 (translate_clast): Heavily reimplemented: copy basic blocks,
4247 do not move them. Finally, in call cleanup_tree_cfg in gloog.
4248 At each translation step call graphite_verify ensuring the
4249 consistency of the SSA, loops and dominators information.
4250 (collect_virtual_phis, find_vdef_for_var_in_bb,
4251 find_vdef_for_var_1, find_vdef_for_var,
4252 patch_phis_for_virtual_defs): Removed huge hack.
4253 (mark_old_loops, remove_dead_loops, skip_phi_defs,
4254 collect_scop_exit_phi_args, patch_scop_exit_phi_args,
4255 gbb_can_be_ignored, scop_remove_ignoreable_gbbs, ): Removed.
4256 (remove_sese_region, ifsese, if_region_entry, if_region_exit,
4257 if_region_get_condition_block, if_region_set_false_region,
4258 create_if_region_on_edge, move_sese_in_condition, bb_in_sese_p,
4259 sese_find_uses_to_rename_use, sese_find_uses_to_rename_bb,
4260 sese_add_exit_phis_edge, sese_add_exit_phis_var,
4261 rewrite_into_sese_closed_ssa): New.
4262 (gloog): Remove dead code. Early return if code cannot be
4263 generated. Call cleanup_tree_cfg once the scop has been code
4265 (graphite_trans_scop_block, graphite_trans_loop_block): Do not
4266 block loops with less than two loops.
4267 (graphite_apply_transformations): Remove the call to
4268 scop_remove_ignoreable_gbbs.
4269 (limit_scops): When build_scop_loop_nests fails, continue on
4270 the next scop. Fix open_scop.entry.
4271 (graphite_transform_loops): Call recompute_all_dominators: force the
4272 recomputation of correct CDI_DOMINATORS and CDI_POST_DOMINATORS.
4273 Call initialize_original_copy_tables and free_original_copy_tables
4274 to be able to copy basic blocks during code generation.
4275 When build_scop_loop_nests fails, continue on next scop.
4276 (value_clast): New union.
4277 (clast_to_gcc_expression): Fix type cast warning.
4279 2008-11-09 Sebastian Pop <sebastian.pop@amd.com>
4281 * Merge from mainline (r140838:141727).
4283 2008-11-05 Tobias Grosser <grosser@fim.uni-passau.de>
4287 * graphite.c (scan_tree_for_params): Add POINTER_PLUS_EXPR.
4289 2008-11-05 Tobias Grosser <grosser@fim.uni-passau.de>
4293 * graphite.c (scopdet_basic_block_info): Fix loops with multiple
4294 exits and conditions.
4295 * testsuite/gcc.dg/graphite/pr37943.c: New.
4297 2008-10-23 Tobias Grosser <grosser@fim.uni-passau.de>
4300 * graphite.c (gloog): Replace EXIT_BLOCK_PTR with scop exit.
4302 2008-10-23 Tobias Grosser <grosser@fim.uni-passau.de>
4304 * doc/invoke.texi: Fix spaces.
4306 2008-10-22 Sebastian Pop <sebastian.pop@amd.com>
4308 PR tree-optimization/37891
4309 Reverted last commit.
4310 * graphite.c (create_single_entry_edge): Set
4311 EDGE_IRREDUCIBLE_LOOP and BB_IRREDUCIBLE_LOOP.
4313 2008-10-21 Sebastian Pop <sebastian.pop@amd.com>
4314 Mitul Thakkar <mitul.thakkar@amd.com>
4316 * graphite.c (create_single_entry_edge): Set
4317 EDGE_IRREDUCIBLE_LOOP and BB_IRREDUCIBLE_LOOP.
4319 2008-10-16 Tobias Grosser <grosser@fim.uni-passau.de>
4321 * doc/invoke.texi: Add -fgraphite-identity.
4322 * graphite.c (graphite_apply_transformations): Check for
4323 -fgraphite-identity.
4324 * toplev.c (process_options): Add flag_graphite_identity.
4325 * tree-ssa-loop.c: Add flag_graphite_identity.
4327 2008-10-14 Sebastian Pop <sebastian.pop@amd.com>
4329 Undo changes from 2008-10-02:
4330 * tree-ssa-loop-ivopts.c (rewrite_use_nonlinear_expr): Convert
4331 operand type when copying the operand to a variable of different type.
4332 * cfgloopmanip.c (create_empty_loop_on_edge): Write exit condition
4333 with the IV name after increment.
4335 2008-10-14 Sebastian Pop <sebastian.pop@amd.com>
4336 Harsha Jagasia <harsha.jagasia@amd.com>
4338 PR tree-optimization/37828
4339 * testsuite/gcc.dg/graphite/pr37828.c: New.
4340 * graphite.c (graphite_trans_loop_block): Do not loop block
4341 single nested loops.
4343 2008-10-09 Harsha Jagasia <harsha.jagasia@amd.com>
4344 Sebastian Pop <sebastian.pop@amd.com>
4346 * graphite.c (struct rename_map_elt, new_rename_map_elt,
4347 rename_map_elt_info, eq_rename_map_elts): New.
4348 (graphite_rename_ivs_stmt): Renamed graphite_rename_variables_in_stmt.
4349 (expand_scalar_variables_expr): Change parameters.
4350 (expand_scalar_variables_stmt): Same.
4351 (expand_scalar_variables): Same.
4352 (graphite_rename_ivs): Rename graphite_rename_variables.
4353 (build_iv_mapping): New.
4354 (translate_clast): Call build_iv_mapping.
4355 * graphite.h (gbb_p): New name.
4357 2008-10-03 Harsha Jagasia <harsha.jagasia@amd.com>
4359 PR tree-optimization/37684
4360 * gcc.dg/graphite/pr37684.c: New.
4361 * graphite.c (exclude_component_ref): New.
4362 (is_simple_operand): Call exclude_component_ref.
4364 2008-10-02 Jan Sjodin <jan.sjodin@amd.com>
4365 Harsha Jagasia <harsha.jagasia@amd.com>
4367 PR tree-optimization/37485
4368 * gcc.dg/graphite/block-2.c: New
4369 * graphite.c (gmp_cst_to_tree): Moved.
4370 (iv_stack_entry_is_constant): New.
4371 (iv_stack_entry_is_iv): New.
4372 (loop_iv_stack_push): Renamed to loop_iv_stack_push_iv.
4373 (loop_iv_stack_insert_constant): New.
4374 (loop_iv_stack_pop): Use new datatpype.
4375 (loop_iv_stack_get_iv): Same.
4376 (loop_iv_stack_get_iv_from_name): Same.
4377 (loop_iv_stack_debug): Renamed to debug_loop_iv_stack.
4378 (loop_iv_stack_patch_for_consts): New.
4379 (loop_iv_stack_remove_constants): New.
4380 (graphite_create_new_loop): Use loop_iv_stack_push_iv.
4381 (translate_clast): Call loop_iv_stack_patch_for_consts and
4382 loop_iv_stack_remove_constants.
4383 (gloog): Use new datatype. Redirect construction edge to end
4384 block to avoid accidental deletion.
4385 * graphite.h (enum iv_stack_entry_kind): New. Tag for data in
4387 (union iv_stack_entry_data): New. Data in iv stack entry.
4388 (struct iv_stack_entry): New. Datatype for iv stack entries.
4390 2008-10-02 Sebastian Pop <sebastian.pop@amd.com>
4392 * tree-ssa-loop-ivopts.c (rewrite_use_nonlinear_expr): Convert
4393 operand type when copying the operand to a variable of different type.
4395 2008-10-02 Sebastian Pop <sebastian.pop@amd.com>
4397 * cfgloopmanip.c (create_empty_loop_on_edge): Write exit condition
4398 with the IV name after increment.
4400 2008-10-02 Sebastian Pop <sebastian.pop@amd.com>
4402 * Merge from mainline (r140164:140838).
4404 2008-09-10 Konrad Trifunovic <konrad.trifunovic@inria.fr>
4406 * graphite-data-ref.c: New.
4407 * graphite.c (print_scop): Also dump the dependence graph.
4408 (bb_in_scop_p, loop_in_scop_p, nb_loops_around_gb): Moved...
4409 (new_scop): Initialize SCOP_DEP_GRAPH.
4410 (build_scop_dynamic_schedules): New.
4411 (build_access_matrix_with_af): Fixed column numbering.
4412 (graphite_transform_loops): Call build_scop_dynamic_schedules.
4413 * graphite.h: Add ifndef/define guards against multiple inclusion.
4414 (struct scop): Add dep_graph field.
4415 (SCOP_DEP_GRAPH): Defined.
4416 (ref_nb_loops): Fixed and moved to other position.
4417 (bb_in_scop_p, loop_in_scop_p, nb_loops_around_gb): ... here.
4418 (nb_loops_around_loop_in_scop): New.
4419 (graphite_dump_dependence_graph): Declared.
4420 (graphite_build_rdg_all_levels): Declared.
4421 (graphite_test_dependence): Declared.
4422 * Makefile.in (graphite-data-ref.o): New target.
4424 2008-09-09 Sebastian Pop <sebastian.pop@amd.com>
4426 * Merge from mainline (139870:140164).
4428 2008-09-01 Sebastian Pop <sebastian.pop@amd.com>
4430 * Merge from mainline (138275:139870).
4431 * testsuite/gcc.dg/graphite/scop-matmult.c: XFailed as one of
4432 the commits from trunk broke the niter detection.
4434 2008-09-01 Sebastian Pop <sebastian.pop@amd.com>
4436 * graphite.c: Add more documentation. Fix formatting.
4437 (debug_loop_vec, debug_oldivs, loop_iv_stack,
4438 loop_iv_stack_debug): Moved...
4439 (schedule_to_scattering): Move before use.
4440 (dot_all_scops): Include in "#if 0" the code for system
4443 * graphite.h: (debug_loop_vec, debug_oldivs, loop_iv_stack,
4444 loop_iv_stack_debug): ...here.
4446 2008-08-29 Jan Sjodin <jan.sjodin@amd.com>
4448 * tree-phinodes.c (make_phi_node): Extern.
4449 (add_phi_node_to_bb): New.
4450 (create_phi_node): Call add_phi_node_to_bb.
4451 * tree-ssa-loop-ivopts.c (get_phi_with_result): New.
4452 (remove_statement): Handle case where stored phi was updated
4453 and is no longer the same.
4454 * graphite.c (is_parameter): New.
4456 (expand_scalar_variables_expr): New.
4457 (expand_scalar_variables_stmt): New.
4458 (expand_scalar_variables): New.
4459 (move_phi_nodes): Create new phi instead of moving old one.
4460 (translate_clast): Call expand_scalar_variables.
4461 (find_vdef_for_var_in_bb): Also scan regular definitions.
4462 (skip_phi_defs): New.
4463 (collect_scop_exit_phi_args): New.
4464 (patch_scop_exit_phi_args): New.
4465 (gloog): Patch phis after scop.
4466 * tree-flow.h: (add_phi_node_to_bb): Declared.
4467 (make_phi_node): Declared.
4469 2008-08-26 Sebastian Pop <sebastian.pop@amd.com>
4471 * graphite.c (end_scop): Split the entry of the scop when it
4472 is the header of the loop in which the scop is ending.
4473 (build_scops_1, limit_scops): Update uses of end_scop.
4475 2008-08-26 Sebastian Pop <sebastian.pop@amd.com>
4477 * graphite.c (dot_all_scops_1): Do not fail on uninitialized
4478 SCOP_ENTRY or SCOP_EXIT.
4480 2008-08-25 Sebastian Pop <sebastian.pop@amd.com>
4482 * graphite.c (get_construction_edge): Removed.
4483 (gloog): Construction edge is the scop entry edge.
4485 2008-08-25 Sebastian Pop <sebastian.pop@amd.com>
4487 * graphite.c (can_generate_for_scop): Removed.
4488 (gloog): Do not call it.
4490 2008-08-25 Sebastian Pop <sebastian.pop@amd.com>
4492 * graphite.c (new_scop): Entry of a scop is an edge.
4493 Initialize SESE region.
4494 (free_scop): Free SESE region.
4495 (build_scops_1, scopdet_bb_info): Work on edges, not on bbs.
4496 (split_difficult_bb): New, split from end_scop.
4497 (end_scop): Exit of a scop is an edge.
4498 (build_scop_bbs): Never check CDI_POST_DOMINATORS: this info is
4499 not automatically updated and thus is always wrong.
4500 * graphite.h (struct sese): New.
4503 (struct scop): New field for a SESE region. Remove entry, exit.
4504 (SCOP_ENTRY, SCOP_EXIT): Update definitions to match same
4505 semantics as before. Moved comment around.
4507 2008-08-25 Tobias Grosser <grosser@fim.uni-passau.de>
4508 Sebastian Pop <sebastian.pop@amd.com>
4510 * graphite.c (graphite_transform_loops): Always enable gloog
4511 and find_transform when ENABLE_CHECKING.
4513 2008-08-25 Sebastian Pop <sebastian.pop@amd.com>
4515 * graphite.c (graphite_transform_loops): Move pretty printer
4516 of SCOPs before doing any transform. Remove call to print_scops
4517 and dot_all_scops_1.
4519 2008-08-25 Sebastian Pop <sebastian.pop@amd.com>
4521 * graphite.c (dump_gbb_conditions): Don't try to print NULL pointers.
4522 (print_graphite_bb): Same.
4524 2008-08-25 Sebastian Pop <sebastian.pop@amd.com>
4526 * graphite.c (dot_all_scops_1): Cleanup.
4527 (move_scops): Fix comment.
4529 2008-08-25 Sebastian Pop <sebastian.pop@amd.com>
4531 * graphite.c (build_scop_bbs): Revert commit 139355:
4533 2008-08-20 Sebastian Pop <sebastian.pop@amd.com>
4534 Dwarakanath Rajagopal <dwarak.rajagopal@amd.com>
4536 * graphite.c (build_scop_bbs): Factor up code.
4538 2008-08-25 Tobias Grosser <grosser@fim.uni-passau.de>
4540 * graphite.c (gloog): Update dominator info.
4542 2008-08-25 Tobias Grosser <grosser@fim.uni-passau.de>
4544 * graphite.c (remove_cond_exprs): Do not fail on empty bbs.
4546 2008-08-24 Sebastian Pop <sebastian.pop@amd.com>
4548 * graphite.c (new_graphite_bb): Remove GBB_INDEX_TO_NUM_MAP
4550 (free_graphite_bb): Remove GBB_INDEX_TO_NUM_MAP free.
4551 (translate_clast): Correct formatting.
4552 * graphite.h (struct num_map): Removed.
4553 (struct graphite_bb): Remove num_map field.
4554 (GBB_INDEX_TO_NUM_MAP): Removed.
4556 2008-08-24 Sebastian Pop <sebastian.pop@amd.com>
4558 * graphite.c (build_access_matrix_with_af): Fix comments.
4559 (build_scop_data_accesses): Same.
4561 2008-08-24 Sebastian Pop <sebastian.pop@amd.com>
4563 * graphite.c (build_scop_data_accesses): Don't construct
4564 access matrices. Add a FIXME and an assert condition that
4565 should pass when the access matrices will be needed.
4567 2008-08-24 Sebastian Pop <sebastian.pop@amd.com>
4569 * tree-data-ref.c (stmt_simple_memref_p): Don't call
4571 * graphite.c (build_graphite_bb): Renamed new_graphite_bb.
4572 Moved close by free_graphite_bb.
4573 (free_graphite_bb): Call free_data_refs. Reset bb->aux.
4574 (new_scop): Move close by free_scop.
4575 (graphite_transform_loops): Avoid linear scan to reset bb->aux.
4577 2008-08-22 Jan Sjodin <jan.sjodin@amd.com>
4579 * cfgloopmanip.c (create_empty_if_region_on_edge): New.
4580 * graphite.c (clast_to_gcc_expression): Call gmp_cst_to_tree
4581 instead of recursive call.
4582 (graphite_translate_clast_equation): New.
4583 (graphite_create_guard_cond_expr): New.
4584 (graphite_create_new_guard): New.
4585 (get_stack_index_from_iv): Removed.
4586 (graphite_rename_ivs_stmt): Use gbb_loop_index.
4587 (get_true_edge_from_guard_bb): New.
4588 (translate_clast): Handle stmt_guard in clast.
4589 (get_construction_edge): Allow construction edge detection for
4590 a scope entry with multiple predecessors if one predecessor is
4591 the immediate dominator of scope entry.
4592 (can_generate_code_stmt): Enable code generation for clast_guard.
4593 (gloog): Use correct context loop. Removed check for post dominators.
4594 * cfgloop.h (create_empty_if_region_on_edge): Declared.
4596 2008-08-21 Sebastian Pop <sebastian.pop@amd.com>
4598 * graphite.c (remove_dead_loops): Document better which
4601 2008-08-21 Sebastian Pop <sebastian.pop@amd.com>
4603 * Makefile.in: Rename POLYLIBLIBS and POLYLIBINC to PPLLIBS
4605 (graphite.o): Also depends on pointer-set.h.
4607 2008-08-21 Sebastian Pop <sebastian.pop@amd.com>
4609 * graphite.c (scop_record_loop): Fix compile warning.
4611 2008-08-21 Harsha Jagasia <harsha.jagasia@amd.com>
4612 Sebastian Pop <sebastian.pop@amd.com>
4614 * graphite.c (scop_record_loop): DECL_NAME can be NULL.
4616 2008-08-21 Sebastian Pop <sebastian.pop@amd.com>
4618 * graphite.c (build_graphite_bb): Initialize bb->aux to
4619 point to the graphite_bb_p.
4620 (graphite_bb_from_bb): Renamed gbb_from_bb; returns the
4622 (add_bb_domains): Does not use the scop parameter.
4623 (graphite_transform_loops): Clean bb->aux at the end.
4625 2008-08-20 Dwarakanath Rajagopal <dwarak.rajagopal@amd.com>
4626 Sebastian Pop <sebastian.pop@amd.com>
4628 * testsuite/lib/target-supports.exp
4629 (check_effective_target_fgraphite): New.
4631 * testsuite/gcc.dg/graphite/graphite.exp: Early exit when
4632 check_effective_target_fgraphite returns false.
4633 Set dg-do-what-default to compile.
4634 (scan-graphite-dump-times): Removed.
4635 * testsuite/gfortran.dg/graphite/graphite.exp: Same.
4637 * testsuite/gcc.dg/graphite/scop-0.c: Do not use "dg-do compile".
4638 Use scan-tree-dump-times instead of scan-graphite-dump-times.
4639 * testsuite/gcc.dg/graphite/scop-1.c: Same.
4640 * testsuite/gcc.dg/graphite/scop-2.c: Same.
4641 * testsuite/gcc.dg/graphite/scop-3.c: Same.
4642 * testsuite/gcc.dg/graphite/scop-4.c: Same.
4643 * testsuite/gcc.dg/graphite/scop-5.c: Same.
4644 * testsuite/gcc.dg/graphite/scop-6.c: Same.
4645 * testsuite/gcc.dg/graphite/scop-7.c: Same.
4646 * testsuite/gcc.dg/graphite/scop-8.c: Same.
4647 * testsuite/gcc.dg/graphite/scop-9.c: Same.
4648 * testsuite/gcc.dg/graphite/scop-10.c: Same.
4649 * testsuite/gcc.dg/graphite/scop-11.c: Same.
4650 * testsuite/gcc.dg/graphite/scop-12.c: Same.
4651 * testsuite/gcc.dg/graphite/scop-13.c: Same.
4652 * testsuite/gcc.dg/graphite/scop-matmult.c: Same.
4653 * testsuite/gcc.dg/graphite/scop-14.c: Same.
4654 * testsuite/gcc.dg/graphite/scop-15.c: Same.
4655 * testsuite/gcc.dg/graphite/block-0.c: Same.
4656 * testsuite/gcc.dg/graphite/scop-16.c: Same.
4657 * testsuite/gcc.dg/graphite/block-1.c: Same.
4658 * testsuite/gcc.dg/graphite/scop-17.c: Same.
4659 * testsuite/gcc.dg/graphite/scop-18.c: Same.
4660 * testsuite/gfortran.dg/graphite/block-1.f90: Same.
4661 * testsuite/gfortran.dg/graphite/scop-1.f: Same.
4662 * testsuite/gfortran.dg/graphite/block-2.f: Same.
4664 2008-08-20 Sebastian Pop <sebastian.pop@amd.com>
4666 * graphite.c: Fix some XXX comments.
4667 (build_scop_dynamic_schedules): Removed.
4669 2008-08-20 Sebastian Pop <sebastian.pop@amd.com>
4671 * graphite.h (scop_max_loop_depth): Moved...
4672 * graphite.c (scop_max_loop_depth): ...here.
4673 (remove_all_edges_1): New.
4674 (remove_all_edges): Factored code.
4675 (remove_cond_exprs): Check only the last statement for
4676 a GIMPLE_COND expression.
4678 2008-08-20 Sebastian Pop <sebastian.pop@amd.com>
4680 * graphite.c (scan_tree_for_params): Early return when the
4681 expression is a chrec_dont_know. Handle case NEGATE_EXPR.
4682 (find_scop_parameters): Factor out code.
4683 (graphite_trans_bb_strip_mine): Remove dead code.
4685 2008-08-20 Sebastian Pop <sebastian.pop@amd.com>
4687 * graphite.c (clast_to_gcc_expression, graphite_create_new_loop,
4688 graphite_trans_bb_move_loop): Factor asserts.
4689 (gloog): Perform sanity checks only for ENABLE_CHECKING.
4690 Do not call calculate_dominance_info and estimate_bb_frequencies.
4692 2008-08-20 Jan Sjodin <jan.sjodin@amd.com>
4694 * graphite.c (create_loops_mapping, free_loops_mapping,
4695 create_loops_mapping_num, debug_loop_mapping_1,
4696 debug_loop_mapping, graphite_loops_mapping_max_loop_num,
4697 get_loop_mapping_for_num, graphite_loops_mapping_add_child,
4698 graphite_loops_mapping_add_child_num,
4699 graphite_loops_mapping_insert_child,
4700 graphite_loops_mapping_parent, get_loop_mapped_depth_for_num,
4701 get_loop_mapped_depth, split_loop_mapped_depth_for_num,
4702 loop_mapped_depth_split_loop, swap_loop_mapped_depth_for_num,
4703 create_num_from_index, get_num_from_index,
4704 swap_loop_mapped_depth): Removed.
4705 (new_scop): Do not initialize SCOP_LOOPS_MAPPING.
4706 (free_scop): Do not call free_loops_mapping.
4707 (graphite_get_new_iv_stack_index_from_old_iv): Renamed
4708 get_stack_index_from_iv. Use GBB_LOOPS instead of calling
4709 get_loop_mapped_depth.
4710 (graphite_trans_bb_move_loop): Do not update the loop mapping.
4711 (graphite_trans_bb_strip_mine): Same.
4712 * graphite.h (graphite_loops_mapping, graphite_loop_node): Removed.
4713 (struct scop): Remove field loops_mapping.
4715 2008-08-20 Sebastian Pop <sebastian.pop@amd.com>
4716 Dwarakanath Rajagopal <dwarak.rajagopal@amd.com>
4718 * graphite.c (scop_record_loop): Factor out one level of the
4719 condition by early return.
4720 (build_scop_loop_nests): Format following FSF coding style.
4721 (build_scop_dynamic_schedules): Factor out code.
4722 (scopdet_bb_info): Reindent. Default case should not be reachable.
4724 2008-08-20 Sebastian Pop <sebastian.pop@amd.com>
4725 Dwarakanath Rajagopal <dwarak.rajagopal@amd.com>
4727 * graphite.c (loop_affine_expr): Check for DECL_P or struct
4728 assignments that are not handled as simple operands for now.
4730 2008-08-20 Sebastian Pop <sebastian.pop@amd.com>
4731 Dwarakanath Rajagopal <dwarak.rajagopal@amd.com>
4733 * graphite.c (build_scop_bbs): Factor up code.
4735 2008-08-20 Sebastian Pop <sebastian.pop@amd.com>
4736 Dwarakanath Rajagopal <dwarak.rajagopal@amd.com>
4738 * graphite.c (stmt_simple_for_scop_p): Factor code out
4740 (enum gbb_type): New. Group all the GBB_* types under it.
4741 (is_loop_exit): Moved...
4742 (end_scop): Enable BB spliting.
4743 * cfgloop.c (is_loop_exit): ...here. Reimplemented.
4744 * cfgloop.h (is_loop_exit): Declared.
4746 2008-08-20 Sebastian Pop <sebastian.pop@amd.com>
4748 * doc/invoke.texi: Remove strides from examples containing
4749 DO loops when the strides are equal to 1.
4751 2008-08-20 Harsha Jagasia <harsha.jagasia@amd.com>
4752 Dwarakanath Rajagopal <dwarak.rajagopal@amd.com>
4754 * graphite.c (graphite_trans_scop_block): Or the result with
4755 the result from graphite_trans_loop_block.
4756 * testsuite/gcc.dg/graphite/block-1.c: New.
4757 * testsuite/gfortran.dg/graphite/block-1.f90: New.
4758 * testsuite/gfortran.dg/graphite/block-2.f: New.
4760 2008-08-20 Sebastian Pop <sebastian.pop@amd.com>
4762 * graphite.c (graphite_transform_loops): Call cloog_initialize
4765 2008-08-20 Sebastian Pop <sebastian.pop@amd.com>
4767 * tree-data-ref.c) (stmt_simple_memref_p): New.
4768 * tree-data-ref.h (stmt_simple_memref_p): Declared.
4769 * graphite.c (stmt_simple_memref_for_scop_p): Removed.
4770 (is_simple_operand): Call stmt_simple_memref_p.
4772 * testsuite/gcc.dg/graphite/scop-matmult.c: Updated for not
4773 using pointer arithmetic, as this is optimized by PRE and
4774 makes the code too difficult to analyze.
4776 * testsuite/gcc.dg/graphite/scop-18.c: Same.
4778 2008-08-20 Sebastian Pop <sebastian.pop@amd.com>
4780 * gdbinit.in (pgg): New.
4782 2008-08-15 Tobias Grosser <grosser@fim.uni-passau.de>
4784 * graphite.c (graphite_trans_loop_block): Fix warning.
4786 2008-08-15 Tobias Grosser <grosser@fim.uni-passau.de>
4788 * graphite.c (graphite_trans_loop_block): Fix my merge error.
4790 2008-08-15 Tobias Grosser <grosser@fim.uni-passau.de>
4792 * graphite.c (graphite_trans_bb_block): Remove check for
4793 flag_loop_strip_mine, flag_loop_block, flag_loop_interchange.
4794 Check if loop blocking is profitable for every loop, before applying
4796 (graphite_apply_transformations): Call graphite_trans_bb_block only,
4797 if flag_loop_block is set.
4799 2008-08-14 Sebastian Pop <sebastian.pop@amd.com>
4801 * graphite.c: Add some more documentation for the loop
4804 2008-08-14 Sebastian Pop <sebastian.pop@amd.com>
4806 * Makefile.in (tree-data-ref.o): Remove dependence on graphite.h.
4807 * graphite.c: Format on less than 80 columns.
4810 2008-08-14 Sebastian Pop <sebastian.pop@amd.com>
4812 * cfgloopmanip.c (loopify): Use update_dominators_in_loop.
4814 2008-08-14 Sebastian Pop <sebastian.pop@amd.com>
4816 * doc/invoke.texi (floop-block, floop-strip-mine,
4817 floop-interchange): Update documentation with examples.
4819 2008-08-13 Sebastian Pop <sebastian.pop@amd.com>
4821 * cfgloopmanip.c (create_empty_loop_on_edge): Don't call
4823 * graphite.c (graphite_create_new_loop): Call add_referenced_var.
4825 2008-08-13 Sebastian Pop <sebastian.pop@amd.com>
4827 * cfgloopmanip.c (create_empty_loop_on_edge): Improve documentation.
4828 Factor gcc_asserts into a single one. Use force_gimple_operand_gsi.
4829 * tree-scalar-evolution.c: Revert useless changes.
4830 * tree-phinodes.c: Same.
4833 * tree-vectorizer.h: Same.
4834 * tree-flow.h: Same.
4836 * common.opt (fgraphite): Update documentation.
4838 2008-08-12 Harsha Jagasia <harsha.jagasia@amd.com>
4840 * doc/invoke.texi (-floop-block, -floop-strip-mine,
4841 -floop-interchange): Add more text for explaining what each of these
4843 * tree-into-ssa.c (gimple_vec): Moved to...
4844 * graphite.c: Include gimple.h.
4845 (gimple_vec): Moved to...
4846 (del_loop_to_cloog_loop): Removed.
4847 (loop_affine_expr): Do not call create_data_ref when the
4848 operand is a constant.
4849 (new_scop): Use free instead of del_loop_to_cloog_loop.
4850 * Makefile.in (graphite.o): Depend on GIMPLE_H.
4851 * gimple.h (gimple_vec): ... here.
4853 2008-08-11 Tobias Grosser <grosser@fim.uni-passau.de>
4855 * graphite.c (scopdet_bb_info): Only allow loops with known number of
4857 (build_loop_iteration_domains): Fail, if latch executions unknown.
4859 2008-08-11 Tobias Grosser <grosser@fim.uni-passau.de>
4861 * graphite.c (add_conditions_to_domain): New.
4862 (build_scop_conditions_1): Call add_conditions_to_domain.
4863 (set_cloog_options): Allow to disable optimizations.
4865 2008-08-11 Tobias Grosser <grosser@fim.uni-passau.de>
4867 * graphite.c (find_params_in_bb): Look for parameters in conditions.
4868 Do not use walk_dominator_tree.
4869 (find_scop_parameters): Do not use walk_dominator_tree.
4871 2008-08-11 Tobias Grosser <grosser@fim.uni-passau.de>
4873 * graphite.c (scan_tree_for_params) Add / Subtract inequality.
4874 (idx_record_params): Adapt.
4875 * graphite.h (scop_gimple_loop_depth): New.
4877 2008-08-11 Tobias Grosser <grosser@fim.uni-passau.de>
4879 * graphite.c (build_scop_dynamic_schedules): Remove value_init.
4880 (scan_tree_for_params): Remove value_init.
4881 (build_scop_context): Remove value_init.
4882 (build_loop_iteration_domains): Remove value_init.
4883 (schedule_to_scattering): Remove value_init.
4884 (graphite_trans_bb_strip_mine): Remove value_init.
4886 2008-08-11 Tobias Grosser <grosser@fim.uni-passau.de>
4888 * gcc/graphite.c (limit_scops): New.
4889 (graphite_transform_loops): Add limit SCoPs.
4890 * gcc/testsuite/gcc.dg/graphite/scop-0.c: Update number of SCoPs.
4891 * gcc/testsuite/gcc.dg/graphite/scop-1.c: Update number of SCoPs.
4892 * gcc/testsuite/gcc.dg/graphite/scop-10.c: Update number of SCoPs.
4893 * gcc/testsuite/gcc.dg/graphite/scop-11.c: Update number of SCoPs.
4894 * gcc/testsuite/gcc.dg/graphite/scop-12.c: Update number of SCoPs.
4895 * gcc/testsuite/gcc.dg/graphite/scop-13.c: Update number of SCoPs.
4896 * gcc/testsuite/gcc.dg/graphite/scop-14.c: Update number of SCoPs.
4897 * gcc/testsuite/gcc.dg/graphite/scop-15.c: Update number of SCoPs.
4898 * gcc/testsuite/gcc.dg/graphite/scop-16.c: Update number of SCoPs.
4899 Change loop numbers.
4900 * gcc/testsuite/gcc.dg/graphite/scop-17.c: Update number of SCoPs.
4901 Change loop numbers.
4902 * gcc/testsuite/gcc.dg/graphite/scop-18.c: Update number of SCoPs.
4903 * gcc/testsuite/gcc.dg/graphite/scop-2.c: Update number of SCoPs.
4904 * gcc/testsuite/gcc.dg/graphite/scop-3.c: Update number of SCoPs.
4905 * gcc/testsuite/gcc.dg/graphite/scop-4.c: Update number of SCoPs.
4906 * gcc/testsuite/gcc.dg/graphite/scop-5.c: Update number of SCoPs.
4907 * gcc/testsuite/gcc.dg/graphite/scop-6.c: Update number of SCoPs.
4908 * gcc/testsuite/gcc.dg/graphite/scop-7.c: Update number of SCoPs.
4909 * gcc/testsuite/gcc.dg/graphite/scop-8.c: Update number of SCoPs.
4910 * gcc/testsuite/gcc.dg/graphite/scop-9.c: Update number of SCoPs.
4911 * gcc/testsuite/gcc.dg/graphite/scop-matmult.c: Update number of SCoPs.
4913 2008-08-11 Tobias Grosser <grosser@fim.uni-passau.de>
4915 * graphite.c (graphite_transform_loops): Call always find_transform.
4917 2008-08-08 Tobias Grosser <grosser@fim.uni-passau.de>
4919 * graphite.c (free_loops_mapping): New.
4920 (stmt_simple_for_scop_p): Fix typo.
4921 (stmt_simple_for_scop_p): Fix tuples functions, that
4923 (free_graphite_bb): Fix some memleaks.
4924 (free_scop): Fix some memleaks.
4925 (scopdet_bb_info): Do not forget some tmp SCoPs.
4926 (find_params_in_bb): Fix some memleaks.
4927 (clast_to_gcc_expression): Fix warning.
4929 2008-08-07 Tobias Grosser <grosser@fim.uni-passau.de>
4931 * testsuite/gcc.dg/graphite/scop-16.c: Fix for 32bit.
4932 * testsuite/gcc.dg/graphite/scop-17.c: Fix for 32bit.
4934 2008-08-04 Sebastian Pop <sebastian.pop@amd.com>
4936 * tree-ssa-loop.c (tree-ssa-loop.o): Do not include toplev.h.
4937 Move code ifdef-ed HAVE_cloog...
4938 * graphite.c: Include toplev.h.
4940 * Makefile.in (OBJS-common): Always build graphite.o.
4941 (BACKEND): Remove @GRAPHITE@.
4942 (tree-ssa-loop.o): Do not depend on TOPLEV_H.
4943 (graphite.o): Depend on TOPLEV_H.
4945 2008-08-04 Sebastian Pop <sebastian.pop@amd.com>
4947 * Makefile.in (tree-ssa-loop.o): Depend on TOPLEV_H.
4948 Remove typo left from polylib to ppl conversion.
4949 * graphite.c (graphite_transforms): Use sorry instead of fatal.
4951 2008-08-03 Sebastian Pop <sebastian.pop@amd.com>
4953 * toplev.c (process_options): Move the graphite loop optimization
4955 * tree-ssa-loop.c (graphite_transforms): ... here.
4956 When not configured with CLooG, print to dump_file that
4957 Graphite transforms were not performed.
4958 * testsuite/gcc.dg/graphite/graphite.exp (scan-graphite-dump-times):
4960 * testsuite/gcc.dg/graphite/*.c: Updated all testcases to use
4961 scan-graphite-dump-times.
4963 2008-08-03 Sebastian Pop <sebastian.pop@amd.com>
4965 * graphite.c (dot_scop, dot_all_scops): Do not call system.
4966 Do not open /tmp/scop.dot and /tmp/allscops.dot.
4968 2008-08-02 Sebastian Pop <sebastian.pop@amd.com>
4969 Jan Sjodin <jan.sjodin@amd.com>
4971 * configure: Regenerated.
4972 * omp-low.c (expand_omp_sections): Remove now unused code.
4973 * config.in (HAVE_polylib): Removed.
4974 * configure.ac (HAVE_polylib, POLYLIBLIBS, POLYLIBINC): Removed.
4975 (PPLLIBS, PPLINC): Added.
4976 * graphite.c: Replace unsigned with int wherever possible.
4977 Don't access Cloog's data structures, but use accessor functions.
4978 Clast's stmt->type is now implemented as a vtable: change the
4979 switches of stmt->type into ifs.
4980 (polylib/polylibgmp.h): Don't include.
4981 (initialize_dependence_polyhedron,
4982 initialize_data_dependence_polyhedron, is_empty_polyhedron,
4983 statement_precedes_p, test_dependence, build_rdg_all_levels,
4984 dump_dependence_graph): Removed until this code is cleaned up
4986 * Makefile.in (POLYLIBLIBS): Renamed PPLLIBS.
4987 (POLYLIBINC): Renamed PPLINC.
4989 2008-08-01 Harsha Jagasia <harsha.jagasia@amd.com>
4990 Dwarakanath Rajagopal <dwarak.rajagopal@amd.com>
4991 Jan Sjodin <jan.sjodin@amd.com>
4993 Finish the merge and tuplification of graphite.
4995 2008-07-24 Sebastian Pop <sebastian.pop@amd.com>
4996 Jan Sjodin <jan.sjodin@amd.com>
4998 Partial merge from mainline (138072:138275).
4999 * graphite.c still has to be tuplified.
5001 2008-07-29 Jan Sjodin <jan.sjodin@amd.com>
5003 * graphite.c (graphite_loops_mapping_max_loop_num): New.
5004 (create_num_from_index): New.
5005 (get_num_from_index): Also pass in the graphite BB.
5006 (free_graphite_bb): Free GBB_INDEX_TO_NUM_MAP.
5007 (build_graphite_bb): Initialize GBB_INDEX_TO_NUM_MAP.
5008 (graphite_trans_bb_strip_mine): Call create_num_from_index.
5009 (is_interchange_valid): Return false when failing.
5010 * graphite.h (struct num_map): New.
5011 (struct graphite_bb): New field num_map.
5012 (GBB_LOOPS_MAPPING): Renamed GBB_INDEX_TO_NUM_MAP.
5014 2008-07-29 Tobias Grosser <grosser@fim.uni-passau.de>
5016 * graphite.c (dump_gbb_conditions): Print also conditions like
5017 "if (a)". Remove dublicated code and use print_generic_expr ().
5018 (stmt_simple_for_scop_p): Only allow conditions we can handle
5021 2008-07-25 Jan Sjodin <jan.sjodin@amd.com>
5023 * graphite.h (struct scop): Removed new_ivs field.
5024 (SCOP_NEWIVS): Deleted.
5025 * graphite.c (new_scop, free_scop, clast_name_to_gcc,
5026 clast_to_gcc_expression, graphite_create_new_loop):
5027 Removed use of new_ivs.
5029 2008-07-25 Jan Sjodin <jan.sjodin@amd.com>
5031 * graphite.c (debug_oldivs, debug_loop_vec, create_loops_mapping,
5032 create_loops_mapping_num, debug_loop_mapping_1): New.
5033 (debug_loop_mapping): Call debug_loop_mapping_1.
5034 (get_loop_mapping_for_num,
5035 graphite_loops_mapping_add_child,
5036 graphite_loops_mapping_add_child_num,
5037 graphite_loops_mapping_insert_child,
5038 graphite_loops_mapping_parent,
5039 split_loop_mapped_depth_for_num,
5040 loop_mapped_depth_split_loop): New.
5041 (increment_loop_mapped_depths): Removed.
5042 (swap_loop_mapped_depth_for_num): Reimplemented.
5043 (new_scop): Call create_loops_mapping.
5044 (scop_record_loop): Call graphite_loops_mapping_insert_child.
5045 (translate_clast): Pass the old loop father in parameter, and pass
5046 it to get_old_iv_from_ssa_name.
5047 (remove_edges_around_useless_blocks, can_generate_code_stmt,
5048 can_generate_code, can_generate_for_scop): New.
5049 (graphite_trans_bb_block): Returns false when it fails to transform.
5050 * graphite.h (graphite_loop_node, graphite_loops_mapping): New.
5052 2008-07-25 Sebastian Pop <sebastian.pop@amd.com>
5054 Reverted all the changes related to the streamization and
5056 These changes are now tracked in the streamization branch.
5058 2008-07-25 Sebastian Pop <sebastian.pop@amd.com>
5059 Jan Sjodin <jan.sjodin@amd.com>
5061 * graphite.c (gbb_compare): Correctly constify.
5062 (gbb_can_be_ignored): Indent.
5063 (graphite_trans_scop_swap_1and2): Add legality check.
5066 2008-07-25 Sebastian Pop <sebastian.pop@amd.com>
5068 Remove fallouts from "Reverted the Condate changes".
5069 * tree.h: Remove unused decl.
5070 * testsuite/gcc.dg/tree-checker: Same.
5071 * timevar.def: Remove counter.
5073 2008-07-24 Sebastian Pop <sebastian.pop@amd.com>
5075 * Merge from mainline (135673:138072).
5077 Reverted the MIRO changes (from 2008-04-05) that are now
5078 tracked in the miro branch.
5079 * tree-bounds.c: Removed.
5080 * tree-bounds.h: Removed.
5082 Reverted the Condate changes (from 2006-07-04, 2007-03-20) that
5083 are now tracked in the condate branch.
5084 * tree-check.c: Removed.
5085 * tree-match.c: Removed.
5086 * condate.y: Removed.
5088 2008-07-24 Dwarakanath Rajagopal <dwarak.rajagopal@amd.com>
5090 * common.opt: New user flag -floop-block, -floop-strip-mine
5091 and -floop-interchange.
5092 * toplev.c (process_options): Enable -fgraphite pass if any one of the
5093 graphite loop optimization flags is turned on.
5094 * graphite.c (graphite_apply_transformations): Add flag_loop_block,
5095 flag_loop_strip_mine and flag_loop_interchange checks before
5097 * doc/invoke.texi: Remove -fgraphite and add -floop-block,
5098 -floop-strip-mine and -floop-interchange.
5099 * testsuite/gcc.dg/graphite/block-0.c: Add -floop-block and remove
5101 * testsuite/gcc.dg/graphite/scop-16.c: Ditto.
5102 * testsuite/gcc.dg/graphite/scop-17.c: Ditto.
5103 * testsuite/gcc.dg/graphite/scop-18.c: Ditto.
5105 2008-07-23 Jan Sjodin <jan.sjodin@amd.com>
5106 Sebastian Pop <sebastian.pop@amd.com>
5108 * cfgloopmanip.c (update_dominators_in_loop): Make it static.
5109 (create_empty_loop_on_edge): More fixes.
5110 * tree-phinodes.c (resize_phi_node): Extern.
5111 (unlink_phi_node, move_phi_node): New split from remove_phi_node.
5112 * cfghooks.c (update_dominator_information): New split from
5114 * tree-vectorizer.c (rename_variables_in_bb): Extern.
5115 * tree-dfa.c (collect_dfa_stats): Start walking the CFG on the
5116 successor of the function entry block.
5118 * graphite.c: Include pointer-set.h.
5119 (debug_loop_mapping, increment_loop_mapped_depths,
5120 get_loop_mapped_depth_for_num, get_loop_mapped_depth,
5121 set_loop_mapped_depth_for_num, set_loop_mapped_depth,
5122 swap_loop_mapped_depth_for_num, get_num_from_index,
5123 swap_loop_mapped_depth, loop_iv_stack_debug,
5124 loop_iv_stack_push, loop_iv_stack_pop, loop_iv_stack_get_iv,
5125 loop_iv_stack_get_iv_from_name, loop_iv_stack_debug,
5126 get_old_iv_from_ssa_name): New.
5127 (new_scop): Initialize SCOP_LOOPS_MAPPING.
5128 (free_scop): Free SCOP_LOOPS_MAPPING.
5129 (scop_record_loop): Record old ivs.
5130 (create_var_name): Removed.
5131 (initialize_cloog_names): Allocate double space in case strip mine
5132 applies to all loops once.
5133 (clast_name_to_gcc): Look up in the map ivstack passed in parameter.
5134 (clast_to_gcc_expression): Same. Implement more clast to gimple
5136 (graphite_create_new_loop): Pass in ivstack.
5137 (remove_all_edges): Pass in the construction_edge.
5138 (graphite_remove_iv): Removed.
5139 (graphite_rename_ivs, graphite_rename_ivs_stmt,
5140 remove_cond_exprs): Rewritten.
5141 (move_phi_nodes): New.
5142 (disconnect_virtual_phi_nodes, disconnect_cond_expr): Removed.
5143 (translate_clast): Pass in ivstack. Rewrite some cases.
5144 (set_cloog_options, debug_clast_stmt): New.
5145 (find_transform): Use set_cloog_options.
5146 (outermost_loop_layer): Removed.
5147 (get_construction_edge, collect_virtual_phis, find_vdef_for_var_in_bb,
5148 find_vdef_for_var_1, find_vdef_for_var, patch_phis_for_virtual_defs,
5149 mark_old_loops, remove_dead_loops): New.
5151 (graphite_trans_bb_move_loop): Call swap_loop_mapped_depth.
5152 (const_column_index, get_first_matching_sign_row_index,
5153 get_lower_bound_row, get_upper_bound_row, get_lower_bound,
5154 get_upper_bound): New.
5155 (graphite_trans_bb_strip_mine): Also update the iv map.
5157 * graphite.h (graphite_loops_mapping, GBB_LOOPS_MAPPING): New.
5158 (struct name_tree): Add a loop field.
5159 (struct scop): Add a graphite_loops_mapping field.
5160 (SCOP_LOOPS_MAPPING): New.
5161 (debug_clast_stmt): Declare.
5162 * lambda.h (find_induction_var_from_exit_cond): Declare.
5163 (lambda-code.c): (find_induction_var_from_exit_cond): Extern.
5164 * cfgloop.h (update_dominators_in_loop): Removed declaration.
5165 (create_empty_loop_on_edge): Updated.
5166 * tree-flow.h (remove_bb, resize_phi_node, move_phi_node,
5167 rename_variables_in_bb): Declare.
5168 * tree-cfg.c (remove_bb): Extern.
5170 * testsuite/gcc.dg/graphite/block-0.c: New.
5172 2008-07-21 Dwarakanath Rajagopal <dwarak.rajagopal@amd.com>
5173 Sebastian Pop <sebastian.pop@amd.com>
5175 * graphite.c (strip_mine_profitable_p): New.
5176 (graphite_trans_bb_block): Disable strip mining if not profitable.
5178 * testsuite/gcc.dg/graphite/scop-18.c: New.
5179 * testsuite/gcc.dg/graphite/scop-17.c: Fixed.
5180 * testsuite/gcc.dg/graphite/scop-16.c: Fixed.
5182 2008-07-17 Harsha Jagasia <harsha.jagasia@amd.com>
5183 Jan Sjodin <jan.sjodin@amd.com>
5184 Sebastian Pop <sebastian.pop@amd.com>
5186 * graphite.c (is_interchange_valid): New.
5187 (graphite_trans_bb_block): Check loop nest of basic block for legality
5190 * graphite.h (gbb_inner_most_loop_index, outer_most_loop_1,
5191 outer_most_loop, gbb_outer_most_loop_index): New.
5193 * tree-loop-linear.c (perfect_loop_nest_depth): Remove static.
5194 * tree-flow.h (perfect_loop_nest_depth): Declare as extern.
5195 * testsuite/gcc.dg/graphite/scop-16.c: New.
5196 * testsuite/gcc.dg/graphite/scop-17.c: New.
5198 2008-07-11 Tobias Grosser <grosser@fim.uni-passau.de>
5200 * graphite.c (scop_remove_ignoreable_gbbs): Also update bitmap.
5201 (graphite_trans_scop_block): Ignore SCoPs without bbs.
5203 2008-07-11 Tobias Grosser <grosser@fim.uni-passau.de>
5205 * graphite.c (new_scop): Initialize SCOP_EXIT.
5206 (scopdet_info): Add.
5207 (scopdet_bb_info): Rename from is_bb_addable. Cleanup, bugfixes.
5208 (build_scops_1): Cleanup, bugfixes.
5209 (build_scops): Cleanup.
5211 * testsuite/gcc.dg/graphite/scop-matmult.c: Remove duplicated code.
5212 * testsuite/gcc.dg/graphite/scop-15.c: Add SCoP numbers.
5214 2008-07-10 Harsha Jagasia <harsha.jagasia@amd.com>
5216 * testsuite/gfortran.dg/graphite/scop-1.f: Update to reduced test case.
5218 * testsuite/gfortran.dg/graphite/graphite.exp: Use
5219 DEFAULT_GRAPHITE_FLAGS.
5221 * testsuite/gcc.dg/graphite/scop-15.c: Update to reduced test case.
5223 2008-07-10 Harsha Jagasia <harsha.jagasia@amd.com>
5225 * graphite.c (scan_tree_for_params): Do not assert any more if
5226 MULT_EXPR parameter is negative.
5228 * testsuite/gfortran.dg/graphite/scop-1.f: New.
5230 * testsuite/gfortran.dg/graphite/graphite.exp: New.
5232 * testsuite/gcc.dg/graphite/scop-15.c: New.
5234 2008-07-10 Harsha Jagasia <harsha.jagasia@amd.com>
5236 * graphite.c (is_bb_addable): Fix segfault in spec gzip and reformat.
5238 2008-07-10 Tobias Grosser <grosser@fim.uni-passau.de>
5240 * graphite.c (graphite_trans_bb_swap_loops): Rename from
5241 graphite_swap_loops.
5242 (graphite_trans_bb_move_loop): New.
5243 (graphite_trans_bb_strip_mine): Rename from graphite_strip_mine_loop.
5244 (graphite_trans_bb_block): New.
5245 (graphite_trans_loop_block): New.
5246 (graphite_trans_scop_swap_1and2): Rename from
5247 graphite_trans_swap_1and2.
5248 (graphite_trans_scop_strip): Rename from graphite_trans_strip.
5249 (graphite_trans_scop_block): New.
5250 (graphite_apply_transformations): Rename from
5251 graphite_transformations.
5253 * testsuite/gcc.dg/graphite/scop-matmult.c: New.
5255 2008-07-10 Tobias Grosser <grosser@fim.uni-passau.de>
5257 * graphite.c (gbb_compare): New.
5258 (graphite_sort_gbbs): New.
5259 (gbb_can_be_ignored): New.
5260 (scop_remove_ignoreable_gbbs): New.
5261 (graphite_transformations): Cleanup and add
5262 scop_remove_ignoreable_gbbs.
5263 * lambda.h (lambda_vector_compare): New.
5265 2008-07-09 Tobias Grosser <grosser@fim.uni-passau.de>
5267 * graphite.c (print_graphite_bb): Correct printing of static schedule.
5268 (graphite_swap_loops): int -> unsigned
5269 (graphite_strip_mine_loop): int -> unsigned, Fix SCHEDULE
5270 (graphite_transformations): New.
5271 (graphite_transform_loops): Move to graphite_transformations.
5272 * graphite.h (gbb_nb_loops): Return unsigned.
5274 2008-07-04 Tobias Grosser <grosser@fim.uni-passau.de>
5276 * graphite.c (scan_tree_for_params): Fix insertion of parameters into
5277 the domain matrix. This makes scop-0.c work again.
5279 2008-06-20 Richard Guenther <rguenther@suse.de>
5281 * graphite.h: Adjust copyright to GPLv3.
5282 * graphite.c: Likewise.
5283 (stmt_simple_memref_for_scop_p): Split out from ...
5284 (stmt_simple_for_scop_p): ... here. Fix handling of calls
5286 (get_bb_type): Optimize.
5288 (is_bb_addable): Fix memleak, replace is_pred call with
5290 (build_scops): Use current_loops.
5291 (param_index): Fix memleak.
5293 2008-06-20 Konrad Trifunovic <konrad.trifunovic@inria.fr>
5295 * graphite.c: Fix formatting.
5297 2008-06-19 Konrad Trifunovic <konrad.trifunovic@inria.fr>
5299 * graphite.c (new_scop): Memory allocation for SCOP_{NEWIVS, OLDIVS}.
5300 (free_scop): Memory deallocation for SCOP_NEWIVS, SCOP_OLDIVS.
5301 (create_var_name, save_var_name): Newly defined functions.
5302 (initialize_cloog_names): Part of the code factored out to
5304 (clast_to_gcc_expression): Now handles the case of clast_red_sum
5305 in clast_reduction statement.
5306 (graphite_create_new_loop): Now takes a new parameter
5308 (translate_clast): Now also takes the context_loop and bb_exit
5309 parameters. Rewritten the code so that it creates a gimple code
5310 inside the given context.
5311 (outermost_loop_layer, graphite_remove_iv, graphite_rename_ivs,
5312 remove_cond_expr, disconnect_cond_expr,
5313 disconnect_virtual_phi_nodes): Newly defined functions.
5314 * graphite.h (struct scop): added old_ivs vector.
5315 SCOP_OLDIVS: New macro.
5317 2008-06-19 Sebastian Pop <sebastian.pop@amd.com>
5319 * cfgloopmanip.c: Add missing function comments, fix formatting.
5321 2008-06-18 Konrad Trifunovic <konrad.trifunovic@inria.fr>
5323 * cfgloopmanip.c (update_dominators_in_loop): Defined.
5324 (create_empty_loop_on_edge): Defined.
5325 * tree-parloops.c (canonicalize_loop_ivs): Returns tree
5327 * cfgloop.h (create_empty_loop_on_edge): Declared as extern.
5328 (update_dominators_in_loop): Declared as extern
5329 * tree-flow.h (canonicalize_loop_ivs): Declared as extern.
5331 2008-06-16 Tobias Grosser <grosser@fim.uni-passau.de>
5333 * graphite.c (print_graphite_bb): Allow changing number of loops
5335 (initialize_cloog_names): Allow changing number of loops.
5336 (build_cloog_prog): Simplify.
5337 (find_transform): Enable cloog option --strides.
5338 (graphite_swap_loops): New.
5339 (graphite_strip_mine_loop): New.
5340 (graphite_trans_swap_1and2): New.
5341 (graphite_trans_strip): New.
5342 (graphite_transform_loops): Add graphite_trans_strip.
5343 * graphite.h (scop_max_loop_depth): New.
5345 2008-06-15 Tobias Grosser <grosser@fim.uni-passau.de>
5347 * graphite.c (build_scop_iteration_domain): Remove forgotten
5348 line. (Fixes compile)
5350 2008-06-15 Tobias Grosser <grosser@fim.uni-passau.de>
5352 * graphite.c (print_graphite_bb): Add output of GBB_LOOPS.
5353 (build_graphite_bb): Add GBB_LOOPS and GBB_DOMAIN and reorder.
5354 (build_bb_loops): New.
5355 (graphite_transform_loops): Add build_bb_loops.
5356 (schedule_to_scattering): Use gbb_nb_loops to support changing loop
5358 * graphite.h (graphite_bb): Add loops.
5359 (gbb_nb_loops): New.
5360 (gbb_loop_at_index): New.
5361 (gbb_loop_index): New.
5362 (nb_params_in_scop): Renamed to scop_nb_params. Updated all functions
5363 using nb_params_in_scop.
5365 2008-06-14 Tobias Grosser <grosser@fim.uni-passau.de>
5367 * graphite.c (print_graphite_bb): Adapt to minimized schedule.
5368 (build_scop_canonical_schedules): Build minimized schedule.
5369 (schedule_to_scattering): Adapt to minimized schedule.
5370 * graphite.h (graphite_bb): Add/Update descriptions.
5372 2008-06-14 Adrien Eliche <aeliche@isty.uvsq.fr>
5373 Tobias Grosser <grosser@fim.uni-passau.de>
5375 * graphite.c (print_graphite_bb): Add condition printing.
5377 (dump_gbb_conditions): New.
5378 (build_scop_conditions_1): New.
5379 (build_scop_conditions): New.
5380 * graphite.h (graphite_bb): Add conditions.
5382 2008-06-14 Tobias Grosser <grosser@fim.uni-passau.de>
5384 * graphite.c (print_graphite_bb):
5385 (free_graphite_bb): New.
5386 (free_scop): Free bbs.
5387 (get_bb_type): Free doms.
5388 (build_scop_context): Free context matrix.
5389 (build_loop_iteration_domains): Remove unused code.
5390 (build_cloog_prog): Free scattering function and blocklist.
5391 (find_transform): Free options.
5393 2008-06-13 Tobias Grosser <grosser@fim.uni-passau.de>
5395 * graphite.c (loop_body_to_cloog_stmts): Rename to add_bb_domains.
5396 Remove unnecessery cloog data structures. Make a copy of the domain
5397 (setup_cloog_loop): Rename to build_loop_iteration_domains. Remove
5398 unnecessary cloog data structures. Fix memory leaks. Remove insert
5399 into SCOP_LOOP2CLOOG_LOOP as the inserted CloogLoops will never be
5401 (build_scop_iteration_domain): Remove unnecessary cloog
5402 data structures. Fix memory leaks.
5403 (graphite_transform_loops): Disable build_scop_dynamic_schedules as it
5404 uses SCOP_LOOP2CLOOG_LOOP, that is at the moment not working.
5406 2008-06-12 Tobias Grosser <grosser@fim.uni-passau.de>
5408 * graphite.c (find_scop_params): Remove initialize_cloog_names.
5410 2008-06-12 Tobias Grosser <grosser@fim.uni-passau.de>
5412 * graphite.c (end_scop): Style fix.
5413 (schedule_to_scattering): Style and comment fix.
5415 2008-06-12 Tobias Grosser <grosser@fim.uni-passau.de>
5416 * graphite.c (print_graphite_bb): Fix definiton of
5417 schedule_to_scattering.
5418 (initialize_cloog_names): Change nb_scattdims to max loop
5420 (schedule_to_scattering): Take parameter for number of scattering
5422 (build_cloog_prog): Only build as much scattering dimensions as
5425 2008-06-12 Tobias Grosser <grosser@fim.uni-passau.de>
5427 * graphite.c (end_scop): Disable bb splitting. Fixes SIGSEGV
5428 in polyhedron/aermod.f90.
5430 2008-06-11 Tobias Grosser <grosser@fim.uni-passau.de>
5431 Dwarak Rajagopal <dwarak.rajagopal@amd.com>
5432 Harsha Jagasia <harsha.jagasia@amd.com>
5434 * graphite.c (is_bb_addable): Fix segfault.
5436 2008-06-10 Tobias Grosser <grosser@fim.uni-passau.de>
5438 * graphite.c (is_bb_addable): Fix memory leak, handling of loops
5439 with multiple exits and conditional handling in edge cases.
5440 (is_loop_exit): Fix memory leak. (Forgotten in last commit)
5442 * testsuite/gcc.dg/graphite/scop-14.c: New.
5444 2008-06-06 Tobias Grosser <grosser@fim.uni-passau.de>
5445 Adrien Eliche <aeliche@isty.uvsq.fr>
5447 * graphite.c (is_bb_addable): Add more comments and enhance
5448 readablity of the source code. Fix memory leak.
5449 (is_loop_exit): Fix memory leak.
5451 2008-06-05 Tobias Grosser <grosser@fim.uni-passau.de>
5453 * graphite.c (first_loop_in_scop): Deleted.
5454 (setup_cloog_loop): Only walk the loop chain for inner loops.
5455 (build_scop_iteration_domain): Execute setup_cloog_loop for
5456 all loops in the first layer.
5458 2008-06-05 Tobias Grosser <grosser@fim.uni-passau.de>
5460 * graphite.c (scan_tree_for_params): Change the way params are
5461 added to be indepenent of the number of loops.
5462 (setup_cloog_loop): Revert to short matrix format. Fix parameter
5464 (build_cloog_prog): Revert to short matrix format.
5466 2008-06-05 Sebastian Pop <sebastian.pop@amd.com>
5467 Dwarak Rajagopal <dwarak.rajagopal@amd.com>
5469 * tree-loop-fusion.c (fuse_loops): Fix uninitialized variable
5472 2008-06-05 Sebastian Pop <sebastian.pop@amd.com>
5474 * graphite.c (nb_data_refs_in_scop): New.
5475 (graphite_transform_loops): Print more stats: number of
5476 loops, basic blocks and data references per scop.
5478 2008-06-04 Sebastian Pop <sebastian.pop@amd.com>
5479 Jan Sjodin <jan.sjodin@amd.com>
5481 * graphite.c (loop_affine_expr, idx_record_params,
5482 find_scop_parameters, setup_cloog_loop): Use instantiate_scev
5483 instead of instantiate_parameters.
5485 2008-06-04 Tobias Grosser <grosser@fim.uni-passau.de>
5487 * graphite.c (schedule_to_scattering): Fix scattering dimensions,
5488 add support for parameters, add STATIC_SCHEDULE at the right places,
5491 2008-06-04 Tobias Grosser <grosser@fim.uni-passau.de>
5493 * graphite.c (build_scop_loop_nests): Only add the loops, that
5494 are contained completely in the SCoP.
5495 (build_cloog_prog): Disable scattering, until schedule_to_scattering
5496 and the domains are fixed.
5497 (build_scop_canonical_schedules): Add support for bbs not contained
5500 2008-06-04 Tobias Grosser <grosser@fim.uni-passau.de>
5502 * graphite.h (scop_contains_loop): Update comments to match
5503 the actual behavior.
5504 (scop_contains_loop): New.
5505 * graphite.c (schedule_to_scattering): Use scop_contains_loop.
5507 2008-06-04 Sebastian Pop <sebastian.pop@amd.com>
5509 * graphite.c (get_bb_type): On function body, i.e. loop_0,
5510 don't mark blocks as GBB_LOOP_SING_EXIT_HEADER, mark them
5513 2008-06-04 Sebastian Pop <sebastian.pop@amd.com>
5514 Tobias Grosser <grosser@fim.uni-passau.de>
5516 * graphite.c (graphite_transform_loops): Early return when
5517 there are no loops in the function.
5519 2008-05-31 Sebastian Pop <sebastian.pop@amd.com>
5520 Jan Sjodin <jan.sjodin@amd.com>
5522 * graphite.c (scan_tree_for_params, setup_cloog_loop): Compute the
5523 offset of the last loop.
5524 (setup_cloog_loop): Copy the entire outer constraint matrix.
5526 2008-05-31 Sebastian Pop <sebastian.pop@amd.com>
5527 Jan Sjodin <jan.sjodin@amd.com>
5529 * graphite.c (stmt_in_scop_p, function_parameter_p,
5530 invariant_in_scop_p): Removed.
5531 (scan_tree_for_params): Can be used with no constraint
5532 matrix for gathering parameters.
5533 (idx_record_params): Don't use idx_record_param, instead use
5534 scan_tree_for_params.
5535 (find_scop_parameters): Same.
5536 (setup_cloog_loop, build_scop_iteration_domain, build_cloog_prog):
5537 Fix the size of loop domains.
5538 (schedule_to_scattering): Exit when the outer loop is not in scop.
5539 (find_transform): Enable build_cloog_prog.
5541 2008-05-31 Sebastian Pop <sebastian.pop@amd.com>
5542 Jan Sjodin <jan.sjodin@amd.com>
5544 * graphite.c (schedule_to_scattering): Make scattering domains
5545 uniformly of the same size, as required by CLooG 0.14.0 and before.
5547 2008-05-31 Sebastian Pop <sebastian.pop@amd.com>
5548 Jan Sjodin <jan.sjodin@amd.com>
5550 * graphite.c (schedule_to_scattering): Rewrite, correct the
5551 translation of the scheduling function to scattering.
5552 (build_cloog_prog): Call schedule_to_scattering only once.
5553 * graphite.h (scop_loop_index): Do not fail for loops not
5554 in the scop: return -1.
5556 2008-05-30 Tobias Grosser <grosser@fim.uni-passau.de>
5558 * graphite.c (build_graphite_bb): Initialize GBB_DOMAIN.
5559 (loop_body_to_cloog_stmts): Export GBB_DOMAIN.
5560 (setup_cloog_loop): Export GBB_DOMAIN.
5561 (build_cloog_prog): New. Create new CLOOG_PROG, which should be
5562 able to rebuild the original control flow.
5563 * graphite.h (graphite_bb): Add domain field and access macro.
5566 2008-05-30 Sebastian Pop <sebastian.pop@amd.com>
5568 * graphite.c (debug_gbb): New.
5569 (print_scop, build_graphite_bb): Use SCOP_BBS.
5570 (build_scop_bbs): Reimplemented.
5571 (dfs_bb_in_scop_p): Removed.
5572 (build_scop_loop_nests): Reorder loops inserted in
5573 SCOP_LOOP_NEST: outer loops should come first.
5574 (build_scop_canonical_schedules): Reinitialize at zero
5575 the components of the SCOP_STATIC_SCHEDULE for the loops
5576 that have already been parsed.
5578 * graphite.h (debug_gbb): Declared.
5580 2008-05-30 Sebastian Pop <sebastian.pop@amd.com>
5581 Jan Sjodin <jan.sjodin@amd.com>
5583 * graphite.c (create_empty_loop): Renamed graphite_create_new_loop.
5584 (graphite_loop_to_gcc_loop): Removed.
5585 (remove_all_edges): New.
5586 (graphite_stmt_to_gcc_stmt): Renamed translate_clast.
5587 (gloog): Remove useless code.
5589 2008-05-29 Tobias Grosser <grosser@fim.uni-passau.de>
5591 * graphite.c (get_bb_type): Reworked. We distinguish between
5592 loops with one or multiple exits.
5593 (is_loop_exit): New.
5595 (is_bb_addable): Rework condition handling, now support for case
5596 case statements and loops with multiple exits.
5598 * testsuite/gcc.dg/graphite/scop-11.c: New.
5599 * testsuite/gcc.dg/graphite/scop-12.c: New.
5600 * testsuite/gcc.dg/graphite/scop-13.c: New.
5602 2008-05-29 Tobias Grosser <grosser@fim.uni-passau.de>
5604 * graphite.c (dot_all_scops_1): Fix some colors. Reuse colors, if
5605 we have too many colors.
5607 2008-05-22 Sandeep Maram <smaram_b04@iiita.ac.in>
5609 * doc/invoke.texi (-ftree-loop-fusion): Document.
5610 * tree-pass.h (pass_loop_fusion): Declared.
5611 * tree-loop-fusion.c: New.
5612 * timevar.def (TV_TREE_LOOP_FUSION): Declared.
5613 * tree-data-ref.c (find_data_references_in_loop): Make extern.
5614 * tree-data-ref.h (find_data_references_in_loop): Declared.
5615 * common.opt (ftree-loop-fusion): Declared.
5616 * Makefile.in (tree-loop-fusion.o): Added rule and to OBJS-common.
5618 2008-05-21 Sebastian Pop <sebastian.pop@amd.com>
5620 * graphite.c (build_access_matrix): Fix typo from the merge.
5622 2008-05-20 Sebastian Pop <sebastian.pop@amd.com>
5624 * Merge from mainline (130800:135673).
5626 2008-05-07 Sebastian Pop <sebastian.pop@amd.com>
5628 * graphite.c (end_scop): The exit of the scop is not part of the scop.
5629 Update dominators after splitting.
5631 2008-05-07 Sebastian Pop <sebastian.pop@amd.com>
5633 * graphite.c (is_bb_addable): Return the harmful statement.
5634 Factor up some code.
5635 (end_scop): New. Splits end of scope bbs on a harmful statement.
5636 (build_scops_1): Call end_scop.
5638 2008-05-07 Sebastian Pop <sebastian.pop@amd.com>
5640 * graphite.c: (succs_at_same_depth, end_scop, all_preds_visited_p,
5641 all_succs_visited_p, start_new_scop_for_each_succ, start_new_scop,
5642 add_dominators_to_open_scops, stop_last_open_scop, scop_end_loop,
5643 build_scops_1): Removed.
5644 (build_scops_2): Renamed build_scops_1.
5646 2008-05-06 Sebastian Pop <sebastian.pop@amd.com>
5648 * graphite.c: Fix formatting.
5650 2008-05-06 Tobias Grosser <grosser@fim.uni-passau.de>
5652 * graphite.c (get_bb_type): New.
5654 (build_scops_2): New.
5655 (is_bb_addable): New.
5656 (build_scops): Switch the scop detection.
5657 (build_scop_bbs): Add entry bb to scop.
5658 * graphite.h (struct scop): Update comment.
5660 2008-05-06 Tobias Grosser <grosser@fim.uni-passau.de>
5662 * graphite.c (dot_all_scops_1): Fix some incorrect colors and add
5665 2008-05-06 Tobias Grosser <grosser@fim.uni-passau.de>
5667 * testsuite/gcc.dg/graphite/scop-1.c: Update.
5668 * testsuite/gcc.dg/graphite/scop-2.c: Update.
5669 * testsuite/gcc.dg/graphite/scop-4.c: Update.
5670 * testsuite/gcc.dg/graphite/scop-5.c: Add.
5671 * testsuite/gcc.dg/graphite/scop-6.c: Add.
5673 2008-05-06 Sebastian Pop <sebastian.pop@amd.com>
5675 * testsuite/gcc.dg/graphite/scop-0.c: Add.
5676 * testsuite/gcc.dg/graphite/scop-7.c: Add.
5677 * testsuite/gcc.dg/graphite/scop-8.c: Add.
5678 * testsuite/gcc.dg/graphite/scop-9.c: Add.
5679 * testsuite/gcc.dg/graphite/scop-10.c: Add.
5681 2008-05-06 Tobias Grosser <grosser@fim.uni-passau.de>
5683 * graphite.c (scop_affine_expr): Renamed to loop_affine_expr.
5684 Check affine expressions depending on the outermost loop
5686 (stmt_simple_for_scop_p): Same.
5687 (harmfule_stmt_in_scop): Same.
5689 2008-04-28 Tobias Grosser <grosser@fim.uni-passau.de>
5691 * graphite.c (dot_all_scops): Remove incorrect difficult bb coloring,
5692 mark entry and exit, that are not part of the SCoP and update HTML
5695 2008-04-25 Sebastian Pop <sebastian.pop@amd.com>
5697 * graphite.c (basic_block_simple_for_scop_p): Renamed
5699 (save_scop, preds_at_same_depth, test_for_scop_bound): Removed.
5700 (add_dominators_to_open_scops, build_scops_1): Reimplemented.
5701 (all_preds_visited_p, all_succs_visited_p,
5702 start_new_scop_for_each_succ, start_new_scop, stop_last_open_scop,
5703 scop_end_loop): New.
5704 (build_scops): Do not use dfs_enumerate_from.
5706 * testsuite/gcc.dg/graphite/scop-{1,2,4}.c: Updated.
5708 2008-04-23 Sebastian Pop <sebastian.pop@amd.com>
5710 * graphite.c: Add comments to functions that are missing a
5712 (graphite_create_iv): Removed. Merged in graphite_loop_to_gcc_loop.
5714 2008-04-23 Sebastian Pop <sebastian.pop@amd.com>
5716 * graphite.c (nb_params_in_scop): Moved...
5717 (graphite_bb_from_bb, loop_body_to_cloog_stmts): New.
5718 (setup_cloog_loop): Call loop_body_to_cloog_stmts.
5719 (clast_to_gcc_expression): Reduce column size to less than 80.
5720 (graphite_create_iv): Return the new name of the IV.
5721 (find_transform): Set options->esp and options->cpp.
5722 (gloog): Comment out the invalidation of the old loop code.
5723 (initialize_dependence_polyhedron): Replace scop_nb_params with
5726 * graphite.h (nb_params_in_scop): ... here.
5727 (scop_nb_params): Removed.
5728 (loop_domain_dim): Return something even when the loop was not
5729 found in the hash table: avoid ICEing on all the graphite.exp
5732 2008-04-14 Konrad Trifunovic <konrad.trifunovic@inria.fr>
5734 * tree-chrec.c (for_each_scev_op): SCEV can have 3 operands.
5736 * graphite.c (build_scop_dynamic_schedules): Schedule is built
5737 according to nesting level.
5738 (find_scop_parameters): Call instantiate_parameters.
5739 (scan_tree_for_params): Extend it to handle general affine bounds.
5740 Inner loop bound can depend on outer loop induction variable.
5741 (setup_cloog_loop): tmp variable is allocated on stack. Call
5742 instantiate_parameters with respect to outermost_loop_in_scop.
5743 (loop_domain_dim, ref_nb_loops, loop_iteration_vector_dim): moved to
5745 (create_empty_loop): Function loopify should be given edge
5746 probability, instead of edge frequency. Dominance relation from
5747 switch_bb to loop_header.
5748 (clast_to_gcc_expression): Added handling of clast_reduction node.
5749 (gloog): New functionality for removing old loop.
5750 (test_dependence): Factored out from build_rdg_all_levels.
5751 (build_rdg_all_levels): Dependence testing factored out to
5752 test_dependence function.
5754 * graphite.h (struct graphite_bb): Extended with dynamic_schedule.
5755 (loop_domain_dim, ref_nb_loops, loop_iteration_vector_dim): Moved
5758 2008-04-07 Sebastian Pop <sebastian.pop@amd.com>
5760 * graphite.c (free_scop, param_index, initialize_cloog_names,
5761 nb_params_in_scop): Use name_tree map instead of just a tree
5762 for keeping track of the variable name associated to that tree.
5763 (create_empty_loop, gmp_cst_to_tree, clast_name_to_gcc,
5764 clast_to_gcc_expression, graphite_create_iv,
5765 graphite_loop_to_gcc_loop, graphite_cond_to_gcc_cond,
5766 graphite_stmt_to_gcc_stmt): New.
5767 (gloog): Call these.
5768 * graphite.h (struct name_tree): New.
5769 (struct scop): Use name_tree instead of tree for params.
5770 Store a vector of name_tree for new_ivs.
5772 (scop_nb_params): Use name_tree instead of tree.
5774 2008-04-05 Alexander Lamaison <awl03@doc.ic.ac.uk>
5775 Sebastian Pop <sebastian.pop@amd.com>
5777 * tree-bounds.c: New.
5778 * tree-bounds.h: New.
5779 * tree-pass.h: Declare pass_bounds_early and pass_bounds_late.
5780 * passes.c: Schedule pass_bounds_early, pass_bounds_late.
5781 * builtins.c (expand_builtin_alloca): Add flag_bounds as for
5785 * c-cppbuiltin.c: Same.
5789 * tree-outof-ssa.c: Same.
5791 * Makefile.in: Same.
5793 2008-03-15 Antoniu Pop <antoniu.pop@gmail.com>
5794 Sebastian Pop <sebastian.pop@amd.com>
5796 * tree-loop-distribution.c (remaining_stmts,
5797 upstream_mem_writes): Removed static variables.
5798 (copy_loop_before, create_bb_after_loop,
5799 mark_nodes_having_upstream_mem_writes, free_rdg_components,
5800 rdg_build_components, rdg_build_partitions,
5801 dump_rdg_partitions): Extern.
5802 (generate_loops_for_partition, generate_code_for_partition): Do not
5804 (already_processed_vertex_p, predecessor_has_mem_write,
5805 mark_nodes_having_upstream_mem_writes, has_upstream_mem_writes,
5806 rdg_flag_all_uses, rdg_flag_uses, rdg_flag_vertex_and_dependent,
5807 rdg_flag_loop_exits, rdg_flag_similar_memory_accesses,
5808 build_rdg_partition_for_component, rdg_build_partitions, ldist_gen):
5809 Pass remaining_stmts and upstream_mem_writes as parameters.
5810 (rdg_component): Moved...
5811 (build_rdg_partition_for_component): Do not aggregate components when
5812 flag_streamize_loops is set.
5813 (gen_sequential_loops): New.
5814 (ldist_gen): Call gen_sequential_loops.
5816 * tree-pass.h (pass_loop_streamization): Declared.
5818 * omp-low.c (expand_omp_sections): Call add_bb_to_loop on created
5819 basic blocks when loops structures exist.
5821 * builtin-types.def (BT_FN_VOID_PTR_PTR_INT): New.
5823 * tree-ssa-loop-ivopts.c (expr_invariant_in_region_p): New.
5825 * tree-parloops.c (take_address_of, eliminate_local_variables_1,
5826 eliminate_local_variables_stmt, eliminate_local_variables,
5827 separate_decls_in_loop_name, separate_decls_in_loop_stmt,
5828 separate_decls_in_loop, gen_parallel_loop): Make them work on a region
5829 of code delimited by two edges in the CFG.
5830 (separate_decls_in_loop_name): Renamed separate_decls_in_region_name.
5831 (separate_decls_in_loop_stmt): Renamed separate_decls_in_region_stmt.
5832 (separate_decls_in_loop): Renamed separate_decls_in_region. Isolate
5833 the case of parallelisation of reductions.
5834 (create_loop_fn): Extern.
5835 (create_omp_parallel_region): New.
5837 * tree-data-ref.c (dump_data_dependence_relation): Don't call
5838 dump_data_reference for printing dra and drb.
5839 (create_rdg_edge_for_ddr, create_rdg_edges_for_scalar): Initialise
5841 (build_rdg): Don't call free_dependence_relations for the moment, as
5842 we attach dependence relations on each edge of the RDG.
5845 * tree-data-ref.h (rdg_component): ...here.
5846 (struct rdg_edge): New field ddr_p relation.
5847 (RDGE_RELATION): New.
5848 (create_bb_after_loop, copy_loop_before,
5849 mark_nodes_having_upstream_mem_writes, rdg_build_components,
5850 rdg_build_partitions, dump_rdg_partitions,
5851 free_rdg_components): Declared.
5853 * omp-builtins.def (BUILT_IN_GOMP_STREAM_ALIGN_PUSH,
5854 BUILT_IN_GOMP_STREAM_ALIGN_POP): New.
5856 * tree-loop-streamization.c: New.
5858 * tree-flow.h (gather_blocks_in_sese_region, create_loop_fn,
5859 create_omp_parallel_region, expr_invariant_in_region_p): Declared.
5861 * Makefile.in (tree-loop-streamization.o): Added to OBJS-common.
5863 * tree-cfg.c (gather_blocks_in_sese_region): Extern.
5865 * passes.c: Schedule pass_loop_streamization.
5867 2008-03-08 Tobias Grosser <grosser@fmi.uni-passau.de>
5869 * graphite.c (dot_all_scops_1): Fix formatting for difficult bbs and
5872 2008-03-07 Tobias Grosser <grosser@fim.uni-passau.de>
5874 * graphite.c (dot_all_scops): Update formatting.
5875 Bbs can now be part of more than one SCoP.
5877 2008-03-04 Sebastian Pop <sebastian.pop@amd.com>
5879 * graphite.c (new_loop_to_cloog_loop_str, setup_cloog_loop): Fix
5881 (loop_domain_dim): Check for unregistered toplev SCOP loop.
5882 * graphite.h (loop_to_cloog_loop): New.
5884 2008-03-04 Konrad Trifunovic <konrad.trifunovic@inria.fr>
5886 * graphite.c (loop_domain_dim, ref_nb_loops,
5887 loop_iteration_vector_dim): New.
5888 (build_access_matrix_with_af, build_access_matrix,
5889 initialize_dependence_polyhedron): Fixed for new matrix layout.
5890 No longer assume that all iteration domains are of the same
5893 2008-03-02 Sebastian Pop <sebastian.pop@amd.com>
5895 * tree-scalar-evolution.c (instantiate_parameters_1): An SSA_NAME
5896 defined in a loop at depth 0 is invariant.
5897 * tree-chrec.c (evolution_function_is_invariant_rec_p): Ditto.
5898 * tree-ssa-loop-ivopts.c (expr_invariant_in_loop_p): Should never
5899 be called at loop depth 0.
5901 * graphite.c (basic_block_simple_for_scop_p): Take the scop as
5903 (dot_all_scops_1): Update use of basic_block_simple_for_scop_p.
5904 (down_open_scop): Removed.
5905 (loop_in_scop_p): Redefined.
5906 (scop_affine_expr): New argument: scop.
5907 (stmt_simple_for_scop_p): New argument: scop. RETURN_EXPR is not
5908 a harmful statement ending a scop.
5909 (basic_block_simple_for_scop_p): New argument: scop.
5910 (get_loop_start): Removed.
5911 (new_scop): Initialize SCOP_LOOPS.
5912 (free_scop): Free SCOP_LOOPS.
5913 (succs_at_same_depth, preds_at_same_depth): New.
5914 (end_scop): Test the validity of a scop.
5915 (add_dominators_to_open_scops): New.
5916 (test_for_scop_bound): Call add_dominators_to_open_scops.
5917 Add cases for opening and closing multiple scops.
5918 (build_scops, build_scop_bbs): Iterate over basic blocks in
5920 (build_graphite_bb): Pass scop directly.
5921 (dfs_bb_in_scop_p): New.
5922 (scop_record_loop): Use SCOP_LOOPS for not recording the same loop
5924 (nb_loops_around_gb): Use loop_in_scop_p.
5925 (schedule_to_scattering): Disabled for the moment the code computing
5926 the "textual order for outer loop".
5928 * graphite.h (struct scop): New field loops.
5930 (scop_loop_index): Test that the given loop belongs to SCOP_LOOPS.
5932 * testsuite/gcc.dg/graphite/scop-{1,...,7}.c: Updated.
5934 2008-02-27 Antoniu Pop <antoniu.pop@gmail.com>
5935 Sebastian Pop <sebastian.pop@amd.com>
5937 * builtin-types.def (BT_FN_PTR_SIZE_UINT, BT_FN_BOOL_PTR): New.
5938 * common.opt (fstreamize-loops): New.
5939 * omp-builtins.def (BUILT_IN_GOMP_STREAM_CREATE,
5940 BUILT_IN_GOMP_STREAM_PUSH, BUILT_IN_GOMP_STREAM_HEAD,
5941 BUILT_IN_GOMP_STREAM_POP, BUILT_IN_GOMP_STREAM_EOS_P,
5942 BUILT_IN_GOMP_STREAM_SET_EOS, BUILT_IN_GOMP_STREAM_DESTROY): New.
5944 2008-02-22 Konrad Trifunovic <konrad.trifunovic@inria.fr>
5946 * tree-data-ref.c (build_empty_rdg): New.
5947 (build_rdg): Use it.
5948 * tree-data-ref.h (build_empty_rdg): Declared.
5949 * graphite.c (free_scop): Free SCOP_LOOP2CLOOG_LOOP.
5950 (find_vertex_for_stmt): Removed.
5951 (build_rdg_all_levels): Use build_empty_rdg and rdg_vertex_for_stmt.
5953 2008-02-21 Sebastian Pop <sebastian.pop@amd.com>
5955 * tree-loop-distribution.c (generate_builtin): After cancelling the
5956 loop tree, also delete basic blocks.
5957 (rdg_flag_uses): Stop recursion when a vertex has already been
5960 2008-02-15 Konrad Trifunovic <konrad.trifunovic@inria.fr>
5962 * graphite.c (build_scop_alpha): Removed.
5963 (graphite_transform_loops): Add a dummy call to build_all_rdg_levels
5964 and dump_dependence_graph to avoid compiler warnings.
5966 2008-02-14 Konrad Trifunovic <konrad.trifunovic@inria.fr>
5968 * tree-data-ref.c (dr_may_alias_p, create_rdg_vertices): Extern.
5969 * tree-data-ref.h (dr_may_alias_p, create_rdg_vertices): Declared.
5970 * graphite.c (new_loop_to_cloog_loop_str, hash_loop_to_cloog_loop,
5971 eq_loop_to_cloog_loop, del_loop_to_cloog_loop): New.
5972 (new_scop, setup_cloog_loop): Initialize SCOP_LOOP2CLOOG_LOOP.
5973 (initialize_dependence_polyhedron, find_vertex_for_stmt,
5974 initialize_data_dependence_polyhedron, is_empty_polyhedron,
5975 statement_precedes_p, build_rdg_all_levels, build_scop_alpha,
5976 dump_dependence_graph): New.
5977 * graphite.h (struct graphite_bb): New field compressed_alpha_matrix.
5979 (struct scop): New field loop2cloog_loop.
5980 (SCOP_LOOP2CLOOG_LOOP, struct data_dependence_polyhedron,
5981 RDGE_DDP, ddp_p, struct loop_to_cloog_loop_str): New.
5983 2008-02-10 Konrad Trifunovic <konrad.trifunovic@inria.fr>
5985 * graphite.c (build_graphite_bb): Fix initialization
5986 of the graphite basic block.
5988 2008-02-05 Sebastian Pop <sebastian.pop@amd.com>
5990 * graphite.c (scan_tree_for_params): Rewrite for the new layout of
5991 loop domain matrix. Pass in the number of loops contained in the
5993 (nb_loops_around_gb): Moved before setup_cloog_loop that uses it.
5994 (setup_cloog_loop): Rewrite for the new layout of loop domain matrix:
5995 loops that are not surrounding the current loop are not represented
5996 in the domain constraint matrix.
5997 (build_scop_iteration_domain): Initial domain constraint matrix
5998 contains only the eq/ineq, cst, and scop parameters columns.
6000 2008-01-29 Tobias Grosser <grosser@fim.uni-passau.de>
6002 * graphite.c (schedule_to_scattering, nb_loops_around_gb): New.
6003 (print_graphite_bb): Print scattering.
6005 2008-01-29 Tobias Grosser <grosser@fim.uni-passau.de>
6007 * graphite.c (initialize_cloog_names): Initialize names of
6008 scattering variables.
6010 2009-01-29 Tobias Grosser <grosser@fim.uni-passau.de>
6012 * graphite.c (dot_all_scops_1): Disable debug output while
6015 2008-01-29 Tobias Grosser <grosser@fim.uni-passau.de>
6017 * graphite.c (find_transform): Change cloog output language to C.
6019 2008-01-27 Sebastian Pop <sebastian.pop@amd.com>
6021 * tree-loop-distribution.c (generate_memset_zero,
6022 generate_builtin, generate_code_for_partition,
6023 rdg_flag_all_uses): New.
6024 (rdg_flag_uses): Gather in the same partition the statements defining
6025 the VUSES of the current statement.
6026 (rdg_flag_similar_stores): Renamed rdg_flag_similar_memory_accesses.
6027 Gather in the same partition not only the stores to the same memory
6028 access, but also the reads.
6029 (ldist_generate_loops): Renamed ldist_gen.
6031 2008-01-24 Sebastian Pop <sebastian.pop@amd.com>
6032 Tobias Grosser <grosser@fmi.uni-passau.de>
6034 * graphite.c (setup_cloog_loop): Chain all cloog loops with the
6035 next pointer, don't use the inner pointer.
6037 2008-01-20 Tobias Grosser <grosser@fmi.uni-passau.de>
6039 * graphite.c (dot_all_scops, dot_all_scops_1): New.
6040 (find_transform): Call dot_all_1.
6041 * graphite.h (dot_all_scops): Declared.
6043 2007-12-14 Sebastian Pop <sebastian.pop@amd.com>
6045 * tree-loop-distribution.c: Fix apsi.f ICE.
6046 (create_bb_after_loop): New.
6047 (generate_loops_for_partition): Use it.
6048 * testsuite/gfortran.dg/ldist-1.f90: New.
6050 * tree-data-ref.c (dot_rdg): Use /tmp/rdg.dot for dotty format.
6051 * graphite.c (dot_scop): Use /tmp/scop.dot for dotty format.
6053 2007-12-13 Tobias Grosser <grosser@fmi.uni-passau.de>
6055 * graphite.c (find_transform): Dump cloog program sent to cloog.
6057 2007-12-13 Tobias Grosser <grosser@fmi.uni-passau.de>
6059 * graphite.c (initialize_cloog_names): Initialize cloog
6062 2007-12-13 Tobias Grosser <grosser@fmi.uni-passau.de>
6064 * graphite.c (build_scop_context): Fix typo, for the matrix
6065 format: insert '0 >= 0' instead of '-1 >= 0'.
6067 2007-12-13 Sebastian Pop <sebastian.pop@amd.com>
6069 * Fix merge problems.
6071 2007-12-13 Sebastian Pop <sebastian.pop@amd.com>
6073 * graphite.c (setup_cloog_loop): Fix typo.
6075 2007-12-12 Sebastian Pop <sebastian.pop@amd.com>
6077 * doc/invoke.texi (-ftree-loop-distribution): Documented.
6078 * tree-loop-distribution.c: Reimplemented.
6079 * tree-pass.h (pass_loop_distribution): New.
6080 * tree-scalar-evolution.c (number_of_iterations_for_all_loops): Use
6082 * graphds.h (struct graph): New field indexes.
6083 * timevar.def (TV_TREE_LOOP_DISTRIBUTION): New.
6085 * tree-vect-analyze.c: Remove declaration of static functions when not
6087 * tree-vectorizer.c: Same.
6088 (rename_variables_in_loop): Now extern.
6089 (slpeel_tree_duplicate_loop_to_edge_cfg): Renamed
6090 tree_duplicate_loop_to_edge_cfg. Reset PENDING_STMT for edges after
6091 calling redirect_edge_and_branch_force.
6093 * tree-vectorizer.h (tree_duplicate_loop_on_edge): Declared.
6095 * tree-data-ref.c: Don't include tree-chrec.h.
6096 (debug_data_dependence_relations): New.
6097 (dump_data_dependence_relation): Call dump_data_reference on data refs
6099 (same_access_functions): Moved...
6100 (find_vertex_for_stmt): Renamed rdg_vertex_for_stmt.
6101 (dump_rdg_vertex, debug_rdg_vertex, dump_rdg_component,
6102 debug_rdg_component, dump_rdg, debug_rdg, dot_rdg_1, dot_rdg,
6103 struct rdg_vertex_info, ): New.
6104 (create_rdg_edge_for_ddr): Compute the dependence level before looking
6106 (create_rdg_vertices): Initialize the htab of graph->indexes.
6107 Initialize RDG_MEM_WRITE_STMT and RDG_MEM_READS_STMT.
6108 (stmts_from_loop): Don't save LABEL_EXPR.
6109 (hash_stmt_vertex_info, eq_stmt_vertex_info,
6110 hash_stmt_vertex_del): New.
6111 (build_rdg): Initialize rdg->indexes.
6112 (free_rdg, stores_from_loop, ref_base_address,
6113 rdg_defs_used_in_other_loops_p, have_similar_memory_accesses,
6114 have_similar_memory_accesses_1, ref_base_address_1,
6115 remove_similar_memory_refs): New.
6117 * tree-data-ref.h: Include tree-chrec.h.
6118 (debug_data_dependence_relations): Declared.
6119 (same_access_functions): ...here. Now static inline.
6120 (ddr_is_anti_dependent, ddrs_have_anti_deps,
6121 ddr_dependence_level): New.
6122 (struct rdg_vertex): New fields has_mem_write, has_mem_reads.
6123 (RDGV_HAS_MEM_WRITE, RDGV_HAS_MEM_READS, RDG_STMT, RDG_MEM_WRITE_STMT,
6124 RDG_MEM_READS_STMT): New.
6125 (dump_rdg_vertex, debug_rdg_vertex, dump_rdg_component,
6126 debug_rdg_component, dump_rdg, debug_rdg, dot_rdg,
6127 rdg_vertex_for_stmt): Declared.
6128 (struct rdg_edge): New field level.
6129 (RDGE_LEVEL, free_rdg): New.
6130 (stores_from_loop, remove_similar_memory_refs,
6131 rdg_defs_used_in_other_loops_p,
6132 have_similar_memory_accesses): Declared.
6133 (rdg_has_similar_memory_accesses): New.
6135 * lambda.h (dependence_level): New.
6136 * common.opt (ftree-loop-distribution): New.
6137 * tree-flow.h (debug_loop_ir): Renamed debug_loops.
6138 (print_loop_ir): Renamed print_loops.
6139 (debug_loop, debug_loop_num, print_loops_bb, mark_virtual_ops_in_bb,
6140 tree_duplicate_loop_to_edge_cfg, rename_variables_in_loop): Declared.
6141 * Makefile.in (TREE_DATA_REF_H): Depends on tree-chrec.h.
6142 (tree-loop-distribution.o): Added.
6143 * tree-cfg.c (mark_virtual_ops_in_region): Use mark_virtual_ops_in_bb.
6144 (mark_virtual_ops_in_bb): New.
6145 (print_loops_bb, debug_loop_num, debug_loop): New.
6146 * passes.c: Scheduled pass_loop_distribution.
6148 2007-12-12 Konrad Trifunovic <konrad.trifunovic@inria.fr>
6150 * graphite.c (scan_tree_for_params): Correct the number of columns
6152 (nb_flat_iterator): New.
6153 (setup_cloog_loop): Initialize to 1 the first column for inequalities.
6154 (build_scop_iteration_domain): Correct the number of columns for
6157 2007-12-12 Sebastian Pop <sebastian.pop@amd.com>
6159 * Merge from mainline (129697:130800).
6161 2007-10-30 Sebastian Pop <sebastian.pop@amd.com>
6163 * graphite.c (build_graphite_bb): SCoP's basic blocks are post
6164 dominated by SCoP's exit.
6165 (graphite_transform_loops): Compute post dominators.
6167 2007-10-28 Sebastian Pop <sebastian.pop@amd.com>
6169 * Merge from mainline (127169:129697).
6171 2007-10-28 Sebastian Pop <sebastian.pop@amd.com>
6173 * graphite.c (affine_expr): Renamed scop_affine_expr. Use an extra
6174 parameter for the basic block that contains the expression. Use
6175 outermost_loop_in_scop for evolution_function_is_affine_multivariate_p.
6176 (stmt_simple_for_scop_p): Pass to scop_affine_expr the basic block of
6178 * graphite.h (gbb_loop): New.
6179 (GBB_LOOP): Removed.
6181 2007-08-03 Sebastian Pop <sebpop@gmail.com>
6183 * Makefile.in: Fix merge problem.
6185 2007-08-03 Sebastian Pop <sebpop@gmail.com>
6187 * Merge from mainline (125309:127169).
6188 * tree-loop-distribution.c: Disabled.
6190 2007-06-05 Sebastian Pop <sebpop@gmail.com>
6192 * Merge from mainline (r123693:125309).
6194 2007-05-30 Sebastian Pop <sebpop@gmail.com>
6196 * tree-loop-distribution.c (correct_modify_expr_p): Renamed
6198 (correct_modify_p, check_statements, number_of_lvalue_uses,
6199 number_of_scalar_dependences, create_edges): Use GIMPLE_MODIFY_STMT
6200 instead of MODIFY_EXPR.
6201 (update_edge_with_ddv): Don't pass index_of_edge. Initialize
6204 2007-05-24 Sebastian Pop <sebpop@gmail.com>
6206 * tree-loop-distribution.c (struct rdg): Replace arrays by
6207 VECs for edges and vertices.
6208 (RDG_NBV, RDG_NBE, RDG_VERTEX, RDG_EDGE): Removed.
6209 (RDGV_NB_PARTITIONS): New.
6210 (PRDG_NBV, PRDG_NBE): Removed.
6211 (build_scc_graph, correct_partitions_p, mark_partitions, build_prdg,
6212 dump_rdg, find_vertex_with_stmt, create_vertices, free_rdg,
6213 number_of_scalar_dependences, create_edges, build_rdg): Use VECs.
6215 2007-05-17 Georges-Andre Silber <silber@cri.ensmp.fr>
6216 Sebastian Pop <sebpop@gmail.com>
6218 * doc/invoke.texi (-ftree-loop-distribution): Document.
6219 * tree-loop-distribution.c: New file.
6220 * tree-pass.h (pass_loop_distribution): Declared.
6221 * timevar.def (TV_TREE_LOOP_DISTRIBUTION): New.
6222 * tree-data-ref.c (initialize_data_dependence_relation): Initialize
6224 * tree-data-ref.h (data_dependence_relation): Add reversed_p.
6225 (DDR_REVERSED_P): New.
6226 * common.opt (-ftree-loop-distribution): New.
6227 * tree-flow.h (distribute_loops): Declared.
6228 * Makefile.in (OBJS-common): Depend on tree-loop-distribution.o.
6229 * passes.c (init_optimization_passes): Schedule loop distribution.
6231 2007-05-12 Sebastian Pop <sebastian.pop@inria.fr>
6233 * graphite.c (print_graphite_bb): Don't call dump_data_references.
6234 (print_scop): Don't print when scop is NULL.
6235 (build_scop_context, find_transform): Don't output to stderr.
6237 2007-05-09 Sebastian Pop <sebastian.pop@inria.fr>
6239 * tree-data-ref.c: Don't include graphite.h.
6240 Comment out the code for printing data reference's scop.
6241 (build_access_matrix_with_af): Moved...
6242 * tree-data-ref.h (build_access_matrix_with_af): Removed declaration.
6243 * graphite.c (build_access_matrix_with_af): ... here. Now static.
6244 (print_graphite_bb): Print basic block's schedule.
6245 (print_scop): Don't print the schedule, call cloog's pretty printer.
6246 (bb_in_scop_p): A basic block is in a scop only if it is both
6247 dominated and postdominated by the scop's entry and exit basic blocks.
6248 (function_parameter_p): New.
6249 (invariant_in_scop_p): Use function_parameter_p.
6250 (new_scop, save_scop): New.
6251 (end_scop, test_for_scop_bound, build_scops): Use new_scop, and
6253 (scan_tree_for_params): Directly build the constraint as CloogMatrix.
6254 (loop_in_scop_p): New.
6255 (scop_record_loop): Use loop_in_scop_p.
6256 (build_scop_domain): Renamed build_scop_iteration_domain.
6257 (setup_cloog_loop, initialize_cloog_names, find_scop_parameters,
6258 nb_params_in_scop, build_scop_context, first_loop_in_scop,
6259 setup_cloog_loop, dot_scop_1, dot_scop): New.
6260 * graphite.h (GBB_LOOP, SCOP_PROG, dot_scop): New.
6261 (struct scop): Add a pointer to cloog's representation of a program.
6263 2007-04-14 Sebastian Pop <sebastian.pop@inria.fr>
6265 * doc/invoke.texi (-ftree-check-verbose): Renamed
6266 -ftree-checks-verbose.
6267 * common.opt (flag_tree_check_verbose): Renamed
6268 flag_tree_checks_verbose.
6269 * tree-check.c (tree_check_warning): Use flag_tree_checks_verbose.
6271 2007-04-14 Sebastian Pop <sebastian.pop@inria.fr>
6273 * configure: Regenerated.
6274 * config.in: Regenerated.
6275 * tree-ssa-loop.c (graphite_transforms): Execute
6276 graphite_transform_loops only when HAVE_cloog.
6277 * configure.ac (HAVE_polylib, HAVE_cloog, GRAPHITE): Defined.
6278 * graphite.c: Include polylibgmp.h and cloog.h.
6279 (graphite_transform_loops): Removed loops parameter.
6280 * tree-flow.h (graphite_transform_loops): Update declaration.
6281 * Makefile.in (POLYLIBLIBS, POLYLIBINC, CLOOGLIBS, CLOOGINC): New.
6282 (LIBS): Depend on CLOOGLIBS and on POLYLIBLIBS.
6283 (INCLUDES): Depend on POLYLIBINC and on CLOOGINC.
6284 (OBJS-common): Remove dependence on graphite.o.
6285 (BACKEND): Depend on @GRAPHITE@.
6287 2007-04-13 Sebastian Pop <sebastian.pop@inria.fr>
6289 * doc/invoke.texi (-ftree-check-verbose): Documented.
6290 * testsuite/gcc.dg/tree-checker/tree-checks-1.c: New.
6291 * testsuite/gcc.dg/tree-checker/tree-checks-2.c: New.
6292 * testsuite/gcc.dg/tree-checker/tree-checks-3.c: New.
6293 * testsuite/gcc.dg/tree-checker/tree-checks-4.c: New.
6294 * testsuite/gcc.dg/tree-checker/tree-checks.exp: New.
6295 * testsuite/gcc.dg/tree-checker/condates.crp: New.
6296 * common.opt (ftree-checks-verbose): New.
6297 * tree-check.c (tree_check_warning): Move extra stderr output
6298 under control of flag_tree_check_verbose.
6300 2007-04-12 Sebastian Pop <sebastian.pop@inria.fr>
6302 * tree-match.c: Fix comments formatting.
6303 * tree-match.h: Fix comments formatting.
6304 * tree-check.c: Fix comments formatting.
6305 (tree_check_init): Restructure.
6307 2007-04-12 Nic Volanschi <nic.volanschi@free.fr>
6309 * doc/invoke.texi (-ftree-check, -ftree-checks): Documented.
6311 2007-04-10 Sebastian Pop <sebastian.pop@inria.fr>
6313 * Merge from mainline (r120733:123693).
6315 2007-03-20 Nic Volanschi <nic.volanschi@free.fr>
6317 * condate.y: New file.
6318 * tree-match.h (struct patt_info_s): New field sign.
6319 (struct condate_s): New field msg.
6320 (normalize_condate, name_condate, add_condate): New.
6321 (conds[], condate_parse): Made extern.
6322 * tree-check.c (tree_check_warning): First arg changed to cond;
6323 warning reformatted.
6324 (tree_check_init): Reset the TREE_VISITED bit on every CFG node.
6326 (tree_check): Process trivial condates.
6327 (read_delimited_string): Removed.
6328 (print_cond): Print name and msg.
6329 (conds[]): Made extern.
6330 (parse_tree_check_file_once): Rewritten to use the parser in
6332 Processing of option --tree_check_string moved to tree_scan().
6333 * Makefile.in: Added condate.y
6335 2007-03-12 Sebastian Pop <sebastian.pop@inria.fr>
6337 * tree-pretty-print.c (dump_generic_bb_buff, lazy_dump_generic_node):
6338 Use VECs instead of varrays.
6339 * diagnostic.h (lazy_dump_generic_node): Update declaration.
6340 * Makefile.in (pretty-print.o): Depend on vec.h.
6341 * pretty-print.c: Include tree.h and vec.h.
6342 (pp_clear_state, pp_write_list_to_stream, pp_base_format,
6343 pp_base_format, pp_construct, pp_base_string, pp_lazy_mode,
6344 new_tree_chunk, pp_add_tree, pp_add_string, pp_add_char, pp_write_list,
6345 pp_free_list): Use VECs instead of varrays.
6346 * pretty-print.h: Do not include varray.h.
6347 (struct tree_chunk_s): Declaration moved before its use.
6348 (output_buffer): Rename varray field to chunks.
6349 * tree-match.c (tree_equal, chunk_1st_char, chunks_lookahead,
6350 tree_1st_char, match_chunks_pattinfo, match_tree_pattinfo,
6351 save_global_holes): Use VECs instead of varrays.
6352 * tree-match.h: Declare VECs of cfg_node, and hole_p.
6353 * tree-check.c (scan_cfg_stmts, push_node,
6354 print_matching_stmt): Removed.
6355 (tree_check_instance, push_global_holes_if_new, tree_check,
6356 execute_tree_check): Use VECs instead of varrays.
6357 (gate_tree_check): Don't execute the CFG check when basic_block_info
6360 2007-01-12 Sebastian Pop <sebastian.pop@inria.fr>
6362 * Merge from mainline (r115016:120733).
6364 2007-01-12 Sebastian Pop <sebastian.pop@inria.fr>
6366 * Merge from mainline (r117632:117661).
6368 2007-01-12 Sebastian Pop <sebastian.pop@inria.fr>
6370 * tree-dump.c (dump_option_value_in): Add TDF_DEBUG.
6371 * tree-pass.h (TDF_DEBUG, debug_p): New.
6372 * tree-scalar-evolution.c (set_scalar_evolution, get_scalar_evolution,
6373 get_scalar_evolution, add_to_evolution, set_nb_iterations_in_loop,
6374 get_loop_exit_condition, analyze_evolution_in_loop,
6375 analyze_initial_condition, analyze_scalar_evolution,
6376 instantiate_parameters, number_of_latch_executions): Use debug_p.
6377 * tree-chrec.c (chrec_apply): Use debug_p.
6378 * tree-data-ref.c: Include graphite.h.
6379 (dump_data_reference): Print also the access matrix.
6380 (analyze_array, analyze_indirect_ref, init_data_ref,
6381 analyze_offset_expr, address_analysis, object_analysis,
6382 create_data_ref, finalize_ddr_dependent,
6383 non_affine_dependence_relation, analyze_ziv_subscript,
6384 analyze_siv_subscript_cst_affine,
6385 compute_overlap_steps_for_affine_1_2, analyze_subscript_affine_affine,
6386 can_use_analyze_subscript_affine_affine, analyze_siv_subscript,
6387 analyze_miv_subscript, analyze_overlapping_iterations,
6388 build_classic_dist_vector, subscript_dependence_tester,
6389 compute_affine_dependence, analyze_all_data_dependences): Use debug_p.
6390 (build_access_matrix_with_af): No longer static.
6391 * tree-data-ref.h (scop_p): ... declaration here.
6392 (data_reference.scop): New field.
6393 (DR_SCOP, DR_ACCESS_MATRIX): New.
6394 (build_access_matrix_with_af, dr_num_subscripts): Declared.
6395 * graphite.c (print_graphite_bb): Call dump_data_references.
6396 (print_scop): Use scop_nb_loops and scop_dim_domain.
6397 (test_for_scop_bound): Use debug_p.
6398 (scan_tree_for_params): Use scop_nb_loops, scop_nb_loops and
6400 (scop_loop_index): Moved...
6401 (scop_record_loop): New.
6402 (build_scop_loop_nests): Use scop_record_loop.
6403 (build_scop_domain): Use scop_dim_domain.
6404 (build_access_matrix): Implemented.
6405 (build_scop_canonical_schedules): Use scop_nb_loops.
6406 (build_graphite_bb): Initialize GBB_SCOP.
6407 * graphite.h (scop_p): Moved...
6408 (graphite_bb.scop): New field.
6409 (graphite_bb.iteration_domain, GBB_DOMAIN, scop.nb_params,
6410 scop.nb_loops, scop.dim_domain, SCOP_NB_LOOPS, SCOP_NB_PARAMS,
6411 SCOP_DIM_DOMAIN, SCOP_STMTS): Removed.
6412 (scop_nb_params, scop_nb_loops, scop_dim_domain, gbb_dim_domain,
6413 scop_loop_index): New.
6414 * Makefile.in (tree-data-ref.o): Depends on graphite.h.
6416 2007-01-05 Sebastian Pop <sebastian.pop@inria.fr>
6418 * Merge from mainline (r117661:120450).
6420 2006-10-12 Sebastian Pop <sebastian.pop@inria.fr>
6422 * tree-scalar-evolution.c (instantiate_parameters_1): Don't stop
6423 at the first declaration outside the varying loop, instantiate as
6425 * tree-chrec.c (for_each_scev_op): New.
6426 * tree-chrec.h (for_each_scev_op): Declared.
6427 * tree-ssa-loop.c (pass_graphite_trans): Don't dump the function.
6428 * tree-data-ref.c (get_references_in_stmt,
6429 find_data_references_in_stmt): New, from trunk.
6430 (find_data_references_in_loop): Use get_references_in_stmt
6431 and find_data_references_in_loop, modified as in trunk.
6432 (build_access_matrix_with_af): New.
6433 * tree-data-ref.h (data_reference): Add a field access_matrix.
6434 (data_ref_loc): New, as in trunk.
6435 * graphite.c (print_graphite_bb, bb_in_scop_p, stmt_in_scop_p,
6436 invariant_in_scop_p, param_index, scan_tree_for_params,
6437 scop_loop_index, build_scop_loop_nests, build_scop_domain, irp_data,
6438 idx_record_param, idx_record_params, build_access_matrix,
6439 build_scop_data_accesses, build_scop_canonical_schedules,
6440 build_graphite_bb, build_scop_bbs, find_params_in_bb,
6441 build_scop_params): New.
6442 * graphite.h (graphite_bb): New.
6443 (scop): Add fields static_schedule, params, loop_nest,
6445 * lambda.h: Declare vecs of lambda_matrix.
6446 * tree-flow.h (print_loop_ir_bb): Declared.
6447 * tree-cfg.c (print_loop_ir_bb): New.
6448 (print_loop): Use print_loop_ir_bb.
6450 2006-10-12 Sebastian Pop <pop@cri.ensmp.fr>
6452 * Merge from mainline (r115016:117632).
6454 2006-10-11 Sebastian Pop <pop@cri.ensmp.fr>
6456 * graphite.c (debug_scops): Adjust definition for avoiding a bootstrap
6457 break due to a warning.
6459 2006-10-10 Sebastian Pop <pop@cri.ensmp.fr>
6461 * graphite.c (print_scops, debug_scops): New.
6462 (graphite_transform): Renamed graphite_find_transform.
6463 * graphite.h (debug_scops): Declared.
6465 2006-08-17 Sebastian Pop <pop@cri.ensmp.fr>
6467 * tree-match.c: Reformat following the GNU style.
6468 * tree-match.h: Reformat following the GNU style.
6469 * tree-pattern.h: Removed empty file.
6470 * Makefile.in: Remove references to tree-pattern.h.
6471 * tree-check.c: Reformat following the GNU style.
6472 (execute_tree_check): Move gate condition code to...
6473 (gate_tree_check): ...here. New function.
6474 (pass_check): Use the gate function.
6476 2006-07-04 Nic Volanschi <nic.volanschi@free.fr>
6478 * tree-pattern.h: New. Tree pattern matching and checking using
6480 * tree-check.c: New. Tree/CFG checking pass.
6481 * tree-match.c: New. Library for tree pattern matching.
6482 * opts.c, common.opt: Add options --ftree-check & --ftree-checks.
6483 * toplev.c, flags.h: Add globals for tree-check pass.
6484 * Makefile.in: Integrate the files in tree-check pass.
6485 * timevar.def, tree-optimize.c, tree-pass.h: Register tree-check pass.
6486 * pretty-print.c, pretty-print.h, tree-pretty-print.c, diagnostic.h:
6487 Introduce a "lazy" pretty-print mode.
6488 * tree.c, tree.h: Add tree_name.
6490 2006-07-04 Sebastian Pop <pop@cri.ensmp.fr>
6492 * doc/invoke.texi (-fgraphite): Correct typo.
6493 * tree-scalar-evolution.c (number_of_iterations_for_all_loops): Update
6494 use of print_loop_ir.
6495 * testsuite/gcc.dg/graphite/scop-1.c: New.
6496 * testsuite/gcc.dg/graphite/scop-2.c: New.
6497 * testsuite/gcc.dg/graphite/graphite.exp: New.
6498 * graphite.c: Include domwalk.h.
6499 (print_scop): Print only the entry and exit blocks.
6500 (debug_scop): No longer static.
6501 (affine_expr): Fix formating. Return also true when the expression is
6503 (stmt_simple_for_scop_p): Fix formating.
6504 (build_scops): Use domwalk.
6505 (get_loop_start, end_scop, test_for_scop_bound): New.
6506 (graphite_transform_loops): Avoid printing on stderr.
6507 * graphite.h (debug_scop): Declared.
6508 * tree-flow.h (debug_loop_ir, print_loop_ir): Update declarations.
6509 * Makefile.in (graphite.o): Depend on domwalk.h.
6510 * tree-cfg.c (print_loop, print_pred_bbs, print_succ_bbs): Remove
6511 declarations for static functions.
6512 (print_loop, print_loop_ir, debug_loop_ir): Use an extra parameter for
6513 controlling output verbosity.
6515 2006-06-26 Sebastian Pop <pop@cri.ensmp.fr>
6516 Plesco Alexandru <shurikx@gmail.com>
6518 * doc/invoke.texi (-fgraphite): Document.
6519 * tree-pass.h (pass_graphite_transforms): Declared.
6520 * timevar.def (TV_GRAPHITE_TRANSFORMS): New.
6521 * tree-ssa-loop.c (graphite_transforms, gate_graphite_transforms): New.
6522 (pass_graphite_transforms): Defined.
6523 * tree-data-ref.c (free_data_ref, data_reference): Extern.
6524 * tree-data-ref.h (free_data_ref, data_reference): Declared.
6525 * graphite.c, graphite.h: New.
6526 * common.opt (fgraphite): Declared.
6527 * tree-flow.h (graphite_transform_loops): Declared.
6528 * Makefile.in (OBJS-common): Add graphite.o.
6529 (graphite.o): New rule.
6530 * passes.c (pass_graphite_transforms): Scheduled.