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