OSDN Git Service

d7d1a6a56f31b03af5162f2c71542df72d5055de
[pf3gnuchains/gcc-fork.git] / gcc / ChangeLog.graphite
1 2009-08-18  Sebastian Pop  <sebastian.pop@amd.com>
2
3         * cfgloopmanip.c (create_empty_loop_on_edge): Generate upper
4         bounds with LT_EXPR to make niter analysis more precise on code
5         generated by Graphite.
6
7 2009-08-18  Sebastian Pop  <sebastian.pop@amd.com>
8
9         * graphite-dependences.c (graphite_legal_transform_dr): Fix formatting.
10         (graphite_legal_transform_bb): Same.
11         (poly_drs_may_alias_p): Same.
12
13 2009-08-15  Sebastian Pop  <sebastian.pop@amd.com>
14
15         PR middle-end/40981
16         * graphite-ppl.c (ppl_max_for_le): Correct the use of
17         ppl_Pointset_Powerset_C_Polyhedron_maximize.
18
19 2009-08-13  Sebastian Pop  <sebastian.pop@amd.com>
20
21         * graphite-poly.c (print_pbb): Print PBB index.
22
23 2009-08-13  Sebastian Pop  <sebastian.pop@amd.com>
24
25         * Merge from mainline (r150672:150764).
26
27 2009-08-13  Sebastian Pop  <sebastian.pop@amd.com>
28
29         * graphite-interchange.c (ppl_max_for_le): Moved...
30         * graphite-poly.c (pbb_number_of_iterations): Call ppl_max_for_le.
31         * graphite-ppl.c (ppl_max_for_le): ... here.
32         * graphite-ppl.h (ppl_max_for_le): Declared.
33
34 2009-08-12  Sebastian Pop  <sebastian.pop@amd.com>
35
36         * Merge from mainline (r150372:150672).
37
38 2009-08-11  Sebastian Pop  <sebastian.pop@amd.com>
39
40         PR middle-end/40980
41         * sese.c (convert_for_phi_arg): New.
42         (add_guard_exit_phis): Use convert_for_phi_arg.
43
44         * testsuite/gfortran.dg/graphite/id-17.f: New.
45
46 2009-08-11  Sebastian Pop  <sebastian.pop@amd.com>
47
48         * graphite-sese-to-poly.c (pdr_add_data_dimensions): Dont add
49         unknown subscript upper bounds.
50
51         * testsuite/gcc.dg/graphite/interchange-6.c: Un-XFAIL.
52
53 2009-08-11  Sebastian Pop  <sebastian.pop@amd.com>
54             Pranav Garg  <pranav.garg2107@gmail.com>
55
56         * graphite-interchange.c (gather_access_strides): Removed.
57         (ppl_max_for_le): New.
58         (build_linearized_memory_access): New.
59         (memory_stride_in_loop): New.
60         (pbb_interchange_profitable_p): Reimplemented.
61         * graphite-ppl.h (ppl_new_id_map): New.
62         (ppl_interchange): New.
63
64         * testsuite/gcc.dg/graphite/interchange-6.c: XFAILed.
65
66 2009-08-11  Sebastian Pop  <sebastian.pop@amd.com>
67
68         * graphite-interchange.c (compute_subscript): Removed.
69         (compute_array_size_cstr): Removed.
70         (compute_array_size_poly): Removed.
71         (compute_array_size): Removed.
72         (gather_access_strides_poly): Removed.
73         (gather_access_strides): Empty.
74
75 2009-08-11  Sebastian Pop  <sebastian.pop@amd.com>
76
77         * graphite-dependences.c (dependence_polyhedron_1): Replace
78         pdr_nb_subscripts with PDR_NB_SUBSCRIPTS.
79         (graphite_legal_transform_dr): Same.
80         (graphite_carried_dependence_level_k): Same.
81         * graphite-poly.c (new_poly_dr): Add a parameter nb_subscripts.
82         Initialize PDR_NB_SUBSCRIPTS.
83         (print_pdr_access_layout): Replace pdr_nb_subscripts with
84         PDR_NB_SUBSCRIPTS.
85         * graphite-poly.h (struct poly_dr): Add nb_subscripts field.
86         (PDR_NB_SUBSCRIPTS): New.
87         (pdr_nb_subscripts): Removed.
88         (pdr_dim): Simplified.
89         * graphite-sese-to-poly.c (build_poly_dr): Replace pdr_nb_subscripts
90         with PDR_NB_SUBSCRIPTS.
91
92 2009-08-11  Sebastian Pop  <sebastian.pop@amd.com>
93
94         * graphite-interchange.c (compute_array_size): Remove use of
95         PDR_DATA_CONTAINER.
96         * graphite-poly.c (new_poly_dr): Remove argument data_container.
97         Do not initialize PDR_DATA_CONTAINER.
98         (print_pdr): Do not print PDR_DATA_CONTAINER.
99         * graphite-poly.h (struct poly_dr): Remove data_container field.
100         (PDR_DATA_CONTAINER): Removed.
101         * graphite-sese-to-poly.c (pdr_add_data_dimensions): Remove use of
102         PDR_DATA_CONTAINER.
103         (build_poly_dr): Same.
104
105 2009-08-11  Sebastian Pop  <sebastian.pop@amd.com>
106
107         * testsuite/gcc.dg/graphite/interchange-9.c: New.
108
109 2009-08-05  Konrad Trifunovic  <konrad.trifunovic@gmail.com>
110             Sebastian Pop  <sebastian.pop@amd.com>
111
112         * graphite-dependences.c (graphite_legal_transform_dr): Work on a
113         copy of the dependence polyhedron.  Free the temporary objects.
114         (graphite_carried_dependence_level_k): Free unused objects before
115         returning.
116
117         * testsuite/gcc.dg/graphite/interchange-1.c: XFAILed.
118         * testsuite/gcc.dg/graphite/interchange-2.c: XFAILed.
119         * testsuite/gcc.dg/graphite/interchange-3.c: XFAILed.
120         * testsuite/gcc.dg/graphite/interchange-4.c: XFAILed.
121         * testsuite/gcc.dg/graphite/interchange-7.c: XFAILed.
122
123 2009-08-05  Sebastian Pop  <sebastian.pop@amd.com>
124
125         * graphite-blocking.c (scop_do_strip_mine): Call store_scattering.
126         Early return without analyzing the data dependences if no
127         transform has been done.  Call restore_scattering if the transform
128         is not legal.
129         (graphite-interchange.c): Same.
130         * graphite-poly.c (print_scattering_function): Test for PBB_TRANSFORMED.
131         (graphite_read_transforms): Initialize PBB_TRANSFORMED.
132         (apply_poly_transforms): Do not gcc_assert that
133         the transform is legal.
134         (new_poly_bb): Initialize PBB_TRANSFORMED, PBB_SAVED, and PBB_ORIGINAL.
135         Do not initialize PBB_NB_SCATTERING_TRANSFORM, PBB_NB_LOCAL_VARIABLES,
136         PBB_TRANSFORMED_SCATTERING, and PBB_ORIGINAL_SCATTERING.
137         (free_poly_dr): Free PBB_TRANSFORMED, PBB_SAVED, and PBB_ORIGINAL.
138         * graphite-poly.h (struct poly_scattering): New.
139         (struct poly_bb): Add original, transformed, and saved fields.
140         Remove transformed_scattering, original_scattering, nb_local_variables,
141         and nb_scattering_transform fields.
142         (PBB_ORIGINAL, PBB_TRANSFORMED, PBB_SAVED): New.
143         (poly_scattering_new): New.
144         (poly_scattering_free): New.
145         (poly_scattering_copy): New.
146         (store_scattering_pbb): New.
147         (store_scattering): New.
148         (restore_scattering_pbb): New.
149         (restore_scattering): New.
150         * graphite-sese-to-poly.c (build_pbb_scattering_polyhedrons):
151         Initialize PBB_TRANSFORMED and PBB_ORIGINAL.
152
153 2009-08-05  Sebastian Pop  <sebastian.pop@amd.com>
154
155         * graphite-poly.c (print_pbb): Add parentheses in the pretty print.
156         (print_scop): Same.
157
158 2009-08-05  Sebastian Pop  <sebastian.pop@amd.com>
159
160         * Makefile.in (graphite.o): Depends on PREDICT_H.
161         * graphite.c: Include predict.h.
162         (graphite_finalize): Call tree_estimate_probability.
163         * predict.c (predict_loops): Do not call scev_initialize and
164         scev_finalize.
165         (tree_estimate_probability_bb): New.
166         (tree_estimate_probability): Do not initialize loops: move that
167         code to the driver.  Call tree_estimate_probability_bb.
168         (tree_estimate_probability_driver): New.
169         (pass_profile): Use tree_estimate_probability_driver.
170         * predict.h (tree_estimate_probability): Declared.
171
172 2009-08-05  Sebastian Pop  <sebastian.pop@amd.com>
173
174         * graphite-clast-to-gimple.c (gloog): Add time to TV_GRAPHITE_CODE_GEN.
175         * graphite-dependences.c (graphite_legal_transform): Add time to
176         TV_GRAPHITE_DATA_DEPS.
177         (dependency_between_pbbs_p): Same.
178         * timevar.def (TV_GRAPHITE_DATA_DEPS, TV_GRAPHITE_CODE_GEN): New.
179
180 2009-08-03  Sebastian Pop  <sebastian.pop@amd.com>
181
182         * Merge from mainline (r149952:150372).
183
184 2009-07-28  Sebastian Pop  <sebastian.pop@amd.com>
185
186         * ChangeLog.graphite: Fix indenting, white spaces and 80 columns.
187         * graphite-blocking.c: Same.
188         * graphite-clast-to-gimple.c: Same.
189         * graphite-dependences.c: Same.
190         * graphite-poly.c: Same.
191         * graphite-poly.h: Same.
192         * graphite-ppl.c: Same.
193         * graphite-scop-detection.c: Same.
194         * graphite-sese-to-poly.c: Same.
195         * graphite.c: Same.
196
197 2009-07-28  Sebastian Pop  <sebastian.pop@amd.com>
198
199         * graphite-sese-to-poly.c (loop_entry_phi_arg): New.
200         (remove_simple_copy_phi): New.
201         (remove_invariant_phi): New.
202         (simple_copy_phi_p): New.
203         (reduction_phi_p): New.
204         (gsi_for_ssa_name_def): New.
205         (insert_out_of_ssa_copy): New.
206         (insert_out_of_ssa_copy_on_edge): New.
207         (create_zero_dim_array): New.
208         (scalar_close_phi_node_p): New.
209         (rewrite_close_phi_out_of_ssa): New.
210         (rewrite_phi_out_of_ssa): New.
211         (rewrite_reductions_out_of_ssa): New.
212         (build_poly_scop): Call rewrite_reductions_out_of_ssa.
213
214         * testsuite/gcc.dg/graphite/id-11.c: New.
215         * testsuite/gcc.dg/graphite/id-15.c: New.
216         * testsuite/gcc.dg/graphite/interchange-1.c: Un-XFAIL.
217         * testsuite/gcc.dg/graphite/interchange-2.c: Un-XFAIL.
218         * testsuite/gcc.dg/graphite/interchange-3.c: Un-XFAIL.
219         * testsuite/gcc.dg/graphite/interchange-4.c: Un-XFAIL.
220         * testsuite/gcc.dg/graphite/interchange-7.c: Un-XFAIL.
221         * testsuite/gcc.dg/graphite/scop-matmult.c: Un-XFAIL.
222         * testsuite/gfortran.dg/graphite/id-13.f: New.
223         * testsuite/gfortran.dg/graphite/id-5.f: New.
224
225 2009-07-28  Sebastian Pop  <sebastian.pop@amd.com>
226
227         * graphite-clast-to-gimple.c (graphite_loop_normal_form): Do not
228         check that nb_reductions_in_loop is zero.
229         * graphite-scop-detection.c (harmful_stmt_in_bb): Don't filter out
230         reduction phi nodes.
231         (nb_reductions_in_loop): Removed.
232         (graphite_can_represent_loop): Do not call nb_reductions_in_loop.
233         * graphite-sese-to-poly.c (phi_node_is_iv): Removed.
234         (bb_contains_non_iv_scalar_phi_nodes): Removed.
235         (scop_contains_non_iv_scalar_phi_nodes): Removed.
236         (build_poly_scop): Do not call scop_contains_non_iv_scalar_phi_nodes.
237
238 2009-07-28  Sebastian Pop  <sebastian.pop@amd.com>
239
240         * graphite-clast-to-gimple.c (build_cloog_prog): Do not code generate
241         statements that have an empty iteration domain.
242         * testsuite/gfortran.dg/graphite/id-16.f: New.
243
244 2009-07-28  Sebastian Pop  <sebastian.pop@amd.com>
245
246         * tree-scalar-evolution.c (instantiate_scev_1): Return
247         chrec_dont_know when the result is not above instantiate_below.
248         * graphite-scop-detection.c (scopdet_basic_block_info): Fix formatting.
249         * graphite-sese-to-poly.c (create_linear_expr_from_tree): Assert that
250         the tree has a known scalar evolution.
251         * testsuite/gfortran.dg/graphite/id-14.f: New.
252         * testsuite/gfortran.dg/graphite/id-15.f: New.
253
254 2009-07-28  Sebastian Pop  <sebastian.pop@amd.com>
255
256         * sese.c (rename_variables_in_stmt): Pass in an extra parameter
257         insert_gsi.
258         (rename_variables): Keep inserting renames after the ones already
259         inserted.
260
261 2009-07-28  Sebastian Pop  <sebastian.pop@amd.com>
262
263         * graphite-sese-to-poly.c (compare_bb_depths): New.
264         (graphite_sort_dominated_info): New.
265         (build_scop_bbs_1): Call graphite_sort_dominated_info.
266         (build_scop_scattering): Fix comment.
267
268 2009-07-28  Sebastian Pop  <sebastian.pop@amd.com>
269
270         * graphite.c (graphite_finalize): Call print_loops instead of
271         dump_function_to_file.
272         * testsuite/gcc.dg/graphite/graphite.exp: Fix formatting.
273         * testsuite/gcc.dg/graphite/pr35356-1.c: New.  Look for the number of
274         loops generated in the graphite output file.
275         * testsuite/gcc.dg/graphite/pr35356-2.c: New.
276         * testsuite/gcc.dg/graphite/pr35356-3.c: New.  XFAILed for now.
277         * testsuite/gfortran.dg/graphite/id-12.f: New.
278
279 2009-07-24  Li Feng  <nemokingdom@gmail.com>
280
281         * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-8.c:
282         Remove 2 XFAIL.
283
284 2009-07-24  Li Feng  <nemokingdom@gmail.com>
285             Tobias Grosser  <grosser@fim.uni-passau.de>
286
287         * graphite-sese-to-poly.c (pdr_add_alias_set): Use data reference's
288         alias set number build alias in ACCESSES polyhedron.
289         (build_alias_set_for_drs): New.
290         (build_pbb_drs): Added build_alias_set_for_drs.
291         * graphite-dependences.c (poly_drs_may_alias_p): New.
292         (graphite_carried_dependence_level_k): Check alias information
293         before building polyhedron.
294
295 2009-07-24  Tobias Grosser  <grosser@fim.uni-passau.de>
296
297         * Makefile.in (lambda-code.o): Fix formatting.
298
299 2009-07-24  Tobias Grosser  <grosser@fim.uni-passau.de>
300
301         * Merge from mainline (r149350-149952)
302
303 2009-07-18  Tobias Grosser  <grosser@fim.uni-passau.de>
304
305         * graphite-poly.c (apply_poly_transforms): Move strip_mine
306         before interchange to prepare for loop blocking.
307
308 2009-07-18  Tobias Grosser  <grosser@fim.uni-passau.de>
309
310         * graphite-poly.c (apply_poly_transforms): Add checks after every
311         transformation.
312         * graphite-sese-to-poly.c (build_poly_scop): Remove check, as already
313         done in apply_poly_transforms.
314
315 2009-07-17  Konrad Trifunovic  <konrad.trifunovic@gmail.com>
316
317         * graphite-dependences.c (build_lexicographically_gt_constraint):
318         Replace RES parameter with *RES.
319         (dependence_polyhedron_1): Pass an address of the parameter RES
320         instead of value of RES.
321
322 2009-07-16  Sebastian Pop  <sebastian.pop@amd.com>
323
324         * graphite.c (graphite_finalize): Fix comment.
325         (graphite_transform_loops): Reset scev info after code generation
326         of each scop.
327
328 2009-07-16  Sebastian Pop  <sebastian.pop@amd.com>
329
330         * graphite.c (graphite_finalize): Call scev_reset.
331
332 2009-07-16  Sebastian Pop  <sebastian.pop@amd.com>
333
334         * graphite-clast-to-gimple.c (compute_cloog_iv_types): Do not create
335         GBB_CLOOG_IV_TYPES hash table twice.
336         * graphite-sese-to-poly.c (free_gimple_bb): Call free_data_refs.
337         (add_condition_to_domain): Clear GMP values.
338
339 2009-07-16  Sebastian Pop  <sebastian.pop@amd.com>
340
341         * graphite-dependences.c: Fix formatting.
342         * graphite-poly.c (free_poly_dr): Also free PDR_DATA_CONTAINER.
343         (pbb_number_of_iterations): Free ppl_Linear_Expression.
344         * graphite-sese-to-poly.c: Fix formatting.
345         * graphite.c (graphite_transform_loops): Create the hash table
346         after the early return.
347
348 2009-07-16  Sebastian Pop  <sebastian.pop@amd.com>
349
350         * testsuite/gcc.dg/graphite/id-14.c: New.
351         * testsuite/gcc.dg/graphite/pr40157.c: New.
352         * testsuite/gfortran.dg/graphite/id-11.f: New.
353
354 2009-07-16  Sebastian Pop  <sebastian.pop@amd.com>
355
356         * graphite-sese-to-poly.c (nb_pbbs_in_loops): New.
357         (build_poly_scop): Return false when there are no pbbs within
358         loops to avoid to pass to cloog scops with no loops.
359
360 2009-07-16  Sebastian Pop  <sebastian.pop@amd.com>
361
362         * graphite-sese-to-poly.c (build_pbb_scattering_polyhedrons): Avoid
363         useless test "i % 2".
364         (build_pbb_scattering_polyhedrons): Fix formatting.
365         (build_poly_dr): Same.
366         * graphite.c (graphite_transform_loops): Restructure.
367
368 2009-07-14  Razya Ladelsky  <razya@il.ibm.com>
369
370         * tree-ssa-loop-manip.c (rewrite_phi_with_iv): Remove
371         reduction_list parameter.
372         (rewrite_all_phi_nodes_with_iv): Same.
373         (canonicalize_loop_ivs): Same.
374         * tree-parloops.c (struct brli): Removed.
375         (build_reduction_list_info): Removed.
376         (build_new_reduction): New.
377         (analyze_reduction_list): Removed.
378         (gather_scalar_reductions): Find reductions instead of phi
379         nodes that can't be canonicalized.
380         (try_create_reduction_list): Remove reduction_list parameter.
381         (gen_parallel_loop): Same.
382         (parallelize_loops): Remove analyze_reductions variable,
383         initialization and free.
384         Change reduction_list htab initialization to reduction_info
385         elements instead of ssa names.
386         Call try_create_reduction_list and gen_parallel_loop without
387         analyzed_reduction argument.
388         * graphite-clast-to-gimple (graphite_loop_normal_form): Call
389         canonicalize_loop_ivs with one less argument.
390         * tree-flow.h (canonicalize_loop_ivs): Remove one argument.
391
392 2009-07-14  Konrad Trifunovic <konrad.trifunovic@gmail.com>
393
394         * graphite-dependences.c (new_poly_dr_pair): New.
395         (dependence_polyhedron): Renamed into dependence_polyhedron_1.
396         (new_poly_dr_pair): New.
397         (eq_poly_dr_pair_p): New.
398         (hash_poly_dr_pair_p): New.
399         * graphite-dependences.h (struct poly_dr_pair): New.
400         (eq_poly_dr_pair_p): Declared.
401         (hash_poly_dr_pair_p): Declared.
402         * graphite-poly.c (new_scop): Initialize SCOP_ORIGINAL_PDR_PAIRS.
403         (free_scop): Free SCOP_ORIGINAL_PDR_PAIRS.
404         * graphite-poly.h (struct scop): Add original_pdr_pairs field.
405         * Makefile.in (graphite-poly.o): Add dependence on
406         graphite-dependences.h.
407
408 2009-07-14  Sebastian Pop  <sebastian.pop@amd.com>
409
410         * graphite-scop-detection.c (graphite_can_represent_scev): Do not let
411         polynomials of degree > 1 pass to Graphite.
412         * tree-chrec.c (scev_is_linear_expression): Call
413         evolution_function_is_affine_multivariate_p.
414         * testsuite/gfortran.dg/graphite/id-10.f90: New.
415
416 2009-07-14  Sebastian Pop  <sebastian.pop@amd.com>
417
418         * tree-scalar-evolution.c (compute_overall_effect_of_inner_loop):
419         Instantiate scevs varying in outer loops.
420         * testsuite/gfortran.dg/graphite/id-9.f: Correct testcase.
421
422 2009-07-14  Sebastian Pop  <sebastian.pop@amd.com>
423
424         * graphite-sese-to-poly.c (build_loop_iteration_domains): Do not insert
425         redundant constraint.
426
427 2009-07-14  Sebastian Pop  <sebastian.pop@amd.com>
428
429         * testsuite/gcc.dg/graphite/graphite.exp: Fix comments.
430         * testsuite/gfortran.dg/graphite/graphite.exp: Trigger actions
431         based on the file names as in the C testsuite.
432         * testsuite/gfortran.dg/graphite/block-1.f90: Fix patterns.
433         * testsuite/gfortran.dg/graphite/block-2.f: Same.
434         * testsuite/gfortran.dg/graphite/block-3.f90: Same.
435         * testsuite/gfortran.dg/graphite/block-4.f90: Same.
436         * testsuite/gfortran.dg/graphite/id-1.f90: Same.
437         * testsuite/gfortran.dg/graphite/id-2.f90: Same.
438         * testsuite/gfortran.dg/graphite/id-3.f90: Same.
439         * testsuite/gfortran.dg/graphite/id-4.f90: Same.
440         * testsuite/gfortran.dg/graphite/id-6.f: Same.
441         * testsuite/gfortran.dg/graphite/id-9.f: Same.
442         * testsuite/gfortran.dg/graphite/interchange-1.f: Same.
443         * testsuite/gfortran.dg/graphite/interchange-2.f: Same.
444         * testsuite/gfortran.dg/graphite/scop-1.f: Same.
445
446 2009-07-14  Sebastian Pop  <sebastian.pop@amd.com>
447
448         * sese.c (expand_scalar_variables_call): New.
449         (expand_scalar_variables_ssa_name): Handle calls in expander.
450
451 2009-07-13  Sebastian Pop  <sebastian.pop@amd.com>
452
453         * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-6.c:
454         Expect to see the pattern twice.
455         * testsuite/gcc.dg/graphite/interchange-0.c: Un-XFAIL.
456         * testsuite/gcc.dg/graphite/interchange-5.c: Same.
457         * testsuite/gcc.dg/graphite/interchange-6.c: Same.
458
459 2009-07-13  Sebastian Pop  <sebastian.pop@amd.com>
460
461         * testsuite/gcc.dg/graphite/id-10.c: New.
462         * testsuite/gcc.dg/graphite/id-12.c: New.
463         * testsuite/gfortran.dg/graphite/id-7.f: New.
464         * testsuite/gfortran.dg/graphite/id-8.f: New.
465
466 2009-07-13  Sebastian Pop  <sebastian.pop@amd.com>
467
468         * graphite-sese-to-poly.c (pdr_add_data_dimensions): Fix division by
469         zero.
470
471 2009-07-13  Sebastian Pop  <sebastian.pop@amd.com>
472
473         * sese.c (rename_variables_in_stmt): Call fold_convert during renaming.
474
475 2009-07-13  Sebastian Pop  <sebastian.pop@amd.com>
476
477         * sese.c (expand_scalar_variables_stmt): Avoid unnecessary expansion.
478
479 2009-07-10  Sebastian Pop  <sebastian.pop@amd.com>
480
481         * graphite-sese-to-poly.c (pdr_add_memory_accesses): Fix order of
482         building PDR subscripts.
483
484 2009-07-10  Sebastian Pop  <sebastian.pop@amd.com>
485
486         * graphite-sese-to-poly.c (pdr_add_data_dimensions): Fix the
487         computation of array sizes.
488
489 2009-07-10  Sebastian Pop  <sebastian.pop@amd.com>
490
491         * graphite-sese-to-poly.c (add_param_constraints): Disabled.
492
493 2009-07-10  Tobias Grosser  <grosser@fim.uni-passau.de>
494
495         * graphite-dependences.c (map_into_dep_poly, map_dr_into_dep_poly,
496         build_pairwise_constraint, dr_equality_constraints,
497         build_pairwise_scheduling_equality,
498         build_pairwise_scheduling_inequality, lexicographically_gt_p,
499         build_lexicographically_gt_constraint, dependence_polyhedron,
500         graphite_legal_transform_dr, graphite_carried_dependence_level_k):
501         Move from NNC_Polyhedron to C_Polyhedron.
502         * graphite-interchange.c (compute_array_size_poly,
503         gather_access_strides): Dito.
504         * graphite-poly.c (apply_poly_transforms, new_poly_dr, free_poly_bb,
505         free_scop, pbb_number_of_iterations): Dito.
506         * graphite-poly.h (struct poly_dr, pdr_nb_subscripts, struct poly_bb,
507         pbb_dim_iter_domain, struct scop): Dito.
508         * graphite-ppl.c (new_Constraint_System_from_Cloog_Matrix,
509         new_Cloog_Domain_from_ppl_Polyhedron,
510         new_Cloog_Domain_from_ppl_Pointset_Powerset, ppl_set_coef_gmp,
511         ppl_insert_dimensions_pointset, ppl_insert_dimensions_pointset,
512         ppl_strip_loop, ppl_strip_loop, ppl_print_polyhedron_matrix,
513         ppl_print_powerset_matrix, debug_ppl_polyhedron_matrix,
514         debug_ppl_powerset_matrix, ppl_read_polyhedron_matrix): Dito.
515         * graphite-ppl.h (ppl_Pointset_Powerset_C_Polyhedron_t,
516         new_C_Polyhedron_from_Cloog_Matrix, ppl_print_powerset_matrix,
517         debug_ppl_powerset_matrix, ppl_insert_dimensions_pointset): Dito.
518         * graphite-sese-to-poly.c (build_pbb_scattering_polyhedrons,
519         build_loop_iteration_domains, ppl_constraint_type_from_tree_code,
520         add_condition_to_domain, add_condition_to_pbb, build_scop_context,
521         build_scop_iteration_domain, build_poly_dr): Dito
522
523 2009-07-09  Sebastian Pop  <sebastian.pop@amd.com>
524
525         * testsuite/gcc.dg/graphite/graphite.exp: Added a rule to execute
526         run-id-*.c files.
527         * testsuite/gcc.dg/graphite/run-id-1.c: New.
528
529 2009-07-09  Sebastian Pop  <sebastian.pop@amd.com>
530
531         * graphite-sese-to-poly.c (build_loop_iteration_domains): Add the
532         positivity constraint on the symbolic number of iterations.
533
534 2009-07-09  Sebastian Pop  <sebastian.pop@amd.com>
535
536         * graphite-sese-to-poly.c (build_loop_iteration_domains): Rewrite.
537
538 2009-07-09  Sebastian Pop  <sebastian.pop@amd.com>
539             Tobias Grosser  <grosser@fim.uni-passau.de>
540
541         * graphite-clast-to-gimple.c (build_scop_context): Removed.
542         (build_cloog_prog): Directly use SCOP_CONTEXT.
543         * graphite-poly.c (new_scop): Initialize SCOP_CONTEXT.
544         (free_scop): Free SCOP_CONTEXT.
545         (print_scop_context): New.
546         (print_scop): Call print_scop_context.
547         (debug_scop_context): New.
548         * graphite-poly.h (print_scop_context, debug_scop_context): Declared.
549         (struct scop): Added field context.
550         (SCOP_CONTEXT): New.
551         * graphite-sese-to-poly.c (add_param_constraints): New.
552         (build_scop_context): New.
553         (build_poly_scop): Call build_scop_context.
554
555 2009-07-09  Sebastian Pop  <sebastian.pop@amd.com>
556
557         * graphite-clast-to-gimple.c (gmp_cst_to_tree): Moved...
558         * graphite-ppl.c (ppl_set_inhomogeneous_gmp, ppl_set_coef_gmp): New.
559         (ppl_set_inhomogeneous, ppl_set_coef): Moved...
560         * graphite-ppl.h: Include double-int.h and tree.h.
561         (ppl_set_inhomogeneous_gmp, ppl_set_coef_gmp): Declared.
562         (ppl_set_inhomogeneous, ppl_set_coef): ...here.
563         (gmp_cst_to_tree): ...here.  Reimplemented using mpz_get_double_int.
564         (tree_int_to_gmp, ppl_set_inhomogeneous_tree, ppl_set_coef_tree): New.
565
566 2009-07-09  Sebastian Pop  <sebastian.pop@amd.com>
567
568         * graphite-clast-to-gimple.c (clast_to_gcc_expression_red): Generate
569         POINTER_PLUS_EXPR for pointer types.
570         (clast_to_gcc_expression): Same.
571
572 2009-07-09  Sebastian Pop  <sebastian.pop@amd.com>
573
574         * graphite-poly.c (print_scattering_function): Early return when
575         PBB_TRANSFORMED_SCATTERING is not initialized.
576         (print_pbb_domain): Early return when PBB_DOMAIN is not initialized.
577
578 2009-07-08  Sebastian Pop  <sebastian.pop@amd.com>
579
580         * tree-parloops.c (analyze_reduction_list): Remove unused variable
581         to fix bootstrap.
582
583 2009-07-08  Razya Ladelsky  <razya@il.ibm.com>
584
585         * tree-parloops.c (analyze_reduction_list): Change return
586         value to void.
587         (try_create_reduction_list): Move the call to
588         analyze_reduction_list to the beginining.
589         Call reduction_phi with analyzed_reductions as argument
590         instead of reduction_list.
591
592 2009-07-08  Tobias Grosser  <grosser@fim.uni-passau.de>
593
594         *  Merge from mainline (r148296:149346)
595
596 2009-07-07  Sebastian Pop  <sebastian.pop@amd.com>
597
598         * graphite-scop-detection.c (graphite_can_represent_init): New.
599         (graphite_can_represent_scev): Call graphite_can_represent_init:
600         check that the initial value does not contain multiplications of
601         parameters.
602         (stmt_has_simple_data_refs_p): New.
603         (stmt_simple_for_scop_p): Call stmt_simple_for_scop_p.
604         (is_simple_operand): Fix formatting.
605         * graphite-sese-to-poly.c (try_generate_gimple_bb): Fix formatting.
606
607 2009-07-07  Sebastian Pop  <sebastian.pop@amd.com>
608
609         * testsuite/gcc.dg/graphite/id-13.c: New.
610         * graphite-sese-to-poly.c (graphite_stmt_p): Do not call
611         analyze_scalar_evolution, use scalar_evolution_in_region.
612         (scan_tree_for_params_right_scev): Add extra assert.
613         (parameter_index_in_region_1): Split from parameter_index_in_region.
614         (idx_record_params): Use scalar_evolution_in_region.
615         (find_params_in_bb): Same.
616         (find_scop_parameters): Same.
617         (build_loop_iteration_domains): Same.
618         (create_linear_expr_from_tree): Same.
619         * sese.c (scalar_evolution_in_region): New.
620         * sese.h (scalar_evolution_in_region): Declared.
621         (defined_in_sese_p): New.
622         * tree-scalar-evolution.c (compute_overall_effect_of_inner_loop): Not
623         static anymore.
624         * tree-scalar-evolution.h (compute_overall_effect_of_inner_loop):
625         Declared.
626
627 2009-07-07  Sebastian Pop  <sebastian.pop@amd.com>
628
629         * Makefile.in: Replace dependences on tree-chrec.h with SCEV_H.
630         TREE_DATA_REF_H also implies SCEV_H.
631
632 2009-07-07  Sebastian Pop  <sebastian.pop@amd.com>
633
634         * graphite-poly.c (print_scop_params): New.
635         (print_scop): Call print_scop_params.
636         (debug_scop_params): New.
637         * graphite-poly.h (print_scop_params, debug_scop_params): Declared.
638
639 2009-07-07  Li Feng  <nemokingdom@gmail.com>
640
641         * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-4.c: New.
642         * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-5.c: New.
643         * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-6.c: New.
644         * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-7.c: New.
645         * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-8.c: New.
646         * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-9.c: New.
647
648 2009-07-07  Li Feng  <nemokingdom@gmail.com>
649
650         * graphite-clast-to-gimple.c (mark_loops_parallel): Dump information
651         for dependency checking part.
652         * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-1.c: Add
653         tests for dependency checking.
654         * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-2.c: Ditto.
655         * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-3.c: Ditto.
656         * testsuite/gcc.dg/graphite/graphite_autopar/graphite_autopar.exp: Add
657         flag -fdump-tree-graphite-all for autopar testsuites.
658
659 2009-07-06  Sebastian Pop  <sebastian.pop@amd.com>
660
661         * Makefile.in (tree-ssa-loop-manip.o): Depends on langhooks.h.
662         * tree-parloops.c (rewrite_phi_with_iv, rewrite_all_phi_nodes_with_iv,
663         canonicalize_loop_ivs): Moved...
664         * tree-ssa-loop-manip.c: ... here.  Include langhooks.h.
665
666 2009-07-06  Sebastian Pop  <sebastian.pop@amd.com>
667
668         * tree-parloops.c (try_create_reduction_list): Pass an extra
669         argument analyzed_reductions.  Call analyze_reduction_list.
670         (gen_parallel_loop): Do not call analyze_reduction_list.
671         (parallelize_loops): Init and finalize analyzed_reductions.
672
673 2009-07-06  Li Feng  <nemokingdom@gmail.com>
674
675         * testsuite/gcc.dg/graphite/graphite_autopar/graphite_autopar.exp:
676         Added flag -fno-loop-strip-mine for autopar testcase.
677
678 2009-07-04  Li Feng  <nemokingdom@gmail.com>
679
680         * graphite-dependences.c (graphite_carried_dependence_level_k): Use
681         transformed scattering dimension instead of unmatch orignal when
682         calling dependence_polyhedron.
683
684 2009-06-30  Sebastian Pop  <sebastian.pop@amd.com>
685
686         * opts.c (decode_options): Enable flag_loop_strip_mine at -O2.
687
688 2009-06-30  Sebastian Pop  <sebastian.pop@amd.com>
689
690         * graphite-poly.c (pbb_number_of_iterations): Check for returned
691         value 1 from ppl_Pointset_Powerset_NNC_Polyhedron_maximize.
692
693 2009-06-30  Sebastian Pop  <sebastian.pop@amd.com>
694
695         * graphite-blocking.c (pbb_strip_mine_profitable_p): New.
696         (pbb_do_strip_mine): Call pbb_strip_mine_profitable_p.
697         * graphite-poly.c (pbb_number_of_iterations): New.
698         * graphite-poly.h (pbb_number_of_iterations): Declared.
699         (pbb_iterator_dim, pbb_parameter_dim): New.
700
701 2009-06-29  Sebastian Pop  <sebastian.pop@amd.com>
702
703         * graphite-clast-to-gimple.c (graphite_create_new_loop): Revert the
704         last commit on type of lower and upper bound of loops.
705
706 2009-06-29  Li Feng  <nemokingdom@gmail.com>
707
708         * Makefile.in (graphite-clast-to-gimple.o): Added dependence on
709         graphite-dependences.h.
710         * graphite-clast-to-gimple.c (new_bb_pbb_def): New.
711         (mark_bb_with_pbb): New.
712         (get_stmtfor_depth): New.
713         (find_pbb_via_hash): New.
714         (dependency_in_loop_p): New.
715         (mark_loops_parallel): New.
716         (free_aux_in_new_loops): New.
717         (translate_clast): Add parameter BB_PBB_MAPPING.  Mark newly created
718         bb with it's relevant pbb. Mark newly created loops.  Remove mark
719         innermost loop parallel without checking.
720         (gloog): Add parameter BB_PBB_MAPPING.
721         * graphite-clast-to-gimple.h (struct bb_pbb_def): New.
722         (gloog): Change declaration.
723         (mark_loop_parallel): Make extern.
724         (free_aux_in_new_loops): Declare.
725         (bb_pbb_map_hash): New.
726         (eq_bb_pbb_map): New.
727         * graphite.c (graphite_transform_loops): Added BB_PBB_MAPPING. Trigger
728         auto parallelization when flag_graphite_force_parallel is set.
729         (graphite_finalize): Added free_aux_in_new_loops.
730         * tree-parloops.c (parallelize_loops): Only generate parallel code for
731         the innermost loop that marked parallel.  Use
732         flag_graphite_force_parallel instead of loop->can_be_parallel.
733         (loop_parallel_p): Move inner most checking out of function.
734
735 2009-06-26  Sebastian Pop  <sebastian.pop@amd.com>
736
737         * graphite-clast-to-gimple.c (graphite_create_new_loop): Make the
738         type of lower and upper bound of loops signed long int.
739
740 2009-06-26  Sebastian Pop  <sebastian.pop@amd.com>
741
742         * cfgloopmanip.c (create_empty_loop_on_edge): Gimplify the loop exit
743         expression outside the loop.
744
745 2009-06-26  Sebastian Pop  <sebastian.pop@amd.com>
746
747         * gcc.dg/graphite/interchange-8.c: New.
748
749 2009-06-26  Sebastian Pop  <sebastian.pop@amd.com>
750
751         * gcc.dg/graphite/interchange-0.c: XFailed.
752         * gcc.dg/graphite/interchange-5.c: XFailed.
753         * gcc.dg/graphite/interchange-6.c: XFailed.
754
755 2009-06-26  Sebastian Pop  <sebastian.pop@amd.com>
756
757         * graphite-interchange.c (compute_array_size_poly): The end of the
758         recursion should return 1.
759
760 2009-06-26  Sebastian Pop  <sebastian.pop@amd.com>
761
762         * graphite-interchange.c (compute_array_size_cstr): Allow the
763         subscript multiplier to be -1.
764         (compute_array_size): Use PDR_DATA_CONTAINER and not PDR_ACCESSES.
765         * graphite-poly.c (new_poly_dr): Takes an extra argument for the
766         data_container.  Initializes PDR_DATA_CONTAINER.
767         (print_pdr_access_layout): New.
768         (print_pdr): Call print_pdr_access_layout.  Print PDR_DATA_CONTAINER.
769         * graphite-poly.h (struct poly_dr): Adjust comment.  Add a new field
770         data_container.
771         (PDR_DATA_CONTAINER): New.
772         (new_poly_dr): Update declaration.
773         * graphite-sese-to-poly.c (pdr_add_data_dimensions): New.
774         (build_poly_dr): Call pdr_add_data_dimensions.
775
776 2009-06-26  Sebastian Pop  <sebastian.pop@amd.com>
777
778         * graphite-poly.h (struct poly_dr): Fix comment.
779         * graphite-sese-to-poly.c (pdr_add_alias_set): New.
780         (pdr_add_memory_accesses): New.
781         (build_poly_dr): Call pdr_add_memory_accesses and pdr_add_alias_set.
782
783 2009-06-26  Sebastian Pop  <sebastian.pop@amd.com>
784
785         * graphite-poly.c (print_pdrs, debug_pdrs): New.
786         (print_pbb): Add call to print_pdrs.
787         * graphite-poly.h (print_pdrs, debug_pdrs): Declared.
788
789 2009-06-24  Konrad Trifunovic <konrad.trifunovic@gmail.com>
790             Li Feng <nemokingdom@gmail.com>
791
792         * graphite-dependences.c (graphite_carried_dependence_level_k): New.
793         (dependency_between_pbbs_p): New.
794         (lexicographically_gt_p): Assure !empty_p before polyhedron
795         intersection assign.
796         (build_lexicographically_gt_constraint): Correct lexicographically
797         judging.
798         * graphite-dependences.h: New.
799         * Makefile.in (graphite-dependences.o): Add graphite-dependences.h.
800
801 2009-06-24  Sebastian Pop  <sebastian.pop@amd.com>
802
803         * graphite-clast-to-gimple.c (print_clast_stmt): New.
804         (gloog): Print to dump_file the generated clast.
805         * graphite-clast-to-gimple.h (print_clast_stmt): Declared.
806         * graphite-interchange.c (pbb_do_interchange): Fix dump formatting.
807
808 2009-06-24  Sebastian Pop  <sebastian.pop@amd.com>
809
810         * graphite-poly.c (extend_scattering): Increment
811         PBB_NB_LOCAL_VARIABLES by the number of added dimensions.
812
813 2009-06-24  Sebastian Pop  <sebastian.pop@amd.com>
814
815         * graphite-interchange.c (compute_array_size_poly): Added exit of
816         recursion condition.  Continue iterating even after the first equality.
817         (compute_array_size): Same.
818
819 2009-06-24  Li Feng  <nemokingdom@gmail.com>
820
821         * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-1.c: Update
822         -fdump-tree-final_cleanup to -fdump-tree-optimized.
823         * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-2.c: Ditto.
824         * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-3.c: Ditto.
825         * testsuite/gcc.dg/graphite/graphite_autopar/graphite_autopar.exp: Ditto.
826
827 2009-06-23  Sebastian Pop  <sebastian.pop@amd.com>
828
829         * sese.c (expand_scalar_variables_stmt): Expand scalar variables
830         only when the use verifies is_gimple_reg.
831
832 2009-06-23  Sebastian Pop  <sebastian.pop@amd.com>
833
834         * graphite-clast-to-gimple.c (build_cloog_prog): Fix memory corruption.
835         Allocate scaldims after call to unify_scattering_dimensions.
836
837 2009-06-23  Sebastian Pop  <sebastian.pop@amd.com>
838
839         * graphite-clast-to-gimple.c (translate_clast): Fix memory leak.
840
841 2009-06-23  Sebastian Pop  <sebastian.pop@amd.com>
842             Albert Cohen  <albert.cohen@inria.fr>
843
844         * graphite-blocking.c (pbb_strip_mine_loop_depth): Do not use local
845         variables for the strip mining.
846
847 2009-06-23  Sebastian Pop  <sebastian.pop@amd.com>
848             Pranav Garg  <pranav.garg2107@gmail.com>
849
850         * Makefile.in (OBJS-common): Added graphite-blocking.o.
851         (graphite-sese-to-poly.o): Moved down to be in lexicographical order.
852         (graphite-blocking.o): New rule.
853         (graphite-poly.o, graphite-ppl.o): Moved to be in lexicographical order.
854         * graphite-blocking.c: New.
855         * graphite-poly.c (apply_poly_transforms): Call scop_do_strip_mine for
856         flag_loop_strip_mine.
857         (psct_scattering_dim_for_loop_depth): New.
858         * graphite-poly.h (scop_do_strip_mine): Declared.
859         (psct_add_local_variable): Increment PBB_NB_LOCAL_VARIABLES.
860         * tree-ssa-loop.c (gate_graphite_transforms): Do not fail when using
861         flag_loop_strip_mine.
862
863 2009-06-23  Sebastian Pop  <sebastian.pop@amd.com>
864
865         * graphite-poly.c (extend_scattering): Avoid initializing and freeing
866         a GMP value and a PPL coefficient at each iteration of a loop.
867
868 2009-06-23  Sebastian Pop  <sebastian.pop@amd.com>
869
870         * graphite-dependences.c (dependence_polyhedron): Do not use
871         pbb_nb_scattering_dims anymore.  Use pbb_nb_scattering_orig and
872         pbb_nb_scattering_transform.
873         (graphite_legal_transform_dr): Same.
874         * graphite-poly.c (extend_scattering): Same.
875         (unify_scattering_dimensions): Same.
876         (print_scattering_function): Same.
877         (new_poly_bb): Initialize PBB_NB_SCATTERING_TRANSFORM and
878         PBB_NB_LOCAL_VARIABLES.
879         * graphite-poly.h (pbb_nb_scattering): Removed declaration.
880         (struct poly_bb): Added nb_local_variables and nb_scattering_transform.
881         (PBB_NB_LOCAL_VARIABLES, PBB_NB_SCATTERING_TRANSFORM): New.
882         (pbb_nb_scattering_orig, pbb_nb_scattering_transform): New.
883         (pbb_nb_scattering_dims, pbb_nb_scattering): Removed.
884         (pbb_nb_scattering_transform): New.
885         (pbb_nb_local_vars): Return PBB_NB_LOCAL_VARIABLES.
886         (psco_scattering_dim): Add assert on parameters.
887         (psct_scattering_dim): Same.
888         (psct_scattering_dim_for_loop_depth): Declared.
889         (psct_local_var_dim): New.
890         (psco_iterator_dim, psco_parameter_dim): Add assert on parameters.
891         (psct_iterator_dim, psct_parameter_dim): Same.  To maintain the
892         correct layout, call pbb_nb_local_vars.
893         (psct_add_local_variable, psct_add_scattering_dimension): New.
894         * graphite-sese-to-poly.c (build_pbb_scattering_polyhedrons):
895         Initialize PBB_NB_SCATTERING_TRANSFORM.
896
897 2009-06-23  Sebastian Pop  <sebastian.pop@amd.com>
898
899         * graphite-ppl.c (set_inhomogeneous): Renamed ppl_set_inhomogeneous.
900         (set_coef): Renamed ppl_set_coef.
901         * graphite-ppl.h (ppl_set_inhomogeneous, ppl_set_coef): Declared.
902
903 2009-06-23  Sebastian Pop  <sebastian.pop@amd.com>
904
905         * graphite-dependences.c (build_pairwise_scheduling_inequality): Don't
906         test a boolean against 1.
907         * graphite-interchange.c (pbb_interchange_loop_depths): Do not build
908         a new polyhedron for the PBB_TRANSFORMED_SCATTERING.
909         (pbb_do_interchange): Returns true when a transform has been performed.
910         (scop_do_interchange): Same.
911         * graphite-poly.c (apply_poly_transforms): Use the return value of
912         scop_do_interchange.
913         * graphite-poly.h (scop_do_interchange): Update declaration.
914
915 2009-06-23  Tobias Grosser  <grosser@fim.uni-passau.de>
916
917         * graphite-clast-to-gimple.c (gloog): Reset loop->aux right
918         after last use.
919         * sese.c (sese_reset_aux_in_loops): New.
920         * sese.h (sese_reset_aux_in_loops): New.
921
922 2009-06-19  Sebastian Pop  <sebastian.pop@amd.com>
923
924         * graphite-sese-to-poly.c (scan_tree_for_params_int): Pass in the
925         multiplier and multiply the constant by the multiplier.
926         (scan_tree_for_params): Bound the multiplier to its MULT_EXPR.
927         (build_poly_dr): Do not use the multiplier to define the subscript.
928
929 2009-06-19  Sebastian Pop  <sebastian.pop@amd.com>
930
931         * graphite-poly.c (new_poly_dr): Pass an extra argument for the
932         compiler's data reference.  Initialize PDR_CDR.
933         (print_pdr): Call dump_data_reference.
934         * graphite-poly.h (struct poly_dr): Rename black_box into pbb.
935         Add compiler_dr field.
936         (PDR_BB): Renamed PDR_PBB.
937         (PDR_CDR): New.
938         * graphite-sese-to-poly.c (build_poly_dr): Pass to new_poly_dr
939         GCC's data reference representation.
940         * tree-data-ref.c (debug_data_references, debug_data_reference): New.
941         * tree-data-ref.h (debug_data_references, debug_data_reference): Decl.
942
943 2009-06-19  Sebastian Pop  <sebastian.pop@amd.com>
944
945         * graphite-poly.c (print_scattering_function): Also print the layout.
946         * graphite-poly.h (pbb_nb_local_vars): New.
947
948 2009-06-19  Sebastian Pop  <sebastian.pop@amd.com>
949
950         * graphite-poly.c (print_pbb_domain): Also print the layout names.
951
952 2009-06-19  Sebastian Pop  <sebastian.pop@amd.com>
953
954         * graphite-poly.c (print_pdr, debug_pdr): New.
955         * graphite-poly.h (print_pdr, debug_pdr): Declared.
956         (PDR_BASE): Removed.
957
958 2009-06-18  Sebastian Pop  <sebastian.pop@amd.com>
959
960         * gcc/testsuite/gcc.dg/graphite/interchange-{1..7}.c: New avatars of
961         ltrans-{1..6,8}.c.
962
963 2009-06-18  Sebastian Pop  <sebastian.pop@amd.com>
964
965         * graphite-interchange.c (compute_subscript): Allow also -1 in the
966         subscript identification column.
967         (pbb_do_interchange): Print to dump_file that some loops "will be
968         interchanged".  Rely on that chain of characters in the testcases.
969         * gcc.dg/graphite/interchange-0.c: New.
970         * gcc.dg/graphite/graphite.exp: Iterate over the testsuite
971         interchange-*.c files and compile them with -floop-interchange.
972
973 2009-06-18  Pranav Garg  <pranav.garg2107@gmail.com>
974
975         * graphite-interchange.c (interchange_profitable_p): Renamed
976         pbb_interchange_profitable_p.
977
978 2009-06-18  Sebastian Pop  <sebastian.pop@amd.com>
979             Harsha Jagasia  <harsha.jagasia@amd.com>
980             Pranav Garg  <pranav.garg2107@gmail.com>
981
982         * graphite-interchange.c (interchange_profitable_p): Make static.
983         (pbb_interchange_loop_depths, pbb_do_interchange,
984         scop_do_interchange): New.
985         * graphite-poly.c (apply_poly_transforms): Call scop_do_interchange
986         for flag_loop_interchange.
987         * graphite-poly.h (scop_do_interchange): Declared.
988         * tree-ssa-loop.c (gate_graphite_transforms): Do not fail when
989         flag_loop_interchange is used.
990
991 2009-06-18  Sebastian Pop  <sebastian.pop@amd.com>
992
993         * graphite-dependences.c (dependence_polyhedron): Update use of
994         pbb_nb_scattering_dims.
995         * graphite-poly.h (pbb_nb_scattering_dims): Do not pass SCOP.
996         (pbb_nb_scattering): Update use of pbb_nb_scattering_dims.
997         (psco_scattering_dim, psct_scattering_dim, psco_iterator_dim,
998         psct_iterator_dim, psco_parameter_dim, psct_parameter_dim): New.
999
1000 2009-06-16  Sebastian Pop  <sebastian.pop@amd.com>
1001
1002         * graphite.c: Cleanup foo.
1003
1004 2009-06-16  Sebastian Pop  <sebastian.pop@amd.com>
1005
1006         * Merge from mainline (r143684:148293).
1007         * Disabled libpcp until it gets fixed.
1008
1009 2009-06-05  Sebastian Pop  <sebastian.pop@amd.com>
1010             Harsha Jagasia  <harsha.jagasia@amd.com>
1011
1012         * graphite-interchange.c: New.
1013         * Makefile.in (graphite-interchange.o): New.
1014         * graphite-poly.h (interchange_profitable_p): Declared.
1015         * graphite-ppl.h (value_max): New.
1016
1017 2009-06-04  Sebastian Pop  <sebastian.pop@amd.com>
1018
1019         * graphite-dependences.c (dependence_polyhedron): Use pdr_dim.
1020         * graphite-poly.h: Fix some comments.
1021         (pdr_dim): New.
1022         (pdr_scop): New.
1023
1024 2009-06-04  Sebastian Pop  <sebastian.pop@amd.com>
1025
1026         * graphite-poly.h
1027         (pdr_accessp_nb_subscripts): Renamed pdr_nb_subscripts.
1028         (pdr_accessp_nb_iterators): Renamed pdr_dim_iter_domain.
1029         (pdr_accessp_nb_params): Renamed pdr_nb_params.
1030         (pdr_accessp_alias_set_dim): Renamed pdr_alias_set_dim.
1031         (pdr_accessp_subscript_dim): Renamed pdr_subscript_dim.
1032         (pdr_accessp_iterator_dim): Renamed pdr_iterator_dim.
1033         (pdr_accessp_param_dim): Renamed pdr_parameter_dim.
1034         (pbb_nb_loops): Renamed pbb_dim_iter_domain.
1035         * graphite-clast-to-gimple.c: Same.
1036         * graphite-dependences.c: Same.
1037         * graphite-poly.c: Same.
1038         * graphite-sese-to-poly.c: Same.
1039
1040 2009-06-03  Sebastian Pop  <sebastian.pop@amd.com>
1041
1042         * graphite-clast-to-gimple.c (build_iv_mapping): Insert full
1043         expressions for an IV rename, as returned by clast_to_gcc_expression.
1044         (copy_renames): Rename new_name to expr.
1045         * sese.c (debug_rename_elt): Same.
1046         (get_rename): Same.
1047         (set_rename): Same.
1048         (sese_adjust_liveout_phis): Call force_gimple_operand before using
1049         the information from the rename map.
1050         (rename_variables_in_stmt): Same.
1051         (add_loop_exit_phis): Rename new_name to expr.
1052         (insert_loop_close_phis): Same.
1053         (add_guard_exit_phis): Same.  Call force_gimple_operand.
1054         * sese.h (struct rename_map_elt): Rename new_name to expr.
1055         (new_rename_map_elt): Same.
1056
1057 2009-06-03  Sebastian Pop  <sebastian.pop@amd.com>
1058
1059         * graphite-clast-to-gimple.c (build_iv_mapping): Use set_rename.
1060         * sese.c (set_rename): Make it extern.
1061         * sese.h (set_rename): Declared.
1062
1063 2009-06-03  Sebastian Pop  <sebastian.pop@amd.com>
1064
1065         * graphite-poly.c (extend_scattering): Free values.
1066         * graphite-ppl.c (new_Cloog_Domain_from_ppl_Pointset_Powerset):
1067         Free iterators.
1068         (ppl_print_powerset_matrix): Same.
1069         * graphite-scop-detection.c (free_scops_1): New.
1070         (limit_scops): Call free_scops_1.
1071         * graphite-sese-to-poly.c (build_scop_bbs_1): Free dom.
1072         (build_poly_dr): Free PPL coefficients.
1073         * tree-parloops.c (rewrite_all_phi_nodes_with_iv): Free bbs.
1074
1075 2009-06-02  Sebastian Pop  <sebastian.pop@amd.com>
1076
1077         * graphite-dependences.c: New.
1078         * graphite-data-ref.c: Removed.
1079         * graphite-data-ref.h: Removed.
1080         * Makefile.in (graphite-data-ref.o): Removed.
1081         (graphite-dependences.o): Added.
1082         * graphite-clast-to-gimple.c: Remove dependence on graphite-data-ref.h.
1083         * graphite-poly.c: Same.
1084         Move the data dependence testing to graphite-dependences.c.
1085
1086 2009-05-19  Tobias Grosser  <grosser@fim.uni-passau.de>
1087
1088         * graphite-scop-detection.c (graphite_can_represent_loop): Renamed
1089         from graphite_cannot_represent_loop. Code refactored.
1090         (scopdet_basic_block_info): Call graphite_can_represent_loop.
1091
1092 2009-05-17  Li Feng  <nemokingdom@gmail.com>
1093
1094         * testsuite/gcc.dg/graphite/graphite_autopar/graphite_autopar.exp:
1095         Cover all the testcases (not only the filtered ones).
1096
1097 2009-05-17  Tobias Grosser  <grosser@fim.uni-passau.de>
1098
1099         * graphite-scop-detection.c (stmt_simple_for_scop_p): Remove
1100         unnecessary check. Update comments. Move check for REAL_TYPE here.
1101         (harmful_stmt_in_bb): Remove checks for conditions. This is already
1102         done in (stmt_simple_for_scop_p).
1103
1104 2009-05-14 Tobias Grosser  <grosser@fim.uni-passau.de>
1105
1106         * graphite.c (print_global_statistics): New.
1107         (print_graphite_scop_statistic): New.
1108         (print_graphite_statistics): New.
1109         (graphite_initialize, graphite_transform_loops): Print statistics.
1110         * graphite-scop-detection (build_scops): Print statistics.
1111         (print_graphite_scop_statistics): New.
1112         (print_graphite_statistics): New.
1113
1114 2009-05-13  Sebastian Pop  <sebastian.pop@amd.com>
1115
1116         * graphite-clast-to-gimple.c (struct clast_name_index): Removed.
1117         (debug_clast_name_index): Removed.
1118         (debug_clast_name_indexes_1): Removed.
1119         (debug_clast_name_indexes): Removed.
1120         (clast_name_index_elt_info): Removed.
1121         (eq_clast_name_indexes): Removed.
1122         (clast_name_to_index): Removed.
1123         (new_clast_name_index): Removed.
1124         (save_clast_name_index): Removed.
1125         (save_var_name): Moved...
1126         (init_sese_params_index): Removed.
1127         (clast_name_to_gcc): Remove use of name_tree.
1128         (initialize_cloog_names): Same.
1129         (gloog): Do not call init_sese_params_index.
1130         * graphite-sese-to-poly.c (save_var_name): ...here.
1131         (parameter_index_in_region): New.
1132         * sese.c (new_sese): Initialize SESE_PARAMS_NAMES.
1133         (parameter_index_in_region): Removed.
1134         (is_parameter): Remove use of name_tree.
1135         * sese.h (struct name_tree): Removed.
1136         (struct sese): Remove use of name_tree.  New field params_names.
1137         (SESE_PARAMS_NAMES): New.
1138         (SESE_PARAMS): Remove duplicate.
1139         (parameter_index_in_region): Removed.
1140         (sese_nb_params): Remove use of name_tree.
1141         (struct clast_name_index): New.
1142         (new_clast_name_index): New.
1143         (clast_name_to_index): New.
1144         (save_clast_name_index): New.
1145         (debug_clast_name_index): New.
1146         (debug_clast_name_indexes_1): New.
1147         (debug_clast_name_indexes): New.
1148         (clast_name_index_elt_info): New.
1149         (eq_clast_name_indexes): New.
1150
1151 2009-05-13  Sebastian Pop  <sebastian.pop@amd.com>
1152
1153         * graphite-clast-to-gimple.c (compute_cloog_iv_types_1): Call
1154         pbb_to_depth_to_oldiv.  Remove call to oldiv_for_loop.
1155         (graphite_loop_normal_form): Do not pass region.  Do not
1156         initialize SESE_OLDIVS.
1157         (build_graphite_loop_normal_form): Update call to
1158         graphite_loop_normal_form.
1159         * sese.c (debug_oldivs): Removed.
1160         (new_sese): Do not initialize SESE_OLDIVS.
1161         (free_sese): Do not free SESE_OLDIVS.
1162         (oldiv_for_loop): Removed.
1163         * sese.h (struct sese): Remove old_ivs.
1164         (SESE_OLDIVS): Removed.
1165         (oldiv_for_loop): Removed.
1166
1167 2009-05-13  Sebastian Pop  <sebastian.pop@amd.com>
1168
1169         * graphite-clast-to-gimple.c (clast_name_to_gcc): Pass newivs,
1170         remove ivstack.  Remove call to loop_iv_stack_get_iv_from_name,
1171         replaced by a call to newivs_to_depth_to_newiv.
1172         (clast_to_gcc_expression): Pass newivs, remove ivstack.
1173         (clast_to_gcc_expression_red): Same.
1174         (gcc_type_for_clast_expr): Same.
1175         (gcc_type_for_clast_eq): Same.
1176         (graphite_translate_clast_equation): Same.
1177         (graphite_create_guard_cond_expr): Same.
1178         (graphite_create_new_guard): Same.
1179         (graphite_create_new_loop): Same.
1180         (build_iv_mapping): Same.
1181         (translate_clast): Same.
1182         (gloog): Same.
1183         (loop_iv_stack_patch_for_consts): Removed.  *
1184         sese.c (iv_stack_entry_is_constant): Removed.
1185         (iv_stack_entry_is_iv): Removed.
1186         (loop_iv_stack_push_iv): Removed.
1187         (loop_iv_stack_insert_constant): Removed.
1188         (loop_iv_stack_pop): Removed.
1189         (loop_iv_stack_get_iv): Removed.
1190         (loop_iv_stack_get_iv_from_name): Removed.
1191         (debug_loop_iv_stack): Removed.
1192         (free_loop_iv_stack): Removed.
1193         (loop_iv_stack_remove_constants): Removed.  *
1194         sese.h (iv_stack_entry_kind): Removed.
1195         (iv_stack_entry_data_union): Removed.
1196         (iv_stack_entry_struct): Removed.
1197         (iv_stack_entry_p): Removed.
1198         (debug_oldivs, debug_loop_iv_stack, loop_iv_stack_insert_constant,
1199         loop_iv_stack_get_iv_from_name, loop_iv_stack_push_iv,
1200         loop_iv_stack_get_iv, loop_iv_stack_remove_constants,
1201         loop_iv_stack_pop, free_loop_iv_stack): Removed.
1202         (gbb_loop_at_index): Fix indenting.
1203         (gbb_loop_index): Removed.
1204
1205 2009-05-13  Sebastian Pop  <sebastian.pop@amd.com>
1206
1207         * graphite-clast-to-gimple.c (clast_name_to_gcc): Do not use strcmp.
1208         Call clast_name_to_index.
1209
1210 2009-05-13  Sebastian Pop  <sebastian.pop@amd.com>
1211
1212         * graphite-clast-to-gimple.c (clast_name_to_gcc): Pass region,
1213         do not pass params.  Get params from SESE_PARAMS.
1214         (clast_to_gcc_expression): Same.
1215         (clast_to_gcc_expression_red): Same.
1216         (gcc_type_for_clast_eq): Same.
1217         (graphite_translate_clast_equation): Same.
1218         (graphite_create_new_loop): Same.
1219         * sese.c (rename_variables_in_stmt): Fix comment.
1220
1221 2009-05-13  Sebastian Pop  <sebastian.pop@amd.com>
1222
1223         * graphite-clast-to-gimple.c (graphite_create_new_loop): Pass
1224         newivs_index.
1225         Call save_clast_name_index.
1226         (translate_clast): Pass newivs_index.
1227         (gloog): Create and free newivs_index.
1228
1229 2009-05-13  Sebastian Pop  <sebastian.pop@amd.com>
1230
1231         * graphite-clast-to-gimple.c (clast_name_index): New structure.
1232         (clast_name_index_p): New type.
1233         (debug_clast_name_index): New.
1234         (debug_clast_name_indexes_1): New.
1235         (debug_clast_name_indexes): New.
1236         (clast_name_index_elt_info): New.
1237         (eq_clast_name_indexes): New.
1238         (clast_name_to_index): New.
1239         (new_clast_name_index): New.
1240         (save_clast_name_index): New.
1241         (init_sese_params_index): New.
1242         (gloog): Call init_sese_params_index.
1243         * graphite-clast-to-gimple.h (debug_clast_name_indexes): Declared.
1244         * sese.c (new_sese): Initialize SESE_PARAMS_INDEX.
1245         (free_sese): Free SESE_PARAMS_INDEX.
1246         * sese.h (struct sese): Add params_index.
1247         (SESE_PARAMS_INDEX): New.
1248
1249 2009-05-13  Sebastian Pop  <sebastian.pop@amd.com>
1250
1251         * graphite-clast-to-gimple.c (newivs_to_depth_to_newiv): New.
1252         (graphite_create_new_loop): Pass the newivs vector.  Push the
1253         newly created IV to newivs.
1254         (translate_clast): Pass the newivs vector.
1255         (gloog): Create and destroy the newivs vector.
1256
1257 2009-05-13  Sebastian Pop  <sebastian.pop@amd.com>
1258
1259         * graphite-clast-to-gimple.c (pbb_to_depth_to_oldiv): New.
1260         (graphite_loop_normal_form): Initialize loop->aux with the unique
1261         IV that has been created.
1262
1263 2009-05-13 Tobias Grosser  <grosser@fim.uni-passau.de>
1264
1265         * tree-chrec.c (evolution_function_right_is_integer_cst): Allow
1266         scev with parameters in the base part. They where forbidden
1267         exidently.
1268
1269 2009-05-11  Li Feng  <nemokingdom@gmail.com>
1270
1271         * testsuite/gcc.dg/graphite/graphite.exp: Set different default
1272         compile options by file names.
1273         * testsuite/gcc.dg/graphite/block{0-6}.c: Remove dg-option line.
1274         * testsuite/gcc.dg/graphite/id-{1-9}.c: Ditto.
1275         * testsuite/gcc.dg/graphite/scop-{0-20}.c: Ditto.
1276         * testsuite/gcc.dg/graphite/scop-matmult.c: Ditto.
1277
1278 2009-05-08  Li Feng <nemokingdom@gmail.com>
1279
1280         * testsuite/gcc.dg/graphite/graphite_autopar/graphite_autopar.exp: New.
1281         * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-1.c: New.
1282         * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-2.c: New.
1283         * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-3.c: New.
1284
1285 2009-05-07  Tobias Grosser  <grosser@fim.uni-passau.de>
1286
1287         * graphite-scop-detection (build_scops_1): Fix little bug introduced
1288         by final cleanup.
1289
1290 2009-05-07  Tobias Grosser  <grosser@fim.uni-passau.de>
1291
1292         * graphite-scop-detection.c (graphite_can_represent_scev): Only
1293         allow integer constant strides.
1294         (graphite_can_represent_expr): Depend on outermost_loop.
1295         (stmt_simple_memref_p, graphite_cannot_represent_loop,
1296         harmful_stmt_in_bb, is_simple_operand, stmt_simple_for_scop_p,
1297         build_scops_1): Same.
1298         (scopdet_basic_block_info): Same and insert layered SCoP
1299         detection.
1300         (try_generate_gimple_bb): Cleanup.
1301         (build_scops): Enable data references.
1302
1303         * testsuite/gcc.dg/graphite/id-5.c: New.
1304         * testsuite/gcc.dg/graphite/id-9.c: New.
1305         * tree-chrec.c (evolution_function_right_is_integer_cst): New.
1306         * tree-chrec.h (evolution_function_right_is_integer_cst): New.
1307
1308 2009-05-06  Tobias Grosser  <grosser@fim.uni-passau.de>
1309
1310         * sese.c (expand_scalar_variables_ssa_name): Only build expressions,
1311         that we have not yet built for this SCoP.
1312
1313 2009-05-06  Tobias Grosser  <grosser@fim.uni-passau.de>
1314
1315         * sese.c (expand_scalar_variables_expr): Fix expand_scalar_variables
1316         for complex numbers.
1317
1318 2009-05-06  Tobias Grosser  <grosser@fim.uni-passau.de>
1319
1320         * graphite-ppl.c: Fix build if cloog is not available.
1321
1322 2009-05-04  Li Feng  <nemokingdom@gmail.com>
1323
1324         * tree-parloops.c (loop_parallel_p): Remove construction of
1325         NITER and REDUCTION_LIST.
1326         (try_get_loop_niter): New.
1327         (try_create_reduction_list): New.
1328         (parallelize_loops): Bypass the failed checkings in autopar
1329         when can_be_parallel in loop structure is set to true.
1330
1331 2009-05-01  Tobias Grosser  <grosser@fim.uni-passau.de>
1332
1333         * testsuite/gcc.dg/graphite/id-6.c: Update testcase.
1334         * testsuite/gcc.dg/graphite/scop-3.c: Dito.
1335
1336 2009-05-01  Tobias Grosser  <grosser@fim.uni-passau.de>
1337
1338         * graphite-scop-detection.c (stmt_simple_for_scop_p):
1339         Enable EQ_EXPR and NE_EXPR again.
1340
1341 2009-04-30  Tobias Grosser  <grosser@fim.uni-passau.de>
1342
1343         * graphite-scop-detection.c (graphite_can_represent_scev):
1344         Add check if scev is affine multivariate.
1345         (harmful_stmt_in_bb): Check if we can represent the conditions.
1346         (scopdet_basic_block_info (basic_block bb, VEC): Pass the loop to
1347         harmful_stmt_in_bb.
1348         * testsuite/gcc.dg/graphite/id-7.c: New.
1349
1350 2009-04-30  Tobias Grosser  <grosser@fim.uni-passau.de>
1351
1352         * graphite-sese-to-poly.c (bb_contains_non_iv_scalar_phi_nodes):
1353         Check all bbs in region, not only the bbs that are represented in
1354         GRAPHITE.
1355         (build_poly_scop): Add newline.
1356         * testsuite/gcc.dg/graphite/id-8.c: New.
1357
1358 2009-04-30  Li Feng  <nemokingdom@gmail.com>
1359
1360         * cfgloop.c (alloc_loop): Initialize can_be_parallel to false
1361         when loop initialize.
1362         * cfgloop.h (struct loop): Introduce flag can_be_parallel.
1363         * common.opt: Declare flag_graphite_force_parallel.
1364         * graphite-clast-to-gimple.c (translate_clast): Mark the innermost
1365         loop parallel.
1366         * graphite-poly.c (apply_poly_transforms): Introduce
1367         flag_graphite_force_parallel.
1368         * tree-ssa-loop.c (gate_graphite_transforms): ditto.
1369         * toplev.c (process_options): ditto and replace a not correctly
1370         encoded space.
1371
1372 2009-04-30  Li Feng  <nemokingdom@gmail.com>
1373
1374         * graphite-clast-to-gimple.c (loop_iv_stack_patch_for_consts):
1375         Change the call of gbb_loop_at_index and/or gbb_loop_index due
1376         to the redefinition.
1377         (compute_cloog_iv_types_1): ditto.
1378         (build_iv_mapping): ditto.
1379         * graphite-sese-to-poly.c (new_gimple_bb): Remove GBB_LOOPS related
1380         initialization.
1381         (free_gimple_bb): Removed GBB_LOOPS related free part.
1382         (build_bb_loops): Removed.
1383         * sese.h (struct gimple_bb): Removed loops.
1384         (GBB_LOOPS): Removed.
1385         (gbb_loop_at_index): Instead of using GBB_LOOPS, we use sese instead.
1386         (gbb_loop_index): ditto.
1387
1388 2009-04-24  Tobias Grosser  <grosser@fim.uni-passau.de>
1389
1390         * graphite-scop-detection.c (graphite_can_represent_scev): Do not
1391         allow non constant strides.
1392         * testsuite/gcc.dg/graphite/scop-20.c: New.
1393
1394 2009-04-24  Sebastian Pop  <sebastian.pop@amd.com>
1395
1396         * graphite-scop-detection.c (dot_all_scops): Fix system call
1397         return value warning.
1398         (dot_scop): Same.
1399
1400 2009-04-24  Sebastian Pop  <sebastian.pop@amd.com>
1401
1402         * testsuite/gcc.dg/graphite/id-6.c: Fix pattern.
1403         * testsuite/gcc.dg/graphite/scop-3.c: Same.
1404
1405 2009-04-24  Sebastian Pop  <sebastian.pop@amd.com>
1406
1407         * graphite-poly.c (map_into_dep_poly, map_dr_into_dep_poly,
1408         build_pairwise_constraint, dr_equality_constraints,
1409         build_pairwise_scheduling_equality,
1410         build_pairwise_scheduling_inequality, lexicographically_gt_p,
1411         build_lexicographically_gt_constraint, dependence_polyhedron,
1412         graphite_legal_transform_dr, graphite_legal_transform_bb,
1413         graphite_legal_transform): New.
1414         * graphite-poly.h (graphite_legal_transform): Declared.
1415         * graphite-sese-to-poly.c (build_poly_scop): Call to
1416         graphite_legal_transform is disabled for the moment.
1417
1418 2009-04-24  Sebastian Pop  <sebastian.pop@amd.com>
1419
1420         * graphite-poly.h (pbb_nb_scattering_dims): New.
1421         (pbb_nb_scattering): Use it.
1422
1423 2009-04-24  Sebastian Pop  <sebastian.pop@amd.com>
1424
1425         * graphite-ppl.c (ppl_insert_dimensions_pointset): Add
1426         Pointset_Powerset version of ppl_insert_dimensions.
1427         * graphite-ppl.h (ppl_insert_dimensions_pointset): Declared.
1428
1429 2009-04-24  Sebastian Pop  <sebastian.pop@amd.com>
1430
1431         * graphite-ppl.c (ppl_insert_dimensions): Fix formatting.
1432
1433 2009-04-24  Sebastian Pop  <sebastian.pop@amd.com>
1434
1435         * graphite-poly.h: Fix comment.
1436
1437 2009-04-24  Sebastian Pop  <sebastian.pop@amd.com>
1438
1439         * graphite-sese-to-poly.c (build_poly_dr): Fix data ref multiplier.
1440
1441 2009-04-24  Tobias Grosser  <grosser@fim.uni-passau.de>
1442
1443         * sese.c (expand_scalar_variables_stmt): Only iterate over the old
1444         statements.
1445
1446 2009-04-24  Tobias Grosser  <grosser@fim.uni-passau.de>
1447
1448         * graphite-sese-to-poly.c (var_used_in_not_loop_header_phi_node): New.
1449         (graphite_stmt_p): Represent bbs necessary to build the phi nodes of
1450         conditions.
1451
1452 2009-04-20  Sebastian Pop  <sebastian.pop@amd.com>
1453
1454         * graphite-scop-detection.c (stmt_simple_for_scop_p): Do not
1455         handle EQ_EXPR and NE_EXPR.
1456
1457 2009-04-17  Tobias Grosser  <grosser@fim.uni-passau.de>
1458
1459         * graphite-poly.h (poly_dr): Fix comment.
1460
1461 2009-04-09  Sebastian Pop  <sebastian.pop@amd.com>
1462             Tobias Grosser  <grosser@fim.uni-passau.de>
1463
1464         * graphite-poly.c (new_poly_bb): Do not initialize PBB_DOMAIN
1465         with a zero dimension polyhedron.
1466         (find_scop_parameters): Move the call to scop_set_nb_params here.
1467         (build_loop_iteration_domains): Store in loop->aux the iteration
1468         domain polyhedron.
1469         (build_scop_iteration_domain): Fix PBB_DOMAIN for bbs not surrounded
1470         by any loop in scop.
1471         (build_poly_scop): Do not call scop_set_nb_params.
1472
1473 2009-04-09  Sebastian Pop  <sebastian.pop@amd.com>
1474             Tobias Grosser  <grosser@fim.uni-passau.de>
1475
1476         * graphite-sese-to-poly.c (add_condition_to_pbb): Pass code to
1477         add_condition_to_domain not GT_EXPR.
1478
1479 2009-04-09  Tobias Grosser  <grosser@fim.uni-passau.de>
1480
1481         * graphite-ppl.c (debug_ppl_powerset_matrix): New.
1482         * graphite-ppl.h (debug_ppl_powerset_matrix): New.
1483         * graphite-sese-to-poly.c (add_condition_to_pbb): Use
1484         upper_bound_assign to calculate unions.
1485         * testsuite/gcc.dg/graphite/id-6.c: New.
1486
1487 2009-04-09  Tobias Grosser  <grosser@fim.uni-passau.de>
1488
1489         * graphite-scop-detection.c (canonicalize_loop_closed_ssa): Do not
1490         handle abnormal edges.
1491
1492 2009-04-09  Tobias Grosser  <grosser@fim.uni-passau.de>
1493
1494         * graphite-poly.c (new_poly_dr, free_poly_dr): New.
1495         (free_poly_bb): Also free poly_drs.
1496         * graphite-poly.h (new_poly_dr, free_poly_dr): New.
1497         (poly_dr): Polyhedron to Pointset_Powerset.
1498         (pdr_accessp_nb_subscripts): Same.
1499         * graphite-sese-to-poly.c (build_poly_dr): Same. And actually build
1500         poly_drs.
1501
1502 2009-04-08  Sebastian Pop  <sebastian.pop@amd.com>
1503
1504         * graphite-clast-to-gimple.c (initialize_cloog_names): Change cloog
1505         names into more meaningful names.
1506
1507 2009-04-08  Sebastian Pop  <sebastian.pop@amd.com>
1508
1509         * testsuite/gfortran.dg/graphite/interchange-1.c: New.
1510         * testsuite/gfortran.dg/graphite/interchange-2.c: New.
1511
1512 2009-04-08  Sebastian Pop  <sebastian.pop@amd.com>
1513
1514         * graphite-clast-to-gimple.c (graphite_loop_normal_form): Do not build
1515         the reduction_list.
1516         * tree-parloops.c (rewrite_phi_with_iv): New.
1517         (rewrite_all_phi_nodes_with_iv): New.
1518         (canonicalize_loop_ivs): Call them.
1519
1520 2009-04-08  Sebastian Pop  <sebastian.pop@amd.com>
1521
1522         * graphite-sese-to-poly.c (try_generate_gimple_bb): Use
1523         graphite_find_data_references_in_stmt.
1524         * tree-data-ref.c (graphite_find_data_references_in_stmt): New.
1525         * tree-data-ref.h (graphite_find_data_references_in_stmt): Declared.
1526
1527 2009-04-08  Sebastian Pop  <sebastian.pop@amd.com>
1528
1529         * sese.c (add_loop_exit_phis): Don't fail on non SSA_NAME renames.
1530
1531 2009-04-08  Sebastian Pop  <sebastian.pop@amd.com>
1532
1533         * graphite-sese-to-poly.c (build_scop_bbs_1): Use bb_in_sese_p
1534         instead of bb_in_region.
1535         (flag_bb_in_region): Same.  Renamed flag_bb_in_sese.
1536         (build_sese_conditions): Use flag_bb_in_sese.
1537         * sese.c (register_bb_in_sese): Removed.
1538         (new_sese): Remove initialization of SESE_REGION_BBS.
1539         (free_sese): Do not free SESE_REGION_BBS.
1540         * sese.h (struct sese): Remove field region_basic_blocks.
1541         (SESE_REGION_BBS): Removed.
1542         (bb_in_sese_p): Implement in function of bb_in_region.
1543
1544 2009-04-08  Sebastian Pop  <sebastian.pop@amd.com>
1545
1546         * graphite-scop-detection.c (limit_scops): Deal only with single exit
1547         loops.
1548
1549 2009-04-08  Tobias Grosser  <grosser@fim.uni-passau.de>
1550
1551         * graphite-scop-detection.c (stmt_simple_for_scop_p): Allow NE_EXPR
1552         and EQ_EXPR.
1553         * graphite-sese-to-poly.c (create_linear_expr_from_tree): New.
1554         (add_condition_to_domain): New.
1555         (add_condition_to_pbb): New.
1556         (add_conditions_to_domain): Cleanup and handle of NE_EXPR and EQ_EXPR.
1557         * testsuite/gcc.dg/graphite/scop-3.c: Update number of detected SCoPs.
1558
1559 2009-04-08  Tobias Grosser  <grosser@fim.uni-passau.de>
1560
1561         * graphite-clast-to-gimple.c (build_cloog_prog): ppl_Polyhedron ->
1562         ppl_Pointset_Powerset.
1563         * graphite-poly.c (new_poly_bb, free_poly_bb): Same.
1564         * graphite-poly.h (poly_bb): poly_bb.domain Same.
1565         (pbb_nb_loops): Same.
1566         * graphite-sese-to-poly.c (build_loop_iteration_domains,
1567         add_conditions_to_domain): Same.
1568         * graphite-ppl.c (new_Cloog_Domain_from_ppl_Pointset_Powerset): New.
1569         (ppl_print_polyhedron_matrix): ppl_Polyhedron_t ->
1570         ppl_const_Polyhedron_t.
1571         (ppl_print_powerset_matrix): New.
1572         * graphite-ppl.h (new_Cloog_Domain_from_ppl_Pointset_Powerset,
1573         ppl_print_powerset_matrix): New.
1574         (ppl_print_polyhedron_matrix): Updated.
1575
1576 2009-04-07  Sebastian Pop  <sebastian.pop@amd.com>
1577
1578         * tree-scalar-evolution.c (analyze_scalar_evolution_1): Fix comment.
1579
1580 2009-04-07  Sebastian Pop  <sebastian.pop@amd.com>
1581
1582         * graphite-poly.c (extend_scattering): Fix indenting.  Free cstr.
1583         (print_iteration_domains, debug_iteration_domain,
1584         debug_iteration_domains): New.
1585         * graphite-poly.h (print_iteration_domains, debug_iteration_domain,
1586         debug_iteration_domains): Declared.
1587         * graphite-sese-to-poly.c (build_pbb_scattering_polyhedrons): Fix
1588         indenting.
1589
1590 2009-04-03  Tobias Grosser  <grosser@fim.uni-passau.de>
1591             Sebastian Pop  <sebastian.pop@amd.com>
1592
1593         * graphite-poly.h (print_iteration_domain): New.
1594         * graphite-sese-to-poly.c (add_conditions_to_domain): Fixed bug.
1595         (build_sese_conditions_1, build_sese_conditions_after,
1596         build_sese_conditions_before): New.
1597         (build_sese_conditions): Rewritten.
1598
1599 2009-04-03  Sebastian Pop  <sebastian.pop@amd.com>
1600             Tobias Grosser  <grosser@fim.uni-passau.de>
1601
1602         Cleanup of code generation liveouts.
1603         * graphite-clast-to-gimple.c (translate_clast): Use a single
1604         rename_map instead of one per translated statement.
1605         Do not use SESE_LIVEOUT_RENAMES.
1606         (graphite_loop_normal_form): Do not use SESE_REDUCTION_LIST.
1607         (gloog): Do not use SESE_LIVEOUT_RENAMES.
1608         * graphite-scop-detection.c (harmful_stmt_in_bb): Return the close
1609         phi node of a reduction: when a loop contains a reduction used outside
1610         the loop, there should be a scalar close phi node on the exit block.
1611         * sese.c (new_sese): Do not initialize SESE_LIVEOUT,
1612         SESE_LIVEOUT_RENAMES, and SESE_REDUCTION_LIST.
1613         (free_sese): Do not free them.
1614         (sese_build_liveouts_use): Do not use them.
1615         (sese_build_liveouts_bb): Same.
1616         (sese_build_liveouts): Same.
1617         (sese_insert_phis_for_liveouts): Same.
1618         (sese_adjust_phis_for_liveouts): Same.  Renamed sese_adjust_liveout_phis.
1619         (defined_in_loop_p): New.
1620         (alive_after_loop): New.
1621         (close_phi_not_yet_inserted_p): New.
1622         (struct alep, alep_p): New.
1623         (add_loop_exit_phis): Remove from the rename_map all the names defined
1624         in the code generated loop.
1625         (insert_loop_close_phis): Traverse the rename_map passed to it.
1626         Don't use SESE_LIVEOUT_RENAMES.
1627         (default_liveout_before_guard): Renamed default_before_guard.
1628         (insert_guard_phis): Do not use SESE_LIVEOUT_RENAMES.
1629         (graphite_copy_stmts_from_block): Do not directly call set_rename.
1630         (register_sese_liveout_renames): Removed.
1631         (copy_bb_and_scalar_dependences): Do not call it.
1632         * sese.h (struct sese): Removed fields: liveout, liveout_renames, and
1633         reduction_list.
1634         (SESE_LIVEOUT): Removed.
1635         (SESE_LIVEOUT_RENAMES): Removed.
1636         (SESE_REDUCTION_LIST): Removed.
1637         (sese_build_liveouts): Removed.
1638         (sese_adjust_phis_for_liveouts): Renamed sese_adjust_liveout_phis.
1639         (insert_loop_close_phis): Pass a htab_t instead of a sese.
1640         (insert_guard_phis): Same.
1641         (rename_map_elt): Declare a VEC of them.
1642         * tree-parloops.c (canonicalize_loop_ivs): reduction_list contains
1643         trees not pointers to trees.
1644
1645         Rewrite in canonical close SSA form:
1646         * graphite-scop-detection.c (contains_only_close_phi_nodes): New.
1647         (limit_scops): Close the scop after the block containing the close phi
1648         nodes.
1649         (canonicalize_loop_closed_ssa): New.
1650         (canonicalize_loop_closed_ssa_form): New.
1651         (build_scops): Call canonicalize_loop_closed_ssa_form.
1652
1653         * graphite-sese-to-poly.c: Fix typos.
1654
1655 2009-04-03  Sebastian Pop  <sebastian.pop@amd.com>
1656
1657         * graphite-poly.c (print_scattering_function, print_pbb_domain):
1658         Extended.
1659         (dump_gbb_conditions, dump_gbb_cases, print_iteration_domain): New.
1660         (print_pbb): Add conditions.
1661
1662 2009-04-01  Tobias Grosser  <grosser@fim.uni-passau.de>
1663             Sebastian Pop  <sebastian.pop@amd.com>
1664
1665         * graphite-scop-detection.c (bb_in_sd_region): Use bb_in_region.
1666         * graphite-sese-to-poly.c (all_non_dominated_preds_marked_p): New.
1667         (build_scop_bbs_1): New.
1668         (build_scop_bbs): Rewrite.
1669         * sese.h (bb_in_region): New.
1670
1671 2009-03-29  Tobias Grosser  <grosser@fim.uni-passau.de>
1672
1673         * graphite-poly.c (new_poly_bb, free_poly_bb): Initialize/free
1674         poly_drs vector.
1675         (print_scop): Style.
1676         * graphite-poly.h (poly_bb): Add drs vector.
1677         (PBB_DRS): Add accessor.
1678         * graphite-sese-to-poly.c (build_poly_dr): New.
1679         (build_pbb_drs, build_scop_drs): New.
1680         (build_poly_scop): call build_scop_drs (Disabled at the moment).
1681
1682 2009-03-29  Tobias Grosser  <grosser@fim.uni-passau.de>
1683
1684         * tree-ssa-loop.c: Include forgotten toplev.h
1685
1686 2009-03-29  Tobias Grosser  <grosser@fim.uni-passau.de>
1687
1688         * graphite-poly.c: (apply_poly_transforms): sorry -> gcc_unreachable.
1689         * testsuite/gcc.dg/graphite/pr37883.c: Remove -floop-*
1690         * testsuite/gcc.dg/graphite/pr37928.c: Same
1691         * testsuite/gcc.dg/graphite/pr38409.c: Same
1692         * testsuite/gcc.dg/graphite/pr38498.c: Same
1693         * testsuite/gcc.dg/graphite/pr38559.c: Same
1694         * testsuite/gcc.dg/graphite/pr39335.c: Same
1695         * testsuite/gcc.dg/graphite/pr39335_1.c: Same
1696         * testsuite/gfortran.dg/graphite/block-2.f: Same
1697         * tree-ssa-loop.c (gate_graphite_transforms): Always fail if called
1698         with -floop-*.
1699
1700 2009-03-28  Tobias Grosser  <grosser@fim.uni-passau.de>
1701
1702         * graphite-sese-to-poly.c (ref_nb_loops, build_access_matrix_with_af,
1703         build_access_matrix, build_scop_data_accesses): Remove access function
1704         building. (We get a new version soon).
1705         (build_bb_loops, scan_tree_for_params_right_scev): Update.
1706         * sese.h (nb_loops_around_loop_in_sese): Remove.
1707         (sese_loop_depth): Do not use SESE_LOOP_NEST any more.
1708
1709 2009-03-27  Tobias Grosser  <grosser@fim.uni-passau.de>
1710             Sebastian Pop  <sebastian.pop@amd.com>
1711
1712         * graphite-scop-detection.c (struct scopdet_info): Rename last
1713         field to exit.
1714         (scopdet_basic_block_info, build_scops_1): Don't use
1715         CDI_POST_DOMINATORS.  CDI_POST_DOMINATORS should never be used.
1716
1717 2009-03-26  Tobias Grosser  <grosser@fim.uni-passau.de>
1718             Sebastian Pop  <sebastian.pop@amd.com>
1719
1720         * graphite-clast-to-gimple.c (gloog): Call sese_build_liveouts.
1721         * sese.c (sese_build_liveouts_use): Renamed from
1722         sese_build_livein_liveouts_use. Remove liveins.
1723         (sese_build_liveouts_bb): Renamed from sese_build_livein_liveouts_bb.
1724         Call sese_build_liveouts_use.
1725         (sese_build_liveouts): Renamed from sese_build_livein_liveouts.
1726         Call sese_build_liveouts_bb.
1727         (new_sese, free_sese): Remove liveins.
1728         (sese_add_exit_phis_var): Deleted.
1729         (sese_insert_phis_for_liveouts): Call sese_add_exit_phis_edge
1730         directly.
1731         (graphite_copy_stmts_from_block): Remove SESE_NUM_VER.
1732
1733         * sese.h (sese): Remove num_ver and livein.
1734         (SESE_LIVEIN, SESE_LIVEIN_VER, SESE_NUM_VER): Removed.
1735
1736 2009-03-25  Tobias Grosser  <grosser@fim.uni-passau.de>
1737
1738         * graphite-sese-to-poly.c (build_scop_scattering): Fix compile.
1739
1740 2009-03-25  Tobias Grosser  <grosser@fim.uni-passau.de>
1741
1742         * graphite-sese-to-poly.c (compare_prefix_loops): Removed.
1743         (build_scop_scattering): Do not use compare_prefix_loops any more.
1744         (nb_common_loops): New.
1745
1746 2009-03-24  Sebastian Pop  <sebastian.pop@amd.com>
1747
1748         * sese.c (get_new_name_from_old_name): Renamed get_rename.
1749         (register_old_and_new_names): Renamed set_rename.
1750
1751 2009-03-24  Sebastian Pop  <sebastian.pop@amd.com>
1752
1753         * graphite-scop-detection.h (nb_reductions_in_loop): Revert removal
1754         of the decl from the previous commit.
1755
1756 2009-03-24  Sebastian Pop  <sebastian.pop@amd.com>
1757
1758         * graphite-scop-detection.c (dot_scop): New.
1759         * graphite-scop-detection.h (dot_scop): Declared.
1760
1761 2009-03-24  Sebastian Pop  <sebastian.pop@amd.com>
1762
1763         * graphite-sese-to-poly.c (compare_prefix_loops): Fix compare.
1764
1765 2009-03-24  Sebastian Pop  <sebastian.pop@amd.com>
1766
1767         * cfgloopmanip.c (create_empty_loop_on_edge): Generate the loop exit
1768         condition at the end of the loop.
1769         * graphite.c (graphite_initialize, graphite_finalize): Print to
1770         dump_file the compiled function.
1771         * graphite-clast-to-gimple.c (graphite_create_new_loop): Update use
1772         of create_empty_loop_on_edge.
1773         (translate_clast): Update the code generation of loops for the new
1774         shape of loops.
1775         * cfgloop.h (create_empty_loop_on_edge): Update declaration.
1776
1777 2009-03-24  Sebastian Pop  <sebastian.pop@amd.com>
1778
1779         Reverted the patch from 2009-03-19.
1780
1781 2009-03-19  Tobias Grosser  <grosser@fim.uni-passau.de>
1782
1783         * graphite-poly.c (new_poly_bb, free_poly_bb): Initialize/free
1784         poly_drs vector.
1785         (print_scop): Style.
1786         * graphite-poly.h (poly_bb): Add drs vector.
1787         (PBB_DRS): Add accessor.
1788         * graphite-sese-to-poly.c (ref_nb_loops): Remove.
1789         (build_access_matrix_with_af, build_access_matrix,
1790         build_scop_data_accesses): Delete.
1791         (build_poly_dr): New.
1792         (build_pbb_drs, build_scop_drs): New.
1793         (build_poly_scop): call build_scop_drs.
1794
1795 2009-03-13  Sebastian Pop  <sebastian.pop@amd.com>
1796
1797         * graphite-scop-detection.c (dot_all_scops_1): Close the table
1798         once per basic block.
1799
1800 2009-03-13  Tobias Grosser  <grosser@fim.uni-passau.de>
1801
1802         * graphite-scop-detection.c (graphite_can_represent_scev): New.
1803         (graphite_can_represent_expr): Renamed from loop_affine_expr
1804         and enhanced.
1805         (stmt_simple_for_scop_p): Call graphite_can_represent_expr.
1806         (graphite_cannot_represent_loop): Add scop_entry to parameters.
1807         (scopdet_basic_block_info): Actually define entry_block.
1808         (stmt_simple_memref_p): Moved here from ...
1809
1810         * tree-data-ref.c (stmt_simple_memref_p): here.
1811         * tree-data-ref.h (stmt_simple_memref_p): Removed.
1812
1813 2009-03-13  Tobias Grosser  <grosser@fim.uni-passau.de>
1814
1815         * testsuite/gcc.dg/graphite/id-4.c: New.
1816
1817 2009-03-12  Sebastian Pop  <sebastian.pop@amd.com>
1818
1819         * sese.c (expand_scalar_variables_expr): Handle tcc_comparison.
1820         (register_old_and_new_names): Update the content of the map.
1821         When there was already a rename_map_elt in the map at that
1822         location, free it.
1823         (copy_bb_and_scalar_dependences): Do rename_variables after
1824         expand_scalar_variables.
1825         * graphite-clast-to-gimple.c (build_iv_mapping): Update the content
1826         of the map.  When there was already a rename_map_elt in the
1827         map at that location, free it.
1828         (translate_clast): Pass the rename_map.  Do not initialize and free
1829         a rename_map per stmt_user.
1830         (gloog): Initialize and free one rename_map and pass it to
1831         translate_clast.
1832
1833 2009-03-12  Sebastian Pop  <sebastian.pop@amd.com>
1834
1835         * sese.c (expand_scalar_variables_stmt,
1836         expand_scalar_variables_ssa_name): Add a gimple_stmt_iterator
1837         parameter.
1838         (expand_scalar_variables_expr): Handle REALPART_EXPR and IMAGPART_EXPR.
1839         (expand_scalar_variables): Pass to expand_scalar_variables_stmt
1840         the gimple_stmt_iterator of the statement to be expanded.
1841         * graphite-scop-detection.c (is_simple_operand): Do handle
1842         REALPART_EXPR.
1843
1844 2009-03-11  Tobias Grosser  <grosser@fim.uni-passau.de>
1845
1846         * graphite-scop-detection.c (is_simple_operand): Do not handle
1847         REALPART_EXPR.
1848         * testsuite/gcc.dg/graphite/id-2.c: New.
1849
1850         * graphite-sese-to-poly.c (build_bb_loops,
1851         add_value_to_dim, scan_tree_for_params_right_scev,
1852         scan_tree_for_params_int, scan_tree_for_params, idx_record_params,
1853         find_params_in_bb, build_loop_iteration_domains,
1854         add_conditions_to_domain): Remove subtract.
1855
1856 2009-03-11  Tobias Grosser  <grosser@fim.uni-passau.de>
1857
1858         * graphite-clast-to-gimple.c (loop_iv_stack_patch_for_consts,
1859         build_iv_mapping, compute_cloog_iv_types_1, build_cloog_prog):
1860         pbb_loop_at_index -> gbb_loop_at_index.
1861         * graphite-poly.c (new_poly_bb, new_scop): New accessors.
1862         (debug_loop_vec): Delete.
1863         * graphite-poly.h (poly_bb, scop): Change black_box and region to void
1864         pointer.  Move LOOPS to gimple_bb_p and insert nb_params.
1865         (PBB_LOOPS): Removed.
1866         (PBB_BLACK_BOX): Insert cast.
1867         (pbb_set_black_box): New setter.
1868         (pbb_loop_at_index, pbb_loop_index): Removed.
1869         (scop_set_region, scop_set_nb_params): New.
1870         * graphite-sese-to-poly.c (new_gimple_bb, free_gimple_bb,
1871         build_scop_scattering, build_bb_loops): Add GBB_LOOPS.
1872         (build_poly_scop): Use scop_set_nb_params.
1873         * sese.h (gimple_bb): Add LOOPS.
1874         (GBB_LOOPS, gbb_loop_index, gbb_loop_at_index): New.
1875
1876 2009-03-11  Tobias Grosser  <grosser@fim.uni-passau.de>
1877
1878         Revert previous commit.
1879
1880 2009-03-11  Sebastian Pop  <sebastian.pop@amd.com>
1881
1882         * sese.c (expand_scalar_variables_expr): Handle tcc_comparison.
1883         (register_old_and_new_names): Update the content of the map.
1884         When there was already a rename_map_elt in the map at that
1885         location, free it.
1886         (copy_bb_and_scalar_dependences): Do rename_variables after
1887         expand_scalar_variables.
1888         * graphite-clast-to-gimple.c (build_iv_mapping): Update the content
1889         of the map.  When there was already a rename_map_elt in the
1890         map at that location, free it.
1891         (translate_clast): Pass the rename_map.  Do not initialize and free
1892         a rename_map per stmt_user.
1893         (gloog): Initialize and free one rename_map and pass it to
1894         translate_clast.
1895
1896 2009-03-11  Tobias Grosser  <grosser@fim.uni-passau.de>
1897
1898         Remove forgotten line in revert.
1899
1900 2009-03-11  Sebastian Pop  <sebastian.pop@amd.com>
1901
1902         Revert previous commit.
1903
1904 2009-03-10  Sebastian Pop  <sebastian.pop@amd.com>
1905
1906         * sese.c (register_old_and_new_names): Update the content
1907         of the map.  When there was already a rename_map_elt in the
1908         map at that location, free it.
1909         (copy_bb_and_scalar_dependences): Do rename_variables after
1910         expand_scalar_variables.
1911         * graphite-clast-to-gimple.c (build_iv_mapping): Update the content
1912         of the map.  When there was already a rename_map_elt in the
1913         map at that location, free it.
1914         (translate_clast): Pass the rename_map.  Do not initialize and free
1915         a rename_map per stmt_user.
1916         (gloog): Initialize and free one rename_map and pass it to
1917         translate_clast.
1918
1919 2009-03-10  Sebastian Pop  <sebastian.pop@amd.com>
1920
1921         * graphite-clast-to-gimple.c (translate_clast): context_loop
1922         is never NULL.
1923
1924 2009-03-10  Tobias Grosser  <grosser@fim.uni-passau.de>
1925             Sebastian Pop  <sebastian.pop@amd.com>
1926
1927         * graphite-ppl.c (ppl_insert_dimensions): Fix stupid mistake
1928         of the use of ppl_Polyhedron_map_space_dimensions.
1929
1930 2009-03-10  Tobias Grosser  <grosser@fim.uni-passau.de>
1931             Sebastian Pop  <sebastian.pop@amd.com>
1932
1933         * graphite-poly.c (unify_scattering_dimensions): Fix types.
1934         * graphite-poly.h (poly_dr_p, poly_dr, POLY_DR_TYPE, PDR_BB,
1935         PDR_TYPE, PDR_ACCESSES, pdr_accessp_nb_subscripts,
1936         pdr_accessp_nb_iterators, pdr_accessp_nb_params,
1937         pdr_accessp_alias_set_dim, pdr_accessp_subscript_dim,
1938         pdr_accessp_iterator_dim, pdr_accessp_param_dim,
1939         pbb_nb_params): New.
1940         (pbb_nb_loops, pbb_nb_scattering, scop_nb_params,
1941         nb_loops_around_pbb): Adapt return types.
1942
1943 2009-03-09  Tobias Grosser  <grosser@fim.uni-passau.de>
1944
1945         * Makefile.in (graphite.o, graphite-sese-to-poly.o,
1946         graphite-clast-to-gimple.o,  graphite-data-ref.o,
1947         graphite-scop-detection.o, graphite-poly.o): Add
1948         more headers.
1949
1950 2009-03-05  Tobias Grosser  <grosser@fim.uni-passau.de>
1951
1952         * Makefile.in (graphite.o, graphite-sese-to-poly.o,
1953         graphite-clast-to-gimple.o,  graphite-data-ref.o,
1954         graphite-scop-detection.o, graphite-poly.o): Add graphite-poly.h.
1955
1956 2009-03-04  Tobias Grosser  <grosser@fim.uni-passau.de>
1957
1958         * testsuite/gcc.dg/graphite/pr37485.c: Remove -floop-block
1959         * testsuite/gcc.dg/graphite/pr37828.c: Same.
1960         * testsuite/gcc.dg/graphite/pr37684.c: Same.
1961         * testsuite/gcc.dg/graphite/block-0.c: Same.
1962         * testsuite/gcc.dg/graphite/block-1.c: Same.
1963         * testsuite/gcc.dg/graphite/block-2.c: Same.
1964         * testsuite/gcc.dg/graphite/block-3.c: Same.
1965         * testsuite/gcc.dg/graphite/block-4.c: Same.
1966         * testsuite/gcc.dg/graphite/block-5.c: Same.
1967         * testsuite/gcc.dg/graphite/block-6.c: Same.
1968         * testsuite/gfortran.dg/graphite/pr38083.f90: Same.
1969         * testsuite/gfortran.dg/graphite/block-1.f90: Same.
1970         * testsuite/gfortran.dg/graphite/block-3.f90: Same.
1971         * testsuite/gfortran.dg/graphite/pr37852.f90: Same.
1972         * testsuite/gfortran.dg/graphite/block-4.f90: Same.
1973         * testsuite/gfortran.dg/graphite/pr37980.f90: Same.
1974         * testsuite/gfortran.dg/graphite/pr38953.f90: Same.
1975         * testsuite/gfortran.dg/graphite/pr37857.f90: Same.
1976         * opts.c: Remove -floop-block from -O2.
1977         * graphite-poly.c: Fail if -floop-block -floop-interchange or
1978         -floop-strip-mine are used.
1979
1980 2009-03-04  Tobias Grosser  <grosser@fim.uni-passau.de>
1981             Sebastian Pop  <sebastian.pop@amd.com>
1982
1983         * graphite-clast-to-gimple.c (build_cloog_prog): Unify scattering
1984         dimensions.
1985         * graphite-poly.c (pbb_compare, graphite_sort_pbbs,
1986         graphite_trans_bb_move_loop, graphite_trans_bb_strip_mine,
1987         strip_mine_profitable_p, is_interchange_valid,
1988         graphite_trans_bb_block, graphite_trans_loop_block,
1989         graphite_trans_scop_block): Temporary removed.
1990         (extend_scattering, unify_scattering_dimensions): New.
1991         (print_scattering_function, graphite_read_transforms):
1992         PBB_SCATTERING -> PBB_TRANSFORMED_SCATTERING.
1993         (graphite_generate_scattering_fns): Removed.
1994         (apply_poly_transforms): Cleanup.
1995         (free_poly_bb): Add PBB_SCATTERING -> PBB_TRANSFORMED_SCATTERING.
1996         (schedule_to_scattering): Moved.
1997         (PBB_STATIC_SCHEDULE, PBB_SCATTERING): Removed.
1998         (PBB_ORIGINAL_SCATTERING, PBB_TRANSFORMED_SCATTERING): New.
1999         (pbb_nb_scattering): New.
2000         (SCOP_ENTRY, SCOP_EXIT, SCOP_REGION_BBS, SCOP_DEP_GRAPH, SCOP_PARAMS,
2001         SCOP_LOOP_NEST, SCOP_PARAMS, SCOP_OLDIVS, SCOP_LIVEOUT_RENAMES):
2002         Removed.
2003         * graphite-ppl.c (ppl_insert_dimensions): Extended and renamed from
2004         shift_poly.
2005         (ppl_strip_loop): PBB_SCATTERING -> PBB_TRANSFORMED_SCATTERING.
2006         * graphite-scop-detection.c (dot_all_scops_1):  PBB_SCATTERING
2007         -> PBB_TRANSFORMED_SCATTERING.
2008         * graphite-sese-to-poly.c (build_scop_bbs): Remove region.
2009         (build_pbb_scattering_polyhedron): Moved from schedule_to_scattering.
2010         (build_scop_scattering): Renamed from build_scop_canonical_schedules.
2011         (check_poly_representation): Do not return bool.
2012         (graphite_transform_loops): Reformat.
2013         * sese.h (SESE_ENTRY_BB, SESE_EXIT_BB): New.
2014
2015 2009-03-04  Sebastian Pop  <sebastian.pop@amd.com>
2016
2017         * graphite-poly.c (print_pbb_domain, print_pbb, print_scop,
2018         debug_pbb_domain, debug_pbb, debug_scop): New.
2019         * graphite-poly.h (print_pbb_domain, print_pbb, print_scop,
2020         debug_pbb_domain, debug_pbb, debug_scop): Declared.
2021
2022 2009-03-02  Sebastian Pop  <sebastian.pop@amd.com>
2023
2024         PR middle-end/39335
2025         * tree-parloops.c (canonicalize_loop_ivs): Call fold_convert
2026         when the type precision of the induction variable should be
2027         larger than the type precision of nit.
2028         (gen_parallel_loop): Update use of canonicalize_loop_ivs.
2029         * graphite-clast-to-gimple.c (graphite_loop_normal_form): Same.
2030         * tree-flow.h (canonicalize_loop_ivs): Update declaration.
2031
2032         * testsuite/gcc.dg/graphite/pr39335_1.c: New.
2033         * testsuite/gcc.dg/graphite/pr39335.c: New.
2034
2035 2009-03-02  Sebastian Pop  <sebastian.pop@amd.com>
2036
2037         * tree-parloops.c (canonicalize_loop_ivs): reduction_list contains
2038         SSA_NAMES not struct reduction_info.
2039
2040 2009-03-02  Sebastian Pop  <sebastian.pop@amd.com>
2041
2042         * sese.c (expand_scalar_variables_expr): Handle ADDR_EXPR.
2043
2044 2009-02-27  Sebastian Pop  <sebastian.pop@amd.com>
2045             Tobias Grosser  <grosser@fim.uni-passau.de>
2046
2047         * sese.c (new_sese): Initialize SESE_REDUCTION_LIST.
2048         (free_sese): Free SESE_REDUCTION_LIST.
2049         * sese.h (struct sese): Add field reduction_list.
2050         (SESE_REDUCTION_LIST): New.
2051         * graphite-clast-to-gimple.c (graphite_loop_normal_form): Call
2052         canonicalize_loop_ivs on SESE_REDUCTION_LIST.
2053
2054 2009-02-27  Sebastian Pop  <sebastian.pop@amd.com>
2055             Tobias Grosser  <grosser@fim.uni-passau.de>
2056
2057         * tree-flow.h (gather_scalar_reductions): Use struct loop * instead
2058         of loop_p.
2059
2060 2009-02-27  Sebastian Pop  <sebastian.pop@amd.com>
2061             Tobias Grosser  <grosser@fim.uni-passau.de>
2062
2063         * tree-parloops.c (struct brli, build_reduction_list_info,
2064         analyze_reduction_list, gather_scalar_reductions): New.
2065         (loop_parallel_p): Build a reduction list containing only
2066         PHI_RESULT SSA_NAMEs: call gather_scalar_reductions.
2067         (gen_parallel_loop): Call the analysis analyze_reduction_list.
2068         (parallelize_loops): Now reduction_list is a htab_t of SSA_NAMEs.
2069         * tree-flow.h (gather_scalar_reductions): Declared.
2070
2071 2009-02-26  Sebastian Pop  <sebastian.pop@amd.com>
2072
2073         PR middle-end/39308
2074         * graphite-clast-to-gimple.c (graphite_loop_normal_form): Do not call
2075         number_of_iterations_exit from a gcc_assert.
2076
2077 2009-02-25  Sebastian Pop  <sebastian.pop@amd.com>
2078             Jan Sjodin  <jan.sjodin@amd.com>
2079
2080         * output.h (graphite_out_file, graphite_in_file): Declared.
2081         * toplev.c (graphite_out_file, graphite_in_file): New.
2082         (init_asm_output): Initialize graphite_in_file and graphite_out_file.
2083         * graphite-clast-to-gimple.c (build_cloog_prog): Read PBB_SCATTERING.
2084         Don't call schedule_to_scattering.
2085         * common.opt (fgraphite-write, fgraphite-read): New.
2086         * graphite-poly.c: Include output.h.
2087         (print_scattering_function, print_scattering_functions,
2088         debug_scattering_function, debug_scattering_functions,
2089         graphite_write_transforms, graphite_read_transforms,
2090         graphite_generate_scattering_fns): New.
2091         (apply_poly_transforms): Do not apply transform if flag_graphite_read.
2092         Call graphite_generate_scattering_fns, graphite_write_transforms,
2093         graphite_read_transforms.
2094         (new_poly_bb): Initialize PBB_SCATTERING.
2095         (free_poly_bb): Free PBB_SCATTERING.
2096         (schedule_to_scattering): Does not return, initialize PBB_SCATTERING.
2097         * graphite-poly.h (struct poly_bb): Add field scattering.
2098         (PBB_SCATTERING): New.
2099         (print_scattering_function, print_scattering_functions,
2100         debug_scattering_function, debug_scattering_functions): Declared.
2101         * graphite-ppl.c (cloog_matrix_to_ppl_constraint): Matrices contain
2102         GMP values, not integers!
2103         (ppl_print_polyhedron_matrix, debug_ppl_polyhedron_matrix,
2104         ppl_read_polyhedron_matrix): New.
2105         * graphite-ppl.h (ppl_print_polyhedron_matrix,
2106         debug_ppl_polyhedron_matrix,
2107         ppl_read_polyhedron_matrix): Declared.
2108         * Makefile.in (graphite-poly.o): Depends on output.h.
2109
2110 2009-02-23  Sebastian Pop  <sebastian.pop@amd.com>
2111             Tobias Grosser  <grosser@fim.uni-passau.de>
2112
2113         Revert this change:
2114         * graphite-scop-detection.c (stmt_simple_for_scop_p): Analyze
2115         scalar evolutions in the scop_entry->loop_father.
2116
2117 2009-02-23  Sebastian Pop  <sebastian.pop@amd.com>
2118             Tobias Grosser  <grosser@fim.uni-passau.de>
2119
2120         * graphite.h (ref_nb_loops): Remove declaration.
2121         (struct gimple_bb, gimple_bb_p, GBB_BB, GBB_DATA_REFS, GBB_CONDITIONS,
2122         GBB_CONDITION_CASES, GBB_CLOOG_IV_TYPES, gbb_loop, print_gimple_bb,
2123         debug_gbb): Moved to sese.h.
2124         * sese.h: As said.
2125
2126 2009-02-23  Sebastian Pop  <sebastian.pop@amd.com>
2127             Tobias Grosser  <grosser@fim.uni-passau.de>
2128
2129         * graphite-data-ref.[ch]: Disable.
2130
2131 2009-02-23  Sebastian Pop  <sebastian.pop@amd.com>
2132             Tobias Grosser  <grosser@fim.uni-passau.de>
2133
2134         * graphite-scop-detection.c (stmt_simple_for_scop_p): Analyze
2135         scalar evolutions in the scop_entry->loop_father.
2136
2137 2009-02-23  Sebastian Pop  <sebastian.pop@amd.com>
2138
2139         * graphite-scop-detection.c (nb_reductions_in_loop): Moved here...
2140         (graphite_cannot_represent_loop_niter): Renamed
2141         graphite_cannot_represent_loop.  Call nb_reductions_in_loop.
2142         (limit_scops): build_sese_loop_nests does not return a bool.
2143         * graphite-scop-detection.h (nb_reductions_in_loop): Declared.
2144         * sese.c (nb_reductions_in_loop): ... from here.
2145         (graphite_loop_normal_form): ... from here.
2146         (sese_record_loop): Does not fail, so does not return a bool.
2147         (build_sese_loop_nests): Same.
2148         * sese.h (build_sese_loop_nests): Update declaration.
2149         * graphite-clast-to-gimple.c (graphite_loop_normal_form): Moved here...
2150         (build_graphite_loop_normal_form): New.
2151         (gloog): Call build_graphite_loop_normal_form.
2152         * graphite-sese-to-poly.c (build_poly_scop): Don't fail on
2153         build_sese_loop_nests.
2154
2155         * testsuite/gcc.dg/graphite/id-1.c: New.
2156
2157 2009-02-23  Sebastian Pop  <sebastian.pop@amd.com>
2158             Tobias Grosser  <grosser@fim.uni-passau.de>
2159
2160         * graphite-sese-to-poly.c (scan_tree_for_params): Remove REAL_CST.
2161         The SCoP detection fix is sufficient.
2162
2163 2009-02-21  Sebastian Pop  <sebastian.pop@amd.com>
2164
2165         PR tree-optimization/39260
2166         * graphite-scop-detection.c (harmful_stmt_in_bb): Stop a SCoP when
2167         the basic block contains a condition with a real type.
2168         * graphite-sese-to-poly.c (scan_tree_for_params): Handle REAL_CST.
2169
2170         * gcc.dg/graphite/pr39260.c: New.
2171
2172 2009-02-21  Sebastian Pop  <sebastian.pop@amd.com>
2173
2174         * graphite-poly.c: Inlcude params.h.
2175         (graphite_trans_loop_block): Use PARAM_LOOP_BLOCK_TILE_SIZE for
2176         the size of a tile.
2177         * Makefile.in (graphite-poly.o): Depend on PARAMS_H.
2178         * params.def (PARAM_LOOP_BLOCK_TILE_SIZE): Define.
2179
2180 2009-02-20  Sebastian Pop  <sebastian.pop@amd.com>
2181             Tobias Grosser  <grosser@fim.uni-passau.de>
2182
2183         * graphite-scop-detection.c (dot_all_scops_1,
2184         dot_all_scops): Moved here.
2185         * graphite-scop-detection.h (dot_all_scops): Declared here.
2186         * graphite.c (graphite_initialize, graphite_finalize): New.
2187         (graphite_transform_loops): Cleaned up.
2188         * sese.c (debug_oldivs): Moved here.
2189         * graphite-poly.c (graphite_apply_transformations): Renamed
2190         apply_poly_transforms.
2191         (debug_loop_vec): Moved here.
2192         * graphite-sese-to-poly.c (build_bb_loops, build_sese_conditions_1,
2193         scop_contains_non_iv_scalar_phi_nodes, build_sese_conditions,
2194         find_scop_parameters, build_scop_iteration_domain,
2195         add_conditions_to_constraints, build_scop_canonical_schedules,
2196         build_scop_data_accesses): Now static.
2197         (build_poly_scop, check_poly_representation): New.
2198
2199 2009-02-20  Sebastian Pop  <sebastian.pop@amd.com>
2200
2201         * graphite.c (graphite_stmt_p, new_gimple_bb, free_gimple_bb,
2202         remove_gbbs_in_scop, free_scops, try_generate_gimple_bb,
2203         build_scop_bbs, ref_nb_loops, compare_prefix_loops,
2204         build_scop_canonical_schedules, build_bb_loops, add_value_to_dim,
2205         scan_tree_for_params_right_scev, scan_tree_for_params_int,
2206         scan_tree_for_params, struct irp_data, dx_record_params,
2207         find_params_in_bb, find_scop_parameters, gbb_from_bb,
2208         build_loop_iteration_domains, add_conditions_to_domain,
2209         phi_node_is_iv, bb_contains_non_iv_scalar_phi_nodes,
2210         scop_contains_non_iv_scalar_phi_nodes, build_sese_conditions_1,
2211         build_sese_conditions, add_conditions_to_constraints,
2212         build_scop_iteration_domain, build_access_matrix_with_af,
2213         build_access_matrix,
2214         build_scop_data_accesses): Moved to graphite-sese-to-poly.c.
2215
2216         * graphite-sese-to-poly.c: New.
2217         * graphite-sese-to-poly.h: New.
2218
2219         * Makefile.in: Add new rule for graphite-sese-to-poly.o.
2220
2221 2009-02-20  Sebastian Pop  <sebastian.pop@amd.com>
2222
2223         * graphite.c: Split graphite code generation to a new file.
2224         (graphite_verify, gmp_cst_to_tree, clast_name_to_gcc,
2225         max_precision_type, clast_to_gcc_expression_red,
2226         clast_to_gcc_expression, gcc_type_for_clast_expr,
2227         gcc_type_for_clast_eq, loop_iv_stack_patch_for_consts,
2228         graphite_translate_clast_equation, graphite_create_guard_cond_expr,
2229         graphite_create_new_guard, clast_get_body_of_loop,
2230         gcc_type_for_cloog_iv, gcc_type_for_iv_of_clast_loop,
2231         graphite_create_new_loop, build_iv_mapping, copy_renames,
2232         translate_clast, find_cloog_iv_in_expr, compute_cloog_iv_types_1,
2233         compute_cloog_iv_types, free_scattering, save_var_name,
2234         initialize_cloog_names, build_scop_context, build_cloog_prog,
2235         set_cloog_options, debug_clast_stmt, scop_to_clast,
2236         print_generated_program, debug_generated_program,
2237         gloog): Moved to graphite-clast-to-gimple.c.
2238
2239         (struct cloog_prog_clast): Moved to graphite-clast-to-gimple.h.
2240
2241         (iv_stack_entry_is_constant, iv_stack_entry_is_iv,
2242         loop_iv_stack_push_iv, loop_iv_stack_insert_constant,
2243         loop_iv_stack_pop, loop_iv_stack_get_iv,
2244         loop_iv_stack_get_iv_from_name, debug_loop_iv_stack,
2245         free_loop_iv_stack, loop_iv_stack_remove_constants,
2246         debug_rename_elt, debug_rename_map_1, debug_rename_map,
2247         rename_map_elt_info, eq_rename_map_elts, debug_ivtype_elt,
2248         debug_ivtype_map_1, debug_ivtype_map, ivtype_map_elt_info,
2249         eq_ivtype_map_elts, sese_add_exit_phis_edge,
2250         sese_add_exit_phis_var, sese_insert_phis_for_liveouts,
2251         get_vdef_before_sese, sese_adjust_vphi,
2252         get_new_name_from_old_name, sese_adjust_phis_for_liveouts,
2253         oldiv_for_loop, rename_variables_in_stmt, is_parameter,
2254         is_iv, expand_scalar_variables_ssa_name,
2255         expand_scalar_variables_expr, expand_scalar_variables_stmt,
2256         expand_scalar_variables, rename_variables, remove_condition,
2257         get_true_edge_from_guard_bb, get_false_edge_from_guard_bb,
2258         add_loop_exit_phis, insert_loop_close_phis, struct igp,
2259         default_liveout_before_guard, add_guard_exit_phis,
2260         insert_guard_phis, register_old_and_new_names,
2261         graphite_copy_stmts_from_block, register_sese_liveout_renames,
2262         copy_bb_and_scalar_dependences, outermost_loop_in_sese,
2263         if_region_set_false_region, create_if_region_on_edge,
2264         move_sese_in_condition): Moved to sese.c.
2265
2266         (nb_loops_around_loop_in_sese, struct ifsese, if_region_entry,
2267         if_region_exit, if_region_get_condition_block,
2268         struct rename_map_elt, new_rename_map_elt, enum iv_stack_entry_kind,
2269         union iv_stack_entry_data_union, struct iv_stack_entry_struct,
2270         iv_stack_entry_p, loop_iv_stack, struct ivtype_map_elt,
2271         ivtype_map_elt, new_ivtype_map_elt,
2272         recompute_all_dominators): Moved to sese.h.
2273
2274         * graphite-clast-to-gimple.c: New.
2275         * graphite-clast-to-gimple.h: New.
2276         * Makefile.in: Add new rule for graphite-clast-to-gimple.o.
2277         * sese.c: Modified as said above.
2278         * sese.h: Same.
2279
2280 2009-02-20  Sebastian Pop  <sebastian.pop@amd.com>
2281
2282         * graphite.c: Split scop detection to a new file.
2283         (enum gbb_type, gbb_type, get_bb_type, struct sd_region_p, sd_region,
2284         move_sd_regions, loop_affine_expr, exclude_component_ref,
2285         is_simple_operand, stmt_simple_for_scop_p, harmful_stmt_in_bb,
2286         graphite_cannot_represent_loop_niter, struct scopdet_info,
2287         scopdet_basic_block_info, build_scops_1, bb_in_sd_region,
2288         find_single_entry_edge, find_single_exit_edge,
2289         create_single_entry_edge, sd_region_without_exit,
2290         create_single_exit_edge, unmark_exit_edges, mark_exit_edges,
2291         create_sese_edges, build_graphite_scops, limit_scops, build_scops):
2292         Moved to graphite-scop-detection.c.
2293
2294         * graphite-scop-detection.c: New.
2295         * graphite-scop-detection.h: New.
2296         * Makefile.in: Add new rule for graphite-scop-detection.o.
2297
2298         * sese.c: Include tree-chrec.h, tree-data-ref.h, and
2299         tree-scalar-evolution.h.
2300         (nb_reductions_in_loop, graphite_loop_normal_form, sese_record_loop,
2301         build_sese_loop_nests): Moved here from graphite.c.
2302         (param_index): Renamed parameter_index_in_region.
2303
2304 2009-02-18  Tobias Grosser  <grosser@fim.uni-passau.de>
2305             Sebastian Pop  <sebastian.pop@amd.com>
2306
2307         * gcc.dg/graphite/block-0.c: Expected to fail now.
2308         * gcc.dg/graphite/block-1.c: Same.
2309         * gcc.dg/graphite/block-5.c: Same.
2310         * gcc.dg/graphite/block-6.c: Same.
2311
2312 2009-02-18  Tobias Grosser  <grosser@fim.uni-passau.de>
2313             Sebastian Pop  <sebastian.pop@amd.com>
2314
2315         * graphite.h: Separate from graphite_bb_p the polyhedral
2316         representation in poly_bb_p and the GCC specifics in gimple_bb_p.
2317         (struct data_dependence_polyhedron, RDGE_DDP, ddp_p): Moved to
2318         graphite-data-ref.h.
2319         (struct poly_bb, PBB_SCOP, PBB_STATIC_SCHEDULE, PBB_DOMAIN,
2320         PBB_BLACK_BOX, PBB_LOOPS, pbb_nb_loops, pbb_loop_at_index,
2321         pbb_loop_index, struct scop, SCOP_BBS, SCOP_REGION, SCOP_ENTRY,
2322         SCOP_EXIT, SCOP_REGION_BBS, SCOP_DEP_GRAPH, SCOP_PARAMS,
2323         SCOP_LOOP_NEST, SCOP_PARAMS, SCOP_OLDIVS, SCOP_LIVEOUT_RENAMES,
2324         scop_nb_params): Moved to graphite-poly.h.
2325         * graphite-data-ref.c: Same.
2326         * graphite-data-ref.h: New.
2327         * graphite.c: Same.
2328         (pbb_compare, graphite_sort_pbbs, graphite_trans_bb_move_loop,
2329         graphite_trans_bb_strip_mine, strip_mine_profitable_p,
2330         is_interchange_valid, graphite_trans_bb_block,
2331         graphite_trans_loop_block, scop_max_loop_depth,
2332         graphite_trans_scop_block, graphite_apply_transformations,
2333         new_poly_bb, free_poly_bb, new_scop, free_scop): Moved to
2334         graphite-poly.c.
2335         * graphite-poly.h: New.
2336         * graphite-poly.c: New.
2337         * Makefile.in (OBJS-common): Add graphite-poly.o.
2338         (graphite-poly.o): New rule.
2339         * tree-data-ref.h (struct data_reference): Remove unused scop field.
2340         (DR_SCOP): Removed.
2341
2342 2009-02-18  Sebastian Pop  <sebastian.pop@amd.com>
2343             Tobias Grosser  <grosser@fim.uni-passau.de>
2344
2345         * graphite.c: Replace gb -> gbb.
2346         * graphite.h: Same.
2347         * graphite-data-ref.c: Same.
2348
2349 2009-02-18  Sebastian Pop  <sebastian.pop@amd.com>
2350             Tobias Grosser  <grosser@fim.uni-passau.de>
2351
2352         * Makefile.in (OBJS-commmon): Add sese.o.
2353         (sese.o): New.
2354         (graphite.o): Add sese.h.
2355         * graphite.c (bb_in_ss_p, loop_in_sese_p,
2356         sese_build_livein_liveouts_use, sese_build_livein_liveouts_bb,
2357         sese_build_livein_liveouts, register_bb_in_sese, new_sese, free_sese):
2358         Move to sese.
2359         (block_before_scop): Add missing return.
2360         (new_scop, free_scop): Remove SESE data structures.
2361         (scop_record_loop, scan_tree_for_params, find_params_in_bb,
2362         find_scop_parameters, build_loop_iteration_domains,
2363         add_conditions_to_domain, register_scop_liveout_renames,
2364         copy_bb_and_scalar_dependences): Scop -> SESE.
2365
2366         (add_conditions_to_domain): SCoP -> SESE and remove check
2367         (scop_contains_non_iv_scalar_phi_nodes): New.
2368         (build_scop_conditions_1, build_scop_conditions): Remove check for
2369         non iv scalar phi nodes.
2370         (print_scop_statistics): New.
2371         (graphite_transform_loops): Cleanup.
2372
2373         * graphite.h: Move to sese & cleanup.
2374         * sese.c: New.
2375         * sese.h: New.
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_conditions_1): Conditions are only
2381         at the end of a basic block.
2382
2383 2009-02-16  Sebastian Pop  <sebastian.pop@amd.com>
2384             Tobias Grosser  <grosser@fim.uni-passau>
2385
2386         * graphite.h (struct graphite_bb): Remove compressed_alpha_matrix
2387         field.
2388         (GBB_ALPHA): Removed.
2389
2390 2009-02-16  Sebastian Pop  <sebastian.pop@amd.com>
2391             Tobias Grosser  <grosser@fim.uni-passau.de>
2392
2393         * graphite-data-ref.c (graphite_test_dependence): Don't use
2394         GBB_DYNAMIC_SCHEDULE.
2395         * graphite.c (new_graphite_bb): Same.
2396         (free_graphite_bb): Same.
2397         (build_scop_dynamic_schedules): Removed.
2398         (graphite_transform_loops): Don't call it.
2399         * graphite.h (struct graphite_bb): Remove dynamic_schedule field.
2400         (GBB_DYNAMIC_SCHEDULE): Removed.
2401
2402 2009-02-16  Sebastian Pop  <sebastian.pop@amd.com>
2403             Tobias Grosser  <grosser@fim.uni-passau.de>
2404
2405         * graphite.c (schedule_to_scattering): Don't use CloogMatrix.
2406         (print_graphite_bb): Same.
2407         (build_cloog_prog): Same.
2408
2409 2009-02-16  Sebastian Pop  <sebastian.pop@amd.com>
2410             Tobias Grosser  <grosser@fim.uni-passau.de>
2411
2412         * graphite.c (build_cloog_prog): Don't use CloogMatrix.
2413
2414 2009-02-16  Sebastian Pop  <sebastian.pop@amd.com>
2415             Tobias Grosser  <grosser@fim.uni-passau.de>
2416
2417         * graphite.c (build_scop_context): Don't use CloogMatrix.
2418         * graphite-ppl.c (new_Cloog_Domain_from_ppl_Polyhedron): New.
2419         * graphite-ppl.h (new_Cloog_Domain_from_ppl_Polyhedron): Declared.
2420
2421 2009-02-16  Sebastian Pop  <sebastian.pop@amd.com>
2422             Tobias Grosser  <grosser@fim.uni-passau.de>
2423
2424         * graphite.h (struct scop): Move params, old_ivs, loops, loop_nest,
2425         liveout_renames, add_params fields...
2426         (struct sese): ... here.
2427         (SESE_PARAMS, SESE_LOOPS, SESE_LOOP_NEST, SESE_ADD_PARAMS,
2428         SESE_PARAMS, SESE_OLDIVS, SESE_LIVEOUT_RENAMES): New.
2429
2430 2009-02-16  Sebastian Pop  <sebastian.pop@amd.com>
2431             Tobias Grosser  <grosser@fim.uni-passau.de>
2432
2433         * graphite.c (print_scop): Do not print the CLooG program.
2434         (new_scop, free_scop, initialize_cloog_names, build_scop_context,
2435         build_cloog_prog, gloog): Don't use SCOP_PROG.
2436         (find_transform): Renamed scop_to_clast.
2437         (print_generated_program, debug_generated_program): New.
2438         (graphite_transform_loops): Adapt to new interface.
2439         * graphite.h (struct scop): Remove program field.
2440         (SCOP_PROG): Removed.
2441         (print_generated_program, debug_generated_program): Declared.
2442
2443 2009-02-16  Sebastian Pop  <sebastian.pop@amd.com>
2444
2445         * graphite-data-ref.c (schedule_precedes_p, schedule_same_p): New.
2446         (statement_precedes_p): Use schedule_same_p and schedule_precedes_p.
2447         * graphite.c (gbb_compare, schedule_to_scattering, print_graphite_bb,
2448         free_graphite_bb, build_scop_canonical_schedules,
2449         graphite_trans_bb_strip_mine, graphite_trans_scop_block): Static
2450         schedules are now represented using a ppl_Linear_Expression_t.
2451         * graphite.h (struct graphite_bb): Same.
2452         * graphite-ppl.c (ppl_lexico_compare_linear_expressions): New.
2453         * graphite-ppl.h (ppl_lexico_compare_linear_expressions): Declared.
2454
2455 2009-02-15  Sebastian Pop  <sebastian.pop@amd.com>
2456
2457         * graphite.c: Free local memory.
2458         * graphite-ppl.c: Same.
2459
2460 2009-02-15  Sebastian Pop  <sebastian.pop@amd.com>
2461
2462         * graphite.c (const_column_index, get_first_matching_sign_row_index,
2463         get_lower_bound_row, get_upper_bound_row, copy_constraint,
2464         swap_constraint_variables, scale_constraint_variable): Removed.
2465         (graphite_trans_bb_strip_mine): Remove pong.
2466         * graphite-ppl.c: Include missing header files.
2467         (set_inhomogeneous, set_coef, shift_poly, ppl_strip_loop): New.
2468         * graphite-ppl.h (ppl_strip_loop): Declared.
2469         * Makefile.in (graphite-ppl.o): Adjust dependences.
2470
2471 2009-02-14  Sebastian Pop  <sebastian.pop@amd.com>
2472
2473         * graphite.c (build_loop_iteration_domains): Remove ping pong.
2474         (build_scop_iteration_domain): Same.
2475
2476 2009-02-13  Sebastian Pop  <sebastian.pop@amd.com>
2477
2478         * graphite.c (scan_tree_for_params, add_conditions_to_domain): Remove
2479         ping pong.
2480         (add_value_to_dim, scan_tree_for_params_right_scev,
2481         scan_tree_for_params_int): New.
2482         * graphite-ppl.c (oppose_constraint): New.
2483         (insert_constraint_into_matrix): Implement missing cases.
2484         * graphite-ppl.h (insert_constraint_into_matrix): Declared.
2485
2486 2009-02-13  Sebastian Pop  <sebastian.pop@amd.com>
2487
2488         * graphite.c (graphite_trans_bb_move_loop): Remove ping pong,
2489         use ppl_move_dimension.
2490
2491 2009-02-12  Sebastian Pop  <sebastian.pop@amd.com>
2492
2493         * graphite-data-ref.c: Domains are now ppl_Polyhedra_t.
2494         * graphite.c: Same.
2495         * graphite.h: Same.
2496         * graphite-ppl.c: Same.
2497         * graphite-ppl.h: Same.
2498
2499 2009-02-12  Sebastian Pop  <sebastian.pop@amd.com>
2500
2501         Revert last 3 commits.
2502
2503 2009-02-10  Sebastian Pop  <sebastian.pop@amd.com>
2504
2505         * graphite.c (scan_tree_for_params, add_conditions_to_domain): Remove
2506         ping pong.
2507         (add_value_to_dim, scan_tree_for_params_right_scev,
2508         scan_tree_for_params_int): New.
2509         * graphite-ppl.c (oppose_constraint): New.
2510         (insert_constraint_into_matrix): Implement missing cases.
2511         * graphite-ppl.h (insert_constraint_into_matrix): Declared.
2512
2513 2009-02-10  Sebastian Pop  <sebastian.pop@amd.com>
2514
2515         * graphite.c (graphite_trans_bb_move_loop): Remove unused variables.
2516
2517 2009-02-10  Sebastian Pop  <sebastian.pop@amd.com>
2518             Tobias Grosser  <grosser@fim.uni-passau.de>
2519
2520         * graphite.c (graphite_trans_bb_move_loop): Remove ping pong,
2521         use ppl_move_dimension.
2522         * graphite-ppl.c (ppl_move_dimension): New.
2523         * graphite-ppl.h (ppl_move_dimension): Declared.
2524
2525 2009-02-10  Sebastian Pop  <sebastian.pop@amd.com>
2526
2527         * graphite.c: Do not include cloog/cloog.h.
2528         (print_graphite_bb): Remove ping pong, call PPL print function.
2529
2530 2009-02-10  Tobias Grosser  <grosser@fim.uni-passau.de>
2531
2532         * Makefile.in (OBJS-common): Add graphite-ppl.o.
2533         (graphite.o): Add dependence on graphite-ppl.h.
2534         (graphite-ppl.o): New.
2535         (graphite-data-ref.c): Ping pong between PPL data structures
2536         and matrices.
2537         * graphite-ppl.c: New.
2538         * graphite-ppl.h: New.
2539         * graphite.c: Include graphite-ppl.h.
2540         (print_graphite_bb, add_conditions_to_domain, build_cloog_prog,
2541         graphite_trans_bb_move_loop, graphite_trans_bb_strip_mine):
2542         Ping pong between PPL data structures and matrices.
2543         (new_graphite_bb): Create a PPL constraint system.
2544         Call ppl_delete_Constraint_System instead of cloog_matrix_free.
2545         (build_loop_iteration_domains): Use PPL functions.
2546         * graphite.h: Include graphite-ppl.h.  Fix comments.
2547         (graphite_bb): Use a ppl_Constraint_System_t instead of
2548         CloogMatrix for representing the domain.
2549         (scop): Remove static_schedule.
2550         (gbb_nb_loops): Ping pong between PPL data structures and matrices.
2551
2552 2009-02-06  Sebastian Pop  <sebastian.pop@amd.com>
2553
2554         * graphite.c: Fix some comments.
2555
2556 2009-02-05  Sebastian Pop  <sebastian.pop@amd.com>
2557
2558         PR middle-end/38953
2559         * graphite.c (if_region_set_false_region): After moving a region
2560         in the false branch of a condition, remove the empty dummy
2561         basic block.
2562         (gloog): Remove wrong fix for PR38953.
2563
2564 2009-02-03  Tobias Grosser  <grosser@fim.uni-passau.de>
2565
2566         * graphite.c (bb_in_sese_p, sese_build_livein_liveouts_use,
2567         sese_build_livein_liveouts_bb, sese_build_livein_liveouts,
2568         register_bb_in_sese, new_sese, free_sese): Moved.
2569         (dot_scop_1, build_scop_loop_nests, build_loop_iteration_domains,
2570         outermost_loop_in_scop, build_scop_iteration_domain,
2571         expand_scalar_variables_ssa_name, get_vdef_before_scop,
2572         limit_scops): Use bb_in_sese_p instead of bb_in_scop_p.
2573         Use loop_in_sese_p instead of loop_in_scop_p.
2574         (new_graphite_bb, new_scop, gloog): Do not initialize SCOP_BBS_B.
2575         (free_scop): Do not free SCOP_BBS_B.
2576         (nb_loops_around_loop_in_scop, nb_loops_around_gb,
2577         ref_nb_loops): Moved here...
2578         * graphite.h (ref_nb_loops): ... from here.
2579         (struct scop): Remove bbs_b bitmap.
2580         (SCOP_BBS_B, bb_in_scop_p, loop_in_scop_p): Removed.
2581         * testsuite/gcc.dg/graphite/scop-19.c: New
2582
2583 2009-02-03  Tobias Grosser  <grosser@fim.uni-passau.de>
2584
2585         * graphite.c (scopdet_basic_block_info): Fix bug in scop
2586         detection.
2587
2588 2009-01-30  Tobias Grosser  <grosser@fim.uni-passau.de>
2589
2590         * graphite.c (new_loop_to_cloog_loop_str, hash_loop_to_cloog_loop,
2591         eq_loop_to_cloog_loop): Remove.
2592         (new_scop, free_scop): Remove SCOP_LOOP2CLOOG_LOOP.
2593         * graphite.h (struct scop): Remove loop2cloog_loop.
2594         (loop_domain_dim, loop_iteration_vector_dim): Remove.
2595
2596 2009-01-30  Tobias Grosser  <grosser@fim.uni-passau.de>
2597
2598         * opts.c (decode_options): Only add graphite options to O2
2599         if we compile with graphite enabled.
2600
2601 2009-01-26  Sebastian Pop  <sebastian.pop@amd.com>
2602
2603         * Merge from mainline (r143163:143684).
2604
2605 2009-01-26  Sebastian Pop  <sebastian.pop@amd.com>
2606
2607         * graphite.c (debug_value): Removed.
2608         * graphite.h (debug_value): Removed.
2609
2610 2009-01-23  Sebastian Pop  <sebastian.pop@amd.com>
2611
2612         * passes.c (init_optimization_passes): Do not call pass_copy_prop
2613         after graphite: pass_copy_prop does not maintain a proper loop closed
2614         SSA form.  pass_copy_prop should be fixed.
2615
2616 2009-01-23  Sebastian Pop  <sebastian.pop@amd.com>
2617
2618         * graphite.c (scop_adjust_phis_for_liveouts): Fix warning.
2619
2620 2009-01-23  Sebastian Pop  <sebastian.pop@amd.com>
2621
2622         * graphite.c (graphite_verify): Add a call to verify_loop_closed_ssa.
2623         (gloog): Split the exit of the scop when the scop exit is a loop exit.
2624         (graphite_transform_loops): Only call cleanup_tree_cfg if gloog
2625         changed the CFG.
2626
2627 2009-01-20  Sebastian Pop  <sebastian.pop@amd.com>
2628
2629         * graphite.c (gloog): Return true when code gen succeeded.
2630         (graphite_transform_loops): Do not call cleanup_tree_cfg if
2631         the code of the function did not changed.  After cleanup_tree_cfg
2632         call rewrite_into_loop_closed_ssa to maintain the loop closed ssa
2633         form.
2634
2635 2009-01-19  Sebastian Pop  <sebastian.pop@amd.com>
2636
2637         * graphite.c (stmt_simple_for_scop_p): Also handle cases when
2638         gimple_call_lhs is NULL.
2639
2640 2009-01-16  Sebastian Pop  <sebastian.pop@amd.com>
2641             Tobias Grosser  <tobi.grosser@amd.com>
2642
2643         * graphite.c (graphite_trans_scop_block): Do not block single
2644         nested loops.
2645
2646 2009-01-15  Sebastian Pop  <sebastian.pop@amd.com>
2647             Tobias Grosser  <tobi.grosser@amd.com>
2648
2649         * graphite.c (build_scop_canonical_schedules): Start schedules at
2650         zero.
2651
2652 2009-01-15  Sebastian Pop  <sebastian.pop@amd.com>
2653             Tobias Grosser  <tobi.grosser@amd.com>
2654
2655         * graphite.c (compare_prefix_loops): New.
2656         (build_scop_canonical_schedules): Rewritten.
2657         (graphite_transform_loops): Move build_scop_canonical_schedules
2658         after build_scop_iteration_domain.
2659
2660 2009-01-14  Sebastian Pop  <sebastian.pop@amd.com>
2661             Tobias Grosser  <tobi.grosser@amd.com>
2662
2663         * graphite.c (add_conditions_to_domain): Add the loops to
2664         the dimension of the iteration domain.  Do copy the domain
2665         only when it exists.
2666         (build_scop_conditions_1): Do not call add_conditions_to_domain.
2667         (add_conditions_to_constraints): New.
2668         (can_generate_code_stmt, can_generate_code): Removed.
2669         (gloog): Do not call can_generate_code.
2670         (graphite_transform_loops): Call add_conditions_to_constraints
2671         after building the iteration domain.
2672
2673 2009-01-14  Sebastian Pop  <sebastian.pop@amd.com>
2674             Tobias Grosser  <tobi.grosser@amd.com>
2675             Jan Sjodin  <jan.sjodin@amd.com>
2676
2677         * graphite.c (scan_tree_for_params): On substractions negate
2678         all the coefficients of the term.
2679         (clast_to_gcc_expression_red): New.  Handle reduction expressions
2680         of more than two operands.
2681         (clast_to_gcc_expression): Call clast_to_gcc_expression_red.
2682         (get_vdef_before_scop): Handle also the case of default definitions.
2683
2684 2009-01-14  Sebastian Pop  <sebastian.pop@amd.com>
2685
2686         PR middle-end/38431
2687         * graphite.c (get_vdef_before_scop, scop_adjust_vphi): New.
2688         (scop_adjust_phis_for_liveouts): Call scop_adjust_vphi.
2689         (gloog): Do not call cleanup_tree_cfg.
2690         (graphite_transform_loops): Call cleanup_tree_cfg after all
2691         scops have been code generated.
2692
2693 2009-01-13  Sebastian Pop  <sebastian.pop@amd.com>
2694
2695         * passes.c (init_optimization_passes): Schedule after
2696         graphite transforms pass_copy_prop, pass_dce_loop and pass_lim.
2697
2698 2009-01-13  Sebastian Pop  <sebastian.pop@amd.com>
2699
2700         * graphite.c (expand_scalar_variables_stmt): Do not pass loop_p.
2701         Fix comment.
2702         (expand_scalar_variables_ssa_name): Do not pass loop_p.  Fix comment.
2703         Set the type of an expression to the type of its assign statement.
2704         (expand_scalar_variables_expr):  Do not pass loop_p.
2705         Fix comment.  Stop recursion on tcc_constant or tcc_declaration.
2706         (copy_bb_and_scalar_dependences): Do not pass loop_p.
2707         (translate_clast): Update call to copy_bb_and_scalar_dependences.
2708
2709 2009-01-11  Sebastian Pop  <sebastian.pop@amd.com>
2710
2711         * graphite.c (expand_scalar_variables_ssa_name): Set the type of
2712         an expression to the gimple_expr_type of its assign statement.
2713         (expand_scalar_variables_expr): Stop recursion on tcc_constant
2714         or tcc_declaration.
2715
2716 2009-01-11  Sebastian Pop  <sebastian.pop@amd.com>
2717
2718         PR tree-optimization/38786
2719         * testsuite/gcc.dg/graphite/pr38786.c: New.
2720         * graphite.c (expand_scalar_variables_ssa_name): New, outlined from
2721         the SSA_NAME case of expand_scalar_variables_expr.
2722         (expand_scalar_variables_expr): Also gather the scalar computation
2723         used to index the memory access.
2724         (expand_scalar_variables_stmt): Pass to expand_scalar_variables_expr
2725         the gimple_stmt_iterator where it inserts new code.
2726
2727 2009-01-10  Sebastian Pop  <sebastian.pop@amd.com>
2728
2729         * testsuite/gcc.dg/graphite/block-3.c: Fix compile error on 32bit.
2730
2731 2009-01-10  Sebastian Pop  <sebastian.pop@amd.com>
2732
2733         * opts.c (decode_options): Enable flag_graphite_identity and
2734         flag_loop_block in -O2 and above.
2735
2736 2009-01-08  Sebastian Pop  <sebastian.pop@amd.com>
2737
2738         * libjava/classpath/lib/gnu/java/awt/peer/gtk/GtkMouseInfoPeer.class:
2739         Fix merge problem: replace with the file from trunk.
2740
2741 2009-01-08  Sebastian Pop  <sebastian.pop@amd.com>
2742
2743         * Merge from mainline (r141727:143163).
2744
2745 2009-01-07  Sebastian Pop  <sebastian.pop@amd.com>
2746             Jan Sjodin  <jan.sjodin@amd.com>
2747
2748         PR tree-optimization/38559
2749         * testsuite/gcc.dg/graphite/pr38559.c: New.
2750
2751         * graphite.c (debug_value, copy_constraint,
2752         swap_constraint_variables, scale_constraint_variable, ): New.
2753         (get_lower_bound, get_upper_bound): Removed.
2754         (graphite_trans_bb_strip_mine): Clean up this code that works
2755         only for constant number of iterations.  Fully copy upper and
2756         lower bound constraints, not only the constant part of them.
2757         * graphite.h (debug_value): Declared.
2758
2759 2009-01-06  Jan Sjodin  <jan.sjodin@amd.com>
2760
2761         PR tree-optimization/38492
2762         PR tree-optimization/38498
2763         * tree-check.c (operator_is_linear, scev_is_linear_expression): New.
2764         * tree-chrec.h (scev_is_linear_expression): Declared.
2765         * graphite.c (graphite_cannot_represent_loop_niter): New.
2766         (scopdet_basic_block_info): Call graphite_cannot_represent_loop_niter.
2767         (graphite_loop_normal_form): Use gcc_assert.
2768         (scan_tree_for_params): Use CASE_CONVERT.
2769         (phi_node_is_iv, bb_contains_non_iv_scalar_phi_nodes): New.
2770         (build_scop_conditions_1): Call bb_contains_non_iv_scalar_phi_nodes.
2771         Use gcc_assert.  Discard scops that contain unhandled cases.
2772         (build_scop_conditions): Return a boolean status for unhandled cases.
2773         (strip_mine_profitable_p): Print the loop number, not its depth.
2774         (is_interchange_valid): Pass the depth of the loop nest, don't
2775         recompute it wrongly.
2776         (graphite_trans_bb_block): Same.
2777         (graphite_trans_bb_block): Print tentative of loop blocking.
2778         (graphite_trans_scop_block): Do not print that the loop has been
2779         blocked.
2780         (graphite_transform_loops): Do not handle scops that contain condition
2781         scalar phi nodes.
2782
2783         * testsuite/gcc.dg/graphite/pr38500.c: Fixed warning as committed
2784         in trunk.
2785         * testsuite/gcc.dg/graphite/block-0.c: Update test.
2786         * testsuite/gcc.dg/graphite/block-1.c: Same.
2787         * testsuite/gcc.dg/graphite/block-2.c: Remove xfail and test for
2788         blocking.
2789         * testsuite/gcc.dg/graphite/block-4.c: Remove test for strip mine.
2790         * testsuite/gcc.dg/graphite/block-3.c: New.
2791         * testsuite/gcc.dg/graphite/pr38498.c: New.
2792
2793 2008-12-22  Harsha Jagasia  <harsha.jagasia@amd.com>
2794
2795         PR tree-optimization/38510
2796         * gcc.dg/graphite/pr38510.c: New.
2797         * graphite.c (recompute_all_dominators): Call mark_irreducible_loops.
2798           (translate_clast): Call recompute_all_dominators before
2799           graphite_verify.
2800           (gloog): Call recompute_all_dominators before graphite_verify.
2801
2802 2008-12-12  Sebastian Pop  <sebastian.pop@amd.com>
2803
2804         PR tree-optimization/38492
2805         * graphite.c (rename_map_elt, debug_rename_elt,
2806         debug_rename_map_1, debug_rename_map, new_rename_map_elt,
2807         rename_map_elt_info, eq_rename_map_elts,
2808         get_new_name_from_old_name, bb_in_sese_p): Moved around.
2809         (sese_find_uses_to_rename_use): Renamed sese_build_livein_liveouts_use.
2810         (sese_find_uses_to_rename_bb): Renamed sese_build_livein_liveouts_bb.
2811         (sese_build_livein_liveouts): New.
2812         (new_sese, free_sese): New.
2813         (new_scop): Call new_sese.
2814         (free_scop): Call free_sese.
2815         (rename_variables_from_edge, rename_phis_end_scop): Removed.
2816         (register_old_new_names): Renamed register_old_and_new_names.
2817         (register_scop_liveout_renames, add_loop_exit_phis,
2818         insert_loop_close_phis, struct igp,
2819         default_liveout_before_guard, add_guard_exit_phis,
2820         insert_guard_phis, copy_renames): New.
2821         (translate_clast): Call insert_loop_close_phis and insert_guard_phis.
2822         (sese_add_exit_phis_edge): Renamed scop_add_exit_phis_edge.
2823         (rewrite_into_sese_closed_ssa): Renamed scop_insert_phis_for_liveouts.
2824         (scop_adjust_phis_for_liveouts): New.
2825         (gloog): Call scop_adjust_phis_for_liveouts.
2826
2827         * graphite.h (struct sese): Documented.  Added fields liveout,
2828         num_ver and livein.
2829         (SESE_LIVEOUT, SESE_LIVEIN, SESE_LIVEIN_VER, SESE_NUM_VER): New.
2830         (new_sese, free_sese, sese_build_livein_liveouts): Declared.
2831         (struct scop): Added field liveout_renames.
2832         (SCOP_LIVEOUT_RENAMES): New.
2833
2834 2008-12-11  Sebastian Pop  <sebastian.pop@amd.com>
2835
2836         PR tree-optimization/38409
2837         * gcc.dg/graphite/pr38409.c: New.
2838         * graphite.c (nb_reductions_in_loop): Use simple_iv.
2839
2840 2008-12-11  Sebastian Pop  <sebastian.pop@amd.com>
2841
2842         * graphite.c (gcc_type_for_cloog_iv): By default return
2843         integer_type_node.
2844         (graphite_create_new_loop): Don't fold_convert the already
2845         fold_convert-ed expression.
2846
2847 2008-12-11  Harsha Jagasia  <harsha.jagasia@amd.com>
2848
2849         PR tree-optimization/38446
2850         * gcc.dg/graphite/pr38446.c: New.
2851         * graphite.c (register_bb_in_sese): New.
2852         (bb_in_sese_p): Check if bb belongs to sese region by explicitly
2853         looking at the bbs in the region.
2854         * graphite.h (sese): Add region_basic_blocks pointer set to
2855         structure and initialize at the time of defining new scop.
2856
2857 2008-12-11  Tobias Grosser  <grosser@fim.uni-passau.de>
2858
2859         * graphite.c (new_graphite_bb): Initialize GBB_STATIC_SCHEDULE.
2860         (find_params_in_bb): Do not free data refs.
2861         (free_graphite_bb): Add FIXME on disabled free_data_refs.
2862
2863 2008-12-11  Sebastian Pop  <sebastian.pop@amd.com>
2864
2865         * testsuite/gcc.dg/graphite/scop-16.c: Test only scop specific info.
2866         * testsuite/gcc.dg/graphite/scop-17.c: Same.
2867         * testsuite/gcc.dg/graphite/block-5.c: New.
2868         * testsuite/gcc.dg/graphite/block-6.c: New.
2869         * testsuite/gcc.dg/graphite/pr37485.c: Clean dump file after.
2870         * testsuite/gcc.dg/graphite/pr37684.c: Same.
2871         * testsuite/gcc.dg/graphite/block-2.c: Same.
2872
2873         * graphite.c (struct ivtype_map_elt): New.
2874         (debug_ivtype_elt, debug_ivtype_map_1, debug_ivtype_map,
2875         new_ivtype_map_elt, ivtype_map_elt_info, eq_ivtype_map_elts,
2876         gcc_type_for_cloog_iv): New.
2877         (loop_iv_stack_patch_for_consts): Use the type of the induction
2878         variable from the original loop, except for the automatically
2879         generated loops, i.e., in the case of a strip-mined loop, in
2880         which case there is no original loop: in that case just use
2881         integer_type_node.
2882         (new_graphite_bb): Initialize GBB_CLOOG_IV_TYPES.
2883         (free_graphite_bb): Free GBB_CLOOG_IV_TYPES.
2884         (clast_name_to_gcc): Accept params to be NULL.
2885         (clast_to_gcc_expression): Take an extra parameter for the type.
2886         Convert to that type all the expressions built by this function.
2887         (gcc_type_for_clast_expr, gcc_type_for_clast_eq): New.
2888         (graphite_translate_clast_equation): Compute the type of the
2889         clast_equation before translating its LHS and RHS.
2890         (clast_get_body_of_loop, gcc_type_for_iv_of_clast_loop): New.
2891         (graphite_create_new_loop): Compute the type of the induction
2892         variable before translating the lower and upper bounds and before
2893         creating the induction variable.
2894         (rename_variables_from_edge, rename_phis_end_scop): New.
2895         (copy_bb_and_scalar_dependences): Call rename_phis_end_scop.
2896         (sese_add_exit_phis_edge): Do not use integer_zero_node.
2897         (find_cloog_iv_in_expr, compute_cloog_iv_types_1,
2898         compute_cloog_iv_types): New.
2899         (gloog): Call compute_cloog_iv_types before starting the
2900         translation of the clast.
2901
2902         * graphite.h (struct graphite_bb): New field cloog_iv_types.
2903         (GBB_CLOOG_IV_TYPES): New.
2904         (debug_ivtype_map): Declared.
2905         (oldiv_for_loop): New.
2906
2907 2008-12-10  Tobias Grosser  <grosser@fim.uni-passau.de>
2908
2909         PR middle-end/38459
2910         * graphite.c (new_scop): Initialize SCOP_ADD_PARAMS.
2911         (param_index): Assert if parameter is not know after parameter
2912         detection.
2913         (find_params_in_bb): Detect params directly in GBB_CONDITIONS.
2914         (find_scop_parameters): Mark, that we have finished parameter
2915         detection.
2916         (graphite_transform_loops): Move condition detection before parameter
2917         detection.
2918         * graphite.h (struct scop): Add SCOP_ADD_PARAMS.
2919         * testsuite/gfortran.dg/graphite/pr38459.f90: New.
2920
2921 2008-12-09  Tobias Grosser  <grosser@fim.uni-passau.de>
2922
2923         * graphite.c (graphite_transform_loops): Always call find_transform ()
2924         in ENABLE_CHECKING.  So we test these code paths, even if we do not
2925         generate code.
2926
2927 2008-12-09  Tobias Grosser  <grosser@fim.uni-passau.de>
2928
2929         * graphite.c (print_graphite_bb): Fix printing to file != dump_file.
2930         (print_scop): Ditto.
2931
2932 2008-12-08  Tobias Grosser  <grosser@fim.uni-passau.de>
2933
2934         PR middle-end/38084
2935         Fix testsuite/gfortran.dg/graphite/id-3.f90.
2936         * graphite.c (scopdet_basic_block_info): Fix bug that found some
2937         regions more than once.
2938
2939 2008-12-03  Sebastian Pop  <sebastian.pop@amd.com>
2940
2941         Fix testsuite/gfortran.dg/graphite/id-4.f90.
2942         * graphite.c (scan_tree_for_params): Do not compute the multiplicand
2943         when not needed.
2944
2945 2008-12-03  Sebastian Pop  <sebastian.pop@amd.com>
2946
2947         Fix testsuite/gfortran.dg/graphite/id-1.f90.
2948         * graphite.c (gmp_cst_to_tree): Pass the type in parameter.
2949         (loop_iv_stack_patch_for_consts): Update use of gmp_cst_to_tree.
2950         (max_precision_type): New.
2951         (value_clast): Removed.
2952         (clast_to_gcc_expression): Be more careful to types of expressions.
2953         Use max_precision_type and update use of gmp_cst_to_tree.
2954         (graphite_translate_clast_equation): Use max_precision_type.
2955         (graphite_create_guard_cond_expr): Do not use integer_type_node,
2956         use the type of the condition.
2957         (graphite_create_new_loop): Do not use integer_type_node, use the
2958         max_precision_type of lb and ub.
2959
2960 2008-12-03  Sebastian Pop  <sebastian.pop@amd.com>
2961
2962         * graphite.c (build_scops_1): Initialize open_scop.exit
2963         and sinfo.last.
2964
2965 2008-12-02  Sebastian Pop  <sebastian.pop@amd.com>
2966
2967         * testsuite/gcc.dg/graphite/pr38084.c: New.
2968         * testsuite/gfortran.dg/graphite/id-1.f90: New.
2969         * testsuite/gfortran.dg/graphite/id-2.f90: New.
2970         * testsuite/gfortran.dg/graphite/id-3.f90: New.
2971         * testsuite/gfortran.dg/graphite/id-4.f90: New.
2972         * testsuite/gfortran.dg/graphite/pr37857.f90: New.
2973
2974 2008-12-02  Sebastian Pop  <sebastian.pop@amd.com>
2975             Jan Sjodin  <jan.sjodin@amd.com>
2976             Harsha Jagasia  <harsha.jagasia@amd.com>
2977
2978         PR middle-end/37852
2979         PR middle-end/37883
2980         PR middle-end/37928
2981         PR middle-end/37980
2982         PR middle-end/38038
2983         PR middle-end/38039
2984         PR middle-end/38073
2985         PR middle-end/38083
2986         PR middle-end/38125
2987
2988         * testsuite/gcc.dg/graphite/pr38073.c: New.
2989         * testsuite/gcc.dg/graphite/pr37928.c: New.
2990         * testsuite/gcc.dg/graphite/pr37883.c: New.
2991         * testsuite/gcc.dg/graphite/pr38125.c: New.
2992         * testsuite/gfortran.dg/graphite/pr38083.f90: New.
2993         * testsuite/gfortran.dg/graphite/pr37852.f90: New.
2994         * testsuite/gfortran.dg/graphite/pr37980.f90: New.
2995
2996         * testsuite/gcc.dg/graphite/scop-18.c: Remove reduction, test for
2997         the number of detected scops.  Copy exact same test for loop
2998         blocking...
2999         * testsuite/gcc.dg/graphite/block-1.c: Fix the number of expected
3000         loops to be blocked as reductions are not handled.
3001         * testsuite/gcc.dg/graphite/block-4.c: ...here.  New.
3002
3003         * tree-phinodes.c (remove_phi_nodes): New, extracted from...
3004         * tree-cfg.c (remove_phi_nodes_and_edges_for_unreachable_block):
3005         ...here.
3006         * tree-flow.h (remove_phi_nodes, canonicalize_loop_ivs): Declared.
3007         * Makefile.in (graphite.o): Depend on value-prof.h.
3008         (graphite.o-warn): Removed -Wno-error.
3009         * tree-parloops.c (canonicalize_loop_ivs): Allow reduction_list
3010         to be a NULL pointer.  Call update_stmt.  Return the newly created
3011         cannonical induction variable.
3012
3013         * graphite.h (debug_rename_map): Declared.  Fix some comments.
3014
3015         * graphite.c: Reimplement the code generation from graphite to gimple.
3016         Include value-prof.h.
3017         (loop_iv_stack_get_iv): Do not return NULL for constant substitutions.
3018         (get_old_iv_from_ssa_name): Removed.
3019         (graphite_stmt_p): New.
3020         (new_graphite_bb): Test for useful statements before building a
3021         graphite statement for the basic block.
3022         (free_graphite_bb): Do not free GBB_DATA_REFS: this is a bug
3023         in free_data_ref that calls BITMAP_FREE (DR_VOPS (dr)) without
3024         reason.
3025         (recompute_all_dominators, graphite_verify,
3026         nb_reductions_in_loop, graphite_loop_normal_form): New.
3027         (scop_record_loop): Call graphite_loop_normal_form.
3028         (build_scop_loop_nests): Iterate over all the blocks of the
3029         function instead of relying on the incomplete information from
3030         SCOP_BBS.  Return the success of the operation.
3031         (find_params_in_bb): Use the data from GBB_DATA_REFS.
3032         (add_bb_domains): Removed.
3033         (build_loop_iteration_domains): Don't call add_bb_domains.
3034         Add the iteration domain only to the basic blocks that have been
3035         translated to graphite.
3036         (build_scop_conditions_1): Add constraints only if the basic
3037         block have been translated to graphite.
3038         (build_scop_data_accesses): Completely disabled until data
3039         dependence is correctly implemented.
3040         (debug_rename_elt, debug_rename_map_1, debug_rename_map): New.
3041         (remove_all_edges_1, remove_all_edges): Removed.
3042         (get_new_name_from_old_name): New.
3043         (graphite_rename_variables_in_stmt): Renamed
3044         rename_variables_in_stmt.  Call get_new_name_from_old_name.
3045         Use replace_exp and update_stmt.
3046         (is_old_iv): Renamed is_iv.
3047         (expand_scalar_variables_stmt): Extra parameter for renaming map.
3048         Use replace_exp and update_stmt.
3049         (expand_scalar_variables_expr): Same.  Use the map to get the
3050         new names for the renaming of induction variables and for the
3051         renaming of variables after a basic block has been copied.
3052         (expand_scalar_variables): Same.
3053         (graphite_rename_variables): Renamed rename_variables.
3054         (move_phi_nodes): Removed.
3055         (get_false_edge_from_guard_bb): New.
3056         (build_iv_mapping): Do not insert the induction variable of a
3057         loop in the renaming iv map if the basic block does not belong
3058         to that loop.
3059         (register_old_new_names, graphite_copy_stmts_from_block,
3060         copy_bb_and_scalar_dependences): New.
3061         (translate_clast): Heavily reimplemented: copy basic blocks,
3062         do not move them.  Finally, in call cleanup_tree_cfg in gloog.
3063         At each translation step call graphite_verify ensuring the
3064         consistency of the SSA, loops and dominators information.
3065         (collect_virtual_phis, find_vdef_for_var_in_bb,
3066         find_vdef_for_var_1, find_vdef_for_var,
3067         patch_phis_for_virtual_defs): Removed huge hack.
3068         (mark_old_loops, remove_dead_loops, skip_phi_defs,
3069         collect_scop_exit_phi_args, patch_scop_exit_phi_args,
3070         gbb_can_be_ignored, scop_remove_ignoreable_gbbs, ): Removed.
3071         (remove_sese_region, ifsese, if_region_entry, if_region_exit,
3072         if_region_get_condition_block, if_region_set_false_region,
3073         create_if_region_on_edge, move_sese_in_condition, bb_in_sese_p,
3074         sese_find_uses_to_rename_use, sese_find_uses_to_rename_bb,
3075         sese_add_exit_phis_edge, sese_add_exit_phis_var,
3076         rewrite_into_sese_closed_ssa): New.
3077         (gloog): Remove dead code.  Early return if code cannot be
3078         generated.  Call cleanup_tree_cfg once the scop has been code
3079         generated.
3080         (graphite_trans_scop_block, graphite_trans_loop_block): Do not
3081         block loops with less than two loops.
3082         (graphite_apply_transformations): Remove the call to
3083         scop_remove_ignoreable_gbbs.
3084         (limit_scops): When build_scop_loop_nests fails, continue on
3085         the next scop.  Fix open_scop.entry.
3086         (graphite_transform_loops): Call recompute_all_dominators: force the
3087         recomputation of correct CDI_DOMINATORS and CDI_POST_DOMINATORS.
3088         Call initialize_original_copy_tables and free_original_copy_tables
3089         to be able to copy basic blocks during code generation.
3090         When build_scop_loop_nests fails, continue on next scop.
3091         (value_clast): New union.
3092         (clast_to_gcc_expression): Fix type cast warning.
3093
3094 2008-11-09  Sebastian Pop  <sebastian.pop@amd.com>
3095
3096         * Merge from mainline (r140838:141727).
3097
3098 2008-11-05  Tobias Grosser  <grosser@fim.uni-passau.de>
3099
3100         PR middle-end/37833
3101
3102         * graphite.c (scan_tree_for_params): Add POINTER_PLUS_EXPR.
3103
3104 2008-11-05  Tobias Grosser  <grosser@fim.uni-passau.de>
3105
3106         PR middle-end/37943
3107
3108         * graphite.c (scopdet_basic_block_info): Fix loops with multiple
3109         exits and conditions.
3110         * testsuite/gcc.dg/graphite/pr37943.c: New.
3111
3112 2008-10-23  Tobias Grosser  <grosser@fim.uni-passau.de>
3113
3114         PR middle-end/37886
3115         * graphite.c (gloog): Replace EXIT_BLOCK_PTR with scop exit.
3116
3117 2008-10-23  Tobias Grosser  <grosser@fim.uni-passau.de>
3118
3119         * doc/invoke.texi: Fix spaces.
3120
3121 2008-10-22  Sebastian Pop  <sebastian.pop@amd.com>
3122
3123         PR tree-optimization/37891
3124         Reverted last commit.
3125         * graphite.c (create_single_entry_edge): Set
3126         EDGE_IRREDUCIBLE_LOOP and BB_IRREDUCIBLE_LOOP.
3127
3128 2008-10-21  Sebastian Pop  <sebastian.pop@amd.com>
3129             Mitul Thakkar  <mitul.thakkar@amd.com>
3130
3131         * graphite.c (create_single_entry_edge): Set
3132         EDGE_IRREDUCIBLE_LOOP and BB_IRREDUCIBLE_LOOP.
3133
3134 2008-10-16  Tobias Grosser  <grosser@fim.uni-passau.de>
3135
3136         * doc/invoke.texi: Add -fgraphite-identity.
3137         * graphite.c (graphite_apply_transformations): Check for
3138         -fgraphite-identity.
3139         * toplev.c (process_options): Add flag_graphite_identity.
3140         * tree-ssa-loop.c: Add flag_graphite_identity.
3141
3142 2008-10-14  Sebastian Pop  <sebastian.pop@amd.com>
3143
3144         Undo changes from 2008-10-02:
3145         * tree-ssa-loop-ivopts.c (rewrite_use_nonlinear_expr): Convert
3146         operand type when copying the operand to a variable of different type.
3147         * cfgloopmanip.c (create_empty_loop_on_edge): Write exit condition
3148         with the IV name after increment.
3149
3150 2008-10-14  Sebastian Pop  <sebastian.pop@amd.com>
3151             Harsha Jagasia  <harsha.jagasia@amd.com>
3152
3153         PR tree-optimization/37828
3154         * testsuite/gcc.dg/graphite/pr37828.c: New.
3155         * graphite.c (graphite_trans_loop_block): Do not loop block
3156         single nested loops.
3157
3158 2008-10-09  Harsha Jagasia  <harsha.jagasia@amd.com>
3159             Sebastian Pop  <sebastian.pop@amd.com>
3160
3161         * graphite.c (struct rename_map_elt, new_rename_map_elt,
3162         rename_map_elt_info, eq_rename_map_elts): New.
3163         (graphite_rename_ivs_stmt): Renamed graphite_rename_variables_in_stmt.
3164         (expand_scalar_variables_expr): Change parameters.
3165         (expand_scalar_variables_stmt): Same.
3166         (expand_scalar_variables): Same.
3167         (graphite_rename_ivs): Rename graphite_rename_variables.
3168         (build_iv_mapping): New.
3169         (translate_clast): Call build_iv_mapping.
3170         * graphite.h (gbb_p): New name.
3171
3172 2008-10-03  Harsha Jagasia  <harsha.jagasia@amd.com>
3173
3174         PR tree-optimization/37684
3175         * gcc.dg/graphite/pr37684.c: New.
3176         * graphite.c (exclude_component_ref): New.
3177         (is_simple_operand): Call exclude_component_ref.
3178
3179 2008-10-02  Jan Sjodin  <jan.sjodin@amd.com>
3180             Harsha Jagasia  <harsha.jagasia@amd.com>
3181
3182         PR tree-optimization/37485
3183         * gcc.dg/graphite/block-2.c: New
3184         * graphite.c (gmp_cst_to_tree): Moved.
3185         (iv_stack_entry_is_constant): New.
3186         (iv_stack_entry_is_iv): New.
3187         (loop_iv_stack_push): Renamed to loop_iv_stack_push_iv.
3188         (loop_iv_stack_insert_constant): New.
3189         (loop_iv_stack_pop): Use new datatpype.
3190         (loop_iv_stack_get_iv): Same.
3191         (loop_iv_stack_get_iv_from_name): Same.
3192         (loop_iv_stack_debug): Renamed to debug_loop_iv_stack.
3193         (loop_iv_stack_patch_for_consts): New.
3194         (loop_iv_stack_remove_constants): New.
3195         (graphite_create_new_loop): Use loop_iv_stack_push_iv.
3196         (translate_clast): Call loop_iv_stack_patch_for_consts and
3197         loop_iv_stack_remove_constants.
3198         (gloog): Use new datatype.  Redirect construction edge to end
3199         block to avoid accidental deletion.
3200         * graphite.h (enum iv_stack_entry_kind): New.  Tag for data in
3201         iv stack entry.
3202         (union iv_stack_entry_data): New.  Data in iv stack entry.
3203         (struct iv_stack_entry): New.  Datatype for iv stack entries.
3204
3205 2008-10-02  Sebastian Pop  <sebastian.pop@amd.com>
3206
3207         * tree-ssa-loop-ivopts.c (rewrite_use_nonlinear_expr): Convert
3208         operand type when copying the operand to a variable of different type.
3209
3210 2008-10-02  Sebastian Pop  <sebastian.pop@amd.com>
3211
3212         * cfgloopmanip.c (create_empty_loop_on_edge): Write exit condition
3213         with the IV name after increment.
3214
3215 2008-10-02  Sebastian Pop  <sebastian.pop@amd.com>
3216
3217         * Merge from mainline (r140164:140838).
3218
3219 2008-09-10  Konrad Trifunovic  <konrad.trifunovic@inria.fr>
3220
3221         * graphite-data-ref.c: New.
3222         * graphite.c (print_scop): Also dump the dependence graph.
3223         (bb_in_scop_p, loop_in_scop_p, nb_loops_around_gb): Moved...
3224         (new_scop): Initialize SCOP_DEP_GRAPH.
3225         (build_scop_dynamic_schedules): New.
3226         (build_access_matrix_with_af): Fixed column numbering.
3227         (graphite_transform_loops): Call build_scop_dynamic_schedules.
3228         * graphite.h: Add ifndef/define guards against multiple inclusion.
3229         (struct scop): Add dep_graph field.
3230         (SCOP_DEP_GRAPH): Defined.
3231         (ref_nb_loops): Fixed and moved to other position.
3232         (bb_in_scop_p, loop_in_scop_p, nb_loops_around_gb): ... here.
3233         (nb_loops_around_loop_in_scop): New.
3234         (graphite_dump_dependence_graph): Declared.
3235         (graphite_build_rdg_all_levels): Declared.
3236         (graphite_test_dependence): Declared.
3237         * Makefile.in (graphite-data-ref.o): New target.
3238
3239 2008-09-09  Sebastian Pop  <sebastian.pop@amd.com>
3240
3241         * Merge from mainline (139870:140164).
3242
3243 2008-09-01  Sebastian Pop  <sebastian.pop@amd.com>
3244
3245         * Merge from mainline (138275:139870).
3246         * testsuite/gcc.dg/graphite/scop-matmult.c: XFailed as one of
3247         the commits from trunk broke the niter detection.
3248
3249 2008-09-01  Sebastian Pop  <sebastian.pop@amd.com>
3250
3251         * graphite.c: Add more documentation.  Fix formatting.
3252         (debug_loop_vec, debug_oldivs, loop_iv_stack,
3253         loop_iv_stack_debug): Moved...
3254         (schedule_to_scattering): Move before use.
3255         (dot_all_scops): Include in "#if 0" the code for system
3256         call dotty.
3257
3258         * graphite.h: (debug_loop_vec, debug_oldivs, loop_iv_stack,
3259         loop_iv_stack_debug): ...here.
3260
3261 2008-08-29  Jan Sjodin  <jan.sjodin@amd.com>
3262
3263         * tree-phinodes.c (make_phi_node): Extern.
3264         (add_phi_node_to_bb): New.
3265         (create_phi_node): Call add_phi_node_to_bb.
3266         * tree-ssa-loop-ivopts.c (get_phi_with_result): New.
3267         (remove_statement): Handle case where stored phi was updated
3268         and is no longer the same.
3269         * graphite.c (is_parameter): New.
3270         (is_old_iv): New.
3271         (expand_scalar_variables_expr): New.
3272         (expand_scalar_variables_stmt): New.
3273         (expand_scalar_variables): New.
3274         (move_phi_nodes): Create new phi instead of moving old one.
3275         (translate_clast): Call expand_scalar_variables.
3276         (find_vdef_for_var_in_bb): Also scan regular definitions.
3277         (skip_phi_defs): New.
3278         (collect_scop_exit_phi_args): New.
3279         (patch_scop_exit_phi_args): New.
3280         (gloog): Patch phis after scop.
3281         * tree-flow.h: (add_phi_node_to_bb): Declared.
3282         (make_phi_node): Declared.
3283
3284 2008-08-26  Sebastian Pop  <sebastian.pop@amd.com>
3285
3286         * graphite.c (end_scop): Split the entry of the scop when it
3287         is the header of the loop in which the scop is ending.
3288         (build_scops_1, limit_scops): Update uses of end_scop.
3289
3290 2008-08-26  Sebastian Pop  <sebastian.pop@amd.com>
3291
3292         * graphite.c (dot_all_scops_1): Do not fail on uninitialized
3293         SCOP_ENTRY or SCOP_EXIT.
3294
3295 2008-08-25  Sebastian Pop  <sebastian.pop@amd.com>
3296
3297         * graphite.c (get_construction_edge): Removed.
3298         (gloog): Construction edge is the scop entry edge.
3299
3300 2008-08-25  Sebastian Pop  <sebastian.pop@amd.com>
3301
3302         * graphite.c (can_generate_for_scop): Removed.
3303         (gloog): Do not call it.
3304
3305 2008-08-25  Sebastian Pop  <sebastian.pop@amd.com>
3306
3307         * graphite.c (new_scop): Entry of a scop is an edge.
3308         Initialize SESE region.
3309         (free_scop): Free SESE region.
3310         (build_scops_1, scopdet_bb_info): Work on edges, not on bbs.
3311         (split_difficult_bb): New, split from end_scop.
3312         (end_scop): Exit of a scop is an edge.
3313         (build_scop_bbs): Never check CDI_POST_DOMINATORS: this info is
3314         not automatically updated and thus is always wrong.
3315         * graphite.h (struct sese): New.
3316         (SESE_ENTRY): New.
3317         (SESE_EXIT): New.
3318         (struct scop): New field for a SESE region.  Remove entry, exit.
3319         (SCOP_ENTRY, SCOP_EXIT): Update definitions to match same
3320         semantics as before.  Moved comment around.
3321
3322 2008-08-25  Tobias Grosser  <grosser@fim.uni-passau.de>
3323             Sebastian Pop  <sebastian.pop@amd.com>
3324
3325         * graphite.c (graphite_transform_loops): Always enable gloog
3326         and find_transform when ENABLE_CHECKING.
3327
3328 2008-08-25  Sebastian Pop  <sebastian.pop@amd.com>
3329
3330         * graphite.c (graphite_transform_loops): Move pretty printer
3331         of SCOPs before doing any transform.  Remove call to print_scops
3332         and dot_all_scops_1.
3333
3334 2008-08-25  Sebastian Pop  <sebastian.pop@amd.com>
3335
3336         * graphite.c (dump_gbb_conditions): Don't try to print NULL pointers.
3337         (print_graphite_bb): Same.
3338
3339 2008-08-25  Sebastian Pop  <sebastian.pop@amd.com>
3340
3341         * graphite.c (dot_all_scops_1): Cleanup.
3342         (move_scops): Fix comment.
3343
3344 2008-08-25  Sebastian Pop  <sebastian.pop@amd.com>
3345
3346         * graphite.c (build_scop_bbs): Revert commit 139355:
3347
3348         2008-08-20  Sebastian Pop  <sebastian.pop@amd.com>
3349                     Dwarakanath Rajagopal  <dwarak.rajagopal@amd.com>
3350
3351                 * graphite.c (build_scop_bbs): Factor up code.
3352
3353 2008-08-25  Tobias Grosser  <grosser@fim.uni-passau.de>
3354
3355         * graphite.c (gloog): Update dominator info.
3356
3357 2008-08-25  Tobias Grosser  <grosser@fim.uni-passau.de>
3358
3359         * graphite.c (remove_cond_exprs): Do not fail on empty bbs.
3360
3361 2008-08-24  Sebastian Pop  <sebastian.pop@amd.com>
3362
3363         * graphite.c (new_graphite_bb): Remove GBB_INDEX_TO_NUM_MAP
3364         initialization.
3365         (free_graphite_bb): Remove GBB_INDEX_TO_NUM_MAP free.
3366         (translate_clast): Correct formatting.
3367         * graphite.h (struct num_map): Removed.
3368         (struct graphite_bb): Remove num_map field.
3369         (GBB_INDEX_TO_NUM_MAP): Removed.
3370
3371 2008-08-24  Sebastian Pop  <sebastian.pop@amd.com>
3372
3373         * graphite.c (build_access_matrix_with_af): Fix comments.
3374         (build_scop_data_accesses): Same.
3375
3376 2008-08-24  Sebastian Pop  <sebastian.pop@amd.com>
3377
3378         * graphite.c (build_scop_data_accesses): Don't construct
3379         access matrices.  Add a FIXME and an assert condition that
3380         should pass when the access matrices will be needed.
3381
3382 2008-08-24  Sebastian Pop  <sebastian.pop@amd.com>
3383
3384         * tree-data-ref.c (stmt_simple_memref_p): Don't call
3385         really_constant_p.
3386         * graphite.c (build_graphite_bb): Renamed new_graphite_bb.
3387         Moved close by free_graphite_bb.
3388         (free_graphite_bb): Call free_data_refs.  Reset bb->aux.
3389         (new_scop): Move close by free_scop.
3390         (graphite_transform_loops): Avoid linear scan to reset bb->aux.
3391
3392 2008-08-22  Jan Sjodin  <jan.sjodin@amd.com>
3393
3394         * cfgloopmanip.c (create_empty_if_region_on_edge): New.
3395         * graphite.c (clast_to_gcc_expression): Call gmp_cst_to_tree
3396         instead of recursive call.
3397         (graphite_translate_clast_equation): New.
3398         (graphite_create_guard_cond_expr): New.
3399         (graphite_create_new_guard): New.
3400         (get_stack_index_from_iv): Removed.
3401         (graphite_rename_ivs_stmt): Use gbb_loop_index.
3402         (get_true_edge_from_guard_bb): New.
3403         (translate_clast): Handle stmt_guard in clast.
3404         (get_construction_edge): Allow construction edge detection for
3405         a scope entry with multiple predecessors if one predecessor is
3406         the immediate dominator of scope entry.
3407         (can_generate_code_stmt): Enable code generation for clast_guard.
3408         (gloog): Use correct context loop.  Removed check for post dominators.
3409         * cfgloop.h (create_empty_if_region_on_edge): Declared.
3410
3411 2008-08-21  Sebastian Pop  <sebastian.pop@amd.com>
3412
3413         * graphite.c (remove_dead_loops): Document better which
3414         loops are removed.
3415
3416 2008-08-21  Sebastian Pop  <sebastian.pop@amd.com>
3417
3418         * Makefile.in: Rename POLYLIBLIBS and POLYLIBINC to PPLLIBS
3419         and PPLINC.
3420         (graphite.o): Also depends on pointer-set.h.
3421
3422 2008-08-21  Sebastian Pop  <sebastian.pop@amd.com>
3423
3424         * graphite.c (scop_record_loop): Fix compile warning.
3425
3426 2008-08-21  Harsha Jagasia  <harsha.jagasia@amd.com>
3427             Sebastian Pop  <sebastian.pop@amd.com>
3428
3429         * graphite.c (scop_record_loop): DECL_NAME can be NULL.
3430
3431 2008-08-21  Sebastian Pop  <sebastian.pop@amd.com>
3432
3433         * graphite.c (build_graphite_bb): Initialize bb->aux to
3434         point to the graphite_bb_p.
3435         (graphite_bb_from_bb): Renamed gbb_from_bb; returns the
3436         content of bb->aux.
3437         (add_bb_domains): Does not use the scop parameter.
3438         (graphite_transform_loops): Clean bb->aux at the end.
3439
3440 2008-08-20  Dwarakanath Rajagopal  <dwarak.rajagopal@amd.com>
3441             Sebastian Pop  <sebastian.pop@amd.com>
3442
3443         * testsuite/lib/target-supports.exp
3444         (check_effective_target_fgraphite): New.
3445
3446         * testsuite/gcc.dg/graphite/graphite.exp: Early exit when
3447         check_effective_target_fgraphite returns false.
3448         Set dg-do-what-default to compile.
3449         (scan-graphite-dump-times): Removed.
3450         * testsuite/gfortran.dg/graphite/graphite.exp: Same.
3451
3452         * testsuite/gcc.dg/graphite/scop-0.c: Do not use "dg-do compile".
3453         Use scan-tree-dump-times instead of scan-graphite-dump-times.
3454         * testsuite/gcc.dg/graphite/scop-1.c: Same.
3455         * testsuite/gcc.dg/graphite/scop-2.c: Same.
3456         * testsuite/gcc.dg/graphite/scop-3.c: Same.
3457         * testsuite/gcc.dg/graphite/scop-4.c: Same.
3458         * testsuite/gcc.dg/graphite/scop-5.c: Same.
3459         * testsuite/gcc.dg/graphite/scop-6.c: Same.
3460         * testsuite/gcc.dg/graphite/scop-7.c: Same.
3461         * testsuite/gcc.dg/graphite/scop-8.c: Same.
3462         * testsuite/gcc.dg/graphite/scop-9.c: Same.
3463         * testsuite/gcc.dg/graphite/scop-10.c: Same.
3464         * testsuite/gcc.dg/graphite/scop-11.c: Same.
3465         * testsuite/gcc.dg/graphite/scop-12.c: Same.
3466         * testsuite/gcc.dg/graphite/scop-13.c: Same.
3467         * testsuite/gcc.dg/graphite/scop-matmult.c: Same.
3468         * testsuite/gcc.dg/graphite/scop-14.c: Same.
3469         * testsuite/gcc.dg/graphite/scop-15.c: Same.
3470         * testsuite/gcc.dg/graphite/block-0.c: Same.
3471         * testsuite/gcc.dg/graphite/scop-16.c: Same.
3472         * testsuite/gcc.dg/graphite/block-1.c: Same.
3473         * testsuite/gcc.dg/graphite/scop-17.c: Same.
3474         * testsuite/gcc.dg/graphite/scop-18.c: Same.
3475         * testsuite/gfortran.dg/graphite/block-1.f90: Same.
3476         * testsuite/gfortran.dg/graphite/scop-1.f: Same.
3477         * testsuite/gfortran.dg/graphite/block-2.f: Same.
3478
3479 2008-08-20  Sebastian Pop  <sebastian.pop@amd.com>
3480
3481         * graphite.c: Fix some XXX comments.
3482         (build_scop_dynamic_schedules): Removed.
3483
3484 2008-08-20  Sebastian Pop  <sebastian.pop@amd.com>
3485
3486         * graphite.h (scop_max_loop_depth): Moved...
3487         * graphite.c (scop_max_loop_depth): ...here.
3488         (remove_all_edges_1): New.
3489         (remove_all_edges): Factored code.
3490         (remove_cond_exprs): Check only the last statement for
3491         a GIMPLE_COND expression.
3492
3493 2008-08-20  Sebastian Pop  <sebastian.pop@amd.com>
3494
3495         * graphite.c (scan_tree_for_params): Early return when the
3496         expression is a chrec_dont_know.  Handle case NEGATE_EXPR.
3497         (find_scop_parameters): Factor out code.
3498         (graphite_trans_bb_strip_mine): Remove dead code.
3499
3500 2008-08-20  Sebastian Pop  <sebastian.pop@amd.com>
3501
3502         * graphite.c (clast_to_gcc_expression, graphite_create_new_loop,
3503         graphite_trans_bb_move_loop): Factor asserts.
3504         (gloog): Perform sanity checks only for ENABLE_CHECKING.
3505         Do not call calculate_dominance_info and estimate_bb_frequencies.
3506
3507 2008-08-20  Jan Sjodin  <jan.sjodin@amd.com>
3508
3509         * graphite.c (create_loops_mapping, free_loops_mapping,
3510         create_loops_mapping_num, debug_loop_mapping_1,
3511         debug_loop_mapping, graphite_loops_mapping_max_loop_num,
3512         get_loop_mapping_for_num, graphite_loops_mapping_add_child,
3513         graphite_loops_mapping_add_child_num,
3514         graphite_loops_mapping_insert_child,
3515         graphite_loops_mapping_parent, get_loop_mapped_depth_for_num,
3516         get_loop_mapped_depth, split_loop_mapped_depth_for_num,
3517         loop_mapped_depth_split_loop, swap_loop_mapped_depth_for_num,
3518         create_num_from_index, get_num_from_index,
3519         swap_loop_mapped_depth): Removed.
3520         (new_scop): Do not initialize SCOP_LOOPS_MAPPING.
3521         (free_scop): Do not call free_loops_mapping.
3522         (graphite_get_new_iv_stack_index_from_old_iv): Renamed
3523         get_stack_index_from_iv.  Use GBB_LOOPS instead of calling
3524         get_loop_mapped_depth.
3525         (graphite_trans_bb_move_loop): Do not update the loop mapping.
3526         (graphite_trans_bb_strip_mine): Same.
3527         * graphite.h (graphite_loops_mapping, graphite_loop_node): Removed.
3528         (struct scop): Remove field loops_mapping.
3529
3530 2008-08-20  Sebastian Pop  <sebastian.pop@amd.com>
3531             Dwarakanath Rajagopal  <dwarak.rajagopal@amd.com>
3532
3533         * graphite.c (scop_record_loop): Factor out one level of the
3534         condition by early return.
3535         (build_scop_loop_nests): Format following FSF coding style.
3536         (build_scop_dynamic_schedules): Factor out code.
3537         (scopdet_bb_info): Reindent.  Default case should not be reachable.
3538
3539 2008-08-20  Sebastian Pop  <sebastian.pop@amd.com>
3540             Dwarakanath Rajagopal  <dwarak.rajagopal@amd.com>
3541
3542         * graphite.c (loop_affine_expr): Check for DECL_P or struct
3543         assignments that are not handled as simple operands for now.
3544
3545 2008-08-20  Sebastian Pop  <sebastian.pop@amd.com>
3546             Dwarakanath Rajagopal  <dwarak.rajagopal@amd.com>
3547
3548         * graphite.c (build_scop_bbs): Factor up code.
3549
3550 2008-08-20  Sebastian Pop  <sebastian.pop@amd.com>
3551             Dwarakanath Rajagopal  <dwarak.rajagopal@amd.com>
3552
3553         * graphite.c (stmt_simple_for_scop_p): Factor code out
3554         of the loop.
3555         (enum gbb_type): New.  Group all the GBB_* types under it.
3556         (is_loop_exit): Moved...
3557         (end_scop): Enable BB spliting.
3558         * cfgloop.c (is_loop_exit): ...here.  Reimplemented.
3559         * cfgloop.h (is_loop_exit): Declared.
3560
3561 2008-08-20  Sebastian Pop  <sebastian.pop@amd.com>
3562
3563         * doc/invoke.texi: Remove strides from examples containing
3564         DO loops when the strides are equal to 1.
3565
3566 2008-08-20  Harsha Jagasia  <harsha.jagasia@amd.com>
3567             Dwarakanath Rajagopal  <dwarak.rajagopal@amd.com>
3568
3569         * graphite.c (graphite_trans_scop_block): Or the result with
3570         the result from graphite_trans_loop_block.
3571         * testsuite/gcc.dg/graphite/block-1.c: New.
3572         * testsuite/gfortran.dg/graphite/block-1.f90: New.
3573         * testsuite/gfortran.dg/graphite/block-2.f: New.
3574
3575 2008-08-20  Sebastian Pop  <sebastian.pop@amd.com>
3576
3577         * graphite.c (graphite_transform_loops): Call cloog_initialize
3578         and cloog_finalize.
3579
3580 2008-08-20  Sebastian Pop  <sebastian.pop@amd.com>
3581
3582         * tree-data-ref.c) (stmt_simple_memref_p): New.
3583         * tree-data-ref.h (stmt_simple_memref_p): Declared.
3584         * graphite.c (stmt_simple_memref_for_scop_p): Removed.
3585         (is_simple_operand): Call stmt_simple_memref_p.
3586
3587         * testsuite/gcc.dg/graphite/scop-matmult.c: Updated for not
3588         using pointer arithmetic, as this is optimized by PRE and
3589         makes the code too difficult to analyze.
3590
3591         * testsuite/gcc.dg/graphite/scop-18.c: Same.
3592
3593 2008-08-20  Sebastian Pop  <sebastian.pop@amd.com>
3594
3595         * gdbinit.in (pgg): New.
3596
3597 2008-08-15  Tobias Grosser  <grosser@fim.uni-passau.de>
3598
3599         * graphite.c (graphite_trans_loop_block): Fix warning.
3600
3601 2008-08-15  Tobias Grosser  <grosser@fim.uni-passau.de>
3602
3603         * graphite.c (graphite_trans_loop_block): Fix my merge error.
3604
3605 2008-08-15  Tobias Grosser  <grosser@fim.uni-passau.de>
3606
3607         * graphite.c (graphite_trans_bb_block): Remove check for
3608         flag_loop_strip_mine, flag_loop_block, flag_loop_interchange.
3609         Check if loop blocking is profitable for every loop, before applying
3610         the changes.
3611         (graphite_apply_transformations): Call graphite_trans_bb_block only,
3612         if flag_loop_block is set.
3613
3614 2008-08-14  Sebastian Pop  <sebastian.pop@amd.com>
3615
3616         * graphite.c: Add some more documentation for the loop
3617         mapping.
3618
3619 2008-08-14  Sebastian Pop  <sebastian.pop@amd.com>
3620
3621         * Makefile.in (tree-data-ref.o): Remove dependence on graphite.h.
3622         * graphite.c: Format on less than 80 columns.
3623         * graphite.h: Same.
3624
3625 2008-08-14  Sebastian Pop  <sebastian.pop@amd.com>
3626
3627         * cfgloopmanip.c (loopify): Use update_dominators_in_loop.
3628
3629 2008-08-14  Sebastian Pop  <sebastian.pop@amd.com>
3630
3631         * doc/invoke.texi (floop-block, floop-strip-mine,
3632         floop-interchange): Update documentation with examples.
3633
3634 2008-08-13  Sebastian Pop  <sebastian.pop@amd.com>
3635
3636         * cfgloopmanip.c (create_empty_loop_on_edge): Don't call
3637         add_referenced_var.
3638         * graphite.c (graphite_create_new_loop): Call add_referenced_var.
3639
3640 2008-08-13  Sebastian Pop  <sebastian.pop@amd.com>
3641
3642         * cfgloopmanip.c (create_empty_loop_on_edge): Improve documentation.
3643         Factor gcc_asserts into a single one.  Use force_gimple_operand_gsi.
3644         * tree-scalar-evolution.c: Revert useless changes.
3645         * tree-phinodes.c: Same.
3646         * cfghooks.c: Same.
3647         * vec.h: Same.
3648         * tree-vectorizer.h: Same.
3649         * tree-flow.h: Same.
3650         * tree-cfg.c: Same.
3651         * common.opt (fgraphite): Update documentation.
3652
3653 2008-08-12  Harsha Jagasia  <harsha.jagasia@amd.com>
3654
3655         * doc/invoke.texi (-floop-block, -floop-strip-mine,
3656         -floop-interchange): Add more text for explaining what each of these
3657         flags is doing.
3658         * tree-into-ssa.c (gimple_vec): Moved to...
3659         * graphite.c: Include gimple.h.
3660         (gimple_vec): Moved to...
3661         (del_loop_to_cloog_loop): Removed.
3662         (loop_affine_expr): Do not call create_data_ref when the
3663         operand is a constant.
3664         (new_scop): Use free instead of del_loop_to_cloog_loop.
3665         * Makefile.in (graphite.o): Depend on GIMPLE_H.
3666         * gimple.h (gimple_vec): ... here.
3667
3668 2008-08-11  Tobias Grosser  <grosser@fim.uni-passau.de>
3669
3670         * graphite.c (scopdet_bb_info): Only allow loops with known number of
3671         latch executions.
3672         (build_loop_iteration_domains): Fail, if latch executions unknown.
3673
3674 2008-08-11  Tobias Grosser  <grosser@fim.uni-passau.de>
3675
3676         * graphite.c (add_conditions_to_domain): New.
3677         (build_scop_conditions_1): Call add_conditions_to_domain.
3678         (set_cloog_options): Allow to disable optimizations.
3679
3680 2008-08-11  Tobias Grosser  <grosser@fim.uni-passau.de>
3681
3682         * graphite.c (find_params_in_bb): Look for parameters in conditions.
3683         Do not use walk_dominator_tree.
3684         (find_scop_parameters): Do not use walk_dominator_tree.
3685
3686 2008-08-11  Tobias Grosser  <grosser@fim.uni-passau.de>
3687
3688         * graphite.c (scan_tree_for_params) Add / Subtract inequality.
3689         (idx_record_params): Adapt.
3690         * graphite.h (scop_gimple_loop_depth): New.
3691
3692 2008-08-11  Tobias Grosser  <grosser@fim.uni-passau.de>
3693
3694         * graphite.c (build_scop_dynamic_schedules): Remove value_init.
3695         (scan_tree_for_params): Remove value_init.
3696         (build_scop_context): Remove value_init.
3697         (build_loop_iteration_domains): Remove value_init.
3698         (schedule_to_scattering): Remove value_init.
3699         (graphite_trans_bb_strip_mine): Remove value_init.
3700
3701 2008-08-11  Tobias Grosser  <grosser@fim.uni-passau.de>
3702
3703         * gcc/graphite.c (limit_scops): New.
3704         (graphite_transform_loops): Add limit SCoPs.
3705         * gcc/testsuite/gcc.dg/graphite/scop-0.c: Update number of SCoPs.
3706         * gcc/testsuite/gcc.dg/graphite/scop-1.c: Update number of SCoPs.
3707         * gcc/testsuite/gcc.dg/graphite/scop-10.c: Update number of SCoPs.
3708         * gcc/testsuite/gcc.dg/graphite/scop-11.c: Update number of SCoPs.
3709         * gcc/testsuite/gcc.dg/graphite/scop-12.c: Update number of SCoPs.
3710         * gcc/testsuite/gcc.dg/graphite/scop-13.c: Update number of SCoPs.
3711         * gcc/testsuite/gcc.dg/graphite/scop-14.c: Update number of SCoPs.
3712         * gcc/testsuite/gcc.dg/graphite/scop-15.c: Update number of SCoPs.
3713         * gcc/testsuite/gcc.dg/graphite/scop-16.c: Update number of SCoPs.
3714         Change loop numbers.
3715         * gcc/testsuite/gcc.dg/graphite/scop-17.c: Update number of SCoPs.
3716         Change loop numbers.
3717         * gcc/testsuite/gcc.dg/graphite/scop-18.c: Update number of SCoPs.
3718         * gcc/testsuite/gcc.dg/graphite/scop-2.c: Update number of SCoPs.
3719         * gcc/testsuite/gcc.dg/graphite/scop-3.c: Update number of SCoPs.
3720         * gcc/testsuite/gcc.dg/graphite/scop-4.c: Update number of SCoPs.
3721         * gcc/testsuite/gcc.dg/graphite/scop-5.c: Update number of SCoPs.
3722         * gcc/testsuite/gcc.dg/graphite/scop-6.c: Update number of SCoPs.
3723         * gcc/testsuite/gcc.dg/graphite/scop-7.c: Update number of SCoPs.
3724         * gcc/testsuite/gcc.dg/graphite/scop-8.c: Update number of SCoPs.
3725         * gcc/testsuite/gcc.dg/graphite/scop-9.c: Update number of SCoPs.
3726         * gcc/testsuite/gcc.dg/graphite/scop-matmult.c: Update number of SCoPs.
3727
3728 2008-08-11  Tobias Grosser  <grosser@fim.uni-passau.de>
3729
3730         * graphite.c (graphite_transform_loops): Call always find_transform.
3731
3732 2008-08-08  Tobias Grosser  <grosser@fim.uni-passau.de>
3733
3734         * graphite.c (free_loops_mapping): New.
3735         (stmt_simple_for_scop_p): Fix typo.
3736         (stmt_simple_for_scop_p): Fix tuples functions, that
3737         broke polyhedron.
3738         (free_graphite_bb): Fix some memleaks.
3739         (free_scop): Fix some memleaks.
3740         (scopdet_bb_info): Do not forget some tmp SCoPs.
3741         (find_params_in_bb): Fix some memleaks.
3742         (clast_to_gcc_expression): Fix warning.
3743
3744 2008-08-07  Tobias Grosser  <grosser@fim.uni-passau.de>
3745
3746         * testsuite/gcc.dg/graphite/scop-16.c: Fix for 32bit.
3747         * testsuite/gcc.dg/graphite/scop-17.c: Fix for 32bit.
3748
3749 2008-08-04  Sebastian Pop  <sebastian.pop@amd.com>
3750
3751         * tree-ssa-loop.c (tree-ssa-loop.o): Do not include toplev.h.
3752         Move code ifdef-ed HAVE_cloog...
3753         * graphite.c: Include toplev.h.
3754         ... here.
3755         * Makefile.in (OBJS-common): Always build graphite.o.
3756         (BACKEND): Remove @GRAPHITE@.
3757         (tree-ssa-loop.o): Do not depend on TOPLEV_H.
3758         (graphite.o): Depend on TOPLEV_H.
3759
3760 2008-08-04  Sebastian Pop  <sebastian.pop@amd.com>
3761
3762         * Makefile.in (tree-ssa-loop.o): Depend on TOPLEV_H.
3763         Remove typo left from polylib to ppl conversion.
3764         * graphite.c (graphite_transforms): Use sorry instead of fatal.
3765
3766 2008-08-03  Sebastian Pop  <sebastian.pop@amd.com>
3767
3768         * toplev.c (process_options): Move the graphite loop optimization
3769         flags...
3770         * tree-ssa-loop.c (graphite_transforms): ... here.
3771         When not configured with CLooG, print to dump_file that
3772         Graphite transforms were not performed.
3773         * testsuite/gcc.dg/graphite/graphite.exp (scan-graphite-dump-times):
3774         New.
3775         * testsuite/gcc.dg/graphite/*.c: Updated all testcases to use
3776         scan-graphite-dump-times.
3777
3778 2008-08-03  Sebastian Pop  <sebastian.pop@amd.com>
3779
3780         * graphite.c (dot_scop, dot_all_scops): Do not call system.
3781         Do not open /tmp/scop.dot and /tmp/allscops.dot.
3782
3783 2008-08-02  Sebastian Pop  <sebastian.pop@amd.com>
3784             Jan Sjodin  <jan.sjodin@amd.com>
3785
3786         * configure: Regenerated.
3787         * omp-low.c (expand_omp_sections): Remove now unused code.
3788         * config.in (HAVE_polylib): Removed.
3789         * configure.ac (HAVE_polylib, POLYLIBLIBS, POLYLIBINC): Removed.
3790         (PPLLIBS, PPLINC): Added.
3791         * graphite.c: Replace unsigned with int wherever possible.
3792         Don't access Cloog's data structures, but use accessor functions.
3793         Clast's stmt->type is now implemented as a vtable: change the
3794         switches of stmt->type into ifs.
3795         (polylib/polylibgmp.h): Don't include.
3796         (initialize_dependence_polyhedron,
3797         initialize_data_dependence_polyhedron, is_empty_polyhedron,
3798         statement_precedes_p, test_dependence, build_rdg_all_levels,
3799         dump_dependence_graph): Removed until this code is cleaned up
3800         or ported to Cloog.
3801         * Makefile.in (POLYLIBLIBS): Renamed PPLLIBS.
3802         (POLYLIBINC): Renamed PPLINC.
3803
3804 2008-08-01  Harsha Jagasia  <harsha.jagasia@amd.com>
3805             Dwarakanath Rajagopal  <dwarak.rajagopal@amd.com>
3806             Jan Sjodin  <jan.sjodin@amd.com>
3807
3808         Finish the merge and tuplification of graphite.
3809
3810 2008-07-24  Sebastian Pop  <sebastian.pop@amd.com>
3811             Jan Sjodin  <jan.sjodin@amd.com>
3812
3813         Partial merge from mainline (138072:138275).
3814         * graphite.c still has to be tuplified.
3815
3816 2008-07-29  Jan Sjodin  <jan.sjodin@amd.com>
3817
3818         * graphite.c (graphite_loops_mapping_max_loop_num): New.
3819         (create_num_from_index): New.
3820         (get_num_from_index): Also pass in the graphite BB.
3821         (free_graphite_bb): Free GBB_INDEX_TO_NUM_MAP.
3822         (build_graphite_bb): Initialize GBB_INDEX_TO_NUM_MAP.
3823         (graphite_trans_bb_strip_mine): Call create_num_from_index.
3824         (is_interchange_valid): Return false when failing.
3825         * graphite.h (struct num_map): New.
3826         (struct graphite_bb): New field num_map.
3827         (GBB_LOOPS_MAPPING): Renamed GBB_INDEX_TO_NUM_MAP.
3828
3829 2008-07-29  Tobias Grosser  <grosser@fim.uni-passau.de>
3830
3831         * graphite.c (dump_gbb_conditions): Print also conditions like
3832         "if (a)".  Remove dublicated code and use print_generic_expr ().
3833         (stmt_simple_for_scop_p): Only allow conditions we can handle
3834         {<, <=, >, >=}.
3835
3836 2008-07-25  Jan Sjodin  <jan.sjodin@amd.com>
3837
3838         * graphite.h (struct scop): Removed new_ivs field.
3839         (SCOP_NEWIVS): Deleted.
3840         * graphite.c (new_scop, free_scop, clast_name_to_gcc,
3841         clast_to_gcc_expression, graphite_create_new_loop):
3842         Removed use of new_ivs.
3843
3844 2008-07-25  Jan Sjodin  <jan.sjodin@amd.com>
3845
3846         * graphite.c (debug_oldivs, debug_loop_vec, create_loops_mapping,
3847         create_loops_mapping_num, debug_loop_mapping_1): New.
3848         (debug_loop_mapping): Call debug_loop_mapping_1.
3849         (get_loop_mapping_for_num,
3850         graphite_loops_mapping_add_child,
3851         graphite_loops_mapping_add_child_num,
3852         graphite_loops_mapping_insert_child,
3853         graphite_loops_mapping_parent,
3854         split_loop_mapped_depth_for_num,
3855         loop_mapped_depth_split_loop): New.
3856         (increment_loop_mapped_depths): Removed.
3857         (swap_loop_mapped_depth_for_num): Reimplemented.
3858         (new_scop): Call create_loops_mapping.
3859         (scop_record_loop): Call graphite_loops_mapping_insert_child.
3860         (translate_clast): Pass the old loop father in parameter, and pass
3861         it to get_old_iv_from_ssa_name.
3862         (remove_edges_around_useless_blocks, can_generate_code_stmt,
3863         can_generate_code, can_generate_for_scop): New.
3864         (graphite_trans_bb_block): Returns false when it fails to transform.
3865         * graphite.h (graphite_loop_node, graphite_loops_mapping): New.
3866
3867 2008-07-25  Sebastian Pop  <sebastian.pop@amd.com>
3868
3869         Reverted all the changes related to the streamization and
3870         loop fusion.
3871         These changes are now tracked in the streamization branch.
3872
3873 2008-07-25  Sebastian Pop  <sebastian.pop@amd.com>
3874             Jan Sjodin  <jan.sjodin@amd.com>
3875
3876         * graphite.c (gbb_compare): Correctly constify.
3877         (gbb_can_be_ignored): Indent.
3878         (graphite_trans_scop_swap_1and2): Add legality check.
3879         Remove dead FIXMEs.
3880
3881 2008-07-25  Sebastian Pop  <sebastian.pop@amd.com>
3882
3883         Remove fallouts from "Reverted the Condate changes".
3884         * tree.h: Remove unused decl.
3885         * testsuite/gcc.dg/tree-checker: Same.
3886         * timevar.def: Remove counter.
3887
3888 2008-07-24  Sebastian Pop  <sebastian.pop@amd.com>
3889
3890         * Merge from mainline (135673:138072).
3891
3892         Reverted the MIRO changes (from 2008-04-05) that are now
3893         tracked in the miro branch.
3894         * tree-bounds.c: Removed.
3895         * tree-bounds.h: Removed.
3896
3897         Reverted the Condate changes (from 2006-07-04, 2007-03-20) that
3898         are now tracked in the condate branch.
3899         * tree-check.c: Removed.
3900         * tree-match.c: Removed.
3901         * condate.y: Removed.
3902
3903 2008-07-24  Dwarakanath Rajagopal  <dwarak.rajagopal@amd.com>
3904
3905         * common.opt: New user flag -floop-block, -floop-strip-mine
3906         and -floop-interchange.
3907         * toplev.c (process_options): Enable -fgraphite pass if any one of the
3908         graphite loop optimization flags is turned on.
3909         * graphite.c (graphite_apply_transformations): Add flag_loop_block,
3910         flag_loop_strip_mine and flag_loop_interchange checks before
3911         optimizations.
3912         * doc/invoke.texi: Remove -fgraphite and add -floop-block,
3913         -floop-strip-mine and -floop-interchange.
3914         * testsuite/gcc.dg/graphite/block-0.c: Add -floop-block and remove
3915         -fgraphite.
3916         * testsuite/gcc.dg/graphite/scop-16.c: Ditto.
3917         * testsuite/gcc.dg/graphite/scop-17.c: Ditto.
3918         * testsuite/gcc.dg/graphite/scop-18.c: Ditto.
3919
3920 2008-07-23  Jan Sjodin  <jan.sjodin@amd.com>
3921             Sebastian Pop  <sebastian.pop@amd.com>
3922
3923         * cfgloopmanip.c (update_dominators_in_loop): Make it static.
3924         (create_empty_loop_on_edge): More fixes.
3925         * tree-phinodes.c (resize_phi_node): Extern.
3926         (unlink_phi_node, move_phi_node): New split from remove_phi_node.
3927         * cfghooks.c (update_dominator_information): New split from
3928         split_edge.
3929         * tree-vectorizer.c (rename_variables_in_bb): Extern.
3930         * tree-dfa.c (collect_dfa_stats): Start walking the CFG on the
3931         successor of the function entry block.
3932
3933         * graphite.c: Include pointer-set.h.
3934         (debug_loop_mapping, increment_loop_mapped_depths,
3935         get_loop_mapped_depth_for_num, get_loop_mapped_depth,
3936         set_loop_mapped_depth_for_num, set_loop_mapped_depth,
3937         swap_loop_mapped_depth_for_num, get_num_from_index,
3938         swap_loop_mapped_depth, loop_iv_stack_debug,
3939         loop_iv_stack_push, loop_iv_stack_pop, loop_iv_stack_get_iv,
3940         loop_iv_stack_get_iv_from_name, loop_iv_stack_debug,
3941         get_old_iv_from_ssa_name): New.
3942         (new_scop): Initialize SCOP_LOOPS_MAPPING.
3943         (free_scop): Free SCOP_LOOPS_MAPPING.
3944         (scop_record_loop): Record old ivs.
3945         (create_var_name): Removed.
3946         (initialize_cloog_names): Allocate double space in case strip mine
3947         applies to all loops once.
3948         (clast_name_to_gcc): Look up in the map ivstack passed in parameter.
3949         (clast_to_gcc_expression): Same.  Implement more clast to gimple
3950         translation.
3951         (graphite_create_new_loop): Pass in ivstack.
3952         (remove_all_edges): Pass in the construction_edge.
3953         (graphite_remove_iv): Removed.
3954         (graphite_rename_ivs, graphite_rename_ivs_stmt,
3955         remove_cond_exprs): Rewritten.
3956         (move_phi_nodes): New.
3957         (disconnect_virtual_phi_nodes, disconnect_cond_expr): Removed.
3958         (translate_clast): Pass in ivstack.  Rewrite some cases.
3959         (set_cloog_options, debug_clast_stmt): New.
3960         (find_transform): Use set_cloog_options.
3961         (outermost_loop_layer): Removed.
3962         (get_construction_edge, collect_virtual_phis, find_vdef_for_var_in_bb,
3963         find_vdef_for_var_1, find_vdef_for_var, patch_phis_for_virtual_defs,
3964         mark_old_loops, remove_dead_loops): New.
3965         (gloog): Rewritten.
3966         (graphite_trans_bb_move_loop): Call swap_loop_mapped_depth.
3967         (const_column_index, get_first_matching_sign_row_index,
3968         get_lower_bound_row, get_upper_bound_row, get_lower_bound,
3969         get_upper_bound): New.
3970         (graphite_trans_bb_strip_mine): Also update the iv map.
3971
3972         * graphite.h (graphite_loops_mapping, GBB_LOOPS_MAPPING): New.
3973         (struct name_tree): Add a loop field.
3974         (struct scop): Add a graphite_loops_mapping field.
3975         (SCOP_LOOPS_MAPPING): New.
3976         (debug_clast_stmt): Declare.
3977         * lambda.h (find_induction_var_from_exit_cond): Declare.
3978         (lambda-code.c): (find_induction_var_from_exit_cond): Extern.
3979         * cfgloop.h (update_dominators_in_loop): Removed declaration.
3980         (create_empty_loop_on_edge): Updated.
3981         * tree-flow.h (remove_bb, resize_phi_node, move_phi_node,
3982         rename_variables_in_bb): Declare.
3983         * tree-cfg.c (remove_bb): Extern.
3984
3985         * testsuite/gcc.dg/graphite/block-0.c: New.
3986
3987 2008-07-21  Dwarakanath Rajagopal  <dwarak.rajagopal@amd.com>
3988             Sebastian Pop  <sebastian.pop@amd.com>
3989
3990         * graphite.c (strip_mine_profitable_p): New.
3991         (graphite_trans_bb_block): Disable strip mining if not profitable.
3992
3993         * testsuite/gcc.dg/graphite/scop-18.c: New.
3994         * testsuite/gcc.dg/graphite/scop-17.c: Fixed.
3995         * testsuite/gcc.dg/graphite/scop-16.c: Fixed.
3996
3997 2008-07-17  Harsha Jagasia  <harsha.jagasia@amd.com>
3998             Jan Sjodin  <jan.sjodin@amd.com>
3999             Sebastian Pop  <sebastian.pop@amd.com>
4000
4001         * graphite.c (is_interchange_valid): New.
4002         (graphite_trans_bb_block): Check loop nest of basic block for legality
4003         of interchange.
4004
4005         * graphite.h (gbb_inner_most_loop_index, outer_most_loop_1,
4006         outer_most_loop, gbb_outer_most_loop_index): New.
4007
4008         * tree-loop-linear.c (perfect_loop_nest_depth): Remove static.
4009         * tree-flow.h (perfect_loop_nest_depth): Declare as extern.
4010         * testsuite/gcc.dg/graphite/scop-16.c: New.
4011         * testsuite/gcc.dg/graphite/scop-17.c: New.
4012
4013 2008-07-11  Tobias Grosser  <grosser@fim.uni-passau.de>
4014
4015         * graphite.c (scop_remove_ignoreable_gbbs): Also update bitmap.
4016         (graphite_trans_scop_block): Ignore SCoPs without bbs.
4017
4018 2008-07-11  Tobias Grosser  <grosser@fim.uni-passau.de>
4019
4020         * graphite.c (new_scop): Initialize SCOP_EXIT.
4021         (scopdet_info): Add.
4022         (scopdet_bb_info): Rename from is_bb_addable. Cleanup, bugfixes.
4023         (build_scops_1): Cleanup, bugfixes.
4024         (build_scops): Cleanup.
4025
4026         * testsuite/gcc.dg/graphite/scop-matmult.c: Remove duplicated code.
4027         * testsuite/gcc.dg/graphite/scop-15.c: Add SCoP numbers.
4028
4029 2008-07-10  Harsha Jagasia  <harsha.jagasia@amd.com>
4030
4031         * testsuite/gfortran.dg/graphite/scop-1.f: Update to reduced test case.
4032
4033         * testsuite/gfortran.dg/graphite/graphite.exp: Use
4034         DEFAULT_GRAPHITE_FLAGS.
4035
4036         * testsuite/gcc.dg/graphite/scop-15.c: Update to reduced test case.
4037
4038 2008-07-10  Harsha Jagasia  <harsha.jagasia@amd.com>
4039
4040         * graphite.c (scan_tree_for_params): Do not assert any more if
4041         MULT_EXPR parameter is negative.
4042
4043         * testsuite/gfortran.dg/graphite/scop-1.f: New.
4044
4045         * testsuite/gfortran.dg/graphite/graphite.exp: New.
4046
4047         * testsuite/gcc.dg/graphite/scop-15.c: New.
4048
4049 2008-07-10  Harsha Jagasia  <harsha.jagasia@amd.com>
4050
4051         * graphite.c (is_bb_addable): Fix segfault in spec gzip and reformat.
4052
4053 2008-07-10  Tobias Grosser  <grosser@fim.uni-passau.de>
4054
4055         * graphite.c (graphite_trans_bb_swap_loops): Rename from
4056         graphite_swap_loops.
4057         (graphite_trans_bb_move_loop): New.
4058         (graphite_trans_bb_strip_mine): Rename from graphite_strip_mine_loop.
4059         (graphite_trans_bb_block): New.
4060         (graphite_trans_loop_block): New.
4061         (graphite_trans_scop_swap_1and2): Rename from
4062         graphite_trans_swap_1and2.
4063         (graphite_trans_scop_strip): Rename from graphite_trans_strip.
4064         (graphite_trans_scop_block): New.
4065         (graphite_apply_transformations): Rename from
4066         graphite_transformations.
4067
4068         * testsuite/gcc.dg/graphite/scop-matmult.c: New.
4069
4070 2008-07-10  Tobias Grosser  <grosser@fim.uni-passau.de>
4071
4072         * graphite.c (gbb_compare): New.
4073         (graphite_sort_gbbs): New.
4074         (gbb_can_be_ignored): New.
4075         (scop_remove_ignoreable_gbbs): New.
4076         (graphite_transformations): Cleanup and add
4077         scop_remove_ignoreable_gbbs.
4078         * lambda.h (lambda_vector_compare): New.
4079
4080 2008-07-09  Tobias Grosser  <grosser@fim.uni-passau.de>
4081
4082         * graphite.c (print_graphite_bb): Correct printing of static schedule.
4083         (graphite_swap_loops): int -> unsigned
4084         (graphite_strip_mine_loop): int -> unsigned, Fix SCHEDULE
4085         (graphite_transformations): New.
4086         (graphite_transform_loops): Move to graphite_transformations.
4087         * graphite.h (gbb_nb_loops): Return unsigned.
4088
4089 2008-07-04  Tobias Grosser  <grosser@fim.uni-passau.de>
4090
4091         * graphite.c (scan_tree_for_params): Fix insertion of parameters into
4092         the domain matrix.  This makes scop-0.c work again.
4093
4094 2008-06-20  Richard Guenther  <rguenther@suse.de>
4095
4096         * graphite.h: Adjust copyright to GPLv3.
4097         * graphite.c: Likewise.
4098         (stmt_simple_memref_for_scop_p): Split out from ...
4099         (stmt_simple_for_scop_p): ... here.  Fix handling of calls
4100         and simplify.
4101         (get_bb_type): Optimize.
4102         (is_pred): Remove.
4103         (is_bb_addable): Fix memleak, replace is_pred call with
4104         single_pred.
4105         (build_scops): Use current_loops.
4106         (param_index): Fix memleak.
4107
4108 2008-06-20  Konrad Trifunovic  <konrad.trifunovic@inria.fr>
4109
4110         * graphite.c: Fix formatting.
4111
4112 2008-06-19  Konrad Trifunovic  <konrad.trifunovic@inria.fr>
4113
4114         * graphite.c (new_scop): Memory allocation for SCOP_{NEWIVS, OLDIVS}.
4115         (free_scop): Memory deallocation for SCOP_NEWIVS, SCOP_OLDIVS.
4116         (create_var_name, save_var_name): Newly defined functions.
4117         (initialize_cloog_names): Part of the code factored out to
4118         save_var_name.
4119         (clast_to_gcc_expression): Now handles the case of clast_red_sum
4120         in clast_reduction statement.
4121         (graphite_create_new_loop): Now takes a new parameter
4122         for outer_loop.
4123         (translate_clast): Now also takes the context_loop and bb_exit
4124         parameters. Rewritten the code so that it creates a gimple code
4125         inside the given context.
4126         (outermost_loop_layer, graphite_remove_iv, graphite_rename_ivs,
4127         remove_cond_expr, disconnect_cond_expr,
4128         disconnect_virtual_phi_nodes): Newly defined functions.
4129         * graphite.h (struct scop): added old_ivs vector.
4130         SCOP_OLDIVS: New macro.
4131
4132 2008-06-19  Sebastian Pop  <sebastian.pop@amd.com>
4133
4134         * cfgloopmanip.c: Add missing function comments, fix formatting.
4135
4136 2008-06-18  Konrad Trifunovic  <konrad.trifunovic@inria.fr>
4137
4138         * cfgloopmanip.c (update_dominators_in_loop): Defined.
4139         (create_empty_loop_on_edge): Defined.
4140         * tree-parloops.c (canonicalize_loop_ivs): Returns tree
4141         instead of void.
4142         * cfgloop.h (create_empty_loop_on_edge): Declared as extern.
4143         (update_dominators_in_loop): Declared as extern
4144         * tree-flow.h (canonicalize_loop_ivs): Declared as extern.
4145
4146 2008-06-16  Tobias Grosser  <grosser@fim.uni-passau.de>
4147
4148         * graphite.c (print_graphite_bb): Allow changing number of loops
4149         in SCoP domain.
4150         (initialize_cloog_names): Allow changing number of loops.
4151         (build_cloog_prog): Simplify.
4152         (find_transform): Enable cloog option --strides.
4153         (graphite_swap_loops): New.
4154         (graphite_strip_mine_loop): New.
4155         (graphite_trans_swap_1and2): New.
4156         (graphite_trans_strip): New.
4157         (graphite_transform_loops): Add graphite_trans_strip.
4158         * graphite.h (scop_max_loop_depth): New.
4159
4160 2008-06-15  Tobias Grosser  <grosser@fim.uni-passau.de>
4161
4162         * graphite.c (build_scop_iteration_domain): Remove forgotten
4163         line. (Fixes compile)
4164
4165 2008-06-15  Tobias Grosser  <grosser@fim.uni-passau.de>
4166
4167         * graphite.c (print_graphite_bb): Add output of GBB_LOOPS.
4168         (build_graphite_bb): Add GBB_LOOPS and GBB_DOMAIN and reorder.
4169         (build_bb_loops): New.
4170         (graphite_transform_loops): Add build_bb_loops.
4171         (schedule_to_scattering): Use gbb_nb_loops to support changing loop
4172         numbers.
4173         * graphite.h (graphite_bb): Add loops.
4174         (gbb_nb_loops): New.
4175         (gbb_loop_at_index): New.
4176         (gbb_loop_index): New.
4177         (nb_params_in_scop): Renamed to scop_nb_params. Updated all functions
4178         using nb_params_in_scop.
4179
4180 2008-06-14  Tobias Grosser  <grosser@fim.uni-passau.de>
4181
4182         * graphite.c (print_graphite_bb): Adapt to minimized schedule.
4183         (build_scop_canonical_schedules): Build minimized schedule.
4184         (schedule_to_scattering): Adapt to minimized schedule.
4185         * graphite.h (graphite_bb): Add/Update descriptions.
4186
4187 2008-06-14  Adrien Eliche  <aeliche@isty.uvsq.fr>
4188             Tobias Grosser  <grosser@fim.uni-passau.de>
4189
4190         * graphite.c (print_graphite_bb): Add condition printing.
4191         (dump_value): New.
4192         (dump_gbb_conditions): New.
4193         (build_scop_conditions_1): New.
4194         (build_scop_conditions): New.
4195         * graphite.h (graphite_bb): Add conditions.
4196
4197 2008-06-14  Tobias Grosser  <grosser@fim.uni-passau.de>
4198
4199         * graphite.c (print_graphite_bb):
4200         (free_graphite_bb): New.
4201         (free_scop): Free bbs.
4202         (get_bb_type): Free doms.
4203         (build_scop_context): Free context matrix.
4204         (build_loop_iteration_domains): Remove unused code.
4205         (build_cloog_prog): Free scattering function and blocklist.
4206         (find_transform): Free options.
4207
4208 2008-06-13  Tobias Grosser  <grosser@fim.uni-passau.de>
4209
4210         * graphite.c (loop_body_to_cloog_stmts): Rename to add_bb_domains.
4211         Remove unnecessery cloog data structures. Make a copy of the domain
4212         (setup_cloog_loop): Rename to build_loop_iteration_domains. Remove
4213         unnecessary cloog data structures. Fix memory leaks. Remove insert
4214         into SCOP_LOOP2CLOOG_LOOP as the inserted CloogLoops will never be
4215         used.
4216         (build_scop_iteration_domain): Remove unnecessary cloog
4217         data structures.  Fix memory leaks.
4218         (graphite_transform_loops): Disable build_scop_dynamic_schedules as it
4219         uses SCOP_LOOP2CLOOG_LOOP, that is at the moment not working.
4220
4221 2008-06-12  Tobias Grosser  <grosser@fim.uni-passau.de>
4222
4223         * graphite.c (find_scop_params): Remove initialize_cloog_names.
4224
4225 2008-06-12  Tobias Grosser  <grosser@fim.uni-passau.de>
4226
4227         * graphite.c (end_scop): Style fix.
4228         (schedule_to_scattering): Style and comment fix.
4229
4230 2008-06-12  Tobias Grosser  <grosser@fim.uni-passau.de>
4231         * graphite.c (print_graphite_bb): Fix definiton of
4232         schedule_to_scattering.
4233         (initialize_cloog_names): Change nb_scattdims to max loop
4234         depth in SCoP.
4235         (schedule_to_scattering): Take parameter for number of scattering
4236         dimensions.
4237         (build_cloog_prog): Only build as much scattering dimensions as
4238         necessary.
4239
4240 2008-06-12  Tobias Grosser  <grosser@fim.uni-passau.de>
4241
4242         * graphite.c (end_scop): Disable bb splitting. Fixes SIGSEGV
4243         in polyhedron/aermod.f90.
4244
4245 2008-06-11  Tobias Grosser  <grosser@fim.uni-passau.de>
4246             Dwarak Rajagopal  <dwarak.rajagopal@amd.com>
4247             Harsha Jagasia  <harsha.jagasia@amd.com>
4248
4249         * graphite.c (is_bb_addable): Fix segfault.
4250
4251 2008-06-10  Tobias Grosser  <grosser@fim.uni-passau.de>
4252
4253         * graphite.c (is_bb_addable): Fix memory leak, handling of loops
4254         with multiple exits and conditional handling in edge cases.
4255         (is_loop_exit): Fix memory leak. (Forgotten in last commit)
4256
4257         * testsuite/gcc.dg/graphite/scop-14.c: New.
4258
4259 2008-06-06  Tobias Grosser  <grosser@fim.uni-passau.de>
4260             Adrien Eliche  <aeliche@isty.uvsq.fr>
4261
4262         * graphite.c (is_bb_addable): Add more comments and enhance
4263         readablity of the source code. Fix memory leak.
4264         (is_loop_exit): Fix memory leak.
4265
4266 2008-06-05  Tobias Grosser  <grosser@fim.uni-passau.de>
4267
4268         * graphite.c (first_loop_in_scop): Deleted.
4269         (setup_cloog_loop): Only walk the loop chain for inner loops.
4270         (build_scop_iteration_domain): Execute setup_cloog_loop for
4271         all loops in the first layer.
4272
4273 2008-06-05  Tobias Grosser  <grosser@fim.uni-passau.de>
4274
4275         * graphite.c (scan_tree_for_params): Change the way params are
4276         added to be indepenent of the number of loops.
4277         (setup_cloog_loop): Revert to short matrix format. Fix parameter
4278         handling.
4279         (build_cloog_prog): Revert to short matrix format.
4280
4281 2008-06-05  Sebastian Pop  <sebastian.pop@amd.com>
4282             Dwarak Rajagopal <dwarak.rajagopal@amd.com>
4283
4284         * tree-loop-fusion.c (fuse_loops): Fix uninitialized variable
4285         warning.
4286
4287 2008-06-05  Sebastian Pop  <sebastian.pop@amd.com>
4288
4289         * graphite.c (nb_data_refs_in_scop): New.
4290         (graphite_transform_loops): Print more stats: number of
4291         loops, basic blocks and data references per scop.
4292
4293 2008-06-04  Sebastian Pop  <sebastian.pop@amd.com>
4294             Jan Sjodin  <jan.sjodin@amd.com>
4295
4296         * graphite.c (loop_affine_expr, idx_record_params,
4297         find_scop_parameters, setup_cloog_loop): Use instantiate_scev
4298         instead of instantiate_parameters.
4299
4300 2008-06-04  Tobias Grosser  <grosser@fim.uni-passau.de>
4301
4302         * graphite.c (schedule_to_scattering): Fix scattering dimensions,
4303         add support for parameters, add STATIC_SCHEDULE at the right places,
4304         cleanup.
4305
4306 2008-06-04  Tobias Grosser  <grosser@fim.uni-passau.de>
4307
4308         * graphite.c (build_scop_loop_nests): Only add the loops, that
4309         are contained completely in the SCoP.
4310         (build_cloog_prog): Disable scattering, until schedule_to_scattering
4311         and the domains are fixed.
4312         (build_scop_canonical_schedules): Add support for bbs not contained
4313         in any SCoP.
4314
4315 2008-06-04  Tobias Grosser  <grosser@fim.uni-passau.de>
4316
4317         * graphite.h (scop_contains_loop): Update comments to match
4318         the actual behavior.
4319         (scop_contains_loop): New.
4320         * graphite.c (schedule_to_scattering): Use scop_contains_loop.
4321
4322 2008-06-04  Sebastian Pop  <sebastian.pop@amd.com>
4323
4324         * graphite.c (get_bb_type): On function body, i.e. loop_0,
4325         don't mark blocks as GBB_LOOP_SING_EXIT_HEADER, mark them
4326         as GBB_COND_HEADER.
4327
4328 2008-06-04  Sebastian Pop  <sebastian.pop@amd.com>
4329             Tobias Grosser  <grosser@fim.uni-passau.de>
4330
4331         * graphite.c (graphite_transform_loops): Early return when
4332         there are no loops in the function.
4333
4334 2008-05-31  Sebastian Pop  <sebastian.pop@amd.com>
4335             Jan Sjodin  <jan.sjodin@amd.com>
4336
4337         * graphite.c (scan_tree_for_params, setup_cloog_loop): Compute the
4338         offset of the last loop.
4339         (setup_cloog_loop): Copy the entire outer constraint matrix.
4340
4341 2008-05-31  Sebastian Pop  <sebastian.pop@amd.com>
4342             Jan Sjodin  <jan.sjodin@amd.com>
4343
4344         * graphite.c (stmt_in_scop_p, function_parameter_p,
4345         invariant_in_scop_p): Removed.
4346         (scan_tree_for_params): Can be used with no constraint
4347         matrix for gathering parameters.
4348         (idx_record_params): Don't use idx_record_param, instead use
4349         scan_tree_for_params.
4350         (find_scop_parameters): Same.
4351         (setup_cloog_loop, build_scop_iteration_domain, build_cloog_prog):
4352         Fix the size of loop domains.
4353         (schedule_to_scattering): Exit when the outer loop is not in scop.
4354         (find_transform): Enable build_cloog_prog.
4355
4356 2008-05-31  Sebastian Pop  <sebastian.pop@amd.com>
4357             Jan Sjodin  <jan.sjodin@amd.com>
4358
4359         * graphite.c (schedule_to_scattering): Make scattering domains
4360         uniformly of the same size, as required by CLooG 0.14.0 and before.
4361
4362 2008-05-31  Sebastian Pop  <sebastian.pop@amd.com>
4363             Jan Sjodin  <jan.sjodin@amd.com>
4364
4365         * graphite.c (schedule_to_scattering): Rewrite, correct the
4366         translation of the scheduling function to scattering.
4367         (build_cloog_prog): Call schedule_to_scattering only once.
4368         * graphite.h (scop_loop_index): Do not fail for loops not
4369         in the scop: return -1.
4370
4371 2008-05-30 Tobias Grosser  <grosser@fim.uni-passau.de>
4372
4373         * graphite.c (build_graphite_bb): Initialize GBB_DOMAIN.
4374         (loop_body_to_cloog_stmts): Export GBB_DOMAIN.
4375         (setup_cloog_loop): Export GBB_DOMAIN.
4376         (build_cloog_prog): New.  Create new CLOOG_PROG, which should be
4377         able to rebuild the original control flow.
4378         * graphite.h (graphite_bb): Add domain field and access macro.
4379         (GBB_DOMAIN): New.
4380
4381 2008-05-30  Sebastian Pop  <sebastian.pop@amd.com>
4382
4383         * graphite.c (debug_gbb): New.
4384         (print_scop, build_graphite_bb): Use SCOP_BBS.
4385         (build_scop_bbs): Reimplemented.
4386         (dfs_bb_in_scop_p): Removed.
4387         (build_scop_loop_nests): Reorder loops inserted in
4388         SCOP_LOOP_NEST: outer loops should come first.
4389         (build_scop_canonical_schedules): Reinitialize at zero
4390         the components of the SCOP_STATIC_SCHEDULE for the loops
4391         that have already been parsed.
4392
4393         * graphite.h (debug_gbb): Declared.
4394
4395 2008-05-30  Sebastian Pop  <sebastian.pop@amd.com>
4396             Jan Sjodin  <jan.sjodin@amd.com>
4397
4398         * graphite.c (create_empty_loop): Renamed graphite_create_new_loop.
4399         (graphite_loop_to_gcc_loop): Removed.
4400         (remove_all_edges): New.
4401         (graphite_stmt_to_gcc_stmt): Renamed translate_clast.
4402         (gloog): Remove useless code.
4403
4404 2008-05-29  Tobias Grosser  <grosser@fim.uni-passau.de>
4405
4406         * graphite.c (get_bb_type): Reworked. We distinguish between
4407         loops with one or multiple exits.
4408         (is_loop_exit): New.
4409         (is_pred): New.
4410         (is_bb_addable): Rework condition handling, now support for case
4411         case statements and loops with multiple exits.
4412
4413         * testsuite/gcc.dg/graphite/scop-11.c: New.
4414         * testsuite/gcc.dg/graphite/scop-12.c: New.
4415         * testsuite/gcc.dg/graphite/scop-13.c: New.
4416
4417 2008-05-29  Tobias Grosser  <grosser@fim.uni-passau.de>
4418
4419         * graphite.c (dot_all_scops_1): Fix some colors. Reuse colors, if
4420         we have too many colors.
4421
4422 2008-05-22  Sandeep Maram <smaram_b04@iiita.ac.in>
4423
4424         * doc/invoke.texi (-ftree-loop-fusion): Document.
4425         * tree-pass.h (pass_loop_fusion): Declared.
4426         * tree-loop-fusion.c: New.
4427         * timevar.def (TV_TREE_LOOP_FUSION): Declared.
4428         * tree-data-ref.c (find_data_references_in_loop): Make extern.
4429         * tree-data-ref.h (find_data_references_in_loop): Declared.
4430         * common.opt (ftree-loop-fusion): Declared.
4431         * Makefile.in (tree-loop-fusion.o): Added rule and to OBJS-common.
4432
4433 2008-05-21  Sebastian Pop  <sebastian.pop@amd.com>
4434
4435         * graphite.c (build_access_matrix): Fix typo from the merge.
4436
4437 2008-05-20  Sebastian Pop  <sebastian.pop@amd.com>
4438
4439         * Merge from mainline (130800:135673).
4440
4441 2008-05-07  Sebastian Pop  <sebastian.pop@amd.com>
4442
4443         * graphite.c (end_scop): The exit of the scop is not part of the scop.
4444         Update dominators after splitting.
4445
4446 2008-05-07  Sebastian Pop  <sebastian.pop@amd.com>
4447
4448         * graphite.c (is_bb_addable): Return the harmful statement.
4449         Factor up some code.
4450         (end_scop): New.  Splits end of scope bbs on a harmful statement.
4451         (build_scops_1): Call end_scop.
4452
4453 2008-05-07  Sebastian Pop  <sebastian.pop@amd.com>
4454
4455         * graphite.c: (succs_at_same_depth, end_scop, all_preds_visited_p,
4456         all_succs_visited_p, start_new_scop_for_each_succ, start_new_scop,
4457         add_dominators_to_open_scops, stop_last_open_scop, scop_end_loop,
4458         build_scops_1): Removed.
4459         (build_scops_2): Renamed build_scops_1.
4460
4461 2008-05-06  Sebastian Pop  <sebastian.pop@amd.com>
4462
4463         * graphite.c: Fix formatting.
4464
4465 2008-05-06  Tobias Grosser  <grosser@fim.uni-passau.de>
4466
4467         * graphite.c (get_bb_type): New.
4468         (move_scops): New.
4469         (build_scops_2): New.
4470         (is_bb_addable): New.
4471         (build_scops): Switch the scop detection.
4472         (build_scop_bbs): Add entry bb to scop.
4473         * graphite.h (struct scop): Update comment.
4474
4475 2008-05-06  Tobias Grosser  <grosser@fim.uni-passau.de>
4476
4477         * graphite.c (dot_all_scops_1): Fix some incorrect colors and add
4478         more colors.
4479
4480 2008-05-06  Tobias Grosser  <grosser@fim.uni-passau.de>
4481
4482         * testsuite/gcc.dg/graphite/scop-1.c: Update.
4483         * testsuite/gcc.dg/graphite/scop-2.c: Update.
4484         * testsuite/gcc.dg/graphite/scop-4.c: Update.
4485         * testsuite/gcc.dg/graphite/scop-5.c: Add.
4486         * testsuite/gcc.dg/graphite/scop-6.c: Add.
4487
4488 2008-05-06  Sebastian Pop  <sebastian.pop@amd.com>
4489
4490         * testsuite/gcc.dg/graphite/scop-0.c: Add.
4491         * testsuite/gcc.dg/graphite/scop-7.c: Add.
4492         * testsuite/gcc.dg/graphite/scop-8.c: Add.
4493         * testsuite/gcc.dg/graphite/scop-9.c: Add.
4494         * testsuite/gcc.dg/graphite/scop-10.c: Add.
4495
4496 2008-05-06  Tobias Grosser  <grosser@fim.uni-passau.de>
4497
4498         * graphite.c (scop_affine_expr): Renamed to loop_affine_expr.
4499         Check affine expressions depending on the outermost loop
4500         instead of a scop.
4501         (stmt_simple_for_scop_p): Same.
4502         (harmfule_stmt_in_scop): Same.
4503
4504 2008-04-28  Tobias Grosser  <grosser@fim.uni-passau.de>
4505
4506         * graphite.c (dot_all_scops): Remove incorrect difficult bb coloring,
4507         mark entry and exit, that are not part of the SCoP and update HTML
4508         formatting.
4509
4510 2008-04-25  Sebastian Pop  <sebastian.pop@amd.com>
4511
4512         * graphite.c (basic_block_simple_for_scop_p): Renamed
4513         harmful_stmt_in_bb.
4514         (save_scop, preds_at_same_depth, test_for_scop_bound): Removed.
4515         (add_dominators_to_open_scops, build_scops_1): Reimplemented.
4516         (all_preds_visited_p, all_succs_visited_p,
4517         start_new_scop_for_each_succ, start_new_scop, stop_last_open_scop,
4518         scop_end_loop): New.
4519         (build_scops): Do not use dfs_enumerate_from.
4520
4521         * testsuite/gcc.dg/graphite/scop-{1,2,4}.c: Updated.
4522
4523 2008-04-23  Sebastian Pop  <sebastian.pop@amd.com>
4524
4525         * graphite.c: Add comments to functions that are missing a
4526         description.
4527         (graphite_create_iv): Removed.  Merged in graphite_loop_to_gcc_loop.
4528
4529 2008-04-23  Sebastian Pop  <sebastian.pop@amd.com>
4530
4531         * graphite.c (nb_params_in_scop): Moved...
4532         (graphite_bb_from_bb, loop_body_to_cloog_stmts): New.
4533         (setup_cloog_loop): Call loop_body_to_cloog_stmts.
4534         (clast_to_gcc_expression): Reduce column size to less than 80.
4535         (graphite_create_iv): Return the new name of the IV.
4536         (find_transform): Set options->esp and options->cpp.
4537         (gloog): Comment out the invalidation of the old loop code.
4538         (initialize_dependence_polyhedron): Replace scop_nb_params with
4539         nb_params_in_scop.
4540
4541         * graphite.h (nb_params_in_scop): ... here.
4542         (scop_nb_params): Removed.
4543         (loop_domain_dim): Return something even when the loop was not
4544         found in the hash table: avoid ICEing on all the graphite.exp
4545         testcases.
4546
4547 2008-04-14  Konrad Trifunovic  <konrad.trifunovic@inria.fr>
4548
4549         * tree-chrec.c (for_each_scev_op): SCEV can have 3 operands.
4550
4551         * graphite.c (build_scop_dynamic_schedules): Schedule is built
4552         according to nesting level.
4553         (find_scop_parameters): Call instantiate_parameters.
4554         (scan_tree_for_params): Extend it to handle general affine bounds.
4555         Inner loop bound can depend on outer loop induction variable.
4556         (setup_cloog_loop): tmp variable is allocated on stack. Call
4557         instantiate_parameters with respect to outermost_loop_in_scop.
4558         (loop_domain_dim, ref_nb_loops, loop_iteration_vector_dim): moved to
4559         graphite.h.
4560         (create_empty_loop): Function loopify should be given edge
4561         probability, instead of edge frequency. Dominance relation from
4562         switch_bb to loop_header.
4563         (clast_to_gcc_expression): Added handling of clast_reduction node.
4564         (gloog): New functionality for removing old loop.
4565         (test_dependence): Factored out from build_rdg_all_levels.
4566         (build_rdg_all_levels): Dependence testing factored out to
4567         test_dependence function.
4568
4569         * graphite.h (struct graphite_bb): Extended with dynamic_schedule.
4570         (loop_domain_dim, ref_nb_loops, loop_iteration_vector_dim): Moved
4571         from graphite.c
4572
4573 2008-04-07  Sebastian Pop  <sebastian.pop@amd.com>
4574
4575         * graphite.c (free_scop, param_index, initialize_cloog_names,
4576         nb_params_in_scop): Use name_tree map instead of just a tree
4577         for keeping track of the variable name associated to that tree.
4578         (create_empty_loop, gmp_cst_to_tree, clast_name_to_gcc,
4579         clast_to_gcc_expression, graphite_create_iv,
4580         graphite_loop_to_gcc_loop, graphite_cond_to_gcc_cond,
4581         graphite_stmt_to_gcc_stmt): New.
4582         (gloog): Call these.
4583         * graphite.h (struct name_tree): New.
4584         (struct scop): Use name_tree instead of tree for params.
4585         Store a vector of name_tree for new_ivs.
4586         (SCOP_NEWIVS): New.
4587         (scop_nb_params): Use name_tree instead of tree.
4588
4589 2008-04-05  Alexander Lamaison  <awl03@doc.ic.ac.uk>
4590             Sebastian Pop  <sebastian.pop@amd.com>
4591
4592         * tree-bounds.c: New.
4593         * tree-bounds.h: New.
4594         * tree-pass.h: Declare pass_bounds_early and pass_bounds_late.
4595         * passes.c: Schedule pass_bounds_early, pass_bounds_late.
4596         * builtins.c (expand_builtin_alloca): Add flag_bounds as for
4597         flag_mudflap.
4598         * gcc.c: Same.
4599         * toplev.c: Same.
4600         * c-cppbuiltin.c: Same.
4601         * c-pragma.c: Same.
4602         * common.opt: Same.
4603         * varasm.c: Same.
4604         * tree-outof-ssa.c: Same.
4605         * c-common.c: Same.
4606         * Makefile.in: Same.
4607
4608 2008-03-15  Antoniu Pop  <antoniu.pop@gmail.com>
4609             Sebastian Pop  <sebastian.pop@amd.com>
4610
4611         * tree-loop-distribution.c (remaining_stmts,
4612         upstream_mem_writes): Removed static variables.
4613         (copy_loop_before, create_bb_after_loop,
4614         mark_nodes_having_upstream_mem_writes, free_rdg_components,
4615         rdg_build_components, rdg_build_partitions,
4616         dump_rdg_partitions): Extern.
4617         (generate_loops_for_partition, generate_code_for_partition): Do not
4618         return a bool.
4619         (already_processed_vertex_p, predecessor_has_mem_write,
4620         mark_nodes_having_upstream_mem_writes, has_upstream_mem_writes,
4621         rdg_flag_all_uses, rdg_flag_uses, rdg_flag_vertex_and_dependent,
4622         rdg_flag_loop_exits, rdg_flag_similar_memory_accesses,
4623         build_rdg_partition_for_component, rdg_build_partitions, ldist_gen):
4624         Pass remaining_stmts and upstream_mem_writes as parameters.
4625         (rdg_component): Moved...
4626         (build_rdg_partition_for_component): Do not aggregate components when
4627         flag_streamize_loops is set.
4628         (gen_sequential_loops): New.
4629         (ldist_gen): Call gen_sequential_loops.
4630
4631         * tree-pass.h (pass_loop_streamization): Declared.
4632
4633         * omp-low.c (expand_omp_sections): Call add_bb_to_loop on created
4634         basic blocks when loops structures exist.
4635
4636         * builtin-types.def (BT_FN_VOID_PTR_PTR_INT): New.
4637
4638         * tree-ssa-loop-ivopts.c (expr_invariant_in_region_p): New.
4639
4640         * tree-parloops.c (take_address_of, eliminate_local_variables_1,
4641         eliminate_local_variables_stmt, eliminate_local_variables,
4642         separate_decls_in_loop_name, separate_decls_in_loop_stmt,
4643         separate_decls_in_loop, gen_parallel_loop): Make them work on a region
4644         of code delimited by two edges in the CFG.
4645         (separate_decls_in_loop_name): Renamed separate_decls_in_region_name.
4646         (separate_decls_in_loop_stmt): Renamed separate_decls_in_region_stmt.
4647         (separate_decls_in_loop): Renamed separate_decls_in_region.  Isolate
4648         the case of parallelisation of reductions.
4649         (create_loop_fn): Extern.
4650         (create_omp_parallel_region): New.
4651
4652         * tree-data-ref.c (dump_data_dependence_relation): Don't call
4653         dump_data_reference for printing dra and drb.
4654         (create_rdg_edge_for_ddr, create_rdg_edges_for_scalar): Initialise
4655         RDGE_RELATION.
4656         (build_rdg): Don't call free_dependence_relations for the moment, as
4657         we attach dependence relations on each edge of the RDG.
4658         To be fixed later.
4659
4660         * tree-data-ref.h (rdg_component): ...here.
4661         (struct rdg_edge): New field ddr_p relation.
4662         (RDGE_RELATION): New.
4663         (create_bb_after_loop, copy_loop_before,
4664         mark_nodes_having_upstream_mem_writes, rdg_build_components,
4665         rdg_build_partitions, dump_rdg_partitions,
4666         free_rdg_components): Declared.
4667
4668         * omp-builtins.def (BUILT_IN_GOMP_STREAM_ALIGN_PUSH,
4669         BUILT_IN_GOMP_STREAM_ALIGN_POP): New.
4670
4671         * tree-loop-streamization.c: New.
4672
4673         * tree-flow.h (gather_blocks_in_sese_region, create_loop_fn,
4674         create_omp_parallel_region, expr_invariant_in_region_p): Declared.
4675
4676         * Makefile.in (tree-loop-streamization.o): Added to OBJS-common.
4677
4678         * tree-cfg.c (gather_blocks_in_sese_region): Extern.
4679
4680         * passes.c: Schedule pass_loop_streamization.
4681
4682 2008-03-08  Tobias Grosser  <grosser@fmi.uni-passau.de>
4683
4684         * graphite.c (dot_all_scops_1): Fix formatting for difficult bbs and
4685         update comment.
4686
4687 2008-03-07  Tobias Grosser  <grosser@fim.uni-passau.de>
4688
4689         * graphite.c (dot_all_scops): Update formatting.
4690         Bbs can now be part of more than one SCoP.
4691
4692 2008-03-04  Sebastian Pop  <sebastian.pop@amd.com>
4693
4694         * graphite.c (new_loop_to_cloog_loop_str, setup_cloog_loop): Fix
4695         malloc problems.
4696         (loop_domain_dim): Check for unregistered toplev SCOP loop.
4697         * graphite.h (loop_to_cloog_loop): New.
4698
4699 2008-03-04  Konrad Trifunovic  <konrad.trifunovic@inria.fr>
4700
4701         * graphite.c (loop_domain_dim, ref_nb_loops,
4702         loop_iteration_vector_dim): New.
4703         (build_access_matrix_with_af, build_access_matrix,
4704         initialize_dependence_polyhedron): Fixed for new matrix layout.
4705         No longer assume that all iteration domains are of the same
4706         dimensionality.
4707
4708 2008-03-02  Sebastian Pop  <sebastian.pop@amd.com>
4709
4710         * tree-scalar-evolution.c (instantiate_parameters_1): An SSA_NAME
4711         defined in a loop at depth 0 is invariant.
4712         * tree-chrec.c (evolution_function_is_invariant_rec_p): Ditto.
4713         * tree-ssa-loop-ivopts.c (expr_invariant_in_loop_p): Should never
4714         be called at loop depth 0.
4715
4716         * graphite.c (basic_block_simple_for_scop_p): Take the scop as
4717         a parameter.
4718         (dot_all_scops_1): Update use of basic_block_simple_for_scop_p.
4719         (down_open_scop): Removed.
4720         (loop_in_scop_p): Redefined.
4721         (scop_affine_expr): New argument: scop.
4722         (stmt_simple_for_scop_p): New argument: scop.  RETURN_EXPR is not
4723         a harmful statement ending a scop.
4724         (basic_block_simple_for_scop_p): New argument: scop.
4725         (get_loop_start): Removed.
4726         (new_scop): Initialize SCOP_LOOPS.
4727         (free_scop): Free SCOP_LOOPS.
4728         (succs_at_same_depth, preds_at_same_depth): New.
4729         (end_scop): Test the validity of a scop.
4730         (add_dominators_to_open_scops): New.
4731         (test_for_scop_bound): Call add_dominators_to_open_scops.
4732         Add cases for opening and closing multiple scops.
4733         (build_scops, build_scop_bbs): Iterate over basic blocks in
4734         depth first order.
4735         (build_graphite_bb): Pass scop directly.
4736         (dfs_bb_in_scop_p): New.
4737         (scop_record_loop): Use SCOP_LOOPS for not recording the same loop
4738         several times.
4739         (nb_loops_around_gb): Use loop_in_scop_p.
4740         (schedule_to_scattering): Disabled for the moment the code computing
4741         the "textual order for outer loop".
4742
4743         * graphite.h (struct scop): New field loops.
4744         (SCOP_LOOPS): New.
4745         (scop_loop_index): Test that the given loop belongs to SCOP_LOOPS.
4746
4747         * testsuite/gcc.dg/graphite/scop-{1,...,7}.c: Updated.
4748
4749 2008-02-27  Antoniu Pop  <antoniu.pop@gmail.com>
4750             Sebastian Pop  <sebastian.pop@amd.com>
4751
4752         * builtin-types.def (BT_FN_PTR_SIZE_UINT, BT_FN_BOOL_PTR): New.
4753         * common.opt (fstreamize-loops): New.
4754         * omp-builtins.def (BUILT_IN_GOMP_STREAM_CREATE,
4755         BUILT_IN_GOMP_STREAM_PUSH, BUILT_IN_GOMP_STREAM_HEAD,
4756         BUILT_IN_GOMP_STREAM_POP, BUILT_IN_GOMP_STREAM_EOS_P,
4757         BUILT_IN_GOMP_STREAM_SET_EOS, BUILT_IN_GOMP_STREAM_DESTROY): New.
4758
4759 2008-02-22  Konrad Trifunovic  <konrad.trifunovic@inria.fr>
4760
4761         * tree-data-ref.c (build_empty_rdg): New.
4762         (build_rdg): Use it.
4763         * tree-data-ref.h (build_empty_rdg): Declared.
4764         * graphite.c (free_scop): Free SCOP_LOOP2CLOOG_LOOP.
4765         (find_vertex_for_stmt): Removed.
4766         (build_rdg_all_levels): Use build_empty_rdg and rdg_vertex_for_stmt.
4767
4768 2008-02-21  Sebastian Pop  <sebastian.pop@amd.com>
4769
4770         * tree-loop-distribution.c (generate_builtin): After cancelling the
4771         loop tree, also delete basic blocks.
4772         (rdg_flag_uses): Stop recursion when a vertex has already been
4773         processed.
4774
4775 2008-02-15  Konrad Trifunovic  <konrad.trifunovic@inria.fr>
4776
4777         * graphite.c (build_scop_alpha): Removed.
4778         (graphite_transform_loops): Add a dummy call to build_all_rdg_levels
4779         and dump_dependence_graph to avoid compiler warnings.
4780
4781 2008-02-14  Konrad Trifunovic  <konrad.trifunovic@inria.fr>
4782
4783         * tree-data-ref.c (dr_may_alias_p, create_rdg_vertices): Extern.
4784         * tree-data-ref.h (dr_may_alias_p, create_rdg_vertices): Declared.
4785         * graphite.c (new_loop_to_cloog_loop_str, hash_loop_to_cloog_loop,
4786         eq_loop_to_cloog_loop, del_loop_to_cloog_loop): New.
4787         (new_scop, setup_cloog_loop): Initialize SCOP_LOOP2CLOOG_LOOP.
4788         (initialize_dependence_polyhedron, find_vertex_for_stmt,
4789         initialize_data_dependence_polyhedron, is_empty_polyhedron,
4790         statement_precedes_p, build_rdg_all_levels, build_scop_alpha,
4791         dump_dependence_graph): New.
4792         * graphite.h (struct graphite_bb): New field compressed_alpha_matrix.
4793         (GBB_ALPHA): New.
4794         (struct scop): New field loop2cloog_loop.
4795         (SCOP_LOOP2CLOOG_LOOP, struct data_dependence_polyhedron,
4796         RDGE_DDP, ddp_p, struct loop_to_cloog_loop_str): New.
4797
4798 2008-02-10  Konrad Trifunovic  <konrad.trifunovic@inria.fr>
4799
4800         * graphite.c (build_graphite_bb): Fix initialization
4801         of the graphite basic block.
4802
4803 2008-02-05  Sebastian Pop  <sebastian.pop@amd.com>
4804
4805         * graphite.c (scan_tree_for_params): Rewrite for the new layout of
4806         loop domain matrix.  Pass in the number of loops contained in the
4807         constraint matrix.
4808         (nb_loops_around_gb): Moved before setup_cloog_loop that uses it.
4809         (setup_cloog_loop): Rewrite for the new layout of loop domain matrix:
4810         loops that are not surrounding the current loop are not represented
4811         in the domain constraint matrix.
4812         (build_scop_iteration_domain): Initial domain constraint matrix
4813         contains only the eq/ineq, cst, and scop parameters columns.
4814
4815 2008-01-29  Tobias Grosser  <grosser@fim.uni-passau.de>
4816
4817         * graphite.c (schedule_to_scattering, nb_loops_around_gb): New.
4818         (print_graphite_bb): Print scattering.
4819
4820 2008-01-29  Tobias Grosser  <grosser@fim.uni-passau.de>
4821
4822         * graphite.c (initialize_cloog_names): Initialize names of
4823         scattering variables.
4824
4825 2009-01-29  Tobias Grosser  <grosser@fim.uni-passau.de>
4826
4827         * graphite.c (dot_all_scops_1): Disable debug output while
4828         printing graph.
4829
4830 2008-01-29  Tobias Grosser  <grosser@fim.uni-passau.de>
4831
4832         * graphite.c (find_transform): Change cloog output language to C.
4833
4834 2008-01-27  Sebastian Pop  <sebastian.pop@amd.com>
4835
4836         * tree-loop-distribution.c (generate_memset_zero,
4837         generate_builtin, generate_code_for_partition,
4838         rdg_flag_all_uses): New.
4839         (rdg_flag_uses): Gather in the same partition the statements defining
4840         the VUSES of the current statement.
4841         (rdg_flag_similar_stores): Renamed rdg_flag_similar_memory_accesses.
4842         Gather in the same partition not only the stores to the same memory
4843         access, but also the reads.
4844         (ldist_generate_loops): Renamed ldist_gen.
4845
4846 2008-01-24  Sebastian Pop  <sebastian.pop@amd.com>
4847             Tobias Grosser  <grosser@fmi.uni-passau.de>
4848
4849         * graphite.c (setup_cloog_loop): Chain all cloog loops with the
4850         next pointer, don't use the inner pointer.
4851
4852 2008-01-20  Tobias Grosser  <grosser@fmi.uni-passau.de>
4853
4854         * graphite.c (dot_all_scops, dot_all_scops_1): New.
4855         (find_transform): Call dot_all_1.
4856         * graphite.h (dot_all_scops): Declared.
4857
4858 2007-12-14  Sebastian Pop  <sebastian.pop@amd.com>
4859
4860         * tree-loop-distribution.c: Fix apsi.f ICE.
4861         (create_bb_after_loop): New.
4862         (generate_loops_for_partition): Use it.
4863         * testsuite/gfortran.dg/ldist-1.f90: New.
4864
4865         * tree-data-ref.c (dot_rdg): Use /tmp/rdg.dot for dotty format.
4866         * graphite.c (dot_scop): Use /tmp/scop.dot for dotty format.
4867
4868 2007-12-13  Tobias Grosser  <grosser@fmi.uni-passau.de>
4869
4870         * graphite.c (find_transform): Dump cloog program sent to cloog.
4871
4872 2007-12-13  Tobias Grosser  <grosser@fmi.uni-passau.de>
4873
4874         * graphite.c (initialize_cloog_names): Initialize cloog
4875         iterator names.
4876
4877 2007-12-13  Tobias Grosser  <grosser@fmi.uni-passau.de>
4878
4879         * graphite.c (build_scop_context): Fix typo, for the matrix
4880         format: insert '0 >= 0' instead of '-1 >= 0'.
4881
4882 2007-12-13  Sebastian Pop  <sebastian.pop@amd.com>
4883
4884         * Fix merge problems.
4885
4886 2007-12-13  Sebastian Pop  <sebastian.pop@amd.com>
4887
4888         * graphite.c (setup_cloog_loop): Fix typo.
4889
4890 2007-12-12  Sebastian Pop  <sebastian.pop@amd.com>
4891
4892         * doc/invoke.texi (-ftree-loop-distribution): Documented.
4893         * tree-loop-distribution.c: Reimplemented.
4894         * tree-pass.h (pass_loop_distribution): New.
4895         * tree-scalar-evolution.c (number_of_iterations_for_all_loops): Use
4896         print_loops.
4897         * graphds.h (struct graph): New field indexes.
4898         * timevar.def (TV_TREE_LOOP_DISTRIBUTION): New.
4899
4900         * tree-vect-analyze.c: Remove declaration of static functions when not
4901         needed.
4902         * tree-vectorizer.c: Same.
4903         (rename_variables_in_loop): Now extern.
4904         (slpeel_tree_duplicate_loop_to_edge_cfg): Renamed
4905         tree_duplicate_loop_to_edge_cfg.  Reset PENDING_STMT for edges after
4906         calling redirect_edge_and_branch_force.
4907
4908         * tree-vectorizer.h (tree_duplicate_loop_on_edge): Declared.
4909
4910         * tree-data-ref.c: Don't include tree-chrec.h.
4911         (debug_data_dependence_relations): New.
4912         (dump_data_dependence_relation): Call dump_data_reference on data refs
4913         in the relation.
4914         (same_access_functions): Moved...
4915         (find_vertex_for_stmt): Renamed rdg_vertex_for_stmt.
4916         (dump_rdg_vertex, debug_rdg_vertex, dump_rdg_component,
4917         debug_rdg_component, dump_rdg, debug_rdg, dot_rdg_1, dot_rdg,
4918         struct rdg_vertex_info, ): New.
4919         (create_rdg_edge_for_ddr): Compute the dependence level before looking
4920         at DDR_REVERSED_P.
4921         (create_rdg_vertices): Initialize the htab of graph->indexes.
4922         Initialize RDG_MEM_WRITE_STMT and RDG_MEM_READS_STMT.
4923         (stmts_from_loop): Don't save LABEL_EXPR.
4924         (hash_stmt_vertex_info, eq_stmt_vertex_info,
4925         hash_stmt_vertex_del): New.
4926         (build_rdg): Initialize rdg->indexes.
4927         (free_rdg, stores_from_loop, ref_base_address,
4928         rdg_defs_used_in_other_loops_p, have_similar_memory_accesses,
4929         have_similar_memory_accesses_1, ref_base_address_1,
4930         remove_similar_memory_refs): New.
4931
4932         * tree-data-ref.h: Include tree-chrec.h.
4933         (debug_data_dependence_relations): Declared.
4934         (same_access_functions): ...here.  Now static inline.
4935         (ddr_is_anti_dependent, ddrs_have_anti_deps,
4936         ddr_dependence_level): New.
4937         (struct rdg_vertex): New fields has_mem_write, has_mem_reads.
4938         (RDGV_HAS_MEM_WRITE, RDGV_HAS_MEM_READS, RDG_STMT, RDG_MEM_WRITE_STMT,
4939         RDG_MEM_READS_STMT): New.
4940         (dump_rdg_vertex, debug_rdg_vertex, dump_rdg_component,
4941         debug_rdg_component, dump_rdg, debug_rdg, dot_rdg,
4942         rdg_vertex_for_stmt): Declared.
4943         (struct rdg_edge): New field level.
4944         (RDGE_LEVEL, free_rdg): New.
4945         (stores_from_loop, remove_similar_memory_refs,
4946         rdg_defs_used_in_other_loops_p,
4947         have_similar_memory_accesses): Declared.
4948         (rdg_has_similar_memory_accesses): New.
4949
4950         * lambda.h (dependence_level): New.
4951         * common.opt (ftree-loop-distribution): New.
4952         * tree-flow.h (debug_loop_ir): Renamed debug_loops.
4953         (print_loop_ir): Renamed print_loops.
4954         (debug_loop, debug_loop_num, print_loops_bb, mark_virtual_ops_in_bb,
4955         tree_duplicate_loop_to_edge_cfg, rename_variables_in_loop): Declared.
4956         * Makefile.in (TREE_DATA_REF_H): Depends on tree-chrec.h.
4957         (tree-loop-distribution.o): Added.
4958         * tree-cfg.c (mark_virtual_ops_in_region): Use mark_virtual_ops_in_bb.
4959         (mark_virtual_ops_in_bb): New.
4960         (print_loops_bb, debug_loop_num, debug_loop): New.
4961         * passes.c: Scheduled pass_loop_distribution.
4962
4963 2007-12-12  Konrad Trifunovic  <konrad.trifunovic@inria.fr>
4964
4965         * graphite.c (scan_tree_for_params): Correct the number of columns
4966         for polylib format.
4967         (nb_flat_iterator): New.
4968         (setup_cloog_loop): Initialize to 1 the first column for inequalities.
4969         (build_scop_iteration_domain): Correct the number of columns for
4970         polylib format.
4971
4972 2007-12-12  Sebastian Pop  <sebastian.pop@amd.com>
4973
4974         * Merge from mainline (129697:130800).
4975
4976 2007-10-30  Sebastian Pop  <sebastian.pop@amd.com>
4977
4978         * graphite.c (build_graphite_bb): SCoP's basic blocks are post
4979         dominated by SCoP's exit.
4980         (graphite_transform_loops): Compute post dominators.
4981
4982 2007-10-28  Sebastian Pop  <sebastian.pop@amd.com>
4983
4984         * Merge from mainline (127169:129697).
4985
4986 2007-10-28  Sebastian Pop  <sebastian.pop@amd.com>
4987
4988         * graphite.c (affine_expr): Renamed scop_affine_expr.  Use an extra
4989         parameter for the basic block that contains the expression.  Use
4990         outermost_loop_in_scop for evolution_function_is_affine_multivariate_p.
4991         (stmt_simple_for_scop_p): Pass to scop_affine_expr the basic block of
4992         the expression.
4993         * graphite.h (gbb_loop): New.
4994         (GBB_LOOP): Removed.
4995
4996 2007-08-03  Sebastian Pop  <sebpop@gmail.com>
4997
4998         * Makefile.in: Fix merge problem.
4999
5000 2007-08-03  Sebastian Pop  <sebpop@gmail.com>
5001
5002         * Merge from mainline (125309:127169).
5003         * tree-loop-distribution.c: Disabled.
5004
5005 2007-06-05  Sebastian Pop  <sebpop@gmail.com>
5006
5007         * Merge from mainline (r123693:125309).
5008
5009 2007-05-30  Sebastian Pop  <sebpop@gmail.com>
5010
5011         * tree-loop-distribution.c (correct_modify_expr_p): Renamed
5012         correct_modify_p
5013         (correct_modify_p, check_statements, number_of_lvalue_uses,
5014         number_of_scalar_dependences, create_edges): Use GIMPLE_MODIFY_STMT
5015         instead of MODIFY_EXPR.
5016         (update_edge_with_ddv): Don't pass index_of_edge.  Initialize
5017         and push new edges.
5018
5019 2007-05-24  Sebastian Pop  <sebpop@gmail.com>
5020
5021         * tree-loop-distribution.c (struct rdg): Replace arrays by
5022         VECs for edges and vertices.
5023         (RDG_NBV, RDG_NBE, RDG_VERTEX, RDG_EDGE): Removed.
5024         (RDGV_NB_PARTITIONS): New.
5025         (PRDG_NBV, PRDG_NBE): Removed.
5026         (build_scc_graph, correct_partitions_p, mark_partitions, build_prdg,
5027         dump_rdg, find_vertex_with_stmt, create_vertices, free_rdg,
5028         number_of_scalar_dependences, create_edges, build_rdg): Use VECs.
5029
5030 2007-05-17  Georges-Andre Silber  <silber@cri.ensmp.fr>
5031             Sebastian Pop  <sebpop@gmail.com>
5032
5033         * doc/invoke.texi (-ftree-loop-distribution): Document.
5034         * tree-loop-distribution.c: New file.
5035         * tree-pass.h (pass_loop_distribution): Declared.
5036         * timevar.def (TV_TREE_LOOP_DISTRIBUTION): New.
5037         * tree-data-ref.c (initialize_data_dependence_relation): Initialize
5038         and set reversed_p.
5039         * tree-data-ref.h (data_dependence_relation): Add reversed_p.
5040         (DDR_REVERSED_P): New.
5041         * common.opt (-ftree-loop-distribution): New.
5042         * tree-flow.h (distribute_loops): Declared.
5043         * Makefile.in (OBJS-common): Depend on tree-loop-distribution.o.
5044         * passes.c (init_optimization_passes): Schedule loop distribution.
5045
5046 2007-05-12  Sebastian Pop  <sebastian.pop@inria.fr>
5047
5048         * graphite.c (print_graphite_bb): Don't call dump_data_references.
5049         (print_scop): Don't print when scop is NULL.
5050         (build_scop_context, find_transform): Don't output to stderr.
5051
5052 2007-05-09  Sebastian Pop  <sebastian.pop@inria.fr>
5053
5054         * tree-data-ref.c: Don't include graphite.h.
5055         Comment out the code for printing data reference's scop.
5056         (build_access_matrix_with_af): Moved...
5057         * tree-data-ref.h (build_access_matrix_with_af): Removed declaration.
5058         * graphite.c (build_access_matrix_with_af): ... here.  Now static.
5059         (print_graphite_bb): Print basic block's schedule.
5060         (print_scop): Don't print the schedule, call cloog's pretty printer.
5061         (bb_in_scop_p): A basic block is in a scop only if it is both
5062         dominated and postdominated by the scop's entry and exit basic blocks.
5063         (function_parameter_p): New.
5064         (invariant_in_scop_p): Use function_parameter_p.
5065         (new_scop, save_scop): New.
5066         (end_scop, test_for_scop_bound, build_scops): Use new_scop, and
5067         save_scop.
5068         (scan_tree_for_params): Directly build the constraint as CloogMatrix.
5069         (loop_in_scop_p): New.
5070         (scop_record_loop): Use loop_in_scop_p.
5071         (build_scop_domain): Renamed build_scop_iteration_domain.
5072         (setup_cloog_loop, initialize_cloog_names, find_scop_parameters,
5073         nb_params_in_scop, build_scop_context, first_loop_in_scop,
5074         setup_cloog_loop, dot_scop_1, dot_scop): New.
5075         * graphite.h (GBB_LOOP, SCOP_PROG, dot_scop): New.
5076         (struct scop): Add a pointer to cloog's representation of a program.
5077
5078 2007-04-14  Sebastian Pop  <sebastian.pop@inria.fr>
5079
5080         * doc/invoke.texi (-ftree-check-verbose): Renamed
5081         -ftree-checks-verbose.
5082         * common.opt (flag_tree_check_verbose): Renamed
5083         flag_tree_checks_verbose.
5084         * tree-check.c (tree_check_warning): Use flag_tree_checks_verbose.
5085
5086 2007-04-14  Sebastian Pop  <sebastian.pop@inria.fr>
5087
5088         * configure: Regenerated.
5089         * config.in: Regenerated.
5090         * tree-ssa-loop.c (graphite_transforms): Execute
5091         graphite_transform_loops only when HAVE_cloog.
5092         * configure.ac (HAVE_polylib, HAVE_cloog, GRAPHITE): Defined.
5093         * graphite.c: Include polylibgmp.h and cloog.h.
5094         (graphite_transform_loops): Removed loops parameter.
5095         * tree-flow.h (graphite_transform_loops): Update declaration.
5096         * Makefile.in (POLYLIBLIBS, POLYLIBINC, CLOOGLIBS, CLOOGINC): New.
5097         (LIBS): Depend on CLOOGLIBS and on POLYLIBLIBS.
5098         (INCLUDES): Depend on POLYLIBINC and on CLOOGINC.
5099         (OBJS-common): Remove dependence on graphite.o.
5100         (BACKEND): Depend on @GRAPHITE@.
5101
5102 2007-04-13  Sebastian Pop  <sebastian.pop@inria.fr>
5103
5104         * doc/invoke.texi (-ftree-check-verbose): Documented.
5105         * testsuite/gcc.dg/tree-checker/tree-checks-1.c: New.
5106         * testsuite/gcc.dg/tree-checker/tree-checks-2.c: New.
5107         * testsuite/gcc.dg/tree-checker/tree-checks-3.c: New.
5108         * testsuite/gcc.dg/tree-checker/tree-checks-4.c: New.
5109         * testsuite/gcc.dg/tree-checker/tree-checks.exp: New.
5110         * testsuite/gcc.dg/tree-checker/condates.crp: New.
5111         * common.opt (ftree-checks-verbose): New.
5112         * tree-check.c (tree_check_warning): Move extra stderr output
5113         under control of flag_tree_check_verbose.
5114
5115 2007-04-12  Sebastian Pop  <sebastian.pop@inria.fr>
5116
5117         * tree-match.c: Fix comments formatting.
5118         * tree-match.h: Fix comments formatting.
5119         * tree-check.c: Fix comments formatting.
5120         (tree_check_init): Restructure.
5121
5122 2007-04-12  Nic Volanschi  <nic.volanschi@free.fr>
5123
5124         * doc/invoke.texi (-ftree-check, -ftree-checks): Documented.
5125
5126 2007-04-10  Sebastian Pop  <sebastian.pop@inria.fr>
5127
5128         * Merge from mainline (r120733:123693).
5129
5130 2007-03-20  Nic Volanschi  <nic.volanschi@free.fr>
5131
5132         * condate.y: New file.
5133         * tree-match.h (struct patt_info_s): New field sign.
5134         (struct condate_s): New field msg.
5135         (normalize_condate, name_condate, add_condate): New.
5136         (conds[], condate_parse): Made extern.
5137         * tree-check.c (tree_check_warning): First arg changed to cond;
5138         warning reformatted.
5139         (tree_check_init): Reset the TREE_VISITED bit on every CFG node.
5140         (tree_scan): New.
5141         (tree_check): Process trivial condates.
5142         (read_delimited_string): Removed.
5143         (print_cond): Print name and msg.
5144         (conds[]): Made extern.
5145         (parse_tree_check_file_once): Rewritten to use the parser in
5146         condate.y.
5147         Processing of option --tree_check_string moved to tree_scan().
5148         * Makefile.in: Added condate.y
5149
5150 2007-03-12  Sebastian Pop  <sebastian.pop@inria.fr>
5151
5152         * tree-pretty-print.c (dump_generic_bb_buff, lazy_dump_generic_node):
5153         Use VECs instead of varrays.
5154         * diagnostic.h (lazy_dump_generic_node): Update declaration.
5155         * Makefile.in (pretty-print.o): Depend on vec.h.
5156         * pretty-print.c: Include tree.h and vec.h.
5157         (pp_clear_state, pp_write_list_to_stream, pp_base_format,
5158         pp_base_format, pp_construct, pp_base_string, pp_lazy_mode,
5159         new_tree_chunk, pp_add_tree, pp_add_string, pp_add_char, pp_write_list,
5160         pp_free_list): Use VECs instead of varrays.
5161         * pretty-print.h: Do not include varray.h.
5162         (struct tree_chunk_s): Declaration moved before its use.
5163         (output_buffer): Rename varray field to chunks.
5164         * tree-match.c (tree_equal, chunk_1st_char, chunks_lookahead,
5165         tree_1st_char, match_chunks_pattinfo, match_tree_pattinfo,
5166         save_global_holes): Use VECs instead of varrays.
5167         * tree-match.h: Declare VECs of cfg_node, and hole_p.
5168         * tree-check.c (scan_cfg_stmts, push_node,
5169         print_matching_stmt): Removed.
5170         (tree_check_instance, push_global_holes_if_new, tree_check,
5171         execute_tree_check): Use VECs instead of varrays.
5172         (gate_tree_check): Don't execute the CFG check when basic_block_info
5173         is not available.
5174
5175 2007-01-12  Sebastian Pop  <sebastian.pop@inria.fr>
5176
5177         * Merge from mainline (r115016:120733).
5178
5179 2007-01-12  Sebastian Pop  <sebastian.pop@inria.fr>
5180
5181         * Merge from mainline (r117632:117661).
5182
5183 2007-01-12  Sebastian Pop  <sebastian.pop@inria.fr>
5184
5185         * tree-dump.c (dump_option_value_in): Add TDF_DEBUG.
5186         * tree-pass.h (TDF_DEBUG, debug_p): New.
5187         * tree-scalar-evolution.c (set_scalar_evolution, get_scalar_evolution,
5188         get_scalar_evolution, add_to_evolution, set_nb_iterations_in_loop,
5189         get_loop_exit_condition, analyze_evolution_in_loop,
5190         analyze_initial_condition, analyze_scalar_evolution,
5191         instantiate_parameters, number_of_latch_executions): Use debug_p.
5192         * tree-chrec.c (chrec_apply): Use debug_p.
5193         * tree-data-ref.c: Include graphite.h.
5194         (dump_data_reference): Print also the access matrix.
5195         (analyze_array, analyze_indirect_ref, init_data_ref,
5196         analyze_offset_expr, address_analysis, object_analysis,
5197         create_data_ref, finalize_ddr_dependent,
5198         non_affine_dependence_relation, analyze_ziv_subscript,
5199         analyze_siv_subscript_cst_affine,
5200         compute_overlap_steps_for_affine_1_2, analyze_subscript_affine_affine,
5201         can_use_analyze_subscript_affine_affine, analyze_siv_subscript,
5202         analyze_miv_subscript, analyze_overlapping_iterations,
5203         build_classic_dist_vector, subscript_dependence_tester,
5204         compute_affine_dependence, analyze_all_data_dependences): Use debug_p.
5205         (build_access_matrix_with_af): No longer static.
5206         * tree-data-ref.h (scop_p): ... declaration here.
5207         (data_reference.scop): New field.
5208         (DR_SCOP, DR_ACCESS_MATRIX): New.
5209         (build_access_matrix_with_af, dr_num_subscripts): Declared.
5210         * graphite.c (print_graphite_bb): Call dump_data_references.
5211         (print_scop): Use scop_nb_loops and scop_dim_domain.
5212         (test_for_scop_bound): Use debug_p.
5213         (scan_tree_for_params): Use scop_nb_loops, scop_nb_loops and
5214         scop_nb_params.
5215         (scop_loop_index): Moved...
5216         (scop_record_loop): New.
5217         (build_scop_loop_nests): Use scop_record_loop.
5218         (build_scop_domain): Use scop_dim_domain.
5219         (build_access_matrix): Implemented.
5220         (build_scop_canonical_schedules): Use scop_nb_loops.
5221         (build_graphite_bb): Initialize GBB_SCOP.
5222         * graphite.h (scop_p): Moved...
5223         (graphite_bb.scop): New field.
5224         (graphite_bb.iteration_domain, GBB_DOMAIN, scop.nb_params,
5225         scop.nb_loops, scop.dim_domain, SCOP_NB_LOOPS, SCOP_NB_PARAMS,
5226         SCOP_DIM_DOMAIN, SCOP_STMTS): Removed.
5227         (scop_nb_params, scop_nb_loops, scop_dim_domain, gbb_dim_domain,
5228         scop_loop_index): New.
5229         * Makefile.in (tree-data-ref.o): Depends on graphite.h.
5230
5231 2007-01-05  Sebastian Pop  <sebastian.pop@inria.fr>
5232
5233         * Merge from mainline (r117661:120450).
5234
5235 2006-10-12  Sebastian Pop  <sebastian.pop@inria.fr>
5236
5237         * tree-scalar-evolution.c (instantiate_parameters_1): Don't stop
5238         at the first declaration outside the varying loop, instantiate as
5239         far as possible.
5240         * tree-chrec.c (for_each_scev_op): New.
5241         * tree-chrec.h (for_each_scev_op): Declared.
5242         * tree-ssa-loop.c (pass_graphite_trans): Don't dump the function.
5243         * tree-data-ref.c (get_references_in_stmt,
5244         find_data_references_in_stmt): New, from trunk.
5245         (find_data_references_in_loop): Use get_references_in_stmt
5246         and find_data_references_in_loop, modified as in trunk.
5247         (build_access_matrix_with_af): New.
5248         * tree-data-ref.h (data_reference): Add a field access_matrix.
5249         (data_ref_loc): New, as in trunk.
5250         * graphite.c (print_graphite_bb, bb_in_scop_p, stmt_in_scop_p,
5251         invariant_in_scop_p, param_index, scan_tree_for_params,
5252         scop_loop_index, build_scop_loop_nests, build_scop_domain, irp_data,
5253         idx_record_param, idx_record_params, build_access_matrix,
5254         build_scop_data_accesses, build_scop_canonical_schedules,
5255         build_graphite_bb, build_scop_bbs, find_params_in_bb,
5256         build_scop_params): New.
5257         * graphite.h (graphite_bb): New.
5258         (scop): Add fields static_schedule, params, loop_nest,
5259         iteration_domain.
5260         * lambda.h: Declare vecs of lambda_matrix.
5261         * tree-flow.h (print_loop_ir_bb): Declared.
5262         * tree-cfg.c (print_loop_ir_bb): New.
5263         (print_loop): Use print_loop_ir_bb.
5264
5265 2006-10-12  Sebastian Pop  <pop@cri.ensmp.fr>
5266
5267         * Merge from mainline (r115016:117632).
5268
5269 2006-10-11  Sebastian Pop  <pop@cri.ensmp.fr>
5270
5271         * graphite.c (debug_scops): Adjust definition for avoiding a bootstrap
5272         break due to a warning.
5273
5274 2006-10-10  Sebastian Pop  <pop@cri.ensmp.fr>
5275
5276         * graphite.c (print_scops, debug_scops): New.
5277         (graphite_transform): Renamed graphite_find_transform.
5278         * graphite.h (debug_scops): Declared.
5279
5280 2006-08-17  Sebastian Pop  <pop@cri.ensmp.fr>
5281
5282         * tree-match.c: Reformat following the GNU style.
5283         * tree-match.h: Reformat following the GNU style.
5284         * tree-pattern.h: Removed empty file.
5285         * Makefile.in: Remove references to tree-pattern.h.
5286         * tree-check.c: Reformat following the GNU style.
5287         (execute_tree_check): Move gate condition code to...
5288         (gate_tree_check): ...here.  New function.
5289         (pass_check): Use the gate function.
5290
5291 2006-07-04  Nic Volanschi <nic.volanschi@free.fr>
5292
5293         * tree-pattern.h: New. Tree pattern matching and checking using
5294         concrete syntax.
5295         * tree-check.c: New. Tree/CFG checking pass.
5296         * tree-match.c: New. Library for tree pattern matching.
5297         * opts.c, common.opt: Add options --ftree-check & --ftree-checks.
5298         * toplev.c, flags.h: Add globals for tree-check pass.
5299         * Makefile.in: Integrate the files in tree-check pass.
5300         * timevar.def, tree-optimize.c, tree-pass.h: Register tree-check pass.
5301         * pretty-print.c, pretty-print.h, tree-pretty-print.c, diagnostic.h:
5302         Introduce a "lazy" pretty-print mode.
5303         * tree.c, tree.h: Add tree_name.
5304
5305 2006-07-04  Sebastian Pop  <pop@cri.ensmp.fr>
5306
5307         * doc/invoke.texi (-fgraphite): Correct typo.
5308         * tree-scalar-evolution.c (number_of_iterations_for_all_loops): Update
5309         use of print_loop_ir.
5310         * testsuite/gcc.dg/graphite/scop-1.c: New.
5311         * testsuite/gcc.dg/graphite/scop-2.c: New.
5312         * testsuite/gcc.dg/graphite/graphite.exp: New.
5313         * graphite.c: Include domwalk.h.
5314         (print_scop): Print only the entry and exit blocks.
5315         (debug_scop): No longer static.
5316         (affine_expr): Fix formating.  Return also true when the expression is
5317         constant.
5318         (stmt_simple_for_scop_p): Fix formating.
5319         (build_scops): Use domwalk.
5320         (get_loop_start, end_scop, test_for_scop_bound): New.
5321         (graphite_transform_loops): Avoid printing on stderr.
5322         * graphite.h (debug_scop): Declared.
5323         * tree-flow.h (debug_loop_ir, print_loop_ir): Update declarations.
5324         * Makefile.in (graphite.o): Depend on domwalk.h.
5325         * tree-cfg.c (print_loop, print_pred_bbs, print_succ_bbs): Remove
5326         declarations for static functions.
5327         (print_loop, print_loop_ir, debug_loop_ir): Use an extra parameter for
5328         controlling output verbosity.
5329
5330 2006-06-26  Sebastian Pop  <pop@cri.ensmp.fr>
5331             Plesco Alexandru  <shurikx@gmail.com>
5332
5333         * doc/invoke.texi (-fgraphite): Document.
5334         * tree-pass.h (pass_graphite_transforms): Declared.
5335         * timevar.def (TV_GRAPHITE_TRANSFORMS): New.
5336         * tree-ssa-loop.c (graphite_transforms, gate_graphite_transforms): New.
5337         (pass_graphite_transforms): Defined.
5338         * tree-data-ref.c (free_data_ref, data_reference): Extern.
5339         * tree-data-ref.h (free_data_ref, data_reference): Declared.
5340         * graphite.c, graphite.h: New.
5341         * common.opt (fgraphite): Declared.
5342         * tree-flow.h (graphite_transform_loops): Declared.
5343         * Makefile.in (OBJS-common): Add graphite.o.
5344         (graphite.o): New rule.
5345         * passes.c (pass_graphite_transforms): Scheduled.
5346