OSDN Git Service

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