OSDN Git Service

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