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