OSDN Git Service

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