OSDN Git Service

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