OSDN Git Service

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