OSDN Git Service

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