OSDN Git Service

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