OSDN Git Service

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