OSDN Git Service

2009-10-14 Sebastian Pop <sebastian.pop@amd.com>
[pf3gnuchains/gcc-fork.git] / gcc / ChangeLog.graphite
1 2009-10-14  Sebastian Pop  <sebastian.pop@amd.com>
2
3         * gcc.dg/graphite/interchange-11.c: New.
4
5 2009-10-14  Sebastian Pop  <sebastian.pop@amd.com>
6
7         * gcc.dg/graphite/interchange-8.c: Enable loop interchange.
8
9 2009-10-14  Sebastian Pop  <sebastian.pop@amd.com>
10
11         * gcc.dg/graphite/graphite.exp (DEFAULT_CFLAGS_GRAPHITE_BLOCK):
12         Add -fno-loop-strip-mine and -fno-loop-interchange.
13         (DEFAULT_FLAGS_GRAPHITE_INTERCHANGE): Add -fno-loop-block and
14         -fno-loop-strip-mine.
15         * gfortran.dg/graphite/graphite.exp: Same.
16
17 2009-10-14  Sebastian Pop  <sebastian.pop@amd.com>
18
19         * gcc.dg/graphite/graphite.exp (DEFAULT_CFLAGS_GRAPHITE_BLOCK):
20         Renamed DEFAULT_FLAGS_GRAPHITE_BLOCK.
21         (DEFAULT_CFLAGS_GRAPHITE_IDENTITY): Renamed
22         DEFAULT_FLAGS_GRAPHITE_IDENTITY.
23         (DEFAULT_CFLAGS_GRAPHITE_INTERCHANGE): Renamed
24         DEFAULT_FLAGS_GRAPHITE_INTERCHANGE.
25         (DEFAULT_CFLAGS_GRAPHITE_SCOP): Renamed
26         DEFAULT_FLAGS_GRAPHITE_SCOP.
27         (DEFAULT_CFLAGS_RUN_ID): Renamed DEFAULT_FLAGS_RUN_ID.
28         (DEFAULT_CFLAGS_GRAPHITE): Renamed DEFAULT_FLAGS_GRAPHITE.
29
30 2009-10-14  Sebastian Pop  <sebastian.pop@amd.com>
31
32         * graphite-poly.c (pbb_number_of_iterations_at_time): Cleanup comments.
33
34 2009-10-14  Konrad Trifunovic  <konrad.trifunovic@gmail.com>
35             Sebastian Pop  <sebastian.pop@amd.com>
36
37         * graphite-interchange.c (build_linearized_memory_access): Pass an
38         offset as parameter.
39         (memory_stride_in_loop): Include transform scattering in the
40         access functions to be able to querry the strides in the
41         transformed loops.
42         (pbb_interchange_loop_depths): Interchange the psct_dynamic_dim,
43         not the psct_iterator_dim.
44
45 2009-10-14  Sebastian Pop  <sebastian.pop@amd.com>
46
47         * graphite-blocking.c (pbb_do_strip_mine): Removed.
48         (lst_do_strip_mine_loop): New.
49         (lst_do_strip_mine): New.
50         (scop_do_strip_mine): Call lst_do_strip_mine.
51         * graphite-poly.h (lst_add_loop_under_loop): New.
52         (lst_find_first_pbb): New.
53
54 2009-10-14  Sebastian Pop  <sebastian.pop@amd.com>
55
56         * graphite-poly.c (loop_to_lst): Fix LST creation.
57
58 2009-10-14  Tobias Grosser  <grosser@fim.uni-passau.de>
59
60         * testsuite/gcc.dg/graphite/id-15.c: (8 * 8) replaced with
61         sizeof(unsigned long) to make it run on 32bit systems.
62
63 2009-10-14  Tobias Grosser  <grosser@fim.uni-passau.de>
64
65         * testsuite/gcc.dg/graphite/run-id-1.c: Use smaller matrix to not
66         SEGFAULT on 32bit.
67
68 2009-10-14  Ramakrishna Upadrasta <Ramakrishna.Upadrasta@inria.fr>
69
70         * graphite-sese-to-poly.c (write_alias_graph_to_ascii_dimacs): Fix
71         Comment.
72         (write_alias_graph_to_ascii_dot): New.
73         (write_alias_graph_to_ascii_ecc): Ditto.
74         (partition_drs_to_sets): Add testing of optimality of current method
75         which assigns alias numbers according to DFS Comopnent number.  used
76         as heuristic for the upcoming ECC algorithm.
77         (build_scop_drs): Write to file also with the ecc and dot format.
78
79 2009-10-13  Sebastian Pop  <sebastian.pop@amd.com>
80
81         * gfortran.dg/graphite/interchange-1.f: XFail.
82
83 2009-10-13  Sebastian Pop  <sebastian.pop@amd.com>
84
85         * graphite.c (graphite_initialize): Do not handle functions with
86         more than 100 basic blocks.
87
88 2009-10-13  Sebastian Pop  <sebastian.pop@amd.com>
89
90         * graphite-blocking.c (pbb_do_strip_mine): Use
91         PARAM_LOOP_BLOCK_TILE_SIZE.
92
93 2009-10-13  Sebastian Pop  <sebastian.pop@amd.com>
94
95         * graphite-poly.c (dot_lst_1): New.
96         (dot_lst): New.
97         * graphite-poly.h (dot_lst): Declared.
98
99 2009-10-13  Sebastian Pop  <sebastian.pop@amd.com>
100
101         * graphite-dependences.c (dot_deps_stmt_1): New.
102         (dot_deps_stmt): New.
103         * graphite-dependences.h (dot_deps_stmt): Declared.
104
105 2009-10-09  Sebastian Pop  <sebastian.pop@amd.com>
106
107         * graphite-sese-to-poly.c (rewrite_cross_bb_scalar_dependence): Do
108         not replace cross BB scalar dependences ending on PHI nodes.
109         (rewrite_cross_bb_scalar_deps): Filter out GIMPLE_PHI nodes.
110
111 2009-10-09  Sebastian Pop  <sebastian.pop@amd.com>
112
113         * graphite-poly.c (apply_poly_transforms): Implement the high
114         level driver for flag_loop_block.
115         * tree-ssa-loop.c (gate_graphite_transforms): Remove call to sorry for
116         flag_loop_block.
117
118         * gcc.dg/graphite/graphite.exp (DEFAULT_CFLAGS_GRAPHITE_BLOCK): Add
119         -floop-block.
120         * gfortran.dg/graphite/graphite.exp (DEFAULT_CFLAGS_GRAPHITE_BLOCK):
121         Add -floop-block.
122
123 2009-10-09  Sebastian Pop  <sebastian.pop@amd.com>
124
125         * graphite-poly.h (lst_find_pbb): New.
126         (find_lst_loop): New.
127
128 2009-10-09  Sebastian Pop  <sebastian.pop@amd.com>
129
130         * graphite-poly.c (new_scop): Remove init of SCOP_DEP_GRAPH.
131         * graphite-poly.h (struct scop): Remove dep_graph field.
132         (SCOP_DEP_GRAPH): Removed.
133
134 2009-10-09  Sebastian Pop  <sebastian.pop@amd.com>
135
136         * graphite-poly.h (copy_lst): Do full copy of LST.
137
138 2009-10-07  Sebastian Pop  <sebastian.pop@amd.com>
139
140         * graphite-sese-to-poly.c (reduction_phi_p): Call remove_invariant_phi
141         when the loop stride is zero.
142
143         * gcc.dg/graphite/id-16.c: New.
144
145 2009-10-06  Sebastian Pop  <sebastian.pop@amd.com>
146
147         * graphite-dependences.c (reduction_dr_1): New.
148         (reduction_dr_p): New.
149         (graphite_legal_transform_dr): Call reduction_dr_p.
150         (reduction_ddr): Renamed reduction_ddr_p.
151         * graphite-poly.h (same_pdr_p): New.
152         (number_of_write_pdrs): New.
153         * graphite-sese-to-poly.c (nb_data_writes_in_bb): New.
154         (split_reduction_stmt): Do not split reduction statements
155         when there are no writes to memory.
156         (translate_scalar_reduction_to_array_for_stmt): Insert the
157         memory reduction statement just after the scalar reduction statement.
158
159         * gcc.dg/graphite/interchange-10.c: Updated to differ from interchange-4.c.
160         Un-XFAIL-ed.
161         * gcc.dg/graphite/interchange-3.c: Un-XFAIL-ed.
162         * gcc.dg/graphite/interchange-4.c: Un-XFAIL-ed.
163
164 2009-10-06  Sebastian Pop  <sebastian.pop@amd.com>
165
166         * graphite-interchange.c (lst_apply_interchange): New.
167         (lst_interchange_profitable_p): New.
168         (lst_try_interchange_loops): New.
169         (lst_try_interchange): New.
170         (lst_do_interchange): New.
171         (pbb_do_interchange): Removed.
172         (scop_do_interchange): Call lst_do_interchange.
173
174 2009-10-06  Sebastian Pop  <sebastian.pop@amd.com>
175
176         * graphite-poly.c (print_scop): Print SCOP_ORIGINAL_SCHEDULE and
177         SCOP_TRANSFORMED_SCHEDULE.
178         (loop_to_lst): New.
179         (scop_to_lst): New.
180         (print_lst): New.
181         (debug_lst): New.
182         * graphite-poly.h (lst_p): New.
183         (struct lst): New.
184         (LST_LOOP_P): New.
185         (LST_LOOP_FATHER): New.
186         (LST_PBB): New.
187         (LST_SEQ): New.
188         (scop_to_lst): Declared.
189         (print_lst): Declared.
190         (debug_lst): Declared.
191         (new_lst_loop): New.
192         (new_lst_stmt): New.
193         (copy_lst): New.
194         (lst_depth): New.
195         (lst_dewey_number): New.
196         (struct scop): Add original_schedule and transformed_schedule fields.
197         (SCOP_ORIGINAL_SCHEDULE): New.
198         (SCOP_TRANSFORMED_SCHEDULE): New.
199         * graphite-sese-to-poly.c (build_poly_scop): Call scop_to_lst.
200
201 2009-10-05  Sebastian Pop  <sebastian.pop@amd.com>
202
203         * graphite-dependences.c (reduction_ddr): New.
204         (graphite_legal_transform_bb): Call reduction_ddr.
205         * graphite-poly.c (new_poly_bb): Pass a new bool parameter.
206         Initialize PBB_IS_REDUCTION.
207         * graphite-poly.h (struct poly_bb): New bool field is_reduction.
208         (PBB_IS_REDUCTION): New.
209         (new_poly_bb): Update declaration.
210         * graphite-scop-detection.h (build_scop_bbs): Removed.
211         (nb_reductions_in_loop): Removed.
212         * graphite-sese-to-poly.c (try_generate_gimple_bb): Pass a sbitmap
213         parameter for reductions.
214         (try_generate_gimple_bb): Update call to new_poly_bb.
215         (build_scop_bbs_1): Same.
216         (build_scop_bbs): Same.
217         (gsi_for_phi_node): New.
218         (scalar_close_phi_node_p): Remove gcc_assert.
219         (split_reduction_stmt): New.
220         (is_reduction_operation_p): New.
221         (phi_contains_arg): New.
222         (follow_ssa_with_commutative_ops): New.
223         (detect_commutative_reduction_arg): New.
224         (detect_commutative_reduction_assign): New.
225         (follow_inital_value_to_phi): New.
226         (edge_initial_value_for_loop_phi): New.
227         (initial_value_for_loop_phi): New.
228         (detect_commutative_reduction): New.
229         (translate_scalar_reduction_to_array_for_stmt): New.
230         (insert_copyout): New.
231         (insert_copyin): New.
232         (translate_scalar_reduction_to_array): New.
233         (rewrite_commutative_reductions_out_of_ssa_close_phi): New.
234         (rewrite_commutative_reductions_out_of_ssa_loop): New.
235         (rewrite_commutative_reductions_out_of_ssa): New.
236         (build_poly_scop): Call rewrite_commutative_reductions_out_of_ssa.
237         * sese.h (split_region_for_bb): New.
238
239         * gcc.dg/graphite/graphite.exp (DEFAULT_CFLAGS_GRAPHITE_BLOCK): Add -ffast-math.
240         * gcc.dg/graphite/interchange-1.c: Fix format.
241         * gcc.dg/graphite/interchange-10.c: New.
242
243 2009-10-05  Sebastian Pop  <sebastian.pop@amd.com>
244
245         * graphite-sese-to-poly.c (insert_out_of_ssa_copy): Remove
246         buggy assert.
247
248 2009-10-05  Sebastian Pop  <sebastian.pop@amd.com>
249
250         * graphite-sese-to-poly.c (scev_analyzable_p): New.
251         (rewrite_cross_bb_scalar_dependence): New.
252         (rewrite_cross_bb_scalar_deps): New.
253         (rewrite_reductions_out_of_ssa): Use bb_in_sese_p.
254         Call rewrite_cross_bb_scalar_deps.
255
256 2009-10-05  Sebastian Pop  <sebastian.pop@amd.com>
257
258         * graphite-sese-to-poly.c (gsi_for_ssa_name_def): Removed.
259         (insert_out_of_ssa_copy): Directly use gsi_after_labels and
260         gsi_for_stmt.
261
262 2009-10-05  Sebastian Pop  <sebastian.pop@amd.com>
263
264         * graphite-clast-to-gimple.c (build_cloog_prog): Use pbb_index.
265         * graphite-interchange.c (pbb_do_interchange): Same.
266         * graphite-poly.c (print_scattering_function): Same.
267         (debug_pdrs): Same.
268         * graphite-poly.h (pbb_loop): New.
269         * graphite-sese-to-poly.c (create_linear_expr_from_tree): Use pbb_loop.
270
271 2009-09-27  Sebastian Pop  <sebastian.pop@amd.com>
272
273         * graphite-scop-detection.c (limit_scops): Do not build poly_bbs.
274
275 2009-09-27  Sebastian Pop  <sebastian.pop@amd.com>
276
277         * graphite-sese-to-poly.c (partition_drs_to_sets): Drs is not modified,
278         so don't pass a pointer to it.
279         (build_alias_set_for_drs): Same.
280         (build_base_obj_set_for_drs): Same.
281         (build_scop_drs): Same.
282
283 2009-09-26  Li Feng  <nemokingdom@gmail.com>
284
285         * graphite-sese-to-poly.c (build_scop_drs): Disable writing to file
286         the alias graph of data references.
287
288 2009-09-25  Li Feng  <nemokingdom@gmail.com>
289
290         * graphite-sese-to-poly.c (write_alias_graph_to_ascii_dimacs): New.
291         (build_scop_drs): When debugging, write the alias graph to file,
292         otherwise, should be disabled.
293
294 2009-09-17  Sebastian Pop  <sebastian.pop@amd.com>
295
296         * graphite-scop-detection.c (stmt_simple_memref_p): Removed.
297         (is_simple_operand): Remove call to stmt_simple_memref_p.
298         (stmt_simple_for_scop_p): Update call to is_simple_operand.
299
300 2009-09-17  David Edelsohn  <edelsohn@gnu.org>
301
302         * testsuite/gcc.dg/graphite/interchange-mvt.c: New File.
303         * testsuite/gcc.dg/graphite/scop-dsyrk.c: New File.
304         * testsuite/gcc.dg/graphite/scop-dsyr2k.c: New File.
305         * testsuite/gcc.dg/graphite/scop-mvt.c: New File.
306         * testsuite/gcc.dg/graphite/scop-sor.c: New File.
307
308 2009-09-17 Li Feng  <nemokingdom@gmail.com>
309
310         PR middle-end/41118
311         * graphite-dependences.c (poly_drs_may_alias_p): Adjust definition.
312         (pddr_original_scattering): Make sure 2 pdr2 in the same base object set.
313         (graphite_carried_dependence_level_k): Ditto.
314         * graphite-poly.c (new_poly_dr): Add init of PDR_BASE_OBJECT_SET.
315         * graphite-poly.h (struct poly_dr): Add member dr_base_object_set.
316         (new_poly_dr): Adjust declaration.
317         * graphite-sese-to-poly.c (free_data_refs_aux): New.
318         (free_gimple_bb): Added free_data_refs_aux.
319         (build_poly_dr): Add dr_base_object_set.
320         (partition_drs_to_sets): New.
321         (dr_same_base_object_p): New.
322         (build_alias_set_for_drs): New.
323         (build_base_object_set_for_drs): New.
324         (build_scop_drs): Add build_base_obj_set_for_drs.
325         * graphite-sese-to-poly.h: Added #define for alias set number index and
326         base object set index.
327         * libgomp/testsuite/libgomp.graphite/force-parallel-6.c: Refine tests.
328         * libgomp/testsuite/libgomp.graphite/pr4118.c: New.
329
330 2009-09-16  Alexander Monakov  <amonakov@ispras.ru>
331
332         * graphite-sese-to-poly.c (pdr_add_data_dimensions): Add bounds only
333         for ARRAY_REFs.  Use array_ref_{low,up}_bound to determine bounds.
334
335 2009-09-14  Sebastian Pop  <sebastian.pop@amd.com>
336
337         * graphite-sese-to-poly.c (struct irp_data): Removed.
338         (idx_record_params): Removed.
339         (find_params_in_bb): Scan for parameters the access functions; don't
340         parse the tree representation.
341
342 2009-09-14  Sebastian Pop  <sebastian.pop@amd.com>
343
344         * tree-ssa-loop.c (gate_graphite_transforms): Disable Graphite
345         passes at -O1 and below.
346
347 2009-09-14  Sebastian Pop  <sebastian.pop@amd.com>
348
349         * graphite-blocking.c: Fix order of includes: tree-chrec.h, then
350         tree-scalar-evolution.h, and then tree-data-ref.h.
351         * graphite-clast-to-gimple.c: Same.
352         * graphite-dependences.c: Same.
353         * graphite-interchange.c: Same.
354         * graphite-poly.c: Same.
355         * graphite-scop-detection.c: Same.
356         * graphite-sese-to-poly.c: Same.
357         * graphite.c: Same.
358         * lambda-code.c: Same.
359         * matrix-reorg.c: Same.
360         * tree-data-ref.c: Same.
361         * tree-if-conv.c: Same.
362         * tree-loop-distribu: Same.: Same.
363         * tree-loop-linear.c: Same.
364         * tree-parloops.c: Same.
365         * tree-predcom.c: Same.
366         * tree-vect-patterns.c: Same.
367
368 2009-09-02  Sebastian Pop  <sebastian.pop@amd.com>
369
370         Partially revert the previous patch, except the following.
371         * tree-scalar-evolution.c (instantiate_scev_not): Adapted to pass
372         as parameters the operands of the not expression.
373
374 2009-09-01  Sebastian Pop  <sebastian.pop@amd.com>
375
376         * tree-scalar-evolution.c (instantiate_scev_assign): New.
377         Do not call analyze_scalar_evolution on assignments.
378         (instantiate_scev_phi): Call analyze_scalar_evolution.
379         (instantiate_scev_name): Call instantiate_scev_assign and
380         instantiate_scev_phi.
381         (instantiate_scev_not): Adapted to pass as parameters the operands
382         of the not expression.
383
384 2009-09-01  Sebastian Pop  <sebastian.pop@amd.com>
385
386         * tree-scalar-evolution.c (instantiate_scev_binary): Adapted
387         to pass as parameters the operands of the binary expression.
388
389 2009-09-01  Sebastian Pop  <sebastian.pop@amd.com>
390
391         * tree-scalar-evolution.c (instantiate_scev_bitnot): Renamed
392         instantiate_scev_not.  Handle NEGATE_EXPR.
393         (instantiate_scev_r): Handle NEGATE_EXPR.
394
395 2009-09-01  Sebastian Pop  <sebastian.pop@amd.com>
396
397         * tree-scalar-evolution.c (instantiate_scev_1): Renamed
398         instantiate_scev_r.
399         (instantiate_scev_r): Move code in instantiate_scev_2
400         and instantiate_scev_1.
401
402 2009-09-01  Sebastian Pop  <sebastian.pop@amd.com>
403
404         * tree-scalar-evolution.c (instantiate_scev_3): New.
405         (instantiate_scev_1): Move code in instantiate_scev_3.
406
407 2009-09-01  Sebastian Pop  <sebastian.pop@amd.com>
408
409         * tree-scalar-evolution.c (instantiate_scev_poly): New.
410         (instantiate_scev_1): Move code in instantiate_scev_poly.
411
412 2009-09-01  Sebastian Pop  <sebastian.pop@amd.com>
413
414         * tree-scalar-evolution.c (instantiate_scev_bitnot): New.
415         (instantiate_scev_1): Move code in instantiate_scev_bitnot.
416
417 2009-09-01  Sebastian Pop  <sebastian.pop@amd.com>
418
419         * tree-scalar-evolution.c (instantiate_scev_convert): New.
420         (instantiate_scev_1): Move code in instantiate_scev_convert.
421
422 2009-09-01  Sebastian Pop  <sebastian.pop@amd.com>
423
424         * tree-scalar-evolution.c (instantiate_scev_binary): New.
425         (instantiate_scev_1): Move code in instantiate_scev_binary.
426
427 2009-09-01  Sebastian Pop  <sebastian.pop@amd.com>
428
429         * tree-scalar-evolution.c (instantiate_scev_name): New.
430         (instantiate_scev_1): Move code in instantiate_scev_name.
431
432 2009-08-28  Sebastian Pop  <sebastian.pop@amd.com>
433
434         * Merge from mainline (150992:151171).
435
436 2009-08-25  Sebastian Pop  <sebastian.pop@amd.com>
437
438         * graphite-dependences.c (graphite_legal_transform_bb): Call
439         pbb_remove_duplicate_pdrs.
440         * graphite-poly.c (can_collapse_pdr): Removed.
441         (pdr_find_duplicate): Removed.
442         (can_collapse_pdrs): New.
443         (pbb_remove_duplicate_pdrs): New.
444         (new_poly_dr): Do not look for duplicates.
445         * graphite-poly.h (struct poly_bb): New field pdr_duplicates_removed.
446         (PBB_PDR_DUPLICATES_REMOVED): New.
447         (pbb_remove_duplicate_pdrs): Declared.
448
449 2009-08-25  Sebastian Pop  <sebastian.pop@amd.com>
450
451         * graphite-interchange.c (pbb_interchange_profitable_p): Adjust
452         the strides by multiplying by PDR_NB_REFS.
453         * graphite-poly.c (can_collapse_pdr): New.
454         (pdr_find_duplicate): New.
455         (new_poly_dr): Call pdr_find_duplicate.  Collapse duplicate PDRs.
456         Initialize PDR_NB_REFS.
457         * graphite-poly.h (struct poly_dr): Add field nb_refs.
458         (PDR_NB_REFS): New.
459         (new_poly_dr): Number of subscripts is a graphite_dim_t.
460
461 2009-08-25  Sebastian Pop  <sebastian.pop@amd.com>
462
463         Revert one of the previous commits:
464         * graphite-dependences.c (graphite_legal_transform_bb): Avoid
465         the computation of symmetric data dependence relations.
466         (dependency_between_pbbs_p): Same.
467
468 2009-08-25  Sebastian Pop  <sebastian.pop@amd.com>
469
470         PR middle-end/40965
471         * graphite-poly.c (apply_poly_transforms): Remove legality test before
472         any transform.
473
474 2009-08-25  Sebastian Pop  <sebastian.pop@amd.com>
475
476         * graphite-dependences.c (pddr_original_scattering): Return NULL
477         for read-read dependence relations.
478         * graphite-poly.h (enum poly_dr_type): Fix comment.
479         (pdr_read_p): New.
480         (pdr_write_p): New.
481         (pdr_may_write_p): New.
482
483 2009-08-25  Sebastian Pop  <sebastian.pop@amd.com>
484
485         * graphite-poly.h (enum POLY_DR_TYPE): Renamed poly_dr_type.
486         (struct poly_dr): Same.
487         (new_poly_dr): Same.
488         * graphite-poly.c (new_poly_dr): Same.
489
490 2009-08-25  Konrad Trifunovic  <konrad.trifunovic@gmail.com>
491             Sebastian Pop  <sebastian.pop@amd.com>
492
493         * graphite-blocking.c (pbb_strip_mine_loop_depth): Renamed
494         pbb_strip_mine_time_depth.  Changed the implementation so that
495         transformation is expressed as a transformation on
496         time (scatttering) dimensions.  Also, ensures that the 2d+1
497         scheduling format is preserved.
498         (pbb_strip_mine_profitable_p): Profitability is based on the
499         iteration number of a given time (scattering) dimension,
500         and not on a original loop depth dimension.
501         (pbb_strip_mine): Call pbb_number_of_iterations_at_time.
502         (pbb_do_strip_mine): Call psct_dynamic_dim.
503         * graphite-poly.c (pbb_number_of_iterations_at_time): New.
504         * graphite-poly.h (pbb_number_of_iterations_at_time): Declared.
505         (pbb_nb_dynamic_scattering_transform): New.
506         (psct_dynamic_dim): New.
507
508 2009-08-25  Konrad Trifunovic  <konrad.trifunovic@gmail.com>
509
510         * graphite-ppl.c (ppl_max_for_le): Renamed ppl_max_for_le_pointset.
511         * graphite-ppl.h (ppl_max_for_le): Renamed ppl_max_for_le_pointset.
512         * graphite-poly.c (pbb_number_of_iterations): Rename ppl_max_for_le.
513         * graphite-interchange.c (build_linearized_memory_access): Same.
514         (memory_stride_in_loop): Same.
515
516 2009-08-25  Sebastian Pop  <sebastian.pop@amd.com>
517
518         * graphite-dependences.c (pddr_original_scattering): New.
519         (graphite_legal_transform_dr): Call pddr_original_scattering.
520         (dot_deps_1): New.
521         (dot_deps): New.
522         * graphite-dependences.h (dot_deps): Declared.
523         * graphite-poly.c (new_poly_dr): Initialize PDR_ID.
524         (print_pdr): Print PDR_ID.
525         * graphite-poly.h (struct poly_dr): Add field id.
526         (PDR_ID): New.
527         (pbb_index): New.
528         * graphite-scop-detection.c (dot_all_scops_1): Cleanup comment.
529
530 2009-08-22  Sebastian Pop  <sebastian.pop@amd.com>
531
532         * graphite-dependences.c (graphite_carried_dependence_level_k): Do
533         not delete the original dependence relation.
534
535 2009-08-21  Sebastian Pop  <sebastian.pop@amd.com>
536
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-21  Sebastian Pop  <sebastian.pop@amd.com>
542
543         * graphite-dependences.c (new_poly_dr_pair): Renamed new_poly_ddr.
544         (eq_poly_dr_pair_p): Renamed eq_poly_ddr_p.
545         (hash_poly_dr_pair_p): Renamed hash_poly_ddr_p.
546         (free_poly_ddr): New.
547         (pddr_is_empty): New.
548         (dependence_polyhedron_1): Now returns a poly_ddr_p.
549         (dependence_polyhedron): Same.  Remove useless gcc_assert.
550         Remove fprintfs.
551         (graphite_legal_transform_dr): Call pddr_is_empty and free_poly_ddr.
552         (graphite_carried_dependence_level_k): Call pddr_is_empty.
553         * graphite-dependences.h (enum poly_dependence_kind): New.
554         (poly_dr_pair): Renamed poly_ddr.  Added a field kind.
555         (PDRP_SOURCE): Renamed PDDR_SOURCE.
556         (PDRP_SINK): Renamed PDDR_SINK.
557         (PDRP_DDP): Renamed PDDR_DDP.
558         (PDDR_KIND): New.
559         (free_poly_ddr): Declared.
560         * graphite-poly.c (new_scop): Use the new hash function names.
561         * graphite-poly.h (struct scop): Renamed field original_pdr_pairs
562         into original_pddrs.
563         (SCOP_ORIGINAL_PDR_PAIRS): Renamed SCOP_ORIGINAL_PDDRS.
564
565 2009-08-21  Sebastian Pop  <sebastian.pop@amd.com>
566
567         * Merge from mainline (150764:150992).
568
569 2009-08-18  Sebastian Pop  <sebastian.pop@amd.com>
570
571         * cfgloopmanip.c (create_empty_loop_on_edge): Generate upper
572         bounds with LT_EXPR to make niter analysis more precise on code
573         generated by Graphite.
574
575 2009-08-18  Sebastian Pop  <sebastian.pop@amd.com>
576
577         * graphite-dependences.c (graphite_legal_transform_dr): Fix formatting.
578         (graphite_legal_transform_bb): Same.
579         (poly_drs_may_alias_p): Same.
580
581 2009-08-15  Sebastian Pop  <sebastian.pop@amd.com>
582
583         PR middle-end/40981
584         * graphite-ppl.c (ppl_max_for_le): Correct the use of
585         ppl_Pointset_Powerset_C_Polyhedron_maximize.
586
587 2009-08-13  Sebastian Pop  <sebastian.pop@amd.com>
588
589         * graphite-poly.c (print_pbb): Print PBB index.
590
591 2009-08-13  Sebastian Pop  <sebastian.pop@amd.com>
592
593         * Merge from mainline (r150672:150764).
594
595 2009-08-13  Sebastian Pop  <sebastian.pop@amd.com>
596
597         * graphite-interchange.c (ppl_max_for_le): Moved...
598         * graphite-poly.c (pbb_number_of_iterations): Call ppl_max_for_le.
599         * graphite-ppl.c (ppl_max_for_le): ... here.
600         * graphite-ppl.h (ppl_max_for_le): Declared.
601
602 2009-08-12  Sebastian Pop  <sebastian.pop@amd.com>
603
604         * Merge from mainline (r150372:150672).
605
606 2009-08-11  Sebastian Pop  <sebastian.pop@amd.com>
607
608         PR middle-end/40980
609         * sese.c (convert_for_phi_arg): New.
610         (add_guard_exit_phis): Use convert_for_phi_arg.
611
612         * testsuite/gfortran.dg/graphite/id-17.f: New.
613
614 2009-08-11  Sebastian Pop  <sebastian.pop@amd.com>
615
616         * graphite-sese-to-poly.c (pdr_add_data_dimensions): Dont add
617         unknown subscript upper bounds.
618
619         * testsuite/gcc.dg/graphite/interchange-6.c: Un-XFAIL.
620
621 2009-08-11  Sebastian Pop  <sebastian.pop@amd.com>
622             Pranav Garg  <pranav.garg2107@gmail.com>
623
624         * graphite-interchange.c (gather_access_strides): Removed.
625         (ppl_max_for_le): New.
626         (build_linearized_memory_access): New.
627         (memory_stride_in_loop): New.
628         (pbb_interchange_profitable_p): Reimplemented.
629         * graphite-ppl.h (ppl_new_id_map): New.
630         (ppl_interchange): New.
631
632         * testsuite/gcc.dg/graphite/interchange-6.c: XFAILed.
633
634 2009-08-11  Sebastian Pop  <sebastian.pop@amd.com>
635
636         * graphite-interchange.c (compute_subscript): Removed.
637         (compute_array_size_cstr): Removed.
638         (compute_array_size_poly): Removed.
639         (compute_array_size): Removed.
640         (gather_access_strides_poly): Removed.
641         (gather_access_strides): Empty.
642
643 2009-08-11  Sebastian Pop  <sebastian.pop@amd.com>
644
645         * graphite-dependences.c (dependence_polyhedron_1): Replace
646         pdr_nb_subscripts with PDR_NB_SUBSCRIPTS.
647         (graphite_legal_transform_dr): Same.
648         (graphite_carried_dependence_level_k): Same.
649         * graphite-poly.c (new_poly_dr): Add a parameter nb_subscripts.
650         Initialize PDR_NB_SUBSCRIPTS.
651         (print_pdr_access_layout): Replace pdr_nb_subscripts with
652         PDR_NB_SUBSCRIPTS.
653         * graphite-poly.h (struct poly_dr): Add nb_subscripts field.
654         (PDR_NB_SUBSCRIPTS): New.
655         (pdr_nb_subscripts): Removed.
656         (pdr_dim): Simplified.
657         * graphite-sese-to-poly.c (build_poly_dr): Replace pdr_nb_subscripts
658         with PDR_NB_SUBSCRIPTS.
659
660 2009-08-11  Sebastian Pop  <sebastian.pop@amd.com>
661
662         * graphite-interchange.c (compute_array_size): Remove use of
663         PDR_DATA_CONTAINER.
664         * graphite-poly.c (new_poly_dr): Remove argument data_container.
665         Do not initialize PDR_DATA_CONTAINER.
666         (print_pdr): Do not print PDR_DATA_CONTAINER.
667         * graphite-poly.h (struct poly_dr): Remove data_container field.
668         (PDR_DATA_CONTAINER): Removed.
669         * graphite-sese-to-poly.c (pdr_add_data_dimensions): Remove use of
670         PDR_DATA_CONTAINER.
671         (build_poly_dr): Same.
672
673 2009-08-11  Sebastian Pop  <sebastian.pop@amd.com>
674
675         * testsuite/gcc.dg/graphite/interchange-9.c: New.
676
677 2009-08-05  Konrad Trifunovic  <konrad.trifunovic@gmail.com>
678             Sebastian Pop  <sebastian.pop@amd.com>
679
680         * graphite-dependences.c (graphite_legal_transform_dr): Work on a
681         copy of the dependence polyhedron.  Free the temporary objects.
682         (graphite_carried_dependence_level_k): Free unused objects before
683         returning.
684
685         * testsuite/gcc.dg/graphite/interchange-1.c: XFAILed.
686         * testsuite/gcc.dg/graphite/interchange-2.c: XFAILed.
687         * testsuite/gcc.dg/graphite/interchange-3.c: XFAILed.
688         * testsuite/gcc.dg/graphite/interchange-4.c: XFAILed.
689         * testsuite/gcc.dg/graphite/interchange-7.c: XFAILed.
690
691 2009-08-05  Sebastian Pop  <sebastian.pop@amd.com>
692
693         * graphite-blocking.c (scop_do_strip_mine): Call store_scattering.
694         Early return without analyzing the data dependences if no
695         transform has been done.  Call restore_scattering if the transform
696         is not legal.
697         (graphite-interchange.c): Same.
698         * graphite-poly.c (print_scattering_function): Test for PBB_TRANSFORMED.
699         (graphite_read_transforms): Initialize PBB_TRANSFORMED.
700         (apply_poly_transforms): Do not gcc_assert that
701         the transform is legal.
702         (new_poly_bb): Initialize PBB_TRANSFORMED, PBB_SAVED, and PBB_ORIGINAL.
703         Do not initialize PBB_NB_SCATTERING_TRANSFORM, PBB_NB_LOCAL_VARIABLES,
704         PBB_TRANSFORMED_SCATTERING, and PBB_ORIGINAL_SCATTERING.
705         (free_poly_dr): Free PBB_TRANSFORMED, PBB_SAVED, and PBB_ORIGINAL.
706         * graphite-poly.h (struct poly_scattering): New.
707         (struct poly_bb): Add original, transformed, and saved fields.
708         Remove transformed_scattering, original_scattering, nb_local_variables,
709         and nb_scattering_transform fields.
710         (PBB_ORIGINAL, PBB_TRANSFORMED, PBB_SAVED): New.
711         (poly_scattering_new): New.
712         (poly_scattering_free): New.
713         (poly_scattering_copy): New.
714         (store_scattering_pbb): New.
715         (store_scattering): New.
716         (restore_scattering_pbb): New.
717         (restore_scattering): New.
718         * graphite-sese-to-poly.c (build_pbb_scattering_polyhedrons):
719         Initialize PBB_TRANSFORMED and PBB_ORIGINAL.
720
721 2009-08-05  Sebastian Pop  <sebastian.pop@amd.com>
722
723         * graphite-poly.c (print_pbb): Add parentheses in the pretty print.
724         (print_scop): Same.
725
726 2009-08-05  Sebastian Pop  <sebastian.pop@amd.com>
727
728         * Makefile.in (graphite.o): Depends on PREDICT_H.
729         * graphite.c: Include predict.h.
730         (graphite_finalize): Call tree_estimate_probability.
731         * predict.c (predict_loops): Do not call scev_initialize and
732         scev_finalize.
733         (tree_estimate_probability_bb): New.
734         (tree_estimate_probability): Do not initialize loops: move that
735         code to the driver.  Call tree_estimate_probability_bb.
736         (tree_estimate_probability_driver): New.
737         (pass_profile): Use tree_estimate_probability_driver.
738         * predict.h (tree_estimate_probability): Declared.
739
740 2009-08-05  Sebastian Pop  <sebastian.pop@amd.com>
741
742         * graphite-clast-to-gimple.c (gloog): Add time to TV_GRAPHITE_CODE_GEN.
743         * graphite-dependences.c (graphite_legal_transform): Add time to
744         TV_GRAPHITE_DATA_DEPS.
745         (dependency_between_pbbs_p): Same.
746         * timevar.def (TV_GRAPHITE_DATA_DEPS, TV_GRAPHITE_CODE_GEN): New.
747
748 2009-08-03  Sebastian Pop  <sebastian.pop@amd.com>
749
750         * Merge from mainline (r149952:150372).
751
752 2009-07-28  Sebastian Pop  <sebastian.pop@amd.com>
753
754         * ChangeLog.graphite: Fix indenting, white spaces and 80 columns.
755         * graphite-blocking.c: Same.
756         * graphite-clast-to-gimple.c: Same.
757         * graphite-dependences.c: Same.
758         * graphite-poly.c: Same.
759         * graphite-poly.h: Same.
760         * graphite-ppl.c: Same.
761         * graphite-scop-detection.c: Same.
762         * graphite-sese-to-poly.c: Same.
763         * graphite.c: Same.
764
765 2009-07-28  Sebastian Pop  <sebastian.pop@amd.com>
766
767         * graphite-sese-to-poly.c (loop_entry_phi_arg): New.
768         (remove_simple_copy_phi): New.
769         (remove_invariant_phi): New.
770         (simple_copy_phi_p): New.
771         (reduction_phi_p): New.
772         (gsi_for_ssa_name_def): New.
773         (insert_out_of_ssa_copy): New.
774         (insert_out_of_ssa_copy_on_edge): New.
775         (create_zero_dim_array): New.
776         (scalar_close_phi_node_p): New.
777         (rewrite_close_phi_out_of_ssa): New.
778         (rewrite_phi_out_of_ssa): New.
779         (rewrite_reductions_out_of_ssa): New.
780         (build_poly_scop): Call rewrite_reductions_out_of_ssa.
781
782         * testsuite/gcc.dg/graphite/id-11.c: New.
783         * testsuite/gcc.dg/graphite/id-15.c: New.
784         * testsuite/gcc.dg/graphite/interchange-1.c: Un-XFAIL.
785         * testsuite/gcc.dg/graphite/interchange-2.c: Un-XFAIL.
786         * testsuite/gcc.dg/graphite/interchange-3.c: Un-XFAIL.
787         * testsuite/gcc.dg/graphite/interchange-4.c: Un-XFAIL.
788         * testsuite/gcc.dg/graphite/interchange-7.c: Un-XFAIL.
789         * testsuite/gcc.dg/graphite/scop-matmult.c: Un-XFAIL.
790         * testsuite/gfortran.dg/graphite/id-13.f: New.
791         * testsuite/gfortran.dg/graphite/id-5.f: New.
792
793 2009-07-28  Sebastian Pop  <sebastian.pop@amd.com>
794
795         * graphite-clast-to-gimple.c (graphite_loop_normal_form): Do not
796         check that nb_reductions_in_loop is zero.
797         * graphite-scop-detection.c (harmful_stmt_in_bb): Don't filter out
798         reduction phi nodes.
799         (nb_reductions_in_loop): Removed.
800         (graphite_can_represent_loop): Do not call nb_reductions_in_loop.
801         * graphite-sese-to-poly.c (phi_node_is_iv): Removed.
802         (bb_contains_non_iv_scalar_phi_nodes): Removed.
803         (scop_contains_non_iv_scalar_phi_nodes): Removed.
804         (build_poly_scop): Do not call scop_contains_non_iv_scalar_phi_nodes.
805
806 2009-07-28  Sebastian Pop  <sebastian.pop@amd.com>
807
808         * graphite-clast-to-gimple.c (build_cloog_prog): Do not code generate
809         statements that have an empty iteration domain.
810         * testsuite/gfortran.dg/graphite/id-16.f: New.
811
812 2009-07-28  Sebastian Pop  <sebastian.pop@amd.com>
813
814         * tree-scalar-evolution.c (instantiate_scev_1): Return
815         chrec_dont_know when the result is not above instantiate_below.
816         * graphite-scop-detection.c (scopdet_basic_block_info): Fix formatting.
817         * graphite-sese-to-poly.c (create_linear_expr_from_tree): Assert that
818         the tree has a known scalar evolution.
819         * testsuite/gfortran.dg/graphite/id-14.f: New.
820         * testsuite/gfortran.dg/graphite/id-15.f: New.
821
822 2009-07-28  Sebastian Pop  <sebastian.pop@amd.com>
823
824         * sese.c (rename_variables_in_stmt): Pass in an extra parameter
825         insert_gsi.
826         (rename_variables): Keep inserting renames after the ones already
827         inserted.
828
829 2009-07-28  Sebastian Pop  <sebastian.pop@amd.com>
830
831         * graphite-sese-to-poly.c (compare_bb_depths): New.
832         (graphite_sort_dominated_info): New.
833         (build_scop_bbs_1): Call graphite_sort_dominated_info.
834         (build_scop_scattering): Fix comment.
835
836 2009-07-28  Sebastian Pop  <sebastian.pop@amd.com>
837
838         * graphite.c (graphite_finalize): Call print_loops instead of
839         dump_function_to_file.
840         * testsuite/gcc.dg/graphite/graphite.exp: Fix formatting.
841         * testsuite/gcc.dg/graphite/pr35356-1.c: New.  Look for the number of
842         loops generated in the graphite output file.
843         * testsuite/gcc.dg/graphite/pr35356-2.c: New.
844         * testsuite/gcc.dg/graphite/pr35356-3.c: New.  XFAILed for now.
845         * testsuite/gfortran.dg/graphite/id-12.f: New.
846
847 2009-07-24  Li Feng  <nemokingdom@gmail.com>
848
849         * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-8.c:
850         Remove 2 XFAIL.
851
852 2009-07-24  Li Feng  <nemokingdom@gmail.com>
853             Tobias Grosser  <grosser@fim.uni-passau.de>
854
855         * graphite-sese-to-poly.c (pdr_add_alias_set): Use data reference's
856         alias set number build alias in ACCESSES polyhedron.
857         (build_alias_set_for_drs): New.
858         (build_pbb_drs): Added build_alias_set_for_drs.
859         * graphite-dependences.c (poly_drs_may_alias_p): New.
860         (graphite_carried_dependence_level_k): Check alias information
861         before building polyhedron.
862
863 2009-07-24  Tobias Grosser  <grosser@fim.uni-passau.de>
864
865         * Makefile.in (lambda-code.o): Fix formatting.
866
867 2009-07-24  Tobias Grosser  <grosser@fim.uni-passau.de>
868
869         * Merge from mainline (r149350-149952)
870
871 2009-07-18  Tobias Grosser  <grosser@fim.uni-passau.de>
872
873         * graphite-poly.c (apply_poly_transforms): Move strip_mine
874         before interchange to prepare for loop blocking.
875
876 2009-07-18  Tobias Grosser  <grosser@fim.uni-passau.de>
877
878         * graphite-poly.c (apply_poly_transforms): Add checks after every
879         transformation.
880         * graphite-sese-to-poly.c (build_poly_scop): Remove check, as already
881         done in apply_poly_transforms.
882
883 2009-07-17  Konrad Trifunovic  <konrad.trifunovic@gmail.com>
884
885         * graphite-dependences.c (build_lexicographically_gt_constraint):
886         Replace RES parameter with *RES.
887         (dependence_polyhedron_1): Pass an address of the parameter RES
888         instead of value of RES.
889
890 2009-07-16  Sebastian Pop  <sebastian.pop@amd.com>
891
892         * graphite.c (graphite_finalize): Fix comment.
893         (graphite_transform_loops): Reset scev info after code generation
894         of each scop.
895
896 2009-07-16  Sebastian Pop  <sebastian.pop@amd.com>
897
898         * graphite.c (graphite_finalize): Call scev_reset.
899
900 2009-07-16  Sebastian Pop  <sebastian.pop@amd.com>
901
902         * graphite-clast-to-gimple.c (compute_cloog_iv_types): Do not create
903         GBB_CLOOG_IV_TYPES hash table twice.
904         * graphite-sese-to-poly.c (free_gimple_bb): Call free_data_refs.
905         (add_condition_to_domain): Clear GMP values.
906
907 2009-07-16  Sebastian Pop  <sebastian.pop@amd.com>
908
909         * graphite-dependences.c: Fix formatting.
910         * graphite-poly.c (free_poly_dr): Also free PDR_DATA_CONTAINER.
911         (pbb_number_of_iterations): Free ppl_Linear_Expression.
912         * graphite-sese-to-poly.c: Fix formatting.
913         * graphite.c (graphite_transform_loops): Create the hash table
914         after the early return.
915
916 2009-07-16  Sebastian Pop  <sebastian.pop@amd.com>
917
918         * testsuite/gcc.dg/graphite/id-14.c: New.
919         * testsuite/gcc.dg/graphite/pr40157.c: New.
920         * testsuite/gfortran.dg/graphite/id-11.f: New.
921
922 2009-07-16  Sebastian Pop  <sebastian.pop@amd.com>
923
924         * graphite-sese-to-poly.c (nb_pbbs_in_loops): New.
925         (build_poly_scop): Return false when there are no pbbs within
926         loops to avoid to pass to cloog scops with no loops.
927
928 2009-07-16  Sebastian Pop  <sebastian.pop@amd.com>
929
930         * graphite-sese-to-poly.c (build_pbb_scattering_polyhedrons): Avoid
931         useless test "i % 2".
932         (build_pbb_scattering_polyhedrons): Fix formatting.
933         (build_poly_dr): Same.
934         * graphite.c (graphite_transform_loops): Restructure.
935
936 2009-07-14  Razya Ladelsky  <razya@il.ibm.com>
937
938         * tree-ssa-loop-manip.c (rewrite_phi_with_iv): Remove
939         reduction_list parameter.
940         (rewrite_all_phi_nodes_with_iv): Same.
941         (canonicalize_loop_ivs): Same.
942         * tree-parloops.c (struct brli): Removed.
943         (build_reduction_list_info): Removed.
944         (build_new_reduction): New.
945         (analyze_reduction_list): Removed.
946         (gather_scalar_reductions): Find reductions instead of phi
947         nodes that can't be canonicalized.
948         (try_create_reduction_list): Remove reduction_list parameter.
949         (gen_parallel_loop): Same.
950         (parallelize_loops): Remove analyze_reductions variable,
951         initialization and free.
952         Change reduction_list htab initialization to reduction_info
953         elements instead of ssa names.
954         Call try_create_reduction_list and gen_parallel_loop without
955         analyzed_reduction argument.
956         * graphite-clast-to-gimple (graphite_loop_normal_form): Call
957         canonicalize_loop_ivs with one less argument.
958         * tree-flow.h (canonicalize_loop_ivs): Remove one argument.
959
960 2009-07-14  Konrad Trifunovic <konrad.trifunovic@gmail.com>
961
962         * graphite-dependences.c (new_poly_dr_pair): New.
963         (dependence_polyhedron): Renamed into dependence_polyhedron_1.
964         (new_poly_dr_pair): New.
965         (eq_poly_dr_pair_p): New.
966         (hash_poly_dr_pair_p): New.
967         * graphite-dependences.h (struct poly_dr_pair): New.
968         (eq_poly_dr_pair_p): Declared.
969         (hash_poly_dr_pair_p): Declared.
970         * graphite-poly.c (new_scop): Initialize SCOP_ORIGINAL_PDR_PAIRS.
971         (free_scop): Free SCOP_ORIGINAL_PDR_PAIRS.
972         * graphite-poly.h (struct scop): Add original_pdr_pairs field.
973         * Makefile.in (graphite-poly.o): Add dependence on
974         graphite-dependences.h.
975
976 2009-07-14  Sebastian Pop  <sebastian.pop@amd.com>
977
978         * graphite-scop-detection.c (graphite_can_represent_scev): Do not let
979         polynomials of degree > 1 pass to Graphite.
980         * tree-chrec.c (scev_is_linear_expression): Call
981         evolution_function_is_affine_multivariate_p.
982         * testsuite/gfortran.dg/graphite/id-10.f90: New.
983
984 2009-07-14  Sebastian Pop  <sebastian.pop@amd.com>
985
986         * tree-scalar-evolution.c (compute_overall_effect_of_inner_loop):
987         Instantiate scevs varying in outer loops.
988         * testsuite/gfortran.dg/graphite/id-9.f: Correct testcase.
989
990 2009-07-14  Sebastian Pop  <sebastian.pop@amd.com>
991
992         * graphite-sese-to-poly.c (build_loop_iteration_domains): Do not insert
993         redundant constraint.
994
995 2009-07-14  Sebastian Pop  <sebastian.pop@amd.com>
996
997         * testsuite/gcc.dg/graphite/graphite.exp: Fix comments.
998         * testsuite/gfortran.dg/graphite/graphite.exp: Trigger actions
999         based on the file names as in the C testsuite.
1000         * testsuite/gfortran.dg/graphite/block-1.f90: Fix patterns.
1001         * testsuite/gfortran.dg/graphite/block-2.f: Same.
1002         * testsuite/gfortran.dg/graphite/block-3.f90: Same.
1003         * testsuite/gfortran.dg/graphite/block-4.f90: Same.
1004         * testsuite/gfortran.dg/graphite/id-1.f90: Same.
1005         * testsuite/gfortran.dg/graphite/id-2.f90: Same.
1006         * testsuite/gfortran.dg/graphite/id-3.f90: Same.
1007         * testsuite/gfortran.dg/graphite/id-4.f90: Same.
1008         * testsuite/gfortran.dg/graphite/id-6.f: Same.
1009         * testsuite/gfortran.dg/graphite/id-9.f: Same.
1010         * testsuite/gfortran.dg/graphite/interchange-1.f: Same.
1011         * testsuite/gfortran.dg/graphite/interchange-2.f: Same.
1012         * testsuite/gfortran.dg/graphite/scop-1.f: Same.
1013
1014 2009-07-14  Sebastian Pop  <sebastian.pop@amd.com>
1015
1016         * sese.c (expand_scalar_variables_call): New.
1017         (expand_scalar_variables_ssa_name): Handle calls in expander.
1018
1019 2009-07-13  Sebastian Pop  <sebastian.pop@amd.com>
1020
1021         * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-6.c:
1022         Expect to see the pattern twice.
1023         * testsuite/gcc.dg/graphite/interchange-0.c: Un-XFAIL.
1024         * testsuite/gcc.dg/graphite/interchange-5.c: Same.
1025         * testsuite/gcc.dg/graphite/interchange-6.c: Same.
1026
1027 2009-07-13  Sebastian Pop  <sebastian.pop@amd.com>
1028
1029         * testsuite/gcc.dg/graphite/id-10.c: New.
1030         * testsuite/gcc.dg/graphite/id-12.c: New.
1031         * testsuite/gfortran.dg/graphite/id-7.f: New.
1032         * testsuite/gfortran.dg/graphite/id-8.f: New.
1033
1034 2009-07-13  Sebastian Pop  <sebastian.pop@amd.com>
1035
1036         * graphite-sese-to-poly.c (pdr_add_data_dimensions): Fix division by
1037         zero.
1038
1039 2009-07-13  Sebastian Pop  <sebastian.pop@amd.com>
1040
1041         * sese.c (rename_variables_in_stmt): Call fold_convert during renaming.
1042
1043 2009-07-13  Sebastian Pop  <sebastian.pop@amd.com>
1044
1045         * sese.c (expand_scalar_variables_stmt): Avoid unnecessary expansion.
1046
1047 2009-07-10  Sebastian Pop  <sebastian.pop@amd.com>
1048
1049         * graphite-sese-to-poly.c (pdr_add_memory_accesses): Fix order of
1050         building PDR subscripts.
1051
1052 2009-07-10  Sebastian Pop  <sebastian.pop@amd.com>
1053
1054         * graphite-sese-to-poly.c (pdr_add_data_dimensions): Fix the
1055         computation of array sizes.
1056
1057 2009-07-10  Sebastian Pop  <sebastian.pop@amd.com>
1058
1059         * graphite-sese-to-poly.c (add_param_constraints): Disabled.
1060
1061 2009-07-10  Tobias Grosser  <grosser@fim.uni-passau.de>
1062
1063         * graphite-dependences.c (map_into_dep_poly, map_dr_into_dep_poly,
1064         build_pairwise_constraint, dr_equality_constraints,
1065         build_pairwise_scheduling_equality,
1066         build_pairwise_scheduling_inequality, lexicographically_gt_p,
1067         build_lexicographically_gt_constraint, dependence_polyhedron,
1068         graphite_legal_transform_dr, graphite_carried_dependence_level_k):
1069         Move from NNC_Polyhedron to C_Polyhedron.
1070         * graphite-interchange.c (compute_array_size_poly,
1071         gather_access_strides): Dito.
1072         * graphite-poly.c (apply_poly_transforms, new_poly_dr, free_poly_bb,
1073         free_scop, pbb_number_of_iterations): Dito.
1074         * graphite-poly.h (struct poly_dr, pdr_nb_subscripts, struct poly_bb,
1075         pbb_dim_iter_domain, struct scop): Dito.
1076         * graphite-ppl.c (new_Constraint_System_from_Cloog_Matrix,
1077         new_Cloog_Domain_from_ppl_Polyhedron,
1078         new_Cloog_Domain_from_ppl_Pointset_Powerset, ppl_set_coef_gmp,
1079         ppl_insert_dimensions_pointset, ppl_insert_dimensions_pointset,
1080         ppl_strip_loop, ppl_strip_loop, ppl_print_polyhedron_matrix,
1081         ppl_print_powerset_matrix, debug_ppl_polyhedron_matrix,
1082         debug_ppl_powerset_matrix, ppl_read_polyhedron_matrix): Dito.
1083         * graphite-ppl.h (ppl_Pointset_Powerset_C_Polyhedron_t,
1084         new_C_Polyhedron_from_Cloog_Matrix, ppl_print_powerset_matrix,
1085         debug_ppl_powerset_matrix, ppl_insert_dimensions_pointset): Dito.
1086         * graphite-sese-to-poly.c (build_pbb_scattering_polyhedrons,
1087         build_loop_iteration_domains, ppl_constraint_type_from_tree_code,
1088         add_condition_to_domain, add_condition_to_pbb, build_scop_context,
1089         build_scop_iteration_domain, build_poly_dr): Dito
1090
1091 2009-07-09  Sebastian Pop  <sebastian.pop@amd.com>
1092
1093         * testsuite/gcc.dg/graphite/graphite.exp: Added a rule to execute
1094         run-id-*.c files.
1095         * testsuite/gcc.dg/graphite/run-id-1.c: New.
1096
1097 2009-07-09  Sebastian Pop  <sebastian.pop@amd.com>
1098
1099         * graphite-sese-to-poly.c (build_loop_iteration_domains): Add the
1100         positivity constraint on the symbolic number of iterations.
1101
1102 2009-07-09  Sebastian Pop  <sebastian.pop@amd.com>
1103
1104         * graphite-sese-to-poly.c (build_loop_iteration_domains): Rewrite.
1105
1106 2009-07-09  Sebastian Pop  <sebastian.pop@amd.com>
1107             Tobias Grosser  <grosser@fim.uni-passau.de>
1108
1109         * graphite-clast-to-gimple.c (build_scop_context): Removed.
1110         (build_cloog_prog): Directly use SCOP_CONTEXT.
1111         * graphite-poly.c (new_scop): Initialize SCOP_CONTEXT.
1112         (free_scop): Free SCOP_CONTEXT.
1113         (print_scop_context): New.
1114         (print_scop): Call print_scop_context.
1115         (debug_scop_context): New.
1116         * graphite-poly.h (print_scop_context, debug_scop_context): Declared.
1117         (struct scop): Added field context.
1118         (SCOP_CONTEXT): New.
1119         * graphite-sese-to-poly.c (add_param_constraints): New.
1120         (build_scop_context): New.
1121         (build_poly_scop): Call build_scop_context.
1122
1123 2009-07-09  Sebastian Pop  <sebastian.pop@amd.com>
1124
1125         * graphite-clast-to-gimple.c (gmp_cst_to_tree): Moved...
1126         * graphite-ppl.c (ppl_set_inhomogeneous_gmp, ppl_set_coef_gmp): New.
1127         (ppl_set_inhomogeneous, ppl_set_coef): Moved...
1128         * graphite-ppl.h: Include double-int.h and tree.h.
1129         (ppl_set_inhomogeneous_gmp, ppl_set_coef_gmp): Declared.
1130         (ppl_set_inhomogeneous, ppl_set_coef): ...here.
1131         (gmp_cst_to_tree): ...here.  Reimplemented using mpz_get_double_int.
1132         (tree_int_to_gmp, ppl_set_inhomogeneous_tree, ppl_set_coef_tree): New.
1133
1134 2009-07-09  Sebastian Pop  <sebastian.pop@amd.com>
1135
1136         * graphite-clast-to-gimple.c (clast_to_gcc_expression_red): Generate
1137         POINTER_PLUS_EXPR for pointer types.
1138         (clast_to_gcc_expression): Same.
1139
1140 2009-07-09  Sebastian Pop  <sebastian.pop@amd.com>
1141
1142         * graphite-poly.c (print_scattering_function): Early return when
1143         PBB_TRANSFORMED_SCATTERING is not initialized.
1144         (print_pbb_domain): Early return when PBB_DOMAIN is not initialized.
1145
1146 2009-07-08  Sebastian Pop  <sebastian.pop@amd.com>
1147
1148         * tree-parloops.c (analyze_reduction_list): Remove unused variable
1149         to fix bootstrap.
1150
1151 2009-07-08  Razya Ladelsky  <razya@il.ibm.com>
1152
1153         * tree-parloops.c (analyze_reduction_list): Change return
1154         value to void.
1155         (try_create_reduction_list): Move the call to
1156         analyze_reduction_list to the beginining.
1157         Call reduction_phi with analyzed_reductions as argument
1158         instead of reduction_list.
1159
1160 2009-07-08  Tobias Grosser  <grosser@fim.uni-passau.de>
1161
1162         *  Merge from mainline (r148296:149346)
1163
1164 2009-07-07  Sebastian Pop  <sebastian.pop@amd.com>
1165
1166         * graphite-scop-detection.c (graphite_can_represent_init): New.
1167         (graphite_can_represent_scev): Call graphite_can_represent_init:
1168         check that the initial value does not contain multiplications of
1169         parameters.
1170         (stmt_has_simple_data_refs_p): New.
1171         (stmt_simple_for_scop_p): Call stmt_simple_for_scop_p.
1172         (is_simple_operand): Fix formatting.
1173         * graphite-sese-to-poly.c (try_generate_gimple_bb): Fix formatting.
1174
1175 2009-07-07  Sebastian Pop  <sebastian.pop@amd.com>
1176
1177         * testsuite/gcc.dg/graphite/id-13.c: New.
1178         * graphite-sese-to-poly.c (graphite_stmt_p): Do not call
1179         analyze_scalar_evolution, use scalar_evolution_in_region.
1180         (scan_tree_for_params_right_scev): Add extra assert.
1181         (parameter_index_in_region_1): Split from parameter_index_in_region.
1182         (idx_record_params): Use scalar_evolution_in_region.
1183         (find_params_in_bb): Same.
1184         (find_scop_parameters): Same.
1185         (build_loop_iteration_domains): Same.
1186         (create_linear_expr_from_tree): Same.
1187         * sese.c (scalar_evolution_in_region): New.
1188         * sese.h (scalar_evolution_in_region): Declared.
1189         (defined_in_sese_p): New.
1190         * tree-scalar-evolution.c (compute_overall_effect_of_inner_loop): Not
1191         static anymore.
1192         * tree-scalar-evolution.h (compute_overall_effect_of_inner_loop):
1193         Declared.
1194
1195 2009-07-07  Sebastian Pop  <sebastian.pop@amd.com>
1196
1197         * Makefile.in: Replace dependences on tree-chrec.h with SCEV_H.
1198         TREE_DATA_REF_H also implies SCEV_H.
1199
1200 2009-07-07  Sebastian Pop  <sebastian.pop@amd.com>
1201
1202         * graphite-poly.c (print_scop_params): New.
1203         (print_scop): Call print_scop_params.
1204         (debug_scop_params): New.
1205         * graphite-poly.h (print_scop_params, debug_scop_params): Declared.
1206
1207 2009-07-07  Li Feng  <nemokingdom@gmail.com>
1208
1209         * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-4.c: New.
1210         * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-5.c: New.
1211         * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-6.c: New.
1212         * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-7.c: New.
1213         * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-8.c: New.
1214         * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-9.c: New.
1215
1216 2009-07-07  Li Feng  <nemokingdom@gmail.com>
1217
1218         * graphite-clast-to-gimple.c (mark_loops_parallel): Dump information
1219         for dependency checking part.
1220         * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-1.c: Add
1221         tests for dependency checking.
1222         * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-2.c: Ditto.
1223         * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-3.c: Ditto.
1224         * testsuite/gcc.dg/graphite/graphite_autopar/graphite_autopar.exp: Add
1225         flag -fdump-tree-graphite-all for autopar testsuites.
1226
1227 2009-07-06  Sebastian Pop  <sebastian.pop@amd.com>
1228
1229         * Makefile.in (tree-ssa-loop-manip.o): Depends on langhooks.h.
1230         * tree-parloops.c (rewrite_phi_with_iv, rewrite_all_phi_nodes_with_iv,
1231         canonicalize_loop_ivs): Moved...
1232         * tree-ssa-loop-manip.c: ... here.  Include langhooks.h.
1233
1234 2009-07-06  Sebastian Pop  <sebastian.pop@amd.com>
1235
1236         * tree-parloops.c (try_create_reduction_list): Pass an extra
1237         argument analyzed_reductions.  Call analyze_reduction_list.
1238         (gen_parallel_loop): Do not call analyze_reduction_list.
1239         (parallelize_loops): Init and finalize analyzed_reductions.
1240
1241 2009-07-06  Li Feng  <nemokingdom@gmail.com>
1242
1243         * testsuite/gcc.dg/graphite/graphite_autopar/graphite_autopar.exp:
1244         Added flag -fno-loop-strip-mine for autopar testcase.
1245
1246 2009-07-04  Li Feng  <nemokingdom@gmail.com>
1247
1248         * graphite-dependences.c (graphite_carried_dependence_level_k): Use
1249         transformed scattering dimension instead of unmatch orignal when
1250         calling dependence_polyhedron.
1251
1252 2009-06-30  Sebastian Pop  <sebastian.pop@amd.com>
1253
1254         * opts.c (decode_options): Enable flag_loop_strip_mine at -O2.
1255
1256 2009-06-30  Sebastian Pop  <sebastian.pop@amd.com>
1257
1258         * graphite-poly.c (pbb_number_of_iterations): Check for returned
1259         value 1 from ppl_Pointset_Powerset_NNC_Polyhedron_maximize.
1260
1261 2009-06-30  Sebastian Pop  <sebastian.pop@amd.com>
1262
1263         * graphite-blocking.c (pbb_strip_mine_profitable_p): New.
1264         (pbb_do_strip_mine): Call pbb_strip_mine_profitable_p.
1265         * graphite-poly.c (pbb_number_of_iterations): New.
1266         * graphite-poly.h (pbb_number_of_iterations): Declared.
1267         (pbb_iterator_dim, pbb_parameter_dim): New.
1268
1269 2009-06-29  Sebastian Pop  <sebastian.pop@amd.com>
1270
1271         * graphite-clast-to-gimple.c (graphite_create_new_loop): Revert the
1272         last commit on type of lower and upper bound of loops.
1273
1274 2009-06-29  Li Feng  <nemokingdom@gmail.com>
1275
1276         * Makefile.in (graphite-clast-to-gimple.o): Added dependence on
1277         graphite-dependences.h.
1278         * graphite-clast-to-gimple.c (new_bb_pbb_def): New.
1279         (mark_bb_with_pbb): New.
1280         (get_stmtfor_depth): New.
1281         (find_pbb_via_hash): New.
1282         (dependency_in_loop_p): New.
1283         (mark_loops_parallel): New.
1284         (free_aux_in_new_loops): New.
1285         (translate_clast): Add parameter BB_PBB_MAPPING.  Mark newly created
1286         bb with it's relevant pbb. Mark newly created loops.  Remove mark
1287         innermost loop parallel without checking.
1288         (gloog): Add parameter BB_PBB_MAPPING.
1289         * graphite-clast-to-gimple.h (struct bb_pbb_def): New.
1290         (gloog): Change declaration.
1291         (mark_loop_parallel): Make extern.
1292         (free_aux_in_new_loops): Declare.
1293         (bb_pbb_map_hash): New.
1294         (eq_bb_pbb_map): New.
1295         * graphite.c (graphite_transform_loops): Added BB_PBB_MAPPING. Trigger
1296         auto parallelization when flag_graphite_force_parallel is set.
1297         (graphite_finalize): Added free_aux_in_new_loops.
1298         * tree-parloops.c (parallelize_loops): Only generate parallel code for
1299         the innermost loop that marked parallel.  Use
1300         flag_graphite_force_parallel instead of loop->can_be_parallel.
1301         (loop_parallel_p): Move inner most checking out of function.
1302
1303 2009-06-26  Sebastian Pop  <sebastian.pop@amd.com>
1304
1305         * graphite-clast-to-gimple.c (graphite_create_new_loop): Make the
1306         type of lower and upper bound of loops signed long int.
1307
1308 2009-06-26  Sebastian Pop  <sebastian.pop@amd.com>
1309
1310         * cfgloopmanip.c (create_empty_loop_on_edge): Gimplify the loop exit
1311         expression outside the loop.
1312
1313 2009-06-26  Sebastian Pop  <sebastian.pop@amd.com>
1314
1315         * gcc.dg/graphite/interchange-8.c: New.
1316
1317 2009-06-26  Sebastian Pop  <sebastian.pop@amd.com>
1318
1319         * gcc.dg/graphite/interchange-0.c: XFailed.
1320         * gcc.dg/graphite/interchange-5.c: XFailed.
1321         * gcc.dg/graphite/interchange-6.c: XFailed.
1322
1323 2009-06-26  Sebastian Pop  <sebastian.pop@amd.com>
1324
1325         * graphite-interchange.c (compute_array_size_poly): The end of the
1326         recursion should return 1.
1327
1328 2009-06-26  Sebastian Pop  <sebastian.pop@amd.com>
1329
1330         * graphite-interchange.c (compute_array_size_cstr): Allow the
1331         subscript multiplier to be -1.
1332         (compute_array_size): Use PDR_DATA_CONTAINER and not PDR_ACCESSES.
1333         * graphite-poly.c (new_poly_dr): Takes an extra argument for the
1334         data_container.  Initializes PDR_DATA_CONTAINER.
1335         (print_pdr_access_layout): New.
1336         (print_pdr): Call print_pdr_access_layout.  Print PDR_DATA_CONTAINER.
1337         * graphite-poly.h (struct poly_dr): Adjust comment.  Add a new field
1338         data_container.
1339         (PDR_DATA_CONTAINER): New.
1340         (new_poly_dr): Update declaration.
1341         * graphite-sese-to-poly.c (pdr_add_data_dimensions): New.
1342         (build_poly_dr): Call pdr_add_data_dimensions.
1343
1344 2009-06-26  Sebastian Pop  <sebastian.pop@amd.com>
1345
1346         * graphite-poly.h (struct poly_dr): Fix comment.
1347         * graphite-sese-to-poly.c (pdr_add_alias_set): New.
1348         (pdr_add_memory_accesses): New.
1349         (build_poly_dr): Call pdr_add_memory_accesses and pdr_add_alias_set.
1350
1351 2009-06-26  Sebastian Pop  <sebastian.pop@amd.com>
1352
1353         * graphite-poly.c (print_pdrs, debug_pdrs): New.
1354         (print_pbb): Add call to print_pdrs.
1355         * graphite-poly.h (print_pdrs, debug_pdrs): Declared.
1356
1357 2009-06-24  Konrad Trifunovic <konrad.trifunovic@gmail.com>
1358             Li Feng <nemokingdom@gmail.com>
1359
1360         * graphite-dependences.c (graphite_carried_dependence_level_k): New.
1361         (dependency_between_pbbs_p): New.
1362         (lexicographically_gt_p): Assure !empty_p before polyhedron
1363         intersection assign.
1364         (build_lexicographically_gt_constraint): Correct lexicographically
1365         judging.
1366         * graphite-dependences.h: New.
1367         * Makefile.in (graphite-dependences.o): Add graphite-dependences.h.
1368
1369 2009-06-24  Sebastian Pop  <sebastian.pop@amd.com>
1370
1371         * graphite-clast-to-gimple.c (print_clast_stmt): New.
1372         (gloog): Print to dump_file the generated clast.
1373         * graphite-clast-to-gimple.h (print_clast_stmt): Declared.
1374         * graphite-interchange.c (pbb_do_interchange): Fix dump formatting.
1375
1376 2009-06-24  Sebastian Pop  <sebastian.pop@amd.com>
1377
1378         * graphite-poly.c (extend_scattering): Increment
1379         PBB_NB_LOCAL_VARIABLES by the number of added dimensions.
1380
1381 2009-06-24  Sebastian Pop  <sebastian.pop@amd.com>
1382
1383         * graphite-interchange.c (compute_array_size_poly): Added exit of
1384         recursion condition.  Continue iterating even after the first equality.
1385         (compute_array_size): Same.
1386
1387 2009-06-24  Li Feng  <nemokingdom@gmail.com>
1388
1389         * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-1.c: Update
1390         -fdump-tree-final_cleanup to -fdump-tree-optimized.
1391         * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-2.c: Ditto.
1392         * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-3.c: Ditto.
1393         * testsuite/gcc.dg/graphite/graphite_autopar/graphite_autopar.exp: Ditto.
1394
1395 2009-06-23  Sebastian Pop  <sebastian.pop@amd.com>
1396
1397         * sese.c (expand_scalar_variables_stmt): Expand scalar variables
1398         only when the use verifies is_gimple_reg.
1399
1400 2009-06-23  Sebastian Pop  <sebastian.pop@amd.com>
1401
1402         * graphite-clast-to-gimple.c (build_cloog_prog): Fix memory corruption.
1403         Allocate scaldims after call to unify_scattering_dimensions.
1404
1405 2009-06-23  Sebastian Pop  <sebastian.pop@amd.com>
1406
1407         * graphite-clast-to-gimple.c (translate_clast): Fix memory leak.
1408
1409 2009-06-23  Sebastian Pop  <sebastian.pop@amd.com>
1410             Albert Cohen  <albert.cohen@inria.fr>
1411
1412         * graphite-blocking.c (pbb_strip_mine_loop_depth): Do not use local
1413         variables for the strip mining.
1414
1415 2009-06-23  Sebastian Pop  <sebastian.pop@amd.com>
1416             Pranav Garg  <pranav.garg2107@gmail.com>
1417
1418         * Makefile.in (OBJS-common): Added graphite-blocking.o.
1419         (graphite-sese-to-poly.o): Moved down to be in lexicographical order.
1420         (graphite-blocking.o): New rule.
1421         (graphite-poly.o, graphite-ppl.o): Moved to be in lexicographical order.
1422         * graphite-blocking.c: New.
1423         * graphite-poly.c (apply_poly_transforms): Call scop_do_strip_mine for
1424         flag_loop_strip_mine.
1425         (psct_scattering_dim_for_loop_depth): New.
1426         * graphite-poly.h (scop_do_strip_mine): Declared.
1427         (psct_add_local_variable): Increment PBB_NB_LOCAL_VARIABLES.
1428         * tree-ssa-loop.c (gate_graphite_transforms): Do not fail when using
1429         flag_loop_strip_mine.
1430
1431 2009-06-23  Sebastian Pop  <sebastian.pop@amd.com>
1432
1433         * graphite-poly.c (extend_scattering): Avoid initializing and freeing
1434         a GMP value and a PPL coefficient at each iteration of a loop.
1435
1436 2009-06-23  Sebastian Pop  <sebastian.pop@amd.com>
1437
1438         * graphite-dependences.c (dependence_polyhedron): Do not use
1439         pbb_nb_scattering_dims anymore.  Use pbb_nb_scattering_orig and
1440         pbb_nb_scattering_transform.
1441         (graphite_legal_transform_dr): Same.
1442         * graphite-poly.c (extend_scattering): Same.
1443         (unify_scattering_dimensions): Same.
1444         (print_scattering_function): Same.
1445         (new_poly_bb): Initialize PBB_NB_SCATTERING_TRANSFORM and
1446         PBB_NB_LOCAL_VARIABLES.
1447         * graphite-poly.h (pbb_nb_scattering): Removed declaration.
1448         (struct poly_bb): Added nb_local_variables and nb_scattering_transform.
1449         (PBB_NB_LOCAL_VARIABLES, PBB_NB_SCATTERING_TRANSFORM): New.
1450         (pbb_nb_scattering_orig, pbb_nb_scattering_transform): New.
1451         (pbb_nb_scattering_dims, pbb_nb_scattering): Removed.
1452         (pbb_nb_scattering_transform): New.
1453         (pbb_nb_local_vars): Return PBB_NB_LOCAL_VARIABLES.
1454         (psco_scattering_dim): Add assert on parameters.
1455         (psct_scattering_dim): Same.
1456         (psct_scattering_dim_for_loop_depth): Declared.
1457         (psct_local_var_dim): New.
1458         (psco_iterator_dim, psco_parameter_dim): Add assert on parameters.
1459         (psct_iterator_dim, psct_parameter_dim): Same.  To maintain the
1460         correct layout, call pbb_nb_local_vars.
1461         (psct_add_local_variable, psct_add_scattering_dimension): New.
1462         * graphite-sese-to-poly.c (build_pbb_scattering_polyhedrons):
1463         Initialize PBB_NB_SCATTERING_TRANSFORM.
1464
1465 2009-06-23  Sebastian Pop  <sebastian.pop@amd.com>
1466
1467         * graphite-ppl.c (set_inhomogeneous): Renamed ppl_set_inhomogeneous.
1468         (set_coef): Renamed ppl_set_coef.
1469         * graphite-ppl.h (ppl_set_inhomogeneous, ppl_set_coef): Declared.
1470
1471 2009-06-23  Sebastian Pop  <sebastian.pop@amd.com>
1472
1473         * graphite-dependences.c (build_pairwise_scheduling_inequality): Don't
1474         test a boolean against 1.
1475         * graphite-interchange.c (pbb_interchange_loop_depths): Do not build
1476         a new polyhedron for the PBB_TRANSFORMED_SCATTERING.
1477         (pbb_do_interchange): Returns true when a transform has been performed.
1478         (scop_do_interchange): Same.
1479         * graphite-poly.c (apply_poly_transforms): Use the return value of
1480         scop_do_interchange.
1481         * graphite-poly.h (scop_do_interchange): Update declaration.
1482
1483 2009-06-23  Tobias Grosser  <grosser@fim.uni-passau.de>
1484
1485         * graphite-clast-to-gimple.c (gloog): Reset loop->aux right
1486         after last use.
1487         * sese.c (sese_reset_aux_in_loops): New.
1488         * sese.h (sese_reset_aux_in_loops): New.
1489
1490 2009-06-19  Sebastian Pop  <sebastian.pop@amd.com>
1491
1492         * graphite-sese-to-poly.c (scan_tree_for_params_int): Pass in the
1493         multiplier and multiply the constant by the multiplier.
1494         (scan_tree_for_params): Bound the multiplier to its MULT_EXPR.
1495         (build_poly_dr): Do not use the multiplier to define the subscript.
1496
1497 2009-06-19  Sebastian Pop  <sebastian.pop@amd.com>
1498
1499         * graphite-poly.c (new_poly_dr): Pass an extra argument for the
1500         compiler's data reference.  Initialize PDR_CDR.
1501         (print_pdr): Call dump_data_reference.
1502         * graphite-poly.h (struct poly_dr): Rename black_box into pbb.
1503         Add compiler_dr field.
1504         (PDR_BB): Renamed PDR_PBB.
1505         (PDR_CDR): New.
1506         * graphite-sese-to-poly.c (build_poly_dr): Pass to new_poly_dr
1507         GCC's data reference representation.
1508         * tree-data-ref.c (debug_data_references, debug_data_reference): New.
1509         * tree-data-ref.h (debug_data_references, debug_data_reference): Decl.
1510
1511 2009-06-19  Sebastian Pop  <sebastian.pop@amd.com>
1512
1513         * graphite-poly.c (print_scattering_function): Also print the layout.
1514         * graphite-poly.h (pbb_nb_local_vars): New.
1515
1516 2009-06-19  Sebastian Pop  <sebastian.pop@amd.com>
1517
1518         * graphite-poly.c (print_pbb_domain): Also print the layout names.
1519
1520 2009-06-19  Sebastian Pop  <sebastian.pop@amd.com>
1521
1522         * graphite-poly.c (print_pdr, debug_pdr): New.
1523         * graphite-poly.h (print_pdr, debug_pdr): Declared.
1524         (PDR_BASE): Removed.
1525
1526 2009-06-18  Sebastian Pop  <sebastian.pop@amd.com>
1527
1528         * gcc/testsuite/gcc.dg/graphite/interchange-{1..7}.c: New avatars of
1529         ltrans-{1..6,8}.c.
1530
1531 2009-06-18  Sebastian Pop  <sebastian.pop@amd.com>
1532
1533         * graphite-interchange.c (compute_subscript): Allow also -1 in the
1534         subscript identification column.
1535         (pbb_do_interchange): Print to dump_file that some loops "will be
1536         interchanged".  Rely on that chain of characters in the testcases.
1537         * gcc.dg/graphite/interchange-0.c: New.
1538         * gcc.dg/graphite/graphite.exp: Iterate over the testsuite
1539         interchange-*.c files and compile them with -floop-interchange.
1540
1541 2009-06-18  Pranav Garg  <pranav.garg2107@gmail.com>
1542
1543         * graphite-interchange.c (interchange_profitable_p): Renamed
1544         pbb_interchange_profitable_p.
1545
1546 2009-06-18  Sebastian Pop  <sebastian.pop@amd.com>
1547             Harsha Jagasia  <harsha.jagasia@amd.com>
1548             Pranav Garg  <pranav.garg2107@gmail.com>
1549
1550         * graphite-interchange.c (interchange_profitable_p): Make static.
1551         (pbb_interchange_loop_depths, pbb_do_interchange,
1552         scop_do_interchange): New.
1553         * graphite-poly.c (apply_poly_transforms): Call scop_do_interchange
1554         for flag_loop_interchange.
1555         * graphite-poly.h (scop_do_interchange): Declared.
1556         * tree-ssa-loop.c (gate_graphite_transforms): Do not fail when
1557         flag_loop_interchange is used.
1558
1559 2009-06-18  Sebastian Pop  <sebastian.pop@amd.com>
1560
1561         * graphite-dependences.c (dependence_polyhedron): Update use of
1562         pbb_nb_scattering_dims.
1563         * graphite-poly.h (pbb_nb_scattering_dims): Do not pass SCOP.
1564         (pbb_nb_scattering): Update use of pbb_nb_scattering_dims.
1565         (psco_scattering_dim, psct_scattering_dim, psco_iterator_dim,
1566         psct_iterator_dim, psco_parameter_dim, psct_parameter_dim): New.
1567
1568 2009-06-16  Sebastian Pop  <sebastian.pop@amd.com>
1569
1570         * graphite.c: Cleanup foo.
1571
1572 2009-06-16  Sebastian Pop  <sebastian.pop@amd.com>
1573
1574         * Merge from mainline (r143684:148293).
1575         * Disabled libpcp until it gets fixed.
1576
1577 2009-06-05  Sebastian Pop  <sebastian.pop@amd.com>
1578             Harsha Jagasia  <harsha.jagasia@amd.com>
1579
1580         * graphite-interchange.c: New.
1581         * Makefile.in (graphite-interchange.o): New.
1582         * graphite-poly.h (interchange_profitable_p): Declared.
1583         * graphite-ppl.h (value_max): New.
1584
1585 2009-06-04  Sebastian Pop  <sebastian.pop@amd.com>
1586
1587         * graphite-dependences.c (dependence_polyhedron): Use pdr_dim.
1588         * graphite-poly.h: Fix some comments.
1589         (pdr_dim): New.
1590         (pdr_scop): New.
1591
1592 2009-06-04  Sebastian Pop  <sebastian.pop@amd.com>
1593
1594         * graphite-poly.h
1595         (pdr_accessp_nb_subscripts): Renamed pdr_nb_subscripts.
1596         (pdr_accessp_nb_iterators): Renamed pdr_dim_iter_domain.
1597         (pdr_accessp_nb_params): Renamed pdr_nb_params.
1598         (pdr_accessp_alias_set_dim): Renamed pdr_alias_set_dim.
1599         (pdr_accessp_subscript_dim): Renamed pdr_subscript_dim.
1600         (pdr_accessp_iterator_dim): Renamed pdr_iterator_dim.
1601         (pdr_accessp_param_dim): Renamed pdr_parameter_dim.
1602         (pbb_nb_loops): Renamed pbb_dim_iter_domain.
1603         * graphite-clast-to-gimple.c: Same.
1604         * graphite-dependences.c: Same.
1605         * graphite-poly.c: Same.
1606         * graphite-sese-to-poly.c: Same.
1607
1608 2009-06-03  Sebastian Pop  <sebastian.pop@amd.com>
1609
1610         * graphite-clast-to-gimple.c (build_iv_mapping): Insert full
1611         expressions for an IV rename, as returned by clast_to_gcc_expression.
1612         (copy_renames): Rename new_name to expr.
1613         * sese.c (debug_rename_elt): Same.
1614         (get_rename): Same.
1615         (set_rename): Same.
1616         (sese_adjust_liveout_phis): Call force_gimple_operand before using
1617         the information from the rename map.
1618         (rename_variables_in_stmt): Same.
1619         (add_loop_exit_phis): Rename new_name to expr.
1620         (insert_loop_close_phis): Same.
1621         (add_guard_exit_phis): Same.  Call force_gimple_operand.
1622         * sese.h (struct rename_map_elt): Rename new_name to expr.
1623         (new_rename_map_elt): Same.
1624
1625 2009-06-03  Sebastian Pop  <sebastian.pop@amd.com>
1626
1627         * graphite-clast-to-gimple.c (build_iv_mapping): Use set_rename.
1628         * sese.c (set_rename): Make it extern.
1629         * sese.h (set_rename): Declared.
1630
1631 2009-06-03  Sebastian Pop  <sebastian.pop@amd.com>
1632
1633         * graphite-poly.c (extend_scattering): Free values.
1634         * graphite-ppl.c (new_Cloog_Domain_from_ppl_Pointset_Powerset):
1635         Free iterators.
1636         (ppl_print_powerset_matrix): Same.
1637         * graphite-scop-detection.c (free_scops_1): New.
1638         (limit_scops): Call free_scops_1.
1639         * graphite-sese-to-poly.c (build_scop_bbs_1): Free dom.
1640         (build_poly_dr): Free PPL coefficients.
1641         * tree-parloops.c (rewrite_all_phi_nodes_with_iv): Free bbs.
1642
1643 2009-06-02  Sebastian Pop  <sebastian.pop@amd.com>
1644
1645         * graphite-dependences.c: New.
1646         * graphite-data-ref.c: Removed.
1647         * graphite-data-ref.h: Removed.
1648         * Makefile.in (graphite-data-ref.o): Removed.
1649         (graphite-dependences.o): Added.
1650         * graphite-clast-to-gimple.c: Remove dependence on graphite-data-ref.h.
1651         * graphite-poly.c: Same.
1652         Move the data dependence testing to graphite-dependences.c.
1653
1654 2009-05-19  Tobias Grosser  <grosser@fim.uni-passau.de>
1655
1656         * graphite-scop-detection.c (graphite_can_represent_loop): Renamed
1657         from graphite_cannot_represent_loop. Code refactored.
1658         (scopdet_basic_block_info): Call graphite_can_represent_loop.
1659
1660 2009-05-17  Li Feng  <nemokingdom@gmail.com>
1661
1662         * testsuite/gcc.dg/graphite/graphite_autopar/graphite_autopar.exp:
1663         Cover all the testcases (not only the filtered ones).
1664
1665 2009-05-17  Tobias Grosser  <grosser@fim.uni-passau.de>
1666
1667         * graphite-scop-detection.c (stmt_simple_for_scop_p): Remove
1668         unnecessary check. Update comments. Move check for REAL_TYPE here.
1669         (harmful_stmt_in_bb): Remove checks for conditions. This is already
1670         done in (stmt_simple_for_scop_p).
1671
1672 2009-05-14 Tobias Grosser  <grosser@fim.uni-passau.de>
1673
1674         * graphite.c (print_global_statistics): New.
1675         (print_graphite_scop_statistic): New.
1676         (print_graphite_statistics): New.
1677         (graphite_initialize, graphite_transform_loops): Print statistics.
1678         * graphite-scop-detection (build_scops): Print statistics.
1679         (print_graphite_scop_statistics): New.
1680         (print_graphite_statistics): New.
1681
1682 2009-05-13  Sebastian Pop  <sebastian.pop@amd.com>
1683
1684         * graphite-clast-to-gimple.c (struct clast_name_index): Removed.
1685         (debug_clast_name_index): Removed.
1686         (debug_clast_name_indexes_1): Removed.
1687         (debug_clast_name_indexes): Removed.
1688         (clast_name_index_elt_info): Removed.
1689         (eq_clast_name_indexes): Removed.
1690         (clast_name_to_index): Removed.
1691         (new_clast_name_index): Removed.
1692         (save_clast_name_index): Removed.
1693         (save_var_name): Moved...
1694         (init_sese_params_index): Removed.
1695         (clast_name_to_gcc): Remove use of name_tree.
1696         (initialize_cloog_names): Same.
1697         (gloog): Do not call init_sese_params_index.
1698         * graphite-sese-to-poly.c (save_var_name): ...here.
1699         (parameter_index_in_region): New.
1700         * sese.c (new_sese): Initialize SESE_PARAMS_NAMES.
1701         (parameter_index_in_region): Removed.
1702         (is_parameter): Remove use of name_tree.
1703         * sese.h (struct name_tree): Removed.
1704         (struct sese): Remove use of name_tree.  New field params_names.
1705         (SESE_PARAMS_NAMES): New.
1706         (SESE_PARAMS): Remove duplicate.
1707         (parameter_index_in_region): Removed.
1708         (sese_nb_params): Remove use of name_tree.
1709         (struct clast_name_index): New.
1710         (new_clast_name_index): New.
1711         (clast_name_to_index): New.
1712         (save_clast_name_index): New.
1713         (debug_clast_name_index): New.
1714         (debug_clast_name_indexes_1): New.
1715         (debug_clast_name_indexes): New.
1716         (clast_name_index_elt_info): New.
1717         (eq_clast_name_indexes): New.
1718
1719 2009-05-13  Sebastian Pop  <sebastian.pop@amd.com>
1720
1721         * graphite-clast-to-gimple.c (compute_cloog_iv_types_1): Call
1722         pbb_to_depth_to_oldiv.  Remove call to oldiv_for_loop.
1723         (graphite_loop_normal_form): Do not pass region.  Do not
1724         initialize SESE_OLDIVS.
1725         (build_graphite_loop_normal_form): Update call to
1726         graphite_loop_normal_form.
1727         * sese.c (debug_oldivs): Removed.
1728         (new_sese): Do not initialize SESE_OLDIVS.
1729         (free_sese): Do not free SESE_OLDIVS.
1730         (oldiv_for_loop): Removed.
1731         * sese.h (struct sese): Remove old_ivs.
1732         (SESE_OLDIVS): Removed.
1733         (oldiv_for_loop): Removed.
1734
1735 2009-05-13  Sebastian Pop  <sebastian.pop@amd.com>
1736
1737         * graphite-clast-to-gimple.c (clast_name_to_gcc): Pass newivs,
1738         remove ivstack.  Remove call to loop_iv_stack_get_iv_from_name,
1739         replaced by a call to newivs_to_depth_to_newiv.
1740         (clast_to_gcc_expression): Pass newivs, remove ivstack.
1741         (clast_to_gcc_expression_red): Same.
1742         (gcc_type_for_clast_expr): Same.
1743         (gcc_type_for_clast_eq): Same.
1744         (graphite_translate_clast_equation): Same.
1745         (graphite_create_guard_cond_expr): Same.
1746         (graphite_create_new_guard): Same.
1747         (graphite_create_new_loop): Same.
1748         (build_iv_mapping): Same.
1749         (translate_clast): Same.
1750         (gloog): Same.
1751         (loop_iv_stack_patch_for_consts): Removed.  *
1752         sese.c (iv_stack_entry_is_constant): Removed.
1753         (iv_stack_entry_is_iv): Removed.
1754         (loop_iv_stack_push_iv): Removed.
1755         (loop_iv_stack_insert_constant): Removed.
1756         (loop_iv_stack_pop): Removed.
1757         (loop_iv_stack_get_iv): Removed.
1758         (loop_iv_stack_get_iv_from_name): Removed.
1759         (debug_loop_iv_stack): Removed.
1760         (free_loop_iv_stack): Removed.
1761         (loop_iv_stack_remove_constants): Removed.  *
1762         sese.h (iv_stack_entry_kind): Removed.
1763         (iv_stack_entry_data_union): Removed.
1764         (iv_stack_entry_struct): Removed.
1765         (iv_stack_entry_p): Removed.
1766         (debug_oldivs, debug_loop_iv_stack, loop_iv_stack_insert_constant,
1767         loop_iv_stack_get_iv_from_name, loop_iv_stack_push_iv,
1768         loop_iv_stack_get_iv, loop_iv_stack_remove_constants,
1769         loop_iv_stack_pop, free_loop_iv_stack): Removed.
1770         (gbb_loop_at_index): Fix indenting.
1771         (gbb_loop_index): Removed.
1772
1773 2009-05-13  Sebastian Pop  <sebastian.pop@amd.com>
1774
1775         * graphite-clast-to-gimple.c (clast_name_to_gcc): Do not use strcmp.
1776         Call clast_name_to_index.
1777
1778 2009-05-13  Sebastian Pop  <sebastian.pop@amd.com>
1779
1780         * graphite-clast-to-gimple.c (clast_name_to_gcc): Pass region,
1781         do not pass params.  Get params from SESE_PARAMS.
1782         (clast_to_gcc_expression): Same.
1783         (clast_to_gcc_expression_red): Same.
1784         (gcc_type_for_clast_eq): Same.
1785         (graphite_translate_clast_equation): Same.
1786         (graphite_create_new_loop): Same.
1787         * sese.c (rename_variables_in_stmt): Fix comment.
1788
1789 2009-05-13  Sebastian Pop  <sebastian.pop@amd.com>
1790
1791         * graphite-clast-to-gimple.c (graphite_create_new_loop): Pass
1792         newivs_index.
1793         Call save_clast_name_index.
1794         (translate_clast): Pass newivs_index.
1795         (gloog): Create and free newivs_index.
1796
1797 2009-05-13  Sebastian Pop  <sebastian.pop@amd.com>
1798
1799         * graphite-clast-to-gimple.c (clast_name_index): New structure.
1800         (clast_name_index_p): New type.
1801         (debug_clast_name_index): New.
1802         (debug_clast_name_indexes_1): New.
1803         (debug_clast_name_indexes): New.
1804         (clast_name_index_elt_info): New.
1805         (eq_clast_name_indexes): New.
1806         (clast_name_to_index): New.
1807         (new_clast_name_index): New.
1808         (save_clast_name_index): New.
1809         (init_sese_params_index): New.
1810         (gloog): Call init_sese_params_index.
1811         * graphite-clast-to-gimple.h (debug_clast_name_indexes): Declared.
1812         * sese.c (new_sese): Initialize SESE_PARAMS_INDEX.
1813         (free_sese): Free SESE_PARAMS_INDEX.
1814         * sese.h (struct sese): Add params_index.
1815         (SESE_PARAMS_INDEX): New.
1816
1817 2009-05-13  Sebastian Pop  <sebastian.pop@amd.com>
1818
1819         * graphite-clast-to-gimple.c (newivs_to_depth_to_newiv): New.
1820         (graphite_create_new_loop): Pass the newivs vector.  Push the
1821         newly created IV to newivs.
1822         (translate_clast): Pass the newivs vector.
1823         (gloog): Create and destroy the newivs vector.
1824
1825 2009-05-13  Sebastian Pop  <sebastian.pop@amd.com>
1826
1827         * graphite-clast-to-gimple.c (pbb_to_depth_to_oldiv): New.
1828         (graphite_loop_normal_form): Initialize loop->aux with the unique
1829         IV that has been created.
1830
1831 2009-05-13 Tobias Grosser  <grosser@fim.uni-passau.de>
1832
1833         * tree-chrec.c (evolution_function_right_is_integer_cst): Allow
1834         scev with parameters in the base part. They where forbidden
1835         exidently.
1836
1837 2009-05-11  Li Feng  <nemokingdom@gmail.com>
1838
1839         * testsuite/gcc.dg/graphite/graphite.exp: Set different default
1840         compile options by file names.
1841         * testsuite/gcc.dg/graphite/block{0-6}.c: Remove dg-option line.
1842         * testsuite/gcc.dg/graphite/id-{1-9}.c: Ditto.
1843         * testsuite/gcc.dg/graphite/scop-{0-20}.c: Ditto.
1844         * testsuite/gcc.dg/graphite/scop-matmult.c: Ditto.
1845
1846 2009-05-08  Li Feng <nemokingdom@gmail.com>
1847
1848         * testsuite/gcc.dg/graphite/graphite_autopar/graphite_autopar.exp: New.
1849         * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-1.c: New.
1850         * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-2.c: New.
1851         * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-3.c: New.
1852
1853 2009-05-07  Tobias Grosser  <grosser@fim.uni-passau.de>
1854
1855         * graphite-scop-detection (build_scops_1): Fix little bug introduced
1856         by final cleanup.
1857
1858 2009-05-07  Tobias Grosser  <grosser@fim.uni-passau.de>
1859
1860         * graphite-scop-detection.c (graphite_can_represent_scev): Only
1861         allow integer constant strides.
1862         (graphite_can_represent_expr): Depend on outermost_loop.
1863         (stmt_simple_memref_p, graphite_cannot_represent_loop,
1864         harmful_stmt_in_bb, is_simple_operand, stmt_simple_for_scop_p,
1865         build_scops_1): Same.
1866         (scopdet_basic_block_info): Same and insert layered SCoP
1867         detection.
1868         (try_generate_gimple_bb): Cleanup.
1869         (build_scops): Enable data references.
1870
1871         * testsuite/gcc.dg/graphite/id-5.c: New.
1872         * testsuite/gcc.dg/graphite/id-9.c: New.
1873         * tree-chrec.c (evolution_function_right_is_integer_cst): New.
1874         * tree-chrec.h (evolution_function_right_is_integer_cst): New.
1875
1876 2009-05-06  Tobias Grosser  <grosser@fim.uni-passau.de>
1877
1878         * sese.c (expand_scalar_variables_ssa_name): Only build expressions,
1879         that we have not yet built for this SCoP.
1880
1881 2009-05-06  Tobias Grosser  <grosser@fim.uni-passau.de>
1882
1883         * sese.c (expand_scalar_variables_expr): Fix expand_scalar_variables
1884         for complex numbers.
1885
1886 2009-05-06  Tobias Grosser  <grosser@fim.uni-passau.de>
1887
1888         * graphite-ppl.c: Fix build if cloog is not available.
1889
1890 2009-05-04  Li Feng  <nemokingdom@gmail.com>
1891
1892         * tree-parloops.c (loop_parallel_p): Remove construction of
1893         NITER and REDUCTION_LIST.
1894         (try_get_loop_niter): New.
1895         (try_create_reduction_list): New.
1896         (parallelize_loops): Bypass the failed checkings in autopar
1897         when can_be_parallel in loop structure is set to true.
1898
1899 2009-05-01  Tobias Grosser  <grosser@fim.uni-passau.de>
1900
1901         * testsuite/gcc.dg/graphite/id-6.c: Update testcase.
1902         * testsuite/gcc.dg/graphite/scop-3.c: Dito.
1903
1904 2009-05-01  Tobias Grosser  <grosser@fim.uni-passau.de>
1905
1906         * graphite-scop-detection.c (stmt_simple_for_scop_p):
1907         Enable EQ_EXPR and NE_EXPR again.
1908
1909 2009-04-30  Tobias Grosser  <grosser@fim.uni-passau.de>
1910
1911         * graphite-scop-detection.c (graphite_can_represent_scev):
1912         Add check if scev is affine multivariate.
1913         (harmful_stmt_in_bb): Check if we can represent the conditions.
1914         (scopdet_basic_block_info (basic_block bb, VEC): Pass the loop to
1915         harmful_stmt_in_bb.
1916         * testsuite/gcc.dg/graphite/id-7.c: New.
1917
1918 2009-04-30  Tobias Grosser  <grosser@fim.uni-passau.de>
1919
1920         * graphite-sese-to-poly.c (bb_contains_non_iv_scalar_phi_nodes):
1921         Check all bbs in region, not only the bbs that are represented in
1922         GRAPHITE.
1923         (build_poly_scop): Add newline.
1924         * testsuite/gcc.dg/graphite/id-8.c: New.
1925
1926 2009-04-30  Li Feng  <nemokingdom@gmail.com>
1927
1928         * cfgloop.c (alloc_loop): Initialize can_be_parallel to false
1929         when loop initialize.
1930         * cfgloop.h (struct loop): Introduce flag can_be_parallel.
1931         * common.opt: Declare flag_graphite_force_parallel.
1932         * graphite-clast-to-gimple.c (translate_clast): Mark the innermost
1933         loop parallel.
1934         * graphite-poly.c (apply_poly_transforms): Introduce
1935         flag_graphite_force_parallel.
1936         * tree-ssa-loop.c (gate_graphite_transforms): ditto.
1937         * toplev.c (process_options): ditto and replace a not correctly
1938         encoded space.
1939
1940 2009-04-30  Li Feng  <nemokingdom@gmail.com>
1941
1942         * graphite-clast-to-gimple.c (loop_iv_stack_patch_for_consts):
1943         Change the call of gbb_loop_at_index and/or gbb_loop_index due
1944         to the redefinition.
1945         (compute_cloog_iv_types_1): ditto.
1946         (build_iv_mapping): ditto.
1947         * graphite-sese-to-poly.c (new_gimple_bb): Remove GBB_LOOPS related
1948         initialization.
1949         (free_gimple_bb): Removed GBB_LOOPS related free part.
1950         (build_bb_loops): Removed.
1951         * sese.h (struct gimple_bb): Removed loops.
1952         (GBB_LOOPS): Removed.
1953         (gbb_loop_at_index): Instead of using GBB_LOOPS, we use sese instead.
1954         (gbb_loop_index): ditto.
1955
1956 2009-04-24  Tobias Grosser  <grosser@fim.uni-passau.de>
1957
1958         * graphite-scop-detection.c (graphite_can_represent_scev): Do not
1959         allow non constant strides.
1960         * testsuite/gcc.dg/graphite/scop-20.c: New.
1961
1962 2009-04-24  Sebastian Pop  <sebastian.pop@amd.com>
1963
1964         * graphite-scop-detection.c (dot_all_scops): Fix system call
1965         return value warning.
1966         (dot_scop): Same.
1967
1968 2009-04-24  Sebastian Pop  <sebastian.pop@amd.com>
1969
1970         * testsuite/gcc.dg/graphite/id-6.c: Fix pattern.
1971         * testsuite/gcc.dg/graphite/scop-3.c: Same.
1972
1973 2009-04-24  Sebastian Pop  <sebastian.pop@amd.com>
1974
1975         * graphite-poly.c (map_into_dep_poly, map_dr_into_dep_poly,
1976         build_pairwise_constraint, dr_equality_constraints,
1977         build_pairwise_scheduling_equality,
1978         build_pairwise_scheduling_inequality, lexicographically_gt_p,
1979         build_lexicographically_gt_constraint, dependence_polyhedron,
1980         graphite_legal_transform_dr, graphite_legal_transform_bb,
1981         graphite_legal_transform): New.
1982         * graphite-poly.h (graphite_legal_transform): Declared.
1983         * graphite-sese-to-poly.c (build_poly_scop): Call to
1984         graphite_legal_transform is disabled for the moment.
1985
1986 2009-04-24  Sebastian Pop  <sebastian.pop@amd.com>
1987
1988         * graphite-poly.h (pbb_nb_scattering_dims): New.
1989         (pbb_nb_scattering): Use it.
1990
1991 2009-04-24  Sebastian Pop  <sebastian.pop@amd.com>
1992
1993         * graphite-ppl.c (ppl_insert_dimensions_pointset): Add
1994         Pointset_Powerset version of ppl_insert_dimensions.
1995         * graphite-ppl.h (ppl_insert_dimensions_pointset): Declared.
1996
1997 2009-04-24  Sebastian Pop  <sebastian.pop@amd.com>
1998
1999         * graphite-ppl.c (ppl_insert_dimensions): Fix formatting.
2000
2001 2009-04-24  Sebastian Pop  <sebastian.pop@amd.com>
2002
2003         * graphite-poly.h: Fix comment.
2004
2005 2009-04-24  Sebastian Pop  <sebastian.pop@amd.com>
2006
2007         * graphite-sese-to-poly.c (build_poly_dr): Fix data ref multiplier.
2008
2009 2009-04-24  Tobias Grosser  <grosser@fim.uni-passau.de>
2010
2011         * sese.c (expand_scalar_variables_stmt): Only iterate over the old
2012         statements.
2013
2014 2009-04-24  Tobias Grosser  <grosser@fim.uni-passau.de>
2015
2016         * graphite-sese-to-poly.c (var_used_in_not_loop_header_phi_node): New.
2017         (graphite_stmt_p): Represent bbs necessary to build the phi nodes of
2018         conditions.
2019
2020 2009-04-20  Sebastian Pop  <sebastian.pop@amd.com>
2021
2022         * graphite-scop-detection.c (stmt_simple_for_scop_p): Do not
2023         handle EQ_EXPR and NE_EXPR.
2024
2025 2009-04-17  Tobias Grosser  <grosser@fim.uni-passau.de>
2026
2027         * graphite-poly.h (poly_dr): Fix comment.
2028
2029 2009-04-09  Sebastian Pop  <sebastian.pop@amd.com>
2030             Tobias Grosser  <grosser@fim.uni-passau.de>
2031
2032         * graphite-poly.c (new_poly_bb): Do not initialize PBB_DOMAIN
2033         with a zero dimension polyhedron.
2034         (find_scop_parameters): Move the call to scop_set_nb_params here.
2035         (build_loop_iteration_domains): Store in loop->aux the iteration
2036         domain polyhedron.
2037         (build_scop_iteration_domain): Fix PBB_DOMAIN for bbs not surrounded
2038         by any loop in scop.
2039         (build_poly_scop): Do not call scop_set_nb_params.
2040
2041 2009-04-09  Sebastian Pop  <sebastian.pop@amd.com>
2042             Tobias Grosser  <grosser@fim.uni-passau.de>
2043
2044         * graphite-sese-to-poly.c (add_condition_to_pbb): Pass code to
2045         add_condition_to_domain not GT_EXPR.
2046
2047 2009-04-09  Tobias Grosser  <grosser@fim.uni-passau.de>
2048
2049         * graphite-ppl.c (debug_ppl_powerset_matrix): New.
2050         * graphite-ppl.h (debug_ppl_powerset_matrix): New.
2051         * graphite-sese-to-poly.c (add_condition_to_pbb): Use
2052         upper_bound_assign to calculate unions.
2053         * testsuite/gcc.dg/graphite/id-6.c: New.
2054
2055 2009-04-09  Tobias Grosser  <grosser@fim.uni-passau.de>
2056
2057         * graphite-scop-detection.c (canonicalize_loop_closed_ssa): Do not
2058         handle abnormal edges.
2059
2060 2009-04-09  Tobias Grosser  <grosser@fim.uni-passau.de>
2061
2062         * graphite-poly.c (new_poly_dr, free_poly_dr): New.
2063         (free_poly_bb): Also free poly_drs.
2064         * graphite-poly.h (new_poly_dr, free_poly_dr): New.
2065         (poly_dr): Polyhedron to Pointset_Powerset.
2066         (pdr_accessp_nb_subscripts): Same.
2067         * graphite-sese-to-poly.c (build_poly_dr): Same. And actually build
2068         poly_drs.
2069
2070 2009-04-08  Sebastian Pop  <sebastian.pop@amd.com>
2071
2072         * graphite-clast-to-gimple.c (initialize_cloog_names): Change cloog
2073         names into more meaningful names.
2074
2075 2009-04-08  Sebastian Pop  <sebastian.pop@amd.com>
2076
2077         * testsuite/gfortran.dg/graphite/interchange-1.c: New.
2078         * testsuite/gfortran.dg/graphite/interchange-2.c: New.
2079
2080 2009-04-08  Sebastian Pop  <sebastian.pop@amd.com>
2081
2082         * graphite-clast-to-gimple.c (graphite_loop_normal_form): Do not build
2083         the reduction_list.
2084         * tree-parloops.c (rewrite_phi_with_iv): New.
2085         (rewrite_all_phi_nodes_with_iv): New.
2086         (canonicalize_loop_ivs): Call them.
2087
2088 2009-04-08  Sebastian Pop  <sebastian.pop@amd.com>
2089
2090         * graphite-sese-to-poly.c (try_generate_gimple_bb): Use
2091         graphite_find_data_references_in_stmt.
2092         * tree-data-ref.c (graphite_find_data_references_in_stmt): New.
2093         * tree-data-ref.h (graphite_find_data_references_in_stmt): Declared.
2094
2095 2009-04-08  Sebastian Pop  <sebastian.pop@amd.com>
2096
2097         * sese.c (add_loop_exit_phis): Don't fail on non SSA_NAME renames.
2098
2099 2009-04-08  Sebastian Pop  <sebastian.pop@amd.com>
2100
2101         * graphite-sese-to-poly.c (build_scop_bbs_1): Use bb_in_sese_p
2102         instead of bb_in_region.
2103         (flag_bb_in_region): Same.  Renamed flag_bb_in_sese.
2104         (build_sese_conditions): Use flag_bb_in_sese.
2105         * sese.c (register_bb_in_sese): Removed.
2106         (new_sese): Remove initialization of SESE_REGION_BBS.
2107         (free_sese): Do not free SESE_REGION_BBS.
2108         * sese.h (struct sese): Remove field region_basic_blocks.
2109         (SESE_REGION_BBS): Removed.
2110         (bb_in_sese_p): Implement in function of bb_in_region.
2111
2112 2009-04-08  Sebastian Pop  <sebastian.pop@amd.com>
2113
2114         * graphite-scop-detection.c (limit_scops): Deal only with single exit
2115         loops.
2116
2117 2009-04-08  Tobias Grosser  <grosser@fim.uni-passau.de>
2118
2119         * graphite-scop-detection.c (stmt_simple_for_scop_p): Allow NE_EXPR
2120         and EQ_EXPR.
2121         * graphite-sese-to-poly.c (create_linear_expr_from_tree): New.
2122         (add_condition_to_domain): New.
2123         (add_condition_to_pbb): New.
2124         (add_conditions_to_domain): Cleanup and handle of NE_EXPR and EQ_EXPR.
2125         * testsuite/gcc.dg/graphite/scop-3.c: Update number of detected SCoPs.
2126
2127 2009-04-08  Tobias Grosser  <grosser@fim.uni-passau.de>
2128
2129         * graphite-clast-to-gimple.c (build_cloog_prog): ppl_Polyhedron ->
2130         ppl_Pointset_Powerset.
2131         * graphite-poly.c (new_poly_bb, free_poly_bb): Same.
2132         * graphite-poly.h (poly_bb): poly_bb.domain Same.
2133         (pbb_nb_loops): Same.
2134         * graphite-sese-to-poly.c (build_loop_iteration_domains,
2135         add_conditions_to_domain): Same.
2136         * graphite-ppl.c (new_Cloog_Domain_from_ppl_Pointset_Powerset): New.
2137         (ppl_print_polyhedron_matrix): ppl_Polyhedron_t ->
2138         ppl_const_Polyhedron_t.
2139         (ppl_print_powerset_matrix): New.
2140         * graphite-ppl.h (new_Cloog_Domain_from_ppl_Pointset_Powerset,
2141         ppl_print_powerset_matrix): New.
2142         (ppl_print_polyhedron_matrix): Updated.
2143
2144 2009-04-07  Sebastian Pop  <sebastian.pop@amd.com>
2145
2146         * tree-scalar-evolution.c (analyze_scalar_evolution_1): Fix comment.
2147
2148 2009-04-07  Sebastian Pop  <sebastian.pop@amd.com>
2149
2150         * graphite-poly.c (extend_scattering): Fix indenting.  Free cstr.
2151         (print_iteration_domains, debug_iteration_domain,
2152         debug_iteration_domains): New.
2153         * graphite-poly.h (print_iteration_domains, debug_iteration_domain,
2154         debug_iteration_domains): Declared.
2155         * graphite-sese-to-poly.c (build_pbb_scattering_polyhedrons): Fix
2156         indenting.
2157
2158 2009-04-03  Tobias Grosser  <grosser@fim.uni-passau.de>
2159             Sebastian Pop  <sebastian.pop@amd.com>
2160
2161         * graphite-poly.h (print_iteration_domain): New.
2162         * graphite-sese-to-poly.c (add_conditions_to_domain): Fixed bug.
2163         (build_sese_conditions_1, build_sese_conditions_after,
2164         build_sese_conditions_before): New.
2165         (build_sese_conditions): Rewritten.
2166
2167 2009-04-03  Sebastian Pop  <sebastian.pop@amd.com>
2168             Tobias Grosser  <grosser@fim.uni-passau.de>
2169
2170         Cleanup of code generation liveouts.
2171         * graphite-clast-to-gimple.c (translate_clast): Use a single
2172         rename_map instead of one per translated statement.
2173         Do not use SESE_LIVEOUT_RENAMES.
2174         (graphite_loop_normal_form): Do not use SESE_REDUCTION_LIST.
2175         (gloog): Do not use SESE_LIVEOUT_RENAMES.
2176         * graphite-scop-detection.c (harmful_stmt_in_bb): Return the close
2177         phi node of a reduction: when a loop contains a reduction used outside
2178         the loop, there should be a scalar close phi node on the exit block.
2179         * sese.c (new_sese): Do not initialize SESE_LIVEOUT,
2180         SESE_LIVEOUT_RENAMES, and SESE_REDUCTION_LIST.
2181         (free_sese): Do not free them.
2182         (sese_build_liveouts_use): Do not use them.
2183         (sese_build_liveouts_bb): Same.
2184         (sese_build_liveouts): Same.
2185         (sese_insert_phis_for_liveouts): Same.
2186         (sese_adjust_phis_for_liveouts): Same.  Renamed sese_adjust_liveout_phis.
2187         (defined_in_loop_p): New.
2188         (alive_after_loop): New.
2189         (close_phi_not_yet_inserted_p): New.
2190         (struct alep, alep_p): New.
2191         (add_loop_exit_phis): Remove from the rename_map all the names defined
2192         in the code generated loop.
2193         (insert_loop_close_phis): Traverse the rename_map passed to it.
2194         Don't use SESE_LIVEOUT_RENAMES.
2195         (default_liveout_before_guard): Renamed default_before_guard.
2196         (insert_guard_phis): Do not use SESE_LIVEOUT_RENAMES.
2197         (graphite_copy_stmts_from_block): Do not directly call set_rename.
2198         (register_sese_liveout_renames): Removed.
2199         (copy_bb_and_scalar_dependences): Do not call it.
2200         * sese.h (struct sese): Removed fields: liveout, liveout_renames, and
2201         reduction_list.
2202         (SESE_LIVEOUT): Removed.
2203         (SESE_LIVEOUT_RENAMES): Removed.
2204         (SESE_REDUCTION_LIST): Removed.
2205         (sese_build_liveouts): Removed.
2206         (sese_adjust_phis_for_liveouts): Renamed sese_adjust_liveout_phis.
2207         (insert_loop_close_phis): Pass a htab_t instead of a sese.
2208         (insert_guard_phis): Same.
2209         (rename_map_elt): Declare a VEC of them.
2210         * tree-parloops.c (canonicalize_loop_ivs): reduction_list contains
2211         trees not pointers to trees.
2212
2213         Rewrite in canonical close SSA form:
2214         * graphite-scop-detection.c (contains_only_close_phi_nodes): New.
2215         (limit_scops): Close the scop after the block containing the close phi
2216         nodes.
2217         (canonicalize_loop_closed_ssa): New.
2218         (canonicalize_loop_closed_ssa_form): New.
2219         (build_scops): Call canonicalize_loop_closed_ssa_form.
2220
2221         * graphite-sese-to-poly.c: Fix typos.
2222
2223 2009-04-03  Sebastian Pop  <sebastian.pop@amd.com>
2224
2225         * graphite-poly.c (print_scattering_function, print_pbb_domain):
2226         Extended.
2227         (dump_gbb_conditions, dump_gbb_cases, print_iteration_domain): New.
2228         (print_pbb): Add conditions.
2229
2230 2009-04-01  Tobias Grosser  <grosser@fim.uni-passau.de>
2231             Sebastian Pop  <sebastian.pop@amd.com>
2232
2233         * graphite-scop-detection.c (bb_in_sd_region): Use bb_in_region.
2234         * graphite-sese-to-poly.c (all_non_dominated_preds_marked_p): New.
2235         (build_scop_bbs_1): New.
2236         (build_scop_bbs): Rewrite.
2237         * sese.h (bb_in_region): New.
2238
2239 2009-03-29  Tobias Grosser  <grosser@fim.uni-passau.de>
2240
2241         * graphite-poly.c (new_poly_bb, free_poly_bb): Initialize/free
2242         poly_drs vector.
2243         (print_scop): Style.
2244         * graphite-poly.h (poly_bb): Add drs vector.
2245         (PBB_DRS): Add accessor.
2246         * graphite-sese-to-poly.c (build_poly_dr): New.
2247         (build_pbb_drs, build_scop_drs): New.
2248         (build_poly_scop): call build_scop_drs (Disabled at the moment).
2249
2250 2009-03-29  Tobias Grosser  <grosser@fim.uni-passau.de>
2251
2252         * tree-ssa-loop.c: Include forgotten toplev.h
2253
2254 2009-03-29  Tobias Grosser  <grosser@fim.uni-passau.de>
2255
2256         * graphite-poly.c: (apply_poly_transforms): sorry -> gcc_unreachable.
2257         * testsuite/gcc.dg/graphite/pr37883.c: Remove -floop-*
2258         * testsuite/gcc.dg/graphite/pr37928.c: Same
2259         * testsuite/gcc.dg/graphite/pr38409.c: Same
2260         * testsuite/gcc.dg/graphite/pr38498.c: Same
2261         * testsuite/gcc.dg/graphite/pr38559.c: Same
2262         * testsuite/gcc.dg/graphite/pr39335.c: Same
2263         * testsuite/gcc.dg/graphite/pr39335_1.c: Same
2264         * testsuite/gfortran.dg/graphite/block-2.f: Same
2265         * tree-ssa-loop.c (gate_graphite_transforms): Always fail if called
2266         with -floop-*.
2267
2268 2009-03-28  Tobias Grosser  <grosser@fim.uni-passau.de>
2269
2270         * graphite-sese-to-poly.c (ref_nb_loops, build_access_matrix_with_af,
2271         build_access_matrix, build_scop_data_accesses): Remove access function
2272         building. (We get a new version soon).
2273         (build_bb_loops, scan_tree_for_params_right_scev): Update.
2274         * sese.h (nb_loops_around_loop_in_sese): Remove.
2275         (sese_loop_depth): Do not use SESE_LOOP_NEST any more.
2276
2277 2009-03-27  Tobias Grosser  <grosser@fim.uni-passau.de>
2278             Sebastian Pop  <sebastian.pop@amd.com>
2279
2280         * graphite-scop-detection.c (struct scopdet_info): Rename last
2281         field to exit.
2282         (scopdet_basic_block_info, build_scops_1): Don't use
2283         CDI_POST_DOMINATORS.  CDI_POST_DOMINATORS should never be used.
2284
2285 2009-03-26  Tobias Grosser  <grosser@fim.uni-passau.de>
2286             Sebastian Pop  <sebastian.pop@amd.com>
2287
2288         * graphite-clast-to-gimple.c (gloog): Call sese_build_liveouts.
2289         * sese.c (sese_build_liveouts_use): Renamed from
2290         sese_build_livein_liveouts_use. Remove liveins.
2291         (sese_build_liveouts_bb): Renamed from sese_build_livein_liveouts_bb.
2292         Call sese_build_liveouts_use.
2293         (sese_build_liveouts): Renamed from sese_build_livein_liveouts.
2294         Call sese_build_liveouts_bb.
2295         (new_sese, free_sese): Remove liveins.
2296         (sese_add_exit_phis_var): Deleted.
2297         (sese_insert_phis_for_liveouts): Call sese_add_exit_phis_edge
2298         directly.
2299         (graphite_copy_stmts_from_block): Remove SESE_NUM_VER.
2300
2301         * sese.h (sese): Remove num_ver and livein.
2302         (SESE_LIVEIN, SESE_LIVEIN_VER, SESE_NUM_VER): Removed.
2303
2304 2009-03-25  Tobias Grosser  <grosser@fim.uni-passau.de>
2305
2306         * graphite-sese-to-poly.c (build_scop_scattering): Fix compile.
2307
2308 2009-03-25  Tobias Grosser  <grosser@fim.uni-passau.de>
2309
2310         * graphite-sese-to-poly.c (compare_prefix_loops): Removed.
2311         (build_scop_scattering): Do not use compare_prefix_loops any more.
2312         (nb_common_loops): New.
2313
2314 2009-03-24  Sebastian Pop  <sebastian.pop@amd.com>
2315
2316         * sese.c (get_new_name_from_old_name): Renamed get_rename.
2317         (register_old_and_new_names): Renamed set_rename.
2318
2319 2009-03-24  Sebastian Pop  <sebastian.pop@amd.com>
2320
2321         * graphite-scop-detection.h (nb_reductions_in_loop): Revert removal
2322         of the decl from the previous commit.
2323
2324 2009-03-24  Sebastian Pop  <sebastian.pop@amd.com>
2325
2326         * graphite-scop-detection.c (dot_scop): New.
2327         * graphite-scop-detection.h (dot_scop): Declared.
2328
2329 2009-03-24  Sebastian Pop  <sebastian.pop@amd.com>
2330
2331         * graphite-sese-to-poly.c (compare_prefix_loops): Fix compare.
2332
2333 2009-03-24  Sebastian Pop  <sebastian.pop@amd.com>
2334
2335         * cfgloopmanip.c (create_empty_loop_on_edge): Generate the loop exit
2336         condition at the end of the loop.
2337         * graphite.c (graphite_initialize, graphite_finalize): Print to
2338         dump_file the compiled function.
2339         * graphite-clast-to-gimple.c (graphite_create_new_loop): Update use
2340         of create_empty_loop_on_edge.
2341         (translate_clast): Update the code generation of loops for the new
2342         shape of loops.
2343         * cfgloop.h (create_empty_loop_on_edge): Update declaration.
2344
2345 2009-03-24  Sebastian Pop  <sebastian.pop@amd.com>
2346
2347         Reverted the patch from 2009-03-19.
2348
2349 2009-03-19  Tobias Grosser  <grosser@fim.uni-passau.de>
2350
2351         * graphite-poly.c (new_poly_bb, free_poly_bb): Initialize/free
2352         poly_drs vector.
2353         (print_scop): Style.
2354         * graphite-poly.h (poly_bb): Add drs vector.
2355         (PBB_DRS): Add accessor.
2356         * graphite-sese-to-poly.c (ref_nb_loops): Remove.
2357         (build_access_matrix_with_af, build_access_matrix,
2358         build_scop_data_accesses): Delete.
2359         (build_poly_dr): New.
2360         (build_pbb_drs, build_scop_drs): New.
2361         (build_poly_scop): call build_scop_drs.
2362
2363 2009-03-13  Sebastian Pop  <sebastian.pop@amd.com>
2364
2365         * graphite-scop-detection.c (dot_all_scops_1): Close the table
2366         once per basic block.
2367
2368 2009-03-13  Tobias Grosser  <grosser@fim.uni-passau.de>
2369
2370         * graphite-scop-detection.c (graphite_can_represent_scev): New.
2371         (graphite_can_represent_expr): Renamed from loop_affine_expr
2372         and enhanced.
2373         (stmt_simple_for_scop_p): Call graphite_can_represent_expr.
2374         (graphite_cannot_represent_loop): Add scop_entry to parameters.
2375         (scopdet_basic_block_info): Actually define entry_block.
2376         (stmt_simple_memref_p): Moved here from ...
2377
2378         * tree-data-ref.c (stmt_simple_memref_p): here.
2379         * tree-data-ref.h (stmt_simple_memref_p): Removed.
2380
2381 2009-03-13  Tobias Grosser  <grosser@fim.uni-passau.de>
2382
2383         * testsuite/gcc.dg/graphite/id-4.c: New.
2384
2385 2009-03-12  Sebastian Pop  <sebastian.pop@amd.com>
2386
2387         * sese.c (expand_scalar_variables_expr): Handle tcc_comparison.
2388         (register_old_and_new_names): Update the content of the map.
2389         When there was already a rename_map_elt in the map at that
2390         location, free it.
2391         (copy_bb_and_scalar_dependences): Do rename_variables after
2392         expand_scalar_variables.
2393         * graphite-clast-to-gimple.c (build_iv_mapping): Update the content
2394         of the map.  When there was already a rename_map_elt in the
2395         map at that location, free it.
2396         (translate_clast): Pass the rename_map.  Do not initialize and free
2397         a rename_map per stmt_user.
2398         (gloog): Initialize and free one rename_map and pass it to
2399         translate_clast.
2400
2401 2009-03-12  Sebastian Pop  <sebastian.pop@amd.com>
2402
2403         * sese.c (expand_scalar_variables_stmt,
2404         expand_scalar_variables_ssa_name): Add a gimple_stmt_iterator
2405         parameter.
2406         (expand_scalar_variables_expr): Handle REALPART_EXPR and IMAGPART_EXPR.
2407         (expand_scalar_variables): Pass to expand_scalar_variables_stmt
2408         the gimple_stmt_iterator of the statement to be expanded.
2409         * graphite-scop-detection.c (is_simple_operand): Do handle
2410         REALPART_EXPR.
2411
2412 2009-03-11  Tobias Grosser  <grosser@fim.uni-passau.de>
2413
2414         * graphite-scop-detection.c (is_simple_operand): Do not handle
2415         REALPART_EXPR.
2416         * testsuite/gcc.dg/graphite/id-2.c: New.
2417
2418         * graphite-sese-to-poly.c (build_bb_loops,
2419         add_value_to_dim, scan_tree_for_params_right_scev,
2420         scan_tree_for_params_int, scan_tree_for_params, idx_record_params,
2421         find_params_in_bb, build_loop_iteration_domains,
2422         add_conditions_to_domain): Remove subtract.
2423
2424 2009-03-11  Tobias Grosser  <grosser@fim.uni-passau.de>
2425
2426         * graphite-clast-to-gimple.c (loop_iv_stack_patch_for_consts,
2427         build_iv_mapping, compute_cloog_iv_types_1, build_cloog_prog):
2428         pbb_loop_at_index -> gbb_loop_at_index.
2429         * graphite-poly.c (new_poly_bb, new_scop): New accessors.
2430         (debug_loop_vec): Delete.
2431         * graphite-poly.h (poly_bb, scop): Change black_box and region to void
2432         pointer.  Move LOOPS to gimple_bb_p and insert nb_params.
2433         (PBB_LOOPS): Removed.
2434         (PBB_BLACK_BOX): Insert cast.
2435         (pbb_set_black_box): New setter.
2436         (pbb_loop_at_index, pbb_loop_index): Removed.
2437         (scop_set_region, scop_set_nb_params): New.
2438         * graphite-sese-to-poly.c (new_gimple_bb, free_gimple_bb,
2439         build_scop_scattering, build_bb_loops): Add GBB_LOOPS.
2440         (build_poly_scop): Use scop_set_nb_params.
2441         * sese.h (gimple_bb): Add LOOPS.
2442         (GBB_LOOPS, gbb_loop_index, gbb_loop_at_index): New.
2443
2444 2009-03-11  Tobias Grosser  <grosser@fim.uni-passau.de>
2445
2446         Revert previous commit.
2447
2448 2009-03-11  Sebastian Pop  <sebastian.pop@amd.com>
2449
2450         * sese.c (expand_scalar_variables_expr): Handle tcc_comparison.
2451         (register_old_and_new_names): Update the content of the map.
2452         When there was already a rename_map_elt in the map at that
2453         location, free it.
2454         (copy_bb_and_scalar_dependences): Do rename_variables after
2455         expand_scalar_variables.
2456         * graphite-clast-to-gimple.c (build_iv_mapping): Update the content
2457         of the map.  When there was already a rename_map_elt in the
2458         map at that location, free it.
2459         (translate_clast): Pass the rename_map.  Do not initialize and free
2460         a rename_map per stmt_user.
2461         (gloog): Initialize and free one rename_map and pass it to
2462         translate_clast.
2463
2464 2009-03-11  Tobias Grosser  <grosser@fim.uni-passau.de>
2465
2466         Remove forgotten line in revert.
2467
2468 2009-03-11  Sebastian Pop  <sebastian.pop@amd.com>
2469
2470         Revert previous commit.
2471
2472 2009-03-10  Sebastian Pop  <sebastian.pop@amd.com>
2473
2474         * sese.c (register_old_and_new_names): Update the content
2475         of the map.  When there was already a rename_map_elt in the
2476         map at that location, free it.
2477         (copy_bb_and_scalar_dependences): Do rename_variables after
2478         expand_scalar_variables.
2479         * graphite-clast-to-gimple.c (build_iv_mapping): Update the content
2480         of the map.  When there was already a rename_map_elt in the
2481         map at that location, free it.
2482         (translate_clast): Pass the rename_map.  Do not initialize and free
2483         a rename_map per stmt_user.
2484         (gloog): Initialize and free one rename_map and pass it to
2485         translate_clast.
2486
2487 2009-03-10  Sebastian Pop  <sebastian.pop@amd.com>
2488
2489         * graphite-clast-to-gimple.c (translate_clast): context_loop
2490         is never NULL.
2491
2492 2009-03-10  Tobias Grosser  <grosser@fim.uni-passau.de>
2493             Sebastian Pop  <sebastian.pop@amd.com>
2494
2495         * graphite-ppl.c (ppl_insert_dimensions): Fix stupid mistake
2496         of the use of ppl_Polyhedron_map_space_dimensions.
2497
2498 2009-03-10  Tobias Grosser  <grosser@fim.uni-passau.de>
2499             Sebastian Pop  <sebastian.pop@amd.com>
2500
2501         * graphite-poly.c (unify_scattering_dimensions): Fix types.
2502         * graphite-poly.h (poly_dr_p, poly_dr, POLY_DR_TYPE, PDR_BB,
2503         PDR_TYPE, PDR_ACCESSES, pdr_accessp_nb_subscripts,
2504         pdr_accessp_nb_iterators, pdr_accessp_nb_params,
2505         pdr_accessp_alias_set_dim, pdr_accessp_subscript_dim,
2506         pdr_accessp_iterator_dim, pdr_accessp_param_dim,
2507         pbb_nb_params): New.
2508         (pbb_nb_loops, pbb_nb_scattering, scop_nb_params,
2509         nb_loops_around_pbb): Adapt return types.
2510
2511 2009-03-09  Tobias Grosser  <grosser@fim.uni-passau.de>
2512
2513         * Makefile.in (graphite.o, graphite-sese-to-poly.o,
2514         graphite-clast-to-gimple.o,  graphite-data-ref.o,
2515         graphite-scop-detection.o, graphite-poly.o): Add
2516         more headers.
2517
2518 2009-03-05  Tobias Grosser  <grosser@fim.uni-passau.de>
2519
2520         * Makefile.in (graphite.o, graphite-sese-to-poly.o,
2521         graphite-clast-to-gimple.o,  graphite-data-ref.o,
2522         graphite-scop-detection.o, graphite-poly.o): Add graphite-poly.h.
2523
2524 2009-03-04  Tobias Grosser  <grosser@fim.uni-passau.de>
2525
2526         * testsuite/gcc.dg/graphite/pr37485.c: Remove -floop-block
2527         * testsuite/gcc.dg/graphite/pr37828.c: Same.
2528         * testsuite/gcc.dg/graphite/pr37684.c: Same.
2529         * testsuite/gcc.dg/graphite/block-0.c: Same.
2530         * testsuite/gcc.dg/graphite/block-1.c: Same.
2531         * testsuite/gcc.dg/graphite/block-2.c: Same.
2532         * testsuite/gcc.dg/graphite/block-3.c: Same.
2533         * testsuite/gcc.dg/graphite/block-4.c: Same.
2534         * testsuite/gcc.dg/graphite/block-5.c: Same.
2535         * testsuite/gcc.dg/graphite/block-6.c: Same.
2536         * testsuite/gfortran.dg/graphite/pr38083.f90: Same.
2537         * testsuite/gfortran.dg/graphite/block-1.f90: Same.
2538         * testsuite/gfortran.dg/graphite/block-3.f90: Same.
2539         * testsuite/gfortran.dg/graphite/pr37852.f90: Same.
2540         * testsuite/gfortran.dg/graphite/block-4.f90: Same.
2541         * testsuite/gfortran.dg/graphite/pr37980.f90: Same.
2542         * testsuite/gfortran.dg/graphite/pr38953.f90: Same.
2543         * testsuite/gfortran.dg/graphite/pr37857.f90: Same.
2544         * opts.c: Remove -floop-block from -O2.
2545         * graphite-poly.c: Fail if -floop-block -floop-interchange or
2546         -floop-strip-mine are used.
2547
2548 2009-03-04  Tobias Grosser  <grosser@fim.uni-passau.de>
2549             Sebastian Pop  <sebastian.pop@amd.com>
2550
2551         * graphite-clast-to-gimple.c (build_cloog_prog): Unify scattering
2552         dimensions.
2553         * graphite-poly.c (pbb_compare, graphite_sort_pbbs,
2554         graphite_trans_bb_move_loop, graphite_trans_bb_strip_mine,
2555         strip_mine_profitable_p, is_interchange_valid,
2556         graphite_trans_bb_block, graphite_trans_loop_block,
2557         graphite_trans_scop_block): Temporary removed.
2558         (extend_scattering, unify_scattering_dimensions): New.
2559         (print_scattering_function, graphite_read_transforms):
2560         PBB_SCATTERING -> PBB_TRANSFORMED_SCATTERING.
2561         (graphite_generate_scattering_fns): Removed.
2562         (apply_poly_transforms): Cleanup.
2563         (free_poly_bb): Add PBB_SCATTERING -> PBB_TRANSFORMED_SCATTERING.
2564         (schedule_to_scattering): Moved.
2565         (PBB_STATIC_SCHEDULE, PBB_SCATTERING): Removed.
2566         (PBB_ORIGINAL_SCATTERING, PBB_TRANSFORMED_SCATTERING): New.
2567         (pbb_nb_scattering): New.
2568         (SCOP_ENTRY, SCOP_EXIT, SCOP_REGION_BBS, SCOP_DEP_GRAPH, SCOP_PARAMS,
2569         SCOP_LOOP_NEST, SCOP_PARAMS, SCOP_OLDIVS, SCOP_LIVEOUT_RENAMES):
2570         Removed.
2571         * graphite-ppl.c (ppl_insert_dimensions): Extended and renamed from
2572         shift_poly.
2573         (ppl_strip_loop): PBB_SCATTERING -> PBB_TRANSFORMED_SCATTERING.
2574         * graphite-scop-detection.c (dot_all_scops_1):  PBB_SCATTERING
2575         -> PBB_TRANSFORMED_SCATTERING.
2576         * graphite-sese-to-poly.c (build_scop_bbs): Remove region.
2577         (build_pbb_scattering_polyhedron): Moved from schedule_to_scattering.
2578         (build_scop_scattering): Renamed from build_scop_canonical_schedules.
2579         (check_poly_representation): Do not return bool.
2580         (graphite_transform_loops): Reformat.
2581         * sese.h (SESE_ENTRY_BB, SESE_EXIT_BB): New.
2582
2583 2009-03-04  Sebastian Pop  <sebastian.pop@amd.com>
2584
2585         * graphite-poly.c (print_pbb_domain, print_pbb, print_scop,
2586         debug_pbb_domain, debug_pbb, debug_scop): New.
2587         * graphite-poly.h (print_pbb_domain, print_pbb, print_scop,
2588         debug_pbb_domain, debug_pbb, debug_scop): Declared.
2589
2590 2009-03-02  Sebastian Pop  <sebastian.pop@amd.com>
2591
2592         PR middle-end/39335
2593         * tree-parloops.c (canonicalize_loop_ivs): Call fold_convert
2594         when the type precision of the induction variable should be
2595         larger than the type precision of nit.
2596         (gen_parallel_loop): Update use of canonicalize_loop_ivs.
2597         * graphite-clast-to-gimple.c (graphite_loop_normal_form): Same.
2598         * tree-flow.h (canonicalize_loop_ivs): Update declaration.
2599
2600         * testsuite/gcc.dg/graphite/pr39335_1.c: New.
2601         * testsuite/gcc.dg/graphite/pr39335.c: New.
2602
2603 2009-03-02  Sebastian Pop  <sebastian.pop@amd.com>
2604
2605         * tree-parloops.c (canonicalize_loop_ivs): reduction_list contains
2606         SSA_NAMES not struct reduction_info.
2607
2608 2009-03-02  Sebastian Pop  <sebastian.pop@amd.com>
2609
2610         * sese.c (expand_scalar_variables_expr): Handle ADDR_EXPR.
2611
2612 2009-02-27  Sebastian Pop  <sebastian.pop@amd.com>
2613             Tobias Grosser  <grosser@fim.uni-passau.de>
2614
2615         * sese.c (new_sese): Initialize SESE_REDUCTION_LIST.
2616         (free_sese): Free SESE_REDUCTION_LIST.
2617         * sese.h (struct sese): Add field reduction_list.
2618         (SESE_REDUCTION_LIST): New.
2619         * graphite-clast-to-gimple.c (graphite_loop_normal_form): Call
2620         canonicalize_loop_ivs on SESE_REDUCTION_LIST.
2621
2622 2009-02-27  Sebastian Pop  <sebastian.pop@amd.com>
2623             Tobias Grosser  <grosser@fim.uni-passau.de>
2624
2625         * tree-flow.h (gather_scalar_reductions): Use struct loop * instead
2626         of loop_p.
2627
2628 2009-02-27  Sebastian Pop  <sebastian.pop@amd.com>
2629             Tobias Grosser  <grosser@fim.uni-passau.de>
2630
2631         * tree-parloops.c (struct brli, build_reduction_list_info,
2632         analyze_reduction_list, gather_scalar_reductions): New.
2633         (loop_parallel_p): Build a reduction list containing only
2634         PHI_RESULT SSA_NAMEs: call gather_scalar_reductions.
2635         (gen_parallel_loop): Call the analysis analyze_reduction_list.
2636         (parallelize_loops): Now reduction_list is a htab_t of SSA_NAMEs.
2637         * tree-flow.h (gather_scalar_reductions): Declared.
2638
2639 2009-02-26  Sebastian Pop  <sebastian.pop@amd.com>
2640
2641         PR middle-end/39308
2642         * graphite-clast-to-gimple.c (graphite_loop_normal_form): Do not call
2643         number_of_iterations_exit from a gcc_assert.
2644
2645 2009-02-25  Sebastian Pop  <sebastian.pop@amd.com>
2646             Jan Sjodin  <jan.sjodin@amd.com>
2647
2648         * output.h (graphite_out_file, graphite_in_file): Declared.
2649         * toplev.c (graphite_out_file, graphite_in_file): New.
2650         (init_asm_output): Initialize graphite_in_file and graphite_out_file.
2651         * graphite-clast-to-gimple.c (build_cloog_prog): Read PBB_SCATTERING.
2652         Don't call schedule_to_scattering.
2653         * common.opt (fgraphite-write, fgraphite-read): New.
2654         * graphite-poly.c: Include output.h.
2655         (print_scattering_function, print_scattering_functions,
2656         debug_scattering_function, debug_scattering_functions,
2657         graphite_write_transforms, graphite_read_transforms,
2658         graphite_generate_scattering_fns): New.
2659         (apply_poly_transforms): Do not apply transform if flag_graphite_read.
2660         Call graphite_generate_scattering_fns, graphite_write_transforms,
2661         graphite_read_transforms.
2662         (new_poly_bb): Initialize PBB_SCATTERING.
2663         (free_poly_bb): Free PBB_SCATTERING.
2664         (schedule_to_scattering): Does not return, initialize PBB_SCATTERING.
2665         * graphite-poly.h (struct poly_bb): Add field scattering.
2666         (PBB_SCATTERING): New.
2667         (print_scattering_function, print_scattering_functions,
2668         debug_scattering_function, debug_scattering_functions): Declared.
2669         * graphite-ppl.c (cloog_matrix_to_ppl_constraint): Matrices contain
2670         GMP values, not integers!
2671         (ppl_print_polyhedron_matrix, debug_ppl_polyhedron_matrix,
2672         ppl_read_polyhedron_matrix): New.
2673         * graphite-ppl.h (ppl_print_polyhedron_matrix,
2674         debug_ppl_polyhedron_matrix,
2675         ppl_read_polyhedron_matrix): Declared.
2676         * Makefile.in (graphite-poly.o): Depends on output.h.
2677
2678 2009-02-23  Sebastian Pop  <sebastian.pop@amd.com>
2679             Tobias Grosser  <grosser@fim.uni-passau.de>
2680
2681         Revert this change:
2682         * graphite-scop-detection.c (stmt_simple_for_scop_p): Analyze
2683         scalar evolutions in the scop_entry->loop_father.
2684
2685 2009-02-23  Sebastian Pop  <sebastian.pop@amd.com>
2686             Tobias Grosser  <grosser@fim.uni-passau.de>
2687
2688         * graphite.h (ref_nb_loops): Remove declaration.
2689         (struct gimple_bb, gimple_bb_p, GBB_BB, GBB_DATA_REFS, GBB_CONDITIONS,
2690         GBB_CONDITION_CASES, GBB_CLOOG_IV_TYPES, gbb_loop, print_gimple_bb,
2691         debug_gbb): Moved to sese.h.
2692         * sese.h: As said.
2693
2694 2009-02-23  Sebastian Pop  <sebastian.pop@amd.com>
2695             Tobias Grosser  <grosser@fim.uni-passau.de>
2696
2697         * graphite-data-ref.[ch]: Disable.
2698
2699 2009-02-23  Sebastian Pop  <sebastian.pop@amd.com>
2700             Tobias Grosser  <grosser@fim.uni-passau.de>
2701
2702         * graphite-scop-detection.c (stmt_simple_for_scop_p): Analyze
2703         scalar evolutions in the scop_entry->loop_father.
2704
2705 2009-02-23  Sebastian Pop  <sebastian.pop@amd.com>
2706
2707         * graphite-scop-detection.c (nb_reductions_in_loop): Moved here...
2708         (graphite_cannot_represent_loop_niter): Renamed
2709         graphite_cannot_represent_loop.  Call nb_reductions_in_loop.
2710         (limit_scops): build_sese_loop_nests does not return a bool.
2711         * graphite-scop-detection.h (nb_reductions_in_loop): Declared.
2712         * sese.c (nb_reductions_in_loop): ... from here.
2713         (graphite_loop_normal_form): ... from here.
2714         (sese_record_loop): Does not fail, so does not return a bool.
2715         (build_sese_loop_nests): Same.
2716         * sese.h (build_sese_loop_nests): Update declaration.
2717         * graphite-clast-to-gimple.c (graphite_loop_normal_form): Moved here...
2718         (build_graphite_loop_normal_form): New.
2719         (gloog): Call build_graphite_loop_normal_form.
2720         * graphite-sese-to-poly.c (build_poly_scop): Don't fail on
2721         build_sese_loop_nests.
2722
2723         * testsuite/gcc.dg/graphite/id-1.c: New.
2724
2725 2009-02-23  Sebastian Pop  <sebastian.pop@amd.com>
2726             Tobias Grosser  <grosser@fim.uni-passau.de>
2727
2728         * graphite-sese-to-poly.c (scan_tree_for_params): Remove REAL_CST.
2729         The SCoP detection fix is sufficient.
2730
2731 2009-02-21  Sebastian Pop  <sebastian.pop@amd.com>
2732
2733         PR tree-optimization/39260
2734         * graphite-scop-detection.c (harmful_stmt_in_bb): Stop a SCoP when
2735         the basic block contains a condition with a real type.
2736         * graphite-sese-to-poly.c (scan_tree_for_params): Handle REAL_CST.
2737
2738         * gcc.dg/graphite/pr39260.c: New.
2739
2740 2009-02-21  Sebastian Pop  <sebastian.pop@amd.com>
2741
2742         * graphite-poly.c: Inlcude params.h.
2743         (graphite_trans_loop_block): Use PARAM_LOOP_BLOCK_TILE_SIZE for
2744         the size of a tile.
2745         * Makefile.in (graphite-poly.o): Depend on PARAMS_H.
2746         * params.def (PARAM_LOOP_BLOCK_TILE_SIZE): Define.
2747
2748 2009-02-20  Sebastian Pop  <sebastian.pop@amd.com>
2749             Tobias Grosser  <grosser@fim.uni-passau.de>
2750
2751         * graphite-scop-detection.c (dot_all_scops_1,
2752         dot_all_scops): Moved here.
2753         * graphite-scop-detection.h (dot_all_scops): Declared here.
2754         * graphite.c (graphite_initialize, graphite_finalize): New.
2755         (graphite_transform_loops): Cleaned up.
2756         * sese.c (debug_oldivs): Moved here.
2757         * graphite-poly.c (graphite_apply_transformations): Renamed
2758         apply_poly_transforms.
2759         (debug_loop_vec): Moved here.
2760         * graphite-sese-to-poly.c (build_bb_loops, build_sese_conditions_1,
2761         scop_contains_non_iv_scalar_phi_nodes, build_sese_conditions,
2762         find_scop_parameters, build_scop_iteration_domain,
2763         add_conditions_to_constraints, build_scop_canonical_schedules,
2764         build_scop_data_accesses): Now static.
2765         (build_poly_scop, check_poly_representation): New.
2766
2767 2009-02-20  Sebastian Pop  <sebastian.pop@amd.com>
2768
2769         * graphite.c (graphite_stmt_p, new_gimple_bb, free_gimple_bb,
2770         remove_gbbs_in_scop, free_scops, try_generate_gimple_bb,
2771         build_scop_bbs, ref_nb_loops, compare_prefix_loops,
2772         build_scop_canonical_schedules, build_bb_loops, add_value_to_dim,
2773         scan_tree_for_params_right_scev, scan_tree_for_params_int,
2774         scan_tree_for_params, struct irp_data, dx_record_params,
2775         find_params_in_bb, find_scop_parameters, gbb_from_bb,
2776         build_loop_iteration_domains, add_conditions_to_domain,
2777         phi_node_is_iv, bb_contains_non_iv_scalar_phi_nodes,
2778         scop_contains_non_iv_scalar_phi_nodes, build_sese_conditions_1,
2779         build_sese_conditions, add_conditions_to_constraints,
2780         build_scop_iteration_domain, build_access_matrix_with_af,
2781         build_access_matrix,
2782         build_scop_data_accesses): Moved to graphite-sese-to-poly.c.
2783
2784         * graphite-sese-to-poly.c: New.
2785         * graphite-sese-to-poly.h: New.
2786
2787         * Makefile.in: Add new rule for graphite-sese-to-poly.o.
2788
2789 2009-02-20  Sebastian Pop  <sebastian.pop@amd.com>
2790
2791         * graphite.c: Split graphite code generation to a new file.
2792         (graphite_verify, gmp_cst_to_tree, clast_name_to_gcc,
2793         max_precision_type, clast_to_gcc_expression_red,
2794         clast_to_gcc_expression, gcc_type_for_clast_expr,
2795         gcc_type_for_clast_eq, loop_iv_stack_patch_for_consts,
2796         graphite_translate_clast_equation, graphite_create_guard_cond_expr,
2797         graphite_create_new_guard, clast_get_body_of_loop,
2798         gcc_type_for_cloog_iv, gcc_type_for_iv_of_clast_loop,
2799         graphite_create_new_loop, build_iv_mapping, copy_renames,
2800         translate_clast, find_cloog_iv_in_expr, compute_cloog_iv_types_1,
2801         compute_cloog_iv_types, free_scattering, save_var_name,
2802         initialize_cloog_names, build_scop_context, build_cloog_prog,
2803         set_cloog_options, debug_clast_stmt, scop_to_clast,
2804         print_generated_program, debug_generated_program,
2805         gloog): Moved to graphite-clast-to-gimple.c.
2806
2807         (struct cloog_prog_clast): Moved to graphite-clast-to-gimple.h.
2808
2809         (iv_stack_entry_is_constant, iv_stack_entry_is_iv,
2810         loop_iv_stack_push_iv, loop_iv_stack_insert_constant,
2811         loop_iv_stack_pop, loop_iv_stack_get_iv,
2812         loop_iv_stack_get_iv_from_name, debug_loop_iv_stack,
2813         free_loop_iv_stack, loop_iv_stack_remove_constants,
2814         debug_rename_elt, debug_rename_map_1, debug_rename_map,
2815         rename_map_elt_info, eq_rename_map_elts, debug_ivtype_elt,
2816         debug_ivtype_map_1, debug_ivtype_map, ivtype_map_elt_info,
2817         eq_ivtype_map_elts, sese_add_exit_phis_edge,
2818         sese_add_exit_phis_var, sese_insert_phis_for_liveouts,
2819         get_vdef_before_sese, sese_adjust_vphi,
2820         get_new_name_from_old_name, sese_adjust_phis_for_liveouts,
2821         oldiv_for_loop, rename_variables_in_stmt, is_parameter,
2822         is_iv, expand_scalar_variables_ssa_name,
2823         expand_scalar_variables_expr, expand_scalar_variables_stmt,
2824         expand_scalar_variables, rename_variables, remove_condition,
2825         get_true_edge_from_guard_bb, get_false_edge_from_guard_bb,
2826         add_loop_exit_phis, insert_loop_close_phis, struct igp,
2827         default_liveout_before_guard, add_guard_exit_phis,
2828         insert_guard_phis, register_old_and_new_names,
2829         graphite_copy_stmts_from_block, register_sese_liveout_renames,
2830         copy_bb_and_scalar_dependences, outermost_loop_in_sese,
2831         if_region_set_false_region, create_if_region_on_edge,
2832         move_sese_in_condition): Moved to sese.c.
2833
2834         (nb_loops_around_loop_in_sese, struct ifsese, if_region_entry,
2835         if_region_exit, if_region_get_condition_block,
2836         struct rename_map_elt, new_rename_map_elt, enum iv_stack_entry_kind,
2837         union iv_stack_entry_data_union, struct iv_stack_entry_struct,
2838         iv_stack_entry_p, loop_iv_stack, struct ivtype_map_elt,
2839         ivtype_map_elt, new_ivtype_map_elt,
2840         recompute_all_dominators): Moved to sese.h.
2841
2842         * graphite-clast-to-gimple.c: New.
2843         * graphite-clast-to-gimple.h: New.
2844         * Makefile.in: Add new rule for graphite-clast-to-gimple.o.
2845         * sese.c: Modified as said above.
2846         * sese.h: Same.
2847
2848 2009-02-20  Sebastian Pop  <sebastian.pop@amd.com>
2849
2850         * graphite.c: Split scop detection to a new file.
2851         (enum gbb_type, gbb_type, get_bb_type, struct sd_region_p, sd_region,
2852         move_sd_regions, loop_affine_expr, exclude_component_ref,
2853         is_simple_operand, stmt_simple_for_scop_p, harmful_stmt_in_bb,
2854         graphite_cannot_represent_loop_niter, struct scopdet_info,
2855         scopdet_basic_block_info, build_scops_1, bb_in_sd_region,
2856         find_single_entry_edge, find_single_exit_edge,
2857         create_single_entry_edge, sd_region_without_exit,
2858         create_single_exit_edge, unmark_exit_edges, mark_exit_edges,
2859         create_sese_edges, build_graphite_scops, limit_scops, build_scops):
2860         Moved to graphite-scop-detection.c.
2861
2862         * graphite-scop-detection.c: New.
2863         * graphite-scop-detection.h: New.
2864         * Makefile.in: Add new rule for graphite-scop-detection.o.
2865
2866         * sese.c: Include tree-chrec.h, tree-data-ref.h, and
2867         tree-scalar-evolution.h.
2868         (nb_reductions_in_loop, graphite_loop_normal_form, sese_record_loop,
2869         build_sese_loop_nests): Moved here from graphite.c.
2870         (param_index): Renamed parameter_index_in_region.
2871
2872 2009-02-18  Tobias Grosser  <grosser@fim.uni-passau.de>
2873             Sebastian Pop  <sebastian.pop@amd.com>
2874
2875         * gcc.dg/graphite/block-0.c: Expected to fail now.
2876         * gcc.dg/graphite/block-1.c: Same.
2877         * gcc.dg/graphite/block-5.c: Same.
2878         * gcc.dg/graphite/block-6.c: Same.
2879
2880 2009-02-18  Tobias Grosser  <grosser@fim.uni-passau.de>
2881             Sebastian Pop  <sebastian.pop@amd.com>
2882
2883         * graphite.h: Separate from graphite_bb_p the polyhedral
2884         representation in poly_bb_p and the GCC specifics in gimple_bb_p.
2885         (struct data_dependence_polyhedron, RDGE_DDP, ddp_p): Moved to
2886         graphite-data-ref.h.
2887         (struct poly_bb, PBB_SCOP, PBB_STATIC_SCHEDULE, PBB_DOMAIN,
2888         PBB_BLACK_BOX, PBB_LOOPS, pbb_nb_loops, pbb_loop_at_index,
2889         pbb_loop_index, struct scop, SCOP_BBS, SCOP_REGION, SCOP_ENTRY,
2890         SCOP_EXIT, SCOP_REGION_BBS, SCOP_DEP_GRAPH, SCOP_PARAMS,
2891         SCOP_LOOP_NEST, SCOP_PARAMS, SCOP_OLDIVS, SCOP_LIVEOUT_RENAMES,
2892         scop_nb_params): Moved to graphite-poly.h.
2893         * graphite-data-ref.c: Same.
2894         * graphite-data-ref.h: New.
2895         * graphite.c: Same.
2896         (pbb_compare, graphite_sort_pbbs, graphite_trans_bb_move_loop,
2897         graphite_trans_bb_strip_mine, strip_mine_profitable_p,
2898         is_interchange_valid, graphite_trans_bb_block,
2899         graphite_trans_loop_block, scop_max_loop_depth,
2900         graphite_trans_scop_block, graphite_apply_transformations,
2901         new_poly_bb, free_poly_bb, new_scop, free_scop): Moved to
2902         graphite-poly.c.
2903         * graphite-poly.h: New.
2904         * graphite-poly.c: New.
2905         * Makefile.in (OBJS-common): Add graphite-poly.o.
2906         (graphite-poly.o): New rule.
2907         * tree-data-ref.h (struct data_reference): Remove unused scop field.
2908         (DR_SCOP): Removed.
2909
2910 2009-02-18  Sebastian Pop  <sebastian.pop@amd.com>
2911             Tobias Grosser  <grosser@fim.uni-passau.de>
2912
2913         * graphite.c: Replace gb -> gbb.
2914         * graphite.h: Same.
2915         * graphite-data-ref.c: Same.
2916
2917 2009-02-18  Sebastian Pop  <sebastian.pop@amd.com>
2918             Tobias Grosser  <grosser@fim.uni-passau.de>
2919
2920         * Makefile.in (OBJS-commmon): Add sese.o.
2921         (sese.o): New.
2922         (graphite.o): Add sese.h.
2923         * graphite.c (bb_in_ss_p, loop_in_sese_p,
2924         sese_build_livein_liveouts_use, sese_build_livein_liveouts_bb,
2925         sese_build_livein_liveouts, register_bb_in_sese, new_sese, free_sese):
2926         Move to sese.
2927         (block_before_scop): Add missing return.
2928         (new_scop, free_scop): Remove SESE data structures.
2929         (scop_record_loop, scan_tree_for_params, find_params_in_bb,
2930         find_scop_parameters, build_loop_iteration_domains,
2931         add_conditions_to_domain, register_scop_liveout_renames,
2932         copy_bb_and_scalar_dependences): Scop -> SESE.
2933
2934         (add_conditions_to_domain): SCoP -> SESE and remove check
2935         (scop_contains_non_iv_scalar_phi_nodes): New.
2936         (build_scop_conditions_1, build_scop_conditions): Remove check for
2937         non iv scalar phi nodes.
2938         (print_scop_statistics): New.
2939         (graphite_transform_loops): Cleanup.
2940
2941         * graphite.h: Move to sese & cleanup.
2942         * sese.c: New.
2943         * sese.h: New.
2944
2945 2009-02-16  Sebastian Pop  <sebastian.pop@amd.com>
2946             Tobias Grosser  <grosser@fim.uni-passau.de>
2947
2948         * graphite.c (build_scop_conditions_1): Conditions are only
2949         at the end of a basic block.
2950
2951 2009-02-16  Sebastian Pop  <sebastian.pop@amd.com>
2952             Tobias Grosser  <grosser@fim.uni-passau>
2953
2954         * graphite.h (struct graphite_bb): Remove compressed_alpha_matrix
2955         field.
2956         (GBB_ALPHA): Removed.
2957
2958 2009-02-16  Sebastian Pop  <sebastian.pop@amd.com>
2959             Tobias Grosser  <grosser@fim.uni-passau.de>
2960
2961         * graphite-data-ref.c (graphite_test_dependence): Don't use
2962         GBB_DYNAMIC_SCHEDULE.
2963         * graphite.c (new_graphite_bb): Same.
2964         (free_graphite_bb): Same.
2965         (build_scop_dynamic_schedules): Removed.
2966         (graphite_transform_loops): Don't call it.
2967         * graphite.h (struct graphite_bb): Remove dynamic_schedule field.
2968         (GBB_DYNAMIC_SCHEDULE): Removed.
2969
2970 2009-02-16  Sebastian Pop  <sebastian.pop@amd.com>
2971             Tobias Grosser  <grosser@fim.uni-passau.de>
2972
2973         * graphite.c (schedule_to_scattering): Don't use CloogMatrix.
2974         (print_graphite_bb): Same.
2975         (build_cloog_prog): Same.
2976
2977 2009-02-16  Sebastian Pop  <sebastian.pop@amd.com>
2978             Tobias Grosser  <grosser@fim.uni-passau.de>
2979
2980         * graphite.c (build_cloog_prog): Don't use CloogMatrix.
2981
2982 2009-02-16  Sebastian Pop  <sebastian.pop@amd.com>
2983             Tobias Grosser  <grosser@fim.uni-passau.de>
2984
2985         * graphite.c (build_scop_context): Don't use CloogMatrix.
2986         * graphite-ppl.c (new_Cloog_Domain_from_ppl_Polyhedron): New.
2987         * graphite-ppl.h (new_Cloog_Domain_from_ppl_Polyhedron): Declared.
2988
2989 2009-02-16  Sebastian Pop  <sebastian.pop@amd.com>
2990             Tobias Grosser  <grosser@fim.uni-passau.de>
2991
2992         * graphite.h (struct scop): Move params, old_ivs, loops, loop_nest,
2993         liveout_renames, add_params fields...
2994         (struct sese): ... here.
2995         (SESE_PARAMS, SESE_LOOPS, SESE_LOOP_NEST, SESE_ADD_PARAMS,
2996         SESE_PARAMS, SESE_OLDIVS, SESE_LIVEOUT_RENAMES): New.
2997
2998 2009-02-16  Sebastian Pop  <sebastian.pop@amd.com>
2999             Tobias Grosser  <grosser@fim.uni-passau.de>
3000
3001         * graphite.c (print_scop): Do not print the CLooG program.
3002         (new_scop, free_scop, initialize_cloog_names, build_scop_context,
3003         build_cloog_prog, gloog): Don't use SCOP_PROG.
3004         (find_transform): Renamed scop_to_clast.
3005         (print_generated_program, debug_generated_program): New.
3006         (graphite_transform_loops): Adapt to new interface.
3007         * graphite.h (struct scop): Remove program field.
3008         (SCOP_PROG): Removed.
3009         (print_generated_program, debug_generated_program): Declared.
3010
3011 2009-02-16  Sebastian Pop  <sebastian.pop@amd.com>
3012
3013         * graphite-data-ref.c (schedule_precedes_p, schedule_same_p): New.
3014         (statement_precedes_p): Use schedule_same_p and schedule_precedes_p.
3015         * graphite.c (gbb_compare, schedule_to_scattering, print_graphite_bb,
3016         free_graphite_bb, build_scop_canonical_schedules,
3017         graphite_trans_bb_strip_mine, graphite_trans_scop_block): Static
3018         schedules are now represented using a ppl_Linear_Expression_t.
3019         * graphite.h (struct graphite_bb): Same.
3020         * graphite-ppl.c (ppl_lexico_compare_linear_expressions): New.
3021         * graphite-ppl.h (ppl_lexico_compare_linear_expressions): Declared.
3022
3023 2009-02-15  Sebastian Pop  <sebastian.pop@amd.com>
3024
3025         * graphite.c: Free local memory.
3026         * graphite-ppl.c: Same.
3027
3028 2009-02-15  Sebastian Pop  <sebastian.pop@amd.com>
3029
3030         * graphite.c (const_column_index, get_first_matching_sign_row_index,
3031         get_lower_bound_row, get_upper_bound_row, copy_constraint,
3032         swap_constraint_variables, scale_constraint_variable): Removed.
3033         (graphite_trans_bb_strip_mine): Remove pong.
3034         * graphite-ppl.c: Include missing header files.
3035         (set_inhomogeneous, set_coef, shift_poly, ppl_strip_loop): New.
3036         * graphite-ppl.h (ppl_strip_loop): Declared.
3037         * Makefile.in (graphite-ppl.o): Adjust dependences.
3038
3039 2009-02-14  Sebastian Pop  <sebastian.pop@amd.com>
3040
3041         * graphite.c (build_loop_iteration_domains): Remove ping pong.
3042         (build_scop_iteration_domain): Same.
3043
3044 2009-02-13  Sebastian Pop  <sebastian.pop@amd.com>
3045
3046         * graphite.c (scan_tree_for_params, add_conditions_to_domain): Remove
3047         ping pong.
3048         (add_value_to_dim, scan_tree_for_params_right_scev,
3049         scan_tree_for_params_int): New.
3050         * graphite-ppl.c (oppose_constraint): New.
3051         (insert_constraint_into_matrix): Implement missing cases.
3052         * graphite-ppl.h (insert_constraint_into_matrix): Declared.
3053
3054 2009-02-13  Sebastian Pop  <sebastian.pop@amd.com>
3055
3056         * graphite.c (graphite_trans_bb_move_loop): Remove ping pong,
3057         use ppl_move_dimension.
3058
3059 2009-02-12  Sebastian Pop  <sebastian.pop@amd.com>
3060
3061         * graphite-data-ref.c: Domains are now ppl_Polyhedra_t.
3062         * graphite.c: Same.
3063         * graphite.h: Same.
3064         * graphite-ppl.c: Same.
3065         * graphite-ppl.h: Same.
3066
3067 2009-02-12  Sebastian Pop  <sebastian.pop@amd.com>
3068
3069         Revert last 3 commits.
3070
3071 2009-02-10  Sebastian Pop  <sebastian.pop@amd.com>
3072
3073         * graphite.c (scan_tree_for_params, add_conditions_to_domain): Remove
3074         ping pong.
3075         (add_value_to_dim, scan_tree_for_params_right_scev,
3076         scan_tree_for_params_int): New.
3077         * graphite-ppl.c (oppose_constraint): New.
3078         (insert_constraint_into_matrix): Implement missing cases.
3079         * graphite-ppl.h (insert_constraint_into_matrix): Declared.
3080
3081 2009-02-10  Sebastian Pop  <sebastian.pop@amd.com>
3082
3083         * graphite.c (graphite_trans_bb_move_loop): Remove unused variables.
3084
3085 2009-02-10  Sebastian Pop  <sebastian.pop@amd.com>
3086             Tobias Grosser  <grosser@fim.uni-passau.de>
3087
3088         * graphite.c (graphite_trans_bb_move_loop): Remove ping pong,
3089         use ppl_move_dimension.
3090         * graphite-ppl.c (ppl_move_dimension): New.
3091         * graphite-ppl.h (ppl_move_dimension): Declared.
3092
3093 2009-02-10  Sebastian Pop  <sebastian.pop@amd.com>
3094
3095         * graphite.c: Do not include cloog/cloog.h.
3096         (print_graphite_bb): Remove ping pong, call PPL print function.
3097
3098 2009-02-10  Tobias Grosser  <grosser@fim.uni-passau.de>
3099
3100         * Makefile.in (OBJS-common): Add graphite-ppl.o.
3101         (graphite.o): Add dependence on graphite-ppl.h.
3102         (graphite-ppl.o): New.
3103         (graphite-data-ref.c): Ping pong between PPL data structures
3104         and matrices.
3105         * graphite-ppl.c: New.
3106         * graphite-ppl.h: New.
3107         * graphite.c: Include graphite-ppl.h.
3108         (print_graphite_bb, add_conditions_to_domain, build_cloog_prog,
3109         graphite_trans_bb_move_loop, graphite_trans_bb_strip_mine):
3110         Ping pong between PPL data structures and matrices.
3111         (new_graphite_bb): Create a PPL constraint system.
3112         Call ppl_delete_Constraint_System instead of cloog_matrix_free.
3113         (build_loop_iteration_domains): Use PPL functions.
3114         * graphite.h: Include graphite-ppl.h.  Fix comments.
3115         (graphite_bb): Use a ppl_Constraint_System_t instead of
3116         CloogMatrix for representing the domain.
3117         (scop): Remove static_schedule.
3118         (gbb_nb_loops): Ping pong between PPL data structures and matrices.
3119
3120 2009-02-06  Sebastian Pop  <sebastian.pop@amd.com>
3121
3122         * graphite.c: Fix some comments.
3123
3124 2009-02-05  Sebastian Pop  <sebastian.pop@amd.com>
3125
3126         PR middle-end/38953
3127         * graphite.c (if_region_set_false_region): After moving a region
3128         in the false branch of a condition, remove the empty dummy
3129         basic block.
3130         (gloog): Remove wrong fix for PR38953.
3131
3132 2009-02-03  Tobias Grosser  <grosser@fim.uni-passau.de>
3133
3134         * graphite.c (bb_in_sese_p, sese_build_livein_liveouts_use,
3135         sese_build_livein_liveouts_bb, sese_build_livein_liveouts,
3136         register_bb_in_sese, new_sese, free_sese): Moved.
3137         (dot_scop_1, build_scop_loop_nests, build_loop_iteration_domains,
3138         outermost_loop_in_scop, build_scop_iteration_domain,
3139         expand_scalar_variables_ssa_name, get_vdef_before_scop,
3140         limit_scops): Use bb_in_sese_p instead of bb_in_scop_p.
3141         Use loop_in_sese_p instead of loop_in_scop_p.
3142         (new_graphite_bb, new_scop, gloog): Do not initialize SCOP_BBS_B.
3143         (free_scop): Do not free SCOP_BBS_B.
3144         (nb_loops_around_loop_in_scop, nb_loops_around_gb,
3145         ref_nb_loops): Moved here...
3146         * graphite.h (ref_nb_loops): ... from here.
3147         (struct scop): Remove bbs_b bitmap.
3148         (SCOP_BBS_B, bb_in_scop_p, loop_in_scop_p): Removed.
3149         * testsuite/gcc.dg/graphite/scop-19.c: New
3150
3151 2009-02-03  Tobias Grosser  <grosser@fim.uni-passau.de>
3152
3153         * graphite.c (scopdet_basic_block_info): Fix bug in scop
3154         detection.
3155
3156 2009-01-30  Tobias Grosser  <grosser@fim.uni-passau.de>
3157
3158         * graphite.c (new_loop_to_cloog_loop_str, hash_loop_to_cloog_loop,
3159         eq_loop_to_cloog_loop): Remove.
3160         (new_scop, free_scop): Remove SCOP_LOOP2CLOOG_LOOP.
3161         * graphite.h (struct scop): Remove loop2cloog_loop.
3162         (loop_domain_dim, loop_iteration_vector_dim): Remove.
3163
3164 2009-01-30  Tobias Grosser  <grosser@fim.uni-passau.de>
3165
3166         * opts.c (decode_options): Only add graphite options to O2
3167         if we compile with graphite enabled.
3168
3169 2009-01-26  Sebastian Pop  <sebastian.pop@amd.com>
3170
3171         * Merge from mainline (r143163:143684).
3172
3173 2009-01-26  Sebastian Pop  <sebastian.pop@amd.com>
3174
3175         * graphite.c (debug_value): Removed.
3176         * graphite.h (debug_value): Removed.
3177
3178 2009-01-23  Sebastian Pop  <sebastian.pop@amd.com>
3179
3180         * passes.c (init_optimization_passes): Do not call pass_copy_prop
3181         after graphite: pass_copy_prop does not maintain a proper loop closed
3182         SSA form.  pass_copy_prop should be fixed.
3183
3184 2009-01-23  Sebastian Pop  <sebastian.pop@amd.com>
3185
3186         * graphite.c (scop_adjust_phis_for_liveouts): Fix warning.
3187
3188 2009-01-23  Sebastian Pop  <sebastian.pop@amd.com>
3189
3190         * graphite.c (graphite_verify): Add a call to verify_loop_closed_ssa.
3191         (gloog): Split the exit of the scop when the scop exit is a loop exit.
3192         (graphite_transform_loops): Only call cleanup_tree_cfg if gloog
3193         changed the CFG.
3194
3195 2009-01-20  Sebastian Pop  <sebastian.pop@amd.com>
3196
3197         * graphite.c (gloog): Return true when code gen succeeded.
3198         (graphite_transform_loops): Do not call cleanup_tree_cfg if
3199         the code of the function did not changed.  After cleanup_tree_cfg
3200         call rewrite_into_loop_closed_ssa to maintain the loop closed ssa
3201         form.
3202
3203 2009-01-19  Sebastian Pop  <sebastian.pop@amd.com>
3204
3205         * graphite.c (stmt_simple_for_scop_p): Also handle cases when
3206         gimple_call_lhs is NULL.
3207
3208 2009-01-16  Sebastian Pop  <sebastian.pop@amd.com>
3209             Tobias Grosser  <tobi.grosser@amd.com>
3210
3211         * graphite.c (graphite_trans_scop_block): Do not block single
3212         nested loops.
3213
3214 2009-01-15  Sebastian Pop  <sebastian.pop@amd.com>
3215             Tobias Grosser  <tobi.grosser@amd.com>
3216
3217         * graphite.c (build_scop_canonical_schedules): Start schedules at
3218         zero.
3219
3220 2009-01-15  Sebastian Pop  <sebastian.pop@amd.com>
3221             Tobias Grosser  <tobi.grosser@amd.com>
3222
3223         * graphite.c (compare_prefix_loops): New.
3224         (build_scop_canonical_schedules): Rewritten.
3225         (graphite_transform_loops): Move build_scop_canonical_schedules
3226         after build_scop_iteration_domain.
3227
3228 2009-01-14  Sebastian Pop  <sebastian.pop@amd.com>
3229             Tobias Grosser  <tobi.grosser@amd.com>
3230
3231         * graphite.c (add_conditions_to_domain): Add the loops to
3232         the dimension of the iteration domain.  Do copy the domain
3233         only when it exists.
3234         (build_scop_conditions_1): Do not call add_conditions_to_domain.
3235         (add_conditions_to_constraints): New.
3236         (can_generate_code_stmt, can_generate_code): Removed.
3237         (gloog): Do not call can_generate_code.
3238         (graphite_transform_loops): Call add_conditions_to_constraints
3239         after building the iteration domain.
3240
3241 2009-01-14  Sebastian Pop  <sebastian.pop@amd.com>
3242             Tobias Grosser  <tobi.grosser@amd.com>
3243             Jan Sjodin  <jan.sjodin@amd.com>
3244
3245         * graphite.c (scan_tree_for_params): On substractions negate
3246         all the coefficients of the term.
3247         (clast_to_gcc_expression_red): New.  Handle reduction expressions
3248         of more than two operands.
3249         (clast_to_gcc_expression): Call clast_to_gcc_expression_red.
3250         (get_vdef_before_scop): Handle also the case of default definitions.
3251
3252 2009-01-14  Sebastian Pop  <sebastian.pop@amd.com>
3253
3254         PR middle-end/38431
3255         * graphite.c (get_vdef_before_scop, scop_adjust_vphi): New.
3256         (scop_adjust_phis_for_liveouts): Call scop_adjust_vphi.
3257         (gloog): Do not call cleanup_tree_cfg.
3258         (graphite_transform_loops): Call cleanup_tree_cfg after all
3259         scops have been code generated.
3260
3261 2009-01-13  Sebastian Pop  <sebastian.pop@amd.com>
3262
3263         * passes.c (init_optimization_passes): Schedule after
3264         graphite transforms pass_copy_prop, pass_dce_loop and pass_lim.
3265
3266 2009-01-13  Sebastian Pop  <sebastian.pop@amd.com>
3267
3268         * graphite.c (expand_scalar_variables_stmt): Do not pass loop_p.
3269         Fix comment.
3270         (expand_scalar_variables_ssa_name): Do not pass loop_p.  Fix comment.
3271         Set the type of an expression to the type of its assign statement.
3272         (expand_scalar_variables_expr):  Do not pass loop_p.
3273         Fix comment.  Stop recursion on tcc_constant or tcc_declaration.
3274         (copy_bb_and_scalar_dependences): Do not pass loop_p.
3275         (translate_clast): Update call to copy_bb_and_scalar_dependences.
3276
3277 2009-01-11  Sebastian Pop  <sebastian.pop@amd.com>
3278
3279         * graphite.c (expand_scalar_variables_ssa_name): Set the type of
3280         an expression to the gimple_expr_type of its assign statement.
3281         (expand_scalar_variables_expr): Stop recursion on tcc_constant
3282         or tcc_declaration.
3283
3284 2009-01-11  Sebastian Pop  <sebastian.pop@amd.com>
3285
3286         PR tree-optimization/38786
3287         * testsuite/gcc.dg/graphite/pr38786.c: New.
3288         * graphite.c (expand_scalar_variables_ssa_name): New, outlined from
3289         the SSA_NAME case of expand_scalar_variables_expr.
3290         (expand_scalar_variables_expr): Also gather the scalar computation
3291         used to index the memory access.
3292         (expand_scalar_variables_stmt): Pass to expand_scalar_variables_expr
3293         the gimple_stmt_iterator where it inserts new code.
3294
3295 2009-01-10  Sebastian Pop  <sebastian.pop@amd.com>
3296
3297         * testsuite/gcc.dg/graphite/block-3.c: Fix compile error on 32bit.
3298
3299 2009-01-10  Sebastian Pop  <sebastian.pop@amd.com>
3300
3301         * opts.c (decode_options): Enable flag_graphite_identity and
3302         flag_loop_block in -O2 and above.
3303
3304 2009-01-08  Sebastian Pop  <sebastian.pop@amd.com>
3305
3306         * libjava/classpath/lib/gnu/java/awt/peer/gtk/GtkMouseInfoPeer.class:
3307         Fix merge problem: replace with the file from trunk.
3308
3309 2009-01-08  Sebastian Pop  <sebastian.pop@amd.com>
3310
3311         * Merge from mainline (r141727:143163).
3312
3313 2009-01-07  Sebastian Pop  <sebastian.pop@amd.com>
3314             Jan Sjodin  <jan.sjodin@amd.com>
3315
3316         PR tree-optimization/38559
3317         * testsuite/gcc.dg/graphite/pr38559.c: New.
3318
3319         * graphite.c (debug_value, copy_constraint,
3320         swap_constraint_variables, scale_constraint_variable, ): New.
3321         (get_lower_bound, get_upper_bound): Removed.
3322         (graphite_trans_bb_strip_mine): Clean up this code that works
3323         only for constant number of iterations.  Fully copy upper and
3324         lower bound constraints, not only the constant part of them.
3325         * graphite.h (debug_value): Declared.
3326
3327 2009-01-06  Jan Sjodin  <jan.sjodin@amd.com>
3328
3329         PR tree-optimization/38492
3330         PR tree-optimization/38498
3331         * tree-check.c (operator_is_linear, scev_is_linear_expression): New.
3332         * tree-chrec.h (scev_is_linear_expression): Declared.
3333         * graphite.c (graphite_cannot_represent_loop_niter): New.
3334         (scopdet_basic_block_info): Call graphite_cannot_represent_loop_niter.
3335         (graphite_loop_normal_form): Use gcc_assert.
3336         (scan_tree_for_params): Use CASE_CONVERT.
3337         (phi_node_is_iv, bb_contains_non_iv_scalar_phi_nodes): New.
3338         (build_scop_conditions_1): Call bb_contains_non_iv_scalar_phi_nodes.
3339         Use gcc_assert.  Discard scops that contain unhandled cases.
3340         (build_scop_conditions): Return a boolean status for unhandled cases.
3341         (strip_mine_profitable_p): Print the loop number, not its depth.
3342         (is_interchange_valid): Pass the depth of the loop nest, don't
3343         recompute it wrongly.
3344         (graphite_trans_bb_block): Same.
3345         (graphite_trans_bb_block): Print tentative of loop blocking.
3346         (graphite_trans_scop_block): Do not print that the loop has been
3347         blocked.
3348         (graphite_transform_loops): Do not handle scops that contain condition
3349         scalar phi nodes.
3350
3351         * testsuite/gcc.dg/graphite/pr38500.c: Fixed warning as committed
3352         in trunk.
3353         * testsuite/gcc.dg/graphite/block-0.c: Update test.
3354         * testsuite/gcc.dg/graphite/block-1.c: Same.
3355         * testsuite/gcc.dg/graphite/block-2.c: Remove xfail and test for
3356         blocking.
3357         * testsuite/gcc.dg/graphite/block-4.c: Remove test for strip mine.
3358         * testsuite/gcc.dg/graphite/block-3.c: New.
3359         * testsuite/gcc.dg/graphite/pr38498.c: New.
3360
3361 2008-12-22  Harsha Jagasia  <harsha.jagasia@amd.com>
3362
3363         PR tree-optimization/38510
3364         * gcc.dg/graphite/pr38510.c: New.
3365         * graphite.c (recompute_all_dominators): Call mark_irreducible_loops.
3366           (translate_clast): Call recompute_all_dominators before
3367           graphite_verify.
3368           (gloog): Call recompute_all_dominators before graphite_verify.
3369
3370 2008-12-12  Sebastian Pop  <sebastian.pop@amd.com>
3371