OSDN Git Service

2009-10-13 Sebastian Pop <sebastian.pop@amd.com>
[pf3gnuchains/gcc-fork.git] / gcc / ChangeLog.graphite
1 2009-10-13  Sebastian Pop  <sebastian.pop@amd.com>
2
3         * graphite-blocking.c (pbb_do_strip_mine): Use
4         PARAM_LOOP_BLOCK_TILE_SIZE.
5
6 2009-10-13  Sebastian Pop  <sebastian.pop@amd.com>
7
8         * graphite-poly.c (dot_lst_1): New.
9         (dot_lst): New.
10         * graphite-poly.h (dot_lst): Declared.
11
12 2009-10-13  Sebastian Pop  <sebastian.pop@amd.com>
13
14         * graphite-dependences.c (dot_deps_stmt_1): New.
15         (dot_deps_stmt): New.
16         * graphite-dependences.h (dot_deps_stmt): Declared.
17
18 2009-10-09  Sebastian Pop  <sebastian.pop@amd.com>
19
20         * graphite-sese-to-poly.c (rewrite_cross_bb_scalar_dependence): Do
21         not replace cross BB scalar dependences ending on PHI nodes.
22         (rewrite_cross_bb_scalar_deps): Filter out GIMPLE_PHI nodes.
23
24 2009-10-09  Sebastian Pop  <sebastian.pop@amd.com>
25
26         * graphite-poly.c (apply_poly_transforms): Implement the high
27         level driver for flag_loop_block.
28         * tree-ssa-loop.c (gate_graphite_transforms): Remove call to sorry for
29         flag_loop_block.
30
31         * gcc.dg/graphite/graphite.exp (DEFAULT_CFLAGS_GRAPHITE_BLOCK): Add
32         -floop-block.
33         * gfortran.dg/graphite/graphite.exp (DEFAULT_CFLAGS_GRAPHITE_BLOCK):
34         Add -floop-block.
35
36 2009-10-09  Sebastian Pop  <sebastian.pop@amd.com>
37
38         * graphite-poly.h (lst_find_pbb): New.
39         (find_lst_loop): New.
40
41 2009-10-09  Sebastian Pop  <sebastian.pop@amd.com>
42
43         * graphite-poly.c (new_scop): Remove init of SCOP_DEP_GRAPH.
44         * graphite-poly.h (struct scop): Remove dep_graph field.
45         (SCOP_DEP_GRAPH): Removed.
46
47 2009-10-09  Sebastian Pop  <sebastian.pop@amd.com>
48
49         * graphite-poly.h (copy_lst): Do full copy of LST.
50
51 2009-10-07  Sebastian Pop  <sebastian.pop@amd.com>
52
53         * graphite-sese-to-poly.c (reduction_phi_p): Call remove_invariant_phi
54         when the loop stride is zero.
55
56         * gcc.dg/graphite/id-16.c: New.
57
58 2009-10-06  Sebastian Pop  <sebastian.pop@amd.com>
59
60         * graphite-dependences.c (reduction_dr_1): New.
61         (reduction_dr_p): New.
62         (graphite_legal_transform_dr): Call reduction_dr_p.
63         (reduction_ddr): Renamed reduction_ddr_p.
64         * graphite-poly.h (same_pdr_p): New.
65         (number_of_write_pdrs): New.
66         * graphite-sese-to-poly.c (nb_data_writes_in_bb): New.
67         (split_reduction_stmt): Do not split reduction statements
68         when there are no writes to memory.
69         (translate_scalar_reduction_to_array_for_stmt): Insert the
70         memory reduction statement just after the scalar reduction statement.
71
72         * gcc.dg/graphite/interchange-10.c: Updated to differ from interchange-4.c.
73         Un-XFAIL-ed.
74         * gcc.dg/graphite/interchange-3.c: Un-XFAIL-ed.
75         * gcc.dg/graphite/interchange-4.c: Un-XFAIL-ed.
76
77 2009-10-06  Sebastian Pop  <sebastian.pop@amd.com>
78
79         * graphite-interchange.c (lst_apply_interchange): New.
80         (lst_interchange_profitable_p): New.
81         (lst_try_interchange_loops): New.
82         (lst_try_interchange): New.
83         (lst_do_interchange): New.
84         (pbb_do_interchange): Removed.
85         (scop_do_interchange): Call lst_do_interchange.
86
87 2009-10-06  Sebastian Pop  <sebastian.pop@amd.com>
88
89         * graphite-poly.c (print_scop): Print SCOP_ORIGINAL_SCHEDULE and
90         SCOP_TRANSFORMED_SCHEDULE.
91         (loop_to_lst): New.
92         (scop_to_lst): New.
93         (print_lst): New.
94         (debug_lst): New.
95         * graphite-poly.h (lst_p): New.
96         (struct lst): New.
97         (LST_LOOP_P): New.
98         (LST_LOOP_FATHER): New.
99         (LST_PBB): New.
100         (LST_SEQ): New.
101         (scop_to_lst): Declared.
102         (print_lst): Declared.
103         (debug_lst): Declared.
104         (new_lst_loop): New.
105         (new_lst_stmt): New.
106         (copy_lst): New.
107         (lst_depth): New.
108         (lst_dewey_number): New.
109         (struct scop): Add original_schedule and transformed_schedule fields.
110         (SCOP_ORIGINAL_SCHEDULE): New.
111         (SCOP_TRANSFORMED_SCHEDULE): New.
112         * graphite-sese-to-poly.c (build_poly_scop): Call scop_to_lst.
113
114 2009-10-05  Sebastian Pop  <sebastian.pop@amd.com>
115
116         * graphite-dependences.c (reduction_ddr): New.
117         (graphite_legal_transform_bb): Call reduction_ddr.
118         * graphite-poly.c (new_poly_bb): Pass a new bool parameter.
119         Initialize PBB_IS_REDUCTION.
120         * graphite-poly.h (struct poly_bb): New bool field is_reduction.
121         (PBB_IS_REDUCTION): New.
122         (new_poly_bb): Update declaration.
123         * graphite-scop-detection.h (build_scop_bbs): Removed.
124         (nb_reductions_in_loop): Removed.
125         * graphite-sese-to-poly.c (try_generate_gimple_bb): Pass a sbitmap
126         parameter for reductions.
127         (try_generate_gimple_bb): Update call to new_poly_bb.
128         (build_scop_bbs_1): Same.
129         (build_scop_bbs): Same.
130         (gsi_for_phi_node): New.
131         (scalar_close_phi_node_p): Remove gcc_assert.
132         (split_reduction_stmt): New.
133         (is_reduction_operation_p): New.
134         (phi_contains_arg): New.
135         (follow_ssa_with_commutative_ops): New.
136         (detect_commutative_reduction_arg): New.
137         (detect_commutative_reduction_assign): New.
138         (follow_inital_value_to_phi): New.
139         (edge_initial_value_for_loop_phi): New.
140         (initial_value_for_loop_phi): New.
141         (detect_commutative_reduction): New.
142         (translate_scalar_reduction_to_array_for_stmt): New.
143         (insert_copyout): New.
144         (insert_copyin): New.
145         (translate_scalar_reduction_to_array): New.
146         (rewrite_commutative_reductions_out_of_ssa_close_phi): New.
147         (rewrite_commutative_reductions_out_of_ssa_loop): New.
148         (rewrite_commutative_reductions_out_of_ssa): New.
149         (build_poly_scop): Call rewrite_commutative_reductions_out_of_ssa.
150         * sese.h (split_region_for_bb): New.
151
152         * gcc.dg/graphite/graphite.exp (DEFAULT_CFLAGS_GRAPHITE_BLOCK): Add -ffast-math.
153         * gcc.dg/graphite/interchange-1.c: Fix format.
154         * gcc.dg/graphite/interchange-10.c: New.
155
156 2009-10-05  Sebastian Pop  <sebastian.pop@amd.com>
157
158         * graphite-sese-to-poly.c (insert_out_of_ssa_copy): Remove
159         buggy assert.
160
161 2009-10-05  Sebastian Pop  <sebastian.pop@amd.com>
162
163         * graphite-sese-to-poly.c (scev_analyzable_p): New.
164         (rewrite_cross_bb_scalar_dependence): New.
165         (rewrite_cross_bb_scalar_deps): New.
166         (rewrite_reductions_out_of_ssa): Use bb_in_sese_p.
167         Call rewrite_cross_bb_scalar_deps.
168
169 2009-10-05  Sebastian Pop  <sebastian.pop@amd.com>
170
171         * graphite-sese-to-poly.c (gsi_for_ssa_name_def): Removed.
172         (insert_out_of_ssa_copy): Directly use gsi_after_labels and
173         gsi_for_stmt.
174
175 2009-10-05  Sebastian Pop  <sebastian.pop@amd.com>
176
177         * graphite-clast-to-gimple.c (build_cloog_prog): Use pbb_index.
178         * graphite-interchange.c (pbb_do_interchange): Same.
179         * graphite-poly.c (print_scattering_function): Same.
180         (debug_pdrs): Same.
181         * graphite-poly.h (pbb_loop): New.
182         * graphite-sese-to-poly.c (create_linear_expr_from_tree): Use pbb_loop.
183
184 2009-09-27  Sebastian Pop  <sebastian.pop@amd.com>
185
186         * graphite-scop-detection.c (limit_scops): Do not build poly_bbs.
187
188 2009-09-27  Sebastian Pop  <sebastian.pop@amd.com>
189
190         * graphite-sese-to-poly.c (partition_drs_to_sets): Drs is not modified,
191         so don't pass a pointer to it.
192         (build_alias_set_for_drs): Same.
193         (build_base_obj_set_for_drs): Same.
194         (build_scop_drs): Same.
195
196 2009-09-26  Li Feng  <nemokingdom@gmail.com>
197
198         * graphite-sese-to-poly.c (build_scop_drs): Disable writing to file
199         the alias graph of data references.
200
201 2009-09-25  Li Feng  <nemokingdom@gmail.com>
202
203         * graphite-sese-to-poly.c (write_alias_graph_to_ascii_dimacs): New.
204         (build_scop_drs): When debugging, write the alias graph to file,
205         otherwise, should be disabled.
206
207 2009-09-17  Sebastian Pop  <sebastian.pop@amd.com>
208
209         * graphite-scop-detection.c (stmt_simple_memref_p): Removed.
210         (is_simple_operand): Remove call to stmt_simple_memref_p.
211         (stmt_simple_for_scop_p): Update call to is_simple_operand.
212
213 2009-09-17  David Edelsohn  <edelsohn@gnu.org>
214
215         * testsuite/gcc.dg/graphite/interchange-mvt.c: New File.
216         * testsuite/gcc.dg/graphite/scop-dsyrk.c: New File.
217         * testsuite/gcc.dg/graphite/scop-dsyr2k.c: New File.
218         * testsuite/gcc.dg/graphite/scop-mvt.c: New File.
219         * testsuite/gcc.dg/graphite/scop-sor.c: New File.
220
221 2009-09-17 Li Feng  <nemokingdom@gmail.com>
222
223         PR middle-end/41118
224         * graphite-dependences.c (poly_drs_may_alias_p): Adjust definition.
225         (pddr_original_scattering): Make sure 2 pdr2 in the same base object set.
226         (graphite_carried_dependence_level_k): Ditto.
227         * graphite-poly.c (new_poly_dr): Add init of PDR_BASE_OBJECT_SET.
228         * graphite-poly.h (struct poly_dr): Add member dr_base_object_set.
229         (new_poly_dr): Adjust declaration.
230         * graphite-sese-to-poly.c (free_data_refs_aux): New.
231         (free_gimple_bb): Added free_data_refs_aux.
232         (build_poly_dr): Add dr_base_object_set.
233         (partition_drs_to_sets): New.
234         (dr_same_base_object_p): New.
235         (build_alias_set_for_drs): New.
236         (build_base_object_set_for_drs): New.
237         (build_scop_drs): Add build_base_obj_set_for_drs.
238         * graphite-sese-to-poly.h: Added #define for alias set number index and
239         base object set index.
240         * libgomp/testsuite/libgomp.graphite/force-parallel-6.c: Refine tests.
241         * libgomp/testsuite/libgomp.graphite/pr4118.c: New.
242
243 2009-09-16  Alexander Monakov  <amonakov@ispras.ru>
244
245         * graphite-sese-to-poly.c (pdr_add_data_dimensions): Add bounds only
246         for ARRAY_REFs.  Use array_ref_{low,up}_bound to determine bounds.
247
248 2009-09-14  Sebastian Pop  <sebastian.pop@amd.com>
249
250         * graphite-sese-to-poly.c (struct irp_data): Removed.
251         (idx_record_params): Removed.
252         (find_params_in_bb): Scan for parameters the access functions; don't
253         parse the tree representation.
254
255 2009-09-14  Sebastian Pop  <sebastian.pop@amd.com>
256
257         * tree-ssa-loop.c (gate_graphite_transforms): Disable Graphite
258         passes at -O1 and below.
259
260 2009-09-14  Sebastian Pop  <sebastian.pop@amd.com>
261
262         * graphite-blocking.c: Fix order of includes: tree-chrec.h, then
263         tree-scalar-evolution.h, and then tree-data-ref.h.
264         * graphite-clast-to-gimple.c: Same.
265         * graphite-dependences.c: Same.
266         * graphite-interchange.c: Same.
267         * graphite-poly.c: Same.
268         * graphite-scop-detection.c: Same.
269         * graphite-sese-to-poly.c: Same.
270         * graphite.c: Same.
271         * lambda-code.c: Same.
272         * matrix-reorg.c: Same.
273         * tree-data-ref.c: Same.
274         * tree-if-conv.c: Same.
275         * tree-loop-distribu: Same.: Same.
276         * tree-loop-linear.c: Same.
277         * tree-parloops.c: Same.
278         * tree-predcom.c: Same.
279         * tree-vect-patterns.c: Same.
280
281 2009-09-02  Sebastian Pop  <sebastian.pop@amd.com>
282
283         Partially revert the previous patch, except the following.
284         * tree-scalar-evolution.c (instantiate_scev_not): Adapted to pass
285         as parameters the operands of the not expression.
286
287 2009-09-01  Sebastian Pop  <sebastian.pop@amd.com>
288
289         * tree-scalar-evolution.c (instantiate_scev_assign): New.
290         Do not call analyze_scalar_evolution on assignments.
291         (instantiate_scev_phi): Call analyze_scalar_evolution.
292         (instantiate_scev_name): Call instantiate_scev_assign and
293         instantiate_scev_phi.
294         (instantiate_scev_not): Adapted to pass as parameters the operands
295         of the not expression.
296
297 2009-09-01  Sebastian Pop  <sebastian.pop@amd.com>
298
299         * tree-scalar-evolution.c (instantiate_scev_binary): Adapted
300         to pass as parameters the operands of the binary expression.
301
302 2009-09-01  Sebastian Pop  <sebastian.pop@amd.com>
303
304         * tree-scalar-evolution.c (instantiate_scev_bitnot): Renamed
305         instantiate_scev_not.  Handle NEGATE_EXPR.
306         (instantiate_scev_r): Handle NEGATE_EXPR.
307
308 2009-09-01  Sebastian Pop  <sebastian.pop@amd.com>
309
310         * tree-scalar-evolution.c (instantiate_scev_1): Renamed
311         instantiate_scev_r.
312         (instantiate_scev_r): Move code in instantiate_scev_2
313         and instantiate_scev_1.
314
315 2009-09-01  Sebastian Pop  <sebastian.pop@amd.com>
316
317         * tree-scalar-evolution.c (instantiate_scev_3): New.
318         (instantiate_scev_1): Move code in instantiate_scev_3.
319
320 2009-09-01  Sebastian Pop  <sebastian.pop@amd.com>
321
322         * tree-scalar-evolution.c (instantiate_scev_poly): New.
323         (instantiate_scev_1): Move code in instantiate_scev_poly.
324
325 2009-09-01  Sebastian Pop  <sebastian.pop@amd.com>
326
327         * tree-scalar-evolution.c (instantiate_scev_bitnot): New.
328         (instantiate_scev_1): Move code in instantiate_scev_bitnot.
329
330 2009-09-01  Sebastian Pop  <sebastian.pop@amd.com>
331
332         * tree-scalar-evolution.c (instantiate_scev_convert): New.
333         (instantiate_scev_1): Move code in instantiate_scev_convert.
334
335 2009-09-01  Sebastian Pop  <sebastian.pop@amd.com>
336
337         * tree-scalar-evolution.c (instantiate_scev_binary): New.
338         (instantiate_scev_1): Move code in instantiate_scev_binary.
339
340 2009-09-01  Sebastian Pop  <sebastian.pop@amd.com>
341
342         * tree-scalar-evolution.c (instantiate_scev_name): New.
343         (instantiate_scev_1): Move code in instantiate_scev_name.
344
345 2009-08-28  Sebastian Pop  <sebastian.pop@amd.com>
346
347         * Merge from mainline (150992:151171).
348
349 2009-08-25  Sebastian Pop  <sebastian.pop@amd.com>
350
351         * graphite-dependences.c (graphite_legal_transform_bb): Call
352         pbb_remove_duplicate_pdrs.
353         * graphite-poly.c (can_collapse_pdr): Removed.
354         (pdr_find_duplicate): Removed.
355         (can_collapse_pdrs): New.
356         (pbb_remove_duplicate_pdrs): New.
357         (new_poly_dr): Do not look for duplicates.
358         * graphite-poly.h (struct poly_bb): New field pdr_duplicates_removed.
359         (PBB_PDR_DUPLICATES_REMOVED): New.
360         (pbb_remove_duplicate_pdrs): Declared.
361
362 2009-08-25  Sebastian Pop  <sebastian.pop@amd.com>
363
364         * graphite-interchange.c (pbb_interchange_profitable_p): Adjust
365         the strides by multiplying by PDR_NB_REFS.
366         * graphite-poly.c (can_collapse_pdr): New.
367         (pdr_find_duplicate): New.
368         (new_poly_dr): Call pdr_find_duplicate.  Collapse duplicate PDRs.
369         Initialize PDR_NB_REFS.
370         * graphite-poly.h (struct poly_dr): Add field nb_refs.
371         (PDR_NB_REFS): New.
372         (new_poly_dr): Number of subscripts is a graphite_dim_t.
373
374 2009-08-25  Sebastian Pop  <sebastian.pop@amd.com>
375
376         Revert one of the previous commits:
377         * graphite-dependences.c (graphite_legal_transform_bb): Avoid
378         the computation of symmetric data dependence relations.
379         (dependency_between_pbbs_p): Same.
380
381 2009-08-25  Sebastian Pop  <sebastian.pop@amd.com>
382
383         PR middle-end/40965
384         * graphite-poly.c (apply_poly_transforms): Remove legality test before
385         any transform.
386
387 2009-08-25  Sebastian Pop  <sebastian.pop@amd.com>
388
389         * graphite-dependences.c (pddr_original_scattering): Return NULL
390         for read-read dependence relations.
391         * graphite-poly.h (enum poly_dr_type): Fix comment.
392         (pdr_read_p): New.
393         (pdr_write_p): New.
394         (pdr_may_write_p): New.
395
396 2009-08-25  Sebastian Pop  <sebastian.pop@amd.com>
397
398         * graphite-poly.h (enum POLY_DR_TYPE): Renamed poly_dr_type.
399         (struct poly_dr): Same.
400         (new_poly_dr): Same.
401         * graphite-poly.c (new_poly_dr): Same.
402
403 2009-08-25  Konrad Trifunovic  <konrad.trifunovic@gmail.com>
404             Sebastian Pop  <sebastian.pop@amd.com>
405
406         * graphite-blocking.c (pbb_strip_mine_loop_depth): Renamed
407         pbb_strip_mine_time_depth.  Changed the implementation so that
408         transformation is expressed as a transformation on
409         time (scatttering) dimensions.  Also, ensures that the 2d+1
410         scheduling format is preserved.
411         (pbb_strip_mine_profitable_p): Profitability is based on the
412         iteration number of a given time (scattering) dimension,
413         and not on a original loop depth dimension.
414         (pbb_strip_mine): Call pbb_number_of_iterations_at_time.
415         (pbb_do_strip_mine): Call psct_dynamic_dim.
416         * graphite-poly.c (pbb_number_of_iterations_at_time): New.
417         * graphite-poly.h (pbb_number_of_iterations_at_time): Declared.
418         (pbb_nb_dynamic_scattering_transform): New.
419         (psct_dynamic_dim): New.
420
421 2009-08-25  Konrad Trifunovic  <konrad.trifunovic@gmail.com>
422
423         * graphite-ppl.c (ppl_max_for_le): Renamed ppl_max_for_le_pointset.
424         * graphite-ppl.h (ppl_max_for_le): Renamed ppl_max_for_le_pointset.
425         * graphite-poly.c (pbb_number_of_iterations): Rename ppl_max_for_le.
426         * graphite-interchange.c (build_linearized_memory_access): Same.
427         (memory_stride_in_loop): Same.
428
429 2009-08-25  Sebastian Pop  <sebastian.pop@amd.com>
430
431         * graphite-dependences.c (pddr_original_scattering): New.
432         (graphite_legal_transform_dr): Call pddr_original_scattering.
433         (dot_deps_1): New.
434         (dot_deps): New.
435         * graphite-dependences.h (dot_deps): Declared.
436         * graphite-poly.c (new_poly_dr): Initialize PDR_ID.
437         (print_pdr): Print PDR_ID.
438         * graphite-poly.h (struct poly_dr): Add field id.
439         (PDR_ID): New.
440         (pbb_index): New.
441         * graphite-scop-detection.c (dot_all_scops_1): Cleanup comment.
442
443 2009-08-22  Sebastian Pop  <sebastian.pop@amd.com>
444
445         * graphite-dependences.c (graphite_carried_dependence_level_k): Do
446         not delete the original dependence relation.
447
448 2009-08-21  Sebastian Pop  <sebastian.pop@amd.com>
449
450         * graphite-dependences.c (graphite_legal_transform_bb): Avoid
451         the computation of symmetric data dependence relations.
452         (dependency_between_pbbs_p): Same.
453
454 2009-08-21  Sebastian Pop  <sebastian.pop@amd.com>
455
456         * graphite-dependences.c (new_poly_dr_pair): Renamed new_poly_ddr.
457         (eq_poly_dr_pair_p): Renamed eq_poly_ddr_p.
458         (hash_poly_dr_pair_p): Renamed hash_poly_ddr_p.
459         (free_poly_ddr): New.
460         (pddr_is_empty): New.
461         (dependence_polyhedron_1): Now returns a poly_ddr_p.
462         (dependence_polyhedron): Same.  Remove useless gcc_assert.
463         Remove fprintfs.
464         (graphite_legal_transform_dr): Call pddr_is_empty and free_poly_ddr.
465         (graphite_carried_dependence_level_k): Call pddr_is_empty.
466         * graphite-dependences.h (enum poly_dependence_kind): New.
467         (poly_dr_pair): Renamed poly_ddr.  Added a field kind.
468         (PDRP_SOURCE): Renamed PDDR_SOURCE.
469         (PDRP_SINK): Renamed PDDR_SINK.
470         (PDRP_DDP): Renamed PDDR_DDP.
471         (PDDR_KIND): New.
472         (free_poly_ddr): Declared.
473         * graphite-poly.c (new_scop): Use the new hash function names.
474         * graphite-poly.h (struct scop): Renamed field original_pdr_pairs
475         into original_pddrs.
476         (SCOP_ORIGINAL_PDR_PAIRS): Renamed SCOP_ORIGINAL_PDDRS.
477
478 2009-08-21  Sebastian Pop  <sebastian.pop@amd.com>
479
480         * Merge from mainline (150764:150992).
481
482 2009-08-18  Sebastian Pop  <sebastian.pop@amd.com>
483
484         * cfgloopmanip.c (create_empty_loop_on_edge): Generate upper
485         bounds with LT_EXPR to make niter analysis more precise on code
486         generated by Graphite.
487
488 2009-08-18  Sebastian Pop  <sebastian.pop@amd.com>
489
490         * graphite-dependences.c (graphite_legal_transform_dr): Fix formatting.
491         (graphite_legal_transform_bb): Same.
492         (poly_drs_may_alias_p): Same.
493
494 2009-08-15  Sebastian Pop  <sebastian.pop@amd.com>
495
496         PR middle-end/40981
497         * graphite-ppl.c (ppl_max_for_le): Correct the use of
498         ppl_Pointset_Powerset_C_Polyhedron_maximize.
499
500 2009-08-13  Sebastian Pop  <sebastian.pop@amd.com>
501
502         * graphite-poly.c (print_pbb): Print PBB index.
503
504 2009-08-13  Sebastian Pop  <sebastian.pop@amd.com>
505
506         * Merge from mainline (r150672:150764).
507
508 2009-08-13  Sebastian Pop  <sebastian.pop@amd.com>
509
510         * graphite-interchange.c (ppl_max_for_le): Moved...
511         * graphite-poly.c (pbb_number_of_iterations): Call ppl_max_for_le.
512         * graphite-ppl.c (ppl_max_for_le): ... here.
513         * graphite-ppl.h (ppl_max_for_le): Declared.
514
515 2009-08-12  Sebastian Pop  <sebastian.pop@amd.com>
516
517         * Merge from mainline (r150372:150672).
518
519 2009-08-11  Sebastian Pop  <sebastian.pop@amd.com>
520
521         PR middle-end/40980
522         * sese.c (convert_for_phi_arg): New.
523         (add_guard_exit_phis): Use convert_for_phi_arg.
524
525         * testsuite/gfortran.dg/graphite/id-17.f: New.
526
527 2009-08-11  Sebastian Pop  <sebastian.pop@amd.com>
528
529         * graphite-sese-to-poly.c (pdr_add_data_dimensions): Dont add
530         unknown subscript upper bounds.
531
532         * testsuite/gcc.dg/graphite/interchange-6.c: Un-XFAIL.
533
534 2009-08-11  Sebastian Pop  <sebastian.pop@amd.com>
535             Pranav Garg  <pranav.garg2107@gmail.com>
536
537         * graphite-interchange.c (gather_access_strides): Removed.
538         (ppl_max_for_le): New.
539         (build_linearized_memory_access): New.
540         (memory_stride_in_loop): New.
541         (pbb_interchange_profitable_p): Reimplemented.
542         * graphite-ppl.h (ppl_new_id_map): New.
543         (ppl_interchange): New.
544
545         * testsuite/gcc.dg/graphite/interchange-6.c: XFAILed.
546
547 2009-08-11  Sebastian Pop  <sebastian.pop@amd.com>
548
549         * graphite-interchange.c (compute_subscript): Removed.
550         (compute_array_size_cstr): Removed.
551         (compute_array_size_poly): Removed.
552         (compute_array_size): Removed.
553         (gather_access_strides_poly): Removed.
554         (gather_access_strides): Empty.
555
556 2009-08-11  Sebastian Pop  <sebastian.pop@amd.com>
557
558         * graphite-dependences.c (dependence_polyhedron_1): Replace
559         pdr_nb_subscripts with PDR_NB_SUBSCRIPTS.
560         (graphite_legal_transform_dr): Same.
561         (graphite_carried_dependence_level_k): Same.
562         * graphite-poly.c (new_poly_dr): Add a parameter nb_subscripts.
563         Initialize PDR_NB_SUBSCRIPTS.
564         (print_pdr_access_layout): Replace pdr_nb_subscripts with
565         PDR_NB_SUBSCRIPTS.
566         * graphite-poly.h (struct poly_dr): Add nb_subscripts field.
567         (PDR_NB_SUBSCRIPTS): New.
568         (pdr_nb_subscripts): Removed.
569         (pdr_dim): Simplified.
570         * graphite-sese-to-poly.c (build_poly_dr): Replace pdr_nb_subscripts
571         with PDR_NB_SUBSCRIPTS.
572
573 2009-08-11  Sebastian Pop  <sebastian.pop@amd.com>
574
575         * graphite-interchange.c (compute_array_size): Remove use of
576         PDR_DATA_CONTAINER.
577         * graphite-poly.c (new_poly_dr): Remove argument data_container.
578         Do not initialize PDR_DATA_CONTAINER.
579         (print_pdr): Do not print PDR_DATA_CONTAINER.
580         * graphite-poly.h (struct poly_dr): Remove data_container field.
581         (PDR_DATA_CONTAINER): Removed.
582         * graphite-sese-to-poly.c (pdr_add_data_dimensions): Remove use of
583         PDR_DATA_CONTAINER.
584         (build_poly_dr): Same.
585
586 2009-08-11  Sebastian Pop  <sebastian.pop@amd.com>
587
588         * testsuite/gcc.dg/graphite/interchange-9.c: New.
589
590 2009-08-05  Konrad Trifunovic  <konrad.trifunovic@gmail.com>
591             Sebastian Pop  <sebastian.pop@amd.com>
592
593         * graphite-dependences.c (graphite_legal_transform_dr): Work on a
594         copy of the dependence polyhedron.  Free the temporary objects.
595         (graphite_carried_dependence_level_k): Free unused objects before
596         returning.
597
598         * testsuite/gcc.dg/graphite/interchange-1.c: XFAILed.
599         * testsuite/gcc.dg/graphite/interchange-2.c: XFAILed.
600         * testsuite/gcc.dg/graphite/interchange-3.c: XFAILed.
601         * testsuite/gcc.dg/graphite/interchange-4.c: XFAILed.
602         * testsuite/gcc.dg/graphite/interchange-7.c: XFAILed.
603
604 2009-08-05  Sebastian Pop  <sebastian.pop@amd.com>
605
606         * graphite-blocking.c (scop_do_strip_mine): Call store_scattering.
607         Early return without analyzing the data dependences if no
608         transform has been done.  Call restore_scattering if the transform
609         is not legal.
610         (graphite-interchange.c): Same.
611         * graphite-poly.c (print_scattering_function): Test for PBB_TRANSFORMED.
612         (graphite_read_transforms): Initialize PBB_TRANSFORMED.
613         (apply_poly_transforms): Do not gcc_assert that
614         the transform is legal.
615         (new_poly_bb): Initialize PBB_TRANSFORMED, PBB_SAVED, and PBB_ORIGINAL.
616         Do not initialize PBB_NB_SCATTERING_TRANSFORM, PBB_NB_LOCAL_VARIABLES,
617         PBB_TRANSFORMED_SCATTERING, and PBB_ORIGINAL_SCATTERING.
618         (free_poly_dr): Free PBB_TRANSFORMED, PBB_SAVED, and PBB_ORIGINAL.
619         * graphite-poly.h (struct poly_scattering): New.
620         (struct poly_bb): Add original, transformed, and saved fields.
621         Remove transformed_scattering, original_scattering, nb_local_variables,
622         and nb_scattering_transform fields.
623         (PBB_ORIGINAL, PBB_TRANSFORMED, PBB_SAVED): New.
624         (poly_scattering_new): New.
625         (poly_scattering_free): New.
626         (poly_scattering_copy): New.
627         (store_scattering_pbb): New.
628         (store_scattering): New.
629         (restore_scattering_pbb): New.
630         (restore_scattering): New.
631         * graphite-sese-to-poly.c (build_pbb_scattering_polyhedrons):
632         Initialize PBB_TRANSFORMED and PBB_ORIGINAL.
633
634 2009-08-05  Sebastian Pop  <sebastian.pop@amd.com>
635
636         * graphite-poly.c (print_pbb): Add parentheses in the pretty print.
637         (print_scop): Same.
638
639 2009-08-05  Sebastian Pop  <sebastian.pop@amd.com>
640
641         * Makefile.in (graphite.o): Depends on PREDICT_H.
642         * graphite.c: Include predict.h.
643         (graphite_finalize): Call tree_estimate_probability.
644         * predict.c (predict_loops): Do not call scev_initialize and
645         scev_finalize.
646         (tree_estimate_probability_bb): New.
647         (tree_estimate_probability): Do not initialize loops: move that
648         code to the driver.  Call tree_estimate_probability_bb.
649         (tree_estimate_probability_driver): New.
650         (pass_profile): Use tree_estimate_probability_driver.
651         * predict.h (tree_estimate_probability): Declared.
652
653 2009-08-05  Sebastian Pop  <sebastian.pop@amd.com>
654
655         * graphite-clast-to-gimple.c (gloog): Add time to TV_GRAPHITE_CODE_GEN.
656         * graphite-dependences.c (graphite_legal_transform): Add time to
657         TV_GRAPHITE_DATA_DEPS.
658         (dependency_between_pbbs_p): Same.
659         * timevar.def (TV_GRAPHITE_DATA_DEPS, TV_GRAPHITE_CODE_GEN): New.
660
661 2009-08-03  Sebastian Pop  <sebastian.pop@amd.com>
662
663         * Merge from mainline (r149952:150372).
664
665 2009-07-28  Sebastian Pop  <sebastian.pop@amd.com>
666
667         * ChangeLog.graphite: Fix indenting, white spaces and 80 columns.
668         * graphite-blocking.c: Same.
669         * graphite-clast-to-gimple.c: Same.
670         * graphite-dependences.c: Same.
671         * graphite-poly.c: Same.
672         * graphite-poly.h: Same.
673         * graphite-ppl.c: Same.
674         * graphite-scop-detection.c: Same.
675         * graphite-sese-to-poly.c: Same.
676         * graphite.c: Same.
677
678 2009-07-28  Sebastian Pop  <sebastian.pop@amd.com>
679
680         * graphite-sese-to-poly.c (loop_entry_phi_arg): New.
681         (remove_simple_copy_phi): New.
682         (remove_invariant_phi): New.
683         (simple_copy_phi_p): New.
684         (reduction_phi_p): New.
685         (gsi_for_ssa_name_def): New.
686         (insert_out_of_ssa_copy): New.
687         (insert_out_of_ssa_copy_on_edge): New.
688         (create_zero_dim_array): New.
689         (scalar_close_phi_node_p): New.
690         (rewrite_close_phi_out_of_ssa): New.
691         (rewrite_phi_out_of_ssa): New.
692         (rewrite_reductions_out_of_ssa): New.
693         (build_poly_scop): Call rewrite_reductions_out_of_ssa.
694
695         * testsuite/gcc.dg/graphite/id-11.c: New.
696         * testsuite/gcc.dg/graphite/id-15.c: New.
697         * testsuite/gcc.dg/graphite/interchange-1.c: Un-XFAIL.
698         * testsuite/gcc.dg/graphite/interchange-2.c: Un-XFAIL.
699         * testsuite/gcc.dg/graphite/interchange-3.c: Un-XFAIL.
700         * testsuite/gcc.dg/graphite/interchange-4.c: Un-XFAIL.
701         * testsuite/gcc.dg/graphite/interchange-7.c: Un-XFAIL.
702         * testsuite/gcc.dg/graphite/scop-matmult.c: Un-XFAIL.
703         * testsuite/gfortran.dg/graphite/id-13.f: New.
704         * testsuite/gfortran.dg/graphite/id-5.f: New.
705
706 2009-07-28  Sebastian Pop  <sebastian.pop@amd.com>
707
708         * graphite-clast-to-gimple.c (graphite_loop_normal_form): Do not
709         check that nb_reductions_in_loop is zero.
710         * graphite-scop-detection.c (harmful_stmt_in_bb): Don't filter out
711         reduction phi nodes.
712         (nb_reductions_in_loop): Removed.
713         (graphite_can_represent_loop): Do not call nb_reductions_in_loop.
714         * graphite-sese-to-poly.c (phi_node_is_iv): Removed.
715         (bb_contains_non_iv_scalar_phi_nodes): Removed.
716         (scop_contains_non_iv_scalar_phi_nodes): Removed.
717         (build_poly_scop): Do not call scop_contains_non_iv_scalar_phi_nodes.
718
719 2009-07-28  Sebastian Pop  <sebastian.pop@amd.com>
720
721         * graphite-clast-to-gimple.c (build_cloog_prog): Do not code generate
722         statements that have an empty iteration domain.
723         * testsuite/gfortran.dg/graphite/id-16.f: New.
724
725 2009-07-28  Sebastian Pop  <sebastian.pop@amd.com>
726
727         * tree-scalar-evolution.c (instantiate_scev_1): Return
728         chrec_dont_know when the result is not above instantiate_below.
729         * graphite-scop-detection.c (scopdet_basic_block_info): Fix formatting.
730         * graphite-sese-to-poly.c (create_linear_expr_from_tree): Assert that
731         the tree has a known scalar evolution.
732         * testsuite/gfortran.dg/graphite/id-14.f: New.
733         * testsuite/gfortran.dg/graphite/id-15.f: New.
734
735 2009-07-28  Sebastian Pop  <sebastian.pop@amd.com>
736
737         * sese.c (rename_variables_in_stmt): Pass in an extra parameter
738         insert_gsi.
739         (rename_variables): Keep inserting renames after the ones already
740         inserted.
741
742 2009-07-28  Sebastian Pop  <sebastian.pop@amd.com>
743
744         * graphite-sese-to-poly.c (compare_bb_depths): New.
745         (graphite_sort_dominated_info): New.
746         (build_scop_bbs_1): Call graphite_sort_dominated_info.
747         (build_scop_scattering): Fix comment.
748
749 2009-07-28  Sebastian Pop  <sebastian.pop@amd.com>
750
751         * graphite.c (graphite_finalize): Call print_loops instead of
752         dump_function_to_file.
753         * testsuite/gcc.dg/graphite/graphite.exp: Fix formatting.
754         * testsuite/gcc.dg/graphite/pr35356-1.c: New.  Look for the number of
755         loops generated in the graphite output file.
756         * testsuite/gcc.dg/graphite/pr35356-2.c: New.
757         * testsuite/gcc.dg/graphite/pr35356-3.c: New.  XFAILed for now.
758         * testsuite/gfortran.dg/graphite/id-12.f: New.
759
760 2009-07-24  Li Feng  <nemokingdom@gmail.com>
761
762         * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-8.c:
763         Remove 2 XFAIL.
764
765 2009-07-24  Li Feng  <nemokingdom@gmail.com>
766             Tobias Grosser  <grosser@fim.uni-passau.de>
767
768         * graphite-sese-to-poly.c (pdr_add_alias_set): Use data reference's
769         alias set number build alias in ACCESSES polyhedron.
770         (build_alias_set_for_drs): New.
771         (build_pbb_drs): Added build_alias_set_for_drs.
772         * graphite-dependences.c (poly_drs_may_alias_p): New.
773         (graphite_carried_dependence_level_k): Check alias information
774         before building polyhedron.
775
776 2009-07-24  Tobias Grosser  <grosser@fim.uni-passau.de>
777
778         * Makefile.in (lambda-code.o): Fix formatting.
779
780 2009-07-24  Tobias Grosser  <grosser@fim.uni-passau.de>
781
782         * Merge from mainline (r149350-149952)
783
784 2009-07-18  Tobias Grosser  <grosser@fim.uni-passau.de>
785
786         * graphite-poly.c (apply_poly_transforms): Move strip_mine
787         before interchange to prepare for loop blocking.
788
789 2009-07-18  Tobias Grosser  <grosser@fim.uni-passau.de>
790
791         * graphite-poly.c (apply_poly_transforms): Add checks after every
792         transformation.
793         * graphite-sese-to-poly.c (build_poly_scop): Remove check, as already
794         done in apply_poly_transforms.
795
796 2009-07-17  Konrad Trifunovic  <konrad.trifunovic@gmail.com>
797
798         * graphite-dependences.c (build_lexicographically_gt_constraint):
799         Replace RES parameter with *RES.
800         (dependence_polyhedron_1): Pass an address of the parameter RES
801         instead of value of RES.
802
803 2009-07-16  Sebastian Pop  <sebastian.pop@amd.com>
804
805         * graphite.c (graphite_finalize): Fix comment.
806         (graphite_transform_loops): Reset scev info after code generation
807         of each scop.
808
809 2009-07-16  Sebastian Pop  <sebastian.pop@amd.com>
810
811         * graphite.c (graphite_finalize): Call scev_reset.
812
813 2009-07-16  Sebastian Pop  <sebastian.pop@amd.com>
814
815         * graphite-clast-to-gimple.c (compute_cloog_iv_types): Do not create
816         GBB_CLOOG_IV_TYPES hash table twice.
817         * graphite-sese-to-poly.c (free_gimple_bb): Call free_data_refs.
818         (add_condition_to_domain): Clear GMP values.
819
820 2009-07-16  Sebastian Pop  <sebastian.pop@amd.com>
821
822         * graphite-dependences.c: Fix formatting.
823         * graphite-poly.c (free_poly_dr): Also free PDR_DATA_CONTAINER.
824         (pbb_number_of_iterations): Free ppl_Linear_Expression.
825         * graphite-sese-to-poly.c: Fix formatting.
826         * graphite.c (graphite_transform_loops): Create the hash table
827         after the early return.
828
829 2009-07-16  Sebastian Pop  <sebastian.pop@amd.com>
830
831         * testsuite/gcc.dg/graphite/id-14.c: New.
832         * testsuite/gcc.dg/graphite/pr40157.c: New.
833         * testsuite/gfortran.dg/graphite/id-11.f: New.
834
835 2009-07-16  Sebastian Pop  <sebastian.pop@amd.com>
836
837         * graphite-sese-to-poly.c (nb_pbbs_in_loops): New.
838         (build_poly_scop): Return false when there are no pbbs within
839         loops to avoid to pass to cloog scops with no loops.
840
841 2009-07-16  Sebastian Pop  <sebastian.pop@amd.com>
842
843         * graphite-sese-to-poly.c (build_pbb_scattering_polyhedrons): Avoid
844         useless test "i % 2".
845         (build_pbb_scattering_polyhedrons): Fix formatting.
846         (build_poly_dr): Same.
847         * graphite.c (graphite_transform_loops): Restructure.
848
849 2009-07-14  Razya Ladelsky  <razya@il.ibm.com>
850
851         * tree-ssa-loop-manip.c (rewrite_phi_with_iv): Remove
852         reduction_list parameter.
853         (rewrite_all_phi_nodes_with_iv): Same.
854         (canonicalize_loop_ivs): Same.
855         * tree-parloops.c (struct brli): Removed.
856         (build_reduction_list_info): Removed.
857         (build_new_reduction): New.
858         (analyze_reduction_list): Removed.
859         (gather_scalar_reductions): Find reductions instead of phi
860         nodes that can't be canonicalized.
861         (try_create_reduction_list): Remove reduction_list parameter.
862         (gen_parallel_loop): Same.
863         (parallelize_loops): Remove analyze_reductions variable,
864         initialization and free.
865         Change reduction_list htab initialization to reduction_info
866         elements instead of ssa names.
867         Call try_create_reduction_list and gen_parallel_loop without
868         analyzed_reduction argument.
869         * graphite-clast-to-gimple (graphite_loop_normal_form): Call
870         canonicalize_loop_ivs with one less argument.
871         * tree-flow.h (canonicalize_loop_ivs): Remove one argument.
872
873 2009-07-14  Konrad Trifunovic <konrad.trifunovic@gmail.com>
874
875         * graphite-dependences.c (new_poly_dr_pair): New.
876         (dependence_polyhedron): Renamed into dependence_polyhedron_1.
877         (new_poly_dr_pair): New.
878         (eq_poly_dr_pair_p): New.
879         (hash_poly_dr_pair_p): New.
880         * graphite-dependences.h (struct poly_dr_pair): New.
881         (eq_poly_dr_pair_p): Declared.
882         (hash_poly_dr_pair_p): Declared.
883         * graphite-poly.c (new_scop): Initialize SCOP_ORIGINAL_PDR_PAIRS.
884         (free_scop): Free SCOP_ORIGINAL_PDR_PAIRS.
885         * graphite-poly.h (struct scop): Add original_pdr_pairs field.
886         * Makefile.in (graphite-poly.o): Add dependence on
887         graphite-dependences.h.
888
889 2009-07-14  Sebastian Pop  <sebastian.pop@amd.com>
890
891         * graphite-scop-detection.c (graphite_can_represent_scev): Do not let
892         polynomials of degree > 1 pass to Graphite.
893         * tree-chrec.c (scev_is_linear_expression): Call
894         evolution_function_is_affine_multivariate_p.
895         * testsuite/gfortran.dg/graphite/id-10.f90: New.
896
897 2009-07-14  Sebastian Pop  <sebastian.pop@amd.com>
898
899         * tree-scalar-evolution.c (compute_overall_effect_of_inner_loop):
900         Instantiate scevs varying in outer loops.
901         * testsuite/gfortran.dg/graphite/id-9.f: Correct testcase.
902
903 2009-07-14  Sebastian Pop  <sebastian.pop@amd.com>
904
905         * graphite-sese-to-poly.c (build_loop_iteration_domains): Do not insert
906         redundant constraint.
907
908 2009-07-14  Sebastian Pop  <sebastian.pop@amd.com>
909
910         * testsuite/gcc.dg/graphite/graphite.exp: Fix comments.
911         * testsuite/gfortran.dg/graphite/graphite.exp: Trigger actions
912         based on the file names as in the C testsuite.
913         * testsuite/gfortran.dg/graphite/block-1.f90: Fix patterns.
914         * testsuite/gfortran.dg/graphite/block-2.f: Same.
915         * testsuite/gfortran.dg/graphite/block-3.f90: Same.
916         * testsuite/gfortran.dg/graphite/block-4.f90: Same.
917         * testsuite/gfortran.dg/graphite/id-1.f90: Same.
918         * testsuite/gfortran.dg/graphite/id-2.f90: Same.
919         * testsuite/gfortran.dg/graphite/id-3.f90: Same.
920         * testsuite/gfortran.dg/graphite/id-4.f90: Same.
921         * testsuite/gfortran.dg/graphite/id-6.f: Same.
922         * testsuite/gfortran.dg/graphite/id-9.f: Same.
923         * testsuite/gfortran.dg/graphite/interchange-1.f: Same.
924         * testsuite/gfortran.dg/graphite/interchange-2.f: Same.
925         * testsuite/gfortran.dg/graphite/scop-1.f: Same.
926
927 2009-07-14  Sebastian Pop  <sebastian.pop@amd.com>
928
929         * sese.c (expand_scalar_variables_call): New.
930         (expand_scalar_variables_ssa_name): Handle calls in expander.
931
932 2009-07-13  Sebastian Pop  <sebastian.pop@amd.com>
933
934         * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-6.c:
935         Expect to see the pattern twice.
936         * testsuite/gcc.dg/graphite/interchange-0.c: Un-XFAIL.
937         * testsuite/gcc.dg/graphite/interchange-5.c: Same.
938         * testsuite/gcc.dg/graphite/interchange-6.c: Same.
939
940 2009-07-13  Sebastian Pop  <sebastian.pop@amd.com>
941
942         * testsuite/gcc.dg/graphite/id-10.c: New.
943         * testsuite/gcc.dg/graphite/id-12.c: New.
944         * testsuite/gfortran.dg/graphite/id-7.f: New.
945         * testsuite/gfortran.dg/graphite/id-8.f: New.
946
947 2009-07-13  Sebastian Pop  <sebastian.pop@amd.com>
948
949         * graphite-sese-to-poly.c (pdr_add_data_dimensions): Fix division by
950         zero.
951
952 2009-07-13  Sebastian Pop  <sebastian.pop@amd.com>
953
954         * sese.c (rename_variables_in_stmt): Call fold_convert during renaming.
955
956 2009-07-13  Sebastian Pop  <sebastian.pop@amd.com>
957
958         * sese.c (expand_scalar_variables_stmt): Avoid unnecessary expansion.
959
960 2009-07-10  Sebastian Pop  <sebastian.pop@amd.com>
961
962         * graphite-sese-to-poly.c (pdr_add_memory_accesses): Fix order of
963         building PDR subscripts.
964
965 2009-07-10  Sebastian Pop  <sebastian.pop@amd.com>
966
967         * graphite-sese-to-poly.c (pdr_add_data_dimensions): Fix the
968         computation of array sizes.
969
970 2009-07-10  Sebastian Pop  <sebastian.pop@amd.com>
971
972         * graphite-sese-to-poly.c (add_param_constraints): Disabled.
973
974 2009-07-10  Tobias Grosser  <grosser@fim.uni-passau.de>
975
976         * graphite-dependences.c (map_into_dep_poly, map_dr_into_dep_poly,
977         build_pairwise_constraint, dr_equality_constraints,
978         build_pairwise_scheduling_equality,
979         build_pairwise_scheduling_inequality, lexicographically_gt_p,
980         build_lexicographically_gt_constraint, dependence_polyhedron,
981         graphite_legal_transform_dr, graphite_carried_dependence_level_k):
982         Move from NNC_Polyhedron to C_Polyhedron.
983         * graphite-interchange.c (compute_array_size_poly,
984         gather_access_strides): Dito.
985         * graphite-poly.c (apply_poly_transforms, new_poly_dr, free_poly_bb,
986         free_scop, pbb_number_of_iterations): Dito.
987         * graphite-poly.h (struct poly_dr, pdr_nb_subscripts, struct poly_bb,
988         pbb_dim_iter_domain, struct scop): Dito.
989         * graphite-ppl.c (new_Constraint_System_from_Cloog_Matrix,
990         new_Cloog_Domain_from_ppl_Polyhedron,
991         new_Cloog_Domain_from_ppl_Pointset_Powerset, ppl_set_coef_gmp,
992         ppl_insert_dimensions_pointset, ppl_insert_dimensions_pointset,
993         ppl_strip_loop, ppl_strip_loop, ppl_print_polyhedron_matrix,
994         ppl_print_powerset_matrix, debug_ppl_polyhedron_matrix,
995         debug_ppl_powerset_matrix, ppl_read_polyhedron_matrix): Dito.
996         * graphite-ppl.h (ppl_Pointset_Powerset_C_Polyhedron_t,
997         new_C_Polyhedron_from_Cloog_Matrix, ppl_print_powerset_matrix,
998         debug_ppl_powerset_matrix, ppl_insert_dimensions_pointset): Dito.
999         * graphite-sese-to-poly.c (build_pbb_scattering_polyhedrons,
1000         build_loop_iteration_domains, ppl_constraint_type_from_tree_code,
1001         add_condition_to_domain, add_condition_to_pbb, build_scop_context,
1002         build_scop_iteration_domain, build_poly_dr): Dito
1003
1004 2009-07-09  Sebastian Pop  <sebastian.pop@amd.com>
1005
1006         * testsuite/gcc.dg/graphite/graphite.exp: Added a rule to execute
1007         run-id-*.c files.
1008         * testsuite/gcc.dg/graphite/run-id-1.c: New.
1009
1010 2009-07-09  Sebastian Pop  <sebastian.pop@amd.com>
1011
1012         * graphite-sese-to-poly.c (build_loop_iteration_domains): Add the
1013         positivity constraint on the symbolic number of iterations.
1014
1015 2009-07-09  Sebastian Pop  <sebastian.pop@amd.com>
1016
1017         * graphite-sese-to-poly.c (build_loop_iteration_domains): Rewrite.
1018
1019 2009-07-09  Sebastian Pop  <sebastian.pop@amd.com>
1020             Tobias Grosser  <grosser@fim.uni-passau.de>
1021
1022         * graphite-clast-to-gimple.c (build_scop_context): Removed.
1023         (build_cloog_prog): Directly use SCOP_CONTEXT.
1024         * graphite-poly.c (new_scop): Initialize SCOP_CONTEXT.
1025         (free_scop): Free SCOP_CONTEXT.
1026         (print_scop_context): New.
1027         (print_scop): Call print_scop_context.
1028         (debug_scop_context): New.
1029         * graphite-poly.h (print_scop_context, debug_scop_context): Declared.
1030         (struct scop): Added field context.
1031         (SCOP_CONTEXT): New.
1032         * graphite-sese-to-poly.c (add_param_constraints): New.
1033         (build_scop_context): New.
1034         (build_poly_scop): Call build_scop_context.
1035
1036 2009-07-09  Sebastian Pop  <sebastian.pop@amd.com>
1037
1038         * graphite-clast-to-gimple.c (gmp_cst_to_tree): Moved...
1039         * graphite-ppl.c (ppl_set_inhomogeneous_gmp, ppl_set_coef_gmp): New.
1040         (ppl_set_inhomogeneous, ppl_set_coef): Moved...
1041         * graphite-ppl.h: Include double-int.h and tree.h.
1042         (ppl_set_inhomogeneous_gmp, ppl_set_coef_gmp): Declared.
1043         (ppl_set_inhomogeneous, ppl_set_coef): ...here.
1044         (gmp_cst_to_tree): ...here.  Reimplemented using mpz_get_double_int.
1045         (tree_int_to_gmp, ppl_set_inhomogeneous_tree, ppl_set_coef_tree): New.
1046
1047 2009-07-09  Sebastian Pop  <sebastian.pop@amd.com>
1048
1049         * graphite-clast-to-gimple.c (clast_to_gcc_expression_red): Generate
1050         POINTER_PLUS_EXPR for pointer types.
1051         (clast_to_gcc_expression): Same.
1052
1053 2009-07-09  Sebastian Pop  <sebastian.pop@amd.com>
1054
1055         * graphite-poly.c (print_scattering_function): Early return when
1056         PBB_TRANSFORMED_SCATTERING is not initialized.
1057         (print_pbb_domain): Early return when PBB_DOMAIN is not initialized.
1058
1059 2009-07-08  Sebastian Pop  <sebastian.pop@amd.com>
1060
1061         * tree-parloops.c (analyze_reduction_list): Remove unused variable
1062         to fix bootstrap.
1063
1064 2009-07-08  Razya Ladelsky  <razya@il.ibm.com>
1065
1066         * tree-parloops.c (analyze_reduction_list): Change return
1067         value to void.
1068         (try_create_reduction_list): Move the call to
1069         analyze_reduction_list to the beginining.
1070         Call reduction_phi with analyzed_reductions as argument
1071         instead of reduction_list.
1072
1073 2009-07-08  Tobias Grosser  <grosser@fim.uni-passau.de>
1074
1075         *  Merge from mainline (r148296:149346)
1076
1077 2009-07-07  Sebastian Pop  <sebastian.pop@amd.com>
1078
1079         * graphite-scop-detection.c (graphite_can_represent_init): New.
1080         (graphite_can_represent_scev): Call graphite_can_represent_init:
1081         check that the initial value does not contain multiplications of
1082         parameters.
1083         (stmt_has_simple_data_refs_p): New.
1084         (stmt_simple_for_scop_p): Call stmt_simple_for_scop_p.
1085         (is_simple_operand): Fix formatting.
1086         * graphite-sese-to-poly.c (try_generate_gimple_bb): Fix formatting.
1087
1088 2009-07-07  Sebastian Pop  <sebastian.pop@amd.com>
1089
1090         * testsuite/gcc.dg/graphite/id-13.c: New.
1091         * graphite-sese-to-poly.c (graphite_stmt_p): Do not call
1092         analyze_scalar_evolution, use scalar_evolution_in_region.
1093         (scan_tree_for_params_right_scev): Add extra assert.
1094         (parameter_index_in_region_1): Split from parameter_index_in_region.
1095         (idx_record_params): Use scalar_evolution_in_region.
1096         (find_params_in_bb): Same.
1097         (find_scop_parameters): Same.
1098         (build_loop_iteration_domains): Same.
1099         (create_linear_expr_from_tree): Same.
1100         * sese.c (scalar_evolution_in_region): New.
1101         * sese.h (scalar_evolution_in_region): Declared.
1102         (defined_in_sese_p): New.
1103         * tree-scalar-evolution.c (compute_overall_effect_of_inner_loop): Not
1104         static anymore.
1105         * tree-scalar-evolution.h (compute_overall_effect_of_inner_loop):
1106         Declared.
1107
1108 2009-07-07  Sebastian Pop  <sebastian.pop@amd.com>
1109
1110         * Makefile.in: Replace dependences on tree-chrec.h with SCEV_H.
1111         TREE_DATA_REF_H also implies SCEV_H.
1112
1113 2009-07-07  Sebastian Pop  <sebastian.pop@amd.com>
1114
1115         * graphite-poly.c (print_scop_params): New.
1116         (print_scop): Call print_scop_params.
1117         (debug_scop_params): New.
1118         * graphite-poly.h (print_scop_params, debug_scop_params): Declared.
1119
1120 2009-07-07  Li Feng  <nemokingdom@gmail.com>
1121
1122         * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-4.c: New.
1123         * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-5.c: New.
1124         * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-6.c: New.
1125         * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-7.c: New.
1126         * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-8.c: New.
1127         * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-9.c: New.
1128
1129 2009-07-07  Li Feng  <nemokingdom@gmail.com>
1130
1131         * graphite-clast-to-gimple.c (mark_loops_parallel): Dump information
1132         for dependency checking part.
1133         * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-1.c: Add
1134         tests for dependency checking.
1135         * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-2.c: Ditto.
1136         * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-3.c: Ditto.
1137         * testsuite/gcc.dg/graphite/graphite_autopar/graphite_autopar.exp: Add
1138         flag -fdump-tree-graphite-all for autopar testsuites.
1139
1140 2009-07-06  Sebastian Pop  <sebastian.pop@amd.com>
1141
1142         * Makefile.in (tree-ssa-loop-manip.o): Depends on langhooks.h.
1143         * tree-parloops.c (rewrite_phi_with_iv, rewrite_all_phi_nodes_with_iv,
1144         canonicalize_loop_ivs): Moved...
1145         * tree-ssa-loop-manip.c: ... here.  Include langhooks.h.
1146
1147 2009-07-06  Sebastian Pop  <sebastian.pop@amd.com>
1148
1149         * tree-parloops.c (try_create_reduction_list): Pass an extra
1150         argument analyzed_reductions.  Call analyze_reduction_list.
1151         (gen_parallel_loop): Do not call analyze_reduction_list.
1152         (parallelize_loops): Init and finalize analyzed_reductions.
1153
1154 2009-07-06  Li Feng  <nemokingdom@gmail.com>
1155
1156         * testsuite/gcc.dg/graphite/graphite_autopar/graphite_autopar.exp:
1157         Added flag -fno-loop-strip-mine for autopar testcase.
1158
1159 2009-07-04  Li Feng  <nemokingdom@gmail.com>
1160
1161         * graphite-dependences.c (graphite_carried_dependence_level_k): Use
1162         transformed scattering dimension instead of unmatch orignal when
1163         calling dependence_polyhedron.
1164
1165 2009-06-30  Sebastian Pop  <sebastian.pop@amd.com>
1166
1167         * opts.c (decode_options): Enable flag_loop_strip_mine at -O2.
1168
1169 2009-06-30  Sebastian Pop  <sebastian.pop@amd.com>
1170
1171         * graphite-poly.c (pbb_number_of_iterations): Check for returned
1172         value 1 from ppl_Pointset_Powerset_NNC_Polyhedron_maximize.
1173
1174 2009-06-30  Sebastian Pop  <sebastian.pop@amd.com>
1175
1176         * graphite-blocking.c (pbb_strip_mine_profitable_p): New.
1177         (pbb_do_strip_mine): Call pbb_strip_mine_profitable_p.
1178         * graphite-poly.c (pbb_number_of_iterations): New.
1179         * graphite-poly.h (pbb_number_of_iterations): Declared.
1180         (pbb_iterator_dim, pbb_parameter_dim): New.
1181
1182 2009-06-29  Sebastian Pop  <sebastian.pop@amd.com>
1183
1184         * graphite-clast-to-gimple.c (graphite_create_new_loop): Revert the
1185         last commit on type of lower and upper bound of loops.
1186
1187 2009-06-29  Li Feng  <nemokingdom@gmail.com>
1188
1189         * Makefile.in (graphite-clast-to-gimple.o): Added dependence on
1190         graphite-dependences.h.
1191         * graphite-clast-to-gimple.c (new_bb_pbb_def): New.
1192         (mark_bb_with_pbb): New.
1193         (get_stmtfor_depth): New.
1194         (find_pbb_via_hash): New.
1195         (dependency_in_loop_p): New.
1196         (mark_loops_parallel): New.
1197         (free_aux_in_new_loops): New.
1198         (translate_clast): Add parameter BB_PBB_MAPPING.  Mark newly created
1199         bb with it's relevant pbb. Mark newly created loops.  Remove mark
1200         innermost loop parallel without checking.
1201         (gloog): Add parameter BB_PBB_MAPPING.
1202         * graphite-clast-to-gimple.h (struct bb_pbb_def): New.
1203         (gloog): Change declaration.
1204         (mark_loop_parallel): Make extern.
1205         (free_aux_in_new_loops): Declare.
1206         (bb_pbb_map_hash): New.
1207         (eq_bb_pbb_map): New.
1208         * graphite.c (graphite_transform_loops): Added BB_PBB_MAPPING. Trigger
1209         auto parallelization when flag_graphite_force_parallel is set.
1210         (graphite_finalize): Added free_aux_in_new_loops.
1211         * tree-parloops.c (parallelize_loops): Only generate parallel code for
1212         the innermost loop that marked parallel.  Use
1213         flag_graphite_force_parallel instead of loop->can_be_parallel.
1214         (loop_parallel_p): Move inner most checking out of function.
1215
1216 2009-06-26  Sebastian Pop  <sebastian.pop@amd.com>
1217
1218         * graphite-clast-to-gimple.c (graphite_create_new_loop): Make the
1219         type of lower and upper bound of loops signed long int.
1220
1221 2009-06-26  Sebastian Pop  <sebastian.pop@amd.com>
1222
1223         * cfgloopmanip.c (create_empty_loop_on_edge): Gimplify the loop exit
1224         expression outside the loop.
1225
1226 2009-06-26  Sebastian Pop  <sebastian.pop@amd.com>
1227
1228         * gcc.dg/graphite/interchange-8.c: New.
1229
1230 2009-06-26  Sebastian Pop  <sebastian.pop@amd.com>
1231
1232         * gcc.dg/graphite/interchange-0.c: XFailed.
1233         * gcc.dg/graphite/interchange-5.c: XFailed.
1234         * gcc.dg/graphite/interchange-6.c: XFailed.
1235
1236 2009-06-26  Sebastian Pop  <sebastian.pop@amd.com>
1237
1238         * graphite-interchange.c (compute_array_size_poly): The end of the
1239         recursion should return 1.
1240
1241 2009-06-26  Sebastian Pop  <sebastian.pop@amd.com>
1242
1243         * graphite-interchange.c (compute_array_size_cstr): Allow the
1244         subscript multiplier to be -1.
1245         (compute_array_size): Use PDR_DATA_CONTAINER and not PDR_ACCESSES.
1246         * graphite-poly.c (new_poly_dr): Takes an extra argument for the
1247         data_container.  Initializes PDR_DATA_CONTAINER.
1248         (print_pdr_access_layout): New.
1249         (print_pdr): Call print_pdr_access_layout.  Print PDR_DATA_CONTAINER.
1250         * graphite-poly.h (struct poly_dr): Adjust comment.  Add a new field
1251         data_container.
1252         (PDR_DATA_CONTAINER): New.
1253         (new_poly_dr): Update declaration.
1254         * graphite-sese-to-poly.c (pdr_add_data_dimensions): New.
1255         (build_poly_dr): Call pdr_add_data_dimensions.
1256
1257 2009-06-26  Sebastian Pop  <sebastian.pop@amd.com>
1258
1259         * graphite-poly.h (struct poly_dr): Fix comment.
1260         * graphite-sese-to-poly.c (pdr_add_alias_set): New.
1261         (pdr_add_memory_accesses): New.
1262         (build_poly_dr): Call pdr_add_memory_accesses and pdr_add_alias_set.
1263
1264 2009-06-26  Sebastian Pop  <sebastian.pop@amd.com>
1265
1266         * graphite-poly.c (print_pdrs, debug_pdrs): New.
1267         (print_pbb): Add call to print_pdrs.
1268         * graphite-poly.h (print_pdrs, debug_pdrs): Declared.
1269
1270 2009-06-24  Konrad Trifunovic <konrad.trifunovic@gmail.com>
1271             Li Feng <nemokingdom@gmail.com>
1272
1273         * graphite-dependences.c (graphite_carried_dependence_level_k): New.
1274         (dependency_between_pbbs_p): New.
1275         (lexicographically_gt_p): Assure !empty_p before polyhedron
1276         intersection assign.
1277         (build_lexicographically_gt_constraint): Correct lexicographically
1278         judging.
1279         * graphite-dependences.h: New.
1280         * Makefile.in (graphite-dependences.o): Add graphite-dependences.h.
1281
1282 2009-06-24  Sebastian Pop  <sebastian.pop@amd.com>
1283
1284         * graphite-clast-to-gimple.c (print_clast_stmt): New.
1285         (gloog): Print to dump_file the generated clast.
1286         * graphite-clast-to-gimple.h (print_clast_stmt): Declared.
1287         * graphite-interchange.c (pbb_do_interchange): Fix dump formatting.
1288
1289 2009-06-24  Sebastian Pop  <sebastian.pop@amd.com>
1290
1291         * graphite-poly.c (extend_scattering): Increment
1292         PBB_NB_LOCAL_VARIABLES by the number of added dimensions.
1293
1294 2009-06-24  Sebastian Pop  <sebastian.pop@amd.com>
1295
1296         * graphite-interchange.c (compute_array_size_poly): Added exit of
1297         recursion condition.  Continue iterating even after the first equality.
1298         (compute_array_size): Same.
1299
1300 2009-06-24  Li Feng  <nemokingdom@gmail.com>
1301
1302         * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-1.c: Update
1303         -fdump-tree-final_cleanup to -fdump-tree-optimized.
1304         * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-2.c: Ditto.
1305         * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-3.c: Ditto.
1306         * testsuite/gcc.dg/graphite/graphite_autopar/graphite_autopar.exp: Ditto.
1307
1308 2009-06-23  Sebastian Pop  <sebastian.pop@amd.com>
1309
1310         * sese.c (expand_scalar_variables_stmt): Expand scalar variables
1311         only when the use verifies is_gimple_reg.
1312
1313 2009-06-23  Sebastian Pop  <sebastian.pop@amd.com>
1314
1315         * graphite-clast-to-gimple.c (build_cloog_prog): Fix memory corruption.
1316         Allocate scaldims after call to unify_scattering_dimensions.
1317
1318 2009-06-23  Sebastian Pop  <sebastian.pop@amd.com>
1319
1320         * graphite-clast-to-gimple.c (translate_clast): Fix memory leak.
1321
1322 2009-06-23  Sebastian Pop  <sebastian.pop@amd.com>
1323             Albert Cohen  <albert.cohen@inria.fr>
1324
1325         * graphite-blocking.c (pbb_strip_mine_loop_depth): Do not use local
1326         variables for the strip mining.
1327
1328 2009-06-23  Sebastian Pop  <sebastian.pop@amd.com>
1329             Pranav Garg  <pranav.garg2107@gmail.com>
1330
1331         * Makefile.in (OBJS-common): Added graphite-blocking.o.
1332         (graphite-sese-to-poly.o): Moved down to be in lexicographical order.
1333         (graphite-blocking.o): New rule.
1334         (graphite-poly.o, graphite-ppl.o): Moved to be in lexicographical order.
1335         * graphite-blocking.c: New.
1336         * graphite-poly.c (apply_poly_transforms): Call scop_do_strip_mine for
1337         flag_loop_strip_mine.
1338         (psct_scattering_dim_for_loop_depth): New.
1339         * graphite-poly.h (scop_do_strip_mine): Declared.
1340         (psct_add_local_variable): Increment PBB_NB_LOCAL_VARIABLES.
1341         * tree-ssa-loop.c (gate_graphite_transforms): Do not fail when using
1342         flag_loop_strip_mine.
1343
1344 2009-06-23  Sebastian Pop  <sebastian.pop@amd.com>
1345
1346         * graphite-poly.c (extend_scattering): Avoid initializing and freeing
1347         a GMP value and a PPL coefficient at each iteration of a loop.
1348
1349 2009-06-23  Sebastian Pop  <sebastian.pop@amd.com>
1350
1351         * graphite-dependences.c (dependence_polyhedron): Do not use
1352         pbb_nb_scattering_dims anymore.  Use pbb_nb_scattering_orig and
1353         pbb_nb_scattering_transform.
1354         (graphite_legal_transform_dr): Same.
1355         * graphite-poly.c (extend_scattering): Same.
1356         (unify_scattering_dimensions): Same.
1357         (print_scattering_function): Same.
1358         (new_poly_bb): Initialize PBB_NB_SCATTERING_TRANSFORM and
1359         PBB_NB_LOCAL_VARIABLES.
1360         * graphite-poly.h (pbb_nb_scattering): Removed declaration.
1361         (struct poly_bb): Added nb_local_variables and nb_scattering_transform.
1362         (PBB_NB_LOCAL_VARIABLES, PBB_NB_SCATTERING_TRANSFORM): New.
1363         (pbb_nb_scattering_orig, pbb_nb_scattering_transform): New.
1364         (pbb_nb_scattering_dims, pbb_nb_scattering): Removed.
1365         (pbb_nb_scattering_transform): New.
1366         (pbb_nb_local_vars): Return PBB_NB_LOCAL_VARIABLES.
1367         (psco_scattering_dim): Add assert on parameters.
1368         (psct_scattering_dim): Same.
1369         (psct_scattering_dim_for_loop_depth): Declared.
1370         (psct_local_var_dim): New.
1371         (psco_iterator_dim, psco_parameter_dim): Add assert on parameters.
1372         (psct_iterator_dim, psct_parameter_dim): Same.  To maintain the
1373         correct layout, call pbb_nb_local_vars.
1374         (psct_add_local_variable, psct_add_scattering_dimension): New.
1375         * graphite-sese-to-poly.c (build_pbb_scattering_polyhedrons):
1376         Initialize PBB_NB_SCATTERING_TRANSFORM.
1377
1378 2009-06-23  Sebastian Pop  <sebastian.pop@amd.com>
1379
1380         * graphite-ppl.c (set_inhomogeneous): Renamed ppl_set_inhomogeneous.
1381         (set_coef): Renamed ppl_set_coef.
1382         * graphite-ppl.h (ppl_set_inhomogeneous, ppl_set_coef): Declared.
1383
1384 2009-06-23  Sebastian Pop  <sebastian.pop@amd.com>
1385
1386         * graphite-dependences.c (build_pairwise_scheduling_inequality): Don't
1387         test a boolean against 1.
1388         * graphite-interchange.c (pbb_interchange_loop_depths): Do not build
1389         a new polyhedron for the PBB_TRANSFORMED_SCATTERING.
1390         (pbb_do_interchange): Returns true when a transform has been performed.
1391         (scop_do_interchange): Same.
1392         * graphite-poly.c (apply_poly_transforms): Use the return value of
1393         scop_do_interchange.
1394         * graphite-poly.h (scop_do_interchange): Update declaration.
1395
1396 2009-06-23  Tobias Grosser  <grosser@fim.uni-passau.de>
1397
1398         * graphite-clast-to-gimple.c (gloog): Reset loop->aux right
1399         after last use.
1400         * sese.c (sese_reset_aux_in_loops): New.
1401         * sese.h (sese_reset_aux_in_loops): New.
1402
1403 2009-06-19  Sebastian Pop  <sebastian.pop@amd.com>
1404
1405         * graphite-sese-to-poly.c (scan_tree_for_params_int): Pass in the
1406         multiplier and multiply the constant by the multiplier.
1407         (scan_tree_for_params): Bound the multiplier to its MULT_EXPR.
1408         (build_poly_dr): Do not use the multiplier to define the subscript.
1409
1410 2009-06-19  Sebastian Pop  <sebastian.pop@amd.com>
1411
1412         * graphite-poly.c (new_poly_dr): Pass an extra argument for the
1413         compiler's data reference.  Initialize PDR_CDR.
1414         (print_pdr): Call dump_data_reference.
1415         * graphite-poly.h (struct poly_dr): Rename black_box into pbb.
1416         Add compiler_dr field.
1417         (PDR_BB): Renamed PDR_PBB.
1418         (PDR_CDR): New.
1419         * graphite-sese-to-poly.c (build_poly_dr): Pass to new_poly_dr
1420         GCC's data reference representation.
1421         * tree-data-ref.c (debug_data_references, debug_data_reference): New.
1422         * tree-data-ref.h (debug_data_references, debug_data_reference): Decl.
1423
1424 2009-06-19  Sebastian Pop  <sebastian.pop@amd.com>
1425
1426         * graphite-poly.c (print_scattering_function): Also print the layout.
1427         * graphite-poly.h (pbb_nb_local_vars): New.
1428
1429 2009-06-19  Sebastian Pop  <sebastian.pop@amd.com>
1430
1431         * graphite-poly.c (print_pbb_domain): Also print the layout names.
1432
1433 2009-06-19  Sebastian Pop  <sebastian.pop@amd.com>
1434
1435         * graphite-poly.c (print_pdr, debug_pdr): New.
1436         * graphite-poly.h (print_pdr, debug_pdr): Declared.
1437         (PDR_BASE): Removed.
1438
1439 2009-06-18  Sebastian Pop  <sebastian.pop@amd.com>
1440
1441         * gcc/testsuite/gcc.dg/graphite/interchange-{1..7}.c: New avatars of
1442         ltrans-{1..6,8}.c.
1443
1444 2009-06-18  Sebastian Pop  <sebastian.pop@amd.com>
1445
1446         * graphite-interchange.c (compute_subscript): Allow also -1 in the
1447         subscript identification column.
1448         (pbb_do_interchange): Print to dump_file that some loops "will be
1449         interchanged".  Rely on that chain of characters in the testcases.
1450         * gcc.dg/graphite/interchange-0.c: New.
1451         * gcc.dg/graphite/graphite.exp: Iterate over the testsuite
1452         interchange-*.c files and compile them with -floop-interchange.
1453
1454 2009-06-18  Pranav Garg  <pranav.garg2107@gmail.com>
1455
1456         * graphite-interchange.c (interchange_profitable_p): Renamed
1457         pbb_interchange_profitable_p.
1458
1459 2009-06-18  Sebastian Pop  <sebastian.pop@amd.com>
1460             Harsha Jagasia  <harsha.jagasia@amd.com>
1461             Pranav Garg  <pranav.garg2107@gmail.com>
1462
1463         * graphite-interchange.c (interchange_profitable_p): Make static.
1464         (pbb_interchange_loop_depths, pbb_do_interchange,
1465         scop_do_interchange): New.
1466         * graphite-poly.c (apply_poly_transforms): Call scop_do_interchange
1467         for flag_loop_interchange.
1468         * graphite-poly.h (scop_do_interchange): Declared.
1469         * tree-ssa-loop.c (gate_graphite_transforms): Do not fail when
1470         flag_loop_interchange is used.
1471
1472 2009-06-18  Sebastian Pop  <sebastian.pop@amd.com>
1473
1474         * graphite-dependences.c (dependence_polyhedron): Update use of
1475         pbb_nb_scattering_dims.
1476         * graphite-poly.h (pbb_nb_scattering_dims): Do not pass SCOP.
1477         (pbb_nb_scattering): Update use of pbb_nb_scattering_dims.
1478         (psco_scattering_dim, psct_scattering_dim, psco_iterator_dim,
1479         psct_iterator_dim, psco_parameter_dim, psct_parameter_dim): New.
1480
1481 2009-06-16  Sebastian Pop  <sebastian.pop@amd.com>
1482
1483         * graphite.c: Cleanup foo.
1484
1485 2009-06-16  Sebastian Pop  <sebastian.pop@amd.com>
1486
1487         * Merge from mainline (r143684:148293).
1488         * Disabled libpcp until it gets fixed.
1489
1490 2009-06-05  Sebastian Pop  <sebastian.pop@amd.com>
1491             Harsha Jagasia  <harsha.jagasia@amd.com>
1492
1493         * graphite-interchange.c: New.
1494         * Makefile.in (graphite-interchange.o): New.
1495         * graphite-poly.h (interchange_profitable_p): Declared.
1496         * graphite-ppl.h (value_max): New.
1497
1498 2009-06-04  Sebastian Pop  <sebastian.pop@amd.com>
1499
1500         * graphite-dependences.c (dependence_polyhedron): Use pdr_dim.
1501         * graphite-poly.h: Fix some comments.
1502         (pdr_dim): New.
1503         (pdr_scop): New.
1504
1505 2009-06-04  Sebastian Pop  <sebastian.pop@amd.com>
1506
1507         * graphite-poly.h
1508         (pdr_accessp_nb_subscripts): Renamed pdr_nb_subscripts.
1509         (pdr_accessp_nb_iterators): Renamed pdr_dim_iter_domain.
1510         (pdr_accessp_nb_params): Renamed pdr_nb_params.
1511         (pdr_accessp_alias_set_dim): Renamed pdr_alias_set_dim.
1512         (pdr_accessp_subscript_dim): Renamed pdr_subscript_dim.
1513         (pdr_accessp_iterator_dim): Renamed pdr_iterator_dim.
1514         (pdr_accessp_param_dim): Renamed pdr_parameter_dim.
1515         (pbb_nb_loops): Renamed pbb_dim_iter_domain.
1516         * graphite-clast-to-gimple.c: Same.
1517         * graphite-dependences.c: Same.
1518         * graphite-poly.c: Same.
1519         * graphite-sese-to-poly.c: Same.
1520
1521 2009-06-03  Sebastian Pop  <sebastian.pop@amd.com>
1522
1523         * graphite-clast-to-gimple.c (build_iv_mapping): Insert full
1524         expressions for an IV rename, as returned by clast_to_gcc_expression.
1525         (copy_renames): Rename new_name to expr.
1526         * sese.c (debug_rename_elt): Same.
1527         (get_rename): Same.
1528         (set_rename): Same.
1529         (sese_adjust_liveout_phis): Call force_gimple_operand before using
1530         the information from the rename map.
1531         (rename_variables_in_stmt): Same.
1532         (add_loop_exit_phis): Rename new_name to expr.
1533         (insert_loop_close_phis): Same.
1534         (add_guard_exit_phis): Same.  Call force_gimple_operand.
1535         * sese.h (struct rename_map_elt): Rename new_name to expr.
1536         (new_rename_map_elt): Same.
1537
1538 2009-06-03  Sebastian Pop  <sebastian.pop@amd.com>
1539
1540         * graphite-clast-to-gimple.c (build_iv_mapping): Use set_rename.
1541         * sese.c (set_rename): Make it extern.
1542         * sese.h (set_rename): Declared.
1543
1544 2009-06-03  Sebastian Pop  <sebastian.pop@amd.com>
1545
1546         * graphite-poly.c (extend_scattering): Free values.
1547         * graphite-ppl.c (new_Cloog_Domain_from_ppl_Pointset_Powerset):
1548         Free iterators.
1549         (ppl_print_powerset_matrix): Same.
1550         * graphite-scop-detection.c (free_scops_1): New.
1551         (limit_scops): Call free_scops_1.
1552         * graphite-sese-to-poly.c (build_scop_bbs_1): Free dom.
1553         (build_poly_dr): Free PPL coefficients.
1554         * tree-parloops.c (rewrite_all_phi_nodes_with_iv): Free bbs.
1555
1556 2009-06-02  Sebastian Pop  <sebastian.pop@amd.com>
1557
1558         * graphite-dependences.c: New.
1559         * graphite-data-ref.c: Removed.
1560         * graphite-data-ref.h: Removed.
1561         * Makefile.in (graphite-data-ref.o): Removed.
1562         (graphite-dependences.o): Added.
1563         * graphite-clast-to-gimple.c: Remove dependence on graphite-data-ref.h.
1564         * graphite-poly.c: Same.
1565         Move the data dependence testing to graphite-dependences.c.
1566
1567 2009-05-19  Tobias Grosser  <grosser@fim.uni-passau.de>
1568
1569         * graphite-scop-detection.c (graphite_can_represent_loop): Renamed
1570         from graphite_cannot_represent_loop. Code refactored.
1571         (scopdet_basic_block_info): Call graphite_can_represent_loop.
1572
1573 2009-05-17  Li Feng  <nemokingdom@gmail.com>
1574
1575         * testsuite/gcc.dg/graphite/graphite_autopar/graphite_autopar.exp:
1576         Cover all the testcases (not only the filtered ones).
1577
1578 2009-05-17  Tobias Grosser  <grosser@fim.uni-passau.de>
1579
1580         * graphite-scop-detection.c (stmt_simple_for_scop_p): Remove
1581         unnecessary check. Update comments. Move check for REAL_TYPE here.
1582         (harmful_stmt_in_bb): Remove checks for conditions. This is already
1583         done in (stmt_simple_for_scop_p).
1584
1585 2009-05-14 Tobias Grosser  <grosser@fim.uni-passau.de>
1586
1587         * graphite.c (print_global_statistics): New.
1588         (print_graphite_scop_statistic): New.
1589         (print_graphite_statistics): New.
1590         (graphite_initialize, graphite_transform_loops): Print statistics.
1591         * graphite-scop-detection (build_scops): Print statistics.
1592         (print_graphite_scop_statistics): New.
1593         (print_graphite_statistics): New.
1594
1595 2009-05-13  Sebastian Pop  <sebastian.pop@amd.com>
1596
1597         * graphite-clast-to-gimple.c (struct clast_name_index): Removed.
1598         (debug_clast_name_index): Removed.
1599         (debug_clast_name_indexes_1): Removed.
1600         (debug_clast_name_indexes): Removed.
1601         (clast_name_index_elt_info): Removed.
1602         (eq_clast_name_indexes): Removed.
1603         (clast_name_to_index): Removed.
1604         (new_clast_name_index): Removed.
1605         (save_clast_name_index): Removed.
1606         (save_var_name): Moved...
1607         (init_sese_params_index): Removed.
1608         (clast_name_to_gcc): Remove use of name_tree.
1609         (initialize_cloog_names): Same.
1610         (gloog): Do not call init_sese_params_index.
1611         * graphite-sese-to-poly.c (save_var_name): ...here.
1612         (parameter_index_in_region): New.
1613         * sese.c (new_sese): Initialize SESE_PARAMS_NAMES.
1614         (parameter_index_in_region): Removed.
1615         (is_parameter): Remove use of name_tree.
1616         * sese.h (struct name_tree): Removed.
1617         (struct sese): Remove use of name_tree.  New field params_names.
1618         (SESE_PARAMS_NAMES): New.
1619         (SESE_PARAMS): Remove duplicate.
1620         (parameter_index_in_region): Removed.
1621         (sese_nb_params): Remove use of name_tree.
1622         (struct clast_name_index): New.
1623         (new_clast_name_index): New.
1624         (clast_name_to_index): New.
1625         (save_clast_name_index): New.
1626         (debug_clast_name_index): New.
1627         (debug_clast_name_indexes_1): New.
1628         (debug_clast_name_indexes): New.
1629         (clast_name_index_elt_info): New.
1630         (eq_clast_name_indexes): New.
1631
1632 2009-05-13  Sebastian Pop  <sebastian.pop@amd.com>
1633
1634         * graphite-clast-to-gimple.c (compute_cloog_iv_types_1): Call
1635         pbb_to_depth_to_oldiv.  Remove call to oldiv_for_loop.
1636         (graphite_loop_normal_form): Do not pass region.  Do not
1637         initialize SESE_OLDIVS.
1638         (build_graphite_loop_normal_form): Update call to
1639         graphite_loop_normal_form.
1640         * sese.c (debug_oldivs): Removed.
1641         (new_sese): Do not initialize SESE_OLDIVS.
1642         (free_sese): Do not free SESE_OLDIVS.
1643         (oldiv_for_loop): Removed.
1644         * sese.h (struct sese): Remove old_ivs.
1645         (SESE_OLDIVS): Removed.
1646         (oldiv_for_loop): Removed.
1647
1648 2009-05-13  Sebastian Pop  <sebastian.pop@amd.com>
1649
1650         * graphite-clast-to-gimple.c (clast_name_to_gcc): Pass newivs,
1651         remove ivstack.  Remove call to loop_iv_stack_get_iv_from_name,
1652         replaced by a call to newivs_to_depth_to_newiv.
1653         (clast_to_gcc_expression): Pass newivs, remove ivstack.
1654         (clast_to_gcc_expression_red): Same.
1655         (gcc_type_for_clast_expr): Same.
1656         (gcc_type_for_clast_eq): Same.
1657         (graphite_translate_clast_equation): Same.
1658         (graphite_create_guard_cond_expr): Same.
1659         (graphite_create_new_guard): Same.
1660         (graphite_create_new_loop): Same.
1661         (build_iv_mapping): Same.
1662         (translate_clast): Same.
1663         (gloog): Same.
1664         (loop_iv_stack_patch_for_consts): Removed.  *
1665         sese.c (iv_stack_entry_is_constant): Removed.
1666         (iv_stack_entry_is_iv): Removed.
1667         (loop_iv_stack_push_iv): Removed.
1668         (loop_iv_stack_insert_constant): Removed.
1669         (loop_iv_stack_pop): Removed.
1670         (loop_iv_stack_get_iv): Removed.
1671         (loop_iv_stack_get_iv_from_name): Removed.
1672         (debug_loop_iv_stack): Removed.
1673         (free_loop_iv_stack): Removed.
1674         (loop_iv_stack_remove_constants): Removed.  *
1675         sese.h (iv_stack_entry_kind): Removed.
1676         (iv_stack_entry_data_union): Removed.
1677         (iv_stack_entry_struct): Removed.
1678         (iv_stack_entry_p): Removed.
1679         (debug_oldivs, debug_loop_iv_stack, loop_iv_stack_insert_constant,
1680         loop_iv_stack_get_iv_from_name, loop_iv_stack_push_iv,
1681         loop_iv_stack_get_iv, loop_iv_stack_remove_constants,
1682         loop_iv_stack_pop, free_loop_iv_stack): Removed.
1683         (gbb_loop_at_index): Fix indenting.
1684         (gbb_loop_index): Removed.
1685
1686 2009-05-13  Sebastian Pop  <sebastian.pop@amd.com>
1687
1688         * graphite-clast-to-gimple.c (clast_name_to_gcc): Do not use strcmp.
1689         Call clast_name_to_index.
1690
1691 2009-05-13  Sebastian Pop  <sebastian.pop@amd.com>
1692
1693         * graphite-clast-to-gimple.c (clast_name_to_gcc): Pass region,
1694         do not pass params.  Get params from SESE_PARAMS.
1695         (clast_to_gcc_expression): Same.
1696         (clast_to_gcc_expression_red): Same.
1697         (gcc_type_for_clast_eq): Same.
1698         (graphite_translate_clast_equation): Same.
1699         (graphite_create_new_loop): Same.
1700         * sese.c (rename_variables_in_stmt): Fix comment.
1701
1702 2009-05-13  Sebastian Pop  <sebastian.pop@amd.com>
1703
1704         * graphite-clast-to-gimple.c (graphite_create_new_loop): Pass
1705         newivs_index.
1706         Call save_clast_name_index.
1707         (translate_clast): Pass newivs_index.
1708         (gloog): Create and free newivs_index.
1709
1710 2009-05-13  Sebastian Pop  <sebastian.pop@amd.com>
1711
1712         * graphite-clast-to-gimple.c (clast_name_index): New structure.
1713         (clast_name_index_p): New type.
1714         (debug_clast_name_index): New.
1715         (debug_clast_name_indexes_1): New.
1716         (debug_clast_name_indexes): New.
1717         (clast_name_index_elt_info): New.
1718         (eq_clast_name_indexes): New.
1719         (clast_name_to_index): New.
1720         (new_clast_name_index): New.
1721         (save_clast_name_index): New.
1722         (init_sese_params_index): New.
1723         (gloog): Call init_sese_params_index.
1724         * graphite-clast-to-gimple.h (debug_clast_name_indexes): Declared.
1725         * sese.c (new_sese): Initialize SESE_PARAMS_INDEX.
1726         (free_sese): Free SESE_PARAMS_INDEX.
1727         * sese.h (struct sese): Add params_index.
1728         (SESE_PARAMS_INDEX): New.
1729
1730 2009-05-13  Sebastian Pop  <sebastian.pop@amd.com>
1731
1732         * graphite-clast-to-gimple.c (newivs_to_depth_to_newiv): New.
1733         (graphite_create_new_loop): Pass the newivs vector.  Push the
1734         newly created IV to newivs.
1735         (translate_clast): Pass the newivs vector.
1736         (gloog): Create and destroy the newivs vector.
1737
1738 2009-05-13  Sebastian Pop  <sebastian.pop@amd.com>
1739
1740         * graphite-clast-to-gimple.c (pbb_to_depth_to_oldiv): New.
1741         (graphite_loop_normal_form): Initialize loop->aux with the unique
1742         IV that has been created.
1743
1744 2009-05-13 Tobias Grosser  <grosser@fim.uni-passau.de>
1745
1746         * tree-chrec.c (evolution_function_right_is_integer_cst): Allow
1747         scev with parameters in the base part. They where forbidden
1748         exidently.
1749
1750 2009-05-11  Li Feng  <nemokingdom@gmail.com>
1751
1752         * testsuite/gcc.dg/graphite/graphite.exp: Set different default
1753         compile options by file names.
1754         * testsuite/gcc.dg/graphite/block{0-6}.c: Remove dg-option line.
1755         * testsuite/gcc.dg/graphite/id-{1-9}.c: Ditto.
1756         * testsuite/gcc.dg/graphite/scop-{0-20}.c: Ditto.
1757         * testsuite/gcc.dg/graphite/scop-matmult.c: Ditto.
1758
1759 2009-05-08  Li Feng <nemokingdom@gmail.com>
1760
1761         * testsuite/gcc.dg/graphite/graphite_autopar/graphite_autopar.exp: New.
1762         * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-1.c: New.
1763         * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-2.c: New.
1764         * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-3.c: New.
1765
1766 2009-05-07  Tobias Grosser  <grosser@fim.uni-passau.de>
1767
1768         * graphite-scop-detection (build_scops_1): Fix little bug introduced
1769         by final cleanup.
1770
1771 2009-05-07  Tobias Grosser  <grosser@fim.uni-passau.de>
1772
1773         * graphite-scop-detection.c (graphite_can_represent_scev): Only
1774         allow integer constant strides.
1775         (graphite_can_represent_expr): Depend on outermost_loop.
1776         (stmt_simple_memref_p, graphite_cannot_represent_loop,
1777         harmful_stmt_in_bb, is_simple_operand, stmt_simple_for_scop_p,
1778         build_scops_1): Same.
1779         (scopdet_basic_block_info): Same and insert layered SCoP
1780         detection.
1781         (try_generate_gimple_bb): Cleanup.
1782         (build_scops): Enable data references.
1783
1784         * testsuite/gcc.dg/graphite/id-5.c: New.
1785         * testsuite/gcc.dg/graphite/id-9.c: New.
1786         * tree-chrec.c (evolution_function_right_is_integer_cst): New.
1787         * tree-chrec.h (evolution_function_right_is_integer_cst): New.
1788
1789 2009-05-06  Tobias Grosser  <grosser@fim.uni-passau.de>
1790
1791         * sese.c (expand_scalar_variables_ssa_name): Only build expressions,
1792         that we have not yet built for this SCoP.
1793
1794 2009-05-06  Tobias Grosser  <grosser@fim.uni-passau.de>
1795
1796         * sese.c (expand_scalar_variables_expr): Fix expand_scalar_variables
1797         for complex numbers.
1798
1799 2009-05-06  Tobias Grosser  <grosser@fim.uni-passau.de>
1800
1801         * graphite-ppl.c: Fix build if cloog is not available.
1802
1803 2009-05-04  Li Feng  <nemokingdom@gmail.com>
1804
1805         * tree-parloops.c (loop_parallel_p): Remove construction of
1806         NITER and REDUCTION_LIST.
1807         (try_get_loop_niter): New.
1808         (try_create_reduction_list): New.
1809         (parallelize_loops): Bypass the failed checkings in autopar
1810         when can_be_parallel in loop structure is set to true.
1811
1812 2009-05-01  Tobias Grosser  <grosser@fim.uni-passau.de>
1813
1814         * testsuite/gcc.dg/graphite/id-6.c: Update testcase.
1815         * testsuite/gcc.dg/graphite/scop-3.c: Dito.
1816
1817 2009-05-01  Tobias Grosser  <grosser@fim.uni-passau.de>
1818
1819         * graphite-scop-detection.c (stmt_simple_for_scop_p):
1820         Enable EQ_EXPR and NE_EXPR again.
1821
1822 2009-04-30  Tobias Grosser  <grosser@fim.uni-passau.de>
1823
1824         * graphite-scop-detection.c (graphite_can_represent_scev):
1825         Add check if scev is affine multivariate.
1826         (harmful_stmt_in_bb): Check if we can represent the conditions.
1827         (scopdet_basic_block_info (basic_block bb, VEC): Pass the loop to
1828         harmful_stmt_in_bb.
1829         * testsuite/gcc.dg/graphite/id-7.c: New.
1830
1831 2009-04-30  Tobias Grosser  <grosser@fim.uni-passau.de>
1832
1833         * graphite-sese-to-poly.c (bb_contains_non_iv_scalar_phi_nodes):
1834         Check all bbs in region, not only the bbs that are represented in
1835         GRAPHITE.
1836         (build_poly_scop): Add newline.
1837         * testsuite/gcc.dg/graphite/id-8.c: New.
1838
1839 2009-04-30  Li Feng  <nemokingdom@gmail.com>
1840
1841         * cfgloop.c (alloc_loop): Initialize can_be_parallel to false
1842         when loop initialize.
1843         * cfgloop.h (struct loop): Introduce flag can_be_parallel.
1844         * common.opt: Declare flag_graphite_force_parallel.
1845         * graphite-clast-to-gimple.c (translate_clast): Mark the innermost
1846         loop parallel.
1847         * graphite-poly.c (apply_poly_transforms): Introduce
1848         flag_graphite_force_parallel.
1849         * tree-ssa-loop.c (gate_graphite_transforms): ditto.
1850         * toplev.c (process_options): ditto and replace a not correctly
1851         encoded space.
1852
1853 2009-04-30  Li Feng  <nemokingdom@gmail.com>
1854
1855         * graphite-clast-to-gimple.c (loop_iv_stack_patch_for_consts):
1856         Change the call of gbb_loop_at_index and/or gbb_loop_index due
1857         to the redefinition.
1858         (compute_cloog_iv_types_1): ditto.
1859         (build_iv_mapping): ditto.
1860         * graphite-sese-to-poly.c (new_gimple_bb): Remove GBB_LOOPS related
1861         initialization.
1862         (free_gimple_bb): Removed GBB_LOOPS related free part.
1863         (build_bb_loops): Removed.
1864         * sese.h (struct gimple_bb): Removed loops.
1865         (GBB_LOOPS): Removed.
1866         (gbb_loop_at_index): Instead of using GBB_LOOPS, we use sese instead.
1867         (gbb_loop_index): ditto.
1868
1869 2009-04-24  Tobias Grosser  <grosser@fim.uni-passau.de>
1870
1871         * graphite-scop-detection.c (graphite_can_represent_scev): Do not
1872         allow non constant strides.
1873         * testsuite/gcc.dg/graphite/scop-20.c: New.
1874
1875 2009-04-24  Sebastian Pop  <sebastian.pop@amd.com>
1876
1877         * graphite-scop-detection.c (dot_all_scops): Fix system call
1878         return value warning.
1879         (dot_scop): Same.
1880
1881 2009-04-24  Sebastian Pop  <sebastian.pop@amd.com>
1882
1883         * testsuite/gcc.dg/graphite/id-6.c: Fix pattern.
1884         * testsuite/gcc.dg/graphite/scop-3.c: Same.
1885
1886 2009-04-24  Sebastian Pop  <sebastian.pop@amd.com>
1887
1888         * graphite-poly.c (map_into_dep_poly, map_dr_into_dep_poly,
1889         build_pairwise_constraint, dr_equality_constraints,
1890         build_pairwise_scheduling_equality,
1891         build_pairwise_scheduling_inequality, lexicographically_gt_p,
1892         build_lexicographically_gt_constraint, dependence_polyhedron,
1893         graphite_legal_transform_dr, graphite_legal_transform_bb,
1894         graphite_legal_transform): New.
1895         * graphite-poly.h (graphite_legal_transform): Declared.
1896         * graphite-sese-to-poly.c (build_poly_scop): Call to
1897         graphite_legal_transform is disabled for the moment.
1898
1899 2009-04-24  Sebastian Pop  <sebastian.pop@amd.com>
1900
1901         * graphite-poly.h (pbb_nb_scattering_dims): New.
1902         (pbb_nb_scattering): Use it.
1903
1904 2009-04-24  Sebastian Pop  <sebastian.pop@amd.com>
1905
1906         * graphite-ppl.c (ppl_insert_dimensions_pointset): Add
1907         Pointset_Powerset version of ppl_insert_dimensions.
1908         * graphite-ppl.h (ppl_insert_dimensions_pointset): Declared.
1909
1910 2009-04-24  Sebastian Pop  <sebastian.pop@amd.com>
1911
1912         * graphite-ppl.c (ppl_insert_dimensions): Fix formatting.
1913
1914 2009-04-24  Sebastian Pop  <sebastian.pop@amd.com>
1915
1916         * graphite-poly.h: Fix comment.
1917
1918 2009-04-24  Sebastian Pop  <sebastian.pop@amd.com>
1919
1920         * graphite-sese-to-poly.c (build_poly_dr): Fix data ref multiplier.
1921
1922 2009-04-24  Tobias Grosser  <grosser@fim.uni-passau.de>
1923
1924         * sese.c (expand_scalar_variables_stmt): Only iterate over the old
1925         statements.
1926
1927 2009-04-24  Tobias Grosser  <grosser@fim.uni-passau.de>
1928
1929         * graphite-sese-to-poly.c (var_used_in_not_loop_header_phi_node): New.
1930         (graphite_stmt_p): Represent bbs necessary to build the phi nodes of
1931         conditions.
1932
1933 2009-04-20  Sebastian Pop  <sebastian.pop@amd.com>
1934
1935         * graphite-scop-detection.c (stmt_simple_for_scop_p): Do not
1936         handle EQ_EXPR and NE_EXPR.
1937
1938 2009-04-17  Tobias Grosser  <grosser@fim.uni-passau.de>
1939
1940         * graphite-poly.h (poly_dr): Fix comment.
1941
1942 2009-04-09  Sebastian Pop  <sebastian.pop@amd.com>
1943             Tobias Grosser  <grosser@fim.uni-passau.de>
1944
1945         * graphite-poly.c (new_poly_bb): Do not initialize PBB_DOMAIN
1946         with a zero dimension polyhedron.
1947         (find_scop_parameters): Move the call to scop_set_nb_params here.
1948         (build_loop_iteration_domains): Store in loop->aux the iteration
1949         domain polyhedron.
1950         (build_scop_iteration_domain): Fix PBB_DOMAIN for bbs not surrounded
1951         by any loop in scop.
1952         (build_poly_scop): Do not call scop_set_nb_params.
1953
1954 2009-04-09  Sebastian Pop  <sebastian.pop@amd.com>
1955             Tobias Grosser  <grosser@fim.uni-passau.de>
1956
1957         * graphite-sese-to-poly.c (add_condition_to_pbb): Pass code to
1958         add_condition_to_domain not GT_EXPR.
1959
1960 2009-04-09  Tobias Grosser  <grosser@fim.uni-passau.de>
1961
1962         * graphite-ppl.c (debug_ppl_powerset_matrix): New.
1963         * graphite-ppl.h (debug_ppl_powerset_matrix): New.
1964         * graphite-sese-to-poly.c (add_condition_to_pbb): Use
1965         upper_bound_assign to calculate unions.
1966         * testsuite/gcc.dg/graphite/id-6.c: New.
1967
1968 2009-04-09  Tobias Grosser  <grosser@fim.uni-passau.de>
1969
1970         * graphite-scop-detection.c (canonicalize_loop_closed_ssa): Do not
1971         handle abnormal edges.
1972
1973 2009-04-09  Tobias Grosser  <grosser@fim.uni-passau.de>
1974
1975         * graphite-poly.c (new_poly_dr, free_poly_dr): New.
1976         (free_poly_bb): Also free poly_drs.
1977         * graphite-poly.h (new_poly_dr, free_poly_dr): New.
1978         (poly_dr): Polyhedron to Pointset_Powerset.
1979         (pdr_accessp_nb_subscripts): Same.
1980         * graphite-sese-to-poly.c (build_poly_dr): Same. And actually build
1981         poly_drs.
1982
1983 2009-04-08  Sebastian Pop  <sebastian.pop@amd.com>
1984
1985         * graphite-clast-to-gimple.c (initialize_cloog_names): Change cloog
1986         names into more meaningful names.
1987
1988 2009-04-08  Sebastian Pop  <sebastian.pop@amd.com>
1989
1990         * testsuite/gfortran.dg/graphite/interchange-1.c: New.
1991         * testsuite/gfortran.dg/graphite/interchange-2.c: New.
1992
1993 2009-04-08  Sebastian Pop  <sebastian.pop@amd.com>
1994
1995         * graphite-clast-to-gimple.c (graphite_loop_normal_form): Do not build
1996         the reduction_list.
1997         * tree-parloops.c (rewrite_phi_with_iv): New.
1998         (rewrite_all_phi_nodes_with_iv): New.
1999         (canonicalize_loop_ivs): Call them.
2000
2001 2009-04-08  Sebastian Pop  <sebastian.pop@amd.com>
2002
2003         * graphite-sese-to-poly.c (try_generate_gimple_bb): Use
2004         graphite_find_data_references_in_stmt.
2005         * tree-data-ref.c (graphite_find_data_references_in_stmt): New.
2006         * tree-data-ref.h (graphite_find_data_references_in_stmt): Declared.
2007
2008 2009-04-08  Sebastian Pop  <sebastian.pop@amd.com>
2009
2010         * sese.c (add_loop_exit_phis): Don't fail on non SSA_NAME renames.
2011
2012 2009-04-08  Sebastian Pop  <sebastian.pop@amd.com>
2013
2014         * graphite-sese-to-poly.c (build_scop_bbs_1): Use bb_in_sese_p
2015         instead of bb_in_region.
2016         (flag_bb_in_region): Same.  Renamed flag_bb_in_sese.
2017         (build_sese_conditions): Use flag_bb_in_sese.
2018         * sese.c (register_bb_in_sese): Removed.
2019         (new_sese): Remove initialization of SESE_REGION_BBS.
2020         (free_sese): Do not free SESE_REGION_BBS.
2021         * sese.h (struct sese): Remove field region_basic_blocks.
2022         (SESE_REGION_BBS): Removed.
2023         (bb_in_sese_p): Implement in function of bb_in_region.
2024
2025 2009-04-08  Sebastian Pop  <sebastian.pop@amd.com>
2026
2027         * graphite-scop-detection.c (limit_scops): Deal only with single exit
2028         loops.
2029
2030 2009-04-08  Tobias Grosser  <grosser@fim.uni-passau.de>
2031
2032         * graphite-scop-detection.c (stmt_simple_for_scop_p): Allow NE_EXPR
2033         and EQ_EXPR.
2034         * graphite-sese-to-poly.c (create_linear_expr_from_tree): New.
2035         (add_condition_to_domain): New.
2036         (add_condition_to_pbb): New.
2037         (add_conditions_to_domain): Cleanup and handle of NE_EXPR and EQ_EXPR.
2038         * testsuite/gcc.dg/graphite/scop-3.c: Update number of detected SCoPs.
2039
2040 2009-04-08  Tobias Grosser  <grosser@fim.uni-passau.de>
2041
2042         * graphite-clast-to-gimple.c (build_cloog_prog): ppl_Polyhedron ->
2043         ppl_Pointset_Powerset.
2044         * graphite-poly.c (new_poly_bb, free_poly_bb): Same.
2045         * graphite-poly.h (poly_bb): poly_bb.domain Same.
2046         (pbb_nb_loops): Same.
2047         * graphite-sese-to-poly.c (build_loop_iteration_domains,
2048         add_conditions_to_domain): Same.
2049         * graphite-ppl.c (new_Cloog_Domain_from_ppl_Pointset_Powerset): New.
2050         (ppl_print_polyhedron_matrix): ppl_Polyhedron_t ->
2051         ppl_const_Polyhedron_t.
2052         (ppl_print_powerset_matrix): New.
2053         * graphite-ppl.h (new_Cloog_Domain_from_ppl_Pointset_Powerset,
2054         ppl_print_powerset_matrix): New.
2055         (ppl_print_polyhedron_matrix): Updated.
2056
2057 2009-04-07  Sebastian Pop  <sebastian.pop@amd.com>
2058
2059         * tree-scalar-evolution.c (analyze_scalar_evolution_1): Fix comment.
2060
2061 2009-04-07  Sebastian Pop  <sebastian.pop@amd.com>
2062
2063         * graphite-poly.c (extend_scattering): Fix indenting.  Free cstr.
2064         (print_iteration_domains, debug_iteration_domain,
2065         debug_iteration_domains): New.
2066         * graphite-poly.h (print_iteration_domains, debug_iteration_domain,
2067         debug_iteration_domains): Declared.
2068         * graphite-sese-to-poly.c (build_pbb_scattering_polyhedrons): Fix
2069         indenting.
2070
2071 2009-04-03  Tobias Grosser  <grosser@fim.uni-passau.de>
2072             Sebastian Pop  <sebastian.pop@amd.com>
2073
2074         * graphite-poly.h (print_iteration_domain): New.
2075         * graphite-sese-to-poly.c (add_conditions_to_domain): Fixed bug.
2076         (build_sese_conditions_1, build_sese_conditions_after,
2077         build_sese_conditions_before): New.
2078         (build_sese_conditions): Rewritten.
2079
2080 2009-04-03  Sebastian Pop  <sebastian.pop@amd.com>
2081             Tobias Grosser  <grosser@fim.uni-passau.de>
2082
2083         Cleanup of code generation liveouts.
2084         * graphite-clast-to-gimple.c (translate_clast): Use a single
2085         rename_map instead of one per translated statement.
2086         Do not use SESE_LIVEOUT_RENAMES.
2087         (graphite_loop_normal_form): Do not use SESE_REDUCTION_LIST.
2088         (gloog): Do not use SESE_LIVEOUT_RENAMES.
2089         * graphite-scop-detection.c (harmful_stmt_in_bb): Return the close
2090         phi node of a reduction: when a loop contains a reduction used outside
2091         the loop, there should be a scalar close phi node on the exit block.
2092         * sese.c (new_sese): Do not initialize SESE_LIVEOUT,
2093         SESE_LIVEOUT_RENAMES, and SESE_REDUCTION_LIST.
2094         (free_sese): Do not free them.
2095         (sese_build_liveouts_use): Do not use them.
2096         (sese_build_liveouts_bb): Same.
2097         (sese_build_liveouts): Same.
2098         (sese_insert_phis_for_liveouts): Same.
2099         (sese_adjust_phis_for_liveouts): Same.  Renamed sese_adjust_liveout_phis.
2100         (defined_in_loop_p): New.
2101         (alive_after_loop): New.
2102         (close_phi_not_yet_inserted_p): New.
2103         (struct alep, alep_p): New.
2104         (add_loop_exit_phis): Remove from the rename_map all the names defined
2105         in the code generated loop.
2106         (insert_loop_close_phis): Traverse the rename_map passed to it.
2107         Don't use SESE_LIVEOUT_RENAMES.
2108         (default_liveout_before_guard): Renamed default_before_guard.
2109         (insert_guard_phis): Do not use SESE_LIVEOUT_RENAMES.
2110         (graphite_copy_stmts_from_block): Do not directly call set_rename.
2111         (register_sese_liveout_renames): Removed.
2112         (copy_bb_and_scalar_dependences): Do not call it.
2113         * sese.h (struct sese): Removed fields: liveout, liveout_renames, and
2114         reduction_list.
2115         (SESE_LIVEOUT): Removed.
2116         (SESE_LIVEOUT_RENAMES): Removed.
2117         (SESE_REDUCTION_LIST): Removed.
2118         (sese_build_liveouts): Removed.
2119         (sese_adjust_phis_for_liveouts): Renamed sese_adjust_liveout_phis.
2120         (insert_loop_close_phis): Pass a htab_t instead of a sese.
2121         (insert_guard_phis): Same.
2122         (rename_map_elt): Declare a VEC of them.
2123         * tree-parloops.c (canonicalize_loop_ivs): reduction_list contains
2124         trees not pointers to trees.
2125
2126         Rewrite in canonical close SSA form:
2127         * graphite-scop-detection.c (contains_only_close_phi_nodes): New.
2128         (limit_scops): Close the scop after the block containing the close phi
2129         nodes.
2130         (canonicalize_loop_closed_ssa): New.
2131         (canonicalize_loop_closed_ssa_form): New.
2132         (build_scops): Call canonicalize_loop_closed_ssa_form.
2133
2134         * graphite-sese-to-poly.c: Fix typos.
2135
2136 2009-04-03  Sebastian Pop  <sebastian.pop@amd.com>
2137
2138         * graphite-poly.c (print_scattering_function, print_pbb_domain):
2139         Extended.
2140         (dump_gbb_conditions, dump_gbb_cases, print_iteration_domain): New.
2141         (print_pbb): Add conditions.
2142
2143 2009-04-01  Tobias Grosser  <grosser@fim.uni-passau.de>
2144             Sebastian Pop  <sebastian.pop@amd.com>
2145
2146         * graphite-scop-detection.c (bb_in_sd_region): Use bb_in_region.
2147         * graphite-sese-to-poly.c (all_non_dominated_preds_marked_p): New.
2148         (build_scop_bbs_1): New.
2149         (build_scop_bbs): Rewrite.
2150         * sese.h (bb_in_region): New.
2151
2152 2009-03-29  Tobias Grosser  <grosser@fim.uni-passau.de>
2153
2154         * graphite-poly.c (new_poly_bb, free_poly_bb): Initialize/free
2155         poly_drs vector.
2156         (print_scop): Style.
2157         * graphite-poly.h (poly_bb): Add drs vector.
2158         (PBB_DRS): Add accessor.
2159         * graphite-sese-to-poly.c (build_poly_dr): New.
2160         (build_pbb_drs, build_scop_drs): New.
2161         (build_poly_scop): call build_scop_drs (Disabled at the moment).
2162
2163 2009-03-29  Tobias Grosser  <grosser@fim.uni-passau.de>
2164
2165         * tree-ssa-loop.c: Include forgotten toplev.h
2166
2167 2009-03-29  Tobias Grosser  <grosser@fim.uni-passau.de>
2168
2169         * graphite-poly.c: (apply_poly_transforms): sorry -> gcc_unreachable.
2170         * testsuite/gcc.dg/graphite/pr37883.c: Remove -floop-*
2171         * testsuite/gcc.dg/graphite/pr37928.c: Same
2172         * testsuite/gcc.dg/graphite/pr38409.c: Same
2173         * testsuite/gcc.dg/graphite/pr38498.c: Same
2174         * testsuite/gcc.dg/graphite/pr38559.c: Same
2175         * testsuite/gcc.dg/graphite/pr39335.c: Same
2176         * testsuite/gcc.dg/graphite/pr39335_1.c: Same
2177         * testsuite/gfortran.dg/graphite/block-2.f: Same
2178         * tree-ssa-loop.c (gate_graphite_transforms): Always fail if called
2179         with -floop-*.
2180
2181 2009-03-28  Tobias Grosser  <grosser@fim.uni-passau.de>
2182
2183         * graphite-sese-to-poly.c (ref_nb_loops, build_access_matrix_with_af,
2184         build_access_matrix, build_scop_data_accesses): Remove access function
2185         building. (We get a new version soon).
2186         (build_bb_loops, scan_tree_for_params_right_scev): Update.
2187         * sese.h (nb_loops_around_loop_in_sese): Remove.
2188         (sese_loop_depth): Do not use SESE_LOOP_NEST any more.
2189
2190 2009-03-27  Tobias Grosser  <grosser@fim.uni-passau.de>
2191             Sebastian Pop  <sebastian.pop@amd.com>
2192
2193         * graphite-scop-detection.c (struct scopdet_info): Rename last
2194         field to exit.
2195         (scopdet_basic_block_info, build_scops_1): Don't use
2196         CDI_POST_DOMINATORS.  CDI_POST_DOMINATORS should never be used.
2197
2198 2009-03-26  Tobias Grosser  <grosser@fim.uni-passau.de>
2199             Sebastian Pop  <sebastian.pop@amd.com>
2200
2201         * graphite-clast-to-gimple.c (gloog): Call sese_build_liveouts.
2202         * sese.c (sese_build_liveouts_use): Renamed from
2203         sese_build_livein_liveouts_use. Remove liveins.
2204         (sese_build_liveouts_bb): Renamed from sese_build_livein_liveouts_bb.
2205         Call sese_build_liveouts_use.
2206         (sese_build_liveouts): Renamed from sese_build_livein_liveouts.
2207         Call sese_build_liveouts_bb.
2208         (new_sese, free_sese): Remove liveins.
2209         (sese_add_exit_phis_var): Deleted.
2210         (sese_insert_phis_for_liveouts): Call sese_add_exit_phis_edge
2211         directly.
2212         (graphite_copy_stmts_from_block): Remove SESE_NUM_VER.
2213
2214         * sese.h (sese): Remove num_ver and livein.
2215         (SESE_LIVEIN, SESE_LIVEIN_VER, SESE_NUM_VER): Removed.
2216
2217 2009-03-25  Tobias Grosser  <grosser@fim.uni-passau.de>
2218
2219         * graphite-sese-to-poly.c (build_scop_scattering): Fix compile.
2220
2221 2009-03-25  Tobias Grosser  <grosser@fim.uni-passau.de>
2222
2223         * graphite-sese-to-poly.c (compare_prefix_loops): Removed.
2224         (build_scop_scattering): Do not use compare_prefix_loops any more.
2225         (nb_common_loops): New.
2226
2227 2009-03-24  Sebastian Pop  <sebastian.pop@amd.com>
2228
2229         * sese.c (get_new_name_from_old_name): Renamed get_rename.
2230         (register_old_and_new_names): Renamed set_rename.
2231
2232 2009-03-24  Sebastian Pop  <sebastian.pop@amd.com>
2233
2234         * graphite-scop-detection.h (nb_reductions_in_loop): Revert removal
2235         of the decl from the previous commit.
2236
2237 2009-03-24  Sebastian Pop  <sebastian.pop@amd.com>
2238
2239         * graphite-scop-detection.c (dot_scop): New.
2240         * graphite-scop-detection.h (dot_scop): Declared.
2241
2242 2009-03-24  Sebastian Pop  <sebastian.pop@amd.com>
2243
2244         * graphite-sese-to-poly.c (compare_prefix_loops): Fix compare.
2245
2246 2009-03-24  Sebastian Pop  <sebastian.pop@amd.com>
2247
2248         * cfgloopmanip.c (create_empty_loop_on_edge): Generate the loop exit
2249         condition at the end of the loop.
2250         * graphite.c (graphite_initialize, graphite_finalize): Print to
2251         dump_file the compiled function.
2252         * graphite-clast-to-gimple.c (graphite_create_new_loop): Update use
2253         of create_empty_loop_on_edge.
2254         (translate_clast): Update the code generation of loops for the new
2255         shape of loops.
2256         * cfgloop.h (create_empty_loop_on_edge): Update declaration.
2257
2258 2009-03-24  Sebastian Pop  <sebastian.pop@amd.com>
2259
2260         Reverted the patch from 2009-03-19.
2261
2262 2009-03-19  Tobias Grosser  <grosser@fim.uni-passau.de>
2263
2264         * graphite-poly.c (new_poly_bb, free_poly_bb): Initialize/free
2265         poly_drs vector.
2266         (print_scop): Style.
2267         * graphite-poly.h (poly_bb): Add drs vector.
2268         (PBB_DRS): Add accessor.
2269         * graphite-sese-to-poly.c (ref_nb_loops): Remove.
2270         (build_access_matrix_with_af, build_access_matrix,
2271         build_scop_data_accesses): Delete.
2272         (build_poly_dr): New.
2273         (build_pbb_drs, build_scop_drs): New.
2274         (build_poly_scop): call build_scop_drs.
2275
2276 2009-03-13  Sebastian Pop  <sebastian.pop@amd.com>
2277
2278         * graphite-scop-detection.c (dot_all_scops_1): Close the table
2279         once per basic block.
2280
2281 2009-03-13  Tobias Grosser  <grosser@fim.uni-passau.de>
2282
2283         * graphite-scop-detection.c (graphite_can_represent_scev): New.
2284         (graphite_can_represent_expr): Renamed from loop_affine_expr
2285         and enhanced.
2286         (stmt_simple_for_scop_p): Call graphite_can_represent_expr.
2287         (graphite_cannot_represent_loop): Add scop_entry to parameters.
2288         (scopdet_basic_block_info): Actually define entry_block.
2289         (stmt_simple_memref_p): Moved here from ...
2290
2291         * tree-data-ref.c (stmt_simple_memref_p): here.
2292         * tree-data-ref.h (stmt_simple_memref_p): Removed.
2293
2294 2009-03-13  Tobias Grosser  <grosser@fim.uni-passau.de>
2295
2296         * testsuite/gcc.dg/graphite/id-4.c: New.
2297
2298 2009-03-12  Sebastian Pop  <sebastian.pop@amd.com>
2299
2300         * sese.c (expand_scalar_variables_expr): Handle tcc_comparison.
2301         (register_old_and_new_names): Update the content of the map.
2302         When there was already a rename_map_elt in the map at that
2303         location, free it.
2304         (copy_bb_and_scalar_dependences): Do rename_variables after
2305         expand_scalar_variables.
2306         * graphite-clast-to-gimple.c (build_iv_mapping): Update the content
2307         of the map.  When there was already a rename_map_elt in the
2308         map at that location, free it.
2309         (translate_clast): Pass the rename_map.  Do not initialize and free
2310         a rename_map per stmt_user.
2311         (gloog): Initialize and free one rename_map and pass it to
2312         translate_clast.
2313
2314 2009-03-12  Sebastian Pop  <sebastian.pop@amd.com>
2315
2316         * sese.c (expand_scalar_variables_stmt,
2317         expand_scalar_variables_ssa_name): Add a gimple_stmt_iterator
2318         parameter.
2319         (expand_scalar_variables_expr): Handle REALPART_EXPR and IMAGPART_EXPR.
2320         (expand_scalar_variables): Pass to expand_scalar_variables_stmt
2321         the gimple_stmt_iterator of the statement to be expanded.
2322         * graphite-scop-detection.c (is_simple_operand): Do handle
2323         REALPART_EXPR.
2324
2325 2009-03-11  Tobias Grosser  <grosser@fim.uni-passau.de>
2326
2327         * graphite-scop-detection.c (is_simple_operand): Do not handle
2328         REALPART_EXPR.
2329         * testsuite/gcc.dg/graphite/id-2.c: New.
2330
2331         * graphite-sese-to-poly.c (build_bb_loops,
2332         add_value_to_dim, scan_tree_for_params_right_scev,
2333         scan_tree_for_params_int, scan_tree_for_params, idx_record_params,
2334         find_params_in_bb, build_loop_iteration_domains,
2335         add_conditions_to_domain): Remove subtract.
2336
2337 2009-03-11  Tobias Grosser  <grosser@fim.uni-passau.de>
2338
2339         * graphite-clast-to-gimple.c (loop_iv_stack_patch_for_consts,
2340         build_iv_mapping, compute_cloog_iv_types_1, build_cloog_prog):
2341         pbb_loop_at_index -> gbb_loop_at_index.
2342         * graphite-poly.c (new_poly_bb, new_scop): New accessors.
2343         (debug_loop_vec): Delete.
2344         * graphite-poly.h (poly_bb, scop): Change black_box and region to void
2345         pointer.  Move LOOPS to gimple_bb_p and insert nb_params.
2346         (PBB_LOOPS): Removed.
2347         (PBB_BLACK_BOX): Insert cast.
2348         (pbb_set_black_box): New setter.
2349         (pbb_loop_at_index, pbb_loop_index): Removed.
2350         (scop_set_region, scop_set_nb_params): New.
2351         * graphite-sese-to-poly.c (new_gimple_bb, free_gimple_bb,
2352         build_scop_scattering, build_bb_loops): Add GBB_LOOPS.
2353         (build_poly_scop): Use scop_set_nb_params.
2354         * sese.h (gimple_bb): Add LOOPS.
2355         (GBB_LOOPS, gbb_loop_index, gbb_loop_at_index): New.
2356
2357 2009-03-11  Tobias Grosser  <grosser@fim.uni-passau.de>
2358
2359         Revert previous commit.
2360
2361 2009-03-11  Sebastian Pop  <sebastian.pop@amd.com>
2362
2363         * sese.c (expand_scalar_variables_expr): Handle tcc_comparison.
2364         (register_old_and_new_names): Update the content of the map.
2365         When there was already a rename_map_elt in the map at that
2366         location, free it.
2367         (copy_bb_and_scalar_dependences): Do rename_variables after
2368         expand_scalar_variables.
2369         * graphite-clast-to-gimple.c (build_iv_mapping): Update the content
2370         of the map.  When there was already a rename_map_elt in the
2371         map at that location, free it.
2372         (translate_clast): Pass the rename_map.  Do not initialize and free
2373         a rename_map per stmt_user.
2374         (gloog): Initialize and free one rename_map and pass it to
2375         translate_clast.
2376
2377 2009-03-11  Tobias Grosser  <grosser@fim.uni-passau.de>
2378
2379         Remove forgotten line in revert.
2380
2381 2009-03-11  Sebastian Pop  <sebastian.pop@amd.com>
2382
2383         Revert previous commit.
2384
2385 2009-03-10  Sebastian Pop  <sebastian.pop@amd.com>
2386
2387         * sese.c (register_old_and_new_names): Update the content
2388         of the map.  When there was already a rename_map_elt in the
2389         map at that location, free it.
2390         (copy_bb_and_scalar_dependences): Do rename_variables after
2391         expand_scalar_variables.
2392         * graphite-clast-to-gimple.c (build_iv_mapping): Update the content
2393         of the map.  When there was already a rename_map_elt in the
2394         map at that location, free it.
2395         (translate_clast): Pass the rename_map.  Do not initialize and free
2396         a rename_map per stmt_user.
2397         (gloog): Initialize and free one rename_map and pass it to
2398         translate_clast.
2399
2400 2009-03-10  Sebastian Pop  <sebastian.pop@amd.com>
2401
2402         * graphite-clast-to-gimple.c (translate_clast): context_loop
2403         is never NULL.
2404
2405 2009-03-10  Tobias Grosser  <grosser@fim.uni-passau.de>
2406             Sebastian Pop  <sebastian.pop@amd.com>
2407
2408         * graphite-ppl.c (ppl_insert_dimensions): Fix stupid mistake
2409         of the use of ppl_Polyhedron_map_space_dimensions.
2410
2411 2009-03-10  Tobias Grosser  <grosser@fim.uni-passau.de>
2412             Sebastian Pop  <sebastian.pop@amd.com>
2413
2414         * graphite-poly.c (unify_scattering_dimensions): Fix types.
2415         * graphite-poly.h (poly_dr_p, poly_dr, POLY_DR_TYPE, PDR_BB,
2416         PDR_TYPE, PDR_ACCESSES, pdr_accessp_nb_subscripts,
2417         pdr_accessp_nb_iterators, pdr_accessp_nb_params,
2418         pdr_accessp_alias_set_dim, pdr_accessp_subscript_dim,
2419         pdr_accessp_iterator_dim, pdr_accessp_param_dim,
2420         pbb_nb_params): New.
2421         (pbb_nb_loops, pbb_nb_scattering, scop_nb_params,
2422         nb_loops_around_pbb): Adapt return types.
2423
2424 2009-03-09  Tobias Grosser  <grosser@fim.uni-passau.de>
2425
2426         * Makefile.in (graphite.o, graphite-sese-to-poly.o,
2427         graphite-clast-to-gimple.o,  graphite-data-ref.o,
2428         graphite-scop-detection.o, graphite-poly.o): Add
2429         more headers.
2430
2431 2009-03-05  Tobias Grosser  <grosser@fim.uni-passau.de>
2432
2433         * Makefile.in (graphite.o, graphite-sese-to-poly.o,
2434         graphite-clast-to-gimple.o,  graphite-data-ref.o,
2435         graphite-scop-detection.o, graphite-poly.o): Add graphite-poly.h.
2436
2437 2009-03-04  Tobias Grosser  <grosser@fim.uni-passau.de>
2438
2439         * testsuite/gcc.dg/graphite/pr37485.c: Remove -floop-block
2440         * testsuite/gcc.dg/graphite/pr37828.c: Same.
2441         * testsuite/gcc.dg/graphite/pr37684.c: Same.
2442         * testsuite/gcc.dg/graphite/block-0.c: Same.
2443         * testsuite/gcc.dg/graphite/block-1.c: Same.
2444         * testsuite/gcc.dg/graphite/block-2.c: Same.
2445         * testsuite/gcc.dg/graphite/block-3.c: Same.
2446         * testsuite/gcc.dg/graphite/block-4.c: Same.
2447         * testsuite/gcc.dg/graphite/block-5.c: Same.
2448         * testsuite/gcc.dg/graphite/block-6.c: Same.
2449         * testsuite/gfortran.dg/graphite/pr38083.f90: Same.
2450         * testsuite/gfortran.dg/graphite/block-1.f90: Same.
2451         * testsuite/gfortran.dg/graphite/block-3.f90: Same.
2452         * testsuite/gfortran.dg/graphite/pr37852.f90: Same.
2453         * testsuite/gfortran.dg/graphite/block-4.f90: Same.
2454         * testsuite/gfortran.dg/graphite/pr37980.f90: Same.
2455         * testsuite/gfortran.dg/graphite/pr38953.f90: Same.
2456         * testsuite/gfortran.dg/graphite/pr37857.f90: Same.
2457         * opts.c: Remove -floop-block from -O2.
2458         * graphite-poly.c: Fail if -floop-block -floop-interchange or
2459         -floop-strip-mine are used.
2460
2461 2009-03-04  Tobias Grosser  <grosser@fim.uni-passau.de>
2462             Sebastian Pop  <sebastian.pop@amd.com>
2463
2464         * graphite-clast-to-gimple.c (build_cloog_prog): Unify scattering
2465         dimensions.
2466         * graphite-poly.c (pbb_compare, graphite_sort_pbbs,
2467         graphite_trans_bb_move_loop, graphite_trans_bb_strip_mine,
2468         strip_mine_profitable_p, is_interchange_valid,
2469         graphite_trans_bb_block, graphite_trans_loop_block,
2470         graphite_trans_scop_block): Temporary removed.
2471         (extend_scattering, unify_scattering_dimensions): New.
2472         (print_scattering_function, graphite_read_transforms):
2473         PBB_SCATTERING -> PBB_TRANSFORMED_SCATTERING.
2474         (graphite_generate_scattering_fns): Removed.
2475         (apply_poly_transforms): Cleanup.
2476         (free_poly_bb): Add PBB_SCATTERING -> PBB_TRANSFORMED_SCATTERING.
2477         (schedule_to_scattering): Moved.
2478         (PBB_STATIC_SCHEDULE, PBB_SCATTERING): Removed.
2479         (PBB_ORIGINAL_SCATTERING, PBB_TRANSFORMED_SCATTERING): New.
2480         (pbb_nb_scattering): New.
2481         (SCOP_ENTRY, SCOP_EXIT, SCOP_REGION_BBS, SCOP_DEP_GRAPH, SCOP_PARAMS,
2482         SCOP_LOOP_NEST, SCOP_PARAMS, SCOP_OLDIVS, SCOP_LIVEOUT_RENAMES):
2483         Removed.
2484         * graphite-ppl.c (ppl_insert_dimensions): Extended and renamed from
2485         shift_poly.
2486         (ppl_strip_loop): PBB_SCATTERING -> PBB_TRANSFORMED_SCATTERING.
2487         * graphite-scop-detection.c (dot_all_scops_1):  PBB_SCATTERING
2488         -> PBB_TRANSFORMED_SCATTERING.
2489         * graphite-sese-to-poly.c (build_scop_bbs): Remove region.
2490         (build_pbb_scattering_polyhedron): Moved from schedule_to_scattering.
2491         (build_scop_scattering): Renamed from build_scop_canonical_schedules.
2492         (check_poly_representation): Do not return bool.
2493         (graphite_transform_loops): Reformat.
2494         * sese.h (SESE_ENTRY_BB, SESE_EXIT_BB): New.
2495
2496 2009-03-04  Sebastian Pop  <sebastian.pop@amd.com>
2497
2498         * graphite-poly.c (print_pbb_domain, print_pbb, print_scop,
2499         debug_pbb_domain, debug_pbb, debug_scop): New.
2500         * graphite-poly.h (print_pbb_domain, print_pbb, print_scop,
2501         debug_pbb_domain, debug_pbb, debug_scop): Declared.
2502
2503 2009-03-02  Sebastian Pop  <sebastian.pop@amd.com>
2504
2505         PR middle-end/39335
2506         * tree-parloops.c (canonicalize_loop_ivs): Call fold_convert
2507         when the type precision of the induction variable should be
2508         larger than the type precision of nit.
2509         (gen_parallel_loop): Update use of canonicalize_loop_ivs.
2510         * graphite-clast-to-gimple.c (graphite_loop_normal_form): Same.
2511         * tree-flow.h (canonicalize_loop_ivs): Update declaration.
2512
2513         * testsuite/gcc.dg/graphite/pr39335_1.c: New.
2514         * testsuite/gcc.dg/graphite/pr39335.c: New.
2515
2516 2009-03-02  Sebastian Pop  <sebastian.pop@amd.com>
2517
2518         * tree-parloops.c (canonicalize_loop_ivs): reduction_list contains
2519         SSA_NAMES not struct reduction_info.
2520
2521 2009-03-02  Sebastian Pop  <sebastian.pop@amd.com>
2522
2523         * sese.c (expand_scalar_variables_expr): Handle ADDR_EXPR.
2524
2525 2009-02-27  Sebastian Pop  <sebastian.pop@amd.com>
2526             Tobias Grosser  <grosser@fim.uni-passau.de>
2527
2528         * sese.c (new_sese): Initialize SESE_REDUCTION_LIST.
2529         (free_sese): Free SESE_REDUCTION_LIST.
2530         * sese.h (struct sese): Add field reduction_list.
2531         (SESE_REDUCTION_LIST): New.
2532         * graphite-clast-to-gimple.c (graphite_loop_normal_form): Call
2533         canonicalize_loop_ivs on SESE_REDUCTION_LIST.
2534
2535 2009-02-27  Sebastian Pop  <sebastian.pop@amd.com>
2536             Tobias Grosser  <grosser@fim.uni-passau.de>
2537
2538         * tree-flow.h (gather_scalar_reductions): Use struct loop * instead
2539         of loop_p.
2540
2541 2009-02-27  Sebastian Pop  <sebastian.pop@amd.com>
2542             Tobias Grosser  <grosser@fim.uni-passau.de>
2543
2544         * tree-parloops.c (struct brli, build_reduction_list_info,
2545         analyze_reduction_list, gather_scalar_reductions): New.
2546         (loop_parallel_p): Build a reduction list containing only
2547         PHI_RESULT SSA_NAMEs: call gather_scalar_reductions.
2548         (gen_parallel_loop): Call the analysis analyze_reduction_list.
2549         (parallelize_loops): Now reduction_list is a htab_t of SSA_NAMEs.
2550         * tree-flow.h (gather_scalar_reductions): Declared.
2551
2552 2009-02-26  Sebastian Pop  <sebastian.pop@amd.com>
2553
2554         PR middle-end/39308
2555         * graphite-clast-to-gimple.c (graphite_loop_normal_form): Do not call
2556         number_of_iterations_exit from a gcc_assert.
2557
2558 2009-02-25  Sebastian Pop  <sebastian.pop@amd.com>
2559             Jan Sjodin  <jan.sjodin@amd.com>
2560
2561         * output.h (graphite_out_file, graphite_in_file): Declared.
2562         * toplev.c (graphite_out_file, graphite_in_file): New.
2563         (init_asm_output): Initialize graphite_in_file and graphite_out_file.
2564         * graphite-clast-to-gimple.c (build_cloog_prog): Read PBB_SCATTERING.
2565         Don't call schedule_to_scattering.
2566         * common.opt (fgraphite-write, fgraphite-read): New.
2567         * graphite-poly.c: Include output.h.
2568         (print_scattering_function, print_scattering_functions,
2569         debug_scattering_function, debug_scattering_functions,
2570         graphite_write_transforms, graphite_read_transforms,
2571         graphite_generate_scattering_fns): New.
2572         (apply_poly_transforms): Do not apply transform if flag_graphite_read.
2573         Call graphite_generate_scattering_fns, graphite_write_transforms,
2574         graphite_read_transforms.
2575         (new_poly_bb): Initialize PBB_SCATTERING.
2576         (free_poly_bb): Free PBB_SCATTERING.
2577         (schedule_to_scattering): Does not return, initialize PBB_SCATTERING.
2578         * graphite-poly.h (struct poly_bb): Add field scattering.
2579         (PBB_SCATTERING): New.
2580         (print_scattering_function, print_scattering_functions,
2581         debug_scattering_function, debug_scattering_functions): Declared.
2582         * graphite-ppl.c (cloog_matrix_to_ppl_constraint): Matrices contain
2583         GMP values, not integers!
2584         (ppl_print_polyhedron_matrix, debug_ppl_polyhedron_matrix,
2585         ppl_read_polyhedron_matrix): New.
2586         * graphite-ppl.h (ppl_print_polyhedron_matrix,
2587         debug_ppl_polyhedron_matrix,
2588         ppl_read_polyhedron_matrix): Declared.
2589         * Makefile.in (graphite-poly.o): Depends on output.h.
2590
2591 2009-02-23  Sebastian Pop  <sebastian.pop@amd.com>
2592             Tobias Grosser  <grosser@fim.uni-passau.de>
2593
2594         Revert this change:
2595         * graphite-scop-detection.c (stmt_simple_for_scop_p): Analyze
2596         scalar evolutions in the scop_entry->loop_father.
2597
2598 2009-02-23  Sebastian Pop  <sebastian.pop@amd.com>
2599             Tobias Grosser  <grosser@fim.uni-passau.de>
2600
2601         * graphite.h (ref_nb_loops): Remove declaration.
2602         (struct gimple_bb, gimple_bb_p, GBB_BB, GBB_DATA_REFS, GBB_CONDITIONS,
2603         GBB_CONDITION_CASES, GBB_CLOOG_IV_TYPES, gbb_loop, print_gimple_bb,
2604         debug_gbb): Moved to sese.h.
2605         * sese.h: As said.
2606
2607 2009-02-23  Sebastian Pop  <sebastian.pop@amd.com>
2608             Tobias Grosser  <grosser@fim.uni-passau.de>
2609
2610         * graphite-data-ref.[ch]: Disable.
2611
2612 2009-02-23  Sebastian Pop  <sebastian.pop@amd.com>
2613             Tobias Grosser  <grosser@fim.uni-passau.de>
2614
2615         * graphite-scop-detection.c (stmt_simple_for_scop_p): Analyze
2616         scalar evolutions in the scop_entry->loop_father.
2617
2618 2009-02-23  Sebastian Pop  <sebastian.pop@amd.com>
2619
2620         * graphite-scop-detection.c (nb_reductions_in_loop): Moved here...
2621         (graphite_cannot_represent_loop_niter): Renamed
2622         graphite_cannot_represent_loop.  Call nb_reductions_in_loop.
2623         (limit_scops): build_sese_loop_nests does not return a bool.
2624         * graphite-scop-detection.h (nb_reductions_in_loop): Declared.
2625         * sese.c (nb_reductions_in_loop): ... from here.
2626         (graphite_loop_normal_form): ... from here.
2627         (sese_record_loop): Does not fail, so does not return a bool.
2628         (build_sese_loop_nests): Same.
2629         * sese.h (build_sese_loop_nests): Update declaration.
2630         * graphite-clast-to-gimple.c (graphite_loop_normal_form): Moved here...
2631         (build_graphite_loop_normal_form): New.
2632         (gloog): Call build_graphite_loop_normal_form.
2633         * graphite-sese-to-poly.c (build_poly_scop): Don't fail on
2634         build_sese_loop_nests.
2635
2636         * testsuite/gcc.dg/graphite/id-1.c: New.
2637
2638 2009-02-23  Sebastian Pop  <sebastian.pop@amd.com>
2639             Tobias Grosser  <grosser@fim.uni-passau.de>
2640
2641         * graphite-sese-to-poly.c (scan_tree_for_params): Remove REAL_CST.
2642         The SCoP detection fix is sufficient.
2643
2644 2009-02-21  Sebastian Pop  <sebastian.pop@amd.com>
2645
2646         PR tree-optimization/39260
2647         * graphite-scop-detection.c (harmful_stmt_in_bb): Stop a SCoP when
2648         the basic block contains a condition with a real type.
2649         * graphite-sese-to-poly.c (scan_tree_for_params): Handle REAL_CST.
2650
2651         * gcc.dg/graphite/pr39260.c: New.
2652
2653 2009-02-21  Sebastian Pop  <sebastian.pop@amd.com>
2654
2655         * graphite-poly.c: Inlcude params.h.
2656         (graphite_trans_loop_block): Use PARAM_LOOP_BLOCK_TILE_SIZE for
2657         the size of a tile.
2658         * Makefile.in (graphite-poly.o): Depend on PARAMS_H.
2659         * params.def (PARAM_LOOP_BLOCK_TILE_SIZE): Define.
2660
2661 2009-02-20  Sebastian Pop  <sebastian.pop@amd.com>
2662             Tobias Grosser  <grosser@fim.uni-passau.de>
2663
2664         * graphite-scop-detection.c (dot_all_scops_1,
2665         dot_all_scops): Moved here.
2666         * graphite-scop-detection.h (dot_all_scops): Declared here.
2667         * graphite.c (graphite_initialize, graphite_finalize): New.
2668         (graphite_transform_loops): Cleaned up.
2669         * sese.c (debug_oldivs): Moved here.
2670         * graphite-poly.c (graphite_apply_transformations): Renamed
2671         apply_poly_transforms.
2672         (debug_loop_vec): Moved here.
2673         * graphite-sese-to-poly.c (build_bb_loops, build_sese_conditions_1,
2674         scop_contains_non_iv_scalar_phi_nodes, build_sese_conditions,
2675         find_scop_parameters, build_scop_iteration_domain,
2676         add_conditions_to_constraints, build_scop_canonical_schedules,
2677         build_scop_data_accesses): Now static.
2678         (build_poly_scop, check_poly_representation): New.
2679
2680 2009-02-20  Sebastian Pop  <sebastian.pop@amd.com>
2681
2682         * graphite.c (graphite_stmt_p, new_gimple_bb, free_gimple_bb,
2683         remove_gbbs_in_scop, free_scops, try_generate_gimple_bb,
2684         build_scop_bbs, ref_nb_loops, compare_prefix_loops,
2685         build_scop_canonical_schedules, build_bb_loops, add_value_to_dim,
2686         scan_tree_for_params_right_scev, scan_tree_for_params_int,
2687         scan_tree_for_params, struct irp_data, dx_record_params,
2688         find_params_in_bb, find_scop_parameters, gbb_from_bb,
2689         build_loop_iteration_domains, add_conditions_to_domain,
2690         phi_node_is_iv, bb_contains_non_iv_scalar_phi_nodes,
2691         scop_contains_non_iv_scalar_phi_nodes, build_sese_conditions_1,
2692         build_sese_conditions, add_conditions_to_constraints,
2693         build_scop_iteration_domain, build_access_matrix_with_af,
2694         build_access_matrix,
2695         build_scop_data_accesses): Moved to graphite-sese-to-poly.c.
2696
2697         * graphite-sese-to-poly.c: New.
2698         * graphite-sese-to-poly.h: New.
2699
2700         * Makefile.in: Add new rule for graphite-sese-to-poly.o.
2701
2702 2009-02-20  Sebastian Pop  <sebastian.pop@amd.com>
2703
2704         * graphite.c: Split graphite code generation to a new file.
2705         (graphite_verify, gmp_cst_to_tree, clast_name_to_gcc,
2706         max_precision_type, clast_to_gcc_expression_red,
2707         clast_to_gcc_expression, gcc_type_for_clast_expr,
2708         gcc_type_for_clast_eq, loop_iv_stack_patch_for_consts,
2709         graphite_translate_clast_equation, graphite_create_guard_cond_expr,
2710         graphite_create_new_guard, clast_get_body_of_loop,
2711         gcc_type_for_cloog_iv, gcc_type_for_iv_of_clast_loop,
2712         graphite_create_new_loop, build_iv_mapping, copy_renames,
2713         translate_clast, find_cloog_iv_in_expr, compute_cloog_iv_types_1,
2714         compute_cloog_iv_types, free_scattering, save_var_name,
2715         initialize_cloog_names, build_scop_context, build_cloog_prog,
2716         set_cloog_options, debug_clast_stmt, scop_to_clast,
2717         print_generated_program, debug_generated_program,
2718         gloog): Moved to graphite-clast-to-gimple.c.
2719
2720         (struct cloog_prog_clast): Moved to graphite-clast-to-gimple.h.
2721
2722         (iv_stack_entry_is_constant, iv_stack_entry_is_iv,
2723         loop_iv_stack_push_iv, loop_iv_stack_insert_constant,
2724         loop_iv_stack_pop, loop_iv_stack_get_iv,
2725         loop_iv_stack_get_iv_from_name, debug_loop_iv_stack,
2726         free_loop_iv_stack, loop_iv_stack_remove_constants,
2727         debug_rename_elt, debug_rename_map_1, debug_rename_map,
2728         rename_map_elt_info, eq_rename_map_elts, debug_ivtype_elt,
2729         debug_ivtype_map_1, debug_ivtype_map, ivtype_map_elt_info,
2730         eq_ivtype_map_elts, sese_add_exit_phis_edge,
2731         sese_add_exit_phis_var, sese_insert_phis_for_liveouts,
2732         get_vdef_before_sese, sese_adjust_vphi,
2733         get_new_name_from_old_name, sese_adjust_phis_for_liveouts,
2734         oldiv_for_loop, rename_variables_in_stmt, is_parameter,
2735         is_iv, expand_scalar_variables_ssa_name,
2736         expand_scalar_variables_expr, expand_scalar_variables_stmt,
2737         expand_scalar_variables, rename_variables, remove_condition,
2738         get_true_edge_from_guard_bb, get_false_edge_from_guard_bb,
2739         add_loop_exit_phis, insert_loop_close_phis, struct igp,
2740         default_liveout_before_guard, add_guard_exit_phis,
2741         insert_guard_phis, register_old_and_new_names,
2742         graphite_copy_stmts_from_block, register_sese_liveout_renames,
2743         copy_bb_and_scalar_dependences, outermost_loop_in_sese,
2744         if_region_set_false_region, create_if_region_on_edge,
2745         move_sese_in_condition): Moved to sese.c.
2746
2747         (nb_loops_around_loop_in_sese, struct ifsese, if_region_entry,
2748         if_region_exit, if_region_get_condition_block,
2749         struct rename_map_elt, new_rename_map_elt, enum iv_stack_entry_kind,
2750         union iv_stack_entry_data_union, struct iv_stack_entry_struct,
2751         iv_stack_entry_p, loop_iv_stack, struct ivtype_map_elt,
2752         ivtype_map_elt, new_ivtype_map_elt,
2753         recompute_all_dominators): Moved to sese.h.
2754
2755         * graphite-clast-to-gimple.c: New.
2756         * graphite-clast-to-gimple.h: New.
2757         * Makefile.in: Add new rule for graphite-clast-to-gimple.o.
2758         * sese.c: Modified as said above.
2759         * sese.h: Same.
2760
2761 2009-02-20  Sebastian Pop  <sebastian.pop@amd.com>
2762
2763         * graphite.c: Split scop detection to a new file.
2764         (enum gbb_type, gbb_type, get_bb_type, struct sd_region_p, sd_region,
2765         move_sd_regions, loop_affine_expr, exclude_component_ref,
2766         is_simple_operand, stmt_simple_for_scop_p, harmful_stmt_in_bb,
2767         graphite_cannot_represent_loop_niter, struct scopdet_info,
2768         scopdet_basic_block_info, build_scops_1, bb_in_sd_region,
2769         find_single_entry_edge, find_single_exit_edge,
2770         create_single_entry_edge, sd_region_without_exit,
2771         create_single_exit_edge, unmark_exit_edges, mark_exit_edges,
2772         create_sese_edges, build_graphite_scops, limit_scops, build_scops):
2773         Moved to graphite-scop-detection.c.
2774
2775         * graphite-scop-detection.c: New.
2776         * graphite-scop-detection.h: New.
2777         * Makefile.in: Add new rule for graphite-scop-detection.o.
2778
2779         * sese.c: Include tree-chrec.h, tree-data-ref.h, and
2780         tree-scalar-evolution.h.
2781         (nb_reductions_in_loop, graphite_loop_normal_form, sese_record_loop,
2782         build_sese_loop_nests): Moved here from graphite.c.
2783         (param_index): Renamed parameter_index_in_region.
2784
2785 2009-02-18  Tobias Grosser  <grosser@fim.uni-passau.de>
2786             Sebastian Pop  <sebastian.pop@amd.com>
2787
2788         * gcc.dg/graphite/block-0.c: Expected to fail now.
2789         * gcc.dg/graphite/block-1.c: Same.
2790         * gcc.dg/graphite/block-5.c: Same.
2791         * gcc.dg/graphite/block-6.c: Same.
2792
2793 2009-02-18  Tobias Grosser  <grosser@fim.uni-passau.de>
2794             Sebastian Pop  <sebastian.pop@amd.com>
2795
2796         * graphite.h: Separate from graphite_bb_p the polyhedral
2797         representation in poly_bb_p and the GCC specifics in gimple_bb_p.
2798         (struct data_dependence_polyhedron, RDGE_DDP, ddp_p): Moved to
2799         graphite-data-ref.h.
2800         (struct poly_bb, PBB_SCOP, PBB_STATIC_SCHEDULE, PBB_DOMAIN,
2801         PBB_BLACK_BOX, PBB_LOOPS, pbb_nb_loops, pbb_loop_at_index,
2802         pbb_loop_index, struct scop, SCOP_BBS, SCOP_REGION, SCOP_ENTRY,
2803         SCOP_EXIT, SCOP_REGION_BBS, SCOP_DEP_GRAPH, SCOP_PARAMS,
2804         SCOP_LOOP_NEST, SCOP_PARAMS, SCOP_OLDIVS, SCOP_LIVEOUT_RENAMES,
2805         scop_nb_params): Moved to graphite-poly.h.
2806         * graphite-data-ref.c: Same.
2807         * graphite-data-ref.h: New.
2808         * graphite.c: Same.
2809         (pbb_compare, graphite_sort_pbbs, graphite_trans_bb_move_loop,
2810         graphite_trans_bb_strip_mine, strip_mine_profitable_p,
2811         is_interchange_valid, graphite_trans_bb_block,
2812         graphite_trans_loop_block, scop_max_loop_depth,
2813         graphite_trans_scop_block, graphite_apply_transformations,
2814         new_poly_bb, free_poly_bb, new_scop, free_scop): Moved to
2815         graphite-poly.c.
2816         * graphite-poly.h: New.
2817         * graphite-poly.c: New.
2818         * Makefile.in (OBJS-common): Add graphite-poly.o.
2819         (graphite-poly.o): New rule.
2820         * tree-data-ref.h (struct data_reference): Remove unused scop field.
2821         (DR_SCOP): Removed.
2822
2823 2009-02-18  Sebastian Pop  <sebastian.pop@amd.com>
2824             Tobias Grosser  <grosser@fim.uni-passau.de>
2825
2826         * graphite.c: Replace gb -> gbb.
2827         * graphite.h: Same.
2828         * graphite-data-ref.c: Same.
2829
2830 2009-02-18  Sebastian Pop  <sebastian.pop@amd.com>
2831             Tobias Grosser  <grosser@fim.uni-passau.de>
2832
2833         * Makefile.in (OBJS-commmon): Add sese.o.
2834         (sese.o): New.
2835         (graphite.o): Add sese.h.
2836         * graphite.c (bb_in_ss_p, loop_in_sese_p,
2837         sese_build_livein_liveouts_use, sese_build_livein_liveouts_bb,
2838         sese_build_livein_liveouts, register_bb_in_sese, new_sese, free_sese):
2839         Move to sese.
2840         (block_before_scop): Add missing return.
2841         (new_scop, free_scop): Remove SESE data structures.
2842         (scop_record_loop, scan_tree_for_params, find_params_in_bb,
2843         find_scop_parameters, build_loop_iteration_domains,
2844         add_conditions_to_domain, register_scop_liveout_renames,
2845         copy_bb_and_scalar_dependences): Scop -> SESE.
2846
2847         (add_conditions_to_domain): SCoP -> SESE and remove check
2848         (scop_contains_non_iv_scalar_phi_nodes): New.
2849         (build_scop_conditions_1, build_scop_conditions): Remove check for
2850         non iv scalar phi nodes.
2851         (print_scop_statistics): New.
2852         (graphite_transform_loops): Cleanup.
2853
2854         * graphite.h: Move to sese & cleanup.
2855         * sese.c: New.
2856         * sese.h: New.
2857
2858 2009-02-16  Sebastian Pop  <sebastian.pop@amd.com>
2859             Tobias Grosser  <grosser@fim.uni-passau.de>
2860
2861         * graphite.c (build_scop_conditions_1): Conditions are only
2862         at the end of a basic block.
2863
2864 2009-02-16  Sebastian Pop  <sebastian.pop@amd.com>
2865             Tobias Grosser  <grosser@fim.uni-passau>
2866
2867         * graphite.h (struct graphite_bb): Remove compressed_alpha_matrix
2868         field.
2869         (GBB_ALPHA): Removed.
2870
2871 2009-02-16  Sebastian Pop  <sebastian.pop@amd.com>
2872             Tobias Grosser  <grosser@fim.uni-passau.de>
2873
2874         * graphite-data-ref.c (graphite_test_dependence): Don't use
2875         GBB_DYNAMIC_SCHEDULE.
2876         * graphite.c (new_graphite_bb): Same.
2877         (free_graphite_bb): Same.
2878         (build_scop_dynamic_schedules): Removed.
2879         (graphite_transform_loops): Don't call it.
2880         * graphite.h (struct graphite_bb): Remove dynamic_schedule field.
2881         (GBB_DYNAMIC_SCHEDULE): Removed.
2882
2883 2009-02-16  Sebastian Pop  <sebastian.pop@amd.com>
2884             Tobias Grosser  <grosser@fim.uni-passau.de>
2885
2886         * graphite.c (schedule_to_scattering): Don't use CloogMatrix.
2887         (print_graphite_bb): Same.
2888         (build_cloog_prog): Same.
2889
2890 2009-02-16  Sebastian Pop  <sebastian.pop@amd.com>
2891             Tobias Grosser  <grosser@fim.uni-passau.de>
2892
2893         * graphite.c (build_cloog_prog): Don't use CloogMatrix.
2894
2895 2009-02-16  Sebastian Pop  <sebastian.pop@amd.com>
2896             Tobias Grosser  <grosser@fim.uni-passau.de>
2897
2898         * graphite.c (build_scop_context): Don't use CloogMatrix.
2899         * graphite-ppl.c (new_Cloog_Domain_from_ppl_Polyhedron): New.
2900         * graphite-ppl.h (new_Cloog_Domain_from_ppl_Polyhedron): Declared.
2901
2902 2009-02-16  Sebastian Pop  <sebastian.pop@amd.com>
2903             Tobias Grosser  <grosser@fim.uni-passau.de>
2904
2905         * graphite.h (struct scop): Move params, old_ivs, loops, loop_nest,
2906         liveout_renames, add_params fields...
2907         (struct sese): ... here.
2908         (SESE_PARAMS, SESE_LOOPS, SESE_LOOP_NEST, SESE_ADD_PARAMS,
2909         SESE_PARAMS, SESE_OLDIVS, SESE_LIVEOUT_RENAMES): New.
2910
2911 2009-02-16  Sebastian Pop  <sebastian.pop@amd.com>
2912             Tobias Grosser  <grosser@fim.uni-passau.de>
2913
2914         * graphite.c (print_scop): Do not print the CLooG program.
2915         (new_scop, free_scop, initialize_cloog_names, build_scop_context,
2916         build_cloog_prog, gloog): Don't use SCOP_PROG.
2917         (find_transform): Renamed scop_to_clast.
2918         (print_generated_program, debug_generated_program): New.
2919         (graphite_transform_loops): Adapt to new interface.
2920         * graphite.h (struct scop): Remove program field.
2921         (SCOP_PROG): Removed.
2922         (print_generated_program, debug_generated_program): Declared.
2923
2924 2009-02-16  Sebastian Pop  <sebastian.pop@amd.com>
2925
2926         * graphite-data-ref.c (schedule_precedes_p, schedule_same_p): New.
2927         (statement_precedes_p): Use schedule_same_p and schedule_precedes_p.
2928         * graphite.c (gbb_compare, schedule_to_scattering, print_graphite_bb,
2929         free_graphite_bb, build_scop_canonical_schedules,
2930         graphite_trans_bb_strip_mine, graphite_trans_scop_block): Static
2931         schedules are now represented using a ppl_Linear_Expression_t.
2932         * graphite.h (struct graphite_bb): Same.
2933         * graphite-ppl.c (ppl_lexico_compare_linear_expressions): New.
2934         * graphite-ppl.h (ppl_lexico_compare_linear_expressions): Declared.
2935
2936 2009-02-15  Sebastian Pop  <sebastian.pop@amd.com>
2937
2938         * graphite.c: Free local memory.
2939         * graphite-ppl.c: Same.
2940
2941 2009-02-15  Sebastian Pop  <sebastian.pop@amd.com>
2942
2943         * graphite.c (const_column_index, get_first_matching_sign_row_index,
2944         get_lower_bound_row, get_upper_bound_row, copy_constraint,
2945         swap_constraint_variables, scale_constraint_variable): Removed.
2946         (graphite_trans_bb_strip_mine): Remove pong.
2947         * graphite-ppl.c: Include missing header files.
2948         (set_inhomogeneous, set_coef, shift_poly, ppl_strip_loop): New.
2949         * graphite-ppl.h (ppl_strip_loop): Declared.
2950         * Makefile.in (graphite-ppl.o): Adjust dependences.
2951
2952 2009-02-14  Sebastian Pop  <sebastian.pop@amd.com>
2953
2954         * graphite.c (build_loop_iteration_domains): Remove ping pong.
2955         (build_scop_iteration_domain): Same.
2956
2957 2009-02-13  Sebastian Pop  <sebastian.pop@amd.com>
2958
2959         * graphite.c (scan_tree_for_params, add_conditions_to_domain): Remove
2960         ping pong.
2961         (add_value_to_dim, scan_tree_for_params_right_scev,
2962         scan_tree_for_params_int): New.
2963         * graphite-ppl.c (oppose_constraint): New.
2964         (insert_constraint_into_matrix): Implement missing cases.
2965         * graphite-ppl.h (insert_constraint_into_matrix): Declared.
2966
2967 2009-02-13  Sebastian Pop  <sebastian.pop@amd.com>
2968
2969         * graphite.c (graphite_trans_bb_move_loop): Remove ping pong,
2970         use ppl_move_dimension.
2971
2972 2009-02-12  Sebastian Pop  <sebastian.pop@amd.com>
2973
2974         * graphite-data-ref.c: Domains are now ppl_Polyhedra_t.
2975         * graphite.c: Same.
2976         * graphite.h: Same.
2977         * graphite-ppl.c: Same.
2978         * graphite-ppl.h: Same.
2979
2980 2009-02-12  Sebastian Pop  <sebastian.pop@amd.com>
2981
2982         Revert last 3 commits.
2983
2984 2009-02-10  Sebastian Pop  <sebastian.pop@amd.com>
2985
2986         * graphite.c (scan_tree_for_params, add_conditions_to_domain): Remove
2987         ping pong.
2988         (add_value_to_dim, scan_tree_for_params_right_scev,
2989         scan_tree_for_params_int): New.
2990         * graphite-ppl.c (oppose_constraint): New.
2991         (insert_constraint_into_matrix): Implement missing cases.
2992         * graphite-ppl.h (insert_constraint_into_matrix): Declared.
2993
2994 2009-02-10  Sebastian Pop  <sebastian.pop@amd.com>
2995
2996         * graphite.c (graphite_trans_bb_move_loop): Remove unused variables.
2997
2998 2009-02-10  Sebastian Pop  <sebastian.pop@amd.com>
2999             Tobias Grosser  <grosser@fim.uni-passau.de>
3000
3001         * graphite.c (graphite_trans_bb_move_loop): Remove ping pong,
3002         use ppl_move_dimension.
3003         * graphite-ppl.c (ppl_move_dimension): New.
3004         * graphite-ppl.h (ppl_move_dimension): Declared.
3005
3006 2009-02-10  Sebastian Pop  <sebastian.pop@amd.com>
3007
3008         * graphite.c: Do not include cloog/cloog.h.
3009         (print_graphite_bb): Remove ping pong, call PPL print function.
3010
3011 2009-02-10  Tobias Grosser  <grosser@fim.uni-passau.de>
3012
3013         * Makefile.in (OBJS-common): Add graphite-ppl.o.
3014         (graphite.o): Add dependence on graphite-ppl.h.
3015         (graphite-ppl.o): New.
3016         (graphite-data-ref.c): Ping pong between PPL data structures
3017         and matrices.
3018         * graphite-ppl.c: New.
3019         * graphite-ppl.h: New.
3020         * graphite.c: Include graphite-ppl.h.
3021         (print_graphite_bb, add_conditions_to_domain, build_cloog_prog,
3022         graphite_trans_bb_move_loop, graphite_trans_bb_strip_mine):
3023         Ping pong between PPL data structures and matrices.
3024         (new_graphite_bb): Create a PPL constraint system.
3025         Call ppl_delete_Constraint_System instead of cloog_matrix_free.
3026         (build_loop_iteration_domains): Use PPL functions.
3027         * graphite.h: Include graphite-ppl.h.  Fix comments.
3028         (graphite_bb): Use a ppl_Constraint_System_t instead of
3029         CloogMatrix for representing the domain.
3030         (scop): Remove static_schedule.
3031         (gbb_nb_loops): Ping pong between PPL data structures and matrices.
3032
3033 2009-02-06  Sebastian Pop  <sebastian.pop@amd.com>
3034
3035         * graphite.c: Fix some comments.
3036
3037 2009-02-05  Sebastian Pop  <sebastian.pop@amd.com>
3038
3039         PR middle-end/38953
3040         * graphite.c (if_region_set_false_region): After moving a region
3041         in the false branch of a condition, remove the empty dummy
3042         basic block.
3043         (gloog): Remove wrong fix for PR38953.
3044
3045 2009-02-03  Tobias Grosser  <grosser@fim.uni-passau.de>
3046
3047         * graphite.c (bb_in_sese_p, sese_build_livein_liveouts_use,
3048         sese_build_livein_liveouts_bb, sese_build_livein_liveouts,
3049         register_bb_in_sese, new_sese, free_sese): Moved.
3050         (dot_scop_1, build_scop_loop_nests, build_loop_iteration_domains,
3051         outermost_loop_in_scop, build_scop_iteration_domain,
3052         expand_scalar_variables_ssa_name, get_vdef_before_scop,
3053         limit_scops): Use bb_in_sese_p instead of bb_in_scop_p.
3054         Use loop_in_sese_p instead of loop_in_scop_p.
3055         (new_graphite_bb, new_scop, gloog): Do not initialize SCOP_BBS_B.
3056         (free_scop): Do not free SCOP_BBS_B.
3057         (nb_loops_around_loop_in_scop, nb_loops_around_gb,
3058         ref_nb_loops): Moved here...
3059         * graphite.h (ref_nb_loops): ... from here.
3060         (struct scop): Remove bbs_b bitmap.
3061         (SCOP_BBS_B, bb_in_scop_p, loop_in_scop_p): Removed.
3062         * testsuite/gcc.dg/graphite/scop-19.c: New
3063
3064 2009-02-03  Tobias Grosser  <grosser@fim.uni-passau.de>
3065
3066         * graphite.c (scopdet_basic_block_info): Fix bug in scop
3067         detection.
3068
3069 2009-01-30  Tobias Grosser  <grosser@fim.uni-passau.de>
3070
3071         * graphite.c (new_loop_to_cloog_loop_str, hash_loop_to_cloog_loop,
3072         eq_loop_to_cloog_loop): Remove.
3073         (new_scop, free_scop): Remove SCOP_LOOP2CLOOG_LOOP.
3074         * graphite.h (struct scop): Remove loop2cloog_loop.
3075         (loop_domain_dim, loop_iteration_vector_dim): Remove.
3076
3077 2009-01-30  Tobias Grosser  <grosser@fim.uni-passau.de>
3078
3079         * opts.c (decode_options): Only add graphite options to O2
3080         if we compile with graphite enabled.
3081
3082 2009-01-26  Sebastian Pop  <sebastian.pop@amd.com>
3083
3084         * Merge from mainline (r143163:143684).
3085
3086 2009-01-26  Sebastian Pop  <sebastian.pop@amd.com>
3087
3088         * graphite.c (debug_value): Removed.
3089         * graphite.h (debug_value): Removed.
3090
3091 2009-01-23  Sebastian Pop  <sebastian.pop@amd.com>
3092
3093         * passes.c (init_optimization_passes): Do not call pass_copy_prop
3094         after graphite: pass_copy_prop does not maintain a proper loop closed
3095         SSA form.  pass_copy_prop should be fixed.
3096
3097 2009-01-23  Sebastian Pop  <sebastian.pop@amd.com>
3098
3099         * graphite.c (scop_adjust_phis_for_liveouts): Fix warning.
3100
3101 2009-01-23  Sebastian Pop  <sebastian.pop@amd.com>
3102
3103         * graphite.c (graphite_verify): Add a call to verify_loop_closed_ssa.
3104         (gloog): Split the exit of the scop when the scop exit is a loop exit.
3105         (graphite_transform_loops): Only call cleanup_tree_cfg if gloog
3106         changed the CFG.
3107
3108 2009-01-20  Sebastian Pop  <sebastian.pop@amd.com>
3109
3110         * graphite.c (gloog): Return true when code gen succeeded.
3111         (graphite_transform_loops): Do not call cleanup_tree_cfg if
3112         the code of the function did not changed.  After cleanup_tree_cfg
3113         call rewrite_into_loop_closed_ssa to maintain the loop closed ssa
3114         form.
3115
3116 2009-01-19  Sebastian Pop  <sebastian.pop@amd.com>
3117
3118         * graphite.c (stmt_simple_for_scop_p): Also handle cases when
3119         gimple_call_lhs is NULL.
3120
3121 2009-01-16  Sebastian Pop  <sebastian.pop@amd.com>
3122             Tobias Grosser  <tobi.grosser@amd.com>
3123
3124         * graphite.c (graphite_trans_scop_block): Do not block single
3125         nested loops.
3126
3127 2009-01-15  Sebastian Pop  <sebastian.pop@amd.com>
3128             Tobias Grosser  <tobi.grosser@amd.com>
3129
3130         * graphite.c (build_scop_canonical_schedules): Start schedules at
3131         zero.
3132
3133 2009-01-15  Sebastian Pop  <sebastian.pop@amd.com>
3134             Tobias Grosser  <tobi.grosser@amd.com>
3135
3136         * graphite.c (compare_prefix_loops): New.
3137         (build_scop_canonical_schedules): Rewritten.
3138         (graphite_transform_loops): Move build_scop_canonical_schedules
3139         after build_scop_iteration_domain.
3140
3141 2009-01-14  Sebastian Pop  <sebastian.pop@amd.com>
3142             Tobias Grosser  <tobi.grosser@amd.com>
3143
3144         * graphite.c (add_conditions_to_domain): Add the loops to
3145         the dimension of the iteration domain.  Do copy the domain
3146         only when it exists.
3147         (build_scop_conditions_1): Do not call add_conditions_to_domain.
3148         (add_conditions_to_constraints): New.
3149         (can_generate_code_stmt, can_generate_code): Removed.
3150         (gloog): Do not call can_generate_code.
3151         (graphite_transform_loops): Call add_conditions_to_constraints
3152         after building the iteration domain.
3153
3154 2009-01-14  Sebastian Pop  <sebastian.pop@amd.com>
3155             Tobias Grosser  <tobi.grosser@amd.com>
3156             Jan Sjodin  <jan.sjodin@amd.com>
3157
3158         * graphite.c (scan_tree_for_params): On substractions negate
3159         all the coefficients of the term.
3160         (clast_to_gcc_expression_red): New.  Handle reduction expressions
3161         of more than two operands.
3162         (clast_to_gcc_expression): Call clast_to_gcc_expression_red.
3163         (get_vdef_before_scop): Handle also the case of default definitions.
3164
3165 2009-01-14  Sebastian Pop  <sebastian.pop@amd.com>
3166
3167         PR middle-end/38431
3168         * graphite.c (get_vdef_before_scop, scop_adjust_vphi): New.
3169         (scop_adjust_phis_for_liveouts): Call scop_adjust_vphi.
3170         (gloog): Do not call cleanup_tree_cfg.
3171         (graphite_transform_loops): Call cleanup_tree_cfg after all
3172         scops have been code generated.
3173
3174 2009-01-13  Sebastian Pop  <sebastian.pop@amd.com>
3175
3176         * passes.c (init_optimization_passes): Schedule after
3177         graphite transforms pass_copy_prop, pass_dce_loop and pass_lim.
3178
3179 2009-01-13  Sebastian Pop  <sebastian.pop@amd.com>
3180
3181         * graphite.c (expand_scalar_variables_stmt): Do not pass loop_p.
3182         Fix comment.
3183         (expand_scalar_variables_ssa_name): Do not pass loop_p.  Fix comment.
3184         Set the type of an expression to the type of its assign statement.
3185         (expand_scalar_variables_expr):  Do not pass loop_p.
3186         Fix comment.  Stop recursion on tcc_constant or tcc_declaration.
3187         (copy_bb_and_scalar_dependences): Do not pass loop_p.
3188         (translate_clast): Update call to copy_bb_and_scalar_dependences.
3189
3190 2009-01-11  Sebastian Pop  <sebastian.pop@amd.com>
3191
3192         * graphite.c (expand_scalar_variables_ssa_name): Set the type of
3193         an expression to the gimple_expr_type of its assign statement.
3194         (expand_scalar_variables_expr): Stop recursion on tcc_constant
3195         or tcc_declaration.
3196
3197 2009-01-11  Sebastian Pop  <sebastian.pop@amd.com>
3198
3199         PR tree-optimization/38786
3200         * testsuite/gcc.dg/graphite/pr38786.c: New.
3201         * graphite.c (expand_scalar_variables_ssa_name): New, outlined from
3202         the SSA_NAME case of expand_scalar_variables_expr.
3203         (expand_scalar_variables_expr): Also gather the scalar computation
3204         used to index the memory access.
3205         (expand_scalar_variables_stmt): Pass to expand_scalar_variables_expr
3206         the gimple_stmt_iterator where it inserts new code.
3207
3208 2009-01-10  Sebastian Pop  <sebastian.pop@amd.com>
3209
3210         * testsuite/gcc.dg/graphite/block-3.c: Fix compile error on 32bit.
3211
3212 2009-01-10  Sebastian Pop  <sebastian.pop@amd.com>
3213
3214         * opts.c (decode_options): Enable flag_graphite_identity and
3215         flag_loop_block in -O2 and above.
3216
3217 2009-01-08  Sebastian Pop  <sebastian.pop@amd.com>
3218
3219         * libjava/classpath/lib/gnu/java/awt/peer/gtk/GtkMouseInfoPeer.class:
3220         Fix merge problem: replace with the file from trunk.
3221
3222 2009-01-08  Sebastian Pop  <sebastian.pop@amd.com>
3223
3224         * Merge from mainline (r141727:143163).
3225
3226 2009-01-07  Sebastian Pop  <sebastian.pop@amd.com>
3227             Jan Sjodin  <jan.sjodin@amd.com>
3228
3229         PR tree-optimization/38559
3230         * testsuite/gcc.dg/graphite/pr38559.c: New.
3231
3232         * graphite.c (debug_value, copy_constraint,
3233         swap_constraint_variables, scale_constraint_variable, ): New.
3234         (get_lower_bound, get_upper_bound): Removed.
3235         (graphite_trans_bb_strip_mine): Clean up this code that works
3236         only for constant number of iterations.  Fully copy upper and
3237         lower bound constraints, not only the constant part of them.
3238         * graphite.h (debug_value): Declared.
3239
3240 2009-01-06  Jan Sjodin  <jan.sjodin@amd.com>
3241
3242         PR tree-optimization/38492
3243         PR tree-optimization/38498
3244         * tree-check.c (operator_is_linear, scev_is_linear_expression): New.
3245         * tree-chrec.h (scev_is_linear_expression): Declared.
3246         * graphite.c (graphite_cannot_represent_loop_niter): New.
3247         (scopdet_basic_block_info): Call graphite_cannot_represent_loop_niter.
3248         (graphite_loop_normal_form): Use gcc_assert.
3249         (scan_tree_for_params): Use CASE_CONVERT.
3250         (phi_node_is_iv, bb_contains_non_iv_scalar_phi_nodes): New.
3251         (build_scop_conditions_1): Call bb_contains_non_iv_scalar_phi_nodes.
3252         Use gcc_assert.  Discard scops that contain unhandled cases.
3253         (build_scop_conditions): Return a boolean status for unhandled cases.
3254         (strip_mine_profitable_p): Print the loop number, not its depth.
3255         (is_interchange_valid): Pass the depth of the loop nest, don't
3256         recompute it wrongly.
3257         (graphite_trans_bb_block): Same.
3258         (graphite_trans_bb_block): Print tentative of loop blocking.
3259         (graphite_trans_scop_block): Do not print that the loop has been
3260         blocked.
3261         (graphite_transform_loops): Do not handle scops that contain condition
3262         scalar phi nodes.
3263
3264         * testsuite/gcc.dg/graphite/pr38500.c: Fixed warning as committed
3265         in trunk.
3266         * testsuite/gcc.dg/graphite/block-0.c: Update test.
3267         * testsuite/gcc.dg/graphite/block-1.c: Same.
3268         * testsuite/gcc.dg/graphite/block-2.c: Remove xfail and test for
3269         blocking.
3270         * testsuite/gcc.dg/graphite/block-4.c: Remove test for strip mine.
3271         * testsuite/gcc.dg/graphite/block-3.c: New.
3272         * testsuite/gcc.dg/graphite/pr38498.c: New.
3273
3274 2008-12-22  Harsha Jagasia  <harsha.jagasia@amd.com>
3275
3276         PR tree-optimization/38510
3277         * gcc.dg/graphite/pr38510.c: New.
3278         * graphite.c (recompute_all_dominators): Call mark_irreducible_loops.
3279           (translate_clast): Call recompute_all_dominators before
3280           graphite_verify.
3281           (gloog): Call recompute_all_dominators before graphite_verify.
3282
3283 2008-12-12  Sebastian Pop  <sebastian.pop@amd.com>
3284
3285         PR tree-optimization/38492
3286         * graphite.c (rename_map_elt, debug_rename_elt,
3287         debug_rename_map_1, debug_rename_map, new_rename_map_elt,
3288         rename_map_elt_info, eq_rename_map_elts,
3289         get_new_name_from_old_name, bb_in_sese_p): Moved around.
3290         (sese_find_uses_to_rename_use): Renamed sese_build_livein_liveouts_use.
3291         (sese_find_uses_to_rename_bb): Renamed sese_build_livein_liveouts_bb.
3292         (sese_build_livein_liveouts): New.
3293         (new_sese, free_sese): New.
3294         (new_scop): Call new_sese.
3295         (free_scop): Call free_sese.
3296         (rename_variables_from_edge, rename_phis_end_scop): Removed.
3297         (register_old_new_names): Renamed register_old_and_new_names.
3298         (register_scop_liveout_renames, add_loop_exit_phis,
3299         insert_loop_close_phis, struct igp,
3300         default_liveout_before_guard, add_guard_exit_phis,
3301         insert_guard_phis, copy_renames): New.
3302         (translate_clast): Call insert_loop_close_phis and insert_guard_phis.
3303         (sese_add_exit_phis_edge): Renamed scop_add_exit_phis_edge.
3304         (rewrite_into_sese_closed_ssa): Renamed scop_insert_phis_for_liveouts.
3305         (scop_adjust_phis_for_liveouts): New.
3306         (gloog): Call scop_adjust_phis_for_liveouts.
3307
3308         * graphite.h (struct sese): Documented.  Added fields liveout,
3309         num_ver and livein.
3310         (SESE_LIVEOUT, SESE_LIVEIN, SESE_LIVEIN_VER, SESE_NUM_VER): New.
3311         (new_sese, free_sese, sese_build_livein_liveouts): Declared.
3312         (struct scop): Added field liveout_renames.
3313         (SCOP_LIVEOUT_RENAMES): New.
3314
3315 2008-12-11  Sebastian Pop  <sebastian.pop@amd.com>
3316
3317         PR tree-optimization/38409
3318         * gcc.dg/graphite/pr38409.c: New.
3319         * graphite.c (nb_reductions_in_loop): Use simple_iv.
3320
3321 2008-12-11  Sebastian Pop  <sebastian.pop@amd.com>
3322
3323         * graphite.c (gcc_type_for_cloog_iv): By default return
3324         integer_type_node.
3325         (graphite_create_new_loop): Don't fold_convert the already
3326         fold_convert-ed expression.
3327
3328 2008-12-11  Harsha Jagasia  <harsha.jagasia@amd.com>
3329
3330         PR tree-optimization/38446
3331         * gcc.dg/graphite/pr38446.c: New.
3332         * graphite.c (register_bb_in_sese): New.
3333         (bb_in_sese_p): Check if bb belongs to sese region by explicitly
3334         looking at the bbs in the region.
3335         * graphite.h (sese): Add region_basic_blocks pointer set to
3336         structure and initialize at the time of defining new scop.
3337
3338 2008-12-11  Tobias Grosser  <grosser@fim.uni-passau.de>
3339
3340         * graphite.c (new_graphite_bb): Initialize GBB_STATIC_SCHEDULE.
3341         (find_params_in_bb): Do not free data refs.
3342         (free_graphite_bb): Add FIXME on disabled free_data_refs.
3343
3344 2008-12-11  Sebastian Pop  <sebastian.pop@amd.com>
3345
3346         * testsuite/gcc.dg/graphite/scop-16.c: Test only scop specific info.
3347         * testsuite/gcc.dg/graphite/scop-17.c: Same.
3348         * testsuite/gcc.dg/graphite/block-5.c: New.
3349         * testsuite/gcc.dg/graphite/block-6.c: New.
3350         * testsuite/gcc.dg/graphite/pr37485.c: Clean dump file after.
3351         * testsuite/gcc.dg/graphite/pr37684.c: Same.
3352         * testsuite/gcc.dg/graphite/block-2.c: Same.
3353
3354         * graphite.c (struct ivtype_map_elt): New.
3355         (debug_ivtype_elt, debug_ivtype_map_1, debug_ivtype_map,
3356         new_ivtype_map_elt, ivtype_map_elt_info, eq_ivtype_map_elts,
3357         gcc_type_for_cloog_iv): New.
3358         (loop_iv_stack_patch_for_consts): Use the type of the induction
3359         variable from the original loop, except for the automatically
3360         generated loops, i.e., in the case of a strip-mined loop, in
3361         which case there is no original loop: in that case just use
3362         integer_type_node.
3363         (new_graphite_bb): Initialize GBB_CLOOG_IV_TYPES.
3364         (free_graphite_bb): Free GBB_CLOOG_IV_TYPES.
3365         (clast_name_to_gcc): Accept params to be NULL.
3366         (clast_to_gcc_expression): Take an extra parameter for the type.
3367         Convert to that type all the expressions built by this function.
3368         (gcc_type_for_clast_expr, gcc_type_for_clast_eq): New.
3369         (graphite_translate_clast_equation): Compute the type of the
3370         clast_equation before translating its LHS and RHS.
3371         (clast_get_body_of_loop, gcc_type_for_iv_of_clast_loop): New.
3372         (graphite_create_new_loop): Compute the type of the induction
3373         variable before translating the lower and upper bounds and before
3374         creating the induction variable.
3375         (rename_variables_from_edge, rename_phis_end_scop): New.
3376         (copy_bb_and_scalar_dependences): Call rename_phis_end_scop.
3377         (sese_add_exit_phis_edge): Do not use integer_zero_node.
3378         (find_cloog_iv_in_expr, compute_cloog_iv_types_1,
3379         compute_cloog_iv_types): New.
3380         (gloog): Call compute_cloog_iv_types before starting the
3381         translation of the clast.
3382
3383         * graphite.h (struct graphite_bb): New field cloog_iv_types.
3384         (GBB_CLOOG_IV_TYPES): New.
3385         (debug_ivtype_map): Declared.
3386         (oldiv_for_loop): New.
3387
3388 2008-12-10  Tobias Grosser  <grosser@fim.uni-passau.de>
3389
3390         PR middle-end/38459
3391         * graphite.c (new_scop): Initialize SCOP_ADD_PARAMS.
3392         (param_index): Assert if parameter is not know after parameter
3393         detection.
3394         (find_params_in_bb): Detect params directly in GBB_CONDITIONS.
3395         (find_scop_parameters): Mark, that we have finished parameter
3396         detection.
3397         (graphite_transform_loops): Move condition detection before parameter
3398         detection.
3399         * graphite.h (struct scop): Add SCOP_ADD_PARAMS.
3400         * testsuite/gfortran.dg/graphite/pr38459.f90: New.
3401
3402 2008-12-09  Tobias Grosser  <grosser@fim.uni-passau.de>
3403
3404         * graphite.c (graphite_transform_loops): Always call find_transform ()
3405         in ENABLE_CHECKING.  So we test these code paths, even if we do not
3406         generate code.
3407
3408 2008-12-09  Tobias Grosser  <grosser@fim.uni-passau.de>
3409
3410         * graphite.c (print_graphite_bb): Fix printing to file != dump_file.
3411         (print_scop): Ditto.
3412
3413 2008-12-08  Tobias Grosser  <grosser@fim.uni-passau.de>
3414
3415         PR middle-end/38084
3416         Fix testsuite/gfortran.dg/graphite/id-3.f90.
3417         * graphite.c (scopdet_basic_block_info): Fix bug that found some
3418         regions more than once.
3419
3420 2008-12-03  Sebastian Pop  <sebastian.pop@amd.com>
3421
3422         Fix testsuite/gfortran.dg/graphite/id-4.f90.
3423         * graphite.c (scan_tree_for_params): Do not compute the multiplicand
3424         when not needed.
3425
3426 2008-12-03  Sebastian Pop  <sebastian.pop@amd.com>
3427
3428         Fix testsuite/gfortran.dg/graphite/id-1.f90.
3429         * graphite.c (gmp_cst_to_tree): Pass the type in parameter.
3430         (loop_iv_stack_patch_for_consts): Update use of gmp_cst_to_tree.
3431         (max_precision_type): New.
3432         (value_clast): Removed.
3433         (clast_to_gcc_expression): Be more careful to types of expressions.
3434         Use max_precision_type and update use of gmp_cst_to_tree.
3435         (graphite_translate_clast_equation): Use max_precision_type.
3436         (graphite_create_guard_cond_expr): Do not use integer_type_node,
3437         use the type of the condition.
3438         (graphite_create_new_loop): Do not use integer_type_node, use the
3439         max_precision_type of lb and ub.
3440
3441 2008-12-03  Sebastian Pop  <sebastian.pop@amd.com>
3442
3443         * graphite.c (build_scops_1): Initialize open_scop.exit
3444         and sinfo.last.
3445
3446 2008-12-02  Sebastian Pop  <sebastian.pop@amd.com>
3447
3448         * testsuite/gcc.dg/graphite/pr38084.c: New.
3449         * testsuite/gfortran.dg/graphite/id-1.f90: New.
3450         * testsuite/gfortran.dg/graphite/id-2.f90: New.
3451         * testsuite/gfortran.dg/graphite/id-3.f90: New.
3452         * testsuite/gfortran.dg/graphite/id-4.f90: New.
3453         * testsuite/gfortran.dg/graphite/pr37857.f90: New.
3454
3455 2008-12-02  Sebastian Pop  <sebastian.pop@amd.com>
3456             Jan Sjodin  <jan.sjodin@amd.com>
3457             Harsha Jagasia  <harsha.jagasia@amd.com>
3458
3459         PR middle-end/37852
3460         PR middle-end/37883
3461         PR middle-end/37928
3462         PR middle-end/37980
3463         PR middle-end/38038
3464         PR middle-end/38039
3465         PR middle-end/38073
3466         PR middle-end/38083
3467         PR middle-end/38125
3468
3469         * testsuite/gcc.dg/graphite/pr38073.c: New.
3470         * testsuite/gcc.dg/graphite/pr37928.c: New.
3471         * testsuite/gcc.dg/graphite/pr37883.c: New.
3472         * testsuite/gcc.dg/graphite/pr38125.c: New.
3473         * testsuite/gfortran.dg/graphite/pr38083.f90: New.
3474         * testsuite/gfortran.dg/graphite/pr37852.f90: New.
3475         * testsuite/gfortran.dg/graphite/pr37980.f90: New.
3476
3477         * testsuite/gcc.dg/graphite/scop-18.c: Remove reduction, test for
3478         the number of detected scops.  Copy exact same test for loop
3479         blocking...
3480         * testsuite/gcc.dg/graphite/block-1.c: Fix the number of expected
3481         loops to be blocked as reductions are not handled.
3482         * testsuite/gcc.dg/graphite/block-4.c: ...here.  New.
3483
3484         * tree-phinodes.c (remove_phi_nodes): New, extracted from...
3485         * tree-cfg.c (remove_phi_nodes_and_edges_for_unreachable_block):
3486         ...here.
3487         * tree-flow.h (remove_phi_nodes, canonicalize_loop_ivs): Declared.
3488         * Makefile.in (graphite.o): Depend on value-prof.h.
3489         (graphite.o-warn): Removed -Wno-error.
3490         * tree-parloops.c (canonicalize_loop_ivs): Allow reduction_list
3491         to be a NULL pointer.  Call update_stmt.  Return the newly created
3492         cannonical induction variable.
3493
3494         * graphite.h (debug_rename_map): Declared.  Fix some comments.
3495
3496         * graphite.c: Reimplement the code generation from graphite to gimple.
3497         Include value-prof.h.
3498         (loop_iv_stack_get_iv): Do not return NULL for constant substitutions.
3499         (get_old_iv_from_ssa_name): Removed.
3500         (graphite_stmt_p): New.
3501         (new_graphite_bb): Test for useful statements before building a
3502         graphite statement for the basic block.
3503         (free_graphite_bb): Do not free GBB_DATA_REFS: this is a bug
3504         in free_data_ref that calls BITMAP_FREE (DR_VOPS (dr)) without
3505         reason.
3506         (recompute_all_dominators, graphite_verify,
3507         nb_reductions_in_loop, graphite_loop_normal_form): New.
3508         (scop_record_loop): Call graphite_loop_normal_form.
3509         (build_scop_loop_nests): Iterate over all the blocks of the
3510         function instead of relying on the incomplete information from
3511         SCOP_BBS.  Return the success of the operation.
3512         (find_params_in_bb): Use the data from GBB_DATA_REFS.
3513         (add_bb_domains): Removed.
3514         (build_loop_iteration_domains): Don't call add_bb_domains.
3515         Add the iteration domain only to the basic blocks that have been
3516         translated to graphite.
3517         (build_scop_conditions_1): Add constraints only if the basic
3518         block have been translated to graphite.
3519         (build_scop_data_accesses): Completely disabled until data
3520         dependence is correctly implemented.
3521         (debug_rename_elt, debug_rename_map_1, debug_rename_map): New.
3522         (remove_all_edges_1, remove_all_edges): Removed.
3523         (get_new_name_from_old_name): New.
3524         (graphite_rename_variables_in_stmt): Renamed
3525         rename_variables_in_stmt.  Call get_new_name_from_old_name.
3526         Use replace_exp and update_stmt.
3527         (is_old_iv): Renamed is_iv.
3528         (expand_scalar_variables_stmt): Extra parameter for renaming map.
3529         Use replace_exp and update_stmt.
3530         (expand_scalar_variables_expr): Same.  Use the map to get the
3531         new names for the renaming of induction variables and for the
3532         renaming of variables after a basic block has been copied.
3533         (expand_scalar_variables): Same.
3534         (graphite_rename_variables): Renamed rename_variables.
3535         (move_phi_nodes): Removed.
3536         (get_false_edge_from_guard_bb): New.
3537         (build_iv_mapping): Do not insert the induction variable of a
3538         loop in the renaming iv map if the basic block does not belong
3539         to that loop.
3540         (register_old_new_names, graphite_copy_stmts_from_block,
3541         copy_bb_and_scalar_dependences): New.
3542         (translate_clast): Heavily reimplemented: copy basic blocks,
3543         do not move them.  Finally, in call cleanup_tree_cfg in gloog.
3544         At each translation step call graphite_verify ensuring the
3545         consistency of the SSA, loops and dominators information.
3546         (collect_virtual_phis, find_vdef_for_var_in_bb,
3547         find_vdef_for_var_1, find_vdef_for_var,
3548         patch_phis_for_virtual_defs): Removed huge hack.
3549         (mark_old_loops, remove_dead_loops, skip_phi_defs,
3550         collect_scop_exit_phi_args, patch_scop_exit_phi_args,
3551         gbb_can_be_ignored, scop_remove_ignoreable_gbbs, ): Removed.
3552         (remove_sese_region, ifsese, if_region_entry, if_region_exit,
3553         if_region_get_condition_block, if_region_set_false_region,
3554         create_if_region_on_edge, move_sese_in_condition, bb_in_sese_p,
3555         sese_find_uses_to_rename_use, sese_find_uses_to_rename_bb,
3556         sese_add_exit_phis_edge, sese_add_exit_phis_var,
3557         rewrite_into_sese_closed_ssa): New.
3558         (gloog): Remove dead code.  Early return if code cannot be
3559         generated.  Call cleanup_tree_cfg once the scop has been code
3560         generated.
3561         (graphite_trans_scop_block, graphite_trans_loop_block): Do not
3562         block loops with less than two loops.
3563         (graphite_apply_transformations): Remove the call to
3564         scop_remove_ignoreable_gbbs.
3565         (limit_scops): When build_scop_loop_nests fails, continue on
3566         the next scop.  Fix open_scop.entry.
3567         (graphite_transform_loops): Call recompute_all_dominators: force the
3568         recomputation of correct CDI_DOMINATORS and CDI_POST_DOMINATORS.
3569         Call initialize_original_copy_tables and free_original_copy_tables
3570         to be able to copy basic blocks during code generation.
3571         When build_scop_loop_nests fails, continue on next scop.
3572         (value_clast): New union.
3573         (clast_to_gcc_expression): Fix type cast warning.
3574
3575 2008-11-09  Sebastian Pop  <sebastian.pop@amd.com>
3576
3577         * Merge from mainline (r140838:141727).
3578
3579 2008-11-05  Tobias Grosser  <grosser@fim.uni-passau.de>
3580
3581         PR middle-end/37833
3582
3583         * graphite.c (scan_tree_for_params): Add POINTER_PLUS_EXPR.
3584
3585 2008-11-05  Tobias Grosser  <grosser@fim.uni-passau.de>
3586
3587         PR middle-end/37943
3588
3589         * graphite.c (scopdet_basic_block_info): Fix loops with multiple
3590         exits and conditions.
3591         * testsuite/gcc.dg/graphite/pr37943.c: New.
3592
3593 2008-10-23  Tobias Grosser  <grosser@fim.uni-passau.de>
3594
3595         PR middle-end/37886
3596         * graphite.c (gloog): Replace EXIT_BLOCK_PTR with scop exit.
3597
3598 2008-10-23  Tobias Grosser  <grosser@fim.uni-passau.de>
3599
3600         * doc/invoke.texi: Fix spaces.
3601
3602 2008-10-22  Sebastian Pop  <sebastian.pop@amd.com>
3603
3604         PR tree-optimization/37891
3605         Reverted last commit.
3606         * graphite.c (create_single_entry_edge): Set
3607         EDGE_IRREDUCIBLE_LOOP and BB_IRREDUCIBLE_LOOP.
3608
3609 2008-10-21  Sebastian Pop  <sebastian.pop@amd.com>
3610             Mitul Thakkar  <mitul.thakkar@amd.com>
3611
3612         * graphite.c (create_single_entry_edge): Set
3613         EDGE_IRREDUCIBLE_LOOP and BB_IRREDUCIBLE_LOOP.
3614
3615 2008-10-16  Tobias Grosser  <grosser@fim.uni-passau.de>
3616
3617         * doc/invoke.texi: Add -fgraphite-identity.
3618         * graphite.c (graphite_apply_transformations): Check for
3619         -fgraphite-identity.
3620         * toplev.c (process_options): Add flag_graphite_identity.
3621         * tree-ssa-loop.c: Add flag_graphite_identity.
3622
3623 2008-10-14  Sebastian Pop  <sebastian.pop@amd.com>
3624
3625         Undo changes from 2008-10-02:
3626         * tree-ssa-loop-ivopts.c (rewrite_use_nonlinear_expr): Convert
3627         operand type when copying the operand to a variable of different type.
3628         * cfgloopmanip.c (create_empty_loop_on_edge): Write exit condition
3629         with the IV name after increment.
3630
3631 2008-10-14  Sebastian Pop  <sebastian.pop@amd.com>
3632             Harsha Jagasia  <harsha.jagasia@amd.com>
3633
3634         PR tree-optimization/37828
3635         * testsuite/gcc.dg/graphite/pr37828.c: New.
3636         * graphite.c (graphite_trans_loop_block): Do not loop block
3637         single nested loops.
3638
3639 2008-10-09  Harsha Jagasia  <harsha.jagasia@amd.com>
3640             Sebastian Pop  <sebastian.pop@amd.com>
3641
3642         * graphite.c (struct rename_map_elt, new_rename_map_elt,
3643         rename_map_elt_info, eq_rename_map_elts): New.
3644         (graphite_rename_ivs_stmt): Renamed graphite_rename_variables_in_stmt.
3645         (expand_scalar_variables_expr): Change parameters.
3646         (expand_scalar_variables_stmt): Same.
3647         (expand_scalar_variables): Same.
3648         (graphite_rename_ivs): Rename graphite_rename_variables.
3649         (build_iv_mapping): New.
3650         (translate_clast): Call build_iv_mapping.
3651         * graphite.h (gbb_p): New name.
3652
3653 2008-10-03  Harsha Jagasia  <harsha.jagasia@amd.com>
3654
3655         PR tree-optimization/37684
3656         * gcc.dg/graphite/pr37684.c: New.
3657         * graphite.c (exclude_component_ref): New.
3658         (is_simple_operand): Call exclude_component_ref.
3659
3660 2008-10-02  Jan Sjodin  <jan.sjodin@amd.com>
3661             Harsha Jagasia  <harsha.jagasia@amd.com>
3662
3663         PR tree-optimization/37485
3664         * gcc.dg/graphite/block-2.c: New
3665         * graphite.c (gmp_cst_to_tree): Moved.
3666         (iv_stack_entry_is_constant): New.
3667         (iv_stack_entry_is_iv): New.
3668         (loop_iv_stack_push): Renamed to loop_iv_stack_push_iv.
3669         (loop_iv_stack_insert_constant): New.
3670         (loop_iv_stack_pop): Use new datatpype.
3671         (loop_iv_stack_get_iv): Same.
3672         (loop_iv_stack_get_iv_from_name): Same.
3673         (loop_iv_stack_debug): Renamed to debug_loop_iv_stack.
3674         (loop_iv_stack_patch_for_consts): New.
3675         (loop_iv_stack_remove_constants): New.
3676         (graphite_create_new_loop): Use loop_iv_stack_push_iv.
3677         (translate_clast): Call loop_iv_stack_patch_for_consts and
3678         loop_iv_stack_remove_constants.
3679         (gloog): Use new datatype.  Redirect construction edge to end
3680         block to avoid accidental deletion.
3681         * graphite.h (enum iv_stack_entry_kind): New.  Tag for data in
3682         iv stack entry.
3683         (union iv_stack_entry_data): New.  Data in iv stack entry.
3684         (struct iv_stack_entry): New.  Datatype for iv stack entries.
3685
3686 2008-10-02  Sebastian Pop  <sebastian.pop@amd.com>
3687
3688         * tree-ssa-loop-ivopts.c (rewrite_use_nonlinear_expr): Convert
3689         operand type when copying the operand to a variable of different type.
3690
3691 2008-10-02  Sebastian Pop  <sebastian.pop@amd.com>
3692
3693         * cfgloopmanip.c (create_empty_loop_on_edge): Write exit condition
3694         with the IV name after increment.
3695
3696 2008-10-02  Sebastian Pop  <sebastian.pop@amd.com>
3697
3698         * Merge from mainline (r140164:140838).
3699
3700 2008-09-10  Konrad Trifunovic  <konrad.trifunovic@inria.fr>
3701
3702         * graphite-data-ref.c: New.
3703         * graphite.c (print_scop): Also dump the dependence graph.
3704         (bb_in_scop_p, loop_in_scop_p, nb_loops_around_gb): Moved...
3705         (new_scop): Initialize SCOP_DEP_GRAPH.
3706         (build_scop_dynamic_schedules): New.
3707         (build_access_matrix_with_af): Fixed column numbering.
3708         (graphite_transform_loops): Call build_scop_dynamic_schedules.
3709         * graphite.h: Add ifndef/define guards against multiple inclusion.
3710         (struct scop): Add dep_graph field.
3711         (SCOP_DEP_GRAPH): Defined.
3712         (ref_nb_loops): Fixed and moved to other position.
3713         (bb_in_scop_p, loop_in_scop_p, nb_loops_around_gb): ... here.
3714         (nb_loops_around_loop_in_scop): New.
3715         (graphite_dump_dependence_graph): Declared.
3716         (graphite_build_rdg_all_levels): Declared.
3717         (graphite_test_dependence): Declared.
3718         * Makefile.in (graphite-data-ref.o): New target.
3719
3720 2008-09-09  Sebastian Pop  <sebastian.pop@amd.com>
3721
3722         * Merge from mainline (139870:140164).
3723
3724 2008-09-01  Sebastian Pop  <sebastian.pop@amd.com>
3725
3726         * Merge from mainline (138275:139870).
3727         * testsuite/gcc.dg/graphite/scop-matmult.c: XFailed as one of
3728         the commits from trunk broke the niter detection.
3729
3730 2008-09-01  Sebastian Pop  <sebastian.pop@amd.com>
3731
3732         * graphite.c: Add more documentation.  Fix formatting.
3733         (debug_loop_vec, debug_oldivs, loop_iv_stack,
3734         loop_iv_stack_debug): Moved...
3735         (schedule_to_scattering): Move before use.
3736         (dot_all_scops): Include in "#if 0" the code for system
3737         call dotty.
3738
3739         * graphite.h: (debug_loop_vec, debug_oldivs, loop_iv_stack,
3740         loop_iv_stack_debug): ...here.
3741
3742 2008-08-29  Jan Sjodin  <jan.sjodin@amd.com>
3743
3744         * tree-phinodes.c (make_phi_node): Extern.
3745         (add_phi_node_to_bb): New.
3746         (create_phi_node): Call add_phi_node_to_bb.
3747         * tree-ssa-loop-ivopts.c (get_phi_with_result): New.
3748         (remove_statement): Handle case where stored phi was updated
3749         and is no longer the same.
3750         * graphite.c (is_parameter): New.
3751         (is_old_iv): New.
3752         (expand_scalar_variables_expr): New.
3753         (expand_scalar_variables_stmt): New.
3754         (expand_scalar_variables): New.
3755         (move_phi_nodes): Create new phi instead of moving old one.
3756         (translate_clast): Call expand_scalar_variables.
3757         (find_vdef_for_var_in_bb): Also scan regular definitions.
3758         (skip_phi_defs): New.
3759         (collect_scop_exit_phi_args): New.
3760         (patch_scop_exit_phi_args): New.
3761         (gloog): Patch phis after scop.
3762         * tree-flow.h: (add_phi_node_to_bb): Declared.
3763         (make_phi_node): Declared.
3764
3765 2008-08-26  Sebastian Pop  <sebastian.pop@amd.com>
3766
3767         * graphite.c (end_scop): Split the entry of the scop when it
3768         is the header of the loop in which the scop is ending.
3769         (build_scops_1, limit_scops): Update uses of end_scop.
3770
3771 2008-08-26  Sebastian Pop  <sebastian.pop@amd.com>
3772
3773         * graphite.c (dot_all_scops_1): Do not fail on uninitialized
3774         SCOP_ENTRY or SCOP_EXIT.
3775
3776 2008-08-25  Sebastian Pop  <sebastian.pop@amd.com>
3777
3778         * graphite.c (get_construction_edge): Removed.
3779         (gloog): Construction edge is the scop entry edge.
3780
3781 2008-08-25  Sebastian Pop  <sebastian.pop@amd.com>
3782
3783         * graphite.c (can_generate_for_scop): Removed.
3784         (gloog): Do not call it.
3785
3786 2008-08-25  Sebastian Pop  <sebastian.pop@amd.com>
3787
3788         * graphite.c (new_scop): Entry of a scop is an edge.
3789         Initialize SESE region.
3790         (free_scop): Free SESE region.
3791         (build_scops_1, scopdet_bb_info): Work on edges, not on bbs.
3792         (split_difficult_bb): New, split from end_scop.
3793         (end_scop): Exit of a scop is an edge.
3794         (build_scop_bbs): Never check CDI_POST_DOMINATORS: this info is
3795         not automatically updated and thus is always wrong.
3796         * graphite.h (struct sese): New.
3797         (SESE_ENTRY): New.
3798         (SESE_EXIT): New.
3799         (struct scop): New field for a SESE region.  Remove entry, exit.
3800         (SCOP_ENTRY, SCOP_EXIT): Update definitions to match same
3801         semantics as before.  Moved comment around.
3802
3803 2008-08-25  Tobias Grosser  <grosser@fim.uni-passau.de>
3804             Sebastian Pop  <sebastian.pop@amd.com>
3805
3806         * graphite.c (graphite_transform_loops): Always enable gloog
3807         and find_transform when ENABLE_CHECKING.
3808
3809 2008-08-25  Sebastian Pop  <sebastian.pop@amd.com>
3810
3811         * graphite.c (graphite_transform_loops): Move pretty printer
3812         of SCOPs before doing any transform.  Remove call to print_scops
3813         and dot_all_scops_1.
3814
3815 2008-08-25  Sebastian Pop  <sebastian.pop@amd.com>
3816
3817         * graphite.c (dump_gbb_conditions): Don't try to print NULL pointers.
3818         (print_graphite_bb): Same.
3819
3820 2008-08-25  Sebastian Pop  <sebastian.pop@amd.com>
3821
3822         * graphite.c (dot_all_scops_1): Cleanup.
3823         (move_scops): Fix comment.
3824
3825 2008-08-25  Sebastian Pop  <sebastian.pop@amd.com>
3826
3827         * graphite.c (build_scop_bbs): Revert commit 139355:
3828
3829         2008-08-20  Sebastian Pop  <sebastian.pop@amd.com>
3830                     Dwarakanath Rajagopal  <dwarak.rajagopal@amd.com>
3831
3832                 * graphite.c (build_scop_bbs): Factor up code.
3833
3834 2008-08-25  Tobias Grosser  <grosser@fim.uni-passau.de>
3835
3836         * graphite.c (gloog): Update dominator info.
3837
3838 2008-08-25  Tobias Grosser  <grosser@fim.uni-passau.de>
3839
3840         * graphite.c (remove_cond_exprs): Do not fail on empty bbs.
3841
3842 2008-08-24  Sebastian Pop  <sebastian.pop@amd.com>
3843
3844         * graphite.c (new_graphite_bb): Remove GBB_INDEX_TO_NUM_MAP
3845         initialization.
3846         (free_graphite_bb): Remove GBB_INDEX_TO_NUM_MAP free.
3847         (translate_clast): Correct formatting.
3848         * graphite.h (struct num_map): Removed.
3849         (struct graphite_bb): Remove num_map field.
3850         (GBB_INDEX_TO_NUM_MAP): Removed.
3851
3852 2008-08-24  Sebastian Pop  <sebastian.pop@amd.com>
3853
3854         * graphite.c (build_access_matrix_with_af): Fix comments.
3855         (build_scop_data_accesses): Same.
3856
3857 2008-08-24  Sebastian Pop  <sebastian.pop@amd.com>
3858
3859         * graphite.c (build_scop_data_accesses): Don't construct
3860         access matrices.  Add a FIXME and an assert condition that
3861         should pass when the access matrices will be needed.
3862
3863 2008-08-24  Sebastian Pop  <sebastian.pop@amd.com>
3864
3865         * tree-data-ref.c (stmt_simple_memref_p): Don't call
3866         really_constant_p.
3867         * graphite.c (build_graphite_bb): Renamed new_graphite_bb.
3868         Moved close by free_graphite_bb.
3869         (free_graphite_bb): Call free_data_refs.  Reset bb->aux.
3870         (new_scop): Move close by free_scop.
3871         (graphite_transform_loops): Avoid linear scan to reset bb->aux.
3872
3873 2008-08-22  Jan Sjodin  <jan.sjodin@amd.com>
3874
3875         * cfgloopmanip.c (create_empty_if_region_on_edge): New.
3876         * graphite.c (clast_to_gcc_expression): Call gmp_cst_to_tree
3877         instead of recursive call.
3878         (graphite_translate_clast_equation): New.
3879         (graphite_create_guard_cond_expr): New.
3880         (graphite_create_new_guard): New.
3881         (get_stack_index_from_iv): Removed.
3882         (graphite_rename_ivs_stmt): Use gbb_loop_index.
3883         (get_true_edge_from_guard_bb): New.
3884         (translate_clast): Handle stmt_guard in clast.
3885         (get_construction_edge): Allow construction edge detection for
3886         a scope entry with multiple predecessors if one predecessor is
3887         the immediate dominator of scope entry.
3888         (can_generate_code_stmt): Enable code generation for clast_guard.
3889         (gloog): Use correct context loop.  Removed check for post dominators.
3890         * cfgloop.h (create_empty_if_region_on_edge): Declared.
3891
3892 2008-08-21  Sebastian Pop  <sebastian.pop@amd.com>
3893
3894         * graphite.c (remove_dead_loops): Document better which
3895         loops are removed.
3896
3897 2008-08-21  Sebastian Pop  <sebastian.pop@amd.com>
3898
3899         * Makefile.in: Rename POLYLIBLIBS and POLYLIBINC to PPLLIBS
3900         and PPLINC.
3901         (graphite.o): Also depends on pointer-set.h.
3902
3903 2008-08-21  Sebastian Pop  <sebastian.pop@amd.com>
3904
3905         * graphite.c (scop_record_loop): Fix compile warning.
3906
3907 2008-08-21  Harsha Jagasia  <harsha.jagasia@amd.com>
3908             Sebastian Pop  <sebastian.pop@amd.com>
3909
3910         * graphite.c (scop_record_loop): DECL_NAME can be NULL.
3911
3912 2008-08-21  Sebastian Pop  <sebastian.pop@amd.com>
3913
3914         * graphite.c (build_graphite_bb): Initialize bb->aux to
3915         point to the graphite_bb_p.
3916         (graphite_bb_from_bb): Renamed gbb_from_bb; returns the
3917         content of bb->aux.
3918         (add_bb_domains): Does not use the scop parameter.
3919         (graphite_transform_loops): Clean bb->aux at the end.
3920
3921 2008-08-20  Dwarakanath Rajagopal  <dwarak.rajagopal@amd.com>
3922             Sebastian Pop  <sebastian.pop@amd.com>
3923
3924         * testsuite/lib/target-supports.exp
3925         (check_effective_target_fgraphite): New.
3926
3927         * testsuite/gcc.dg/graphite/graphite.exp: Early exit when
3928         check_effective_target_fgraphite returns false.
3929         Set dg-do-what-default to compile.
3930         (scan-graphite-dump-times): Removed.
3931         * testsuite/gfortran.dg/graphite/graphite.exp: Same.
3932
3933         * testsuite/gcc.dg/graphite/scop-0.c: Do not use "dg-do compile".
3934         Use scan-tree-dump-times instead of scan-graphite-dump-times.
3935         * testsuite/gcc.dg/graphite/scop-1.c: Same.
3936         * testsuite/gcc.dg/graphite/scop-2.c: Same.
3937         * testsuite/gcc.dg/graphite/scop-3.c: Same.
3938         * testsuite/gcc.dg/graphite/scop-4.c: Same.
3939         * testsuite/gcc.dg/graphite/scop-5.c: Same.
3940         * testsuite/gcc.dg/graphite/scop-6.c: Same.
3941         * testsuite/gcc.dg/graphite/scop-7.c: Same.
3942         * testsuite/gcc.dg/graphite/scop-8.c: Same.
3943         * testsuite/gcc.dg/graphite/scop-9.c: Same.
3944         * testsuite/gcc.dg/graphite/scop-10.c: Same.
3945         * testsuite/gcc.dg/graphite/scop-11.c: Same.
3946         * testsuite/gcc.dg/graphite/scop-12.c: Same.
3947         * testsuite/gcc.dg/graphite/scop-13.c: Same.
3948         * testsuite/gcc.dg/graphite/scop-matmult.c: Same.
3949         * testsuite/gcc.dg/graphite/scop-14.c: Same.
3950         * testsuite/gcc.dg/graphite/scop-15.c: Same.
3951         * testsuite/gcc.dg/graphite/block-0.c: Same.
3952         * testsuite/gcc.dg/graphite/scop-16.c: Same.
3953         * testsuite/gcc.dg/graphite/block-1.c: Same.
3954         * testsuite/gcc.dg/graphite/scop-17.c: Same.
3955         * testsuite/gcc.dg/graphite/scop-18.c: Same.
3956         * testsuite/gfortran.dg/graphite/block-1.f90: Same.
3957         * testsuite/gfortran.dg/graphite/scop-1.f: Same.
3958         * testsuite/gfortran.dg/graphite/block-2.f: Same.
3959
3960 2008-08-20  Sebastian Pop  <sebastian.pop@amd.com>
3961
3962         * graphite.c: Fix some XXX comments.
3963         (build_scop_dynamic_schedules): Removed.
3964
3965 2008-08-20  Sebastian Pop  <sebastian.pop@amd.com>
3966
3967         * graphite.h (scop_max_loop_depth): Moved...
3968         * graphite.c (scop_max_loop_depth): ...here.
3969         (remove_all_edges_1): New.
3970         (remove_all_edges): Factored code.
3971         (remove_cond_exprs): Check only the last statement for
3972         a GIMPLE_COND expression.
3973
3974 2008-08-20  Sebastian Pop  <sebastian.pop@amd.com>
3975
3976         * graphite.c (scan_tree_for_params): Early return when the
3977         expression is a chrec_dont_know.  Handle case NEGATE_EXPR.
3978         (find_scop_parameters): Factor out code.
3979         (graphite_trans_bb_strip_mine): Remove dead code.
3980
3981 2008-08-20  Sebastian Pop  <sebastian.pop@amd.com>
3982
3983         * graphite.c (clast_to_gcc_expression, graphite_create_new_loop,
3984         graphite_trans_bb_move_loop): Factor asserts.
3985         (gloog): Perform sanity checks only for ENABLE_CHECKING.
3986         Do not call calculate_dominance_info and estimate_bb_frequencies.
3987
3988 2008-08-20  Jan Sjodin  <jan.sjodin@amd.com>
3989
3990         * graphite.c (create_loops_mapping, free_loops_mapping,
3991         create_loops_mapping_num, debug_loop_mapping_1,
3992         debug_loop_mapping, graphite_loops_mapping_max_loop_num,
3993         get_loop_mapping_for_num, graphite_loops_mapping_add_child,
3994         graphite_loops_mapping_add_child_num,
3995         graphite_loops_mapping_insert_child,
3996         graphite_loops_mapping_parent, get_loop_mapped_depth_for_num,
3997         get_loop_mapped_depth, split_loop_mapped_depth_for_num,
3998         loop_mapped_depth_split_loop, swap_loop_mapped_depth_for_num,
3999         create_num_from_index, get_num_from_index,
4000         swap_loop_mapped_depth): Removed.
4001         (new_scop): Do not initialize SCOP_LOOPS_MAPPING.
4002         (free_scop): Do not call free_loops_mapping.
4003         (graphite_get_new_iv_stack_index_from_old_iv): Renamed
4004         get_stack_index_from_iv.  Use GBB_LOOPS instead of calling
4005         get_loop_mapped_depth.
4006         (graphite_trans_bb_move_loop): Do not update the loop mapping.
4007         (graphite_trans_bb_strip_mine): Same.
4008         * graphite.h (graphite_loops_mapping, graphite_loop_node): Removed.
4009         (struct scop): Remove field loops_mapping.
4010
4011 2008-08-20  Sebastian Pop  <sebastian.pop@amd.com>
4012             Dwarakanath Rajagopal  <dwarak.rajagopal@amd.com>
4013
4014         * graphite.c (scop_record_loop): Factor out one level of the
4015         condition by early return.
4016         (build_scop_loop_nests): Format following FSF coding style.
4017         (build_scop_dynamic_schedules): Factor out code.
4018         (scopdet_bb_info): Reindent.  Default case should not be reachable.
4019
4020 2008-08-20  Sebastian Pop  <sebastian.pop@amd.com>
4021             Dwarakanath Rajagopal  <dwarak.rajagopal@amd.com>
4022
4023         * graphite.c (loop_affine_expr): Check for DECL_P or struct
4024         assignments that are not handled as simple operands for now.
4025
4026 2008-08-20  Sebastian Pop  <sebastian.pop@amd.com>
4027             Dwarakanath Rajagopal  <dwarak.rajagopal@amd.com>
4028
4029         * graphite.c (build_scop_bbs): Factor up code.
4030
4031 2008-08-20  Sebastian Pop  <sebastian.pop@amd.com>
4032             Dwarakanath Rajagopal  <dwarak.rajagopal@amd.com>
4033
4034         * graphite.c (stmt_simple_for_scop_p): Factor code out
4035         of the loop.
4036         (enum gbb_type): New.  Group all the GBB_* types under it.
4037         (is_loop_exit): Moved...
4038         (end_scop): Enable BB spliting.
4039         * cfgloop.c (is_loop_exit): ...here.  Reimplemented.
4040         * cfgloop.h (is_loop_exit): Declared.
4041
4042 2008-08-20  Sebastian Pop  <sebastian.pop@amd.com>
4043
4044         * doc/invoke.texi: Remove strides from examples containing
4045         DO loops when the strides are equal to 1.
4046
4047 2008-08-20  Harsha Jagasia  <harsha.jagasia@amd.com>
4048             Dwarakanath Rajagopal  <dwarak.rajagopal@amd.com>
4049
4050         * graphite.c (graphite_trans_scop_block): Or the result with
4051         the result from graphite_trans_loop_block.
4052         * testsuite/gcc.dg/graphite/block-1.c: New.
4053         * testsuite/gfortran.dg/graphite/block-1.f90: New.
4054         * testsuite/gfortran.dg/graphite/block-2.f: New.
4055
4056 2008-08-20  Sebastian Pop  <sebastian.pop@amd.com>
4057
4058         * graphite.c (graphite_transform_loops): Call cloog_initialize
4059         and cloog_finalize.
4060
4061 2008-08-20  Sebastian Pop  <sebastian.pop@amd.com>
4062
4063         * tree-data-ref.c) (stmt_simple_memref_p): New.
4064         * tree-data-ref.h (stmt_simple_memref_p): Declared.
4065         * graphite.c (stmt_simple_memref_for_scop_p): Removed.
4066         (is_simple_operand): Call stmt_simple_memref_p.
4067
4068         * testsuite/gcc.dg/graphite/scop-matmult.c: Updated for not
4069         using pointer arithmetic, as this is optimized by PRE and
4070         makes the code too difficult to analyze.
4071
4072         * testsuite/gcc.dg/graphite/scop-18.c: Same.
4073
4074 2008-08-20  Sebastian Pop  <sebastian.pop@amd.com>
4075
4076         * gdbinit.in (pgg): New.
4077
4078 2008-08-15  Tobias Grosser  <grosser@fim.uni-passau.de>
4079
4080         * graphite.c (graphite_trans_loop_block): Fix warning.
4081
4082 2008-08-15  Tobias Grosser  <grosser@fim.uni-passau.de>
4083
4084         * graphite.c (graphite_trans_loop_block): Fix my merge error.
4085
4086 2008-08-15  Tobias Grosser  <grosser@fim.uni-passau.de>
4087
4088         * graphite.c (graphite_trans_bb_block): Remove check for
4089         flag_loop_strip_mine, flag_loop_block, flag_loop_interchange.
4090         Check if loop blocking is profitable for every loop, before applying
4091         the changes.
4092         (graphite_apply_transformations): Call graphite_trans_bb_block only,
4093         if flag_loop_block is set.
4094
4095 2008-08-14  Sebastian Pop  <sebastian.pop@amd.com>
4096
4097         * graphite.c: Add some more documentation for the loop
4098         mapping.
4099
4100 2008-08-14  Sebastian Pop  <sebastian.pop@amd.com>
4101
4102         * Makefile.in (tree-data-ref.o): Remove dependence on graphite.h.
4103         * graphite.c: Format on less than 80 columns.
4104         * graphite.h: Same.
4105
4106 2008-08-14  Sebastian Pop  <sebastian.pop@amd.com>
4107
4108         * cfgloopmanip.c (loopify): Use update_dominators_in_loop.
4109
4110 2008-08-14  Sebastian Pop  <sebastian.pop@amd.com>
4111
4112         * doc/invoke.texi (floop-block, floop-strip-mine,
4113         floop-interchange): Update documentation with examples.
4114
4115 2008-08-13  Sebastian Pop  <sebastian.pop@amd.com>
4116
4117         * cfgloopmanip.c (create_empty_loop_on_edge): Don't call
4118         add_referenced_var.
4119         * graphite.c (graphite_create_new_loop): Call add_referenced_var.
4120
4121 2008-08-13  Sebastian Pop  <sebastian.pop@amd.com>
4122
4123         * cfgloopmanip.c (create_empty_loop_on_edge): Improve documentation.
4124         Factor gcc_asserts into a single one.  Use force_gimple_operand_gsi.
4125         * tree-scalar-evolution.c: Revert useless changes.
4126         * tree-phinodes.c: Same.
4127         * cfghooks.c: Same.
4128         * vec.h: Same.
4129         * tree-vectorizer.h: Same.
4130         * tree-flow.h: Same.
4131         * tree-cfg.c: Same.
4132         * common.opt (fgraphite): Update documentation.
4133
4134 2008-08-12  Harsha Jagasia  <harsha.jagasia@amd.com>
4135
4136         * doc/invoke.texi (-floop-block, -floop-strip-mine,
4137         -floop-interchange): Add more text for explaining what each of these
4138         flags is doing.
4139         * tree-into-ssa.c (gimple_vec): Moved to...
4140         * graphite.c: Include gimple.h.
4141         (gimple_vec): Moved to...
4142         (del_loop_to_cloog_loop): Removed.
4143         (loop_affine_expr): Do not call create_data_ref when the
4144         operand is a constant.
4145         (new_scop): Use free instead of del_loop_to_cloog_loop.
4146         * Makefile.in (graphite.o): Depend on GIMPLE_H.
4147         * gimple.h (gimple_vec): ... here.
4148
4149 2008-08-11  Tobias Grosser  <grosser@fim.uni-passau.de>
4150
4151         * graphite.c (scopdet_bb_info): Only allow loops with known number of
4152         latch executions.
4153         (build_loop_iteration_domains): Fail, if latch executions unknown.
4154
4155 2008-08-11  Tobias Grosser  <grosser@fim.uni-passau.de>
4156
4157         * graphite.c (add_conditions_to_domain): New.
4158         (build_scop_conditions_1): Call add_conditions_to_domain.
4159         (set_cloog_options): Allow to disable optimizations.
4160
4161 2008-08-11  Tobias Grosser  <grosser@fim.uni-passau.de>
4162
4163         * graphite.c (find_params_in_bb): Look for parameters in conditions.
4164         Do not use walk_dominator_tree.
4165         (find_scop_parameters): Do not use walk_dominator_tree.
4166
4167 2008-08-11  Tobias Grosser  <grosser@fim.uni-passau.de>
4168
4169         * graphite.c (scan_tree_for_params) Add / Subtract inequality.
4170         (idx_record_params): Adapt.
4171         * graphite.h (scop_gimple_loop_depth): New.
4172
4173 2008-08-11  Tobias Grosser  <grosser@fim.uni-passau.de>
4174
4175         * graphite.c (build_scop_dynamic_schedules): Remove value_init.
4176         (scan_tree_for_params): Remove value_init.
4177         (build_scop_context): Remove value_init.
4178         (build_loop_iteration_domains): Remove value_init.
4179         (schedule_to_scattering): Remove value_init.
4180         (graphite_trans_bb_strip_mine): Remove value_init.
4181
4182 2008-08-11  Tobias Grosser  <grosser@fim.uni-passau.de>
4183
4184         * gcc/graphite.c (limit_scops): New.
4185         (graphite_transform_loops): Add limit SCoPs.
4186         * gcc/testsuite/gcc.dg/graphite/scop-0.c: Update number of SCoPs.
4187         * gcc/testsuite/gcc.dg/graphite/scop-1.c: Update number of SCoPs.
4188         * gcc/testsuite/gcc.dg/graphite/scop-10.c: Update number of SCoPs.
4189         * gcc/testsuite/gcc.dg/graphite/scop-11.c: Update number of SCoPs.
4190         * gcc/testsuite/gcc.dg/graphite/scop-12.c: Update number of SCoPs.
4191         * gcc/testsuite/gcc.dg/graphite/scop-13.c: Update number of SCoPs.
4192         * gcc/testsuite/gcc.dg/graphite/scop-14.c: Update number of SCoPs.
4193         * gcc/testsuite/gcc.dg/graphite/scop-15.c: Update number of SCoPs.
4194         * gcc/testsuite/gcc.dg/graphite/scop-16.c: Update number of SCoPs.
4195         Change loop numbers.
4196         * gcc/testsuite/gcc.dg/graphite/scop-17.c: Update number of SCoPs.
4197         Change loop numbers.
4198         * gcc/testsuite/gcc.dg/graphite/scop-18.c: Update number of SCoPs.
4199         * gcc/testsuite/gcc.dg/graphite/scop-2.c: Update number of SCoPs.
4200         * gcc/testsuite/gcc.dg/graphite/scop-3.c: Update number of SCoPs.
4201         * gcc/testsuite/gcc.dg/graphite/scop-4.c: Update number of SCoPs.
4202         * gcc/testsuite/gcc.dg/graphite/scop-5.c: Update number of SCoPs.
4203         * gcc/testsuite/gcc.dg/graphite/scop-6.c: Update number of SCoPs.
4204         * gcc/testsuite/gcc.dg/graphite/scop-7.c: Update number of SCoPs.
4205         * gcc/testsuite/gcc.dg/graphite/scop-8.c: Update number of SCoPs.
4206         * gcc/testsuite/gcc.dg/graphite/scop-9.c: Update number of SCoPs.
4207         * gcc/testsuite/gcc.dg/graphite/scop-matmult.c: Update number of SCoPs.
4208
4209 2008-08-11  Tobias Grosser  <grosser@fim.uni-passau.de>
4210
4211         * graphite.c (graphite_transform_loops): Call always find_transform.
4212
4213 2008-08-08  Tobias Grosser  <grosser@fim.uni-passau.de>
4214
4215         * graphite.c (free_loops_mapping): New.
4216         (stmt_simple_for_scop_p): Fix typo.
4217         (stmt_simple_for_scop_p): Fix tuples functions, that
4218         broke polyhedron.
4219         (free_graphite_bb): Fix some memleaks.
4220         (free_scop): Fix some memleaks.
4221         (scopdet_bb_info): Do not forget some tmp SCoPs.
4222         (find_params_in_bb): Fix some memleaks.
4223         (clast_to_gcc_expression): Fix warning.
4224
4225 2008-08-07  Tobias Grosser  <grosser@fim.uni-passau.de>
4226
4227         * testsuite/gcc.dg/graphite/scop-16.c: Fix for 32bit.
4228         * testsuite/gcc.dg/graphite/scop-17.c: Fix for 32bit.
4229
4230 2008-08-04  Sebastian Pop  <sebastian.pop@amd.com>
4231
4232         * tree-ssa-loop.c (tree-ssa-loop.o): Do not include toplev.h.
4233         Move code ifdef-ed HAVE_cloog...
4234         * graphite.c: Include toplev.h.
4235         ... here.
4236         * Makefile.in (OBJS-common): Always build graphite.o.
4237         (BACKEND): Remove @GRAPHITE@.
4238         (tree-ssa-loop.o): Do not depend on TOPLEV_H.
4239         (graphite.o): Depend on TOPLEV_H.
4240
4241 2008-08-04  Sebastian Pop  <sebastian.pop@amd.com>
4242
4243         * Makefile.in (tree-ssa-loop.o): Depend on TOPLEV_H.
4244         Remove typo left from polylib to ppl conversion.
4245         * graphite.c (graphite_transforms): Use sorry instead of fatal.
4246
4247 2008-08-03  Sebastian Pop  <sebastian.pop@amd.com>
4248
4249         * toplev.c (process_options): Move the graphite loop optimization
4250         flags...
4251         * tree-ssa-loop.c (graphite_transforms): ... here.
4252         When not configured with CLooG, print to dump_file that
4253         Graphite transforms were not performed.
4254         * testsuite/gcc.dg/graphite/graphite.exp (scan-graphite-dump-times):
4255         New.
4256         * testsuite/gcc.dg/graphite/*.c: Updated all testcases to use
4257         scan-graphite-dump-times.
4258
4259 2008-08-03  Sebastian Pop  <sebastian.pop@amd.com>
4260
4261         * graphite.c (dot_scop, dot_all_scops): Do not call system.
4262         Do not open /tmp/scop.dot and /tmp/allscops.dot.
4263
4264 2008-08-02  Sebastian Pop  <sebastian.pop@amd.com>
4265             Jan Sjodin  <jan.sjodin@amd.com>
4266
4267         * configure: Regenerated.
4268         * omp-low.c (expand_omp_sections): Remove now unused code.
4269         * config.in (HAVE_polylib): Removed.
4270         * configure.ac (HAVE_polylib, POLYLIBLIBS, POLYLIBINC): Removed.
4271         (PPLLIBS, PPLINC): Added.
4272         * graphite.c: Replace unsigned with int wherever possible.
4273         Don't access Cloog's data structures, but use accessor functions.
4274         Clast's stmt->type is now implemented as a vtable: change the
4275         switches of stmt->type into ifs.
4276         (polylib/polylibgmp.h): Don't include.
4277         (initialize_dependence_polyhedron,
4278         initialize_data_dependence_polyhedron, is_empty_polyhedron,
4279         statement_precedes_p, test_dependence, build_rdg_all_levels,
4280         dump_dependence_graph): Removed until this code is cleaned up
4281         or ported to Cloog.
4282         * Makefile.in (POLYLIBLIBS): Renamed PPLLIBS.
4283         (POLYLIBINC): Renamed PPLINC.
4284
4285 2008-08-01  Harsha Jagasia  <harsha.jagasia@amd.com>
4286             Dwarakanath Rajagopal  <dwarak.rajagopal@amd.com>
4287             Jan Sjodin  <jan.sjodin@amd.com>
4288
4289         Finish the merge and tuplification of graphite.
4290
4291 2008-07-24  Sebastian Pop  <sebastian.pop@amd.com>
4292             Jan Sjodin  <jan.sjodin@amd.com>
4293
4294         Partial merge from mainline (138072:138275).
4295         * graphite.c still has to be tuplified.
4296
4297 2008-07-29  Jan Sjodin  <jan.sjodin@amd.com>
4298
4299         * graphite.c (graphite_loops_mapping_max_loop_num): New.
4300         (create_num_from_index): New.
4301         (get_num_from_index): Also pass in the graphite BB.
4302         (free_graphite_bb): Free GBB_INDEX_TO_NUM_MAP.
4303         (build_graphite_bb): Initialize GBB_INDEX_TO_NUM_MAP.
4304         (graphite_trans_bb_strip_mine): Call create_num_from_index.
4305         (is_interchange_valid): Return false when failing.
4306         * graphite.h (struct num_map): New.
4307         (struct graphite_bb): New field num_map.
4308         (GBB_LOOPS_MAPPING): Renamed GBB_INDEX_TO_NUM_MAP.
4309
4310 2008-07-29  Tobias Grosser  <grosser@fim.uni-passau.de>
4311
4312         * graphite.c (dump_gbb_conditions): Print also conditions like
4313         "if (a)".  Remove dublicated code and use print_generic_expr ().
4314         (stmt_simple_for_scop_p): Only allow conditions we can handle
4315         {<, <=, >, >=}.
4316
4317 2008-07-25  Jan Sjodin  <jan.sjodin@amd.com>
4318
4319         * graphite.h (struct scop): Removed new_ivs field.
4320         (SCOP_NEWIVS): Deleted.
4321         * graphite.c (new_scop, free_scop, clast_name_to_gcc,
4322         clast_to_gcc_expression, graphite_create_new_loop):
4323         Removed use of new_ivs.
4324
4325 2008-07-25  Jan Sjodin  <jan.sjodin@amd.com>
4326
4327         * graphite.c (debug_oldivs, debug_loop_vec, create_loops_mapping,
4328         create_loops_mapping_num, debug_loop_mapping_1): New.
4329         (debug_loop_mapping): Call debug_loop_mapping_1.
4330         (get_loop_mapping_for_num,
4331         graphite_loops_mapping_add_child,
4332         graphite_loops_mapping_add_child_num,
4333         graphite_loops_mapping_insert_child,
4334         graphite_loops_mapping_parent,
4335         split_loop_mapped_depth_for_num,
4336         loop_mapped_depth_split_loop): New.
4337         (increment_loop_mapped_depths): Removed.
4338         (swap_loop_mapped_depth_for_num): Reimplemented.
4339         (new_scop): Call create_loops_mapping.
4340         (scop_record_loop): Call graphite_loops_mapping_insert_child.
4341         (translate_clast): Pass the old loop father in parameter, and pass
4342         it to get_old_iv_from_ssa_name.
4343         (remove_edges_around_useless_blocks, can_generate_code_stmt,
4344         can_generate_code, can_generate_for_scop): New.
4345         (graphite_trans_bb_block): Returns false when it fails to transform.
4346         * graphite.h (graphite_loop_node, graphite_loops_mapping): New.
4347
4348 2008-07-25  Sebastian Pop  <sebastian.pop@amd.com>
4349
4350         Reverted all the changes related to the streamization and
4351         loop fusion.
4352         These changes are now tracked in the streamization branch.
4353
4354 2008-07-25  Sebastian Pop  <sebastian.pop@amd.com>
4355             Jan Sjodin  <jan.sjodin@amd.com>
4356
4357         * graphite.c (gbb_compare): Correctly constify.
4358         (gbb_can_be_ignored): Indent.
4359         (graphite_trans_scop_swap_1and2): Add legality check.
4360         Remove dead FIXMEs.
4361
4362 2008-07-25  Sebastian Pop  <sebastian.pop@amd.com>
4363
4364         Remove fallouts from "Reverted the Condate changes".
4365         * tree.h: Remove unused decl.
4366         * testsuite/gcc.dg/tree-checker: Same.
4367         * timevar.def: Remove counter.
4368
4369 2008-07-24  Sebastian Pop  <sebastian.pop@amd.com>
4370
4371         * Merge from mainline (135673:138072).
4372
4373         Reverted the MIRO changes (from 2008-04-05) that are now
4374         tracked in the miro branch.
4375         * tree-bounds.c: Removed.
4376         * tree-bounds.h: Removed.
4377
4378         Reverted the Condate changes (from 2006-07-04, 2007-03-20) that
4379         are now tracked in the condate branch.
4380         * tree-check.c: Removed.
4381         * tree-match.c: Removed.
4382         * condate.y: Removed.
4383
4384 2008-07-24  Dwarakanath Rajagopal  <dwarak.rajagopal@amd.com>
4385
4386         * common.opt: New user flag -floop-block, -floop-strip-mine
4387         and -floop-interchange.
4388         * toplev.c (process_options): Enable -fgraphite pass if any one of the
4389         graphite loop optimization flags is turned on.
4390         * graphite.c (graphite_apply_transformations): Add flag_loop_block,
4391         flag_loop_strip_mine and flag_loop_interchange checks before
4392         optimizations.
4393         * doc/invoke.texi: Remove -fgraphite and add -floop-block,
4394         -floop-strip-mine and -floop-interchange.
4395         * testsuite/gcc.dg/graphite/block-0.c: Add -floop-block and remove
4396         -fgraphite.
4397         * testsuite/gcc.dg/graphite/scop-16.c: Ditto.
4398         * testsuite/gcc.dg/graphite/scop-17.c: Ditto.
4399         * testsuite/gcc.dg/graphite/scop-18.c: Ditto.
4400
4401 2008-07-23  Jan Sjodin  <jan.sjodin@amd.com>
4402             Sebastian Pop  <sebastian.pop@amd.com>
4403
4404         * cfgloopmanip.c (update_dominators_in_loop): Make it static.
4405         (create_empty_loop_on_edge): More fixes.
4406         * tree-phinodes.c (resize_phi_node): Extern.
4407         (unlink_phi_node, move_phi_node): New split from remove_phi_node.
4408         * cfghooks.c (update_dominator_information): New split from
4409         split_edge.
4410         * tree-vectorizer.c (rename_variables_in_bb): Extern.
4411         * tree-dfa.c (collect_dfa_stats): Start walking the CFG on the
4412         successor of the function entry block.
4413
4414         * graphite.c: Include pointer-set.h.
4415         (debug_loop_mapping, increment_loop_mapped_depths,
4416         get_loop_mapped_depth_for_num, get_loop_mapped_depth,
4417         set_loop_mapped_depth_for_num, set_loop_mapped_depth,
4418         swap_loop_mapped_depth_for_num, get_num_from_index,
4419         swap_loop_mapped_depth, loop_iv_stack_debug,
4420         loop_iv_stack_push, loop_iv_stack_pop, loop_iv_stack_get_iv,
4421         loop_iv_stack_get_iv_from_name, loop_iv_stack_debug,
4422         get_old_iv_from_ssa_name): New.
4423         (new_scop): Initialize SCOP_LOOPS_MAPPING.
4424         (free_scop): Free SCOP_LOOPS_MAPPING.
4425         (scop_record_loop): Record old ivs.
4426         (create_var_name): Removed.
4427         (initialize_cloog_names): Allocate double space in case strip mine
4428         applies to all loops once.
4429         (clast_name_to_gcc): Look up in the map ivstack passed in parameter.
4430         (clast_to_gcc_expression): Same.  Implement more clast to gimple
4431         translation.
4432         (graphite_create_new_loop): Pass in ivstack.
4433         (remove_all_edges): Pass in the construction_edge.
4434         (graphite_remove_iv): Removed.
4435         (graphite_rename_ivs, graphite_rename_ivs_stmt,
4436         remove_cond_exprs): Rewritten.
4437         (move_phi_nodes): New.
4438         (disconnect_virtual_phi_nodes, disconnect_cond_expr): Removed.
4439         (translate_clast): Pass in ivstack.  Rewrite some cases.
4440         (set_cloog_options, debug_clast_stmt): New.
4441         (find_transform): Use set_cloog_options.
4442         (outermost_loop_layer): Removed.
4443         (get_construction_edge, collect_virtual_phis, find_vdef_for_var_in_bb,
4444         find_vdef_for_var_1, find_vdef_for_var, patch_phis_for_virtual_defs,
4445         mark_old_loops, remove_dead_loops): New.
4446         (gloog): Rewritten.
4447         (graphite_trans_bb_move_loop): Call swap_loop_mapped_depth.
4448         (const_column_index, get_first_matching_sign_row_index,
4449         get_lower_bound_row, get_upper_bound_row, get_lower_bound,
4450         get_upper_bound): New.
4451         (graphite_trans_bb_strip_mine): Also update the iv map.
4452
4453         * graphite.h (graphite_loops_mapping, GBB_LOOPS_MAPPING): New.
4454         (struct name_tree): Add a loop field.
4455         (struct scop): Add a graphite_loops_mapping field.
4456         (SCOP_LOOPS_MAPPING): New.
4457         (debug_clast_stmt): Declare.
4458         * lambda.h (find_induction_var_from_exit_cond): Declare.
4459         (lambda-code.c): (find_induction_var_from_exit_cond): Extern.
4460         * cfgloop.h (update_dominators_in_loop): Removed declaration.
4461         (create_empty_loop_on_edge): Updated.
4462         * tree-flow.h (remove_bb, resize_phi_node, move_phi_node,
4463         rename_variables_in_bb): Declare.
4464         * tree-cfg.c (remove_bb): Extern.
4465
4466         * testsuite/gcc.dg/graphite/block-0.c: New.
4467
4468 2008-07-21  Dwarakanath Rajagopal  <dwarak.rajagopal@amd.com>
4469             Sebastian Pop  <sebastian.pop@amd.com>
4470
4471         * graphite.c (strip_mine_profitable_p): New.
4472         (graphite_trans_bb_block): Disable strip mining if not profitable.
4473
4474         * testsuite/gcc.dg/graphite/scop-18.c: New.
4475         * testsuite/gcc.dg/graphite/scop-17.c: Fixed.
4476         * testsuite/gcc.dg/graphite/scop-16.c: Fixed.
4477
4478 2008-07-17  Harsha Jagasia  <harsha.jagasia@amd.com>
4479             Jan Sjodin  <jan.sjodin@amd.com>
4480             Sebastian Pop  <sebastian.pop@amd.com>
4481
4482         * graphite.c (is_interchange_valid): New.
4483         (graphite_trans_bb_block): Check loop nest of basic block for legality
4484         of interchange.
4485
4486         * graphite.h (gbb_inner_most_loop_index, outer_most_loop_1,
4487         outer_most_loop, gbb_outer_most_loop_index): New.
4488
4489         * tree-loop-linear.c (perfect_loop_nest_depth): Remove static.
4490         * tree-flow.h (perfect_loop_nest_depth): Declare as extern.
4491         * testsuite/gcc.dg/graphite/scop-16.c: New.
4492         * testsuite/gcc.dg/graphite/scop-17.c: New.
4493
4494 2008-07-11  Tobias Grosser  <grosser@fim.uni-passau.de>
4495
4496         * graphite.c (scop_remove_ignoreable_gbbs): Also update bitmap.
4497         (graphite_trans_scop_block): Ignore SCoPs without bbs.
4498
4499 2008-07-11  Tobias Grosser  <grosser@fim.uni-passau.de>
4500
4501         * graphite.c (new_scop): Initialize SCOP_EXIT.
4502         (scopdet_info): Add.
4503         (scopdet_bb_info): Rename from is_bb_addable. Cleanup, bugfixes.
4504         (build_scops_1): Cleanup, bugfixes.
4505         (build_scops): Cleanup.
4506
4507         * testsuite/gcc.dg/graphite/scop-matmult.c: Remove duplicated code.
4508         * testsuite/gcc.dg/graphite/scop-15.c: Add SCoP numbers.
4509
4510 2008-07-10  Harsha Jagasia  <harsha.jagasia@amd.com>
4511
4512         * testsuite/gfortran.dg/graphite/scop-1.f: Update to reduced test case.
4513
4514         * testsuite/gfortran.dg/graphite/graphite.exp: Use
4515         DEFAULT_GRAPHITE_FLAGS.
4516
4517         * testsuite/gcc.dg/graphite/scop-15.c: Update to reduced test case.
4518
4519 2008-07-10  Harsha Jagasia  <harsha.jagasia@amd.com>
4520
4521         * graphite.c (scan_tree_for_params): Do not assert any more if
4522         MULT_EXPR parameter is negative.
4523
4524         * testsuite/gfortran.dg/graphite/scop-1.f: New.
4525
4526         * testsuite/gfortran.dg/graphite/graphite.exp: New.
4527
4528         * testsuite/gcc.dg/graphite/scop-15.c: New.
4529
4530 2008-07-10  Harsha Jagasia  <harsha.jagasia@amd.com>
4531
4532         * graphite.c (is_bb_addable): Fix segfault in spec gzip and reformat.
4533
4534 2008-07-10  Tobias Grosser  <grosser@fim.uni-passau.de>
4535
4536         * graphite.c (graphite_trans_bb_swap_loops): Rename from
4537         graphite_swap_loops.
4538         (graphite_trans_bb_move_loop): New.
4539         (graphite_trans_bb_strip_mine): Rename from graphite_strip_mine_loop.
4540         (graphite_trans_bb_block): New.
4541         (graphite_trans_loop_block): New.
4542         (graphite_trans_scop_swap_1and2): Rename from
4543         graphite_trans_swap_1and2.
4544         (graphite_trans_scop_strip): Rename from graphite_trans_strip.
4545         (graphite_trans_scop_block): New.
4546         (graphite_apply_transformations): Rename from
4547         graphite_transformations.
4548
4549         * testsuite/gcc.dg/graphite/scop-matmult.c: New.
4550
4551 2008-07-10  Tobias Grosser  <grosser@fim.uni-passau.de>
4552
4553         * graphite.c (gbb_compare): New.
4554         (graphite_sort_gbbs): New.
4555         (gbb_can_be_ignored): New.
4556         (scop_remove_ignoreable_gbbs): New.
4557         (graphite_transformations): Cleanup and add
4558         scop_remove_ignoreable_gbbs.
4559         * lambda.h (lambda_vector_compare): New.
4560
4561 2008-07-09  Tobias Grosser  <grosser@fim.uni-passau.de>
4562
4563         * graphite.c (print_graphite_bb): Correct printing of static schedule.
4564         (graphite_swap_loops): int -> unsigned
4565         (graphite_strip_mine_loop): int -> unsigned, Fix SCHEDULE
4566         (graphite_transformations): New.
4567         (graphite_transform_loops): Move to graphite_transformations.
4568         * graphite.h (gbb_nb_loops): Return unsigned.
4569
4570 2008-07-04  Tobias Grosser  <grosser@fim.uni-passau.de>
4571
4572         * graphite.c (scan_tree_for_params): Fix insertion of parameters into
4573         the domain matrix.  This makes scop-0.c work again.
4574
4575 2008-06-20  Richard Guenther  <rguenther@suse.de>
4576
4577         * graphite.h: Adjust copyright to GPLv3.
4578         * graphite.c: Likewise.
4579         (stmt_simple_memref_for_scop_p): Split out from ...
4580         (stmt_simple_for_scop_p): ... here.  Fix handling of calls
4581         and simplify.
4582         (get_bb_type): Optimize.
4583         (is_pred): Remove.
4584         (is_bb_addable): Fix memleak, replace is_pred call with
4585         single_pred.
4586         (build_scops): Use current_loops.
4587         (param_index): Fix memleak.
4588
4589 2008-06-20  Konrad Trifunovic  <konrad.trifunovic@inria.fr>
4590
4591         * graphite.c: Fix formatting.
4592
4593 2008-06-19  Konrad Trifunovic  <konrad.trifunovic@inria.fr>
4594
4595         * graphite.c (new_scop): Memory allocation for SCOP_{NEWIVS, OLDIVS}.
4596         (free_scop): Memory deallocation for SCOP_NEWIVS, SCOP_OLDIVS.
4597         (create_var_name, save_var_name): Newly defined functions.
4598         (initialize_cloog_names): Part of the code factored out to
4599         save_var_name.
4600         (clast_to_gcc_expression): Now handles the case of clast_red_sum
4601         in clast_reduction statement.
4602         (graphite_create_new_loop): Now takes a new parameter
4603         for outer_loop.
4604         (translate_clast): Now also takes the context_loop and bb_exit
4605         parameters. Rewritten the code so that it creates a gimple code
4606         inside the given context.
4607         (outermost_loop_layer, graphite_remove_iv, graphite_rename_ivs,
4608         remove_cond_expr, disconnect_cond_expr,
4609         disconnect_virtual_phi_nodes): Newly defined functions.
4610         * graphite.h (struct scop): added old_ivs vector.
4611         SCOP_OLDIVS: New macro.
4612
4613 2008-06-19  Sebastian Pop  <sebastian.pop@amd.com>
4614
4615         * cfgloopmanip.c: Add missing function comments, fix formatting.
4616
4617 2008-06-18  Konrad Trifunovic  <konrad.trifunovic@inria.fr>
4618
4619         * cfgloopmanip.c (update_dominators_in_loop): Defined.
4620         (create_empty_loop_on_edge): Defined.
4621         * tree-parloops.c (canonicalize_loop_ivs): Returns tree
4622         instead of void.
4623         * cfgloop.h (create_empty_loop_on_edge): Declared as extern.
4624         (update_dominators_in_loop): Declared as extern
4625         * tree-flow.h (canonicalize_loop_ivs): Declared as extern.
4626
4627 2008-06-16  Tobias Grosser  <grosser@fim.uni-passau.de>
4628
4629         * graphite.c (print_graphite_bb): Allow changing number of loops
4630         in SCoP domain.
4631         (initialize_cloog_names): Allow changing number of loops.
4632         (build_cloog_prog): Simplify.
4633         (find_transform): Enable cloog option --strides.
4634         (graphite_swap_loops): New.
4635         (graphite_strip_mine_loop): New.
4636         (graphite_trans_swap_1and2): New.
4637         (graphite_trans_strip): New.
4638         (graphite_transform_loops): Add graphite_trans_strip.
4639         * graphite.h (scop_max_loop_depth): New.
4640
4641 2008-06-15  Tobias Grosser  <grosser@fim.uni-passau.de>
4642
4643         * graphite.c (build_scop_iteration_domain): Remove forgotten
4644         line. (Fixes compile)
4645
4646 2008-06-15  Tobias Grosser  <grosser@fim.uni-passau.de>
4647
4648         * graphite.c (print_graphite_bb): Add output of GBB_LOOPS.
4649         (build_graphite_bb): Add GBB_LOOPS and GBB_DOMAIN and reorder.
4650         (build_bb_loops): New.
4651         (graphite_transform_loops): Add build_bb_loops.
4652         (schedule_to_scattering): Use gbb_nb_loops to support changing loop
4653         numbers.
4654         * graphite.h (graphite_bb): Add loops.
4655         (gbb_nb_loops): New.
4656         (gbb_loop_at_index): New.
4657         (gbb_loop_index): New.
4658         (nb_params_in_scop): Renamed to scop_nb_params. Updated all functions
4659         using nb_params_in_scop.
4660
4661 2008-06-14  Tobias Grosser  <grosser@fim.uni-passau.de>
4662
4663         * graphite.c (print_graphite_bb): Adapt to minimized schedule.
4664         (build_scop_canonical_schedules): Build minimized schedule.
4665         (schedule_to_scattering): Adapt to minimized schedule.
4666         * graphite.h (graphite_bb): Add/Update descriptions.
4667
4668 2008-06-14  Adrien Eliche  <aeliche@isty.uvsq.fr>
4669             Tobias Grosser  <grosser@fim.uni-passau.de>
4670
4671         * graphite.c (print_graphite_bb): Add condition printing.
4672         (dump_value): New.
4673         (dump_gbb_conditions): New.
4674         (build_scop_conditions_1): New.
4675         (build_scop_conditions): New.
4676         * graphite.h (graphite_bb): Add conditions.
4677
4678 2008-06-14  Tobias Grosser  <grosser@fim.uni-passau.de>
4679
4680         * graphite.c (print_graphite_bb):
4681         (free_graphite_bb): New.
4682         (free_scop): Free bbs.
4683         (get_bb_type): Free doms.
4684         (build_scop_context): Free context matrix.
4685         (build_loop_iteration_domains): Remove unused code.
4686         (build_cloog_prog): Free scattering function and blocklist.
4687         (find_transform): Free options.
4688
4689 2008-06-13  Tobias Grosser  <grosser@fim.uni-passau.de>
4690
4691         * graphite.c (loop_body_to_cloog_stmts): Rename to add_bb_domains.
4692         Remove unnecessery cloog data structures. Make a copy of the domain
4693         (setup_cloog_loop): Rename to build_loop_iteration_domains. Remove
4694         unnecessary cloog data structures. Fix memory leaks. Remove insert
4695         into SCOP_LOOP2CLOOG_LOOP as the inserted CloogLoops will never be
4696         used.
4697         (build_scop_iteration_domain): Remove unnecessary cloog
4698         data structures.  Fix memory leaks.
4699         (graphite_transform_loops): Disable build_scop_dynamic_schedules as it
4700         uses SCOP_LOOP2CLOOG_LOOP, that is at the moment not working.
4701
4702 2008-06-12  Tobias Grosser  <grosser@fim.uni-passau.de>
4703
4704         * graphite.c (find_scop_params): Remove initialize_cloog_names.
4705
4706 2008-06-12  Tobias Grosser  <grosser@fim.uni-passau.de>
4707
4708         * graphite.c (end_scop): Style fix.
4709         (schedule_to_scattering): Style and comment fix.
4710
4711 2008-06-12  Tobias Grosser  <grosser@fim.uni-passau.de>
4712         * graphite.c (print_graphite_bb): Fix definiton of
4713         schedule_to_scattering.
4714         (initialize_cloog_names): Change nb_scattdims to max loop
4715         depth in SCoP.
4716         (schedule_to_scattering): Take parameter for number of scattering
4717         dimensions.
4718         (build_cloog_prog): Only build as much scattering dimensions as
4719         necessary.
4720
4721 2008-06-12  Tobias Grosser  <grosser@fim.uni-passau.de>
4722
4723         * graphite.c (end_scop): Disable bb splitting. Fixes SIGSEGV
4724         in polyhedron/aermod.f90.
4725
4726 2008-06-11  Tobias Grosser  <grosser@fim.uni-passau.de>
4727             Dwarak Rajagopal  <dwarak.rajagopal@amd.com>
4728             Harsha Jagasia  <harsha.jagasia@amd.com>
4729
4730         * graphite.c (is_bb_addable): Fix segfault.
4731
4732 2008-06-10  Tobias Grosser  <grosser@fim.uni-passau.de>
4733
4734         * graphite.c (is_bb_addable): Fix memory leak, handling of loops
4735         with multiple exits and conditional handling in edge cases.
4736         (is_loop_exit): Fix memory leak. (Forgotten in last commit)
4737
4738         * testsuite/gcc.dg/graphite/scop-14.c: New.
4739
4740 2008-06-06  Tobias Grosser  <grosser@fim.uni-passau.de>
4741             Adrien Eliche  <aeliche@isty.uvsq.fr>
4742
4743         * graphite.c (is_bb_addable): Add more comments and enhance
4744         readablity of the source code. Fix memory leak.
4745         (is_loop_exit): Fix memory leak.
4746
4747 2008-06-05  Tobias Grosser  <grosser@fim.uni-passau.de>
4748
4749         * graphite.c (first_loop_in_scop): Deleted.
4750         (setup_cloog_loop): Only walk the loop chain for inner loops.
4751         (build_scop_iteration_domain): Execute setup_cloog_loop for
4752         all loops in the first layer.
4753
4754 2008-06-05  Tobias Grosser  <grosser@fim.uni-passau.de>
4755
4756         * graphite.c (scan_tree_for_params): Change the way params are
4757         added to be indepenent of the number of loops.
4758         (setup_cloog_loop): Revert to short matrix format. Fix parameter
4759         handling.
4760         (build_cloog_prog): Revert to short matrix format.
4761
4762 2008-06-05  Sebastian Pop  <sebastian.pop@amd.com>
4763             Dwarak Rajagopal <dwarak.rajagopal@amd.com>
4764
4765         * tree-loop-fusion.c (fuse_loops): Fix uninitialized variable
4766         warning.
4767
4768 2008-06-05  Sebastian Pop  <sebastian.pop@amd.com>
4769
4770         * graphite.c (nb_data_refs_in_scop): New.
4771         (graphite_transform_loops): Print more stats: number of
4772         loops, basic blocks and data references per scop.
4773
4774 2008-06-04  Sebastian Pop  <sebastian.pop@amd.com>
4775             Jan Sjodin  <jan.sjodin@amd.com>
4776
4777         * graphite.c (loop_affine_expr, idx_record_params,
4778         find_scop_parameters, setup_cloog_loop): Use instantiate_scev
4779         instead of instantiate_parameters.
4780
4781 2008-06-04  Tobias Grosser  <grosser@fim.uni-passau.de>
4782
4783         * graphite.c (schedule_to_scattering): Fix scattering dimensions,
4784         add support for parameters, add STATIC_SCHEDULE at the right places,
4785         cleanup.
4786
4787 2008-06-04  Tobias Grosser  <grosser@fim.uni-passau.de>
4788
4789         * graphite.c (build_scop_loop_nests): Only add the loops, that
4790         are contained completely in the SCoP.
4791         (build_cloog_prog): Disable scattering, until schedule_to_scattering
4792         and the domains are fixed.
4793         (build_scop_canonical_schedules): Add support for bbs not contained
4794         in any SCoP.
4795
4796 2008-06-04  Tobias Grosser  <grosser@fim.uni-passau.de>
4797
4798         * graphite.h (scop_contains_loop): Update comments to match
4799         the actual behavior.
4800         (scop_contains_loop): New.
4801         * graphite.c (schedule_to_scattering): Use scop_contains_loop.
4802
4803 2008-06-04  Sebastian Pop  <sebastian.pop@amd.com>
4804
4805         * graphite.c (get_bb_type): On function body, i.e. loop_0,
4806         don't mark blocks as GBB_LOOP_SING_EXIT_HEADER, mark them
4807         as GBB_COND_HEADER.
4808
4809 2008-06-04  Sebastian Pop  <sebastian.pop@amd.com>
4810             Tobias Grosser  <grosser@fim.uni-passau.de>
4811
4812         * graphite.c (graphite_transform_loops): Early return when
4813         there are no loops in the function.
4814
4815 2008-05-31  Sebastian Pop  <sebastian.pop@amd.com>
4816             Jan Sjodin  <jan.sjodin@amd.com>
4817
4818         * graphite.c (scan_tree_for_params, setup_cloog_loop): Compute the
4819         offset of the last loop.
4820         (setup_cloog_loop): Copy the entire outer constraint matrix.
4821
4822 2008-05-31  Sebastian Pop  <sebastian.pop@amd.com>
4823             Jan Sjodin  <jan.sjodin@amd.com>
4824
4825         * graphite.c (stmt_in_scop_p, function_parameter_p,
4826         invariant_in_scop_p): Removed.
4827         (scan_tree_for_params): Can be used with no constraint
4828         matrix for gathering parameters.
4829         (idx_record_params): Don't use idx_record_param, instead use
4830         scan_tree_for_params.
4831         (find_scop_parameters): Same.
4832         (setup_cloog_loop, build_scop_iteration_domain, build_cloog_prog):
4833         Fix the size of loop domains.
4834         (schedule_to_scattering): Exit when the outer loop is not in scop.
4835         (find_transform): Enable build_cloog_prog.
4836
4837 2008-05-31  Sebastian Pop  <sebastian.pop@amd.com>
4838             Jan Sjodin  <jan.sjodin@amd.com>
4839
4840         * graphite.c (schedule_to_scattering): Make scattering domains
4841         uniformly of the same size, as required by CLooG 0.14.0 and before.
4842
4843 2008-05-31  Sebastian Pop  <sebastian.pop@amd.com>
4844             Jan Sjodin  <jan.sjodin@amd.com>
4845
4846         * graphite.c (schedule_to_scattering): Rewrite, correct the
4847         translation of the scheduling function to scattering.
4848         (build_cloog_prog): Call schedule_to_scattering only once.
4849         * graphite.h (scop_loop_index): Do not fail for loops not
4850         in the scop: return -1.
4851
4852 2008-05-30 Tobias Grosser  <grosser@fim.uni-passau.de>
4853
4854         * graphite.c (build_graphite_bb): Initialize GBB_DOMAIN.
4855         (loop_body_to_cloog_stmts): Export GBB_DOMAIN.
4856         (setup_cloog_loop): Export GBB_DOMAIN.
4857         (build_cloog_prog): New.  Create new CLOOG_PROG, which should be
4858         able to rebuild the original control flow.
4859         * graphite.h (graphite_bb): Add domain field and access macro.
4860         (GBB_DOMAIN): New.
4861
4862 2008-05-30  Sebastian Pop  <sebastian.pop@amd.com>
4863
4864         * graphite.c (debug_gbb): New.
4865         (print_scop, build_graphite_bb): Use SCOP_BBS.
4866         (build_scop_bbs): Reimplemented.
4867         (dfs_bb_in_scop_p): Removed.
4868         (build_scop_loop_nests): Reorder loops inserted in
4869         SCOP_LOOP_NEST: outer loops should come first.
4870         (build_scop_canonical_schedules): Reinitialize at zero
4871         the components of the SCOP_STATIC_SCHEDULE for the loops
4872         that have already been parsed.
4873
4874         * graphite.h (debug_gbb): Declared.
4875
4876 2008-05-30  Sebastian Pop  <sebastian.pop@amd.com>
4877             Jan Sjodin  <jan.sjodin@amd.com>
4878
4879         * graphite.c (create_empty_loop): Renamed graphite_create_new_loop.
4880         (graphite_loop_to_gcc_loop): Removed.
4881         (remove_all_edges): New.
4882         (graphite_stmt_to_gcc_stmt): Renamed translate_clast.
4883         (gloog): Remove useless code.
4884
4885 2008-05-29  Tobias Grosser  <grosser@fim.uni-passau.de>
4886
4887         * graphite.c (get_bb_type): Reworked. We distinguish between
4888         loops with one or multiple exits.
4889         (is_loop_exit): New.
4890         (is_pred): New.
4891         (is_bb_addable): Rework condition handling, now support for case
4892         case statements and loops with multiple exits.
4893
4894         * testsuite/gcc.dg/graphite/scop-11.c: New.
4895         * testsuite/gcc.dg/graphite/scop-12.c: New.
4896         * testsuite/gcc.dg/graphite/scop-13.c: New.
4897
4898 2008-05-29  Tobias Grosser  <grosser@fim.uni-passau.de>
4899
4900         * graphite.c (dot_all_scops_1): Fix some colors. Reuse colors, if
4901         we have too many colors.
4902
4903 2008-05-22  Sandeep Maram <smaram_b04@iiita.ac.in>
4904
4905         * doc/invoke.texi (-ftree-loop-fusion): Document.
4906         * tree-pass.h (pass_loop_fusion): Declared.
4907         * tree-loop-fusion.c: New.
4908         * timevar.def (TV_TREE_LOOP_FUSION): Declared.
4909         * tree-data-ref.c (find_data_references_in_loop): Make extern.
4910         * tree-data-ref.h (find_data_references_in_loop): Declared.
4911         * common.opt (ftree-loop-fusion): Declared.
4912         * Makefile.in (tree-loop-fusion.o): Added rule and to OBJS-common.
4913
4914 2008-05-21  Sebastian Pop  <sebastian.pop@amd.com>
4915
4916         * graphite.c (build_access_matrix): Fix typo from the merge.
4917
4918 2008-05-20  Sebastian Pop  <sebastian.pop@amd.com>
4919
4920         * Merge from mainline (130800:135673).
4921
4922 2008-05-07  Sebastian Pop  <sebastian.pop@amd.com>
4923
4924         * graphite.c (end_scop): The exit of the scop is not part of the scop.
4925         Update dominators after splitting.
4926
4927 2008-05-07  Sebastian Pop  <sebastian.pop@amd.com>
4928
4929         * graphite.c (is_bb_addable): Return the harmful statement.
4930         Factor up some code.
4931         (end_scop): New.  Splits end of scope bbs on a harmful statement.
4932         (build_scops_1): Call end_scop.
4933
4934 2008-05-07  Sebastian Pop  <sebastian.pop@amd.com>
4935
4936         * graphite.c: (succs_at_same_depth, end_scop, all_preds_visited_p,
4937         all_succs_visited_p, start_new_scop_for_each_succ, start_new_scop,
4938         add_dominators_to_open_scops, stop_last_open_scop, scop_end_loop,
4939         build_scops_1): Removed.
4940         (build_scops_2): Renamed build_scops_1.
4941
4942 2008-05-06  Sebastian Pop  <sebastian.pop@amd.com>
4943
4944         * graphite.c: Fix formatting.
4945
4946 2008-05-06  Tobias Grosser  <grosser@fim.uni-passau.de>
4947
4948         * graphite.c (get_bb_type): New.
4949         (move_scops): New.
4950         (build_scops_2): New.
4951         (is_bb_addable): New.
4952         (build_scops): Switch the scop detection.
4953         (build_scop_bbs): Add entry bb to scop.
4954         * graphite.h (struct scop): Update comment.
4955
4956 2008-05-06  Tobias Grosser  <grosser@fim.uni-passau.de>
4957
4958         * graphite.c (dot_all_scops_1): Fix some incorrect colors and add
4959         more colors.
4960
4961 2008-05-06  Tobias Grosser  <grosser@fim.uni-passau.de>
4962
4963         * testsuite/gcc.dg/graphite/scop-1.c: Update.
4964         * testsuite/gcc.dg/graphite/scop-2.c: Update.
4965         * testsuite/gcc.dg/graphite/scop-4.c: Update.
4966         * testsuite/gcc.dg/graphite/scop-5.c: Add.
4967         * testsuite/gcc.dg/graphite/scop-6.c: Add.
4968
4969 2008-05-06  Sebastian Pop  <sebastian.pop@amd.com>
4970
4971         * testsuite/gcc.dg/graphite/scop-0.c: Add.
4972         * testsuite/gcc.dg/graphite/scop-7.c: Add.
4973         * testsuite/gcc.dg/graphite/scop-8.c: Add.
4974         * testsuite/gcc.dg/graphite/scop-9.c: Add.
4975         * testsuite/gcc.dg/graphite/scop-10.c: Add.
4976
4977 2008-05-06  Tobias Grosser  <grosser@fim.uni-passau.de>
4978
4979         * graphite.c (scop_affine_expr): Renamed to loop_affine_expr.
4980         Check affine expressions depending on the outermost loop
4981         instead of a scop.
4982         (stmt_simple_for_scop_p): Same.
4983         (harmfule_stmt_in_scop): Same.
4984
4985 2008-04-28  Tobias Grosser  <grosser@fim.uni-passau.de>
4986
4987         * graphite.c (dot_all_scops): Remove incorrect difficult bb coloring,
4988         mark entry and exit, that are not part of the SCoP and update HTML
4989         formatting.
4990
4991 2008-04-25  Sebastian Pop  <sebastian.pop@amd.com>
4992
4993         * graphite.c (basic_block_simple_for_scop_p): Renamed
4994         harmful_stmt_in_bb.
4995         (save_scop, preds_at_same_depth, test_for_scop_bound): Removed.
4996         (add_dominators_to_open_scops, build_scops_1): Reimplemented.
4997         (all_preds_visited_p, all_succs_visited_p,
4998         start_new_scop_for_each_succ, start_new_scop, stop_last_open_scop,
4999         scop_end_loop): New.
5000         (build_scops): Do not use dfs_enumerate_from.
5001
5002         * testsuite/gcc.dg/graphite/scop-{1,2,4}.c: Updated.
5003
5004 2008-04-23  Sebastian Pop  <sebastian.pop@amd.com>
5005
5006         * graphite.c: Add comments to functions that are missing a
5007         description.
5008         (graphite_create_iv): Removed.  Merged in graphite_loop_to_gcc_loop.
5009
5010 2008-04-23  Sebastian Pop  <sebastian.pop@amd.com>
5011
5012         * graphite.c (nb_params_in_scop): Moved...
5013         (graphite_bb_from_bb, loop_body_to_cloog_stmts): New.
5014         (setup_cloog_loop): Call loop_body_to_cloog_stmts.
5015         (clast_to_gcc_expression): Reduce column size to less than 80.
5016         (graphite_create_iv): Return the new name of the IV.
5017         (find_transform): Set options->esp and options->cpp.
5018         (gloog): Comment out the invalidation of the old loop code.
5019         (initialize_dependence_polyhedron): Replace scop_nb_params with
5020         nb_params_in_scop.
5021
5022         * graphite.h (nb_params_in_scop): ... here.
5023         (scop_nb_params): Removed.
5024         (loop_domain_dim): Return something even when the loop was not
5025         found in the hash table: avoid ICEing on all the graphite.exp
5026         testcases.
5027
5028 2008-04-14  Konrad Trifunovic  <konrad.trifunovic@inria.fr>
5029
5030         * tree-chrec.c (for_each_scev_op): SCEV can have 3 operands.
5031
5032         * graphite.c (build_scop_dynamic_schedules): Schedule is built
5033         according to nesting level.
5034         (find_scop_parameters): Call instantiate_parameters.
5035         (scan_tree_for_params): Extend it to handle general affine bounds.
5036         Inner loop bound can depend on outer loop induction variable.
5037         (setup_cloog_loop): tmp variable is allocated on stack. Call
5038         instantiate_parameters with respect to outermost_loop_in_scop.
5039         (loop_domain_dim, ref_nb_loops, loop_iteration_vector_dim): moved to
5040         graphite.h.
5041         (create_empty_loop): Function loopify should be given edge
5042         probability, instead of edge frequency. Dominance relation from
5043         switch_bb to loop_header.
5044         (clast_to_gcc_expression): Added handling of clast_reduction node.
5045         (gloog): New functionality for removing old loop.
5046         (test_dependence): Factored out from build_rdg_all_levels.
5047         (build_rdg_all_levels): Dependence testing factored out to
5048         test_dependence function.
5049
5050         * graphite.h (struct graphite_bb): Extended with dynamic_schedule.
5051         (loop_domain_dim, ref_nb_loops, loop_iteration_vector_dim): Moved
5052         from graphite.c
5053
5054 2008-04-07  Sebastian Pop  <sebastian.pop@amd.com>
5055
5056         * graphite.c (free_scop, param_index, initialize_cloog_names,
5057         nb_params_in_scop): Use name_tree map instead of just a tree
5058         for keeping track of the variable name associated to that tree.
5059         (create_empty_loop, gmp_cst_to_tree, clast_name_to_gcc,
5060         clast_to_gcc_expression, graphite_create_iv,
5061         graphite_loop_to_gcc_loop, graphite_cond_to_gcc_cond,
5062         graphite_stmt_to_gcc_stmt): New.
5063         (gloog): Call these.
5064         * graphite.h (struct name_tree): New.
5065         (struct scop): Use name_tree instead of tree for params.
5066         Store a vector of name_tree for new_ivs.
5067         (SCOP_NEWIVS): New.
5068         (scop_nb_params): Use name_tree instead of tree.
5069
5070 2008-04-05  Alexander Lamaison  <awl03@doc.ic.ac.uk>
5071             Sebastian Pop  <sebastian.pop@amd.com>
5072
5073         * tree-bounds.c: New.
5074         * tree-bounds.h: New.
5075         * tree-pass.h: Declare pass_bounds_early and pass_bounds_late.
5076         * passes.c: Schedule pass_bounds_early, pass_bounds_late.
5077         * builtins.c (expand_builtin_alloca): Add flag_bounds as for
5078         flag_mudflap.
5079         * gcc.c: Same.
5080         * toplev.c: Same.
5081         * c-cppbuiltin.c: Same.
5082         * c-pragma.c: Same.
5083         * common.opt: Same.
5084         * varasm.c: Same.
5085         * tree-outof-ssa.c: Same.
5086         * c-common.c: Same.
5087         * Makefile.in: Same.
5088
5089 2008-03-15  Antoniu Pop  <antoniu.pop@gmail.com>
5090             Sebastian Pop  <sebastian.pop@amd.com>
5091
5092         * tree-loop-distribution.c (remaining_stmts,
5093         upstream_mem_writes): Removed static variables.
5094         (copy_loop_before, create_bb_after_loop,
5095         mark_nodes_having_upstream_mem_writes, free_rdg_components,
5096         rdg_build_components, rdg_build_partitions,
5097         dump_rdg_partitions): Extern.
5098         (generate_loops_for_partition, generate_code_for_partition): Do not
5099         return a bool.
5100         (already_processed_vertex_p, predecessor_has_mem_write,
5101         mark_nodes_having_upstream_mem_writes, has_upstream_mem_writes,
5102         rdg_flag_all_uses, rdg_flag_uses, rdg_flag_vertex_and_dependent,
5103         rdg_flag_loop_exits, rdg_flag_similar_memory_accesses,
5104         build_rdg_partition_for_component, rdg_build_partitions, ldist_gen):
5105         Pass remaining_stmts and upstream_mem_writes as parameters.
5106         (rdg_component): Moved...
5107         (build_rdg_partition_for_component): Do not aggregate components when
5108         flag_streamize_loops is set.
5109         (gen_sequential_loops): New.
5110         (ldist_gen): Call gen_sequential_loops.
5111
5112         * tree-pass.h (pass_loop_streamization): Declared.
5113
5114         * omp-low.c (expand_omp_sections): Call add_bb_to_loop on created
5115         basic blocks when loops structures exist.
5116
5117         * builtin-types.def (BT_FN_VOID_PTR_PTR_INT): New.
5118
5119         * tree-ssa-loop-ivopts.c (expr_invariant_in_region_p): New.
5120
5121         * tree-parloops.c (take_address_of, eliminate_local_variables_1,
5122         eliminate_local_variables_stmt, eliminate_local_variables,
5123         separate_decls_in_loop_name, separate_decls_in_loop_stmt,
5124         separate_decls_in_loop, gen_parallel_loop): Make them work on a region
5125         of code delimited by two edges in the CFG.
5126         (separate_decls_in_loop_name): Renamed separate_decls_in_region_name.
5127         (separate_decls_in_loop_stmt): Renamed separate_decls_in_region_stmt.
5128         (separate_decls_in_loop): Renamed separate_decls_in_region.  Isolate
5129         the case of parallelisation of reductions.
5130         (create_loop_fn): Extern.
5131         (create_omp_parallel_region): New.
5132
5133         * tree-data-ref.c (dump_data_dependence_relation): Don't call
5134         dump_data_reference for printing dra and drb.
5135         (create_rdg_edge_for_ddr, create_rdg_edges_for_scalar): Initialise
5136         RDGE_RELATION.
5137         (build_rdg): Don't call free_dependence_relations for the moment, as
5138         we attach dependence relations on each edge of the RDG.
5139         To be fixed later.
5140
5141         * tree-data-ref.h (rdg_component): ...here.
5142         (struct rdg_edge): New field ddr_p relation.
5143         (RDGE_RELATION): New.
5144         (create_bb_after_loop, copy_loop_before,
5145         mark_nodes_having_upstream_mem_writes, rdg_build_components,
5146         rdg_build_partitions, dump_rdg_partitions,
5147         free_rdg_components): Declared.
5148
5149         * omp-builtins.def (BUILT_IN_GOMP_STREAM_ALIGN_PUSH,
5150         BUILT_IN_GOMP_STREAM_ALIGN_POP): New.
5151
5152         * tree-loop-streamization.c: New.
5153
5154         * tree-flow.h (gather_blocks_in_sese_region, create_loop_fn,
5155         create_omp_parallel_region, expr_invariant_in_region_p): Declared.
5156
5157         * Makefile.in (tree-loop-streamization.o): Added to OBJS-common.
5158
5159         * tree-cfg.c (gather_blocks_in_sese_region): Extern.
5160
5161         * passes.c: Schedule pass_loop_streamization.
5162
5163 2008-03-08  Tobias Grosser  <grosser@fmi.uni-passau.de>
5164
5165         * graphite.c (dot_all_scops_1): Fix formatting for difficult bbs and
5166         update comment.
5167
5168 2008-03-07  Tobias Grosser  <grosser@fim.uni-passau.de>
5169
5170         * graphite.c (dot_all_scops): Update formatting.
5171         Bbs can now be part of more than one SCoP.
5172
5173 2008-03-04  Sebastian Pop  <sebastian.pop@amd.com>
5174
5175         * graphite.c (new_loop_to_cloog_loop_str, setup_cloog_loop): Fix
5176         malloc problems.
5177         (loop_domain_dim): Check for unregistered toplev SCOP loop.
5178         * graphite.h (loop_to_cloog_loop): New.
5179
5180 2008-03-04  Konrad Trifunovic  <konrad.trifunovic@inria.fr>
5181
5182         * graphite.c (loop_domain_dim, ref_nb_loops,
5183         loop_iteration_vector_dim): New.
5184         (build_access_matrix_with_af, build_access_matrix,
5185         initialize_dependence_polyhedron): Fixed for new matrix layout.
5186         No longer assume that all iteration domains are of the same
5187         dimensionality.
5188
5189 2008-03-02  Sebastian Pop  <sebastian.pop@amd.com>
5190
5191         * tree-scalar-evolution.c (instantiate_parameters_1): An SSA_NAME
5192         defined in a loop at depth 0 is invariant.
5193         * tree-chrec.c (evolution_function_is_invariant_rec_p): Ditto.
5194         * tree-ssa-loop-ivopts.c (expr_invariant_in_loop_p): Should never
5195         be called at loop depth 0.
5196
5197         * graphite.c (basic_block_simple_for_scop_p): Take the scop as
5198         a parameter.
5199         (dot_all_scops_1): Update use of basic_block_simple_for_scop_p.
5200         (down_open_scop): Removed.
5201         (loop_in_scop_p): Redefined.
5202         (scop_affine_expr): New argument: scop.
5203         (stmt_simple_for_scop_p): New argument: scop.  RETURN_EXPR is not
5204         a harmful statement ending a scop.
5205         (basic_block_simple_for_scop_p): New argument: scop.
5206         (get_loop_start): Removed.
5207         (new_scop): Initialize SCOP_LOOPS.
5208         (free_scop): Free SCOP_LOOPS.
5209         (succs_at_same_depth, preds_at_same_depth): New.
5210         (end_scop): Test the validity of a scop.
5211         (add_dominators_to_open_scops): New.
5212         (test_for_scop_bound): Call add_dominators_to_open_scops.
5213         Add cases for opening and closing multiple scops.
5214         (build_scops, build_scop_bbs): Iterate over basic blocks in
5215         depth first order.
5216         (build_graphite_bb): Pass scop directly.
5217         (dfs_bb_in_scop_p): New.
5218         (scop_record_loop): Use SCOP_LOOPS for not recording the same loop
5219         several times.
5220         (nb_loops_around_gb): Use loop_in_scop_p.
5221         (schedule_to_scattering): Disabled for the moment the code computing
5222         the "textual order for outer loop".
5223
5224         * graphite.h (struct scop): New field loops.
5225         (SCOP_LOOPS): New.
5226         (scop_loop_index): Test that the given loop belongs to SCOP_LOOPS.
5227
5228         * testsuite/gcc.dg/graphite/scop-{1,...,7}.c: Updated.
5229
5230 2008-02-27  Antoniu Pop  <antoniu.pop@gmail.com>
5231             Sebastian Pop  <sebastian.pop@amd.com>
5232
5233         * builtin-types.def (BT_FN_PTR_SIZE_UINT, BT_FN_BOOL_PTR): New.
5234         * common.opt (fstreamize-loops): New.
5235         * omp-builtins.def (BUILT_IN_GOMP_STREAM_CREATE,
5236         BUILT_IN_GOMP_STREAM_PUSH, BUILT_IN_GOMP_STREAM_HEAD,
5237         BUILT_IN_GOMP_STREAM_POP, BUILT_IN_GOMP_STREAM_EOS_P,
5238         BUILT_IN_GOMP_STREAM_SET_EOS, BUILT_IN_GOMP_STREAM_DESTROY): New.
5239
5240 2008-02-22  Konrad Trifunovic  <konrad.trifunovic@inria.fr>
5241
5242         * tree-data-ref.c (build_empty_rdg): New.
5243         (build_rdg): Use it.
5244         * tree-data-ref.h (build_empty_rdg): Declared.
5245         * graphite.c (free_scop): Free SCOP_LOOP2CLOOG_LOOP.
5246         (find_vertex_for_stmt): Removed.
5247         (build_rdg_all_levels): Use build_empty_rdg and rdg_vertex_for_stmt.
5248
5249 2008-02-21  Sebastian Pop  <sebastian.pop@amd.com>
5250
5251         * tree-loop-distribution.c (generate_builtin): After cancelling the
5252         loop tree, also delete basic blocks.
5253         (rdg_flag_uses): Stop recursion when a vertex has already been
5254         processed.
5255
5256 2008-02-15  Konrad Trifunovic  <konrad.trifunovic@inria.fr>
5257
5258         * graphite.c (build_scop_alpha): Removed.
5259         (graphite_transform_loops): Add a dummy call to build_all_rdg_levels
5260         and dump_dependence_graph to avoid compiler warnings.
5261
5262 2008-02-14  Konrad Trifunovic  <konrad.trifunovic@inria.fr>
5263
5264         * tree-data-ref.c (dr_may_alias_p, create_rdg_vertices): Extern.
5265         * tree-data-ref.h (dr_may_alias_p, create_rdg_vertices): Declared.
5266         * graphite.c (new_loop_to_cloog_loop_str, hash_loop_to_cloog_loop,
5267         eq_loop_to_cloog_loop, del_loop_to_cloog_loop): New.
5268         (new_scop, setup_cloog_loop): Initialize SCOP_LOOP2CLOOG_LOOP.
5269         (initialize_dependence_polyhedron, find_vertex_for_stmt,
5270         initialize_data_dependence_polyhedron, is_empty_polyhedron,
5271         statement_precedes_p, build_rdg_all_levels, build_scop_alpha,
5272         dump_dependence_graph): New.
5273         * graphite.h (struct graphite_bb): New field compressed_alpha_matrix.
5274         (GBB_ALPHA): New.
5275         (struct scop): New field loop2cloog_loop.
5276         (SCOP_LOOP2CLOOG_LOOP, struct data_dependence_polyhedron,
5277         RDGE_DDP, ddp_p, struct loop_to_cloog_loop_str): New.
5278
5279 2008-02-10  Konrad Trifunovic  <konrad.trifunovic@inria.fr>
5280
5281         * graphite.c (build_graphite_bb): Fix initialization
5282         of the graphite basic block.
5283
5284 2008-02-05  Sebastian Pop  <sebastian.pop@amd.com>
5285
5286         * graphite.c (scan_tree_for_params): Rewrite for the new layout of
5287         loop domain matrix.  Pass in the number of loops contained in the
5288         constraint matrix.
5289         (nb_loops_around_gb): Moved before setup_cloog_loop that uses it.
5290         (setup_cloog_loop): Rewrite for the new layout of loop domain matrix:
5291         loops that are not surrounding the current loop are not represented
5292         in the domain constraint matrix.
5293         (build_scop_iteration_domain): Initial domain constraint matrix
5294         contains only the eq/ineq, cst, and scop parameters columns.
5295
5296 2008-01-29  Tobias Grosser  <grosser@fim.uni-passau.de>
5297
5298         * graphite.c (schedule_to_scattering, nb_loops_around_gb): New.
5299         (print_graphite_bb): Print scattering.
5300
5301 2008-01-29  Tobias Grosser  <grosser@fim.uni-passau.de>
5302
5303         * graphite.c (initialize_cloog_names): Initialize names of
5304         scattering variables.
5305
5306 2009-01-29  Tobias Grosser  <grosser@fim.uni-passau.de>
5307
5308         * graphite.c (dot_all_scops_1): Disable debug output while
5309         printing graph.
5310
5311 2008-01-29  Tobias Grosser  <grosser@fim.uni-passau.de>
5312
5313         * graphite.c (find_transform): Change cloog output language to C.
5314
5315 2008-01-27  Sebastian Pop  <sebastian.pop@amd.com>
5316
5317         * tree-loop-distribution.c (generate_memset_zero,
5318         generate_builtin, generate_code_for_partition,
5319         rdg_flag_all_uses): New.
5320         (rdg_flag_uses): Gather in the same partition the statements defining
5321         the VUSES of the current statement.
5322         (rdg_flag_similar_stores): Renamed rdg_flag_similar_memory_accesses.
5323         Gather in the same partition not only the stores to the same memory
5324         access, but also the reads.
5325         (ldist_generate_loops): Renamed ldist_gen.
5326
5327 2008-01-24  Sebastian Pop  <sebastian.pop@amd.com>
5328             Tobias Grosser  <grosser@fmi.uni-passau.de>
5329
5330         * graphite.c (setup_cloog_loop): Chain all cloog loops with the
5331         next pointer, don't use the inner pointer.
5332
5333 2008-01-20  Tobias Grosser  <grosser@fmi.uni-passau.de>
5334
5335         * graphite.c (dot_all_scops, dot_all_scops_1): New.
5336         (find_transform): Call dot_all_1.
5337         * graphite.h (dot_all_scops): Declared.
5338
5339 2007-12-14  Sebastian Pop  <sebastian.pop@amd.com>
5340
5341         * tree-loop-distribution.c: Fix apsi.f ICE.
5342         (create_bb_after_loop): New.
5343         (generate_loops_for_partition): Use it.
5344         * testsuite/gfortran.dg/ldist-1.f90: New.
5345
5346         * tree-data-ref.c (dot_rdg): Use /tmp/rdg.dot for dotty format.
5347         * graphite.c (dot_scop): Use /tmp/scop.dot for dotty format.
5348
5349 2007-12-13  Tobias Grosser  <grosser@fmi.uni-passau.de>
5350
5351         * graphite.c (find_transform): Dump cloog program sent to cloog.
5352
5353 2007-12-13  Tobias Grosser  <grosser@fmi.uni-passau.de>
5354
5355         * graphite.c (initialize_cloog_names): Initialize cloog
5356         iterator names.
5357
5358 2007-12-13  Tobias Grosser  <grosser@fmi.uni-passau.de>
5359
5360         * graphite.c (build_scop_context): Fix typo, for the matrix
5361         format: insert '0 >= 0' instead of '-1 >= 0'.
5362
5363 2007-12-13  Sebastian Pop  <sebastian.pop@amd.com>
5364
5365         * Fix merge problems.
5366
5367 2007-12-13  Sebastian Pop  <sebastian.pop@amd.com>
5368
5369         * graphite.c (setup_cloog_loop): Fix typo.
5370
5371 2007-12-12  Sebastian Pop  <sebastian.pop@amd.com>
5372
5373         * doc/invoke.texi (-ftree-loop-distribution): Documented.
5374         * tree-loop-distribution.c: Reimplemented.
5375         * tree-pass.h (pass_loop_distribution): New.
5376         * tree-scalar-evolution.c (number_of_iterations_for_all_loops): Use
5377         print_loops.
5378         * graphds.h (struct graph): New field indexes.
5379         * timevar.def (TV_TREE_LOOP_DISTRIBUTION): New.
5380
5381         * tree-vect-analyze.c: Remove declaration of static functions when not
5382         needed.
5383         * tree-vectorizer.c: Same.
5384         (rename_variables_in_loop): Now extern.
5385         (slpeel_tree_duplicate_loop_to_edge_cfg): Renamed
5386         tree_duplicate_loop_to_edge_cfg.  Reset PENDING_STMT for edges after
5387         calling redirect_edge_and_branch_force.
5388
5389         * tree-vectorizer.h (tree_duplicate_loop_on_edge): Declared.
5390
5391         * tree-data-ref.c: Don't include tree-chrec.h.
5392         (debug_data_dependence_relations): New.
5393         (dump_data_dependence_relation): Call dump_data_reference on data refs
5394         in the relation.
5395         (same_access_functions): Moved...
5396         (find_vertex_for_stmt): Renamed rdg_vertex_for_stmt.
5397         (dump_rdg_vertex, debug_rdg_vertex, dump_rdg_component,
5398         debug_rdg_component, dump_rdg, debug_rdg, dot_rdg_1, dot_rdg,
5399         struct rdg_vertex_info, ): New.
5400         (create_rdg_edge_for_ddr): Compute the dependence level before looking
5401         at DDR_REVERSED_P.
5402         (create_rdg_vertices): Initialize the htab of graph->indexes.
5403         Initialize RDG_MEM_WRITE_STMT and RDG_MEM_READS_STMT.
5404         (stmts_from_loop): Don't save LABEL_EXPR.
5405         (hash_stmt_vertex_info, eq_stmt_vertex_info,
5406         hash_stmt_vertex_del): New.
5407         (build_rdg): Initialize rdg->indexes.
5408         (free_rdg, stores_from_loop, ref_base_address,
5409         rdg_defs_used_in_other_loops_p, have_similar_memory_accesses,
5410         have_similar_memory_accesses_1, ref_base_address_1,
5411         remove_similar_memory_refs): New.
5412
5413         * tree-data-ref.h: Include tree-chrec.h.
5414         (debug_data_dependence_relations): Declared.
5415         (same_access_functions): ...here.  Now static inline.
5416         (ddr_is_anti_dependent, ddrs_have_anti_deps,
5417         ddr_dependence_level): New.
5418         (struct rdg_vertex): New fields has_mem_write, has_mem_reads.
5419         (RDGV_HAS_MEM_WRITE, RDGV_HAS_MEM_READS, RDG_STMT, RDG_MEM_WRITE_STMT,
5420         RDG_MEM_READS_STMT): New.
5421         (dump_rdg_vertex, debug_rdg_vertex, dump_rdg_component,
5422         debug_rdg_component, dump_rdg, debug_rdg, dot_rdg,
5423         rdg_vertex_for_stmt): Declared.
5424         (struct rdg_edge): New field level.
5425         (RDGE_LEVEL, free_rdg): New.
5426         (stores_from_loop, remove_similar_memory_refs,
5427         rdg_defs_used_in_other_loops_p,
5428         have_similar_memory_accesses): Declared.
5429         (rdg_has_similar_memory_accesses): New.
5430
5431         * lambda.h (dependence_level): New.
5432         * common.opt (ftree-loop-distribution): New.
5433         * tree-flow.h (debug_loop_ir): Renamed debug_loops.
5434         (print_loop_ir): Renamed print_loops.
5435         (debug_loop, debug_loop_num, print_loops_bb, mark_virtual_ops_in_bb,
5436         tree_duplicate_loop_to_edge_cfg, rename_variables_in_loop): Declared.
5437         * Makefile.in (TREE_DATA_REF_H): Depends on tree-chrec.h.
5438         (tree-loop-distribution.o): Added.
5439         * tree-cfg.c (mark_virtual_ops_in_region): Use mark_virtual_ops_in_bb.
5440         (mark_virtual_ops_in_bb): New.
5441         (print_loops_bb, debug_loop_num, debug_loop): New.
5442         * passes.c: Scheduled pass_loop_distribution.
5443
5444 2007-12-12  Konrad Trifunovic  <konrad.trifunovic@inria.fr>
5445
5446         * graphite.c (scan_tree_for_params): Correct the number of columns
5447         for polylib format.
5448         (nb_flat_iterator): New.
5449         (setup_cloog_loop): Initialize to 1 the first column for inequalities.
5450         (build_scop_iteration_domain): Correct the number of columns for
5451         polylib format.
5452
5453 2007-12-12  Sebastian Pop  <sebastian.pop@amd.com>
5454
5455         * Merge from mainline (129697:130800).
5456
5457 2007-10-30  Sebastian Pop  <sebastian.pop@amd.com>
5458
5459         * graphite.c (build_graphite_bb): SCoP's basic blocks are post
5460         dominated by SCoP's exit.
5461         (graphite_transform_loops): Compute post dominators.
5462
5463 2007-10-28  Sebastian Pop  <sebastian.pop@amd.com>
5464
5465         * Merge from mainline (127169:129697).
5466
5467 2007-10-28  Sebastian Pop  <sebastian.pop@amd.com>
5468
5469         * graphite.c (affine_expr): Renamed scop_affine_expr.  Use an extra
5470         parameter for the basic block that contains the expression.  Use
5471         outermost_loop_in_scop for evolution_function_is_affine_multivariate_p.
5472         (stmt_simple_for_scop_p): Pass to scop_affine_expr the basic block of
5473         the expression.
5474         * graphite.h (gbb_loop): New.
5475         (GBB_LOOP): Removed.
5476
5477 2007-08-03  Sebastian Pop  <sebpop@gmail.com>
5478
5479         * Makefile.in: Fix merge problem.
5480
5481 2007-08-03  Sebastian Pop  <sebpop@gmail.com>
5482
5483         * Merge from mainline (125309:127169).
5484         * tree-loop-distribution.c: Disabled.
5485
5486 2007-06-05  Sebastian Pop  <sebpop@gmail.com>
5487
5488         * Merge from mainline (r123693:125309).
5489
5490 2007-05-30  Sebastian Pop  <sebpop@gmail.com>
5491
5492         * tree-loop-distribution.c (correct_modify_expr_p): Renamed
5493         correct_modify_p
5494         (correct_modify_p, check_statements, number_of_lvalue_uses,
5495         number_of_scalar_dependences, create_edges): Use GIMPLE_MODIFY_STMT
5496         instead of MODIFY_EXPR.
5497         (update_edge_with_ddv): Don't pass index_of_edge.  Initialize
5498         and push new edges.
5499
5500 2007-05-24  Sebastian Pop  <sebpop@gmail.com>
5501
5502         * tree-loop-distribution.c (struct rdg): Replace arrays by
5503         VECs for edges and vertices.
5504         (RDG_NBV, RDG_NBE, RDG_VERTEX, RDG_EDGE): Removed.
5505         (RDGV_NB_PARTITIONS): New.
5506         (PRDG_NBV, PRDG_NBE): Removed.
5507         (build_scc_graph, correct_partitions_p, mark_partitions, build_prdg,
5508         dump_rdg, find_vertex_with_stmt, create_vertices, free_rdg,
5509         number_of_scalar_dependences, create_edges, build_rdg): Use VECs.
5510
5511 2007-05-17  Georges-Andre Silber  <silber@cri.ensmp.fr>
5512             Sebastian Pop  <sebpop@gmail.com>
5513
5514         * doc/invoke.texi (-ftree-loop-distribution): Document.
5515         * tree-loop-distribution.c: New file.
5516         * tree-pass.h (pass_loop_distribution): Declared.
5517         * timevar.def (TV_TREE_LOOP_DISTRIBUTION): New.
5518         * tree-data-ref.c (initialize_data_dependence_relation): Initialize
5519         and set reversed_p.
5520         * tree-data-ref.h (data_dependence_relation): Add reversed_p.
5521         (DDR_REVERSED_P): New.
5522         * common.opt (-ftree-loop-distribution): New.
5523         * tree-flow.h (distribute_loops): Declared.
5524         * Makefile.in (OBJS-common): Depend on tree-loop-distribution.o.
5525         * passes.c (init_optimization_passes): Schedule loop distribution.
5526
5527 2007-05-12  Sebastian Pop  <sebastian.pop@inria.fr>
5528
5529         * graphite.c (print_graphite_bb): Don't call dump_data_references.
5530         (print_scop): Don't print when scop is NULL.
5531         (build_scop_context, find_transform): Don't output to stderr.
5532
5533 2007-05-09  Sebastian Pop  <sebastian.pop@inria.fr>
5534
5535         * tree-data-ref.c: Don't include graphite.h.
5536         Comment out the code for printing data reference's scop.
5537         (build_access_matrix_with_af): Moved...
5538         * tree-data-ref.h (build_access_matrix_with_af): Removed declaration.
5539         * graphite.c (build_access_matrix_with_af): ... here.  Now static.
5540         (print_graphite_bb): Print basic block's schedule.
5541         (print_scop): Don't print the schedule, call cloog's pretty printer.
5542         (bb_in_scop_p): A basic block is in a scop only if it is both
5543         dominated and postdominated by the scop's entry and exit basic blocks.
5544         (function_parameter_p): New.
5545         (invariant_in_scop_p): Use function_parameter_p.
5546         (new_scop, save_scop): New.
5547         (end_scop, test_for_scop_bound, build_scops): Use new_scop, and
5548         save_scop.
5549         (scan_tree_for_params): Directly build the constraint as CloogMatrix.
5550         (loop_in_scop_p): New.
5551         (scop_record_loop): Use loop_in_scop_p.
5552         (build_scop_domain): Renamed build_scop_iteration_domain.
5553         (setup_cloog_loop, initialize_cloog_names, find_scop_parameters,
5554         nb_params_in_scop, build_scop_context, first_loop_in_scop,
5555         setup_cloog_loop, dot_scop_1, dot_scop): New.
5556         * graphite.h (GBB_LOOP, SCOP_PROG, dot_scop): New.
5557         (struct scop): Add a pointer to cloog's representation of a program.
5558
5559 2007-04-14  Sebastian Pop  <sebastian.pop@inria.fr>
5560
5561         * doc/invoke.texi (-ftree-check-verbose): Renamed
5562         -ftree-checks-verbose.
5563         * common.opt (flag_tree_check_verbose): Renamed
5564         flag_tree_checks_verbose.
5565         * tree-check.c (tree_check_warning): Use flag_tree_checks_verbose.
5566
5567 2007-04-14  Sebastian Pop  <sebastian.pop@inria.fr>
5568
5569         * configure: Regenerated.
5570         * config.in: Regenerated.
5571         * tree-ssa-loop.c (graphite_transforms): Execute
5572         graphite_transform_loops only when HAVE_cloog.
5573         * configure.ac (HAVE_polylib, HAVE_cloog, GRAPHITE): Defined.
5574         * graphite.c: Include polylibgmp.h and cloog.h.
5575         (graphite_transform_loops): Removed loops parameter.
5576         * tree-flow.h (graphite_transform_loops): Update declaration.
5577         * Makefile.in (POLYLIBLIBS, POLYLIBINC, CLOOGLIBS, CLOOGINC): New.
5578         (LIBS): Depend on CLOOGLIBS and on POLYLIBLIBS.
5579         (INCLUDES): Depend on POLYLIBINC and on CLOOGINC.
5580         (OBJS-common): Remove dependence on graphite.o.
5581         (BACKEND): Depend on @GRAPHITE@.
5582
5583 2007-04-13  Sebastian Pop  <sebastian.pop@inria.fr>
5584
5585         * doc/invoke.texi (-ftree-check-verbose): Documented.
5586         * testsuite/gcc.dg/tree-checker/tree-checks-1.c: New.
5587         * testsuite/gcc.dg/tree-checker/tree-checks-2.c: New.
5588         * testsuite/gcc.dg/tree-checker/tree-checks-3.c: New.
5589         * testsuite/gcc.dg/tree-checker/tree-checks-4.c: New.
5590         * testsuite/gcc.dg/tree-checker/tree-checks.exp: New.
5591         * testsuite/gcc.dg/tree-checker/condates.crp: New.
5592         * common.opt (ftree-checks-verbose): New.
5593         * tree-check.c (tree_check_warning): Move extra stderr output
5594         under control of flag_tree_check_verbose.
5595
5596 2007-04-12  Sebastian Pop  <sebastian.pop@inria.fr>
5597
5598         * tree-match.c: Fix comments formatting.
5599         * tree-match.h: Fix comments formatting.
5600         * tree-check.c: Fix comments formatting.
5601         (tree_check_init): Restructure.
5602
5603 2007-04-12  Nic Volanschi  <nic.volanschi@free.fr>
5604
5605         * doc/invoke.texi (-ftree-check, -ftree-checks): Documented.
5606
5607 2007-04-10  Sebastian Pop  <sebastian.pop@inria.fr>
5608
5609         * Merge from mainline (r120733:123693).
5610
5611 2007-03-20  Nic Volanschi  <nic.volanschi@free.fr>
5612
5613         * condate.y: New file.
5614         * tree-match.h (struct patt_info_s): New field sign.
5615         (struct condate_s): New field msg.
5616         (normalize_condate, name_condate, add_condate): New.
5617         (conds[], condate_parse): Made extern.
5618         * tree-check.c (tree_check_warning): First arg changed to cond;
5619         warning reformatted.
5620         (tree_check_init): Reset the TREE_VISITED bit on every CFG node.
5621         (tree_scan): New.
5622         (tree_check): Process trivial condates.
5623         (read_delimited_string): Removed.
5624         (print_cond): Print name and msg.
5625         (conds[]): Made extern.
5626         (parse_tree_check_file_once): Rewritten to use the parser in
5627         condate.y.
5628         Processing of option --tree_check_string moved to tree_scan().
5629         * Makefile.in: Added condate.y
5630
5631 2007-03-12  Sebastian Pop  <sebastian.pop@inria.fr>
5632
5633         * tree-pretty-print.c (dump_generic_bb_buff, lazy_dump_generic_node):
5634         Use VECs instead of varrays.
5635         * diagnostic.h (lazy_dump_generic_node): Update declaration.
5636         * Makefile.in (pretty-print.o): Depend on vec.h.
5637         * pretty-print.c: Include tree.h and vec.h.
5638         (pp_clear_state, pp_write_list_to_stream, pp_base_format,
5639         pp_base_format, pp_construct, pp_base_string, pp_lazy_mode,
5640         new_tree_chunk, pp_add_tree, pp_add_string, pp_add_char, pp_write_list,
5641         pp_free_list): Use VECs instead of varrays.
5642         * pretty-print.h: Do not include varray.h.
5643         (struct tree_chunk_s): Declaration moved before its use.
5644         (output_buffer): Rename varray field to chunks.
5645         * tree-match.c (tree_equal, chunk_1st_char, chunks_lookahead,
5646         tree_1st_char, match_chunks_pattinfo, match_tree_pattinfo,
5647         save_global_holes): Use VECs instead of varrays.
5648         * tree-match.h: Declare VECs of cfg_node, and hole_p.
5649         * tree-check.c (scan_cfg_stmts, push_node,
5650         print_matching_stmt): Removed.
5651         (tree_check_instance, push_global_holes_if_new, tree_check,
5652         execute_tree_check): Use VECs instead of varrays.
5653         (gate_tree_check): Don't execute the CFG check when basic_block_info
5654         is not available.
5655
5656 2007-01-12  Sebastian Pop  <sebastian.pop@inria.fr>
5657
5658         * Merge from mainline (r115016:120733).
5659
5660 2007-01-12  Sebastian Pop  <sebastian.pop@inria.fr>
5661
5662         * Merge from mainline (r117632:117661).
5663
5664 2007-01-12  Sebastian Pop  <sebastian.pop@inria.fr>
5665
5666         * tree-dump.c (dump_option_value_in): Add TDF_DEBUG.
5667         * tree-pass.h (TDF_DEBUG, debug_p): New.
5668         * tree-scalar-evolution.c (set_scalar_evolution, get_scalar_evolution,
5669         get_scalar_evolution, add_to_evolution, set_nb_iterations_in_loop,
5670         get_loop_exit_condition, analyze_evolution_in_loop,
5671         analyze_initial_condition, analyze_scalar_evolution,
5672         instantiate_parameters, number_of_latch_executions): Use debug_p.
5673         * tree-chrec.c (chrec_apply): Use debug_p.
5674         * tree-data-ref.c: Include graphite.h.
5675         (dump_data_reference): Print also the access matrix.
5676         (analyze_array, analyze_indirect_ref, init_data_ref,
5677         analyze_offset_expr, address_analysis, object_analysis,
5678         create_data_ref, finalize_ddr_dependent,
5679         non_affine_dependence_relation, analyze_ziv_subscript,
5680         analyze_siv_subscript_cst_affine,
5681         compute_overlap_steps_for_affine_1_2, analyze_subscript_affine_affine,
5682         can_use_analyze_subscript_affine_affine, analyze_siv_subscript,
5683         analyze_miv_subscript, analyze_overlapping_iterations,
5684         build_classic_dist_vector, subscript_dependence_tester,
5685         compute_affine_dependence, analyze_all_data_dependences): Use debug_p.
5686         (build_access_matrix_with_af): No longer static.
5687         * tree-data-ref.h (scop_p): ... declaration here.
5688         (data_reference.scop): New field.
5689         (DR_SCOP, DR_ACCESS_MATRIX): New.
5690         (build_access_matrix_with_af, dr_num_subscripts): Declared.
5691         * graphite.c (print_graphite_bb): Call dump_data_references.
5692         (print_scop): Use scop_nb_loops and scop_dim_domain.
5693         (test_for_scop_bound): Use debug_p.
5694         (scan_tree_for_params): Use scop_nb_loops, scop_nb_loops and
5695         scop_nb_params.
5696         (scop_loop_index): Moved...
5697         (scop_record_loop): New.
5698         (build_scop_loop_nests): Use scop_record_loop.
5699         (build_scop_domain): Use scop_dim_domain.
5700         (build_access_matrix): Implemented.
5701         (build_scop_canonical_schedules): Use scop_nb_loops.
5702         (build_graphite_bb): Initialize GBB_SCOP.
5703         * graphite.h (scop_p): Moved...
5704         (graphite_bb.scop): New field.
5705         (graphite_bb.iteration_domain, GBB_DOMAIN, scop.nb_params,
5706         scop.nb_loops, scop.dim_domain, SCOP_NB_LOOPS, SCOP_NB_PARAMS,
5707         SCOP_DIM_DOMAIN, SCOP_STMTS): Removed.
5708         (scop_nb_params, scop_nb_loops, scop_dim_domain, gbb_dim_domain,
5709         scop_loop_index): New.
5710         * Makefile.in (tree-data-ref.o): Depends on graphite.h.
5711
5712 2007-01-05  Sebastian Pop  <sebastian.pop@inria.fr>
5713
5714         * Merge from mainline (r117661:120450).
5715
5716 2006-10-12  Sebastian Pop  <sebastian.pop@inria.fr>
5717
5718         * tree-scalar-evolution.c (instantiate_parameters_1): Don't stop
5719         at the first declaration outside the varying loop, instantiate as
5720         far as possible.
5721         * tree-chrec.c (for_each_scev_op): New.
5722         * tree-chrec.h (for_each_scev_op): Declared.
5723         * tree-ssa-loop.c (pass_graphite_trans): Don't dump the function.
5724         * tree-data-ref.c (get_references_in_stmt,
5725         find_data_references_in_stmt): New, from trunk.
5726         (find_data_references_in_loop): Use get_references_in_stmt
5727         and find_data_references_in_loop, modified as in trunk.
5728         (build_access_matrix_with_af): New.
5729         * tree-data-ref.h (data_reference): Add a field access_matrix.
5730         (data_ref_loc): New, as in trunk.
5731         * graphite.c (print_graphite_bb, bb_in_scop_p, stmt_in_scop_p,
5732         invariant_in_scop_p, param_index, scan_tree_for_params,
5733         scop_loop_index, build_scop_loop_nests, build_scop_domain, irp_data,
5734         idx_record_param, idx_record_params, build_access_matrix,
5735         build_scop_data_accesses, build_scop_canonical_schedules,
5736         build_graphite_bb, build_scop_bbs, find_params_in_bb,
5737         build_scop_params): New.
5738         * graphite.h (graphite_bb): New.
5739         (scop): Add fields static_schedule, params, loop_nest,
5740         iteration_domain.
5741         * lambda.h: Declare vecs of lambda_matrix.
5742         * tree-flow.h (print_loop_ir_bb): Declared.
5743         * tree-cfg.c (print_loop_ir_bb): New.
5744         (print_loop): Use print_loop_ir_bb.
5745
5746 2006-10-12  Sebastian Pop  <pop@cri.ensmp.fr>
5747
5748         * Merge from mainline (r115016:117632).
5749
5750 2006-10-11  Sebastian Pop  <pop@cri.ensmp.fr>
5751
5752         * graphite.c (debug_scops): Adjust definition for avoiding a bootstrap
5753         break due to a warning.
5754
5755 2006-10-10  Sebastian Pop  <pop@cri.ensmp.fr>
5756
5757         * graphite.c (print_scops, debug_scops): New.
5758         (graphite_transform): Renamed graphite_find_transform.
5759         * graphite.h (debug_scops): Declared.
5760
5761 2006-08-17  Sebastian Pop  <pop@cri.ensmp.fr>
5762
5763         * tree-match.c: Reformat following the GNU style.
5764         * tree-match.h: Reformat following the GNU style.
5765         * tree-pattern.h: Removed empty file.
5766         * Makefile.in: Remove references to tree-pattern.h.
5767         * tree-check.c: Reformat following the GNU style.
5768         (execute_tree_check): Move gate condition code to...
5769         (gate_tree_check): ...here.  New function.
5770         (pass_check): Use the gate function.
5771
5772 2006-07-04  Nic Volanschi <nic.volanschi@free.fr>
5773
5774         * tree-pattern.h: New. Tree pattern matching and checking using
5775         concrete syntax.
5776         * tree-check.c: New. Tree/CFG checking pass.
5777         * tree-match.c: New. Library for tree pattern matching.
5778         * opts.c, common.opt: Add options --ftree-check & --ftree-checks.
5779         * toplev.c, flags.h: Add globals for tree-check pass.
5780         * Makefile.in: Integrate the files in tree-check pass.
5781         * timevar.def, tree-optimize.c, tree-pass.h: Register tree-check pass.
5782         * pretty-print.c, pretty-print.h, tree-pretty-print.c, diagnostic.h:
5783         Introduce a "lazy" pretty-print mode.
5784         * tree.c, tree.h: Add tree_name.
5785
5786 2006-07-04  Sebastian Pop  <pop@cri.ensmp.fr>
5787
5788         * doc/invoke.texi (-fgraphite): Correct typo.
5789         * tree-scalar-evolution.c (number_of_iterations_for_all_loops): Update
5790         use of print_loop_ir.
5791         * testsuite/gcc.dg/graphite/scop-1.c: New.
5792         * testsuite/gcc.dg/graphite/scop-2.c: New.
5793         * testsuite/gcc.dg/graphite/graphite.exp: New.
5794         * graphite.c: Include domwalk.h.
5795         (print_scop): Print only the entry and exit blocks.
5796         (debug_scop): No longer static.
5797         (affine_expr): Fix formating.  Return also true when the expression is
5798         constant.
5799         (stmt_simple_for_scop_p): Fix formating.
5800         (build_scops): Use domwalk.
5801         (get_loop_start, end_scop, test_for_scop_bound): New.
5802         (graphite_transform_loops): Avoid printing on stderr.
5803         * graphite.h (debug_scop): Declared.
5804         * tree-flow.h (debug_loop_ir, print_loop_ir): Update declarations.
5805         * Makefile.in (graphite.o): Depend on domwalk.h.
5806         * tree-cfg.c (print_loop, print_pred_bbs, print_succ_bbs): Remove
5807         declarations for static functions.
5808         (print_loop, print_loop_ir, debug_loop_ir): Use an extra parameter for
5809         controlling output verbosity.
5810
5811 2006-06-26  Sebastian Pop  <pop@cri.ensmp.fr>
5812             Plesco Alexandru  <shurikx@gmail.com>
5813
5814         * doc/invoke.texi (-fgraphite): Document.
5815         * tree-pass.h (pass_graphite_transforms): Declared.
5816         * timevar.def (TV_GRAPHITE_TRANSFORMS): New.
5817         * tree-ssa-loop.c (graphite_transforms, gate_graphite_transforms): New.
5818         (pass_graphite_transforms): Defined.
5819         * tree-data-ref.c (free_data_ref, data_reference): Extern.
5820         * tree-data-ref.h (free_data_ref, data_reference): Declared.
5821         * graphite.c, graphite.h: New.
5822         * common.opt (fgraphite): Declared.
5823         * tree-flow.h (graphite_transform_loops): Declared.
5824         * Makefile.in (OBJS-common): Add graphite.o.
5825         (graphite.o): New rule.
5826         * passes.c (pass_graphite_transforms): Scheduled.
5827