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