OSDN Git Service

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