OSDN Git Service

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