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