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