OSDN Git Service

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