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