]> gcc.gnu.org Git - gcc.git/blame - gcc/ChangeLog.graphite
graphite-clast-to-gimple.c (build_cloog_prog): Use pbb_index.
[gcc.git] / gcc / ChangeLog.graphite
CommitLineData
d48e288d
SP
12009-10-05 Sebastian Pop <sebastian.pop@amd.com>
2
3 * graphite-clast-to-gimple.c (build_cloog_prog): Use pbb_index.
4 * graphite-interchange.c (pbb_do_interchange): Same.
5 * graphite-poly.c (print_scattering_function): Same.
6 (debug_pdrs): Same.
7 * graphite-poly.h (pbb_loop): New.
8 * graphite-sese-to-poly.c (create_linear_expr_from_tree): Use pbb_loop.
9
d17286f6
SP
102009-09-27 Sebastian Pop <sebastian.pop@amd.com>
11
12 * graphite-scop-detection.c (limit_scops): Do not build poly_bbs.
13
ee03cd20
SP
142009-09-27 Sebastian Pop <sebastian.pop@amd.com>
15
16 * graphite-sese-to-poly.c (partition_drs_to_sets): Drs is not modified,
17 so don't pass a pointer to it.
18 (build_alias_set_for_drs): Same.
19 (build_base_obj_set_for_drs): Same.
20 (build_scop_drs): Same.
21
888beba1
LF
222009-09-26 Li Feng <nemokingdom@gmail.com>
23
24 * graphite-sese-to-poly.c (build_scop_drs): Disable writing to file
25 the alias graph of data references.
26
cd43e5d7
LF
272009-09-25 Li Feng <nemokingdom@gmail.com>
28
29 * graphite-sese-to-poly.c (write_alias_graph_to_ascii_dimacs): New.
30 (build_scop_drs): When debugging, write the alias graph to file,
31 otherwise, should be disabled.
32
aeda6535
SP
332009-09-17 Sebastian Pop <sebastian.pop@amd.com>
34
35 * graphite-scop-detection.c (stmt_simple_memref_p): Removed.
36 (is_simple_operand): Remove call to stmt_simple_memref_p.
37 (stmt_simple_for_scop_p): Update call to is_simple_operand.
38
8b6b8570
DE
392009-09-17 David Edelsohn <edelsohn@gnu.org>
40
8971eb91 41 * testsuite/gcc.dg/graphite/interchange-mvt.c: New File.
8b6b8570
DE
42 * testsuite/gcc.dg/graphite/scop-dsyrk.c: New File.
43 * testsuite/gcc.dg/graphite/scop-dsyr2k.c: New File.
44 * testsuite/gcc.dg/graphite/scop-mvt.c: New File.
45 * testsuite/gcc.dg/graphite/scop-sor.c: New File.
46
1825f9a2
LF
472009-09-17 Li Feng <nemokingdom@gmail.com>
48
49 PR middle-end/41118
50 * graphite-dependences.c (poly_drs_may_alias_p): Adjust definition.
51 (pddr_original_scattering): Make sure 2 pdr2 in the same base object set.
52 (graphite_carried_dependence_level_k): Ditto.
53 * graphite-poly.c (new_poly_dr): Add init of PDR_BASE_OBJECT_SET.
54 * graphite-poly.h (struct poly_dr): Add member dr_base_object_set.
55 (new_poly_dr): Adjust declaration.
56 * graphite-sese-to-poly.c (free_data_refs_aux): New.
57 (free_gimple_bb): Added free_data_refs_aux.
58 (build_poly_dr): Add dr_base_object_set.
59 (partition_drs_to_sets): New.
60 (dr_same_base_object_p): New.
61 (build_alias_set_for_drs): New.
62 (build_base_object_set_for_drs): New.
63 (build_scop_drs): Add build_base_obj_set_for_drs.
64 * graphite-sese-to-poly.h: Added #define for alias set number index and
65 base object set index.
66 * libgomp/testsuite/libgomp.graphite/force-parallel-6.c: Refine tests.
67 * libgomp/testsuite/libgomp.graphite/pr4118.c: New.
68
ac90803f
SP
692009-09-16 Alexander Monakov <amonakov@ispras.ru>
70
71 * graphite-sese-to-poly.c (pdr_add_data_dimensions): Add bounds only
72 for ARRAY_REFs. Use array_ref_{low,up}_bound to determine bounds.
73
54fc808a
SP
742009-09-14 Sebastian Pop <sebastian.pop@amd.com>
75
76 * graphite-sese-to-poly.c (struct irp_data): Removed.
77 (idx_record_params): Removed.
78 (find_params_in_bb): Scan for parameters the access functions; don't
79 parse the tree representation.
80
e88e021f
SP
812009-09-14 Sebastian Pop <sebastian.pop@amd.com>
82
83 * tree-ssa-loop.c (gate_graphite_transforms): Disable Graphite
84 passes at -O1 and below.
85
3690f8d7
SP
862009-09-14 Sebastian Pop <sebastian.pop@amd.com>
87
88 * graphite-blocking.c: Fix order of includes: tree-chrec.h, then
89 tree-scalar-evolution.h, and then tree-data-ref.h.
90 * graphite-clast-to-gimple.c: Same.
91 * graphite-dependences.c: Same.
92 * graphite-interchange.c: Same.
93 * graphite-poly.c: Same.
94 * graphite-scop-detection.c: Same.
95 * graphite-sese-to-poly.c: Same.
96 * graphite.c: Same.
97 * lambda-code.c: Same.
98 * matrix-reorg.c: Same.
99 * tree-data-ref.c: Same.
100 * tree-if-conv.c: Same.
101 * tree-loop-distribu: Same.: Same.
102 * tree-loop-linear.c: Same.
103 * tree-parloops.c: Same.
104 * tree-predcom.c: Same.
105 * tree-vect-patterns.c: Same.
106
2495a183
SP
1072009-09-02 Sebastian Pop <sebastian.pop@amd.com>
108
109 Partially revert the previous patch, except the following.
110 * tree-scalar-evolution.c (instantiate_scev_not): Adapted to pass
111 as parameters the operands of the not expression.
112
20179b0d
SP
1132009-09-01 Sebastian Pop <sebastian.pop@amd.com>
114
115 * tree-scalar-evolution.c (instantiate_scev_assign): New.
116 Do not call analyze_scalar_evolution on assignments.
117 (instantiate_scev_phi): Call analyze_scalar_evolution.
118 (instantiate_scev_name): Call instantiate_scev_assign and
119 instantiate_scev_phi.
120 (instantiate_scev_not): Adapted to pass as parameters the operands
121 of the not expression.
122
ffa34f4b
SP
1232009-09-01 Sebastian Pop <sebastian.pop@amd.com>
124
125 * tree-scalar-evolution.c (instantiate_scev_binary): Adapted
126 to pass as parameters the operands of the binary expression.
127
4b9d48a1
SP
1282009-09-01 Sebastian Pop <sebastian.pop@amd.com>
129
130 * tree-scalar-evolution.c (instantiate_scev_bitnot): Renamed
131 instantiate_scev_not. Handle NEGATE_EXPR.
132 (instantiate_scev_r): Handle NEGATE_EXPR.
133
9e5dc77f
SP
1342009-09-01 Sebastian Pop <sebastian.pop@amd.com>
135
136 * tree-scalar-evolution.c (instantiate_scev_1): Renamed
137 instantiate_scev_r.
138 (instantiate_scev_r): Move code in instantiate_scev_2
139 and instantiate_scev_1.
140
d814176c
SP
1412009-09-01 Sebastian Pop <sebastian.pop@amd.com>
142
143 * tree-scalar-evolution.c (instantiate_scev_3): New.
144 (instantiate_scev_1): Move code in instantiate_scev_3.
145
ec6636eb
SP
1462009-09-01 Sebastian Pop <sebastian.pop@amd.com>
147
148 * tree-scalar-evolution.c (instantiate_scev_poly): New.
149 (instantiate_scev_1): Move code in instantiate_scev_poly.
150
7ec0665d
SP
1512009-09-01 Sebastian Pop <sebastian.pop@amd.com>
152
153 * tree-scalar-evolution.c (instantiate_scev_bitnot): New.
154 (instantiate_scev_1): Move code in instantiate_scev_bitnot.
155
9c382ce9
SP
1562009-09-01 Sebastian Pop <sebastian.pop@amd.com>
157
158 * tree-scalar-evolution.c (instantiate_scev_convert): New.
159 (instantiate_scev_1): Move code in instantiate_scev_convert.
160
15fda317
SP
1612009-09-01 Sebastian Pop <sebastian.pop@amd.com>
162
163 * tree-scalar-evolution.c (instantiate_scev_binary): New.
164 (instantiate_scev_1): Move code in instantiate_scev_binary.
165
320f5a78
SP
1662009-09-01 Sebastian Pop <sebastian.pop@amd.com>
167
168 * tree-scalar-evolution.c (instantiate_scev_name): New.
169 (instantiate_scev_1): Move code in instantiate_scev_name.
170
1712009-08-28 Sebastian Pop <sebastian.pop@amd.com>
172
173 * Merge from mainline (150992:151171).
174
211694b6
SP
1752009-08-25 Sebastian Pop <sebastian.pop@amd.com>
176
177 * graphite-dependences.c (graphite_legal_transform_bb): Call
178 pbb_remove_duplicate_pdrs.
179 * graphite-poly.c (can_collapse_pdr): Removed.
180 (pdr_find_duplicate): Removed.
181 (can_collapse_pdrs): New.
182 (pbb_remove_duplicate_pdrs): New.
183 (new_poly_dr): Do not look for duplicates.
184 * graphite-poly.h (struct poly_bb): New field pdr_duplicates_removed.
185 (PBB_PDR_DUPLICATES_REMOVED): New.
186 (pbb_remove_duplicate_pdrs): Declared.
187
7bd2a8a7
SP
1882009-08-25 Sebastian Pop <sebastian.pop@amd.com>
189
190 * graphite-interchange.c (pbb_interchange_profitable_p): Adjust
191 the strides by multiplying by PDR_NB_REFS.
192 * graphite-poly.c (can_collapse_pdr): New.
193 (pdr_find_duplicate): New.
194 (new_poly_dr): Call pdr_find_duplicate. Collapse duplicate PDRs.
195 Initialize PDR_NB_REFS.
196 * graphite-poly.h (struct poly_dr): Add field nb_refs.
197 (PDR_NB_REFS): New.
198 (new_poly_dr): Number of subscripts is a graphite_dim_t.
199
2002009-08-25 Sebastian Pop <sebastian.pop@amd.com>
201
202 Revert one of the previous commits:
203 * graphite-dependences.c (graphite_legal_transform_bb): Avoid
204 the computation of symmetric data dependence relations.
205 (dependency_between_pbbs_p): Same.
206
93b2db87
SP
2072009-08-25 Sebastian Pop <sebastian.pop@amd.com>
208
209 PR middle-end/40965
210 * graphite-poly.c (apply_poly_transforms): Remove legality test before
211 any transform.
212
d8eeb078
SP
2132009-08-25 Sebastian Pop <sebastian.pop@amd.com>
214
215 * graphite-dependences.c (pddr_original_scattering): Return NULL
216 for read-read dependence relations.
217 * graphite-poly.h (enum poly_dr_type): Fix comment.
218 (pdr_read_p): New.
219 (pdr_write_p): New.
220 (pdr_may_write_p): New.
221
e6dec0fb
SP
2222009-08-25 Sebastian Pop <sebastian.pop@amd.com>
223
224 * graphite-poly.h (enum POLY_DR_TYPE): Renamed poly_dr_type.
225 (struct poly_dr): Same.
226 (new_poly_dr): Same.
227 * graphite-poly.c (new_poly_dr): Same.
228
baf4b881
KT
2292009-08-25 Konrad Trifunovic <konrad.trifunovic@gmail.com>
230 Sebastian Pop <sebastian.pop@amd.com>
231
232 * graphite-blocking.c (pbb_strip_mine_loop_depth): Renamed
233 pbb_strip_mine_time_depth. Changed the implementation so that
234 transformation is expressed as a transformation on
235 time (scatttering) dimensions. Also, ensures that the 2d+1
236 scheduling format is preserved.
237 (pbb_strip_mine_profitable_p): Profitability is based on the
238 iteration number of a given time (scattering) dimension,
239 and not on a original loop depth dimension.
240 (pbb_strip_mine): Call pbb_number_of_iterations_at_time.
241 (pbb_do_strip_mine): Call psct_dynamic_dim.
242 * graphite-poly.c (pbb_number_of_iterations_at_time): New.
243 * graphite-poly.h (pbb_number_of_iterations_at_time): Declared.
244 (pbb_nb_dynamic_scattering_transform): New.
245 (psct_dynamic_dim): New.
246
059a5f9f
KT
2472009-08-25 Konrad Trifunovic <konrad.trifunovic@gmail.com>
248
249 * graphite-ppl.c (ppl_max_for_le): Renamed ppl_max_for_le_pointset.
250 * graphite-ppl.h (ppl_max_for_le): Renamed ppl_max_for_le_pointset.
251 * graphite-poly.c (pbb_number_of_iterations): Rename ppl_max_for_le.
252 * graphite-interchange.c (build_linearized_memory_access): Same.
253 (memory_stride_in_loop): Same.
254
afae0207
SP
2552009-08-25 Sebastian Pop <sebastian.pop@amd.com>
256
257 * graphite-dependences.c (pddr_original_scattering): New.
258 (graphite_legal_transform_dr): Call pddr_original_scattering.
259 (dot_deps_1): New.
260 (dot_deps): New.
261 * graphite-dependences.h (dot_deps): Declared.
262 * graphite-poly.c (new_poly_dr): Initialize PDR_ID.
263 (print_pdr): Print PDR_ID.
264 * graphite-poly.h (struct poly_dr): Add field id.
265 (PDR_ID): New.
266 (pbb_index): New.
267 * graphite-scop-detection.c (dot_all_scops_1): Cleanup comment.
268
f8e0bb8b
SP
2692009-08-22 Sebastian Pop <sebastian.pop@amd.com>
270
271 * graphite-dependences.c (graphite_carried_dependence_level_k): Do
272 not delete the original dependence relation.
273
2742009-08-21 Sebastian Pop <sebastian.pop@amd.com>
275
276 * graphite-dependences.c (graphite_legal_transform_bb): Avoid
277 the computation of symmetric data dependence relations.
278 (dependency_between_pbbs_p): Same.
279
e37f165f
SP
2802009-08-21 Sebastian Pop <sebastian.pop@amd.com>
281
282 * graphite-dependences.c (new_poly_dr_pair): Renamed new_poly_ddr.
283 (eq_poly_dr_pair_p): Renamed eq_poly_ddr_p.
284 (hash_poly_dr_pair_p): Renamed hash_poly_ddr_p.
285 (free_poly_ddr): New.
286 (pddr_is_empty): New.
287 (dependence_polyhedron_1): Now returns a poly_ddr_p.
288 (dependence_polyhedron): Same. Remove useless gcc_assert.
289 Remove fprintfs.
290 (graphite_legal_transform_dr): Call pddr_is_empty and free_poly_ddr.
291 (graphite_carried_dependence_level_k): Call pddr_is_empty.
292 * graphite-dependences.h (enum poly_dependence_kind): New.
293 (poly_dr_pair): Renamed poly_ddr. Added a field kind.
294 (PDRP_SOURCE): Renamed PDDR_SOURCE.
295 (PDRP_SINK): Renamed PDDR_SINK.
296 (PDRP_DDP): Renamed PDDR_DDP.
297 (PDDR_KIND): New.
298 (free_poly_ddr): Declared.
299 * graphite-poly.c (new_scop): Use the new hash function names.
300 * graphite-poly.h (struct scop): Renamed field original_pdr_pairs
301 into original_pddrs.
302 (SCOP_ORIGINAL_PDR_PAIRS): Renamed SCOP_ORIGINAL_PDDRS.
303
3042009-08-21 Sebastian Pop <sebastian.pop@amd.com>
305
306 * Merge from mainline (150764:150992).
307
45e76e9f
SP
3082009-08-18 Sebastian Pop <sebastian.pop@amd.com>
309
310 * cfgloopmanip.c (create_empty_loop_on_edge): Generate upper
311 bounds with LT_EXPR to make niter analysis more precise on code
312 generated by Graphite.
313
66b466c3
SP
3142009-08-18 Sebastian Pop <sebastian.pop@amd.com>
315
316 * graphite-dependences.c (graphite_legal_transform_dr): Fix formatting.
317 (graphite_legal_transform_bb): Same.
318 (poly_drs_may_alias_p): Same.
319
f263917c
SP
3202009-08-15 Sebastian Pop <sebastian.pop@amd.com>
321
322 PR middle-end/40981
323 * graphite-ppl.c (ppl_max_for_le): Correct the use of
324 ppl_Pointset_Powerset_C_Polyhedron_maximize.
325
3262009-08-13 Sebastian Pop <sebastian.pop@amd.com>
327
328 * graphite-poly.c (print_pbb): Print PBB index.
329
3302009-08-13 Sebastian Pop <sebastian.pop@amd.com>
331
332 * Merge from mainline (r150672:150764).
333
3342009-08-13 Sebastian Pop <sebastian.pop@amd.com>
335
336 * graphite-interchange.c (ppl_max_for_le): Moved...
337 * graphite-poly.c (pbb_number_of_iterations): Call ppl_max_for_le.
338 * graphite-ppl.c (ppl_max_for_le): ... here.
339 * graphite-ppl.h (ppl_max_for_le): Declared.
340
3412009-08-12 Sebastian Pop <sebastian.pop@amd.com>
342
343 * Merge from mainline (r150372:150672).
344
30de1632
SP
3452009-08-11 Sebastian Pop <sebastian.pop@amd.com>
346
347 PR middle-end/40980
348 * sese.c (convert_for_phi_arg): New.
349 (add_guard_exit_phis): Use convert_for_phi_arg.
350
351 * testsuite/gfortran.dg/graphite/id-17.f: New.
352
8c31ebfa
SP
3532009-08-11 Sebastian Pop <sebastian.pop@amd.com>
354
355 * graphite-sese-to-poly.c (pdr_add_data_dimensions): Dont add
356 unknown subscript upper bounds.
357
358 * testsuite/gcc.dg/graphite/interchange-6.c: Un-XFAIL.
359
fb9fb290
SP
3602009-08-11 Sebastian Pop <sebastian.pop@amd.com>
361 Pranav Garg <pranav.garg2107@gmail.com>
362
363 * graphite-interchange.c (gather_access_strides): Removed.
364 (ppl_max_for_le): New.
365 (build_linearized_memory_access): New.
366 (memory_stride_in_loop): New.
367 (pbb_interchange_profitable_p): Reimplemented.
368 * graphite-ppl.h (ppl_new_id_map): New.
369 (ppl_interchange): New.
370
371 * testsuite/gcc.dg/graphite/interchange-6.c: XFAILed.
372
312aea7f
SP
3732009-08-11 Sebastian Pop <sebastian.pop@amd.com>
374
375 * graphite-interchange.c (compute_subscript): Removed.
376 (compute_array_size_cstr): Removed.
377 (compute_array_size_poly): Removed.
378 (compute_array_size): Removed.
379 (gather_access_strides_poly): Removed.
380 (gather_access_strides): Empty.
381
25d7cc15
SP
3822009-08-11 Sebastian Pop <sebastian.pop@amd.com>
383
384 * graphite-dependences.c (dependence_polyhedron_1): Replace
385 pdr_nb_subscripts with PDR_NB_SUBSCRIPTS.
386 (graphite_legal_transform_dr): Same.
387 (graphite_carried_dependence_level_k): Same.
388 * graphite-poly.c (new_poly_dr): Add a parameter nb_subscripts.
389 Initialize PDR_NB_SUBSCRIPTS.
390 (print_pdr_access_layout): Replace pdr_nb_subscripts with
391 PDR_NB_SUBSCRIPTS.
392 * graphite-poly.h (struct poly_dr): Add nb_subscripts field.
393 (PDR_NB_SUBSCRIPTS): New.
394 (pdr_nb_subscripts): Removed.
395 (pdr_dim): Simplified.
396 * graphite-sese-to-poly.c (build_poly_dr): Replace pdr_nb_subscripts
397 with PDR_NB_SUBSCRIPTS.
398
66096911
SP
3992009-08-11 Sebastian Pop <sebastian.pop@amd.com>
400
401 * graphite-interchange.c (compute_array_size): Remove use of
402 PDR_DATA_CONTAINER.
403 * graphite-poly.c (new_poly_dr): Remove argument data_container.
404 Do not initialize PDR_DATA_CONTAINER.
405 (print_pdr): Do not print PDR_DATA_CONTAINER.
406 * graphite-poly.h (struct poly_dr): Remove data_container field.
407 (PDR_DATA_CONTAINER): Removed.
408 * graphite-sese-to-poly.c (pdr_add_data_dimensions): Remove use of
409 PDR_DATA_CONTAINER.
410 (build_poly_dr): Same.
411
273c5dd3
SP
4122009-08-11 Sebastian Pop <sebastian.pop@amd.com>
413
414 * testsuite/gcc.dg/graphite/interchange-9.c: New.
415
7491e5f0
KT
4162009-08-05 Konrad Trifunovic <konrad.trifunovic@gmail.com>
417 Sebastian Pop <sebastian.pop@amd.com>
418
419 * graphite-dependences.c (graphite_legal_transform_dr): Work on a
420 copy of the dependence polyhedron. Free the temporary objects.
421 (graphite_carried_dependence_level_k): Free unused objects before
422 returning.
423
424 * testsuite/gcc.dg/graphite/interchange-1.c: XFAILed.
425 * testsuite/gcc.dg/graphite/interchange-2.c: XFAILed.
426 * testsuite/gcc.dg/graphite/interchange-3.c: XFAILed.
427 * testsuite/gcc.dg/graphite/interchange-4.c: XFAILed.
428 * testsuite/gcc.dg/graphite/interchange-7.c: XFAILed.
429
f4648ed1
SP
4302009-08-05 Sebastian Pop <sebastian.pop@amd.com>
431
432 * graphite-blocking.c (scop_do_strip_mine): Call store_scattering.
433 Early return without analyzing the data dependences if no
434 transform has been done. Call restore_scattering if the transform
435 is not legal.
436 (graphite-interchange.c): Same.
437 * graphite-poly.c (print_scattering_function): Test for PBB_TRANSFORMED.
438 (graphite_read_transforms): Initialize PBB_TRANSFORMED.
439 (apply_poly_transforms): Do not gcc_assert that
440 the transform is legal.
441 (new_poly_bb): Initialize PBB_TRANSFORMED, PBB_SAVED, and PBB_ORIGINAL.
442 Do not initialize PBB_NB_SCATTERING_TRANSFORM, PBB_NB_LOCAL_VARIABLES,
443 PBB_TRANSFORMED_SCATTERING, and PBB_ORIGINAL_SCATTERING.
444 (free_poly_dr): Free PBB_TRANSFORMED, PBB_SAVED, and PBB_ORIGINAL.
445 * graphite-poly.h (struct poly_scattering): New.
446 (struct poly_bb): Add original, transformed, and saved fields.
447 Remove transformed_scattering, original_scattering, nb_local_variables,
448 and nb_scattering_transform fields.
449 (PBB_ORIGINAL, PBB_TRANSFORMED, PBB_SAVED): New.
450 (poly_scattering_new): New.
451 (poly_scattering_free): New.
452 (poly_scattering_copy): New.
453 (store_scattering_pbb): New.
454 (store_scattering): New.
455 (restore_scattering_pbb): New.
456 (restore_scattering): New.
457 * graphite-sese-to-poly.c (build_pbb_scattering_polyhedrons):
458 Initialize PBB_TRANSFORMED and PBB_ORIGINAL.
273c5dd3 459
e31a5bd4
SP
4602009-08-05 Sebastian Pop <sebastian.pop@amd.com>
461
462 * graphite-poly.c (print_pbb): Add parentheses in the pretty print.
463 (print_scop): Same.
464
8e88f9fd
SP
4652009-08-05 Sebastian Pop <sebastian.pop@amd.com>
466
467 * Makefile.in (graphite.o): Depends on PREDICT_H.
468 * graphite.c: Include predict.h.
469 (graphite_finalize): Call tree_estimate_probability.
470 * predict.c (predict_loops): Do not call scev_initialize and
471 scev_finalize.
472 (tree_estimate_probability_bb): New.
473 (tree_estimate_probability): Do not initialize loops: move that
474 code to the driver. Call tree_estimate_probability_bb.
475 (tree_estimate_probability_driver): New.
476 (pass_profile): Use tree_estimate_probability_driver.
477 * predict.h (tree_estimate_probability): Declared.
478
87d4d0ee
SP
4792009-08-05 Sebastian Pop <sebastian.pop@amd.com>
480
481 * graphite-clast-to-gimple.c (gloog): Add time to TV_GRAPHITE_CODE_GEN.
482 * graphite-dependences.c (graphite_legal_transform): Add time to
483 TV_GRAPHITE_DATA_DEPS.
484 (dependency_between_pbbs_p): Same.
485 * timevar.def (TV_GRAPHITE_DATA_DEPS, TV_GRAPHITE_CODE_GEN): New.
486
4872009-08-03 Sebastian Pop <sebastian.pop@amd.com>
488
489 * Merge from mainline (r149952:150372).
490
2abae5f1
SP
4912009-07-28 Sebastian Pop <sebastian.pop@amd.com>
492
493 * ChangeLog.graphite: Fix indenting, white spaces and 80 columns.
494 * graphite-blocking.c: Same.
495 * graphite-clast-to-gimple.c: Same.
496 * graphite-dependences.c: Same.
497 * graphite-poly.c: Same.
498 * graphite-poly.h: Same.
499 * graphite-ppl.c: Same.
500 * graphite-scop-detection.c: Same.
501 * graphite-sese-to-poly.c: Same.
502 * graphite.c: Same.
503
5042009-07-28 Sebastian Pop <sebastian.pop@amd.com>
505
506 * graphite-sese-to-poly.c (loop_entry_phi_arg): New.
507 (remove_simple_copy_phi): New.
508 (remove_invariant_phi): New.
509 (simple_copy_phi_p): New.
510 (reduction_phi_p): New.
511 (gsi_for_ssa_name_def): New.
512 (insert_out_of_ssa_copy): New.
513 (insert_out_of_ssa_copy_on_edge): New.
514 (create_zero_dim_array): New.
515 (scalar_close_phi_node_p): New.
516 (rewrite_close_phi_out_of_ssa): New.
517 (rewrite_phi_out_of_ssa): New.
518 (rewrite_reductions_out_of_ssa): New.
519 (build_poly_scop): Call rewrite_reductions_out_of_ssa.
520
521 * testsuite/gcc.dg/graphite/id-11.c: New.
522 * testsuite/gcc.dg/graphite/id-15.c: New.
523 * testsuite/gcc.dg/graphite/interchange-1.c: Un-XFAIL.
524 * testsuite/gcc.dg/graphite/interchange-2.c: Un-XFAIL.
525 * testsuite/gcc.dg/graphite/interchange-3.c: Un-XFAIL.
526 * testsuite/gcc.dg/graphite/interchange-4.c: Un-XFAIL.
527 * testsuite/gcc.dg/graphite/interchange-7.c: Un-XFAIL.
528 * testsuite/gcc.dg/graphite/scop-matmult.c: Un-XFAIL.
529 * testsuite/gfortran.dg/graphite/id-13.f: New.
530 * testsuite/gfortran.dg/graphite/id-5.f: New.
531
5322009-07-28 Sebastian Pop <sebastian.pop@amd.com>
533
534 * graphite-clast-to-gimple.c (graphite_loop_normal_form): Do not
535 check that nb_reductions_in_loop is zero.
536 * graphite-scop-detection.c (harmful_stmt_in_bb): Don't filter out
537 reduction phi nodes.
538 (nb_reductions_in_loop): Removed.
539 (graphite_can_represent_loop): Do not call nb_reductions_in_loop.
540 * graphite-sese-to-poly.c (phi_node_is_iv): Removed.
541 (bb_contains_non_iv_scalar_phi_nodes): Removed.
542 (scop_contains_non_iv_scalar_phi_nodes): Removed.
543 (build_poly_scop): Do not call scop_contains_non_iv_scalar_phi_nodes.
544
5452009-07-28 Sebastian Pop <sebastian.pop@amd.com>
546
547 * graphite-clast-to-gimple.c (build_cloog_prog): Do not code generate
548 statements that have an empty iteration domain.
549 * testsuite/gfortran.dg/graphite/id-16.f: New.
550
5512009-07-28 Sebastian Pop <sebastian.pop@amd.com>
552
553 * tree-scalar-evolution.c (instantiate_scev_1): Return
554 chrec_dont_know when the result is not above instantiate_below.
555 * graphite-scop-detection.c (scopdet_basic_block_info): Fix formatting.
556 * graphite-sese-to-poly.c (create_linear_expr_from_tree): Assert that
557 the tree has a known scalar evolution.
558 * testsuite/gfortran.dg/graphite/id-14.f: New.
559 * testsuite/gfortran.dg/graphite/id-15.f: New.
560
5612009-07-28 Sebastian Pop <sebastian.pop@amd.com>
562
563 * sese.c (rename_variables_in_stmt): Pass in an extra parameter
564 insert_gsi.
565 (rename_variables): Keep inserting renames after the ones already
566 inserted.
567
5682009-07-28 Sebastian Pop <sebastian.pop@amd.com>
569
570 * graphite-sese-to-poly.c (compare_bb_depths): New.
571 (graphite_sort_dominated_info): New.
572 (build_scop_bbs_1): Call graphite_sort_dominated_info.
573 (build_scop_scattering): Fix comment.
574
5752009-07-28 Sebastian Pop <sebastian.pop@amd.com>
576
577 * graphite.c (graphite_finalize): Call print_loops instead of
578 dump_function_to_file.
579 * testsuite/gcc.dg/graphite/graphite.exp: Fix formatting.
580 * testsuite/gcc.dg/graphite/pr35356-1.c: New. Look for the number of
581 loops generated in the graphite output file.
582 * testsuite/gcc.dg/graphite/pr35356-2.c: New.
583 * testsuite/gcc.dg/graphite/pr35356-3.c: New. XFAILed for now.
584 * testsuite/gfortran.dg/graphite/id-12.f: New.
585
5862009-07-24 Li Feng <nemokingdom@gmail.com>
587
588 * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-8.c:
589 Remove 2 XFAIL.
590
5912009-07-24 Li Feng <nemokingdom@gmail.com>
592 Tobias Grosser <grosser@fim.uni-passau.de>
593
594 * graphite-sese-to-poly.c (pdr_add_alias_set): Use data reference's
595 alias set number build alias in ACCESSES polyhedron.
596 (build_alias_set_for_drs): New.
597 (build_pbb_drs): Added build_alias_set_for_drs.
598 * graphite-dependences.c (poly_drs_may_alias_p): New.
599 (graphite_carried_dependence_level_k): Check alias information
600 before building polyhedron.
601
6022009-07-24 Tobias Grosser <grosser@fim.uni-passau.de>
603
604 * Makefile.in (lambda-code.o): Fix formatting.
605
6062009-07-24 Tobias Grosser <grosser@fim.uni-passau.de>
607
608 * Merge from mainline (r149350-149952)
609
6102009-07-18 Tobias Grosser <grosser@fim.uni-passau.de>
611
612 * graphite-poly.c (apply_poly_transforms): Move strip_mine
613 before interchange to prepare for loop blocking.
614
6152009-07-18 Tobias Grosser <grosser@fim.uni-passau.de>
616
617 * graphite-poly.c (apply_poly_transforms): Add checks after every
618 transformation.
619 * graphite-sese-to-poly.c (build_poly_scop): Remove check, as already
620 done in apply_poly_transforms.
621
6222009-07-17 Konrad Trifunovic <konrad.trifunovic@gmail.com>
623
624 * graphite-dependences.c (build_lexicographically_gt_constraint):
625 Replace RES parameter with *RES.
626 (dependence_polyhedron_1): Pass an address of the parameter RES
627 instead of value of RES.
628
6292009-07-16 Sebastian Pop <sebastian.pop@amd.com>
630
631 * graphite.c (graphite_finalize): Fix comment.
632 (graphite_transform_loops): Reset scev info after code generation
633 of each scop.
634
6352009-07-16 Sebastian Pop <sebastian.pop@amd.com>
636
637 * graphite.c (graphite_finalize): Call scev_reset.
638
6392009-07-16 Sebastian Pop <sebastian.pop@amd.com>
640
641 * graphite-clast-to-gimple.c (compute_cloog_iv_types): Do not create
642 GBB_CLOOG_IV_TYPES hash table twice.
643 * graphite-sese-to-poly.c (free_gimple_bb): Call free_data_refs.
644 (add_condition_to_domain): Clear GMP values.
645
6462009-07-16 Sebastian Pop <sebastian.pop@amd.com>
647
648 * graphite-dependences.c: Fix formatting.
649 * graphite-poly.c (free_poly_dr): Also free PDR_DATA_CONTAINER.
650 (pbb_number_of_iterations): Free ppl_Linear_Expression.
651 * graphite-sese-to-poly.c: Fix formatting.
652 * graphite.c (graphite_transform_loops): Create the hash table
653 after the early return.
654
6552009-07-16 Sebastian Pop <sebastian.pop@amd.com>
656
657 * testsuite/gcc.dg/graphite/id-14.c: New.
658 * testsuite/gcc.dg/graphite/pr40157.c: New.
659 * testsuite/gfortran.dg/graphite/id-11.f: New.
660
6612009-07-16 Sebastian Pop <sebastian.pop@amd.com>
662
663 * graphite-sese-to-poly.c (nb_pbbs_in_loops): New.
664 (build_poly_scop): Return false when there are no pbbs within
665 loops to avoid to pass to cloog scops with no loops.
666
6672009-07-16 Sebastian Pop <sebastian.pop@amd.com>
668
669 * graphite-sese-to-poly.c (build_pbb_scattering_polyhedrons): Avoid
670 useless test "i % 2".
671 (build_pbb_scattering_polyhedrons): Fix formatting.
672 (build_poly_dr): Same.
673 * graphite.c (graphite_transform_loops): Restructure.
674
6752009-07-14 Razya Ladelsky <razya@il.ibm.com>
676
677 * tree-ssa-loop-manip.c (rewrite_phi_with_iv): Remove
678 reduction_list parameter.
679 (rewrite_all_phi_nodes_with_iv): Same.
680 (canonicalize_loop_ivs): Same.
681 * tree-parloops.c (struct brli): Removed.
682 (build_reduction_list_info): Removed.
683 (build_new_reduction): New.
684 (analyze_reduction_list): Removed.
685 (gather_scalar_reductions): Find reductions instead of phi
686 nodes that can't be canonicalized.
687 (try_create_reduction_list): Remove reduction_list parameter.
688 (gen_parallel_loop): Same.
689 (parallelize_loops): Remove analyze_reductions variable,
690 initialization and free.
691 Change reduction_list htab initialization to reduction_info
692 elements instead of ssa names.
693 Call try_create_reduction_list and gen_parallel_loop without
694 analyzed_reduction argument.
695 * graphite-clast-to-gimple (graphite_loop_normal_form): Call
696 canonicalize_loop_ivs with one less argument.
697 * tree-flow.h (canonicalize_loop_ivs): Remove one argument.
698
6992009-07-14 Konrad Trifunovic <konrad.trifunovic@gmail.com>
700
701 * graphite-dependences.c (new_poly_dr_pair): New.
702 (dependence_polyhedron): Renamed into dependence_polyhedron_1.
703 (new_poly_dr_pair): New.
704 (eq_poly_dr_pair_p): New.
705 (hash_poly_dr_pair_p): New.
706 * graphite-dependences.h (struct poly_dr_pair): New.
707 (eq_poly_dr_pair_p): Declared.
708 (hash_poly_dr_pair_p): Declared.
709 * graphite-poly.c (new_scop): Initialize SCOP_ORIGINAL_PDR_PAIRS.
710 (free_scop): Free SCOP_ORIGINAL_PDR_PAIRS.
711 * graphite-poly.h (struct scop): Add original_pdr_pairs field.
712 * Makefile.in (graphite-poly.o): Add dependence on
713 graphite-dependences.h.
714
7152009-07-14 Sebastian Pop <sebastian.pop@amd.com>
716
717 * graphite-scop-detection.c (graphite_can_represent_scev): Do not let
718 polynomials of degree > 1 pass to Graphite.
719 * tree-chrec.c (scev_is_linear_expression): Call
720 evolution_function_is_affine_multivariate_p.
721 * testsuite/gfortran.dg/graphite/id-10.f90: New.
722
7232009-07-14 Sebastian Pop <sebastian.pop@amd.com>
724
725 * tree-scalar-evolution.c (compute_overall_effect_of_inner_loop):
726 Instantiate scevs varying in outer loops.
727 * testsuite/gfortran.dg/graphite/id-9.f: Correct testcase.
728
7292009-07-14 Sebastian Pop <sebastian.pop@amd.com>
730
731 * graphite-sese-to-poly.c (build_loop_iteration_domains): Do not insert
732 redundant constraint.
733
7342009-07-14 Sebastian Pop <sebastian.pop@amd.com>
735
736 * testsuite/gcc.dg/graphite/graphite.exp: Fix comments.
737 * testsuite/gfortran.dg/graphite/graphite.exp: Trigger actions
738 based on the file names as in the C testsuite.
739 * testsuite/gfortran.dg/graphite/block-1.f90: Fix patterns.
740 * testsuite/gfortran.dg/graphite/block-2.f: Same.
741 * testsuite/gfortran.dg/graphite/block-3.f90: Same.
742 * testsuite/gfortran.dg/graphite/block-4.f90: Same.
743 * testsuite/gfortran.dg/graphite/id-1.f90: Same.
744 * testsuite/gfortran.dg/graphite/id-2.f90: Same.
745 * testsuite/gfortran.dg/graphite/id-3.f90: Same.
746 * testsuite/gfortran.dg/graphite/id-4.f90: Same.
747 * testsuite/gfortran.dg/graphite/id-6.f: Same.
748 * testsuite/gfortran.dg/graphite/id-9.f: Same.
749 * testsuite/gfortran.dg/graphite/interchange-1.f: Same.
750 * testsuite/gfortran.dg/graphite/interchange-2.f: Same.
751 * testsuite/gfortran.dg/graphite/scop-1.f: Same.
752
7532009-07-14 Sebastian Pop <sebastian.pop@amd.com>
754
755 * sese.c (expand_scalar_variables_call): New.
756 (expand_scalar_variables_ssa_name): Handle calls in expander.
757
7582009-07-13 Sebastian Pop <sebastian.pop@amd.com>
759
760 * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-6.c:
761 Expect to see the pattern twice.
762 * testsuite/gcc.dg/graphite/interchange-0.c: Un-XFAIL.
763 * testsuite/gcc.dg/graphite/interchange-5.c: Same.
764 * testsuite/gcc.dg/graphite/interchange-6.c: Same.
765
7662009-07-13 Sebastian Pop <sebastian.pop@amd.com>
767
768 * testsuite/gcc.dg/graphite/id-10.c: New.
769 * testsuite/gcc.dg/graphite/id-12.c: New.
770 * testsuite/gfortran.dg/graphite/id-7.f: New.
771 * testsuite/gfortran.dg/graphite/id-8.f: New.
772
7732009-07-13 Sebastian Pop <sebastian.pop@amd.com>
774
775 * graphite-sese-to-poly.c (pdr_add_data_dimensions): Fix division by
776 zero.
777
7782009-07-13 Sebastian Pop <sebastian.pop@amd.com>
779
780 * sese.c (rename_variables_in_stmt): Call fold_convert during renaming.
781
7822009-07-13 Sebastian Pop <sebastian.pop@amd.com>
783
784 * sese.c (expand_scalar_variables_stmt): Avoid unnecessary expansion.
785
7862009-07-10 Sebastian Pop <sebastian.pop@amd.com>
787
788 * graphite-sese-to-poly.c (pdr_add_memory_accesses): Fix order of
789 building PDR subscripts.
790
7912009-07-10 Sebastian Pop <sebastian.pop@amd.com>
792
793 * graphite-sese-to-poly.c (pdr_add_data_dimensions): Fix the
794 computation of array sizes.
795
7962009-07-10 Sebastian Pop <sebastian.pop@amd.com>
797
798 * graphite-sese-to-poly.c (add_param_constraints): Disabled.
799
8002009-07-10 Tobias Grosser <grosser@fim.uni-passau.de>
801
802 * graphite-dependences.c (map_into_dep_poly, map_dr_into_dep_poly,
803 build_pairwise_constraint, dr_equality_constraints,
804 build_pairwise_scheduling_equality,
805 build_pairwise_scheduling_inequality, lexicographically_gt_p,
806 build_lexicographically_gt_constraint, dependence_polyhedron,
807 graphite_legal_transform_dr, graphite_carried_dependence_level_k):
808 Move from NNC_Polyhedron to C_Polyhedron.
809 * graphite-interchange.c (compute_array_size_poly,
810 gather_access_strides): Dito.
811 * graphite-poly.c (apply_poly_transforms, new_poly_dr, free_poly_bb,
812 free_scop, pbb_number_of_iterations): Dito.
813 * graphite-poly.h (struct poly_dr, pdr_nb_subscripts, struct poly_bb,
814 pbb_dim_iter_domain, struct scop): Dito.
815 * graphite-ppl.c (new_Constraint_System_from_Cloog_Matrix,
816 new_Cloog_Domain_from_ppl_Polyhedron,
817 new_Cloog_Domain_from_ppl_Pointset_Powerset, ppl_set_coef_gmp,
818 ppl_insert_dimensions_pointset, ppl_insert_dimensions_pointset,
819 ppl_strip_loop, ppl_strip_loop, ppl_print_polyhedron_matrix,
820 ppl_print_powerset_matrix, debug_ppl_polyhedron_matrix,
821 debug_ppl_powerset_matrix, ppl_read_polyhedron_matrix): Dito.
822 * graphite-ppl.h (ppl_Pointset_Powerset_C_Polyhedron_t,
823 new_C_Polyhedron_from_Cloog_Matrix, ppl_print_powerset_matrix,
824 debug_ppl_powerset_matrix, ppl_insert_dimensions_pointset): Dito.
825 * graphite-sese-to-poly.c (build_pbb_scattering_polyhedrons,
826 build_loop_iteration_domains, ppl_constraint_type_from_tree_code,
827 add_condition_to_domain, add_condition_to_pbb, build_scop_context,
828 build_scop_iteration_domain, build_poly_dr): Dito
829
8302009-07-09 Sebastian Pop <sebastian.pop@amd.com>
831
832 * testsuite/gcc.dg/graphite/graphite.exp: Added a rule to execute
833 run-id-*.c files.
834 * testsuite/gcc.dg/graphite/run-id-1.c: New.
835
8362009-07-09 Sebastian Pop <sebastian.pop@amd.com>
837
838 * graphite-sese-to-poly.c (build_loop_iteration_domains): Add the
839 positivity constraint on the symbolic number of iterations.
840
8412009-07-09 Sebastian Pop <sebastian.pop@amd.com>
842
843 * graphite-sese-to-poly.c (build_loop_iteration_domains): Rewrite.
844
8452009-07-09 Sebastian Pop <sebastian.pop@amd.com>
846 Tobias Grosser <grosser@fim.uni-passau.de>
847
848 * graphite-clast-to-gimple.c (build_scop_context): Removed.
849 (build_cloog_prog): Directly use SCOP_CONTEXT.
850 * graphite-poly.c (new_scop): Initialize SCOP_CONTEXT.
851 (free_scop): Free SCOP_CONTEXT.
852 (print_scop_context): New.
853 (print_scop): Call print_scop_context.
854 (debug_scop_context): New.
855 * graphite-poly.h (print_scop_context, debug_scop_context): Declared.
856 (struct scop): Added field context.
857 (SCOP_CONTEXT): New.
858 * graphite-sese-to-poly.c (add_param_constraints): New.
859 (build_scop_context): New.
860 (build_poly_scop): Call build_scop_context.
861
8622009-07-09 Sebastian Pop <sebastian.pop@amd.com>
863
864 * graphite-clast-to-gimple.c (gmp_cst_to_tree): Moved...
865 * graphite-ppl.c (ppl_set_inhomogeneous_gmp, ppl_set_coef_gmp): New.
866 (ppl_set_inhomogeneous, ppl_set_coef): Moved...
867 * graphite-ppl.h: Include double-int.h and tree.h.
868 (ppl_set_inhomogeneous_gmp, ppl_set_coef_gmp): Declared.
869 (ppl_set_inhomogeneous, ppl_set_coef): ...here.
870 (gmp_cst_to_tree): ...here. Reimplemented using mpz_get_double_int.
871 (tree_int_to_gmp, ppl_set_inhomogeneous_tree, ppl_set_coef_tree): New.
872
8732009-07-09 Sebastian Pop <sebastian.pop@amd.com>
874
875 * graphite-clast-to-gimple.c (clast_to_gcc_expression_red): Generate
876 POINTER_PLUS_EXPR for pointer types.
877 (clast_to_gcc_expression): Same.
878
8792009-07-09 Sebastian Pop <sebastian.pop@amd.com>
880
881 * graphite-poly.c (print_scattering_function): Early return when
882 PBB_TRANSFORMED_SCATTERING is not initialized.
883 (print_pbb_domain): Early return when PBB_DOMAIN is not initialized.
884
8852009-07-08 Sebastian Pop <sebastian.pop@amd.com>
886
887 * tree-parloops.c (analyze_reduction_list): Remove unused variable
888 to fix bootstrap.
889
8902009-07-08 Razya Ladelsky <razya@il.ibm.com>
891
892 * tree-parloops.c (analyze_reduction_list): Change return
893 value to void.
894 (try_create_reduction_list): Move the call to
895 analyze_reduction_list to the beginining.
896 Call reduction_phi with analyzed_reductions as argument
897 instead of reduction_list.
898
8992009-07-08 Tobias Grosser <grosser@fim.uni-passau.de>
900
901 * Merge from mainline (r148296:149346)
902
9032009-07-07 Sebastian Pop <sebastian.pop@amd.com>
904
905 * graphite-scop-detection.c (graphite_can_represent_init): New.
906 (graphite_can_represent_scev): Call graphite_can_represent_init:
907 check that the initial value does not contain multiplications of
908 parameters.
909 (stmt_has_simple_data_refs_p): New.
910 (stmt_simple_for_scop_p): Call stmt_simple_for_scop_p.
911 (is_simple_operand): Fix formatting.
912 * graphite-sese-to-poly.c (try_generate_gimple_bb): Fix formatting.
913
9142009-07-07 Sebastian Pop <sebastian.pop@amd.com>
915
916 * testsuite/gcc.dg/graphite/id-13.c: New.
917 * graphite-sese-to-poly.c (graphite_stmt_p): Do not call
918 analyze_scalar_evolution, use scalar_evolution_in_region.
919 (scan_tree_for_params_right_scev): Add extra assert.
920 (parameter_index_in_region_1): Split from parameter_index_in_region.
921 (idx_record_params): Use scalar_evolution_in_region.
922 (find_params_in_bb): Same.
923 (find_scop_parameters): Same.
924 (build_loop_iteration_domains): Same.
925 (create_linear_expr_from_tree): Same.
926 * sese.c (scalar_evolution_in_region): New.
927 * sese.h (scalar_evolution_in_region): Declared.
928 (defined_in_sese_p): New.
929 * tree-scalar-evolution.c (compute_overall_effect_of_inner_loop): Not
930 static anymore.
931 * tree-scalar-evolution.h (compute_overall_effect_of_inner_loop):
932 Declared.
933
9342009-07-07 Sebastian Pop <sebastian.pop@amd.com>
935
936 * Makefile.in: Replace dependences on tree-chrec.h with SCEV_H.
937 TREE_DATA_REF_H also implies SCEV_H.
938
9392009-07-07 Sebastian Pop <sebastian.pop@amd.com>
940
941 * graphite-poly.c (print_scop_params): New.
942 (print_scop): Call print_scop_params.
943 (debug_scop_params): New.
944 * graphite-poly.h (print_scop_params, debug_scop_params): Declared.
945
9462009-07-07 Li Feng <nemokingdom@gmail.com>
947
948 * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-4.c: New.
949 * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-5.c: New.
950 * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-6.c: New.
951 * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-7.c: New.
952 * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-8.c: New.
953 * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-9.c: New.
954
9552009-07-07 Li Feng <nemokingdom@gmail.com>
956
957 * graphite-clast-to-gimple.c (mark_loops_parallel): Dump information
958 for dependency checking part.
959 * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-1.c: Add
960 tests for dependency checking.
961 * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-2.c: Ditto.
962 * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-3.c: Ditto.
963 * testsuite/gcc.dg/graphite/graphite_autopar/graphite_autopar.exp: Add
964 flag -fdump-tree-graphite-all for autopar testsuites.
965
9662009-07-06 Sebastian Pop <sebastian.pop@amd.com>
967
968 * Makefile.in (tree-ssa-loop-manip.o): Depends on langhooks.h.
969 * tree-parloops.c (rewrite_phi_with_iv, rewrite_all_phi_nodes_with_iv,
970 canonicalize_loop_ivs): Moved...
971 * tree-ssa-loop-manip.c: ... here. Include langhooks.h.
972
9732009-07-06 Sebastian Pop <sebastian.pop@amd.com>
974
975 * tree-parloops.c (try_create_reduction_list): Pass an extra
976 argument analyzed_reductions. Call analyze_reduction_list.
977 (gen_parallel_loop): Do not call analyze_reduction_list.
978 (parallelize_loops): Init and finalize analyzed_reductions.
979
9802009-07-06 Li Feng <nemokingdom@gmail.com>
981
982 * testsuite/gcc.dg/graphite/graphite_autopar/graphite_autopar.exp:
983 Added flag -fno-loop-strip-mine for autopar testcase.
984
9852009-07-04 Li Feng <nemokingdom@gmail.com>
986
987 * graphite-dependences.c (graphite_carried_dependence_level_k): Use
988 transformed scattering dimension instead of unmatch orignal when
989 calling dependence_polyhedron.
990
9912009-06-30 Sebastian Pop <sebastian.pop@amd.com>
992
993 * opts.c (decode_options): Enable flag_loop_strip_mine at -O2.
994
9952009-06-30 Sebastian Pop <sebastian.pop@amd.com>
996
997 * graphite-poly.c (pbb_number_of_iterations): Check for returned
998 value 1 from ppl_Pointset_Powerset_NNC_Polyhedron_maximize.
999
10002009-06-30 Sebastian Pop <sebastian.pop@amd.com>
1001
1002 * graphite-blocking.c (pbb_strip_mine_profitable_p): New.
1003 (pbb_do_strip_mine): Call pbb_strip_mine_profitable_p.
1004 * graphite-poly.c (pbb_number_of_iterations): New.
1005 * graphite-poly.h (pbb_number_of_iterations): Declared.
1006 (pbb_iterator_dim, pbb_parameter_dim): New.
1007
10082009-06-29 Sebastian Pop <sebastian.pop@amd.com>
1009
1010 * graphite-clast-to-gimple.c (graphite_create_new_loop): Revert the
1011 last commit on type of lower and upper bound of loops.
1012
10132009-06-29 Li Feng <nemokingdom@gmail.com>
1014
1015 * Makefile.in (graphite-clast-to-gimple.o): Added dependence on
1016 graphite-dependences.h.
1017 * graphite-clast-to-gimple.c (new_bb_pbb_def): New.
1018 (mark_bb_with_pbb): New.
1019 (get_stmtfor_depth): New.
1020 (find_pbb_via_hash): New.
1021 (dependency_in_loop_p): New.
1022 (mark_loops_parallel): New.
1023 (free_aux_in_new_loops): New.
1024 (translate_clast): Add parameter BB_PBB_MAPPING. Mark newly created
1025 bb with it's relevant pbb. Mark newly created loops. Remove mark
1026 innermost loop parallel without checking.
1027 (gloog): Add parameter BB_PBB_MAPPING.
1028 * graphite-clast-to-gimple.h (struct bb_pbb_def): New.
1029 (gloog): Change declaration.
1030 (mark_loop_parallel): Make extern.
1031 (free_aux_in_new_loops): Declare.
1032 (bb_pbb_map_hash): New.
1033 (eq_bb_pbb_map): New.
1034 * graphite.c (graphite_transform_loops): Added BB_PBB_MAPPING. Trigger
1035 auto parallelization when flag_graphite_force_parallel is set.
1036 (graphite_finalize): Added free_aux_in_new_loops.
1037 * tree-parloops.c (parallelize_loops): Only generate parallel code for
1038 the innermost loop that marked parallel. Use
1039 flag_graphite_force_parallel instead of loop->can_be_parallel.
1040 (loop_parallel_p): Move inner most checking out of function.
1041
10422009-06-26 Sebastian Pop <sebastian.pop@amd.com>
1043
1044 * graphite-clast-to-gimple.c (graphite_create_new_loop): Make the
1045 type of lower and upper bound of loops signed long int.
1046
10472009-06-26 Sebastian Pop <sebastian.pop@amd.com>
1048
1049 * cfgloopmanip.c (create_empty_loop_on_edge): Gimplify the loop exit
1050 expression outside the loop.
1051
10522009-06-26 Sebastian Pop <sebastian.pop@amd.com>
1053
1054 * gcc.dg/graphite/interchange-8.c: New.
1055
10562009-06-26 Sebastian Pop <sebastian.pop@amd.com>
1057
1058 * gcc.dg/graphite/interchange-0.c: XFailed.
1059 * gcc.dg/graphite/interchange-5.c: XFailed.
1060 * gcc.dg/graphite/interchange-6.c: XFailed.
1061
10622009-06-26 Sebastian Pop <sebastian.pop@amd.com>
1063
1064 * graphite-interchange.c (compute_array_size_poly): The end of the
1065 recursion should return 1.
1066
10672009-06-26 Sebastian Pop <sebastian.pop@amd.com>
1068
1069 * graphite-interchange.c (compute_array_size_cstr): Allow the
1070 subscript multiplier to be -1.
1071 (compute_array_size): Use PDR_DATA_CONTAINER and not PDR_ACCESSES.
1072 * graphite-poly.c (new_poly_dr): Takes an extra argument for the
1073 data_container. Initializes PDR_DATA_CONTAINER.
1074 (print_pdr_access_layout): New.
1075 (print_pdr): Call print_pdr_access_layout. Print PDR_DATA_CONTAINER.
1076 * graphite-poly.h (struct poly_dr): Adjust comment. Add a new field
1077 data_container.
1078 (PDR_DATA_CONTAINER): New.
1079 (new_poly_dr): Update declaration.
1080 * graphite-sese-to-poly.c (pdr_add_data_dimensions): New.
1081 (build_poly_dr): Call pdr_add_data_dimensions.
1082
10832009-06-26 Sebastian Pop <sebastian.pop@amd.com>
1084
1085 * graphite-poly.h (struct poly_dr): Fix comment.
1086 * graphite-sese-to-poly.c (pdr_add_alias_set): New.
1087 (pdr_add_memory_accesses): New.
1088 (build_poly_dr): Call pdr_add_memory_accesses and pdr_add_alias_set.
1089
10902009-06-26 Sebastian Pop <sebastian.pop@amd.com>
1091
1092 * graphite-poly.c (print_pdrs, debug_pdrs): New.
1093 (print_pbb): Add call to print_pdrs.
1094 * graphite-poly.h (print_pdrs, debug_pdrs): Declared.
1095
10962009-06-24 Konrad Trifunovic <konrad.trifunovic@gmail.com>
1097 Li Feng <nemokingdom@gmail.com>
1098
1099 * graphite-dependences.c (graphite_carried_dependence_level_k): New.
1100 (dependency_between_pbbs_p): New.
1101 (lexicographically_gt_p): Assure !empty_p before polyhedron
1102 intersection assign.
1103 (build_lexicographically_gt_constraint): Correct lexicographically
1104 judging.
1105 * graphite-dependences.h: New.
1106 * Makefile.in (graphite-dependences.o): Add graphite-dependences.h.
1107
11082009-06-24 Sebastian Pop <sebastian.pop@amd.com>
1109
1110 * graphite-clast-to-gimple.c (print_clast_stmt): New.
1111 (gloog): Print to dump_file the generated clast.
1112 * graphite-clast-to-gimple.h (print_clast_stmt): Declared.
1113 * graphite-interchange.c (pbb_do_interchange): Fix dump formatting.
1114
11152009-06-24 Sebastian Pop <sebastian.pop@amd.com>
1116
1117 * graphite-poly.c (extend_scattering): Increment
1118 PBB_NB_LOCAL_VARIABLES by the number of added dimensions.
1119
11202009-06-24 Sebastian Pop <sebastian.pop@amd.com>
1121
1122 * graphite-interchange.c (compute_array_size_poly): Added exit of
1123 recursion condition. Continue iterating even after the first equality.
1124 (compute_array_size): Same.
1125
11262009-06-24 Li Feng <nemokingdom@gmail.com>
1127
1128 * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-1.c: Update
1129 -fdump-tree-final_cleanup to -fdump-tree-optimized.
1130 * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-2.c: Ditto.
1131 * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-3.c: Ditto.
1132 * testsuite/gcc.dg/graphite/graphite_autopar/graphite_autopar.exp: Ditto.
1133
11342009-06-23 Sebastian Pop <sebastian.pop@amd.com>
1135
1136 * sese.c (expand_scalar_variables_stmt): Expand scalar variables
1137 only when the use verifies is_gimple_reg.
1138
11392009-06-23 Sebastian Pop <sebastian.pop@amd.com>
1140
1141 * graphite-clast-to-gimple.c (build_cloog_prog): Fix memory corruption.
1142 Allocate scaldims after call to unify_scattering_dimensions.
1143
11442009-06-23 Sebastian Pop <sebastian.pop@amd.com>
1145
1146 * graphite-clast-to-gimple.c (translate_clast): Fix memory leak.
1147
11482009-06-23 Sebastian Pop <sebastian.pop@amd.com>
1149 Albert Cohen <albert.cohen@inria.fr>
1150
1151 * graphite-blocking.c (pbb_strip_mine_loop_depth): Do not use local
1152 variables for the strip mining.
1153
11542009-06-23 Sebastian Pop <sebastian.pop@amd.com>
1155 Pranav Garg <pranav.garg2107@gmail.com>
1156
1157 * Makefile.in (OBJS-common): Added graphite-blocking.o.
1158 (graphite-sese-to-poly.o): Moved down to be in lexicographical order.
1159 (graphite-blocking.o): New rule.
1160 (graphite-poly.o, graphite-ppl.o): Moved to be in lexicographical order.
1161 * graphite-blocking.c: New.
1162 * graphite-poly.c (apply_poly_transforms): Call scop_do_strip_mine for
1163 flag_loop_strip_mine.
1164 (psct_scattering_dim_for_loop_depth): New.
1165 * graphite-poly.h (scop_do_strip_mine): Declared.
1166 (psct_add_local_variable): Increment PBB_NB_LOCAL_VARIABLES.
1167 * tree-ssa-loop.c (gate_graphite_transforms): Do not fail when using
1168 flag_loop_strip_mine.
1169
11702009-06-23 Sebastian Pop <sebastian.pop@amd.com>
1171
1172 * graphite-poly.c (extend_scattering): Avoid initializing and freeing
1173 a GMP value and a PPL coefficient at each iteration of a loop.
1174
11752009-06-23 Sebastian Pop <sebastian.pop@amd.com>
1176
1177 * graphite-dependences.c (dependence_polyhedron): Do not use
1178 pbb_nb_scattering_dims anymore. Use pbb_nb_scattering_orig and
1179 pbb_nb_scattering_transform.
1180 (graphite_legal_transform_dr): Same.
1181 * graphite-poly.c (extend_scattering): Same.
1182 (unify_scattering_dimensions): Same.
1183 (print_scattering_function): Same.
1184 (new_poly_bb): Initialize PBB_NB_SCATTERING_TRANSFORM and
1185 PBB_NB_LOCAL_VARIABLES.
1186 * graphite-poly.h (pbb_nb_scattering): Removed declaration.
1187 (struct poly_bb): Added nb_local_variables and nb_scattering_transform.
1188 (PBB_NB_LOCAL_VARIABLES, PBB_NB_SCATTERING_TRANSFORM): New.
1189 (pbb_nb_scattering_orig, pbb_nb_scattering_transform): New.
1190 (pbb_nb_scattering_dims, pbb_nb_scattering): Removed.
1191 (pbb_nb_scattering_transform): New.
1192 (pbb_nb_local_vars): Return PBB_NB_LOCAL_VARIABLES.
1193 (psco_scattering_dim): Add assert on parameters.
1194 (psct_scattering_dim): Same.
1195 (psct_scattering_dim_for_loop_depth): Declared.
1196 (psct_local_var_dim): New.
1197 (psco_iterator_dim, psco_parameter_dim): Add assert on parameters.
1198 (psct_iterator_dim, psct_parameter_dim): Same. To maintain the
1199 correct layout, call pbb_nb_local_vars.
1200 (psct_add_local_variable, psct_add_scattering_dimension): New.
1201 * graphite-sese-to-poly.c (build_pbb_scattering_polyhedrons):
1202 Initialize PBB_NB_SCATTERING_TRANSFORM.
1203
12042009-06-23 Sebastian Pop <sebastian.pop@amd.com>
1205
1206 * graphite-ppl.c (set_inhomogeneous): Renamed ppl_set_inhomogeneous.
1207 (set_coef): Renamed ppl_set_coef.
1208 * graphite-ppl.h (ppl_set_inhomogeneous, ppl_set_coef): Declared.
1209
12102009-06-23 Sebastian Pop <sebastian.pop@amd.com>
1211
1212 * graphite-dependences.c (build_pairwise_scheduling_inequality): Don't
1213 test a boolean against 1.
1214 * graphite-interchange.c (pbb_interchange_loop_depths): Do not build
1215 a new polyhedron for the PBB_TRANSFORMED_SCATTERING.
1216 (pbb_do_interchange): Returns true when a transform has been performed.
1217 (scop_do_interchange): Same.
1218 * graphite-poly.c (apply_poly_transforms): Use the return value of
1219 scop_do_interchange.
1220 * graphite-poly.h (scop_do_interchange): Update declaration.
1221
12222009-06-23 Tobias Grosser <grosser@fim.uni-passau.de>
1223
1224 * graphite-clast-to-gimple.c (gloog): Reset loop->aux right
1225 after last use.
1226 * sese.c (sese_reset_aux_in_loops): New.
1227 * sese.h (sese_reset_aux_in_loops): New.
1228
12292009-06-19 Sebastian Pop <sebastian.pop@amd.com>
1230
1231 * graphite-sese-to-poly.c (scan_tree_for_params_int): Pass in the
1232 multiplier and multiply the constant by the multiplier.
1233 (scan_tree_for_params): Bound the multiplier to its MULT_EXPR.
1234 (build_poly_dr): Do not use the multiplier to define the subscript.
1235
12362009-06-19 Sebastian Pop <sebastian.pop@amd.com>
1237
1238 * graphite-poly.c (new_poly_dr): Pass an extra argument for the
1239 compiler's data reference. Initialize PDR_CDR.
1240 (print_pdr): Call dump_data_reference.
1241 * graphite-poly.h (struct poly_dr): Rename black_box into pbb.
1242 Add compiler_dr field.
1243 (PDR_BB): Renamed PDR_PBB.
1244 (PDR_CDR): New.
1245 * graphite-sese-to-poly.c (build_poly_dr): Pass to new_poly_dr
1246 GCC's data reference representation.
1247 * tree-data-ref.c (debug_data_references, debug_data_reference): New.
1248 * tree-data-ref.h (debug_data_references, debug_data_reference): Decl.
1249
12502009-06-19 Sebastian Pop <sebastian.pop@amd.com>
1251
1252 * graphite-poly.c (print_scattering_function): Also print the layout.
1253 * graphite-poly.h (pbb_nb_local_vars): New.
1254
12552009-06-19 Sebastian Pop <sebastian.pop@amd.com>
1256
1257 * graphite-poly.c (print_pbb_domain): Also print the layout names.
1258
12592009-06-19 Sebastian Pop <sebastian.pop@amd.com>
1260
1261 * graphite-poly.c (print_pdr, debug_pdr): New.
1262 * graphite-poly.h (print_pdr, debug_pdr): Declared.
1263 (PDR_BASE): Removed.
1264
12652009-06-18 Sebastian Pop <sebastian.pop@amd.com>
1266
1267 * gcc/testsuite/gcc.dg/graphite/interchange-{1..7}.c: New avatars of
1268 ltrans-{1..6,8}.c.
1269
12702009-06-18 Sebastian Pop <sebastian.pop@amd.com>
1271
1272 * graphite-interchange.c (compute_subscript): Allow also -1 in the
1273 subscript identification column.
1274 (pbb_do_interchange): Print to dump_file that some loops "will be
1275 interchanged". Rely on that chain of characters in the testcases.
1276 * gcc.dg/graphite/interchange-0.c: New.
1277 * gcc.dg/graphite/graphite.exp: Iterate over the testsuite
1278 interchange-*.c files and compile them with -floop-interchange.
1279
12802009-06-18 Pranav Garg <pranav.garg2107@gmail.com>
1281
1282 * graphite-interchange.c (interchange_profitable_p): Renamed
1283 pbb_interchange_profitable_p.
1284
12852009-06-18 Sebastian Pop <sebastian.pop@amd.com>
1286 Harsha Jagasia <harsha.jagasia@amd.com>
1287 Pranav Garg <pranav.garg2107@gmail.com>
1288
1289 * graphite-interchange.c (interchange_profitable_p): Make static.
1290 (pbb_interchange_loop_depths, pbb_do_interchange,
1291 scop_do_interchange): New.
1292 * graphite-poly.c (apply_poly_transforms): Call scop_do_interchange
1293 for flag_loop_interchange.
1294 * graphite-poly.h (scop_do_interchange): Declared.
1295 * tree-ssa-loop.c (gate_graphite_transforms): Do not fail when
1296 flag_loop_interchange is used.
1297
12982009-06-18 Sebastian Pop <sebastian.pop@amd.com>
1299
1300 * graphite-dependences.c (dependence_polyhedron): Update use of
1301 pbb_nb_scattering_dims.
1302 * graphite-poly.h (pbb_nb_scattering_dims): Do not pass SCOP.
1303 (pbb_nb_scattering): Update use of pbb_nb_scattering_dims.
1304 (psco_scattering_dim, psct_scattering_dim, psco_iterator_dim,
1305 psct_iterator_dim, psco_parameter_dim, psct_parameter_dim): New.
1306
13072009-06-16 Sebastian Pop <sebastian.pop@amd.com>
1308
1309 * graphite.c: Cleanup foo.
1310
13112009-06-16 Sebastian Pop <sebastian.pop@amd.com>
1312
1313 * Merge from mainline (r143684:148293).
1314 * Disabled libpcp until it gets fixed.
1315
13162009-06-05 Sebastian Pop <sebastian.pop@amd.com>
1317 Harsha Jagasia <harsha.jagasia@amd.com>
1318
1319 * graphite-interchange.c: New.
1320 * Makefile.in (graphite-interchange.o): New.
1321 * graphite-poly.h (interchange_profitable_p): Declared.
1322 * graphite-ppl.h (value_max): New.
1323
13242009-06-04 Sebastian Pop <sebastian.pop@amd.com>
1325
1326 * graphite-dependences.c (dependence_polyhedron): Use pdr_dim.
1327 * graphite-poly.h: Fix some comments.
1328 (pdr_dim): New.
1329 (pdr_scop): New.
1330
13312009-06-04 Sebastian Pop <sebastian.pop@amd.com>
1332
1333 * graphite-poly.h
1334 (pdr_accessp_nb_subscripts): Renamed pdr_nb_subscripts.
1335 (pdr_accessp_nb_iterators): Renamed pdr_dim_iter_domain.
1336 (pdr_accessp_nb_params): Renamed pdr_nb_params.
1337 (pdr_accessp_alias_set_dim): Renamed pdr_alias_set_dim.
1338 (pdr_accessp_subscript_dim): Renamed pdr_subscript_dim.
1339 (pdr_accessp_iterator_dim): Renamed pdr_iterator_dim.
1340 (pdr_accessp_param_dim): Renamed pdr_parameter_dim.
1341 (pbb_nb_loops): Renamed pbb_dim_iter_domain.
1342 * graphite-clast-to-gimple.c: Same.
1343 * graphite-dependences.c: Same.
1344 * graphite-poly.c: Same.
1345 * graphite-sese-to-poly.c: Same.
1346
13472009-06-03 Sebastian Pop <sebastian.pop@amd.com>
1348
1349 * graphite-clast-to-gimple.c (build_iv_mapping): Insert full
1350 expressions for an IV rename, as returned by clast_to_gcc_expression.
1351 (copy_renames): Rename new_name to expr.
1352 * sese.c (debug_rename_elt): Same.
1353 (get_rename): Same.
1354 (set_rename): Same.
1355 (sese_adjust_liveout_phis): Call force_gimple_operand before using
1356 the information from the rename map.
1357 (rename_variables_in_stmt): Same.
1358 (add_loop_exit_phis): Rename new_name to expr.
1359 (insert_loop_close_phis): Same.
1360 (add_guard_exit_phis): Same. Call force_gimple_operand.
1361 * sese.h (struct rename_map_elt): Rename new_name to expr.
1362 (new_rename_map_elt): Same.
1363
13642009-06-03 Sebastian Pop <sebastian.pop@amd.com>
1365
1366 * graphite-clast-to-gimple.c (build_iv_mapping): Use set_rename.
1367 * sese.c (set_rename): Make it extern.
1368 * sese.h (set_rename): Declared.
1369
13702009-06-03 Sebastian Pop <sebastian.pop@amd.com>
1371
1372 * graphite-poly.c (extend_scattering): Free values.
1373 * graphite-ppl.c (new_Cloog_Domain_from_ppl_Pointset_Powerset):
1374 Free iterators.
1375 (ppl_print_powerset_matrix): Same.
1376 * graphite-scop-detection.c (free_scops_1): New.
1377 (limit_scops): Call free_scops_1.
1378 * graphite-sese-to-poly.c (build_scop_bbs_1): Free dom.
1379 (build_poly_dr): Free PPL coefficients.
1380 * tree-parloops.c (rewrite_all_phi_nodes_with_iv): Free bbs.
1381
13822009-06-02 Sebastian Pop <sebastian.pop@amd.com>
1383
1384 * graphite-dependences.c: New.
1385 * graphite-data-ref.c: Removed.
1386 * graphite-data-ref.h: Removed.
1387 * Makefile.in (graphite-data-ref.o): Removed.
1388 (graphite-dependences.o): Added.
1389 * graphite-clast-to-gimple.c: Remove dependence on graphite-data-ref.h.
1390 * graphite-poly.c: Same.
1391 Move the data dependence testing to graphite-dependences.c.
1392
13932009-05-19 Tobias Grosser <grosser@fim.uni-passau.de>
1394
1395 * graphite-scop-detection.c (graphite_can_represent_loop): Renamed
1396 from graphite_cannot_represent_loop. Code refactored.
1397 (scopdet_basic_block_info): Call graphite_can_represent_loop.
1398
13992009-05-17 Li Feng <nemokingdom@gmail.com>
1400
1401 * testsuite/gcc.dg/graphite/graphite_autopar/graphite_autopar.exp:
1402 Cover all the testcases (not only the filtered ones).
1403
14042009-05-17 Tobias Grosser <grosser@fim.uni-passau.de>
1405
1406 * graphite-scop-detection.c (stmt_simple_for_scop_p): Remove
1407 unnecessary check. Update comments. Move check for REAL_TYPE here.
1408 (harmful_stmt_in_bb): Remove checks for conditions. This is already
1409 done in (stmt_simple_for_scop_p).
1410
14112009-05-14 Tobias Grosser <grosser@fim.uni-passau.de>
1412
1413 * graphite.c (print_global_statistics): New.
1414 (print_graphite_scop_statistic): New.
1415 (print_graphite_statistics): New.
1416 (graphite_initialize, graphite_transform_loops): Print statistics.
1417 * graphite-scop-detection (build_scops): Print statistics.
1418 (print_graphite_scop_statistics): New.
1419 (print_graphite_statistics): New.
1420
14212009-05-13 Sebastian Pop <sebastian.pop@amd.com>
1422
1423 * graphite-clast-to-gimple.c (struct clast_name_index): Removed.
1424 (debug_clast_name_index): Removed.
1425 (debug_clast_name_indexes_1): Removed.
1426 (debug_clast_name_indexes): Removed.
1427 (clast_name_index_elt_info): Removed.
1428 (eq_clast_name_indexes): Removed.
1429 (clast_name_to_index): Removed.
1430 (new_clast_name_index): Removed.
1431 (save_clast_name_index): Removed.
1432 (save_var_name): Moved...
1433 (init_sese_params_index): Removed.
1434 (clast_name_to_gcc): Remove use of name_tree.
1435 (initialize_cloog_names): Same.
1436 (gloog): Do not call init_sese_params_index.
1437 * graphite-sese-to-poly.c (save_var_name): ...here.
1438 (parameter_index_in_region): New.
1439 * sese.c (new_sese): Initialize SESE_PARAMS_NAMES.
1440 (parameter_index_in_region): Removed.
1441 (is_parameter): Remove use of name_tree.
1442 * sese.h (struct name_tree): Removed.
1443 (struct sese): Remove use of name_tree. New field params_names.
1444 (SESE_PARAMS_NAMES): New.
1445 (SESE_PARAMS): Remove duplicate.
1446 (parameter_index_in_region): Removed.
1447 (sese_nb_params): Remove use of name_tree.
1448 (struct clast_name_index): New.
1449 (new_clast_name_index): New.
1450 (clast_name_to_index): New.
1451 (save_clast_name_index): New.
1452 (debug_clast_name_index): New.
1453 (debug_clast_name_indexes_1): New.
1454 (debug_clast_name_indexes): New.
1455 (clast_name_index_elt_info): New.
1456 (eq_clast_name_indexes): New.
1457
14582009-05-13 Sebastian Pop <sebastian.pop@amd.com>
1459
1460 * graphite-clast-to-gimple.c (compute_cloog_iv_types_1): Call
1461 pbb_to_depth_to_oldiv. Remove call to oldiv_for_loop.
1462 (graphite_loop_normal_form): Do not pass region. Do not
1463 initialize SESE_OLDIVS.
1464 (build_graphite_loop_normal_form): Update call to
1465 graphite_loop_normal_form.
1466 * sese.c (debug_oldivs): Removed.
1467 (new_sese): Do not initialize SESE_OLDIVS.
1468 (free_sese): Do not free SESE_OLDIVS.
1469 (oldiv_for_loop): Removed.
1470 * sese.h (struct sese): Remove old_ivs.
1471 (SESE_OLDIVS): Removed.
1472 (oldiv_for_loop): Removed.
1473
14742009-05-13 Sebastian Pop <sebastian.pop@amd.com>
1475
1476 * graphite-clast-to-gimple.c (clast_name_to_gcc): Pass newivs,
1477 remove ivstack. Remove call to loop_iv_stack_get_iv_from_name,
1478 replaced by a call to newivs_to_depth_to_newiv.
1479 (clast_to_gcc_expression): Pass newivs, remove ivstack.
1480 (clast_to_gcc_expression_red): Same.
1481 (gcc_type_for_clast_expr): Same.
1482 (gcc_type_for_clast_eq): Same.
1483 (graphite_translate_clast_equation): Same.
1484 (graphite_create_guard_cond_expr): Same.
1485 (graphite_create_new_guard): Same.
1486 (graphite_create_new_loop): Same.
1487 (build_iv_mapping): Same.
1488 (translate_clast): Same.
1489 (gloog): Same.
1490 (loop_iv_stack_patch_for_consts): Removed. *
1491 sese.c (iv_stack_entry_is_constant): Removed.
1492 (iv_stack_entry_is_iv): Removed.
1493 (loop_iv_stack_push_iv): Removed.
1494 (loop_iv_stack_insert_constant): Removed.
1495 (loop_iv_stack_pop): Removed.
1496 (loop_iv_stack_get_iv): Removed.
1497 (loop_iv_stack_get_iv_from_name): Removed.
1498 (debug_loop_iv_stack): Removed.
1499 (free_loop_iv_stack): Removed.
1500 (loop_iv_stack_remove_constants): Removed. *
1501 sese.h (iv_stack_entry_kind): Removed.
1502 (iv_stack_entry_data_union): Removed.
1503 (iv_stack_entry_struct): Removed.
1504 (iv_stack_entry_p): Removed.
1505 (debug_oldivs, debug_loop_iv_stack, loop_iv_stack_insert_constant,
1506 loop_iv_stack_get_iv_from_name, loop_iv_stack_push_iv,
1507 loop_iv_stack_get_iv, loop_iv_stack_remove_constants,
1508 loop_iv_stack_pop, free_loop_iv_stack): Removed.
1509 (gbb_loop_at_index): Fix indenting.
1510 (gbb_loop_index): Removed.
1511
15122009-05-13 Sebastian Pop <sebastian.pop@amd.com>
1513
1514 * graphite-clast-to-gimple.c (clast_name_to_gcc): Do not use strcmp.
1515 Call clast_name_to_index.
1516
15172009-05-13 Sebastian Pop <sebastian.pop@amd.com>
1518
1519 * graphite-clast-to-gimple.c (clast_name_to_gcc): Pass region,
1520 do not pass params. Get params from SESE_PARAMS.
1521 (clast_to_gcc_expression): Same.
1522 (clast_to_gcc_expression_red): Same.
1523 (gcc_type_for_clast_eq): Same.
1524 (graphite_translate_clast_equation): Same.
1525 (graphite_create_new_loop): Same.
1526 * sese.c (rename_variables_in_stmt): Fix comment.
1527
15282009-05-13 Sebastian Pop <sebastian.pop@amd.com>
1529
1530 * graphite-clast-to-gimple.c (graphite_create_new_loop): Pass
1531 newivs_index.
1532 Call save_clast_name_index.
1533 (translate_clast): Pass newivs_index.
1534 (gloog): Create and free newivs_index.
1535
15362009-05-13 Sebastian Pop <sebastian.pop@amd.com>
1537
1538 * graphite-clast-to-gimple.c (clast_name_index): New structure.
1539 (clast_name_index_p): New type.
1540 (debug_clast_name_index): New.
1541 (debug_clast_name_indexes_1): New.
1542 (debug_clast_name_indexes): New.
1543 (clast_name_index_elt_info): New.
1544 (eq_clast_name_indexes): New.
1545 (clast_name_to_index): New.
1546 (new_clast_name_index): New.
1547 (save_clast_name_index): New.
1548 (init_sese_params_index): New.
1549 (gloog): Call init_sese_params_index.
1550 * graphite-clast-to-gimple.h (debug_clast_name_indexes): Declared.
1551 * sese.c (new_sese): Initialize SESE_PARAMS_INDEX.
1552 (free_sese): Free SESE_PARAMS_INDEX.
1553 * sese.h (struct sese): Add params_index.
1554 (SESE_PARAMS_INDEX): New.
1555
15562009-05-13 Sebastian Pop <sebastian.pop@amd.com>
1557
1558 * graphite-clast-to-gimple.c (newivs_to_depth_to_newiv): New.
1559 (graphite_create_new_loop): Pass the newivs vector. Push the
1560 newly created IV to newivs.
1561 (translate_clast): Pass the newivs vector.
1562 (gloog): Create and destroy the newivs vector.
1563
15642009-05-13 Sebastian Pop <sebastian.pop@amd.com>
1565
1566 * graphite-clast-to-gimple.c (pbb_to_depth_to_oldiv): New.
1567 (graphite_loop_normal_form): Initialize loop->aux with the unique
1568 IV that has been created.
1569
15702009-05-13 Tobias Grosser <grosser@fim.uni-passau.de>
1571
1572 * tree-chrec.c (evolution_function_right_is_integer_cst): Allow
1573 scev with parameters in the base part. They where forbidden
1574 exidently.
1575
15762009-05-11 Li Feng <nemokingdom@gmail.com>
1577
1578 * testsuite/gcc.dg/graphite/graphite.exp: Set different default
1579 compile options by file names.
1580 * testsuite/gcc.dg/graphite/block{0-6}.c: Remove dg-option line.
1581 * testsuite/gcc.dg/graphite/id-{1-9}.c: Ditto.
1582 * testsuite/gcc.dg/graphite/scop-{0-20}.c: Ditto.
1583 * testsuite/gcc.dg/graphite/scop-matmult.c: Ditto.
1584
15852009-05-08 Li Feng <nemokingdom@gmail.com>
1586
1587 * testsuite/gcc.dg/graphite/graphite_autopar/graphite_autopar.exp: New.
1588 * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-1.c: New.
1589 * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-2.c: New.
1590 * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-3.c: New.
1591
15922009-05-07 Tobias Grosser <grosser@fim.uni-passau.de>
1593
1594 * graphite-scop-detection (build_scops_1): Fix little bug introduced
1595 by final cleanup.
1596
15972009-05-07 Tobias Grosser <grosser@fim.uni-passau.de>
1598
1599 * graphite-scop-detection.c (graphite_can_represent_scev): Only
1600 allow integer constant strides.
1601 (graphite_can_represent_expr): Depend on outermost_loop.
1602 (stmt_simple_memref_p, graphite_cannot_represent_loop,
1603 harmful_stmt_in_bb, is_simple_operand, stmt_simple_for_scop_p,
1604 build_scops_1): Same.
1605 (scopdet_basic_block_info): Same and insert layered SCoP
1606 detection.
1607 (try_generate_gimple_bb): Cleanup.
1608 (build_scops): Enable data references.
1609
1610 * testsuite/gcc.dg/graphite/id-5.c: New.
1611 * testsuite/gcc.dg/graphite/id-9.c: New.
1612 * tree-chrec.c (evolution_function_right_is_integer_cst): New.
1613 * tree-chrec.h (evolution_function_right_is_integer_cst): New.
1614
16152009-05-06 Tobias Grosser <grosser@fim.uni-passau.de>
1616
1617 * sese.c (expand_scalar_variables_ssa_name): Only build expressions,
1618 that we have not yet built for this SCoP.
1619
16202009-05-06 Tobias Grosser <grosser@fim.uni-passau.de>
1621
1622 * sese.c (expand_scalar_variables_expr): Fix expand_scalar_variables
1623 for complex numbers.
1624
16252009-05-06 Tobias Grosser <grosser@fim.uni-passau.de>
1626
1627 * graphite-ppl.c: Fix build if cloog is not available.
1628
16292009-05-04 Li Feng <nemokingdom@gmail.com>
1630
1631 * tree-parloops.c (loop_parallel_p): Remove construction of
1632 NITER and REDUCTION_LIST.
1633 (try_get_loop_niter): New.
1634 (try_create_reduction_list): New.
1635 (parallelize_loops): Bypass the failed checkings in autopar
1636 when can_be_parallel in loop structure is set to true.
1637
16382009-05-01 Tobias Grosser <grosser@fim.uni-passau.de>
1639
1640 * testsuite/gcc.dg/graphite/id-6.c: Update testcase.
1641 * testsuite/gcc.dg/graphite/scop-3.c: Dito.
1642
16432009-05-01 Tobias Grosser <grosser@fim.uni-passau.de>
1644
1645 * graphite-scop-detection.c (stmt_simple_for_scop_p):
1646 Enable EQ_EXPR and NE_EXPR again.
1647
16482009-04-30 Tobias Grosser <grosser@fim.uni-passau.de>
1649
1650 * graphite-scop-detection.c (graphite_can_represent_scev):
1651 Add check if scev is affine multivariate.
1652 (harmful_stmt_in_bb): Check if we can represent the conditions.
1653 (scopdet_basic_block_info (basic_block bb, VEC): Pass the loop to
1654 harmful_stmt_in_bb.
1655 * testsuite/gcc.dg/graphite/id-7.c: New.
1656
16572009-04-30 Tobias Grosser <grosser@fim.uni-passau.de>
1658
1659 * graphite-sese-to-poly.c (bb_contains_non_iv_scalar_phi_nodes):
1660 Check all bbs in region, not only the bbs that are represented in
1661 GRAPHITE.
1662 (build_poly_scop): Add newline.
1663 * testsuite/gcc.dg/graphite/id-8.c: New.
1664
16652009-04-30 Li Feng <nemokingdom@gmail.com>
1666
1667 * cfgloop.c (alloc_loop): Initialize can_be_parallel to false
1668 when loop initialize.
1669 * cfgloop.h (struct loop): Introduce flag can_be_parallel.
1670 * common.opt: Declare flag_graphite_force_parallel.
1671 * graphite-clast-to-gimple.c (translate_clast): Mark the innermost
1672 loop parallel.
1673 * graphite-poly.c (apply_poly_transforms): Introduce
1674 flag_graphite_force_parallel.
1675 * tree-ssa-loop.c (gate_graphite_transforms): ditto.
1676 * toplev.c (process_options): ditto and replace a not correctly
1677 encoded space.
1678
16792009-04-30 Li Feng <nemokingdom@gmail.com>
1680
1681 * graphite-clast-to-gimple.c (loop_iv_stack_patch_for_consts):
1682 Change the call of gbb_loop_at_index and/or gbb_loop_index due
1683 to the redefinition.
1684 (compute_cloog_iv_types_1): ditto.
1685 (build_iv_mapping): ditto.
1686 * graphite-sese-to-poly.c (new_gimple_bb): Remove GBB_LOOPS related
1687 initialization.
1688 (free_gimple_bb): Removed GBB_LOOPS related free part.
1689 (build_bb_loops): Removed.
1690 * sese.h (struct gimple_bb): Removed loops.
1691 (GBB_LOOPS): Removed.
1692 (gbb_loop_at_index): Instead of using GBB_LOOPS, we use sese instead.
1693 (gbb_loop_index): ditto.
1694
16952009-04-24 Tobias Grosser <grosser@fim.uni-passau.de>
1696
1697 * graphite-scop-detection.c (graphite_can_represent_scev): Do not
1698 allow non constant strides.
1699 * testsuite/gcc.dg/graphite/scop-20.c: New.
1700
17012009-04-24 Sebastian Pop <sebastian.pop@amd.com>
1702
1703 * graphite-scop-detection.c (dot_all_scops): Fix system call
1704 return value warning.
1705 (dot_scop): Same.
1706
17072009-04-24 Sebastian Pop <sebastian.pop@amd.com>
1708
1709 * testsuite/gcc.dg/graphite/id-6.c: Fix pattern.
1710 * testsuite/gcc.dg/graphite/scop-3.c: Same.
1711
17122009-04-24 Sebastian Pop <sebastian.pop@amd.com>
1713
1714 * graphite-poly.c (map_into_dep_poly, map_dr_into_dep_poly,
1715 build_pairwise_constraint, dr_equality_constraints,
1716 build_pairwise_scheduling_equality,
1717 build_pairwise_scheduling_inequality, lexicographically_gt_p,
1718 build_lexicographically_gt_constraint, dependence_polyhedron,
1719 graphite_legal_transform_dr, graphite_legal_transform_bb,
1720 graphite_legal_transform): New.
1721 * graphite-poly.h (graphite_legal_transform): Declared.
1722 * graphite-sese-to-poly.c (build_poly_scop): Call to
1723 graphite_legal_transform is disabled for the moment.
1724
17252009-04-24 Sebastian Pop <sebastian.pop@amd.com>
1726
1727 * graphite-poly.h (pbb_nb_scattering_dims): New.
1728 (pbb_nb_scattering): Use it.
1729
17302009-04-24 Sebastian Pop <sebastian.pop@amd.com>
1731
1732 * graphite-ppl.c (ppl_insert_dimensions_pointset): Add
1733 Pointset_Powerset version of ppl_insert_dimensions.
1734 * graphite-ppl.h (ppl_insert_dimensions_pointset): Declared.
1735
17362009-04-24 Sebastian Pop <sebastian.pop@amd.com>
1737
1738 * graphite-ppl.c (ppl_insert_dimensions): Fix formatting.
1739
17402009-04-24 Sebastian Pop <sebastian.pop@amd.com>
1741
1742 * graphite-poly.h: Fix comment.
1743
17442009-04-24 Sebastian Pop <sebastian.pop@amd.com>
1745
1746 * graphite-sese-to-poly.c (build_poly_dr): Fix data ref multiplier.
1747
17482009-04-24 Tobias Grosser <grosser@fim.uni-passau.de>
1749
1750 * sese.c (expand_scalar_variables_stmt): Only iterate over the old
1751 statements.
1752
17532009-04-24 Tobias Grosser <grosser@fim.uni-passau.de>
1754
1755 * graphite-sese-to-poly.c (var_used_in_not_loop_header_phi_node): New.
1756 (graphite_stmt_p): Represent bbs necessary to build the phi nodes of
1757 conditions.
1758
17592009-04-20 Sebastian Pop <sebastian.pop@amd.com>
1760
1761 * graphite-scop-detection.c (stmt_simple_for_scop_p): Do not
1762 handle EQ_EXPR and NE_EXPR.
1763
17642009-04-17 Tobias Grosser <grosser@fim.uni-passau.de>
1765
1766 * graphite-poly.h (poly_dr): Fix comment.
1767
17682009-04-09 Sebastian Pop <sebastian.pop@amd.com>
1769 Tobias Grosser <grosser@fim.uni-passau.de>
1770
1771 * graphite-poly.c (new_poly_bb): Do not initialize PBB_DOMAIN
1772 with a zero dimension polyhedron.
1773 (find_scop_parameters): Move the call to scop_set_nb_params here.
1774 (build_loop_iteration_domains): Store in loop->aux the iteration
1775 domain polyhedron.
1776 (build_scop_iteration_domain): Fix PBB_DOMAIN for bbs not surrounded
1777 by any loop in scop.
1778 (build_poly_scop): Do not call scop_set_nb_params.
1779
17802009-04-09 Sebastian Pop <sebastian.pop@amd.com>
1781 Tobias Grosser <grosser@fim.uni-passau.de>
1782
1783 * graphite-sese-to-poly.c (add_condition_to_pbb): Pass code to
1784 add_condition_to_domain not GT_EXPR.
1785
17862009-04-09 Tobias Grosser <grosser@fim.uni-passau.de>
1787
1788 * graphite-ppl.c (debug_ppl_powerset_matrix): New.
1789 * graphite-ppl.h (debug_ppl_powerset_matrix): New.
1790 * graphite-sese-to-poly.c (add_condition_to_pbb): Use
1791 upper_bound_assign to calculate unions.
1792 * testsuite/gcc.dg/graphite/id-6.c: New.
1793
17942009-04-09 Tobias Grosser <grosser@fim.uni-passau.de>
1795
1796 * graphite-scop-detection.c (canonicalize_loop_closed_ssa): Do not
1797 handle abnormal edges.
1798
17992009-04-09 Tobias Grosser <grosser@fim.uni-passau.de>
1800
1801 * graphite-poly.c (new_poly_dr, free_poly_dr): New.
1802 (free_poly_bb): Also free poly_drs.
1803 * graphite-poly.h (new_poly_dr, free_poly_dr): New.
1804 (poly_dr): Polyhedron to Pointset_Powerset.
1805 (pdr_accessp_nb_subscripts): Same.
1806 * graphite-sese-to-poly.c (build_poly_dr): Same. And actually build
1807 poly_drs.
1808
18092009-04-08 Sebastian Pop <sebastian.pop@amd.com>
1810
1811 * graphite-clast-to-gimple.c (initialize_cloog_names): Change cloog
1812 names into more meaningful names.
1813
18142009-04-08 Sebastian Pop <sebastian.pop@amd.com>
1815
1816 * testsuite/gfortran.dg/graphite/interchange-1.c: New.
1817 * testsuite/gfortran.dg/graphite/interchange-2.c: New.
1818
18192009-04-08 Sebastian Pop <sebastian.pop@amd.com>
1820
1821 * graphite-clast-to-gimple.c (graphite_loop_normal_form): Do not build
1822 the reduction_list.
1823 * tree-parloops.c (rewrite_phi_with_iv): New.
1824 (rewrite_all_phi_nodes_with_iv): New.
1825 (canonicalize_loop_ivs): Call them.
1826
18272009-04-08 Sebastian Pop <sebastian.pop@amd.com>
1828
1829 * graphite-sese-to-poly.c (try_generate_gimple_bb): Use
1830 graphite_find_data_references_in_stmt.
1831 * tree-data-ref.c (graphite_find_data_references_in_stmt): New.
1832 * tree-data-ref.h (graphite_find_data_references_in_stmt): Declared.
1833
18342009-04-08 Sebastian Pop <sebastian.pop@amd.com>
1835
1836 * sese.c (add_loop_exit_phis): Don't fail on non SSA_NAME renames.
1837
18382009-04-08 Sebastian Pop <sebastian.pop@amd.com>
1839
1840 * graphite-sese-to-poly.c (build_scop_bbs_1): Use bb_in_sese_p
1841 instead of bb_in_region.
1842 (flag_bb_in_region): Same. Renamed flag_bb_in_sese.
1843 (build_sese_conditions): Use flag_bb_in_sese.
1844 * sese.c (register_bb_in_sese): Removed.
1845 (new_sese): Remove initialization of SESE_REGION_BBS.
1846 (free_sese): Do not free SESE_REGION_BBS.
1847 * sese.h (struct sese): Remove field region_basic_blocks.
1848 (SESE_REGION_BBS): Removed.
1849 (bb_in_sese_p): Implement in function of bb_in_region.
1850
18512009-04-08 Sebastian Pop <sebastian.pop@amd.com>
1852
1853 * graphite-scop-detection.c (limit_scops): Deal only with single exit
1854 loops.
1855
18562009-04-08 Tobias Grosser <grosser@fim.uni-passau.de>
1857
1858 * graphite-scop-detection.c (stmt_simple_for_scop_p): Allow NE_EXPR
1859 and EQ_EXPR.
1860 * graphite-sese-to-poly.c (create_linear_expr_from_tree): New.
1861 (add_condition_to_domain): New.
1862 (add_condition_to_pbb): New.
1863 (add_conditions_to_domain): Cleanup and handle of NE_EXPR and EQ_EXPR.
1864 * testsuite/gcc.dg/graphite/scop-3.c: Update number of detected SCoPs.
1865
18662009-04-08 Tobias Grosser <grosser@fim.uni-passau.de>
1867
1868 * graphite-clast-to-gimple.c (build_cloog_prog): ppl_Polyhedron ->
1869 ppl_Pointset_Powerset.
1870 * graphite-poly.c (new_poly_bb, free_poly_bb): Same.
1871 * graphite-poly.h (poly_bb): poly_bb.domain Same.
1872 (pbb_nb_loops): Same.
1873 * graphite-sese-to-poly.c (build_loop_iteration_domains,
1874 add_conditions_to_domain): Same.
1875 * graphite-ppl.c (new_Cloog_Domain_from_ppl_Pointset_Powerset): New.
1876 (ppl_print_polyhedron_matrix): ppl_Polyhedron_t ->
1877 ppl_const_Polyhedron_t.
1878 (ppl_print_powerset_matrix): New.
1879 * graphite-ppl.h (new_Cloog_Domain_from_ppl_Pointset_Powerset,
1880 ppl_print_powerset_matrix): New.
1881 (ppl_print_polyhedron_matrix): Updated.
1882
18832009-04-07 Sebastian Pop <sebastian.pop@amd.com>
1884
1885 * tree-scalar-evolution.c (analyze_scalar_evolution_1): Fix comment.
1886
18872009-04-07 Sebastian Pop <sebastian.pop@amd.com>
1888
1889 * graphite-poly.c (extend_scattering): Fix indenting. Free cstr.
1890 (print_iteration_domains, debug_iteration_domain,
1891 debug_iteration_domains): New.
1892 * graphite-poly.h (print_iteration_domains, debug_iteration_domain,
1893 debug_iteration_domains): Declared.
1894 * graphite-sese-to-poly.c (build_pbb_scattering_polyhedrons): Fix
1895 indenting.
1896
18972009-04-03 Tobias Grosser <grosser@fim.uni-passau.de>
1898 Sebastian Pop <sebastian.pop@amd.com>
1899
1900 * graphite-poly.h (print_iteration_domain): New.
1901 * graphite-sese-to-poly.c (add_conditions_to_domain): Fixed bug.
1902 (build_sese_conditions_1, build_sese_conditions_after,
1903 build_sese_conditions_before): New.
1904 (build_sese_conditions): Rewritten.
1905
19062009-04-03 Sebastian Pop <sebastian.pop@amd.com>
1907 Tobias Grosser <grosser@fim.uni-passau.de>
1908
1909 Cleanup of code generation liveouts.
1910 * graphite-clast-to-gimple.c (translate_clast): Use a single
1911 rename_map instead of one per translated statement.
1912 Do not use SESE_LIVEOUT_RENAMES.
1913 (graphite_loop_normal_form): Do not use SESE_REDUCTION_LIST.
1914 (gloog): Do not use SESE_LIVEOUT_RENAMES.
1915 * graphite-scop-detection.c (harmful_stmt_in_bb): Return the close
1916 phi node of a reduction: when a loop contains a reduction used outside
1917 the loop, there should be a scalar close phi node on the exit block.
1918 * sese.c (new_sese): Do not initialize SESE_LIVEOUT,
1919 SESE_LIVEOUT_RENAMES, and SESE_REDUCTION_LIST.
1920 (free_sese): Do not free them.
1921 (sese_build_liveouts_use): Do not use them.
1922 (sese_build_liveouts_bb): Same.
1923 (sese_build_liveouts): Same.
1924 (sese_insert_phis_for_liveouts): Same.
1925 (sese_adjust_phis_for_liveouts): Same. Renamed sese_adjust_liveout_phis.
1926 (defined_in_loop_p): New.
1927 (alive_after_loop): New.
1928 (close_phi_not_yet_inserted_p): New.
1929 (struct alep, alep_p): New.
1930 (add_loop_exit_phis): Remove from the rename_map all the names defined
1931 in the code generated loop.
1932 (insert_loop_close_phis): Traverse the rename_map passed to it.
1933 Don't use SESE_LIVEOUT_RENAMES.
1934 (default_liveout_before_guard): Renamed default_before_guard.
1935 (insert_guard_phis): Do not use SESE_LIVEOUT_RENAMES.
1936 (graphite_copy_stmts_from_block): Do not directly call set_rename.
1937 (register_sese_liveout_renames): Removed.
1938 (copy_bb_and_scalar_dependences): Do not call it.
1939 * sese.h (struct sese): Removed fields: liveout, liveout_renames, and
1940 reduction_list.
1941 (SESE_LIVEOUT): Removed.
1942 (SESE_LIVEOUT_RENAMES): Removed.
1943 (SESE_REDUCTION_LIST): Removed.
1944 (sese_build_liveouts): Removed.
1945 (sese_adjust_phis_for_liveouts): Renamed sese_adjust_liveout_phis.
1946 (insert_loop_close_phis): Pass a htab_t instead of a sese.
1947 (insert_guard_phis): Same.
1948 (rename_map_elt): Declare a VEC of them.
1949 * tree-parloops.c (canonicalize_loop_ivs): reduction_list contains
1950 trees not pointers to trees.
1951
1952 Rewrite in canonical close SSA form:
1953 * graphite-scop-detection.c (contains_only_close_phi_nodes): New.
1954 (limit_scops): Close the scop after the block containing the close phi
1955 nodes.
1956 (canonicalize_loop_closed_ssa): New.
1957 (canonicalize_loop_closed_ssa_form): New.
1958 (build_scops): Call canonicalize_loop_closed_ssa_form.
1959
1960 * graphite-sese-to-poly.c: Fix typos.
1961
19622009-04-03 Sebastian Pop <sebastian.pop@amd.com>
1963
1964 * graphite-poly.c (print_scattering_function, print_pbb_domain):
1965 Extended.
1966 (dump_gbb_conditions, dump_gbb_cases, print_iteration_domain): New.
1967 (print_pbb): Add conditions.
1968
19692009-04-01 Tobias Grosser <grosser@fim.uni-passau.de>
1970 Sebastian Pop <sebastian.pop@amd.com>
1971
1972 * graphite-scop-detection.c (bb_in_sd_region): Use bb_in_region.
1973 * graphite-sese-to-poly.c (all_non_dominated_preds_marked_p): New.
1974 (build_scop_bbs_1): New.
1975 (build_scop_bbs): Rewrite.
1976 * sese.h (bb_in_region): New.
1977
19782009-03-29 Tobias Grosser <grosser@fim.uni-passau.de>
1979
1980 * graphite-poly.c (new_poly_bb, free_poly_bb): Initialize/free
1981 poly_drs vector.
1982 (print_scop): Style.
1983 * graphite-poly.h (poly_bb): Add drs vector.
1984 (PBB_DRS): Add accessor.
1985 * graphite-sese-to-poly.c (build_poly_dr): New.
1986 (build_pbb_drs, build_scop_drs): New.
1987 (build_poly_scop): call build_scop_drs (Disabled at the moment).
1988
19892009-03-29 Tobias Grosser <grosser@fim.uni-passau.de>
1990
1991 * tree-ssa-loop.c: Include forgotten toplev.h
1992
19932009-03-29 Tobias Grosser <grosser@fim.uni-passau.de>
1994
1995 * graphite-poly.c: (apply_poly_transforms): sorry -> gcc_unreachable.
1996 * testsuite/gcc.dg/graphite/pr37883.c: Remove -floop-*
1997 * testsuite/gcc.dg/graphite/pr37928.c: Same
1998 * testsuite/gcc.dg/graphite/pr38409.c: Same
1999 * testsuite/gcc.dg/graphite/pr38498.c: Same
2000 * testsuite/gcc.dg/graphite/pr38559.c: Same
2001 * testsuite/gcc.dg/graphite/pr39335.c: Same
2002 * testsuite/gcc.dg/graphite/pr39335_1.c: Same
2003 * testsuite/gfortran.dg/graphite/block-2.f: Same
2004 * tree-ssa-loop.c (gate_graphite_transforms): Always fail if called
2005 with -floop-*.
2006
20072009-03-28 Tobias Grosser <grosser@fim.uni-passau.de>
2008
2009 * graphite-sese-to-poly.c (ref_nb_loops, build_access_matrix_with_af,
2010 build_access_matrix, build_scop_data_accesses): Remove access function
2011 building. (We get a new version soon).
2012 (build_bb_loops, scan_tree_for_params_right_scev): Update.
2013 * sese.h (nb_loops_around_loop_in_sese): Remove.
2014 (sese_loop_depth): Do not use SESE_LOOP_NEST any more.
2015
20162009-03-27 Tobias Grosser <grosser@fim.uni-passau.de>
2017 Sebastian Pop <sebastian.pop@amd.com>
2018
2019 * graphite-scop-detection.c (struct scopdet_info): Rename last
2020 field to exit.
2021 (scopdet_basic_block_info, build_scops_1): Don't use
2022 CDI_POST_DOMINATORS. CDI_POST_DOMINATORS should never be used.
2023
20242009-03-26 Tobias Grosser <grosser@fim.uni-passau.de>
2025 Sebastian Pop <sebastian.pop@amd.com>
2026
2027 * graphite-clast-to-gimple.c (gloog): Call sese_build_liveouts.
2028 * sese.c (sese_build_liveouts_use): Renamed from
2029 sese_build_livein_liveouts_use. Remove liveins.
2030 (sese_build_liveouts_bb): Renamed from sese_build_livein_liveouts_bb.
2031 Call sese_build_liveouts_use.
2032 (sese_build_liveouts): Renamed from sese_build_livein_liveouts.
2033 Call sese_build_liveouts_bb.
2034 (new_sese, free_sese): Remove liveins.
2035 (sese_add_exit_phis_var): Deleted.
2036 (sese_insert_phis_for_liveouts): Call sese_add_exit_phis_edge
2037 directly.
2038 (graphite_copy_stmts_from_block): Remove SESE_NUM_VER.
2039
2040 * sese.h (sese): Remove num_ver and livein.
2041 (SESE_LIVEIN, SESE_LIVEIN_VER, SESE_NUM_VER): Removed.
2042
20432009-03-25 Tobias Grosser <grosser@fim.uni-passau.de>
2044
2045 * graphite-sese-to-poly.c (build_scop_scattering): Fix compile.
2046
20472009-03-25 Tobias Grosser <grosser@fim.uni-passau.de>
2048
2049 * graphite-sese-to-poly.c (compare_prefix_loops): Removed.
2050 (build_scop_scattering): Do not use compare_prefix_loops any more.
2051 (nb_common_loops): New.
2052
20532009-03-24 Sebastian Pop <sebastian.pop@amd.com>
2054
2055 * sese.c (get_new_name_from_old_name): Renamed get_rename.
2056 (register_old_and_new_names): Renamed set_rename.
2057
20582009-03-24 Sebastian Pop <sebastian.pop@amd.com>
2059
2060 * graphite-scop-detection.h (nb_reductions_in_loop): Revert removal
2061 of the decl from the previous commit.
2062
20632009-03-24 Sebastian Pop <sebastian.pop@amd.com>
2064
2065 * graphite-scop-detection.c (dot_scop): New.
2066 * graphite-scop-detection.h (dot_scop): Declared.
2067
20682009-03-24 Sebastian Pop <sebastian.pop@amd.com>
2069
2070 * graphite-sese-to-poly.c (compare_prefix_loops): Fix compare.
2071
20722009-03-24 Sebastian Pop <sebastian.pop@amd.com>
2073
2074 * cfgloopmanip.c (create_empty_loop_on_edge): Generate the loop exit
2075 condition at the end of the loop.
2076 * graphite.c (graphite_initialize, graphite_finalize): Print to
2077 dump_file the compiled function.
2078 * graphite-clast-to-gimple.c (graphite_create_new_loop): Update use
2079 of create_empty_loop_on_edge.
2080 (translate_clast): Update the code generation of loops for the new
2081 shape of loops.
2082 * cfgloop.h (create_empty_loop_on_edge): Update declaration.
2083
20842009-03-24 Sebastian Pop <sebastian.pop@amd.com>
2085
2086 Reverted the patch from 2009-03-19.
2087
20882009-03-19 Tobias Grosser <grosser@fim.uni-passau.de>
2089
2090 * graphite-poly.c (new_poly_bb, free_poly_bb): Initialize/free
2091 poly_drs vector.
2092 (print_scop): Style.
2093 * graphite-poly.h (poly_bb): Add drs vector.
2094 (PBB_DRS): Add accessor.
2095 * graphite-sese-to-poly.c (ref_nb_loops): Remove.
2096 (build_access_matrix_with_af, build_access_matrix,
2097 build_scop_data_accesses): Delete.
2098 (build_poly_dr): New.
2099 (build_pbb_drs, build_scop_drs): New.
2100 (build_poly_scop): call build_scop_drs.
2101
21022009-03-13 Sebastian Pop <sebastian.pop@amd.com>
2103
2104 * graphite-scop-detection.c (dot_all_scops_1): Close the table
2105 once per basic block.
2106
21072009-03-13 Tobias Grosser <grosser@fim.uni-passau.de>
2108
2109 * graphite-scop-detection.c (graphite_can_represent_scev): New.
2110 (graphite_can_represent_expr): Renamed from loop_affine_expr
2111 and enhanced.
2112 (stmt_simple_for_scop_p): Call graphite_can_represent_expr.
2113 (graphite_cannot_represent_loop): Add scop_entry to parameters.
2114 (scopdet_basic_block_info): Actually define entry_block.
2115 (stmt_simple_memref_p): Moved here from ...
2116
2117 * tree-data-ref.c (stmt_simple_memref_p): here.
2118 * tree-data-ref.h (stmt_simple_memref_p): Removed.
2119
21202009-03-13 Tobias Grosser <grosser@fim.uni-passau.de>
2121
2122 * testsuite/gcc.dg/graphite/id-4.c: New.
2123
21242009-03-12 Sebastian Pop <sebastian.pop@amd.com>
2125
2126 * sese.c (expand_scalar_variables_expr): Handle tcc_comparison.
2127 (register_old_and_new_names): Update the content of the map.
2128 When there was already a rename_map_elt in the map at that
2129 location, free it.
2130 (copy_bb_and_scalar_dependences): Do rename_variables after
2131 expand_scalar_variables.
2132 * graphite-clast-to-gimple.c (build_iv_mapping): Update the content
2133 of the map. When there was already a rename_map_elt in the
2134 map at that location, free it.
2135 (translate_clast): Pass the rename_map. Do not initialize and free
2136 a rename_map per stmt_user.
2137 (gloog): Initialize and free one rename_map and pass it to
2138 translate_clast.
2139
21402009-03-12 Sebastian Pop <sebastian.pop@amd.com>
2141
2142 * sese.c (expand_scalar_variables_stmt,
2143 expand_scalar_variables_ssa_name): Add a gimple_stmt_iterator
2144 parameter.
2145 (expand_scalar_variables_expr): Handle REALPART_EXPR and IMAGPART_EXPR.
2146 (expand_scalar_variables): Pass to expand_scalar_variables_stmt
2147 the gimple_stmt_iterator of the statement to be expanded.
2148 * graphite-scop-detection.c (is_simple_operand): Do handle
2149 REALPART_EXPR.
2150
21512009-03-11 Tobias Grosser <grosser@fim.uni-passau.de>
2152
2153 * graphite-scop-detection.c (is_simple_operand): Do not handle
2154 REALPART_EXPR.
2155 * testsuite/gcc.dg/graphite/id-2.c: New.
2156
2157 * graphite-sese-to-poly.c (build_bb_loops,
2158 add_value_to_dim, scan_tree_for_params_right_scev,
2159 scan_tree_for_params_int, scan_tree_for_params, idx_record_params,
2160 find_params_in_bb, build_loop_iteration_domains,
2161 add_conditions_to_domain): Remove subtract.
2162
21632009-03-11 Tobias Grosser <grosser@fim.uni-passau.de>
2164
2165 * graphite-clast-to-gimple.c (loop_iv_stack_patch_for_consts,
2166 build_iv_mapping, compute_cloog_iv_types_1, build_cloog_prog):
2167 pbb_loop_at_index -> gbb_loop_at_index.
2168 * graphite-poly.c (new_poly_bb, new_scop): New accessors.
2169 (debug_loop_vec): Delete.
2170 * graphite-poly.h (poly_bb, scop): Change black_box and region to void
2171 pointer. Move LOOPS to gimple_bb_p and insert nb_params.
2172 (PBB_LOOPS): Removed.
2173 (PBB_BLACK_BOX): Insert cast.
2174 (pbb_set_black_box): New setter.
2175 (pbb_loop_at_index, pbb_loop_index): Removed.
2176 (scop_set_region, scop_set_nb_params): New.
2177 * graphite-sese-to-poly.c (new_gimple_bb, free_gimple_bb,
2178 build_scop_scattering, build_bb_loops): Add GBB_LOOPS.
2179 (build_poly_scop): Use scop_set_nb_params.
2180 * sese.h (gimple_bb): Add LOOPS.
2181 (GBB_LOOPS, gbb_loop_index, gbb_loop_at_index): New.
2182
21832009-03-11 Tobias Grosser <grosser@fim.uni-passau.de>
2184
2185 Revert previous commit.
2186
21872009-03-11 Sebastian Pop <sebastian.pop@amd.com>
2188
2189 * sese.c (expand_scalar_variables_expr): Handle tcc_comparison.
2190 (register_old_and_new_names): Update the content of the map.
2191 When there was already a rename_map_elt in the map at that
2192 location, free it.
2193 (copy_bb_and_scalar_dependences): Do rename_variables after
2194 expand_scalar_variables.
2195 * graphite-clast-to-gimple.c (build_iv_mapping): Update the content
2196 of the map. When there was already a rename_map_elt in the
2197 map at that location, free it.
2198 (translate_clast): Pass the rename_map. Do not initialize and free
2199 a rename_map per stmt_user.
2200 (gloog): Initialize and free one rename_map and pass it to
2201 translate_clast.
2202
22032009-03-11 Tobias Grosser <grosser@fim.uni-passau.de>
2204
2205 Remove forgotten line in revert.
2206
22072009-03-11 Sebastian Pop <sebastian.pop@amd.com>
2208
2209 Revert previous commit.
2210
22112009-03-10 Sebastian Pop <sebastian.pop@amd.com>
2212
2213 * sese.c (register_old_and_new_names): Update the content
2214 of the map. When there was already a rename_map_elt in the
2215 map at that location, free it.
2216 (copy_bb_and_scalar_dependences): Do rename_variables after
2217 expand_scalar_variables.
2218 * graphite-clast-to-gimple.c (build_iv_mapping): Update the content
2219 of the map. When there was already a rename_map_elt in the
2220 map at that location, free it.
2221 (translate_clast): Pass the rename_map. Do not initialize and free
2222 a rename_map per stmt_user.
2223 (gloog): Initialize and free one rename_map and pass it to
2224 translate_clast.
2225
22262009-03-10 Sebastian Pop <sebastian.pop@amd.com>
2227
2228 * graphite-clast-to-gimple.c (translate_clast): context_loop
2229 is never NULL.
2230
22312009-03-10 Tobias Grosser <grosser@fim.uni-passau.de>
2232 Sebastian Pop <sebastian.pop@amd.com>
2233
2234 * graphite-ppl.c (ppl_insert_dimensions): Fix stupid mistake
2235 of the use of ppl_Polyhedron_map_space_dimensions.
2236
22372009-03-10 Tobias Grosser <grosser@fim.uni-passau.de>
2238 Sebastian Pop <sebastian.pop@amd.com>
2239
2240 * graphite-poly.c (unify_scattering_dimensions): Fix types.
2241 * graphite-poly.h (poly_dr_p, poly_dr, POLY_DR_TYPE, PDR_BB,
2242 PDR_TYPE, PDR_ACCESSES, pdr_accessp_nb_subscripts,
2243 pdr_accessp_nb_iterators, pdr_accessp_nb_params,
2244 pdr_accessp_alias_set_dim, pdr_accessp_subscript_dim,
2245 pdr_accessp_iterator_dim, pdr_accessp_param_dim,
2246 pbb_nb_params): New.
2247 (pbb_nb_loops, pbb_nb_scattering, scop_nb_params,
2248 nb_loops_around_pbb): Adapt return types.
2249
22502009-03-09 Tobias Grosser <grosser@fim.uni-passau.de>
2251
2252 * Makefile.in (graphite.o, graphite-sese-to-poly.o,
2253 graphite-clast-to-gimple.o, graphite-data-ref.o,
2254 graphite-scop-detection.o, graphite-poly.o): Add
2255 more headers.
2256
22572009-03-05 Tobias Grosser <grosser@fim.uni-passau.de>
2258
2259 * Makefile.in (graphite.o, graphite-sese-to-poly.o,
2260 graphite-clast-to-gimple.o, graphite-data-ref.o,
2261 graphite-scop-detection.o, graphite-poly.o): Add graphite-poly.h.
2262
22632009-03-04 Tobias Grosser <grosser@fim.uni-passau.de>
2264
2265 * testsuite/gcc.dg/graphite/pr37485.c: Remove -floop-block
2266 * testsuite/gcc.dg/graphite/pr37828.c: Same.
2267 * testsuite/gcc.dg/graphite/pr37684.c: Same.
2268 * testsuite/gcc.dg/graphite/block-0.c: Same.
2269 * testsuite/gcc.dg/graphite/block-1.c: Same.
2270 * testsuite/gcc.dg/graphite/block-2.c: Same.
2271 * testsuite/gcc.dg/graphite/block-3.c: Same.
2272 * testsuite/gcc.dg/graphite/block-4.c: Same.
2273 * testsuite/gcc.dg/graphite/block-5.c: Same.
2274 * testsuite/gcc.dg/graphite/block-6.c: Same.
2275 * testsuite/gfortran.dg/graphite/pr38083.f90: Same.
2276 * testsuite/gfortran.dg/graphite/block-1.f90: Same.
2277 * testsuite/gfortran.dg/graphite/block-3.f90: Same.
2278 * testsuite/gfortran.dg/graphite/pr37852.f90: Same.
2279 * testsuite/gfortran.dg/graphite/block-4.f90: Same.
2280 * testsuite/gfortran.dg/graphite/pr37980.f90: Same.
2281 * testsuite/gfortran.dg/graphite/pr38953.f90: Same.
2282 * testsuite/gfortran.dg/graphite/pr37857.f90: Same.
2283 * opts.c: Remove -floop-block from -O2.
2284 * graphite-poly.c: Fail if -floop-block -floop-interchange or
2285 -floop-strip-mine are used.
2286
22872009-03-04 Tobias Grosser <grosser@fim.uni-passau.de>
2288 Sebastian Pop <sebastian.pop@amd.com>
2289
2290 * graphite-clast-to-gimple.c (build_cloog_prog): Unify scattering
2291 dimensions.
2292 * graphite-poly.c (pbb_compare, graphite_sort_pbbs,
2293 graphite_trans_bb_move_loop, graphite_trans_bb_strip_mine,
2294 strip_mine_profitable_p, is_interchange_valid,
2295 graphite_trans_bb_block, graphite_trans_loop_block,
2296 graphite_trans_scop_block): Temporary removed.
2297 (extend_scattering, unify_scattering_dimensions): New.
2298 (print_scattering_function, graphite_read_transforms):
2299 PBB_SCATTERING -> PBB_TRANSFORMED_SCATTERING.
2300 (graphite_generate_scattering_fns): Removed.
2301 (apply_poly_transforms): Cleanup.
2302 (free_poly_bb): Add PBB_SCATTERING -> PBB_TRANSFORMED_SCATTERING.
2303 (schedule_to_scattering): Moved.
2304 (PBB_STATIC_SCHEDULE, PBB_SCATTERING): Removed.
2305 (PBB_ORIGINAL_SCATTERING, PBB_TRANSFORMED_SCATTERING): New.
2306 (pbb_nb_scattering): New.
2307 (SCOP_ENTRY, SCOP_EXIT, SCOP_REGION_BBS, SCOP_DEP_GRAPH, SCOP_PARAMS,
2308 SCOP_LOOP_NEST, SCOP_PARAMS, SCOP_OLDIVS, SCOP_LIVEOUT_RENAMES):
2309 Removed.
2310 * graphite-ppl.c (ppl_insert_dimensions): Extended and renamed from
2311 shift_poly.
2312 (ppl_strip_loop): PBB_SCATTERING -> PBB_TRANSFORMED_SCATTERING.
2313 * graphite-scop-detection.c (dot_all_scops_1): PBB_SCATTERING
2314 -> PBB_TRANSFORMED_SCATTERING.
2315 * graphite-sese-to-poly.c (build_scop_bbs): Remove region.
2316 (build_pbb_scattering_polyhedron): Moved from schedule_to_scattering.
2317 (build_scop_scattering): Renamed from build_scop_canonical_schedules.
2318 (check_poly_representation): Do not return bool.
2319 (graphite_transform_loops): Reformat.
2320 * sese.h (SESE_ENTRY_BB, SESE_EXIT_BB): New.
2321
23222009-03-04 Sebastian Pop <sebastian.pop@amd.com>
2323
2324 * graphite-poly.c (print_pbb_domain, print_pbb, print_scop,
2325 debug_pbb_domain, debug_pbb, debug_scop): New.
2326 * graphite-poly.h (print_pbb_domain, print_pbb, print_scop,
2327 debug_pbb_domain, debug_pbb, debug_scop): Declared.
2328
23292009-03-02 Sebastian Pop <sebastian.pop@amd.com>
2330
2331 PR middle-end/39335
2332 * tree-parloops.c (canonicalize_loop_ivs): Call fold_convert
2333 when the type precision of the induction variable should be
2334 larger than the type precision of nit.
2335 (gen_parallel_loop): Update use of canonicalize_loop_ivs.
2336 * graphite-clast-to-gimple.c (graphite_loop_normal_form): Same.
2337 * tree-flow.h (canonicalize_loop_ivs): Update declaration.
2338
2339 * testsuite/gcc.dg/graphite/pr39335_1.c: New.
2340 * testsuite/gcc.dg/graphite/pr39335.c: New.
2341
23422009-03-02 Sebastian Pop <sebastian.pop@amd.com>
2343
2344 * tree-parloops.c (canonicalize_loop_ivs): reduction_list contains
2345 SSA_NAMES not struct reduction_info.
2346
23472009-03-02 Sebastian Pop <sebastian.pop@amd.com>
2348
2349 * sese.c (expand_scalar_variables_expr): Handle ADDR_EXPR.
2350
23512009-02-27 Sebastian Pop <sebastian.pop@amd.com>
2352 Tobias Grosser <grosser@fim.uni-passau.de>
2353
2354 * sese.c (new_sese): Initialize SESE_REDUCTION_LIST.
2355 (free_sese): Free SESE_REDUCTION_LIST.
2356 * sese.h (struct sese): Add field reduction_list.
2357 (SESE_REDUCTION_LIST): New.
2358 * graphite-clast-to-gimple.c (graphite_loop_normal_form): Call
2359 canonicalize_loop_ivs on SESE_REDUCTION_LIST.
2360
23612009-02-27 Sebastian Pop <sebastian.pop@amd.com>
2362 Tobias Grosser <grosser@fim.uni-passau.de>
2363
2364 * tree-flow.h (gather_scalar_reductions): Use struct loop * instead
2365 of loop_p.
2366
23672009-02-27 Sebastian Pop <sebastian.pop@amd.com>
2368 Tobias Grosser <grosser@fim.uni-passau.de>
2369
2370 * tree-parloops.c (struct brli, build_reduction_list_info,
2371 analyze_reduction_list, gather_scalar_reductions): New.
2372 (loop_parallel_p): Build a reduction list containing only
2373 PHI_RESULT SSA_NAMEs: call gather_scalar_reductions.
2374 (gen_parallel_loop): Call the analysis analyze_reduction_list.
2375 (parallelize_loops): Now reduction_list is a htab_t of SSA_NAMEs.
2376 * tree-flow.h (gather_scalar_reductions): Declared.
2377
23782009-02-26 Sebastian Pop <sebastian.pop@amd.com>
2379
2380 PR middle-end/39308
2381 * graphite-clast-to-gimple.c (graphite_loop_normal_form): Do not call
2382 number_of_iterations_exit from a gcc_assert.
2383
23842009-02-25 Sebastian Pop <sebastian.pop@amd.com>
2385 Jan Sjodin <jan.sjodin@amd.com>
2386
2387 * output.h (graphite_out_file, graphite_in_file): Declared.
2388 * toplev.c (graphite_out_file, graphite_in_file): New.
2389 (init_asm_output): Initialize graphite_in_file and graphite_out_file.
2390 * graphite-clast-to-gimple.c (build_cloog_prog): Read PBB_SCATTERING.
2391 Don't call schedule_to_scattering.
2392 * common.opt (fgraphite-write, fgraphite-read): New.
2393 * graphite-poly.c: Include output.h.
2394 (print_scattering_function, print_scattering_functions,
2395 debug_scattering_function, debug_scattering_functions,
2396 graphite_write_transforms, graphite_read_transforms,
2397 graphite_generate_scattering_fns): New.
2398 (apply_poly_transforms): Do not apply transform if flag_graphite_read.
2399 Call graphite_generate_scattering_fns, graphite_write_transforms,
2400 graphite_read_transforms.
2401 (new_poly_bb): Initialize PBB_SCATTERING.
2402 (free_poly_bb): Free PBB_SCATTERING.
2403 (schedule_to_scattering): Does not return, initialize PBB_SCATTERING.
2404 * graphite-poly.h (struct poly_bb): Add field scattering.
2405 (PBB_SCATTERING): New.
2406 (print_scattering_function, print_scattering_functions,
2407 debug_scattering_function, debug_scattering_functions): Declared.
2408 * graphite-ppl.c (cloog_matrix_to_ppl_constraint): Matrices contain
2409 GMP values, not integers!
2410 (ppl_print_polyhedron_matrix, debug_ppl_polyhedron_matrix,
2411 ppl_read_polyhedron_matrix): New.
2412 * graphite-ppl.h (ppl_print_polyhedron_matrix,
2413 debug_ppl_polyhedron_matrix,
2414 ppl_read_polyhedron_matrix): Declared.
2415 * Makefile.in (graphite-poly.o): Depends on output.h.
2416
24172009-02-23 Sebastian Pop <sebastian.pop@amd.com>
2418 Tobias Grosser <grosser@fim.uni-passau.de>
2419
2420 Revert this change:
2421 * graphite-scop-detection.c (stmt_simple_for_scop_p): Analyze
2422 scalar evolutions in the scop_entry->loop_father.
2423
24242009-02-23 Sebastian Pop <sebastian.pop@amd.com>
2425 Tobias Grosser <grosser@fim.uni-passau.de>
2426
2427 * graphite.h (ref_nb_loops): Remove declaration.
2428 (struct gimple_bb, gimple_bb_p, GBB_BB, GBB_DATA_REFS, GBB_CONDITIONS,
2429 GBB_CONDITION_CASES, GBB_CLOOG_IV_TYPES, gbb_loop, print_gimple_bb,
2430 debug_gbb): Moved to sese.h.
2431 * sese.h: As said.
2432
24332009-02-23 Sebastian Pop <sebastian.pop@amd.com>
2434 Tobias Grosser <grosser@fim.uni-passau.de>
2435
2436 * graphite-data-ref.[ch]: Disable.
2437
24382009-02-23 Sebastian Pop <sebastian.pop@amd.com>
2439 Tobias Grosser <grosser@fim.uni-passau.de>
2440
2441 * graphite-scop-detection.c (stmt_simple_for_scop_p): Analyze
2442 scalar evolutions in the scop_entry->loop_father.
2443
24442009-02-23 Sebastian Pop <sebastian.pop@amd.com>
2445
2446 * graphite-scop-detection.c (nb_reductions_in_loop): Moved here...
2447 (graphite_cannot_represent_loop_niter): Renamed
2448 graphite_cannot_represent_loop. Call nb_reductions_in_loop.
2449 (limit_scops): build_sese_loop_nests does not return a bool.
2450 * graphite-scop-detection.h (nb_reductions_in_loop): Declared.
2451 * sese.c (nb_reductions_in_loop): ... from here.
2452 (graphite_loop_normal_form): ... from here.
2453 (sese_record_loop): Does not fail, so does not return a bool.
2454 (build_sese_loop_nests): Same.
2455 * sese.h (build_sese_loop_nests): Update declaration.
2456 * graphite-clast-to-gimple.c (graphite_loop_normal_form): Moved here...
2457 (build_graphite_loop_normal_form): New.
2458 (gloog): Call build_graphite_loop_normal_form.
2459 * graphite-sese-to-poly.c (build_poly_scop): Don't fail on
2460 build_sese_loop_nests.
2461
2462 * testsuite/gcc.dg/graphite/id-1.c: New.
2463
24642009-02-23 Sebastian Pop <sebastian.pop@amd.com>
2465 Tobias Grosser <grosser@fim.uni-passau.de>
2466
2467 * graphite-sese-to-poly.c (scan_tree_for_params): Remove REAL_CST.
2468 The SCoP detection fix is sufficient.
2469
24702009-02-21 Sebastian Pop <sebastian.pop@amd.com>
2471
2472 PR tree-optimization/39260
2473 * graphite-scop-detection.c (harmful_stmt_in_bb): Stop a SCoP when
2474 the basic block contains a condition with a real type.
2475 * graphite-sese-to-poly.c (scan_tree_for_params): Handle REAL_CST.
2476
2477 * gcc.dg/graphite/pr39260.c: New.
2478
24792009-02-21 Sebastian Pop <sebastian.pop@amd.com>
2480
2481 * graphite-poly.c: Inlcude params.h.
2482 (graphite_trans_loop_block): Use PARAM_LOOP_BLOCK_TILE_SIZE for
2483 the size of a tile.
2484 * Makefile.in (graphite-poly.o): Depend on PARAMS_H.
2485 * params.def (PARAM_LOOP_BLOCK_TILE_SIZE): Define.
2486
24872009-02-20 Sebastian Pop <sebastian.pop@amd.com>
2488 Tobias Grosser <grosser@fim.uni-passau.de>
2489
2490 * graphite-scop-detection.c (dot_all_scops_1,
2491 dot_all_scops): Moved here.
2492 * graphite-scop-detection.h (dot_all_scops): Declared here.
2493 * graphite.c (graphite_initialize, graphite_finalize): New.
2494 (graphite_transform_loops): Cleaned up.
2495 * sese.c (debug_oldivs): Moved here.
2496 * graphite-poly.c (graphite_apply_transformations): Renamed
2497 apply_poly_transforms.
2498 (debug_loop_vec): Moved here.
2499 * graphite-sese-to-poly.c (build_bb_loops, build_sese_conditions_1,
2500 scop_contains_non_iv_scalar_phi_nodes, build_sese_conditions,
2501 find_scop_parameters, build_scop_iteration_domain,
2502 add_conditions_to_constraints, build_scop_canonical_schedules,
2503 build_scop_data_accesses): Now static.
2504 (build_poly_scop, check_poly_representation): New.
2505
25062009-02-20 Sebastian Pop <sebastian.pop@amd.com>
2507
2508 * graphite.c (graphite_stmt_p, new_gimple_bb, free_gimple_bb,
2509 remove_gbbs_in_scop, free_scops, try_generate_gimple_bb,
2510 build_scop_bbs, ref_nb_loops, compare_prefix_loops,
2511 build_scop_canonical_schedules, build_bb_loops, add_value_to_dim,
2512 scan_tree_for_params_right_scev, scan_tree_for_params_int,
2513 scan_tree_for_params, struct irp_data, dx_record_params,
2514 find_params_in_bb, find_scop_parameters, gbb_from_bb,
2515 build_loop_iteration_domains, add_conditions_to_domain,
2516 phi_node_is_iv, bb_contains_non_iv_scalar_phi_nodes,
2517 scop_contains_non_iv_scalar_phi_nodes, build_sese_conditions_1,
2518 build_sese_conditions, add_conditions_to_constraints,
2519 build_scop_iteration_domain, build_access_matrix_with_af,
2520 build_access_matrix,
2521 build_scop_data_accesses): Moved to graphite-sese-to-poly.c.
2522
2523 * graphite-sese-to-poly.c: New.
2524 * graphite-sese-to-poly.h: New.
2525
2526 * Makefile.in: Add new rule for graphite-sese-to-poly.o.
2527
25282009-02-20 Sebastian Pop <sebastian.pop@amd.com>
2529
2530 * graphite.c: Split graphite code generation to a new file.
2531 (graphite_verify, gmp_cst_to_tree, clast_name_to_gcc,
2532 max_precision_type, clast_to_gcc_expression_red,
2533 clast_to_gcc_expression, gcc_type_for_clast_expr,
2534 gcc_type_for_clast_eq, loop_iv_stack_patch_for_consts,
2535 graphite_translate_clast_equation, graphite_create_guard_cond_expr,
2536 graphite_create_new_guard, clast_get_body_of_loop,
2537 gcc_type_for_cloog_iv, gcc_type_for_iv_of_clast_loop,
2538 graphite_create_new_loop, build_iv_mapping, copy_renames,
2539 translate_clast, find_cloog_iv_in_expr, compute_cloog_iv_types_1,
2540 compute_cloog_iv_types, free_scattering, save_var_name,
2541 initialize_cloog_names, build_scop_context, build_cloog_prog,
2542 set_cloog_options, debug_clast_stmt, scop_to_clast,
2543 print_generated_program, debug_generated_program,
2544 gloog): Moved to graphite-clast-to-gimple.c.
2545
2546 (struct cloog_prog_clast): Moved to graphite-clast-to-gimple.h.
2547
2548 (iv_stack_entry_is_constant, iv_stack_entry_is_iv,
2549 loop_iv_stack_push_iv, loop_iv_stack_insert_constant,
2550 loop_iv_stack_pop, loop_iv_stack_get_iv,
2551 loop_iv_stack_get_iv_from_name, debug_loop_iv_stack,
2552 free_loop_iv_stack, loop_iv_stack_remove_constants,
2553 debug_rename_elt, debug_rename_map_1, debug_rename_map,
2554 rename_map_elt_info, eq_rename_map_elts, debug_ivtype_elt,
2555 debug_ivtype_map_1, debug_ivtype_map, ivtype_map_elt_info,
2556 eq_ivtype_map_elts, sese_add_exit_phis_edge,
2557 sese_add_exit_phis_var, sese_insert_phis_for_liveouts,
2558 get_vdef_before_sese, sese_adjust_vphi,
2559 get_new_name_from_old_name, sese_adjust_phis_for_liveouts,
2560 oldiv_for_loop, rename_variables_in_stmt, is_parameter,
2561 is_iv, expand_scalar_variables_ssa_name,
2562 expand_scalar_variables_expr, expand_scalar_variables_stmt,
2563 expand_scalar_variables, rename_variables, remove_condition,
2564 get_true_edge_from_guard_bb, get_false_edge_from_guard_bb,
2565 add_loop_exit_phis, insert_loop_close_phis, struct igp,
2566 default_liveout_before_guard, add_guard_exit_phis,
2567 insert_guard_phis, register_old_and_new_names,
2568 graphite_copy_stmts_from_block, register_sese_liveout_renames,
2569 copy_bb_and_scalar_dependences, outermost_loop_in_sese,
2570 if_region_set_false_region, create_if_region_on_edge,
2571 move_sese_in_condition): Moved to sese.c.
2572
2573 (nb_loops_around_loop_in_sese, struct ifsese, if_region_entry,
2574 if_region_exit, if_region_get_condition_block,
2575 struct rename_map_elt, new_rename_map_elt, enum iv_stack_entry_kind,
2576 union iv_stack_entry_data_union, struct iv_stack_entry_struct,
2577 iv_stack_entry_p, loop_iv_stack, struct ivtype_map_elt,
2578 ivtype_map_elt, new_ivtype_map_elt,
2579 recompute_all_dominators): Moved to sese.h.
2580
2581 * graphite-clast-to-gimple.c: New.
2582 * graphite-clast-to-gimple.h: New.
2583 * Makefile.in: Add new rule for graphite-clast-to-gimple.o.
2584 * sese.c: Modified as said above.
2585 * sese.h: Same.
2586
25872009-02-20 Sebastian Pop <sebastian.pop@amd.com>
2588
2589 * graphite.c: Split scop detection to a new file.
2590 (enum gbb_type, gbb_type, get_bb_type, struct sd_region_p, sd_region,
2591 move_sd_regions, loop_affine_expr, exclude_component_ref,
2592 is_simple_operand, stmt_simple_for_scop_p, harmful_stmt_in_bb,
2593 graphite_cannot_represent_loop_niter, struct scopdet_info,
2594 scopdet_basic_block_info, build_scops_1, bb_in_sd_region,
2595 find_single_entry_edge, find_single_exit_edge,
2596 create_single_entry_edge, sd_region_without_exit,
2597 create_single_exit_edge, unmark_exit_edges, mark_exit_edges,
2598 create_sese_edges, build_graphite_scops, limit_scops, build_scops):
2599 Moved to graphite-scop-detection.c.
2600
2601 * graphite-scop-detection.c: New.
2602 * graphite-scop-detection.h: New.
2603 * Makefile.in: Add new rule for graphite-scop-detection.o.
2604
2605 * sese.c: Include tree-chrec.h, tree-data-ref.h, and
2606 tree-scalar-evolution.h.
2607 (nb_reductions_in_loop, graphite_loop_normal_form, sese_record_loop,
2608 build_sese_loop_nests): Moved here from graphite.c.
2609 (param_index): Renamed parameter_index_in_region.
2610
26112009-02-18 Tobias Grosser <grosser@fim.uni-passau.de>
2612 Sebastian Pop <sebastian.pop@amd.com>
2613
2614 * gcc.dg/graphite/block-0.c: Expected to fail now.
2615 * gcc.dg/graphite/block-1.c: Same.
2616 * gcc.dg/graphite/block-5.c: Same.
2617 * gcc.dg/graphite/block-6.c: Same.
2618
26192009-02-18 Tobias Grosser <grosser@fim.uni-passau.de>
2620 Sebastian Pop <sebastian.pop@amd.com>
2621
2622 * graphite.h: Separate from graphite_bb_p the polyhedral
2623 representation in poly_bb_p and the GCC specifics in gimple_bb_p.
2624 (struct data_dependence_polyhedron, RDGE_DDP, ddp_p): Moved to
2625 graphite-data-ref.h.
2626 (struct poly_bb, PBB_SCOP, PBB_STATIC_SCHEDULE, PBB_DOMAIN,
2627 PBB_BLACK_BOX, PBB_LOOPS, pbb_nb_loops, pbb_loop_at_index,
2628 pbb_loop_index, struct scop, SCOP_BBS, SCOP_REGION, SCOP_ENTRY,
2629 SCOP_EXIT, SCOP_REGION_BBS, SCOP_DEP_GRAPH, SCOP_PARAMS,
2630 SCOP_LOOP_NEST, SCOP_PARAMS, SCOP_OLDIVS, SCOP_LIVEOUT_RENAMES,
2631 scop_nb_params): Moved to graphite-poly.h.
2632 * graphite-data-ref.c: Same.
2633 * graphite-data-ref.h: New.
2634 * graphite.c: Same.
2635 (pbb_compare, graphite_sort_pbbs, graphite_trans_bb_move_loop,
2636 graphite_trans_bb_strip_mine, strip_mine_profitable_p,
2637 is_interchange_valid, graphite_trans_bb_block,
2638 graphite_trans_loop_block, scop_max_loop_depth,
2639 graphite_trans_scop_block, graphite_apply_transformations,
2640 new_poly_bb, free_poly_bb, new_scop, free_scop): Moved to
2641 graphite-poly.c.
2642 * graphite-poly.h: New.
2643 * graphite-poly.c: New.
2644 * Makefile.in (OBJS-common): Add graphite-poly.o.
2645 (graphite-poly.o): New rule.
2646 * tree-data-ref.h (struct data_reference): Remove unused scop field.
2647 (DR_SCOP): Removed.
2648
26492009-02-18 Sebastian Pop <sebastian.pop@amd.com>
2650 Tobias Grosser <grosser@fim.uni-passau.de>
2651
2652 * graphite.c: Replace gb -> gbb.
2653 * graphite.h: Same.
2654 * graphite-data-ref.c: Same.
2655
26562009-02-18 Sebastian Pop <sebastian.pop@amd.com>
2657 Tobias Grosser <grosser@fim.uni-passau.de>
2658
2659 * Makefile.in (OBJS-commmon): Add sese.o.
2660 (sese.o): New.
2661 (graphite.o): Add sese.h.
2662 * graphite.c (bb_in_ss_p, loop_in_sese_p,
2663 sese_build_livein_liveouts_use, sese_build_livein_liveouts_bb,
2664 sese_build_livein_liveouts, register_bb_in_sese, new_sese, free_sese):
2665 Move to sese.
2666 (block_before_scop): Add missing return.
2667 (new_scop, free_scop): Remove SESE data structures.
2668 (scop_record_loop, scan_tree_for_params, find_params_in_bb,
2669 find_scop_parameters, build_loop_iteration_domains,
2670 add_conditions_to_domain, register_scop_liveout_renames,
2671 copy_bb_and_scalar_dependences): Scop -> SESE.
2672
2673 (add_conditions_to_domain): SCoP -> SESE and remove check
2674 (scop_contains_non_iv_scalar_phi_nodes): New.
2675 (build_scop_conditions_1, build_scop_conditions): Remove check for
2676 non iv scalar phi nodes.
2677 (print_scop_statistics): New.
2678 (graphite_transform_loops): Cleanup.
2679
2680 * graphite.h: Move to sese & cleanup.
2681 * sese.c: New.
2682 * sese.h: New.
2683
26842009-02-16 Sebastian Pop <sebastian.pop@amd.com>
2685 Tobias Grosser <grosser@fim.uni-passau.de>
2686
2687 * graphite.c (build_scop_conditions_1): Conditions are only
2688 at the end of a basic block.
2689
26902009-02-16 Sebastian Pop <sebastian.pop@amd.com>
2691 Tobias Grosser <grosser@fim.uni-passau>
2692
2693 * graphite.h (struct graphite_bb): Remove compressed_alpha_matrix
2694 field.
2695 (GBB_ALPHA): Removed.
2696
26972009-02-16 Sebastian Pop <sebastian.pop@amd.com>
2698 Tobias Grosser <grosser@fim.uni-passau.de>
2699
2700 * graphite-data-ref.c (graphite_test_dependence): Don't use
2701 GBB_DYNAMIC_SCHEDULE.
2702 * graphite.c (new_graphite_bb): Same.
2703 (free_graphite_bb): Same.
2704 (build_scop_dynamic_schedules): Removed.
2705 (graphite_transform_loops): Don't call it.
2706 * graphite.h (struct graphite_bb): Remove dynamic_schedule field.
2707 (GBB_DYNAMIC_SCHEDULE): Removed.
2708
27092009-02-16 Sebastian Pop <sebastian.pop@amd.com>
2710 Tobias Grosser <grosser@fim.uni-passau.de>
2711
2712 * graphite.c (schedule_to_scattering): Don't use CloogMatrix.
2713 (print_graphite_bb): Same.
2714 (build_cloog_prog): Same.
2715
27162009-02-16 Sebastian Pop <sebastian.pop@amd.com>
2717 Tobias Grosser <grosser@fim.uni-passau.de>
2718
2719 * graphite.c (build_cloog_prog): Don't use CloogMatrix.
2720
27212009-02-16 Sebastian Pop <sebastian.pop@amd.com>
2722 Tobias Grosser <grosser@fim.uni-passau.de>
2723
2724 * graphite.c (build_scop_context): Don't use CloogMatrix.
2725 * graphite-ppl.c (new_Cloog_Domain_from_ppl_Polyhedron): New.
2726 * graphite-ppl.h (new_Cloog_Domain_from_ppl_Polyhedron): Declared.
2727
27282009-02-16 Sebastian Pop <sebastian.pop@amd.com>
2729 Tobias Grosser <grosser@fim.uni-passau.de>
2730
2731 * graphite.h (struct scop): Move params, old_ivs, loops, loop_nest,
2732 liveout_renames, add_params fields...
2733 (struct sese): ... here.
2734 (SESE_PARAMS, SESE_LOOPS, SESE_LOOP_NEST, SESE_ADD_PARAMS,
2735 SESE_PARAMS, SESE_OLDIVS, SESE_LIVEOUT_RENAMES): New.
2736
27372009-02-16 Sebastian Pop <sebastian.pop@amd.com>
2738 Tobias Grosser <grosser@fim.uni-passau.de>
2739
2740 * graphite.c (print_scop): Do not print the CLooG program.
2741 (new_scop, free_scop, initialize_cloog_names, build_scop_context,
2742 build_cloog_prog, gloog): Don't use SCOP_PROG.
2743 (find_transform): Renamed scop_to_clast.
2744 (print_generated_program, debug_generated_program): New.
2745 (graphite_transform_loops): Adapt to new interface.
2746 * graphite.h (struct scop): Remove program field.
2747 (SCOP_PROG): Removed.
2748 (print_generated_program, debug_generated_program): Declared.
2749
27502009-02-16 Sebastian Pop <sebastian.pop@amd.com>
2751
2752 * graphite-data-ref.c (schedule_precedes_p, schedule_same_p): New.
2753 (statement_precedes_p): Use schedule_same_p and schedule_precedes_p.
2754 * graphite.c (gbb_compare, schedule_to_scattering, print_graphite_bb,
2755 free_graphite_bb, build_scop_canonical_schedules,
2756 graphite_trans_bb_strip_mine, graphite_trans_scop_block): Static
2757 schedules are now represented using a ppl_Linear_Expression_t.
2758 * graphite.h (struct graphite_bb): Same.
2759 * graphite-ppl.c (ppl_lexico_compare_linear_expressions): New.
2760 * graphite-ppl.h (ppl_lexico_compare_linear_expressions): Declared.
2761
27622009-02-15 Sebastian Pop <sebastian.pop@amd.com>
2763
2764 * graphite.c: Free local memory.
2765 * graphite-ppl.c: Same.
2766
27672009-02-15 Sebastian Pop <sebastian.pop@amd.com>
2768
2769 * graphite.c (const_column_index, get_first_matching_sign_row_index,
2770 get_lower_bound_row, get_upper_bound_row, copy_constraint,
2771 swap_constraint_variables, scale_constraint_variable): Removed.
2772 (graphite_trans_bb_strip_mine): Remove pong.
2773 * graphite-ppl.c: Include missing header files.
2774 (set_inhomogeneous, set_coef, shift_poly, ppl_strip_loop): New.
2775 * graphite-ppl.h (ppl_strip_loop): Declared.
2776 * Makefile.in (graphite-ppl.o): Adjust dependences.
2777
27782009-02-14 Sebastian Pop <sebastian.pop@amd.com>
2779
2780 * graphite.c (build_loop_iteration_domains): Remove ping pong.
2781 (build_scop_iteration_domain): Same.
2782
27832009-02-13 Sebastian Pop <sebastian.pop@amd.com>
2784
2785 * graphite.c (scan_tree_for_params, add_conditions_to_domain): Remove
2786 ping pong.
2787 (add_value_to_dim, scan_tree_for_params_right_scev,
2788 scan_tree_for_params_int): New.
2789 * graphite-ppl.c (oppose_constraint): New.
2790 (insert_constraint_into_matrix): Implement missing cases.
2791 * graphite-ppl.h (insert_constraint_into_matrix): Declared.
2792
27932009-02-13 Sebastian Pop <sebastian.pop@amd.com>
2794
2795 * graphite.c (graphite_trans_bb_move_loop): Remove ping pong,
2796 use ppl_move_dimension.
2797
27982009-02-12 Sebastian Pop <sebastian.pop@amd.com>
2799
2800 * graphite-data-ref.c: Domains are now ppl_Polyhedra_t.
2801 * graphite.c: Same.
2802 * graphite.h: Same.
2803 * graphite-ppl.c: Same.
2804 * graphite-ppl.h: Same.
2805
28062009-02-12 Sebastian Pop <sebastian.pop@amd.com>
2807
2808 Revert last 3 commits.
2809
28102009-02-10 Sebastian Pop <sebastian.pop@amd.com>
2811
2812 * graphite.c (scan_tree_for_params, add_conditions_to_domain): Remove
2813 ping pong.
2814 (add_value_to_dim, scan_tree_for_params_right_scev,
2815 scan_tree_for_params_int): New.
2816 * graphite-ppl.c (oppose_constraint): New.
2817 (insert_constraint_into_matrix): Implement missing cases.
2818 * graphite-ppl.h (insert_constraint_into_matrix): Declared.
2819
28202009-02-10 Sebastian Pop <sebastian.pop@amd.com>
2821
2822 * graphite.c (graphite_trans_bb_move_loop): Remove unused variables.
2823
28242009-02-10 Sebastian Pop <sebastian.pop@amd.com>
2825 Tobias Grosser <grosser@fim.uni-passau.de>
2826
2827 * graphite.c (graphite_trans_bb_move_loop): Remove ping pong,
2828 use ppl_move_dimension.
2829 * graphite-ppl.c (ppl_move_dimension): New.
2830 * graphite-ppl.h (ppl_move_dimension): Declared.
2831
28322009-02-10 Sebastian Pop <sebastian.pop@amd.com>
2833
2834 * graphite.c: Do not include cloog/cloog.h.
2835 (print_graphite_bb): Remove ping pong, call PPL print function.
2836
28372009-02-10 Tobias Grosser <grosser@fim.uni-passau.de>
2838
2839 * Makefile.in (OBJS-common): Add graphite-ppl.o.
2840 (graphite.o): Add dependence on graphite-ppl.h.
2841 (graphite-ppl.o): New.
2842 (graphite-data-ref.c): Ping pong between PPL data structures
2843 and matrices.
2844 * graphite-ppl.c: New.
2845 * graphite-ppl.h: New.
2846 * graphite.c: Include graphite-ppl.h.
2847 (print_graphite_bb, add_conditions_to_domain, build_cloog_prog,
2848 graphite_trans_bb_move_loop, graphite_trans_bb_strip_mine):
2849 Ping pong between PPL data structures and matrices.
2850 (new_graphite_bb): Create a PPL constraint system.
2851 Call ppl_delete_Constraint_System instead of cloog_matrix_free.
2852 (build_loop_iteration_domains): Use PPL functions.
2853 * graphite.h: Include graphite-ppl.h. Fix comments.
2854 (graphite_bb): Use a ppl_Constraint_System_t instead of
2855 CloogMatrix for representing the domain.
2856 (scop): Remove static_schedule.
2857 (gbb_nb_loops): Ping pong between PPL data structures and matrices.
2858
28592009-02-06 Sebastian Pop <sebastian.pop@amd.com>
2860
2861 * graphite.c: Fix some comments.
2862
28632009-02-05 Sebastian Pop <sebastian.pop@amd.com>
2864
2865 PR middle-end/38953
2866 * graphite.c (if_region_set_false_region): After moving a region
2867 in the false branch of a condition, remove the empty dummy
2868 basic block.
2869 (gloog): Remove wrong fix for PR38953.
2870
28712009-02-03 Tobias Grosser <grosser@fim.uni-passau.de>
2872
2873 * graphite.c (bb_in_sese_p, sese_build_livein_liveouts_use,
2874 sese_build_livein_liveouts_bb, sese_build_livein_liveouts,
2875 register_bb_in_sese, new_sese, free_sese): Moved.
2876 (dot_scop_1, build_scop_loop_nests, build_loop_iteration_domains,
2877 outermost_loop_in_scop, build_scop_iteration_domain,
2878 expand_scalar_variables_ssa_name, get_vdef_before_scop,
2879 limit_scops): Use bb_in_sese_p instead of bb_in_scop_p.
2880 Use loop_in_sese_p instead of loop_in_scop_p.
2881 (new_graphite_bb, new_scop, gloog): Do not initialize SCOP_BBS_B.
2882 (free_scop): Do not free SCOP_BBS_B.
2883 (nb_loops_around_loop_in_scop, nb_loops_around_gb,
2884 ref_nb_loops): Moved here...
2885 * graphite.h (ref_nb_loops): ... from here.
2886 (struct scop): Remove bbs_b bitmap.
2887 (SCOP_BBS_B, bb_in_scop_p, loop_in_scop_p): Removed.
2888 * testsuite/gcc.dg/graphite/scop-19.c: New
2889
28902009-02-03 Tobias Grosser <grosser@fim.uni-passau.de>
2891
2892 * graphite.c (scopdet_basic_block_info): Fix bug in scop
2893 detection.
2894
28952009-01-30 Tobias Grosser <grosser@fim.uni-passau.de>
2896
2897 * graphite.c (new_loop_to_cloog_loop_str, hash_loop_to_cloog_loop,
2898 eq_loop_to_cloog_loop): Remove.
2899 (new_scop, free_scop): Remove SCOP_LOOP2CLOOG_LOOP.
2900 * graphite.h (struct scop): Remove loop2cloog_loop.
2901 (loop_domain_dim, loop_iteration_vector_dim): Remove.
2902
29032009-01-30 Tobias Grosser <grosser@fim.uni-passau.de>
2904
2905 * opts.c (decode_options): Only add graphite options to O2
2906 if we compile with graphite enabled.
2907
29082009-01-26 Sebastian Pop <sebastian.pop@amd.com>
2909
2910 * Merge from mainline (r143163:143684).
2911
29122009-01-26 Sebastian Pop <sebastian.pop@amd.com>
2913
2914 * graphite.c (debug_value): Removed.
2915 * graphite.h (debug_value): Removed.
2916
29172009-01-23 Sebastian Pop <sebastian.pop@amd.com>
2918
2919 * passes.c (init_optimization_passes): Do not call pass_copy_prop
2920 after graphite: pass_copy_prop does not maintain a proper loop closed
2921 SSA form. pass_copy_prop should be fixed.
2922
29232009-01-23 Sebastian Pop <sebastian.pop@amd.com>
2924
2925 * graphite.c (scop_adjust_phis_for_liveouts): Fix warning.
2926
29272009-01-23 Sebastian Pop <sebastian.pop@amd.com>
2928
2929 * graphite.c (graphite_verify): Add a call to verify_loop_closed_ssa.
2930 (gloog): Split the exit of the scop when the scop exit is a loop exit.
2931 (graphite_transform_loops): Only call cleanup_tree_cfg if gloog
2932 changed the CFG.
2933
29342009-01-20 Sebastian Pop <sebastian.pop@amd.com>
2935
2936 * graphite.c (gloog): Return true when code gen succeeded.
2937 (graphite_transform_loops): Do not call cleanup_tree_cfg if
2938 the code of the function did not changed. After cleanup_tree_cfg
2939 call rewrite_into_loop_closed_ssa to maintain the loop closed ssa
2940 form.
2941
29422009-01-19 Sebastian Pop <sebastian.pop@amd.com>
2943
2944 * graphite.c (stmt_simple_for_scop_p): Also handle cases when
2945 gimple_call_lhs is NULL.
2946
29472009-01-16 Sebastian Pop <sebastian.pop@amd.com>
2948 Tobias Grosser <tobi.grosser@amd.com>
2949
2950 * graphite.c (graphite_trans_scop_block): Do not block single
2951 nested loops.
2952
29532009-01-15 Sebastian Pop <sebastian.pop@amd.com>
2954 Tobias Grosser <tobi.grosser@amd.com>
2955
2956 * graphite.c (build_scop_canonical_schedules): Start schedules at
2957 zero.
2958
29592009-01-15 Sebastian Pop <sebastian.pop@amd.com>
2960 Tobias Grosser <tobi.grosser@amd.com>
2961
2962 * graphite.c (compare_prefix_loops): New.
2963 (build_scop_canonical_schedules): Rewritten.
2964 (graphite_transform_loops): Move build_scop_canonical_schedules
2965 after build_scop_iteration_domain.
2966
29672009-01-14 Sebastian Pop <sebastian.pop@amd.com>
2968 Tobias Grosser <tobi.grosser@amd.com>
2969
2970 * graphite.c (add_conditions_to_domain): Add the loops to
2971 the dimension of the iteration domain. Do copy the domain
2972 only when it exists.
2973 (build_scop_conditions_1): Do not call add_conditions_to_domain.
2974 (add_conditions_to_constraints): New.
2975 (can_generate_code_stmt, can_generate_code): Removed.
2976 (gloog): Do not call can_generate_code.
2977 (graphite_transform_loops): Call add_conditions_to_constraints
2978 after building the iteration domain.
2979
29802009-01-14 Sebastian Pop <sebastian.pop@amd.com>
2981 Tobias Grosser <tobi.grosser@amd.com>
2982 Jan Sjodin <jan.sjodin@amd.com>
2983
2984 * graphite.c (scan_tree_for_params): On substractions negate
2985 all the coefficients of the term.
2986 (clast_to_gcc_expression_red): New. Handle reduction expressions
2987 of more than two operands.
2988 (clast_to_gcc_expression): Call clast_to_gcc_expression_red.
2989 (get_vdef_before_scop): Handle also the case of default definitions.
2990
29912009-01-14 Sebastian Pop <sebastian.pop@amd.com>
2992
2993 PR middle-end/38431
2994 * graphite.c (get_vdef_before_scop, scop_adjust_vphi): New.
2995 (scop_adjust_phis_for_liveouts): Call scop_adjust_vphi.
2996 (gloog): Do not call cleanup_tree_cfg.
2997 (graphite_transform_loops): Call cleanup_tree_cfg after all
2998 scops have been code generated.
2999
30002009-01-13 Sebastian Pop <sebastian.pop@amd.com>
3001
3002 * passes.c (init_optimization_passes): Schedule after
3003 graphite transforms pass_copy_prop, pass_dce_loop and pass_lim.
3004
30052009-01-13 Sebastian Pop <sebastian.pop@amd.com>
3006
3007 * graphite.c (expand_scalar_variables_stmt): Do not pass loop_p.
3008 Fix comment.
3009 (expand_scalar_variables_ssa_name): Do not pass loop_p. Fix comment.
3010 Set the type of an expression to the type of its assign statement.
3011 (expand_scalar_variables_expr): Do not pass loop_p.
3012 Fix comment. Stop recursion on tcc_constant or tcc_declaration.
3013 (copy_bb_and_scalar_dependences): Do not pass loop_p.
3014 (translate_clast): Update call to copy_bb_and_scalar_dependences.
3015
30162009-01-11 Sebastian Pop <sebastian.pop@amd.com>
3017
3018 * graphite.c (expand_scalar_variables_ssa_name): Set the type of
3019 an expression to the gimple_expr_type of its assign statement.
3020 (expand_scalar_variables_expr): Stop recursion on tcc_constant
3021 or tcc_declaration.
3022
30232009-01-11 Sebastian Pop <sebastian.pop@amd.com>
3024
3025 PR tree-optimization/38786
3026 * testsuite/gcc.dg/graphite/pr38786.c: New.
3027 * graphite.c (expand_scalar_variables_ssa_name): New, outlined from
3028 the SSA_NAME case of expand_scalar_variables_expr.
3029 (expand_scalar_variables_expr): Also gather the scalar computation
3030 used to index the memory access.
3031 (expand_scalar_variables_stmt): Pass to expand_scalar_variables_expr
3032 the gimple_stmt_iterator where it inserts new code.
3033
30342009-01-10 Sebastian Pop <sebastian.pop@amd.com>
3035
3036 * testsuite/gcc.dg/graphite/block-3.c: Fix compile error on 32bit.
3037
30382009-01-10 Sebastian Pop <sebastian.pop@amd.com>
3039
3040 * opts.c (decode_options): Enable flag_graphite_identity and
3041 flag_loop_block in -O2 and above.
3042
30432009-01-08 Sebastian Pop <sebastian.pop@amd.com>
3044
3045 * libjava/classpath/lib/gnu/java/awt/peer/gtk/GtkMouseInfoPeer.class:
3046 Fix merge problem: replace with the file from trunk.
3047
30482009-01-08 Sebastian Pop <sebastian.pop@amd.com>
3049
3050 * Merge from mainline (r141727:143163).
3051
30522009-01-07 Sebastian Pop <sebastian.pop@amd.com>
3053 Jan Sjodin <jan.sjodin@amd.com>
3054
3055 PR tree-optimization/38559
3056 * testsuite/gcc.dg/graphite/pr38559.c: New.
3057
3058 * graphite.c (debug_value, copy_constraint,
3059 swap_constraint_variables, scale_constraint_variable, ): New.
3060 (get_lower_bound, get_upper_bound): Removed.
3061 (graphite_trans_bb_strip_mine): Clean up this code that works
3062 only for constant number of iterations. Fully copy upper and
3063 lower bound constraints, not only the constant part of them.
3064 * graphite.h (debug_value): Declared.
3065
30662009-01-06 Jan Sjodin <jan.sjodin@amd.com>
3067
3068 PR tree-optimization/38492
3069 PR tree-optimization/38498
3070 * tree-check.c (operator_is_linear, scev_is_linear_expression): New.
3071 * tree-chrec.h (scev_is_linear_expression): Declared.
3072 * graphite.c (graphite_cannot_represent_loop_niter): New.
3073 (scopdet_basic_block_info): Call graphite_cannot_represent_loop_niter.
3074 (graphite_loop_normal_form): Use gcc_assert.
3075 (scan_tree_for_params): Use CASE_CONVERT.
3076 (phi_node_is_iv, bb_contains_non_iv_scalar_phi_nodes): New.
3077 (build_scop_conditions_1): Call bb_contains_non_iv_scalar_phi_nodes.
3078 Use gcc_assert. Discard scops that contain unhandled cases.
3079 (build_scop_conditions): Return a boolean status for unhandled cases.
3080 (strip_mine_profitable_p): Print the loop number, not its depth.
3081 (is_interchange_valid): Pass the depth of the loop nest, don't
3082 recompute it wrongly.
3083 (graphite_trans_bb_block): Same.
3084 (graphite_trans_bb_block): Print tentative of loop blocking.
3085 (graphite_trans_scop_block): Do not print that the loop has been
3086 blocked.
3087 (graphite_transform_loops): Do not handle scops that contain condition
3088 scalar phi nodes.
3089
3090 * testsuite/gcc.dg/graphite/pr38500.c: Fixed warning as committed
3091 in trunk.
3092 * testsuite/gcc.dg/graphite/block-0.c: Update test.
3093 * testsuite/gcc.dg/graphite/block-1.c: Same.
3094 * testsuite/gcc.dg/graphite/block-2.c: Remove xfail and test for
3095 blocking.
3096 * testsuite/gcc.dg/graphite/block-4.c: Remove test for strip mine.
3097 * testsuite/gcc.dg/graphite/block-3.c: New.
3098 * testsuite/gcc.dg/graphite/pr38498.c: New.
3099
31002008-12-22 Harsha Jagasia <harsha.jagasia@amd.com>
3101
3102 PR tree-optimization/38510
3103 * gcc.dg/graphite/pr38510.c: New.
3104 * graphite.c (recompute_all_dominators): Call mark_irreducible_loops.
3105 (translate_clast): Call recompute_all_dominators before
3106 graphite_verify.
3107 (gloog): Call recompute_all_dominators before graphite_verify.
3108
31092008-12-12 Sebastian Pop <sebastian.pop@amd.com>
3110
3111 PR tree-optimization/38492
3112 * graphite.c (rename_map_elt, debug_rename_elt,
3113 debug_rename_map_1, debug_rename_map, new_rename_map_elt,
3114 rename_map_elt_info, eq_rename_map_elts,
3115 get_new_name_from_old_name, bb_in_sese_p): Moved around.
3116 (sese_find_uses_to_rename_use): Renamed sese_build_livein_liveouts_use.
3117 (sese_find_uses_to_rename_bb): Renamed sese_build_livein_liveouts_bb.
3118 (sese_build_livein_liveouts): New.
3119 (new_sese, free_sese): New.
3120 (new_scop): Call new_sese.
3121 (free_scop): Call free_sese.
3122 (rename_variables_from_edge, rename_phis_end_scop): Removed.
3123 (register_old_new_names): Renamed register_old_and_new_names.
3124 (register_scop_liveout_renames, add_loop_exit_phis,
3125 insert_loop_close_phis, struct igp,
3126 default_liveout_before_guard, add_guard_exit_phis,
3127 insert_guard_phis, copy_renames): New.
3128 (translate_clast): Call insert_loop_close_phis and insert_guard_phis.
3129 (sese_add_exit_phis_edge): Renamed scop_add_exit_phis_edge.
3130 (rewrite_into_sese_closed_ssa): Renamed scop_insert_phis_for_liveouts.
3131 (scop_adjust_phis_for_liveouts): New.
3132 (gloog): Call scop_adjust_phis_for_liveouts.
3133
3134 * graphite.h (struct sese): Documented. Added fields liveout,
3135 num_ver and livein.
3136 (SESE_LIVEOUT, SESE_LIVEIN, SESE_LIVEIN_VER, SESE_NUM_VER): New.
3137 (new_sese, free_sese, sese_build_livein_liveouts): Declared.
3138 (struct scop): Added field liveout_renames.
3139 (SCOP_LIVEOUT_RENAMES): New.
3140
31412008-12-11 Sebastian Pop <sebastian.pop@amd.com>
3142
3143 PR tree-optimization/38409
3144 * gcc.dg/graphite/pr38409.c: New.
3145 * graphite.c (nb_reductions_in_loop): Use simple_iv.
3146
31472008-12-11 Sebastian Pop <sebastian.pop@amd.com>
3148
3149 * graphite.c (gcc_type_for_cloog_iv): By default return
3150 integer_type_node.
3151 (graphite_create_new_loop): Don't fold_convert the already
3152 fold_convert-ed expression.
3153
31542008-12-11 Harsha Jagasia <harsha.jagasia@amd.com>
3155
3156 PR tree-optimization/38446
3157 * gcc.dg/graphite/pr38446.c: New.
3158 * graphite.c (register_bb_in_sese): New.
3159 (bb_in_sese_p): Check if bb belongs to sese region by explicitly
3160 looking at the bbs in the region.
3161 * graphite.h (sese): Add region_basic_blocks pointer set to
3162 structure and initialize at the time of defining new scop.
3163
31642008-12-11 Tobias Grosser <grosser@fim.uni-passau.de>
3165
3166 * graphite.c (new_graphite_bb): Initialize GBB_STATIC_SCHEDULE.
3167 (find_params_in_bb): Do not free data refs.
3168 (free_graphite_bb): Add FIXME on disabled free_data_refs.
3169
31702008-12-11 Sebastian Pop <sebastian.pop@amd.com>
3171
3172 * testsuite/gcc.dg/graphite/scop-16.c: Test only scop specific info.
3173 * testsuite/gcc.dg/graphite/scop-17.c: Same.
3174 * testsuite/gcc.dg/graphite/block-5.c: New.
3175 * testsuite/gcc.dg/graphite/block-6.c: New.
3176 * testsuite/gcc.dg/graphite/pr37485.c: Clean dump file after.
3177 * testsuite/gcc.dg/graphite/pr37684.c: Same.
3178 * testsuite/gcc.dg/graphite/block-2.c: Same.
3179
3180 * graphite.c (struct ivtype_map_elt): New.
3181 (debug_ivtype_elt, debug_ivtype_map_1, debug_ivtype_map,
3182 new_ivtype_map_elt, ivtype_map_elt_info, eq_ivtype_map_elts,
3183 gcc_type_for_cloog_iv): New.
3184 (loop_iv_stack_patch_for_consts): Use the type of the induction
3185 variable from the original loop, except for the automatically
3186 generated loops, i.e., in the case of a strip-mined loop, in
3187 which case there is no original loop: in that case just use
3188 integer_type_node.
3189 (new_graphite_bb): Initialize GBB_CLOOG_IV_TYPES.
3190 (free_graphite_bb): Free GBB_CLOOG_IV_TYPES.
3191 (clast_name_to_gcc): Accept params to be NULL.
3192 (clast_to_gcc_expression): Take an extra parameter for the type.
3193 Convert to that type all the expressions built by this function.
3194 (gcc_type_for_clast_expr, gcc_type_for_clast_eq): New.
3195 (graphite_translate_clast_equation): Compute the type of the
3196 clast_equation before translating its LHS and RHS.
3197 (clast_get_body_of_loop, gcc_type_for_iv_of_clast_loop): New.
3198 (graphite_create_new_loop): Compute the type of the induction
3199 variable before translating the lower and upper bounds and before
3200 creating the induction variable.
3201 (rename_variables_from_edge, rename_phis_end_scop): New.
3202 (copy_bb_and_scalar_dependences): Call rename_phis_end_scop.
3203 (sese_add_exit_phis_edge): Do not use integer_zero_node.
3204 (find_cloog_iv_in_expr, compute_cloog_iv_types_1,
3205 compute_cloog_iv_types): New.
3206 (gloog): Call compute_cloog_iv_types before starting the
3207 translation of the clast.
3208
3209 * graphite.h (struct graphite_bb): New field cloog_iv_types.
3210 (GBB_CLOOG_IV_TYPES): New.
3211 (debug_ivtype_map): Declared.
3212 (oldiv_for_loop): New.
3213
32142008-12-10 Tobias Grosser <grosser@fim.uni-passau.de>
3215
3216 PR middle-end/38459
3217 * graphite.c (new_scop): Initialize SCOP_ADD_PARAMS.
3218 (param_index): Assert if parameter is not know after parameter
3219 detection.
3220 (find_params_in_bb): Detect params directly in GBB_CONDITIONS.
3221 (find_scop_parameters): Mark, that we have finished parameter
3222 detection.
3223 (graphite_transform_loops): Move condition detection before parameter
3224 detection.
3225 * graphite.h (struct scop): Add SCOP_ADD_PARAMS.
3226 * testsuite/gfortran.dg/graphite/pr38459.f90: New.
3227
32282008-12-09 Tobias Grosser <grosser@fim.uni-passau.de>
3229
3230 * graphite.c (graphite_transform_loops): Always call find_transform ()
3231 in ENABLE_CHECKING. So we test these code paths, even if we do not
3232 generate code.
3233
32342008-12-09 Tobias Grosser <grosser@fim.uni-passau.de>
3235
3236 * graphite.c (print_graphite_bb): Fix printing to file != dump_file.
3237 (print_scop): Ditto.
3238
32392008-12-08 Tobias Grosser <grosser@fim.uni-passau.de>
3240
3241 PR middle-end/38084
3242 Fix testsuite/gfortran.dg/graphite/id-3.f90.
3243 * graphite.c (scopdet_basic_block_info): Fix bug that found some
3244 regions more than once.
3245
32462008-12-03 Sebastian Pop <sebastian.pop@amd.com>
3247
3248 Fix testsuite/gfortran.dg/graphite/id-4.f90.
3249 * graphite.c (scan_tree_for_params): Do not compute the multiplicand
3250 when not needed.
3251
32522008-12-03 Sebastian Pop <sebastian.pop@amd.com>
3253
3254 Fix testsuite/gfortran.dg/graphite/id-1.f90.
3255 * graphite.c (gmp_cst_to_tree): Pass the type in parameter.
3256 (loop_iv_stack_patch_for_consts): Update use of gmp_cst_to_tree.
3257 (max_precision_type): New.
3258 (value_clast): Removed.
3259 (clast_to_gcc_expression): Be more careful to types of expressions.
3260 Use max_precision_type and update use of gmp_cst_to_tree.
3261 (graphite_translate_clast_equation): Use max_precision_type.
3262 (graphite_create_guard_cond_expr): Do not use integer_type_node,
3263 use the type of the condition.
3264 (graphite_create_new_loop): Do not use integer_type_node, use the
3265 max_precision_type of lb and ub.
3266
32672008-12-03 Sebastian Pop <sebastian.pop@amd.com>
3268
3269 * graphite.c (build_scops_1): Initialize open_scop.exit
3270 and sinfo.last.
3271
32722008-12-02 Sebastian Pop <sebastian.pop@amd.com>
3273
3274 * testsuite/gcc.dg/graphite/pr38084.c: New.
3275 * testsuite/gfortran.dg/graphite/id-1.f90: New.
3276 * testsuite/gfortran.dg/graphite/id-2.f90: New.
3277 * testsuite/gfortran.dg/graphite/id-3.f90: New.
3278 * testsuite/gfortran.dg/graphite/id-4.f90: New.
3279 * testsuite/gfortran.dg/graphite/pr37857.f90: New.
3280
32812008-12-02 Sebastian Pop <sebastian.pop@amd.com>
3282 Jan Sjodin <jan.sjodin@amd.com>
3283 Harsha Jagasia <harsha.jagasia@amd.com>
3284
3285 PR middle-end/37852
3286 PR middle-end/37883
3287 PR middle-end/37928
3288 PR middle-end/37980
3289 PR middle-end/38038
3290 PR middle-end/38039
3291 PR middle-end/38073
3292 PR middle-end/38083
3293 PR middle-end/38125
3294
3295 * testsuite/gcc.dg/graphite/pr38073.c: New.
3296 * testsuite/gcc.dg/graphite/pr37928.c: New.
3297 * testsuite/gcc.dg/graphite/pr37883.c: New.
3298 * testsuite/gcc.dg/graphite/pr38125.c: New.
3299 * testsuite/gfortran.dg/graphite/pr38083.f90: New.
3300 * testsuite/gfortran.dg/graphite/pr37852.f90: New.
3301 * testsuite/gfortran.dg/graphite/pr37980.f90: New.
3302
3303 * testsuite/gcc.dg/graphite/scop-18.c: Remove reduction, test for
3304 the number of detected scops. Copy exact same test for loop
3305 blocking...
3306 * testsuite/gcc.dg/graphite/block-1.c: Fix the number of expected
3307 loops to be blocked as reductions are not handled.
3308 * testsuite/gcc.dg/graphite/block-4.c: ...here. New.
3309
3310 * tree-phinodes.c (remove_phi_nodes): New, extracted from...
3311 * tree-cfg.c (remove_phi_nodes_and_edges_for_unreachable_block):
3312 ...here.
3313 * tree-flow.h (remove_phi_nodes, canonicalize_loop_ivs): Declared.
3314 * Makefile.in (graphite.o): Depend on value-prof.h.
3315 (graphite.o-warn): Removed -Wno-error.
3316 * tree-parloops.c (canonicalize_loop_ivs): Allow reduction_list
3317 to be a NULL pointer. Call update_stmt. Return the newly created
3318 cannonical induction variable.
3319
3320 * graphite.h (debug_rename_map): Declared. Fix some comments.
3321
3322 * graphite.c: Reimplement the code generation from graphite to gimple.
3323 Include value-prof.h.
3324 (loop_iv_stack_get_iv): Do not return NULL for constant substitutions.
3325 (get_old_iv_from_ssa_name): Removed.
3326 (graphite_stmt_p): New.
3327 (new_graphite_bb): Test for useful statements before building a
3328 graphite statement for the basic block.
3329 (free_graphite_bb): Do not free GBB_DATA_REFS: this is a bug
3330 in free_data_ref that calls BITMAP_FREE (DR_VOPS (dr)) without
3331 reason.
3332 (recompute_all_dominators, graphite_verify,
3333 nb_reductions_in_loop, graphite_loop_normal_form): New.
3334 (scop_record_loop): Call graphite_loop_normal_form.
3335 (build_scop_loop_nests): Iterate over all the blocks of the
3336 function instead of relying on the incomplete information from
3337 SCOP_BBS. Return the success of the operation.
3338 (find_params_in_bb): Use the data from GBB_DATA_REFS.
3339 (add_bb_domains): Removed.
3340 (build_loop_iteration_domains): Don't call add_bb_domains.
3341 Add the iteration domain only to the basic blocks that have been
3342 translated to graphite.
3343 (build_scop_conditions_1): Add constraints only if the basic
3344 block have been translated to graphite.
3345 (build_scop_data_accesses): Completely disabled until data
3346 dependence is correctly implemented.
3347 (debug_rename_elt, debug_rename_map_1, debug_rename_map): New.
3348 (remove_all_edges_1, remove_all_edges): Removed.
3349 (get_new_name_from_old_name): New.
3350 (graphite_rename_variables_in_stmt): Renamed
3351 rename_variables_in_stmt. Call get_new_name_from_old_name.
3352 Use replace_exp and update_stmt.
3353 (is_old_iv): Renamed is_iv.
3354 (expand_scalar_variables_stmt): Extra parameter for renaming map.
3355 Use replace_exp and update_stmt.
3356 (expand_scalar_variables_expr): Same. Use the map to get the
3357 new names for the renaming of induction variables and for the
3358 renaming of variables after a basic block has been copied.
3359 (expand_scalar_variables): Same.
3360 (graphite_rename_variables): Renamed rename_variables.
3361 (move_phi_nodes): Removed.
3362 (get_false_edge_from_guard_bb): New.
3363 (build_iv_mapping): Do not insert the induction variable of a
3364 loop in the renaming iv map if the basic block does not belong
3365 to that loop.
3366 (register_old_new_names, graphite_copy_stmts_from_block,
3367 copy_bb_and_scalar_dependences): New.
3368 (translate_clast): Heavily reimplemented: copy basic blocks,
3369 do not move them. Finally, in call cleanup_tree_cfg in gloog.
3370 At each translation step call graphite_verify ensuring the
3371 consistency of the SSA, loops and dominators information.
3372 (collect_virtual_phis, find_vdef_for_var_in_bb,
3373 find_vdef_for_var_1, find_vdef_for_var,
3374 patch_phis_for_virtual_defs): Removed huge hack.
3375 (mark_old_loops, remove_dead_loops, skip_phi_defs,
3376 collect_scop_exit_phi_args, patch_scop_exit_phi_args,
3377 gbb_can_be_ignored, scop_remove_ignoreable_gbbs, ): Removed.
3378 (remove_sese_region, ifsese, if_region_entry, if_region_exit,
3379 if_region_get_condition_block, if_region_set_false_region,
3380 create_if_region_on_edge, move_sese_in_condition, bb_in_sese_p,
3381 sese_find_uses_to_rename_use, sese_find_uses_to_rename_bb,
3382 sese_add_exit_phis_edge, sese_add_exit_phis_var,
3383 rewrite_into_sese_closed_ssa): New.
3384 (gloog): Remove dead code. Early return if code cannot be
3385 generated. Call cleanup_tree_cfg once the scop has been code
3386 generated.
3387 (graphite_trans_scop_block, graphite_trans_loop_block): Do not
3388 block loops with less than two loops.
3389 (graphite_apply_transformations): Remove the call to
3390 scop_remove_ignoreable_gbbs.
3391 (limit_scops): When build_scop_loop_nests fails, continue on
3392 the next scop. Fix open_scop.entry.
3393 (graphite_transform_loops): Call recompute_all_dominators: force the
3394 recomputation of correct CDI_DOMINATORS and CDI_POST_DOMINATORS.
3395 Call initialize_original_copy_tables and free_original_copy_tables
3396 to be able to copy basic blocks during code generation.
3397 When build_scop_loop_nests fails, continue on next scop.
3398 (value_clast): New union.
3399 (clast_to_gcc_expression): Fix type cast warning.
3400
34012008-11-09 Sebastian Pop <sebastian.pop@amd.com>
3402
3403 * Merge from mainline (r140838:141727).
3404
34052008-11-05 Tobias Grosser <grosser@fim.uni-passau.de>
3406
3407 PR middle-end/37833
3408
3409 * graphite.c (scan_tree_for_params): Add POINTER_PLUS_EXPR.
3410
34112008-11-05 Tobias Grosser <grosser@fim.uni-passau.de>
3412
3413 PR middle-end/37943
3414
3415 * graphite.c (scopdet_basic_block_info): Fix loops with multiple
3416 exits and conditions.
3417 * testsuite/gcc.dg/graphite/pr37943.c: New.
3418
34192008-10-23 Tobias Grosser <grosser@fim.uni-passau.de>
3420
3421 PR middle-end/37886
3422 * graphite.c (gloog): Replace EXIT_BLOCK_PTR with scop exit.
3423
34242008-10-23 Tobias Grosser <grosser@fim.uni-passau.de>
3425
3426 * doc/invoke.texi: Fix spaces.
3427
34282008-10-22 Sebastian Pop <sebastian.pop@amd.com>
3429
3430 PR tree-optimization/37891
3431 Reverted last commit.
3432 * graphite.c (create_single_entry_edge): Set
3433 EDGE_IRREDUCIBLE_LOOP and BB_IRREDUCIBLE_LOOP.
3434
34352008-10-21 Sebastian Pop <sebastian.pop@amd.com>
3436 Mitul Thakkar <mitul.thakkar@amd.com>
3437
3438 * graphite.c (create_single_entry_edge): Set
3439 EDGE_IRREDUCIBLE_LOOP and BB_IRREDUCIBLE_LOOP.
3440
34412008-10-16 Tobias Grosser <grosser@fim.uni-passau.de>
3442
3443 * doc/invoke.texi: Add -fgraphite-identity.
3444 * graphite.c (graphite_apply_transformations): Check for
3445 -fgraphite-identity.
3446 * toplev.c (process_options): Add flag_graphite_identity.
3447 * tree-ssa-loop.c: Add flag_graphite_identity.
3448
34492008-10-14 Sebastian Pop <sebastian.pop@amd.com>
3450
3451 Undo changes from 2008-10-02:
3452 * tree-ssa-loop-ivopts.c (rewrite_use_nonlinear_expr): Convert
3453 operand type when copying the operand to a variable of different type.
3454 * cfgloopmanip.c (create_empty_loop_on_edge): Write exit condition
3455 with the IV name after increment.
3456
34572008-10-14 Sebastian Pop <sebastian.pop@amd.com>
3458 Harsha Jagasia <harsha.jagasia@amd.com>
3459
3460 PR tree-optimization/37828
3461 * testsuite/gcc.dg/graphite/pr37828.c: New.
3462 * graphite.c (graphite_trans_loop_block): Do not loop block
3463 single nested loops.
3464
34652008-10-09 Harsha Jagasia <harsha.jagasia@amd.com>
3466 Sebastian Pop <sebastian.pop@amd.com>
3467
3468 * graphite.c (struct rename_map_elt, new_rename_map_elt,
3469 rename_map_elt_info, eq_rename_map_elts): New.
3470 (graphite_rename_ivs_stmt): Renamed graphite_rename_variables_in_stmt.
3471 (expand_scalar_variables_expr): Change parameters.
3472 (expand_scalar_variables_stmt): Same.
3473 (expand_scalar_variables): Same.
3474 (graphite_rename_ivs): Rename graphite_rename_variables.
3475 (build_iv_mapping): New.
3476 (translate_clast): Call build_iv_mapping.
3477 * graphite.h (gbb_p): New name.
3478
34792008-10-03 Harsha Jagasia <harsha.jagasia@amd.com>
3480
3481 PR tree-optimization/37684
3482 * gcc.dg/graphite/pr37684.c: New.
3483 * graphite.c (exclude_component_ref): New.
3484 (is_simple_operand): Call exclude_component_ref.
3485
34862008-10-02 Jan Sjodin <jan.sjodin@amd.com>
3487 Harsha Jagasia <harsha.jagasia@amd.com>
3488
3489 PR tree-optimization/37485
3490 * gcc.dg/graphite/block-2.c: New
3491 * graphite.c (gmp_cst_to_tree): Moved.
3492 (iv_stack_entry_is_constant): New.
3493 (iv_stack_entry_is_iv): New.
3494 (loop_iv_stack_push): Renamed to loop_iv_stack_push_iv.
3495 (loop_iv_stack_insert_constant): New.
3496 (loop_iv_stack_pop): Use new datatpype.
3497 (loop_iv_stack_get_iv): Same.
3498 (loop_iv_stack_get_iv_from_name): Same.
3499 (loop_iv_stack_debug): Renamed to debug_loop_iv_stack.
3500 (loop_iv_stack_patch_for_consts): New.
3501 (loop_iv_stack_remove_constants): New.
3502 (graphite_create_new_loop): Use loop_iv_stack_push_iv.
3503 (translate_clast): Call loop_iv_stack_patch_for_consts and
3504 loop_iv_stack_remove_constants.
3505 (gloog): Use new datatype. Redirect construction edge to end
3506 block to avoid accidental deletion.
3507 * graphite.h (enum iv_stack_entry_kind): New. Tag for data in
3508 iv stack entry.
3509 (union iv_stack_entry_data): New. Data in iv stack entry.
3510 (struct iv_stack_entry): New. Datatype for iv stack entries.
3511
35122008-10-02 Sebastian Pop <sebastian.pop@amd.com>
3513
3514 * tree-ssa-loop-ivopts.c (rewrite_use_nonlinear_expr): Convert
3515 operand type when copying the operand to a variable of different type.
3516
35172008-10-02 Sebastian Pop <sebastian.pop@amd.com>
3518
3519 * cfgloopmanip.c (create_empty_loop_on_edge): Write exit condition
3520 with the IV name after increment.
3521
35222008-10-02 Sebastian Pop <sebastian.pop@amd.com>
3523
3524 * Merge from mainline (r140164:140838).
3525
35262008-09-10 Konrad Trifunovic <konrad.trifunovic@inria.fr>
3527
3528 * graphite-data-ref.c: New.
3529 * graphite.c (print_scop): Also dump the dependence graph.
3530 (bb_in_scop_p, loop_in_scop_p, nb_loops_around_gb): Moved...
3531 (new_scop): Initialize SCOP_DEP_GRAPH.
3532 (build_scop_dynamic_schedules): New.
3533 (build_access_matrix_with_af): Fixed column numbering.
3534 (graphite_transform_loops): Call build_scop_dynamic_schedules.
3535 * graphite.h: Add ifndef/define guards against multiple inclusion.
3536 (struct scop): Add dep_graph field.
3537 (SCOP_DEP_GRAPH): Defined.
3538 (ref_nb_loops): Fixed and moved to other position.
3539 (bb_in_scop_p, loop_in_scop_p, nb_loops_around_gb): ... here.
3540 (nb_loops_around_loop_in_scop): New.
3541 (graphite_dump_dependence_graph): Declared.
3542 (graphite_build_rdg_all_levels): Declared.
3543 (graphite_test_dependence): Declared.
3544 * Makefile.in (graphite-data-ref.o): New target.
3545
35462008-09-09 Sebastian Pop <sebastian.pop@amd.com>
3547
3548 * Merge from mainline (139870:140164).
3549
35502008-09-01 Sebastian Pop <sebastian.pop@amd.com>
3551
3552 * Merge from mainline (138275:139870).
3553 * testsuite/gcc.dg/graphite/scop-matmult.c: XFailed as one of
3554 the commits from trunk broke the niter detection.
3555
35562008-09-01 Sebastian Pop <sebastian.pop@amd.com>
3557
3558 * graphite.c: Add more documentation. Fix formatting.
3559 (debug_loop_vec, debug_oldivs, loop_iv_stack,
3560 loop_iv_stack_debug): Moved...
3561 (schedule_to_scattering): Move before use.
3562 (dot_all_scops): Include in "#if 0" the code for system
3563 call dotty.
3564
3565 * graphite.h: (debug_loop_vec, debug_oldivs, loop_iv_stack,
3566 loop_iv_stack_debug): ...here.
3567
35682008-08-29 Jan Sjodin <jan.sjodin@amd.com>
3569
3570 * tree-phinodes.c (make_phi_node): Extern.
3571 (add_phi_node_to_bb): New.
3572 (create_phi_node): Call add_phi_node_to_bb.
3573 * tree-ssa-loop-ivopts.c (get_phi_with_result): New.
3574 (remove_statement): Handle case where stored phi was updated
3575 and is no longer the same.
3576 * graphite.c (is_parameter): New.
3577 (is_old_iv): New.
3578 (expand_scalar_variables_expr): New.
3579 (expand_scalar_variables_stmt): New.
3580 (expand_scalar_variables): New.
3581 (move_phi_nodes): Create new phi instead of moving old one.
3582 (translate_clast): Call expand_scalar_variables.
3583 (find_vdef_for_var_in_bb): Also scan regular definitions.
3584 (skip_phi_defs): New.
3585 (collect_scop_exit_phi_args): New.
3586 (patch_scop_exit_phi_args): New.
3587 (gloog): Patch phis after scop.
3588 * tree-flow.h: (add_phi_node_to_bb): Declared.
3589 (make_phi_node): Declared.
3590
35912008-08-26 Sebastian Pop <sebastian.pop@amd.com>
3592
3593 * graphite.c (end_scop): Split the entry of the scop when it
3594 is the header of the loop in which the scop is ending.
3595 (build_scops_1, limit_scops): Update uses of end_scop.
3596
35972008-08-26 Sebastian Pop <sebastian.pop@amd.com>
3598
3599 * graphite.c (dot_all_scops_1): Do not fail on uninitialized
3600 SCOP_ENTRY or SCOP_EXIT.
3601
36022008-08-25 Sebastian Pop <sebastian.pop@amd.com>
3603
3604 * graphite.c (get_construction_edge): Removed.
3605 (gloog): Construction edge is the scop entry edge.
3606
36072008-08-25 Sebastian Pop <sebastian.pop@amd.com>
3608
3609 * graphite.c (can_generate_for_scop): Removed.
3610 (gloog): Do not call it.
3611
36122008-08-25 Sebastian Pop <sebastian.pop@amd.com>
3613
3614 * graphite.c (new_scop): Entry of a scop is an edge.
3615 Initialize SESE region.
3616 (free_scop): Free SESE region.
3617 (build_scops_1, scopdet_bb_info): Work on edges, not on bbs.
3618 (split_difficult_bb): New, split from end_scop.
3619 (end_scop): Exit of a scop is an edge.
3620 (build_scop_bbs): Never check CDI_POST_DOMINATORS: this info is
3621 not automatically updated and thus is always wrong.
3622 * graphite.h (struct sese): New.
3623 (SESE_ENTRY): New.
3624 (SESE_EXIT): New.
3625 (struct scop): New field for a SESE region. Remove entry, exit.
3626 (SCOP_ENTRY, SCOP_EXIT): Update definitions to match same
3627 semantics as before. Moved comment around.
3628
36292008-08-25 Tobias Grosser <grosser@fim.uni-passau.de>
3630 Sebastian Pop <sebastian.pop@amd.com>
3631
3632 * graphite.c (graphite_transform_loops): Always enable gloog
3633 and find_transform when ENABLE_CHECKING.
3634
36352008-08-25 Sebastian Pop <sebastian.pop@amd.com>
3636
3637 * graphite.c (graphite_transform_loops): Move pretty printer
3638 of SCOPs before doing any transform. Remove call to print_scops
3639 and dot_all_scops_1.
3640
36412008-08-25 Sebastian Pop <sebastian.pop@amd.com>
3642
3643 * graphite.c (dump_gbb_conditions): Don't try to print NULL pointers.
3644 (print_graphite_bb): Same.
3645
36462008-08-25 Sebastian Pop <sebastian.pop@amd.com>
3647
3648 * graphite.c (dot_all_scops_1): Cleanup.
3649 (move_scops): Fix comment.
3650
36512008-08-25 Sebastian Pop <sebastian.pop@amd.com>
3652
3653 * graphite.c (build_scop_bbs): Revert commit 139355:
3654
3655 2008-08-20 Sebastian Pop <sebastian.pop@amd.com>
3656 Dwarakanath Rajagopal <dwarak.rajagopal@amd.com>
3657
3658 * graphite.c (build_scop_bbs): Factor up code.
3659
36602008-08-25 Tobias Grosser <grosser@fim.uni-passau.de>
3661
3662 * graphite.c (gloog): Update dominator info.
3663
36642008-08-25 Tobias Grosser <grosser@fim.uni-passau.de>
3665
3666 * graphite.c (remove_cond_exprs): Do not fail on empty bbs.
3667
36682008-08-24 Sebastian Pop <sebastian.pop@amd.com>
3669
3670 * graphite.c (new_graphite_bb): Remove GBB_INDEX_TO_NUM_MAP
3671 initialization.
3672 (free_graphite_bb): Remove GBB_INDEX_TO_NUM_MAP free.
3673 (translate_clast): Correct formatting.
3674 * graphite.h (struct num_map): Removed.
3675 (struct graphite_bb): Remove num_map field.
3676 (GBB_INDEX_TO_NUM_MAP): Removed.
3677
36782008-08-24 Sebastian Pop <sebastian.pop@amd.com>
3679
3680 * graphite.c (build_access_matrix_with_af): Fix comments.
3681 (build_scop_data_accesses): Same.
3682
36832008-08-24 Sebastian Pop <sebastian.pop@amd.com>
3684
3685 * graphite.c (build_scop_data_accesses): Don't construct
3686 access matrices. Add a FIXME and an assert condition that
3687 should pass when the access matrices will be needed.
3688
36892008-08-24 Sebastian Pop <sebastian.pop@amd.com>
3690
3691 * tree-data-ref.c (stmt_simple_memref_p): Don't call
3692 really_constant_p.
3693 * graphite.c (build_graphite_bb): Renamed new_graphite_bb.
3694 Moved close by free_graphite_bb.
3695 (free_graphite_bb): Call free_data_refs. Reset bb->aux.
3696 (new_scop): Move close by free_scop.
3697 (graphite_transform_loops): Avoid linear scan to reset bb->aux.
3698
36992008-08-22 Jan Sjodin <jan.sjodin@amd.com>
3700
3701 * cfgloopmanip.c (create_empty_if_region_on_edge): New.
3702 * graphite.c (clast_to_gcc_expression): Call gmp_cst_to_tree
3703 instead of recursive call.
3704 (graphite_translate_clast_equation): New.
3705 (graphite_create_guard_cond_expr): New.
3706 (graphite_create_new_guard): New.
3707 (get_stack_index_from_iv): Removed.
3708 (graphite_rename_ivs_stmt): Use gbb_loop_index.
3709 (get_true_edge_from_guard_bb): New.
3710 (translate_clast): Handle stmt_guard in clast.
3711 (get_construction_edge): Allow construction edge detection for
3712 a scope entry with multiple predecessors if one predecessor is
3713 the immediate dominator of scope entry.
3714 (can_generate_code_stmt): Enable code generation for clast_guard.
3715 (gloog): Use correct context loop. Removed check for post dominators.
3716 * cfgloop.h (create_empty_if_region_on_edge): Declared.
3717
37182008-08-21 Sebastian Pop <sebastian.pop@amd.com>
3719
3720 * graphite.c (remove_dead_loops): Document better which
3721 loops are removed.
3722
37232008-08-21 Sebastian Pop <sebastian.pop@amd.com>
3724
3725 * Makefile.in: Rename POLYLIBLIBS and POLYLIBINC to PPLLIBS
3726 and PPLINC.
3727 (graphite.o): Also depends on pointer-set.h.
3728
37292008-08-21 Sebastian Pop <sebastian.pop@amd.com>
3730
3731 * graphite.c (scop_record_loop): Fix compile warning.
3732
37332008-08-21 Harsha Jagasia <harsha.jagasia@amd.com>
3734 Sebastian Pop <sebastian.pop@amd.com>
3735
3736 * graphite.c (scop_record_loop): DECL_NAME can be NULL.
3737
37382008-08-21 Sebastian Pop <sebastian.pop@amd.com>
3739
3740 * graphite.c (build_graphite_bb): Initialize bb->aux to
3741 point to the graphite_bb_p.
3742 (graphite_bb_from_bb): Renamed gbb_from_bb; returns the
3743 content of bb->aux.
3744 (add_bb_domains): Does not use the scop parameter.
3745 (graphite_transform_loops): Clean bb->aux at the end.
3746
37472008-08-20 Dwarakanath Rajagopal <dwarak.rajagopal@amd.com>
3748 Sebastian Pop <sebastian.pop@amd.com>
3749
3750 * testsuite/lib/target-supports.exp
3751 (check_effective_target_fgraphite): New.
3752
3753 * testsuite/gcc.dg/graphite/graphite.exp: Early exit when
3754 check_effective_target_fgraphite returns false.
3755 Set dg-do-what-default to compile.
3756 (scan-graphite-dump-times): Removed.
3757 * testsuite/gfortran.dg/graphite/graphite.exp: Same.
3758
3759 * testsuite/gcc.dg/graphite/scop-0.c: Do not use "dg-do compile".
3760 Use scan-tree-dump-times instead of scan-graphite-dump-times.
3761 * testsuite/gcc.dg/graphite/scop-1.c: Same.
3762 * testsuite/gcc.dg/graphite/scop-2.c: Same.
3763 * testsuite/gcc.dg/graphite/scop-3.c: Same.
3764 * testsuite/gcc.dg/graphite/scop-4.c: Same.
3765 * testsuite/gcc.dg/graphite/scop-5.c: Same.
3766 * testsuite/gcc.dg/graphite/scop-6.c: Same.
3767 * testsuite/gcc.dg/graphite/scop-7.c: Same.
3768 * testsuite/gcc.dg/graphite/scop-8.c: Same.
3769 * testsuite/gcc.dg/graphite/scop-9.c: Same.
3770 * testsuite/gcc.dg/graphite/scop-10.c: Same.
3771 * testsuite/gcc.dg/graphite/scop-11.c: Same.
3772 * testsuite/gcc.dg/graphite/scop-12.c: Same.
3773 * testsuite/gcc.dg/graphite/scop-13.c: Same.
3774 * testsuite/gcc.dg/graphite/scop-matmult.c: Same.
3775 * testsuite/gcc.dg/graphite/scop-14.c: Same.
3776 * testsuite/gcc.dg/graphite/scop-15.c: Same.
3777 * testsuite/gcc.dg/graphite/block-0.c: Same.
3778 * testsuite/gcc.dg/graphite/scop-16.c: Same.
3779 * testsuite/gcc.dg/graphite/block-1.c: Same.
3780 * testsuite/gcc.dg/graphite/scop-17.c: Same.
3781 * testsuite/gcc.dg/graphite/scop-18.c: Same.
3782 * testsuite/gfortran.dg/graphite/block-1.f90: Same.
3783 * testsuite/gfortran.dg/graphite/scop-1.f: Same.
3784 * testsuite/gfortran.dg/graphite/block-2.f: Same.
3785
37862008-08-20 Sebastian Pop <sebastian.pop@amd.com>
3787
3788 * graphite.c: Fix some XXX comments.
3789 (build_scop_dynamic_schedules): Removed.
3790
37912008-08-20 Sebastian Pop <sebastian.pop@amd.com>
3792
3793 * graphite.h (scop_max_loop_depth): Moved...
3794 * graphite.c (scop_max_loop_depth): ...here.
3795 (remove_all_edges_1): New.
3796 (remove_all_edges): Factored code.
3797 (remove_cond_exprs): Check only the last statement for
3798 a GIMPLE_COND expression.
3799
38002008-08-20 Sebastian Pop <sebastian.pop@amd.com>
3801
3802 * graphite.c (scan_tree_for_params): Early return when the
3803 expression is a chrec_dont_know. Handle case NEGATE_EXPR.
3804 (find_scop_parameters): Factor out code.
3805 (graphite_trans_bb_strip_mine): Remove dead code.
3806
38072008-08-20 Sebastian Pop <sebastian.pop@amd.com>
3808
3809 * graphite.c (clast_to_gcc_expression, graphite_create_new_loop,
3810 graphite_trans_bb_move_loop): Factor asserts.
3811 (gloog): Perform sanity checks only for ENABLE_CHECKING.
3812 Do not call calculate_dominance_info and estimate_bb_frequencies.
3813
38142008-08-20 Jan Sjodin <jan.sjodin@amd.com>
3815
3816 * graphite.c (create_loops_mapping, free_loops_mapping,
3817 create_loops_mapping_num, debug_loop_mapping_1,
3818 debug_loop_mapping, graphite_loops_mapping_max_loop_num,
3819 get_loop_mapping_for_num, graphite_loops_mapping_add_child,
3820 graphite_loops_mapping_add_child_num,
3821 graphite_loops_mapping_insert_child,
3822 graphite_loops_mapping_parent, get_loop_mapped_depth_for_num,
3823 get_loop_mapped_depth, split_loop_mapped_depth_for_num,
3824 loop_mapped_depth_split_loop, swap_loop_mapped_depth_for_num,
3825 create_num_from_index, get_num_from_index,
3826 swap_loop_mapped_depth): Removed.
3827 (new_scop): Do not initialize SCOP_LOOPS_MAPPING.
3828 (free_scop): Do not call free_loops_mapping.
3829 (graphite_get_new_iv_stack_index_from_old_iv): Renamed
3830 get_stack_index_from_iv. Use GBB_LOOPS instead of calling
3831 get_loop_mapped_depth.
3832 (graphite_trans_bb_move_loop): Do not update the loop mapping.
3833 (graphite_trans_bb_strip_mine): Same.
3834 * graphite.h (graphite_loops_mapping, graphite_loop_node): Removed.
3835 (struct scop): Remove field loops_mapping.
3836
38372008-08-20 Sebastian Pop <sebastian.pop@amd.com>
3838 Dwarakanath Rajagopal <dwarak.rajagopal@amd.com>
3839
3840 * graphite.c (scop_record_loop): Factor out one level of the
3841 condition by early return.
3842 (build_scop_loop_nests): Format following FSF coding style.
3843 (build_scop_dynamic_schedules): Factor out code.
3844 (scopdet_bb_info): Reindent. Default case should not be reachable.
3845
38462008-08-20 Sebastian Pop <sebastian.pop@amd.com>
3847 Dwarakanath Rajagopal <dwarak.rajagopal@amd.com>
3848
3849 * graphite.c (loop_affine_expr): Check for DECL_P or struct
3850 assignments that are not handled as simple operands for now.
3851
38522008-08-20 Sebastian Pop <sebastian.pop@amd.com>
3853 Dwarakanath Rajagopal <dwarak.rajagopal@amd.com>
3854
3855 * graphite.c (build_scop_bbs): Factor up code.
3856
38572008-08-20 Sebastian Pop <sebastian.pop@amd.com>
3858 Dwarakanath Rajagopal <dwarak.rajagopal@amd.com>
3859
3860 * graphite.c (stmt_simple_for_scop_p): Factor code out
3861 of the loop.
3862 (enum gbb_type): New. Group all the GBB_* types under it.
3863 (is_loop_exit): Moved...
3864 (end_scop): Enable BB spliting.
3865 * cfgloop.c (is_loop_exit): ...here. Reimplemented.
3866 * cfgloop.h (is_loop_exit): Declared.
3867
38682008-08-20 Sebastian Pop <sebastian.pop@amd.com>
3869
3870 * doc/invoke.texi: Remove strides from examples containing
3871 DO loops when the strides are equal to 1.
3872
38732008-08-20 Harsha Jagasia <harsha.jagasia@amd.com>
3874 Dwarakanath Rajagopal <dwarak.rajagopal@amd.com>
3875
3876 * graphite.c (graphite_trans_scop_block): Or the result with
3877 the result from graphite_trans_loop_block.
3878 * testsuite/gcc.dg/graphite/block-1.c: New.
3879 * testsuite/gfortran.dg/graphite/block-1.f90: New.
3880 * testsuite/gfortran.dg/graphite/block-2.f: New.
3881
38822008-08-20 Sebastian Pop <sebastian.pop@amd.com>
3883
3884 * graphite.c (graphite_transform_loops): Call cloog_initialize
3885 and cloog_finalize.
3886
38872008-08-20 Sebastian Pop <sebastian.pop@amd.com>
3888
3889 * tree-data-ref.c) (stmt_simple_memref_p): New.
3890 * tree-data-ref.h (stmt_simple_memref_p): Declared.
3891 * graphite.c (stmt_simple_memref_for_scop_p): Removed.
3892 (is_simple_operand): Call stmt_simple_memref_p.
3893
3894 * testsuite/gcc.dg/graphite/scop-matmult.c: Updated for not
3895 using pointer arithmetic, as this is optimized by PRE and
3896 makes the code too difficult to analyze.
3897
3898 * testsuite/gcc.dg/graphite/scop-18.c: Same.
3899
39002008-08-20 Sebastian Pop <sebastian.pop@amd.com>
3901
3902 * gdbinit.in (pgg): New.
3903
39042008-08-15 Tobias Grosser <grosser@fim.uni-passau.de>
3905
3906 * graphite.c (graphite_trans_loop_block): Fix warning.
3907
39082008-08-15 Tobias Grosser <grosser@fim.uni-passau.de>
3909
3910 * graphite.c (graphite_trans_loop_block): Fix my merge error.
3911
39122008-08-15 Tobias Grosser <grosser@fim.uni-passau.de>
3913
3914 * graphite.c (graphite_trans_bb_block): Remove check for
3915 flag_loop_strip_mine, flag_loop_block, flag_loop_interchange.
3916 Check if loop blocking is profitable for every loop, before applying
3917 the changes.
3918 (graphite_apply_transformations): Call graphite_trans_bb_block only,
3919 if flag_loop_block is set.
3920
39212008-08-14 Sebastian Pop <sebastian.pop@amd.com>
3922
3923 * graphite.c: Add some more documentation for the loop
3924 mapping.
3925
39262008-08-14 Sebastian Pop <sebastian.pop@amd.com>
3927
3928 * Makefile.in (tree-data-ref.o): Remove dependence on graphite.h.
3929 * graphite.c: Format on less than 80 columns.
3930 * graphite.h: Same.
3931
39322008-08-14 Sebastian Pop <sebastian.pop@amd.com>
3933
3934 * cfgloopmanip.c (loopify): Use update_dominators_in_loop.
3935
39362008-08-14 Sebastian Pop <sebastian.pop@amd.com>
3937
3938 * doc/invoke.texi (floop-block, floop-strip-mine,
3939 floop-interchange): Update documentation with examples.
3940
39412008-08-13 Sebastian Pop <sebastian.pop@amd.com>
3942
3943 * cfgloopmanip.c (create_empty_loop_on_edge): Don't call
3944 add_referenced_var.
3945 * graphite.c (graphite_create_new_loop): Call add_referenced_var.
3946
39472008-08-13 Sebastian Pop <sebastian.pop@amd.com>
3948
3949 * cfgloopmanip.c (create_empty_loop_on_edge): Improve documentation.
3950 Factor gcc_asserts into a single one. Use force_gimple_operand_gsi.
3951 * tree-scalar-evolution.c: Revert useless changes.
3952 * tree-phinodes.c: Same.
3953 * cfghooks.c: Same.
3954 * vec.h: Same.
3955 * tree-vectorizer.h: Same.
3956 * tree-flow.h: Same.
3957 * tree-cfg.c: Same.
3958 * common.opt (fgraphite): Update documentation.
3959
39602008-08-12 Harsha Jagasia <harsha.jagasia@amd.com>
3961
3962 * doc/invoke.texi (-floop-block, -floop-strip-mine,
3963 -floop-interchange): Add more text for explaining what each of these
3964 flags is doing.
3965 * tree-into-ssa.c (gimple_vec): Moved to...
3966 * graphite.c: Include gimple.h.
3967 (gimple_vec): Moved to...
3968 (del_loop_to_cloog_loop): Removed.
3969 (loop_affine_expr): Do not call create_data_ref when the
3970 operand is a constant.
3971 (new_scop): Use free instead of del_loop_to_cloog_loop.
3972 * Makefile.in (graphite.o): Depend on GIMPLE_H.
3973 * gimple.h (gimple_vec): ... here.
3974
39752008-08-11 Tobias Grosser <grosser@fim.uni-passau.de>
3976
3977 * graphite.c (scopdet_bb_info): Only allow loops with known number of
3978 latch executions.
3979 (build_loop_iteration_domains): Fail, if latch executions unknown.
3980
39812008-08-11 Tobias Grosser <grosser@fim.uni-passau.de>
3982
3983 * graphite.c (add_conditions_to_domain): New.
3984 (build_scop_conditions_1): Call add_conditions_to_domain.
3985 (set_cloog_options): Allow to disable optimizations.
3986
39872008-08-11 Tobias Grosser <grosser@fim.uni-passau.de>
3988
3989 * graphite.c (find_params_in_bb): Look for parameters in conditions.
3990 Do not use walk_dominator_tree.
3991 (find_scop_parameters): Do not use walk_dominator_tree.
3992
39932008-08-11 Tobias Grosser <grosser@fim.uni-passau.de>
3994
3995 * graphite.c (scan_tree_for_params) Add / Subtract inequality.
3996 (idx_record_params): Adapt.
3997 * graphite.h (scop_gimple_loop_depth): New.
3998
39992008-08-11 Tobias Grosser <grosser@fim.uni-passau.de>
4000
4001 * graphite.c (build_scop_dynamic_schedules): Remove value_init.
4002 (scan_tree_for_params): Remove value_init.
4003 (build_scop_context): Remove value_init.
4004 (build_loop_iteration_domains): Remove value_init.
4005 (schedule_to_scattering): Remove value_init.
4006 (graphite_trans_bb_strip_mine): Remove value_init.
4007
40082008-08-11 Tobias Grosser <grosser@fim.uni-passau.de>
4009
4010 * gcc/graphite.c (limit_scops): New.
4011 (graphite_transform_loops): Add limit SCoPs.
4012 * gcc/testsuite/gcc.dg/graphite/scop-0.c: Update number of SCoPs.
4013 * gcc/testsuite/gcc.dg/graphite/scop-1.c: Update number of SCoPs.
4014 * gcc/testsuite/gcc.dg/graphite/scop-10.c: Update number of SCoPs.
4015 * gcc/testsuite/gcc.dg/graphite/scop-11.c: Update number of SCoPs.
4016 * gcc/testsuite/gcc.dg/graphite/scop-12.c: Update number of SCoPs.
4017 * gcc/testsuite/gcc.dg/graphite/scop-13.c: Update number of SCoPs.
4018 * gcc/testsuite/gcc.dg/graphite/scop-14.c: Update number of SCoPs.
4019 * gcc/testsuite/gcc.dg/graphite/scop-15.c: Update number of SCoPs.
4020 * gcc/testsuite/gcc.dg/graphite/scop-16.c: Update number of SCoPs.
4021 Change loop numbers.
4022 * gcc/testsuite/gcc.dg/graphite/scop-17.c: Update number of SCoPs.
4023 Change loop numbers.
4024 * gcc/testsuite/gcc.dg/graphite/scop-18.c: Update number of SCoPs.
4025 * gcc/testsuite/gcc.dg/graphite/scop-2.c: Update number of SCoPs.
4026 * gcc/testsuite/gcc.dg/graphite/scop-3.c: Update number of SCoPs.
4027 * gcc/testsuite/gcc.dg/graphite/scop-4.c: Update number of SCoPs.
4028 * gcc/testsuite/gcc.dg/graphite/scop-5.c: Update number of SCoPs.
4029 * gcc/testsuite/gcc.dg/graphite/scop-6.c: Update number of SCoPs.
4030 * gcc/testsuite/gcc.dg/graphite/scop-7.c: Update number of SCoPs.
4031 * gcc/testsuite/gcc.dg/graphite/scop-8.c: Update number of SCoPs.
4032 * gcc/testsuite/gcc.dg/graphite/scop-9.c: Update number of SCoPs.
4033 * gcc/testsuite/gcc.dg/graphite/scop-matmult.c: Update number of SCoPs.
4034
40352008-08-11 Tobias Grosser <grosser@fim.uni-passau.de>
4036
4037 * graphite.c (graphite_transform_loops): Call always find_transform.
4038
40392008-08-08 Tobias Grosser <grosser@fim.uni-passau.de>
4040
4041 * graphite.c (free_loops_mapping): New.
4042 (stmt_simple_for_scop_p): Fix typo.
4043 (stmt_simple_for_scop_p): Fix tuples functions, that
4044 broke polyhedron.
4045 (free_graphite_bb): Fix some memleaks.
4046 (free_scop): Fix some memleaks.
4047 (scopdet_bb_info): Do not forget some tmp SCoPs.
4048 (find_params_in_bb): Fix some memleaks.
4049 (clast_to_gcc_expression): Fix warning.
4050
40512008-08-07 Tobias Grosser <grosser@fim.uni-passau.de>
4052
4053 * testsuite/gcc.dg/graphite/scop-16.c: Fix for 32bit.
4054 * testsuite/gcc.dg/graphite/scop-17.c: Fix for 32bit.
4055
40562008-08-04 Sebastian Pop <sebastian.pop@amd.com>
4057
4058 * tree-ssa-loop.c (tree-ssa-loop.o): Do not include toplev.h.
4059 Move code ifdef-ed HAVE_cloog...
4060 * graphite.c: Include toplev.h.
4061 ... here.
4062 * Makefile.in (OBJS-common): Always build graphite.o.
4063 (BACKEND): Remove @GRAPHITE@.
4064 (tree-ssa-loop.o): Do not depend on TOPLEV_H.
4065 (graphite.o): Depend on TOPLEV_H.
4066
40672008-08-04 Sebastian Pop <sebastian.pop@amd.com>
4068
4069 * Makefile.in (tree-ssa-loop.o): Depend on TOPLEV_H.
4070 Remove typo left from polylib to ppl conversion.
4071 * graphite.c (graphite_transforms): Use sorry instead of fatal.
4072
40732008-08-03 Sebastian Pop <sebastian.pop@amd.com>
4074
4075 * toplev.c (process_options): Move the graphite loop optimization
4076 flags...
4077 * tree-ssa-loop.c (graphite_transforms): ... here.
4078 When not configured with CLooG, print to dump_file that
4079 Graphite transforms were not performed.
4080 * testsuite/gcc.dg/graphite/graphite.exp (scan-graphite-dump-times):
4081 New.
4082 * testsuite/gcc.dg/graphite/*.c: Updated all testcases to use
4083 scan-graphite-dump-times.
4084
40852008-08-03 Sebastian Pop <sebastian.pop@amd.com>
4086
4087 * graphite.c (dot_scop, dot_all_scops): Do not call system.
4088 Do not open /tmp/scop.dot and /tmp/allscops.dot.
4089
40902008-08-02 Sebastian Pop <sebastian.pop@amd.com>
4091 Jan Sjodin <jan.sjodin@amd.com>
4092
4093 * configure: Regenerated.
4094 * omp-low.c (expand_omp_sections): Remove now unused code.
4095 * config.in (HAVE_polylib): Removed.
4096 * configure.ac (HAVE_polylib, POLYLIBLIBS, POLYLIBINC): Removed.
4097 (PPLLIBS, PPLINC): Added.
4098 * graphite.c: Replace unsigned with int wherever possible.
4099 Don't access Cloog's data structures, but use accessor functions.
4100 Clast's stmt->type is now implemented as a vtable: change the
4101 switches of stmt->type into ifs.
4102 (polylib/polylibgmp.h): Don't include.
4103 (initialize_dependence_polyhedron,
4104 initialize_data_dependence_polyhedron, is_empty_polyhedron,
4105 statement_precedes_p, test_dependence, build_rdg_all_levels,
4106 dump_dependence_graph): Removed until this code is cleaned up
4107 or ported to Cloog.
4108 * Makefile.in (POLYLIBLIBS): Renamed PPLLIBS.
4109 (POLYLIBINC): Renamed PPLINC.
4110
41112008-08-01 Harsha Jagasia <harsha.jagasia@amd.com>
4112 Dwarakanath Rajagopal <dwarak.rajagopal@amd.com>
4113 Jan Sjodin <jan.sjodin@amd.com>
4114
4115 Finish the merge and tuplification of graphite.
4116
41172008-07-24 Sebastian Pop <sebastian.pop@amd.com>
4118 Jan Sjodin <jan.sjodin@amd.com>
4119
4120 Partial merge from mainline (138072:138275).
4121 * graphite.c still has to be tuplified.
4122
41232008-07-29 Jan Sjodin <jan.sjodin@amd.com>
4124
4125 * graphite.c (graphite_loops_mapping_max_loop_num): New.
4126 (create_num_from_index): New.
4127 (get_num_from_index): Also pass in the graphite BB.
4128 (free_graphite_bb): Free GBB_INDEX_TO_NUM_MAP.
4129 (build_graphite_bb): Initialize GBB_INDEX_TO_NUM_MAP.
4130 (graphite_trans_bb_strip_mine): Call create_num_from_index.
4131 (is_interchange_valid): Return false when failing.
4132 * graphite.h (struct num_map): New.
4133 (struct graphite_bb): New field num_map.
4134 (GBB_LOOPS_MAPPING): Renamed GBB_INDEX_TO_NUM_MAP.
4135
41362008-07-29 Tobias Grosser <grosser@fim.uni-passau.de>
4137
4138 * graphite.c (dump_gbb_conditions): Print also conditions like
4139 "if (a)". Remove dublicated code and use print_generic_expr ().
4140 (stmt_simple_for_scop_p): Only allow conditions we can handle
4141 {<, <=, >, >=}.
4142
41432008-07-25 Jan Sjodin <jan.sjodin@amd.com>
4144
4145 * graphite.h (struct scop): Removed new_ivs field.
4146 (SCOP_NEWIVS): Deleted.
4147 * graphite.c (new_scop, free_scop, clast_name_to_gcc,
4148 clast_to_gcc_expression, graphite_create_new_loop):
4149 Removed use of new_ivs.
4150
41512008-07-25 Jan Sjodin <jan.sjodin@amd.com>
4152
4153 * graphite.c (debug_oldivs, debug_loop_vec, create_loops_mapping,
4154 create_loops_mapping_num, debug_loop_mapping_1): New.
4155 (debug_loop_mapping): Call debug_loop_mapping_1.
4156 (get_loop_mapping_for_num,
4157 graphite_loops_mapping_add_child,
4158 graphite_loops_mapping_add_child_num,
4159 graphite_loops_mapping_insert_child,
4160 graphite_loops_mapping_parent,
4161 split_loop_mapped_depth_for_num,
4162 loop_mapped_depth_split_loop): New.
4163 (increment_loop_mapped_depths): Removed.
4164 (swap_loop_mapped_depth_for_num): Reimplemented.
4165 (new_scop): Call create_loops_mapping.
4166 (scop_record_loop): Call graphite_loops_mapping_insert_child.
4167 (translate_clast): Pass the old loop father in parameter, and pass
4168 it to get_old_iv_from_ssa_name.
4169 (remove_edges_around_useless_blocks, can_generate_code_stmt,
4170 can_generate_code, can_generate_for_scop): New.
4171 (graphite_trans_bb_block): Returns false when it fails to transform.
4172 * graphite.h (graphite_loop_node, graphite_loops_mapping): New.
4173
41742008-07-25 Sebastian Pop <sebastian.pop@amd.com>
4175
4176 Reverted all the changes related to the streamization and
4177 loop fusion.
4178 These changes are now tracked in the streamization branch.
4179
41802008-07-25 Sebastian Pop <sebastian.pop@amd.com>
4181 Jan Sjodin <jan.sjodin@amd.com>
4182
4183 * graphite.c (gbb_compare): Correctly constify.
4184 (gbb_can_be_ignored): Indent.
4185 (graphite_trans_scop_swap_1and2): Add legality check.
4186 Remove dead FIXMEs.
4187
41882008-07-25 Sebastian Pop <sebastian.pop@amd.com>
4189
4190 Remove fallouts from "Reverted the Condate changes".
4191 * tree.h: Remove unused decl.
4192 * testsuite/gcc.dg/tree-checker: Same.
4193 * timevar.def: Remove counter.
4194
41952008-07-24 Sebastian Pop <sebastian.pop@amd.com>
4196
4197 * Merge from mainline (135673:138072).
4198
4199 Reverted the MIRO changes (from 2008-04-05) that are now
4200 tracked in the miro branch.
4201 * tree-bounds.c: Removed.
4202 * tree-bounds.h: Removed.
4203
4204 Reverted the Condate changes (from 2006-07-04, 2007-03-20) that
4205 are now tracked in the condate branch.
4206 * tree-check.c: Removed.
4207 * tree-match.c: Removed.
4208 * condate.y: Removed.
4209
42102008-07-24 Dwarakanath Rajagopal <dwarak.rajagopal@amd.com>
4211
4212 * common.opt: New user flag -floop-block, -floop-strip-mine
4213 and -floop-interchange.
4214 * toplev.c (process_options): Enable -fgraphite pass if any one of the
4215 graphite loop optimization flags is turned on.
4216 * graphite.c (graphite_apply_transformations): Add flag_loop_block,
4217 flag_loop_strip_mine and flag_loop_interchange checks before
4218 optimizations.
4219 * doc/invoke.texi: Remove -fgraphite and add -floop-block,
4220 -floop-strip-mine and -floop-interchange.
4221 * testsuite/gcc.dg/graphite/block-0.c: Add -floop-block and remove
4222 -fgraphite.
4223 * testsuite/gcc.dg/graphite/scop-16.c: Ditto.
4224 * testsuite/gcc.dg/graphite/scop-17.c: Ditto.
4225 * testsuite/gcc.dg/graphite/scop-18.c: Ditto.
4226
42272008-07-23 Jan Sjodin <jan.sjodin@amd.com>
4228 Sebastian Pop <sebastian.pop@amd.com>
4229
4230 * cfgloopmanip.c (update_dominators_in_loop): Make it static.
4231 (create_empty_loop_on_edge): More fixes.
4232 * tree-phinodes.c (resize_phi_node): Extern.
4233 (unlink_phi_node, move_phi_node): New split from remove_phi_node.
4234 * cfghooks.c (update_dominator_information): New split from
4235 split_edge.
4236 * tree-vectorizer.c (rename_variables_in_bb): Extern.
4237 * tree-dfa.c (collect_dfa_stats): Start walking the CFG on the
4238 successor of the function entry block.
4239
4240 * graphite.c: Include pointer-set.h.
4241 (debug_loop_mapping, increment_loop_mapped_depths,
4242 get_loop_mapped_depth_for_num, get_loop_mapped_depth,
4243 set_loop_mapped_depth_for_num, set_loop_mapped_depth,
4244 swap_loop_mapped_depth_for_num, get_num_from_index,
4245 swap_loop_mapped_depth, loop_iv_stack_debug,
4246 loop_iv_stack_push, loop_iv_stack_pop, loop_iv_stack_get_iv,
4247 loop_iv_stack_get_iv_from_name, loop_iv_stack_debug,
4248 get_old_iv_from_ssa_name): New.
4249 (new_scop): Initialize SCOP_LOOPS_MAPPING.
4250 (free_scop): Free SCOP_LOOPS_MAPPING.
4251 (scop_record_loop): Record old ivs.
4252 (create_var_name): Removed.
4253 (initialize_cloog_names): Allocate double space in case strip mine
4254 applies to all loops once.
4255 (clast_name_to_gcc): Look up in the map ivstack passed in parameter.
4256 (clast_to_gcc_expression): Same. Implement more clast to gimple
4257 translation.
4258 (graphite_create_new_loop): Pass in ivstack.
4259 (remove_all_edges): Pass in the construction_edge.
4260 (graphite_remove_iv): Removed.
4261 (graphite_rename_ivs, graphite_rename_ivs_stmt,
4262 remove_cond_exprs): Rewritten.
4263 (move_phi_nodes): New.
4264 (disconnect_virtual_phi_nodes, disconnect_cond_expr): Removed.
4265 (translate_clast): Pass in ivstack. Rewrite some cases.
4266 (set_cloog_options, debug_clast_stmt): New.
4267 (find_transform): Use set_cloog_options.
4268 (outermost_loop_layer): Removed.
4269 (get_construction_edge, collect_virtual_phis, find_vdef_for_var_in_bb,
4270 find_vdef_for_var_1, find_vdef_for_var, patch_phis_for_virtual_defs,
4271 mark_old_loops, remove_dead_loops): New.
4272 (gloog): Rewritten.
4273 (graphite_trans_bb_move_loop): Call swap_loop_mapped_depth.
4274 (const_column_index, get_first_matching_sign_row_index,
4275 get_lower_bound_row, get_upper_bound_row, get_lower_bound,
4276 get_upper_bound): New.
4277 (graphite_trans_bb_strip_mine): Also update the iv map.
4278
4279 * graphite.h (graphite_loops_mapping, GBB_LOOPS_MAPPING): New.
4280 (struct name_tree): Add a loop field.
4281 (struct scop): Add a graphite_loops_mapping field.
4282 (SCOP_LOOPS_MAPPING): New.
4283 (debug_clast_stmt): Declare.
4284 * lambda.h (find_induction_var_from_exit_cond): Declare.
4285 (lambda-code.c): (find_induction_var_from_exit_cond): Extern.
4286 * cfgloop.h (update_dominators_in_loop): Removed declaration.
4287 (create_empty_loop_on_edge): Updated.
4288 * tree-flow.h (remove_bb, resize_phi_node, move_phi_node,
4289 rename_variables_in_bb): Declare.
4290 * tree-cfg.c (remove_bb): Extern.
4291
4292 * testsuite/gcc.dg/graphite/block-0.c: New.
4293
42942008-07-21 Dwarakanath Rajagopal <dwarak.rajagopal@amd.com>
4295 Sebastian Pop <sebastian.pop@amd.com>
4296
4297 * graphite.c (strip_mine_profitable_p): New.
4298 (graphite_trans_bb_block): Disable strip mining if not profitable.
4299
4300 * testsuite/gcc.dg/graphite/scop-18.c: New.
4301 * testsuite/gcc.dg/graphite/scop-17.c: Fixed.
4302 * testsuite/gcc.dg/graphite/scop-16.c: Fixed.
4303
43042008-07-17 Harsha Jagasia <harsha.jagasia@amd.com>
4305 Jan Sjodin <jan.sjodin@amd.com>
4306 Sebastian Pop <sebastian.pop@amd.com>
4307
4308 * graphite.c (is_interchange_valid): New.
4309 (graphite_trans_bb_block): Check loop nest of basic block for legality
4310 of interchange.
4311
4312 * graphite.h (gbb_inner_most_loop_index, outer_most_loop_1,
4313 outer_most_loop, gbb_outer_most_loop_index): New.
4314
4315 * tree-loop-linear.c (perfect_loop_nest_depth): Remove static.
4316 * tree-flow.h (perfect_loop_nest_depth): Declare as extern.
4317 * testsuite/gcc.dg/graphite/scop-16.c: New.
4318 * testsuite/gcc.dg/graphite/scop-17.c: New.
4319
43202008-07-11 Tobias Grosser <grosser@fim.uni-passau.de>
4321
4322 * graphite.c (scop_remove_ignoreable_gbbs): Also update bitmap.
4323 (graphite_trans_scop_block): Ignore SCoPs without bbs.
4324
43252008-07-11 Tobias Grosser <grosser@fim.uni-passau.de>
4326
4327 * graphite.c (new_scop): Initialize SCOP_EXIT.
4328 (scopdet_info): Add.
4329 (scopdet_bb_info): Rename from is_bb_addable. Cleanup, bugfixes.
4330 (build_scops_1): Cleanup, bugfixes.
4331 (build_scops): Cleanup.
4332
4333 * testsuite/gcc.dg/graphite/scop-matmult.c: Remove duplicated code.
4334 * testsuite/gcc.dg/graphite/scop-15.c: Add SCoP numbers.
4335
43362008-07-10 Harsha Jagasia <harsha.jagasia@amd.com>
4337
4338 * testsuite/gfortran.dg/graphite/scop-1.f: Update to reduced test case.
4339
4340 * testsuite/gfortran.dg/graphite/graphite.exp: Use
4341 DEFAULT_GRAPHITE_FLAGS.
4342
4343 * testsuite/gcc.dg/graphite/scop-15.c: Update to reduced test case.
4344
43452008-07-10 Harsha Jagasia <harsha.jagasia@amd.com>
4346
4347 * graphite.c (scan_tree_for_params): Do not assert any more if
4348 MULT_EXPR parameter is negative.
4349
4350 * testsuite/gfortran.dg/graphite/scop-1.f: New.
4351
4352 * testsuite/gfortran.dg/graphite/graphite.exp: New.
4353
4354 * testsuite/gcc.dg/graphite/scop-15.c: New.
4355
43562008-07-10 Harsha Jagasia <harsha.jagasia@amd.com>
4357
4358 * graphite.c (is_bb_addable): Fix segfault in spec gzip and reformat.
4359
43602008-07-10 Tobias Grosser <grosser@fim.uni-passau.de>
4361
4362 * graphite.c (graphite_trans_bb_swap_loops): Rename from
4363 graphite_swap_loops.
4364 (graphite_trans_bb_move_loop): New.
4365 (graphite_trans_bb_strip_mine): Rename from graphite_strip_mine_loop.
4366 (graphite_trans_bb_block): New.
4367 (graphite_trans_loop_block): New.
4368 (graphite_trans_scop_swap_1and2): Rename from
4369 graphite_trans_swap_1and2.
4370 (graphite_trans_scop_strip): Rename from graphite_trans_strip.
4371 (graphite_trans_scop_block): New.
4372 (graphite_apply_transformations): Rename from
4373 graphite_transformations.
4374
4375 * testsuite/gcc.dg/graphite/scop-matmult.c: New.
4376
43772008-07-10 Tobias Grosser <grosser@fim.uni-passau.de>
4378
4379 * graphite.c (gbb_compare): New.
4380 (graphite_sort_gbbs): New.
4381 (gbb_can_be_ignored): New.
4382 (scop_remove_ignoreable_gbbs): New.
4383 (graphite_transformations): Cleanup and add
4384 scop_remove_ignoreable_gbbs.
4385 * lambda.h (lambda_vector_compare): New.
4386
43872008-07-09 Tobias Grosser <grosser@fim.uni-passau.de>
4388
4389 * graphite.c (print_graphite_bb): Correct printing of static schedule.
4390 (graphite_swap_loops): int -> unsigned
4391 (graphite_strip_mine_loop): int -> unsigned, Fix SCHEDULE
4392 (graphite_transformations): New.
4393 (graphite_transform_loops): Move to graphite_transformations.
4394 * graphite.h (gbb_nb_loops): Return unsigned.
4395
43962008-07-04 Tobias Grosser <grosser@fim.uni-passau.de>
4397
4398 * graphite.c (scan_tree_for_params): Fix insertion of parameters into
4399 the domain matrix. This makes scop-0.c work again.
4400
44012008-06-20 Richard Guenther <rguenther@suse.de>
4402
4403 * graphite.h: Adjust copyright to GPLv3.
4404 * graphite.c: Likewise.
4405 (stmt_simple_memref_for_scop_p): Split out from ...
4406 (stmt_simple_for_scop_p): ... here. Fix handling of calls
4407 and simplify.
4408 (get_bb_type): Optimize.
4409 (is_pred): Remove.
4410 (is_bb_addable): Fix memleak, replace is_pred call with
4411 single_pred.
4412 (build_scops): Use current_loops.
4413 (param_index): Fix memleak.
4414
44152008-06-20 Konrad Trifunovic <konrad.trifunovic@inria.fr>
4416
4417 * graphite.c: Fix formatting.
4418
44192008-06-19 Konrad Trifunovic <konrad.trifunovic@inria.fr>
4420
4421 * graphite.c (new_scop): Memory allocation for SCOP_{NEWIVS, OLDIVS}.
4422 (free_scop): Memory deallocation for SCOP_NEWIVS, SCOP_OLDIVS.
4423 (create_var_name, save_var_name): Newly defined functions.
4424 (initialize_cloog_names): Part of the code factored out to
4425 save_var_name.
4426 (clast_to_gcc_expression): Now handles the case of clast_red_sum
4427 in clast_reduction statement.
4428 (graphite_create_new_loop): Now takes a new parameter
4429 for outer_loop.
4430 (translate_clast): Now also takes the context_loop and bb_exit
4431 parameters. Rewritten the code so that it creates a gimple code
4432 inside the given context.
4433 (outermost_loop_layer, graphite_remove_iv, graphite_rename_ivs,
4434 remove_cond_expr, disconnect_cond_expr,
4435 disconnect_virtual_phi_nodes): Newly defined functions.
4436 * graphite.h (struct scop): added old_ivs vector.
4437 SCOP_OLDIVS: New macro.
4438
44392008-06-19 Sebastian Pop <sebastian.pop@amd.com>
4440
4441 * cfgloopmanip.c: Add missing function comments, fix formatting.
4442
44432008-06-18 Konrad Trifunovic <konrad.trifunovic@inria.fr>
4444
4445 * cfgloopmanip.c (update_dominators_in_loop): Defined.
4446 (create_empty_loop_on_edge): Defined.
4447 * tree-parloops.c (canonicalize_loop_ivs): Returns tree
4448 instead of void.
4449 * cfgloop.h (create_empty_loop_on_edge): Declared as extern.
4450 (update_dominators_in_loop): Declared as extern
4451 * tree-flow.h (canonicalize_loop_ivs): Declared as extern.
4452
44532008-06-16 Tobias Grosser <grosser@fim.uni-passau.de>
4454
4455 * graphite.c (print_graphite_bb): Allow changing number of loops
4456 in SCoP domain.
4457 (initialize_cloog_names): Allow changing number of loops.
4458 (build_cloog_prog): Simplify.
4459 (find_transform): Enable cloog option --strides.
4460 (graphite_swap_loops): New.
4461 (graphite_strip_mine_loop): New.
4462 (graphite_trans_swap_1and2): New.
4463 (graphite_trans_strip): New.
4464 (graphite_transform_loops): Add graphite_trans_strip.
4465 * graphite.h (scop_max_loop_depth): New.
4466
44672008-06-15 Tobias Grosser <grosser@fim.uni-passau.de>
4468
4469 * graphite.c (build_scop_iteration_domain): Remove forgotten
4470 line. (Fixes compile)
4471
44722008-06-15 Tobias Grosser <grosser@fim.uni-passau.de>
4473
4474 * graphite.c (print_graphite_bb): Add output of GBB_LOOPS.
4475 (build_graphite_bb): Add GBB_LOOPS and GBB_DOMAIN and reorder.
4476 (build_bb_loops): New.
4477 (graphite_transform_loops): Add build_bb_loops.
4478 (schedule_to_scattering): Use gbb_nb_loops to support changing loop
4479 numbers.
4480 * graphite.h (graphite_bb): Add loops.
4481 (gbb_nb_loops): New.
4482 (gbb_loop_at_index): New.
4483 (gbb_loop_index): New.
4484 (nb_params_in_scop): Renamed to scop_nb_params. Updated all functions
4485 using nb_params_in_scop.
4486
44872008-06-14 Tobias Grosser <grosser@fim.uni-passau.de>
4488
4489 * graphite.c (print_graphite_bb): Adapt to minimized schedule.
4490 (build_scop_canonical_schedules): Build minimized schedule.
4491 (schedule_to_scattering): Adapt to minimized schedule.
4492 * graphite.h (graphite_bb): Add/Update descriptions.
4493
44942008-06-14 Adrien Eliche <aeliche@isty.uvsq.fr>
4495 Tobias Grosser <grosser@fim.uni-passau.de>
4496
4497 * graphite.c (print_graphite_bb): Add condition printing.
4498 (dump_value): New.
4499 (dump_gbb_conditions): New.
4500 (build_scop_conditions_1): New.
4501 (build_scop_conditions): New.
4502 * graphite.h (graphite_bb): Add conditions.
4503
45042008-06-14 Tobias Grosser <grosser@fim.uni-passau.de>
4505
4506 * graphite.c (print_graphite_bb):
4507 (free_graphite_bb): New.
4508 (free_scop): Free bbs.
4509 (get_bb_type): Free doms.
4510 (build_scop_context): Free context matrix.
4511 (build_loop_iteration_domains): Remove unused code.
4512 (build_cloog_prog): Free scattering function and blocklist.
4513 (find_transform): Free options.
4514
45152008-06-13 Tobias Grosser <grosser@fim.uni-passau.de>
4516
4517 * graphite.c (loop_body_to_cloog_stmts): Rename to add_bb_domains.
4518 Remove unnecessery cloog data structures. Make a copy of the domain
4519 (setup_cloog_loop): Rename to build_loop_iteration_domains. Remove
4520 unnecessary cloog data structures. Fix memory leaks. Remove insert
4521 into SCOP_LOOP2CLOOG_LOOP as the inserted CloogLoops will never be
4522 used.
4523 (build_scop_iteration_domain): Remove unnecessary cloog
4524 data structures. Fix memory leaks.
4525 (graphite_transform_loops): Disable build_scop_dynamic_schedules as it
4526 uses SCOP_LOOP2CLOOG_LOOP, that is at the moment not working.
4527
45282008-06-12 Tobias Grosser <grosser@fim.uni-passau.de>
4529
4530 * graphite.c (find_scop_params): Remove initialize_cloog_names.
4531
45322008-06-12 Tobias Grosser <grosser@fim.uni-passau.de>
4533
4534 * graphite.c (end_scop): Style fix.
4535 (schedule_to_scattering): Style and comment fix.
4536
45372008-06-12 Tobias Grosser <grosser@fim.uni-passau.de>
4538 * graphite.c (print_graphite_bb): Fix definiton of
4539 schedule_to_scattering.
4540 (initialize_cloog_names): Change nb_scattdims to max loop
4541 depth in SCoP.
4542 (schedule_to_scattering): Take parameter for number of scattering
4543 dimensions.
4544 (build_cloog_prog): Only build as much scattering dimensions as
4545 necessary.
4546
45472008-06-12 Tobias Grosser <grosser@fim.uni-passau.de>
4548
4549 * graphite.c (end_scop): Disable bb splitting. Fixes SIGSEGV
4550 in polyhedron/aermod.f90.
4551
45522008-06-11 Tobias Grosser <grosser@fim.uni-passau.de>
4553 Dwarak Rajagopal <dwarak.rajagopal@amd.com>
4554 Harsha Jagasia <harsha.jagasia@amd.com>
4555
4556 * graphite.c (is_bb_addable): Fix segfault.
4557
45582008-06-10 Tobias Grosser <grosser@fim.uni-passau.de>
4559
4560 * graphite.c (is_bb_addable): Fix memory leak, handling of loops
4561 with multiple exits and conditional handling in edge cases.
4562 (is_loop_exit): Fix memory leak. (Forgotten in last commit)
4563
4564 * testsuite/gcc.dg/graphite/scop-14.c: New.
4565
45662008-06-06 Tobias Grosser <grosser@fim.uni-passau.de>
4567 Adrien Eliche <aeliche@isty.uvsq.fr>
4568
4569 * graphite.c (is_bb_addable): Add more comments and enhance
4570 readablity of the source code. Fix memory leak.
4571 (is_loop_exit): Fix memory leak.
4572
45732008-06-05 Tobias Grosser <grosser@fim.uni-passau.de>
4574
4575 * graphite.c (first_loop_in_scop): Deleted.
4576 (setup_cloog_loop): Only walk the loop chain for inner loops.
4577 (build_scop_iteration_domain): Execute setup_cloog_loop for
4578 all loops in the first layer.
4579
45802008-06-05 Tobias Grosser <grosser@fim.uni-passau.de>
4581
4582 * graphite.c (scan_tree_for_params): Change the way params are
4583 added to be indepenent of the number of loops.
4584 (setup_cloog_loop): Revert to short matrix format. Fix parameter
4585 handling.
4586 (build_cloog_prog): Revert to short matrix format.
4587
45882008-06-05 Sebastian Pop <sebastian.pop@amd.com>
4589 Dwarak Rajagopal <dwarak.rajagopal@amd.com>
4590
4591 * tree-loop-fusion.c (fuse_loops): Fix uninitialized variable
4592 warning.
4593
45942008-06-05 Sebastian Pop <sebastian.pop@amd.com>
4595
4596 * graphite.c (nb_data_refs_in_scop): New.
4597 (graphite_transform_loops): Print more stats: number of
4598 loops, basic blocks and data references per scop.
4599
46002008-06-04 Sebastian Pop <sebastian.pop@amd.com>
4601 Jan Sjodin <jan.sjodin@amd.com>
4602
4603 * graphite.c (loop_affine_expr, idx_record_params,
4604 find_scop_parameters, setup_cloog_loop): Use instantiate_scev
4605 instead of instantiate_parameters.
4606
46072008-06-04 Tobias Grosser <grosser@fim.uni-passau.de>
4608
4609 * graphite.c (schedule_to_scattering): Fix scattering dimensions,
4610 add support for parameters, add STATIC_SCHEDULE at the right places,
4611 cleanup.
4612
46132008-06-04 Tobias Grosser <grosser@fim.uni-passau.de>
4614
4615 * graphite.c (build_scop_loop_nests): Only add the loops, that
4616 are contained completely in the SCoP.
4617 (build_cloog_prog): Disable scattering, until schedule_to_scattering
4618 and the domains are fixed.
4619 (build_scop_canonical_schedules): Add support for bbs not contained
4620 in any SCoP.
4621
46222008-06-04 Tobias Grosser <grosser@fim.uni-passau.de>
4623
4624 * graphite.h (scop_contains_loop): Update comments to match
4625 the actual behavior.
4626 (scop_contains_loop): New.
4627 * graphite.c (schedule_to_scattering): Use scop_contains_loop.
4628
46292008-06-04 Sebastian Pop <sebastian.pop@amd.com>
4630
4631 * graphite.c (get_bb_type): On function body, i.e. loop_0,
4632 don't mark blocks as GBB_LOOP_SING_EXIT_HEADER, mark them
4633 as GBB_COND_HEADER.
4634
46352008-06-04 Sebastian Pop <sebastian.pop@amd.com>
4636 Tobias Grosser <grosser@fim.uni-passau.de>
4637
4638 * graphite.c (graphite_transform_loops): Early return when
4639 there are no loops in the function.
4640
46412008-05-31 Sebastian Pop <sebastian.pop@amd.com>
4642 Jan Sjodin <jan.sjodin@amd.com>
4643
4644 * graphite.c (scan_tree_for_params, setup_cloog_loop): Compute the
4645 offset of the last loop.
4646 (setup_cloog_loop): Copy the entire outer constraint matrix.
4647
46482008-05-31 Sebastian Pop <sebastian.pop@amd.com>
4649 Jan Sjodin <jan.sjodin@amd.com>
4650
4651 * graphite.c (stmt_in_scop_p, function_parameter_p,
4652 invariant_in_scop_p): Removed.
4653 (scan_tree_for_params): Can be used with no constraint
4654 matrix for gathering parameters.
4655 (idx_record_params): Don't use idx_record_param, instead use
4656 scan_tree_for_params.
4657 (find_scop_parameters): Same.
4658 (setup_cloog_loop, build_scop_iteration_domain, build_cloog_prog):
4659 Fix the size of loop domains.
4660 (schedule_to_scattering): Exit when the outer loop is not in scop.
4661 (find_transform): Enable build_cloog_prog.
4662
46632008-05-31 Sebastian Pop <sebastian.pop@amd.com>
4664 Jan Sjodin <jan.sjodin@amd.com>
4665
4666 * graphite.c (schedule_to_scattering): Make scattering domains
4667 uniformly of the same size, as required by CLooG 0.14.0 and before.
4668
46692008-05-31 Sebastian Pop <sebastian.pop@amd.com>
4670 Jan Sjodin <jan.sjodin@amd.com>
4671
4672 * graphite.c (schedule_to_scattering): Rewrite, correct the
4673 translation of the scheduling function to scattering.
4674 (build_cloog_prog): Call schedule_to_scattering only once.
4675 * graphite.h (scop_loop_index): Do not fail for loops not
4676 in the scop: return -1.
4677
46782008-05-30 Tobias Grosser <grosser@fim.uni-passau.de>
4679
4680 * graphite.c (build_graphite_bb): Initialize GBB_DOMAIN.
4681 (loop_body_to_cloog_stmts): Export GBB_DOMAIN.
4682 (setup_cloog_loop): Export GBB_DOMAIN.
4683 (build_cloog_prog): New. Create new CLOOG_PROG, which should be
4684 able to rebuild the original control flow.
4685 * graphite.h (graphite_bb): Add domain field and access macro.
4686 (GBB_DOMAIN): New.
4687
46882008-05-30 Sebastian Pop <sebastian.pop@amd.com>
4689
4690 * graphite.c (debug_gbb): New.
4691 (print_scop, build_graphite_bb): Use SCOP_BBS.
4692 (build_scop_bbs): Reimplemented.
4693 (dfs_bb_in_scop_p): Removed.
4694 (build_scop_loop_nests): Reorder loops inserted in
4695 SCOP_LOOP_NEST: outer loops should come first.
4696 (build_scop_canonical_schedules): Reinitialize at zero
4697 the components of the SCOP_STATIC_SCHEDULE for the loops
4698 that have already been parsed.
4699
4700 * graphite.h (debug_gbb): Declared.
4701
47022008-05-30 Sebastian Pop <sebastian.pop@amd.com>
4703 Jan Sjodin <jan.sjodin@amd.com>
4704
4705 * graphite.c (create_empty_loop): Renamed graphite_create_new_loop.
4706 (graphite_loop_to_gcc_loop): Removed.
4707 (remove_all_edges): New.
4708 (graphite_stmt_to_gcc_stmt): Renamed translate_clast.
4709 (gloog): Remove useless code.
4710
47112008-05-29 Tobias Grosser <grosser@fim.uni-passau.de>
4712
4713 * graphite.c (get_bb_type): Reworked. We distinguish between
4714 loops with one or multiple exits.
4715 (is_loop_exit): New.
4716 (is_pred): New.
4717 (is_bb_addable): Rework condition handling, now support for case
4718 case statements and loops with multiple exits.
4719
4720 * testsuite/gcc.dg/graphite/scop-11.c: New.
4721 * testsuite/gcc.dg/graphite/scop-12.c: New.
4722 * testsuite/gcc.dg/graphite/scop-13.c: New.
4723
47242008-05-29 Tobias Grosser <grosser@fim.uni-passau.de>
4725
4726 * graphite.c (dot_all_scops_1): Fix some colors. Reuse colors, if
4727 we have too many colors.
4728
47292008-05-22 Sandeep Maram <smaram_b04@iiita.ac.in>
4730
4731 * doc/invoke.texi (-ftree-loop-fusion): Document.
4732 * tree-pass.h (pass_loop_fusion): Declared.
4733 * tree-loop-fusion.c: New.
4734 * timevar.def (TV_TREE_LOOP_FUSION): Declared.
4735 * tree-data-ref.c (find_data_references_in_loop): Make extern.
4736 * tree-data-ref.h (find_data_references_in_loop): Declared.
4737 * common.opt (ftree-loop-fusion): Declared.
4738 * Makefile.in (tree-loop-fusion.o): Added rule and to OBJS-common.
4739
47402008-05-21 Sebastian Pop <sebastian.pop@amd.com>
4741
4742 * graphite.c (build_access_matrix): Fix typo from the merge.
4743
47442008-05-20 Sebastian Pop <sebastian.pop@amd.com>
4745
4746 * Merge from mainline (130800:135673).
4747
47482008-05-07 Sebastian Pop <sebastian.pop@amd.com>
4749
4750 * graphite.c (end_scop): The exit of the scop is not part of the scop.
4751 Update dominators after splitting.
4752
47532008-05-07 Sebastian Pop <sebastian.pop@amd.com>
4754
4755 * graphite.c (is_bb_addable): Return the harmful statement.
4756 Factor up some code.
4757 (end_scop): New. Splits end of scope bbs on a harmful statement.
4758 (build_scops_1): Call end_scop.
4759
47602008-05-07 Sebastian Pop <sebastian.pop@amd.com>
4761
4762 * graphite.c: (succs_at_same_depth, end_scop, all_preds_visited_p,
4763 all_succs_visited_p, start_new_scop_for_each_succ, start_new_scop,
4764 add_dominators_to_open_scops, stop_last_open_scop, scop_end_loop,
4765 build_scops_1): Removed.
4766 (build_scops_2): Renamed build_scops_1.
4767
47682008-05-06 Sebastian Pop <sebastian.pop@amd.com>
4769
4770 * graphite.c: Fix formatting.
4771
47722008-05-06 Tobias Grosser <grosser@fim.uni-passau.de>
4773
4774 * graphite.c (get_bb_type): New.
4775 (move_scops): New.
4776 (build_scops_2): New.
4777 (is_bb_addable): New.
4778 (build_scops): Switch the scop detection.
4779 (build_scop_bbs): Add entry bb to scop.
4780 * graphite.h (struct scop): Update comment.
4781
47822008-05-06 Tobias Grosser <grosser@fim.uni-passau.de>
4783
4784 * graphite.c (dot_all_scops_1): Fix some incorrect colors and add
4785 more colors.
4786
47872008-05-06 Tobias Grosser <grosser@fim.uni-passau.de>
4788
4789 * testsuite/gcc.dg/graphite/scop-1.c: Update.
4790 * testsuite/gcc.dg/graphite/scop-2.c: Update.
4791 * testsuite/gcc.dg/graphite/scop-4.c: Update.
4792 * testsuite/gcc.dg/graphite/scop-5.c: Add.
4793 * testsuite/gcc.dg/graphite/scop-6.c: Add.
4794
47952008-05-06 Sebastian Pop <sebastian.pop@amd.com>
4796
4797 * testsuite/gcc.dg/graphite/scop-0.c: Add.
4798 * testsuite/gcc.dg/graphite/scop-7.c: Add.
4799 * testsuite/gcc.dg/graphite/scop-8.c: Add.
4800 * testsuite/gcc.dg/graphite/scop-9.c: Add.
4801 * testsuite/gcc.dg/graphite/scop-10.c: Add.
4802
48032008-05-06 Tobias Grosser <grosser@fim.uni-passau.de>
4804
4805 * graphite.c (scop_affine_expr): Renamed to loop_affine_expr.
4806 Check affine expressions depending on the outermost loop
4807 instead of a scop.
4808 (stmt_simple_for_scop_p): Same.
4809 (harmfule_stmt_in_scop): Same.
4810
48112008-04-28 Tobias Grosser <grosser@fim.uni-passau.de>
4812
4813 * graphite.c (dot_all_scops): Remove incorrect difficult bb coloring,
4814 mark entry and exit, that are not part of the SCoP and update HTML
4815 formatting.
4816
48172008-04-25 Sebastian Pop <sebastian.pop@amd.com>
4818
4819 * graphite.c (basic_block_simple_for_scop_p): Renamed
4820 harmful_stmt_in_bb.
4821 (save_scop, preds_at_same_depth, test_for_scop_bound): Removed.
4822 (add_dominators_to_open_scops, build_scops_1): Reimplemented.
4823 (all_preds_visited_p, all_succs_visited_p,
4824 start_new_scop_for_each_succ, start_new_scop, stop_last_open_scop,
4825 scop_end_loop): New.
4826 (build_scops): Do not use dfs_enumerate_from.
4827
4828 * testsuite/gcc.dg/graphite/scop-{1,2,4}.c: Updated.
4829
48302008-04-23 Sebastian Pop <sebastian.pop@amd.com>
4831
4832 * graphite.c: Add comments to functions that are missing a
4833 description.
4834 (graphite_create_iv): Removed. Merged in graphite_loop_to_gcc_loop.
4835
48362008-04-23 Sebastian Pop <sebastian.pop@amd.com>
4837
4838 * graphite.c (nb_params_in_scop): Moved...
4839 (graphite_bb_from_bb, loop_body_to_cloog_stmts): New.
4840 (setup_cloog_loop): Call loop_body_to_cloog_stmts.
4841 (clast_to_gcc_expression): Reduce column size to less than 80.
4842 (graphite_create_iv): Return the new name of the IV.
4843 (find_transform): Set options->esp and options->cpp.
4844 (gloog): Comment out the invalidation of the old loop code.
4845 (initialize_dependence_polyhedron): Replace scop_nb_params with
4846 nb_params_in_scop.
4847
4848 * graphite.h (nb_params_in_scop): ... here.
4849 (scop_nb_params): Removed.
4850 (loop_domain_dim): Return something even when the loop was not
4851 found in the hash table: avoid ICEing on all the graphite.exp
4852 testcases.
4853
48542008-04-14 Konrad Trifunovic <konrad.trifunovic@inria.fr>
4855
4856 * tree-chrec.c (for_each_scev_op): SCEV can have 3 operands.
4857
4858 * graphite.c (build_scop_dynamic_schedules): Schedule is built
4859 according to nesting level.
4860 (find_scop_parameters): Call instantiate_parameters.
4861 (scan_tree_for_params): Extend it to handle general affine bounds.
4862 Inner loop bound can depend on outer loop induction variable.
4863 (setup_cloog_loop): tmp variable is allocated on stack. Call
4864 instantiate_parameters with respect to outermost_loop_in_scop.
4865 (loop_domain_dim, ref_nb_loops, loop_iteration_vector_dim): moved to
4866 graphite.h.
4867 (create_empty_loop): Function loopify should be given edge
4868 probability, instead of edge frequency. Dominance relation from
4869 switch_bb to loop_header.
4870 (clast_to_gcc_expression): Added handling of clast_reduction node.
4871 (gloog): New functionality for removing old loop.
4872 (test_dependence): Factored out from build_rdg_all_levels.
4873 (build_rdg_all_levels): Dependence testing factored out to
4874 test_dependence function.
4875
4876 * graphite.h (struct graphite_bb): Extended with dynamic_schedule.
4877 (loop_domain_dim, ref_nb_loops, loop_iteration_vector_dim): Moved
4878 from graphite.c
4879
48802008-04-07 Sebastian Pop <sebastian.pop@amd.com>
4881
4882 * graphite.c (free_scop, param_index, initialize_cloog_names,
4883 nb_params_in_scop): Use name_tree map instead of just a tree
4884 for keeping track of the variable name associated to that tree.
4885 (create_empty_loop, gmp_cst_to_tree, clast_name_to_gcc,
4886 clast_to_gcc_expression, graphite_create_iv,
4887 graphite_loop_to_gcc_loop, graphite_cond_to_gcc_cond,
4888 graphite_stmt_to_gcc_stmt): New.
4889 (gloog): Call these.
4890 * graphite.h (struct name_tree): New.
4891 (struct scop): Use name_tree instead of tree for params.
4892 Store a vector of name_tree for new_ivs.
4893 (SCOP_NEWIVS): New.
4894 (scop_nb_params): Use name_tree instead of tree.
4895
48962008-04-05 Alexander Lamaison <awl03@doc.ic.ac.uk>
4897 Sebastian Pop <sebastian.pop@amd.com>
4898
4899 * tree-bounds.c: New.
4900 * tree-bounds.h: New.
4901 * tree-pass.h: Declare pass_bounds_early and pass_bounds_late.
4902 * passes.c: Schedule pass_bounds_early, pass_bounds_late.
4903 * builtins.c (expand_builtin_alloca): Add flag_bounds as for
4904 flag_mudflap.
4905 * gcc.c: Same.
4906 * toplev.c: Same.
4907 * c-cppbuiltin.c: Same.
4908 * c-pragma.c: Same.
4909 * common.opt: Same.
4910 * varasm.c: Same.
4911 * tree-outof-ssa.c: Same.
4912 * c-common.c: Same.
4913 * Makefile.in: Same.
4914
49152008-03-15 Antoniu Pop <antoniu.pop@gmail.com>
4916 Sebastian Pop <sebastian.pop@amd.com>
4917
4918 * tree-loop-distribution.c (remaining_stmts,
4919 upstream_mem_writes): Removed static variables.
4920 (copy_loop_before, create_bb_after_loop,
4921 mark_nodes_having_upstream_mem_writes, free_rdg_components,
4922 rdg_build_components, rdg_build_partitions,
4923 dump_rdg_partitions): Extern.
4924 (generate_loops_for_partition, generate_code_for_partition): Do not
4925 return a bool.
4926 (already_processed_vertex_p, predecessor_has_mem_write,
4927 mark_nodes_having_upstream_mem_writes, has_upstream_mem_writes,
4928 rdg_flag_all_uses, rdg_flag_uses, rdg_flag_vertex_and_dependent,
4929 rdg_flag_loop_exits, rdg_flag_similar_memory_accesses,
4930 build_rdg_partition_for_component, rdg_build_partitions, ldist_gen):
4931 Pass remaining_stmts and upstream_mem_writes as parameters.
4932 (rdg_component): Moved...
4933 (build_rdg_partition_for_component): Do not aggregate components when
4934 flag_streamize_loops is set.
4935 (gen_sequential_loops): New.
4936 (ldist_gen): Call gen_sequential_loops.
4937
4938 * tree-pass.h (pass_loop_streamization): Declared.
4939
4940 * omp-low.c (expand_omp_sections): Call add_bb_to_loop on created
4941 basic blocks when loops structures exist.
4942
4943 * builtin-types.def (BT_FN_VOID_PTR_PTR_INT): New.
4944
4945 * tree-ssa-loop-ivopts.c (expr_invariant_in_region_p): New.
4946
4947 * tree-parloops.c (take_address_of, eliminate_local_variables_1,
4948 eliminate_local_variables_stmt, eliminate_local_variables,
4949 separate_decls_in_loop_name, separate_decls_in_loop_stmt,
4950 separate_decls_in_loop, gen_parallel_loop): Make them work on a region
4951 of code delimited by two edges in the CFG.
4952 (separate_decls_in_loop_name): Renamed separate_decls_in_region_name.
4953 (separate_decls_in_loop_stmt): Renamed separate_decls_in_region_stmt.
4954 (separate_decls_in_loop): Renamed separate_decls_in_region. Isolate
4955 the case of parallelisation of reductions.
4956 (create_loop_fn): Extern.
4957 (create_omp_parallel_region): New.
4958
4959 * tree-data-ref.c (dump_data_dependence_relation): Don't call
4960 dump_data_reference for printing dra and drb.
4961 (create_rdg_edge_for_ddr, create_rdg_edges_for_scalar): Initialise
4962 RDGE_RELATION.
4963 (build_rdg): Don't call free_dependence_relations for the moment, as
4964 we attach dependence relations on each edge of the RDG.
4965 To be fixed later.
4966
4967 * tree-data-ref.h (rdg_component): ...here.
4968 (struct rdg_edge): New field ddr_p relation.
4969 (RDGE_RELATION): New.
4970 (create_bb_after_loop, copy_loop_before,
4971 mark_nodes_having_upstream_mem_writes, rdg_build_components,
4972 rdg_build_partitions, dump_rdg_partitions,
4973 free_rdg_components): Declared.
4974
4975 * omp-builtins.def (BUILT_IN_GOMP_STREAM_ALIGN_PUSH,
4976 BUILT_IN_GOMP_STREAM_ALIGN_POP): New.
4977
4978 * tree-loop-streamization.c: New.
4979
4980 * tree-flow.h (gather_blocks_in_sese_region, create_loop_fn,
4981 create_omp_parallel_region, expr_invariant_in_region_p): Declared.
4982
4983 * Makefile.in (tree-loop-streamization.o): Added to OBJS-common.
4984
4985 * tree-cfg.c (gather_blocks_in_sese_region): Extern.
4986
4987 * passes.c: Schedule pass_loop_streamization.
4988
49892008-03-08 Tobias Grosser <grosser@fmi.uni-passau.de>
4990
4991 * graphite.c (dot_all_scops_1): Fix formatting for difficult bbs and
4992 update comment.
4993
49942008-03-07 Tobias Grosser <grosser@fim.uni-passau.de>
4995
4996 * graphite.c (dot_all_scops): Update formatting.
4997 Bbs can now be part of more than one SCoP.
4998
49992008-03-04 Sebastian Pop <sebastian.pop@amd.com>
5000
5001 * graphite.c (new_loop_to_cloog_loop_str, setup_cloog_loop): Fix
5002 malloc problems.
5003 (loop_domain_dim): Check for unregistered toplev SCOP loop.
5004 * graphite.h (loop_to_cloog_loop): New.
5005
50062008-03-04 Konrad Trifunovic <konrad.trifunovic@inria.fr>
5007
5008 * graphite.c (loop_domain_dim, ref_nb_loops,
5009 loop_iteration_vector_dim): New.
5010 (build_access_matrix_with_af, build_access_matrix,
5011 initialize_dependence_polyhedron): Fixed for new matrix layout.
5012 No longer assume that all iteration domains are of the same
5013 dimensionality.
5014
50152008-03-02 Sebastian Pop <sebastian.pop@amd.com>
5016
5017 * tree-scalar-evolution.c (instantiate_parameters_1): An SSA_NAME
5018 defined in a loop at depth 0 is invariant.
5019 * tree-chrec.c (evolution_function_is_invariant_rec_p): Ditto.
5020 * tree-ssa-loop-ivopts.c (expr_invariant_in_loop_p): Should never
5021 be called at loop depth 0.
5022
5023 * graphite.c (basic_block_simple_for_scop_p): Take the scop as
5024 a parameter.
5025 (dot_all_scops_1): Update use of basic_block_simple_for_scop_p.
5026 (down_open_scop): Removed.
5027 (loop_in_scop_p): Redefined.
5028 (scop_affine_expr): New argument: scop.
5029 (stmt_simple_for_scop_p): New argument: scop. RETURN_EXPR is not
5030 a harmful statement ending a scop.
5031 (basic_block_simple_for_scop_p): New argument: scop.
5032 (get_loop_start): Removed.
5033 (new_scop): Initialize SCOP_LOOPS.
5034 (free_scop): Free SCOP_LOOPS.
5035 (succs_at_same_depth, preds_at_same_depth): New.
5036 (end_scop): Test the validity of a scop.
5037 (add_dominators_to_open_scops): New.
5038 (test_for_scop_bound): Call add_dominators_to_open_scops.
5039 Add cases for opening and closing multiple scops.
5040 (build_scops, build_scop_bbs): Iterate over basic blocks in
5041 depth first order.
5042 (build_graphite_bb): Pass scop directly.
5043 (dfs_bb_in_scop_p): New.
5044 (scop_record_loop): Use SCOP_LOOPS for not recording the same loop
5045 several times.
5046 (nb_loops_around_gb): Use loop_in_scop_p.
5047 (schedule_to_scattering): Disabled for the moment the code computing
5048 the "textual order for outer loop".
5049
5050 * graphite.h (struct scop): New field loops.
5051 (SCOP_LOOPS): New.
5052 (scop_loop_index): Test that the given loop belongs to SCOP_LOOPS.
5053
5054 * testsuite/gcc.dg/graphite/scop-{1,...,7}.c: Updated.
5055
50562008-02-27 Antoniu Pop <antoniu.pop@gmail.com>
5057 Sebastian Pop <sebastian.pop@amd.com>
5058
5059 * builtin-types.def (BT_FN_PTR_SIZE_UINT, BT_FN_BOOL_PTR): New.
5060 * common.opt (fstreamize-loops): New.
5061 * omp-builtins.def (BUILT_IN_GOMP_STREAM_CREATE,
5062 BUILT_IN_GOMP_STREAM_PUSH, BUILT_IN_GOMP_STREAM_HEAD,
5063 BUILT_IN_GOMP_STREAM_POP, BUILT_IN_GOMP_STREAM_EOS_P,
5064 BUILT_IN_GOMP_STREAM_SET_EOS, BUILT_IN_GOMP_STREAM_DESTROY): New.
5065
50662008-02-22 Konrad Trifunovic <konrad.trifunovic@inria.fr>
5067
5068 * tree-data-ref.c (build_empty_rdg): New.
5069 (build_rdg): Use it.
5070 * tree-data-ref.h (build_empty_rdg): Declared.
5071 * graphite.c (free_scop): Free SCOP_LOOP2CLOOG_LOOP.
5072 (find_vertex_for_stmt): Removed.
5073 (build_rdg_all_levels): Use build_empty_rdg and rdg_vertex_for_stmt.
5074
50752008-02-21 Sebastian Pop <sebastian.pop@amd.com>
5076
5077 * tree-loop-distribution.c (generate_builtin): After cancelling the
5078 loop tree, also delete basic blocks.
5079 (rdg_flag_uses): Stop recursion when a vertex has already been
5080 processed.
5081
50822008-02-15 Konrad Trifunovic <konrad.trifunovic@inria.fr>
5083
5084 * graphite.c (build_scop_alpha): Removed.
5085 (graphite_transform_loops): Add a dummy call to build_all_rdg_levels
5086 and dump_dependence_graph to avoid compiler warnings.
5087
50882008-02-14 Konrad Trifunovic <konrad.trifunovic@inria.fr>
5089
5090 * tree-data-ref.c (dr_may_alias_p, create_rdg_vertices): Extern.
5091 * tree-data-ref.h (dr_may_alias_p, create_rdg_vertices): Declared.
5092 * graphite.c (new_loop_to_cloog_loop_str, hash_loop_to_cloog_loop,
5093 eq_loop_to_cloog_loop, del_loop_to_cloog_loop): New.
5094 (new_scop, setup_cloog_loop): Initialize SCOP_LOOP2CLOOG_LOOP.
5095 (initialize_dependence_polyhedron, find_vertex_for_stmt,
5096 initialize_data_dependence_polyhedron, is_empty_polyhedron,
5097 statement_precedes_p, build_rdg_all_levels, build_scop_alpha,
5098 dump_dependence_graph): New.
5099 * graphite.h (struct graphite_bb): New field compressed_alpha_matrix.
5100 (GBB_ALPHA): New.
5101 (struct scop): New field loop2cloog_loop.
5102 (SCOP_LOOP2CLOOG_LOOP, struct data_dependence_polyhedron,
5103 RDGE_DDP, ddp_p, struct loop_to_cloog_loop_str): New.
5104
51052008-02-10 Konrad Trifunovic <konrad.trifunovic@inria.fr>
5106
5107 * graphite.c (build_graphite_bb): Fix initialization
5108 of the graphite basic block.
5109
51102008-02-05 Sebastian Pop <sebastian.pop@amd.com>
5111
5112 * graphite.c (scan_tree_for_params): Rewrite for the new layout of
5113 loop domain matrix. Pass in the number of loops contained in the
5114 constraint matrix.
5115 (nb_loops_around_gb): Moved before setup_cloog_loop that uses it.
5116 (setup_cloog_loop): Rewrite for the new layout of loop domain matrix:
5117 loops that are not surrounding the current loop are not represented
5118 in the domain constraint matrix.
5119 (build_scop_iteration_domain): Initial domain constraint matrix
5120 contains only the eq/ineq, cst, and scop parameters columns.
5121
51222008-01-29 Tobias Grosser <grosser@fim.uni-passau.de>
5123
5124 * graphite.c (schedule_to_scattering, nb_loops_around_gb): New.
5125 (print_graphite_bb): Print scattering.
5126
51272008-01-29 Tobias Grosser <grosser@fim.uni-passau.de>
5128
5129 * graphite.c (initialize_cloog_names): Initialize names of
5130 scattering variables.
5131
51322009-01-29 Tobias Grosser <grosser@fim.uni-passau.de>
5133
5134 * graphite.c (dot_all_scops_1): Disable debug output while
5135 printing graph.
5136
51372008-01-29 Tobias Grosser <grosser@fim.uni-passau.de>
5138
5139 * graphite.c (find_transform): Change cloog output language to C.
5140
51412008-01-27 Sebastian Pop <sebastian.pop@amd.com>
5142
5143 * tree-loop-distribution.c (generate_memset_zero,
5144 generate_builtin, generate_code_for_partition,
5145 rdg_flag_all_uses): New.
5146 (rdg_flag_uses): Gather in the same partition the statements defining
5147 the VUSES of the current statement.
5148 (rdg_flag_similar_stores): Renamed rdg_flag_similar_memory_accesses.
5149 Gather in the same partition not only the stores to the same memory
5150 access, but also the reads.
5151 (ldist_generate_loops): Renamed ldist_gen.
5152
51532008-01-24 Sebastian Pop <sebastian.pop@amd.com>
5154 Tobias Grosser <grosser@fmi.uni-passau.de>
5155
5156 * graphite.c (setup_cloog_loop): Chain all cloog loops with the
5157 next pointer, don't use the inner pointer.
5158
51592008-01-20 Tobias Grosser <grosser@fmi.uni-passau.de>
5160
5161 * graphite.c (dot_all_scops, dot_all_scops_1): New.
5162 (find_transform): Call dot_all_1.
5163 * graphite.h (dot_all_scops): Declared.
5164
51652007-12-14 Sebastian Pop <sebastian.pop@amd.com>
5166
5167 * tree-loop-distribution.c: Fix apsi.f ICE.
5168 (create_bb_after_loop): New.
5169 (generate_loops_for_partition): Use it.
5170 * testsuite/gfortran.dg/ldist-1.f90: New.
5171
5172 * tree-data-ref.c (dot_rdg): Use /tmp/rdg.dot for dotty format.
5173 * graphite.c (dot_scop): Use /tmp/scop.dot for dotty format.
5174
51752007-12-13 Tobias Grosser <grosser@fmi.uni-passau.de>
5176
5177 * graphite.c (find_transform): Dump cloog program sent to cloog.
5178
51792007-12-13 Tobias Grosser <grosser@fmi.uni-passau.de>
5180
5181 * graphite.c (initialize_cloog_names): Initialize cloog
5182 iterator names.
5183
51842007-12-13 Tobias Grosser <grosser@fmi.uni-passau.de>
5185
5186 * graphite.c (build_scop_context): Fix typo, for the matrix
5187 format: insert '0 >= 0' instead of '-1 >= 0'.
5188
51892007-12-13 Sebastian Pop <sebastian.pop@amd.com>
5190
5191 * Fix merge problems.
5192
51932007-12-13 Sebastian Pop <sebastian.pop@amd.com>
5194
5195 * graphite.c (setup_cloog_loop): Fix typo.
5196
51972007-12-12 Sebastian Pop <sebastian.pop@amd.com>
5198
5199 * doc/invoke.texi (-ftree-loop-distribution): Documented.
5200 * tree-loop-distribution.c: Reimplemented.
5201 * tree-pass.h (pass_loop_distribution): New.
5202 * tree-scalar-evolution.c (number_of_iterations_for_all_loops): Use
5203 print_loops.
5204 * graphds.h (struct graph): New field indexes.
5205 * timevar.def (TV_TREE_LOOP_DISTRIBUTION): New.
5206
5207 * tree-vect-analyze.c: Remove declaration of static functions when not
5208 needed.
5209 * tree-vectorizer.c: Same.
5210 (rename_variables_in_loop): Now extern.
5211 (slpeel_tree_duplicate_loop_to_edge_cfg): Renamed
5212 tree_duplicate_loop_to_edge_cfg. Reset PENDING_STMT for edges after
5213 calling redirect_edge_and_branch_force.
5214
5215 * tree-vectorizer.h (tree_duplicate_loop_on_edge): Declared.
5216
5217 * tree-data-ref.c: Don't include tree-chrec.h.
5218 (debug_data_dependence_relations): New.
5219 (dump_data_dependence_relation): Call dump_data_reference on data refs
5220 in the relation.
5221 (same_access_functions): Moved...
5222 (find_vertex_for_stmt): Renamed rdg_vertex_for_stmt.
5223 (dump_rdg_vertex, debug_rdg_vertex, dump_rdg_component,
5224 debug_rdg_component, dump_rdg, debug_rdg, dot_rdg_1, dot_rdg,
5225 struct rdg_vertex_info, ): New.
5226 (create_rdg_edge_for_ddr): Compute the dependence level before looking
5227 at DDR_REVERSED_P.
5228 (create_rdg_vertices): Initialize the htab of graph->indexes.
5229 Initialize RDG_MEM_WRITE_STMT and RDG_MEM_READS_STMT.
5230 (stmts_from_loop): Don't save LABEL_EXPR.
5231 (hash_stmt_vertex_info, eq_stmt_vertex_info,
5232 hash_stmt_vertex_del): New.
5233 (build_rdg): Initialize rdg->indexes.
5234 (free_rdg, stores_from_loop, ref_base_address,
5235 rdg_defs_used_in_other_loops_p, have_similar_memory_accesses,
5236 have_similar_memory_accesses_1, ref_base_address_1,
5237 remove_similar_memory_refs): New.
5238
5239 * tree-data-ref.h: Include tree-chrec.h.
5240 (debug_data_dependence_relations): Declared.
5241 (same_access_functions): ...here. Now static inline.
5242 (ddr_is_anti_dependent, ddrs_have_anti_deps,
5243 ddr_dependence_level): New.
5244 (struct rdg_vertex): New fields has_mem_write, has_mem_reads.
5245 (RDGV_HAS_MEM_WRITE, RDGV_HAS_MEM_READS, RDG_STMT, RDG_MEM_WRITE_STMT,
5246 RDG_MEM_READS_STMT): New.
5247 (dump_rdg_vertex, debug_rdg_vertex, dump_rdg_component,
5248 debug_rdg_component, dump_rdg, debug_rdg, dot_rdg,
5249 rdg_vertex_for_stmt): Declared.
5250 (struct rdg_edge): New field level.
5251 (RDGE_LEVEL, free_rdg): New.
5252 (stores_from_loop, remove_similar_memory_refs,
5253 rdg_defs_used_in_other_loops_p,
5254 have_similar_memory_accesses): Declared.
5255 (rdg_has_similar_memory_accesses): New.
5256
5257 * lambda.h (dependence_level): New.
5258 * common.opt (ftree-loop-distribution): New.
5259 * tree-flow.h (debug_loop_ir): Renamed debug_loops.
5260 (print_loop_ir): Renamed print_loops.
5261 (debug_loop, debug_loop_num, print_loops_bb, mark_virtual_ops_in_bb,
5262 tree_duplicate_loop_to_edge_cfg, rename_variables_in_loop): Declared.
5263 * Makefile.in (TREE_DATA_REF_H): Depends on tree-chrec.h.
5264 (tree-loop-distribution.o): Added.
5265 * tree-cfg.c (mark_virtual_ops_in_region): Use mark_virtual_ops_in_bb.
5266 (mark_virtual_ops_in_bb): New.
5267 (print_loops_bb, debug_loop_num, debug_loop): New.
5268 * passes.c: Scheduled pass_loop_distribution.
5269
52702007-12-12 Konrad Trifunovic <konrad.trifunovic@inria.fr>
5271
5272 * graphite.c (scan_tree_for_params): Correct the number of columns
5273 for polylib format.
5274 (nb_flat_iterator): New.
5275 (setup_cloog_loop): Initialize to 1 the first column for inequalities.
5276 (build_scop_iteration_domain): Correct the number of columns for
5277 polylib format.
5278
52792007-12-12 Sebastian Pop <sebastian.pop@amd.com>
5280
5281 * Merge from mainline (129697:130800).
5282
52832007-10-30 Sebastian Pop <sebastian.pop@amd.com>
5284
5285 * graphite.c (build_graphite_bb): SCoP's basic blocks are post
5286 dominated by SCoP's exit.
5287 (graphite_transform_loops): Compute post dominators.
5288
52892007-10-28 Sebastian Pop <sebastian.pop@amd.com>
5290
5291 * Merge from mainline (127169:129697).
5292
52932007-10-28 Sebastian Pop <sebastian.pop@amd.com>
5294
5295 * graphite.c (affine_expr): Renamed scop_affine_expr. Use an extra
5296 parameter for the basic block that contains the expression. Use
5297 outermost_loop_in_scop for evolution_function_is_affine_multivariate_p.
5298 (stmt_simple_for_scop_p): Pass to scop_affine_expr the basic block of
5299 the expression.
5300 * graphite.h (gbb_loop): New.
5301 (GBB_LOOP): Removed.
5302
53032007-08-03 Sebastian Pop <sebpop@gmail.com>
5304
5305 * Makefile.in: Fix merge problem.
5306
53072007-08-03 Sebastian Pop <sebpop@gmail.com>
5308
5309 * Merge from mainline (125309:127169).
5310 * tree-loop-distribution.c: Disabled.
5311
53122007-06-05 Sebastian Pop <sebpop@gmail.com>
5313
5314 * Merge from mainline (r123693:125309).
5315
53162007-05-30 Sebastian Pop <sebpop@gmail.com>
5317
5318 * tree-loop-distribution.c (correct_modify_expr_p): Renamed
5319 correct_modify_p
5320 (correct_modify_p, check_statements, number_of_lvalue_uses,
5321 number_of_scalar_dependences, create_edges): Use GIMPLE_MODIFY_STMT
5322 instead of MODIFY_EXPR.
5323 (update_edge_with_ddv): Don't pass index_of_edge. Initialize
5324 and push new edges.
5325
53262007-05-24 Sebastian Pop <sebpop@gmail.com>
5327
5328 * tree-loop-distribution.c (struct rdg): Replace arrays by
5329 VECs for edges and vertices.
5330 (RDG_NBV, RDG_NBE, RDG_VERTEX, RDG_EDGE): Removed.
5331 (RDGV_NB_PARTITIONS): New.
5332 (PRDG_NBV, PRDG_NBE): Removed.
5333 (build_scc_graph, correct_partitions_p, mark_partitions, build_prdg,
5334 dump_rdg, find_vertex_with_stmt, create_vertices, free_rdg,
5335 number_of_scalar_dependences, create_edges, build_rdg): Use VECs.
5336
53372007-05-17 Georges-Andre Silber <silber@cri.ensmp.fr>
5338 Sebastian Pop <sebpop@gmail.com>
5339
5340 * doc/invoke.texi (-ftree-loop-distribution): Document.
5341 * tree-loop-distribution.c: New file.
5342 * tree-pass.h (pass_loop_distribution): Declared.
5343 * timevar.def (TV_TREE_LOOP_DISTRIBUTION): New.
5344 * tree-data-ref.c (initialize_data_dependence_relation): Initialize
5345 and set reversed_p.
5346 * tree-data-ref.h (data_dependence_relation): Add reversed_p.
5347 (DDR_REVERSED_P): New.
5348 * common.opt (-ftree-loop-distribution): New.
5349 * tree-flow.h (distribute_loops): Declared.
5350 * Makefile.in (OBJS-common): Depend on tree-loop-distribution.o.
5351 * passes.c (init_optimization_passes): Schedule loop distribution.
5352
53532007-05-12 Sebastian Pop <sebastian.pop@inria.fr>
5354
5355 * graphite.c (print_graphite_bb): Don't call dump_data_references.
5356 (print_scop): Don't print when scop is NULL.
5357 (build_scop_context, find_transform): Don't output to stderr.
5358
53592007-05-09 Sebastian Pop <sebastian.pop@inria.fr>
5360
5361 * tree-data-ref.c: Don't include graphite.h.
5362 Comment out the code for printing data reference's scop.
5363 (build_access_matrix_with_af): Moved...
5364 * tree-data-ref.h (build_access_matrix_with_af): Removed declaration.
5365 * graphite.c (build_access_matrix_with_af): ... here. Now static.
5366 (print_graphite_bb): Print basic block's schedule.
5367 (print_scop): Don't print the schedule, call cloog's pretty printer.
5368 (bb_in_scop_p): A basic block is in a scop only if it is both
5369 dominated and postdominated by the scop's entry and exit basic blocks.
5370 (function_parameter_p): New.
5371 (invariant_in_scop_p): Use function_parameter_p.
5372 (new_scop, save_scop): New.
5373 (end_scop, test_for_scop_bound, build_scops): Use new_scop, and
5374 save_scop.
5375 (scan_tree_for_params): Directly build the constraint as CloogMatrix.
5376 (loop_in_scop_p): New.
5377 (scop_record_loop): Use loop_in_scop_p.
5378 (build_scop_domain): Renamed build_scop_iteration_domain.
5379 (setup_cloog_loop, initialize_cloog_names, find_scop_parameters,
5380 nb_params_in_scop, build_scop_context, first_loop_in_scop,
5381 setup_cloog_loop, dot_scop_1, dot_scop): New.
5382 * graphite.h (GBB_LOOP, SCOP_PROG, dot_scop): New.
5383 (struct scop): Add a pointer to cloog's representation of a program.
5384
53852007-04-14 Sebastian Pop <sebastian.pop@inria.fr>
5386
5387 * doc/invoke.texi (-ftree-check-verbose): Renamed
5388 -ftree-checks-verbose.
5389 * common.opt (flag_tree_check_verbose): Renamed
5390 flag_tree_checks_verbose.
5391 * tree-check.c (tree_check_warning): Use flag_tree_checks_verbose.
5392
53932007-04-14 Sebastian Pop <sebastian.pop@inria.fr>
5394
5395 * configure: Regenerated.
5396 * config.in: Regenerated.
5397 * tree-ssa-loop.c (graphite_transforms): Execute
5398 graphite_transform_loops only when HAVE_cloog.
5399 * configure.ac (HAVE_polylib, HAVE_cloog, GRAPHITE): Defined.
5400 * graphite.c: Include polylibgmp.h and cloog.h.
5401 (graphite_transform_loops): Removed loops parameter.
5402 * tree-flow.h (graphite_transform_loops): Update declaration.
5403 * Makefile.in (POLYLIBLIBS, POLYLIBINC, CLOOGLIBS, CLOOGINC): New.
5404 (LIBS): Depend on CLOOGLIBS and on POLYLIBLIBS.
5405 (INCLUDES): Depend on POLYLIBINC and on CLOOGINC.
5406 (OBJS-common): Remove dependence on graphite.o.
5407 (BACKEND): Depend on @GRAPHITE@.
5408
54092007-04-13 Sebastian Pop <sebastian.pop@inria.fr>
5410
5411 * doc/invoke.texi (-ftree-check-verbose): Documented.
5412 * testsuite/gcc.dg/tree-checker/tree-checks-1.c: New.
5413 * testsuite/gcc.dg/tree-checker/tree-checks-2.c: New.
5414 * testsuite/gcc.dg/tree-checker/tree-checks-3.c: New.
5415 * testsuite/gcc.dg/tree-checker/tree-checks-4.c: New.
5416 * testsuite/gcc.dg/tree-checker/tree-checks.exp: New.
5417 * testsuite/gcc.dg/tree-checker/condates.crp: New.
5418 * common.opt (ftree-checks-verbose): New.
5419 * tree-check.c (tree_check_warning): Move extra stderr output
5420 under control of flag_tree_check_verbose.
5421
54222007-04-12 Sebastian Pop <sebastian.pop@inria.fr>
5423
5424 * tree-match.c: Fix comments formatting.
5425 * tree-match.h: Fix comments formatting.
5426 * tree-check.c: Fix comments formatting.
5427 (tree_check_init): Restructure.
5428
54292007-04-12 Nic Volanschi <nic.volanschi@free.fr>
5430
5431 * doc/invoke.texi (-ftree-check, -ftree-checks): Documented.
5432
54332007-04-10 Sebastian Pop <sebastian.pop@inria.fr>
5434
5435 * Merge from mainline (r120733:123693).
5436
54372007-03-20 Nic Volanschi <nic.volanschi@free.fr>
5438
5439 * condate.y: New file.
5440 * tree-match.h (struct patt_info_s): New field sign.
5441 (struct condate_s): New field msg.
5442 (normalize_condate, name_condate, add_condate): New.
5443 (conds[], condate_parse): Made extern.
5444 * tree-check.c (tree_check_warning): First arg changed to cond;
5445 warning reformatted.
5446 (tree_check_init): Reset the TREE_VISITED bit on every CFG node.
5447 (tree_scan): New.
5448 (tree_check): Process trivial condates.
5449 (read_delimited_string): Removed.
5450 (print_cond): Print name and msg.
5451 (conds[]): Made extern.
5452 (parse_tree_check_file_once): Rewritten to use the parser in
5453 condate.y.
5454 Processing of option --tree_check_string moved to tree_scan().
5455 * Makefile.in: Added condate.y
5456
54572007-03-12 Sebastian Pop <sebastian.pop@inria.fr>
5458
5459 * tree-pretty-print.c (dump_generic_bb_buff, lazy_dump_generic_node):
5460 Use VECs instead of varrays.
5461 * diagnostic.h (lazy_dump_generic_node): Update declaration.
5462 * Makefile.in (pretty-print.o): Depend on vec.h.
5463 * pretty-print.c: Include tree.h and vec.h.
5464 (pp_clear_state, pp_write_list_to_stream, pp_base_format,
5465 pp_base_format, pp_construct, pp_base_string, pp_lazy_mode,
5466 new_tree_chunk, pp_add_tree, pp_add_string, pp_add_char, pp_write_list,
5467 pp_free_list): Use VECs instead of varrays.
5468 * pretty-print.h: Do not include varray.h.
5469 (struct tree_chunk_s): Declaration moved before its use.
5470 (output_buffer): Rename varray field to chunks.
5471 * tree-match.c (tree_equal, chunk_1st_char, chunks_lookahead,
5472 tree_1st_char, match_chunks_pattinfo, match_tree_pattinfo,
5473 save_global_holes): Use VECs instead of varrays.
5474 * tree-match.h: Declare VECs of cfg_node, and hole_p.
5475 * tree-check.c (scan_cfg_stmts, push_node,
5476 print_matching_stmt): Removed.
5477 (tree_check_instance, push_global_holes_if_new, tree_check,
5478 execute_tree_check): Use VECs instead of varrays.
5479 (gate_tree_check): Don't execute the CFG check when basic_block_info
5480 is not available.
5481
54822007-01-12 Sebastian Pop <sebastian.pop@inria.fr>
5483
5484 * Merge from mainline (r115016:120733).
5485
54862007-01-12 Sebastian Pop <sebastian.pop@inria.fr>
5487
5488 * Merge from mainline (r117632:117661).
5489
54902007-01-12 Sebastian Pop <sebastian.pop@inria.fr>
5491
5492 * tree-dump.c (dump_option_value_in): Add TDF_DEBUG.
5493 * tree-pass.h (TDF_DEBUG, debug_p): New.
5494 * tree-scalar-evolution.c (set_scalar_evolution, get_scalar_evolution,
5495 get_scalar_evolution, add_to_evolution, set_nb_iterations_in_loop,
5496 get_loop_exit_condition, analyze_evolution_in_loop,
5497 analyze_initial_condition, analyze_scalar_evolution,
5498 instantiate_parameters, number_of_latch_executions): Use debug_p.
5499 * tree-chrec.c (chrec_apply): Use debug_p.
5500 * tree-data-ref.c: Include graphite.h.
5501 (dump_data_reference): Print also the access matrix.
5502 (analyze_array, analyze_indirect_ref, init_data_ref,
5503 analyze_offset_expr, address_analysis, object_analysis,
5504 create_data_ref, finalize_ddr_dependent,
5505 non_affine_dependence_relation, analyze_ziv_subscript,
5506 analyze_siv_subscript_cst_affine,
5507 compute_overlap_steps_for_affine_1_2, analyze_subscript_affine_affine,
5508 can_use_analyze_subscript_affine_affine, analyze_siv_subscript,
5509 analyze_miv_subscript, analyze_overlapping_iterations,
5510 build_classic_dist_vector, subscript_dependence_tester,
5511 compute_affine_dependence, analyze_all_data_dependences): Use debug_p.
5512 (build_access_matrix_with_af): No longer static.
5513 * tree-data-ref.h (scop_p): ... declaration here.
5514 (data_reference.scop): New field.
5515 (DR_SCOP, DR_ACCESS_MATRIX): New.
5516 (build_access_matrix_with_af, dr_num_subscripts): Declared.
5517 * graphite.c (print_graphite_bb): Call dump_data_references.
5518 (print_scop): Use scop_nb_loops and scop_dim_domain.
5519 (test_for_scop_bound): Use debug_p.
5520 (scan_tree_for_params): Use scop_nb_loops, scop_nb_loops and
5521 scop_nb_params.
5522 (scop_loop_index): Moved...
5523 (scop_record_loop): New.
5524 (build_scop_loop_nests): Use scop_record_loop.
5525 (build_scop_domain): Use scop_dim_domain.
5526 (build_access_matrix): Implemented.
5527 (build_scop_canonical_schedules): Use scop_nb_loops.
5528 (build_graphite_bb): Initialize GBB_SCOP.
5529 * graphite.h (scop_p): Moved...
5530 (graphite_bb.scop): New field.
5531 (graphite_bb.iteration_domain, GBB_DOMAIN, scop.nb_params,
5532 scop.nb_loops, scop.dim_domain, SCOP_NB_LOOPS, SCOP_NB_PARAMS,
5533 SCOP_DIM_DOMAIN, SCOP_STMTS): Removed.
5534 (scop_nb_params, scop_nb_loops, scop_dim_domain, gbb_dim_domain,
5535 scop_loop_index): New.
5536 * Makefile.in (tree-data-ref.o): Depends on graphite.h.
5537
55382007-01-05 Sebastian Pop <sebastian.pop@inria.fr>
5539
5540 * Merge from mainline (r117661:120450).
5541
55422006-10-12 Sebastian Pop <sebastian.pop@inria.fr>
5543
5544 * tree-scalar-evolution.c (instantiate_parameters_1): Don't stop
5545 at the first declaration outside the varying loop, instantiate as
5546 far as possible.
5547 * tree-chrec.c (for_each_scev_op): New.
5548 * tree-chrec.h (for_each_scev_op): Declared.
5549 * tree-ssa-loop.c (pass_graphite_trans): Don't dump the function.
5550 * tree-data-ref.c (get_references_in_stmt,
5551 find_data_references_in_stmt): New, from trunk.
5552 (find_data_references_in_loop): Use get_references_in_stmt
5553 and find_data_references_in_loop, modified as in trunk.
5554 (build_access_matrix_with_af): New.
5555 * tree-data-ref.h (data_reference): Add a field access_matrix.
5556 (data_ref_loc): New, as in trunk.
5557 * graphite.c (print_graphite_bb, bb_in_scop_p, stmt_in_scop_p,
5558 invariant_in_scop_p, param_index, scan_tree_for_params,
5559 scop_loop_index, build_scop_loop_nests, build_scop_domain, irp_data,
5560 idx_record_param, idx_record_params, build_access_matrix,
5561 build_scop_data_accesses, build_scop_canonical_schedules,
5562 build_graphite_bb, build_scop_bbs, find_params_in_bb,
5563 build_scop_params): New.
5564 * graphite.h (graphite_bb): New.
5565 (scop): Add fields static_schedule, params, loop_nest,
5566 iteration_domain.
5567 * lambda.h: Declare vecs of lambda_matrix.
5568 * tree-flow.h (print_loop_ir_bb): Declared.
5569 * tree-cfg.c (print_loop_ir_bb): New.
5570 (print_loop): Use print_loop_ir_bb.
5571
55722006-10-12 Sebastian Pop <pop@cri.ensmp.fr>
5573
5574 * Merge from mainline (r115016:117632).
5575
55762006-10-11 Sebastian Pop <pop@cri.ensmp.fr>
5577
5578 * graphite.c (debug_scops): Adjust definition for avoiding a bootstrap
5579 break due to a warning.
5580
55812006-10-10 Sebastian Pop <pop@cri.ensmp.fr>
5582
5583 * graphite.c (print_scops, debug_scops): New.
5584 (graphite_transform): Renamed graphite_find_transform.
5585 * graphite.h (debug_scops): Declared.
5586
55872006-08-17 Sebastian Pop <pop@cri.ensmp.fr>
5588
5589 * tree-match.c: Reformat following the GNU style.
5590 * tree-match.h: Reformat following the GNU style.
5591 * tree-pattern.h: Removed empty file.
5592 * Makefile.in: Remove references to tree-pattern.h.
5593 * tree-check.c: Reformat following the GNU style.
5594 (execute_tree_check): Move gate condition code to...
5595 (gate_tree_check): ...here. New function.
5596 (pass_check): Use the gate function.
5597
55982006-07-04 Nic Volanschi <nic.volanschi@free.fr>
5599
5600 * tree-pattern.h: New. Tree pattern matching and checking using
5601 concrete syntax.
5602 * tree-check.c: New. Tree/CFG checking pass.
5603 * tree-match.c: New. Library for tree pattern matching.
5604 * opts.c, common.opt: Add options --ftree-check & --ftree-checks.
5605 * toplev.c, flags.h: Add globals for tree-check pass.
5606 * Makefile.in: Integrate the files in tree-check pass.
5607 * timevar.def, tree-optimize.c, tree-pass.h: Register tree-check pass.
5608 * pretty-print.c, pretty-print.h, tree-pretty-print.c, diagnostic.h:
5609 Introduce a "lazy" pretty-print mode.
5610 * tree.c, tree.h: Add tree_name.
5611
56122006-07-04 Sebastian Pop <pop@cri.ensmp.fr>
5613
5614 * doc/invoke.texi (-fgraphite): Correct typo.
5615 * tree-scalar-evolution.c (number_of_iterations_for_all_loops): Update
5616 use of print_loop_ir.
5617 * testsuite/gcc.dg/graphite/scop-1.c: New.
5618 * testsuite/gcc.dg/graphite/scop-2.c: New.
5619 * testsuite/gcc.dg/graphite/graphite.exp: New.
5620 * graphite.c: Include domwalk.h.
5621 (print_scop): Print only the entry and exit blocks.
5622 (debug_scop): No longer static.
5623 (affine_expr): Fix formating. Return also true when the expression is
5624 constant.
5625 (stmt_simple_for_scop_p): Fix formating.
5626 (build_scops): Use domwalk.
5627 (get_loop_start, end_scop, test_for_scop_bound): New.
5628 (graphite_transform_loops): Avoid printing on stderr.
5629 * graphite.h (debug_scop): Declared.
5630 * tree-flow.h (debug_loop_ir, print_loop_ir): Update declarations.
5631 * Makefile.in (graphite.o): Depend on domwalk.h.
5632 * tree-cfg.c (print_loop, print_pred_bbs, print_succ_bbs): Remove
5633 declarations for static functions.
5634 (print_loop, print_loop_ir, debug_loop_ir): Use an extra parameter for
5635 controlling output verbosity.
5636
56372006-06-26 Sebastian Pop <pop@cri.ensmp.fr>
5638 Plesco Alexandru <shurikx@gmail.com>
5639
5640 * doc/invoke.texi (-fgraphite): Document.
5641 * tree-pass.h (pass_graphite_transforms): Declared.
5642 * timevar.def (TV_GRAPHITE_TRANSFORMS): New.
5643 * tree-ssa-loop.c (graphite_transforms, gate_graphite_transforms): New.
5644 (pass_graphite_transforms): Defined.
5645 * tree-data-ref.c (free_data_ref, data_reference): Extern.
5646 * tree-data-ref.h (free_data_ref, data_reference): Declared.
5647 * graphite.c, graphite.h: New.
5648 * common.opt (fgraphite): Declared.
5649 * tree-flow.h (graphite_transform_loops): Declared.
5650 * Makefile.in (OBJS-common): Add graphite.o.
5651 (graphite.o): New rule.
5652 * passes.c (pass_graphite_transforms): Scheduled.
5653
This page took 0.596976 seconds and 5 git commands to generate.