OSDN Git Service

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