OSDN Git Service

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