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