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