OSDN Git Service

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