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