OSDN Git Service

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