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