OSDN Git Service

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