OSDN Git Service

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