]> git.ipfire.org Git - thirdparty/gcc.git/blame - gcc/ChangeLog.graphite
graphite-poly.c (loop_to_lst): Fix LST creation.
[thirdparty/gcc.git] / gcc / ChangeLog.graphite
CommitLineData
c0fe753b
SP
12009-10-14 Sebastian Pop <sebastian.pop@amd.com>
2
3 * graphite-poly.c (loop_to_lst): Fix LST creation.
4
8d75ec87
TG
52009-10-14 Tobias Grosser <grosser@fim.uni-passau.de>
6
7 * testsuite/gcc.dg/graphite/id-15.c: (8 * 8) replaced with
8 sizeof(unsigned long) to make it run on 32bit systems.
9
102009-10-14 Tobias Grosser <grosser@fim.uni-passau.de>
11
12 * testsuite/gcc.dg/graphite/run-id-1.c: Use smaller matrix to not
13 SEGFAULT on 32bit.
14
2e5a7cbf
RU
152009-10-14 Ramakrishna Upadrasta <Ramakrishna.Upadrasta@inria.fr>
16
8d75ec87
TG
17 * graphite-sese-to-poly.c (write_alias_graph_to_ascii_dimacs): Fix
18 Comment.
2e5a7cbf
RU
19 (write_alias_graph_to_ascii_dot): New.
20 (write_alias_graph_to_ascii_ecc): Ditto.
8d75ec87
TG
21 (partition_drs_to_sets): Add testing of optimality of current method
22 which assigns alias numbers according to DFS Comopnent number. used
23 as heuristic for the upcoming ECC algorithm.
2e5a7cbf
RU
24 (build_scop_drs): Write to file also with the ecc and dot format.
25
1e82de2a
SP
262009-10-13 Sebastian Pop <sebastian.pop@amd.com>
27
28 * gfortran.dg/graphite/interchange-1.f: XFail.
29
9bf13085
SP
302009-10-13 Sebastian Pop <sebastian.pop@amd.com>
31
32 * graphite.c (graphite_initialize): Do not handle functions with
33 more than 100 basic blocks.
34
e797c5f2
SP
352009-10-13 Sebastian Pop <sebastian.pop@amd.com>
36
37 * graphite-blocking.c (pbb_do_strip_mine): Use
38 PARAM_LOOP_BLOCK_TILE_SIZE.
39
bfa00f48
SP
402009-10-13 Sebastian Pop <sebastian.pop@amd.com>
41
42 * graphite-poly.c (dot_lst_1): New.
43 (dot_lst): New.
44 * graphite-poly.h (dot_lst): Declared.
45
3c7bdeb8
SP
462009-10-13 Sebastian Pop <sebastian.pop@amd.com>
47
48 * graphite-dependences.c (dot_deps_stmt_1): New.
49 (dot_deps_stmt): New.
50 * graphite-dependences.h (dot_deps_stmt): Declared.
51
c7dc2fab
SP
522009-10-09 Sebastian Pop <sebastian.pop@amd.com>
53
54 * graphite-sese-to-poly.c (rewrite_cross_bb_scalar_dependence): Do
55 not replace cross BB scalar dependences ending on PHI nodes.
56 (rewrite_cross_bb_scalar_deps): Filter out GIMPLE_PHI nodes.
57
24c79709
SP
582009-10-09 Sebastian Pop <sebastian.pop@amd.com>
59
60 * graphite-poly.c (apply_poly_transforms): Implement the high
61 level driver for flag_loop_block.
62 * tree-ssa-loop.c (gate_graphite_transforms): Remove call to sorry for
63 flag_loop_block.
64
65 * gcc.dg/graphite/graphite.exp (DEFAULT_CFLAGS_GRAPHITE_BLOCK): Add
66 -floop-block.
67 * gfortran.dg/graphite/graphite.exp (DEFAULT_CFLAGS_GRAPHITE_BLOCK):
68 Add -floop-block.
69
a0517b76
SP
702009-10-09 Sebastian Pop <sebastian.pop@amd.com>
71
72 * graphite-poly.h (lst_find_pbb): New.
73 (find_lst_loop): New.
74
9d077835
SP
752009-10-09 Sebastian Pop <sebastian.pop@amd.com>
76
77 * graphite-poly.c (new_scop): Remove init of SCOP_DEP_GRAPH.
78 * graphite-poly.h (struct scop): Remove dep_graph field.
79 (SCOP_DEP_GRAPH): Removed.
80
75b63a91
SP
812009-10-09 Sebastian Pop <sebastian.pop@amd.com>
82
83 * graphite-poly.h (copy_lst): Do full copy of LST.
84
7cc4ff8d
SP
852009-10-07 Sebastian Pop <sebastian.pop@amd.com>
86
87 * graphite-sese-to-poly.c (reduction_phi_p): Call remove_invariant_phi
88 when the loop stride is zero.
89
90 * gcc.dg/graphite/id-16.c: New.
91
60d2a8c3
SP
922009-10-06 Sebastian Pop <sebastian.pop@amd.com>
93
94 * graphite-dependences.c (reduction_dr_1): New.
95 (reduction_dr_p): New.
96 (graphite_legal_transform_dr): Call reduction_dr_p.
97 (reduction_ddr): Renamed reduction_ddr_p.
98 * graphite-poly.h (same_pdr_p): New.
99 (number_of_write_pdrs): New.
100 * graphite-sese-to-poly.c (nb_data_writes_in_bb): New.
101 (split_reduction_stmt): Do not split reduction statements
102 when there are no writes to memory.
103 (translate_scalar_reduction_to_array_for_stmt): Insert the
104 memory reduction statement just after the scalar reduction statement.
105
106 * gcc.dg/graphite/interchange-10.c: Updated to differ from interchange-4.c.
107 Un-XFAIL-ed.
108 * gcc.dg/graphite/interchange-3.c: Un-XFAIL-ed.
109 * gcc.dg/graphite/interchange-4.c: Un-XFAIL-ed.
110
95baeff8
SP
1112009-10-06 Sebastian Pop <sebastian.pop@amd.com>
112
113 * graphite-interchange.c (lst_apply_interchange): New.
114 (lst_interchange_profitable_p): New.
115 (lst_try_interchange_loops): New.
116 (lst_try_interchange): New.
117 (lst_do_interchange): New.
118 (pbb_do_interchange): Removed.
119 (scop_do_interchange): Call lst_do_interchange.
120
a36d12e2
SP
1212009-10-06 Sebastian Pop <sebastian.pop@amd.com>
122
123 * graphite-poly.c (print_scop): Print SCOP_ORIGINAL_SCHEDULE and
124 SCOP_TRANSFORMED_SCHEDULE.
125 (loop_to_lst): New.
126 (scop_to_lst): New.
127 (print_lst): New.
128 (debug_lst): New.
129 * graphite-poly.h (lst_p): New.
130 (struct lst): New.
131 (LST_LOOP_P): New.
132 (LST_LOOP_FATHER): New.
133 (LST_PBB): New.
134 (LST_SEQ): New.
135 (scop_to_lst): Declared.
136 (print_lst): Declared.
137 (debug_lst): Declared.
138 (new_lst_loop): New.
139 (new_lst_stmt): New.
140 (copy_lst): New.
141 (lst_depth): New.
142 (lst_dewey_number): New.
143 (struct scop): Add original_schedule and transformed_schedule fields.
144 (SCOP_ORIGINAL_SCHEDULE): New.
145 (SCOP_TRANSFORMED_SCHEDULE): New.
146 * graphite-sese-to-poly.c (build_poly_scop): Call scop_to_lst.
147
a0dd1440
SP
1482009-10-05 Sebastian Pop <sebastian.pop@amd.com>
149
150 * graphite-dependences.c (reduction_ddr): New.
151 (graphite_legal_transform_bb): Call reduction_ddr.
152 * graphite-poly.c (new_poly_bb): Pass a new bool parameter.
153 Initialize PBB_IS_REDUCTION.
154 * graphite-poly.h (struct poly_bb): New bool field is_reduction.
155 (PBB_IS_REDUCTION): New.
156 (new_poly_bb): Update declaration.
157 * graphite-scop-detection.h (build_scop_bbs): Removed.
158 (nb_reductions_in_loop): Removed.
159 * graphite-sese-to-poly.c (try_generate_gimple_bb): Pass a sbitmap
160 parameter for reductions.
161 (try_generate_gimple_bb): Update call to new_poly_bb.
162 (build_scop_bbs_1): Same.
163 (build_scop_bbs): Same.
164 (gsi_for_phi_node): New.
165 (scalar_close_phi_node_p): Remove gcc_assert.
166 (split_reduction_stmt): New.
167 (is_reduction_operation_p): New.
168 (phi_contains_arg): New.
169 (follow_ssa_with_commutative_ops): New.
170 (detect_commutative_reduction_arg): New.
171 (detect_commutative_reduction_assign): New.
172 (follow_inital_value_to_phi): New.
173 (edge_initial_value_for_loop_phi): New.
174 (initial_value_for_loop_phi): New.
175 (detect_commutative_reduction): New.
176 (translate_scalar_reduction_to_array_for_stmt): New.
177 (insert_copyout): New.
178 (insert_copyin): New.
179 (translate_scalar_reduction_to_array): New.
180 (rewrite_commutative_reductions_out_of_ssa_close_phi): New.
181 (rewrite_commutative_reductions_out_of_ssa_loop): New.
182 (rewrite_commutative_reductions_out_of_ssa): New.
183 (build_poly_scop): Call rewrite_commutative_reductions_out_of_ssa.
184 * sese.h (split_region_for_bb): New.
185
186 * gcc.dg/graphite/graphite.exp (DEFAULT_CFLAGS_GRAPHITE_BLOCK): Add -ffast-math.
187 * gcc.dg/graphite/interchange-1.c: Fix format.
188 * gcc.dg/graphite/interchange-10.c: New.
189
db7e9485
SP
1902009-10-05 Sebastian Pop <sebastian.pop@amd.com>
191
192 * graphite-sese-to-poly.c (insert_out_of_ssa_copy): Remove
193 buggy assert.
194
5dcc64d9
SP
1952009-10-05 Sebastian Pop <sebastian.pop@amd.com>
196
197 * graphite-sese-to-poly.c (scev_analyzable_p): New.
198 (rewrite_cross_bb_scalar_dependence): New.
199 (rewrite_cross_bb_scalar_deps): New.
200 (rewrite_reductions_out_of_ssa): Use bb_in_sese_p.
201 Call rewrite_cross_bb_scalar_deps.
202
947121b8
SP
2032009-10-05 Sebastian Pop <sebastian.pop@amd.com>
204
205 * graphite-sese-to-poly.c (gsi_for_ssa_name_def): Removed.
206 (insert_out_of_ssa_copy): Directly use gsi_after_labels and
207 gsi_for_stmt.
208
d48e288d
SP
2092009-10-05 Sebastian Pop <sebastian.pop@amd.com>
210
211 * graphite-clast-to-gimple.c (build_cloog_prog): Use pbb_index.
212 * graphite-interchange.c (pbb_do_interchange): Same.
213 * graphite-poly.c (print_scattering_function): Same.
214 (debug_pdrs): Same.
215 * graphite-poly.h (pbb_loop): New.
216 * graphite-sese-to-poly.c (create_linear_expr_from_tree): Use pbb_loop.
217
d17286f6
SP
2182009-09-27 Sebastian Pop <sebastian.pop@amd.com>
219
220 * graphite-scop-detection.c (limit_scops): Do not build poly_bbs.
221
ee03cd20
SP
2222009-09-27 Sebastian Pop <sebastian.pop@amd.com>
223
224 * graphite-sese-to-poly.c (partition_drs_to_sets): Drs is not modified,
225 so don't pass a pointer to it.
226 (build_alias_set_for_drs): Same.
227 (build_base_obj_set_for_drs): Same.
228 (build_scop_drs): Same.
229
888beba1
LF
2302009-09-26 Li Feng <nemokingdom@gmail.com>
231
232 * graphite-sese-to-poly.c (build_scop_drs): Disable writing to file
233 the alias graph of data references.
234
cd43e5d7
LF
2352009-09-25 Li Feng <nemokingdom@gmail.com>
236
237 * graphite-sese-to-poly.c (write_alias_graph_to_ascii_dimacs): New.
238 (build_scop_drs): When debugging, write the alias graph to file,
239 otherwise, should be disabled.
240
aeda6535
SP
2412009-09-17 Sebastian Pop <sebastian.pop@amd.com>
242
243 * graphite-scop-detection.c (stmt_simple_memref_p): Removed.
244 (is_simple_operand): Remove call to stmt_simple_memref_p.
245 (stmt_simple_for_scop_p): Update call to is_simple_operand.
246
8b6b8570
DE
2472009-09-17 David Edelsohn <edelsohn@gnu.org>
248
8971eb91 249 * testsuite/gcc.dg/graphite/interchange-mvt.c: New File.
8b6b8570
DE
250 * testsuite/gcc.dg/graphite/scop-dsyrk.c: New File.
251 * testsuite/gcc.dg/graphite/scop-dsyr2k.c: New File.
252 * testsuite/gcc.dg/graphite/scop-mvt.c: New File.
253 * testsuite/gcc.dg/graphite/scop-sor.c: New File.
254
1825f9a2
LF
2552009-09-17 Li Feng <nemokingdom@gmail.com>
256
257 PR middle-end/41118
258 * graphite-dependences.c (poly_drs_may_alias_p): Adjust definition.
259 (pddr_original_scattering): Make sure 2 pdr2 in the same base object set.
260 (graphite_carried_dependence_level_k): Ditto.
261 * graphite-poly.c (new_poly_dr): Add init of PDR_BASE_OBJECT_SET.
262 * graphite-poly.h (struct poly_dr): Add member dr_base_object_set.
263 (new_poly_dr): Adjust declaration.
264 * graphite-sese-to-poly.c (free_data_refs_aux): New.
265 (free_gimple_bb): Added free_data_refs_aux.
266 (build_poly_dr): Add dr_base_object_set.
267 (partition_drs_to_sets): New.
268 (dr_same_base_object_p): New.
269 (build_alias_set_for_drs): New.
270 (build_base_object_set_for_drs): New.
271 (build_scop_drs): Add build_base_obj_set_for_drs.
272 * graphite-sese-to-poly.h: Added #define for alias set number index and
273 base object set index.
274 * libgomp/testsuite/libgomp.graphite/force-parallel-6.c: Refine tests.
275 * libgomp/testsuite/libgomp.graphite/pr4118.c: New.
276
ac90803f
SP
2772009-09-16 Alexander Monakov <amonakov@ispras.ru>
278
279 * graphite-sese-to-poly.c (pdr_add_data_dimensions): Add bounds only
280 for ARRAY_REFs. Use array_ref_{low,up}_bound to determine bounds.
281
54fc808a
SP
2822009-09-14 Sebastian Pop <sebastian.pop@amd.com>
283
284 * graphite-sese-to-poly.c (struct irp_data): Removed.
285 (idx_record_params): Removed.
286 (find_params_in_bb): Scan for parameters the access functions; don't
287 parse the tree representation.
288
e88e021f
SP
2892009-09-14 Sebastian Pop <sebastian.pop@amd.com>
290
291 * tree-ssa-loop.c (gate_graphite_transforms): Disable Graphite
292 passes at -O1 and below.
293
3690f8d7
SP
2942009-09-14 Sebastian Pop <sebastian.pop@amd.com>
295
296 * graphite-blocking.c: Fix order of includes: tree-chrec.h, then
297 tree-scalar-evolution.h, and then tree-data-ref.h.
298 * graphite-clast-to-gimple.c: Same.
299 * graphite-dependences.c: Same.
300 * graphite-interchange.c: Same.
301 * graphite-poly.c: Same.
302 * graphite-scop-detection.c: Same.
303 * graphite-sese-to-poly.c: Same.
304 * graphite.c: Same.
305 * lambda-code.c: Same.
306 * matrix-reorg.c: Same.
307 * tree-data-ref.c: Same.
308 * tree-if-conv.c: Same.
309 * tree-loop-distribu: Same.: Same.
310 * tree-loop-linear.c: Same.
311 * tree-parloops.c: Same.
312 * tree-predcom.c: Same.
313 * tree-vect-patterns.c: Same.
314
2495a183
SP
3152009-09-02 Sebastian Pop <sebastian.pop@amd.com>
316
317 Partially revert the previous patch, except the following.
318 * tree-scalar-evolution.c (instantiate_scev_not): Adapted to pass
319 as parameters the operands of the not expression.
320
20179b0d
SP
3212009-09-01 Sebastian Pop <sebastian.pop@amd.com>
322
323 * tree-scalar-evolution.c (instantiate_scev_assign): New.
324 Do not call analyze_scalar_evolution on assignments.
325 (instantiate_scev_phi): Call analyze_scalar_evolution.
326 (instantiate_scev_name): Call instantiate_scev_assign and
327 instantiate_scev_phi.
328 (instantiate_scev_not): Adapted to pass as parameters the operands
329 of the not expression.
330
ffa34f4b
SP
3312009-09-01 Sebastian Pop <sebastian.pop@amd.com>
332
333 * tree-scalar-evolution.c (instantiate_scev_binary): Adapted
334 to pass as parameters the operands of the binary expression.
335
4b9d48a1
SP
3362009-09-01 Sebastian Pop <sebastian.pop@amd.com>
337
338 * tree-scalar-evolution.c (instantiate_scev_bitnot): Renamed
339 instantiate_scev_not. Handle NEGATE_EXPR.
340 (instantiate_scev_r): Handle NEGATE_EXPR.
341
9e5dc77f
SP
3422009-09-01 Sebastian Pop <sebastian.pop@amd.com>
343
344 * tree-scalar-evolution.c (instantiate_scev_1): Renamed
345 instantiate_scev_r.
346 (instantiate_scev_r): Move code in instantiate_scev_2
347 and instantiate_scev_1.
348
d814176c
SP
3492009-09-01 Sebastian Pop <sebastian.pop@amd.com>
350
351 * tree-scalar-evolution.c (instantiate_scev_3): New.
352 (instantiate_scev_1): Move code in instantiate_scev_3.
353
ec6636eb
SP
3542009-09-01 Sebastian Pop <sebastian.pop@amd.com>
355
356 * tree-scalar-evolution.c (instantiate_scev_poly): New.
357 (instantiate_scev_1): Move code in instantiate_scev_poly.
358
7ec0665d
SP
3592009-09-01 Sebastian Pop <sebastian.pop@amd.com>
360
361 * tree-scalar-evolution.c (instantiate_scev_bitnot): New.
362 (instantiate_scev_1): Move code in instantiate_scev_bitnot.
363
9c382ce9
SP
3642009-09-01 Sebastian Pop <sebastian.pop@amd.com>
365
366 * tree-scalar-evolution.c (instantiate_scev_convert): New.
367 (instantiate_scev_1): Move code in instantiate_scev_convert.
368
15fda317
SP
3692009-09-01 Sebastian Pop <sebastian.pop@amd.com>
370
371 * tree-scalar-evolution.c (instantiate_scev_binary): New.
372 (instantiate_scev_1): Move code in instantiate_scev_binary.
373
320f5a78
SP
3742009-09-01 Sebastian Pop <sebastian.pop@amd.com>
375
376 * tree-scalar-evolution.c (instantiate_scev_name): New.
377 (instantiate_scev_1): Move code in instantiate_scev_name.
378
3792009-08-28 Sebastian Pop <sebastian.pop@amd.com>
380
381 * Merge from mainline (150992:151171).
382
211694b6
SP
3832009-08-25 Sebastian Pop <sebastian.pop@amd.com>
384
385 * graphite-dependences.c (graphite_legal_transform_bb): Call
386 pbb_remove_duplicate_pdrs.
387 * graphite-poly.c (can_collapse_pdr): Removed.
388 (pdr_find_duplicate): Removed.
389 (can_collapse_pdrs): New.
390 (pbb_remove_duplicate_pdrs): New.
391 (new_poly_dr): Do not look for duplicates.
392 * graphite-poly.h (struct poly_bb): New field pdr_duplicates_removed.
393 (PBB_PDR_DUPLICATES_REMOVED): New.
394 (pbb_remove_duplicate_pdrs): Declared.
395
7bd2a8a7
SP
3962009-08-25 Sebastian Pop <sebastian.pop@amd.com>
397
398 * graphite-interchange.c (pbb_interchange_profitable_p): Adjust
399 the strides by multiplying by PDR_NB_REFS.
400 * graphite-poly.c (can_collapse_pdr): New.
401 (pdr_find_duplicate): New.
402 (new_poly_dr): Call pdr_find_duplicate. Collapse duplicate PDRs.
403 Initialize PDR_NB_REFS.
404 * graphite-poly.h (struct poly_dr): Add field nb_refs.
405 (PDR_NB_REFS): New.
406 (new_poly_dr): Number of subscripts is a graphite_dim_t.
407
4082009-08-25 Sebastian Pop <sebastian.pop@amd.com>
409
410 Revert one of the previous commits:
411 * graphite-dependences.c (graphite_legal_transform_bb): Avoid
412 the computation of symmetric data dependence relations.
413 (dependency_between_pbbs_p): Same.
414
93b2db87
SP
4152009-08-25 Sebastian Pop <sebastian.pop@amd.com>
416
417 PR middle-end/40965
418 * graphite-poly.c (apply_poly_transforms): Remove legality test before
419 any transform.
420
d8eeb078
SP
4212009-08-25 Sebastian Pop <sebastian.pop@amd.com>
422
423 * graphite-dependences.c (pddr_original_scattering): Return NULL
424 for read-read dependence relations.
425 * graphite-poly.h (enum poly_dr_type): Fix comment.
426 (pdr_read_p): New.
427 (pdr_write_p): New.
428 (pdr_may_write_p): New.
429
e6dec0fb
SP
4302009-08-25 Sebastian Pop <sebastian.pop@amd.com>
431
432 * graphite-poly.h (enum POLY_DR_TYPE): Renamed poly_dr_type.
433 (struct poly_dr): Same.
434 (new_poly_dr): Same.
435 * graphite-poly.c (new_poly_dr): Same.
436
baf4b881
KT
4372009-08-25 Konrad Trifunovic <konrad.trifunovic@gmail.com>
438 Sebastian Pop <sebastian.pop@amd.com>
439
440 * graphite-blocking.c (pbb_strip_mine_loop_depth): Renamed
441 pbb_strip_mine_time_depth. Changed the implementation so that
442 transformation is expressed as a transformation on
443 time (scatttering) dimensions. Also, ensures that the 2d+1
444 scheduling format is preserved.
445 (pbb_strip_mine_profitable_p): Profitability is based on the
446 iteration number of a given time (scattering) dimension,
447 and not on a original loop depth dimension.
448 (pbb_strip_mine): Call pbb_number_of_iterations_at_time.
449 (pbb_do_strip_mine): Call psct_dynamic_dim.
450 * graphite-poly.c (pbb_number_of_iterations_at_time): New.
451 * graphite-poly.h (pbb_number_of_iterations_at_time): Declared.
452 (pbb_nb_dynamic_scattering_transform): New.
453 (psct_dynamic_dim): New.
454
059a5f9f
KT
4552009-08-25 Konrad Trifunovic <konrad.trifunovic@gmail.com>
456
457 * graphite-ppl.c (ppl_max_for_le): Renamed ppl_max_for_le_pointset.
458 * graphite-ppl.h (ppl_max_for_le): Renamed ppl_max_for_le_pointset.
459 * graphite-poly.c (pbb_number_of_iterations): Rename ppl_max_for_le.
460 * graphite-interchange.c (build_linearized_memory_access): Same.
461 (memory_stride_in_loop): Same.
462
afae0207
SP
4632009-08-25 Sebastian Pop <sebastian.pop@amd.com>
464
465 * graphite-dependences.c (pddr_original_scattering): New.
466 (graphite_legal_transform_dr): Call pddr_original_scattering.
467 (dot_deps_1): New.
468 (dot_deps): New.
469 * graphite-dependences.h (dot_deps): Declared.
470 * graphite-poly.c (new_poly_dr): Initialize PDR_ID.
471 (print_pdr): Print PDR_ID.
472 * graphite-poly.h (struct poly_dr): Add field id.
473 (PDR_ID): New.
474 (pbb_index): New.
475 * graphite-scop-detection.c (dot_all_scops_1): Cleanup comment.
476
f8e0bb8b
SP
4772009-08-22 Sebastian Pop <sebastian.pop@amd.com>
478
479 * graphite-dependences.c (graphite_carried_dependence_level_k): Do
480 not delete the original dependence relation.
481
4822009-08-21 Sebastian Pop <sebastian.pop@amd.com>
483
484 * graphite-dependences.c (graphite_legal_transform_bb): Avoid
485 the computation of symmetric data dependence relations.
486 (dependency_between_pbbs_p): Same.
487
e37f165f
SP
4882009-08-21 Sebastian Pop <sebastian.pop@amd.com>
489
490 * graphite-dependences.c (new_poly_dr_pair): Renamed new_poly_ddr.
491 (eq_poly_dr_pair_p): Renamed eq_poly_ddr_p.
492 (hash_poly_dr_pair_p): Renamed hash_poly_ddr_p.
493 (free_poly_ddr): New.
494 (pddr_is_empty): New.
495 (dependence_polyhedron_1): Now returns a poly_ddr_p.
496 (dependence_polyhedron): Same. Remove useless gcc_assert.
497 Remove fprintfs.
498 (graphite_legal_transform_dr): Call pddr_is_empty and free_poly_ddr.
499 (graphite_carried_dependence_level_k): Call pddr_is_empty.
500 * graphite-dependences.h (enum poly_dependence_kind): New.
501 (poly_dr_pair): Renamed poly_ddr. Added a field kind.
502 (PDRP_SOURCE): Renamed PDDR_SOURCE.
503 (PDRP_SINK): Renamed PDDR_SINK.
504 (PDRP_DDP): Renamed PDDR_DDP.
505 (PDDR_KIND): New.
506 (free_poly_ddr): Declared.
507 * graphite-poly.c (new_scop): Use the new hash function names.
508 * graphite-poly.h (struct scop): Renamed field original_pdr_pairs
509 into original_pddrs.
510 (SCOP_ORIGINAL_PDR_PAIRS): Renamed SCOP_ORIGINAL_PDDRS.
511
5122009-08-21 Sebastian Pop <sebastian.pop@amd.com>
513
514 * Merge from mainline (150764:150992).
515
45e76e9f
SP
5162009-08-18 Sebastian Pop <sebastian.pop@amd.com>
517
518 * cfgloopmanip.c (create_empty_loop_on_edge): Generate upper
519 bounds with LT_EXPR to make niter analysis more precise on code
520 generated by Graphite.
521
66b466c3
SP
5222009-08-18 Sebastian Pop <sebastian.pop@amd.com>
523
524 * graphite-dependences.c (graphite_legal_transform_dr): Fix formatting.
525 (graphite_legal_transform_bb): Same.
526 (poly_drs_may_alias_p): Same.
527
f263917c
SP
5282009-08-15 Sebastian Pop <sebastian.pop@amd.com>
529
530 PR middle-end/40981
531 * graphite-ppl.c (ppl_max_for_le): Correct the use of
532 ppl_Pointset_Powerset_C_Polyhedron_maximize.
533
5342009-08-13 Sebastian Pop <sebastian.pop@amd.com>
535
536 * graphite-poly.c (print_pbb): Print PBB index.
537
5382009-08-13 Sebastian Pop <sebastian.pop@amd.com>
539
540 * Merge from mainline (r150672:150764).
541
5422009-08-13 Sebastian Pop <sebastian.pop@amd.com>
543
544 * graphite-interchange.c (ppl_max_for_le): Moved...
545 * graphite-poly.c (pbb_number_of_iterations): Call ppl_max_for_le.
546 * graphite-ppl.c (ppl_max_for_le): ... here.
547 * graphite-ppl.h (ppl_max_for_le): Declared.
548
5492009-08-12 Sebastian Pop <sebastian.pop@amd.com>
550
551 * Merge from mainline (r150372:150672).
552
30de1632
SP
5532009-08-11 Sebastian Pop <sebastian.pop@amd.com>
554
555 PR middle-end/40980
556 * sese.c (convert_for_phi_arg): New.
557 (add_guard_exit_phis): Use convert_for_phi_arg.
558
559 * testsuite/gfortran.dg/graphite/id-17.f: New.
560
8c31ebfa
SP
5612009-08-11 Sebastian Pop <sebastian.pop@amd.com>
562
563 * graphite-sese-to-poly.c (pdr_add_data_dimensions): Dont add
564 unknown subscript upper bounds.
565
566 * testsuite/gcc.dg/graphite/interchange-6.c: Un-XFAIL.
567
fb9fb290
SP
5682009-08-11 Sebastian Pop <sebastian.pop@amd.com>
569 Pranav Garg <pranav.garg2107@gmail.com>
570
571 * graphite-interchange.c (gather_access_strides): Removed.
572 (ppl_max_for_le): New.
573 (build_linearized_memory_access): New.
574 (memory_stride_in_loop): New.
575 (pbb_interchange_profitable_p): Reimplemented.
576 * graphite-ppl.h (ppl_new_id_map): New.
577 (ppl_interchange): New.
578
579 * testsuite/gcc.dg/graphite/interchange-6.c: XFAILed.
580
312aea7f
SP
5812009-08-11 Sebastian Pop <sebastian.pop@amd.com>
582
583 * graphite-interchange.c (compute_subscript): Removed.
584 (compute_array_size_cstr): Removed.
585 (compute_array_size_poly): Removed.
586 (compute_array_size): Removed.
587 (gather_access_strides_poly): Removed.
588 (gather_access_strides): Empty.
589
25d7cc15
SP
5902009-08-11 Sebastian Pop <sebastian.pop@amd.com>
591
592 * graphite-dependences.c (dependence_polyhedron_1): Replace
593 pdr_nb_subscripts with PDR_NB_SUBSCRIPTS.
594 (graphite_legal_transform_dr): Same.
595 (graphite_carried_dependence_level_k): Same.
596 * graphite-poly.c (new_poly_dr): Add a parameter nb_subscripts.
597 Initialize PDR_NB_SUBSCRIPTS.
598 (print_pdr_access_layout): Replace pdr_nb_subscripts with
599 PDR_NB_SUBSCRIPTS.
600 * graphite-poly.h (struct poly_dr): Add nb_subscripts field.
601 (PDR_NB_SUBSCRIPTS): New.
602 (pdr_nb_subscripts): Removed.
603 (pdr_dim): Simplified.
604 * graphite-sese-to-poly.c (build_poly_dr): Replace pdr_nb_subscripts
605 with PDR_NB_SUBSCRIPTS.
606
66096911
SP
6072009-08-11 Sebastian Pop <sebastian.pop@amd.com>
608
609 * graphite-interchange.c (compute_array_size): Remove use of
610 PDR_DATA_CONTAINER.
611 * graphite-poly.c (new_poly_dr): Remove argument data_container.
612 Do not initialize PDR_DATA_CONTAINER.
613 (print_pdr): Do not print PDR_DATA_CONTAINER.
614 * graphite-poly.h (struct poly_dr): Remove data_container field.
615 (PDR_DATA_CONTAINER): Removed.
616 * graphite-sese-to-poly.c (pdr_add_data_dimensions): Remove use of
617 PDR_DATA_CONTAINER.
618 (build_poly_dr): Same.
619
273c5dd3
SP
6202009-08-11 Sebastian Pop <sebastian.pop@amd.com>
621
622 * testsuite/gcc.dg/graphite/interchange-9.c: New.
623
7491e5f0
KT
6242009-08-05 Konrad Trifunovic <konrad.trifunovic@gmail.com>
625 Sebastian Pop <sebastian.pop@amd.com>
626
627 * graphite-dependences.c (graphite_legal_transform_dr): Work on a
628 copy of the dependence polyhedron. Free the temporary objects.
629 (graphite_carried_dependence_level_k): Free unused objects before
630 returning.
631
632 * testsuite/gcc.dg/graphite/interchange-1.c: XFAILed.
633 * testsuite/gcc.dg/graphite/interchange-2.c: XFAILed.
634 * testsuite/gcc.dg/graphite/interchange-3.c: XFAILed.
635 * testsuite/gcc.dg/graphite/interchange-4.c: XFAILed.
636 * testsuite/gcc.dg/graphite/interchange-7.c: XFAILed.
637
f4648ed1
SP
6382009-08-05 Sebastian Pop <sebastian.pop@amd.com>
639
640 * graphite-blocking.c (scop_do_strip_mine): Call store_scattering.
641 Early return without analyzing the data dependences if no
642 transform has been done. Call restore_scattering if the transform
643 is not legal.
644 (graphite-interchange.c): Same.
645 * graphite-poly.c (print_scattering_function): Test for PBB_TRANSFORMED.
646 (graphite_read_transforms): Initialize PBB_TRANSFORMED.
647 (apply_poly_transforms): Do not gcc_assert that
648 the transform is legal.
649 (new_poly_bb): Initialize PBB_TRANSFORMED, PBB_SAVED, and PBB_ORIGINAL.
650 Do not initialize PBB_NB_SCATTERING_TRANSFORM, PBB_NB_LOCAL_VARIABLES,
651 PBB_TRANSFORMED_SCATTERING, and PBB_ORIGINAL_SCATTERING.
652 (free_poly_dr): Free PBB_TRANSFORMED, PBB_SAVED, and PBB_ORIGINAL.
653 * graphite-poly.h (struct poly_scattering): New.
654 (struct poly_bb): Add original, transformed, and saved fields.
655 Remove transformed_scattering, original_scattering, nb_local_variables,
656 and nb_scattering_transform fields.
657 (PBB_ORIGINAL, PBB_TRANSFORMED, PBB_SAVED): New.
658 (poly_scattering_new): New.
659 (poly_scattering_free): New.
660 (poly_scattering_copy): New.
661 (store_scattering_pbb): New.
662 (store_scattering): New.
663 (restore_scattering_pbb): New.
664 (restore_scattering): New.
665 * graphite-sese-to-poly.c (build_pbb_scattering_polyhedrons):
666 Initialize PBB_TRANSFORMED and PBB_ORIGINAL.
273c5dd3 667
e31a5bd4
SP
6682009-08-05 Sebastian Pop <sebastian.pop@amd.com>
669
670 * graphite-poly.c (print_pbb): Add parentheses in the pretty print.
671 (print_scop): Same.
672
8e88f9fd
SP
6732009-08-05 Sebastian Pop <sebastian.pop@amd.com>
674
675 * Makefile.in (graphite.o): Depends on PREDICT_H.
676 * graphite.c: Include predict.h.
677 (graphite_finalize): Call tree_estimate_probability.
678 * predict.c (predict_loops): Do not call scev_initialize and
679 scev_finalize.
680 (tree_estimate_probability_bb): New.
681 (tree_estimate_probability): Do not initialize loops: move that
682 code to the driver. Call tree_estimate_probability_bb.
683 (tree_estimate_probability_driver): New.
684 (pass_profile): Use tree_estimate_probability_driver.
685 * predict.h (tree_estimate_probability): Declared.
686
87d4d0ee
SP
6872009-08-05 Sebastian Pop <sebastian.pop@amd.com>
688
689 * graphite-clast-to-gimple.c (gloog): Add time to TV_GRAPHITE_CODE_GEN.
690 * graphite-dependences.c (graphite_legal_transform): Add time to
691 TV_GRAPHITE_DATA_DEPS.
692 (dependency_between_pbbs_p): Same.
693 * timevar.def (TV_GRAPHITE_DATA_DEPS, TV_GRAPHITE_CODE_GEN): New.
694
6952009-08-03 Sebastian Pop <sebastian.pop@amd.com>
696
697 * Merge from mainline (r149952:150372).
698
2abae5f1
SP
6992009-07-28 Sebastian Pop <sebastian.pop@amd.com>
700
701 * ChangeLog.graphite: Fix indenting, white spaces and 80 columns.
702 * graphite-blocking.c: Same.
703 * graphite-clast-to-gimple.c: Same.
704 * graphite-dependences.c: Same.
705 * graphite-poly.c: Same.
706 * graphite-poly.h: Same.
707 * graphite-ppl.c: Same.
708 * graphite-scop-detection.c: Same.
709 * graphite-sese-to-poly.c: Same.
710 * graphite.c: Same.
711
7122009-07-28 Sebastian Pop <sebastian.pop@amd.com>
713
714 * graphite-sese-to-poly.c (loop_entry_phi_arg): New.
715 (remove_simple_copy_phi): New.
716 (remove_invariant_phi): New.
717 (simple_copy_phi_p): New.
718 (reduction_phi_p): New.
719 (gsi_for_ssa_name_def): New.
720 (insert_out_of_ssa_copy): New.
721 (insert_out_of_ssa_copy_on_edge): New.
722 (create_zero_dim_array): New.
723 (scalar_close_phi_node_p): New.
724 (rewrite_close_phi_out_of_ssa): New.
725 (rewrite_phi_out_of_ssa): New.
726 (rewrite_reductions_out_of_ssa): New.
727 (build_poly_scop): Call rewrite_reductions_out_of_ssa.
728
729 * testsuite/gcc.dg/graphite/id-11.c: New.
730 * testsuite/gcc.dg/graphite/id-15.c: New.
731 * testsuite/gcc.dg/graphite/interchange-1.c: Un-XFAIL.
732 * testsuite/gcc.dg/graphite/interchange-2.c: Un-XFAIL.
733 * testsuite/gcc.dg/graphite/interchange-3.c: Un-XFAIL.
734 * testsuite/gcc.dg/graphite/interchange-4.c: Un-XFAIL.
735 * testsuite/gcc.dg/graphite/interchange-7.c: Un-XFAIL.
736 * testsuite/gcc.dg/graphite/scop-matmult.c: Un-XFAIL.
737 * testsuite/gfortran.dg/graphite/id-13.f: New.
738 * testsuite/gfortran.dg/graphite/id-5.f: New.
739
7402009-07-28 Sebastian Pop <sebastian.pop@amd.com>
741
742 * graphite-clast-to-gimple.c (graphite_loop_normal_form): Do not
743 check that nb_reductions_in_loop is zero.
744 * graphite-scop-detection.c (harmful_stmt_in_bb): Don't filter out
745 reduction phi nodes.
746 (nb_reductions_in_loop): Removed.
747 (graphite_can_represent_loop): Do not call nb_reductions_in_loop.
748 * graphite-sese-to-poly.c (phi_node_is_iv): Removed.
749 (bb_contains_non_iv_scalar_phi_nodes): Removed.
750 (scop_contains_non_iv_scalar_phi_nodes): Removed.
751 (build_poly_scop): Do not call scop_contains_non_iv_scalar_phi_nodes.
752
7532009-07-28 Sebastian Pop <sebastian.pop@amd.com>
754
755 * graphite-clast-to-gimple.c (build_cloog_prog): Do not code generate
756 statements that have an empty iteration domain.
757 * testsuite/gfortran.dg/graphite/id-16.f: New.
758
7592009-07-28 Sebastian Pop <sebastian.pop@amd.com>
760
761 * tree-scalar-evolution.c (instantiate_scev_1): Return
762 chrec_dont_know when the result is not above instantiate_below.
763 * graphite-scop-detection.c (scopdet_basic_block_info): Fix formatting.
764 * graphite-sese-to-poly.c (create_linear_expr_from_tree): Assert that
765 the tree has a known scalar evolution.
766 * testsuite/gfortran.dg/graphite/id-14.f: New.
767 * testsuite/gfortran.dg/graphite/id-15.f: New.
768
7692009-07-28 Sebastian Pop <sebastian.pop@amd.com>
770
771 * sese.c (rename_variables_in_stmt): Pass in an extra parameter
772 insert_gsi.
773 (rename_variables): Keep inserting renames after the ones already
774 inserted.
775
7762009-07-28 Sebastian Pop <sebastian.pop@amd.com>
777
778 * graphite-sese-to-poly.c (compare_bb_depths): New.
779 (graphite_sort_dominated_info): New.
780 (build_scop_bbs_1): Call graphite_sort_dominated_info.
781 (build_scop_scattering): Fix comment.
782
7832009-07-28 Sebastian Pop <sebastian.pop@amd.com>
784
785 * graphite.c (graphite_finalize): Call print_loops instead of
786 dump_function_to_file.
787 * testsuite/gcc.dg/graphite/graphite.exp: Fix formatting.
788 * testsuite/gcc.dg/graphite/pr35356-1.c: New. Look for the number of
789 loops generated in the graphite output file.
790 * testsuite/gcc.dg/graphite/pr35356-2.c: New.
791 * testsuite/gcc.dg/graphite/pr35356-3.c: New. XFAILed for now.
792 * testsuite/gfortran.dg/graphite/id-12.f: New.
793
7942009-07-24 Li Feng <nemokingdom@gmail.com>
795
796 * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-8.c:
797 Remove 2 XFAIL.
798
7992009-07-24 Li Feng <nemokingdom@gmail.com>
800 Tobias Grosser <grosser@fim.uni-passau.de>
801
802 * graphite-sese-to-poly.c (pdr_add_alias_set): Use data reference's
803 alias set number build alias in ACCESSES polyhedron.
804 (build_alias_set_for_drs): New.
805 (build_pbb_drs): Added build_alias_set_for_drs.
806 * graphite-dependences.c (poly_drs_may_alias_p): New.
807 (graphite_carried_dependence_level_k): Check alias information
808 before building polyhedron.
809
8102009-07-24 Tobias Grosser <grosser@fim.uni-passau.de>
811
812 * Makefile.in (lambda-code.o): Fix formatting.
813
8142009-07-24 Tobias Grosser <grosser@fim.uni-passau.de>
815
816 * Merge from mainline (r149350-149952)
817
8182009-07-18 Tobias Grosser <grosser@fim.uni-passau.de>
819
820 * graphite-poly.c (apply_poly_transforms): Move strip_mine
821 before interchange to prepare for loop blocking.
822
8232009-07-18 Tobias Grosser <grosser@fim.uni-passau.de>
824
825 * graphite-poly.c (apply_poly_transforms): Add checks after every
826 transformation.
827 * graphite-sese-to-poly.c (build_poly_scop): Remove check, as already
828 done in apply_poly_transforms.
829
8302009-07-17 Konrad Trifunovic <konrad.trifunovic@gmail.com>
831
832 * graphite-dependences.c (build_lexicographically_gt_constraint):
833 Replace RES parameter with *RES.
834 (dependence_polyhedron_1): Pass an address of the parameter RES
835 instead of value of RES.
836
8372009-07-16 Sebastian Pop <sebastian.pop@amd.com>
838
839 * graphite.c (graphite_finalize): Fix comment.
840 (graphite_transform_loops): Reset scev info after code generation
841 of each scop.
842
8432009-07-16 Sebastian Pop <sebastian.pop@amd.com>
844
845 * graphite.c (graphite_finalize): Call scev_reset.
846
8472009-07-16 Sebastian Pop <sebastian.pop@amd.com>
848
849 * graphite-clast-to-gimple.c (compute_cloog_iv_types): Do not create
850 GBB_CLOOG_IV_TYPES hash table twice.
851 * graphite-sese-to-poly.c (free_gimple_bb): Call free_data_refs.
852 (add_condition_to_domain): Clear GMP values.
853
8542009-07-16 Sebastian Pop <sebastian.pop@amd.com>
855
856 * graphite-dependences.c: Fix formatting.
857 * graphite-poly.c (free_poly_dr): Also free PDR_DATA_CONTAINER.
858 (pbb_number_of_iterations): Free ppl_Linear_Expression.
859 * graphite-sese-to-poly.c: Fix formatting.
860 * graphite.c (graphite_transform_loops): Create the hash table
861 after the early return.
862
8632009-07-16 Sebastian Pop <sebastian.pop@amd.com>
864
865 * testsuite/gcc.dg/graphite/id-14.c: New.
866 * testsuite/gcc.dg/graphite/pr40157.c: New.
867 * testsuite/gfortran.dg/graphite/id-11.f: New.
868
8692009-07-16 Sebastian Pop <sebastian.pop@amd.com>
870
871 * graphite-sese-to-poly.c (nb_pbbs_in_loops): New.
872 (build_poly_scop): Return false when there are no pbbs within
873 loops to avoid to pass to cloog scops with no loops.
874
8752009-07-16 Sebastian Pop <sebastian.pop@amd.com>
876
877 * graphite-sese-to-poly.c (build_pbb_scattering_polyhedrons): Avoid
878 useless test "i % 2".
879 (build_pbb_scattering_polyhedrons): Fix formatting.
880 (build_poly_dr): Same.
881 * graphite.c (graphite_transform_loops): Restructure.
882
8832009-07-14 Razya Ladelsky <razya@il.ibm.com>
884
885 * tree-ssa-loop-manip.c (rewrite_phi_with_iv): Remove
886 reduction_list parameter.
887 (rewrite_all_phi_nodes_with_iv): Same.
888 (canonicalize_loop_ivs): Same.
889 * tree-parloops.c (struct brli): Removed.
890 (build_reduction_list_info): Removed.
891 (build_new_reduction): New.
892 (analyze_reduction_list): Removed.
893 (gather_scalar_reductions): Find reductions instead of phi
894 nodes that can't be canonicalized.
895 (try_create_reduction_list): Remove reduction_list parameter.
896 (gen_parallel_loop): Same.
897 (parallelize_loops): Remove analyze_reductions variable,
898 initialization and free.
899 Change reduction_list htab initialization to reduction_info
900 elements instead of ssa names.
901 Call try_create_reduction_list and gen_parallel_loop without
902 analyzed_reduction argument.
903 * graphite-clast-to-gimple (graphite_loop_normal_form): Call
904 canonicalize_loop_ivs with one less argument.
905 * tree-flow.h (canonicalize_loop_ivs): Remove one argument.
906
9072009-07-14 Konrad Trifunovic <konrad.trifunovic@gmail.com>
908
909 * graphite-dependences.c (new_poly_dr_pair): New.
910 (dependence_polyhedron): Renamed into dependence_polyhedron_1.
911 (new_poly_dr_pair): New.
912 (eq_poly_dr_pair_p): New.
913 (hash_poly_dr_pair_p): New.
914 * graphite-dependences.h (struct poly_dr_pair): New.
915 (eq_poly_dr_pair_p): Declared.
916 (hash_poly_dr_pair_p): Declared.
917 * graphite-poly.c (new_scop): Initialize SCOP_ORIGINAL_PDR_PAIRS.
918 (free_scop): Free SCOP_ORIGINAL_PDR_PAIRS.
919 * graphite-poly.h (struct scop): Add original_pdr_pairs field.
920 * Makefile.in (graphite-poly.o): Add dependence on
921 graphite-dependences.h.
922
9232009-07-14 Sebastian Pop <sebastian.pop@amd.com>
924
925 * graphite-scop-detection.c (graphite_can_represent_scev): Do not let
926 polynomials of degree > 1 pass to Graphite.
927 * tree-chrec.c (scev_is_linear_expression): Call
928 evolution_function_is_affine_multivariate_p.
929 * testsuite/gfortran.dg/graphite/id-10.f90: New.
930
9312009-07-14 Sebastian Pop <sebastian.pop@amd.com>
932
933 * tree-scalar-evolution.c (compute_overall_effect_of_inner_loop):
934 Instantiate scevs varying in outer loops.
935 * testsuite/gfortran.dg/graphite/id-9.f: Correct testcase.
936
9372009-07-14 Sebastian Pop <sebastian.pop@amd.com>
938
939 * graphite-sese-to-poly.c (build_loop_iteration_domains): Do not insert
940 redundant constraint.
941
9422009-07-14 Sebastian Pop <sebastian.pop@amd.com>
943
944 * testsuite/gcc.dg/graphite/graphite.exp: Fix comments.
945 * testsuite/gfortran.dg/graphite/graphite.exp: Trigger actions
946 based on the file names as in the C testsuite.
947 * testsuite/gfortran.dg/graphite/block-1.f90: Fix patterns.
948 * testsuite/gfortran.dg/graphite/block-2.f: Same.
949 * testsuite/gfortran.dg/graphite/block-3.f90: Same.
950 * testsuite/gfortran.dg/graphite/block-4.f90: Same.
951 * testsuite/gfortran.dg/graphite/id-1.f90: Same.
952 * testsuite/gfortran.dg/graphite/id-2.f90: Same.
953 * testsuite/gfortran.dg/graphite/id-3.f90: Same.
954 * testsuite/gfortran.dg/graphite/id-4.f90: Same.
955 * testsuite/gfortran.dg/graphite/id-6.f: Same.
956 * testsuite/gfortran.dg/graphite/id-9.f: Same.
957 * testsuite/gfortran.dg/graphite/interchange-1.f: Same.
958 * testsuite/gfortran.dg/graphite/interchange-2.f: Same.
959 * testsuite/gfortran.dg/graphite/scop-1.f: Same.
960
9612009-07-14 Sebastian Pop <sebastian.pop@amd.com>
962
963 * sese.c (expand_scalar_variables_call): New.
964 (expand_scalar_variables_ssa_name): Handle calls in expander.
965
9662009-07-13 Sebastian Pop <sebastian.pop@amd.com>
967
968 * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-6.c:
969 Expect to see the pattern twice.
970 * testsuite/gcc.dg/graphite/interchange-0.c: Un-XFAIL.
971 * testsuite/gcc.dg/graphite/interchange-5.c: Same.
972 * testsuite/gcc.dg/graphite/interchange-6.c: Same.
973
9742009-07-13 Sebastian Pop <sebastian.pop@amd.com>
975
976 * testsuite/gcc.dg/graphite/id-10.c: New.
977 * testsuite/gcc.dg/graphite/id-12.c: New.
978 * testsuite/gfortran.dg/graphite/id-7.f: New.
979 * testsuite/gfortran.dg/graphite/id-8.f: New.
980
9812009-07-13 Sebastian Pop <sebastian.pop@amd.com>
982
983 * graphite-sese-to-poly.c (pdr_add_data_dimensions): Fix division by
984 zero.
985
9862009-07-13 Sebastian Pop <sebastian.pop@amd.com>
987
988 * sese.c (rename_variables_in_stmt): Call fold_convert during renaming.
989
9902009-07-13 Sebastian Pop <sebastian.pop@amd.com>
991
992 * sese.c (expand_scalar_variables_stmt): Avoid unnecessary expansion.
993
9942009-07-10 Sebastian Pop <sebastian.pop@amd.com>
995
996 * graphite-sese-to-poly.c (pdr_add_memory_accesses): Fix order of
997 building PDR subscripts.
998
9992009-07-10 Sebastian Pop <sebastian.pop@amd.com>
1000
1001 * graphite-sese-to-poly.c (pdr_add_data_dimensions): Fix the
1002 computation of array sizes.
1003
10042009-07-10 Sebastian Pop <sebastian.pop@amd.com>
1005
1006 * graphite-sese-to-poly.c (add_param_constraints): Disabled.
1007
10082009-07-10 Tobias Grosser <grosser@fim.uni-passau.de>
1009
1010 * graphite-dependences.c (map_into_dep_poly, map_dr_into_dep_poly,
1011 build_pairwise_constraint, dr_equality_constraints,
1012 build_pairwise_scheduling_equality,
1013 build_pairwise_scheduling_inequality, lexicographically_gt_p,
1014 build_lexicographically_gt_constraint, dependence_polyhedron,
1015 graphite_legal_transform_dr, graphite_carried_dependence_level_k):
1016 Move from NNC_Polyhedron to C_Polyhedron.
1017 * graphite-interchange.c (compute_array_size_poly,
1018 gather_access_strides): Dito.
1019 * graphite-poly.c (apply_poly_transforms, new_poly_dr, free_poly_bb,
1020 free_scop, pbb_number_of_iterations): Dito.
1021 * graphite-poly.h (struct poly_dr, pdr_nb_subscripts, struct poly_bb,
1022 pbb_dim_iter_domain, struct scop): Dito.
1023 * graphite-ppl.c (new_Constraint_System_from_Cloog_Matrix,
1024 new_Cloog_Domain_from_ppl_Polyhedron,
1025 new_Cloog_Domain_from_ppl_Pointset_Powerset, ppl_set_coef_gmp,
1026 ppl_insert_dimensions_pointset, ppl_insert_dimensions_pointset,
1027 ppl_strip_loop, ppl_strip_loop, ppl_print_polyhedron_matrix,
1028 ppl_print_powerset_matrix, debug_ppl_polyhedron_matrix,
1029 debug_ppl_powerset_matrix, ppl_read_polyhedron_matrix): Dito.
1030 * graphite-ppl.h (ppl_Pointset_Powerset_C_Polyhedron_t,
1031 new_C_Polyhedron_from_Cloog_Matrix, ppl_print_powerset_matrix,
1032 debug_ppl_powerset_matrix, ppl_insert_dimensions_pointset): Dito.
1033 * graphite-sese-to-poly.c (build_pbb_scattering_polyhedrons,
1034 build_loop_iteration_domains, ppl_constraint_type_from_tree_code,
1035 add_condition_to_domain, add_condition_to_pbb, build_scop_context,
1036 build_scop_iteration_domain, build_poly_dr): Dito
1037
10382009-07-09 Sebastian Pop <sebastian.pop@amd.com>
1039
1040 * testsuite/gcc.dg/graphite/graphite.exp: Added a rule to execute
1041 run-id-*.c files.
1042 * testsuite/gcc.dg/graphite/run-id-1.c: New.
1043
10442009-07-09 Sebastian Pop <sebastian.pop@amd.com>
1045
1046 * graphite-sese-to-poly.c (build_loop_iteration_domains): Add the
1047 positivity constraint on the symbolic number of iterations.
1048
10492009-07-09 Sebastian Pop <sebastian.pop@amd.com>
1050
1051 * graphite-sese-to-poly.c (build_loop_iteration_domains): Rewrite.
1052
10532009-07-09 Sebastian Pop <sebastian.pop@amd.com>
1054 Tobias Grosser <grosser@fim.uni-passau.de>
1055
1056 * graphite-clast-to-gimple.c (build_scop_context): Removed.
1057 (build_cloog_prog): Directly use SCOP_CONTEXT.
1058 * graphite-poly.c (new_scop): Initialize SCOP_CONTEXT.
1059 (free_scop): Free SCOP_CONTEXT.
1060 (print_scop_context): New.
1061 (print_scop): Call print_scop_context.
1062 (debug_scop_context): New.
1063 * graphite-poly.h (print_scop_context, debug_scop_context): Declared.
1064 (struct scop): Added field context.
1065 (SCOP_CONTEXT): New.
1066 * graphite-sese-to-poly.c (add_param_constraints): New.
1067 (build_scop_context): New.
1068 (build_poly_scop): Call build_scop_context.
1069
10702009-07-09 Sebastian Pop <sebastian.pop@amd.com>
1071
1072 * graphite-clast-to-gimple.c (gmp_cst_to_tree): Moved...
1073 * graphite-ppl.c (ppl_set_inhomogeneous_gmp, ppl_set_coef_gmp): New.
1074 (ppl_set_inhomogeneous, ppl_set_coef): Moved...
1075 * graphite-ppl.h: Include double-int.h and tree.h.
1076 (ppl_set_inhomogeneous_gmp, ppl_set_coef_gmp): Declared.
1077 (ppl_set_inhomogeneous, ppl_set_coef): ...here.
1078 (gmp_cst_to_tree): ...here. Reimplemented using mpz_get_double_int.
1079 (tree_int_to_gmp, ppl_set_inhomogeneous_tree, ppl_set_coef_tree): New.
1080
10812009-07-09 Sebastian Pop <sebastian.pop@amd.com>
1082
1083 * graphite-clast-to-gimple.c (clast_to_gcc_expression_red): Generate
1084 POINTER_PLUS_EXPR for pointer types.
1085 (clast_to_gcc_expression): Same.
1086
10872009-07-09 Sebastian Pop <sebastian.pop@amd.com>
1088
1089 * graphite-poly.c (print_scattering_function): Early return when
1090 PBB_TRANSFORMED_SCATTERING is not initialized.
1091 (print_pbb_domain): Early return when PBB_DOMAIN is not initialized.
1092
10932009-07-08 Sebastian Pop <sebastian.pop@amd.com>
1094
1095 * tree-parloops.c (analyze_reduction_list): Remove unused variable
1096 to fix bootstrap.
1097
10982009-07-08 Razya Ladelsky <razya@il.ibm.com>
1099
1100 * tree-parloops.c (analyze_reduction_list): Change return
1101 value to void.
1102 (try_create_reduction_list): Move the call to
1103 analyze_reduction_list to the beginining.
1104 Call reduction_phi with analyzed_reductions as argument
1105 instead of reduction_list.
1106
11072009-07-08 Tobias Grosser <grosser@fim.uni-passau.de>
1108
1109 * Merge from mainline (r148296:149346)
1110
11112009-07-07 Sebastian Pop <sebastian.pop@amd.com>
1112
1113 * graphite-scop-detection.c (graphite_can_represent_init): New.
1114 (graphite_can_represent_scev): Call graphite_can_represent_init:
1115 check that the initial value does not contain multiplications of
1116 parameters.
1117 (stmt_has_simple_data_refs_p): New.
1118 (stmt_simple_for_scop_p): Call stmt_simple_for_scop_p.
1119 (is_simple_operand): Fix formatting.
1120 * graphite-sese-to-poly.c (try_generate_gimple_bb): Fix formatting.
1121
11222009-07-07 Sebastian Pop <sebastian.pop@amd.com>
1123
1124 * testsuite/gcc.dg/graphite/id-13.c: New.
1125 * graphite-sese-to-poly.c (graphite_stmt_p): Do not call
1126 analyze_scalar_evolution, use scalar_evolution_in_region.
1127 (scan_tree_for_params_right_scev): Add extra assert.
1128 (parameter_index_in_region_1): Split from parameter_index_in_region.
1129 (idx_record_params): Use scalar_evolution_in_region.
1130 (find_params_in_bb): Same.
1131 (find_scop_parameters): Same.
1132 (build_loop_iteration_domains): Same.
1133 (create_linear_expr_from_tree): Same.
1134 * sese.c (scalar_evolution_in_region): New.
1135 * sese.h (scalar_evolution_in_region): Declared.
1136 (defined_in_sese_p): New.
1137 * tree-scalar-evolution.c (compute_overall_effect_of_inner_loop): Not
1138 static anymore.
1139 * tree-scalar-evolution.h (compute_overall_effect_of_inner_loop):
1140 Declared.
1141
11422009-07-07 Sebastian Pop <sebastian.pop@amd.com>
1143
1144 * Makefile.in: Replace dependences on tree-chrec.h with SCEV_H.
1145 TREE_DATA_REF_H also implies SCEV_H.
1146
11472009-07-07 Sebastian Pop <sebastian.pop@amd.com>
1148
1149 * graphite-poly.c (print_scop_params): New.
1150 (print_scop): Call print_scop_params.
1151 (debug_scop_params): New.
1152 * graphite-poly.h (print_scop_params, debug_scop_params): Declared.
1153
11542009-07-07 Li Feng <nemokingdom@gmail.com>
1155
1156 * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-4.c: New.
1157 * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-5.c: New.
1158 * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-6.c: New.
1159 * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-7.c: New.
1160 * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-8.c: New.
1161 * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-9.c: New.
1162
11632009-07-07 Li Feng <nemokingdom@gmail.com>
1164
1165 * graphite-clast-to-gimple.c (mark_loops_parallel): Dump information
1166 for dependency checking part.
1167 * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-1.c: Add
1168 tests for dependency checking.
1169 * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-2.c: Ditto.
1170 * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-3.c: Ditto.
1171 * testsuite/gcc.dg/graphite/graphite_autopar/graphite_autopar.exp: Add
1172 flag -fdump-tree-graphite-all for autopar testsuites.
1173
11742009-07-06 Sebastian Pop <sebastian.pop@amd.com>
1175
1176 * Makefile.in (tree-ssa-loop-manip.o): Depends on langhooks.h.
1177 * tree-parloops.c (rewrite_phi_with_iv, rewrite_all_phi_nodes_with_iv,
1178 canonicalize_loop_ivs): Moved...
1179 * tree-ssa-loop-manip.c: ... here. Include langhooks.h.
1180
11812009-07-06 Sebastian Pop <sebastian.pop@amd.com>
1182
1183 * tree-parloops.c (try_create_reduction_list): Pass an extra
1184 argument analyzed_reductions. Call analyze_reduction_list.
1185 (gen_parallel_loop): Do not call analyze_reduction_list.
1186 (parallelize_loops): Init and finalize analyzed_reductions.
1187
11882009-07-06 Li Feng <nemokingdom@gmail.com>
1189
1190 * testsuite/gcc.dg/graphite/graphite_autopar/graphite_autopar.exp:
1191 Added flag -fno-loop-strip-mine for autopar testcase.
1192
11932009-07-04 Li Feng <nemokingdom@gmail.com>
1194
1195 * graphite-dependences.c (graphite_carried_dependence_level_k): Use
1196 transformed scattering dimension instead of unmatch orignal when
1197 calling dependence_polyhedron.
1198
11992009-06-30 Sebastian Pop <sebastian.pop@amd.com>
1200
1201 * opts.c (decode_options): Enable flag_loop_strip_mine at -O2.
1202
12032009-06-30 Sebastian Pop <sebastian.pop@amd.com>
1204
1205 * graphite-poly.c (pbb_number_of_iterations): Check for returned
1206 value 1 from ppl_Pointset_Powerset_NNC_Polyhedron_maximize.
1207
12082009-06-30 Sebastian Pop <sebastian.pop@amd.com>
1209
1210 * graphite-blocking.c (pbb_strip_mine_profitable_p): New.
1211 (pbb_do_strip_mine): Call pbb_strip_mine_profitable_p.
1212 * graphite-poly.c (pbb_number_of_iterations): New.
1213 * graphite-poly.h (pbb_number_of_iterations): Declared.
1214 (pbb_iterator_dim, pbb_parameter_dim): New.
1215
12162009-06-29 Sebastian Pop <sebastian.pop@amd.com>
1217
1218 * graphite-clast-to-gimple.c (graphite_create_new_loop): Revert the
1219 last commit on type of lower and upper bound of loops.
1220
12212009-06-29 Li Feng <nemokingdom@gmail.com>
1222
1223 * Makefile.in (graphite-clast-to-gimple.o): Added dependence on
1224 graphite-dependences.h.
1225 * graphite-clast-to-gimple.c (new_bb_pbb_def): New.
1226 (mark_bb_with_pbb): New.
1227 (get_stmtfor_depth): New.
1228 (find_pbb_via_hash): New.
1229 (dependency_in_loop_p): New.
1230 (mark_loops_parallel): New.
1231 (free_aux_in_new_loops): New.
1232 (translate_clast): Add parameter BB_PBB_MAPPING. Mark newly created
1233 bb with it's relevant pbb. Mark newly created loops. Remove mark
1234 innermost loop parallel without checking.
1235 (gloog): Add parameter BB_PBB_MAPPING.
1236 * graphite-clast-to-gimple.h (struct bb_pbb_def): New.
1237 (gloog): Change declaration.
1238 (mark_loop_parallel): Make extern.
1239 (free_aux_in_new_loops): Declare.
1240 (bb_pbb_map_hash): New.
1241 (eq_bb_pbb_map): New.
1242 * graphite.c (graphite_transform_loops): Added BB_PBB_MAPPING. Trigger
1243 auto parallelization when flag_graphite_force_parallel is set.
1244 (graphite_finalize): Added free_aux_in_new_loops.
1245 * tree-parloops.c (parallelize_loops): Only generate parallel code for
1246 the innermost loop that marked parallel. Use
1247 flag_graphite_force_parallel instead of loop->can_be_parallel.
1248 (loop_parallel_p): Move inner most checking out of function.
1249
12502009-06-26 Sebastian Pop <sebastian.pop@amd.com>
1251
1252 * graphite-clast-to-gimple.c (graphite_create_new_loop): Make the
1253 type of lower and upper bound of loops signed long int.
1254
12552009-06-26 Sebastian Pop <sebastian.pop@amd.com>
1256
1257 * cfgloopmanip.c (create_empty_loop_on_edge): Gimplify the loop exit
1258 expression outside the loop.
1259
12602009-06-26 Sebastian Pop <sebastian.pop@amd.com>
1261
1262 * gcc.dg/graphite/interchange-8.c: New.
1263
12642009-06-26 Sebastian Pop <sebastian.pop@amd.com>
1265
1266 * gcc.dg/graphite/interchange-0.c: XFailed.
1267 * gcc.dg/graphite/interchange-5.c: XFailed.
1268 * gcc.dg/graphite/interchange-6.c: XFailed.
1269
12702009-06-26 Sebastian Pop <sebastian.pop@amd.com>
1271
1272 * graphite-interchange.c (compute_array_size_poly): The end of the
1273 recursion should return 1.
1274
12752009-06-26 Sebastian Pop <sebastian.pop@amd.com>
1276
1277 * graphite-interchange.c (compute_array_size_cstr): Allow the
1278 subscript multiplier to be -1.
1279 (compute_array_size): Use PDR_DATA_CONTAINER and not PDR_ACCESSES.
1280 * graphite-poly.c (new_poly_dr): Takes an extra argument for the
1281 data_container. Initializes PDR_DATA_CONTAINER.
1282 (print_pdr_access_layout): New.
1283 (print_pdr): Call print_pdr_access_layout. Print PDR_DATA_CONTAINER.
1284 * graphite-poly.h (struct poly_dr): Adjust comment. Add a new field
1285 data_container.
1286 (PDR_DATA_CONTAINER): New.
1287 (new_poly_dr): Update declaration.
1288 * graphite-sese-to-poly.c (pdr_add_data_dimensions): New.
1289 (build_poly_dr): Call pdr_add_data_dimensions.
1290
12912009-06-26 Sebastian Pop <sebastian.pop@amd.com>
1292
1293 * graphite-poly.h (struct poly_dr): Fix comment.
1294 * graphite-sese-to-poly.c (pdr_add_alias_set): New.
1295 (pdr_add_memory_accesses): New.
1296 (build_poly_dr): Call pdr_add_memory_accesses and pdr_add_alias_set.
1297
12982009-06-26 Sebastian Pop <sebastian.pop@amd.com>
1299
1300 * graphite-poly.c (print_pdrs, debug_pdrs): New.
1301 (print_pbb): Add call to print_pdrs.
1302 * graphite-poly.h (print_pdrs, debug_pdrs): Declared.
1303
13042009-06-24 Konrad Trifunovic <konrad.trifunovic@gmail.com>
1305 Li Feng <nemokingdom@gmail.com>
1306
1307 * graphite-dependences.c (graphite_carried_dependence_level_k): New.
1308 (dependency_between_pbbs_p): New.
1309 (lexicographically_gt_p): Assure !empty_p before polyhedron
1310 intersection assign.
1311 (build_lexicographically_gt_constraint): Correct lexicographically
1312 judging.
1313 * graphite-dependences.h: New.
1314 * Makefile.in (graphite-dependences.o): Add graphite-dependences.h.
1315
13162009-06-24 Sebastian Pop <sebastian.pop@amd.com>
1317
1318 * graphite-clast-to-gimple.c (print_clast_stmt): New.
1319 (gloog): Print to dump_file the generated clast.
1320 * graphite-clast-to-gimple.h (print_clast_stmt): Declared.
1321 * graphite-interchange.c (pbb_do_interchange): Fix dump formatting.
1322
13232009-06-24 Sebastian Pop <sebastian.pop@amd.com>
1324
1325 * graphite-poly.c (extend_scattering): Increment
1326 PBB_NB_LOCAL_VARIABLES by the number of added dimensions.
1327
13282009-06-24 Sebastian Pop <sebastian.pop@amd.com>
1329
1330 * graphite-interchange.c (compute_array_size_poly): Added exit of
1331 recursion condition. Continue iterating even after the first equality.
1332 (compute_array_size): Same.
1333
13342009-06-24 Li Feng <nemokingdom@gmail.com>
1335
1336 * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-1.c: Update
1337 -fdump-tree-final_cleanup to -fdump-tree-optimized.
1338 * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-2.c: Ditto.
1339 * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-3.c: Ditto.
1340 * testsuite/gcc.dg/graphite/graphite_autopar/graphite_autopar.exp: Ditto.
1341
13422009-06-23 Sebastian Pop <sebastian.pop@amd.com>
1343
1344 * sese.c (expand_scalar_variables_stmt): Expand scalar variables
1345 only when the use verifies is_gimple_reg.
1346
13472009-06-23 Sebastian Pop <sebastian.pop@amd.com>
1348
1349 * graphite-clast-to-gimple.c (build_cloog_prog): Fix memory corruption.
1350 Allocate scaldims after call to unify_scattering_dimensions.
1351
13522009-06-23 Sebastian Pop <sebastian.pop@amd.com>
1353
1354 * graphite-clast-to-gimple.c (translate_clast): Fix memory leak.
1355
13562009-06-23 Sebastian Pop <sebastian.pop@amd.com>
1357 Albert Cohen <albert.cohen@inria.fr>
1358
1359 * graphite-blocking.c (pbb_strip_mine_loop_depth): Do not use local
1360 variables for the strip mining.
1361
13622009-06-23 Sebastian Pop <sebastian.pop@amd.com>
1363 Pranav Garg <pranav.garg2107@gmail.com>
1364
1365 * Makefile.in (OBJS-common): Added graphite-blocking.o.
1366 (graphite-sese-to-poly.o): Moved down to be in lexicographical order.
1367 (graphite-blocking.o): New rule.
1368 (graphite-poly.o, graphite-ppl.o): Moved to be in lexicographical order.
1369 * graphite-blocking.c: New.
1370 * graphite-poly.c (apply_poly_transforms): Call scop_do_strip_mine for
1371 flag_loop_strip_mine.
1372 (psct_scattering_dim_for_loop_depth): New.
1373 * graphite-poly.h (scop_do_strip_mine): Declared.
1374 (psct_add_local_variable): Increment PBB_NB_LOCAL_VARIABLES.
1375 * tree-ssa-loop.c (gate_graphite_transforms): Do not fail when using
1376 flag_loop_strip_mine.
1377
13782009-06-23 Sebastian Pop <sebastian.pop@amd.com>
1379
1380 * graphite-poly.c (extend_scattering): Avoid initializing and freeing
1381 a GMP value and a PPL coefficient at each iteration of a loop.
1382
13832009-06-23 Sebastian Pop <sebastian.pop@amd.com>
1384
1385 * graphite-dependences.c (dependence_polyhedron): Do not use
1386 pbb_nb_scattering_dims anymore. Use pbb_nb_scattering_orig and
1387 pbb_nb_scattering_transform.
1388 (graphite_legal_transform_dr): Same.
1389 * graphite-poly.c (extend_scattering): Same.
1390 (unify_scattering_dimensions): Same.
1391 (print_scattering_function): Same.
1392 (new_poly_bb): Initialize PBB_NB_SCATTERING_TRANSFORM and
1393 PBB_NB_LOCAL_VARIABLES.
1394 * graphite-poly.h (pbb_nb_scattering): Removed declaration.
1395 (struct poly_bb): Added nb_local_variables and nb_scattering_transform.
1396 (PBB_NB_LOCAL_VARIABLES, PBB_NB_SCATTERING_TRANSFORM): New.
1397 (pbb_nb_scattering_orig, pbb_nb_scattering_transform): New.
1398 (pbb_nb_scattering_dims, pbb_nb_scattering): Removed.
1399 (pbb_nb_scattering_transform): New.
1400 (pbb_nb_local_vars): Return PBB_NB_LOCAL_VARIABLES.
1401 (psco_scattering_dim): Add assert on parameters.
1402 (psct_scattering_dim): Same.
1403 (psct_scattering_dim_for_loop_depth): Declared.
1404 (psct_local_var_dim): New.
1405 (psco_iterator_dim, psco_parameter_dim): Add assert on parameters.
1406 (psct_iterator_dim, psct_parameter_dim): Same. To maintain the
1407 correct layout, call pbb_nb_local_vars.
1408 (psct_add_local_variable, psct_add_scattering_dimension): New.
1409 * graphite-sese-to-poly.c (build_pbb_scattering_polyhedrons):
1410 Initialize PBB_NB_SCATTERING_TRANSFORM.
1411
14122009-06-23 Sebastian Pop <sebastian.pop@amd.com>
1413
1414 * graphite-ppl.c (set_inhomogeneous): Renamed ppl_set_inhomogeneous.
1415 (set_coef): Renamed ppl_set_coef.
1416 * graphite-ppl.h (ppl_set_inhomogeneous, ppl_set_coef): Declared.
1417
14182009-06-23 Sebastian Pop <sebastian.pop@amd.com>
1419
1420 * graphite-dependences.c (build_pairwise_scheduling_inequality): Don't
1421 test a boolean against 1.
1422 * graphite-interchange.c (pbb_interchange_loop_depths): Do not build
1423 a new polyhedron for the PBB_TRANSFORMED_SCATTERING.
1424 (pbb_do_interchange): Returns true when a transform has been performed.
1425 (scop_do_interchange): Same.
1426 * graphite-poly.c (apply_poly_transforms): Use the return value of
1427 scop_do_interchange.
1428 * graphite-poly.h (scop_do_interchange): Update declaration.
1429
14302009-06-23 Tobias Grosser <grosser@fim.uni-passau.de>
1431
1432 * graphite-clast-to-gimple.c (gloog): Reset loop->aux right
1433 after last use.
1434 * sese.c (sese_reset_aux_in_loops): New.
1435 * sese.h (sese_reset_aux_in_loops): New.
1436
14372009-06-19 Sebastian Pop <sebastian.pop@amd.com>
1438
1439 * graphite-sese-to-poly.c (scan_tree_for_params_int): Pass in the
1440 multiplier and multiply the constant by the multiplier.
1441 (scan_tree_for_params): Bound the multiplier to its MULT_EXPR.
1442 (build_poly_dr): Do not use the multiplier to define the subscript.
1443
14442009-06-19 Sebastian Pop <sebastian.pop@amd.com>
1445
1446 * graphite-poly.c (new_poly_dr): Pass an extra argument for the
1447 compiler's data reference. Initialize PDR_CDR.
1448 (print_pdr): Call dump_data_reference.
1449 * graphite-poly.h (struct poly_dr): Rename black_box into pbb.
1450 Add compiler_dr field.
1451 (PDR_BB): Renamed PDR_PBB.
1452 (PDR_CDR): New.
1453 * graphite-sese-to-poly.c (build_poly_dr): Pass to new_poly_dr
1454 GCC's data reference representation.
1455 * tree-data-ref.c (debug_data_references, debug_data_reference): New.
1456 * tree-data-ref.h (debug_data_references, debug_data_reference): Decl.
1457
14582009-06-19 Sebastian Pop <sebastian.pop@amd.com>
1459
1460 * graphite-poly.c (print_scattering_function): Also print the layout.
1461 * graphite-poly.h (pbb_nb_local_vars): New.
1462
14632009-06-19 Sebastian Pop <sebastian.pop@amd.com>
1464
1465 * graphite-poly.c (print_pbb_domain): Also print the layout names.
1466
14672009-06-19 Sebastian Pop <sebastian.pop@amd.com>
1468
1469 * graphite-poly.c (print_pdr, debug_pdr): New.
1470 * graphite-poly.h (print_pdr, debug_pdr): Declared.
1471 (PDR_BASE): Removed.
1472
14732009-06-18 Sebastian Pop <sebastian.pop@amd.com>
1474
1475 * gcc/testsuite/gcc.dg/graphite/interchange-{1..7}.c: New avatars of
1476 ltrans-{1..6,8}.c.
1477
14782009-06-18 Sebastian Pop <sebastian.pop@amd.com>
1479
1480 * graphite-interchange.c (compute_subscript): Allow also -1 in the
1481 subscript identification column.
1482 (pbb_do_interchange): Print to dump_file that some loops "will be
1483 interchanged". Rely on that chain of characters in the testcases.
1484 * gcc.dg/graphite/interchange-0.c: New.
1485 * gcc.dg/graphite/graphite.exp: Iterate over the testsuite
1486 interchange-*.c files and compile them with -floop-interchange.
1487
14882009-06-18 Pranav Garg <pranav.garg2107@gmail.com>
1489
1490 * graphite-interchange.c (interchange_profitable_p): Renamed
1491 pbb_interchange_profitable_p.
1492
14932009-06-18 Sebastian Pop <sebastian.pop@amd.com>
1494 Harsha Jagasia <harsha.jagasia@amd.com>
1495 Pranav Garg <pranav.garg2107@gmail.com>
1496
1497 * graphite-interchange.c (interchange_profitable_p): Make static.
1498 (pbb_interchange_loop_depths, pbb_do_interchange,
1499 scop_do_interchange): New.
1500 * graphite-poly.c (apply_poly_transforms): Call scop_do_interchange
1501 for flag_loop_interchange.
1502 * graphite-poly.h (scop_do_interchange): Declared.
1503 * tree-ssa-loop.c (gate_graphite_transforms): Do not fail when
1504 flag_loop_interchange is used.
1505
15062009-06-18 Sebastian Pop <sebastian.pop@amd.com>
1507
1508 * graphite-dependences.c (dependence_polyhedron): Update use of
1509 pbb_nb_scattering_dims.
1510 * graphite-poly.h (pbb_nb_scattering_dims): Do not pass SCOP.
1511 (pbb_nb_scattering): Update use of pbb_nb_scattering_dims.
1512 (psco_scattering_dim, psct_scattering_dim, psco_iterator_dim,
1513 psct_iterator_dim, psco_parameter_dim, psct_parameter_dim): New.
1514
15152009-06-16 Sebastian Pop <sebastian.pop@amd.com>
1516
1517 * graphite.c: Cleanup foo.
1518
15192009-06-16 Sebastian Pop <sebastian.pop@amd.com>
1520
1521 * Merge from mainline (r143684:148293).
1522 * Disabled libpcp until it gets fixed.
1523
15242009-06-05 Sebastian Pop <sebastian.pop@amd.com>
1525 Harsha Jagasia <harsha.jagasia@amd.com>
1526
1527 * graphite-interchange.c: New.
1528 * Makefile.in (graphite-interchange.o): New.
1529 * graphite-poly.h (interchange_profitable_p): Declared.
1530 * graphite-ppl.h (value_max): New.
1531
15322009-06-04 Sebastian Pop <sebastian.pop@amd.com>
1533
1534 * graphite-dependences.c (dependence_polyhedron): Use pdr_dim.
1535 * graphite-poly.h: Fix some comments.
1536 (pdr_dim): New.
1537 (pdr_scop): New.
1538
15392009-06-04 Sebastian Pop <sebastian.pop@amd.com>
1540
1541 * graphite-poly.h
1542 (pdr_accessp_nb_subscripts): Renamed pdr_nb_subscripts.
1543 (pdr_accessp_nb_iterators): Renamed pdr_dim_iter_domain.
1544 (pdr_accessp_nb_params): Renamed pdr_nb_params.
1545 (pdr_accessp_alias_set_dim): Renamed pdr_alias_set_dim.
1546 (pdr_accessp_subscript_dim): Renamed pdr_subscript_dim.
1547 (pdr_accessp_iterator_dim): Renamed pdr_iterator_dim.
1548 (pdr_accessp_param_dim): Renamed pdr_parameter_dim.
1549 (pbb_nb_loops): Renamed pbb_dim_iter_domain.
1550 * graphite-clast-to-gimple.c: Same.
1551 * graphite-dependences.c: Same.
1552 * graphite-poly.c: Same.
1553 * graphite-sese-to-poly.c: Same.
1554
15552009-06-03 Sebastian Pop <sebastian.pop@amd.com>
1556
1557 * graphite-clast-to-gimple.c (build_iv_mapping): Insert full
1558 expressions for an IV rename, as returned by clast_to_gcc_expression.
1559 (copy_renames): Rename new_name to expr.
1560 * sese.c (debug_rename_elt): Same.
1561 (get_rename): Same.
1562 (set_rename): Same.
1563 (sese_adjust_liveout_phis): Call force_gimple_operand before using
1564 the information from the rename map.
1565 (rename_variables_in_stmt): Same.
1566 (add_loop_exit_phis): Rename new_name to expr.
1567 (insert_loop_close_phis): Same.
1568 (add_guard_exit_phis): Same. Call force_gimple_operand.
1569 * sese.h (struct rename_map_elt): Rename new_name to expr.
1570 (new_rename_map_elt): Same.
1571
15722009-06-03 Sebastian Pop <sebastian.pop@amd.com>
1573
1574 * graphite-clast-to-gimple.c (build_iv_mapping): Use set_rename.
1575 * sese.c (set_rename): Make it extern.
1576 * sese.h (set_rename): Declared.
1577
15782009-06-03 Sebastian Pop <sebastian.pop@amd.com>
1579
1580 * graphite-poly.c (extend_scattering): Free values.
1581 * graphite-ppl.c (new_Cloog_Domain_from_ppl_Pointset_Powerset):
1582 Free iterators.
1583 (ppl_print_powerset_matrix): Same.
1584 * graphite-scop-detection.c (free_scops_1): New.
1585 (limit_scops): Call free_scops_1.
1586 * graphite-sese-to-poly.c (build_scop_bbs_1): Free dom.
1587 (build_poly_dr): Free PPL coefficients.
1588 * tree-parloops.c (rewrite_all_phi_nodes_with_iv): Free bbs.
1589
15902009-06-02 Sebastian Pop <sebastian.pop@amd.com>
1591
1592 * graphite-dependences.c: New.
1593 * graphite-data-ref.c: Removed.
1594 * graphite-data-ref.h: Removed.
1595 * Makefile.in (graphite-data-ref.o): Removed.
1596 (graphite-dependences.o): Added.
1597 * graphite-clast-to-gimple.c: Remove dependence on graphite-data-ref.h.
1598 * graphite-poly.c: Same.
1599 Move the data dependence testing to graphite-dependences.c.
1600
16012009-05-19 Tobias Grosser <grosser@fim.uni-passau.de>
1602
1603 * graphite-scop-detection.c (graphite_can_represent_loop): Renamed
1604 from graphite_cannot_represent_loop. Code refactored.
1605 (scopdet_basic_block_info): Call graphite_can_represent_loop.
1606
16072009-05-17 Li Feng <nemokingdom@gmail.com>
1608
1609 * testsuite/gcc.dg/graphite/graphite_autopar/graphite_autopar.exp:
1610 Cover all the testcases (not only the filtered ones).
1611
16122009-05-17 Tobias Grosser <grosser@fim.uni-passau.de>
1613
1614 * graphite-scop-detection.c (stmt_simple_for_scop_p): Remove
1615 unnecessary check. Update comments. Move check for REAL_TYPE here.
1616 (harmful_stmt_in_bb): Remove checks for conditions. This is already
1617 done in (stmt_simple_for_scop_p).
1618
16192009-05-14 Tobias Grosser <grosser@fim.uni-passau.de>
1620
1621 * graphite.c (print_global_statistics): New.
1622 (print_graphite_scop_statistic): New.
1623 (print_graphite_statistics): New.
1624 (graphite_initialize, graphite_transform_loops): Print statistics.
1625 * graphite-scop-detection (build_scops): Print statistics.
1626 (print_graphite_scop_statistics): New.
1627 (print_graphite_statistics): New.
1628
16292009-05-13 Sebastian Pop <sebastian.pop@amd.com>
1630
1631 * graphite-clast-to-gimple.c (struct clast_name_index): Removed.
1632 (debug_clast_name_index): Removed.
1633 (debug_clast_name_indexes_1): Removed.
1634 (debug_clast_name_indexes): Removed.
1635 (clast_name_index_elt_info): Removed.
1636 (eq_clast_name_indexes): Removed.
1637 (clast_name_to_index): Removed.
1638 (new_clast_name_index): Removed.
1639 (save_clast_name_index): Removed.
1640 (save_var_name): Moved...
1641 (init_sese_params_index): Removed.
1642 (clast_name_to_gcc): Remove use of name_tree.
1643 (initialize_cloog_names): Same.
1644 (gloog): Do not call init_sese_params_index.
1645 * graphite-sese-to-poly.c (save_var_name): ...here.
1646 (parameter_index_in_region): New.
1647 * sese.c (new_sese): Initialize SESE_PARAMS_NAMES.
1648 (parameter_index_in_region): Removed.
1649 (is_parameter): Remove use of name_tree.
1650 * sese.h (struct name_tree): Removed.
1651 (struct sese): Remove use of name_tree. New field params_names.
1652 (SESE_PARAMS_NAMES): New.
1653 (SESE_PARAMS): Remove duplicate.
1654 (parameter_index_in_region): Removed.
1655 (sese_nb_params): Remove use of name_tree.
1656 (struct clast_name_index): New.
1657 (new_clast_name_index): New.
1658 (clast_name_to_index): New.
1659 (save_clast_name_index): New.
1660 (debug_clast_name_index): New.
1661 (debug_clast_name_indexes_1): New.
1662 (debug_clast_name_indexes): New.
1663 (clast_name_index_elt_info): New.
1664 (eq_clast_name_indexes): New.
1665
16662009-05-13 Sebastian Pop <sebastian.pop@amd.com>
1667
1668 * graphite-clast-to-gimple.c (compute_cloog_iv_types_1): Call
1669 pbb_to_depth_to_oldiv. Remove call to oldiv_for_loop.
1670 (graphite_loop_normal_form): Do not pass region. Do not
1671 initialize SESE_OLDIVS.
1672 (build_graphite_loop_normal_form): Update call to
1673 graphite_loop_normal_form.
1674 * sese.c (debug_oldivs): Removed.
1675 (new_sese): Do not initialize SESE_OLDIVS.
1676 (free_sese): Do not free SESE_OLDIVS.
1677 (oldiv_for_loop): Removed.
1678 * sese.h (struct sese): Remove old_ivs.
1679 (SESE_OLDIVS): Removed.
1680 (oldiv_for_loop): Removed.
1681
16822009-05-13 Sebastian Pop <sebastian.pop@amd.com>
1683
1684 * graphite-clast-to-gimple.c (clast_name_to_gcc): Pass newivs,
1685 remove ivstack. Remove call to loop_iv_stack_get_iv_from_name,
1686 replaced by a call to newivs_to_depth_to_newiv.
1687 (clast_to_gcc_expression): Pass newivs, remove ivstack.
1688 (clast_to_gcc_expression_red): Same.
1689 (gcc_type_for_clast_expr): Same.
1690 (gcc_type_for_clast_eq): Same.
1691 (graphite_translate_clast_equation): Same.
1692 (graphite_create_guard_cond_expr): Same.
1693 (graphite_create_new_guard): Same.
1694 (graphite_create_new_loop): Same.
1695 (build_iv_mapping): Same.
1696 (translate_clast): Same.
1697 (gloog): Same.
1698 (loop_iv_stack_patch_for_consts): Removed. *
1699 sese.c (iv_stack_entry_is_constant): Removed.
1700 (iv_stack_entry_is_iv): Removed.
1701 (loop_iv_stack_push_iv): Removed.
1702 (loop_iv_stack_insert_constant): Removed.
1703 (loop_iv_stack_pop): Removed.
1704 (loop_iv_stack_get_iv): Removed.
1705 (loop_iv_stack_get_iv_from_name): Removed.
1706 (debug_loop_iv_stack): Removed.
1707 (free_loop_iv_stack): Removed.
1708 (loop_iv_stack_remove_constants): Removed. *
1709 sese.h (iv_stack_entry_kind): Removed.
1710 (iv_stack_entry_data_union): Removed.
1711 (iv_stack_entry_struct): Removed.
1712 (iv_stack_entry_p): Removed.
1713 (debug_oldivs, debug_loop_iv_stack, loop_iv_stack_insert_constant,
1714 loop_iv_stack_get_iv_from_name, loop_iv_stack_push_iv,
1715 loop_iv_stack_get_iv, loop_iv_stack_remove_constants,
1716 loop_iv_stack_pop, free_loop_iv_stack): Removed.
1717 (gbb_loop_at_index): Fix indenting.
1718 (gbb_loop_index): Removed.
1719
17202009-05-13 Sebastian Pop <sebastian.pop@amd.com>
1721
1722 * graphite-clast-to-gimple.c (clast_name_to_gcc): Do not use strcmp.
1723 Call clast_name_to_index.
1724
17252009-05-13 Sebastian Pop <sebastian.pop@amd.com>
1726
1727 * graphite-clast-to-gimple.c (clast_name_to_gcc): Pass region,
1728 do not pass params. Get params from SESE_PARAMS.
1729 (clast_to_gcc_expression): Same.
1730 (clast_to_gcc_expression_red): Same.
1731 (gcc_type_for_clast_eq): Same.
1732 (graphite_translate_clast_equation): Same.
1733 (graphite_create_new_loop): Same.
1734 * sese.c (rename_variables_in_stmt): Fix comment.
1735
17362009-05-13 Sebastian Pop <sebastian.pop@amd.com>
1737
1738 * graphite-clast-to-gimple.c (graphite_create_new_loop): Pass
1739 newivs_index.
1740 Call save_clast_name_index.
1741 (translate_clast): Pass newivs_index.
1742 (gloog): Create and free newivs_index.
1743
17442009-05-13 Sebastian Pop <sebastian.pop@amd.com>
1745
1746 * graphite-clast-to-gimple.c (clast_name_index): New structure.
1747 (clast_name_index_p): New type.
1748 (debug_clast_name_index): New.
1749 (debug_clast_name_indexes_1): New.
1750 (debug_clast_name_indexes): New.
1751 (clast_name_index_elt_info): New.
1752 (eq_clast_name_indexes): New.
1753 (clast_name_to_index): New.
1754 (new_clast_name_index): New.
1755 (save_clast_name_index): New.
1756 (init_sese_params_index): New.
1757 (gloog): Call init_sese_params_index.
1758 * graphite-clast-to-gimple.h (debug_clast_name_indexes): Declared.
1759 * sese.c (new_sese): Initialize SESE_PARAMS_INDEX.
1760 (free_sese): Free SESE_PARAMS_INDEX.
1761 * sese.h (struct sese): Add params_index.
1762 (SESE_PARAMS_INDEX): New.
1763
17642009-05-13 Sebastian Pop <sebastian.pop@amd.com>
1765
1766 * graphite-clast-to-gimple.c (newivs_to_depth_to_newiv): New.
1767 (graphite_create_new_loop): Pass the newivs vector. Push the
1768 newly created IV to newivs.
1769 (translate_clast): Pass the newivs vector.
1770 (gloog): Create and destroy the newivs vector.
1771
17722009-05-13 Sebastian Pop <sebastian.pop@amd.com>
1773
1774 * graphite-clast-to-gimple.c (pbb_to_depth_to_oldiv): New.
1775 (graphite_loop_normal_form): Initialize loop->aux with the unique
1776 IV that has been created.
1777
17782009-05-13 Tobias Grosser <grosser@fim.uni-passau.de>
1779
1780 * tree-chrec.c (evolution_function_right_is_integer_cst): Allow
1781 scev with parameters in the base part. They where forbidden
1782 exidently.
1783
17842009-05-11 Li Feng <nemokingdom@gmail.com>
1785
1786 * testsuite/gcc.dg/graphite/graphite.exp: Set different default
1787 compile options by file names.
1788 * testsuite/gcc.dg/graphite/block{0-6}.c: Remove dg-option line.
1789 * testsuite/gcc.dg/graphite/id-{1-9}.c: Ditto.
1790 * testsuite/gcc.dg/graphite/scop-{0-20}.c: Ditto.
1791 * testsuite/gcc.dg/graphite/scop-matmult.c: Ditto.
1792
17932009-05-08 Li Feng <nemokingdom@gmail.com>
1794
1795 * testsuite/gcc.dg/graphite/graphite_autopar/graphite_autopar.exp: New.
1796 * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-1.c: New.
1797 * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-2.c: New.
1798 * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-3.c: New.
1799
18002009-05-07 Tobias Grosser <grosser@fim.uni-passau.de>
1801
1802 * graphite-scop-detection (build_scops_1): Fix little bug introduced
1803 by final cleanup.
1804
18052009-05-07 Tobias Grosser <grosser@fim.uni-passau.de>
1806
1807 * graphite-scop-detection.c (graphite_can_represent_scev): Only
1808 allow integer constant strides.
1809 (graphite_can_represent_expr): Depend on outermost_loop.
1810 (stmt_simple_memref_p, graphite_cannot_represent_loop,
1811 harmful_stmt_in_bb, is_simple_operand, stmt_simple_for_scop_p,
1812 build_scops_1): Same.
1813 (scopdet_basic_block_info): Same and insert layered SCoP
1814 detection.
1815 (try_generate_gimple_bb): Cleanup.
1816 (build_scops): Enable data references.
1817
1818 * testsuite/gcc.dg/graphite/id-5.c: New.
1819 * testsuite/gcc.dg/graphite/id-9.c: New.
1820 * tree-chrec.c (evolution_function_right_is_integer_cst): New.
1821 * tree-chrec.h (evolution_function_right_is_integer_cst): New.
1822
18232009-05-06 Tobias Grosser <grosser@fim.uni-passau.de>
1824
1825 * sese.c (expand_scalar_variables_ssa_name): Only build expressions,
1826 that we have not yet built for this SCoP.
1827
18282009-05-06 Tobias Grosser <grosser@fim.uni-passau.de>
1829
1830 * sese.c (expand_scalar_variables_expr): Fix expand_scalar_variables
1831 for complex numbers.
1832
18332009-05-06 Tobias Grosser <grosser@fim.uni-passau.de>
1834
1835 * graphite-ppl.c: Fix build if cloog is not available.
1836
18372009-05-04 Li Feng <nemokingdom@gmail.com>
1838
1839 * tree-parloops.c (loop_parallel_p): Remove construction of
1840 NITER and REDUCTION_LIST.
1841 (try_get_loop_niter): New.
1842 (try_create_reduction_list): New.
1843 (parallelize_loops): Bypass the failed checkings in autopar
1844 when can_be_parallel in loop structure is set to true.
1845
18462009-05-01 Tobias Grosser <grosser@fim.uni-passau.de>
1847
1848 * testsuite/gcc.dg/graphite/id-6.c: Update testcase.
1849 * testsuite/gcc.dg/graphite/scop-3.c: Dito.
1850
18512009-05-01 Tobias Grosser <grosser@fim.uni-passau.de>
1852
1853 * graphite-scop-detection.c (stmt_simple_for_scop_p):
1854 Enable EQ_EXPR and NE_EXPR again.
1855
18562009-04-30 Tobias Grosser <grosser@fim.uni-passau.de>
1857
1858 * graphite-scop-detection.c (graphite_can_represent_scev):
1859 Add check if scev is affine multivariate.
1860 (harmful_stmt_in_bb): Check if we can represent the conditions.
1861 (scopdet_basic_block_info (basic_block bb, VEC): Pass the loop to
1862 harmful_stmt_in_bb.
1863 * testsuite/gcc.dg/graphite/id-7.c: New.
1864
18652009-04-30 Tobias Grosser <grosser@fim.uni-passau.de>
1866
1867 * graphite-sese-to-poly.c (bb_contains_non_iv_scalar_phi_nodes):
1868 Check all bbs in region, not only the bbs that are represented in
1869 GRAPHITE.
1870 (build_poly_scop): Add newline.
1871 * testsuite/gcc.dg/graphite/id-8.c: New.
1872
18732009-04-30 Li Feng <nemokingdom@gmail.com>
1874
1875 * cfgloop.c (alloc_loop): Initialize can_be_parallel to false
1876 when loop initialize.
1877 * cfgloop.h (struct loop): Introduce flag can_be_parallel.
1878 * common.opt: Declare flag_graphite_force_parallel.
1879 * graphite-clast-to-gimple.c (translate_clast): Mark the innermost
1880 loop parallel.
1881 * graphite-poly.c (apply_poly_transforms): Introduce
1882 flag_graphite_force_parallel.
1883 * tree-ssa-loop.c (gate_graphite_transforms): ditto.
1884 * toplev.c (process_options): ditto and replace a not correctly
1885 encoded space.
1886
18872009-04-30 Li Feng <nemokingdom@gmail.com>
1888
1889 * graphite-clast-to-gimple.c (loop_iv_stack_patch_for_consts):
1890 Change the call of gbb_loop_at_index and/or gbb_loop_index due
1891 to the redefinition.
1892 (compute_cloog_iv_types_1): ditto.
1893 (build_iv_mapping): ditto.
1894 * graphite-sese-to-poly.c (new_gimple_bb): Remove GBB_LOOPS related
1895 initialization.
1896 (free_gimple_bb): Removed GBB_LOOPS related free part.
1897 (build_bb_loops): Removed.
1898 * sese.h (struct gimple_bb): Removed loops.
1899 (GBB_LOOPS): Removed.
1900 (gbb_loop_at_index): Instead of using GBB_LOOPS, we use sese instead.
1901 (gbb_loop_index): ditto.
1902
19032009-04-24 Tobias Grosser <grosser@fim.uni-passau.de>
1904
1905 * graphite-scop-detection.c (graphite_can_represent_scev): Do not
1906 allow non constant strides.
1907 * testsuite/gcc.dg/graphite/scop-20.c: New.
1908
19092009-04-24 Sebastian Pop <sebastian.pop@amd.com>
1910
1911 * graphite-scop-detection.c (dot_all_scops): Fix system call
1912 return value warning.
1913 (dot_scop): Same.
1914
19152009-04-24 Sebastian Pop <sebastian.pop@amd.com>
1916
1917 * testsuite/gcc.dg/graphite/id-6.c: Fix pattern.
1918 * testsuite/gcc.dg/graphite/scop-3.c: Same.
1919
19202009-04-24 Sebastian Pop <sebastian.pop@amd.com>
1921
1922 * graphite-poly.c (map_into_dep_poly, map_dr_into_dep_poly,
1923 build_pairwise_constraint, dr_equality_constraints,
1924 build_pairwise_scheduling_equality,
1925 build_pairwise_scheduling_inequality, lexicographically_gt_p,
1926 build_lexicographically_gt_constraint, dependence_polyhedron,
1927 graphite_legal_transform_dr, graphite_legal_transform_bb,
1928 graphite_legal_transform): New.
1929 * graphite-poly.h (graphite_legal_transform): Declared.
1930 * graphite-sese-to-poly.c (build_poly_scop): Call to
1931 graphite_legal_transform is disabled for the moment.
1932
19332009-04-24 Sebastian Pop <sebastian.pop@amd.com>
1934
1935 * graphite-poly.h (pbb_nb_scattering_dims): New.
1936 (pbb_nb_scattering): Use it.
1937
19382009-04-24 Sebastian Pop <sebastian.pop@amd.com>
1939
1940 * graphite-ppl.c (ppl_insert_dimensions_pointset): Add
1941 Pointset_Powerset version of ppl_insert_dimensions.
1942 * graphite-ppl.h (ppl_insert_dimensions_pointset): Declared.
1943
19442009-04-24 Sebastian Pop <sebastian.pop@amd.com>
1945
1946 * graphite-ppl.c (ppl_insert_dimensions): Fix formatting.
1947
19482009-04-24 Sebastian Pop <sebastian.pop@amd.com>
1949
1950 * graphite-poly.h: Fix comment.
1951
19522009-04-24 Sebastian Pop <sebastian.pop@amd.com>
1953
1954 * graphite-sese-to-poly.c (build_poly_dr): Fix data ref multiplier.
1955
19562009-04-24 Tobias Grosser <grosser@fim.uni-passau.de>
1957
1958 * sese.c (expand_scalar_variables_stmt): Only iterate over the old
1959 statements.
1960
19612009-04-24 Tobias Grosser <grosser@fim.uni-passau.de>
1962
1963 * graphite-sese-to-poly.c (var_used_in_not_loop_header_phi_node): New.
1964 (graphite_stmt_p): Represent bbs necessary to build the phi nodes of
1965 conditions.
1966
19672009-04-20 Sebastian Pop <sebastian.pop@amd.com>
1968
1969 * graphite-scop-detection.c (stmt_simple_for_scop_p): Do not
1970 handle EQ_EXPR and NE_EXPR.
1971
19722009-04-17 Tobias Grosser <grosser@fim.uni-passau.de>
1973
1974 * graphite-poly.h (poly_dr): Fix comment.
1975
19762009-04-09 Sebastian Pop <sebastian.pop@amd.com>
1977 Tobias Grosser <grosser@fim.uni-passau.de>
1978
1979 * graphite-poly.c (new_poly_bb): Do not initialize PBB_DOMAIN
1980 with a zero dimension polyhedron.
1981 (find_scop_parameters): Move the call to scop_set_nb_params here.
1982 (build_loop_iteration_domains): Store in loop->aux the iteration
1983 domain polyhedron.
1984 (build_scop_iteration_domain): Fix PBB_DOMAIN for bbs not surrounded
1985 by any loop in scop.
1986 (build_poly_scop): Do not call scop_set_nb_params.
1987
19882009-04-09 Sebastian Pop <sebastian.pop@amd.com>
1989 Tobias Grosser <grosser@fim.uni-passau.de>
1990
1991 * graphite-sese-to-poly.c (add_condition_to_pbb): Pass code to
1992 add_condition_to_domain not GT_EXPR.
1993
19942009-04-09 Tobias Grosser <grosser@fim.uni-passau.de>
1995
1996 * graphite-ppl.c (debug_ppl_powerset_matrix): New.
1997 * graphite-ppl.h (debug_ppl_powerset_matrix): New.
1998 * graphite-sese-to-poly.c (add_condition_to_pbb): Use
1999 upper_bound_assign to calculate unions.
2000 * testsuite/gcc.dg/graphite/id-6.c: New.
2001
20022009-04-09 Tobias Grosser <grosser@fim.uni-passau.de>
2003
2004 * graphite-scop-detection.c (canonicalize_loop_closed_ssa): Do not
2005 handle abnormal edges.
2006
20072009-04-09 Tobias Grosser <grosser@fim.uni-passau.de>
2008
2009 * graphite-poly.c (new_poly_dr, free_poly_dr): New.
2010 (free_poly_bb): Also free poly_drs.
2011 * graphite-poly.h (new_poly_dr, free_poly_dr): New.
2012 (poly_dr): Polyhedron to Pointset_Powerset.
2013 (pdr_accessp_nb_subscripts): Same.
2014 * graphite-sese-to-poly.c (build_poly_dr): Same. And actually build
2015 poly_drs.
2016
20172009-04-08 Sebastian Pop <sebastian.pop@amd.com>
2018
2019 * graphite-clast-to-gimple.c (initialize_cloog_names): Change cloog
2020 names into more meaningful names.
2021
20222009-04-08 Sebastian Pop <sebastian.pop@amd.com>
2023
2024 * testsuite/gfortran.dg/graphite/interchange-1.c: New.
2025 * testsuite/gfortran.dg/graphite/interchange-2.c: New.
2026
20272009-04-08 Sebastian Pop <sebastian.pop@amd.com>
2028
2029 * graphite-clast-to-gimple.c (graphite_loop_normal_form): Do not build
2030 the reduction_list.
2031 * tree-parloops.c (rewrite_phi_with_iv): New.
2032 (rewrite_all_phi_nodes_with_iv): New.
2033 (canonicalize_loop_ivs): Call them.
2034
20352009-04-08 Sebastian Pop <sebastian.pop@amd.com>
2036
2037 * graphite-sese-to-poly.c (try_generate_gimple_bb): Use
2038 graphite_find_data_references_in_stmt.
2039 * tree-data-ref.c (graphite_find_data_references_in_stmt): New.
2040 * tree-data-ref.h (graphite_find_data_references_in_stmt): Declared.
2041
20422009-04-08 Sebastian Pop <sebastian.pop@amd.com>
2043
2044 * sese.c (add_loop_exit_phis): Don't fail on non SSA_NAME renames.
2045
20462009-04-08 Sebastian Pop <sebastian.pop@amd.com>
2047
2048 * graphite-sese-to-poly.c (build_scop_bbs_1): Use bb_in_sese_p
2049 instead of bb_in_region.
2050 (flag_bb_in_region): Same. Renamed flag_bb_in_sese.
2051 (build_sese_conditions): Use flag_bb_in_sese.
2052 * sese.c (register_bb_in_sese): Removed.
2053 (new_sese): Remove initialization of SESE_REGION_BBS.
2054 (free_sese): Do not free SESE_REGION_BBS.
2055 * sese.h (struct sese): Remove field region_basic_blocks.
2056 (SESE_REGION_BBS): Removed.
2057 (bb_in_sese_p): Implement in function of bb_in_region.
2058
20592009-04-08 Sebastian Pop <sebastian.pop@amd.com>
2060
2061 * graphite-scop-detection.c (limit_scops): Deal only with single exit
2062 loops.
2063
20642009-04-08 Tobias Grosser <grosser@fim.uni-passau.de>
2065
2066 * graphite-scop-detection.c (stmt_simple_for_scop_p): Allow NE_EXPR
2067 and EQ_EXPR.
2068 * graphite-sese-to-poly.c (create_linear_expr_from_tree): New.
2069 (add_condition_to_domain): New.
2070 (add_condition_to_pbb): New.
2071 (add_conditions_to_domain): Cleanup and handle of NE_EXPR and EQ_EXPR.
2072 * testsuite/gcc.dg/graphite/scop-3.c: Update number of detected SCoPs.
2073
20742009-04-08 Tobias Grosser <grosser@fim.uni-passau.de>
2075
2076 * graphite-clast-to-gimple.c (build_cloog_prog): ppl_Polyhedron ->
2077 ppl_Pointset_Powerset.
2078 * graphite-poly.c (new_poly_bb, free_poly_bb): Same.
2079 * graphite-poly.h (poly_bb): poly_bb.domain Same.
2080 (pbb_nb_loops): Same.
2081 * graphite-sese-to-poly.c (build_loop_iteration_domains,
2082 add_conditions_to_domain): Same.
2083 * graphite-ppl.c (new_Cloog_Domain_from_ppl_Pointset_Powerset): New.
2084 (ppl_print_polyhedron_matrix): ppl_Polyhedron_t ->
2085 ppl_const_Polyhedron_t.
2086 (ppl_print_powerset_matrix): New.
2087 * graphite-ppl.h (new_Cloog_Domain_from_ppl_Pointset_Powerset,
2088 ppl_print_powerset_matrix): New.
2089 (ppl_print_polyhedron_matrix): Updated.
2090
20912009-04-07 Sebastian Pop <sebastian.pop@amd.com>
2092
2093 * tree-scalar-evolution.c (analyze_scalar_evolution_1): Fix comment.
2094
20952009-04-07 Sebastian Pop <sebastian.pop@amd.com>
2096
2097 * graphite-poly.c (extend_scattering): Fix indenting. Free cstr.
2098 (print_iteration_domains, debug_iteration_domain,
2099 debug_iteration_domains): New.
2100 * graphite-poly.h (print_iteration_domains, debug_iteration_domain,
2101 debug_iteration_domains): Declared.
2102 * graphite-sese-to-poly.c (build_pbb_scattering_polyhedrons): Fix
2103 indenting.
2104
21052009-04-03 Tobias Grosser <grosser@fim.uni-passau.de>
2106 Sebastian Pop <sebastian.pop@amd.com>
2107
2108 * graphite-poly.h (print_iteration_domain): New.
2109 * graphite-sese-to-poly.c (add_conditions_to_domain): Fixed bug.
2110 (build_sese_conditions_1, build_sese_conditions_after,
2111 build_sese_conditions_before): New.
2112 (build_sese_conditions): Rewritten.
2113
21142009-04-03 Sebastian Pop <sebastian.pop@amd.com>
2115 Tobias Grosser <grosser@fim.uni-passau.de>
2116
2117 Cleanup of code generation liveouts.
2118 * graphite-clast-to-gimple.c (translate_clast): Use a single
2119 rename_map instead of one per translated statement.
2120 Do not use SESE_LIVEOUT_RENAMES.
2121 (graphite_loop_normal_form): Do not use SESE_REDUCTION_LIST.
2122 (gloog): Do not use SESE_LIVEOUT_RENAMES.
2123 * graphite-scop-detection.c (harmful_stmt_in_bb): Return the close
2124 phi node of a reduction: when a loop contains a reduction used outside
2125 the loop, there should be a scalar close phi node on the exit block.
2126 * sese.c (new_sese): Do not initialize SESE_LIVEOUT,
2127 SESE_LIVEOUT_RENAMES, and SESE_REDUCTION_LIST.
2128 (free_sese): Do not free them.
2129 (sese_build_liveouts_use): Do not use them.
2130 (sese_build_liveouts_bb): Same.
2131 (sese_build_liveouts): Same.
2132 (sese_insert_phis_for_liveouts): Same.
2133 (sese_adjust_phis_for_liveouts): Same. Renamed sese_adjust_liveout_phis.
2134 (defined_in_loop_p): New.
2135 (alive_after_loop): New.
2136 (close_phi_not_yet_inserted_p): New.
2137 (struct alep, alep_p): New.
2138 (add_loop_exit_phis): Remove from the rename_map all the names defined
2139 in the code generated loop.
2140 (insert_loop_close_phis): Traverse the rename_map passed to it.
2141 Don't use SESE_LIVEOUT_RENAMES.
2142 (default_liveout_before_guard): Renamed default_before_guard.
2143 (insert_guard_phis): Do not use SESE_LIVEOUT_RENAMES.
2144 (graphite_copy_stmts_from_block): Do not directly call set_rename.
2145 (register_sese_liveout_renames): Removed.
2146 (copy_bb_and_scalar_dependences): Do not call it.
2147 * sese.h (struct sese): Removed fields: liveout, liveout_renames, and
2148 reduction_list.
2149 (SESE_LIVEOUT): Removed.
2150 (SESE_LIVEOUT_RENAMES): Removed.
2151 (SESE_REDUCTION_LIST): Removed.
2152 (sese_build_liveouts): Removed.
2153 (sese_adjust_phis_for_liveouts): Renamed sese_adjust_liveout_phis.
2154 (insert_loop_close_phis): Pass a htab_t instead of a sese.
2155 (insert_guard_phis): Same.
2156 (rename_map_elt): Declare a VEC of them.
2157 * tree-parloops.c (canonicalize_loop_ivs): reduction_list contains
2158 trees not pointers to trees.
2159
2160 Rewrite in canonical close SSA form:
2161 * graphite-scop-detection.c (contains_only_close_phi_nodes): New.
2162 (limit_scops): Close the scop after the block containing the close phi
2163 nodes.
2164 (canonicalize_loop_closed_ssa): New.
2165 (canonicalize_loop_closed_ssa_form): New.
2166 (build_scops): Call canonicalize_loop_closed_ssa_form.
2167
2168 * graphite-sese-to-poly.c: Fix typos.
2169
21702009-04-03 Sebastian Pop <sebastian.pop@amd.com>
2171
2172 * graphite-poly.c (print_scattering_function, print_pbb_domain):
2173 Extended.
2174 (dump_gbb_conditions, dump_gbb_cases, print_iteration_domain): New.
2175 (print_pbb): Add conditions.
2176
21772009-04-01 Tobias Grosser <grosser@fim.uni-passau.de>
2178 Sebastian Pop <sebastian.pop@amd.com>
2179
2180 * graphite-scop-detection.c (bb_in_sd_region): Use bb_in_region.
2181 * graphite-sese-to-poly.c (all_non_dominated_preds_marked_p): New.
2182 (build_scop_bbs_1): New.
2183 (build_scop_bbs): Rewrite.
2184 * sese.h (bb_in_region): New.
2185
21862009-03-29 Tobias Grosser <grosser@fim.uni-passau.de>
2187
2188 * graphite-poly.c (new_poly_bb, free_poly_bb): Initialize/free
2189 poly_drs vector.
2190 (print_scop): Style.
2191 * graphite-poly.h (poly_bb): Add drs vector.
2192 (PBB_DRS): Add accessor.
2193 * graphite-sese-to-poly.c (build_poly_dr): New.
2194 (build_pbb_drs, build_scop_drs): New.
2195 (build_poly_scop): call build_scop_drs (Disabled at the moment).
2196
21972009-03-29 Tobias Grosser <grosser@fim.uni-passau.de>
2198
2199 * tree-ssa-loop.c: Include forgotten toplev.h
2200
22012009-03-29 Tobias Grosser <grosser@fim.uni-passau.de>
2202
2203 * graphite-poly.c: (apply_poly_transforms): sorry -> gcc_unreachable.
2204 * testsuite/gcc.dg/graphite/pr37883.c: Remove -floop-*
2205 * testsuite/gcc.dg/graphite/pr37928.c: Same
2206 * testsuite/gcc.dg/graphite/pr38409.c: Same
2207 * testsuite/gcc.dg/graphite/pr38498.c: Same
2208 * testsuite/gcc.dg/graphite/pr38559.c: Same
2209 * testsuite/gcc.dg/graphite/pr39335.c: Same
2210 * testsuite/gcc.dg/graphite/pr39335_1.c: Same
2211 * testsuite/gfortran.dg/graphite/block-2.f: Same
2212 * tree-ssa-loop.c (gate_graphite_transforms): Always fail if called
2213 with -floop-*.
2214
22152009-03-28 Tobias Grosser <grosser@fim.uni-passau.de>
2216
2217 * graphite-sese-to-poly.c (ref_nb_loops, build_access_matrix_with_af,
2218 build_access_matrix, build_scop_data_accesses): Remove access function
2219 building. (We get a new version soon).
2220 (build_bb_loops, scan_tree_for_params_right_scev): Update.
2221 * sese.h (nb_loops_around_loop_in_sese): Remove.
2222 (sese_loop_depth): Do not use SESE_LOOP_NEST any more.
2223
22242009-03-27 Tobias Grosser <grosser@fim.uni-passau.de>
2225 Sebastian Pop <sebastian.pop@amd.com>
2226
2227 * graphite-scop-detection.c (struct scopdet_info): Rename last
2228 field to exit.
2229 (scopdet_basic_block_info, build_scops_1): Don't use
2230 CDI_POST_DOMINATORS. CDI_POST_DOMINATORS should never be used.
2231
22322009-03-26 Tobias Grosser <grosser@fim.uni-passau.de>
2233 Sebastian Pop <sebastian.pop@amd.com>
2234
2235 * graphite-clast-to-gimple.c (gloog): Call sese_build_liveouts.
2236 * sese.c (sese_build_liveouts_use): Renamed from
2237 sese_build_livein_liveouts_use. Remove liveins.
2238 (sese_build_liveouts_bb): Renamed from sese_build_livein_liveouts_bb.
2239 Call sese_build_liveouts_use.
2240 (sese_build_liveouts): Renamed from sese_build_livein_liveouts.
2241 Call sese_build_liveouts_bb.
2242 (new_sese, free_sese): Remove liveins.
2243 (sese_add_exit_phis_var): Deleted.
2244 (sese_insert_phis_for_liveouts): Call sese_add_exit_phis_edge
2245 directly.
2246 (graphite_copy_stmts_from_block): Remove SESE_NUM_VER.
2247
2248 * sese.h (sese): Remove num_ver and livein.
2249 (SESE_LIVEIN, SESE_LIVEIN_VER, SESE_NUM_VER): Removed.
2250
22512009-03-25 Tobias Grosser <grosser@fim.uni-passau.de>
2252
2253 * graphite-sese-to-poly.c (build_scop_scattering): Fix compile.
2254
22552009-03-25 Tobias Grosser <grosser@fim.uni-passau.de>
2256
2257 * graphite-sese-to-poly.c (compare_prefix_loops): Removed.
2258 (build_scop_scattering): Do not use compare_prefix_loops any more.
2259 (nb_common_loops): New.
2260
22612009-03-24 Sebastian Pop <sebastian.pop@amd.com>
2262
2263 * sese.c (get_new_name_from_old_name): Renamed get_rename.
2264 (register_old_and_new_names): Renamed set_rename.
2265
22662009-03-24 Sebastian Pop <sebastian.pop@amd.com>
2267
2268 * graphite-scop-detection.h (nb_reductions_in_loop): Revert removal
2269 of the decl from the previous commit.
2270
22712009-03-24 Sebastian Pop <sebastian.pop@amd.com>
2272
2273 * graphite-scop-detection.c (dot_scop): New.
2274 * graphite-scop-detection.h (dot_scop): Declared.
2275
22762009-03-24 Sebastian Pop <sebastian.pop@amd.com>
2277
2278 * graphite-sese-to-poly.c (compare_prefix_loops): Fix compare.
2279
22802009-03-24 Sebastian Pop <sebastian.pop@amd.com>
2281
2282 * cfgloopmanip.c (create_empty_loop_on_edge): Generate the loop exit
2283 condition at the end of the loop.
2284 * graphite.c (graphite_initialize, graphite_finalize): Print to
2285 dump_file the compiled function.
2286 * graphite-clast-to-gimple.c (graphite_create_new_loop): Update use
2287 of create_empty_loop_on_edge.
2288 (translate_clast): Update the code generation of loops for the new
2289 shape of loops.
2290 * cfgloop.h (create_empty_loop_on_edge): Update declaration.
2291
22922009-03-24 Sebastian Pop <sebastian.pop@amd.com>
2293
2294 Reverted the patch from 2009-03-19.
2295
22962009-03-19 Tobias Grosser <grosser@fim.uni-passau.de>
2297
2298 * graphite-poly.c (new_poly_bb, free_poly_bb): Initialize/free
2299 poly_drs vector.
2300 (print_scop): Style.
2301 * graphite-poly.h (poly_bb): Add drs vector.
2302 (PBB_DRS): Add accessor.
2303 * graphite-sese-to-poly.c (ref_nb_loops): Remove.
2304 (build_access_matrix_with_af, build_access_matrix,
2305 build_scop_data_accesses): Delete.
2306 (build_poly_dr): New.
2307 (build_pbb_drs, build_scop_drs): New.
2308 (build_poly_scop): call build_scop_drs.
2309
23102009-03-13 Sebastian Pop <sebastian.pop@amd.com>
2311
2312 * graphite-scop-detection.c (dot_all_scops_1): Close the table
2313 once per basic block.
2314
23152009-03-13 Tobias Grosser <grosser@fim.uni-passau.de>
2316
2317 * graphite-scop-detection.c (graphite_can_represent_scev): New.
2318 (graphite_can_represent_expr): Renamed from loop_affine_expr
2319 and enhanced.
2320 (stmt_simple_for_scop_p): Call graphite_can_represent_expr.
2321 (graphite_cannot_represent_loop): Add scop_entry to parameters.
2322 (scopdet_basic_block_info): Actually define entry_block.
2323 (stmt_simple_memref_p): Moved here from ...
2324
2325 * tree-data-ref.c (stmt_simple_memref_p): here.
2326 * tree-data-ref.h (stmt_simple_memref_p): Removed.
2327
23282009-03-13 Tobias Grosser <grosser@fim.uni-passau.de>
2329
2330 * testsuite/gcc.dg/graphite/id-4.c: New.
2331
23322009-03-12 Sebastian Pop <sebastian.pop@amd.com>
2333
2334 * sese.c (expand_scalar_variables_expr): Handle tcc_comparison.
2335 (register_old_and_new_names): Update the content of the map.
2336 When there was already a rename_map_elt in the map at that
2337 location, free it.
2338 (copy_bb_and_scalar_dependences): Do rename_variables after
2339 expand_scalar_variables.
2340 * graphite-clast-to-gimple.c (build_iv_mapping): Update the content
2341 of the map. When there was already a rename_map_elt in the
2342 map at that location, free it.
2343 (translate_clast): Pass the rename_map. Do not initialize and free
2344 a rename_map per stmt_user.
2345 (gloog): Initialize and free one rename_map and pass it to
2346 translate_clast.
2347
23482009-03-12 Sebastian Pop <sebastian.pop@amd.com>
2349
2350 * sese.c (expand_scalar_variables_stmt,
2351 expand_scalar_variables_ssa_name): Add a gimple_stmt_iterator
2352 parameter.
2353 (expand_scalar_variables_expr): Handle REALPART_EXPR and IMAGPART_EXPR.
2354 (expand_scalar_variables): Pass to expand_scalar_variables_stmt
2355 the gimple_stmt_iterator of the statement to be expanded.
2356 * graphite-scop-detection.c (is_simple_operand): Do handle
2357 REALPART_EXPR.
2358
23592009-03-11 Tobias Grosser <grosser@fim.uni-passau.de>
2360
2361 * graphite-scop-detection.c (is_simple_operand): Do not handle
2362 REALPART_EXPR.
2363 * testsuite/gcc.dg/graphite/id-2.c: New.
2364
2365 * graphite-sese-to-poly.c (build_bb_loops,
2366 add_value_to_dim, scan_tree_for_params_right_scev,
2367 scan_tree_for_params_int, scan_tree_for_params, idx_record_params,
2368 find_params_in_bb, build_loop_iteration_domains,
2369 add_conditions_to_domain): Remove subtract.
2370
23712009-03-11 Tobias Grosser <grosser@fim.uni-passau.de>
2372
2373 * graphite-clast-to-gimple.c (loop_iv_stack_patch_for_consts,
2374 build_iv_mapping, compute_cloog_iv_types_1, build_cloog_prog):
2375 pbb_loop_at_index -> gbb_loop_at_index.
2376 * graphite-poly.c (new_poly_bb, new_scop): New accessors.
2377 (debug_loop_vec): Delete.
2378 * graphite-poly.h (poly_bb, scop): Change black_box and region to void
2379 pointer. Move LOOPS to gimple_bb_p and insert nb_params.
2380 (PBB_LOOPS): Removed.
2381 (PBB_BLACK_BOX): Insert cast.
2382 (pbb_set_black_box): New setter.
2383 (pbb_loop_at_index, pbb_loop_index): Removed.
2384 (scop_set_region, scop_set_nb_params): New.
2385 * graphite-sese-to-poly.c (new_gimple_bb, free_gimple_bb,
2386 build_scop_scattering, build_bb_loops): Add GBB_LOOPS.
2387 (build_poly_scop): Use scop_set_nb_params.
2388 * sese.h (gimple_bb): Add LOOPS.
2389 (GBB_LOOPS, gbb_loop_index, gbb_loop_at_index): New.
2390
23912009-03-11 Tobias Grosser <grosser@fim.uni-passau.de>
2392
2393 Revert previous commit.
2394
23952009-03-11 Sebastian Pop <sebastian.pop@amd.com>
2396
2397 * sese.c (expand_scalar_variables_expr): Handle tcc_comparison.
2398 (register_old_and_new_names): Update the content of the map.
2399 When there was already a rename_map_elt in the map at that
2400 location, free it.
2401 (copy_bb_and_scalar_dependences): Do rename_variables after
2402 expand_scalar_variables.
2403 * graphite-clast-to-gimple.c (build_iv_mapping): Update the content
2404 of the map. When there was already a rename_map_elt in the
2405 map at that location, free it.
2406 (translate_clast): Pass the rename_map. Do not initialize and free
2407 a rename_map per stmt_user.
2408 (gloog): Initialize and free one rename_map and pass it to
2409 translate_clast.
2410
24112009-03-11 Tobias Grosser <grosser@fim.uni-passau.de>
2412
2413 Remove forgotten line in revert.
2414
24152009-03-11 Sebastian Pop <sebastian.pop@amd.com>
2416
2417 Revert previous commit.
2418
24192009-03-10 Sebastian Pop <sebastian.pop@amd.com>
2420
2421 * sese.c (register_old_and_new_names): Update the content
2422 of the map. When there was already a rename_map_elt in the
2423 map at that location, free it.
2424 (copy_bb_and_scalar_dependences): Do rename_variables after
2425 expand_scalar_variables.
2426 * graphite-clast-to-gimple.c (build_iv_mapping): Update the content
2427 of the map. When there was already a rename_map_elt in the
2428 map at that location, free it.
2429 (translate_clast): Pass the rename_map. Do not initialize and free
2430 a rename_map per stmt_user.
2431 (gloog): Initialize and free one rename_map and pass it to
2432 translate_clast.
2433
24342009-03-10 Sebastian Pop <sebastian.pop@amd.com>
2435
2436 * graphite-clast-to-gimple.c (translate_clast): context_loop
2437 is never NULL.
2438
24392009-03-10 Tobias Grosser <grosser@fim.uni-passau.de>
2440 Sebastian Pop <sebastian.pop@amd.com>
2441
2442 * graphite-ppl.c (ppl_insert_dimensions): Fix stupid mistake
2443 of the use of ppl_Polyhedron_map_space_dimensions.
2444
24452009-03-10 Tobias Grosser <grosser@fim.uni-passau.de>
2446 Sebastian Pop <sebastian.pop@amd.com>
2447
2448 * graphite-poly.c (unify_scattering_dimensions): Fix types.
2449 * graphite-poly.h (poly_dr_p, poly_dr, POLY_DR_TYPE, PDR_BB,
2450 PDR_TYPE, PDR_ACCESSES, pdr_accessp_nb_subscripts,
2451 pdr_accessp_nb_iterators, pdr_accessp_nb_params,
2452 pdr_accessp_alias_set_dim, pdr_accessp_subscript_dim,
2453 pdr_accessp_iterator_dim, pdr_accessp_param_dim,
2454 pbb_nb_params): New.
2455 (pbb_nb_loops, pbb_nb_scattering, scop_nb_params,
2456 nb_loops_around_pbb): Adapt return types.
2457
24582009-03-09 Tobias Grosser <grosser@fim.uni-passau.de>
2459
2460 * Makefile.in (graphite.o, graphite-sese-to-poly.o,
2461 graphite-clast-to-gimple.o, graphite-data-ref.o,
2462 graphite-scop-detection.o, graphite-poly.o): Add
2463 more headers.
2464
24652009-03-05 Tobias Grosser <grosser@fim.uni-passau.de>
2466
2467 * Makefile.in (graphite.o, graphite-sese-to-poly.o,
2468 graphite-clast-to-gimple.o, graphite-data-ref.o,
2469 graphite-scop-detection.o, graphite-poly.o): Add graphite-poly.h.
2470
24712009-03-04 Tobias Grosser <grosser@fim.uni-passau.de>
2472
2473 * testsuite/gcc.dg/graphite/pr37485.c: Remove -floop-block
2474 * testsuite/gcc.dg/graphite/pr37828.c: Same.
2475 * testsuite/gcc.dg/graphite/pr37684.c: Same.
2476 * testsuite/gcc.dg/graphite/block-0.c: Same.
2477 * testsuite/gcc.dg/graphite/block-1.c: Same.
2478 * testsuite/gcc.dg/graphite/block-2.c: Same.
2479 * testsuite/gcc.dg/graphite/block-3.c: Same.
2480 * testsuite/gcc.dg/graphite/block-4.c: Same.
2481 * testsuite/gcc.dg/graphite/block-5.c: Same.
2482 * testsuite/gcc.dg/graphite/block-6.c: Same.
2483 * testsuite/gfortran.dg/graphite/pr38083.f90: Same.
2484 * testsuite/gfortran.dg/graphite/block-1.f90: Same.
2485 * testsuite/gfortran.dg/graphite/block-3.f90: Same.
2486 * testsuite/gfortran.dg/graphite/pr37852.f90: Same.
2487 * testsuite/gfortran.dg/graphite/block-4.f90: Same.
2488 * testsuite/gfortran.dg/graphite/pr37980.f90: Same.
2489 * testsuite/gfortran.dg/graphite/pr38953.f90: Same.
2490 * testsuite/gfortran.dg/graphite/pr37857.f90: Same.
2491 * opts.c: Remove -floop-block from -O2.
2492 * graphite-poly.c: Fail if -floop-block -floop-interchange or
2493 -floop-strip-mine are used.
2494
24952009-03-04 Tobias Grosser <grosser@fim.uni-passau.de>
2496 Sebastian Pop <sebastian.pop@amd.com>
2497
2498 * graphite-clast-to-gimple.c (build_cloog_prog): Unify scattering
2499 dimensions.
2500 * graphite-poly.c (pbb_compare, graphite_sort_pbbs,
2501 graphite_trans_bb_move_loop, graphite_trans_bb_strip_mine,
2502 strip_mine_profitable_p, is_interchange_valid,
2503 graphite_trans_bb_block, graphite_trans_loop_block,
2504 graphite_trans_scop_block): Temporary removed.
2505 (extend_scattering, unify_scattering_dimensions): New.
2506 (print_scattering_function, graphite_read_transforms):
2507 PBB_SCATTERING -> PBB_TRANSFORMED_SCATTERING.
2508 (graphite_generate_scattering_fns): Removed.
2509 (apply_poly_transforms): Cleanup.
2510 (free_poly_bb): Add PBB_SCATTERING -> PBB_TRANSFORMED_SCATTERING.
2511 (schedule_to_scattering): Moved.
2512 (PBB_STATIC_SCHEDULE, PBB_SCATTERING): Removed.
2513 (PBB_ORIGINAL_SCATTERING, PBB_TRANSFORMED_SCATTERING): New.
2514 (pbb_nb_scattering): New.
2515 (SCOP_ENTRY, SCOP_EXIT, SCOP_REGION_BBS, SCOP_DEP_GRAPH, SCOP_PARAMS,
2516 SCOP_LOOP_NEST, SCOP_PARAMS, SCOP_OLDIVS, SCOP_LIVEOUT_RENAMES):
2517 Removed.
2518 * graphite-ppl.c (ppl_insert_dimensions): Extended and renamed from
2519 shift_poly.
2520 (ppl_strip_loop): PBB_SCATTERING -> PBB_TRANSFORMED_SCATTERING.
2521 * graphite-scop-detection.c (dot_all_scops_1): PBB_SCATTERING
2522 -> PBB_TRANSFORMED_SCATTERING.
2523 * graphite-sese-to-poly.c (build_scop_bbs): Remove region.
2524 (build_pbb_scattering_polyhedron): Moved from schedule_to_scattering.
2525 (build_scop_scattering): Renamed from build_scop_canonical_schedules.
2526 (check_poly_representation): Do not return bool.
2527 (graphite_transform_loops): Reformat.
2528 * sese.h (SESE_ENTRY_BB, SESE_EXIT_BB): New.
2529
25302009-03-04 Sebastian Pop <sebastian.pop@amd.com>
2531
2532 * graphite-poly.c (print_pbb_domain, print_pbb, print_scop,
2533 debug_pbb_domain, debug_pbb, debug_scop): New.
2534 * graphite-poly.h (print_pbb_domain, print_pbb, print_scop,
2535 debug_pbb_domain, debug_pbb, debug_scop): Declared.
2536
25372009-03-02 Sebastian Pop <sebastian.pop@amd.com>
2538
2539 PR middle-end/39335
2540 * tree-parloops.c (canonicalize_loop_ivs): Call fold_convert
2541 when the type precision of the induction variable should be
2542 larger than the type precision of nit.
2543 (gen_parallel_loop): Update use of canonicalize_loop_ivs.
2544 * graphite-clast-to-gimple.c (graphite_loop_normal_form): Same.
2545 * tree-flow.h (canonicalize_loop_ivs): Update declaration.
2546
2547 * testsuite/gcc.dg/graphite/pr39335_1.c: New.
2548 * testsuite/gcc.dg/graphite/pr39335.c: New.
2549
25502009-03-02 Sebastian Pop <sebastian.pop@amd.com>
2551
2552 * tree-parloops.c (canonicalize_loop_ivs): reduction_list contains
2553 SSA_NAMES not struct reduction_info.
2554
25552009-03-02 Sebastian Pop <sebastian.pop@amd.com>
2556
2557 * sese.c (expand_scalar_variables_expr): Handle ADDR_EXPR.
2558
25592009-02-27 Sebastian Pop <sebastian.pop@amd.com>
2560 Tobias Grosser <grosser@fim.uni-passau.de>
2561
2562 * sese.c (new_sese): Initialize SESE_REDUCTION_LIST.
2563 (free_sese): Free SESE_REDUCTION_LIST.
2564 * sese.h (struct sese): Add field reduction_list.
2565 (SESE_REDUCTION_LIST): New.
2566 * graphite-clast-to-gimple.c (graphite_loop_normal_form): Call
2567 canonicalize_loop_ivs on SESE_REDUCTION_LIST.
2568
25692009-02-27 Sebastian Pop <sebastian.pop@amd.com>
2570 Tobias Grosser <grosser@fim.uni-passau.de>
2571
2572 * tree-flow.h (gather_scalar_reductions): Use struct loop * instead
2573 of loop_p.
2574
25752009-02-27 Sebastian Pop <sebastian.pop@amd.com>
2576 Tobias Grosser <grosser@fim.uni-passau.de>
2577
2578 * tree-parloops.c (struct brli, build_reduction_list_info,
2579 analyze_reduction_list, gather_scalar_reductions): New.
2580 (loop_parallel_p): Build a reduction list containing only
2581 PHI_RESULT SSA_NAMEs: call gather_scalar_reductions.
2582 (gen_parallel_loop): Call the analysis analyze_reduction_list.
2583 (parallelize_loops): Now reduction_list is a htab_t of SSA_NAMEs.
2584 * tree-flow.h (gather_scalar_reductions): Declared.
2585
25862009-02-26 Sebastian Pop <sebastian.pop@amd.com>
2587
2588 PR middle-end/39308
2589 * graphite-clast-to-gimple.c (graphite_loop_normal_form): Do not call
2590 number_of_iterations_exit from a gcc_assert.
2591
25922009-02-25 Sebastian Pop <sebastian.pop@amd.com>
2593 Jan Sjodin <jan.sjodin@amd.com>
2594
2595 * output.h (graphite_out_file, graphite_in_file): Declared.
2596 * toplev.c (graphite_out_file, graphite_in_file): New.
2597 (init_asm_output): Initialize graphite_in_file and graphite_out_file.
2598 * graphite-clast-to-gimple.c (build_cloog_prog): Read PBB_SCATTERING.
2599 Don't call schedule_to_scattering.
2600 * common.opt (fgraphite-write, fgraphite-read): New.
2601 * graphite-poly.c: Include output.h.
2602 (print_scattering_function, print_scattering_functions,
2603 debug_scattering_function, debug_scattering_functions,
2604 graphite_write_transforms, graphite_read_transforms,
2605 graphite_generate_scattering_fns): New.
2606 (apply_poly_transforms): Do not apply transform if flag_graphite_read.
2607 Call graphite_generate_scattering_fns, graphite_write_transforms,
2608 graphite_read_transforms.
2609 (new_poly_bb): Initialize PBB_SCATTERING.
2610 (free_poly_bb): Free PBB_SCATTERING.
2611 (schedule_to_scattering): Does not return, initialize PBB_SCATTERING.
2612 * graphite-poly.h (struct poly_bb): Add field scattering.
2613 (PBB_SCATTERING): New.
2614 (print_scattering_function, print_scattering_functions,
2615 debug_scattering_function, debug_scattering_functions): Declared.
2616 * graphite-ppl.c (cloog_matrix_to_ppl_constraint): Matrices contain
2617 GMP values, not integers!
2618 (ppl_print_polyhedron_matrix, debug_ppl_polyhedron_matrix,
2619 ppl_read_polyhedron_matrix): New.
2620 * graphite-ppl.h (ppl_print_polyhedron_matrix,
2621 debug_ppl_polyhedron_matrix,
2622 ppl_read_polyhedron_matrix): Declared.
2623 * Makefile.in (graphite-poly.o): Depends on output.h.
2624
26252009-02-23 Sebastian Pop <sebastian.pop@amd.com>
2626 Tobias Grosser <grosser@fim.uni-passau.de>
2627
2628 Revert this change:
2629 * graphite-scop-detection.c (stmt_simple_for_scop_p): Analyze
2630 scalar evolutions in the scop_entry->loop_father.
2631
26322009-02-23 Sebastian Pop <sebastian.pop@amd.com>
2633 Tobias Grosser <grosser@fim.uni-passau.de>
2634
2635 * graphite.h (ref_nb_loops): Remove declaration.
2636 (struct gimple_bb, gimple_bb_p, GBB_BB, GBB_DATA_REFS, GBB_CONDITIONS,
2637 GBB_CONDITION_CASES, GBB_CLOOG_IV_TYPES, gbb_loop, print_gimple_bb,
2638 debug_gbb): Moved to sese.h.
2639 * sese.h: As said.
2640
26412009-02-23 Sebastian Pop <sebastian.pop@amd.com>
2642 Tobias Grosser <grosser@fim.uni-passau.de>
2643
2644 * graphite-data-ref.[ch]: Disable.
2645
26462009-02-23 Sebastian Pop <sebastian.pop@amd.com>
2647 Tobias Grosser <grosser@fim.uni-passau.de>
2648
2649 * graphite-scop-detection.c (stmt_simple_for_scop_p): Analyze
2650 scalar evolutions in the scop_entry->loop_father.
2651
26522009-02-23 Sebastian Pop <sebastian.pop@amd.com>
2653
2654 * graphite-scop-detection.c (nb_reductions_in_loop): Moved here...
2655 (graphite_cannot_represent_loop_niter): Renamed
2656 graphite_cannot_represent_loop. Call nb_reductions_in_loop.
2657 (limit_scops): build_sese_loop_nests does not return a bool.
2658 * graphite-scop-detection.h (nb_reductions_in_loop): Declared.
2659 * sese.c (nb_reductions_in_loop): ... from here.
2660 (graphite_loop_normal_form): ... from here.
2661 (sese_record_loop): Does not fail, so does not return a bool.
2662 (build_sese_loop_nests): Same.
2663 * sese.h (build_sese_loop_nests): Update declaration.
2664 * graphite-clast-to-gimple.c (graphite_loop_normal_form): Moved here...
2665 (build_graphite_loop_normal_form): New.
2666 (gloog): Call build_graphite_loop_normal_form.
2667 * graphite-sese-to-poly.c (build_poly_scop): Don't fail on
2668 build_sese_loop_nests.
2669
2670 * testsuite/gcc.dg/graphite/id-1.c: New.
2671
26722009-02-23 Sebastian Pop <sebastian.pop@amd.com>
2673 Tobias Grosser <grosser@fim.uni-passau.de>
2674
2675 * graphite-sese-to-poly.c (scan_tree_for_params): Remove REAL_CST.
2676 The SCoP detection fix is sufficient.
2677
26782009-02-21 Sebastian Pop <sebastian.pop@amd.com>
2679
2680 PR tree-optimization/39260
2681 * graphite-scop-detection.c (harmful_stmt_in_bb): Stop a SCoP when
2682 the basic block contains a condition with a real type.
2683 * graphite-sese-to-poly.c (scan_tree_for_params): Handle REAL_CST.
2684
2685 * gcc.dg/graphite/pr39260.c: New.
2686
26872009-02-21 Sebastian Pop <sebastian.pop@amd.com>
2688
2689 * graphite-poly.c: Inlcude params.h.
2690 (graphite_trans_loop_block): Use PARAM_LOOP_BLOCK_TILE_SIZE for
2691 the size of a tile.
2692 * Makefile.in (graphite-poly.o): Depend on PARAMS_H.
2693 * params.def (PARAM_LOOP_BLOCK_TILE_SIZE): Define.
2694
26952009-02-20 Sebastian Pop <sebastian.pop@amd.com>
2696 Tobias Grosser <grosser@fim.uni-passau.de>
2697
2698 * graphite-scop-detection.c (dot_all_scops_1,
2699 dot_all_scops): Moved here.
2700 * graphite-scop-detection.h (dot_all_scops): Declared here.
2701 * graphite.c (graphite_initialize, graphite_finalize): New.
2702 (graphite_transform_loops): Cleaned up.
2703 * sese.c (debug_oldivs): Moved here.
2704 * graphite-poly.c (graphite_apply_transformations): Renamed
2705 apply_poly_transforms.
2706 (debug_loop_vec): Moved here.
2707 * graphite-sese-to-poly.c (build_bb_loops, build_sese_conditions_1,
2708 scop_contains_non_iv_scalar_phi_nodes, build_sese_conditions,
2709 find_scop_parameters, build_scop_iteration_domain,
2710 add_conditions_to_constraints, build_scop_canonical_schedules,
2711 build_scop_data_accesses): Now static.
2712 (build_poly_scop, check_poly_representation): New.
2713
27142009-02-20 Sebastian Pop <sebastian.pop@amd.com>
2715
2716 * graphite.c (graphite_stmt_p, new_gimple_bb, free_gimple_bb,
2717 remove_gbbs_in_scop, free_scops, try_generate_gimple_bb,
2718 build_scop_bbs, ref_nb_loops, compare_prefix_loops,
2719 build_scop_canonical_schedules, build_bb_loops, add_value_to_dim,
2720 scan_tree_for_params_right_scev, scan_tree_for_params_int,
2721 scan_tree_for_params, struct irp_data, dx_record_params,
2722 find_params_in_bb, find_scop_parameters, gbb_from_bb,
2723 build_loop_iteration_domains, add_conditions_to_domain,
2724 phi_node_is_iv, bb_contains_non_iv_scalar_phi_nodes,
2725 scop_contains_non_iv_scalar_phi_nodes, build_sese_conditions_1,
2726 build_sese_conditions, add_conditions_to_constraints,
2727 build_scop_iteration_domain, build_access_matrix_with_af,
2728 build_access_matrix,
2729 build_scop_data_accesses): Moved to graphite-sese-to-poly.c.
2730
2731 * graphite-sese-to-poly.c: New.
2732 * graphite-sese-to-poly.h: New.
2733
2734 * Makefile.in: Add new rule for graphite-sese-to-poly.o.
2735
27362009-02-20 Sebastian Pop <sebastian.pop@amd.com>
2737
2738 * graphite.c: Split graphite code generation to a new file.
2739 (graphite_verify, gmp_cst_to_tree, clast_name_to_gcc,
2740 max_precision_type, clast_to_gcc_expression_red,
2741 clast_to_gcc_expression, gcc_type_for_clast_expr,
2742 gcc_type_for_clast_eq, loop_iv_stack_patch_for_consts,
2743 graphite_translate_clast_equation, graphite_create_guard_cond_expr,
2744 graphite_create_new_guard, clast_get_body_of_loop,
2745 gcc_type_for_cloog_iv, gcc_type_for_iv_of_clast_loop,
2746 graphite_create_new_loop, build_iv_mapping, copy_renames,
2747 translate_clast, find_cloog_iv_in_expr, compute_cloog_iv_types_1,
2748 compute_cloog_iv_types, free_scattering, save_var_name,
2749 initialize_cloog_names, build_scop_context, build_cloog_prog,
2750 set_cloog_options, debug_clast_stmt, scop_to_clast,
2751 print_generated_program, debug_generated_program,
2752 gloog): Moved to graphite-clast-to-gimple.c.
2753
2754 (struct cloog_prog_clast): Moved to graphite-clast-to-gimple.h.
2755
2756 (iv_stack_entry_is_constant, iv_stack_entry_is_iv,
2757 loop_iv_stack_push_iv, loop_iv_stack_insert_constant,
2758 loop_iv_stack_pop, loop_iv_stack_get_iv,
2759 loop_iv_stack_get_iv_from_name, debug_loop_iv_stack,
2760 free_loop_iv_stack, loop_iv_stack_remove_constants,
2761 debug_rename_elt, debug_rename_map_1, debug_rename_map,
2762 rename_map_elt_info, eq_rename_map_elts, debug_ivtype_elt,
2763 debug_ivtype_map_1, debug_ivtype_map, ivtype_map_elt_info,
2764 eq_ivtype_map_elts, sese_add_exit_phis_edge,
2765 sese_add_exit_phis_var, sese_insert_phis_for_liveouts,
2766 get_vdef_before_sese, sese_adjust_vphi,
2767 get_new_name_from_old_name, sese_adjust_phis_for_liveouts,
2768 oldiv_for_loop, rename_variables_in_stmt, is_parameter,
2769 is_iv, expand_scalar_variables_ssa_name,
2770 expand_scalar_variables_expr, expand_scalar_variables_stmt,
2771 expand_scalar_variables, rename_variables, remove_condition,
2772 get_true_edge_from_guard_bb, get_false_edge_from_guard_bb,
2773 add_loop_exit_phis, insert_loop_close_phis, struct igp,
2774 default_liveout_before_guard, add_guard_exit_phis,
2775 insert_guard_phis, register_old_and_new_names,
2776 graphite_copy_stmts_from_block, register_sese_liveout_renames,
2777 copy_bb_and_scalar_dependences, outermost_loop_in_sese,
2778 if_region_set_false_region, create_if_region_on_edge,
2779 move_sese_in_condition): Moved to sese.c.
2780
2781 (nb_loops_around_loop_in_sese, struct ifsese, if_region_entry,
2782 if_region_exit, if_region_get_condition_block,
2783 struct rename_map_elt, new_rename_map_elt, enum iv_stack_entry_kind,
2784 union iv_stack_entry_data_union, struct iv_stack_entry_struct,
2785 iv_stack_entry_p, loop_iv_stack, struct ivtype_map_elt,
2786 ivtype_map_elt, new_ivtype_map_elt,
2787 recompute_all_dominators): Moved to sese.h.
2788
2789 * graphite-clast-to-gimple.c: New.
2790 * graphite-clast-to-gimple.h: New.
2791 * Makefile.in: Add new rule for graphite-clast-to-gimple.o.
2792 * sese.c: Modified as said above.
2793 * sese.h: Same.
2794
27952009-02-20 Sebastian Pop <sebastian.pop@amd.com>
2796
2797 * graphite.c: Split scop detection to a new file.
2798 (enum gbb_type, gbb_type, get_bb_type, struct sd_region_p, sd_region,
2799 move_sd_regions, loop_affine_expr, exclude_component_ref,
2800 is_simple_operand, stmt_simple_for_scop_p, harmful_stmt_in_bb,
2801 graphite_cannot_represent_loop_niter, struct scopdet_info,
2802 scopdet_basic_block_info, build_scops_1, bb_in_sd_region,
2803 find_single_entry_edge, find_single_exit_edge,
2804 create_single_entry_edge, sd_region_without_exit,
2805 create_single_exit_edge, unmark_exit_edges, mark_exit_edges,
2806 create_sese_edges, build_graphite_scops, limit_scops, build_scops):
2807 Moved to graphite-scop-detection.c.
2808
2809 * graphite-scop-detection.c: New.
2810 * graphite-scop-detection.h: New.
2811 * Makefile.in: Add new rule for graphite-scop-detection.o.
2812
2813 * sese.c: Include tree-chrec.h, tree-data-ref.h, and
2814 tree-scalar-evolution.h.
2815 (nb_reductions_in_loop, graphite_loop_normal_form, sese_record_loop,
2816 build_sese_loop_nests): Moved here from graphite.c.
2817 (param_index): Renamed parameter_index_in_region.
2818
28192009-02-18 Tobias Grosser <grosser@fim.uni-passau.de>
2820 Sebastian Pop <sebastian.pop@amd.com>
2821
2822 * gcc.dg/graphite/block-0.c: Expected to fail now.
2823 * gcc.dg/graphite/block-1.c: Same.
2824 * gcc.dg/graphite/block-5.c: Same.
2825 * gcc.dg/graphite/block-6.c: Same.
2826
28272009-02-18 Tobias Grosser <grosser@fim.uni-passau.de>
2828 Sebastian Pop <sebastian.pop@amd.com>
2829
2830 * graphite.h: Separate from graphite_bb_p the polyhedral
2831 representation in poly_bb_p and the GCC specifics in gimple_bb_p.
2832 (struct data_dependence_polyhedron, RDGE_DDP, ddp_p): Moved to
2833 graphite-data-ref.h.
2834 (struct poly_bb, PBB_SCOP, PBB_STATIC_SCHEDULE, PBB_DOMAIN,
2835 PBB_BLACK_BOX, PBB_LOOPS, pbb_nb_loops, pbb_loop_at_index,
2836 pbb_loop_index, struct scop, SCOP_BBS, SCOP_REGION, SCOP_ENTRY,
2837 SCOP_EXIT, SCOP_REGION_BBS, SCOP_DEP_GRAPH, SCOP_PARAMS,
2838 SCOP_LOOP_NEST, SCOP_PARAMS, SCOP_OLDIVS, SCOP_LIVEOUT_RENAMES,
2839 scop_nb_params): Moved to graphite-poly.h.
2840 * graphite-data-ref.c: Same.
2841 * graphite-data-ref.h: New.
2842 * graphite.c: Same.
2843 (pbb_compare, graphite_sort_pbbs, graphite_trans_bb_move_loop,
2844 graphite_trans_bb_strip_mine, strip_mine_profitable_p,
2845 is_interchange_valid, graphite_trans_bb_block,
2846 graphite_trans_loop_block, scop_max_loop_depth,
2847 graphite_trans_scop_block, graphite_apply_transformations,
2848 new_poly_bb, free_poly_bb, new_scop, free_scop): Moved to
2849 graphite-poly.c.
2850 * graphite-poly.h: New.
2851 * graphite-poly.c: New.
2852 * Makefile.in (OBJS-common): Add graphite-poly.o.
2853 (graphite-poly.o): New rule.
2854 * tree-data-ref.h (struct data_reference): Remove unused scop field.
2855 (DR_SCOP): Removed.
2856
28572009-02-18 Sebastian Pop <sebastian.pop@amd.com>
2858 Tobias Grosser <grosser@fim.uni-passau.de>
2859
2860 * graphite.c: Replace gb -> gbb.
2861 * graphite.h: Same.
2862 * graphite-data-ref.c: Same.
2863
28642009-02-18 Sebastian Pop <sebastian.pop@amd.com>
2865 Tobias Grosser <grosser@fim.uni-passau.de>
2866
2867 * Makefile.in (OBJS-commmon): Add sese.o.
2868 (sese.o): New.
2869 (graphite.o): Add sese.h.
2870 * graphite.c (bb_in_ss_p, loop_in_sese_p,
2871 sese_build_livein_liveouts_use, sese_build_livein_liveouts_bb,
2872 sese_build_livein_liveouts, register_bb_in_sese, new_sese, free_sese):
2873 Move to sese.
2874 (block_before_scop): Add missing return.
2875 (new_scop, free_scop): Remove SESE data structures.
2876 (scop_record_loop, scan_tree_for_params, find_params_in_bb,
2877 find_scop_parameters, build_loop_iteration_domains,
2878 add_conditions_to_domain, register_scop_liveout_renames,
2879 copy_bb_and_scalar_dependences): Scop -> SESE.
2880
2881 (add_conditions_to_domain): SCoP -> SESE and remove check
2882 (scop_contains_non_iv_scalar_phi_nodes): New.
2883 (build_scop_conditions_1, build_scop_conditions): Remove check for
2884 non iv scalar phi nodes.
2885 (print_scop_statistics): New.
2886 (graphite_transform_loops): Cleanup.
2887
2888 * graphite.h: Move to sese & cleanup.
2889 * sese.c: New.
2890 * sese.h: New.
2891
28922009-02-16 Sebastian Pop <sebastian.pop@amd.com>
2893 Tobias Grosser <grosser@fim.uni-passau.de>
2894
2895 * graphite.c (build_scop_conditions_1): Conditions are only
2896 at the end of a basic block.
2897
28982009-02-16 Sebastian Pop <sebastian.pop@amd.com>
2899 Tobias Grosser <grosser@fim.uni-passau>
2900
2901 * graphite.h (struct graphite_bb): Remove compressed_alpha_matrix
2902 field.
2903 (GBB_ALPHA): Removed.
2904
29052009-02-16 Sebastian Pop <sebastian.pop@amd.com>
2906 Tobias Grosser <grosser@fim.uni-passau.de>
2907
2908 * graphite-data-ref.c (graphite_test_dependence): Don't use
2909 GBB_DYNAMIC_SCHEDULE.
2910 * graphite.c (new_graphite_bb): Same.
2911 (free_graphite_bb): Same.
2912 (build_scop_dynamic_schedules): Removed.
2913 (graphite_transform_loops): Don't call it.
2914 * graphite.h (struct graphite_bb): Remove dynamic_schedule field.
2915 (GBB_DYNAMIC_SCHEDULE): Removed.
2916
29172009-02-16 Sebastian Pop <sebastian.pop@amd.com>
2918 Tobias Grosser <grosser@fim.uni-passau.de>
2919
2920 * graphite.c (schedule_to_scattering): Don't use CloogMatrix.
2921 (print_graphite_bb): Same.
2922 (build_cloog_prog): Same.
2923
29242009-02-16 Sebastian Pop <sebastian.pop@amd.com>
2925 Tobias Grosser <grosser@fim.uni-passau.de>
2926
2927 * graphite.c (build_cloog_prog): Don't use CloogMatrix.
2928
29292009-02-16 Sebastian Pop <sebastian.pop@amd.com>
2930 Tobias Grosser <grosser@fim.uni-passau.de>
2931
2932 * graphite.c (build_scop_context): Don't use CloogMatrix.
2933 * graphite-ppl.c (new_Cloog_Domain_from_ppl_Polyhedron): New.
2934 * graphite-ppl.h (new_Cloog_Domain_from_ppl_Polyhedron): Declared.
2935
29362009-02-16 Sebastian Pop <sebastian.pop@amd.com>
2937 Tobias Grosser <grosser@fim.uni-passau.de>
2938
2939 * graphite.h (struct scop): Move params, old_ivs, loops, loop_nest,
2940 liveout_renames, add_params fields...
2941 (struct sese): ... here.
2942 (SESE_PARAMS, SESE_LOOPS, SESE_LOOP_NEST, SESE_ADD_PARAMS,
2943 SESE_PARAMS, SESE_OLDIVS, SESE_LIVEOUT_RENAMES): New.
2944
29452009-02-16 Sebastian Pop <sebastian.pop@amd.com>
2946 Tobias Grosser <grosser@fim.uni-passau.de>
2947
2948 * graphite.c (print_scop): Do not print the CLooG program.
2949 (new_scop, free_scop, initialize_cloog_names, build_scop_context,
2950 build_cloog_prog, gloog): Don't use SCOP_PROG.
2951 (find_transform): Renamed scop_to_clast.
2952 (print_generated_program, debug_generated_program): New.
2953 (graphite_transform_loops): Adapt to new interface.
2954 * graphite.h (struct scop): Remove program field.
2955 (SCOP_PROG): Removed.
2956 (print_generated_program, debug_generated_program): Declared.
2957
29582009-02-16 Sebastian Pop <sebastian.pop@amd.com>
2959
2960 * graphite-data-ref.c (schedule_precedes_p, schedule_same_p): New.
2961 (statement_precedes_p): Use schedule_same_p and schedule_precedes_p.
2962 * graphite.c (gbb_compare, schedule_to_scattering, print_graphite_bb,
2963 free_graphite_bb, build_scop_canonical_schedules,
2964 graphite_trans_bb_strip_mine, graphite_trans_scop_block): Static
2965 schedules are now represented using a ppl_Linear_Expression_t.
2966 * graphite.h (struct graphite_bb): Same.
2967 * graphite-ppl.c (ppl_lexico_compare_linear_expressions): New.
2968 * graphite-ppl.h (ppl_lexico_compare_linear_expressions): Declared.
2969
29702009-02-15 Sebastian Pop <sebastian.pop@amd.com>
2971
2972 * graphite.c: Free local memory.
2973 * graphite-ppl.c: Same.
2974
29752009-02-15 Sebastian Pop <sebastian.pop@amd.com>
2976
2977 * graphite.c (const_column_index, get_first_matching_sign_row_index,
2978 get_lower_bound_row, get_upper_bound_row, copy_constraint,
2979 swap_constraint_variables, scale_constraint_variable): Removed.
2980 (graphite_trans_bb_strip_mine): Remove pong.
2981 * graphite-ppl.c: Include missing header files.
2982 (set_inhomogeneous, set_coef, shift_poly, ppl_strip_loop): New.
2983 * graphite-ppl.h (ppl_strip_loop): Declared.
2984 * Makefile.in (graphite-ppl.o): Adjust dependences.
2985
29862009-02-14 Sebastian Pop <sebastian.pop@amd.com>
2987
2988 * graphite.c (build_loop_iteration_domains): Remove ping pong.
2989 (build_scop_iteration_domain): Same.
2990
29912009-02-13 Sebastian Pop <sebastian.pop@amd.com>
2992
2993 * graphite.c (scan_tree_for_params, add_conditions_to_domain): Remove
2994 ping pong.
2995 (add_value_to_dim, scan_tree_for_params_right_scev,
2996 scan_tree_for_params_int): New.
2997 * graphite-ppl.c (oppose_constraint): New.
2998 (insert_constraint_into_matrix): Implement missing cases.
2999 * graphite-ppl.h (insert_constraint_into_matrix): Declared.
3000
30012009-02-13 Sebastian Pop <sebastian.pop@amd.com>
3002
3003 * graphite.c (graphite_trans_bb_move_loop): Remove ping pong,
3004 use ppl_move_dimension.
3005
30062009-02-12 Sebastian Pop <sebastian.pop@amd.com>
3007
3008 * graphite-data-ref.c: Domains are now ppl_Polyhedra_t.
3009 * graphite.c: Same.
3010 * graphite.h: Same.
3011 * graphite-ppl.c: Same.
3012 * graphite-ppl.h: Same.
3013
30142009-02-12 Sebastian Pop <sebastian.pop@amd.com>
3015
3016 Revert last 3 commits.
3017
30182009-02-10 Sebastian Pop <sebastian.pop@amd.com>
3019
3020 * graphite.c (scan_tree_for_params, add_conditions_to_domain): Remove
3021 ping pong.
3022 (add_value_to_dim, scan_tree_for_params_right_scev,
3023 scan_tree_for_params_int): New.
3024 * graphite-ppl.c (oppose_constraint): New.
3025 (insert_constraint_into_matrix): Implement missing cases.
3026 * graphite-ppl.h (insert_constraint_into_matrix): Declared.
3027
30282009-02-10 Sebastian Pop <sebastian.pop@amd.com>
3029
3030 * graphite.c (graphite_trans_bb_move_loop): Remove unused variables.
3031
30322009-02-10 Sebastian Pop <sebastian.pop@amd.com>
3033 Tobias Grosser <grosser@fim.uni-passau.de>
3034
3035 * graphite.c (graphite_trans_bb_move_loop): Remove ping pong,
3036 use ppl_move_dimension.
3037 * graphite-ppl.c (ppl_move_dimension): New.
3038 * graphite-ppl.h (ppl_move_dimension): Declared.
3039
30402009-02-10 Sebastian Pop <sebastian.pop@amd.com>
3041
3042 * graphite.c: Do not include cloog/cloog.h.
3043 (print_graphite_bb): Remove ping pong, call PPL print function.
3044
30452009-02-10 Tobias Grosser <grosser@fim.uni-passau.de>
3046
3047 * Makefile.in (OBJS-common): Add graphite-ppl.o.
3048 (graphite.o): Add dependence on graphite-ppl.h.
3049 (graphite-ppl.o): New.
3050 (graphite-data-ref.c): Ping pong between PPL data structures
3051 and matrices.
3052 * graphite-ppl.c: New.
3053 * graphite-ppl.h: New.
3054 * graphite.c: Include graphite-ppl.h.
3055 (print_graphite_bb, add_conditions_to_domain, build_cloog_prog,
3056 graphite_trans_bb_move_loop, graphite_trans_bb_strip_mine):
3057 Ping pong between PPL data structures and matrices.
3058 (new_graphite_bb): Create a PPL constraint system.
3059 Call ppl_delete_Constraint_System instead of cloog_matrix_free.
3060 (build_loop_iteration_domains): Use PPL functions.
3061 * graphite.h: Include graphite-ppl.h. Fix comments.
3062 (graphite_bb): Use a ppl_Constraint_System_t instead of
3063 CloogMatrix for representing the domain.
3064 (scop): Remove static_schedule.
3065 (gbb_nb_loops): Ping pong between PPL data structures and matrices.
3066
30672009-02-06 Sebastian Pop <sebastian.pop@amd.com>
3068
3069 * graphite.c: Fix some comments.
3070
30712009-02-05 Sebastian Pop <sebastian.pop@amd.com>
3072
3073 PR middle-end/38953
3074 * graphite.c (if_region_set_false_region): After moving a region
3075 in the false branch of a condition, remove the empty dummy
3076 basic block.
3077 (gloog): Remove wrong fix for PR38953.
3078
30792009-02-03 Tobias Grosser <grosser@fim.uni-passau.de>
3080
3081 * graphite.c (bb_in_sese_p, sese_build_livein_liveouts_use,
3082 sese_build_livein_liveouts_bb, sese_build_livein_liveouts,
3083 register_bb_in_sese, new_sese, free_sese): Moved.
3084 (dot_scop_1, build_scop_loop_nests, build_loop_iteration_domains,
3085 outermost_loop_in_scop, build_scop_iteration_domain,
3086 expand_scalar_variables_ssa_name, get_vdef_before_scop,
3087 limit_scops): Use bb_in_sese_p instead of bb_in_scop_p.
3088 Use loop_in_sese_p instead of loop_in_scop_p.
3089 (new_graphite_bb, new_scop, gloog): Do not initialize SCOP_BBS_B.
3090 (free_scop): Do not free SCOP_BBS_B.
3091 (nb_loops_around_loop_in_scop, nb_loops_around_gb,
3092 ref_nb_loops): Moved here...
3093 * graphite.h (ref_nb_loops): ... from here.
3094 (struct scop): Remove bbs_b bitmap.
3095 (SCOP_BBS_B, bb_in_scop_p, loop_in_scop_p): Removed.
3096 * testsuite/gcc.dg/graphite/scop-19.c: New
3097
30982009-02-03 Tobias Grosser <grosser@fim.uni-passau.de>
3099
3100 * graphite.c (scopdet_basic_block_info): Fix bug in scop
3101 detection.
3102
31032009-01-30 Tobias Grosser <grosser@fim.uni-passau.de>
3104
3105 * graphite.c (new_loop_to_cloog_loop_str, hash_loop_to_cloog_loop,
3106 eq_loop_to_cloog_loop): Remove.
3107 (new_scop, free_scop): Remove SCOP_LOOP2CLOOG_LOOP.
3108 * graphite.h (struct scop): Remove loop2cloog_loop.
3109 (loop_domain_dim, loop_iteration_vector_dim): Remove.
3110
31112009-01-30 Tobias Grosser <grosser@fim.uni-passau.de>
3112
3113 * opts.c (decode_options): Only add graphite options to O2
3114 if we compile with graphite enabled.
3115
31162009-01-26 Sebastian Pop <sebastian.pop@amd.com>
3117
3118 * Merge from mainline (r143163:143684).
3119
31202009-01-26 Sebastian Pop <sebastian.pop@amd.com>
3121
3122 * graphite.c (debug_value): Removed.
3123 * graphite.h (debug_value): Removed.
3124
31252009-01-23 Sebastian Pop <sebastian.pop@amd.com>
3126
3127 * passes.c (init_optimization_passes): Do not call pass_copy_prop
3128 after graphite: pass_copy_prop does not maintain a proper loop closed
3129 SSA form. pass_copy_prop should be fixed.
3130
31312009-01-23 Sebastian Pop <sebastian.pop@amd.com>
3132
3133 * graphite.c (scop_adjust_phis_for_liveouts): Fix warning.
3134
31352009-01-23 Sebastian Pop <sebastian.pop@amd.com>
3136
3137 * graphite.c (graphite_verify): Add a call to verify_loop_closed_ssa.
3138 (gloog): Split the exit of the scop when the scop exit is a loop exit.
3139 (graphite_transform_loops): Only call cleanup_tree_cfg if gloog
3140 changed the CFG.
3141
31422009-01-20 Sebastian Pop <sebastian.pop@amd.com>
3143
3144 * graphite.c (gloog): Return true when code gen succeeded.
3145 (graphite_transform_loops): Do not call cleanup_tree_cfg if
3146 the code of the function did not changed. After cleanup_tree_cfg
3147 call rewrite_into_loop_closed_ssa to maintain the loop closed ssa
3148 form.
3149
31502009-01-19 Sebastian Pop <sebastian.pop@amd.com>
3151
3152 * graphite.c (stmt_simple_for_scop_p): Also handle cases when
3153 gimple_call_lhs is NULL.
3154
31552009-01-16 Sebastian Pop <sebastian.pop@amd.com>
3156 Tobias Grosser <tobi.grosser@amd.com>
3157
3158 * graphite.c (graphite_trans_scop_block): Do not block single
3159 nested loops.
3160
31612009-01-15 Sebastian Pop <sebastian.pop@amd.com>
3162 Tobias Grosser <tobi.grosser@amd.com>
3163
3164 * graphite.c (build_scop_canonical_schedules): Start schedules at
3165 zero.
3166
31672009-01-15 Sebastian Pop <sebastian.pop@amd.com>
3168 Tobias Grosser <tobi.grosser@amd.com>
3169
3170 * graphite.c (compare_prefix_loops): New.
3171 (build_scop_canonical_schedules): Rewritten.
3172 (graphite_transform_loops): Move build_scop_canonical_schedules
3173 after build_scop_iteration_domain.
3174
31752009-01-14 Sebastian Pop <sebastian.pop@amd.com>
3176 Tobias Grosser <tobi.grosser@amd.com>
3177
3178 * graphite.c (add_conditions_to_domain): Add the loops to
3179 the dimension of the iteration domain. Do copy the domain
3180 only when it exists.
3181 (build_scop_conditions_1): Do not call add_conditions_to_domain.
3182 (add_conditions_to_constraints): New.
3183 (can_generate_code_stmt, can_generate_code): Removed.
3184 (gloog): Do not call can_generate_code.
3185 (graphite_transform_loops): Call add_conditions_to_constraints
3186 after building the iteration domain.
3187
31882009-01-14 Sebastian Pop <sebastian.pop@amd.com>
3189 Tobias Grosser <tobi.grosser@amd.com>
3190 Jan Sjodin <jan.sjodin@amd.com>
3191
3192 * graphite.c (scan_tree_for_params): On substractions negate
3193 all the coefficients of the term.
3194 (clast_to_gcc_expression_red): New. Handle reduction expressions
3195 of more than two operands.
3196 (clast_to_gcc_expression): Call clast_to_gcc_expression_red.
3197 (get_vdef_before_scop): Handle also the case of default definitions.
3198
31992009-01-14 Sebastian Pop <sebastian.pop@amd.com>
3200
3201 PR middle-end/38431
3202 * graphite.c (get_vdef_before_scop, scop_adjust_vphi): New.
3203 (scop_adjust_phis_for_liveouts): Call scop_adjust_vphi.
3204 (gloog): Do not call cleanup_tree_cfg.
3205 (graphite_transform_loops): Call cleanup_tree_cfg after all
3206 scops have been code generated.
3207
32082009-01-13 Sebastian Pop <sebastian.pop@amd.com>
3209
3210 * passes.c (init_optimization_passes): Schedule after
3211 graphite transforms pass_copy_prop, pass_dce_loop and pass_lim.
3212
32132009-01-13 Sebastian Pop <sebastian.pop@amd.com>
3214
3215 * graphite.c (expand_scalar_variables_stmt): Do not pass loop_p.
3216 Fix comment.
3217 (expand_scalar_variables_ssa_name): Do not pass loop_p. Fix comment.
3218 Set the type of an expression to the type of its assign statement.
3219 (expand_scalar_variables_expr): Do not pass loop_p.
3220 Fix comment. Stop recursion on tcc_constant or tcc_declaration.
3221 (copy_bb_and_scalar_dependences): Do not pass loop_p.
3222 (translate_clast): Update call to copy_bb_and_scalar_dependences.
3223
32242009-01-11 Sebastian Pop <sebastian.pop@amd.com>
3225
3226 * graphite.c (expand_scalar_variables_ssa_name): Set the type of
3227 an expression to the gimple_expr_type of its assign statement.
3228 (expand_scalar_variables_expr): Stop recursion on tcc_constant
3229 or tcc_declaration.
3230
32312009-01-11 Sebastian Pop <sebastian.pop@amd.com>
3232
3233 PR tree-optimization/38786
3234 * testsuite/gcc.dg/graphite/pr38786.c: New.
3235 * graphite.c (expand_scalar_variables_ssa_name): New, outlined from
3236 the SSA_NAME case of expand_scalar_variables_expr.
3237 (expand_scalar_variables_expr): Also gather the scalar computation
3238 used to index the memory access.
3239 (expand_scalar_variables_stmt): Pass to expand_scalar_variables_expr
3240 the gimple_stmt_iterator where it inserts new code.
3241
32422009-01-10 Sebastian Pop <sebastian.pop@amd.com>
3243
3244 * testsuite/gcc.dg/graphite/block-3.c: Fix compile error on 32bit.
3245
32462009-01-10 Sebastian Pop <sebastian.pop@amd.com>
3247
3248 * opts.c (decode_options): Enable flag_graphite_identity and
3249 flag_loop_block in -O2 and above.
3250
32512009-01-08 Sebastian Pop <sebastian.pop@amd.com>
3252
3253 * libjava/classpath/lib/gnu/java/awt/peer/gtk/GtkMouseInfoPeer.class:
3254 Fix merge problem: replace with the file from trunk.
3255
32562009-01-08 Sebastian Pop <sebastian.pop@amd.com>
3257
3258 * Merge from mainline (r141727:143163).
3259
32602009-01-07 Sebastian Pop <sebastian.pop@amd.com>
3261 Jan Sjodin <jan.sjodin@amd.com>
3262
3263 PR tree-optimization/38559
3264 * testsuite/gcc.dg/graphite/pr38559.c: New.
3265
3266 * graphite.c (debug_value, copy_constraint,
3267 swap_constraint_variables, scale_constraint_variable, ): New.
3268 (get_lower_bound, get_upper_bound): Removed.
3269 (graphite_trans_bb_strip_mine): Clean up this code that works
3270 only for constant number of iterations. Fully copy upper and
3271 lower bound constraints, not only the constant part of them.
3272 * graphite.h (debug_value): Declared.
3273
32742009-01-06 Jan Sjodin <jan.sjodin@amd.com>
3275
3276 PR tree-optimization/38492
3277 PR tree-optimization/38498
3278 * tree-check.c (operator_is_linear, scev_is_linear_expression): New.
3279 * tree-chrec.h (scev_is_linear_expression): Declared.
3280 * graphite.c (graphite_cannot_represent_loop_niter): New.
3281 (scopdet_basic_block_info): Call graphite_cannot_represent_loop_niter.
3282 (graphite_loop_normal_form): Use gcc_assert.
3283 (scan_tree_for_params): Use CASE_CONVERT.
3284 (phi_node_is_iv, bb_contains_non_iv_scalar_phi_nodes): New.
3285 (build_scop_conditions_1): Call bb_contains_non_iv_scalar_phi_nodes.
3286 Use gcc_assert. Discard scops that contain unhandled cases.
3287 (build_scop_conditions): Return a boolean status for unhandled cases.
3288 (strip_mine_profitable_p): Print the loop number, not its depth.
3289 (is_interchange_valid): Pass the depth of the loop nest, don't
3290 recompute it wrongly.
3291 (graphite_trans_bb_block): Same.
3292 (graphite_trans_bb_block): Print tentative of loop blocking.
3293 (graphite_trans_scop_block): Do not print that the loop has been
3294 blocked.
3295 (graphite_transform_loops): Do not handle scops that contain condition
3296 scalar phi nodes.
3297
3298 * testsuite/gcc.dg/graphite/pr38500.c: Fixed warning as committed
3299 in trunk.
3300 * testsuite/gcc.dg/graphite/block-0.c: Update test.
3301 * testsuite/gcc.dg/graphite/block-1.c: Same.
3302 * testsuite/gcc.dg/graphite/block-2.c: Remove xfail and test for
3303 blocking.
3304 * testsuite/gcc.dg/graphite/block-4.c: Remove test for strip mine.
3305 * testsuite/gcc.dg/graphite/block-3.c: New.
3306 * testsuite/gcc.dg/graphite/pr38498.c: New.
3307
33082008-12-22 Harsha Jagasia <harsha.jagasia@amd.com>
3309
3310 PR tree-optimization/38510
3311 * gcc.dg/graphite/pr38510.c: New.
3312 * graphite.c (recompute_all_dominators): Call mark_irreducible_loops.
3313 (translate_clast): Call recompute_all_dominators before
3314 graphite_verify.
3315 (gloog): Call recompute_all_dominators before graphite_verify.
3316
33172008-12-12 Sebastian Pop <sebastian.pop@amd.com>
3318
3319 PR tree-optimization/38492
3320 * graphite.c (rename_map_elt, debug_rename_elt,
3321 debug_rename_map_1, debug_rename_map, new_rename_map_elt,
3322 rename_map_elt_info, eq_rename_map_elts,
3323 get_new_name_from_old_name, bb_in_sese_p): Moved around.
3324 (sese_find_uses_to_rename_use): Renamed sese_build_livein_liveouts_use.
3325 (sese_find_uses_to_rename_bb): Renamed sese_build_livein_liveouts_bb.
3326 (sese_build_livein_liveouts): New.
3327 (new_sese, free_sese): New.
3328 (new_scop): Call new_sese.
3329 (free_scop): Call free_sese.
3330 (rename_variables_from_edge, rename_phis_end_scop): Removed.
3331 (register_old_new_names): Renamed register_old_and_new_names.
3332 (register_scop_liveout_renames, add_loop_exit_phis,
3333 insert_loop_close_phis, struct igp,
3334 default_liveout_before_guard, add_guard_exit_phis,
3335 insert_guard_phis, copy_renames): New.
3336 (translate_clast): Call insert_loop_close_phis and insert_guard_phis.
3337 (sese_add_exit_phis_edge): Renamed scop_add_exit_phis_edge.
3338 (rewrite_into_sese_closed_ssa): Renamed scop_insert_phis_for_liveouts.
3339 (scop_adjust_phis_for_liveouts): New.
3340 (gloog): Call scop_adjust_phis_for_liveouts.
3341
3342 * graphite.h (struct sese): Documented. Added fields liveout,
3343 num_ver and livein.
3344 (SESE_LIVEOUT, SESE_LIVEIN, SESE_LIVEIN_VER, SESE_NUM_VER): New.
3345 (new_sese, free_sese, sese_build_livein_liveouts): Declared.
3346 (struct scop): Added field liveout_renames.
3347 (SCOP_LIVEOUT_RENAMES): New.
3348
33492008-12-11 Sebastian Pop <sebastian.pop@amd.com>
3350
3351 PR tree-optimization/38409
3352 * gcc.dg/graphite/pr38409.c: New.
3353 * graphite.c (nb_reductions_in_loop): Use simple_iv.
3354
33552008-12-11 Sebastian Pop <sebastian.pop@amd.com>
3356
3357 * graphite.c (gcc_type_for_cloog_iv): By default return
3358 integer_type_node.
3359 (graphite_create_new_loop): Don't fold_convert the already
3360 fold_convert-ed expression.
3361
33622008-12-11 Harsha Jagasia <harsha.jagasia@amd.com>
3363
3364 PR tree-optimization/38446
3365 * gcc.dg/graphite/pr38446.c: New.
3366 * graphite.c (register_bb_in_sese): New.
3367 (bb_in_sese_p): Check if bb belongs to sese region by explicitly
3368 looking at the bbs in the region.
3369 * graphite.h (sese): Add region_basic_blocks pointer set to
3370 structure and initialize at the time of defining new scop.
3371
33722008-12-11 Tobias Grosser <grosser@fim.uni-passau.de>
3373
3374 * graphite.c (new_graphite_bb): Initialize GBB_STATIC_SCHEDULE.
3375 (find_params_in_bb): Do not free data refs.
3376 (free_graphite_bb): Add FIXME on disabled free_data_refs.
3377
33782008-12-11 Sebastian Pop <sebastian.pop@amd.com>
3379
3380 * testsuite/gcc.dg/graphite/scop-16.c: Test only scop specific info.
3381 * testsuite/gcc.dg/graphite/scop-17.c: Same.
3382 * testsuite/gcc.dg/graphite/block-5.c: New.
3383 * testsuite/gcc.dg/graphite/block-6.c: New.
3384 * testsuite/gcc.dg/graphite/pr37485.c: Clean dump file after.
3385 * testsuite/gcc.dg/graphite/pr37684.c: Same.
3386 * testsuite/gcc.dg/graphite/block-2.c: Same.
3387
3388 * graphite.c (struct ivtype_map_elt): New.
3389 (debug_ivtype_elt, debug_ivtype_map_1, debug_ivtype_map,
3390 new_ivtype_map_elt, ivtype_map_elt_info, eq_ivtype_map_elts,
3391 gcc_type_for_cloog_iv): New.
3392 (loop_iv_stack_patch_for_consts): Use the type of the induction
3393 variable from the original loop, except for the automatically
3394 generated loops, i.e., in the case of a strip-mined loop, in
3395 which case there is no original loop: in that case just use
3396 integer_type_node.
3397 (new_graphite_bb): Initialize GBB_CLOOG_IV_TYPES.
3398 (free_graphite_bb): Free GBB_CLOOG_IV_TYPES.
3399 (clast_name_to_gcc): Accept params to be NULL.
3400 (clast_to_gcc_expression): Take an extra parameter for the type.
3401 Convert to that type all the expressions built by this function.
3402 (gcc_type_for_clast_expr, gcc_type_for_clast_eq): New.
3403 (graphite_translate_clast_equation): Compute the type of the
3404 clast_equation before translating its LHS and RHS.
3405 (clast_get_body_of_loop, gcc_type_for_iv_of_clast_loop): New.
3406 (graphite_create_new_loop): Compute the type of the induction
3407 variable before translating the lower and upper bounds and before
3408 creating the induction variable.
3409 (rename_variables_from_edge, rename_phis_end_scop): New.
3410 (copy_bb_and_scalar_dependences): Call rename_phis_end_scop.
3411 (sese_add_exit_phis_edge): Do not use integer_zero_node.
3412 (find_cloog_iv_in_expr, compute_cloog_iv_types_1,
3413 compute_cloog_iv_types): New.
3414 (gloog): Call compute_cloog_iv_types before starting the
3415 translation of the clast.
3416
3417 * graphite.h (struct graphite_bb): New field cloog_iv_types.
3418 (GBB_CLOOG_IV_TYPES): New.
3419 (debug_ivtype_map): Declared.
3420 (oldiv_for_loop): New.
3421
34222008-12-10 Tobias Grosser <grosser@fim.uni-passau.de>
3423
3424 PR middle-end/38459
3425 * graphite.c (new_scop): Initialize SCOP_ADD_PARAMS.
3426 (param_index): Assert if parameter is not know after parameter
3427 detection.
3428 (find_params_in_bb): Detect params directly in GBB_CONDITIONS.
3429 (find_scop_parameters): Mark, that we have finished parameter
3430 detection.
3431 (graphite_transform_loops): Move condition detection before parameter
3432 detection.
3433 * graphite.h (struct scop): Add SCOP_ADD_PARAMS.
3434 * testsuite/gfortran.dg/graphite/pr38459.f90: New.
3435
34362008-12-09 Tobias Grosser <grosser@fim.uni-passau.de>
3437
3438 * graphite.c (graphite_transform_loops): Always call find_transform ()
3439 in ENABLE_CHECKING. So we test these code paths, even if we do not
3440 generate code.
3441
34422008-12-09 Tobias Grosser <grosser@fim.uni-passau.de>
3443
3444 * graphite.c (print_graphite_bb): Fix printing to file != dump_file.
3445 (print_scop): Ditto.
3446
34472008-12-08 Tobias Grosser <grosser@fim.uni-passau.de>
3448
3449 PR middle-end/38084
3450 Fix testsuite/gfortran.dg/graphite/id-3.f90.
3451 * graphite.c (scopdet_basic_block_info): Fix bug that found some
3452 regions more than once.
3453
34542008-12-03 Sebastian Pop <sebastian.pop@amd.com>
3455
3456 Fix testsuite/gfortran.dg/graphite/id-4.f90.
3457 * graphite.c (scan_tree_for_params): Do not compute the multiplicand
3458 when not needed.
3459
34602008-12-03 Sebastian Pop <sebastian.pop@amd.com>
3461
3462 Fix testsuite/gfortran.dg/graphite/id-1.f90.
3463 * graphite.c (gmp_cst_to_tree): Pass the type in parameter.
3464 (loop_iv_stack_patch_for_consts): Update use of gmp_cst_to_tree.
3465 (max_precision_type): New.
3466 (value_clast): Removed.
3467 (clast_to_gcc_expression): Be more careful to types of expressions.
3468 Use max_precision_type and update use of gmp_cst_to_tree.
3469 (graphite_translate_clast_equation): Use max_precision_type.
3470 (graphite_create_guard_cond_expr): Do not use integer_type_node,
3471 use the type of the condition.
3472 (graphite_create_new_loop): Do not use integer_type_node, use the
3473 max_precision_type of lb and ub.
3474
34752008-12-03 Sebastian Pop <sebastian.pop@amd.com>
3476
3477 * graphite.c (build_scops_1): Initialize open_scop.exit
3478 and sinfo.last.
3479
34802008-12-02 Sebastian Pop <sebastian.pop@amd.com>
3481
3482 * testsuite/gcc.dg/graphite/pr38084.c: New.
3483 * testsuite/gfortran.dg/graphite/id-1.f90: New.
3484 * testsuite/gfortran.dg/graphite/id-2.f90: New.
3485 * testsuite/gfortran.dg/graphite/id-3.f90: New.
3486 * testsuite/gfortran.dg/graphite/id-4.f90: New.
3487 * testsuite/gfortran.dg/graphite/pr37857.f90: New.
3488
34892008-12-02 Sebastian Pop <sebastian.pop@amd.com>
3490 Jan Sjodin <jan.sjodin@amd.com>
3491 Harsha Jagasia <harsha.jagasia@amd.com>
3492
3493 PR middle-end/37852
3494 PR middle-end/37883
3495 PR middle-end/37928
3496 PR middle-end/37980
3497 PR middle-end/38038
3498 PR middle-end/38039
3499 PR middle-end/38073
3500 PR middle-end/38083
3501 PR middle-end/38125
3502
3503 * testsuite/gcc.dg/graphite/pr38073.c: New.
3504 * testsuite/gcc.dg/graphite/pr37928.c: New.
3505 * testsuite/gcc.dg/graphite/pr37883.c: New.
3506 * testsuite/gcc.dg/graphite/pr38125.c: New.
3507 * testsuite/gfortran.dg/graphite/pr38083.f90: New.
3508 * testsuite/gfortran.dg/graphite/pr37852.f90: New.
3509 * testsuite/gfortran.dg/graphite/pr37980.f90: New.
3510
3511 * testsuite/gcc.dg/graphite/scop-18.c: Remove reduction, test for
3512 the number of detected scops. Copy exact same test for loop
3513 blocking...
3514 * testsuite/gcc.dg/graphite/block-1.c: Fix the number of expected
3515 loops to be blocked as reductions are not handled.
3516 * testsuite/gcc.dg/graphite/block-4.c: ...here. New.
3517
3518 * tree-phinodes.c (remove_phi_nodes): New, extracted from...
3519 * tree-cfg.c (remove_phi_nodes_and_edges_for_unreachable_block):
3520 ...here.
3521 * tree-flow.h (remove_phi_nodes, canonicalize_loop_ivs): Declared.
3522 * Makefile.in (graphite.o): Depend on value-prof.h.
3523 (graphite.o-warn): Removed -Wno-error.
3524 * tree-parloops.c (canonicalize_loop_ivs): Allow reduction_list
3525 to be a NULL pointer. Call update_stmt. Return the newly created
3526 cannonical induction variable.
3527
3528 * graphite.h (debug_rename_map): Declared. Fix some comments.
3529
3530 * graphite.c: Reimplement the code generation from graphite to gimple.
3531 Include value-prof.h.
3532 (loop_iv_stack_get_iv): Do not return NULL for constant substitutions.
3533 (get_old_iv_from_ssa_name): Removed.
3534 (graphite_stmt_p): New.
3535 (new_graphite_bb): Test for useful statements before building a
3536 graphite statement for the basic block.
3537 (free_graphite_bb): Do not free GBB_DATA_REFS: this is a bug
3538 in free_data_ref that calls BITMAP_FREE (DR_VOPS (dr)) without
3539 reason.
3540 (recompute_all_dominators, graphite_verify,
3541 nb_reductions_in_loop, graphite_loop_normal_form): New.
3542 (scop_record_loop): Call graphite_loop_normal_form.
3543 (build_scop_loop_nests): Iterate over all the blocks of the
3544 function instead of relying on the incomplete information from
3545 SCOP_BBS. Return the success of the operation.
3546 (find_params_in_bb): Use the data from GBB_DATA_REFS.
3547 (add_bb_domains): Removed.
3548 (build_loop_iteration_domains): Don't call add_bb_domains.
3549 Add the iteration domain only to the basic blocks that have been
3550 translated to graphite.
3551 (build_scop_conditions_1): Add constraints only if the basic
3552 block have been translated to graphite.
3553 (build_scop_data_accesses): Completely disabled until data
3554 dependence is correctly implemented.
3555 (debug_rename_elt, debug_rename_map_1, debug_rename_map): New.
3556 (remove_all_edges_1, remove_all_edges): Removed.
3557 (get_new_name_from_old_name): New.
3558 (graphite_rename_variables_in_stmt): Renamed
3559 rename_variables_in_stmt. Call get_new_name_from_old_name.
3560 Use replace_exp and update_stmt.
3561 (is_old_iv): Renamed is_iv.
3562 (expand_scalar_variables_stmt): Extra parameter for renaming map.
3563 Use replace_exp and update_stmt.
3564 (expand_scalar_variables_expr): Same. Use the map to get the
3565 new names for the renaming of induction variables and for the
3566 renaming of variables after a basic block has been copied.
3567 (expand_scalar_variables): Same.
3568 (graphite_rename_variables): Renamed rename_variables.
3569 (move_phi_nodes): Removed.
3570 (get_false_edge_from_guard_bb): New.
3571 (build_iv_mapping): Do not insert the induction variable of a
3572 loop in the renaming iv map if the basic block does not belong
3573 to that loop.
3574 (register_old_new_names, graphite_copy_stmts_from_block,
3575 copy_bb_and_scalar_dependences): New.
3576 (translate_clast): Heavily reimplemented: copy basic blocks,
3577 do not move them. Finally, in call cleanup_tree_cfg in gloog.
3578 At each translation step call graphite_verify ensuring the
3579 consistency of the SSA, loops and dominators information.
3580 (collect_virtual_phis, find_vdef_for_var_in_bb,
3581 find_vdef_for_var_1, find_vdef_for_var,
3582 patch_phis_for_virtual_defs): Removed huge hack.
3583 (mark_old_loops, remove_dead_loops, skip_phi_defs,
3584 collect_scop_exit_phi_args, patch_scop_exit_phi_args,
3585 gbb_can_be_ignored, scop_remove_ignoreable_gbbs, ): Removed.
3586 (remove_sese_region, ifsese, if_region_entry, if_region_exit,
3587 if_region_get_condition_block, if_region_set_false_region,
3588 create_if_region_on_edge, move_sese_in_condition, bb_in_sese_p,
3589 sese_find_uses_to_rename_use, sese_find_uses_to_rename_bb,
3590 sese_add_exit_phis_edge, sese_add_exit_phis_var,
3591 rewrite_into_sese_closed_ssa): New.
3592 (gloog): Remove dead code. Early return if code cannot be
3593 generated. Call cleanup_tree_cfg once the scop has been code
3594 generated.
3595 (graphite_trans_scop_block, graphite_trans_loop_block): Do not
3596 block loops with less than two loops.
3597 (graphite_apply_transformations): Remove the call to
3598 scop_remove_ignoreable_gbbs.
3599 (limit_scops): When build_scop_loop_nests fails, continue on
3600 the next scop. Fix open_scop.entry.
3601 (graphite_transform_loops): Call recompute_all_dominators: force the
3602 recomputation of correct CDI_DOMINATORS and CDI_POST_DOMINATORS.
3603 Call initialize_original_copy_tables and free_original_copy_tables
3604 to be able to copy basic blocks during code generation.
3605 When build_scop_loop_nests fails, continue on next scop.
3606 (value_clast): New union.
3607 (clast_to_gcc_expression): Fix type cast warning.
3608
36092008-11-09 Sebastian Pop <sebastian.pop@amd.com>
3610
3611 * Merge from mainline (r140838:141727).
3612
36132008-11-05 Tobias Grosser <grosser@fim.uni-passau.de>
3614
3615 PR middle-end/37833
3616
3617 * graphite.c (scan_tree_for_params): Add POINTER_PLUS_EXPR.
3618
36192008-11-05 Tobias Grosser <grosser@fim.uni-passau.de>
3620
3621 PR middle-end/37943
3622
3623 * graphite.c (scopdet_basic_block_info): Fix loops with multiple
3624 exits and conditions.
3625 * testsuite/gcc.dg/graphite/pr37943.c: New.
3626
36272008-10-23 Tobias Grosser <grosser@fim.uni-passau.de>
3628
3629 PR middle-end/37886
3630 * graphite.c (gloog): Replace EXIT_BLOCK_PTR with scop exit.
3631
36322008-10-23 Tobias Grosser <grosser@fim.uni-passau.de>
3633
3634 * doc/invoke.texi: Fix spaces.
3635
36362008-10-22 Sebastian Pop <sebastian.pop@amd.com>
3637
3638 PR tree-optimization/37891
3639 Reverted last commit.
3640 * graphite.c (create_single_entry_edge): Set
3641 EDGE_IRREDUCIBLE_LOOP and BB_IRREDUCIBLE_LOOP.
3642
36432008-10-21 Sebastian Pop <sebastian.pop@amd.com>
3644 Mitul Thakkar <mitul.thakkar@amd.com>
3645
3646 * graphite.c (create_single_entry_edge): Set
3647 EDGE_IRREDUCIBLE_LOOP and BB_IRREDUCIBLE_LOOP.
3648
36492008-10-16 Tobias Grosser <grosser@fim.uni-passau.de>
3650
3651 * doc/invoke.texi: Add -fgraphite-identity.
3652 * graphite.c (graphite_apply_transformations): Check for
3653 -fgraphite-identity.
3654 * toplev.c (process_options): Add flag_graphite_identity.
3655 * tree-ssa-loop.c: Add flag_graphite_identity.
3656
36572008-10-14 Sebastian Pop <sebastian.pop@amd.com>
3658
3659 Undo changes from 2008-10-02:
3660 * tree-ssa-loop-ivopts.c (rewrite_use_nonlinear_expr): Convert
3661 operand type when copying the operand to a variable of different type.
3662 * cfgloopmanip.c (create_empty_loop_on_edge): Write exit condition
3663 with the IV name after increment.
3664
36652008-10-14 Sebastian Pop <sebastian.pop@amd.com>
3666 Harsha Jagasia <harsha.jagasia@amd.com>
3667
3668 PR tree-optimization/37828
3669 * testsuite/gcc.dg/graphite/pr37828.c: New.
3670 * graphite.c (graphite_trans_loop_block): Do not loop block
3671 single nested loops.
3672
36732008-10-09 Harsha Jagasia <harsha.jagasia@amd.com>
3674 Sebastian Pop <sebastian.pop@amd.com>
3675
3676 * graphite.c (struct rename_map_elt, new_rename_map_elt,
3677 rename_map_elt_info, eq_rename_map_elts): New.
3678 (graphite_rename_ivs_stmt): Renamed graphite_rename_variables_in_stmt.
3679 (expand_scalar_variables_expr): Change parameters.
3680 (expand_scalar_variables_stmt): Same.
3681 (expand_scalar_variables): Same.
3682 (graphite_rename_ivs): Rename graphite_rename_variables.
3683 (build_iv_mapping): New.
3684 (translate_clast): Call build_iv_mapping.
3685 * graphite.h (gbb_p): New name.
3686
36872008-10-03 Harsha Jagasia <harsha.jagasia@amd.com>
3688
3689 PR tree-optimization/37684
3690 * gcc.dg/graphite/pr37684.c: New.
3691 * graphite.c (exclude_component_ref): New.
3692 (is_simple_operand): Call exclude_component_ref.
3693
36942008-10-02 Jan Sjodin <jan.sjodin@amd.com>
3695 Harsha Jagasia <harsha.jagasia@amd.com>
3696
3697 PR tree-optimization/37485
3698 * gcc.dg/graphite/block-2.c: New
3699 * graphite.c (gmp_cst_to_tree): Moved.
3700 (iv_stack_entry_is_constant): New.
3701 (iv_stack_entry_is_iv): New.
3702 (loop_iv_stack_push): Renamed to loop_iv_stack_push_iv.
3703 (loop_iv_stack_insert_constant): New.
3704 (loop_iv_stack_pop): Use new datatpype.
3705 (loop_iv_stack_get_iv): Same.
3706 (loop_iv_stack_get_iv_from_name): Same.
3707 (loop_iv_stack_debug): Renamed to debug_loop_iv_stack.
3708 (loop_iv_stack_patch_for_consts): New.
3709 (loop_iv_stack_remove_constants): New.
3710 (graphite_create_new_loop): Use loop_iv_stack_push_iv.
3711 (translate_clast): Call loop_iv_stack_patch_for_consts and
3712 loop_iv_stack_remove_constants.
3713 (gloog): Use new datatype. Redirect construction edge to end
3714 block to avoid accidental deletion.
3715 * graphite.h (enum iv_stack_entry_kind): New. Tag for data in
3716 iv stack entry.
3717 (union iv_stack_entry_data): New. Data in iv stack entry.
3718 (struct iv_stack_entry): New. Datatype for iv stack entries.
3719
37202008-10-02 Sebastian Pop <sebastian.pop@amd.com>
3721
3722 * tree-ssa-loop-ivopts.c (rewrite_use_nonlinear_expr): Convert
3723 operand type when copying the operand to a variable of different type.
3724
37252008-10-02 Sebastian Pop <sebastian.pop@amd.com>
3726
3727 * cfgloopmanip.c (create_empty_loop_on_edge): Write exit condition
3728 with the IV name after increment.
3729
37302008-10-02 Sebastian Pop <sebastian.pop@amd.com>
3731
3732 * Merge from mainline (r140164:140838).
3733
37342008-09-10 Konrad Trifunovic <konrad.trifunovic@inria.fr>
3735
3736 * graphite-data-ref.c: New.
3737 * graphite.c (print_scop): Also dump the dependence graph.
3738 (bb_in_scop_p, loop_in_scop_p, nb_loops_around_gb): Moved...
3739 (new_scop): Initialize SCOP_DEP_GRAPH.
3740 (build_scop_dynamic_schedules): New.
3741 (build_access_matrix_with_af): Fixed column numbering.
3742 (graphite_transform_loops): Call build_scop_dynamic_schedules.
3743 * graphite.h: Add ifndef/define guards against multiple inclusion.
3744 (struct scop): Add dep_graph field.
3745 (SCOP_DEP_GRAPH): Defined.
3746 (ref_nb_loops): Fixed and moved to other position.
3747 (bb_in_scop_p, loop_in_scop_p, nb_loops_around_gb): ... here.
3748 (nb_loops_around_loop_in_scop): New.
3749 (graphite_dump_dependence_graph): Declared.
3750 (graphite_build_rdg_all_levels): Declared.
3751 (graphite_test_dependence): Declared.
3752 * Makefile.in (graphite-data-ref.o): New target.
3753
37542008-09-09 Sebastian Pop <sebastian.pop@amd.com>
3755
3756 * Merge from mainline (139870:140164).
3757
37582008-09-01 Sebastian Pop <sebastian.pop@amd.com>
3759
3760 * Merge from mainline (138275:139870).
3761 * testsuite/gcc.dg/graphite/scop-matmult.c: XFailed as one of
3762 the commits from trunk broke the niter detection.
3763
37642008-09-01 Sebastian Pop <sebastian.pop@amd.com>
3765
3766 * graphite.c: Add more documentation. Fix formatting.
3767 (debug_loop_vec, debug_oldivs, loop_iv_stack,
3768 loop_iv_stack_debug): Moved...
3769 (schedule_to_scattering): Move before use.
3770 (dot_all_scops): Include in "#if 0" the code for system
3771 call dotty.
3772
3773 * graphite.h: (debug_loop_vec, debug_oldivs, loop_iv_stack,
3774 loop_iv_stack_debug): ...here.
3775
37762008-08-29 Jan Sjodin <jan.sjodin@amd.com>
3777
3778 * tree-phinodes.c (make_phi_node): Extern.
3779 (add_phi_node_to_bb): New.
3780 (create_phi_node): Call add_phi_node_to_bb.
3781 * tree-ssa-loop-ivopts.c (get_phi_with_result): New.
3782 (remove_statement): Handle case where stored phi was updated
3783 and is no longer the same.
3784 * graphite.c (is_parameter): New.
3785 (is_old_iv): New.
3786 (expand_scalar_variables_expr): New.
3787 (expand_scalar_variables_stmt): New.
3788 (expand_scalar_variables): New.
3789 (move_phi_nodes): Create new phi instead of moving old one.
3790 (translate_clast): Call expand_scalar_variables.
3791 (find_vdef_for_var_in_bb): Also scan regular definitions.
3792 (skip_phi_defs): New.
3793 (collect_scop_exit_phi_args): New.
3794 (patch_scop_exit_phi_args): New.
3795 (gloog): Patch phis after scop.
3796 * tree-flow.h: (add_phi_node_to_bb): Declared.
3797 (make_phi_node): Declared.
3798
37992008-08-26 Sebastian Pop <sebastian.pop@amd.com>
3800
3801 * graphite.c (end_scop): Split the entry of the scop when it
3802 is the header of the loop in which the scop is ending.
3803 (build_scops_1, limit_scops): Update uses of end_scop.
3804
38052008-08-26 Sebastian Pop <sebastian.pop@amd.com>
3806
3807 * graphite.c (dot_all_scops_1): Do not fail on uninitialized
3808 SCOP_ENTRY or SCOP_EXIT.
3809
38102008-08-25 Sebastian Pop <sebastian.pop@amd.com>
3811
3812 * graphite.c (get_construction_edge): Removed.
3813 (gloog): Construction edge is the scop entry edge.
3814
38152008-08-25 Sebastian Pop <sebastian.pop@amd.com>
3816
3817 * graphite.c (can_generate_for_scop): Removed.
3818 (gloog): Do not call it.
3819
38202008-08-25 Sebastian Pop <sebastian.pop@amd.com>
3821
3822 * graphite.c (new_scop): Entry of a scop is an edge.
3823 Initialize SESE region.
3824 (free_scop): Free SESE region.
3825 (build_scops_1, scopdet_bb_info): Work on edges, not on bbs.
3826 (split_difficult_bb): New, split from end_scop.
3827 (end_scop): Exit of a scop is an edge.
3828 (build_scop_bbs): Never check CDI_POST_DOMINATORS: this info is
3829 not automatically updated and thus is always wrong.
3830 * graphite.h (struct sese): New.
3831 (SESE_ENTRY): New.
3832 (SESE_EXIT): New.
3833 (struct scop): New field for a SESE region. Remove entry, exit.
3834 (SCOP_ENTRY, SCOP_EXIT): Update definitions to match same
3835 semantics as before. Moved comment around.
3836
38372008-08-25 Tobias Grosser <grosser@fim.uni-passau.de>
3838 Sebastian Pop <sebastian.pop@amd.com>
3839
3840 * graphite.c (graphite_transform_loops): Always enable gloog
3841 and find_transform when ENABLE_CHECKING.
3842
38432008-08-25 Sebastian Pop <sebastian.pop@amd.com>
3844
3845 * graphite.c (graphite_transform_loops): Move pretty printer
3846 of SCOPs before doing any transform. Remove call to print_scops
3847 and dot_all_scops_1.
3848
38492008-08-25 Sebastian Pop <sebastian.pop@amd.com>
3850
3851 * graphite.c (dump_gbb_conditions): Don't try to print NULL pointers.
3852 (print_graphite_bb): Same.
3853
38542008-08-25 Sebastian Pop <sebastian.pop@amd.com>
3855
3856 * graphite.c (dot_all_scops_1): Cleanup.
3857 (move_scops): Fix comment.
3858
38592008-08-25 Sebastian Pop <sebastian.pop@amd.com>
3860
3861 * graphite.c (build_scop_bbs): Revert commit 139355:
3862
3863 2008-08-20 Sebastian Pop <sebastian.pop@amd.com>
3864 Dwarakanath Rajagopal <dwarak.rajagopal@amd.com>
3865
3866 * graphite.c (build_scop_bbs): Factor up code.
3867
38682008-08-25 Tobias Grosser <grosser@fim.uni-passau.de>
3869
3870 * graphite.c (gloog): Update dominator info.
3871
38722008-08-25 Tobias Grosser <grosser@fim.uni-passau.de>
3873
3874 * graphite.c (remove_cond_exprs): Do not fail on empty bbs.
3875
38762008-08-24 Sebastian Pop <sebastian.pop@amd.com>
3877
3878 * graphite.c (new_graphite_bb): Remove GBB_INDEX_TO_NUM_MAP
3879 initialization.
3880 (free_graphite_bb): Remove GBB_INDEX_TO_NUM_MAP free.
3881 (translate_clast): Correct formatting.
3882 * graphite.h (struct num_map): Removed.
3883 (struct graphite_bb): Remove num_map field.
3884 (GBB_INDEX_TO_NUM_MAP): Removed.
3885
38862008-08-24 Sebastian Pop <sebastian.pop@amd.com>
3887
3888 * graphite.c (build_access_matrix_with_af): Fix comments.
3889 (build_scop_data_accesses): Same.
3890
38912008-08-24 Sebastian Pop <sebastian.pop@amd.com>
3892
3893 * graphite.c (build_scop_data_accesses): Don't construct
3894 access matrices. Add a FIXME and an assert condition that
3895 should pass when the access matrices will be needed.
3896
38972008-08-24 Sebastian Pop <sebastian.pop@amd.com>
3898
3899 * tree-data-ref.c (stmt_simple_memref_p): Don't call
3900 really_constant_p.
3901 * graphite.c (build_graphite_bb): Renamed new_graphite_bb.
3902 Moved close by free_graphite_bb.
3903 (free_graphite_bb): Call free_data_refs. Reset bb->aux.
3904 (new_scop): Move close by free_scop.
3905 (graphite_transform_loops): Avoid linear scan to reset bb->aux.
3906
39072008-08-22 Jan Sjodin <jan.sjodin@amd.com>
3908
3909 * cfgloopmanip.c (create_empty_if_region_on_edge): New.
3910 * graphite.c (clast_to_gcc_expression): Call gmp_cst_to_tree
3911 instead of recursive call.
3912 (graphite_translate_clast_equation): New.
3913 (graphite_create_guard_cond_expr): New.
3914 (graphite_create_new_guard): New.
3915 (get_stack_index_from_iv): Removed.
3916 (graphite_rename_ivs_stmt): Use gbb_loop_index.
3917 (get_true_edge_from_guard_bb): New.
3918 (translate_clast): Handle stmt_guard in clast.
3919 (get_construction_edge): Allow construction edge detection for
3920 a scope entry with multiple predecessors if one predecessor is
3921 the immediate dominator of scope entry.
3922 (can_generate_code_stmt): Enable code generation for clast_guard.
3923 (gloog): Use correct context loop. Removed check for post dominators.
3924 * cfgloop.h (create_empty_if_region_on_edge): Declared.
3925
39262008-08-21 Sebastian Pop <sebastian.pop@amd.com>
3927
3928 * graphite.c (remove_dead_loops): Document better which
3929 loops are removed.
3930
39312008-08-21 Sebastian Pop <sebastian.pop@amd.com>
3932
3933 * Makefile.in: Rename POLYLIBLIBS and POLYLIBINC to PPLLIBS
3934 and PPLINC.
3935 (graphite.o): Also depends on pointer-set.h.
3936
39372008-08-21 Sebastian Pop <sebastian.pop@amd.com>
3938
3939 * graphite.c (scop_record_loop): Fix compile warning.
3940
39412008-08-21 Harsha Jagasia <harsha.jagasia@amd.com>
3942 Sebastian Pop <sebastian.pop@amd.com>
3943
3944 * graphite.c (scop_record_loop): DECL_NAME can be NULL.
3945
39462008-08-21 Sebastian Pop <sebastian.pop@amd.com>
3947
3948 * graphite.c (build_graphite_bb): Initialize bb->aux to
3949 point to the graphite_bb_p.
3950 (graphite_bb_from_bb): Renamed gbb_from_bb; returns the
3951 content of bb->aux.
3952 (add_bb_domains): Does not use the scop parameter.
3953 (graphite_transform_loops): Clean bb->aux at the end.
3954
39552008-08-20 Dwarakanath Rajagopal <dwarak.rajagopal@amd.com>
3956 Sebastian Pop <sebastian.pop@amd.com>
3957
3958 * testsuite/lib/target-supports.exp
3959 (check_effective_target_fgraphite): New.
3960
3961 * testsuite/gcc.dg/graphite/graphite.exp: Early exit when
3962 check_effective_target_fgraphite returns false.
3963 Set dg-do-what-default to compile.
3964 (scan-graphite-dump-times): Removed.
3965 * testsuite/gfortran.dg/graphite/graphite.exp: Same.
3966
3967 * testsuite/gcc.dg/graphite/scop-0.c: Do not use "dg-do compile".
3968 Use scan-tree-dump-times instead of scan-graphite-dump-times.
3969 * testsuite/gcc.dg/graphite/scop-1.c: Same.
3970 * testsuite/gcc.dg/graphite/scop-2.c: Same.
3971 * testsuite/gcc.dg/graphite/scop-3.c: Same.
3972 * testsuite/gcc.dg/graphite/scop-4.c: Same.
3973 * testsuite/gcc.dg/graphite/scop-5.c: Same.
3974 * testsuite/gcc.dg/graphite/scop-6.c: Same.
3975 * testsuite/gcc.dg/graphite/scop-7.c: Same.
3976 * testsuite/gcc.dg/graphite/scop-8.c: Same.
3977 * testsuite/gcc.dg/graphite/scop-9.c: Same.
3978 * testsuite/gcc.dg/graphite/scop-10.c: Same.
3979 * testsuite/gcc.dg/graphite/scop-11.c: Same.
3980 * testsuite/gcc.dg/graphite/scop-12.c: Same.
3981 * testsuite/gcc.dg/graphite/scop-13.c: Same.
3982 * testsuite/gcc.dg/graphite/scop-matmult.c: Same.
3983 * testsuite/gcc.dg/graphite/scop-14.c: Same.
3984 * testsuite/gcc.dg/graphite/scop-15.c: Same.
3985 * testsuite/gcc.dg/graphite/block-0.c: Same.
3986 * testsuite/gcc.dg/graphite/scop-16.c: Same.
3987 * testsuite/gcc.dg/graphite/block-1.c: Same.
3988 * testsuite/gcc.dg/graphite/scop-17.c: Same.
3989 * testsuite/gcc.dg/graphite/scop-18.c: Same.
3990 * testsuite/gfortran.dg/graphite/block-1.f90: Same.
3991 * testsuite/gfortran.dg/graphite/scop-1.f: Same.
3992 * testsuite/gfortran.dg/graphite/block-2.f: Same.
3993
39942008-08-20 Sebastian Pop <sebastian.pop@amd.com>
3995
3996 * graphite.c: Fix some XXX comments.
3997 (build_scop_dynamic_schedules): Removed.
3998
39992008-08-20 Sebastian Pop <sebastian.pop@amd.com>
4000
4001 * graphite.h (scop_max_loop_depth): Moved...
4002 * graphite.c (scop_max_loop_depth): ...here.
4003 (remove_all_edges_1): New.
4004 (remove_all_edges): Factored code.
4005 (remove_cond_exprs): Check only the last statement for
4006 a GIMPLE_COND expression.
4007
40082008-08-20 Sebastian Pop <sebastian.pop@amd.com>
4009
4010 * graphite.c (scan_tree_for_params): Early return when the
4011 expression is a chrec_dont_know. Handle case NEGATE_EXPR.
4012 (find_scop_parameters): Factor out code.
4013 (graphite_trans_bb_strip_mine): Remove dead code.
4014
40152008-08-20 Sebastian Pop <sebastian.pop@amd.com>
4016
4017 * graphite.c (clast_to_gcc_expression, graphite_create_new_loop,
4018 graphite_trans_bb_move_loop): Factor asserts.
4019 (gloog): Perform sanity checks only for ENABLE_CHECKING.
4020 Do not call calculate_dominance_info and estimate_bb_frequencies.
4021
40222008-08-20 Jan Sjodin <jan.sjodin@amd.com>
4023
4024 * graphite.c (create_loops_mapping, free_loops_mapping,
4025 create_loops_mapping_num, debug_loop_mapping_1,
4026 debug_loop_mapping, graphite_loops_mapping_max_loop_num,
4027 get_loop_mapping_for_num, graphite_loops_mapping_add_child,
4028 graphite_loops_mapping_add_child_num,
4029 graphite_loops_mapping_insert_child,
4030 graphite_loops_mapping_parent, get_loop_mapped_depth_for_num,
4031 get_loop_mapped_depth, split_loop_mapped_depth_for_num,
4032 loop_mapped_depth_split_loop, swap_loop_mapped_depth_for_num,
4033 create_num_from_index, get_num_from_index,
4034 swap_loop_mapped_depth): Removed.
4035 (new_scop): Do not initialize SCOP_LOOPS_MAPPING.
4036 (free_scop): Do not call free_loops_mapping.
4037 (graphite_get_new_iv_stack_index_from_old_iv): Renamed
4038 get_stack_index_from_iv. Use GBB_LOOPS instead of calling
4039 get_loop_mapped_depth.
4040 (graphite_trans_bb_move_loop): Do not update the loop mapping.
4041 (graphite_trans_bb_strip_mine): Same.
4042 * graphite.h (graphite_loops_mapping, graphite_loop_node): Removed.
4043 (struct scop): Remove field loops_mapping.
4044
40452008-08-20 Sebastian Pop <sebastian.pop@amd.com>
4046 Dwarakanath Rajagopal <dwarak.rajagopal@amd.com>
4047
4048 * graphite.c (scop_record_loop): Factor out one level of the
4049 condition by early return.
4050 (build_scop_loop_nests): Format following FSF coding style.
4051 (build_scop_dynamic_schedules): Factor out code.
4052 (scopdet_bb_info): Reindent. Default case should not be reachable.
4053
40542008-08-20 Sebastian Pop <sebastian.pop@amd.com>
4055 Dwarakanath Rajagopal <dwarak.rajagopal@amd.com>
4056
4057 * graphite.c (loop_affine_expr): Check for DECL_P or struct
4058 assignments that are not handled as simple operands for now.
4059
40602008-08-20 Sebastian Pop <sebastian.pop@amd.com>
4061 Dwarakanath Rajagopal <dwarak.rajagopal@amd.com>
4062
4063 * graphite.c (build_scop_bbs): Factor up code.
4064
40652008-08-20 Sebastian Pop <sebastian.pop@amd.com>
4066 Dwarakanath Rajagopal <dwarak.rajagopal@amd.com>
4067
4068 * graphite.c (stmt_simple_for_scop_p): Factor code out
4069 of the loop.
4070 (enum gbb_type): New. Group all the GBB_* types under it.
4071 (is_loop_exit): Moved...
4072 (end_scop): Enable BB spliting.
4073 * cfgloop.c (is_loop_exit): ...here. Reimplemented.
4074 * cfgloop.h (is_loop_exit): Declared.
4075
40762008-08-20 Sebastian Pop <sebastian.pop@amd.com>
4077
4078 * doc/invoke.texi: Remove strides from examples containing
4079 DO loops when the strides are equal to 1.
4080
40812008-08-20 Harsha Jagasia <harsha.jagasia@amd.com>
4082 Dwarakanath Rajagopal <dwarak.rajagopal@amd.com>
4083
4084 * graphite.c (graphite_trans_scop_block): Or the result with
4085 the result from graphite_trans_loop_block.
4086 * testsuite/gcc.dg/graphite/block-1.c: New.
4087 * testsuite/gfortran.dg/graphite/block-1.f90: New.
4088 * testsuite/gfortran.dg/graphite/block-2.f: New.
4089
40902008-08-20 Sebastian Pop <sebastian.pop@amd.com>
4091
4092 * graphite.c (graphite_transform_loops): Call cloog_initialize
4093 and cloog_finalize.
4094
40952008-08-20 Sebastian Pop <sebastian.pop@amd.com>
4096
4097 * tree-data-ref.c) (stmt_simple_memref_p): New.
4098 * tree-data-ref.h (stmt_simple_memref_p): Declared.
4099 * graphite.c (stmt_simple_memref_for_scop_p): Removed.
4100 (is_simple_operand): Call stmt_simple_memref_p.
4101
4102 * testsuite/gcc.dg/graphite/scop-matmult.c: Updated for not
4103 using pointer arithmetic, as this is optimized by PRE and
4104 makes the code too difficult to analyze.
4105
4106 * testsuite/gcc.dg/graphite/scop-18.c: Same.
4107
41082008-08-20 Sebastian Pop <sebastian.pop@amd.com>
4109
4110 * gdbinit.in (pgg): New.
4111
41122008-08-15 Tobias Grosser <grosser@fim.uni-passau.de>
4113
4114 * graphite.c (graphite_trans_loop_block): Fix warning.
4115
41162008-08-15 Tobias Grosser <grosser@fim.uni-passau.de>
4117
4118 * graphite.c (graphite_trans_loop_block): Fix my merge error.
4119
41202008-08-15 Tobias Grosser <grosser@fim.uni-passau.de>
4121
4122 * graphite.c (graphite_trans_bb_block): Remove check for
4123 flag_loop_strip_mine, flag_loop_block, flag_loop_interchange.
4124 Check if loop blocking is profitable for every loop, before applying
4125 the changes.
4126 (graphite_apply_transformations): Call graphite_trans_bb_block only,
4127 if flag_loop_block is set.
4128
41292008-08-14 Sebastian Pop <sebastian.pop@amd.com>
4130
4131 * graphite.c: Add some more documentation for the loop
4132 mapping.
4133
41342008-08-14 Sebastian Pop <sebastian.pop@amd.com>
4135
4136 * Makefile.in (tree-data-ref.o): Remove dependence on graphite.h.
4137 * graphite.c: Format on less than 80 columns.
4138 * graphite.h: Same.
4139
41402008-08-14 Sebastian Pop <sebastian.pop@amd.com>
4141
4142 * cfgloopmanip.c (loopify): Use update_dominators_in_loop.
4143
41442008-08-14 Sebastian Pop <sebastian.pop@amd.com>
4145
4146 * doc/invoke.texi (floop-block, floop-strip-mine,
4147 floop-interchange): Update documentation with examples.
4148
41492008-08-13 Sebastian Pop <sebastian.pop@amd.com>
4150
4151 * cfgloopmanip.c (create_empty_loop_on_edge): Don't call
4152 add_referenced_var.
4153 * graphite.c (graphite_create_new_loop): Call add_referenced_var.
4154
41552008-08-13 Sebastian Pop <sebastian.pop@amd.com>
4156
4157 * cfgloopmanip.c (create_empty_loop_on_edge): Improve documentation.
4158 Factor gcc_asserts into a single one. Use force_gimple_operand_gsi.
4159 * tree-scalar-evolution.c: Revert useless changes.
4160 * tree-phinodes.c: Same.
4161 * cfghooks.c: Same.
4162 * vec.h: Same.
4163 * tree-vectorizer.h: Same.
4164 * tree-flow.h: Same.
4165 * tree-cfg.c: Same.
4166 * common.opt (fgraphite): Update documentation.
4167
41682008-08-12 Harsha Jagasia <harsha.jagasia@amd.com>
4169
4170 * doc/invoke.texi (-floop-block, -floop-strip-mine,
4171 -floop-interchange): Add more text for explaining what each of these
4172 flags is doing.
4173 * tree-into-ssa.c (gimple_vec): Moved to...
4174 * graphite.c: Include gimple.h.
4175 (gimple_vec): Moved to...
4176 (del_loop_to_cloog_loop): Removed.
4177 (loop_affine_expr): Do not call create_data_ref when the
4178 operand is a constant.
4179 (new_scop): Use free instead of del_loop_to_cloog_loop.
4180 * Makefile.in (graphite.o): Depend on GIMPLE_H.
4181 * gimple.h (gimple_vec): ... here.
4182
41832008-08-11 Tobias Grosser <grosser@fim.uni-passau.de>
4184
4185 * graphite.c (scopdet_bb_info): Only allow loops with known number of
4186 latch executions.
4187 (build_loop_iteration_domains): Fail, if latch executions unknown.
4188
41892008-08-11 Tobias Grosser <grosser@fim.uni-passau.de>
4190
4191 * graphite.c (add_conditions_to_domain): New.
4192 (build_scop_conditions_1): Call add_conditions_to_domain.
4193 (set_cloog_options): Allow to disable optimizations.
4194
41952008-08-11 Tobias Grosser <grosser@fim.uni-passau.de>
4196
4197 * graphite.c (find_params_in_bb): Look for parameters in conditions.
4198 Do not use walk_dominator_tree.
4199 (find_scop_parameters): Do not use walk_dominator_tree.
4200
42012008-08-11 Tobias Grosser <grosser@fim.uni-passau.de>
4202
4203 * graphite.c (scan_tree_for_params) Add / Subtract inequality.
4204 (idx_record_params): Adapt.
4205 * graphite.h (scop_gimple_loop_depth): New.
4206
42072008-08-11 Tobias Grosser <grosser@fim.uni-passau.de>
4208
4209 * graphite.c (build_scop_dynamic_schedules): Remove value_init.
4210 (scan_tree_for_params): Remove value_init.
4211 (build_scop_context): Remove value_init.
4212 (build_loop_iteration_domains): Remove value_init.
4213 (schedule_to_scattering): Remove value_init.
4214 (graphite_trans_bb_strip_mine): Remove value_init.
4215
42162008-08-11 Tobias Grosser <grosser@fim.uni-passau.de>
4217
4218 * gcc/graphite.c (limit_scops): New.
4219 (graphite_transform_loops): Add limit SCoPs.
4220 * gcc/testsuite/gcc.dg/graphite/scop-0.c: Update number of SCoPs.
4221 * gcc/testsuite/gcc.dg/graphite/scop-1.c: Update number of SCoPs.
4222 * gcc/testsuite/gcc.dg/graphite/scop-10.c: Update number of SCoPs.
4223 * gcc/testsuite/gcc.dg/graphite/scop-11.c: Update number of SCoPs.
4224 * gcc/testsuite/gcc.dg/graphite/scop-12.c: Update number of SCoPs.
4225 * gcc/testsuite/gcc.dg/graphite/scop-13.c: Update number of SCoPs.
4226 * gcc/testsuite/gcc.dg/graphite/scop-14.c: Update number of SCoPs.
4227 * gcc/testsuite/gcc.dg/graphite/scop-15.c: Update number of SCoPs.
4228 * gcc/testsuite/gcc.dg/graphite/scop-16.c: Update number of SCoPs.
4229 Change loop numbers.
4230 * gcc/testsuite/gcc.dg/graphite/scop-17.c: Update number of SCoPs.
4231 Change loop numbers.
4232 * gcc/testsuite/gcc.dg/graphite/scop-18.c: Update number of SCoPs.
4233 * gcc/testsuite/gcc.dg/graphite/scop-2.c: Update number of SCoPs.
4234 * gcc/testsuite/gcc.dg/graphite/scop-3.c: Update number of SCoPs.
4235 * gcc/testsuite/gcc.dg/graphite/scop-4.c: Update number of SCoPs.
4236 * gcc/testsuite/gcc.dg/graphite/scop-5.c: Update number of SCoPs.
4237 * gcc/testsuite/gcc.dg/graphite/scop-6.c: Update number of SCoPs.
4238 * gcc/testsuite/gcc.dg/graphite/scop-7.c: Update number of SCoPs.
4239 * gcc/testsuite/gcc.dg/graphite/scop-8.c: Update number of SCoPs.
4240 * gcc/testsuite/gcc.dg/graphite/scop-9.c: Update number of SCoPs.
4241 * gcc/testsuite/gcc.dg/graphite/scop-matmult.c: Update number of SCoPs.
4242
42432008-08-11 Tobias Grosser <grosser@fim.uni-passau.de>
4244
4245 * graphite.c (graphite_transform_loops): Call always find_transform.
4246
42472008-08-08 Tobias Grosser <grosser@fim.uni-passau.de>
4248
4249 * graphite.c (free_loops_mapping): New.
4250 (stmt_simple_for_scop_p): Fix typo.
4251 (stmt_simple_for_scop_p): Fix tuples functions, that
4252 broke polyhedron.
4253 (free_graphite_bb): Fix some memleaks.
4254 (free_scop): Fix some memleaks.
4255 (scopdet_bb_info): Do not forget some tmp SCoPs.
4256 (find_params_in_bb): Fix some memleaks.
4257 (clast_to_gcc_expression): Fix warning.
4258
42592008-08-07 Tobias Grosser <grosser@fim.uni-passau.de>
4260
4261 * testsuite/gcc.dg/graphite/scop-16.c: Fix for 32bit.
4262 * testsuite/gcc.dg/graphite/scop-17.c: Fix for 32bit.
4263
42642008-08-04 Sebastian Pop <sebastian.pop@amd.com>
4265
4266 * tree-ssa-loop.c (tree-ssa-loop.o): Do not include toplev.h.
4267 Move code ifdef-ed HAVE_cloog...
4268 * graphite.c: Include toplev.h.
4269 ... here.
4270 * Makefile.in (OBJS-common): Always build graphite.o.
4271 (BACKEND): Remove @GRAPHITE@.
4272 (tree-ssa-loop.o): Do not depend on TOPLEV_H.
4273 (graphite.o): Depend on TOPLEV_H.
4274
42752008-08-04 Sebastian Pop <sebastian.pop@amd.com>
4276
4277 * Makefile.in (tree-ssa-loop.o): Depend on TOPLEV_H.
4278 Remove typo left from polylib to ppl conversion.
4279 * graphite.c (graphite_transforms): Use sorry instead of fatal.
4280
42812008-08-03 Sebastian Pop <sebastian.pop@amd.com>
4282
4283 * toplev.c (process_options): Move the graphite loop optimization
4284 flags...
4285 * tree-ssa-loop.c (graphite_transforms): ... here.
4286 When not configured with CLooG, print to dump_file that
4287 Graphite transforms were not performed.
4288 * testsuite/gcc.dg/graphite/graphite.exp (scan-graphite-dump-times):
4289 New.
4290 * testsuite/gcc.dg/graphite/*.c: Updated all testcases to use
4291 scan-graphite-dump-times.
4292
42932008-08-03 Sebastian Pop <sebastian.pop@amd.com>
4294
4295 * graphite.c (dot_scop, dot_all_scops): Do not call system.
4296 Do not open /tmp/scop.dot and /tmp/allscops.dot.
4297
42982008-08-02 Sebastian Pop <sebastian.pop@amd.com>
4299 Jan Sjodin <jan.sjodin@amd.com>
4300
4301 * configure: Regenerated.
4302 * omp-low.c (expand_omp_sections): Remove now unused code.
4303 * config.in (HAVE_polylib): Removed.
4304 * configure.ac (HAVE_polylib, POLYLIBLIBS, POLYLIBINC): Removed.
4305 (PPLLIBS, PPLINC): Added.
4306 * graphite.c: Replace unsigned with int wherever possible.
4307 Don't access Cloog's data structures, but use accessor functions.
4308 Clast's stmt->type is now implemented as a vtable: change the
4309 switches of stmt->type into ifs.
4310 (polylib/polylibgmp.h): Don't include.
4311 (initialize_dependence_polyhedron,
4312 initialize_data_dependence_polyhedron, is_empty_polyhedron,
4313 statement_precedes_p, test_dependence, build_rdg_all_levels,
4314 dump_dependence_graph): Removed until this code is cleaned up
4315 or ported to Cloog.
4316 * Makefile.in (POLYLIBLIBS): Renamed PPLLIBS.
4317 (POLYLIBINC): Renamed PPLINC.
4318
43192008-08-01 Harsha Jagasia <harsha.jagasia@amd.com>
4320 Dwarakanath Rajagopal <dwarak.rajagopal@amd.com>
4321 Jan Sjodin <jan.sjodin@amd.com>
4322
4323 Finish the merge and tuplification of graphite.
4324
43252008-07-24 Sebastian Pop <sebastian.pop@amd.com>
4326 Jan Sjodin <jan.sjodin@amd.com>
4327
4328 Partial merge from mainline (138072:138275).
4329 * graphite.c still has to be tuplified.
4330
43312008-07-29 Jan Sjodin <jan.sjodin@amd.com>
4332
4333 * graphite.c (graphite_loops_mapping_max_loop_num): New.
4334 (create_num_from_index): New.
4335 (get_num_from_index): Also pass in the graphite BB.
4336 (free_graphite_bb): Free GBB_INDEX_TO_NUM_MAP.
4337 (build_graphite_bb): Initialize GBB_INDEX_TO_NUM_MAP.
4338 (graphite_trans_bb_strip_mine): Call create_num_from_index.
4339 (is_interchange_valid): Return false when failing.
4340 * graphite.h (struct num_map): New.
4341 (struct graphite_bb): New field num_map.
4342 (GBB_LOOPS_MAPPING): Renamed GBB_INDEX_TO_NUM_MAP.
4343
43442008-07-29 Tobias Grosser <grosser@fim.uni-passau.de>
4345
4346 * graphite.c (dump_gbb_conditions): Print also conditions like
4347 "if (a)". Remove dublicated code and use print_generic_expr ().
4348 (stmt_simple_for_scop_p): Only allow conditions we can handle
4349 {<, <=, >, >=}.
4350
43512008-07-25 Jan Sjodin <jan.sjodin@amd.com>
4352
4353 * graphite.h (struct scop): Removed new_ivs field.
4354 (SCOP_NEWIVS): Deleted.
4355 * graphite.c (new_scop, free_scop, clast_name_to_gcc,
4356 clast_to_gcc_expression, graphite_create_new_loop):
4357 Removed use of new_ivs.
4358
43592008-07-25 Jan Sjodin <jan.sjodin@amd.com>
4360
4361 * graphite.c (debug_oldivs, debug_loop_vec, create_loops_mapping,
4362 create_loops_mapping_num, debug_loop_mapping_1): New.
4363 (debug_loop_mapping): Call debug_loop_mapping_1.
4364 (get_loop_mapping_for_num,
4365 graphite_loops_mapping_add_child,
4366 graphite_loops_mapping_add_child_num,
4367 graphite_loops_mapping_insert_child,
4368 graphite_loops_mapping_parent,
4369 split_loop_mapped_depth_for_num,
4370 loop_mapped_depth_split_loop): New.
4371 (increment_loop_mapped_depths): Removed.
4372 (swap_loop_mapped_depth_for_num): Reimplemented.
4373 (new_scop): Call create_loops_mapping.
4374 (scop_record_loop): Call graphite_loops_mapping_insert_child.
4375 (translate_clast): Pass the old loop father in parameter, and pass
4376 it to get_old_iv_from_ssa_name.
4377 (remove_edges_around_useless_blocks, can_generate_code_stmt,
4378 can_generate_code, can_generate_for_scop): New.
4379 (graphite_trans_bb_block): Returns false when it fails to transform.
4380 * graphite.h (graphite_loop_node, graphite_loops_mapping): New.
4381
43822008-07-25 Sebastian Pop <sebastian.pop@amd.com>
4383
4384 Reverted all the changes related to the streamization and
4385 loop fusion.
4386 These changes are now tracked in the streamization branch.
4387
43882008-07-25 Sebastian Pop <sebastian.pop@amd.com>
4389 Jan Sjodin <jan.sjodin@amd.com>
4390
4391 * graphite.c (gbb_compare): Correctly constify.
4392 (gbb_can_be_ignored): Indent.
4393 (graphite_trans_scop_swap_1and2): Add legality check.
4394 Remove dead FIXMEs.
4395
43962008-07-25 Sebastian Pop <sebastian.pop@amd.com>
4397
4398 Remove fallouts from "Reverted the Condate changes".
4399 * tree.h: Remove unused decl.
4400 * testsuite/gcc.dg/tree-checker: Same.
4401 * timevar.def: Remove counter.
4402
44032008-07-24 Sebastian Pop <sebastian.pop@amd.com>
4404
4405 * Merge from mainline (135673:138072).
4406
4407 Reverted the MIRO changes (from 2008-04-05) that are now
4408 tracked in the miro branch.
4409 * tree-bounds.c: Removed.
4410 * tree-bounds.h: Removed.
4411
4412 Reverted the Condate changes (from 2006-07-04, 2007-03-20) that
4413 are now tracked in the condate branch.
4414 * tree-check.c: Removed.
4415 * tree-match.c: Removed.
4416 * condate.y: Removed.
4417
44182008-07-24 Dwarakanath Rajagopal <dwarak.rajagopal@amd.com>
4419
4420 * common.opt: New user flag -floop-block, -floop-strip-mine
4421 and -floop-interchange.
4422 * toplev.c (process_options): Enable -fgraphite pass if any one of the
4423 graphite loop optimization flags is turned on.
4424 * graphite.c (graphite_apply_transformations): Add flag_loop_block,
4425 flag_loop_strip_mine and flag_loop_interchange checks before
4426 optimizations.
4427 * doc/invoke.texi: Remove -fgraphite and add -floop-block,
4428 -floop-strip-mine and -floop-interchange.
4429 * testsuite/gcc.dg/graphite/block-0.c: Add -floop-block and remove
4430 -fgraphite.
4431 * testsuite/gcc.dg/graphite/scop-16.c: Ditto.
4432 * testsuite/gcc.dg/graphite/scop-17.c: Ditto.
4433 * testsuite/gcc.dg/graphite/scop-18.c: Ditto.
4434
44352008-07-23 Jan Sjodin <jan.sjodin@amd.com>
4436 Sebastian Pop <sebastian.pop@amd.com>
4437
4438 * cfgloopmanip.c (update_dominators_in_loop): Make it static.
4439 (create_empty_loop_on_edge): More fixes.
4440 * tree-phinodes.c (resize_phi_node): Extern.
4441 (unlink_phi_node, move_phi_node): New split from remove_phi_node.
4442 * cfghooks.c (update_dominator_information): New split from
4443 split_edge.
4444 * tree-vectorizer.c (rename_variables_in_bb): Extern.
4445 * tree-dfa.c (collect_dfa_stats): Start walking the CFG on the
4446 successor of the function entry block.
4447
4448 * graphite.c: Include pointer-set.h.
4449 (debug_loop_mapping, increment_loop_mapped_depths,
4450 get_loop_mapped_depth_for_num, get_loop_mapped_depth,
4451 set_loop_mapped_depth_for_num, set_loop_mapped_depth,
4452 swap_loop_mapped_depth_for_num, get_num_from_index,
4453 swap_loop_mapped_depth, loop_iv_stack_debug,
4454 loop_iv_stack_push, loop_iv_stack_pop, loop_iv_stack_get_iv,
4455 loop_iv_stack_get_iv_from_name, loop_iv_stack_debug,
4456 get_old_iv_from_ssa_name): New.
4457 (new_scop): Initialize SCOP_LOOPS_MAPPING.
4458 (free_scop): Free SCOP_LOOPS_MAPPING.
4459 (scop_record_loop): Record old ivs.
4460 (create_var_name): Removed.
4461 (initialize_cloog_names): Allocate double space in case strip mine
4462 applies to all loops once.
4463 (clast_name_to_gcc): Look up in the map ivstack passed in parameter.
4464 (clast_to_gcc_expression): Same. Implement more clast to gimple
4465 translation.
4466 (graphite_create_new_loop): Pass in ivstack.
4467 (remove_all_edges): Pass in the construction_edge.
4468 (graphite_remove_iv): Removed.
4469 (graphite_rename_ivs, graphite_rename_ivs_stmt,
4470 remove_cond_exprs): Rewritten.
4471 (move_phi_nodes): New.
4472 (disconnect_virtual_phi_nodes, disconnect_cond_expr): Removed.
4473 (translate_clast): Pass in ivstack. Rewrite some cases.
4474 (set_cloog_options, debug_clast_stmt): New.
4475 (find_transform): Use set_cloog_options.
4476 (outermost_loop_layer): Removed.
4477 (get_construction_edge, collect_virtual_phis, find_vdef_for_var_in_bb,
4478 find_vdef_for_var_1, find_vdef_for_var, patch_phis_for_virtual_defs,
4479 mark_old_loops, remove_dead_loops): New.
4480 (gloog): Rewritten.
4481 (graphite_trans_bb_move_loop): Call swap_loop_mapped_depth.
4482 (const_column_index, get_first_matching_sign_row_index,
4483 get_lower_bound_row, get_upper_bound_row, get_lower_bound,
4484 get_upper_bound): New.
4485 (graphite_trans_bb_strip_mine): Also update the iv map.
4486
4487 * graphite.h (graphite_loops_mapping, GBB_LOOPS_MAPPING): New.
4488 (struct name_tree): Add a loop field.
4489 (struct scop): Add a graphite_loops_mapping field.
4490 (SCOP_LOOPS_MAPPING): New.
4491 (debug_clast_stmt): Declare.
4492 * lambda.h (find_induction_var_from_exit_cond): Declare.
4493 (lambda-code.c): (find_induction_var_from_exit_cond): Extern.
4494 * cfgloop.h (update_dominators_in_loop): Removed declaration.
4495 (create_empty_loop_on_edge): Updated.
4496 * tree-flow.h (remove_bb, resize_phi_node, move_phi_node,
4497 rename_variables_in_bb): Declare.
4498 * tree-cfg.c (remove_bb): Extern.
4499
4500 * testsuite/gcc.dg/graphite/block-0.c: New.
4501
45022008-07-21 Dwarakanath Rajagopal <dwarak.rajagopal@amd.com>
4503 Sebastian Pop <sebastian.pop@amd.com>
4504
4505 * graphite.c (strip_mine_profitable_p): New.
4506 (graphite_trans_bb_block): Disable strip mining if not profitable.
4507
4508 * testsuite/gcc.dg/graphite/scop-18.c: New.
4509 * testsuite/gcc.dg/graphite/scop-17.c: Fixed.
4510 * testsuite/gcc.dg/graphite/scop-16.c: Fixed.
4511
45122008-07-17 Harsha Jagasia <harsha.jagasia@amd.com>
4513 Jan Sjodin <jan.sjodin@amd.com>
4514 Sebastian Pop <sebastian.pop@amd.com>
4515
4516 * graphite.c (is_interchange_valid): New.
4517 (graphite_trans_bb_block): Check loop nest of basic block for legality
4518 of interchange.
4519
4520 * graphite.h (gbb_inner_most_loop_index, outer_most_loop_1,
4521 outer_most_loop, gbb_outer_most_loop_index): New.
4522
4523 * tree-loop-linear.c (perfect_loop_nest_depth): Remove static.
4524 * tree-flow.h (perfect_loop_nest_depth): Declare as extern.
4525 * testsuite/gcc.dg/graphite/scop-16.c: New.
4526 * testsuite/gcc.dg/graphite/scop-17.c: New.
4527
45282008-07-11 Tobias Grosser <grosser@fim.uni-passau.de>
4529
4530 * graphite.c (scop_remove_ignoreable_gbbs): Also update bitmap.
4531 (graphite_trans_scop_block): Ignore SCoPs without bbs.
4532
45332008-07-11 Tobias Grosser <grosser@fim.uni-passau.de>
4534
4535 * graphite.c (new_scop): Initialize SCOP_EXIT.
4536 (scopdet_info): Add.
4537 (scopdet_bb_info): Rename from is_bb_addable. Cleanup, bugfixes.
4538 (build_scops_1): Cleanup, bugfixes.
4539 (build_scops): Cleanup.
4540
4541 * testsuite/gcc.dg/graphite/scop-matmult.c: Remove duplicated code.
4542 * testsuite/gcc.dg/graphite/scop-15.c: Add SCoP numbers.
4543
45442008-07-10 Harsha Jagasia <harsha.jagasia@amd.com>
4545
4546 * testsuite/gfortran.dg/graphite/scop-1.f: Update to reduced test case.
4547
4548 * testsuite/gfortran.dg/graphite/graphite.exp: Use
4549 DEFAULT_GRAPHITE_FLAGS.
4550
4551 * testsuite/gcc.dg/graphite/scop-15.c: Update to reduced test case.
4552
45532008-07-10 Harsha Jagasia <harsha.jagasia@amd.com>
4554
4555 * graphite.c (scan_tree_for_params): Do not assert any more if
4556 MULT_EXPR parameter is negative.
4557
4558 * testsuite/gfortran.dg/graphite/scop-1.f: New.
4559
4560 * testsuite/gfortran.dg/graphite/graphite.exp: New.
4561
4562 * testsuite/gcc.dg/graphite/scop-15.c: New.
4563
45642008-07-10 Harsha Jagasia <harsha.jagasia@amd.com>
4565
4566 * graphite.c (is_bb_addable): Fix segfault in spec gzip and reformat.
4567
45682008-07-10 Tobias Grosser <grosser@fim.uni-passau.de>
4569
4570 * graphite.c (graphite_trans_bb_swap_loops): Rename from
4571 graphite_swap_loops.
4572 (graphite_trans_bb_move_loop): New.
4573 (graphite_trans_bb_strip_mine): Rename from graphite_strip_mine_loop.
4574 (graphite_trans_bb_block): New.
4575 (graphite_trans_loop_block): New.
4576 (graphite_trans_scop_swap_1and2): Rename from
4577 graphite_trans_swap_1and2.
4578 (graphite_trans_scop_strip): Rename from graphite_trans_strip.
4579 (graphite_trans_scop_block): New.
4580 (graphite_apply_transformations): Rename from
4581 graphite_transformations.
4582
4583 * testsuite/gcc.dg/graphite/scop-matmult.c: New.
4584
45852008-07-10 Tobias Grosser <grosser@fim.uni-passau.de>
4586
4587 * graphite.c (gbb_compare): New.
4588 (graphite_sort_gbbs): New.
4589 (gbb_can_be_ignored): New.
4590 (scop_remove_ignoreable_gbbs): New.
4591 (graphite_transformations): Cleanup and add
4592 scop_remove_ignoreable_gbbs.
4593 * lambda.h (lambda_vector_compare): New.
4594
45952008-07-09 Tobias Grosser <grosser@fim.uni-passau.de>
4596
4597 * graphite.c (print_graphite_bb): Correct printing of static schedule.
4598 (graphite_swap_loops): int -> unsigned
4599 (graphite_strip_mine_loop): int -> unsigned, Fix SCHEDULE
4600 (graphite_transformations): New.
4601 (graphite_transform_loops): Move to graphite_transformations.
4602 * graphite.h (gbb_nb_loops): Return unsigned.
4603
46042008-07-04 Tobias Grosser <grosser@fim.uni-passau.de>
4605
4606 * graphite.c (scan_tree_for_params): Fix insertion of parameters into
4607 the domain matrix. This makes scop-0.c work again.
4608
46092008-06-20 Richard Guenther <rguenther@suse.de>
4610
4611 * graphite.h: Adjust copyright to GPLv3.
4612 * graphite.c: Likewise.
4613 (stmt_simple_memref_for_scop_p): Split out from ...
4614 (stmt_simple_for_scop_p): ... here. Fix handling of calls
4615 and simplify.
4616 (get_bb_type): Optimize.
4617 (is_pred): Remove.
4618 (is_bb_addable): Fix memleak, replace is_pred call with
4619 single_pred.
4620 (build_scops): Use current_loops.
4621 (param_index): Fix memleak.
4622
46232008-06-20 Konrad Trifunovic <konrad.trifunovic@inria.fr>
4624
4625 * graphite.c: Fix formatting.
4626
46272008-06-19 Konrad Trifunovic <konrad.trifunovic@inria.fr>
4628
4629 * graphite.c (new_scop): Memory allocation for SCOP_{NEWIVS, OLDIVS}.
4630 (free_scop): Memory deallocation for SCOP_NEWIVS, SCOP_OLDIVS.
4631 (create_var_name, save_var_name): Newly defined functions.
4632 (initialize_cloog_names): Part of the code factored out to
4633 save_var_name.
4634 (clast_to_gcc_expression): Now handles the case of clast_red_sum
4635 in clast_reduction statement.
4636 (graphite_create_new_loop): Now takes a new parameter
4637 for outer_loop.
4638 (translate_clast): Now also takes the context_loop and bb_exit
4639 parameters. Rewritten the code so that it creates a gimple code
4640 inside the given context.
4641 (outermost_loop_layer, graphite_remove_iv, graphite_rename_ivs,
4642 remove_cond_expr, disconnect_cond_expr,
4643 disconnect_virtual_phi_nodes): Newly defined functions.
4644 * graphite.h (struct scop): added old_ivs vector.
4645 SCOP_OLDIVS: New macro.
4646
46472008-06-19 Sebastian Pop <sebastian.pop@amd.com>
4648
4649 * cfgloopmanip.c: Add missing function comments, fix formatting.
4650
46512008-06-18 Konrad Trifunovic <konrad.trifunovic@inria.fr>
4652
4653 * cfgloopmanip.c (update_dominators_in_loop): Defined.
4654 (create_empty_loop_on_edge): Defined.
4655 * tree-parloops.c (canonicalize_loop_ivs): Returns tree
4656 instead of void.
4657 * cfgloop.h (create_empty_loop_on_edge): Declared as extern.
4658 (update_dominators_in_loop): Declared as extern
4659 * tree-flow.h (canonicalize_loop_ivs): Declared as extern.
4660
46612008-06-16 Tobias Grosser <grosser@fim.uni-passau.de>
4662
4663 * graphite.c (print_graphite_bb): Allow changing number of loops
4664 in SCoP domain.
4665 (initialize_cloog_names): Allow changing number of loops.
4666 (build_cloog_prog): Simplify.
4667 (find_transform): Enable cloog option --strides.
4668 (graphite_swap_loops): New.
4669 (graphite_strip_mine_loop): New.
4670 (graphite_trans_swap_1and2): New.
4671 (graphite_trans_strip): New.
4672 (graphite_transform_loops): Add graphite_trans_strip.
4673 * graphite.h (scop_max_loop_depth): New.
4674
46752008-06-15 Tobias Grosser <grosser@fim.uni-passau.de>
4676
4677 * graphite.c (build_scop_iteration_domain): Remove forgotten
4678 line. (Fixes compile)
4679
46802008-06-15 Tobias Grosser <grosser@fim.uni-passau.de>
4681
4682 * graphite.c (print_graphite_bb): Add output of GBB_LOOPS.
4683 (build_graphite_bb): Add GBB_LOOPS and GBB_DOMAIN and reorder.
4684 (build_bb_loops): New.
4685 (graphite_transform_loops): Add build_bb_loops.
4686 (schedule_to_scattering): Use gbb_nb_loops to support changing loop
4687 numbers.
4688 * graphite.h (graphite_bb): Add loops.
4689 (gbb_nb_loops): New.
4690 (gbb_loop_at_index): New.
4691 (gbb_loop_index): New.
4692 (nb_params_in_scop): Renamed to scop_nb_params. Updated all functions
4693 using nb_params_in_scop.
4694
46952008-06-14 Tobias Grosser <grosser@fim.uni-passau.de>
4696
4697 * graphite.c (print_graphite_bb): Adapt to minimized schedule.
4698 (build_scop_canonical_schedules): Build minimized schedule.
4699 (schedule_to_scattering): Adapt to minimized schedule.
4700 * graphite.h (graphite_bb): Add/Update descriptions.
4701
47022008-06-14 Adrien Eliche <aeliche@isty.uvsq.fr>
4703 Tobias Grosser <grosser@fim.uni-passau.de>
4704
4705 * graphite.c (print_graphite_bb): Add condition printing.
4706 (dump_value): New.
4707 (dump_gbb_conditions): New.
4708 (build_scop_conditions_1): New.
4709 (build_scop_conditions): New.
4710 * graphite.h (graphite_bb): Add conditions.
4711
47122008-06-14 Tobias Grosser <grosser@fim.uni-passau.de>
4713
4714 * graphite.c (print_graphite_bb):
4715 (free_graphite_bb): New.
4716 (free_scop): Free bbs.
4717 (get_bb_type): Free doms.
4718 (build_scop_context): Free context matrix.
4719 (build_loop_iteration_domains): Remove unused code.
4720 (build_cloog_prog): Free scattering function and blocklist.
4721 (find_transform): Free options.
4722
47232008-06-13 Tobias Grosser <grosser@fim.uni-passau.de>
4724
4725 * graphite.c (loop_body_to_cloog_stmts): Rename to add_bb_domains.
4726 Remove unnecessery cloog data structures. Make a copy of the domain
4727 (setup_cloog_loop): Rename to build_loop_iteration_domains. Remove
4728 unnecessary cloog data structures. Fix memory leaks. Remove insert
4729 into SCOP_LOOP2CLOOG_LOOP as the inserted CloogLoops will never be
4730 used.
4731 (build_scop_iteration_domain): Remove unnecessary cloog
4732 data structures. Fix memory leaks.
4733 (graphite_transform_loops): Disable build_scop_dynamic_schedules as it
4734 uses SCOP_LOOP2CLOOG_LOOP, that is at the moment not working.
4735
47362008-06-12 Tobias Grosser <grosser@fim.uni-passau.de>
4737
4738 * graphite.c (find_scop_params): Remove initialize_cloog_names.
4739
47402008-06-12 Tobias Grosser <grosser@fim.uni-passau.de>
4741
4742 * graphite.c (end_scop): Style fix.
4743 (schedule_to_scattering): Style and comment fix.
4744
47452008-06-12 Tobias Grosser <grosser@fim.uni-passau.de>
4746 * graphite.c (print_graphite_bb): Fix definiton of
4747 schedule_to_scattering.
4748 (initialize_cloog_names): Change nb_scattdims to max loop
4749 depth in SCoP.
4750 (schedule_to_scattering): Take parameter for number of scattering
4751 dimensions.
4752 (build_cloog_prog): Only build as much scattering dimensions as
4753 necessary.
4754
47552008-06-12 Tobias Grosser <grosser@fim.uni-passau.de>
4756
4757 * graphite.c (end_scop): Disable bb splitting. Fixes SIGSEGV
4758 in polyhedron/aermod.f90.
4759
47602008-06-11 Tobias Grosser <grosser@fim.uni-passau.de>
4761 Dwarak Rajagopal <dwarak.rajagopal@amd.com>
4762 Harsha Jagasia <harsha.jagasia@amd.com>
4763
4764 * graphite.c (is_bb_addable): Fix segfault.
4765
47662008-06-10 Tobias Grosser <grosser@fim.uni-passau.de>
4767
4768 * graphite.c (is_bb_addable): Fix memory leak, handling of loops
4769 with multiple exits and conditional handling in edge cases.
4770 (is_loop_exit): Fix memory leak. (Forgotten in last commit)
4771
4772 * testsuite/gcc.dg/graphite/scop-14.c: New.
4773
47742008-06-06 Tobias Grosser <grosser@fim.uni-passau.de>
4775 Adrien Eliche <aeliche@isty.uvsq.fr>
4776
4777 * graphite.c (is_bb_addable): Add more comments and enhance
4778 readablity of the source code. Fix memory leak.
4779 (is_loop_exit): Fix memory leak.
4780
47812008-06-05 Tobias Grosser <grosser@fim.uni-passau.de>
4782
4783 * graphite.c (first_loop_in_scop): Deleted.
4784 (setup_cloog_loop): Only walk the loop chain for inner loops.
4785 (build_scop_iteration_domain): Execute setup_cloog_loop for
4786 all loops in the first layer.
4787
47882008-06-05 Tobias Grosser <grosser@fim.uni-passau.de>
4789
4790 * graphite.c (scan_tree_for_params): Change the way params are
4791 added to be indepenent of the number of loops.
4792 (setup_cloog_loop): Revert to short matrix format. Fix parameter
4793 handling.
4794 (build_cloog_prog): Revert to short matrix format.
4795
47962008-06-05 Sebastian Pop <sebastian.pop@amd.com>
4797 Dwarak Rajagopal <dwarak.rajagopal@amd.com>
4798
4799 * tree-loop-fusion.c (fuse_loops): Fix uninitialized variable
4800 warning.
4801
48022008-06-05 Sebastian Pop <sebastian.pop@amd.com>
4803
4804 * graphite.c (nb_data_refs_in_scop): New.
4805 (graphite_transform_loops): Print more stats: number of
4806 loops, basic blocks and data references per scop.
4807
48082008-06-04 Sebastian Pop <sebastian.pop@amd.com>
4809 Jan Sjodin <jan.sjodin@amd.com>
4810
4811 * graphite.c (loop_affine_expr, idx_record_params,
4812 find_scop_parameters, setup_cloog_loop): Use instantiate_scev
4813 instead of instantiate_parameters.
4814
48152008-06-04 Tobias Grosser <grosser@fim.uni-passau.de>
4816
4817 * graphite.c (schedule_to_scattering): Fix scattering dimensions,
4818 add support for parameters, add STATIC_SCHEDULE at the right places,
4819 cleanup.
4820
48212008-06-04 Tobias Grosser <grosser@fim.uni-passau.de>
4822
4823 * graphite.c (build_scop_loop_nests): Only add the loops, that
4824 are contained completely in the SCoP.
4825 (build_cloog_prog): Disable scattering, until schedule_to_scattering
4826 and the domains are fixed.
4827 (build_scop_canonical_schedules): Add support for bbs not contained
4828 in any SCoP.
4829
48302008-06-04 Tobias Grosser <grosser@fim.uni-passau.de>
4831
4832 * graphite.h (scop_contains_loop): Update comments to match
4833 the actual behavior.
4834 (scop_contains_loop): New.
4835 * graphite.c (schedule_to_scattering): Use scop_contains_loop.
4836
48372008-06-04 Sebastian Pop <sebastian.pop@amd.com>
4838
4839 * graphite.c (get_bb_type): On function body, i.e. loop_0,
4840 don't mark blocks as GBB_LOOP_SING_EXIT_HEADER, mark them
4841 as GBB_COND_HEADER.
4842
48432008-06-04 Sebastian Pop <sebastian.pop@amd.com>
4844 Tobias Grosser <grosser@fim.uni-passau.de>
4845
4846 * graphite.c (graphite_transform_loops): Early return when
4847 there are no loops in the function.
4848
48492008-05-31 Sebastian Pop <sebastian.pop@amd.com>
4850 Jan Sjodin <jan.sjodin@amd.com>
4851
4852 * graphite.c (scan_tree_for_params, setup_cloog_loop): Compute the
4853 offset of the last loop.
4854 (setup_cloog_loop): Copy the entire outer constraint matrix.
4855
48562008-05-31 Sebastian Pop <sebastian.pop@amd.com>
4857 Jan Sjodin <jan.sjodin@amd.com>
4858
4859 * graphite.c (stmt_in_scop_p, function_parameter_p,
4860 invariant_in_scop_p): Removed.
4861 (scan_tree_for_params): Can be used with no constraint
4862 matrix for gathering parameters.
4863 (idx_record_params): Don't use idx_record_param, instead use
4864 scan_tree_for_params.
4865 (find_scop_parameters): Same.
4866 (setup_cloog_loop, build_scop_iteration_domain, build_cloog_prog):
4867 Fix the size of loop domains.
4868 (schedule_to_scattering): Exit when the outer loop is not in scop.
4869 (find_transform): Enable build_cloog_prog.
4870
48712008-05-31 Sebastian Pop <sebastian.pop@amd.com>
4872 Jan Sjodin <jan.sjodin@amd.com>
4873
4874 * graphite.c (schedule_to_scattering): Make scattering domains
4875 uniformly of the same size, as required by CLooG 0.14.0 and before.
4876
48772008-05-31 Sebastian Pop <sebastian.pop@amd.com>
4878 Jan Sjodin <jan.sjodin@amd.com>
4879
4880 * graphite.c (schedule_to_scattering): Rewrite, correct the
4881 translation of the scheduling function to scattering.
4882 (build_cloog_prog): Call schedule_to_scattering only once.
4883 * graphite.h (scop_loop_index): Do not fail for loops not
4884 in the scop: return -1.
4885
48862008-05-30 Tobias Grosser <grosser@fim.uni-passau.de>
4887
4888 * graphite.c (build_graphite_bb): Initialize GBB_DOMAIN.
4889 (loop_body_to_cloog_stmts): Export GBB_DOMAIN.
4890 (setup_cloog_loop): Export GBB_DOMAIN.
4891 (build_cloog_prog): New. Create new CLOOG_PROG, which should be
4892 able to rebuild the original control flow.
4893 * graphite.h (graphite_bb): Add domain field and access macro.
4894 (GBB_DOMAIN): New.
4895
48962008-05-30 Sebastian Pop <sebastian.pop@amd.com>
4897
4898 * graphite.c (debug_gbb): New.
4899 (print_scop, build_graphite_bb): Use SCOP_BBS.
4900 (build_scop_bbs): Reimplemented.
4901 (dfs_bb_in_scop_p): Removed.
4902 (build_scop_loop_nests): Reorder loops inserted in
4903 SCOP_LOOP_NEST: outer loops should come first.
4904 (build_scop_canonical_schedules): Reinitialize at zero
4905 the components of the SCOP_STATIC_SCHEDULE for the loops
4906 that have already been parsed.
4907
4908 * graphite.h (debug_gbb): Declared.
4909
49102008-05-30 Sebastian Pop <sebastian.pop@amd.com>
4911 Jan Sjodin <jan.sjodin@amd.com>
4912
4913 * graphite.c (create_empty_loop): Renamed graphite_create_new_loop.
4914 (graphite_loop_to_gcc_loop): Removed.
4915 (remove_all_edges): New.
4916 (graphite_stmt_to_gcc_stmt): Renamed translate_clast.
4917 (gloog): Remove useless code.
4918
49192008-05-29 Tobias Grosser <grosser@fim.uni-passau.de>
4920
4921 * graphite.c (get_bb_type): Reworked. We distinguish between
4922 loops with one or multiple exits.
4923 (is_loop_exit): New.
4924 (is_pred): New.
4925 (is_bb_addable): Rework condition handling, now support for case
4926 case statements and loops with multiple exits.
4927
4928 * testsuite/gcc.dg/graphite/scop-11.c: New.
4929 * testsuite/gcc.dg/graphite/scop-12.c: New.
4930 * testsuite/gcc.dg/graphite/scop-13.c: New.
4931
49322008-05-29 Tobias Grosser <grosser@fim.uni-passau.de>
4933
4934 * graphite.c (dot_all_scops_1): Fix some colors. Reuse colors, if
4935 we have too many colors.
4936
49372008-05-22 Sandeep Maram <smaram_b04@iiita.ac.in>
4938
4939 * doc/invoke.texi (-ftree-loop-fusion): Document.
4940 * tree-pass.h (pass_loop_fusion): Declared.
4941 * tree-loop-fusion.c: New.
4942 * timevar.def (TV_TREE_LOOP_FUSION): Declared.
4943 * tree-data-ref.c (find_data_references_in_loop): Make extern.
4944 * tree-data-ref.h (find_data_references_in_loop): Declared.
4945 * common.opt (ftree-loop-fusion): Declared.
4946 * Makefile.in (tree-loop-fusion.o): Added rule and to OBJS-common.
4947
49482008-05-21 Sebastian Pop <sebastian.pop@amd.com>
4949
4950 * graphite.c (build_access_matrix): Fix typo from the merge.
4951
49522008-05-20 Sebastian Pop <sebastian.pop@amd.com>
4953
4954 * Merge from mainline (130800:135673).
4955
49562008-05-07 Sebastian Pop <sebastian.pop@amd.com>
4957
4958 * graphite.c (end_scop): The exit of the scop is not part of the scop.
4959 Update dominators after splitting.
4960
49612008-05-07 Sebastian Pop <sebastian.pop@amd.com>
4962
4963 * graphite.c (is_bb_addable): Return the harmful statement.
4964 Factor up some code.
4965 (end_scop): New. Splits end of scope bbs on a harmful statement.
4966 (build_scops_1): Call end_scop.
4967
49682008-05-07 Sebastian Pop <sebastian.pop@amd.com>
4969
4970 * graphite.c: (succs_at_same_depth, end_scop, all_preds_visited_p,
4971 all_succs_visited_p, start_new_scop_for_each_succ, start_new_scop,
4972 add_dominators_to_open_scops, stop_last_open_scop, scop_end_loop,
4973 build_scops_1): Removed.
4974 (build_scops_2): Renamed build_scops_1.
4975
49762008-05-06 Sebastian Pop <sebastian.pop@amd.com>
4977
4978 * graphite.c: Fix formatting.
4979
49802008-05-06 Tobias Grosser <grosser@fim.uni-passau.de>
4981
4982 * graphite.c (get_bb_type): New.
4983 (move_scops): New.
4984 (build_scops_2): New.
4985 (is_bb_addable): New.
4986 (build_scops): Switch the scop detection.
4987 (build_scop_bbs): Add entry bb to scop.
4988 * graphite.h (struct scop): Update comment.
4989
49902008-05-06 Tobias Grosser <grosser@fim.uni-passau.de>
4991
4992 * graphite.c (dot_all_scops_1): Fix some incorrect colors and add
4993 more colors.
4994
49952008-05-06 Tobias Grosser <grosser@fim.uni-passau.de>
4996
4997 * testsuite/gcc.dg/graphite/scop-1.c: Update.
4998 * testsuite/gcc.dg/graphite/scop-2.c: Update.
4999 * testsuite/gcc.dg/graphite/scop-4.c: Update.
5000 * testsuite/gcc.dg/graphite/scop-5.c: Add.
5001 * testsuite/gcc.dg/graphite/scop-6.c: Add.
5002
50032008-05-06 Sebastian Pop <sebastian.pop@amd.com>
5004
5005 * testsuite/gcc.dg/graphite/scop-0.c: Add.
5006 * testsuite/gcc.dg/graphite/scop-7.c: Add.
5007 * testsuite/gcc.dg/graphite/scop-8.c: Add.
5008 * testsuite/gcc.dg/graphite/scop-9.c: Add.
5009 * testsuite/gcc.dg/graphite/scop-10.c: Add.
5010
50112008-05-06 Tobias Grosser <grosser@fim.uni-passau.de>
5012
5013 * graphite.c (scop_affine_expr): Renamed to loop_affine_expr.
5014 Check affine expressions depending on the outermost loop
5015 instead of a scop.
5016 (stmt_simple_for_scop_p): Same.
5017 (harmfule_stmt_in_scop): Same.
5018
50192008-04-28 Tobias Grosser <grosser@fim.uni-passau.de>
5020
5021 * graphite.c (dot_all_scops): Remove incorrect difficult bb coloring,
5022 mark entry and exit, that are not part of the SCoP and update HTML
5023 formatting.
5024
50252008-04-25 Sebastian Pop <sebastian.pop@amd.com>
5026
5027 * graphite.c (basic_block_simple_for_scop_p): Renamed
5028 harmful_stmt_in_bb.
5029 (save_scop, preds_at_same_depth, test_for_scop_bound): Removed.
5030 (add_dominators_to_open_scops, build_scops_1): Reimplemented.
5031 (all_preds_visited_p, all_succs_visited_p,
5032 start_new_scop_for_each_succ, start_new_scop, stop_last_open_scop,
5033 scop_end_loop): New.
5034 (build_scops): Do not use dfs_enumerate_from.
5035
5036 * testsuite/gcc.dg/graphite/scop-{1,2,4}.c: Updated.
5037
50382008-04-23 Sebastian Pop <sebastian.pop@amd.com>
5039
5040 * graphite.c: Add comments to functions that are missing a
5041 description.
5042 (graphite_create_iv): Removed. Merged in graphite_loop_to_gcc_loop.
5043
50442008-04-23 Sebastian Pop <sebastian.pop@amd.com>
5045
5046 * graphite.c (nb_params_in_scop): Moved...
5047 (graphite_bb_from_bb, loop_body_to_cloog_stmts): New.
5048 (setup_cloog_loop): Call loop_body_to_cloog_stmts.
5049 (clast_to_gcc_expression): Reduce column size to less than 80.
5050 (graphite_create_iv): Return the new name of the IV.
5051 (find_transform): Set options->esp and options->cpp.
5052 (gloog): Comment out the invalidation of the old loop code.
5053 (initialize_dependence_polyhedron): Replace scop_nb_params with
5054 nb_params_in_scop.
5055
5056 * graphite.h (nb_params_in_scop): ... here.
5057 (scop_nb_params): Removed.
5058 (loop_domain_dim): Return something even when the loop was not
5059 found in the hash table: avoid ICEing on all the graphite.exp
5060 testcases.
5061
50622008-04-14 Konrad Trifunovic <konrad.trifunovic@inria.fr>
5063
5064 * tree-chrec.c (for_each_scev_op): SCEV can have 3 operands.
5065
5066 * graphite.c (build_scop_dynamic_schedules): Schedule is built
5067 according to nesting level.
5068 (find_scop_parameters): Call instantiate_parameters.
5069 (scan_tree_for_params): Extend it to handle general affine bounds.
5070 Inner loop bound can depend on outer loop induction variable.
5071 (setup_cloog_loop): tmp variable is allocated on stack. Call
5072 instantiate_parameters with respect to outermost_loop_in_scop.
5073 (loop_domain_dim, ref_nb_loops, loop_iteration_vector_dim): moved to
5074 graphite.h.
5075 (create_empty_loop): Function loopify should be given edge
5076 probability, instead of edge frequency. Dominance relation from
5077 switch_bb to loop_header.
5078 (clast_to_gcc_expression): Added handling of clast_reduction node.
5079 (gloog): New functionality for removing old loop.
5080 (test_dependence): Factored out from build_rdg_all_levels.
5081 (build_rdg_all_levels): Dependence testing factored out to
5082 test_dependence function.
5083
5084 * graphite.h (struct graphite_bb): Extended with dynamic_schedule.
5085 (loop_domain_dim, ref_nb_loops, loop_iteration_vector_dim): Moved
5086 from graphite.c
5087
50882008-04-07 Sebastian Pop <sebastian.pop@amd.com>
5089
5090 * graphite.c (free_scop, param_index, initialize_cloog_names,
5091 nb_params_in_scop): Use name_tree map instead of just a tree
5092 for keeping track of the variable name associated to that tree.
5093 (create_empty_loop, gmp_cst_to_tree, clast_name_to_gcc,
5094 clast_to_gcc_expression, graphite_create_iv,
5095 graphite_loop_to_gcc_loop, graphite_cond_to_gcc_cond,
5096 graphite_stmt_to_gcc_stmt): New.
5097 (gloog): Call these.
5098 * graphite.h (struct name_tree): New.
5099 (struct scop): Use name_tree instead of tree for params.
5100 Store a vector of name_tree for new_ivs.
5101 (SCOP_NEWIVS): New.
5102 (scop_nb_params): Use name_tree instead of tree.
5103
51042008-04-05 Alexander Lamaison <awl03@doc.ic.ac.uk>
5105 Sebastian Pop <sebastian.pop@amd.com>
5106
5107 * tree-bounds.c: New.
5108 * tree-bounds.h: New.
5109 * tree-pass.h: Declare pass_bounds_early and pass_bounds_late.
5110 * passes.c: Schedule pass_bounds_early, pass_bounds_late.
5111 * builtins.c (expand_builtin_alloca): Add flag_bounds as for
5112 flag_mudflap.
5113 * gcc.c: Same.
5114 * toplev.c: Same.
5115 * c-cppbuiltin.c: Same.
5116 * c-pragma.c: Same.
5117 * common.opt: Same.
5118 * varasm.c: Same.
5119 * tree-outof-ssa.c: Same.
5120 * c-common.c: Same.
5121 * Makefile.in: Same.
5122
51232008-03-15 Antoniu Pop <antoniu.pop@gmail.com>
5124 Sebastian Pop <sebastian.pop@amd.com>
5125
5126 * tree-loop-distribution.c (remaining_stmts,
5127 upstream_mem_writes): Removed static variables.
5128 (copy_loop_before, create_bb_after_loop,
5129 mark_nodes_having_upstream_mem_writes, free_rdg_components,
5130 rdg_build_components, rdg_build_partitions,
5131 dump_rdg_partitions): Extern.
5132 (generate_loops_for_partition, generate_code_for_partition): Do not
5133 return a bool.
5134 (already_processed_vertex_p, predecessor_has_mem_write,
5135 mark_nodes_having_upstream_mem_writes, has_upstream_mem_writes,
5136 rdg_flag_all_uses, rdg_flag_uses, rdg_flag_vertex_and_dependent,
5137 rdg_flag_loop_exits, rdg_flag_similar_memory_accesses,
5138 build_rdg_partition_for_component, rdg_build_partitions, ldist_gen):
5139 Pass remaining_stmts and upstream_mem_writes as parameters.
5140 (rdg_component): Moved...
5141 (build_rdg_partition_for_component): Do not aggregate components when
5142 flag_streamize_loops is set.
5143 (gen_sequential_loops): New.
5144 (ldist_gen): Call gen_sequential_loops.
5145
5146 * tree-pass.h (pass_loop_streamization): Declared.
5147
5148 * omp-low.c (expand_omp_sections): Call add_bb_to_loop on created
5149 basic blocks when loops structures exist.
5150
5151 * builtin-types.def (BT_FN_VOID_PTR_PTR_INT): New.
5152
5153 * tree-ssa-loop-ivopts.c (expr_invariant_in_region_p): New.
5154
5155 * tree-parloops.c (take_address_of, eliminate_local_variables_1,
5156 eliminate_local_variables_stmt, eliminate_local_variables,
5157 separate_decls_in_loop_name, separate_decls_in_loop_stmt,
5158 separate_decls_in_loop, gen_parallel_loop): Make them work on a region
5159 of code delimited by two edges in the CFG.
5160 (separate_decls_in_loop_name): Renamed separate_decls_in_region_name.
5161 (separate_decls_in_loop_stmt): Renamed separate_decls_in_region_stmt.
5162 (separate_decls_in_loop): Renamed separate_decls_in_region. Isolate
5163 the case of parallelisation of reductions.
5164 (create_loop_fn): Extern.
5165 (create_omp_parallel_region): New.
5166
5167 * tree-data-ref.c (dump_data_dependence_relation): Don't call
5168 dump_data_reference for printing dra and drb.
5169 (create_rdg_edge_for_ddr, create_rdg_edges_for_scalar): Initialise
5170 RDGE_RELATION.
5171 (build_rdg): Don't call free_dependence_relations for the moment, as
5172 we attach dependence relations on each edge of the RDG.
5173 To be fixed later.
5174
5175 * tree-data-ref.h (rdg_component): ...here.
5176 (struct rdg_edge): New field ddr_p relation.
5177 (RDGE_RELATION): New.
5178 (create_bb_after_loop, copy_loop_before,
5179 mark_nodes_having_upstream_mem_writes, rdg_build_components,
5180 rdg_build_partitions, dump_rdg_partitions,
5181 free_rdg_components): Declared.
5182
5183 * omp-builtins.def (BUILT_IN_GOMP_STREAM_ALIGN_PUSH,
5184 BUILT_IN_GOMP_STREAM_ALIGN_POP): New.
5185
5186 * tree-loop-streamization.c: New.
5187
5188 * tree-flow.h (gather_blocks_in_sese_region, create_loop_fn,
5189 create_omp_parallel_region, expr_invariant_in_region_p): Declared.
5190
5191 * Makefile.in (tree-loop-streamization.o): Added to OBJS-common.
5192
5193 * tree-cfg.c (gather_blocks_in_sese_region): Extern.
5194
5195 * passes.c: Schedule pass_loop_streamization.
5196
51972008-03-08 Tobias Grosser <grosser@fmi.uni-passau.de>
5198
5199 * graphite.c (dot_all_scops_1): Fix formatting for difficult bbs and
5200 update comment.
5201
52022008-03-07 Tobias Grosser <grosser@fim.uni-passau.de>
5203
5204 * graphite.c (dot_all_scops): Update formatting.
5205 Bbs can now be part of more than one SCoP.
5206
52072008-03-04 Sebastian Pop <sebastian.pop@amd.com>
5208
5209 * graphite.c (new_loop_to_cloog_loop_str, setup_cloog_loop): Fix
5210 malloc problems.
5211 (loop_domain_dim): Check for unregistered toplev SCOP loop.
5212 * graphite.h (loop_to_cloog_loop): New.
5213
52142008-03-04 Konrad Trifunovic <konrad.trifunovic@inria.fr>
5215
5216 * graphite.c (loop_domain_dim, ref_nb_loops,
5217 loop_iteration_vector_dim): New.
5218 (build_access_matrix_with_af, build_access_matrix,
5219 initialize_dependence_polyhedron): Fixed for new matrix layout.
5220 No longer assume that all iteration domains are of the same
5221 dimensionality.
5222
52232008-03-02 Sebastian Pop <sebastian.pop@amd.com>
5224
5225 * tree-scalar-evolution.c (instantiate_parameters_1): An SSA_NAME
5226 defined in a loop at depth 0 is invariant.
5227 * tree-chrec.c (evolution_function_is_invariant_rec_p): Ditto.
5228 * tree-ssa-loop-ivopts.c (expr_invariant_in_loop_p): Should never
5229 be called at loop depth 0.
5230
5231 * graphite.c (basic_block_simple_for_scop_p): Take the scop as
5232 a parameter.
5233 (dot_all_scops_1): Update use of basic_block_simple_for_scop_p.
5234 (down_open_scop): Removed.
5235 (loop_in_scop_p): Redefined.
5236 (scop_affine_expr): New argument: scop.
5237 (stmt_simple_for_scop_p): New argument: scop. RETURN_EXPR is not
5238 a harmful statement ending a scop.
5239 (basic_block_simple_for_scop_p): New argument: scop.
5240 (get_loop_start): Removed.
5241 (new_scop): Initialize SCOP_LOOPS.
5242 (free_scop): Free SCOP_LOOPS.
5243 (succs_at_same_depth, preds_at_same_depth): New.
5244 (end_scop): Test the validity of a scop.
5245 (add_dominators_to_open_scops): New.
5246 (test_for_scop_bound): Call add_dominators_to_open_scops.
5247 Add cases for opening and closing multiple scops.
5248 (build_scops, build_scop_bbs): Iterate over basic blocks in
5249 depth first order.
5250 (build_graphite_bb): Pass scop directly.
5251 (dfs_bb_in_scop_p): New.
5252 (scop_record_loop): Use SCOP_LOOPS for not recording the same loop
5253 several times.
5254 (nb_loops_around_gb): Use loop_in_scop_p.
5255 (schedule_to_scattering): Disabled for the moment the code computing
5256 the "textual order for outer loop".
5257
5258 * graphite.h (struct scop): New field loops.
5259 (SCOP_LOOPS): New.
5260 (scop_loop_index): Test that the given loop belongs to SCOP_LOOPS.
5261
5262 * testsuite/gcc.dg/graphite/scop-{1,...,7}.c: Updated.
5263
52642008-02-27 Antoniu Pop <antoniu.pop@gmail.com>
5265 Sebastian Pop <sebastian.pop@amd.com>
5266
5267 * builtin-types.def (BT_FN_PTR_SIZE_UINT, BT_FN_BOOL_PTR): New.
5268 * common.opt (fstreamize-loops): New.
5269 * omp-builtins.def (BUILT_IN_GOMP_STREAM_CREATE,
5270 BUILT_IN_GOMP_STREAM_PUSH, BUILT_IN_GOMP_STREAM_HEAD,
5271 BUILT_IN_GOMP_STREAM_POP, BUILT_IN_GOMP_STREAM_EOS_P,
5272 BUILT_IN_GOMP_STREAM_SET_EOS, BUILT_IN_GOMP_STREAM_DESTROY): New.
5273
52742008-02-22 Konrad Trifunovic <konrad.trifunovic@inria.fr>
5275
5276 * tree-data-ref.c (build_empty_rdg): New.
5277 (build_rdg): Use it.
5278 * tree-data-ref.h (build_empty_rdg): Declared.
5279 * graphite.c (free_scop): Free SCOP_LOOP2CLOOG_LOOP.
5280 (find_vertex_for_stmt): Removed.
5281 (build_rdg_all_levels): Use build_empty_rdg and rdg_vertex_for_stmt.
5282
52832008-02-21 Sebastian Pop <sebastian.pop@amd.com>
5284
5285 * tree-loop-distribution.c (generate_builtin): After cancelling the
5286 loop tree, also delete basic blocks.
5287 (rdg_flag_uses): Stop recursion when a vertex has already been
5288 processed.
5289
52902008-02-15 Konrad Trifunovic <konrad.trifunovic@inria.fr>
5291
5292 * graphite.c (build_scop_alpha): Removed.
5293 (graphite_transform_loops): Add a dummy call to build_all_rdg_levels
5294 and dump_dependence_graph to avoid compiler warnings.
5295
52962008-02-14 Konrad Trifunovic <konrad.trifunovic@inria.fr>
5297
5298 * tree-data-ref.c (dr_may_alias_p, create_rdg_vertices): Extern.
5299 * tree-data-ref.h (dr_may_alias_p, create_rdg_vertices): Declared.
5300 * graphite.c (new_loop_to_cloog_loop_str, hash_loop_to_cloog_loop,
5301 eq_loop_to_cloog_loop, del_loop_to_cloog_loop): New.
5302 (new_scop, setup_cloog_loop): Initialize SCOP_LOOP2CLOOG_LOOP.
5303 (initialize_dependence_polyhedron, find_vertex_for_stmt,
5304 initialize_data_dependence_polyhedron, is_empty_polyhedron,
5305 statement_precedes_p, build_rdg_all_levels, build_scop_alpha,
5306 dump_dependence_graph): New.
5307 * graphite.h (struct graphite_bb): New field compressed_alpha_matrix.
5308 (GBB_ALPHA): New.
5309 (struct scop): New field loop2cloog_loop.
5310 (SCOP_LOOP2CLOOG_LOOP, struct data_dependence_polyhedron,
5311 RDGE_DDP, ddp_p, struct loop_to_cloog_loop_str): New.
5312
53132008-02-10 Konrad Trifunovic <konrad.trifunovic@inria.fr>
5314
5315 * graphite.c (build_graphite_bb): Fix initialization
5316 of the graphite basic block.
5317
53182008-02-05 Sebastian Pop <sebastian.pop@amd.com>
5319
5320 * graphite.c (scan_tree_for_params): Rewrite for the new layout of
5321 loop domain matrix. Pass in the number of loops contained in the
5322 constraint matrix.
5323 (nb_loops_around_gb): Moved before setup_cloog_loop that uses it.
5324 (setup_cloog_loop): Rewrite for the new layout of loop domain matrix:
5325 loops that are not surrounding the current loop are not represented
5326 in the domain constraint matrix.
5327 (build_scop_iteration_domain): Initial domain constraint matrix
5328 contains only the eq/ineq, cst, and scop parameters columns.
5329
53302008-01-29 Tobias Grosser <grosser@fim.uni-passau.de>
5331
5332 * graphite.c (schedule_to_scattering, nb_loops_around_gb): New.
5333 (print_graphite_bb): Print scattering.
5334
53352008-01-29 Tobias Grosser <grosser@fim.uni-passau.de>
5336
5337 * graphite.c (initialize_cloog_names): Initialize names of
5338 scattering variables.
5339
53402009-01-29 Tobias Grosser <grosser@fim.uni-passau.de>
5341
5342 * graphite.c (dot_all_scops_1): Disable debug output while
5343 printing graph.
5344
53452008-01-29 Tobias Grosser <grosser@fim.uni-passau.de>
5346
5347 * graphite.c (find_transform): Change cloog output language to C.
5348
53492008-01-27 Sebastian Pop <sebastian.pop@amd.com>
5350
5351 * tree-loop-distribution.c (generate_memset_zero,
5352 generate_builtin, generate_code_for_partition,
5353 rdg_flag_all_uses): New.
5354 (rdg_flag_uses): Gather in the same partition the statements defining
5355 the VUSES of the current statement.
5356 (rdg_flag_similar_stores): Renamed rdg_flag_similar_memory_accesses.
5357 Gather in the same partition not only the stores to the same memory
5358 access, but also the reads.
5359 (ldist_generate_loops): Renamed ldist_gen.
5360
53612008-01-24 Sebastian Pop <sebastian.pop@amd.com>
5362 Tobias Grosser <grosser@fmi.uni-passau.de>
5363
5364 * graphite.c (setup_cloog_loop): Chain all cloog loops with the
5365 next pointer, don't use the inner pointer.
5366
53672008-01-20 Tobias Grosser <grosser@fmi.uni-passau.de>
5368
5369 * graphite.c (dot_all_scops, dot_all_scops_1): New.
5370 (find_transform): Call dot_all_1.
5371 * graphite.h (dot_all_scops): Declared.
5372
53732007-12-14 Sebastian Pop <sebastian.pop@amd.com>
5374
5375 * tree-loop-distribution.c: Fix apsi.f ICE.
5376 (create_bb_after_loop): New.
5377 (generate_loops_for_partition): Use it.
5378 * testsuite/gfortran.dg/ldist-1.f90: New.
5379
5380 * tree-data-ref.c (dot_rdg): Use /tmp/rdg.dot for dotty format.
5381 * graphite.c (dot_scop): Use /tmp/scop.dot for dotty format.
5382
53832007-12-13 Tobias Grosser <grosser@fmi.uni-passau.de>
5384
5385 * graphite.c (find_transform): Dump cloog program sent to cloog.
5386
53872007-12-13 Tobias Grosser <grosser@fmi.uni-passau.de>
5388
5389 * graphite.c (initialize_cloog_names): Initialize cloog
5390 iterator names.
5391
53922007-12-13 Tobias Grosser <grosser@fmi.uni-passau.de>
5393
5394 * graphite.c (build_scop_context): Fix typo, for the matrix
5395 format: insert '0 >= 0' instead of '-1 >= 0'.
5396
53972007-12-13 Sebastian Pop <sebastian.pop@amd.com>
5398
5399 * Fix merge problems.
5400
54012007-12-13 Sebastian Pop <sebastian.pop@amd.com>
5402
5403 * graphite.c (setup_cloog_loop): Fix typo.
5404
54052007-12-12 Sebastian Pop <sebastian.pop@amd.com>
5406
5407 * doc/invoke.texi (-ftree-loop-distribution): Documented.
5408 * tree-loop-distribution.c: Reimplemented.
5409 * tree-pass.h (pass_loop_distribution): New.
5410 * tree-scalar-evolution.c (number_of_iterations_for_all_loops): Use
5411 print_loops.
5412 * graphds.h (struct graph): New field indexes.
5413 * timevar.def (TV_TREE_LOOP_DISTRIBUTION): New.
5414
5415 * tree-vect-analyze.c: Remove declaration of static functions when not
5416 needed.
5417 * tree-vectorizer.c: Same.
5418 (rename_variables_in_loop): Now extern.
5419 (slpeel_tree_duplicate_loop_to_edge_cfg): Renamed
5420 tree_duplicate_loop_to_edge_cfg. Reset PENDING_STMT for edges after
5421 calling redirect_edge_and_branch_force.
5422
5423 * tree-vectorizer.h (tree_duplicate_loop_on_edge): Declared.
5424
5425 * tree-data-ref.c: Don't include tree-chrec.h.
5426 (debug_data_dependence_relations): New.
5427 (dump_data_dependence_relation): Call dump_data_reference on data refs
5428 in the relation.
5429 (same_access_functions): Moved...
5430 (find_vertex_for_stmt): Renamed rdg_vertex_for_stmt.
5431 (dump_rdg_vertex, debug_rdg_vertex, dump_rdg_component,
5432 debug_rdg_component, dump_rdg, debug_rdg, dot_rdg_1, dot_rdg,
5433 struct rdg_vertex_info, ): New.
5434 (create_rdg_edge_for_ddr): Compute the dependence level before looking
5435 at DDR_REVERSED_P.
5436 (create_rdg_vertices): Initialize the htab of graph->indexes.
5437 Initialize RDG_MEM_WRITE_STMT and RDG_MEM_READS_STMT.
5438 (stmts_from_loop): Don't save LABEL_EXPR.
5439 (hash_stmt_vertex_info, eq_stmt_vertex_info,
5440 hash_stmt_vertex_del): New.
5441 (build_rdg): Initialize rdg->indexes.
5442 (free_rdg, stores_from_loop, ref_base_address,
5443 rdg_defs_used_in_other_loops_p, have_similar_memory_accesses,
5444 have_similar_memory_accesses_1, ref_base_address_1,
5445 remove_similar_memory_refs): New.
5446
5447 * tree-data-ref.h: Include tree-chrec.h.
5448 (debug_data_dependence_relations): Declared.
5449 (same_access_functions): ...here. Now static inline.
5450 (ddr_is_anti_dependent, ddrs_have_anti_deps,
5451 ddr_dependence_level): New.
5452 (struct rdg_vertex): New fields has_mem_write, has_mem_reads.
5453 (RDGV_HAS_MEM_WRITE, RDGV_HAS_MEM_READS, RDG_STMT, RDG_MEM_WRITE_STMT,
5454 RDG_MEM_READS_STMT): New.
5455 (dump_rdg_vertex, debug_rdg_vertex, dump_rdg_component,
5456 debug_rdg_component, dump_rdg, debug_rdg, dot_rdg,
5457 rdg_vertex_for_stmt): Declared.
5458 (struct rdg_edge): New field level.
5459 (RDGE_LEVEL, free_rdg): New.
5460 (stores_from_loop, remove_similar_memory_refs,
5461 rdg_defs_used_in_other_loops_p,
5462 have_similar_memory_accesses): Declared.
5463 (rdg_has_similar_memory_accesses): New.
5464
5465 * lambda.h (dependence_level): New.
5466 * common.opt (ftree-loop-distribution): New.
5467 * tree-flow.h (debug_loop_ir): Renamed debug_loops.
5468 (print_loop_ir): Renamed print_loops.
5469 (debug_loop, debug_loop_num, print_loops_bb, mark_virtual_ops_in_bb,
5470 tree_duplicate_loop_to_edge_cfg, rename_variables_in_loop): Declared.
5471 * Makefile.in (TREE_DATA_REF_H): Depends on tree-chrec.h.
5472 (tree-loop-distribution.o): Added.
5473 * tree-cfg.c (mark_virtual_ops_in_region): Use mark_virtual_ops_in_bb.
5474 (mark_virtual_ops_in_bb): New.
5475 (print_loops_bb, debug_loop_num, debug_loop): New.
5476 * passes.c: Scheduled pass_loop_distribution.
5477
54782007-12-12 Konrad Trifunovic <konrad.trifunovic@inria.fr>
5479
5480 * graphite.c (scan_tree_for_params): Correct the number of columns
5481 for polylib format.
5482 (nb_flat_iterator): New.
5483 (setup_cloog_loop): Initialize to 1 the first column for inequalities.
5484 (build_scop_iteration_domain): Correct the number of columns for
5485 polylib format.
5486
54872007-12-12 Sebastian Pop <sebastian.pop@amd.com>
5488
5489 * Merge from mainline (129697:130800).
5490
54912007-10-30 Sebastian Pop <sebastian.pop@amd.com>
5492
5493 * graphite.c (build_graphite_bb): SCoP's basic blocks are post
5494 dominated by SCoP's exit.
5495 (graphite_transform_loops): Compute post dominators.
5496
54972007-10-28 Sebastian Pop <sebastian.pop@amd.com>
5498
5499 * Merge from mainline (127169:129697).
5500
55012007-10-28 Sebastian Pop <sebastian.pop@amd.com>
5502
5503 * graphite.c (affine_expr): Renamed scop_affine_expr. Use an extra
5504 parameter for the basic block that contains the expression. Use
5505 outermost_loop_in_scop for evolution_function_is_affine_multivariate_p.
5506 (stmt_simple_for_scop_p): Pass to scop_affine_expr the basic block of
5507 the expression.
5508 * graphite.h (gbb_loop): New.
5509 (GBB_LOOP): Removed.
5510
55112007-08-03 Sebastian Pop <sebpop@gmail.com>
5512
5513 * Makefile.in: Fix merge problem.
5514
55152007-08-03 Sebastian Pop <sebpop@gmail.com>
5516
5517 * Merge from mainline (125309:127169).
5518 * tree-loop-distribution.c: Disabled.
5519
55202007-06-05 Sebastian Pop <sebpop@gmail.com>
5521
5522 * Merge from mainline (r123693:125309).
5523
55242007-05-30 Sebastian Pop <sebpop@gmail.com>
5525
5526 * tree-loop-distribution.c (correct_modify_expr_p): Renamed
5527 correct_modify_p
5528 (correct_modify_p, check_statements, number_of_lvalue_uses,
5529 number_of_scalar_dependences, create_edges): Use GIMPLE_MODIFY_STMT
5530 instead of MODIFY_EXPR.
5531 (update_edge_with_ddv): Don't pass index_of_edge. Initialize
5532 and push new edges.
5533
55342007-05-24 Sebastian Pop <sebpop@gmail.com>
5535
5536 * tree-loop-distribution.c (struct rdg): Replace arrays by
5537 VECs for edges and vertices.
5538 (RDG_NBV, RDG_NBE, RDG_VERTEX, RDG_EDGE): Removed.
5539 (RDGV_NB_PARTITIONS): New.
5540 (PRDG_NBV, PRDG_NBE): Removed.
5541 (build_scc_graph, correct_partitions_p, mark_partitions, build_prdg,
5542 dump_rdg, find_vertex_with_stmt, create_vertices, free_rdg,
5543 number_of_scalar_dependences, create_edges, build_rdg): Use VECs.
5544
55452007-05-17 Georges-Andre Silber <silber@cri.ensmp.fr>
5546 Sebastian Pop <sebpop@gmail.com>
5547
5548 * doc/invoke.texi (-ftree-loop-distribution): Document.
5549 * tree-loop-distribution.c: New file.
5550 * tree-pass.h (pass_loop_distribution): Declared.
5551 * timevar.def (TV_TREE_LOOP_DISTRIBUTION): New.
5552 * tree-data-ref.c (initialize_data_dependence_relation): Initialize
5553 and set reversed_p.
5554 * tree-data-ref.h (data_dependence_relation): Add reversed_p.
5555 (DDR_REVERSED_P): New.
5556 * common.opt (-ftree-loop-distribution): New.
5557 * tree-flow.h (distribute_loops): Declared.
5558 * Makefile.in (OBJS-common): Depend on tree-loop-distribution.o.
5559 * passes.c (init_optimization_passes): Schedule loop distribution.
5560
55612007-05-12 Sebastian Pop <sebastian.pop@inria.fr>
5562
5563 * graphite.c (print_graphite_bb): Don't call dump_data_references.
5564 (print_scop): Don't print when scop is NULL.
5565 (build_scop_context, find_transform): Don't output to stderr.
5566
55672007-05-09 Sebastian Pop <sebastian.pop@inria.fr>
5568
5569 * tree-data-ref.c: Don't include graphite.h.
5570 Comment out the code for printing data reference's scop.
5571 (build_access_matrix_with_af): Moved...
5572 * tree-data-ref.h (build_access_matrix_with_af): Removed declaration.
5573 * graphite.c (build_access_matrix_with_af): ... here. Now static.
5574 (print_graphite_bb): Print basic block's schedule.
5575 (print_scop): Don't print the schedule, call cloog's pretty printer.
5576 (bb_in_scop_p): A basic block is in a scop only if it is both
5577 dominated and postdominated by the scop's entry and exit basic blocks.
5578 (function_parameter_p): New.
5579 (invariant_in_scop_p): Use function_parameter_p.
5580 (new_scop, save_scop): New.
5581 (end_scop, test_for_scop_bound, build_scops): Use new_scop, and
5582 save_scop.
5583 (scan_tree_for_params): Directly build the constraint as CloogMatrix.
5584 (loop_in_scop_p): New.
5585 (scop_record_loop): Use loop_in_scop_p.
5586 (build_scop_domain): Renamed build_scop_iteration_domain.
5587 (setup_cloog_loop, initialize_cloog_names, find_scop_parameters,
5588 nb_params_in_scop, build_scop_context, first_loop_in_scop,
5589 setup_cloog_loop, dot_scop_1, dot_scop): New.
5590 * graphite.h (GBB_LOOP, SCOP_PROG, dot_scop): New.
5591 (struct scop): Add a pointer to cloog's representation of a program.
5592
55932007-04-14 Sebastian Pop <sebastian.pop@inria.fr>
5594
5595 * doc/invoke.texi (-ftree-check-verbose): Renamed
5596 -ftree-checks-verbose.
5597 * common.opt (flag_tree_check_verbose): Renamed
5598 flag_tree_checks_verbose.
5599 * tree-check.c (tree_check_warning): Use flag_tree_checks_verbose.
5600
56012007-04-14 Sebastian Pop <sebastian.pop@inria.fr>
5602
5603 * configure: Regenerated.
5604 * config.in: Regenerated.
5605 * tree-ssa-loop.c (graphite_transforms): Execute
5606 graphite_transform_loops only when HAVE_cloog.
5607 * configure.ac (HAVE_polylib, HAVE_cloog, GRAPHITE): Defined.
5608 * graphite.c: Include polylibgmp.h and cloog.h.
5609 (graphite_transform_loops): Removed loops parameter.
5610 * tree-flow.h (graphite_transform_loops): Update declaration.
5611 * Makefile.in (POLYLIBLIBS, POLYLIBINC, CLOOGLIBS, CLOOGINC): New.
5612 (LIBS): Depend on CLOOGLIBS and on POLYLIBLIBS.
5613 (INCLUDES): Depend on POLYLIBINC and on CLOOGINC.
5614 (OBJS-common): Remove dependence on graphite.o.
5615 (BACKEND): Depend on @GRAPHITE@.
5616
56172007-04-13 Sebastian Pop <sebastian.pop@inria.fr>
5618
5619 * doc/invoke.texi (-ftree-check-verbose): Documented.
5620 * testsuite/gcc.dg/tree-checker/tree-checks-1.c: New.
5621 * testsuite/gcc.dg/tree-checker/tree-checks-2.c: New.
5622 * testsuite/gcc.dg/tree-checker/tree-checks-3.c: New.
5623 * testsuite/gcc.dg/tree-checker/tree-checks-4.c: New.
5624 * testsuite/gcc.dg/tree-checker/tree-checks.exp: New.
5625 * testsuite/gcc.dg/tree-checker/condates.crp: New.
5626 * common.opt (ftree-checks-verbose): New.
5627 * tree-check.c (tree_check_warning): Move extra stderr output
5628 under control of flag_tree_check_verbose.
5629
56302007-04-12 Sebastian Pop <sebastian.pop@inria.fr>
5631
5632 * tree-match.c: Fix comments formatting.
5633 * tree-match.h: Fix comments formatting.
5634 * tree-check.c: Fix comments formatting.
5635 (tree_check_init): Restructure.
5636
56372007-04-12 Nic Volanschi <nic.volanschi@free.fr>
5638
5639 * doc/invoke.texi (-ftree-check, -ftree-checks): Documented.
5640
56412007-04-10 Sebastian Pop <sebastian.pop@inria.fr>
5642
5643 * Merge from mainline (r120733:123693).
5644
56452007-03-20 Nic Volanschi <nic.volanschi@free.fr>
5646
5647 * condate.y: New file.
5648 * tree-match.h (struct patt_info_s): New field sign.
5649 (struct condate_s): New field msg.
5650 (normalize_condate, name_condate, add_condate): New.
5651 (conds[], condate_parse): Made extern.
5652 * tree-check.c (tree_check_warning): First arg changed to cond;
5653 warning reformatted.
5654 (tree_check_init): Reset the TREE_VISITED bit on every CFG node.
5655 (tree_scan): New.
5656 (tree_check): Process trivial condates.
5657 (read_delimited_string): Removed.
5658 (print_cond): Print name and msg.
5659 (conds[]): Made extern.
5660 (parse_tree_check_file_once): Rewritten to use the parser in
5661 condate.y.
5662 Processing of option --tree_check_string moved to tree_scan().
5663 * Makefile.in: Added condate.y
5664
56652007-03-12 Sebastian Pop <sebastian.pop@inria.fr>
5666
5667 * tree-pretty-print.c (dump_generic_bb_buff, lazy_dump_generic_node):
5668 Use VECs instead of varrays.
5669 * diagnostic.h (lazy_dump_generic_node): Update declaration.
5670 * Makefile.in (pretty-print.o): Depend on vec.h.
5671 * pretty-print.c: Include tree.h and vec.h.
5672 (pp_clear_state, pp_write_list_to_stream, pp_base_format,
5673 pp_base_format, pp_construct, pp_base_string, pp_lazy_mode,
5674 new_tree_chunk, pp_add_tree, pp_add_string, pp_add_char, pp_write_list,
5675 pp_free_list): Use VECs instead of varrays.
5676 * pretty-print.h: Do not include varray.h.
5677 (struct tree_chunk_s): Declaration moved before its use.
5678 (output_buffer): Rename varray field to chunks.
5679 * tree-match.c (tree_equal, chunk_1st_char, chunks_lookahead,
5680 tree_1st_char, match_chunks_pattinfo, match_tree_pattinfo,
5681 save_global_holes): Use VECs instead of varrays.
5682 * tree-match.h: Declare VECs of cfg_node, and hole_p.
5683 * tree-check.c (scan_cfg_stmts, push_node,
5684 print_matching_stmt): Removed.
5685 (tree_check_instance, push_global_holes_if_new, tree_check,
5686 execute_tree_check): Use VECs instead of varrays.
5687 (gate_tree_check): Don't execute the CFG check when basic_block_info
5688 is not available.
5689
56902007-01-12 Sebastian Pop <sebastian.pop@inria.fr>
5691
5692 * Merge from mainline (r115016:120733).
5693
56942007-01-12 Sebastian Pop <sebastian.pop@inria.fr>
5695
5696 * Merge from mainline (r117632:117661).
5697
56982007-01-12 Sebastian Pop <sebastian.pop@inria.fr>
5699
5700 * tree-dump.c (dump_option_value_in): Add TDF_DEBUG.
5701 * tree-pass.h (TDF_DEBUG, debug_p): New.
5702 * tree-scalar-evolution.c (set_scalar_evolution, get_scalar_evolution,
5703 get_scalar_evolution, add_to_evolution, set_nb_iterations_in_loop,
5704 get_loop_exit_condition, analyze_evolution_in_loop,
5705 analyze_initial_condition, analyze_scalar_evolution,
5706 instantiate_parameters, number_of_latch_executions): Use debug_p.
5707 * tree-chrec.c (chrec_apply): Use debug_p.
5708 * tree-data-ref.c: Include graphite.h.
5709 (dump_data_reference): Print also the access matrix.
5710 (analyze_array, analyze_indirect_ref, init_data_ref,
5711 analyze_offset_expr, address_analysis, object_analysis,
5712 create_data_ref, finalize_ddr_dependent,
5713 non_affine_dependence_relation, analyze_ziv_subscript,
5714 analyze_siv_subscript_cst_affine,
5715 compute_overlap_steps_for_affine_1_2, analyze_subscript_affine_affine,
5716 can_use_analyze_subscript_affine_affine, analyze_siv_subscript,
5717 analyze_miv_subscript, analyze_overlapping_iterations,
5718 build_classic_dist_vector, subscript_dependence_tester,
5719 compute_affine_dependence, analyze_all_data_dependences): Use debug_p.
5720 (build_access_matrix_with_af): No longer static.
5721 * tree-data-ref.h (scop_p): ... declaration here.
5722 (data_reference.scop): New field.
5723 (DR_SCOP, DR_ACCESS_MATRIX): New.
5724 (build_access_matrix_with_af, dr_num_subscripts): Declared.
5725 * graphite.c (print_graphite_bb): Call dump_data_references.
5726 (print_scop): Use scop_nb_loops and scop_dim_domain.
5727 (test_for_scop_bound): Use debug_p.
5728 (scan_tree_for_params): Use scop_nb_loops, scop_nb_loops and
5729 scop_nb_params.
5730 (scop_loop_index): Moved...
5731 (scop_record_loop): New.
5732 (build_scop_loop_nests): Use scop_record_loop.
5733 (build_scop_domain): Use scop_dim_domain.
5734 (build_access_matrix): Implemented.
5735 (build_scop_canonical_schedules): Use scop_nb_loops.
5736 (build_graphite_bb): Initialize GBB_SCOP.
5737 * graphite.h (scop_p): Moved...
5738 (graphite_bb.scop): New field.
5739 (graphite_bb.iteration_domain, GBB_DOMAIN, scop.nb_params,
5740 scop.nb_loops, scop.dim_domain, SCOP_NB_LOOPS, SCOP_NB_PARAMS,
5741 SCOP_DIM_DOMAIN, SCOP_STMTS): Removed.
5742 (scop_nb_params, scop_nb_loops, scop_dim_domain, gbb_dim_domain,
5743 scop_loop_index): New.
5744 * Makefile.in (tree-data-ref.o): Depends on graphite.h.
5745
57462007-01-05 Sebastian Pop <sebastian.pop@inria.fr>
5747
5748 * Merge from mainline (r117661:120450).
5749
57502006-10-12 Sebastian Pop <sebastian.pop@inria.fr>
5751
5752 * tree-scalar-evolution.c (instantiate_parameters_1): Don't stop
5753 at the first declaration outside the varying loop, instantiate as
5754 far as possible.
5755 * tree-chrec.c (for_each_scev_op): New.
5756 * tree-chrec.h (for_each_scev_op): Declared.
5757 * tree-ssa-loop.c (pass_graphite_trans): Don't dump the function.
5758 * tree-data-ref.c (get_references_in_stmt,
5759 find_data_references_in_stmt): New, from trunk.
5760 (find_data_references_in_loop): Use get_references_in_stmt
5761 and find_data_references_in_loop, modified as in trunk.
5762 (build_access_matrix_with_af): New.
5763 * tree-data-ref.h (data_reference): Add a field access_matrix.
5764 (data_ref_loc): New, as in trunk.
5765 * graphite.c (print_graphite_bb, bb_in_scop_p, stmt_in_scop_p,
5766 invariant_in_scop_p, param_index, scan_tree_for_params,
5767 scop_loop_index, build_scop_loop_nests, build_scop_domain, irp_data,
5768 idx_record_param, idx_record_params, build_access_matrix,
5769 build_scop_data_accesses, build_scop_canonical_schedules,
5770 build_graphite_bb, build_scop_bbs, find_params_in_bb,
5771 build_scop_params): New.
5772 * graphite.h (graphite_bb): New.
5773 (scop): Add fields static_schedule, params, loop_nest,
5774 iteration_domain.
5775 * lambda.h: Declare vecs of lambda_matrix.
5776 * tree-flow.h (print_loop_ir_bb): Declared.
5777 * tree-cfg.c (print_loop_ir_bb): New.
5778 (print_loop): Use print_loop_ir_bb.
5779
57802006-10-12 Sebastian Pop <pop@cri.ensmp.fr>
5781
5782 * Merge from mainline (r115016:117632).
5783
57842006-10-11 Sebastian Pop <pop@cri.ensmp.fr>
5785
5786 * graphite.c (debug_scops): Adjust definition for avoiding a bootstrap
5787 break due to a warning.
5788
57892006-10-10 Sebastian Pop <pop@cri.ensmp.fr>
5790
5791 * graphite.c (print_scops, debug_scops): New.
5792 (graphite_transform): Renamed graphite_find_transform.
5793 * graphite.h (debug_scops): Declared.
5794
57952006-08-17 Sebastian Pop <pop@cri.ensmp.fr>
5796
5797 * tree-match.c: Reformat following the GNU style.
5798 * tree-match.h: Reformat following the GNU style.
5799 * tree-pattern.h: Removed empty file.
5800 * Makefile.in: Remove references to tree-pattern.h.
5801 * tree-check.c: Reformat following the GNU style.
5802 (execute_tree_check): Move gate condition code to...
5803 (gate_tree_check): ...here. New function.
5804 (pass_check): Use the gate function.
5805
58062006-07-04 Nic Volanschi <nic.volanschi@free.fr>
5807
5808 * tree-pattern.h: New. Tree pattern matching and checking using
5809 concrete syntax.
5810 * tree-check.c: New. Tree/CFG checking pass.
5811 * tree-match.c: New. Library for tree pattern matching.
5812 * opts.c, common.opt: Add options --ftree-check & --ftree-checks.
5813 * toplev.c, flags.h: Add globals for tree-check pass.
5814 * Makefile.in: Integrate the files in tree-check pass.
5815 * timevar.def, tree-optimize.c, tree-pass.h: Register tree-check pass.
5816 * pretty-print.c, pretty-print.h, tree-pretty-print.c, diagnostic.h:
5817 Introduce a "lazy" pretty-print mode.
5818 * tree.c, tree.h: Add tree_name.
5819
58202006-07-04 Sebastian Pop <pop@cri.ensmp.fr>
5821
5822 * doc/invoke.texi (-fgraphite): Correct typo.
5823 * tree-scalar-evolution.c (number_of_iterations_for_all_loops): Update
5824 use of print_loop_ir.
5825 * testsuite/gcc.dg/graphite/scop-1.c: New.
5826 * testsuite/gcc.dg/graphite/scop-2.c: New.
5827 * testsuite/gcc.dg/graphite/graphite.exp: New.
5828 * graphite.c: Include domwalk.h.
5829 (print_scop): Print only the entry and exit blocks.
5830 (debug_scop): No longer static.
5831 (affine_expr): Fix formating. Return also true when the expression is
5832 constant.
5833 (stmt_simple_for_scop_p): Fix formating.
5834 (build_scops): Use domwalk.
5835 (get_loop_start, end_scop, test_for_scop_bound): New.
5836 (graphite_transform_loops): Avoid printing on stderr.
5837 * graphite.h (debug_scop): Declared.
5838 * tree-flow.h (debug_loop_ir, print_loop_ir): Update declarations.
5839 * Makefile.in (graphite.o): Depend on domwalk.h.
5840 * tree-cfg.c (print_loop, print_pred_bbs, print_succ_bbs): Remove
5841 declarations for static functions.
5842 (print_loop, print_loop_ir, debug_loop_ir): Use an extra parameter for
5843 controlling output verbosity.
5844
58452006-06-26 Sebastian Pop <pop@cri.ensmp.fr>
5846 Plesco Alexandru <shurikx@gmail.com>
5847
5848 * doc/invoke.texi (-fgraphite): Document.
5849 * tree-pass.h (pass_graphite_transforms): Declared.
5850 * timevar.def (TV_GRAPHITE_TRANSFORMS): New.
5851 * tree-ssa-loop.c (graphite_transforms, gate_graphite_transforms): New.
5852 (pass_graphite_transforms): Defined.
5853 * tree-data-ref.c (free_data_ref, data_reference): Extern.
5854 * tree-data-ref.h (free_data_ref, data_reference): Declared.
5855 * graphite.c, graphite.h: New.
5856 * common.opt (fgraphite): Declared.
5857 * tree-flow.h (graphite_transform_loops): Declared.
5858 * Makefile.in (OBJS-common): Add graphite.o.
5859 (graphite.o): New rule.
5860 * passes.c (pass_graphite_transforms): Scheduled.
5861