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