OSDN Git Service

2009-09-26 Li Feng <nemokingdom@gmail.com>
[pf3gnuchains/gcc-fork.git] / gcc / ChangeLog.graphite
1 2009-09-26  Li Feng  <nemokingdom@gmail.com>
2
3         * graphite-sese-to-poly.c (build_scop_drs): Disable writing to file
4         the alias graph of data references.
5
6 2009-09-25  Li Feng  <nemokingdom@gmail.com>
7
8         * graphite-sese-to-poly.c (write_alias_graph_to_ascii_dimacs): New.
9         (build_scop_drs): When debugging, write the alias graph to file,
10         otherwise, should be disabled.
11
12 2009-09-17  Sebastian Pop  <sebastian.pop@amd.com>
13
14         * graphite-scop-detection.c (stmt_simple_memref_p): Removed.
15         (is_simple_operand): Remove call to stmt_simple_memref_p.
16         (stmt_simple_for_scop_p): Update call to is_simple_operand.
17
18 2009-09-17  David Edelsohn  <edelsohn@gnu.org>
19
20         * testsuite/gcc.dg/graphite/interchange-mvt.c: New File.
21         * testsuite/gcc.dg/graphite/scop-dsyrk.c: New File.
22         * testsuite/gcc.dg/graphite/scop-dsyr2k.c: New File.
23         * testsuite/gcc.dg/graphite/scop-mvt.c: New File.
24         * testsuite/gcc.dg/graphite/scop-sor.c: New File.
25
26 2009-09-17 Li Feng  <nemokingdom@gmail.com>
27
28         PR middle-end/41118
29         * graphite-dependences.c (poly_drs_may_alias_p): Adjust definition.
30         (pddr_original_scattering): Make sure 2 pdr2 in the same base object set.
31         (graphite_carried_dependence_level_k): Ditto.
32         * graphite-poly.c (new_poly_dr): Add init of PDR_BASE_OBJECT_SET.
33         * graphite-poly.h (struct poly_dr): Add member dr_base_object_set.
34         (new_poly_dr): Adjust declaration.
35         * graphite-sese-to-poly.c (free_data_refs_aux): New.
36         (free_gimple_bb): Added free_data_refs_aux.
37         (build_poly_dr): Add dr_base_object_set.
38         (partition_drs_to_sets): New.
39         (dr_same_base_object_p): New.
40         (build_alias_set_for_drs): New.
41         (build_base_object_set_for_drs): New.
42         (build_scop_drs): Add build_base_obj_set_for_drs.
43         * graphite-sese-to-poly.h: Added #define for alias set number index and
44         base object set index.
45         * libgomp/testsuite/libgomp.graphite/force-parallel-6.c: Refine tests.
46         * libgomp/testsuite/libgomp.graphite/pr4118.c: New.
47
48 2009-09-16  Alexander Monakov  <amonakov@ispras.ru>
49
50         * graphite-sese-to-poly.c (pdr_add_data_dimensions): Add bounds only
51         for ARRAY_REFs.  Use array_ref_{low,up}_bound to determine bounds.
52
53 2009-09-14  Sebastian Pop  <sebastian.pop@amd.com>
54
55         * graphite-sese-to-poly.c (struct irp_data): Removed.
56         (idx_record_params): Removed.
57         (find_params_in_bb): Scan for parameters the access functions; don't
58         parse the tree representation.
59
60 2009-09-14  Sebastian Pop  <sebastian.pop@amd.com>
61
62         * tree-ssa-loop.c (gate_graphite_transforms): Disable Graphite
63         passes at -O1 and below.
64
65 2009-09-14  Sebastian Pop  <sebastian.pop@amd.com>
66
67         * graphite-blocking.c: Fix order of includes: tree-chrec.h, then
68         tree-scalar-evolution.h, and then tree-data-ref.h.
69         * graphite-clast-to-gimple.c: Same.
70         * graphite-dependences.c: Same.
71         * graphite-interchange.c: Same.
72         * graphite-poly.c: Same.
73         * graphite-scop-detection.c: Same.
74         * graphite-sese-to-poly.c: Same.
75         * graphite.c: Same.
76         * lambda-code.c: Same.
77         * matrix-reorg.c: Same.
78         * tree-data-ref.c: Same.
79         * tree-if-conv.c: Same.
80         * tree-loop-distribu: Same.: Same.
81         * tree-loop-linear.c: Same.
82         * tree-parloops.c: Same.
83         * tree-predcom.c: Same.
84         * tree-vect-patterns.c: Same.
85
86 2009-09-02  Sebastian Pop  <sebastian.pop@amd.com>
87
88         Partially revert the previous patch, except the following.
89         * tree-scalar-evolution.c (instantiate_scev_not): Adapted to pass
90         as parameters the operands of the not expression.
91
92 2009-09-01  Sebastian Pop  <sebastian.pop@amd.com>
93
94         * tree-scalar-evolution.c (instantiate_scev_assign): New.
95         Do not call analyze_scalar_evolution on assignments.
96         (instantiate_scev_phi): Call analyze_scalar_evolution.
97         (instantiate_scev_name): Call instantiate_scev_assign and
98         instantiate_scev_phi.
99         (instantiate_scev_not): Adapted to pass as parameters the operands
100         of the not expression.
101
102 2009-09-01  Sebastian Pop  <sebastian.pop@amd.com>
103
104         * tree-scalar-evolution.c (instantiate_scev_binary): Adapted
105         to pass as parameters the operands of the binary expression.
106
107 2009-09-01  Sebastian Pop  <sebastian.pop@amd.com>
108
109         * tree-scalar-evolution.c (instantiate_scev_bitnot): Renamed
110         instantiate_scev_not.  Handle NEGATE_EXPR.
111         (instantiate_scev_r): Handle NEGATE_EXPR.
112
113 2009-09-01  Sebastian Pop  <sebastian.pop@amd.com>
114
115         * tree-scalar-evolution.c (instantiate_scev_1): Renamed
116         instantiate_scev_r.
117         (instantiate_scev_r): Move code in instantiate_scev_2
118         and instantiate_scev_1.
119
120 2009-09-01  Sebastian Pop  <sebastian.pop@amd.com>
121
122         * tree-scalar-evolution.c (instantiate_scev_3): New.
123         (instantiate_scev_1): Move code in instantiate_scev_3.
124
125 2009-09-01  Sebastian Pop  <sebastian.pop@amd.com>
126
127         * tree-scalar-evolution.c (instantiate_scev_poly): New.
128         (instantiate_scev_1): Move code in instantiate_scev_poly.
129
130 2009-09-01  Sebastian Pop  <sebastian.pop@amd.com>
131
132         * tree-scalar-evolution.c (instantiate_scev_bitnot): New.
133         (instantiate_scev_1): Move code in instantiate_scev_bitnot.
134
135 2009-09-01  Sebastian Pop  <sebastian.pop@amd.com>
136
137         * tree-scalar-evolution.c (instantiate_scev_convert): New.
138         (instantiate_scev_1): Move code in instantiate_scev_convert.
139
140 2009-09-01  Sebastian Pop  <sebastian.pop@amd.com>
141
142         * tree-scalar-evolution.c (instantiate_scev_binary): New.
143         (instantiate_scev_1): Move code in instantiate_scev_binary.
144
145 2009-09-01  Sebastian Pop  <sebastian.pop@amd.com>
146
147         * tree-scalar-evolution.c (instantiate_scev_name): New.
148         (instantiate_scev_1): Move code in instantiate_scev_name.
149
150 2009-08-28  Sebastian Pop  <sebastian.pop@amd.com>
151
152         * Merge from mainline (150992:151171).
153
154 2009-08-25  Sebastian Pop  <sebastian.pop@amd.com>
155
156         * graphite-dependences.c (graphite_legal_transform_bb): Call
157         pbb_remove_duplicate_pdrs.
158         * graphite-poly.c (can_collapse_pdr): Removed.
159         (pdr_find_duplicate): Removed.
160         (can_collapse_pdrs): New.
161         (pbb_remove_duplicate_pdrs): New.
162         (new_poly_dr): Do not look for duplicates.
163         * graphite-poly.h (struct poly_bb): New field pdr_duplicates_removed.
164         (PBB_PDR_DUPLICATES_REMOVED): New.
165         (pbb_remove_duplicate_pdrs): Declared.
166
167 2009-08-25  Sebastian Pop  <sebastian.pop@amd.com>
168
169         * graphite-interchange.c (pbb_interchange_profitable_p): Adjust
170         the strides by multiplying by PDR_NB_REFS.
171         * graphite-poly.c (can_collapse_pdr): New.
172         (pdr_find_duplicate): New.
173         (new_poly_dr): Call pdr_find_duplicate.  Collapse duplicate PDRs.
174         Initialize PDR_NB_REFS.
175         * graphite-poly.h (struct poly_dr): Add field nb_refs.
176         (PDR_NB_REFS): New.
177         (new_poly_dr): Number of subscripts is a graphite_dim_t.
178
179 2009-08-25  Sebastian Pop  <sebastian.pop@amd.com>
180
181         Revert one of the previous commits:
182         * graphite-dependences.c (graphite_legal_transform_bb): Avoid
183         the computation of symmetric data dependence relations.
184         (dependency_between_pbbs_p): Same.
185
186 2009-08-25  Sebastian Pop  <sebastian.pop@amd.com>
187
188         PR middle-end/40965
189         * graphite-poly.c (apply_poly_transforms): Remove legality test before
190         any transform.
191
192 2009-08-25  Sebastian Pop  <sebastian.pop@amd.com>
193
194         * graphite-dependences.c (pddr_original_scattering): Return NULL
195         for read-read dependence relations.
196         * graphite-poly.h (enum poly_dr_type): Fix comment.
197         (pdr_read_p): New.
198         (pdr_write_p): New.
199         (pdr_may_write_p): New.
200
201 2009-08-25  Sebastian Pop  <sebastian.pop@amd.com>
202
203         * graphite-poly.h (enum POLY_DR_TYPE): Renamed poly_dr_type.
204         (struct poly_dr): Same.
205         (new_poly_dr): Same.
206         * graphite-poly.c (new_poly_dr): Same.
207
208 2009-08-25  Konrad Trifunovic  <konrad.trifunovic@gmail.com>
209             Sebastian Pop  <sebastian.pop@amd.com>
210
211         * graphite-blocking.c (pbb_strip_mine_loop_depth): Renamed
212         pbb_strip_mine_time_depth.  Changed the implementation so that
213         transformation is expressed as a transformation on
214         time (scatttering) dimensions.  Also, ensures that the 2d+1
215         scheduling format is preserved.
216         (pbb_strip_mine_profitable_p): Profitability is based on the
217         iteration number of a given time (scattering) dimension,
218         and not on a original loop depth dimension.
219         (pbb_strip_mine): Call pbb_number_of_iterations_at_time.
220         (pbb_do_strip_mine): Call psct_dynamic_dim.
221         * graphite-poly.c (pbb_number_of_iterations_at_time): New.
222         * graphite-poly.h (pbb_number_of_iterations_at_time): Declared.
223         (pbb_nb_dynamic_scattering_transform): New.
224         (psct_dynamic_dim): New.
225
226 2009-08-25  Konrad Trifunovic  <konrad.trifunovic@gmail.com>
227
228         * graphite-ppl.c (ppl_max_for_le): Renamed ppl_max_for_le_pointset.
229         * graphite-ppl.h (ppl_max_for_le): Renamed ppl_max_for_le_pointset.
230         * graphite-poly.c (pbb_number_of_iterations): Rename ppl_max_for_le.
231         * graphite-interchange.c (build_linearized_memory_access): Same.
232         (memory_stride_in_loop): Same.
233
234 2009-08-25  Sebastian Pop  <sebastian.pop@amd.com>
235
236         * graphite-dependences.c (pddr_original_scattering): New.
237         (graphite_legal_transform_dr): Call pddr_original_scattering.
238         (dot_deps_1): New.
239         (dot_deps): New.
240         * graphite-dependences.h (dot_deps): Declared.
241         * graphite-poly.c (new_poly_dr): Initialize PDR_ID.
242         (print_pdr): Print PDR_ID.
243         * graphite-poly.h (struct poly_dr): Add field id.
244         (PDR_ID): New.
245         (pbb_index): New.
246         * graphite-scop-detection.c (dot_all_scops_1): Cleanup comment.
247
248 2009-08-22  Sebastian Pop  <sebastian.pop@amd.com>
249
250         * graphite-dependences.c (graphite_carried_dependence_level_k): Do
251         not delete the original dependence relation.
252
253 2009-08-21  Sebastian Pop  <sebastian.pop@amd.com>
254
255         * graphite-dependences.c (graphite_legal_transform_bb): Avoid
256         the computation of symmetric data dependence relations.
257         (dependency_between_pbbs_p): Same.
258
259 2009-08-21  Sebastian Pop  <sebastian.pop@amd.com>
260
261         * graphite-dependences.c (new_poly_dr_pair): Renamed new_poly_ddr.
262         (eq_poly_dr_pair_p): Renamed eq_poly_ddr_p.
263         (hash_poly_dr_pair_p): Renamed hash_poly_ddr_p.
264         (free_poly_ddr): New.
265         (pddr_is_empty): New.
266         (dependence_polyhedron_1): Now returns a poly_ddr_p.
267         (dependence_polyhedron): Same.  Remove useless gcc_assert.
268         Remove fprintfs.
269         (graphite_legal_transform_dr): Call pddr_is_empty and free_poly_ddr.
270         (graphite_carried_dependence_level_k): Call pddr_is_empty.
271         * graphite-dependences.h (enum poly_dependence_kind): New.
272         (poly_dr_pair): Renamed poly_ddr.  Added a field kind.
273         (PDRP_SOURCE): Renamed PDDR_SOURCE.
274         (PDRP_SINK): Renamed PDDR_SINK.
275         (PDRP_DDP): Renamed PDDR_DDP.
276         (PDDR_KIND): New.
277         (free_poly_ddr): Declared.
278         * graphite-poly.c (new_scop): Use the new hash function names.
279         * graphite-poly.h (struct scop): Renamed field original_pdr_pairs
280         into original_pddrs.
281         (SCOP_ORIGINAL_PDR_PAIRS): Renamed SCOP_ORIGINAL_PDDRS.
282
283 2009-08-21  Sebastian Pop  <sebastian.pop@amd.com>
284
285         * Merge from mainline (150764:150992).
286
287 2009-08-18  Sebastian Pop  <sebastian.pop@amd.com>
288
289         * cfgloopmanip.c (create_empty_loop_on_edge): Generate upper
290         bounds with LT_EXPR to make niter analysis more precise on code
291         generated by Graphite.
292
293 2009-08-18  Sebastian Pop  <sebastian.pop@amd.com>
294
295         * graphite-dependences.c (graphite_legal_transform_dr): Fix formatting.
296         (graphite_legal_transform_bb): Same.
297         (poly_drs_may_alias_p): Same.
298
299 2009-08-15  Sebastian Pop  <sebastian.pop@amd.com>
300
301         PR middle-end/40981
302         * graphite-ppl.c (ppl_max_for_le): Correct the use of
303         ppl_Pointset_Powerset_C_Polyhedron_maximize.
304
305 2009-08-13  Sebastian Pop  <sebastian.pop@amd.com>
306
307         * graphite-poly.c (print_pbb): Print PBB index.
308
309 2009-08-13  Sebastian Pop  <sebastian.pop@amd.com>
310
311         * Merge from mainline (r150672:150764).
312
313 2009-08-13  Sebastian Pop  <sebastian.pop@amd.com>
314
315         * graphite-interchange.c (ppl_max_for_le): Moved...
316         * graphite-poly.c (pbb_number_of_iterations): Call ppl_max_for_le.
317         * graphite-ppl.c (ppl_max_for_le): ... here.
318         * graphite-ppl.h (ppl_max_for_le): Declared.
319
320 2009-08-12  Sebastian Pop  <sebastian.pop@amd.com>
321
322         * Merge from mainline (r150372:150672).
323
324 2009-08-11  Sebastian Pop  <sebastian.pop@amd.com>
325
326         PR middle-end/40980
327         * sese.c (convert_for_phi_arg): New.
328         (add_guard_exit_phis): Use convert_for_phi_arg.
329
330         * testsuite/gfortran.dg/graphite/id-17.f: New.
331
332 2009-08-11  Sebastian Pop  <sebastian.pop@amd.com>
333
334         * graphite-sese-to-poly.c (pdr_add_data_dimensions): Dont add
335         unknown subscript upper bounds.
336
337         * testsuite/gcc.dg/graphite/interchange-6.c: Un-XFAIL.
338
339 2009-08-11  Sebastian Pop  <sebastian.pop@amd.com>
340             Pranav Garg  <pranav.garg2107@gmail.com>
341
342         * graphite-interchange.c (gather_access_strides): Removed.
343         (ppl_max_for_le): New.
344         (build_linearized_memory_access): New.
345         (memory_stride_in_loop): New.
346         (pbb_interchange_profitable_p): Reimplemented.
347         * graphite-ppl.h (ppl_new_id_map): New.
348         (ppl_interchange): New.
349
350         * testsuite/gcc.dg/graphite/interchange-6.c: XFAILed.
351
352 2009-08-11  Sebastian Pop  <sebastian.pop@amd.com>
353
354         * graphite-interchange.c (compute_subscript): Removed.
355         (compute_array_size_cstr): Removed.
356         (compute_array_size_poly): Removed.
357         (compute_array_size): Removed.
358         (gather_access_strides_poly): Removed.
359         (gather_access_strides): Empty.
360
361 2009-08-11  Sebastian Pop  <sebastian.pop@amd.com>
362
363         * graphite-dependences.c (dependence_polyhedron_1): Replace
364         pdr_nb_subscripts with PDR_NB_SUBSCRIPTS.
365         (graphite_legal_transform_dr): Same.
366         (graphite_carried_dependence_level_k): Same.
367         * graphite-poly.c (new_poly_dr): Add a parameter nb_subscripts.
368         Initialize PDR_NB_SUBSCRIPTS.
369         (print_pdr_access_layout): Replace pdr_nb_subscripts with
370         PDR_NB_SUBSCRIPTS.
371         * graphite-poly.h (struct poly_dr): Add nb_subscripts field.
372         (PDR_NB_SUBSCRIPTS): New.
373         (pdr_nb_subscripts): Removed.
374         (pdr_dim): Simplified.
375         * graphite-sese-to-poly.c (build_poly_dr): Replace pdr_nb_subscripts
376         with PDR_NB_SUBSCRIPTS.
377
378 2009-08-11  Sebastian Pop  <sebastian.pop@amd.com>
379
380         * graphite-interchange.c (compute_array_size): Remove use of
381         PDR_DATA_CONTAINER.
382         * graphite-poly.c (new_poly_dr): Remove argument data_container.
383         Do not initialize PDR_DATA_CONTAINER.
384         (print_pdr): Do not print PDR_DATA_CONTAINER.
385         * graphite-poly.h (struct poly_dr): Remove data_container field.
386         (PDR_DATA_CONTAINER): Removed.
387         * graphite-sese-to-poly.c (pdr_add_data_dimensions): Remove use of
388         PDR_DATA_CONTAINER.
389         (build_poly_dr): Same.
390
391 2009-08-11  Sebastian Pop  <sebastian.pop@amd.com>
392
393         * testsuite/gcc.dg/graphite/interchange-9.c: New.
394
395 2009-08-05  Konrad Trifunovic  <konrad.trifunovic@gmail.com>
396             Sebastian Pop  <sebastian.pop@amd.com>
397
398         * graphite-dependences.c (graphite_legal_transform_dr): Work on a
399         copy of the dependence polyhedron.  Free the temporary objects.
400         (graphite_carried_dependence_level_k): Free unused objects before
401         returning.
402
403         * testsuite/gcc.dg/graphite/interchange-1.c: XFAILed.
404         * testsuite/gcc.dg/graphite/interchange-2.c: XFAILed.
405         * testsuite/gcc.dg/graphite/interchange-3.c: XFAILed.
406         * testsuite/gcc.dg/graphite/interchange-4.c: XFAILed.
407         * testsuite/gcc.dg/graphite/interchange-7.c: XFAILed.
408
409 2009-08-05  Sebastian Pop  <sebastian.pop@amd.com>
410
411         * graphite-blocking.c (scop_do_strip_mine): Call store_scattering.
412         Early return without analyzing the data dependences if no
413         transform has been done.  Call restore_scattering if the transform
414         is not legal.
415         (graphite-interchange.c): Same.
416         * graphite-poly.c (print_scattering_function): Test for PBB_TRANSFORMED.
417         (graphite_read_transforms): Initialize PBB_TRANSFORMED.
418         (apply_poly_transforms): Do not gcc_assert that
419         the transform is legal.
420         (new_poly_bb): Initialize PBB_TRANSFORMED, PBB_SAVED, and PBB_ORIGINAL.
421         Do not initialize PBB_NB_SCATTERING_TRANSFORM, PBB_NB_LOCAL_VARIABLES,
422         PBB_TRANSFORMED_SCATTERING, and PBB_ORIGINAL_SCATTERING.
423         (free_poly_dr): Free PBB_TRANSFORMED, PBB_SAVED, and PBB_ORIGINAL.
424         * graphite-poly.h (struct poly_scattering): New.
425         (struct poly_bb): Add original, transformed, and saved fields.
426         Remove transformed_scattering, original_scattering, nb_local_variables,
427         and nb_scattering_transform fields.
428         (PBB_ORIGINAL, PBB_TRANSFORMED, PBB_SAVED): New.
429         (poly_scattering_new): New.
430         (poly_scattering_free): New.
431         (poly_scattering_copy): New.
432         (store_scattering_pbb): New.
433         (store_scattering): New.
434         (restore_scattering_pbb): New.
435         (restore_scattering): New.
436         * graphite-sese-to-poly.c (build_pbb_scattering_polyhedrons):
437         Initialize PBB_TRANSFORMED and PBB_ORIGINAL.
438
439 2009-08-05  Sebastian Pop  <sebastian.pop@amd.com>
440
441         * graphite-poly.c (print_pbb): Add parentheses in the pretty print.
442         (print_scop): Same.
443
444 2009-08-05  Sebastian Pop  <sebastian.pop@amd.com>
445
446         * Makefile.in (graphite.o): Depends on PREDICT_H.
447         * graphite.c: Include predict.h.
448         (graphite_finalize): Call tree_estimate_probability.
449         * predict.c (predict_loops): Do not call scev_initialize and
450         scev_finalize.
451         (tree_estimate_probability_bb): New.
452         (tree_estimate_probability): Do not initialize loops: move that
453         code to the driver.  Call tree_estimate_probability_bb.
454         (tree_estimate_probability_driver): New.
455         (pass_profile): Use tree_estimate_probability_driver.
456         * predict.h (tree_estimate_probability): Declared.
457
458 2009-08-05  Sebastian Pop  <sebastian.pop@amd.com>
459
460         * graphite-clast-to-gimple.c (gloog): Add time to TV_GRAPHITE_CODE_GEN.
461         * graphite-dependences.c (graphite_legal_transform): Add time to
462         TV_GRAPHITE_DATA_DEPS.
463         (dependency_between_pbbs_p): Same.
464         * timevar.def (TV_GRAPHITE_DATA_DEPS, TV_GRAPHITE_CODE_GEN): New.
465
466 2009-08-03  Sebastian Pop  <sebastian.pop@amd.com>
467
468         * Merge from mainline (r149952:150372).
469
470 2009-07-28  Sebastian Pop  <sebastian.pop@amd.com>
471
472         * ChangeLog.graphite: Fix indenting, white spaces and 80 columns.
473         * graphite-blocking.c: Same.
474         * graphite-clast-to-gimple.c: Same.
475         * graphite-dependences.c: Same.
476         * graphite-poly.c: Same.
477         * graphite-poly.h: Same.
478         * graphite-ppl.c: Same.
479         * graphite-scop-detection.c: Same.
480         * graphite-sese-to-poly.c: Same.
481         * graphite.c: Same.
482
483 2009-07-28  Sebastian Pop  <sebastian.pop@amd.com>
484
485         * graphite-sese-to-poly.c (loop_entry_phi_arg): New.
486         (remove_simple_copy_phi): New.
487         (remove_invariant_phi): New.
488         (simple_copy_phi_p): New.
489         (reduction_phi_p): New.
490         (gsi_for_ssa_name_def): New.
491         (insert_out_of_ssa_copy): New.
492         (insert_out_of_ssa_copy_on_edge): New.
493         (create_zero_dim_array): New.
494         (scalar_close_phi_node_p): New.
495         (rewrite_close_phi_out_of_ssa): New.
496         (rewrite_phi_out_of_ssa): New.
497         (rewrite_reductions_out_of_ssa): New.
498         (build_poly_scop): Call rewrite_reductions_out_of_ssa.
499
500         * testsuite/gcc.dg/graphite/id-11.c: New.
501         * testsuite/gcc.dg/graphite/id-15.c: New.
502         * testsuite/gcc.dg/graphite/interchange-1.c: Un-XFAIL.
503         * testsuite/gcc.dg/graphite/interchange-2.c: Un-XFAIL.
504         * testsuite/gcc.dg/graphite/interchange-3.c: Un-XFAIL.
505         * testsuite/gcc.dg/graphite/interchange-4.c: Un-XFAIL.
506         * testsuite/gcc.dg/graphite/interchange-7.c: Un-XFAIL.
507         * testsuite/gcc.dg/graphite/scop-matmult.c: Un-XFAIL.
508         * testsuite/gfortran.dg/graphite/id-13.f: New.
509         * testsuite/gfortran.dg/graphite/id-5.f: New.
510
511 2009-07-28  Sebastian Pop  <sebastian.pop@amd.com>
512
513         * graphite-clast-to-gimple.c (graphite_loop_normal_form): Do not
514         check that nb_reductions_in_loop is zero.
515         * graphite-scop-detection.c (harmful_stmt_in_bb): Don't filter out
516         reduction phi nodes.
517         (nb_reductions_in_loop): Removed.
518         (graphite_can_represent_loop): Do not call nb_reductions_in_loop.
519         * graphite-sese-to-poly.c (phi_node_is_iv): Removed.
520         (bb_contains_non_iv_scalar_phi_nodes): Removed.
521         (scop_contains_non_iv_scalar_phi_nodes): Removed.
522         (build_poly_scop): Do not call scop_contains_non_iv_scalar_phi_nodes.
523
524 2009-07-28  Sebastian Pop  <sebastian.pop@amd.com>
525
526         * graphite-clast-to-gimple.c (build_cloog_prog): Do not code generate
527         statements that have an empty iteration domain.
528         * testsuite/gfortran.dg/graphite/id-16.f: New.
529
530 2009-07-28  Sebastian Pop  <sebastian.pop@amd.com>
531
532         * tree-scalar-evolution.c (instantiate_scev_1): Return
533         chrec_dont_know when the result is not above instantiate_below.
534         * graphite-scop-detection.c (scopdet_basic_block_info): Fix formatting.
535         * graphite-sese-to-poly.c (create_linear_expr_from_tree): Assert that
536         the tree has a known scalar evolution.
537         * testsuite/gfortran.dg/graphite/id-14.f: New.
538         * testsuite/gfortran.dg/graphite/id-15.f: New.
539
540 2009-07-28  Sebastian Pop  <sebastian.pop@amd.com>
541
542         * sese.c (rename_variables_in_stmt): Pass in an extra parameter
543         insert_gsi.
544         (rename_variables): Keep inserting renames after the ones already
545         inserted.
546
547 2009-07-28  Sebastian Pop  <sebastian.pop@amd.com>
548
549         * graphite-sese-to-poly.c (compare_bb_depths): New.
550         (graphite_sort_dominated_info): New.
551         (build_scop_bbs_1): Call graphite_sort_dominated_info.
552         (build_scop_scattering): Fix comment.
553
554 2009-07-28  Sebastian Pop  <sebastian.pop@amd.com>
555
556         * graphite.c (graphite_finalize): Call print_loops instead of
557         dump_function_to_file.
558         * testsuite/gcc.dg/graphite/graphite.exp: Fix formatting.
559         * testsuite/gcc.dg/graphite/pr35356-1.c: New.  Look for the number of
560         loops generated in the graphite output file.
561         * testsuite/gcc.dg/graphite/pr35356-2.c: New.
562         * testsuite/gcc.dg/graphite/pr35356-3.c: New.  XFAILed for now.
563         * testsuite/gfortran.dg/graphite/id-12.f: New.
564
565 2009-07-24  Li Feng  <nemokingdom@gmail.com>
566
567         * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-8.c:
568         Remove 2 XFAIL.
569
570 2009-07-24  Li Feng  <nemokingdom@gmail.com>
571             Tobias Grosser  <grosser@fim.uni-passau.de>
572
573         * graphite-sese-to-poly.c (pdr_add_alias_set): Use data reference's
574         alias set number build alias in ACCESSES polyhedron.
575         (build_alias_set_for_drs): New.
576         (build_pbb_drs): Added build_alias_set_for_drs.
577         * graphite-dependences.c (poly_drs_may_alias_p): New.
578         (graphite_carried_dependence_level_k): Check alias information
579         before building polyhedron.
580
581 2009-07-24  Tobias Grosser  <grosser@fim.uni-passau.de>
582
583         * Makefile.in (lambda-code.o): Fix formatting.
584
585 2009-07-24  Tobias Grosser  <grosser@fim.uni-passau.de>
586
587         * Merge from mainline (r149350-149952)
588
589 2009-07-18  Tobias Grosser  <grosser@fim.uni-passau.de>
590
591         * graphite-poly.c (apply_poly_transforms): Move strip_mine
592         before interchange to prepare for loop blocking.
593
594 2009-07-18  Tobias Grosser  <grosser@fim.uni-passau.de>
595
596         * graphite-poly.c (apply_poly_transforms): Add checks after every
597         transformation.
598         * graphite-sese-to-poly.c (build_poly_scop): Remove check, as already
599         done in apply_poly_transforms.
600
601 2009-07-17  Konrad Trifunovic  <konrad.trifunovic@gmail.com>
602
603         * graphite-dependences.c (build_lexicographically_gt_constraint):
604         Replace RES parameter with *RES.
605         (dependence_polyhedron_1): Pass an address of the parameter RES
606         instead of value of RES.
607
608 2009-07-16  Sebastian Pop  <sebastian.pop@amd.com>
609
610         * graphite.c (graphite_finalize): Fix comment.
611         (graphite_transform_loops): Reset scev info after code generation
612         of each scop.
613
614 2009-07-16  Sebastian Pop  <sebastian.pop@amd.com>
615
616         * graphite.c (graphite_finalize): Call scev_reset.
617
618 2009-07-16  Sebastian Pop  <sebastian.pop@amd.com>
619
620         * graphite-clast-to-gimple.c (compute_cloog_iv_types): Do not create
621         GBB_CLOOG_IV_TYPES hash table twice.
622         * graphite-sese-to-poly.c (free_gimple_bb): Call free_data_refs.
623         (add_condition_to_domain): Clear GMP values.
624
625 2009-07-16  Sebastian Pop  <sebastian.pop@amd.com>
626
627         * graphite-dependences.c: Fix formatting.
628         * graphite-poly.c (free_poly_dr): Also free PDR_DATA_CONTAINER.
629         (pbb_number_of_iterations): Free ppl_Linear_Expression.
630         * graphite-sese-to-poly.c: Fix formatting.
631         * graphite.c (graphite_transform_loops): Create the hash table
632         after the early return.
633
634 2009-07-16  Sebastian Pop  <sebastian.pop@amd.com>
635
636         * testsuite/gcc.dg/graphite/id-14.c: New.
637         * testsuite/gcc.dg/graphite/pr40157.c: New.
638         * testsuite/gfortran.dg/graphite/id-11.f: New.
639
640 2009-07-16  Sebastian Pop  <sebastian.pop@amd.com>
641
642         * graphite-sese-to-poly.c (nb_pbbs_in_loops): New.
643         (build_poly_scop): Return false when there are no pbbs within
644         loops to avoid to pass to cloog scops with no loops.
645
646 2009-07-16  Sebastian Pop  <sebastian.pop@amd.com>
647
648         * graphite-sese-to-poly.c (build_pbb_scattering_polyhedrons): Avoid
649         useless test "i % 2".
650         (build_pbb_scattering_polyhedrons): Fix formatting.
651         (build_poly_dr): Same.
652         * graphite.c (graphite_transform_loops): Restructure.
653
654 2009-07-14  Razya Ladelsky  <razya@il.ibm.com>
655
656         * tree-ssa-loop-manip.c (rewrite_phi_with_iv): Remove
657         reduction_list parameter.
658         (rewrite_all_phi_nodes_with_iv): Same.
659         (canonicalize_loop_ivs): Same.
660         * tree-parloops.c (struct brli): Removed.
661         (build_reduction_list_info): Removed.
662         (build_new_reduction): New.
663         (analyze_reduction_list): Removed.
664         (gather_scalar_reductions): Find reductions instead of phi
665         nodes that can't be canonicalized.
666         (try_create_reduction_list): Remove reduction_list parameter.
667         (gen_parallel_loop): Same.
668         (parallelize_loops): Remove analyze_reductions variable,
669         initialization and free.
670         Change reduction_list htab initialization to reduction_info
671         elements instead of ssa names.
672         Call try_create_reduction_list and gen_parallel_loop without
673         analyzed_reduction argument.
674         * graphite-clast-to-gimple (graphite_loop_normal_form): Call
675         canonicalize_loop_ivs with one less argument.
676         * tree-flow.h (canonicalize_loop_ivs): Remove one argument.
677
678 2009-07-14  Konrad Trifunovic <konrad.trifunovic@gmail.com>
679
680         * graphite-dependences.c (new_poly_dr_pair): New.
681         (dependence_polyhedron): Renamed into dependence_polyhedron_1.
682         (new_poly_dr_pair): New.
683         (eq_poly_dr_pair_p): New.
684         (hash_poly_dr_pair_p): New.
685         * graphite-dependences.h (struct poly_dr_pair): New.
686         (eq_poly_dr_pair_p): Declared.
687         (hash_poly_dr_pair_p): Declared.
688         * graphite-poly.c (new_scop): Initialize SCOP_ORIGINAL_PDR_PAIRS.
689         (free_scop): Free SCOP_ORIGINAL_PDR_PAIRS.
690         * graphite-poly.h (struct scop): Add original_pdr_pairs field.
691         * Makefile.in (graphite-poly.o): Add dependence on
692         graphite-dependences.h.
693
694 2009-07-14  Sebastian Pop  <sebastian.pop@amd.com>
695
696         * graphite-scop-detection.c (graphite_can_represent_scev): Do not let
697         polynomials of degree > 1 pass to Graphite.
698         * tree-chrec.c (scev_is_linear_expression): Call
699         evolution_function_is_affine_multivariate_p.
700         * testsuite/gfortran.dg/graphite/id-10.f90: New.
701
702 2009-07-14  Sebastian Pop  <sebastian.pop@amd.com>
703
704         * tree-scalar-evolution.c (compute_overall_effect_of_inner_loop):
705         Instantiate scevs varying in outer loops.
706         * testsuite/gfortran.dg/graphite/id-9.f: Correct testcase.
707
708 2009-07-14  Sebastian Pop  <sebastian.pop@amd.com>
709
710         * graphite-sese-to-poly.c (build_loop_iteration_domains): Do not insert
711         redundant constraint.
712
713 2009-07-14  Sebastian Pop  <sebastian.pop@amd.com>
714
715         * testsuite/gcc.dg/graphite/graphite.exp: Fix comments.
716         * testsuite/gfortran.dg/graphite/graphite.exp: Trigger actions
717         based on the file names as in the C testsuite.
718         * testsuite/gfortran.dg/graphite/block-1.f90: Fix patterns.
719         * testsuite/gfortran.dg/graphite/block-2.f: Same.
720         * testsuite/gfortran.dg/graphite/block-3.f90: Same.
721         * testsuite/gfortran.dg/graphite/block-4.f90: Same.
722         * testsuite/gfortran.dg/graphite/id-1.f90: Same.
723         * testsuite/gfortran.dg/graphite/id-2.f90: Same.
724         * testsuite/gfortran.dg/graphite/id-3.f90: Same.
725         * testsuite/gfortran.dg/graphite/id-4.f90: Same.
726         * testsuite/gfortran.dg/graphite/id-6.f: Same.
727         * testsuite/gfortran.dg/graphite/id-9.f: Same.
728         * testsuite/gfortran.dg/graphite/interchange-1.f: Same.
729         * testsuite/gfortran.dg/graphite/interchange-2.f: Same.
730         * testsuite/gfortran.dg/graphite/scop-1.f: Same.
731
732 2009-07-14  Sebastian Pop  <sebastian.pop@amd.com>
733
734         * sese.c (expand_scalar_variables_call): New.
735         (expand_scalar_variables_ssa_name): Handle calls in expander.
736
737 2009-07-13  Sebastian Pop  <sebastian.pop@amd.com>
738
739         * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-6.c:
740         Expect to see the pattern twice.
741         * testsuite/gcc.dg/graphite/interchange-0.c: Un-XFAIL.
742         * testsuite/gcc.dg/graphite/interchange-5.c: Same.
743         * testsuite/gcc.dg/graphite/interchange-6.c: Same.
744
745 2009-07-13  Sebastian Pop  <sebastian.pop@amd.com>
746
747         * testsuite/gcc.dg/graphite/id-10.c: New.
748         * testsuite/gcc.dg/graphite/id-12.c: New.
749         * testsuite/gfortran.dg/graphite/id-7.f: New.
750         * testsuite/gfortran.dg/graphite/id-8.f: New.
751
752 2009-07-13  Sebastian Pop  <sebastian.pop@amd.com>
753
754         * graphite-sese-to-poly.c (pdr_add_data_dimensions): Fix division by
755         zero.
756
757 2009-07-13  Sebastian Pop  <sebastian.pop@amd.com>
758
759         * sese.c (rename_variables_in_stmt): Call fold_convert during renaming.
760
761 2009-07-13  Sebastian Pop  <sebastian.pop@amd.com>
762
763         * sese.c (expand_scalar_variables_stmt): Avoid unnecessary expansion.
764
765 2009-07-10  Sebastian Pop  <sebastian.pop@amd.com>
766
767         * graphite-sese-to-poly.c (pdr_add_memory_accesses): Fix order of
768         building PDR subscripts.
769
770 2009-07-10  Sebastian Pop  <sebastian.pop@amd.com>
771
772         * graphite-sese-to-poly.c (pdr_add_data_dimensions): Fix the
773         computation of array sizes.
774
775 2009-07-10  Sebastian Pop  <sebastian.pop@amd.com>
776
777         * graphite-sese-to-poly.c (add_param_constraints): Disabled.
778
779 2009-07-10  Tobias Grosser  <grosser@fim.uni-passau.de>
780
781         * graphite-dependences.c (map_into_dep_poly, map_dr_into_dep_poly,
782         build_pairwise_constraint, dr_equality_constraints,
783         build_pairwise_scheduling_equality,
784         build_pairwise_scheduling_inequality, lexicographically_gt_p,
785         build_lexicographically_gt_constraint, dependence_polyhedron,
786         graphite_legal_transform_dr, graphite_carried_dependence_level_k):
787         Move from NNC_Polyhedron to C_Polyhedron.
788         * graphite-interchange.c (compute_array_size_poly,
789         gather_access_strides): Dito.
790         * graphite-poly.c (apply_poly_transforms, new_poly_dr, free_poly_bb,
791         free_scop, pbb_number_of_iterations): Dito.
792         * graphite-poly.h (struct poly_dr, pdr_nb_subscripts, struct poly_bb,
793         pbb_dim_iter_domain, struct scop): Dito.
794         * graphite-ppl.c (new_Constraint_System_from_Cloog_Matrix,
795         new_Cloog_Domain_from_ppl_Polyhedron,
796         new_Cloog_Domain_from_ppl_Pointset_Powerset, ppl_set_coef_gmp,
797         ppl_insert_dimensions_pointset, ppl_insert_dimensions_pointset,
798         ppl_strip_loop, ppl_strip_loop, ppl_print_polyhedron_matrix,
799         ppl_print_powerset_matrix, debug_ppl_polyhedron_matrix,
800         debug_ppl_powerset_matrix, ppl_read_polyhedron_matrix): Dito.
801         * graphite-ppl.h (ppl_Pointset_Powerset_C_Polyhedron_t,
802         new_C_Polyhedron_from_Cloog_Matrix, ppl_print_powerset_matrix,
803         debug_ppl_powerset_matrix, ppl_insert_dimensions_pointset): Dito.
804         * graphite-sese-to-poly.c (build_pbb_scattering_polyhedrons,
805         build_loop_iteration_domains, ppl_constraint_type_from_tree_code,
806         add_condition_to_domain, add_condition_to_pbb, build_scop_context,
807         build_scop_iteration_domain, build_poly_dr): Dito
808
809 2009-07-09  Sebastian Pop  <sebastian.pop@amd.com>
810
811         * testsuite/gcc.dg/graphite/graphite.exp: Added a rule to execute
812         run-id-*.c files.
813         * testsuite/gcc.dg/graphite/run-id-1.c: New.
814
815 2009-07-09  Sebastian Pop  <sebastian.pop@amd.com>
816
817         * graphite-sese-to-poly.c (build_loop_iteration_domains): Add the
818         positivity constraint on the symbolic number of iterations.
819
820 2009-07-09  Sebastian Pop  <sebastian.pop@amd.com>
821
822         * graphite-sese-to-poly.c (build_loop_iteration_domains): Rewrite.
823
824 2009-07-09  Sebastian Pop  <sebastian.pop@amd.com>
825             Tobias Grosser  <grosser@fim.uni-passau.de>
826
827         * graphite-clast-to-gimple.c (build_scop_context): Removed.
828         (build_cloog_prog): Directly use SCOP_CONTEXT.
829         * graphite-poly.c (new_scop): Initialize SCOP_CONTEXT.
830         (free_scop): Free SCOP_CONTEXT.
831         (print_scop_context): New.
832         (print_scop): Call print_scop_context.
833         (debug_scop_context): New.
834         * graphite-poly.h (print_scop_context, debug_scop_context): Declared.
835         (struct scop): Added field context.
836         (SCOP_CONTEXT): New.
837         * graphite-sese-to-poly.c (add_param_constraints): New.
838         (build_scop_context): New.
839         (build_poly_scop): Call build_scop_context.
840
841 2009-07-09  Sebastian Pop  <sebastian.pop@amd.com>
842
843         * graphite-clast-to-gimple.c (gmp_cst_to_tree): Moved...
844         * graphite-ppl.c (ppl_set_inhomogeneous_gmp, ppl_set_coef_gmp): New.
845         (ppl_set_inhomogeneous, ppl_set_coef): Moved...
846         * graphite-ppl.h: Include double-int.h and tree.h.
847         (ppl_set_inhomogeneous_gmp, ppl_set_coef_gmp): Declared.
848         (ppl_set_inhomogeneous, ppl_set_coef): ...here.
849         (gmp_cst_to_tree): ...here.  Reimplemented using mpz_get_double_int.
850         (tree_int_to_gmp, ppl_set_inhomogeneous_tree, ppl_set_coef_tree): New.
851
852 2009-07-09  Sebastian Pop  <sebastian.pop@amd.com>
853
854         * graphite-clast-to-gimple.c (clast_to_gcc_expression_red): Generate
855         POINTER_PLUS_EXPR for pointer types.
856         (clast_to_gcc_expression): Same.
857
858 2009-07-09  Sebastian Pop  <sebastian.pop@amd.com>
859
860         * graphite-poly.c (print_scattering_function): Early return when
861         PBB_TRANSFORMED_SCATTERING is not initialized.
862         (print_pbb_domain): Early return when PBB_DOMAIN is not initialized.
863
864 2009-07-08  Sebastian Pop  <sebastian.pop@amd.com>
865
866         * tree-parloops.c (analyze_reduction_list): Remove unused variable
867         to fix bootstrap.
868
869 2009-07-08  Razya Ladelsky  <razya@il.ibm.com>
870
871         * tree-parloops.c (analyze_reduction_list): Change return
872         value to void.
873         (try_create_reduction_list): Move the call to
874         analyze_reduction_list to the beginining.
875         Call reduction_phi with analyzed_reductions as argument
876         instead of reduction_list.
877
878 2009-07-08  Tobias Grosser  <grosser@fim.uni-passau.de>
879
880         *  Merge from mainline (r148296:149346)
881
882 2009-07-07  Sebastian Pop  <sebastian.pop@amd.com>
883
884         * graphite-scop-detection.c (graphite_can_represent_init): New.
885         (graphite_can_represent_scev): Call graphite_can_represent_init:
886         check that the initial value does not contain multiplications of
887         parameters.
888         (stmt_has_simple_data_refs_p): New.
889         (stmt_simple_for_scop_p): Call stmt_simple_for_scop_p.
890         (is_simple_operand): Fix formatting.
891         * graphite-sese-to-poly.c (try_generate_gimple_bb): Fix formatting.
892
893 2009-07-07  Sebastian Pop  <sebastian.pop@amd.com>
894
895         * testsuite/gcc.dg/graphite/id-13.c: New.
896         * graphite-sese-to-poly.c (graphite_stmt_p): Do not call
897         analyze_scalar_evolution, use scalar_evolution_in_region.
898         (scan_tree_for_params_right_scev): Add extra assert.
899         (parameter_index_in_region_1): Split from parameter_index_in_region.
900         (idx_record_params): Use scalar_evolution_in_region.
901         (find_params_in_bb): Same.
902         (find_scop_parameters): Same.
903         (build_loop_iteration_domains): Same.
904         (create_linear_expr_from_tree): Same.
905         * sese.c (scalar_evolution_in_region): New.
906         * sese.h (scalar_evolution_in_region): Declared.
907         (defined_in_sese_p): New.
908         * tree-scalar-evolution.c (compute_overall_effect_of_inner_loop): Not
909         static anymore.
910         * tree-scalar-evolution.h (compute_overall_effect_of_inner_loop):
911         Declared.
912
913 2009-07-07  Sebastian Pop  <sebastian.pop@amd.com>
914
915         * Makefile.in: Replace dependences on tree-chrec.h with SCEV_H.
916         TREE_DATA_REF_H also implies SCEV_H.
917
918 2009-07-07  Sebastian Pop  <sebastian.pop@amd.com>
919
920         * graphite-poly.c (print_scop_params): New.
921         (print_scop): Call print_scop_params.
922         (debug_scop_params): New.
923         * graphite-poly.h (print_scop_params, debug_scop_params): Declared.
924
925 2009-07-07  Li Feng  <nemokingdom@gmail.com>
926
927         * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-4.c: New.
928         * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-5.c: New.
929         * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-6.c: New.
930         * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-7.c: New.
931         * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-8.c: New.
932         * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-9.c: New.
933
934 2009-07-07  Li Feng  <nemokingdom@gmail.com>
935
936         * graphite-clast-to-gimple.c (mark_loops_parallel): Dump information
937         for dependency checking part.
938         * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-1.c: Add
939         tests for dependency checking.
940         * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-2.c: Ditto.
941         * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-3.c: Ditto.
942         * testsuite/gcc.dg/graphite/graphite_autopar/graphite_autopar.exp: Add
943         flag -fdump-tree-graphite-all for autopar testsuites.
944
945 2009-07-06  Sebastian Pop  <sebastian.pop@amd.com>
946
947         * Makefile.in (tree-ssa-loop-manip.o): Depends on langhooks.h.
948         * tree-parloops.c (rewrite_phi_with_iv, rewrite_all_phi_nodes_with_iv,
949         canonicalize_loop_ivs): Moved...
950         * tree-ssa-loop-manip.c: ... here.  Include langhooks.h.
951
952 2009-07-06  Sebastian Pop  <sebastian.pop@amd.com>
953
954         * tree-parloops.c (try_create_reduction_list): Pass an extra
955         argument analyzed_reductions.  Call analyze_reduction_list.
956         (gen_parallel_loop): Do not call analyze_reduction_list.
957         (parallelize_loops): Init and finalize analyzed_reductions.
958
959 2009-07-06  Li Feng  <nemokingdom@gmail.com>
960
961         * testsuite/gcc.dg/graphite/graphite_autopar/graphite_autopar.exp:
962         Added flag -fno-loop-strip-mine for autopar testcase.
963
964 2009-07-04  Li Feng  <nemokingdom@gmail.com>
965
966         * graphite-dependences.c (graphite_carried_dependence_level_k): Use
967         transformed scattering dimension instead of unmatch orignal when
968         calling dependence_polyhedron.
969
970 2009-06-30  Sebastian Pop  <sebastian.pop@amd.com>
971
972         * opts.c (decode_options): Enable flag_loop_strip_mine at -O2.
973
974 2009-06-30  Sebastian Pop  <sebastian.pop@amd.com>
975
976         * graphite-poly.c (pbb_number_of_iterations): Check for returned
977         value 1 from ppl_Pointset_Powerset_NNC_Polyhedron_maximize.
978
979 2009-06-30  Sebastian Pop  <sebastian.pop@amd.com>
980
981         * graphite-blocking.c (pbb_strip_mine_profitable_p): New.
982         (pbb_do_strip_mine): Call pbb_strip_mine_profitable_p.
983         * graphite-poly.c (pbb_number_of_iterations): New.
984         * graphite-poly.h (pbb_number_of_iterations): Declared.
985         (pbb_iterator_dim, pbb_parameter_dim): New.
986
987 2009-06-29  Sebastian Pop  <sebastian.pop@amd.com>
988
989         * graphite-clast-to-gimple.c (graphite_create_new_loop): Revert the
990         last commit on type of lower and upper bound of loops.
991
992 2009-06-29  Li Feng  <nemokingdom@gmail.com>
993
994         * Makefile.in (graphite-clast-to-gimple.o): Added dependence on
995         graphite-dependences.h.
996         * graphite-clast-to-gimple.c (new_bb_pbb_def): New.
997         (mark_bb_with_pbb): New.
998         (get_stmtfor_depth): New.
999         (find_pbb_via_hash): New.
1000         (dependency_in_loop_p): New.
1001         (mark_loops_parallel): New.
1002         (free_aux_in_new_loops): New.
1003         (translate_clast): Add parameter BB_PBB_MAPPING.  Mark newly created
1004         bb with it's relevant pbb. Mark newly created loops.  Remove mark
1005         innermost loop parallel without checking.
1006         (gloog): Add parameter BB_PBB_MAPPING.
1007         * graphite-clast-to-gimple.h (struct bb_pbb_def): New.
1008         (gloog): Change declaration.
1009         (mark_loop_parallel): Make extern.
1010         (free_aux_in_new_loops): Declare.
1011         (bb_pbb_map_hash): New.
1012         (eq_bb_pbb_map): New.
1013         * graphite.c (graphite_transform_loops): Added BB_PBB_MAPPING. Trigger
1014         auto parallelization when flag_graphite_force_parallel is set.
1015         (graphite_finalize): Added free_aux_in_new_loops.
1016         * tree-parloops.c (parallelize_loops): Only generate parallel code for
1017         the innermost loop that marked parallel.  Use
1018         flag_graphite_force_parallel instead of loop->can_be_parallel.
1019         (loop_parallel_p): Move inner most checking out of function.
1020
1021 2009-06-26  Sebastian Pop  <sebastian.pop@amd.com>
1022
1023         * graphite-clast-to-gimple.c (graphite_create_new_loop): Make the
1024         type of lower and upper bound of loops signed long int.
1025
1026 2009-06-26  Sebastian Pop  <sebastian.pop@amd.com>
1027
1028         * cfgloopmanip.c (create_empty_loop_on_edge): Gimplify the loop exit
1029         expression outside the loop.
1030
1031 2009-06-26  Sebastian Pop  <sebastian.pop@amd.com>
1032
1033         * gcc.dg/graphite/interchange-8.c: New.
1034
1035 2009-06-26  Sebastian Pop  <sebastian.pop@amd.com>
1036
1037         * gcc.dg/graphite/interchange-0.c: XFailed.
1038         * gcc.dg/graphite/interchange-5.c: XFailed.
1039         * gcc.dg/graphite/interchange-6.c: XFailed.
1040
1041 2009-06-26  Sebastian Pop  <sebastian.pop@amd.com>
1042
1043         * graphite-interchange.c (compute_array_size_poly): The end of the
1044         recursion should return 1.
1045
1046 2009-06-26  Sebastian Pop  <sebastian.pop@amd.com>
1047
1048         * graphite-interchange.c (compute_array_size_cstr): Allow the
1049         subscript multiplier to be -1.
1050         (compute_array_size): Use PDR_DATA_CONTAINER and not PDR_ACCESSES.
1051         * graphite-poly.c (new_poly_dr): Takes an extra argument for the
1052         data_container.  Initializes PDR_DATA_CONTAINER.
1053         (print_pdr_access_layout): New.
1054         (print_pdr): Call print_pdr_access_layout.  Print PDR_DATA_CONTAINER.
1055         * graphite-poly.h (struct poly_dr): Adjust comment.  Add a new field
1056         data_container.
1057         (PDR_DATA_CONTAINER): New.
1058         (new_poly_dr): Update declaration.
1059         * graphite-sese-to-poly.c (pdr_add_data_dimensions): New.
1060         (build_poly_dr): Call pdr_add_data_dimensions.
1061
1062 2009-06-26  Sebastian Pop  <sebastian.pop@amd.com>
1063
1064         * graphite-poly.h (struct poly_dr): Fix comment.
1065         * graphite-sese-to-poly.c (pdr_add_alias_set): New.
1066         (pdr_add_memory_accesses): New.
1067         (build_poly_dr): Call pdr_add_memory_accesses and pdr_add_alias_set.
1068
1069 2009-06-26  Sebastian Pop  <sebastian.pop@amd.com>
1070
1071         * graphite-poly.c (print_pdrs, debug_pdrs): New.
1072         (print_pbb): Add call to print_pdrs.
1073         * graphite-poly.h (print_pdrs, debug_pdrs): Declared.
1074
1075 2009-06-24  Konrad Trifunovic <konrad.trifunovic@gmail.com>
1076             Li Feng <nemokingdom@gmail.com>
1077
1078         * graphite-dependences.c (graphite_carried_dependence_level_k): New.
1079         (dependency_between_pbbs_p): New.
1080         (lexicographically_gt_p): Assure !empty_p before polyhedron
1081         intersection assign.
1082         (build_lexicographically_gt_constraint): Correct lexicographically
1083         judging.
1084         * graphite-dependences.h: New.
1085         * Makefile.in (graphite-dependences.o): Add graphite-dependences.h.
1086
1087 2009-06-24  Sebastian Pop  <sebastian.pop@amd.com>
1088
1089         * graphite-clast-to-gimple.c (print_clast_stmt): New.
1090         (gloog): Print to dump_file the generated clast.
1091         * graphite-clast-to-gimple.h (print_clast_stmt): Declared.
1092         * graphite-interchange.c (pbb_do_interchange): Fix dump formatting.
1093
1094 2009-06-24  Sebastian Pop  <sebastian.pop@amd.com>
1095
1096         * graphite-poly.c (extend_scattering): Increment
1097         PBB_NB_LOCAL_VARIABLES by the number of added dimensions.
1098
1099 2009-06-24  Sebastian Pop  <sebastian.pop@amd.com>
1100
1101         * graphite-interchange.c (compute_array_size_poly): Added exit of
1102         recursion condition.  Continue iterating even after the first equality.
1103         (compute_array_size): Same.
1104
1105 2009-06-24  Li Feng  <nemokingdom@gmail.com>
1106
1107         * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-1.c: Update
1108         -fdump-tree-final_cleanup to -fdump-tree-optimized.
1109         * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-2.c: Ditto.
1110         * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-3.c: Ditto.
1111         * testsuite/gcc.dg/graphite/graphite_autopar/graphite_autopar.exp: Ditto.
1112
1113 2009-06-23  Sebastian Pop  <sebastian.pop@amd.com>
1114
1115         * sese.c (expand_scalar_variables_stmt): Expand scalar variables
1116         only when the use verifies is_gimple_reg.
1117
1118 2009-06-23  Sebastian Pop  <sebastian.pop@amd.com>
1119
1120         * graphite-clast-to-gimple.c (build_cloog_prog): Fix memory corruption.
1121         Allocate scaldims after call to unify_scattering_dimensions.
1122
1123 2009-06-23  Sebastian Pop  <sebastian.pop@amd.com>
1124
1125         * graphite-clast-to-gimple.c (translate_clast): Fix memory leak.
1126
1127 2009-06-23  Sebastian Pop  <sebastian.pop@amd.com>
1128             Albert Cohen  <albert.cohen@inria.fr>
1129
1130         * graphite-blocking.c (pbb_strip_mine_loop_depth): Do not use local
1131         variables for the strip mining.
1132
1133 2009-06-23  Sebastian Pop  <sebastian.pop@amd.com>
1134             Pranav Garg  <pranav.garg2107@gmail.com>
1135
1136         * Makefile.in (OBJS-common): Added graphite-blocking.o.
1137         (graphite-sese-to-poly.o): Moved down to be in lexicographical order.
1138         (graphite-blocking.o): New rule.
1139         (graphite-poly.o, graphite-ppl.o): Moved to be in lexicographical order.
1140         * graphite-blocking.c: New.
1141         * graphite-poly.c (apply_poly_transforms): Call scop_do_strip_mine for
1142         flag_loop_strip_mine.
1143         (psct_scattering_dim_for_loop_depth): New.
1144         * graphite-poly.h (scop_do_strip_mine): Declared.
1145         (psct_add_local_variable): Increment PBB_NB_LOCAL_VARIABLES.
1146         * tree-ssa-loop.c (gate_graphite_transforms): Do not fail when using
1147         flag_loop_strip_mine.
1148
1149 2009-06-23  Sebastian Pop  <sebastian.pop@amd.com>
1150
1151         * graphite-poly.c (extend_scattering): Avoid initializing and freeing
1152         a GMP value and a PPL coefficient at each iteration of a loop.
1153
1154 2009-06-23  Sebastian Pop  <sebastian.pop@amd.com>
1155
1156         * graphite-dependences.c (dependence_polyhedron): Do not use
1157         pbb_nb_scattering_dims anymore.  Use pbb_nb_scattering_orig and
1158         pbb_nb_scattering_transform.
1159         (graphite_legal_transform_dr): Same.
1160         * graphite-poly.c (extend_scattering): Same.
1161         (unify_scattering_dimensions): Same.
1162         (print_scattering_function): Same.
1163         (new_poly_bb): Initialize PBB_NB_SCATTERING_TRANSFORM and
1164         PBB_NB_LOCAL_VARIABLES.
1165         * graphite-poly.h (pbb_nb_scattering): Removed declaration.
1166         (struct poly_bb): Added nb_local_variables and nb_scattering_transform.
1167         (PBB_NB_LOCAL_VARIABLES, PBB_NB_SCATTERING_TRANSFORM): New.
1168         (pbb_nb_scattering_orig, pbb_nb_scattering_transform): New.
1169         (pbb_nb_scattering_dims, pbb_nb_scattering): Removed.
1170         (pbb_nb_scattering_transform): New.
1171         (pbb_nb_local_vars): Return PBB_NB_LOCAL_VARIABLES.
1172         (psco_scattering_dim): Add assert on parameters.
1173         (psct_scattering_dim): Same.
1174         (psct_scattering_dim_for_loop_depth): Declared.
1175         (psct_local_var_dim): New.
1176         (psco_iterator_dim, psco_parameter_dim): Add assert on parameters.
1177         (psct_iterator_dim, psct_parameter_dim): Same.  To maintain the
1178         correct layout, call pbb_nb_local_vars.
1179         (psct_add_local_variable, psct_add_scattering_dimension): New.
1180         * graphite-sese-to-poly.c (build_pbb_scattering_polyhedrons):
1181         Initialize PBB_NB_SCATTERING_TRANSFORM.
1182
1183 2009-06-23  Sebastian Pop  <sebastian.pop@amd.com>
1184
1185         * graphite-ppl.c (set_inhomogeneous): Renamed ppl_set_inhomogeneous.
1186         (set_coef): Renamed ppl_set_coef.
1187         * graphite-ppl.h (ppl_set_inhomogeneous, ppl_set_coef): Declared.
1188
1189 2009-06-23  Sebastian Pop  <sebastian.pop@amd.com>
1190
1191         * graphite-dependences.c (build_pairwise_scheduling_inequality): Don't
1192         test a boolean against 1.
1193         * graphite-interchange.c (pbb_interchange_loop_depths): Do not build
1194         a new polyhedron for the PBB_TRANSFORMED_SCATTERING.
1195         (pbb_do_interchange): Returns true when a transform has been performed.
1196         (scop_do_interchange): Same.
1197         * graphite-poly.c (apply_poly_transforms): Use the return value of
1198         scop_do_interchange.
1199         * graphite-poly.h (scop_do_interchange): Update declaration.
1200
1201 2009-06-23  Tobias Grosser  <grosser@fim.uni-passau.de>
1202
1203         * graphite-clast-to-gimple.c (gloog): Reset loop->aux right
1204         after last use.
1205         * sese.c (sese_reset_aux_in_loops): New.
1206         * sese.h (sese_reset_aux_in_loops): New.
1207
1208 2009-06-19  Sebastian Pop  <sebastian.pop@amd.com>
1209
1210         * graphite-sese-to-poly.c (scan_tree_for_params_int): Pass in the
1211         multiplier and multiply the constant by the multiplier.
1212         (scan_tree_for_params): Bound the multiplier to its MULT_EXPR.
1213         (build_poly_dr): Do not use the multiplier to define the subscript.
1214
1215 2009-06-19  Sebastian Pop  <sebastian.pop@amd.com>
1216
1217         * graphite-poly.c (new_poly_dr): Pass an extra argument for the
1218         compiler's data reference.  Initialize PDR_CDR.
1219         (print_pdr): Call dump_data_reference.
1220         * graphite-poly.h (struct poly_dr): Rename black_box into pbb.
1221         Add compiler_dr field.
1222         (PDR_BB): Renamed PDR_PBB.
1223         (PDR_CDR): New.
1224         * graphite-sese-to-poly.c (build_poly_dr): Pass to new_poly_dr
1225         GCC's data reference representation.
1226         * tree-data-ref.c (debug_data_references, debug_data_reference): New.
1227         * tree-data-ref.h (debug_data_references, debug_data_reference): Decl.
1228
1229 2009-06-19  Sebastian Pop  <sebastian.pop@amd.com>
1230
1231         * graphite-poly.c (print_scattering_function): Also print the layout.
1232         * graphite-poly.h (pbb_nb_local_vars): New.
1233
1234 2009-06-19  Sebastian Pop  <sebastian.pop@amd.com>
1235
1236         * graphite-poly.c (print_pbb_domain): Also print the layout names.
1237
1238 2009-06-19  Sebastian Pop  <sebastian.pop@amd.com>
1239
1240         * graphite-poly.c (print_pdr, debug_pdr): New.
1241         * graphite-poly.h (print_pdr, debug_pdr): Declared.
1242         (PDR_BASE): Removed.
1243
1244 2009-06-18  Sebastian Pop  <sebastian.pop@amd.com>
1245
1246         * gcc/testsuite/gcc.dg/graphite/interchange-{1..7}.c: New avatars of
1247         ltrans-{1..6,8}.c.
1248
1249 2009-06-18  Sebastian Pop  <sebastian.pop@amd.com>
1250
1251         * graphite-interchange.c (compute_subscript): Allow also -1 in the
1252         subscript identification column.
1253         (pbb_do_interchange): Print to dump_file that some loops "will be
1254         interchanged".  Rely on that chain of characters in the testcases.
1255         * gcc.dg/graphite/interchange-0.c: New.
1256         * gcc.dg/graphite/graphite.exp: Iterate over the testsuite
1257         interchange-*.c files and compile them with -floop-interchange.
1258
1259 2009-06-18  Pranav Garg  <pranav.garg2107@gmail.com>
1260
1261         * graphite-interchange.c (interchange_profitable_p): Renamed
1262         pbb_interchange_profitable_p.
1263
1264 2009-06-18  Sebastian Pop  <sebastian.pop@amd.com>
1265             Harsha Jagasia  <harsha.jagasia@amd.com>
1266             Pranav Garg  <pranav.garg2107@gmail.com>
1267
1268         * graphite-interchange.c (interchange_profitable_p): Make static.
1269         (pbb_interchange_loop_depths, pbb_do_interchange,
1270         scop_do_interchange): New.
1271         * graphite-poly.c (apply_poly_transforms): Call scop_do_interchange
1272         for flag_loop_interchange.
1273         * graphite-poly.h (scop_do_interchange): Declared.
1274         * tree-ssa-loop.c (gate_graphite_transforms): Do not fail when
1275         flag_loop_interchange is used.
1276
1277 2009-06-18  Sebastian Pop  <sebastian.pop@amd.com>
1278
1279         * graphite-dependences.c (dependence_polyhedron): Update use of
1280         pbb_nb_scattering_dims.
1281         * graphite-poly.h (pbb_nb_scattering_dims): Do not pass SCOP.
1282         (pbb_nb_scattering): Update use of pbb_nb_scattering_dims.
1283         (psco_scattering_dim, psct_scattering_dim, psco_iterator_dim,
1284         psct_iterator_dim, psco_parameter_dim, psct_parameter_dim): New.
1285
1286 2009-06-16  Sebastian Pop  <sebastian.pop@amd.com>
1287
1288         * graphite.c: Cleanup foo.
1289
1290 2009-06-16  Sebastian Pop  <sebastian.pop@amd.com>
1291
1292         * Merge from mainline (r143684:148293).
1293         * Disabled libpcp until it gets fixed.
1294
1295 2009-06-05  Sebastian Pop  <sebastian.pop@amd.com>
1296             Harsha Jagasia  <harsha.jagasia@amd.com>
1297
1298         * graphite-interchange.c: New.
1299         * Makefile.in (graphite-interchange.o): New.
1300         * graphite-poly.h (interchange_profitable_p): Declared.
1301         * graphite-ppl.h (value_max): New.
1302
1303 2009-06-04  Sebastian Pop  <sebastian.pop@amd.com>
1304
1305         * graphite-dependences.c (dependence_polyhedron): Use pdr_dim.
1306         * graphite-poly.h: Fix some comments.
1307         (pdr_dim): New.
1308         (pdr_scop): New.
1309
1310 2009-06-04  Sebastian Pop  <sebastian.pop@amd.com>
1311
1312         * graphite-poly.h
1313         (pdr_accessp_nb_subscripts): Renamed pdr_nb_subscripts.
1314         (pdr_accessp_nb_iterators): Renamed pdr_dim_iter_domain.
1315         (pdr_accessp_nb_params): Renamed pdr_nb_params.
1316         (pdr_accessp_alias_set_dim): Renamed pdr_alias_set_dim.
1317         (pdr_accessp_subscript_dim): Renamed pdr_subscript_dim.
1318         (pdr_accessp_iterator_dim): Renamed pdr_iterator_dim.
1319         (pdr_accessp_param_dim): Renamed pdr_parameter_dim.
1320         (pbb_nb_loops): Renamed pbb_dim_iter_domain.
1321         * graphite-clast-to-gimple.c: Same.
1322         * graphite-dependences.c: Same.
1323         * graphite-poly.c: Same.
1324         * graphite-sese-to-poly.c: Same.
1325
1326 2009-06-03  Sebastian Pop  <sebastian.pop@amd.com>
1327
1328         * graphite-clast-to-gimple.c (build_iv_mapping): Insert full
1329         expressions for an IV rename, as returned by clast_to_gcc_expression.
1330         (copy_renames): Rename new_name to expr.
1331         * sese.c (debug_rename_elt): Same.
1332         (get_rename): Same.
1333         (set_rename): Same.
1334         (sese_adjust_liveout_phis): Call force_gimple_operand before using
1335         the information from the rename map.
1336         (rename_variables_in_stmt): Same.
1337         (add_loop_exit_phis): Rename new_name to expr.
1338         (insert_loop_close_phis): Same.
1339         (add_guard_exit_phis): Same.  Call force_gimple_operand.
1340         * sese.h (struct rename_map_elt): Rename new_name to expr.
1341         (new_rename_map_elt): Same.
1342
1343 2009-06-03  Sebastian Pop  <sebastian.pop@amd.com>
1344
1345         * graphite-clast-to-gimple.c (build_iv_mapping): Use set_rename.
1346         * sese.c (set_rename): Make it extern.
1347         * sese.h (set_rename): Declared.
1348
1349 2009-06-03  Sebastian Pop  <sebastian.pop@amd.com>
1350
1351         * graphite-poly.c (extend_scattering): Free values.
1352         * graphite-ppl.c (new_Cloog_Domain_from_ppl_Pointset_Powerset):
1353         Free iterators.
1354         (ppl_print_powerset_matrix): Same.
1355         * graphite-scop-detection.c (free_scops_1): New.
1356         (limit_scops): Call free_scops_1.
1357         * graphite-sese-to-poly.c (build_scop_bbs_1): Free dom.
1358         (build_poly_dr): Free PPL coefficients.
1359         * tree-parloops.c (rewrite_all_phi_nodes_with_iv): Free bbs.
1360
1361 2009-06-02  Sebastian Pop  <sebastian.pop@amd.com>
1362
1363         * graphite-dependences.c: New.
1364         * graphite-data-ref.c: Removed.
1365         * graphite-data-ref.h: Removed.
1366         * Makefile.in (graphite-data-ref.o): Removed.
1367         (graphite-dependences.o): Added.
1368         * graphite-clast-to-gimple.c: Remove dependence on graphite-data-ref.h.
1369         * graphite-poly.c: Same.
1370         Move the data dependence testing to graphite-dependences.c.
1371
1372 2009-05-19  Tobias Grosser  <grosser@fim.uni-passau.de>
1373
1374         * graphite-scop-detection.c (graphite_can_represent_loop): Renamed
1375         from graphite_cannot_represent_loop. Code refactored.
1376         (scopdet_basic_block_info): Call graphite_can_represent_loop.
1377
1378 2009-05-17  Li Feng  <nemokingdom@gmail.com>
1379
1380         * testsuite/gcc.dg/graphite/graphite_autopar/graphite_autopar.exp:
1381         Cover all the testcases (not only the filtered ones).
1382
1383 2009-05-17  Tobias Grosser  <grosser@fim.uni-passau.de>
1384
1385         * graphite-scop-detection.c (stmt_simple_for_scop_p): Remove
1386         unnecessary check. Update comments. Move check for REAL_TYPE here.
1387         (harmful_stmt_in_bb): Remove checks for conditions. This is already
1388         done in (stmt_simple_for_scop_p).
1389
1390 2009-05-14 Tobias Grosser  <grosser@fim.uni-passau.de>
1391
1392         * graphite.c (print_global_statistics): New.
1393         (print_graphite_scop_statistic): New.
1394         (print_graphite_statistics): New.
1395         (graphite_initialize, graphite_transform_loops): Print statistics.
1396         * graphite-scop-detection (build_scops): Print statistics.
1397         (print_graphite_scop_statistics): New.
1398         (print_graphite_statistics): New.
1399
1400 2009-05-13  Sebastian Pop  <sebastian.pop@amd.com>
1401
1402         * graphite-clast-to-gimple.c (struct clast_name_index): Removed.
1403         (debug_clast_name_index): Removed.
1404         (debug_clast_name_indexes_1): Removed.
1405         (debug_clast_name_indexes): Removed.
1406         (clast_name_index_elt_info): Removed.
1407         (eq_clast_name_indexes): Removed.
1408         (clast_name_to_index): Removed.
1409         (new_clast_name_index): Removed.
1410         (save_clast_name_index): Removed.
1411         (save_var_name): Moved...
1412         (init_sese_params_index): Removed.
1413         (clast_name_to_gcc): Remove use of name_tree.
1414         (initialize_cloog_names): Same.
1415         (gloog): Do not call init_sese_params_index.
1416         * graphite-sese-to-poly.c (save_var_name): ...here.
1417         (parameter_index_in_region): New.
1418         * sese.c (new_sese): Initialize SESE_PARAMS_NAMES.
1419         (parameter_index_in_region): Removed.
1420         (is_parameter): Remove use of name_tree.
1421         * sese.h (struct name_tree): Removed.
1422         (struct sese): Remove use of name_tree.  New field params_names.
1423         (SESE_PARAMS_NAMES): New.
1424         (SESE_PARAMS): Remove duplicate.
1425         (parameter_index_in_region): Removed.
1426         (sese_nb_params): Remove use of name_tree.
1427         (struct clast_name_index): New.
1428         (new_clast_name_index): New.
1429         (clast_name_to_index): New.
1430         (save_clast_name_index): New.
1431         (debug_clast_name_index): New.
1432         (debug_clast_name_indexes_1): New.
1433         (debug_clast_name_indexes): New.
1434         (clast_name_index_elt_info): New.
1435         (eq_clast_name_indexes): New.
1436
1437 2009-05-13  Sebastian Pop  <sebastian.pop@amd.com>
1438
1439         * graphite-clast-to-gimple.c (compute_cloog_iv_types_1): Call
1440         pbb_to_depth_to_oldiv.  Remove call to oldiv_for_loop.
1441         (graphite_loop_normal_form): Do not pass region.  Do not
1442         initialize SESE_OLDIVS.
1443         (build_graphite_loop_normal_form): Update call to
1444         graphite_loop_normal_form.
1445         * sese.c (debug_oldivs): Removed.
1446         (new_sese): Do not initialize SESE_OLDIVS.
1447         (free_sese): Do not free SESE_OLDIVS.
1448         (oldiv_for_loop): Removed.
1449         * sese.h (struct sese): Remove old_ivs.
1450         (SESE_OLDIVS): Removed.
1451         (oldiv_for_loop): Removed.
1452
1453 2009-05-13  Sebastian Pop  <sebastian.pop@amd.com>
1454
1455         * graphite-clast-to-gimple.c (clast_name_to_gcc): Pass newivs,
1456         remove ivstack.  Remove call to loop_iv_stack_get_iv_from_name,
1457         replaced by a call to newivs_to_depth_to_newiv.
1458         (clast_to_gcc_expression): Pass newivs, remove ivstack.
1459         (clast_to_gcc_expression_red): Same.
1460         (gcc_type_for_clast_expr): Same.
1461         (gcc_type_for_clast_eq): Same.
1462         (graphite_translate_clast_equation): Same.
1463         (graphite_create_guard_cond_expr): Same.
1464         (graphite_create_new_guard): Same.
1465         (graphite_create_new_loop): Same.
1466         (build_iv_mapping): Same.
1467         (translate_clast): Same.
1468         (gloog): Same.
1469         (loop_iv_stack_patch_for_consts): Removed.  *
1470         sese.c (iv_stack_entry_is_constant): Removed.
1471         (iv_stack_entry_is_iv): Removed.
1472         (loop_iv_stack_push_iv): Removed.
1473         (loop_iv_stack_insert_constant): Removed.
1474         (loop_iv_stack_pop): Removed.
1475         (loop_iv_stack_get_iv): Removed.
1476         (loop_iv_stack_get_iv_from_name): Removed.
1477         (debug_loop_iv_stack): Removed.
1478         (free_loop_iv_stack): Removed.
1479         (loop_iv_stack_remove_constants): Removed.  *
1480         sese.h (iv_stack_entry_kind): Removed.
1481         (iv_stack_entry_data_union): Removed.
1482         (iv_stack_entry_struct): Removed.
1483         (iv_stack_entry_p): Removed.
1484         (debug_oldivs, debug_loop_iv_stack, loop_iv_stack_insert_constant,
1485         loop_iv_stack_get_iv_from_name, loop_iv_stack_push_iv,
1486         loop_iv_stack_get_iv, loop_iv_stack_remove_constants,
1487         loop_iv_stack_pop, free_loop_iv_stack): Removed.
1488         (gbb_loop_at_index): Fix indenting.
1489         (gbb_loop_index): Removed.
1490
1491 2009-05-13  Sebastian Pop  <sebastian.pop@amd.com>
1492
1493         * graphite-clast-to-gimple.c (clast_name_to_gcc): Do not use strcmp.
1494         Call clast_name_to_index.
1495
1496 2009-05-13  Sebastian Pop  <sebastian.pop@amd.com>
1497
1498         * graphite-clast-to-gimple.c (clast_name_to_gcc): Pass region,
1499         do not pass params.  Get params from SESE_PARAMS.
1500         (clast_to_gcc_expression): Same.
1501         (clast_to_gcc_expression_red): Same.
1502         (gcc_type_for_clast_eq): Same.
1503         (graphite_translate_clast_equation): Same.
1504         (graphite_create_new_loop): Same.
1505         * sese.c (rename_variables_in_stmt): Fix comment.
1506
1507 2009-05-13  Sebastian Pop  <sebastian.pop@amd.com>
1508
1509         * graphite-clast-to-gimple.c (graphite_create_new_loop): Pass
1510         newivs_index.
1511         Call save_clast_name_index.
1512         (translate_clast): Pass newivs_index.
1513         (gloog): Create and free newivs_index.
1514
1515 2009-05-13  Sebastian Pop  <sebastian.pop@amd.com>
1516
1517         * graphite-clast-to-gimple.c (clast_name_index): New structure.
1518         (clast_name_index_p): New type.
1519         (debug_clast_name_index): New.
1520         (debug_clast_name_indexes_1): New.
1521         (debug_clast_name_indexes): New.
1522         (clast_name_index_elt_info): New.
1523         (eq_clast_name_indexes): New.
1524         (clast_name_to_index): New.
1525         (new_clast_name_index): New.
1526         (save_clast_name_index): New.
1527         (init_sese_params_index): New.
1528         (gloog): Call init_sese_params_index.
1529         * graphite-clast-to-gimple.h (debug_clast_name_indexes): Declared.
1530         * sese.c (new_sese): Initialize SESE_PARAMS_INDEX.
1531         (free_sese): Free SESE_PARAMS_INDEX.
1532         * sese.h (struct sese): Add params_index.
1533         (SESE_PARAMS_INDEX): New.
1534
1535 2009-05-13  Sebastian Pop  <sebastian.pop@amd.com>
1536
1537         * graphite-clast-to-gimple.c (newivs_to_depth_to_newiv): New.
1538         (graphite_create_new_loop): Pass the newivs vector.  Push the
1539         newly created IV to newivs.
1540         (translate_clast): Pass the newivs vector.
1541         (gloog): Create and destroy the newivs vector.
1542
1543 2009-05-13  Sebastian Pop  <sebastian.pop@amd.com>
1544
1545         * graphite-clast-to-gimple.c (pbb_to_depth_to_oldiv): New.
1546         (graphite_loop_normal_form): Initialize loop->aux with the unique
1547         IV that has been created.
1548
1549 2009-05-13 Tobias Grosser  <grosser@fim.uni-passau.de>
1550
1551         * tree-chrec.c (evolution_function_right_is_integer_cst): Allow
1552         scev with parameters in the base part. They where forbidden
1553         exidently.
1554
1555 2009-05-11  Li Feng  <nemokingdom@gmail.com>
1556
1557         * testsuite/gcc.dg/graphite/graphite.exp: Set different default
1558         compile options by file names.
1559         * testsuite/gcc.dg/graphite/block{0-6}.c: Remove dg-option line.
1560         * testsuite/gcc.dg/graphite/id-{1-9}.c: Ditto.
1561         * testsuite/gcc.dg/graphite/scop-{0-20}.c: Ditto.
1562         * testsuite/gcc.dg/graphite/scop-matmult.c: Ditto.
1563
1564 2009-05-08  Li Feng <nemokingdom@gmail.com>
1565
1566         * testsuite/gcc.dg/graphite/graphite_autopar/graphite_autopar.exp: New.
1567         * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-1.c: New.
1568         * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-2.c: New.
1569         * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-3.c: New.
1570
1571 2009-05-07  Tobias Grosser  <grosser@fim.uni-passau.de>
1572
1573         * graphite-scop-detection (build_scops_1): Fix little bug introduced
1574         by final cleanup.
1575
1576 2009-05-07  Tobias Grosser  <grosser@fim.uni-passau.de>
1577
1578         * graphite-scop-detection.c (graphite_can_represent_scev): Only
1579         allow integer constant strides.
1580         (graphite_can_represent_expr): Depend on outermost_loop.
1581         (stmt_simple_memref_p, graphite_cannot_represent_loop,
1582         harmful_stmt_in_bb, is_simple_operand, stmt_simple_for_scop_p,
1583         build_scops_1): Same.
1584         (scopdet_basic_block_info): Same and insert layered SCoP
1585         detection.
1586         (try_generate_gimple_bb): Cleanup.
1587         (build_scops): Enable data references.
1588
1589         * testsuite/gcc.dg/graphite/id-5.c: New.
1590         * testsuite/gcc.dg/graphite/id-9.c: New.
1591         * tree-chrec.c (evolution_function_right_is_integer_cst): New.
1592         * tree-chrec.h (evolution_function_right_is_integer_cst): New.
1593
1594 2009-05-06  Tobias Grosser  <grosser@fim.uni-passau.de>
1595
1596         * sese.c (expand_scalar_variables_ssa_name): Only build expressions,
1597         that we have not yet built for this SCoP.
1598
1599 2009-05-06  Tobias Grosser  <grosser@fim.uni-passau.de>
1600
1601         * sese.c (expand_scalar_variables_expr): Fix expand_scalar_variables
1602         for complex numbers.
1603
1604 2009-05-06  Tobias Grosser  <grosser@fim.uni-passau.de>
1605
1606         * graphite-ppl.c: Fix build if cloog is not available.
1607
1608 2009-05-04  Li Feng  <nemokingdom@gmail.com>
1609
1610         * tree-parloops.c (loop_parallel_p): Remove construction of
1611         NITER and REDUCTION_LIST.
1612         (try_get_loop_niter): New.
1613         (try_create_reduction_list): New.
1614         (parallelize_loops): Bypass the failed checkings in autopar
1615         when can_be_parallel in loop structure is set to true.
1616
1617 2009-05-01  Tobias Grosser  <grosser@fim.uni-passau.de>
1618
1619         * testsuite/gcc.dg/graphite/id-6.c: Update testcase.
1620         * testsuite/gcc.dg/graphite/scop-3.c: Dito.
1621
1622 2009-05-01  Tobias Grosser  <grosser@fim.uni-passau.de>
1623
1624         * graphite-scop-detection.c (stmt_simple_for_scop_p):
1625         Enable EQ_EXPR and NE_EXPR again.
1626
1627 2009-04-30  Tobias Grosser  <grosser@fim.uni-passau.de>
1628
1629         * graphite-scop-detection.c (graphite_can_represent_scev):
1630         Add check if scev is affine multivariate.
1631         (harmful_stmt_in_bb): Check if we can represent the conditions.
1632         (scopdet_basic_block_info (basic_block bb, VEC): Pass the loop to
1633         harmful_stmt_in_bb.
1634         * testsuite/gcc.dg/graphite/id-7.c: New.
1635
1636 2009-04-30  Tobias Grosser  <grosser@fim.uni-passau.de>
1637
1638         * graphite-sese-to-poly.c (bb_contains_non_iv_scalar_phi_nodes):
1639         Check all bbs in region, not only the bbs that are represented in
1640         GRAPHITE.
1641         (build_poly_scop): Add newline.
1642         * testsuite/gcc.dg/graphite/id-8.c: New.
1643
1644 2009-04-30  Li Feng  <nemokingdom@gmail.com>
1645
1646         * cfgloop.c (alloc_loop): Initialize can_be_parallel to false
1647         when loop initialize.
1648         * cfgloop.h (struct loop): Introduce flag can_be_parallel.
1649         * common.opt: Declare flag_graphite_force_parallel.
1650         * graphite-clast-to-gimple.c (translate_clast): Mark the innermost
1651         loop parallel.
1652         * graphite-poly.c (apply_poly_transforms): Introduce
1653         flag_graphite_force_parallel.
1654         * tree-ssa-loop.c (gate_graphite_transforms): ditto.
1655         * toplev.c (process_options): ditto and replace a not correctly
1656         encoded space.
1657
1658 2009-04-30  Li Feng  <nemokingdom@gmail.com>
1659
1660         * graphite-clast-to-gimple.c (loop_iv_stack_patch_for_consts):
1661         Change the call of gbb_loop_at_index and/or gbb_loop_index due
1662         to the redefinition.
1663         (compute_cloog_iv_types_1): ditto.
1664         (build_iv_mapping): ditto.
1665         * graphite-sese-to-poly.c (new_gimple_bb): Remove GBB_LOOPS related
1666         initialization.
1667         (free_gimple_bb): Removed GBB_LOOPS related free part.
1668         (build_bb_loops): Removed.
1669         * sese.h (struct gimple_bb): Removed loops.
1670         (GBB_LOOPS): Removed.
1671         (gbb_loop_at_index): Instead of using GBB_LOOPS, we use sese instead.
1672         (gbb_loop_index): ditto.
1673
1674 2009-04-24  Tobias Grosser  <grosser@fim.uni-passau.de>
1675
1676         * graphite-scop-detection.c (graphite_can_represent_scev): Do not
1677         allow non constant strides.
1678         * testsuite/gcc.dg/graphite/scop-20.c: New.
1679
1680 2009-04-24  Sebastian Pop  <sebastian.pop@amd.com>
1681
1682         * graphite-scop-detection.c (dot_all_scops): Fix system call
1683         return value warning.
1684         (dot_scop): Same.
1685
1686 2009-04-24  Sebastian Pop  <sebastian.pop@amd.com>
1687
1688         * testsuite/gcc.dg/graphite/id-6.c: Fix pattern.
1689         * testsuite/gcc.dg/graphite/scop-3.c: Same.
1690
1691 2009-04-24  Sebastian Pop  <sebastian.pop@amd.com>
1692
1693         * graphite-poly.c (map_into_dep_poly, map_dr_into_dep_poly,
1694         build_pairwise_constraint, dr_equality_constraints,
1695         build_pairwise_scheduling_equality,
1696         build_pairwise_scheduling_inequality, lexicographically_gt_p,
1697         build_lexicographically_gt_constraint, dependence_polyhedron,
1698         graphite_legal_transform_dr, graphite_legal_transform_bb,
1699         graphite_legal_transform): New.
1700         * graphite-poly.h (graphite_legal_transform): Declared.
1701         * graphite-sese-to-poly.c (build_poly_scop): Call to
1702         graphite_legal_transform is disabled for the moment.
1703
1704 2009-04-24  Sebastian Pop  <sebastian.pop@amd.com>
1705
1706         * graphite-poly.h (pbb_nb_scattering_dims): New.
1707         (pbb_nb_scattering): Use it.
1708
1709 2009-04-24  Sebastian Pop  <sebastian.pop@amd.com>
1710
1711         * graphite-ppl.c (ppl_insert_dimensions_pointset): Add
1712         Pointset_Powerset version of ppl_insert_dimensions.
1713         * graphite-ppl.h (ppl_insert_dimensions_pointset): Declared.
1714
1715 2009-04-24  Sebastian Pop  <sebastian.pop@amd.com>
1716
1717         * graphite-ppl.c (ppl_insert_dimensions): Fix formatting.
1718
1719 2009-04-24  Sebastian Pop  <sebastian.pop@amd.com>
1720
1721         * graphite-poly.h: Fix comment.
1722
1723 2009-04-24  Sebastian Pop  <sebastian.pop@amd.com>
1724
1725         * graphite-sese-to-poly.c (build_poly_dr): Fix data ref multiplier.
1726
1727 2009-04-24  Tobias Grosser  <grosser@fim.uni-passau.de>
1728
1729         * sese.c (expand_scalar_variables_stmt): Only iterate over the old
1730         statements.
1731
1732 2009-04-24  Tobias Grosser  <grosser@fim.uni-passau.de>
1733
1734         * graphite-sese-to-poly.c (var_used_in_not_loop_header_phi_node): New.
1735         (graphite_stmt_p): Represent bbs necessary to build the phi nodes of
1736         conditions.
1737
1738 2009-04-20  Sebastian Pop  <sebastian.pop@amd.com>
1739
1740         * graphite-scop-detection.c (stmt_simple_for_scop_p): Do not
1741         handle EQ_EXPR and NE_EXPR.
1742
1743 2009-04-17  Tobias Grosser  <grosser@fim.uni-passau.de>
1744
1745         * graphite-poly.h (poly_dr): Fix comment.
1746
1747 2009-04-09  Sebastian Pop  <sebastian.pop@amd.com>
1748             Tobias Grosser  <grosser@fim.uni-passau.de>
1749
1750         * graphite-poly.c (new_poly_bb): Do not initialize PBB_DOMAIN
1751         with a zero dimension polyhedron.
1752         (find_scop_parameters): Move the call to scop_set_nb_params here.
1753         (build_loop_iteration_domains): Store in loop->aux the iteration
1754         domain polyhedron.
1755         (build_scop_iteration_domain): Fix PBB_DOMAIN for bbs not surrounded
1756         by any loop in scop.
1757         (build_poly_scop): Do not call scop_set_nb_params.
1758
1759 2009-04-09  Sebastian Pop  <sebastian.pop@amd.com>
1760             Tobias Grosser  <grosser@fim.uni-passau.de>
1761
1762         * graphite-sese-to-poly.c (add_condition_to_pbb): Pass code to
1763         add_condition_to_domain not GT_EXPR.
1764
1765 2009-04-09  Tobias Grosser  <grosser@fim.uni-passau.de>
1766
1767         * graphite-ppl.c (debug_ppl_powerset_matrix): New.
1768         * graphite-ppl.h (debug_ppl_powerset_matrix): New.
1769         * graphite-sese-to-poly.c (add_condition_to_pbb): Use
1770         upper_bound_assign to calculate unions.
1771         * testsuite/gcc.dg/graphite/id-6.c: New.
1772
1773 2009-04-09  Tobias Grosser  <grosser@fim.uni-passau.de>
1774
1775         * graphite-scop-detection.c (canonicalize_loop_closed_ssa): Do not
1776         handle abnormal edges.
1777
1778 2009-04-09  Tobias Grosser  <grosser@fim.uni-passau.de>
1779
1780         * graphite-poly.c (new_poly_dr, free_poly_dr): New.
1781         (free_poly_bb): Also free poly_drs.
1782         * graphite-poly.h (new_poly_dr, free_poly_dr): New.
1783         (poly_dr): Polyhedron to Pointset_Powerset.
1784         (pdr_accessp_nb_subscripts): Same.
1785         * graphite-sese-to-poly.c (build_poly_dr): Same. And actually build
1786         poly_drs.
1787
1788 2009-04-08  Sebastian Pop  <sebastian.pop@amd.com>
1789
1790         * graphite-clast-to-gimple.c (initialize_cloog_names): Change cloog
1791         names into more meaningful names.
1792
1793 2009-04-08  Sebastian Pop  <sebastian.pop@amd.com>
1794
1795         * testsuite/gfortran.dg/graphite/interchange-1.c: New.
1796         * testsuite/gfortran.dg/graphite/interchange-2.c: New.
1797
1798 2009-04-08  Sebastian Pop  <sebastian.pop@amd.com>
1799
1800         * graphite-clast-to-gimple.c (graphite_loop_normal_form): Do not build
1801         the reduction_list.
1802         * tree-parloops.c (rewrite_phi_with_iv): New.
1803         (rewrite_all_phi_nodes_with_iv): New.
1804         (canonicalize_loop_ivs): Call them.
1805
1806 2009-04-08  Sebastian Pop  <sebastian.pop@amd.com>
1807
1808         * graphite-sese-to-poly.c (try_generate_gimple_bb): Use
1809         graphite_find_data_references_in_stmt.
1810         * tree-data-ref.c (graphite_find_data_references_in_stmt): New.
1811         * tree-data-ref.h (graphite_find_data_references_in_stmt): Declared.
1812
1813 2009-04-08  Sebastian Pop  <sebastian.pop@amd.com>
1814
1815         * sese.c (add_loop_exit_phis): Don't fail on non SSA_NAME renames.
1816
1817 2009-04-08  Sebastian Pop  <sebastian.pop@amd.com>
1818
1819         * graphite-sese-to-poly.c (build_scop_bbs_1): Use bb_in_sese_p
1820         instead of bb_in_region.
1821         (flag_bb_in_region): Same.  Renamed flag_bb_in_sese.
1822         (build_sese_conditions): Use flag_bb_in_sese.
1823         * sese.c (register_bb_in_sese): Removed.
1824         (new_sese): Remove initialization of SESE_REGION_BBS.
1825         (free_sese): Do not free SESE_REGION_BBS.
1826         * sese.h (struct sese): Remove field region_basic_blocks.
1827         (SESE_REGION_BBS): Removed.
1828         (bb_in_sese_p): Implement in function of bb_in_region.
1829
1830 2009-04-08  Sebastian Pop  <sebastian.pop@amd.com>
1831
1832         * graphite-scop-detection.c (limit_scops): Deal only with single exit
1833         loops.
1834
1835 2009-04-08  Tobias Grosser  <grosser@fim.uni-passau.de>
1836
1837         * graphite-scop-detection.c (stmt_simple_for_scop_p): Allow NE_EXPR
1838         and EQ_EXPR.
1839         * graphite-sese-to-poly.c (create_linear_expr_from_tree): New.
1840         (add_condition_to_domain): New.
1841         (add_condition_to_pbb): New.
1842         (add_conditions_to_domain): Cleanup and handle of NE_EXPR and EQ_EXPR.
1843         * testsuite/gcc.dg/graphite/scop-3.c: Update number of detected SCoPs.
1844
1845 2009-04-08  Tobias Grosser  <grosser@fim.uni-passau.de>
1846
1847         * graphite-clast-to-gimple.c (build_cloog_prog): ppl_Polyhedron ->
1848         ppl_Pointset_Powerset.
1849         * graphite-poly.c (new_poly_bb, free_poly_bb): Same.
1850         * graphite-poly.h (poly_bb): poly_bb.domain Same.
1851         (pbb_nb_loops): Same.
1852         * graphite-sese-to-poly.c (build_loop_iteration_domains,
1853         add_conditions_to_domain): Same.
1854         * graphite-ppl.c (new_Cloog_Domain_from_ppl_Pointset_Powerset): New.
1855         (ppl_print_polyhedron_matrix): ppl_Polyhedron_t ->
1856         ppl_const_Polyhedron_t.
1857         (ppl_print_powerset_matrix): New.
1858         * graphite-ppl.h (new_Cloog_Domain_from_ppl_Pointset_Powerset,
1859         ppl_print_powerset_matrix): New.
1860         (ppl_print_polyhedron_matrix): Updated.
1861
1862 2009-04-07  Sebastian Pop  <sebastian.pop@amd.com>
1863
1864         * tree-scalar-evolution.c (analyze_scalar_evolution_1): Fix comment.
1865
1866 2009-04-07  Sebastian Pop  <sebastian.pop@amd.com>
1867
1868         * graphite-poly.c (extend_scattering): Fix indenting.  Free cstr.
1869         (print_iteration_domains, debug_iteration_domain,
1870         debug_iteration_domains): New.
1871         * graphite-poly.h (print_iteration_domains, debug_iteration_domain,
1872         debug_iteration_domains): Declared.
1873         * graphite-sese-to-poly.c (build_pbb_scattering_polyhedrons): Fix
1874         indenting.
1875
1876 2009-04-03  Tobias Grosser  <grosser@fim.uni-passau.de>
1877             Sebastian Pop  <sebastian.pop@amd.com>
1878
1879         * graphite-poly.h (print_iteration_domain): New.
1880         * graphite-sese-to-poly.c (add_conditions_to_domain): Fixed bug.
1881         (build_sese_conditions_1, build_sese_conditions_after,
1882         build_sese_conditions_before): New.
1883         (build_sese_conditions): Rewritten.
1884
1885 2009-04-03  Sebastian Pop  <sebastian.pop@amd.com>
1886             Tobias Grosser  <grosser@fim.uni-passau.de>
1887
1888         Cleanup of code generation liveouts.
1889         * graphite-clast-to-gimple.c (translate_clast): Use a single
1890         rename_map instead of one per translated statement.
1891         Do not use SESE_LIVEOUT_RENAMES.
1892         (graphite_loop_normal_form): Do not use SESE_REDUCTION_LIST.
1893         (gloog): Do not use SESE_LIVEOUT_RENAMES.
1894         * graphite-scop-detection.c (harmful_stmt_in_bb): Return the close
1895         phi node of a reduction: when a loop contains a reduction used outside
1896         the loop, there should be a scalar close phi node on the exit block.
1897         * sese.c (new_sese): Do not initialize SESE_LIVEOUT,
1898         SESE_LIVEOUT_RENAMES, and SESE_REDUCTION_LIST.
1899         (free_sese): Do not free them.
1900         (sese_build_liveouts_use): Do not use them.
1901         (sese_build_liveouts_bb): Same.
1902         (sese_build_liveouts): Same.
1903         (sese_insert_phis_for_liveouts): Same.
1904         (sese_adjust_phis_for_liveouts): Same.  Renamed sese_adjust_liveout_phis.
1905         (defined_in_loop_p): New.
1906         (alive_after_loop): New.
1907         (close_phi_not_yet_inserted_p): New.
1908         (struct alep, alep_p): New.
1909         (add_loop_exit_phis): Remove from the rename_map all the names defined
1910         in the code generated loop.
1911         (insert_loop_close_phis): Traverse the rename_map passed to it.
1912         Don't use SESE_LIVEOUT_RENAMES.
1913         (default_liveout_before_guard): Renamed default_before_guard.
1914         (insert_guard_phis): Do not use SESE_LIVEOUT_RENAMES.
1915         (graphite_copy_stmts_from_block): Do not directly call set_rename.
1916         (register_sese_liveout_renames): Removed.
1917         (copy_bb_and_scalar_dependences): Do not call it.
1918         * sese.h (struct sese): Removed fields: liveout, liveout_renames, and
1919         reduction_list.
1920         (SESE_LIVEOUT): Removed.
1921         (SESE_LIVEOUT_RENAMES): Removed.
1922         (SESE_REDUCTION_LIST): Removed.
1923         (sese_build_liveouts): Removed.
1924         (sese_adjust_phis_for_liveouts): Renamed sese_adjust_liveout_phis.
1925         (insert_loop_close_phis): Pass a htab_t instead of a sese.
1926         (insert_guard_phis): Same.
1927         (rename_map_elt): Declare a VEC of them.
1928         * tree-parloops.c (canonicalize_loop_ivs): reduction_list contains
1929         trees not pointers to trees.
1930
1931         Rewrite in canonical close SSA form:
1932         * graphite-scop-detection.c (contains_only_close_phi_nodes): New.
1933         (limit_scops): Close the scop after the block containing the close phi
1934         nodes.
1935         (canonicalize_loop_closed_ssa): New.
1936         (canonicalize_loop_closed_ssa_form): New.
1937         (build_scops): Call canonicalize_loop_closed_ssa_form.
1938
1939         * graphite-sese-to-poly.c: Fix typos.
1940
1941 2009-04-03  Sebastian Pop  <sebastian.pop@amd.com>
1942
1943         * graphite-poly.c (print_scattering_function, print_pbb_domain):
1944         Extended.
1945         (dump_gbb_conditions, dump_gbb_cases, print_iteration_domain): New.
1946         (print_pbb): Add conditions.
1947
1948 2009-04-01  Tobias Grosser  <grosser@fim.uni-passau.de>
1949             Sebastian Pop  <sebastian.pop@amd.com>
1950
1951         * graphite-scop-detection.c (bb_in_sd_region): Use bb_in_region.
1952         * graphite-sese-to-poly.c (all_non_dominated_preds_marked_p): New.
1953         (build_scop_bbs_1): New.
1954         (build_scop_bbs): Rewrite.
1955         * sese.h (bb_in_region): New.
1956
1957 2009-03-29  Tobias Grosser  <grosser@fim.uni-passau.de>
1958
1959         * graphite-poly.c (new_poly_bb, free_poly_bb): Initialize/free
1960         poly_drs vector.
1961         (print_scop): Style.
1962         * graphite-poly.h (poly_bb): Add drs vector.
1963         (PBB_DRS): Add accessor.
1964         * graphite-sese-to-poly.c (build_poly_dr): New.
1965         (build_pbb_drs, build_scop_drs): New.
1966         (build_poly_scop): call build_scop_drs (Disabled at the moment).
1967
1968 2009-03-29  Tobias Grosser  <grosser@fim.uni-passau.de>
1969
1970         * tree-ssa-loop.c: Include forgotten toplev.h
1971
1972 2009-03-29  Tobias Grosser  <grosser@fim.uni-passau.de>
1973
1974         * graphite-poly.c: (apply_poly_transforms): sorry -> gcc_unreachable.
1975         * testsuite/gcc.dg/graphite/pr37883.c: Remove -floop-*
1976         * testsuite/gcc.dg/graphite/pr37928.c: Same
1977         * testsuite/gcc.dg/graphite/pr38409.c: Same
1978         * testsuite/gcc.dg/graphite/pr38498.c: Same
1979         * testsuite/gcc.dg/graphite/pr38559.c: Same
1980         * testsuite/gcc.dg/graphite/pr39335.c: Same
1981         * testsuite/gcc.dg/graphite/pr39335_1.c: Same
1982         * testsuite/gfortran.dg/graphite/block-2.f: Same
1983         * tree-ssa-loop.c (gate_graphite_transforms): Always fail if called
1984         with -floop-*.
1985
1986 2009-03-28  Tobias Grosser  <grosser@fim.uni-passau.de>
1987
1988         * graphite-sese-to-poly.c (ref_nb_loops, build_access_matrix_with_af,
1989         build_access_matrix, build_scop_data_accesses): Remove access function
1990         building. (We get a new version soon).
1991         (build_bb_loops, scan_tree_for_params_right_scev): Update.
1992         * sese.h (nb_loops_around_loop_in_sese): Remove.
1993         (sese_loop_depth): Do not use SESE_LOOP_NEST any more.
1994
1995 2009-03-27  Tobias Grosser  <grosser@fim.uni-passau.de>
1996             Sebastian Pop  <sebastian.pop@amd.com>
1997
1998         * graphite-scop-detection.c (struct scopdet_info): Rename last
1999         field to exit.
2000         (scopdet_basic_block_info, build_scops_1): Don't use
2001         CDI_POST_DOMINATORS.  CDI_POST_DOMINATORS should never be used.
2002
2003 2009-03-26  Tobias Grosser  <grosser@fim.uni-passau.de>
2004             Sebastian Pop  <sebastian.pop@amd.com>
2005
2006         * graphite-clast-to-gimple.c (gloog): Call sese_build_liveouts.
2007         * sese.c (sese_build_liveouts_use): Renamed from
2008         sese_build_livein_liveouts_use. Remove liveins.
2009         (sese_build_liveouts_bb): Renamed from sese_build_livein_liveouts_bb.
2010         Call sese_build_liveouts_use.
2011         (sese_build_liveouts): Renamed from sese_build_livein_liveouts.
2012         Call sese_build_liveouts_bb.
2013         (new_sese, free_sese): Remove liveins.
2014         (sese_add_exit_phis_var): Deleted.
2015         (sese_insert_phis_for_liveouts): Call sese_add_exit_phis_edge
2016         directly.
2017         (graphite_copy_stmts_from_block): Remove SESE_NUM_VER.
2018
2019         * sese.h (sese): Remove num_ver and livein.
2020         (SESE_LIVEIN, SESE_LIVEIN_VER, SESE_NUM_VER): Removed.
2021
2022 2009-03-25  Tobias Grosser  <grosser@fim.uni-passau.de>
2023
2024         * graphite-sese-to-poly.c (build_scop_scattering): Fix compile.
2025
2026 2009-03-25  Tobias Grosser  <grosser@fim.uni-passau.de>
2027
2028         * graphite-sese-to-poly.c (compare_prefix_loops): Removed.
2029         (build_scop_scattering): Do not use compare_prefix_loops any more.
2030         (nb_common_loops): New.
2031
2032 2009-03-24  Sebastian Pop  <sebastian.pop@amd.com>
2033
2034         * sese.c (get_new_name_from_old_name): Renamed get_rename.
2035         (register_old_and_new_names): Renamed set_rename.
2036
2037 2009-03-24  Sebastian Pop  <sebastian.pop@amd.com>
2038
2039         * graphite-scop-detection.h (nb_reductions_in_loop): Revert removal
2040         of the decl from the previous commit.
2041
2042 2009-03-24  Sebastian Pop  <sebastian.pop@amd.com>
2043
2044         * graphite-scop-detection.c (dot_scop): New.
2045         * graphite-scop-detection.h (dot_scop): Declared.
2046
2047 2009-03-24  Sebastian Pop  <sebastian.pop@amd.com>
2048
2049         * graphite-sese-to-poly.c (compare_prefix_loops): Fix compare.
2050
2051 2009-03-24  Sebastian Pop  <sebastian.pop@amd.com>
2052
2053         * cfgloopmanip.c (create_empty_loop_on_edge): Generate the loop exit
2054         condition at the end of the loop.
2055         * graphite.c (graphite_initialize, graphite_finalize): Print to
2056         dump_file the compiled function.
2057         * graphite-clast-to-gimple.c (graphite_create_new_loop): Update use
2058         of create_empty_loop_on_edge.
2059         (translate_clast): Update the code generation of loops for the new
2060         shape of loops.
2061         * cfgloop.h (create_empty_loop_on_edge): Update declaration.
2062
2063 2009-03-24  Sebastian Pop  <sebastian.pop@amd.com>
2064
2065         Reverted the patch from 2009-03-19.
2066
2067 2009-03-19  Tobias Grosser  <grosser@fim.uni-passau.de>
2068
2069         * graphite-poly.c (new_poly_bb, free_poly_bb): Initialize/free
2070         poly_drs vector.
2071         (print_scop): Style.
2072         * graphite-poly.h (poly_bb): Add drs vector.
2073         (PBB_DRS): Add accessor.
2074         * graphite-sese-to-poly.c (ref_nb_loops): Remove.
2075         (build_access_matrix_with_af, build_access_matrix,
2076         build_scop_data_accesses): Delete.
2077         (build_poly_dr): New.
2078         (build_pbb_drs, build_scop_drs): New.
2079         (build_poly_scop): call build_scop_drs.
2080
2081 2009-03-13  Sebastian Pop  <sebastian.pop@amd.com>
2082
2083         * graphite-scop-detection.c (dot_all_scops_1): Close the table
2084         once per basic block.
2085
2086 2009-03-13  Tobias Grosser  <grosser@fim.uni-passau.de>
2087
2088         * graphite-scop-detection.c (graphite_can_represent_scev): New.
2089         (graphite_can_represent_expr): Renamed from loop_affine_expr
2090         and enhanced.
2091         (stmt_simple_for_scop_p): Call graphite_can_represent_expr.
2092         (graphite_cannot_represent_loop): Add scop_entry to parameters.
2093         (scopdet_basic_block_info): Actually define entry_block.
2094         (stmt_simple_memref_p): Moved here from ...
2095
2096         * tree-data-ref.c (stmt_simple_memref_p): here.
2097         * tree-data-ref.h (stmt_simple_memref_p): Removed.
2098
2099 2009-03-13  Tobias Grosser  <grosser@fim.uni-passau.de>
2100
2101         * testsuite/gcc.dg/graphite/id-4.c: New.
2102
2103 2009-03-12  Sebastian Pop  <sebastian.pop@amd.com>
2104
2105         * sese.c (expand_scalar_variables_expr): Handle tcc_comparison.
2106         (register_old_and_new_names): Update the content of the map.
2107         When there was already a rename_map_elt in the map at that
2108         location, free it.
2109         (copy_bb_and_scalar_dependences): Do rename_variables after
2110         expand_scalar_variables.
2111         * graphite-clast-to-gimple.c (build_iv_mapping): Update the content
2112         of the map.  When there was already a rename_map_elt in the
2113         map at that location, free it.
2114         (translate_clast): Pass the rename_map.  Do not initialize and free
2115         a rename_map per stmt_user.
2116         (gloog): Initialize and free one rename_map and pass it to
2117         translate_clast.
2118
2119 2009-03-12  Sebastian Pop  <sebastian.pop@amd.com>
2120
2121         * sese.c (expand_scalar_variables_stmt,
2122         expand_scalar_variables_ssa_name): Add a gimple_stmt_iterator
2123         parameter.
2124         (expand_scalar_variables_expr): Handle REALPART_EXPR and IMAGPART_EXPR.
2125         (expand_scalar_variables): Pass to expand_scalar_variables_stmt
2126         the gimple_stmt_iterator of the statement to be expanded.
2127         * graphite-scop-detection.c (is_simple_operand): Do handle
2128         REALPART_EXPR.
2129
2130 2009-03-11  Tobias Grosser  <grosser@fim.uni-passau.de>
2131
2132         * graphite-scop-detection.c (is_simple_operand): Do not handle
2133         REALPART_EXPR.
2134         * testsuite/gcc.dg/graphite/id-2.c: New.
2135
2136         * graphite-sese-to-poly.c (build_bb_loops,
2137         add_value_to_dim, scan_tree_for_params_right_scev,
2138         scan_tree_for_params_int, scan_tree_for_params, idx_record_params,
2139         find_params_in_bb, build_loop_iteration_domains,
2140         add_conditions_to_domain): Remove subtract.
2141
2142 2009-03-11  Tobias Grosser  <grosser@fim.uni-passau.de>
2143
2144         * graphite-clast-to-gimple.c (loop_iv_stack_patch_for_consts,
2145         build_iv_mapping, compute_cloog_iv_types_1, build_cloog_prog):
2146         pbb_loop_at_index -> gbb_loop_at_index.
2147         * graphite-poly.c (new_poly_bb, new_scop): New accessors.
2148         (debug_loop_vec): Delete.
2149         * graphite-poly.h (poly_bb, scop): Change black_box and region to void
2150         pointer.  Move LOOPS to gimple_bb_p and insert nb_params.
2151         (PBB_LOOPS): Removed.
2152         (PBB_BLACK_BOX): Insert cast.
2153         (pbb_set_black_box): New setter.
2154         (pbb_loop_at_index, pbb_loop_index): Removed.
2155         (scop_set_region, scop_set_nb_params): New.
2156         * graphite-sese-to-poly.c (new_gimple_bb, free_gimple_bb,
2157         build_scop_scattering, build_bb_loops): Add GBB_LOOPS.
2158         (build_poly_scop): Use scop_set_nb_params.
2159         * sese.h (gimple_bb): Add LOOPS.
2160         (GBB_LOOPS, gbb_loop_index, gbb_loop_at_index): New.
2161
2162 2009-03-11  Tobias Grosser  <grosser@fim.uni-passau.de>
2163
2164         Revert previous commit.
2165
2166 2009-03-11  Sebastian Pop  <sebastian.pop@amd.com>
2167
2168         * sese.c (expand_scalar_variables_expr): Handle tcc_comparison.
2169         (register_old_and_new_names): Update the content of the map.
2170         When there was already a rename_map_elt in the map at that
2171         location, free it.
2172         (copy_bb_and_scalar_dependences): Do rename_variables after
2173         expand_scalar_variables.
2174         * graphite-clast-to-gimple.c (build_iv_mapping): Update the content
2175         of the map.  When there was already a rename_map_elt in the
2176         map at that location, free it.
2177         (translate_clast): Pass the rename_map.  Do not initialize and free
2178         a rename_map per stmt_user.
2179         (gloog): Initialize and free one rename_map and pass it to
2180         translate_clast.
2181
2182 2009-03-11  Tobias Grosser  <grosser@fim.uni-passau.de>
2183
2184         Remove forgotten line in revert.
2185
2186 2009-03-11  Sebastian Pop  <sebastian.pop@amd.com>
2187
2188         Revert previous commit.
2189
2190 2009-03-10  Sebastian Pop  <sebastian.pop@amd.com>
2191
2192         * sese.c (register_old_and_new_names): Update the content
2193         of the map.  When there was already a rename_map_elt in the
2194         map at that location, free it.
2195         (copy_bb_and_scalar_dependences): Do rename_variables after
2196         expand_scalar_variables.
2197         * graphite-clast-to-gimple.c (build_iv_mapping): Update the content
2198         of the map.  When there was already a rename_map_elt in the
2199         map at that location, free it.
2200         (translate_clast): Pass the rename_map.  Do not initialize and free
2201         a rename_map per stmt_user.
2202         (gloog): Initialize and free one rename_map and pass it to
2203         translate_clast.
2204
2205 2009-03-10  Sebastian Pop  <sebastian.pop@amd.com>
2206
2207         * graphite-clast-to-gimple.c (translate_clast): context_loop
2208         is never NULL.
2209
2210 2009-03-10  Tobias Grosser  <grosser@fim.uni-passau.de>
2211             Sebastian Pop  <sebastian.pop@amd.com>
2212
2213         * graphite-ppl.c (ppl_insert_dimensions): Fix stupid mistake
2214         of the use of ppl_Polyhedron_map_space_dimensions.
2215
2216 2009-03-10  Tobias Grosser  <grosser@fim.uni-passau.de>
2217             Sebastian Pop  <sebastian.pop@amd.com>
2218
2219         * graphite-poly.c (unify_scattering_dimensions): Fix types.
2220         * graphite-poly.h (poly_dr_p, poly_dr, POLY_DR_TYPE, PDR_BB,
2221         PDR_TYPE, PDR_ACCESSES, pdr_accessp_nb_subscripts,
2222         pdr_accessp_nb_iterators, pdr_accessp_nb_params,
2223         pdr_accessp_alias_set_dim, pdr_accessp_subscript_dim,
2224         pdr_accessp_iterator_dim, pdr_accessp_param_dim,
2225         pbb_nb_params): New.
2226         (pbb_nb_loops, pbb_nb_scattering, scop_nb_params,
2227         nb_loops_around_pbb): Adapt return types.
2228
2229 2009-03-09  Tobias Grosser  <grosser@fim.uni-passau.de>
2230
2231         * Makefile.in (graphite.o, graphite-sese-to-poly.o,
2232         graphite-clast-to-gimple.o,  graphite-data-ref.o,
2233         graphite-scop-detection.o, graphite-poly.o): Add
2234         more headers.
2235
2236 2009-03-05  Tobias Grosser  <grosser@fim.uni-passau.de>
2237
2238         * Makefile.in (graphite.o, graphite-sese-to-poly.o,
2239         graphite-clast-to-gimple.o,  graphite-data-ref.o,
2240         graphite-scop-detection.o, graphite-poly.o): Add graphite-poly.h.
2241
2242 2009-03-04  Tobias Grosser  <grosser@fim.uni-passau.de>
2243
2244         * testsuite/gcc.dg/graphite/pr37485.c: Remove -floop-block
2245         * testsuite/gcc.dg/graphite/pr37828.c: Same.
2246         * testsuite/gcc.dg/graphite/pr37684.c: Same.
2247         * testsuite/gcc.dg/graphite/block-0.c: Same.
2248         * testsuite/gcc.dg/graphite/block-1.c: Same.
2249         * testsuite/gcc.dg/graphite/block-2.c: Same.
2250         * testsuite/gcc.dg/graphite/block-3.c: Same.
2251         * testsuite/gcc.dg/graphite/block-4.c: Same.
2252         * testsuite/gcc.dg/graphite/block-5.c: Same.
2253         * testsuite/gcc.dg/graphite/block-6.c: Same.
2254         * testsuite/gfortran.dg/graphite/pr38083.f90: Same.
2255         * testsuite/gfortran.dg/graphite/block-1.f90: Same.
2256         * testsuite/gfortran.dg/graphite/block-3.f90: Same.
2257         * testsuite/gfortran.dg/graphite/pr37852.f90: Same.
2258         * testsuite/gfortran.dg/graphite/block-4.f90: Same.
2259         * testsuite/gfortran.dg/graphite/pr37980.f90: Same.
2260         * testsuite/gfortran.dg/graphite/pr38953.f90: Same.
2261         * testsuite/gfortran.dg/graphite/pr37857.f90: Same.
2262         * opts.c: Remove -floop-block from -O2.
2263         * graphite-poly.c: Fail if -floop-block -floop-interchange or
2264         -floop-strip-mine are used.
2265
2266 2009-03-04  Tobias Grosser  <grosser@fim.uni-passau.de>
2267             Sebastian Pop  <sebastian.pop@amd.com>
2268
2269         * graphite-clast-to-gimple.c (build_cloog_prog): Unify scattering
2270         dimensions.
2271         * graphite-poly.c (pbb_compare, graphite_sort_pbbs,
2272         graphite_trans_bb_move_loop, graphite_trans_bb_strip_mine,
2273         strip_mine_profitable_p, is_interchange_valid,
2274         graphite_trans_bb_block, graphite_trans_loop_block,
2275         graphite_trans_scop_block): Temporary removed.
2276         (extend_scattering, unify_scattering_dimensions): New.
2277         (print_scattering_function, graphite_read_transforms):
2278         PBB_SCATTERING -> PBB_TRANSFORMED_SCATTERING.
2279         (graphite_generate_scattering_fns): Removed.
2280         (apply_poly_transforms): Cleanup.
2281         (free_poly_bb): Add PBB_SCATTERING -> PBB_TRANSFORMED_SCATTERING.
2282         (schedule_to_scattering): Moved.
2283         (PBB_STATIC_SCHEDULE, PBB_SCATTERING): Removed.
2284         (PBB_ORIGINAL_SCATTERING, PBB_TRANSFORMED_SCATTERING): New.
2285         (pbb_nb_scattering): New.
2286         (SCOP_ENTRY, SCOP_EXIT, SCOP_REGION_BBS, SCOP_DEP_GRAPH, SCOP_PARAMS,
2287         SCOP_LOOP_NEST, SCOP_PARAMS, SCOP_OLDIVS, SCOP_LIVEOUT_RENAMES):
2288         Removed.
2289         * graphite-ppl.c (ppl_insert_dimensions): Extended and renamed from
2290         shift_poly.
2291         (ppl_strip_loop): PBB_SCATTERING -> PBB_TRANSFORMED_SCATTERING.
2292         * graphite-scop-detection.c (dot_all_scops_1):  PBB_SCATTERING
2293         -> PBB_TRANSFORMED_SCATTERING.
2294         * graphite-sese-to-poly.c (build_scop_bbs): Remove region.
2295         (build_pbb_scattering_polyhedron): Moved from schedule_to_scattering.
2296         (build_scop_scattering): Renamed from build_scop_canonical_schedules.
2297         (check_poly_representation): Do not return bool.
2298         (graphite_transform_loops): Reformat.
2299         * sese.h (SESE_ENTRY_BB, SESE_EXIT_BB): New.
2300
2301 2009-03-04  Sebastian Pop  <sebastian.pop@amd.com>
2302
2303         * graphite-poly.c (print_pbb_domain, print_pbb, print_scop,
2304         debug_pbb_domain, debug_pbb, debug_scop): New.
2305         * graphite-poly.h (print_pbb_domain, print_pbb, print_scop,
2306         debug_pbb_domain, debug_pbb, debug_scop): Declared.
2307
2308 2009-03-02  Sebastian Pop  <sebastian.pop@amd.com>
2309
2310         PR middle-end/39335
2311         * tree-parloops.c (canonicalize_loop_ivs): Call fold_convert
2312         when the type precision of the induction variable should be
2313         larger than the type precision of nit.
2314         (gen_parallel_loop): Update use of canonicalize_loop_ivs.
2315         * graphite-clast-to-gimple.c (graphite_loop_normal_form): Same.
2316         * tree-flow.h (canonicalize_loop_ivs): Update declaration.
2317
2318         * testsuite/gcc.dg/graphite/pr39335_1.c: New.
2319         * testsuite/gcc.dg/graphite/pr39335.c: New.
2320
2321 2009-03-02  Sebastian Pop  <sebastian.pop@amd.com>
2322
2323         * tree-parloops.c (canonicalize_loop_ivs): reduction_list contains
2324         SSA_NAMES not struct reduction_info.
2325
2326 2009-03-02  Sebastian Pop  <sebastian.pop@amd.com>
2327
2328         * sese.c (expand_scalar_variables_expr): Handle ADDR_EXPR.
2329
2330 2009-02-27  Sebastian Pop  <sebastian.pop@amd.com>
2331             Tobias Grosser  <grosser@fim.uni-passau.de>
2332
2333         * sese.c (new_sese): Initialize SESE_REDUCTION_LIST.
2334         (free_sese): Free SESE_REDUCTION_LIST.
2335         * sese.h (struct sese): Add field reduction_list.
2336         (SESE_REDUCTION_LIST): New.
2337         * graphite-clast-to-gimple.c (graphite_loop_normal_form): Call
2338         canonicalize_loop_ivs on SESE_REDUCTION_LIST.
2339
2340 2009-02-27  Sebastian Pop  <sebastian.pop@amd.com>
2341             Tobias Grosser  <grosser@fim.uni-passau.de>
2342
2343         * tree-flow.h (gather_scalar_reductions): Use struct loop * instead
2344         of loop_p.
2345
2346 2009-02-27  Sebastian Pop  <sebastian.pop@amd.com>
2347             Tobias Grosser  <grosser@fim.uni-passau.de>
2348
2349         * tree-parloops.c (struct brli, build_reduction_list_info,
2350         analyze_reduction_list, gather_scalar_reductions): New.
2351         (loop_parallel_p): Build a reduction list containing only
2352         PHI_RESULT SSA_NAMEs: call gather_scalar_reductions.
2353         (gen_parallel_loop): Call the analysis analyze_reduction_list.
2354         (parallelize_loops): Now reduction_list is a htab_t of SSA_NAMEs.
2355         * tree-flow.h (gather_scalar_reductions): Declared.
2356
2357 2009-02-26  Sebastian Pop  <sebastian.pop@amd.com>
2358
2359         PR middle-end/39308
2360         * graphite-clast-to-gimple.c (graphite_loop_normal_form): Do not call
2361         number_of_iterations_exit from a gcc_assert.
2362
2363 2009-02-25  Sebastian Pop  <sebastian.pop@amd.com>
2364             Jan Sjodin  <jan.sjodin@amd.com>
2365
2366         * output.h (graphite_out_file, graphite_in_file): Declared.
2367         * toplev.c (graphite_out_file, graphite_in_file): New.
2368         (init_asm_output): Initialize graphite_in_file and graphite_out_file.
2369         * graphite-clast-to-gimple.c (build_cloog_prog): Read PBB_SCATTERING.
2370         Don't call schedule_to_scattering.
2371         * common.opt (fgraphite-write, fgraphite-read): New.
2372         * graphite-poly.c: Include output.h.
2373         (print_scattering_function, print_scattering_functions,
2374         debug_scattering_function, debug_scattering_functions,
2375         graphite_write_transforms, graphite_read_transforms,
2376         graphite_generate_scattering_fns): New.
2377         (apply_poly_transforms): Do not apply transform if flag_graphite_read.
2378         Call graphite_generate_scattering_fns, graphite_write_transforms,
2379         graphite_read_transforms.
2380         (new_poly_bb): Initialize PBB_SCATTERING.
2381         (free_poly_bb): Free PBB_SCATTERING.
2382         (schedule_to_scattering): Does not return, initialize PBB_SCATTERING.
2383         * graphite-poly.h (struct poly_bb): Add field scattering.
2384         (PBB_SCATTERING): New.
2385         (print_scattering_function, print_scattering_functions,
2386         debug_scattering_function, debug_scattering_functions): Declared.
2387         * graphite-ppl.c (cloog_matrix_to_ppl_constraint): Matrices contain
2388         GMP values, not integers!
2389         (ppl_print_polyhedron_matrix, debug_ppl_polyhedron_matrix,
2390         ppl_read_polyhedron_matrix): New.
2391         * graphite-ppl.h (ppl_print_polyhedron_matrix,
2392         debug_ppl_polyhedron_matrix,
2393         ppl_read_polyhedron_matrix): Declared.
2394         * Makefile.in (graphite-poly.o): Depends on output.h.
2395
2396 2009-02-23  Sebastian Pop  <sebastian.pop@amd.com>
2397             Tobias Grosser  <grosser@fim.uni-passau.de>
2398
2399         Revert this change:
2400         * graphite-scop-detection.c (stmt_simple_for_scop_p): Analyze
2401         scalar evolutions in the scop_entry->loop_father.
2402
2403 2009-02-23  Sebastian Pop  <sebastian.pop@amd.com>
2404             Tobias Grosser  <grosser@fim.uni-passau.de>
2405
2406         * graphite.h (ref_nb_loops): Remove declaration.
2407         (struct gimple_bb, gimple_bb_p, GBB_BB, GBB_DATA_REFS, GBB_CONDITIONS,
2408         GBB_CONDITION_CASES, GBB_CLOOG_IV_TYPES, gbb_loop, print_gimple_bb,
2409         debug_gbb): Moved to sese.h.
2410         * sese.h: As said.
2411
2412 2009-02-23  Sebastian Pop  <sebastian.pop@amd.com>
2413             Tobias Grosser  <grosser@fim.uni-passau.de>
2414
2415         * graphite-data-ref.[ch]: Disable.
2416
2417 2009-02-23  Sebastian Pop  <sebastian.pop@amd.com>
2418             Tobias Grosser  <grosser@fim.uni-passau.de>
2419
2420         * graphite-scop-detection.c (stmt_simple_for_scop_p): Analyze
2421         scalar evolutions in the scop_entry->loop_father.
2422
2423 2009-02-23  Sebastian Pop  <sebastian.pop@amd.com>
2424
2425         * graphite-scop-detection.c (nb_reductions_in_loop): Moved here...
2426         (graphite_cannot_represent_loop_niter): Renamed
2427         graphite_cannot_represent_loop.  Call nb_reductions_in_loop.
2428         (limit_scops): build_sese_loop_nests does not return a bool.
2429         * graphite-scop-detection.h (nb_reductions_in_loop): Declared.
2430         * sese.c (nb_reductions_in_loop): ... from here.
2431         (graphite_loop_normal_form): ... from here.
2432         (sese_record_loop): Does not fail, so does not return a bool.
2433         (build_sese_loop_nests): Same.
2434         * sese.h (build_sese_loop_nests): Update declaration.
2435         * graphite-clast-to-gimple.c (graphite_loop_normal_form): Moved here...
2436         (build_graphite_loop_normal_form): New.
2437         (gloog): Call build_graphite_loop_normal_form.
2438         * graphite-sese-to-poly.c (build_poly_scop): Don't fail on
2439         build_sese_loop_nests.
2440
2441         * testsuite/gcc.dg/graphite/id-1.c: New.
2442
2443 2009-02-23  Sebastian Pop  <sebastian.pop@amd.com>
2444             Tobias Grosser  <grosser@fim.uni-passau.de>
2445
2446         * graphite-sese-to-poly.c (scan_tree_for_params): Remove REAL_CST.
2447         The SCoP detection fix is sufficient.
2448
2449 2009-02-21  Sebastian Pop  <sebastian.pop@amd.com>
2450
2451         PR tree-optimization/39260
2452         * graphite-scop-detection.c (harmful_stmt_in_bb): Stop a SCoP when
2453         the basic block contains a condition with a real type.
2454         * graphite-sese-to-poly.c (scan_tree_for_params): Handle REAL_CST.
2455
2456         * gcc.dg/graphite/pr39260.c: New.
2457
2458 2009-02-21  Sebastian Pop  <sebastian.pop@amd.com>
2459
2460         * graphite-poly.c: Inlcude params.h.
2461         (graphite_trans_loop_block): Use PARAM_LOOP_BLOCK_TILE_SIZE for
2462         the size of a tile.
2463         * Makefile.in (graphite-poly.o): Depend on PARAMS_H.
2464         * params.def (PARAM_LOOP_BLOCK_TILE_SIZE): Define.
2465
2466 2009-02-20  Sebastian Pop  <sebastian.pop@amd.com>
2467             Tobias Grosser  <grosser@fim.uni-passau.de>
2468
2469         * graphite-scop-detection.c (dot_all_scops_1,
2470         dot_all_scops): Moved here.
2471         * graphite-scop-detection.h (dot_all_scops): Declared here.
2472         * graphite.c (graphite_initialize, graphite_finalize): New.
2473         (graphite_transform_loops): Cleaned up.
2474         * sese.c (debug_oldivs): Moved here.
2475         * graphite-poly.c (graphite_apply_transformations): Renamed
2476         apply_poly_transforms.
2477         (debug_loop_vec): Moved here.
2478         * graphite-sese-to-poly.c (build_bb_loops, build_sese_conditions_1,
2479         scop_contains_non_iv_scalar_phi_nodes, build_sese_conditions,
2480         find_scop_parameters, build_scop_iteration_domain,
2481         add_conditions_to_constraints, build_scop_canonical_schedules,
2482         build_scop_data_accesses): Now static.
2483         (build_poly_scop, check_poly_representation): New.
2484
2485 2009-02-20  Sebastian Pop  <sebastian.pop@amd.com>
2486
2487         * graphite.c (graphite_stmt_p, new_gimple_bb, free_gimple_bb,
2488         remove_gbbs_in_scop, free_scops, try_generate_gimple_bb,
2489         build_scop_bbs, ref_nb_loops, compare_prefix_loops,
2490         build_scop_canonical_schedules, build_bb_loops, add_value_to_dim,
2491         scan_tree_for_params_right_scev, scan_tree_for_params_int,
2492         scan_tree_for_params, struct irp_data, dx_record_params,
2493         find_params_in_bb, find_scop_parameters, gbb_from_bb,
2494         build_loop_iteration_domains, add_conditions_to_domain,
2495         phi_node_is_iv, bb_contains_non_iv_scalar_phi_nodes,
2496         scop_contains_non_iv_scalar_phi_nodes, build_sese_conditions_1,
2497         build_sese_conditions, add_conditions_to_constraints,
2498         build_scop_iteration_domain, build_access_matrix_with_af,
2499         build_access_matrix,
2500         build_scop_data_accesses): Moved to graphite-sese-to-poly.c.
2501
2502         * graphite-sese-to-poly.c: New.
2503         * graphite-sese-to-poly.h: New.
2504
2505         * Makefile.in: Add new rule for graphite-sese-to-poly.o.
2506
2507 2009-02-20  Sebastian Pop  <sebastian.pop@amd.com>
2508
2509         * graphite.c: Split graphite code generation to a new file.
2510         (graphite_verify, gmp_cst_to_tree, clast_name_to_gcc,
2511         max_precision_type, clast_to_gcc_expression_red,
2512         clast_to_gcc_expression, gcc_type_for_clast_expr,
2513         gcc_type_for_clast_eq, loop_iv_stack_patch_for_consts,
2514         graphite_translate_clast_equation, graphite_create_guard_cond_expr,
2515         graphite_create_new_guard, clast_get_body_of_loop,
2516         gcc_type_for_cloog_iv, gcc_type_for_iv_of_clast_loop,
2517         graphite_create_new_loop, build_iv_mapping, copy_renames,
2518         translate_clast, find_cloog_iv_in_expr, compute_cloog_iv_types_1,
2519         compute_cloog_iv_types, free_scattering, save_var_name,
2520         initialize_cloog_names, build_scop_context, build_cloog_prog,
2521         set_cloog_options, debug_clast_stmt, scop_to_clast,
2522         print_generated_program, debug_generated_program,
2523         gloog): Moved to graphite-clast-to-gimple.c.
2524
2525         (struct cloog_prog_clast): Moved to graphite-clast-to-gimple.h.
2526
2527         (iv_stack_entry_is_constant, iv_stack_entry_is_iv,
2528         loop_iv_stack_push_iv, loop_iv_stack_insert_constant,
2529         loop_iv_stack_pop, loop_iv_stack_get_iv,
2530         loop_iv_stack_get_iv_from_name, debug_loop_iv_stack,
2531         free_loop_iv_stack, loop_iv_stack_remove_constants,
2532         debug_rename_elt, debug_rename_map_1, debug_rename_map,
2533         rename_map_elt_info, eq_rename_map_elts, debug_ivtype_elt,
2534         debug_ivtype_map_1, debug_ivtype_map, ivtype_map_elt_info,
2535         eq_ivtype_map_elts, sese_add_exit_phis_edge,
2536         sese_add_exit_phis_var, sese_insert_phis_for_liveouts,
2537         get_vdef_before_sese, sese_adjust_vphi,
2538         get_new_name_from_old_name, sese_adjust_phis_for_liveouts,
2539         oldiv_for_loop, rename_variables_in_stmt, is_parameter,
2540         is_iv, expand_scalar_variables_ssa_name,
2541         expand_scalar_variables_expr, expand_scalar_variables_stmt,
2542         expand_scalar_variables, rename_variables, remove_condition,
2543         get_true_edge_from_guard_bb, get_false_edge_from_guard_bb,
2544         add_loop_exit_phis, insert_loop_close_phis, struct igp,
2545         default_liveout_before_guard, add_guard_exit_phis,
2546         insert_guard_phis, register_old_and_new_names,
2547         graphite_copy_stmts_from_block, register_sese_liveout_renames,
2548         copy_bb_and_scalar_dependences, outermost_loop_in_sese,
2549         if_region_set_false_region, create_if_region_on_edge,
2550         move_sese_in_condition): Moved to sese.c.
2551
2552         (nb_loops_around_loop_in_sese, struct ifsese, if_region_entry,
2553         if_region_exit, if_region_get_condition_block,
2554         struct rename_map_elt, new_rename_map_elt, enum iv_stack_entry_kind,
2555         union iv_stack_entry_data_union, struct iv_stack_entry_struct,
2556         iv_stack_entry_p, loop_iv_stack, struct ivtype_map_elt,
2557         ivtype_map_elt, new_ivtype_map_elt,
2558         recompute_all_dominators): Moved to sese.h.
2559
2560         * graphite-clast-to-gimple.c: New.
2561         * graphite-clast-to-gimple.h: New.
2562         * Makefile.in: Add new rule for graphite-clast-to-gimple.o.
2563         * sese.c: Modified as said above.
2564         * sese.h: Same.
2565
2566 2009-02-20  Sebastian Pop  <sebastian.pop@amd.com>
2567
2568         * graphite.c: Split scop detection to a new file.
2569         (enum gbb_type, gbb_type, get_bb_type, struct sd_region_p, sd_region,
2570         move_sd_regions, loop_affine_expr, exclude_component_ref,
2571         is_simple_operand, stmt_simple_for_scop_p, harmful_stmt_in_bb,
2572         graphite_cannot_represent_loop_niter, struct scopdet_info,
2573         scopdet_basic_block_info, build_scops_1, bb_in_sd_region,
2574         find_single_entry_edge, find_single_exit_edge,
2575         create_single_entry_edge, sd_region_without_exit,
2576         create_single_exit_edge, unmark_exit_edges, mark_exit_edges,
2577         create_sese_edges, build_graphite_scops, limit_scops, build_scops):
2578         Moved to graphite-scop-detection.c.
2579
2580         * graphite-scop-detection.c: New.
2581         * graphite-scop-detection.h: New.
2582         * Makefile.in: Add new rule for graphite-scop-detection.o.
2583
2584         * sese.c: Include tree-chrec.h, tree-data-ref.h, and
2585         tree-scalar-evolution.h.
2586         (nb_reductions_in_loop, graphite_loop_normal_form, sese_record_loop,
2587         build_sese_loop_nests): Moved here from graphite.c.
2588         (param_index): Renamed parameter_index_in_region.
2589
2590 2009-02-18  Tobias Grosser  <grosser@fim.uni-passau.de>
2591             Sebastian Pop  <sebastian.pop@amd.com>
2592
2593         * gcc.dg/graphite/block-0.c: Expected to fail now.
2594         * gcc.dg/graphite/block-1.c: Same.
2595         * gcc.dg/graphite/block-5.c: Same.
2596         * gcc.dg/graphite/block-6.c: Same.
2597
2598 2009-02-18  Tobias Grosser  <grosser@fim.uni-passau.de>
2599             Sebastian Pop  <sebastian.pop@amd.com>
2600
2601         * graphite.h: Separate from graphite_bb_p the polyhedral
2602         representation in poly_bb_p and the GCC specifics in gimple_bb_p.
2603         (struct data_dependence_polyhedron, RDGE_DDP, ddp_p): Moved to
2604         graphite-data-ref.h.
2605         (struct poly_bb, PBB_SCOP, PBB_STATIC_SCHEDULE, PBB_DOMAIN,
2606         PBB_BLACK_BOX, PBB_LOOPS, pbb_nb_loops, pbb_loop_at_index,
2607         pbb_loop_index, struct scop, SCOP_BBS, SCOP_REGION, SCOP_ENTRY,
2608         SCOP_EXIT, SCOP_REGION_BBS, SCOP_DEP_GRAPH, SCOP_PARAMS,
2609         SCOP_LOOP_NEST, SCOP_PARAMS, SCOP_OLDIVS, SCOP_LIVEOUT_RENAMES,
2610         scop_nb_params): Moved to graphite-poly.h.
2611         * graphite-data-ref.c: Same.
2612         * graphite-data-ref.h: New.
2613         * graphite.c: Same.
2614         (pbb_compare, graphite_sort_pbbs, graphite_trans_bb_move_loop,
2615         graphite_trans_bb_strip_mine, strip_mine_profitable_p,
2616         is_interchange_valid, graphite_trans_bb_block,
2617         graphite_trans_loop_block, scop_max_loop_depth,
2618         graphite_trans_scop_block, graphite_apply_transformations,
2619         new_poly_bb, free_poly_bb, new_scop, free_scop): Moved to
2620         graphite-poly.c.
2621         * graphite-poly.h: New.
2622         * graphite-poly.c: New.
2623         * Makefile.in (OBJS-common): Add graphite-poly.o.
2624         (graphite-poly.o): New rule.
2625         * tree-data-ref.h (struct data_reference): Remove unused scop field.
2626         (DR_SCOP): Removed.
2627
2628 2009-02-18  Sebastian Pop  <sebastian.pop@amd.com>
2629             Tobias Grosser  <grosser@fim.uni-passau.de>
2630
2631         * graphite.c: Replace gb -> gbb.
2632         * graphite.h: Same.
2633         * graphite-data-ref.c: Same.
2634
2635 2009-02-18  Sebastian Pop  <sebastian.pop@amd.com>
2636             Tobias Grosser  <grosser@fim.uni-passau.de>
2637
2638         * Makefile.in (OBJS-commmon): Add sese.o.
2639         (sese.o): New.
2640         (graphite.o): Add sese.h.
2641         * graphite.c (bb_in_ss_p, loop_in_sese_p,
2642         sese_build_livein_liveouts_use, sese_build_livein_liveouts_bb,
2643         sese_build_livein_liveouts, register_bb_in_sese, new_sese, free_sese):
2644         Move to sese.
2645         (block_before_scop): Add missing return.
2646         (new_scop, free_scop): Remove SESE data structures.
2647         (scop_record_loop, scan_tree_for_params, find_params_in_bb,
2648         find_scop_parameters, build_loop_iteration_domains,
2649         add_conditions_to_domain, register_scop_liveout_renames,
2650         copy_bb_and_scalar_dependences): Scop -> SESE.
2651
2652         (add_conditions_to_domain): SCoP -> SESE and remove check
2653         (scop_contains_non_iv_scalar_phi_nodes): New.
2654         (build_scop_conditions_1, build_scop_conditions): Remove check for
2655         non iv scalar phi nodes.
2656         (print_scop_statistics): New.
2657         (graphite_transform_loops): Cleanup.
2658
2659         * graphite.h: Move to sese & cleanup.
2660         * sese.c: New.
2661         * sese.h: New.
2662
2663 2009-02-16  Sebastian Pop  <sebastian.pop@amd.com>
2664             Tobias Grosser  <grosser@fim.uni-passau.de>
2665
2666         * graphite.c (build_scop_conditions_1): Conditions are only
2667         at the end of a basic block.
2668
2669 2009-02-16  Sebastian Pop  <sebastian.pop@amd.com>
2670             Tobias Grosser  <grosser@fim.uni-passau>
2671
2672         * graphite.h (struct graphite_bb): Remove compressed_alpha_matrix
2673         field.
2674         (GBB_ALPHA): Removed.
2675
2676 2009-02-16  Sebastian Pop  <sebastian.pop@amd.com>
2677             Tobias Grosser  <grosser@fim.uni-passau.de>
2678
2679         * graphite-data-ref.c (graphite_test_dependence): Don't use
2680         GBB_DYNAMIC_SCHEDULE.
2681         * graphite.c (new_graphite_bb): Same.
2682         (free_graphite_bb): Same.
2683         (build_scop_dynamic_schedules): Removed.
2684         (graphite_transform_loops): Don't call it.
2685         * graphite.h (struct graphite_bb): Remove dynamic_schedule field.
2686         (GBB_DYNAMIC_SCHEDULE): Removed.
2687
2688 2009-02-16  Sebastian Pop  <sebastian.pop@amd.com>
2689             Tobias Grosser  <grosser@fim.uni-passau.de>
2690
2691         * graphite.c (schedule_to_scattering): Don't use CloogMatrix.
2692         (print_graphite_bb): Same.
2693         (build_cloog_prog): Same.
2694
2695 2009-02-16  Sebastian Pop  <sebastian.pop@amd.com>
2696             Tobias Grosser  <grosser@fim.uni-passau.de>
2697
2698         * graphite.c (build_cloog_prog): Don't use CloogMatrix.
2699
2700 2009-02-16  Sebastian Pop  <sebastian.pop@amd.com>
2701             Tobias Grosser  <grosser@fim.uni-passau.de>
2702
2703         * graphite.c (build_scop_context): Don't use CloogMatrix.
2704         * graphite-ppl.c (new_Cloog_Domain_from_ppl_Polyhedron): New.
2705         * graphite-ppl.h (new_Cloog_Domain_from_ppl_Polyhedron): Declared.
2706
2707 2009-02-16  Sebastian Pop  <sebastian.pop@amd.com>
2708             Tobias Grosser  <grosser@fim.uni-passau.de>
2709
2710         * graphite.h (struct scop): Move params, old_ivs, loops, loop_nest,
2711         liveout_renames, add_params fields...
2712         (struct sese): ... here.
2713         (SESE_PARAMS, SESE_LOOPS, SESE_LOOP_NEST, SESE_ADD_PARAMS,
2714         SESE_PARAMS, SESE_OLDIVS, SESE_LIVEOUT_RENAMES): New.
2715
2716 2009-02-16  Sebastian Pop  <sebastian.pop@amd.com>
2717             Tobias Grosser  <grosser@fim.uni-passau.de>
2718
2719         * graphite.c (print_scop): Do not print the CLooG program.
2720         (new_scop, free_scop, initialize_cloog_names, build_scop_context,
2721         build_cloog_prog, gloog): Don't use SCOP_PROG.
2722         (find_transform): Renamed scop_to_clast.
2723         (print_generated_program, debug_generated_program): New.
2724         (graphite_transform_loops): Adapt to new interface.
2725         * graphite.h (struct scop): Remove program field.
2726         (SCOP_PROG): Removed.
2727         (print_generated_program, debug_generated_program): Declared.
2728
2729 2009-02-16  Sebastian Pop  <sebastian.pop@amd.com>
2730
2731         * graphite-data-ref.c (schedule_precedes_p, schedule_same_p): New.
2732         (statement_precedes_p): Use schedule_same_p and schedule_precedes_p.
2733         * graphite.c (gbb_compare, schedule_to_scattering, print_graphite_bb,
2734         free_graphite_bb, build_scop_canonical_schedules,
2735         graphite_trans_bb_strip_mine, graphite_trans_scop_block): Static
2736         schedules are now represented using a ppl_Linear_Expression_t.
2737         * graphite.h (struct graphite_bb): Same.
2738         * graphite-ppl.c (ppl_lexico_compare_linear_expressions): New.
2739         * graphite-ppl.h (ppl_lexico_compare_linear_expressions): Declared.
2740
2741 2009-02-15  Sebastian Pop  <sebastian.pop@amd.com>
2742
2743         * graphite.c: Free local memory.
2744         * graphite-ppl.c: Same.
2745
2746 2009-02-15  Sebastian Pop  <sebastian.pop@amd.com>
2747
2748         * graphite.c (const_column_index, get_first_matching_sign_row_index,
2749         get_lower_bound_row, get_upper_bound_row, copy_constraint,
2750         swap_constraint_variables, scale_constraint_variable): Removed.
2751         (graphite_trans_bb_strip_mine): Remove pong.
2752         * graphite-ppl.c: Include missing header files.
2753         (set_inhomogeneous, set_coef, shift_poly, ppl_strip_loop): New.
2754         * graphite-ppl.h (ppl_strip_loop): Declared.
2755         * Makefile.in (graphite-ppl.o): Adjust dependences.
2756
2757 2009-02-14  Sebastian Pop  <sebastian.pop@amd.com>
2758
2759         * graphite.c (build_loop_iteration_domains): Remove ping pong.
2760         (build_scop_iteration_domain): Same.
2761
2762 2009-02-13  Sebastian Pop  <sebastian.pop@amd.com>
2763
2764         * graphite.c (scan_tree_for_params, add_conditions_to_domain): Remove
2765         ping pong.
2766         (add_value_to_dim, scan_tree_for_params_right_scev,
2767         scan_tree_for_params_int): New.
2768         * graphite-ppl.c (oppose_constraint): New.
2769         (insert_constraint_into_matrix): Implement missing cases.
2770         * graphite-ppl.h (insert_constraint_into_matrix): Declared.
2771
2772 2009-02-13  Sebastian Pop  <sebastian.pop@amd.com>
2773
2774         * graphite.c (graphite_trans_bb_move_loop): Remove ping pong,
2775         use ppl_move_dimension.
2776
2777 2009-02-12  Sebastian Pop  <sebastian.pop@amd.com>
2778
2779         * graphite-data-ref.c: Domains are now ppl_Polyhedra_t.
2780         * graphite.c: Same.
2781         * graphite.h: Same.
2782         * graphite-ppl.c: Same.
2783         * graphite-ppl.h: Same.
2784
2785 2009-02-12  Sebastian Pop  <sebastian.pop@amd.com>
2786
2787         Revert last 3 commits.
2788
2789 2009-02-10  Sebastian Pop  <sebastian.pop@amd.com>
2790
2791         * graphite.c (scan_tree_for_params, add_conditions_to_domain): Remove
2792         ping pong.
2793         (add_value_to_dim, scan_tree_for_params_right_scev,
2794         scan_tree_for_params_int): New.
2795         * graphite-ppl.c (oppose_constraint): New.
2796         (insert_constraint_into_matrix): Implement missing cases.
2797         * graphite-ppl.h (insert_constraint_into_matrix): Declared.
2798
2799 2009-02-10  Sebastian Pop  <sebastian.pop@amd.com>
2800
2801         * graphite.c (graphite_trans_bb_move_loop): Remove unused variables.
2802
2803 2009-02-10  Sebastian Pop  <sebastian.pop@amd.com>
2804             Tobias Grosser  <grosser@fim.uni-passau.de>
2805
2806         * graphite.c (graphite_trans_bb_move_loop): Remove ping pong,
2807         use ppl_move_dimension.
2808         * graphite-ppl.c (ppl_move_dimension): New.
2809         * graphite-ppl.h (ppl_move_dimension): Declared.
2810
2811 2009-02-10  Sebastian Pop  <sebastian.pop@amd.com>
2812
2813         * graphite.c: Do not include cloog/cloog.h.
2814         (print_graphite_bb): Remove ping pong, call PPL print function.
2815
2816 2009-02-10  Tobias Grosser  <grosser@fim.uni-passau.de>
2817
2818         * Makefile.in (OBJS-common): Add graphite-ppl.o.
2819         (graphite.o): Add dependence on graphite-ppl.h.
2820         (graphite-ppl.o): New.
2821         (graphite-data-ref.c): Ping pong between PPL data structures
2822         and matrices.
2823         * graphite-ppl.c: New.
2824         * graphite-ppl.h: New.
2825         * graphite.c: Include graphite-ppl.h.
2826         (print_graphite_bb, add_conditions_to_domain, build_cloog_prog,
2827         graphite_trans_bb_move_loop, graphite_trans_bb_strip_mine):
2828         Ping pong between PPL data structures and matrices.
2829         (new_graphite_bb): Create a PPL constraint system.
2830         Call ppl_delete_Constraint_System instead of cloog_matrix_free.
2831         (build_loop_iteration_domains): Use PPL functions.
2832         * graphite.h: Include graphite-ppl.h.  Fix comments.
2833         (graphite_bb): Use a ppl_Constraint_System_t instead of
2834         CloogMatrix for representing the domain.
2835         (scop): Remove static_schedule.
2836         (gbb_nb_loops): Ping pong between PPL data structures and matrices.
2837
2838 2009-02-06  Sebastian Pop  <sebastian.pop@amd.com>
2839
2840         * graphite.c: Fix some comments.
2841
2842 2009-02-05  Sebastian Pop  <sebastian.pop@amd.com>
2843
2844         PR middle-end/38953
2845         * graphite.c (if_region_set_false_region): After moving a region
2846         in the false branch of a condition, remove the empty dummy
2847         basic block.
2848         (gloog): Remove wrong fix for PR38953.
2849
2850 2009-02-03  Tobias Grosser  <grosser@fim.uni-passau.de>
2851
2852         * graphite.c (bb_in_sese_p, sese_build_livein_liveouts_use,
2853         sese_build_livein_liveouts_bb, sese_build_livein_liveouts,
2854         register_bb_in_sese, new_sese, free_sese): Moved.
2855         (dot_scop_1, build_scop_loop_nests, build_loop_iteration_domains,
2856         outermost_loop_in_scop, build_scop_iteration_domain,
2857         expand_scalar_variables_ssa_name, get_vdef_before_scop,
2858         limit_scops): Use bb_in_sese_p instead of bb_in_scop_p.
2859         Use loop_in_sese_p instead of loop_in_scop_p.
2860         (new_graphite_bb, new_scop, gloog): Do not initialize SCOP_BBS_B.
2861         (free_scop): Do not free SCOP_BBS_B.
2862         (nb_loops_around_loop_in_scop, nb_loops_around_gb,
2863         ref_nb_loops): Moved here...
2864         * graphite.h (ref_nb_loops): ... from here.
2865         (struct scop): Remove bbs_b bitmap.
2866         (SCOP_BBS_B, bb_in_scop_p, loop_in_scop_p): Removed.
2867         * testsuite/gcc.dg/graphite/scop-19.c: New
2868
2869 2009-02-03  Tobias Grosser  <grosser@fim.uni-passau.de>
2870
2871         * graphite.c (scopdet_basic_block_info): Fix bug in scop
2872         detection.
2873
2874 2009-01-30  Tobias Grosser  <grosser@fim.uni-passau.de>
2875
2876         * graphite.c (new_loop_to_cloog_loop_str, hash_loop_to_cloog_loop,
2877         eq_loop_to_cloog_loop): Remove.
2878         (new_scop, free_scop): Remove SCOP_LOOP2CLOOG_LOOP.
2879         * graphite.h (struct scop): Remove loop2cloog_loop.
2880         (loop_domain_dim, loop_iteration_vector_dim): Remove.
2881
2882 2009-01-30  Tobias Grosser  <grosser@fim.uni-passau.de>
2883
2884         * opts.c (decode_options): Only add graphite options to O2
2885         if we compile with graphite enabled.
2886
2887 2009-01-26  Sebastian Pop  <sebastian.pop@amd.com>
2888
2889         * Merge from mainline (r143163:143684).
2890
2891 2009-01-26  Sebastian Pop  <sebastian.pop@amd.com>
2892
2893         * graphite.c (debug_value): Removed.
2894         * graphite.h (debug_value): Removed.
2895
2896 2009-01-23  Sebastian Pop  <sebastian.pop@amd.com>
2897
2898         * passes.c (init_optimization_passes): Do not call pass_copy_prop
2899         after graphite: pass_copy_prop does not maintain a proper loop closed
2900         SSA form.  pass_copy_prop should be fixed.
2901
2902 2009-01-23  Sebastian Pop  <sebastian.pop@amd.com>
2903
2904         * graphite.c (scop_adjust_phis_for_liveouts): Fix warning.
2905
2906 2009-01-23  Sebastian Pop  <sebastian.pop@amd.com>
2907
2908         * graphite.c (graphite_verify): Add a call to verify_loop_closed_ssa.
2909         (gloog): Split the exit of the scop when the scop exit is a loop exit.
2910         (graphite_transform_loops): Only call cleanup_tree_cfg if gloog
2911         changed the CFG.
2912
2913 2009-01-20  Sebastian Pop  <sebastian.pop@amd.com>
2914
2915         * graphite.c (gloog): Return true when code gen succeeded.
2916         (graphite_transform_loops): Do not call cleanup_tree_cfg if
2917         the code of the function did not changed.  After cleanup_tree_cfg
2918         call rewrite_into_loop_closed_ssa to maintain the loop closed ssa
2919         form.
2920
2921 2009-01-19  Sebastian Pop  <sebastian.pop@amd.com>
2922
2923         * graphite.c (stmt_simple_for_scop_p): Also handle cases when
2924         gimple_call_lhs is NULL.
2925
2926 2009-01-16  Sebastian Pop  <sebastian.pop@amd.com>
2927             Tobias Grosser  <tobi.grosser@amd.com>
2928
2929         * graphite.c (graphite_trans_scop_block): Do not block single
2930         nested loops.
2931
2932 2009-01-15  Sebastian Pop  <sebastian.pop@amd.com>
2933             Tobias Grosser  <tobi.grosser@amd.com>
2934
2935         * graphite.c (build_scop_canonical_schedules): Start schedules at
2936         zero.
2937
2938 2009-01-15  Sebastian Pop  <sebastian.pop@amd.com>
2939             Tobias Grosser  <tobi.grosser@amd.com>
2940
2941         * graphite.c (compare_prefix_loops): New.
2942         (build_scop_canonical_schedules): Rewritten.
2943         (graphite_transform_loops): Move build_scop_canonical_schedules
2944         after build_scop_iteration_domain.
2945
2946 2009-01-14  Sebastian Pop  <sebastian.pop@amd.com>
2947             Tobias Grosser  <tobi.grosser@amd.com>
2948
2949         * graphite.c (add_conditions_to_domain): Add the loops to
2950         the dimension of the iteration domain.  Do copy the domain
2951         only when it exists.
2952         (build_scop_conditions_1): Do not call add_conditions_to_domain.
2953         (add_conditions_to_constraints): New.
2954         (can_generate_code_stmt, can_generate_code): Removed.
2955         (gloog): Do not call can_generate_code.
2956         (graphite_transform_loops): Call add_conditions_to_constraints
2957         after building the iteration domain.
2958
2959 2009-01-14  Sebastian Pop  <sebastian.pop@amd.com>
2960             Tobias Grosser  <tobi.grosser@amd.com>
2961             Jan Sjodin  <jan.sjodin@amd.com>
2962
2963         * graphite.c (scan_tree_for_params): On substractions negate
2964         all the coefficients of the term.
2965         (clast_to_gcc_expression_red): New.  Handle reduction expressions
2966         of more than two operands.
2967         (clast_to_gcc_expression): Call clast_to_gcc_expression_red.
2968         (get_vdef_before_scop): Handle also the case of default definitions.
2969
2970 2009-01-14  Sebastian Pop  <sebastian.pop@amd.com>
2971
2972         PR middle-end/38431
2973         * graphite.c (get_vdef_before_scop, scop_adjust_vphi): New.
2974         (scop_adjust_phis_for_liveouts): Call scop_adjust_vphi.
2975         (gloog): Do not call cleanup_tree_cfg.
2976         (graphite_transform_loops): Call cleanup_tree_cfg after all
2977         scops have been code generated.
2978
2979 2009-01-13  Sebastian Pop  <sebastian.pop@amd.com>
2980
2981         * passes.c (init_optimization_passes): Schedule after
2982         graphite transforms pass_copy_prop, pass_dce_loop and pass_lim.
2983
2984 2009-01-13  Sebastian Pop  <sebastian.pop@amd.com>
2985
2986         * graphite.c (expand_scalar_variables_stmt): Do not pass loop_p.
2987         Fix comment.
2988         (expand_scalar_variables_ssa_name): Do not pass loop_p.  Fix comment.
2989         Set the type of an expression to the type of its assign statement.
2990         (expand_scalar_variables_expr):  Do not pass loop_p.
2991         Fix comment.  Stop recursion on tcc_constant or tcc_declaration.
2992         (copy_bb_and_scalar_dependences): Do not pass loop_p.
2993         (translate_clast): Update call to copy_bb_and_scalar_dependences.
2994
2995 2009-01-11  Sebastian Pop  <sebastian.pop@amd.com>
2996
2997         * graphite.c (expand_scalar_variables_ssa_name): Set the type of
2998         an expression to the gimple_expr_type of its assign statement.
2999         (expand_scalar_variables_expr): Stop recursion on tcc_constant
3000         or tcc_declaration.
3001
3002 2009-01-11  Sebastian Pop  <sebastian.pop@amd.com>
3003
3004         PR tree-optimization/38786
3005         * testsuite/gcc.dg/graphite/pr38786.c: New.
3006         * graphite.c (expand_scalar_variables_ssa_name): New, outlined from
3007         the SSA_NAME case of expand_scalar_variables_expr.
3008         (expand_scalar_variables_expr): Also gather the scalar computation
3009         used to index the memory access.
3010         (expand_scalar_variables_stmt): Pass to expand_scalar_variables_expr
3011         the gimple_stmt_iterator where it inserts new code.
3012
3013 2009-01-10  Sebastian Pop  <sebastian.pop@amd.com>
3014
3015         * testsuite/gcc.dg/graphite/block-3.c: Fix compile error on 32bit.
3016
3017 2009-01-10  Sebastian Pop  <sebastian.pop@amd.com>
3018
3019         * opts.c (decode_options): Enable flag_graphite_identity and
3020         flag_loop_block in -O2 and above.
3021
3022 2009-01-08  Sebastian Pop  <sebastian.pop@amd.com>
3023
3024         * libjava/classpath/lib/gnu/java/awt/peer/gtk/GtkMouseInfoPeer.class:
3025         Fix merge problem: replace with the file from trunk.
3026
3027 2009-01-08  Sebastian Pop  <sebastian.pop@amd.com>
3028
3029         * Merge from mainline (r141727:143163).
3030
3031 2009-01-07  Sebastian Pop  <sebastian.pop@amd.com>
3032             Jan Sjodin  <jan.sjodin@amd.com>
3033
3034         PR tree-optimization/38559
3035         * testsuite/gcc.dg/graphite/pr38559.c: New.
3036
3037         * graphite.c (debug_value, copy_constraint,
3038         swap_constraint_variables, scale_constraint_variable, ): New.
3039         (get_lower_bound, get_upper_bound): Removed.
3040         (graphite_trans_bb_strip_mine): Clean up this code that works
3041         only for constant number of iterations.  Fully copy upper and
3042         lower bound constraints, not only the constant part of them.
3043         * graphite.h (debug_value): Declared.
3044
3045 2009-01-06  Jan Sjodin  <jan.sjodin@amd.com>
3046
3047         PR tree-optimization/38492
3048         PR tree-optimization/38498
3049         * tree-check.c (operator_is_linear, scev_is_linear_expression): New.
3050         * tree-chrec.h (scev_is_linear_expression): Declared.
3051         * graphite.c (graphite_cannot_represent_loop_niter): New.
3052         (scopdet_basic_block_info): Call graphite_cannot_represent_loop_niter.
3053         (graphite_loop_normal_form): Use gcc_assert.
3054         (scan_tree_for_params): Use CASE_CONVERT.
3055         (phi_node_is_iv, bb_contains_non_iv_scalar_phi_nodes): New.
3056         (build_scop_conditions_1): Call bb_contains_non_iv_scalar_phi_nodes.
3057         Use gcc_assert.  Discard scops that contain unhandled cases.
3058         (build_scop_conditions): Return a boolean status for unhandled cases.
3059         (strip_mine_profitable_p): Print the loop number, not its depth.
3060         (is_interchange_valid): Pass the depth of the loop nest, don't
3061         recompute it wrongly.
3062         (graphite_trans_bb_block): Same.
3063         (graphite_trans_bb_block): Print tentative of loop blocking.
3064         (graphite_trans_scop_block): Do not print that the loop has been
3065         blocked.
3066         (graphite_transform_loops): Do not handle scops that contain condition
3067         scalar phi nodes.
3068
3069         * testsuite/gcc.dg/graphite/pr38500.c: Fixed warning as committed
3070         in trunk.
3071         * testsuite/gcc.dg/graphite/block-0.c: Update test.
3072         * testsuite/gcc.dg/graphite/block-1.c: Same.
3073         * testsuite/gcc.dg/graphite/block-2.c: Remove xfail and test for
3074         blocking.
3075         * testsuite/gcc.dg/graphite/block-4.c: Remove test for strip mine.
3076         * testsuite/gcc.dg/graphite/block-3.c: New.
3077         * testsuite/gcc.dg/graphite/pr38498.c: New.
3078
3079 2008-12-22  Harsha Jagasia  <harsha.jagasia@amd.com>
3080
3081         PR tree-optimization/38510
3082         * gcc.dg/graphite/pr38510.c: New.
3083         * graphite.c (recompute_all_dominators): Call mark_irreducible_loops.
3084           (translate_clast): Call recompute_all_dominators before
3085           graphite_verify.
3086           (gloog): Call recompute_all_dominators before graphite_verify.
3087
3088 2008-12-12  Sebastian Pop  <sebastian.pop@amd.com>
3089
3090         PR tree-optimization/38492
3091         * graphite.c (rename_map_elt, debug_rename_elt,
3092         debug_rename_map_1, debug_rename_map, new_rename_map_elt,
3093         rename_map_elt_info, eq_rename_map_elts,
3094         get_new_name_from_old_name, bb_in_sese_p): Moved around.
3095         (sese_find_uses_to_rename_use): Renamed sese_build_livein_liveouts_use.
3096         (sese_find_uses_to_rename_bb): Renamed sese_build_livein_liveouts_bb.
3097         (sese_build_livein_liveouts): New.
3098         (new_sese, free_sese): New.
3099         (new_scop): Call new_sese.
3100         (free_scop): Call free_sese.
3101         (rename_variables_from_edge, rename_phis_end_scop): Removed.
3102         (register_old_new_names): Renamed register_old_and_new_names.
3103         (register_scop_liveout_renames, add_loop_exit_phis,
3104         insert_loop_close_phis, struct igp,
3105         default_liveout_before_guard, add_guard_exit_phis,
3106         insert_guard_phis, copy_renames): New.
3107         (translate_clast): Call insert_loop_close_phis and insert_guard_phis.
3108         (sese_add_exit_phis_edge): Renamed scop_add_exit_phis_edge.
3109         (rewrite_into_sese_closed_ssa): Renamed scop_insert_phis_for_liveouts.
3110         (scop_adjust_phis_for_liveouts): New.
3111         (gloog): Call scop_adjust_phis_for_liveouts.
3112
3113         * graphite.h (struct sese): Documented.  Added fields liveout,
3114         num_ver and livein.
3115         (SESE_LIVEOUT, SESE_LIVEIN, SESE_LIVEIN_VER, SESE_NUM_VER): New.
3116         (new_sese, free_sese, sese_build_livein_liveouts): Declared.
3117         (struct scop): Added field liveout_renames.
3118         (SCOP_LIVEOUT_RENAMES): New.
3119
3120 2008-12-11  Sebastian Pop  <sebastian.pop@amd.com>
3121
3122         PR tree-optimization/38409
3123         * gcc.dg/graphite/pr38409.c: New.
3124         * graphite.c (nb_reductions_in_loop): Use simple_iv.
3125
3126 2008-12-11  Sebastian Pop  <sebastian.pop@amd.com>
3127
3128         * graphite.c (gcc_type_for_cloog_iv): By default return
3129         integer_type_node.
3130         (graphite_create_new_loop): Don't fold_convert the already
3131         fold_convert-ed expression.
3132
3133 2008-12-11  Harsha Jagasia  <harsha.jagasia@amd.com>
3134
3135         PR tree-optimization/38446
3136         * gcc.dg/graphite/pr38446.c: New.
3137         * graphite.c (register_bb_in_sese): New.
3138         (bb_in_sese_p): Check if bb belongs to sese region by explicitly
3139         looking at the bbs in the region.
3140         * graphite.h (sese): Add region_basic_blocks pointer set to
3141         structure and initialize at the time of defining new scop.
3142
3143 2008-12-11  Tobias Grosser  <grosser@fim.uni-passau.de>
3144
3145         * graphite.c (new_graphite_bb): Initialize GBB_STATIC_SCHEDULE.
3146         (find_params_in_bb): Do not free data refs.
3147         (free_graphite_bb): Add FIXME on disabled free_data_refs.
3148
3149 2008-12-11  Sebastian Pop  <sebastian.pop@amd.com>
3150
3151         * testsuite/gcc.dg/graphite/scop-16.c: Test only scop specific info.
3152         * testsuite/gcc.dg/graphite/scop-17.c: Same.
3153         * testsuite/gcc.dg/graphite/block-5.c: New.
3154         * testsuite/gcc.dg/graphite/block-6.c: New.
3155         * testsuite/gcc.dg/graphite/pr37485.c: Clean dump file after.
3156         * testsuite/gcc.dg/graphite/pr37684.c: Same.
3157         * testsuite/gcc.dg/graphite/block-2.c: Same.
3158
3159         * graphite.c (struct ivtype_map_elt): New.
3160         (debug_ivtype_elt, debug_ivtype_map_1, debug_ivtype_map,
3161         new_ivtype_map_elt, ivtype_map_elt_info, eq_ivtype_map_elts,
3162         gcc_type_for_cloog_iv): New.
3163         (loop_iv_stack_patch_for_consts): Use the type of the induction
3164         variable from the original loop, except for the automatically
3165         generated loops, i.e., in the case of a strip-mined loop, in
3166         which case there is no original loop: in that case just use
3167         integer_type_node.
3168         (new_graphite_bb): Initialize GBB_CLOOG_IV_TYPES.
3169         (free_graphite_bb): Free GBB_CLOOG_IV_TYPES.
3170         (clast_name_to_gcc): Accept params to be NULL.
3171         (clast_to_gcc_expression): Take an extra parameter for the type.
3172         Convert to that type all the expressions built by this function.
3173         (gcc_type_for_clast_expr, gcc_type_for_clast_eq): New.
3174         (graphite_translate_clast_equation): Compute the type of the
3175         clast_equation before translating its LHS and RHS.
3176         (clast_get_body_of_loop, gcc_type_for_iv_of_clast_loop): New.
3177         (graphite_create_new_loop): Compute the type of the induction
3178         variable before translating the lower and upper bounds and before
3179         creating the induction variable.
3180         (rename_variables_from_edge, rename_phis_end_scop): New.
3181         (copy_bb_and_scalar_dependences): Call rename_phis_end_scop.
3182         (sese_add_exit_phis_edge): Do not use integer_zero_node.
3183         (find_cloog_iv_in_expr, compute_cloog_iv_types_1,
3184         compute_cloog_iv_types): New.
3185         (gloog): Call compute_cloog_iv_types before starting the
3186         translation of the clast.
3187
3188         * graphite.h (struct graphite_bb): New field cloog_iv_types.
3189         (GBB_CLOOG_IV_TYPES): New.
3190         (debug_ivtype_map): Declared.
3191         (oldiv_for_loop): New.
3192
3193 2008-12-10  Tobias Grosser  <grosser@fim.uni-passau.de>
3194
3195         PR middle-end/38459
3196         * graphite.c (new_scop): Initialize SCOP_ADD_PARAMS.
3197         (param_index): Assert if parameter is not know after parameter
3198         detection.
3199         (find_params_in_bb): Detect params directly in GBB_CONDITIONS.
3200         (find_scop_parameters): Mark, that we have finished parameter
3201         detection.
3202         (graphite_transform_loops): Move condition detection before parameter
3203         detection.
3204         * graphite.h (struct scop): Add SCOP_ADD_PARAMS.
3205         * testsuite/gfortran.dg/graphite/pr38459.f90: New.
3206
3207 2008-12-09  Tobias Grosser  <grosser@fim.uni-passau.de>
3208
3209         * graphite.c (graphite_transform_loops): Always call find_transform ()
3210         in ENABLE_CHECKING.  So we test these code paths, even if we do not
3211         generate code.
3212
3213 2008-12-09  Tobias Grosser  <grosser@fim.uni-passau.de>
3214
3215         * graphite.c (print_graphite_bb): Fix printing to file != dump_file.
3216         (print_scop): Ditto.
3217
3218 2008-12-08  Tobias Grosser  <grosser@fim.uni-passau.de>
3219
3220         PR middle-end/38084
3221         Fix testsuite/gfortran.dg/graphite/id-3.f90.
3222         * graphite.c (scopdet_basic_block_info): Fix bug that found some
3223         regions more than once.
3224
3225 2008-12-03  Sebastian Pop  <sebastian.pop@amd.com>
3226
3227         Fix testsuite/gfortran.dg/graphite/id-4.f90.
3228         * graphite.c (scan_tree_for_params): Do not compute the multiplicand
3229         when not needed.
3230
3231 2008-12-03  Sebastian Pop  <sebastian.pop@amd.com>
3232
3233         Fix testsuite/gfortran.dg/graphite/id-1.f90.
3234         * graphite.c (gmp_cst_to_tree): Pass the type in parameter.
3235         (loop_iv_stack_patch_for_consts): Update use of gmp_cst_to_tree.
3236         (max_precision_type): New.
3237         (value_clast): Removed.
3238         (clast_to_gcc_expression): Be more careful to types of expressions.
3239         Use max_precision_type and update use of gmp_cst_to_tree.
3240         (graphite_translate_clast_equation): Use max_precision_type.
3241         (graphite_create_guard_cond_expr): Do not use integer_type_node,
3242         use the type of the condition.
3243         (graphite_create_new_loop): Do not use integer_type_node, use the
3244         max_precision_type of lb and ub.
3245
3246 2008-12-03  Sebastian Pop  <sebastian.pop@amd.com>
3247
3248         * graphite.c (build_scops_1): Initialize open_scop.exit
3249         and sinfo.last.
3250
3251 2008-12-02  Sebastian Pop  <sebastian.pop@amd.com>
3252
3253         * testsuite/gcc.dg/graphite/pr38084.c: New.
3254         * testsuite/gfortran.dg/graphite/id-1.f90: New.
3255         * testsuite/gfortran.dg/graphite/id-2.f90: New.
3256         * testsuite/gfortran.dg/graphite/id-3.f90: New.
3257         * testsuite/gfortran.dg/graphite/id-4.f90: New.
3258         * testsuite/gfortran.dg/graphite/pr37857.f90: New.
3259
3260 2008-12-02  Sebastian Pop  <sebastian.pop@amd.com>
3261             Jan Sjodin  <jan.sjodin@amd.com>
3262             Harsha Jagasia  <harsha.jagasia@amd.com>
3263
3264         PR middle-end/37852
3265         PR middle-end/37883
3266         PR middle-end/37928
3267         PR middle-end/37980
3268         PR middle-end/38038
3269         PR middle-end/38039
3270         PR middle-end/38073
3271         PR middle-end/38083
3272         PR middle-end/38125
3273
3274         * testsuite/gcc.dg/graphite/pr38073.c: New.
3275         * testsuite/gcc.dg/graphite/pr37928.c: New.
3276         * testsuite/gcc.dg/graphite/pr37883.c: New.
3277         * testsuite/gcc.dg/graphite/pr38125.c: New.
3278         * testsuite/gfortran.dg/graphite/pr38083.f90: New.
3279         * testsuite/gfortran.dg/graphite/pr37852.f90: New.
3280         * testsuite/gfortran.dg/graphite/pr37980.f90: New.
3281
3282         * testsuite/gcc.dg/graphite/scop-18.c: Remove reduction, test for
3283         the number of detected scops.  Copy exact same test for loop
3284         blocking...
3285         * testsuite/gcc.dg/graphite/block-1.c: Fix the number of expected
3286         loops to be blocked as reductions are not handled.
3287         * testsuite/gcc.dg/graphite/block-4.c: ...here.  New.
3288
3289         * tree-phinodes.c (remove_phi_nodes): New, extracted from...
3290         * tree-cfg.c (remove_phi_nodes_and_edges_for_unreachable_block):
3291         ...here.
3292         * tree-flow.h (remove_phi_nodes, canonicalize_loop_ivs): Declared.
3293         * Makefile.in (graphite.o): Depend on value-prof.h.
3294         (graphite.o-warn): Removed -Wno-error.
3295         * tree-parloops.c (canonicalize_loop_ivs): Allow reduction_list
3296         to be a NULL pointer.  Call update_stmt.  Return the newly created
3297         cannonical induction variable.
3298
3299         * graphite.h (debug_rename_map): Declared.  Fix some comments.
3300
3301         * graphite.c: Reimplement the code generation from graphite to gimple.
3302         Include value-prof.h.
3303         (loop_iv_stack_get_iv): Do not return NULL for constant substitutions.
3304         (get_old_iv_from_ssa_name): Removed.
3305         (graphite_stmt_p): New.
3306         (new_graphite_bb): Test for useful statements before building a
3307         graphite statement for the basic block.
3308         (free_graphite_bb): Do not free GBB_DATA_REFS: this is a bug
3309         in free_data_ref that calls BITMAP_FREE (DR_VOPS (dr)) without
3310         reason.
3311         (recompute_all_dominators, graphite_verify,
3312         nb_reductions_in_loop, graphite_loop_normal_form): New.
3313         (scop_record_loop): Call graphite_loop_normal_form.
3314         (build_scop_loop_nests): Iterate over all the blocks of the
3315         function instead of relying on the incomplete information from
3316         SCOP_BBS.  Return the success of the operation.
3317         (find_params_in_bb): Use the data from GBB_DATA_REFS.
3318         (add_bb_domains): Removed.
3319         (build_loop_iteration_domains): Don't call add_bb_domains.
3320         Add the iteration domain only to the basic blocks that have been
3321         translated to graphite.
3322         (build_scop_conditions_1): Add constraints only if the basic
3323         block have been translated to graphite.
3324         (build_scop_data_accesses): Completely disabled until data
3325         dependence is correctly implemented.
3326         (debug_rename_elt, debug_rename_map_1, debug_rename_map): New.
3327         (remove_all_edges_1, remove_all_edges): Removed.
3328         (get_new_name_from_old_name): New.
3329         (graphite_rename_variables_in_stmt): Renamed
3330         rename_variables_in_stmt.  Call get_new_name_from_old_name.
3331         Use replace_exp and update_stmt.
3332         (is_old_iv): Renamed is_iv.
3333         (expand_scalar_variables_stmt): Extra parameter for renaming map.
3334         Use replace_exp and update_stmt.
3335         (expand_scalar_variables_expr): Same.  Use the map to get the
3336         new names for the renaming of induction variables and for the
3337         renaming of variables after a basic block has been copied.
3338         (expand_scalar_variables): Same.
3339         (graphite_rename_variables): Renamed rename_variables.
3340         (move_phi_nodes): Removed.
3341         (get_false_edge_from_guard_bb): New.
3342         (build_iv_mapping): Do not insert the induction variable of a
3343         loop in the renaming iv map if the basic block does not belong
3344         to that loop.
3345         (register_old_new_names, graphite_copy_stmts_from_block,
3346         copy_bb_and_scalar_dependences): New.
3347         (translate_clast): Heavily reimplemented: copy basic blocks,
3348         do not move them.  Finally, in call cleanup_tree_cfg in gloog.
3349         At each translation step call graphite_verify ensuring the
3350         consistency of the SSA, loops and dominators information.
3351         (collect_virtual_phis, find_vdef_for_var_in_bb,
3352         find_vdef_for_var_1, find_vdef_for_var,
3353         patch_phis_for_virtual_defs): Removed huge hack.
3354         (mark_old_loops, remove_dead_loops, skip_phi_defs,
3355         collect_scop_exit_phi_args, patch_scop_exit_phi_args,
3356         gbb_can_be_ignored, scop_remove_ignoreable_gbbs, ): Removed.
3357         (remove_sese_region, ifsese, if_region_entry, if_region_exit,
3358         if_region_get_condition_block, if_region_set_false_region,
3359         create_if_region_on_edge, move_sese_in_condition, bb_in_sese_p,
3360         sese_find_uses_to_rename_use, sese_find_uses_to_rename_bb,
3361         sese_add_exit_phis_edge, sese_add_exit_phis_var,
3362         rewrite_into_sese_closed_ssa): New.
3363         (gloog): Remove dead code.  Early return if code cannot be
3364         generated.  Call cleanup_tree_cfg once the scop has been code
3365         generated.
3366         (graphite_trans_scop_block, graphite_trans_loop_block): Do not
3367         block loops with less than two loops.
3368         (graphite_apply_transformations): Remove the call to
3369         scop_remove_ignoreable_gbbs.
3370         (limit_scops): When build_scop_loop_nests fails, continue on
3371         the next scop.  Fix open_scop.entry.
3372         (graphite_transform_loops): Call recompute_all_dominators: force the
3373         recomputation of correct CDI_DOMINATORS and CDI_POST_DOMINATORS.
3374         Call initialize_original_copy_tables and free_original_copy_tables
3375         to be able to copy basic blocks during code generation.
3376         When build_scop_loop_nests fails, continue on next scop.
3377         (value_clast): New union.
3378         (clast_to_gcc_expression): Fix type cast warning.
3379
3380 2008-11-09  Sebastian Pop  <sebastian.pop@amd.com>
3381
3382         * Merge from mainline (r140838:141727).
3383
3384 2008-11-05  Tobias Grosser  <grosser@fim.uni-passau.de>
3385
3386         PR middle-end/37833
3387
3388         * graphite.c (scan_tree_for_params): Add POINTER_PLUS_EXPR.
3389
3390 2008-11-05  Tobias Grosser  <grosser@fim.uni-passau.de>
3391
3392         PR middle-end/37943
3393
3394         * graphite.c (scopdet_basic_block_info): Fix loops with multiple
3395         exits and conditions.
3396         * testsuite/gcc.dg/graphite/pr37943.c: New.
3397
3398 2008-10-23  Tobias Grosser  <grosser@fim.uni-passau.de>
3399
3400         PR middle-end/37886
3401         * graphite.c (gloog): Replace EXIT_BLOCK_PTR with scop exit.
3402
3403 2008-10-23  Tobias Grosser  <grosser@fim.uni-passau.de>
3404
3405         * doc/invoke.texi: Fix spaces.
3406
3407 2008-10-22  Sebastian Pop  <sebastian.pop@amd.com>
3408
3409         PR tree-optimization/37891
3410         Reverted last commit.
3411         * graphite.c (create_single_entry_edge): Set
3412         EDGE_IRREDUCIBLE_LOOP and BB_IRREDUCIBLE_LOOP.
3413
3414 2008-10-21  Sebastian Pop  <sebastian.pop@amd.com>
3415             Mitul Thakkar  <mitul.thakkar@amd.com>
3416
3417         * graphite.c (create_single_entry_edge): Set
3418         EDGE_IRREDUCIBLE_LOOP and BB_IRREDUCIBLE_LOOP.
3419
3420 2008-10-16  Tobias Grosser  <grosser@fim.uni-passau.de>
3421
3422         * doc/invoke.texi: Add -fgraphite-identity.
3423         * graphite.c (graphite_apply_transformations): Check for
3424         -fgraphite-identity.
3425         * toplev.c (process_options): Add flag_graphite_identity.
3426         * tree-ssa-loop.c: Add flag_graphite_identity.
3427
3428 2008-10-14  Sebastian Pop  <sebastian.pop@amd.com>
3429
3430         Undo changes from 2008-10-02:
3431         * tree-ssa-loop-ivopts.c (rewrite_use_nonlinear_expr): Convert
3432         operand type when copying the operand to a variable of different type.
3433         * cfgloopmanip.c (create_empty_loop_on_edge): Write exit condition
3434         with the IV name after increment.
3435
3436 2008-10-14  Sebastian Pop  <sebastian.pop@amd.com>
3437             Harsha Jagasia  <harsha.jagasia@amd.com>
3438
3439         PR tree-optimization/37828
3440         * testsuite/gcc.dg/graphite/pr37828.c: New.
3441         * graphite.c (graphite_trans_loop_block): Do not loop block
3442         single nested loops.
3443
3444 2008-10-09  Harsha Jagasia  <harsha.jagasia@amd.com>
3445             Sebastian Pop  <sebastian.pop@amd.com>
3446
3447         * graphite.c (struct rename_map_elt, new_rename_map_elt,
3448         rename_map_elt_info, eq_rename_map_elts): New.
3449         (graphite_rename_ivs_stmt): Renamed graphite_rename_variables_in_stmt.
3450         (expand_scalar_variables_expr): Change parameters.
3451         (expand_scalar_variables_stmt): Same.
3452         (expand_scalar_variables): Same.
3453         (graphite_rename_ivs): Rename graphite_rename_variables.
3454         (build_iv_mapping): New.
3455         (translate_clast): Call build_iv_mapping.
3456         * graphite.h (gbb_p): New name.
3457
3458 2008-10-03  Harsha Jagasia  <harsha.jagasia@amd.com>
3459
3460         PR tree-optimization/37684
3461         * gcc.dg/graphite/pr37684.c: New.
3462         * graphite.c (exclude_component_ref): New.
3463         (is_simple_operand): Call exclude_component_ref.
3464
3465 2008-10-02  Jan Sjodin  <jan.sjodin@amd.com>
3466             Harsha Jagasia  <harsha.jagasia@amd.com>
3467
3468         PR tree-optimization/37485
3469         * gcc.dg/graphite/block-2.c: New
3470         * graphite.c (gmp_cst_to_tree): Moved.
3471         (iv_stack_entry_is_constant): New.
3472         (iv_stack_entry_is_iv): New.
3473         (loop_iv_stack_push): Renamed to loop_iv_stack_push_iv.
3474         (loop_iv_stack_insert_constant): New.
3475         (loop_iv_stack_pop): Use new datatpype.
3476         (loop_iv_stack_get_iv): Same.
3477         (loop_iv_stack_get_iv_from_name): Same.
3478         (loop_iv_stack_debug): Renamed to debug_loop_iv_stack.
3479         (loop_iv_stack_patch_for_consts): New.
3480         (loop_iv_stack_remove_constants): New.
3481         (graphite_create_new_loop): Use loop_iv_stack_push_iv.
3482         (translate_clast): Call loop_iv_stack_patch_for_consts and
3483         loop_iv_stack_remove_constants.
3484         (gloog): Use new datatype.  Redirect construction edge to end
3485         block to avoid accidental deletion.
3486         * graphite.h (enum iv_stack_entry_kind): New.  Tag for data in
3487         iv stack entry.
3488         (union iv_stack_entry_data): New.  Data in iv stack entry.
3489         (struct iv_stack_entry): New.  Datatype for iv stack entries.
3490
3491 2008-10-02  Sebastian Pop  <sebastian.pop@amd.com>
3492
3493         * tree-ssa-loop-ivopts.c (rewrite_use_nonlinear_expr): Convert
3494         operand type when copying the operand to a variable of different type.
3495
3496 2008-10-02  Sebastian Pop  <sebastian.pop@amd.com>
3497
3498         * cfgloopmanip.c (create_empty_loop_on_edge): Write exit condition
3499         with the IV name after increment.
3500
3501 2008-10-02  Sebastian Pop  <sebastian.pop@amd.com>
3502
3503         * Merge from mainline (r140164:140838).
3504
3505 2008-09-10  Konrad Trifunovic  <konrad.trifunovic@inria.fr>
3506
3507         * graphite-data-ref.c: New.
3508         * graphite.c (print_scop): Also dump the dependence graph.
3509         (bb_in_scop_p, loop_in_scop_p, nb_loops_around_gb): Moved...
3510         (new_scop): Initialize SCOP_DEP_GRAPH.
3511         (build_scop_dynamic_schedules): New.
3512         (build_access_matrix_with_af): Fixed column numbering.
3513         (graphite_transform_loops): Call build_scop_dynamic_schedules.
3514         * graphite.h: Add ifndef/define guards against multiple inclusion.
3515         (struct scop): Add dep_graph field.
3516         (SCOP_DEP_GRAPH): Defined.
3517         (ref_nb_loops): Fixed and moved to other position.
3518         (bb_in_scop_p, loop_in_scop_p, nb_loops_around_gb): ... here.
3519         (nb_loops_around_loop_in_scop): New.
3520         (graphite_dump_dependence_graph): Declared.
3521         (graphite_build_rdg_all_levels): Declared.
3522         (graphite_test_dependence): Declared.
3523         * Makefile.in (graphite-data-ref.o): New target.
3524
3525 2008-09-09  Sebastian Pop  <sebastian.pop@amd.com>
3526
3527         * Merge from mainline (139870:140164).
3528
3529 2008-09-01  Sebastian Pop  <sebastian.pop@amd.com>
3530
3531         * Merge from mainline (138275:139870).
3532         * testsuite/gcc.dg/graphite/scop-matmult.c: XFailed as one of
3533         the commits from trunk broke the niter detection.
3534
3535 2008-09-01  Sebastian Pop  <sebastian.pop@amd.com>
3536
3537         * graphite.c: Add more documentation.  Fix formatting.
3538         (debug_loop_vec, debug_oldivs, loop_iv_stack,
3539         loop_iv_stack_debug): Moved...
3540         (schedule_to_scattering): Move before use.
3541         (dot_all_scops): Include in "#if 0" the code for system
3542         call dotty.
3543
3544         * graphite.h: (debug_loop_vec, debug_oldivs, loop_iv_stack,
3545         loop_iv_stack_debug): ...here.
3546
3547 2008-08-29  Jan Sjodin  <jan.sjodin@amd.com>
3548
3549         * tree-phinodes.c (make_phi_node): Extern.
3550         (add_phi_node_to_bb): New.
3551         (create_phi_node): Call add_phi_node_to_bb.
3552         * tree-ssa-loop-ivopts.c (get_phi_with_result): New.
3553         (remove_statement): Handle case where stored phi was updated
3554         and is no longer the same.
3555         * graphite.c (is_parameter): New.
3556         (is_old_iv): New.
3557         (expand_scalar_variables_expr): New.
3558         (expand_scalar_variables_stmt): New.
3559         (expand_scalar_variables): New.
3560         (move_phi_nodes): Create new phi instead of moving old one.
3561         (translate_clast): Call expand_scalar_variables.
3562         (find_vdef_for_var_in_bb): Also scan regular definitions.
3563         (skip_phi_defs): New.
3564         (collect_scop_exit_phi_args): New.
3565         (patch_scop_exit_phi_args): New.
3566         (gloog): Patch phis after scop.
3567         * tree-flow.h: (add_phi_node_to_bb): Declared.
3568         (make_phi_node): Declared.
3569
3570 2008-08-26  Sebastian Pop  <sebastian.pop@amd.com>
3571
3572         * graphite.c (end_scop): Split the entry of the scop when it
3573         is the header of the loop in which the scop is ending.
3574         (build_scops_1, limit_scops): Update uses of end_scop.
3575
3576 2008-08-26  Sebastian Pop  <sebastian.pop@amd.com>
3577
3578         * graphite.c (dot_all_scops_1): Do not fail on uninitialized
3579         SCOP_ENTRY or SCOP_EXIT.
3580
3581 2008-08-25  Sebastian Pop  <sebastian.pop@amd.com>
3582
3583         * graphite.c (get_construction_edge): Removed.
3584         (gloog): Construction edge is the scop entry edge.
3585
3586 2008-08-25  Sebastian Pop  <sebastian.pop@amd.com>
3587
3588         * graphite.c (can_generate_for_scop): Removed.
3589         (gloog): Do not call it.
3590
3591 2008-08-25  Sebastian Pop  <sebastian.pop@amd.com>
3592
3593         * graphite.c (new_scop): Entry of a scop is an edge.
3594         Initialize SESE region.
3595         (free_scop): Free SESE region.
3596         (build_scops_1, scopdet_bb_info): Work on edges, not on bbs.
3597         (split_difficult_bb): New, split from end_scop.
3598         (end_scop): Exit of a scop is an edge.
3599         (build_scop_bbs): Never check CDI_POST_DOMINATORS: this info is
3600         not automatically updated and thus is always wrong.
3601         * graphite.h (struct sese): New.
3602         (SESE_ENTRY): New.
3603         (SESE_EXIT): New.
3604         (struct scop): New field for a SESE region.  Remove entry, exit.
3605         (SCOP_ENTRY, SCOP_EXIT): Update definitions to match same
3606         semantics as before.  Moved comment around.
3607
3608 2008-08-25  Tobias Grosser  <grosser@fim.uni-passau.de>
3609             Sebastian Pop  <sebastian.pop@amd.com>
3610
3611         * graphite.c (graphite_transform_loops): Always enable gloog
3612         and find_transform when ENABLE_CHECKING.
3613
3614 2008-08-25  Sebastian Pop  <sebastian.pop@amd.com>
3615
3616         * graphite.c (graphite_transform_loops): Move pretty printer
3617         of SCOPs before doing any transform.  Remove call to print_scops
3618         and dot_all_scops_1.
3619
3620 2008-08-25  Sebastian Pop  <sebastian.pop@amd.com>
3621
3622         * graphite.c (dump_gbb_conditions): Don't try to print NULL pointers.
3623         (print_graphite_bb): Same.
3624
3625 2008-08-25  Sebastian Pop  <sebastian.pop@amd.com>
3626
3627         * graphite.c (dot_all_scops_1): Cleanup.
3628         (move_scops): Fix comment.
3629
3630 2008-08-25  Sebastian Pop  <sebastian.pop@amd.com>
3631
3632         * graphite.c (build_scop_bbs): Revert commit 139355:
3633
3634         2008-08-20  Sebastian Pop  <sebastian.pop@amd.com>
3635                     Dwarakanath Rajagopal  <dwarak.rajagopal@amd.com>
3636
3637                 * graphite.c (build_scop_bbs): Factor up code.
3638
3639 2008-08-25  Tobias Grosser  <grosser@fim.uni-passau.de>
3640
3641         * graphite.c (gloog): Update dominator info.
3642
3643 2008-08-25  Tobias Grosser  <grosser@fim.uni-passau.de>
3644
3645         * graphite.c (remove_cond_exprs): Do not fail on empty bbs.
3646
3647 2008-08-24  Sebastian Pop  <sebastian.pop@amd.com>
3648
3649         * graphite.c (new_graphite_bb): Remove GBB_INDEX_TO_NUM_MAP
3650         initialization.
3651         (free_graphite_bb): Remove GBB_INDEX_TO_NUM_MAP free.
3652         (translate_clast): Correct formatting.
3653         * graphite.h (struct num_map): Removed.
3654         (struct graphite_bb): Remove num_map field.
3655         (GBB_INDEX_TO_NUM_MAP): Removed.
3656
3657 2008-08-24  Sebastian Pop  <sebastian.pop@amd.com>
3658
3659         * graphite.c (build_access_matrix_with_af): Fix comments.
3660         (build_scop_data_accesses): Same.
3661
3662 2008-08-24  Sebastian Pop  <sebastian.pop@amd.com>
3663
3664         * graphite.c (build_scop_data_accesses): Don't construct
3665         access matrices.  Add a FIXME and an assert condition that
3666         should pass when the access matrices will be needed.
3667
3668 2008-08-24  Sebastian Pop  <sebastian.pop@amd.com>
3669
3670         * tree-data-ref.c (stmt_simple_memref_p): Don't call
3671         really_constant_p.
3672         * graphite.c (build_graphite_bb): Renamed new_graphite_bb.
3673         Moved close by free_graphite_bb.
3674         (free_graphite_bb): Call free_data_refs.  Reset bb->aux.
3675         (new_scop): Move close by free_scop.
3676         (graphite_transform_loops): Avoid linear scan to reset bb->aux.
3677
3678 2008-08-22  Jan Sjodin  <jan.sjodin@amd.com>
3679
3680         * cfgloopmanip.c (create_empty_if_region_on_edge): New.
3681         * graphite.c (clast_to_gcc_expression): Call gmp_cst_to_tree
3682         instead of recursive call.
3683         (graphite_translate_clast_equation): New.
3684         (graphite_create_guard_cond_expr): New.
3685         (graphite_create_new_guard): New.
3686         (get_stack_index_from_iv): Removed.
3687         (graphite_rename_ivs_stmt): Use gbb_loop_index.
3688         (get_true_edge_from_guard_bb): New.
3689         (translate_clast): Handle stmt_guard in clast.
3690         (get_construction_edge): Allow construction edge detection for
3691         a scope entry with multiple predecessors if one predecessor is
3692         the immediate dominator of scope entry.
3693         (can_generate_code_stmt): Enable code generation for clast_guard.
3694         (gloog): Use correct context loop.  Removed check for post dominators.
3695         * cfgloop.h (create_empty_if_region_on_edge): Declared.
3696
3697 2008-08-21  Sebastian Pop  <sebastian.pop@amd.com>
3698
3699         * graphite.c (remove_dead_loops): Document better which
3700         loops are removed.
3701
3702 2008-08-21  Sebastian Pop  <sebastian.pop@amd.com>
3703
3704         * Makefile.in: Rename POLYLIBLIBS and POLYLIBINC to PPLLIBS
3705         and PPLINC.
3706         (graphite.o): Also depends on pointer-set.h.
3707
3708 2008-08-21  Sebastian Pop  <sebastian.pop@amd.com>
3709
3710         * graphite.c (scop_record_loop): Fix compile warning.
3711
3712 2008-08-21  Harsha Jagasia  <harsha.jagasia@amd.com>
3713             Sebastian Pop  <sebastian.pop@amd.com>
3714
3715         * graphite.c (scop_record_loop): DECL_NAME can be NULL.
3716
3717 2008-08-21  Sebastian Pop  <sebastian.pop@amd.com>
3718
3719         * graphite.c (build_graphite_bb): Initialize bb->aux to
3720         point to the graphite_bb_p.
3721         (graphite_bb_from_bb): Renamed gbb_from_bb; returns the
3722         content of bb->aux.
3723         (add_bb_domains): Does not use the scop parameter.
3724         (graphite_transform_loops): Clean bb->aux at the end.
3725
3726 2008-08-20  Dwarakanath Rajagopal  <dwarak.rajagopal@amd.com>
3727             Sebastian Pop  <sebastian.pop@amd.com>
3728
3729         * testsuite/lib/target-supports.exp
3730         (check_effective_target_fgraphite): New.
3731
3732         * testsuite/gcc.dg/graphite/graphite.exp: Early exit when
3733         check_effective_target_fgraphite returns false.
3734         Set dg-do-what-default to compile.
3735         (scan-graphite-dump-times): Removed.
3736         * testsuite/gfortran.dg/graphite/graphite.exp: Same.
3737
3738         * testsuite/gcc.dg/graphite/scop-0.c: Do not use "dg-do compile".
3739         Use scan-tree-dump-times instead of scan-graphite-dump-times.
3740         * testsuite/gcc.dg/graphite/scop-1.c: Same.
3741         * testsuite/gcc.dg/graphite/scop-2.c: Same.
3742         * testsuite/gcc.dg/graphite/scop-3.c: Same.
3743         * testsuite/gcc.dg/graphite/scop-4.c: Same.
3744         * testsuite/gcc.dg/graphite/scop-5.c: Same.
3745         * testsuite/gcc.dg/graphite/scop-6.c: Same.
3746         * testsuite/gcc.dg/graphite/scop-7.c: Same.
3747         * testsuite/gcc.dg/graphite/scop-8.c: Same.
3748         * testsuite/gcc.dg/graphite/scop-9.c: Same.
3749         * testsuite/gcc.dg/graphite/scop-10.c: Same.
3750         * testsuite/gcc.dg/graphite/scop-11.c: Same.
3751         * testsuite/gcc.dg/graphite/scop-12.c: Same.
3752         * testsuite/gcc.dg/graphite/scop-13.c: Same.
3753         * testsuite/gcc.dg/graphite/scop-matmult.c: Same.
3754         * testsuite/gcc.dg/graphite/scop-14.c: Same.
3755         * testsuite/gcc.dg/graphite/scop-15.c: Same.
3756         * testsuite/gcc.dg/graphite/block-0.c: Same.
3757         * testsuite/gcc.dg/graphite/scop-16.c: Same.
3758         * testsuite/gcc.dg/graphite/block-1.c: Same.
3759         * testsuite/gcc.dg/graphite/scop-17.c: Same.
3760         * testsuite/gcc.dg/graphite/scop-18.c: Same.
3761         * testsuite/gfortran.dg/graphite/block-1.f90: Same.
3762         * testsuite/gfortran.dg/graphite/scop-1.f: Same.
3763         * testsuite/gfortran.dg/graphite/block-2.f: Same.
3764
3765 2008-08-20  Sebastian Pop  <sebastian.pop@amd.com>
3766
3767         * graphite.c: Fix some XXX comments.
3768         (build_scop_dynamic_schedules): Removed.
3769
3770 2008-08-20  Sebastian Pop  <sebastian.pop@amd.com>
3771
3772         * graphite.h (scop_max_loop_depth): Moved...
3773         * graphite.c (scop_max_loop_depth): ...here.
3774         (remove_all_edges_1): New.
3775         (remove_all_edges): Factored code.
3776         (remove_cond_exprs): Check only the last statement for
3777         a GIMPLE_COND expression.
3778
3779 2008-08-20  Sebastian Pop  <sebastian.pop@amd.com>
3780
3781         * graphite.c (scan_tree_for_params): Early return when the
3782         expression is a chrec_dont_know.  Handle case NEGATE_EXPR.
3783         (find_scop_parameters): Factor out code.
3784         (graphite_trans_bb_strip_mine): Remove dead code.
3785
3786 2008-08-20  Sebastian Pop  <sebastian.pop@amd.com>
3787
3788         * graphite.c (clast_to_gcc_expression, graphite_create_new_loop,
3789         graphite_trans_bb_move_loop): Factor asserts.
3790         (gloog): Perform sanity checks only for ENABLE_CHECKING.
3791         Do not call calculate_dominance_info and estimate_bb_frequencies.
3792
3793 2008-08-20  Jan Sjodin  <jan.sjodin@amd.com>
3794
3795         * graphite.c (create_loops_mapping, free_loops_mapping,
3796         create_loops_mapping_num, debug_loop_mapping_1,
3797         debug_loop_mapping, graphite_loops_mapping_max_loop_num,
3798         get_loop_mapping_for_num, graphite_loops_mapping_add_child,
3799         graphite_loops_mapping_add_child_num,
3800         graphite_loops_mapping_insert_child,
3801         graphite_loops_mapping_parent, get_loop_mapped_depth_for_num,
3802         get_loop_mapped_depth, split_loop_mapped_depth_for_num,
3803         loop_mapped_depth_split_loop, swap_loop_mapped_depth_for_num,
3804         create_num_from_index, get_num_from_index,
3805         swap_loop_mapped_depth): Removed.
3806         (new_scop): Do not initialize SCOP_LOOPS_MAPPING.
3807         (free_scop): Do not call free_loops_mapping.
3808         (graphite_get_new_iv_stack_index_from_old_iv): Renamed
3809         get_stack_index_from_iv.  Use GBB_LOOPS instead of calling
3810         get_loop_mapped_depth.
3811         (graphite_trans_bb_move_loop): Do not update the loop mapping.
3812         (graphite_trans_bb_strip_mine): Same.
3813         * graphite.h (graphite_loops_mapping, graphite_loop_node): Removed.
3814         (struct scop): Remove field loops_mapping.
3815
3816 2008-08-20  Sebastian Pop  <sebastian.pop@amd.com>
3817             Dwarakanath Rajagopal  <dwarak.rajagopal@amd.com>
3818
3819         * graphite.c (scop_record_loop): Factor out one level of the
3820         condition by early return.
3821         (build_scop_loop_nests): Format following FSF coding style.
3822         (build_scop_dynamic_schedules): Factor out code.
3823         (scopdet_bb_info): Reindent.  Default case should not be reachable.
3824
3825 2008-08-20  Sebastian Pop  <sebastian.pop@amd.com>
3826             Dwarakanath Rajagopal  <dwarak.rajagopal@amd.com>
3827
3828         * graphite.c (loop_affine_expr): Check for DECL_P or struct
3829         assignments that are not handled as simple operands for now.
3830
3831 2008-08-20  Sebastian Pop  <sebastian.pop@amd.com>
3832             Dwarakanath Rajagopal  <dwarak.rajagopal@amd.com>
3833
3834         * graphite.c (build_scop_bbs): Factor up code.
3835
3836 2008-08-20  Sebastian Pop  <sebastian.pop@amd.com>
3837             Dwarakanath Rajagopal  <dwarak.rajagopal@amd.com>
3838
3839         * graphite.c (stmt_simple_for_scop_p): Factor code out
3840         of the loop.
3841         (enum gbb_type): New.  Group all the GBB_* types under it.
3842         (is_loop_exit): Moved...
3843         (end_scop): Enable BB spliting.
3844         * cfgloop.c (is_loop_exit): ...here.  Reimplemented.
3845         * cfgloop.h (is_loop_exit): Declared.
3846
3847 2008-08-20  Sebastian Pop  <sebastian.pop@amd.com>
3848
3849         * doc/invoke.texi: Remove strides from examples containing
3850         DO loops when the strides are equal to 1.
3851
3852 2008-08-20  Harsha Jagasia  <harsha.jagasia@amd.com>
3853             Dwarakanath Rajagopal  <dwarak.rajagopal@amd.com>
3854
3855         * graphite.c (graphite_trans_scop_block): Or the result with
3856         the result from graphite_trans_loop_block.
3857         * testsuite/gcc.dg/graphite/block-1.c: New.
3858         * testsuite/gfortran.dg/graphite/block-1.f90: New.
3859         * testsuite/gfortran.dg/graphite/block-2.f: New.
3860
3861 2008-08-20  Sebastian Pop  <sebastian.pop@amd.com>
3862
3863         * graphite.c (graphite_transform_loops): Call cloog_initialize
3864         and cloog_finalize.
3865
3866 2008-08-20  Sebastian Pop  <sebastian.pop@amd.com>
3867
3868         * tree-data-ref.c) (stmt_simple_memref_p): New.
3869         * tree-data-ref.h (stmt_simple_memref_p): Declared.
3870         * graphite.c (stmt_simple_memref_for_scop_p): Removed.
3871         (is_simple_operand): Call stmt_simple_memref_p.
3872
3873         * testsuite/gcc.dg/graphite/scop-matmult.c: Updated for not
3874         using pointer arithmetic, as this is optimized by PRE and
3875         makes the code too difficult to analyze.
3876
3877         * testsuite/gcc.dg/graphite/scop-18.c: Same.
3878
3879 2008-08-20  Sebastian Pop  <sebastian.pop@amd.com>
3880
3881         * gdbinit.in (pgg): New.
3882
3883 2008-08-15  Tobias Grosser  <grosser@fim.uni-passau.de>
3884
3885         * graphite.c (graphite_trans_loop_block): Fix warning.
3886
3887 2008-08-15  Tobias Grosser  <grosser@fim.uni-passau.de>
3888
3889         * graphite.c (graphite_trans_loop_block): Fix my merge error.
3890
3891 2008-08-15  Tobias Grosser  <grosser@fim.uni-passau.de>
3892
3893         * graphite.c (graphite_trans_bb_block): Remove check for
3894         flag_loop_strip_mine, flag_loop_block, flag_loop_interchange.
3895         Check if loop blocking is profitable for every loop, before applying