OSDN Git Service

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