OSDN Git Service

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