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