OSDN Git Service

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