OSDN Git Service

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