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