OSDN Git Service

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