OSDN Git Service

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