OSDN Git Service

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