OSDN Git Service

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